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%2Factor.js;h=e4d433b805e0e9596b6b584f2a1e574f24200d36;hp=ce095cd1d077b38e5e8af9ae6e81fd6f40482c2b;hb=2d5d28f89d92f5a7db5bd84f39ce0c5dbc74508d;hpb=5d49d819924da76f96f22845210abe89a7ade187 diff --git a/plugins/dali-script-v8/docs/content/actor.js b/plugins/dali-script-v8/docs/content/actor.js index ce095cd..e4d433b 100644 --- a/plugins/dali-script-v8/docs/content/actor.js +++ b/plugins/dali-script-v8/docs/content/actor.js @@ -16,7 +16,7 @@ var camera = new dali.CameraActor(); var layer = new dali.Layer(); ``` -### Hello world example +### Hello world example ``` var myActor = new dali.TextActor("hello-world"); @@ -40,7 +40,8 @@ An actor inherits its parent's position. The relative position between the acto 1) ParentOrigin. This Vector3 property defines a point within the parent actor's area. - +![ ](../assets/img/parent-origin.png) + The default is "top-left", which can be visualized in 2D as (0, 0), but is actually Vector3(0, 0, 0.5) in the 3D DALi world. The actor's position is relative to this point. ``` @@ -50,7 +51,7 @@ myActor.parentOrigin = [0.5, 0.5, 0.5]; 2) AnchorPoint. This Vector3 property defines a point within the child actor's area. - +![ ](../assets/img/anchor-point.png) The default is "center", which can be visualized in 2D as (0.5, 0.5), but is actually Vector3(0.5, 0.5, 0.5) in the 3D DALi world. The actor's position is also relative to this point. ``` @@ -60,7 +61,7 @@ myActor.anchorPoint = [0.5, 0.5, 0.5]; 3) Position. This is the position vector between the parent-origin and anchor-point. - +![ ](../assets/img/actor-position.png) Therefore by default, an actors position is the distance between its center and the top-left corner of its parent.