top

CAPH.WUI.ANI.GROUPAUTOFLIPANIMATION

GroupAutoFlipAnimation represents a class that provides flip effect for the sub widgets of some widget that assigned by user. All sub widgets would perform rotate, transfer and fade animation together. This is one of the six basic types of animation.


Constructor

GroupAutoFlipAnimation

Description
Construct a new GroupAutoFlipAnimation object.
Parameters
objList ArrayThe object which wants to compare with current object.
option Object The option include below properties * delayIncrement : (Number) interval between animation of each widget * gridRow : (Number) row of objList for sequential animation * startOpacity : (Number) indicates the opacity before start animation, usable only for fade animation, the value range is [0, 1], both boundary values are valid. * endOpacity : (Number) indicates the final opacity after animation, usable only for fade animation, the value range is [0, 1], both boundary values are valid. * startAxis : (Object) rotated animation start location from x, y, z reference axis * endAxis : (Object) rotated animation end location from x, y, z reference axis * duration : (Number) describes how long the batch of animations to be performed in the meanwhile would last, the unit is millisecond(ms) - [default : 1000]
Emulator SupportY
SDK ConstraintNone
Example
var GroupAutoFlipAnimation = caph.wui.ani.GroupAutoFlipAnimation;
var Box  = caph.wui.widget.Box;

var flip = new GroupAutoFlipAnimation();
var widget1 = new Box();
var widget2 = new Box();

widgetList = [];
widgetList.push(widget1);
widgetList.push(widget2);

flip.add(widgetList, { duration: 300, delayIncrement: 20, gridRow: layout.row, startOpacity: 0, endOpacity: 0.99999, startAxis: {x: 0, y:  - 1, z: 0}, endAxis: {x: 0, y: 0, z: 0} });

Methods

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 SupportY
SDK Constraintnone
Example
var GroupAutoFlipAnimation = caph.wui.ani.GroupAutoFlipAnimation;
var animation = new GroupAutoFlipAnimation();   

// Let's say that obj and options are given.
animation.add(obj, options);
animation.remove(obj);

getList

Description
Returns animation list.
Parameters
■Void
Return■Array
  - The array of a object pairs,including widget and options of its' animation.
Emulator SupportY
SDK Constraintnone
Example
var GroupAutoFlipAnimation = caph.wui.ani.GroupAutoFlipAnimation;
var animation = new GroupAutoFlipAnimation();   

// Use Animation Sub-classes….
// Then
var arr = animation.getList();
for(var i = 0; i < arr.length; i++) {
    console.log(arr);
}

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 SupportY
SDK Constraintnone
Example
var GroupAutoFlipAnimation = caph.wui.ani.GroupAutoFlipAnimation;
var animation = new GroupAutoFlipAnimation();   
var obj = animation.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 SupportY
SDK Constraintnone
Example
var GroupAutoFlipAnimation = caph.wui.ani.GroupAutoFlipAnimation;
var animation = new GroupAutoFlipAnimation();   
var obj = animation.clone();
var isequal = obj.equals(animation);

GroupAutoFlipAnimation

Description
(Constructor) Construct a new GroupAutoFlipAnimation object.
Parameters
■objList
  - Array
  - Array of widgets created by user.   
■option (Optional)
  - Object 
  - The option include below properties
   * delayIncrement : (Number) interval between animation of each widget
   * gridRow : (Number) row of objList for sequential animation
   * startOpacity : (Number) indicates the opacity before start animation, usable only for fade animation, the value range is [0, 1], both boundary values are valid.
   * endOpacity : (Number) indicates the final opacity after animation, usable only for fade animation, the value range is [0, 1], both boundary values are valid.
   * startAxis : (Object) rotated animation start location from x, y, z reference axis
   * endAxis : (Object) rotated animation end location from x, y, z reference axis
   * duration : (Number) describes how long the batch of animations to be performed in the meanwhile would last, the unit is millisecond(ms)
    - [default : 1000]
Return■Void
Emulator SupportY
SDK Constraintnone
Example
var GroupAutoFlipAnimation = caph.wui.ani.GroupAutoFlipAnimation;
var Box  = caph.wui.widget.Box;

var flip = new GroupAutoFlipAnimation();
var widget1 = new Box();
var widget2 = new Box();

widgetList = [];
widgetList.push(widget1);
widgetList.push(widget2);

flip.add(widgetList, { duration: 300, delayIncrement: 20, gridRow: layout.row, startOpacity: 0, endOpacity: 0.99999, startAxis: {x: 0, y:  - 1, z: 0}, endAxis: {x: 0, y: 0, z: 0} });

add

Description
Bind options with widget object
Parameters
■objList
  - Array
  - Array of widgets created by user.   
■option (Optional)
  - Object 
  - The option include below properties
   * delayIncrement : (Number) interval between animation of each widget
   * gridRow : (Number) row of objList for sequential animation
   * startOpacity : (Number) indicates the opacity before start animation, usable only for fade animation, the value range is [0, 1], both boundary values are valid.
   * endOpacity : (Number) indicates the final opacity after animation, usable only for fade animation, the value range is [0, 1], both boundary values are valid.
   * startAxis : (Object) rotated animation start location from x, y, z reference axis
   * endAxis : (Object) rotated animation end location from x, y, z reference axis
   * duration : (Number) describes how long the batch of animations to be performed in the meanwhile would last, default is 1000, the unit is millisecond(ms)}
Return■Void
Emulator SupportY
SDK Constraintnone
Example
var GroupAutoFlipAnimation = caph.wui.ani.GroupAutoFlipAnimation;
var Box  = caph.wui.widget.Box;

var flip = new GroupAutoFlipAnimation();
var widget1 = new Box();
var widget2 = new Box();

widgetList = [];
widgetList.push(widget1);
widgetList.push(widget2);

flip.add(widgetList, { duration: 300, delayIncrement: 20, gridRow: layout.row, startOpacity: 0, endOpacity: 0.99999, startAxis: {x: 0, y:  - 1, z: 0}, endAxis: {x: 0, y: 0, z: 0} });