TextModel - Update only the edited paragraph when the style changes.
[platform/core/uifw/dali-toolkit.git] / plugins / dali-script-v8 / docs / content / path-animation.js
1 /**
2  *
3 ## Path Animation API
4
5 Paths can be used to animate position and orientation of actors.
6
7 ![ ](../assets/img/path/path.png)
8   
9 Example
10
11 ```
12 log("Path animation test\n");
13   
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 ];
17   
18 //Create a path
19 var myPath = new dali.Path();
20 myPath.points = [ point0, point1, point2 ];
21 myPath.generateControlPoints( 0.25 );
22   
23 function begin()
24 {
25   
26   var imageView = new dali.Control("ImageView");
27   imageView.image = "gallery-small-45.jpg";
28   
29   imageView.position = [100,100,0];
30   dali.stage.add( imageView );
31   
32   var animation = new dali.Animation(2.0);
33   var animOptions = { alpha:dali.ALPHA_FUNCTION_EASE_IN_OUT_SINE, delay:0.5, duration:1.5 };
34   var forward = new dali.Vector3(1,0,0);
35   animation.animate( imageView, myPath, forward, animOptions );
36   
37   animation.setLooping( true );
38   animation.play();
39 }
40   
41 begin();
42 ```
43 @class Path
44
45 */