Global

Methods

activate() - Activates the shader for rendering(pixelColor, trsMatrix, cameraMatrix)

Parameters:
Name Type Description
pixelColor vec4 The color that is referenced in the fragment shader
trsMatrix mat4 The transform matrix
cameraMatrix mat4 The camera matrix
Source:

addBurstAt() - Adds a new burst emitter at the given position(x, y, n) → {BurstEmitter}

Parameters:
Name Type Description
x float The x coordinate of the emitter position
y float The y coordinate of the emitter position
n int The number of particles to create in the emitter
Source:
Returns:
e - The newly created burst emitter
Type
BurstEmitter

addDust() - Creates a new dust emitter(n, life) → {DustEmitter}

Parameters:
Name Type Description
n int The number of particles to emit
life float The lifespan of the emitter
Source:
Returns:
e - The newly added dust emitter
Type
DustEmitter

addElectricityAt() - Adds a new electric emitter at the given position(x, y, n) → {ElectricityEmitter}

Parameters:
Name Type Description
x float The x coordinate of the emitter position
y float The y coordinate of the emitter position
n int The number of particles to create in the emitter
Source:
Returns:
e - The newly created electric emitter
Type
ElectricityEmitter

addEmitterAt() - Adds a default emitter to the given position(x, y, n) → {ParticleEmitter}

Parameters:
Name Type Description
x float The x coordinate of the emitter position
y float The y coordinate of the emitter position
n int The number of particles to create in the emitter
Source:
Returns:
e - The newly added default emitter
Type
ParticleEmitter

addFlameAt() - Adds a new flame emitter to the given position(x, y, n, life) → {FlameEmitter}

Parameters:
Name Type Description
x float The x coordinate of the emitter position
y float The y coordinate of the emitter position
n int The number of particles to create in the emitter
life float The lifespan of the emitter
Source:
Returns:
e - The newly added flame emitter
Type
FlameEmitter

addRain() - Creates a new rain emitter(n, life) → {RainEmitter}

Parameters:
Name Type Description
n int The number of particles to emit
life float The lifespan of the emitter
Source:
Returns:
e - The newly added rain emitter
Type
RainEmitter

addSnow() - Creates a new snow emitter(n, life) → {SnowEmitter}

Parameters:
Name Type Description
n int The number of particles to emit
life float The lifespan of the emitter
Source:
Returns:
e - The newly added snow emitter
Type
SnowEmitter

createBurst() - Creator function used by the emitter, creates a particle and returns it. Used for burst effects.(atX, atY, colorStart, colorEnd, theta, radius) → {Particle}

Parameters:
Name Type Description
atX float x coordinate of the particle position
atY float y coordinate of the particle position
colorStart vec4 the particle's initial color
colorEnd vec4 the particle's final color
theta float the angle in which the particle will travel
radius float radius of the burst
Source:
Returns:
p - The newly created particle
Type
Particle

createBurst() - Creator function used by the emitter, creates a particle and returns it. Used for electricity effects.(atX, atY, colorStart, colorEnd, theta, radius) → {ElectricParticle}

Parameters:
Name Type Description
atX float x coordinate of the particle position
atY float y coordinate of the particle position
colorStart vec4 the particle's initial color
colorEnd vec4 the particle's final color
theta float the angle in which the particle will travel
radius float radius of the burst
Source:
Returns:
p - The newly created particle
Type
ElectricParticle

createDust() - Creates dust particles(colorStart, colorEnd, wind) → {DustParticle}

Parameters:
Name Type Description
colorStart vec4 The starting color
colorEnd vec4 The ending color
wind float The horizontal acceleration of the dust particles
Source:
Returns:
p - The new dust particle to be added to the set
Type
DustParticle

createRain() - Creates rain particles(colorStart, colorEnd, wind) → {RainParticle}

Parameters:
Name Type Description
colorStart vec4 The starting color
colorEnd vec4 The ending color
wind float The horizontal acceleration of the rain particles
Source:
Returns:
p - The new rain particle to be added to the set
Type
RainParticle

createSnow() - Creates snow particles(colorStart, colorEnd, wind) → {SnowParticle}

