ParticleEmitter Class

Extends Points
Module: Particles

Particle emitter is a wrapper for SPE particle system.

SPE is a threejs based particle emitter engine.

Documentation for SPE particle engine can be found here https:// squarefeet.github.io/ShaderParticleEngine/docs/api/index.html

Methods

dispose

()

Dispose particle emitter.

Should be called when destroying particle emitter.

onBeforeRender

()

Particle emitter state is automatically updated before rendering.

reload

()

Reload internal material and geometry of this particle emitter.

Recretes the group and emitter object attached to the particle.

May be required after changing material related parameters.

updateMatrix

()

Update particle object matrix.

Ignores the particle position if the moveEmitter attribute is set true.

Properties

dinamicEmitter

Boolean

A dynamic particle emmiter ignores the position in its transform and applies it directly to the emitter origin.

emitter

ParticleEmitterControl

Emitter instance.

Emitter has attributes that can be used to controll the particle system

group

ParticleGroup

Particle group instance.

texture

Texture

Texture attached to the group of this particle emitter.

Attributes

defaultEmitter

Object

Default particle emitter configuration.

defaultGroup

Object

Default particle emitter group configuration.

valueOverLifetimeLength

Number

Set this value to however many "steps" you want value-over-lifetime properties to have.

Its adjustable to fix an interpolation problem:

Assuming you specify an opacity value as [0, 1, 0] and the valueOverLifetimeLength is 4, then the opacity value array will be reinterpolated to be [0, 0.66, 0.66, 0]. This isn't ideal, as particles would never reach full opacity.

This property affects the length of ALL value-over-lifetime properties for ALL emitters and ALL groups. Only values >= 3 && <= 4 are allowed.