Skip to main content

Class: Particle

index.Particle

Represents an emitted particle.

Constructors#

constructor#

• new Particle(options)

Creates a new particle instance through the specified options.

Parameters#

NameType
optionsPartial<Omit<Particle, "id" | "initialLifetime" | "initialSize" | "initialRotation">>

Defined in#

particles/particle.ts:60

Properties#

color#

• color: Color

The current color of the particle.

Defined in#

particles/particle.ts:43


id#

• id: symbol

The unique (symbolic) ID of the particle.

Defined in#

particles/particle.ts:18


initialLifetime#

• initialLifetime: number

The initial lifetime of the particle.

Defined in#

particles/particle.ts:52


initialRotation#

• initialRotation: Vector

The initial rotation of the particle.

Defined in#

particles/particle.ts:60


initialSize#

• initialSize: number

The initial size of the particle.

Defined in#

particles/particle.ts:56


lifetime#

• lifetime: number

The remaining lifetime of the particle.

Defined in#

particles/particle.ts:23


location#

• location: Vector

The current location of the particle, in pixels.

Defined in#

particles/particle.ts:31


opacity#

• opacity: number

The opacity of the particle (from 0 to 1).

Defined in#

particles/particle.ts:47


rotation#

• rotation: Vector

The current rotation of the particle, in euler angles, in degrees.

Defined in#

particles/particle.ts:35


size#

• size: number

The current size of the particle.

Defined in#

particles/particle.ts:27


velocity#

• velocity: Vector

The current velocity of the particle.

Defined in#

particles/particle.ts:39