Class cc.CardinalSplineTo
- Defined in: CCActionCatmullRom.js
- Extends cc.ActionInterval
Constructor Attributes | Constructor Name and Description |
---|---|
Cardinal Spline path.
|
Method Summary
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
-
{cc.CardinalSplineTo} clone()returns a new clone of the action
- Returns:
- {cc.CardinalSplineTo}
-
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