Global

Members

(constant) EmissionSource :EmissionSourceValues

Description:
  • Runtime constant mapping for emission source modes. For the list of available modes, see EmissionSourceValues.
Source:
Runtime constant mapping for emission source modes. For the list of available modes, see EmissionSourceValues.
Type:

(constant) FlatParticleDataFormat :FlatParticleDataFormatConstants

Description:
Source:
Runtime constants describing the flat particle data format exported by Gnist#fillFlatArray.
Type:

Type Definitions

Color

Description:
  • Represents the color state of a particle. RGB color channels are stored independently for efficient interpolation.
Source:
Properties:
Name Type Attributes Default Description
r number <optional>
255 Red color channel value (0 to 255).
g number <optional>
255 Green color channel value (0 to 255).
b number <optional>
255 Blue color channel value (0 to 255).
Represents the color state of a particle. RGB color channels are stored independently for efficient interpolation.
Type:
  • object

ColorRampConfig

Description:
  • ColorRamp configuration options. Includes all properties from ModifierConfig.
Source:
Properties:
Name Type Attributes Default Description
colors Array.<Array.<number>> <optional>
[[255, 255, 255], [0, 0, 0]] Array of RGB color arrays.
ColorRamp configuration options. Includes all properties from ModifierConfig.
Type:
  • object

CullingBounds

Description:
  • Defines a region beyond which particles are considered outside the simulation and are marked dead. A safety margin is applied per particle based on its position and size, preventing early removal while it is still partially inside the region.
Source:
Properties:
Name Type Description
xMin number Left boundary of the region.
yMin number Top boundary of the region.
xMax number Right boundary of the region.
yMax number Bottom boundary of the region.
Defines a region beyond which particles are considered outside the simulation and are marked dead. A safety margin is applied per particle based on its position and size, preventing early removal while it is still partially inside the region.
Type:
  • object

DirectionalForceConfig

Description:
  • DirectionalForce configuration options. Includes all properties from ForceConfig.
Source:
Properties:
Name Type Attributes Default Description
ax number <optional>
0 Horizontal acceleration component (in pixels per second²). Positive values accelerate particles to the right, negative values to the left.
ay number <optional>
0 Vertical acceleration component (in pixels per second²). Positive values accelerate particles downward, negative values upward.
DirectionalForce configuration options. Includes all properties from ForceConfig.
Type:
  • object

EllipseEmitterConfig

Description:
  • EllipseEmitter configuration options. Includes all properties from EmitterConfig.
Source:
Properties:
Name Type Attributes Default Description
x number <optional>
0 Horizontal coordinate of the emission ellipse center.
y number <optional>
0 Vertical coordinate of the emission ellipse center.
radiusX number <optional>
50 Horizontal radius of the emission ellipse.
radiusY number <optional>
50 Vertical radius of the emission ellipse.
EllipseEmitter configuration options. Includes all properties from EmitterConfig.
Type:
  • object

EmissionSourceValues

Description:
  • Available emission source modes used in emitter configurations (specifically for `EmitterConfig.emissionSource`) to define the geometric distribution and initial direction of emitted particles. The default direction depends on both the emission source mode and the emitter type and can be overridden by specifying `particleBlueprint.direction` in the emitter config.
Source:
Properties:
Name Type Description
EDGE_OUT string Emit from the shape's boundary, directing particles outward.
EDGE_IN string Emit from the shape's boundary, directing particles inward.
EDGE_BOTH string Emit from the shape's boundary, directing particles randomly inward or outward.
VOLUME string Emit uniformly from the shape's entire area.
Available emission source modes used in emitter configurations (specifically for `EmitterConfig.emissionSource`) to define the geometric distribution and initial direction of emitted particles. The default direction depends on both the emission source mode and the emitter type and can be overridden by specifying `particleBlueprint.direction` in the emitter config.
Type:
  • object

EmitterConfig

Description:
  • Emitter configuration options.
Source:
Properties:
Name Type Attributes Default Description
id string <optional>
Unique identifier. Defaults to a generated UUID.
enabled boolean <optional>
true Flag indicating whether the emitter is running or not.
particlesPerSecond number <optional>
10 Continuous emission rate of new particles per second.
duration number <optional>
Infinity Duration of particle emission (in seconds) or JavaScript's native Infinity global object or a negative number for infinite emission.
x number <optional>
0 Current horizontal coordinate of the emitter origin.
y number <optional>
0 Current vertical coordinate of the emitter origin.
emissionSource string <optional>
EmissionSource.VOLUME Emission source mode, defining the geometric distribution and initial direction of emitted particles. The default direction depends on both the emission source mode and the emitter type and can be overridden by specifying `particleBlueprint.direction` in the emitter config. See EmissionSourceValues for available configuration constants.
particleBlueprint ParticleBlueprint <optional>
{} Configuration for emitted particles.
Emitter configuration options.
Type:
  • object

