ParticleEmitterSettings

namespace ParticleEmitterSettings

ParticleEmitterSettings contains the default settings for ParticleEmitter

See: ParticleEmitter

Public Properties


angle settings.js:70
static angle: number = Math.PI / 2

number

Start angle for particle launch in Radians

angleVariation settings.js:80
static angleVariation: number = 0

number

letiation in the start angle for particle launch in Radians.

blendMode settings.js:234
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")

See:
duration settings.js:287
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.

floating settings.js:257
static floating: boolean = false

boolean

Render particles in screen space.

followTrajectory settings.js:211
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.

framesToSkip settings.js:298
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.

frequency settings.js:277
static frequency: number = 100

number

How often a particle is emitted in ms (used only if emitter is a Stream).

gravity settings.js:190
static gravity: number = 0

number

Vertical force (Gravity) for each particle

See: game.world.gravity
height settings.js:16
static height: number = 1

number

Height of the particle spawn area

image settings.js:26
static image: HTMLCanvasElement = undefined

HTMLCanvasElement

image used for particles texture (by default melonJS will create an white 8x8 texture image)

See: ParticleEmitterSettings.textureSize
maxEndScale settings.js:180
static maxEndScale: number = 0

number

Maximum end scale ratio for particles

maxLife settings.js:100
static maxLife: number = 3000

number

Maximum time each particle lives once it is emitted in ms.

maxParticles settings.js:267
static maxParticles: number = 10

number

Maximum number of particles launched each time in this emitter (used only if emitter is Stream).

maxRotation settings.js:140
static maxRotation: number = 0

number

Maximum start rotation for particles sprites in Radians

maxStartScale settings.js:160
static maxStartScale: number = 1

number

Maximum start scale ratio for particles (1 = no scaling)

minEndScale settings.js:170
static minEndScale: number = 0

number

Minimum end scale ratio for particles

minLife settings.js:90
static minLife: number = 1000

number

Minimum time each particle lives once it is emitted in ms.

minRotation settings.js:130
static minRotation: number = 0

number

Minimum start rotation for particles sprites in Radians

minStartScale settings.js:150
static minStartScale: number = 1

number

Minimum start scale ratio for particles (1 = no scaling)

onlyInViewport settings.js:247
static onlyInViewport: boolean = true

boolean

Update particles only in the viewport, remove it when out of viewport.

speed settings.js:110
static speed: number = 2

number

Start speed of particles.

speedVariation settings.js:120
static speedVariation: number = 1

number

letiation in the start speed of particles

textureAdditive settings.js:223
static textureAdditive: boolean = false

boolean

Enable the Texture Additive by composite operation ("additive" blendMode)

See: ParticleEmitterSettings.blendMode
textureSize settings.js:38
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)

See: ParticleEmitterSettings.image
tint settings.js:50
static tint: string = "#fff"

string

tint to be applied to particles

totalParticles settings.js:60
static totalParticles: number = 50

number

Total number of particles in the emitter

width settings.js:7
static width: number = 1

number

Width of the particle spawn area.

wind settings.js:201
static wind: number = 0

number

Horizontal force (like a Wind) for each particle


Powered by webdoc!