Class cc.ScaleTo

Class Summary
Constructor Attributes Constructor Name and Description
 
Scales a cc.Node object to a zoom factor by modifying it's scale attribute.

Method Summary

Class Detail

cc.ScaleTo()
Scales a cc.Node object to a zoom factor by modifying it's scale attribute.

Method Detail

  • {cc.ScaleTo} clone()
    returns a new clone of the action
    Returns:
    {cc.ScaleTo}
  • <static> {cc.ScaleTo} cc.ScaleTo.create(duration, sx, sy)
    // example
    // It scales to 0.5 in both X and Y.
    var actionTo = cc.ScaleTo.create(2, 0.5);
    
    // It scales to 0.5 in x and 2 in Y
    var actionTo = cc.ScaleTo.create(2, 0.5, 2);
    Parameters:
    {Number} duration
    {Number} sx
    scale parameter in X
    {Number} sy Optional
    scale parameter in Y, if Null equal to sx
    Returns:
    {cc.ScaleTo}
  • {Boolean} initWithDuration(duration, sx, sy)
    Parameters:
    {Number} duration
    {Number} sx
    {Number} sy Optional
    Returns:
    {Boolean}
  • startWithTarget(target)
    Parameters:
    {cc.Node} target
  • update(time)
    Parameters:
    {Number} time