Class cc.ScaleTo
Extends
cc.ActionInterval.
Defined in: CCActionInterval.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Scales a cc.Node object to a zoom factor by modifying it's scale attribute.
|
Method Attributes | Method Name and Description |
---|---|
<static> |
cc.ScaleTo.create(duration, sx, sy)
|
initWithDuration(duration, sx, sy)
|
|
startWithTarget(target)
|
|
update(time)
|
- Methods borrowed from class cc.ActionInterval:
- getAmplitudeRate, getElapsed, isDone, reverse, 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.ScaleTo()
Scales a cc.Node object to a zoom factor by modifying it's scale attribute.
Method Detail
<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|Null} sy
- scale parameter in Y, if Null equal to sx
- Returns:
- {cc.ScaleTo}
{Boolean}
initWithDuration(duration, sx, sy)
- Parameters:
- {Number} duration
- {Number} sx
- {Number} sy
- Returns:
- {Boolean}
startWithTarget(target)
- Parameters:
- {cc.Node} target
update(time)
- Parameters:
- {Number} time