5 Paths can be used to animate position and orientation of actors.
7 <img src="../assets/img/path.png"/>
12 log("Path animation test\n");
14 var point0 = [ 0.0, 80.0, 0.0 ];
15 var point1 = [ 200.0, 200.0, 0.0 ];
16 var point2 = [ 400.0, 80.0, 0.0 ];
19 var myPath = new dali.Path();
20 myPath.points = [ point0, point1, point2 ];
21 myPath.generateControlPoints( 0.25 );
26 var image = new dali.ResourceImage( {url:"gallery-small-45.jpg"} );
28 var actor = new dali.ImageActor(image);
30 actor.position = [100,100,0];
31 dali.stage.add( actor );
33 var animation = new dali.Animation(2.0);
34 var animOptions = { alpha:"easeInOutSine", delay:0.5, duration:1.5 };
35 var forward = new dali.Vector3(1,0,0);
36 animation.animate( actor, myPath, forward, animOptions );
38 animation.setLooping( true );