Class Index | File Index

Classes


Class cc.ParticleSystemQuad


Extends cc.ParticleSystem.

Defined in: CCParticleSystemQuad.js.

Class Summary
Constructor Attributes Constructor Name and Description
 

CCParticleSystemQuad is a subclass of CCParticleSystem

It includes all the features of ParticleSystem.

Method Summary
Method Attributes Method Name and Description
 
<static>  
cc.ParticleSystemQuad.create(pListFile)

creates an initializes a CCParticleSystemQuad from a plist file.

 
ctor()
Constructor
 
draw(ctx)
draw particle
 

initilizes the texture with a rectangle measured Points
pointRect should be in Texture coordinates, not pixel coordinates

 
initWithTotalParticles(numberOfParticles)
Initializes a system with a fixed number of particles
 
listen the event that coming to foreground on Android
 
override cc.ParticleSystem
 
setBatchNode(batchNode)
 
setDisplayFrame(spriteFrame)

Sets a new CCSpriteFrame as particle.

 
setTexture(texture, isCallSuper)
set Texture of Particle System
 
setTextureWithRect(texture, rect)
Sets a new texture with a rect.
 
 
initialices the indices for the vertices
 
updateQuadWithParticle(particle, newPosition)
update particle's quad
Methods borrowed from class cc.ParticleSystem:
addParticle, destroyParticleSystem, getAngle, getAngleVar, getAtlasIndex, getBatchNode, getBlendFunc, getBoundingBoxToWorld, getDrawMode, getDuration, getEmissionRate, getEmitterMode, getEndColor, getEndColorVar, getEndRadius, getEndRadiusVar, getEndSize, getEndSizeVar, getEndSpin, getEndSpinVar, getGravity, getLife, getLifeVar, getOpacityModifyRGB, getParticleCount, getPositionType, getPosVar, getRadialAccel, getRadialAccelVar, getRotatePerSecond, getRotatePerSecondVar, getShapeType, getSourcePosition, getSpeed, getSpeedVar, getStartColor, getStartColorVar, getStartRadius, getStartRadiusVar, getStartSize, getStartSizeVar, getStartSpin, getStartSpinVar, getTangentialAccel, getTangentialAccelVar, getTexture, getTotalParticles, init, initParticle, initWithDictionary, initWithFile, isActive, isAutoRemoveOnFinish, isBlendAdditive, isFull, resetSystem, setAngle, setAngleVar, setAtlasIndex, setAutoRemoveOnFinish, setBlendAdditive, setBlendFunc, setDrawMode, setDuration, setEmissionRate, setEmitterMode, setEndColor, setEndColorVar, setEndRadius, setEndRadiusVar, setEndSize, setEndSizeVar, setEndSpin, setEndSpinVar, setGravity, setLife, setLifeVar, setOpacityModifyRGB, setParticleCount, setPositionType, setPosVar, setRadialAccel, setRadialAccelVar, setRotatePerSecond, setRotatePerSecondVar, setRotation, setScale, setScaleX, setScaleY, setShapeType, setSourcePosition, setSpeed, setSpeedVar, setStartColor, setStartColorVar, setStartRadius, setStartRadiusVar, setStartSize, setStartSizeVar, setStartSpin, setStartSpinVar, setTangentialAccel, setTangentialAccelVar, stopSystem, update, updateWithNoTime
Methods borrowed from class cc.Node:
addChild, cleanup, convertToNodeSpace, convertToNodeSpaceAR, convertTouchToNodeSpace, convertTouchToNodeSpaceAR, convertToWorldSpace, convertToWorldSpaceAR, description, getActionByTag, getActionManager, getAnchorPoint, getAnchorPointInPoints, getBoundingBox, getCamera, getChildByTag, getChildren, getChildrenCount, getContentSize, getGLServerState, getGrid, getOrderOfArrival, getParent, getPosition, getPositionX, getPositionY, getRotation, getScale, getScaleX, getScaleY, getScheduler, getShaderProgram, getSkewX, getSkewY, getTag, getUserData, getUserObject, getVertexZ, getZOrder, ignoreAnchorPointForPosition, isIgnoreAnchorPointForPosition, isRunning, isVisible, nodeToParentTransform, nodeToWorldTransform, numberOfRunningActions, onEnter, onEnterTransitionDidFinish, onExit, onExitTransitionDidStart, parentToNodeTransform, pauseSchedulerAndActions, release, removeAllChildren, removeAllChildrenWithCleanup, removeChild, removeChildByTag, removeFromParent, removeFromParentAndCleanup, reorderChild, resumeSchedulerAndActions, retain, runAction, schedule, scheduleOnce, scheduleUpdate, scheduleUpdateWithPriority, setActionManager, setAnchorPoint, setContentSize, setGLServerState, setGrid, setNodeDirty, setOrderOfArrival, setParent, setPosition, setPositionX, setPositionY, setScheduler, setShaderProgram, setSkewX, setSkewY, setTag, setUserData, setUserObject, setVertexZ, setVisible, setZOrder, sortAllChildren, stopAction, stopActionByTag, stopAllActions, transform, transformAncestors, unschedule, unscheduleAllCallbacks, unscheduleUpdate, updateTransform, visit, worldToNodeTransform
Class Detail
cc.ParticleSystemQuad()