Parameters:
Name Type Description
colorStart vec4 The starting color
colorEnd vec4 The ending color
wind float The horizontal acceleration of the snow particles
Source:
Returns:
p - The new snow particle to be added to the set
Type
SnowParticle

draw() - Activates the shader of the renderable and draws to the given camera(camera)

Parameters:
Name Type Description
camera Camera The camera to draw to
Source:

draw() - Draws the particle to the given camera(aCamera)

Parameters:
Name Type Description
aCamera Camera The camera to be drawn to
Source:

draw() - Draws to the given camera.(aCamera)

Parameters:
Name Type Description
aCamera Camera The camera to draw to
Source:

emitParticles() - Creates and emits particles based on the creator function(pSet)

Parameters:
Name Type Description
pSet ParticleSet The set of particles
Source:

emitParticles() - Creates and emits particles based on the creator function(pSet)

Parameters:
Name Type Description
pSet ParticleSet The set of particles
Source:

emitParticles() - Creates and emits particles based on the creator function(pSet)

Parameters:
Name Type Description
pSet ParticleSet The set of particles
Source:

emitParticles() - Creates the particles to be emitted and pushes them to the particle set(pSet)

Parameters:
Name Type Description
pSet ParticleSet The particle set to be emitted
Source:

emitParticles() - uses the creator function to create and emit particles(pSet)

Parameters:
Name Type Description
pSet ParticleSet The set of particles to emit
Source:

emitParticles() - uses the creator function to create and emit particles(pSet)

Parameters:
Name Type Description
pSet ParticleSet The set of particles to emit
Source:

emitParticles() - uses the creator function to create and emit particles(pSet)

Parameters:
Name Type Description
pSet ParticleSet The set of particles to emit
Source:

expired() - Checks if the number of particles remaining is less than or equal to 0() → {bool}

Source:
Returns:
true if numRemains is less than or equal to 0, false otherwise
Type
bool

getAcceleration() - Gets the current acceleration() → {vec2}

Source:
Returns:
The current acceleration
Type
vec2

getAcceleration() - gets the current acceleration() → {float}

Source:
Returns:
mAcceleration - The current acceleration
Type
float

getAcceleration() - gets the current acceleration() → {float}

Source:
Returns:
mAcceleration - The current acceleration
Type
float

getClimb() - gets the current vertical acceleration() → {float}

Source:
Returns:
mClimb - The vertical acceleration
Type
float

getColor() - Gets the current color() → {vec4}

Source:
Returns:
The current color
Type
vec4

getColorEnd() - Gets the ending color() → {vec4}

Source:
Returns:
mColorEnd - The ending color
Type
vec4

getColorStart() - gets the starting color() → {vec4}

Source:
Returns:
mColorBegin - The starting color
Type
vec4

getDrag() - Gets the current drag() → {float}

Source:
Returns:
mDrag - The current drag
Type
float

getDrag() - gets the current drag() → {float}

Source:
Returns:
mDrag - The drag for each particle
Type
float

getDrag() - gets the current drag() → {float}

Source:
Returns:
mDrag - The drag for each particle
Type
float

getDrawBounds() - Returns whether or not the bounds are drawn() → {bool}

Source:
Returns:
- True if bounds are drawn, false otherwise
Type
bool

getGrowth() - Gets the current growth rate() → {float}

Source:
Returns:
mDelta - The current growth rate
Type
float

getIntensity() - gets the number of remaining particles() → {int}

Source:
Returns:
mNumRemains - The number of remaining particles
Type
int

getNumParticles() - gets the current number of particles to be emitted() → {int}

Source:
Returns:
mNumParticles - The number of particles to emit
Type
int

getNumParticles() - gets the current number of particles to be emitted() → {int}

Source:
Returns:
mNumParticles - The number of particles to emit
Type
int

getParticleSize() - Returns the size of the particles() → {float}

Source:
Returns:
size - The current size of the particles
Type
float

getPosition() - Gets the current position of the particle() → {vec2}

Source:
Returns:
The x and y coordinates of the particle's position
Type
vec2

getPosition() - Gets the current position of the renderable() → {vec2}

Source:
Returns:
The current position of the renderable
Type
vec2

getPulses() - gets the number of pulses for the burst() → {int}

Source:
Returns:
mNumRemains - The number of pulses left
Type
int

