From: Richard Huang Date: Thu, 25 Feb 2016 16:18:12 +0000 (+0000) Subject: Fix animations in JavaScript mesh API examples X-Git-Tag: dali_1.1.23~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=875c8264ebf840dd746136cd2e9e2fd6d4538962;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git Fix animations in JavaScript mesh API examples Change-Id: I0a26ec4f05fbac468debd40c9517c4fbd1879b69 --- diff --git a/node-addon/examples/line-mesh.js b/node-addon/examples/line-mesh.js index faaedb9bc9..a7c0cc1de3 100644 --- a/node-addon/examples/line-mesh.js +++ b/node-addon/examples/line-mesh.js @@ -120,7 +120,7 @@ daliApp.createMeshActor = function() { var animation = new dali.Animation(5); var keyFramesIndex = [{progress:0.0, value: 0.0}, {progress:1.0, value:1.0}]; - var animOptions = { alpha:"sin", delay:0, duration:5}; + var animOptions = { alpha:dali.ALPHA_FUNCTION_SIN, delay:0, duration:5}; animation.animateBetween( meshActor, "uMorphAmount", keyFramesIndex, animOptions ); animation.setLooping(true); diff --git a/node-addon/examples/mesh-morph.js b/node-addon/examples/mesh-morph.js index edbdcf9ad6..7570405bda 100644 --- a/node-addon/examples/mesh-morph.js +++ b/node-addon/examples/mesh-morph.js @@ -240,7 +240,7 @@ daliApp.createMeshActor = function() { // Animate the mesh actor var animation = new dali.Animation(5); - var animOptions = { alpha:"sin", delay:0, duration:5}; + var animOptions = { alpha:dali.ALPHA_FUNCTION_SIN, delay:0, duration:5}; animation.animateTo( meshActor, "uDelta", 1.0, animOptions ); animation.setLooping(true); diff --git a/node-addon/examples/point-mesh.js b/node-addon/examples/point-mesh.js index ceb9b1e802..ee9cebe029 100644 --- a/node-addon/examples/point-mesh.js +++ b/node-addon/examples/point-mesh.js @@ -132,7 +132,7 @@ daliApp.createMeshActor = function() { // Animate the mesh actor var animation = new dali.Animation(5); - var animOptions = { alpha:"linear", delay:0, duration:5}; + var animOptions = { alpha:dali.ALPHA_FUNCTION_LINEAR, delay:0, duration:5}; var rotation = new dali.Rotation(360,0,0,1); animation.animateBy( meshActor, "orientation", rotation, animOptions ); animation.setLooping(true); diff --git a/node-addon/examples/texture-mesh.js b/node-addon/examples/texture-mesh.js index 016a7a9efe..add7f032e8 100644 --- a/node-addon/examples/texture-mesh.js +++ b/node-addon/examples/texture-mesh.js @@ -129,10 +129,10 @@ daliApp.createMeshActor = function() { var animation = new dali.Animation(5); var keyFramesIndex = [{progress:0.0, value: [0.0, 0.0, 0.0, 0.0]}, {progress:1.0, value:[0.0, 1.0, 0.0, 1.0]}]; - var animOptions = { alpha:"sin", delay:0, duration:5}; + var animOptions = { alpha:dali.ALPHA_FUNCTION_SIN, delay:0, duration:5}; var keyFramesIndex2 = [{progress:0.0, value: [0.0, 0.0, 0.0, 0.0]}, {progress:1.0, value:[1.0, 0.0, 1.0, 1.0]}]; - var animOptions2 = { alpha:"sin", delay:0, duration:5}; + var animOptions2 = { alpha:dali.ALPHA_FUNCTION_SIN, delay:0, duration:5}; animation.animateBetween( meshActor, "uFadeColor", keyFramesIndex, animOptions ); animation.animateBetween( meshActor2, "uFadeColor", keyFramesIndex2, animOptions2 );