CCParticleSystemQuad is a subclass of CCParticleSystem

It includes all the features of ParticleSystem.

Special features and Limitations:
- Particle size can be any float number.
- The system can be scaled
- The particles can be rotated
- It supports subrects
- It supports batched rendering since 1.1

//create a particle system
  this._emitter = new cc.ParticleSystemQuad();
  this._emitter.initWithTotalParticles(150);
Method Detail
clone()

<static> {cc.ParticleSystem} cc.ParticleSystemQuad.create(pListFile)

creates an initializes a CCParticleSystemQuad from a plist file.
This plist files can be creted manually or with Particle Designer:
http://particledesigner.71squared.com/

 //creates an initializes a CCParticleSystemQuad from a plist file.
 var system = cc.ParticleSystemQuad.create("Images/SpinningPeas.plist");
Parameters:
{String} pListFile
Returns:
{cc.ParticleSystem}

ctor()
Constructor

draw(ctx)
draw particle
Parameters:
{CanvasContext} ctx
CanvasContext

initTexCoordsWithRect(pointRect)

initilizes the texture with a rectangle measured Points
pointRect should be in Texture coordinates, not pixel coordinates

Parameters:
{cc.Rect} pointRect

{Boolean} initWithTotalParticles(numberOfParticles)
Initializes a system with a fixed number of particles
Parameters:
{Number} numberOfParticles
Returns:
{Boolean}

listenBackToForeground(obj)
listen the event that coming to foreground on Android
Parameters:
{cc.Class} obj

postStep()
override cc.ParticleSystem

setBatchNode(batchNode)
Parameters:
batchNode

setDisplayFrame(spriteFrame)

Sets a new CCSpriteFrame as particle.
WARNING: this method is experimental. Use setTexture:withRect instead.

Parameters:
{cc.SpriteFrame} spriteFrame

setTexture(texture, isCallSuper)
set Texture of Particle System
Parameters:
{HTMLImageElement|HTMLCanvasElement|cc.Texture2D} texture
{Boolean} isCallSuper
is direct call super method

setTextureWithRect(texture, rect)
Sets a new texture with a rect. The rect is in Points.
Parameters:
{cc.Texture2D} texture
{cc.Rect} rect

setTotalParticles(tp)
Parameters:
tp

setupIndices()
initialices the indices for the vertices

updateQuadWithParticle(particle, newPosition)
update particle's quad
Parameters:
{cc.Particle} particle
{cc.Point} newPosition

Documentation generated by JsDoc Toolkit 2.4.0 on Wed Jan 09 2013 07:51:53 GMT-0800 (PST)