Class cc.CardinalSplineTo

Class Summary
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

  • returns a new clone of the action
    Returns:
    {cc.CardinalSplineTo}
  • <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