getPulses() - gets the number of pulses for the electricity() → {int}

Source:
Returns:
mNumRemains - The number of pulses left
Type
int

getRadius() - Returns the current radius() → {float}

Source:
Returns:
mRadius - The radius of the burst being emitted
Type
float

getRadius() - Returns the current radius() → {float}

Source:
Returns:
mRadius - The radius of the electricity being emitted
Type
float

getSize() - Gets the current point size() → {float}

Source:
Returns:
mPointSize - The current size of the point
Type
float

getSize() - gets the size of the particle() → {vec2}

Source:
Returns:
The width and height of the particle
Type
vec2

getSizeVariance() - gets the current size variance() → {float}

Source:
Returns:
variance - the amount in which the vary the particle sizes
Type
float

getSpacing() - gets the spacing() → {int}

Source:
Returns:
mSpacing - The space between each ring in the burst
Type
int

getSpacing() - gets the spacing() → {int}

Source:
Returns:
mSpacing - The space between each ring in the burst
Type
int

getSpread() - Gets the spread of the electricity() → {float}

Source:
Returns:
mSpread - The spread of the electricity
Type
float

getSpread() - Gets the spread of the flame() → {float}

Source:
Returns:
mSpread - The spread of the flame
Type
float

getSpread() - Gets the spread of the particles() → {float}

Source:
Returns:
mSpread - the spread of the particles
Type
float

getSpread() - Gets the spread of the particles() → {float}

Source:
Returns:
mSpread - the spread of the particles
Type
float

getVelocity() - gets the current velocity() → {vec2}

Source:
Returns:
mVelocity - The current velocity
Type
vec2

getWind() - Gets the current horizontal acceleration() → {float}

Source:
Returns:
mWind - The current horizontal acceleration
Type
float

getWind() - Gets the current horizontal acceleration() → {float}

Source:
Returns:
mWind - The current horizontal acceleration
Type
float

getWind() - Gets the current horizontal acceleration() → {float}

Source:
Returns:
mWind - The current horizontal acceleration
Type
float

getWind() - Returns the current horizontal acceleration() → {float}

Source:
Returns:
mWind - The current horizontal acceleration
Type
float

hasExpired() - Checks if the particle has expired or not() → {bool}

Source:
Returns:
true if cycles to live ar eless than 0, false otherwise
Type
bool

hit() - Behavior of the particle upon collision()

Source:

setAcceleration() - Sets the current acceleration(x, y)

Parameters:
Name Type Description
x float The horizontal acceleration
y float The vertical acceleration
Source:

setAcceleration() - updates the current acceleration(a)

Parameters:
Name Type Description
a float The new value for acceleration
Source:

setAcceleration() - updates the current acceleration(a)

Parameters:
Name Type Description
a float The new value for acceleration
Source:

setClimb() - sets the vertical acceleration(val)

Parameters:
Name Type Description
val float the new vertical acceleration
Source:

setColor() - Sets the current color to a new one(c)

Parameters:
Name Type Description
c vec4 The new color
Source:

setColorEnd() - Sets the ending color(c)

Parameters:
Name Type Description
c vec4 the new ending color
Source:

setColorStart() - Sets the starting color(c)

Parameters:
Name Type Description
c vec4 The new starting color
Source:

setDrag() - Sets the current drag to a new value(d)

Parameters:
Name Type Description
d float The new drag
Source:

setDrag() - sets the drag for each particle being emitted(d)

Parameters:
Name Type Description
d float
Source:

setDrag() - sets the drag for each particle being emitted(d)

Parameters:
Name Type Description
d float
Source:

setDrawBounds() - Sets whether or not the drawing bounds are drawn(d)

Parameters:
Name Type Description
d bool True if the bounds are to be drawn, false otherwise
Source:

setFinalColor() - Sets the final color of the particle(f)

Parameters:
Name Type Description
f vec2 the vector to subtract from the current color
Source:

setFinalColor() - Sets the final color of the particle(f)

Parameters:
Name Type Description
f vec2 the vector to subtract from the current color
Source:

setFinalColor() - Sets the final color of the particle(f)

Parameters:
Name Type Description
f vec2 the vector to subtract from the current color
Source:

setGrowth() - Sets the growth rate to a new value(delta)

