Particle

A particle represents one of the element emitted by a particle system. This is mainly define by its coordinates, direction, velocity and age.

Hierarchy

  • Particle

Index

Constructors

constructor

  • Creates a new instance Particle

    Parameters

    • particleSystem: ParticleSystem

      the particle system the particle belongs to

    Returns Particle

Properties

age

age: number

The current age of the particle.

angle

angle: number

The current angle of the particle.

angularSpeed

angularSpeed: number

Defines how fast is the angle changing.

cellIndex

cellIndex: number

Defines the cell index used by the particle to be rendered from a sprite.

color

color: Color4

The color of the particle.

colorStep

colorStep: Color4

The color change of the particle per step.

direction

direction: Vector3

The world direction of the particle in the scene.

lifeTime

lifeTime: number

Defines how long will the life of the particle be.

particleSystem

particleSystem: ParticleSystem

particleSystem the particle system the particle belongs to.

position

position: Vector3

The world position of the particle in the scene.

scale

scale: Vector2

The current scale of the particle.

size

size: number

The current size of the particle.

Methods

copyTo

  • Copy the properties of particle to another one.

    Parameters

    • other: Particle

      the particle to copy the information to.

    Returns void

updateCellIndex

  • updateCellIndex(): void
  • Defines how the sprite cell index is updated for the particle

    Returns void

Generated using TypeDoc