Particle

Particle

Represents a single particle within the simulation.

Constructor

new Particle()

Description:
  • Initializes a blank, inactive particle.
Source:

Classes

Particle

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

baseSize :number

Description:
  • The initial, unmodified birth size of the particle. Used as the baseline reference for scale calculations over time.
Source:
The initial, unmodified birth size of the particle. Used as the baseline reference for scale calculations over time.
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

pathModifiers :Array.<Modifier>|null

Description:
  • Shared reference to the owner emitter's path modifier array.
Source:
Shared reference to the owner emitter's path modifier array.
Type:

rotation :number

Description:
  • Current orientation angle (in radians).
Source:
Current orientation angle (in radians).
Type:
  • number

scopedForces :Array.<Force>|null

Description:
  • Shared reference to the owner emitter's scoped emitter-specific force array.
Source:
Shared reference to the owner emitter's scoped emitter-specific force array.
Type:

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

visualModifiers :Array.<Modifier>|null

Description:
  • Shared reference to the owner emitter's visual modifier array.
Source:
Shared reference to the owner emitter's visual modifier array.
Type:

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