Class Index | File Index

Classes


Class cc.MotionStreak


Extends cc.Node.

Defined in: CCMotionStreak.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
cc.MotionStreak manages a Ribbon based on it's motion in absolute space.
Method Summary
Method Attributes Method Name and Description
<static>  
cc.MotionStreak.create(fade, seg, imagePath, width, length, color)
creates the a MotionStreak.
 
ctor()
Constructor
 
 
Ribbon used by MotionStreak (weak reference)
 
 
initWithFade(fade, seg, imagePath, width, length, color)
initializes a MotionStreak.
 
setBlendFunc(src, dst)
 
setTexture(texture)
 
update(delta)
polling function
Methods borrowed from class cc.Node:
addChild, cleanup, convertToNodeSpace, convertToNodeSpaceAR, convertTouchToNodeSpace, convertTouchToNodeSpaceAR, convertToWorldSpace, convertToWorldSpaceAR, description, draw, getActionByTag, getActionManager, getAnchorPoint, getAnchorPointInPoints, getBoundingBox, getBoundingBoxToWorld, 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, init, 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, setRotation, setScale, setScaleX, setScaleY, 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.MotionStreak()
cc.MotionStreak manages a Ribbon based on it's motion in absolute space.
You construct it with a fadeTime, minimum segment size, texture path, texture
length and color. The fadeTime controls how long it takes each vertex in
the streak to fade out, the minimum segment size it how many pixels the
streak will move before adding a new ribbon segment, and the texture
length is the how many pixels the texture is stretched across. The texture
is vertically aligned along the streak segment.
Method Detail
<static> {cc.MotionStreak} cc.MotionStreak.create(fade, seg, imagePath, width, length, color)
creates the a MotionStreak. The image will be loaded using the TextureMgr.
Parameters:
{Number} fade
time to fade
{Number} seg
minimum segment size
{String} imagePath
texture path
{Number} width
texture width
{Number} length
texture length
{cc.Color4B} color
color
Returns:
{cc.MotionStreak}

ctor()
Constructor

{cc.BlendFunc} getBlendFunc()
Returns:
{cc.BlendFunc}

{cc.Ribbon} getRibbon()
Ribbon used by MotionStreak (weak reference)
Returns:
{cc.Ribbon}

{cc.Texture2D} getTexture()
Returns:
{cc.Texture2D}

{Boolean} initWithFade(fade, seg, imagePath, width, length, color)
initializes a MotionStreak. The file will be loaded using the TextureMgr.
Parameters:
{Number} fade
{Number} seg
{String} imagePath
{Number} width
{Number} length
{cc.Color4B} color
Returns:
{Boolean}

setBlendFunc(src, dst)
Parameters:
{Number} src
{Number} dst

setTexture(texture)
Parameters:
{cc.Texture2D} texture

update(delta)
polling function
Parameters:
delta

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