Class Index | File Index

Classes


Class R.components.render.ParticleEmitter


Extends R.components.Render.
A {@link R.components.Render render component} that allows the developer to link a particle emitter to a game object.
Defined in: particleemitter.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
R.components.render.ParticleEmitter(name, emitter, priority)
Creates a component which emits particles.
Fields borrowed from class R.components.Render:
DRAW, NO_DRAW
Fields borrowed from class R.components.Base:
TYPE_COLLIDER, TYPE_INPUT, TYPE_LOGIC, TYPE_RENDERING, TYPE_TRANSFORM
Method Summary
Method Attributes Method Name and Description
 
Destroy the particle emitter component.
 
execute(renderContext, time, dt)
Emit particles to the render context.
 
Get the class name of this object
 
Get the particle emitter assigned to this component.
 
Get the offset where the particles will be emitted, from the rendering origin.
 
Releases the component back into the object pool.
 
setActive(state)
Set the active state of the particle emitter.
 
setEmitter(emitter)
Set the particle emitter object.
 
setOffset(ptOrX, y)
Set the offset, from the rendering origin, where the particles are emitted from.
Methods borrowed from class R.components.Render:
getDrawMode, setDrawMode, transformOrigin
Methods borrowed from class R.components.Base:
getGameObject, getHostObject, getPriority, getType, getTypeString, setGameObject, setHostObject, setPriority
Methods borrowed from class R.engine.BaseObject:
addEvent, addEvents, getElement, jQ, removeEvent, setElement, triggerEvent, update
Methods borrowed from class R.engine.PooledObject:
clearObjectDataModel, getId, getName, getObjectDataModel, getProperties, isDestroyed, setName, setObjectDataModel, toString, toXML
Class Detail
R.components.render.ParticleEmitter(name, emitter, priority)
Creates a component which emits particles.
Parameters:
name
{String} The name of the component
emitter
{R.particles.Emitter} The particle emitter to use with the component
priority Optional, Default: 0.1
{Number} The render priority
Method Detail
destroy()
Destroy the particle emitter component.

execute(renderContext, time, dt)
Emit particles to the render context.
Parameters:
renderContext
{R.rendercontexts.AbstractRenderContext} The context to render to
time
{Number} The engine time in milliseconds
dt
{Number} The delta between the world time and the last time the world was updated in milliseconds.

{String} getClassName()
Get the class name of this object
Returns:
{String} "R.components.render.ParticleEmitter"

{R.particles.Emitter} getEmitter()
Get the particle emitter assigned to this component.
Returns:
{R.particles.Emitter}

{R.math.Point2D} getOffset()
Get the offset where the particles will be emitted, from the rendering origin.
Returns:
{R.math.Point2D}

release()
Releases the component back into the object pool. See R.engine.PooledObject#release for more information.

setActive(state)
Set the active state of the particle emitter.
Parameters:
state
{Boolean} true to set the emitter to generate particles

setEmitter(emitter)
Set the particle emitter object.
Parameters:
emitter
{R.particles.Emitter} The particle emitter

setOffset(ptOrX, y)
Set the offset, from the rendering origin, where the particles are emitted from. This will default to the rendering origin.
Parameters:
ptOrX
{Number|R.math.Point2D} The X offset, or a point
y Optional
{Number} The Y offset if ptOrX is a number

Documentation generated by JsDoc Toolkit 2.4.0 on Mon Mar 18 2013 16:09:17 GMT-0400 (EDT)