Constructor
new Particle()
- Description:
- Initializes a blank, inactive particle.
- Source:
Classes
Members
age :number
- Description:
- Time elapsed since the particle was emitted (in seconds).
- Source:
Time elapsed since the particle was emitted (in seconds).
Type:
- number
alive :boolean
- Description:
- Flag indicating whether the particle is still alive. Dead particles are automatically removed from the simulation.
- Source:
Flag indicating whether the particle is still alive. Dead particles are automatically removed from the simulation.
Type:
- boolean
angularVelocity :number
- Description:
- Angular rotation speed (in radians per second).
- Source:
Angular rotation speed (in radians per second).
Type:
- number
color :Color
- Description:
- Current RGB color channels.
- Source:
Current RGB color channels.
Type:
lifespan :number
- Description:
- Maximum allowed lifespan (in seconds).
- Source:
Maximum allowed lifespan (in seconds).
Type:
- number
opacity :number
- Description:
- Current transparency (0.0 = fully transparent, 1.0 = fully opaque).
- Source:
Current transparency (0.0 = fully transparent, 1.0 = fully opaque).
Type:
- number
rotation :number
- Description:
- Current orientation angle (in radians).
- Source:
Current orientation angle (in radians).
Type:
- number
size :number
- Description:
- The visual size or scale factor. Interpreted by the renderer as pixels, radius, or a transform scale.
- Source:
The visual size or scale factor.
Interpreted by the renderer as pixels, radius, or a transform scale.
Type:
- number
vx :number
- Description:
- Current horizontal velocity component (in pixels per second).
- Source:
Current horizontal velocity component (in pixels per second).
Type:
- number
vy :number
- Description:
- Current vertical velocity component (in pixels per second).
- Source:
Current vertical velocity component (in pixels per second).
Type:
- number
x :number
- Description:
- Current horizontal coordinate.
- Source:
Current horizontal coordinate.
Type:
- number
y :number
- Description:
- Current vertical coordinate.
- Source:
Current vertical coordinate.
Type:
- number
Methods
getModifiers() → {Array.<Modifier>}
- Description:
- Gets the shared reference to the emitter's modifier array.
- Source:
Returns:
- Type
- Array.<Modifier>
getScopedForces() → {Array.<Force>}
- Description:
- Gets the shared reference to the emitter's scoped emitter-specific force array.
- Source:
Returns:
- Type
- Array.<Force>
setModifiers(modifiers) → {void}
- Description:
- Sets the shared reference to the emitter's modifier array.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
modifiers |
Array.<Modifier> | The shared reference to the emitter's modifier array. |
Returns:
- Type
- void
setScopedForces(scopedForces) → {void}
- Description:
- Sets the shared reference to the emitter's scoped emitter-specific force array.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
scopedForces |
Array.<Force> | The shared reference to the emitter's scoped emitter-specific force array. |
Returns:
- Type
- void