Class cc.CatmullRomTo
Extends
cc.CardinalSplineTo.
Defined in: CCActionCatmullRom.js.
Constructor Attributes | Constructor Name and Description |
---|---|
An action that moves the target with a CatmullRom curve to a destination point. |
Method Attributes | Method Name and Description |
---|---|
<static> |
cc.CatmullRomTo.create(dt, points)
creates an action with a Cardinal Spline array of points and tension
|
initWithDuration(dt, points)
initializes the action with a duration and an array of points
|
- Methods borrowed from class cc.CardinalSplineTo:
- ctor, getPoints, reverse, setPoints, startWithTarget, update, updatePosition
- 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.CatmullRomTo()
An action that moves the target with a CatmullRom curve to a destination point.
A Catmull Rom is a Cardinal Spline with a tension of 0.5.
http://en.wikipedia.org/wiki/Cubic_Hermite_spline#Catmull.E2.80.93Rom_spline
var action1 = cc.CatmullRomTo.create(3, array);
Method Detail
<static>
{cc.CatmullRomTo}
cc.CatmullRomTo.create(dt, points)
creates an action with a Cardinal Spline array of points and tension
var action1 = cc.CatmullRomTo.create(3, array);
- Parameters:
- {Number} dt
- {cc.PointArray} points
- Returns:
- {cc.CatmullRomTo}
initWithDuration(dt, points)
initializes the action with a duration and an array of points
- Parameters:
- dt
- points