CAPH.WUI.ANI.SCALEBOUNCEANIMATION
ScaleBounceAnimation represents a class that provides a special scale transformation effect with widget shaking.
Constructor
ScaleBounceAnimation | ||
Description | ||
Creates a ScaleBounceAnimation | ||
Parameters | ||
obj | Object | A widget created by user. |
option | Object | The option include below properties * x : (Number) indicates the multiples along x-axis of the scale transformation of widget after animation. - [default : 1.2] * y : (Number) indicates the multiples along y-axis of the scale transformation of widget after animation. - [default : 1.2] * z : (Number) indicates the multiples along z-axis of the scale transformation of widget after animation. * ease : (String) describes the motion tween of the batch of animations, it could be set as one of the values below - 'SineCubic.InOut', 'Linear.None', 'Quadratic.In', 'Quadratic.Out', 'Quadratic.InOut', 'Cubic.In', 'Cubic.Out', 'Cubic.InOut', 'Quartic.In', 'Quartic.Out', 'Quartic.InOut', 'Quintic.In', 'Quintic.Out', 'Quintic.InOut', 'Sinusoidal.In', 'Sinusoidal.Out', 'Sinusoidal.InOut', 'Exponential.In', 'Exponential.Out', 'Exponential.InOut', 'Circular.In', 'Circular.Out', 'Circular.InOut', 'Elastic.In', 'Elastic.Out', 'Elastic.InOut', 'Back.In', 'Back.Out', 'Back.InOut', 'Bounce.In', 'Bounce.Out', 'Bounce.InOut' - [default : Linear.None] * duration : (Number) describes how long the batch of animations to be performed in the meanwhile would last, the unit is millisecond(ms). - [default : 1000] * delay : (Number) describes the time duration of the batch of animations would defer starting, the unit is millisecond(ms) |
Emulator Support | Y | |
SDK Constraint | None | |
Example | ||
var ScaleBounceAnimation = caph.wui.ani.ScaleBounceAnimation; var scaleBounce = new ScaleBounceAnimation(); |
Methods
add | ||
Description | ||
Binds options of animation needed with the widget | ||
Parameters | ■obj - Object - A widget created by user. ■option (Optional) - Object - The option include below properties * x : (Number) indicates the multiples along x-axis of the scale transformation of widget after animation. - [default: 1.2] * y : (Number) indicates the multiples along y-axis of the scale transformation of widget after animation. - [default: 1.2] * z : (Number) indicates the multiples along z-axis of the scale transformation of widget after animation. * ease : (String) describes the motion tween of the batch of animations, it could be set as one of the values below - 'SineCubic.InOut', 'Linear.None', 'Quadratic.In', 'Quadratic.Out', 'Quadratic.InOut', 'Cubic.In', 'Cubic.Out', 'Cubic.InOut', 'Quartic.In', 'Quartic.Out', 'Quartic.InOut', 'Quintic.In', 'Quintic.Out', 'Quintic.InOut', 'Sinusoidal.In', 'Sinusoidal.Out', 'Sinusoidal.InOut', 'Exponential.In', 'Exponential.Out', 'Exponential.InOut', 'Circular.In', 'Circular.Out', 'Circular.InOut', 'Elastic.In', 'Elastic.Out', 'Elastic.InOut', 'Back.In', 'Back.Out', 'Back.InOut', 'Bounce.In', 'Bounce.Out', 'Bounce.InOut' - [default : Bounce.In] * duration : (Number) describes how long the batch of animations to be performed in the meanwhile would last, the unit is millisecond(ms). - [default: 500] * delay : (Number) describes the time duration of the batch of animations would defer starting, the unit is millisecond(ms) | |
Return | ■Void | |
Emulator Support | Y | |
SDK Constraint | none | |
Example | ||
var ScaleBounceAnimation = caph.wui.ani.ScaleBounceAnimation; var AniLoader = caph.wui.ani.AniLoader; var Box = caph.wui.widget.Box; var UIContext = caph.wui.widget.UIContext; var scaleBounce = new ScaleBounceAnimation(); var loader = new AniLoader(); var uiContext = new UIContext(); var widget = new Box(); widget.render(uiContext); scaleBounce.add(widget, {x: 2, y: 2, duration: 2000}); loader.add(scaleBounce); loader.start(uiContext); |
getList | ||
Description | ||
Returns animation list. | ||
Parameters | ■Void | |
Return | ■Array - The array of a object pairs,including widget and options of its' animation. | |
Emulator Support | Y | |
SDK Constraint | none | |
Example | ||
var ScaleBounceAnimation = caph.wui.ani.ScaleBounceAnimation; var AniLoader = caph.wui.ani.AniLoader; var Box = caph.wui.widget.Box; var UIContext = caph.wui.widget.UIContext; var scaleBounce = new ScaleBounceAnimation(); var loader = new AniLoader(); var uiContext = new UIContext(); var widget = new Box(); widget.render(uiContext); scaleBounce.add(widget, {x: 2, y: 2, duration: 2000}); loader.add(scaleBounce); loader.start(uiContext); var aniList = scaleBounce.getList(); |
remove | ||
Description | ||
Removes all the arguments that needed for animation on the widget. | ||
Parameters | ■obj - Object - An instance of widget created by user. | |
Return | ■Void | |
Emulator Support | Y | |
SDK Constraint | none | |
Example | ||
var ScaleBounceAnimation = caph.wui.ani.ScaleBounceAnimation; var Box = caph.wui.widget.Box; var scaleBounce = new ScaleBounceAnimation(); var box = new Box(); scaleBounce.add(box, {x: 2, y: 2, duration: 2000}); scaleBounce.remove(box); |
ScaleBounceAnimation | ||
Description | ||
(Constructor) Creates a ScaleBounceAnimation | ||
Parameters | ■obj - Object - A widget created by user. ■option (Optional) - Object - The option include below properties * x : (Number) indicates the multiples along x-axis of the scale transformation of widget after animation. - [default : 1.2] * y : (Number) indicates the multiples along y-axis of the scale transformation of widget after animation. - [default : 1.2] * z : (Number) indicates the multiples along z-axis of the scale transformation of widget after animation. * ease : (String) describes the motion tween of the batch of animations, it could be set as one of the values below - 'SineCubic.InOut', 'Linear.None', 'Quadratic.In', 'Quadratic.Out', 'Quadratic.InOut', 'Cubic.In', 'Cubic.Out', 'Cubic.InOut', 'Quartic.In', 'Quartic.Out', 'Quartic.InOut', 'Quintic.In', 'Quintic.Out', 'Quintic.InOut', 'Sinusoidal.In', 'Sinusoidal.Out', 'Sinusoidal.InOut', 'Exponential.In', 'Exponential.Out', 'Exponential.InOut', 'Circular.In', 'Circular.Out', 'Circular.InOut', 'Elastic.In', 'Elastic.Out', 'Elastic.InOut', 'Back.In', 'Back.Out', 'Back.InOut', 'Bounce.In', 'Bounce.Out', 'Bounce.InOut' - [default : Linear.None] * duration : (Number) describes how long the batch of animations to be performed in the meanwhile would last, the unit is millisecond(ms). - [default : 1000] * delay : (Number) describes the time duration of the batch of animations would defer starting, the unit is millisecond(ms) | |
Return | ■Void | |
Emulator Support | Y | |
SDK Constraint | none | |
Example | ||
var ScaleBounceAnimation = caph.wui.ani.ScaleBounceAnimation; var scaleBounce = new ScaleBounceAnimation(); |
clone | ||
Description | ||
Creates and returns clone object from current object, the cloned object will have the same properties and same methods with the current object. | ||
Parameters | ■Void | |
Return | ■Object - The cloned object. | |
Emulator Support | Y | |
SDK Constraint | none | |
Example | ||
var ScaleBounceAnimation = caph.wui.ani.ScaleBounceAnimation; var scaleBounce = new ScaleBounceAnimation(); var obj = scaleBounce.clone(); |
equals | ||
Description | ||
Compares the contents of two objects using strict equality, objects are considered equal if they both have the same set of properties and the values of those properties are equal. | ||
Parameters | ■Object - Object - The object which wants to compare with current object. | |
Return | ■Boolean - Indicates whether the two objects are equal - true : if they are equal, return true. - false : if they aren't equal, return false. | |
Emulator Support | Y | |
SDK Constraint | none | |
Example | ||
var ScaleBounceAnimation = caph.wui.ani.ScaleBounceAnimation; var scaleBounce = new ScaleBounceAnimation(); var obj = scaleBounce.clone(); var isequal = scaleBounce.equals(obj); |