Parameters:
Name Type Description
delta float The new growth rate
Source:

setIntensity() - Sets the number of remaining particles(num)

Parameters:
Name Type Description
num int The new number of remaining particles
Source:

setNumParticles() - Sets the number of particles to emit to a new value(num)

Parameters:
Name Type Description
num int the new value to assign to mNumParticles
Source:

setNumParticles() - Sets the number of particles to emit to a new value(num)

Parameters:
Name Type Description
num int the new value to assign to mNumParticles
Source:

setParticleSize() - Sets the size of the particles(size)

Parameters:
Name Type Description
size float The new size
Source:

setPointSize() - sets the pixel size to allow resizing(w)

Parameters:
Name Type Description
w float the new pixel size
Source:

setPosition() - Sets the position of the particle(xPos, yPos)

Parameters:
Name Type Description
xPos float the x coordinate of the position
yPos float the y coordinate of the position
Source:

setPosition() - Sets the position of the renderable(x, y)

Parameters:
Name Type Description
x float The x coordinate of the position
y float The y coordinate of the position
Source:

setPulses(pulses) - Sets the number of pulses(pulses)

Parameters:
Name Type Description
pulses int the number of pulses to assign mNumRemains to
Source:

setPulses(pulses) - Sets the number of pulses(pulses)

Parameters:
Name Type Description
pulses int the number of pulses to assign mNumRemains to
Source:

setRadius() - Sets the radius to a new value(r)

Parameters:
Name Type Description
r float The new value to assign to the radius
Source:

setRadius() - Sets the radius to a new value(r)

Parameters:
Name Type Description
r float The new value to assign to the radius
Source:

setShowPoint() - Sets whether or not the pixel gets drawn(b)

Parameters:
Name Type Description
b bool determines if the point gets drawn
Source:

setSize() - Sets the size of the particle(s)

Parameters:
Name Type Description
s vec2 The new size to assign to the particle
Source:

setSize() - Sets the size of the point(s)

Parameters:
Name Type Description
s float the new float size
Source:

setSizeDelta() - Sets the size delta(d)

Parameters:
Name Type Description
d float the size delta
Source:

setSizeVariance() - Sets the size variance(variance)

Parameters:
Name Type Description
variance float The new size variance
Source:

setSpacing() - sets the space between each ring in the burst(s)

Parameters:
Name Type Description
s int the new value to set mSpacing to
Source:

setSpacing() - sets the space between each ring in the burst(s)

Parameters:
Name Type Description
s int the new value to set mSpacing to
Source:

setSpread() - Sets the current particle spread to a new value(spread)

Parameters:
Name Type Description
spread float The new particle spread
Source:

setSpread() - Sets the current particle spread to a new value(val)

Parameters:
Name Type Description
val float The new particle spread
Source:

setSpread() - Sets the spread of the electricity(val)

Parameters:
Name Type Description
val float The new value for electricity
Source:

setSpread() - Sets the spread of the flame(val)

Parameters:
Name Type Description
val float The new value for spread
Source:

setVelocity() - Sets the current velocity(x, y)

Parameters:
Name Type Description
x float Horizontal velocity
y float Vertical velocity
Source:

setWind() - Sets the horizontal acceleration(val)

Parameters:
Name Type Description
val float The new horizontal acceleration
Source:

setWind() - Sets the horizontal acceleration(val)

Parameters:
Name Type Description
val float The new horizontal acceleration
Source:

setWind() - Sets the horizontal acceleration(val)

Parameters:
Name Type Description
val float The new horizontal acceleration
Source:

setWind() - Sets the horizontal acceleration(val)

Parameters:
Name Type Description
val float the new horizontal acceleration
Source:

terminate() - sets numRemains to 0()

Source:

terminate() - Sets the number of cycles to 0()

Source:

update() - Cleans up and emits particles in the set()

Source:

update() - Updates the particle's position()

Source:

update() - Uses the position and color control variables to update the particle based on the update interval()

Source:

update() - Uses the position and color control variables to update the particle based on the update interval()

Source:

update() - Uses the position and color control variables to update the particle based on the update interval()

Source:

update() - Uses the position and color control variables to update the particle based on the update interval()

Source:

update() - Uses the position and color control variables to update the particle based on the update interval()

Source: