```
var actor = new dali.Actor();
-var imageActor = new dali.ImageActor();
var textActor = new dali.TextActor("hello world");
var camera = new dali.CameraActor();
var layer = new dali.Layer();
The actor provides the following call back events
-| Name | Description | Parameters passed to call back |
-|-------------------|----------------------------------------|--------------------------|
-|touched | touch event | (actor, touchEvent ) |
-|hovered | mouse or pointer hovering over actor | (actor, hoverEvent) |
-|mouse-wheel-event | mouse wheel events | (actor, wheelEvent) |
-|on-stage | actor has been moved on stage | (actor) |
-|off-stage | actor has been moved off stage | (actor) |
+| Name | Description | Parameters passed to call back |
+|-----------------|----------------------------------------|--------------------------|
+|touched | touch event | (actor, touchEvent ) |
+|hovered | mouse or pointer hovering over actor | (actor, hoverEvent) |
+|mouseWheelEvent | mouse wheel events | (actor, wheelEvent) |
+|onStage | actor has been moved on stage | (actor) |
+|offStage | actor has been moved off stage | (actor) |
#### Touch event
var anim = new dali.Animation( 4 );
var rotation = new dali.Rotation( 90, 0, 0 ); // pitch, yaw, roll
- anim.animateBy( actor, "rotation", rotation );
+ anim.animateBy( actor, "orientation", rotation );
anim.play();
return true;
}
// connect to touch events
-myActor.connect( "touched", onPressed );
+myActor.on( "touched", onPressed );
```
}
```
// connect to touch events
- myActor.connect( "hovered", onHover);
+ myActor.on( "hovered", onHover);
#### Mouse wheel event
}
// connect to touch events
-myActor.connect( "mouse-wheel-event", onMouseWheel );
+myActor.on( "mouseWheelEvent", onMouseWheel );
```
#### Key events
worldPositionX |FLOAT | ✘ | ✘
worldPositionY |FLOAT | ✘ | ✘
worldPositionZ |FLOAT | ✘ | ✘
- rotation |ROTATION | ✔ | ✔
- worldRotation |ROTATION | ✘ | ✘
+ orientation |ROTATION | ✔ | ✔
+ worldOrientation |ROTATION | ✘ | ✘
scale |VECTOR3 | ✔ | ✔
scaleX |FLOAT | ✔ | ✔
scaleY |FLOAT | ✔ | ✔
name |STRING | ✔ | ✘
sensitive |BOOLEAN | ✔ | ✘
leaveRequired |BOOLEAN | ✔ | ✘
- inheritRotation |BOOLEAN | ✔ | ✘
+ inheritOrientation |BOOLEAN | ✔ | ✘
inheritScale |BOOLEAN | ✔ | ✘
colorMode |NUMBER | ✔ | ✘
positionInheritance |NUMBER | ✔ | ✘
* @class Actor
+ * @extends Handle
*/
/**
- * Actors rotation
- * @property rotation
+ * Actors orientation
+ * @property orientation
* @type dali Rotation object
*/
-ROTATION
+ORIENTATION
/**
- * Actors world-rotation
- * @property worldRotation
+ * Actors world-orientation
+ * @property worldOrientation
* @type dali Rotation object ( read only)
*/
-WORLD_ROTATION
+WORLD_ORIENTATION
/**
* Actors scale
/**
* Set whether a child actor inherits it's parent's orientation.
* @type Boolean
- * @property inheritRotation
+ * @property inheritOrientation
* @default true
*/
-INHERIT_ROTATION,
+INHERIT_ORIENTATION,
/**
* 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.
*
* @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