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

Find examples in Playground
  • Creates a new instance Particle

    Parameters

    • particleSystem: ParticleSystem

      the particle system the particle belongs to

    Returns Particle

Properties

age

Find examples in Playground
age: number

The current age of the particle.

angle

Find examples in Playground
angle: number

The current angle of the particle.

angularSpeed

Find examples in Playground
angularSpeed: number

Defines how fast is the angle changing.

cellIndex

Find examples in Playground
cellIndex: number

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

color

Find examples in Playground
color: Color4

The color of the particle.

colorStep

Find examples in Playground
colorStep: Color4

The color change of the particle per step.

direction

Find examples in Playground
direction: Vector3

The world direction of the particle in the scene.

id

Find examples in Playground
id: number

Unique ID of the particle

lifeTime

Find examples in Playground
lifeTime: number

Defines how long will the life of the particle be.

particleSystem

Find examples in Playground
particleSystem: ParticleSystem

The particle system the particle belongs to.

position

Find examples in Playground
position: Vector3

The world position of the particle in the scene.

remapData

Find examples in Playground
remapData: Vector4

The information required to support color remapping

scale

Find examples in Playground
scale: Vector2

The current scale of the particle.

size

Find examples in Playground
size: number

The current size of the particle.

Methods

copyTo

Find examples in Playground
  • Copy the properties of particle to another one.

    Parameters

    • other: Particle

      the particle to copy the information to.

    Returns void

updateCellIndex

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

    Returns void

Generated using TypeDoc