EngineConfig

Description:
  • Engine configuration options.
Source:
Properties:
Name Type Attributes Default Description
cullingBounds CullingBounds | null <optional>
null Optional region used for particle culling.
Engine configuration options.
Type:
  • object

FlatParticleDataFormatConstants

Source:
Properties:
Name Type Description
FLOATS_PER_PARTICLE number Number of consecutive entries used to represent a single particle in a flat `Float32Array`.
Type:
  • object

ForceConfig

Description:
  • Force configuration options.
Source:
Properties:
Name Type Attributes Description
id string <optional>
Unique identifier. Defaults to a generated UUID.
Force configuration options.
Type:
  • object

LineEmitterConfig

Description:
  • LineEmitter configuration options. Includes all properties from EmitterConfig.
Source:
Properties:
Name Type Attributes Default Description
x1 number <optional>
0 Horizontal coordinate of the start point of the emission line segment.
y1 number <optional>
0 Vertical coordinate of the start point of the emission line segment.
x2 number <optional>
100 Horizontal coordinate of the end point of the emission line segment.
y2 number <optional>
0 Vertical coordinate of the end point of the emission line segment.
LineEmitter configuration options. Includes all properties from EmitterConfig.
Type:
  • object

LinearDragConfig

Description:
  • LinearDrag configuration options. Includes all properties from ForceConfig.
Source:
Properties:
Name Type Attributes Default Description
drag number <optional>
0.99 Friction coefficient where 0 means no drag and higher values slow particles down faster.
LinearDrag configuration options. Includes all properties from ForceConfig.
Type:
  • object

ModifierConfig

Description:
  • Modifier configuration options.
Source:
Properties:
Name Type Attributes Description
id string <optional>
Unique identifier. Defaults to a generated UUID.
Modifier configuration options.
Type:
  • object

OpacityFadeConfig

Description:
  • OpacityFade configuration options. Includes all properties from ModifierConfig.
Source:
Properties:
Name Type Attributes Default Description
startOpacity number <optional>
1.0 Opacity at particle emission. Values range from 0.0 (fully transparent) to 1.0 (fully opaque).
endOpacity number <optional>
0.0 Opacity at particle death. Values range from 0.0 (fully transparent) to 1.0 (fully opaque).
OpacityFade configuration options. Includes all properties from ModifierConfig.
Type:
  • object

ParticleBlueprint

Description:
  • Configuration options used by emitters to initialize particles at emission. This object is not runtime Particle state and does not correspond directly to Particle properties. Options are interpreted either directly or indirectly to derive Particle properties. Most options may be specified as a single number or a [min, max] range array.
Source:
Properties:
Name Type Attributes Description
rotation number | Array.<number> <optional>
Orientation angle (in radians).
angularVelocity number | Array.<number> <optional>
Angular rotation speed (in radians per second).
size number | Array.<number> <optional>
The visual size or scale factor. Interpreted by the renderer as pixels, radius, or a transform scale.
color Color <optional>
The particle color, defined by individual RGB channels.
opacity number | Array.<number> <optional>
Transparency (0.0 = fully transparent, 1.0 = fully opaque).
lifespan number | Array.<number> <optional>
Maximum allowed lifespan (in seconds).
speed number | Array.<number> <optional>
Speed (in pixels per second) used to derive the particle's initial horizontal and vertical velocity.
direction number | Array.<number> <optional>
Movement direction angle (in radians) used to derive the particle's initial horizontal and vertical velocity.
Configuration options used by emitters to initialize particles at emission. This object is not runtime Particle state and does not correspond directly to Particle properties. Options are interpreted either directly or indirectly to derive Particle properties. Most options may be specified as a single number or a [min, max] range array.
Type:
  • object

RadialForceConfig

Description:
  • RadialForce configuration options. Includes all properties from ForceConfig.
