ParticleEmitterSettings
namespace ParticleEmitterSettings
ParticleEmitterSettings contains the default settings for ParticleEmitter
Summary
Properties from ParticleEmitterSettings
number |
|
number |
|
string |
|
number |
|
boolean |
|
boolean |
|
number |
|
number |
|
number |
|
number |
|
HTMLCanvasElement |
|
number |
|
number |
|
number |
|
number |
|
number |
|
number |
|
number |
|
number |
|
number |
|
boolean |
|
number |
|
number |
|
boolean |
|
number |
|
string |
|
number |
|
number |
|
number |
|
Public Properties
static angle: number = Math.PI / 2
number
Start angle for particle launch in Radians
static angleVariation: number = 0
number
letiation in the start angle for particle launch in Radians.
static blendMode: string = normal
string
the blend mode to be applied when rendering particles.
(note: this will superseed the textureAdditive
setting if different than "normal")
static duration: number = Infinity
number
Duration that the emitter releases particles in ms (used only if emitter is Stream). After this period, the emitter stop the launch of particles.
static followTrajectory: boolean = false
boolean
Update the rotation of particle in accordance the particle trajectory.
The particle sprite should aim at zero angle (draw from left to right).
Override the particle minRotation and maxRotation.
static framesToSkip: number = 0
number
Skip n frames after updating the particle system once. This can be used to reduce the performance impact of emitters with many particles.
static frequency: number = 100
number
How often a particle is emitted in ms (used only if emitter is a Stream).
static gravity: number = 0
number
Vertical force (Gravity) for each particle
static image: HTMLCanvasElement = undefined
HTMLCanvasElement
image used for particles texture (by default melonJS will create an white 8x8 texture image)
static maxEndScale: number = 0
number
Maximum end scale ratio for particles
static maxLife: number = 3000
number
Maximum time each particle lives once it is emitted in ms.
static maxParticles: number = 10
number
Maximum number of particles launched each time in this emitter (used only if emitter is Stream).
static maxRotation: number = 0
number
Maximum start rotation for particles sprites in Radians
static maxStartScale: number = 1
number
Maximum start scale ratio for particles (1 = no scaling)
static minEndScale: number = 0
number
Minimum end scale ratio for particles
static minLife: number = 1000
number
Minimum time each particle lives once it is emitted in ms.
static minRotation: number = 0
number
Minimum start rotation for particles sprites in Radians
static minStartScale: number = 1
number
Minimum start scale ratio for particles (1 = no scaling)
static onlyInViewport: boolean = true
boolean
Update particles only in the viewport, remove it when out of viewport.
static speedVariation: number = 1
number
letiation in the start speed of particles
static textureAdditive: boolean = false
boolean
Enable the Texture Additive by composite operation ("additive" blendMode)
static textureSize: number = 8
number
default texture size used for particles if no image is specified (by default melonJS will create an white 8x8 texture image)
static totalParticles: number = 50
number
Total number of particles in the emitter
static wind: number = 0
number
Horizontal force (like a Wind) for each particle