ParticleSystem

external class ParticleSystem(options: ParticleSystem.ConstructorOptions? = definedExternally)(source)

A ParticleSystem manages the updating and display of a collection of particles.

See also

Constructors

Link copied to clipboard
constructor(options: ParticleSystem.ConstructorOptions? = definedExternally)

Types

Link copied to clipboard
sealed interface ConstructorOptions

Properties

Link copied to clipboard

An array of ParticleBurst, emitting bursts of particles at periodic times.

Link copied to clipboard

Fires an event when the particle system has reached the end of its lifetime.

Link copied to clipboard

The number of particles to emit per second.

Link copied to clipboard

The particle emitter for this

Link copied to clipboard

The 4x4 transformation matrix that transforms the particle system emitter within the particle systems local coordinate system.

Link copied to clipboard

The color of the particle at the end of its life.

Link copied to clipboard

The final scale to apply to the image of the particle at the end of its life.

Link copied to clipboard
var image: Any

The URI, HTMLImageElement, or HTMLCanvasElement to use for the billboard.

Link copied to clipboard

When true, the particle system has reached the end of its lifetime; false otherwise.

Link copied to clipboard

How long the particle system will emit particles, in seconds.

Link copied to clipboard

Whether the particle system should loop it's bursts when it is complete.

Link copied to clipboard

Sets the maximum bound, width by height, below which to randomly scale the particle image's dimensions in pixels.

Link copied to clipboard

Sets the maximum mass of particles in kilograms.

Link copied to clipboard

Sets the maximum bound in seconds for the possible duration of a particle's life below which a particle's actual life will be randomly chosen.

Link copied to clipboard

Sets the maximum bound in meters per second below which a particle's actual speed will be randomly chosen.

Link copied to clipboard

Sets the minimum bound, width by height, above which to randomly scale the particle image's dimensions in pixels.

Link copied to clipboard

Sets the minimum mass of particles in kilograms.

Link copied to clipboard

Sets the minimum bound in seconds for the possible duration of a particle's life above which a particle's actual life will be randomly chosen.

Link copied to clipboard

Sets the minimum bound in meters per second above which a particle's actual speed will be randomly chosen.

Link copied to clipboard

The 4x4 transformation matrix that transforms the particle system from model to world coordinates.

Link copied to clipboard

Whether to display the particle system.

Link copied to clipboard

Gets or sets if the particle size is in meters or pixels. true to size particles in meters; otherwise, the size is in pixels.

Link copied to clipboard

The color of the particle at the beginning of its life.

Link copied to clipboard

The initial scale to apply to the image of the particle at the beginning of its life.

Link copied to clipboard

An array of force callbacks. The callback is passed a Particle and the difference from the last time

Functions

Link copied to clipboard
fun destroy()

Destroys the WebGL resources held by this object. Destroying an object allows for deterministic release of WebGL resources, instead of relying on the garbage collector to destroy this object.

Link copied to clipboard

Returns true if this object was destroyed; otherwise, false.