Source:
Properties:
Name Type Attributes Default Description
x number <optional>
0 Horizontal coordinate of the force center.
y number <optional>
0 Vertical coordinate of the force center.
strength number <optional>
50000 Magnitude of the force. Positive values create attraction, negative values create repulsion. Typical values range from several thousand to several hundred thousand, depending on scene size.
epsilon number <optional>
10 Smoothing factor to prevent divide-by-zero errors and infinite acceleration spikes near the center. Stored internally as a squared value in RadialForce#epsilonSquared.
cullingRadius number <optional>
0 Distance threshold from the center below which particles are marked dead. Set to 0 to disable. Stored internally as a squared value in RadialForce#cullingRadiusSquared.
RadialForce configuration options. Includes all properties from ForceConfig.
Type:
  • object

RectEmitterConfig

Description:
  • RectEmitter configuration options. Includes all properties from EmitterConfig.
Source:
Properties:
Name Type Attributes Default Description
x number <optional>
0 Horizontal coordinate of the top-left corner of the emission rectangle.
y number <optional>
0 Vertical coordinate of the top-left corner of the emission rectangle.
width number <optional>
100 Width of the emission rectangle.
height number <optional>
100 Height of the emission rectangle.
RectEmitter configuration options. Includes all properties from EmitterConfig.
Type:
  • object

RotationTweenConfig

Description:
  • RotationTween configuration options. Includes all properties from ModifierConfig.
Source:
Properties:
Name Type Attributes Default Description
startRotation number <optional>
0 RotationTween angle (in radians) at particle emission.
endRotation number <optional>
6.283185 RotationTween angle (in radians) at particle death.
RotationTween configuration options. Includes all properties from ModifierConfig.
Type:
  • object

ScaleTweenConfig

Description:
  • ScaleTween configuration options. Includes all properties from ModifierConfig.
Source:
Properties:
Name Type Attributes Default Description
startScale number <optional>
1.0 Scale multiplier at particle emission.
endScale number <optional>
0.1 Scale multiplier at particle death.
ScaleTween configuration options. Includes all properties from ModifierConfig.
Type:
  • object

SineWaveConfig

Description:
  • SineWave configuration options. Includes all properties from ModifierConfig.
Source:
Properties:
Name Type Attributes Default Description
amplitude number | Array.<number> <optional>
10 Wave amplitude (in pixels), or a [start, end] range array interpolated over lifespan.
frequency number | Array.<number> <optional>
2 Cycles per second (Hz), or a [start, end] range array interpolated over lifespan.
SineWave configuration options. Includes all properties from ModifierConfig.
Type:
  • object

SpinConfig

Description:
  • Spin configuration options. Includes all properties from ModifierConfig.
Source:
Properties:
Name Type Attributes Description
angularVelocity number <optional>
Optional spin rate in radians per second. If omitted, the particle's own angularVelocity value is used.
Spin configuration options. Includes all properties from ModifierConfig.
Type:
  • object

TurbulenceConfig

Description:
  • Turbulence configuration options. Includes all properties from ModifierConfig.
Source:
Properties:
Name Type Attributes Default Description
strength number | Array.<number> <optional>
20 Magnitude of displacement (in pixels per second) or a [start, end] range array interpolated over lifespan.
scale number <optional>
0.01 Noise scale factor. Smaller values produce smooth, sweeping currents; larger values produce tight, chaotic jitter.
Turbulence configuration options. Includes all properties from ModifierConfig.
Type:
  • object

VortexConfig

Description:
  • Vortex force configuration options. Includes all properties from ForceConfig.
Source:
Properties:
Name Type Attributes Default Description
x number <optional>
0 Horizontal coordinate of the vortex center.
y number <optional>
0 Vertical coordinate of the vortex center.
rotationSpeed number <optional>
100 Rotation speed. Positive values for clockwise, negative values for counter-clockwise rotation.
suctionSpeed number <optional>
50 Inward suction speed. Positive values pull inward, negative values push outward.
radius number <optional>
Infinity Maximum radius of influence. Particles outside this distance are unaffected.
cullingRadius number <optional>
0 Distance threshold from the center below which particles are marked dead, surrounded by a frame-rate independent soft-aging buffer zone to prevent visual popping. Note that high velocities or long lifespans may cause particles to mathematically bypass the center and slingshot outward. In such cases, increase this radius to intercept particles before they reach their escape brink. Omit or set to 0 to disable. Stored internally as Vortex#cullingRadius and as a squared value in Vortex#cullingRadiusSquared.
Vortex force configuration options. Includes all properties from ForceConfig.
Type:
  • object