Changed all property & signal names to lowerCamelCase
[platform/core/uifw/dali-toolkit.git] / plugins / dali-script-v8 / docs / content / dali.js
1 /**
2  *
3
4 ## DALi 3D ( Dynamic Animation Library )
5
6 DALi is a quick and easy way of allowing developers to create Rich UI Applications like:
7
8  + Image & Video galleries
9  + Music players
10  + Games
11  + Maps
12  + Homescreens / launch pads
13  + Advanced watch faces for wearable devices
14   
15
16 DALi is based on OpenGL ES 2.0 & 3.0, however it hides the complexity of
17 the OpenGL API from developers and provides a clean cross-platform JavaScript framework.
18
19 + Create Images, Text and Meshes
20 + Create shaders using GLSL
21 + Provide multiple cameras and render targets
22 + Provides Layers to aid in 2D UI layout
23 + Easy to use Animation framework
24 + Automatic background loading of resources ( images / text / meshes )
25 + Runs all animations in a seperate thread. This helps maintain 60 FPS even if JavaScript is performing a long operation ( e.g. Garbage Collection ).
26 + Provides keyboard / touch / mouse handling
27   
28 ![Screen shots](../assets/img/screen-shot.png)
29
30 ## Running JavaScript from DALi C++ API
31 ```
32 mScript = Dali::Toolkit::Script::New();
33   
34 mScript.ExecuteFile( mScriptFileName);
35 ```
36
37 ## Actors and the Stage
38
39 A DALi application uses a hierachy of Dali::Actor objects to position visible content.  An actor inherits a position relative to its parent, and can be moved relative to this point.  UI controls can be built by combining multiple actors.
40
41 To display the contents of an actor, it must be connected to the Dali::Stage.  This provides an invisible root (top-level) actor, to which all other actors are added.  A direct or indirect child of the root actor is considered "onStage".  Multi-touch events are received through signals emitted by on-stage actors.
42
43 The following example shows how to connect a new actor to the stage:
44 ```
45         var actor = new dali.actor();
46   
47         dali.stage.add(actor);
48 ```
49 ## The Coordinate System
50
51 The Stage has a 2D size, which matches the size of the application window.  The default coordinate system in DALi has the origin at the top-left corner, with positive X to right, and position Y going
52 downwards.  This is intended to be convenient when laying-out 2D views.
53
54 ![Screen shots](../assets/img/coordinate-system-and-stage.png)
55
56
57  * @module DALi
58  * @main  DALi
59  */