Class cc.CardinalSplineTo
Extends
cc.ActionInterval.
Defined in: CCActionCatmullRom.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Cardinal Spline path.
|
Method Attributes | Method Name and Description |
---|---|
<static> |
cc.CardinalSplineTo.create(duration, points, tension)
creates an action with a Cardinal Spline array of points and tension
|
ctor()
Constructor
|
|
Points getter
|
|
initWithDuration(duration, points, tension)
initializes the action with a duration and an array of points
|
|
reverse()
reverse a new cc.CardinalSplineTo
|
|
setPoints(points)
Points setter
|
|
startWithTarget(target)
|
|
update(time)
|
|
updatePosition(newPos)
update position of target
|
- Methods borrowed from class cc.ActionInterval:
- getAmplitudeRate, getElapsed, isDone, setAmplitudeRate, step
- Methods borrowed from class cc.FiniteTimeAction:
- getDuration, setDuration
- Methods borrowed from class cc.Action:
- copy, copyWithZone, description, getOriginalTarget, getTag, getTarget, release, retain, setOriginalTarget, setTag, setTarget, stop
Class Detail
cc.CardinalSplineTo()
Cardinal Spline path. http://en.wikipedia.org/wiki/Cubic_Hermite_spline#Cardinal_spline
//create a cc.CardinalSplineTo var action1 = cc.CardinalSplineTo.create(3, array, 0);
Method Detail
<static>
{cc.CardinalSplineTo}
cc.CardinalSplineTo.create(duration, points, tension)
creates an action with a Cardinal Spline array of points and tension
//create a cc.CardinalSplineTo var action1 = cc.CardinalSplineTo.create(3, array, 0);
- Parameters:
- {Number} duration
- {Array} points
- array of control points
- {Number} tension
- Returns:
- {cc.CardinalSplineTo}
ctor()
Constructor
{Array}
getPoints()
Points getter
- Returns:
- {Array}
{Boolean}
initWithDuration(duration, points, tension)
initializes the action with a duration and an array of points
- Parameters:
- {Number} duration
- {Array} points
- array of control points
- {Number} tension
- Returns:
- {Boolean}
{cc.CardinalSplineTo}
reverse()
reverse a new cc.CardinalSplineTo
- Returns:
- {cc.CardinalSplineTo}
setPoints(points)
Points setter
- Parameters:
- {Array} points
startWithTarget(target)
- Parameters:
- {cc.Node} target
update(time)
- Parameters:
- {Number} time
updatePosition(newPos)
update position of target
- Parameters:
- {cc.Point} newPos