ParticleEmitter

ParticleEmitter

A Particle Emitter spawns particles - controlling spawn rate, lifetime, initial velocity vector and position of each particle.

Constructor

new ParticleEmitter(optionsopt)

Parameters:
Name Type Attributes Description
options Object <optional>

Particle emitter options passed as an object

Properties
Name Type Attributes Default Description
totalParticlesToSpawn number <optional>
-1

Specifies how many particles this emitter should spawn (-1 for an unlimited amount)

maxLifetime number <optional>
3.0

The maximum lifetime of a particle emitted by this emitter (in seconds)

minLifetime number <optional>
2.0

The minimum lifetime of a particle emitted by this emitter (in seconds)

timeline Array.<{color:Vector3, mass:Number, uvIndex:Number, size:Number, spin:Number}> <optional>

A timeline object describing the transformations that a particle should go through while it 'ages'. This overrides the timeline set on the particle component

influences Array.<ParticleInfluence> <optional>

An array of objects providing functions that alter the particle

emissionPoint function <optional>

A function returning an emission point for a particle

getEmissionVelocity function <optional>

A function returning an emission velocity for a particle

getParticleBillboardVectors function <optional>
ParticleEmitter.CAMERA_BILLBOARD_FUNC

A function that sets the orientation of the particle's billboard

releaseRatePerSecond number <optional>
10

Target number of particles per second to spawn

Methods

(static) CAMERA_BILLBOARD_FUNC(particle)

Sets the billboard coordinates of the particle to face the camera

Parameters:
Name Type Description
particle