Class cc.CardinalSplineTo

Class Summary
Constructor Attributes Constructor Name and Description
 
cc.CardinalSplineTo(duration, points, tension)
Cardinal Spline path.

Method Summary

Class Detail

cc.CardinalSplineTo(duration, points, tension)
Cardinal Spline path. http://en.wikipedia.org/wiki/Cubic_Hermite_spline#Cardinal_spline Absolute coordinates.
//create a cc.CardinalSplineTo
var action1 = cc.cardinalSplineTo(3, array, 0);
Parameters:
{Number} duration
{Array} points
array of control points
{Number} tension

Method Detail

  • returns a new clone of the action
    Returns:
    {cc.CardinalSplineTo}
  • <static> {cc.CardinalSplineTo} cc.CardinalSplineTo.create(duration, points, tension)
    Please use cc.cardinalSplineTo instead.
    creates an action with a Cardinal Spline array of points and tension
    Parameters:
    {Number} duration
    {Array} points
    array of control points
    {Number} tension
    Deprecated:
    since v3.0 please use cc.cardinalSplineTo(duration, points, tension) instead.
    Returns:
    {cc.CardinalSplineTo}
  • ctor(duration, points, tension)
    Constructor function, override it to extend the construction behavior, remember to call "this._super()" in the extended "ctor" function.
    Creates an action with a Cardinal Spline array of points and tension.
    Parameters:
    {Number} duration
    {Array} points
    array of control points
    {Number} tension
  • {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.
    Along the track of movement in the opposite.
    Returns:
    {cc.CardinalSplineTo}
  • setPoints(points)
    Points setter
    Parameters:
    {Array} points
  • startWithTarget(target)
    called before the action start. It will also set the target.
    Parameters:
    {cc.Node} target
  • update(dt)
    Called once per frame. Time is the number of seconds of a frame interval.
    Parameters:
    {Number} dt
  • updatePosition(newPos)
    update position of target
    Parameters:
    {cc.Point} newPos