X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=plugins%2Fdali-script-v8%2Fdocs%2Fcontent%2Fanimation.js;h=931aee76fa687712be94c875f63b3c62318a5996;hp=9d4dd48bd55bab998dbeef99f0d41c239db72e54;hb=1acdb36279de888dcef999e0e0e1460babdd983a;hpb=a15b41d8a287aac7174a6df3cee708cfa0c2aeba diff --git a/plugins/dali-script-v8/docs/content/animation.js b/plugins/dali-script-v8/docs/content/animation.js index 9d4dd48..931aee7 100644 --- a/plugins/dali-script-v8/docs/content/animation.js +++ b/plugins/dali-script-v8/docs/content/animation.js @@ -35,7 +35,7 @@ function finished( animation ) log("Animation finished \n"); } -anim.connect("finished", finished ); +anim.on("finished", finished ); anim.play(); ``` @@ -78,7 +78,7 @@ function createAnimation() { var anim = new dali.Animation(1); // default duration is increased if length of all animations is greater than it. var animOptions = { - alpha: "linear", + alpha: dali.ALPHA_FUNCTION_LINEAR, delay: 0.5, // used to delay the start of the animation duration: 3, // duration of the animation }; @@ -89,16 +89,16 @@ function createAnimation() { // rotate back to correct orientation var endRotation = new dali.Rotation(0,0,0); - animOptions.alpha = "easeInOutSine"; + animOptions.alpha = dali.ALPHA_FUNCTION_EASE_IN_OUT_SINE; anim.animateTo(myActor1, "orientation", endRotation, animOptions); // Delay the myActor2 by a second animOptions.delay = 0.0; - animOptions.alpha = "linear"; + animOptions.alpha = dali.ALPHA_FUNCTION_LINEAR; anim.animateTo(myActor2, "positionZ", 0, animOptions); // rotate back to correct orientation - animOptions.alpha = "easeInOutSine"; + animOptions.alpha = dali.ALPHA_FUNCTION_EASE_IN_OUT_SINE; anim.animateTo(myActor2, "orientation", endRotation, animOptions); return anim; @@ -171,7 +171,7 @@ createShaderAnimation = function( imageView, color, zoom, duration, delay ) var shaderAnim = new dali.Animation(duration+delay); var animOptions = { - alpha: "doubleEaseInOutSine60", + alpha: dali.ALPHA_FUNCTION_EASE_IN_OUT_SINE, delay: delay, duration: duration, }; @@ -190,7 +190,7 @@ var imageView = createImageView(); var shader = createColorShiftAndZoomEffect(); var image = { - "rendererType" : "imageRenderer", + "rendererType" : "image", "imageUrl" : getImageDirectory()+"gallery-medium-50.jpg", "shader" : shader }; @@ -214,7 +214,7 @@ var shaderAnim = createShaderAnimation( imageView, color,zoom, duration, delay); // also rotate the imageView 90 degrees at the same time. var rotation = new dali.Rotation(90,0,0,1); -shaderAnim.animateTo(imageView, "orientation", rotation, { alpha:"linear", duration:duration, delay:delay }); +shaderAnim.animateTo(imageView, "orientation", rotation, { alpha:dali.ALPHA_FUNCTION_LINEAR, duration:duration, delay:delay }); shaderAnim.play(); @@ -224,36 +224,22 @@ shaderAnim.play(); ### Animation alpha functions -| Name | Description | -|--------------------|--------------| -|default |Linear | -|linear |Linear | -|square |Square (x^2) | -|reverse |Reverse linear | -|easeIn |Speeds up and comes to a sudden stop | -|easeOut |Sudden start and slows to a gradual stop| -|easeInOut |Speeds up and slows to a gradual stop| -|easeInSine |Speeds up and comes to a sudden stop| -|easeOutSine |Sudden start and slows to a gradual stop| -|easeInOutSine |Speeds up and slows to a gradual stop | -|easeInSine33 |Speeds up and comes to a sudden stop | -|easeOutSine33 |Sudden start and slows to a gradual stop | -|easeInOutSine33 |Speeds up and slows to a gradual stop | -|easeInOutSine50 |Speeds up and slows to a gradual stop | -|easeInOutSine60 |Speeds up and slows to a gradual stop | -|easeInOutSine70 |Speeds up and slows to a gradual stop | -|easeInOutSine80 |Speeds up and slows to a gradual stop | -|easeInOutSine90 |Speeds up and slows to a gradual stop | -|doubleEaseInOutSine6|Speeds up and slows to a gradual stop, then speeds up again and slows to a gradual stop | -|easeOutQuint50 |Sudden start and slows to a gradual stop | -|easeOutQuint80 |Sudden start and slows to a gradual stop | -|bounce |Sudden start, loses momentum and ** Returns to start position ** | -|bounceBack |Sudden start, loses momentum and returns to exceed start position ** Returns to start position ** | -|easeInBack |Slow start, exceed start position and quickly reach destination | -|easeOutBack |Sudden start, exceed end position and return to a gradual stop| -|easeInOutBack |Slow start, exceed start position, fast middle, exceed end position and return to a gradual stop| -|sin |full 360 revolution ** Returns to start position ** | -|sin2x |full 720 revolution ** Returns to start position ** | +| Name | Description | +|----------------------------------|----------------| +|ALPHA_FUNCTION_DEFAULT |Linear | +|ALPHA_FUNCTION_LINEAR |Linear | +|ALPHA_FUNCTION_REVERSE |Reverse linear | +|ALPHA_FUNCTION_EASE_IN_SQUARE |Speeds up and comes to a sudden stop (Square) | +|ALPHA_FUNCTION_EASE_OUT_SQUARE |Sudden start and slows to a gradual stop (Square) | +|ALPHA_FUNCTION_EASE_IN |Speeds up and comes to a sudden stop | +|ALPHA_FUNCTION_EASE_OUT |Sudden start and slows to a gradual stop| +|ALPHA_FUNCTION_EASE_IN_OUT |Speeds up and slows to a gradual stop| +|ALPHA_FUNCTION_EASE_IN_SINE |Speeds up and comes to a sudden stop| +|ALPHA_FUNCTION_EASE_OUT_SINE |Sudden start and slows to a gradual stop| +|ALPHA_FUNCTION_EASE_IN_OUT_SINE |Speeds up and slows to a gradual stop | +|ALPHA_FUNCTION_BOUNCE |Sudden start, loses momentum and ** Returns to start position ** | +|ALPHA_FUNCTION_SIN |full 360 revolution ** Returns to start position ** | +|ALPHA_FUNCTION_EASE_OUT_BACK |Sudden start, exceed end position and return to a gradual stop|