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=e2ce270f4c246cdd8e434a7ff3c2a2dfaf39dad9;hp=ce095cd1d077b38e5e8af9ae6e81fd6f40482c2b;hb=8c31a5ca493d17693e53f9909a4453b1fa058ab3;hpb=928136dbb9e23970f3894eabc7c8b224003b77be diff --git a/plugins/dali-script-v8/docs/content/actor.js b/plugins/dali-script-v8/docs/content/actor.js index ce095cd..e2ce270 100644 --- a/plugins/dali-script-v8/docs/content/actor.js +++ b/plugins/dali-script-v8/docs/content/actor.js @@ -11,12 +11,11 @@ var actor = new dali.Actor(); var imageActor = new dali.ImageActor(); var textActor = new dali.TextActor("hello world"); -var meshActor = new dali.MeshActor(); 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 +39,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 +50,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 +60,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. @@ -226,6 +226,7 @@ See * @class Actor + * @extends Handle */ @@ -543,7 +544,7 @@ INHERIT_SCALE, * By default a renderable actor will be drawn as a 3D object. It will be depth-tested against * other objects in the world i.e. it may be obscured if other objects are in front. * - * If OVERLAY is used, the actor and its children will be drawn as a 2D overlay. + * If OVERLAY_2D is used, the actor and its children will be drawn as a 2D overlay. * Overlay actors are drawn in a separate pass, after all non-overlay actors within the Layer. * For overlay actors, the drawing order is determined by the hierachy (depth-first search order), * and depth-testing will not be used. @@ -554,9 +555,9 @@ INHERIT_SCALE, * * @example * - * var actor.drawMode = dali.DRAW_MODE_NORMAL; // binary 00. The default draw-mode - * var actor.drawMode = dali.DRAW_MODE_OVERLAY; // binary 01. Draw the actor and its children as an overlay - * var actor.drawMode = dali.DRAW_MODE_STENCIL ;// binary 11. Draw the actor and its children into the stencil buffer + * var actor.drawMode = dali.DRAW_MODE_NORMAL; // binary 00. The default draw-mode + * var actor.drawMode = dali.DRAW_MODE_OVERLAY_2D; // binary 01. Draw the actor and its children as an overlay + * var actor.drawMode = dali.DRAW_MODE_STENCIL ; // binary 11. Draw the actor and its children into the stencil buffer * * * @type Number @@ -644,4 +645,4 @@ POSTITION_INHERITANCE * @type Vector3 * @property sizeModeFactor */ -SIZE_MODE_FACTOR \ No newline at end of file +SIZE_MODE_FACTOR