From 875c8264ebf840dd746136cd2e9e2fd6d4538962 Mon Sep 17 00:00:00 2001 From: Richard Huang Date: Thu, 25 Feb 2016 16:18:12 +0000 Subject: [PATCH] Fix animations in JavaScript mesh API examples Change-Id: I0a26ec4f05fbac468debd40c9517c4fbd1879b69 --- node-addon/examples/line-mesh.js | 2 +- node-addon/examples/mesh-morph.js | 2 +- node-addon/examples/point-mesh.js | 2 +- node-addon/examples/texture-mesh.js | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/node-addon/examples/line-mesh.js b/node-addon/examples/line-mesh.js index faaedb9..a7c0cc1 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 edbdcf9..7570405 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 ceb9b1e..ee9cebe 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 016a7a9..add7f03 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 ); -- 2.7.4