Merge "Rename of Control Renderers to Visuals" into devel/master
[platform/core/uifw/dali-toolkit.git] / docs / content / shared-javascript-and-cpp-documentation / script-json-specification.md
index 881bdd3..2575417 100644 (file)
@@ -121,10 +121,10 @@ The constants section supports sub-string and full property replacement.
     },                                  //
     ...                                 //
     {                                   //
     },                                  //
     ...                                 //
     {                                   //
-      "type":"ImageActor"               // An DALi type or a template name
+      "type":"ImageView"               // An DALi type or a template name
       "image":                          //
       {                                 //
       "image":                          //
       {                                 //
-        "filename":"{IMAGES}b.jpg"      // Image filename substring replacement
+        "url":"{IMAGES}b.jpg"      // Image filename substring replacement
       },                                //
       "size": "{SIZE}"                  //
     }                                   //  Property replacement
       },                                //
       "size": "{SIZE}"                  //
     }                                   //  Property replacement
@@ -171,14 +171,14 @@ an optional actor sub hierarchy.
    {                                    //
    "basic-text":                        //  The template name
    {                                    //
    {                                    //
    "basic-text":                        //  The template name
    {                                    //
-     "type":"ImageActor",               //  Concrete DALi Type/Class to create
+     "type":"ImageView",               //  Concrete DALi Type/Class to create
      "styles":["base-style"],           //  Style list to apply
      "name":"image",                    //  }
      "image":                           //  } property name : value
      {                                  //  }
      "styles":["base-style"],           //  Style list to apply
      "name":"image",                    //  }
      "image":                           //  } property name : value
      {                                  //  }
-     "filename":"{IMAGES}/b.jpg"        //
+     "url":"{IMAGES}/b.jpg"        //
      },                                 //
      },                                 //
-     "parent-origin": "CENTER"          //
+     "parentOrigin": "CENTER"           //
      ...                                //
      "actors":                          //  A tree of sub actors
      [                                  //
      ...                                //
      "actors":                          //  A tree of sub actors
      [                                  //
@@ -186,7 +186,7 @@ an optional actor sub hierarchy.
      "type":"TextView"                  //
      "name":"text",                     //
      "text":"Hello World",              //
      "type":"TextView"                  //
      "name":"text",                     //
      "text":"Hello World",              //
-     "parent-origin": "CENTER",         //
+     "parentOrigin": "CENTER",          //
      }                                  //
      ]                                  //
    }                                    //
      }                                  //
      ]                                  //
    }                                    //
@@ -280,9 +280,9 @@ They can also be created automatically from JSON in an actor signal.
      {                                   //
      "duration": 10,                     // Duration in seconds
      "loop": false,                      // Whether to loop.
      {                                   //
      "duration": 10,                     // Duration in seconds
      "loop": false,                      // Whether to loop.
-     "end-action": "Bake",               // Whether to set final value(bake) or
+     "endAction": "Bake",                // Whether to set final value(bake) or
                                          // reset
                                          // reset
-     "disconnect-aciton": "Discard",     // Whether 'Bake' or 'Discard' when disconnected
+     "disconnectAction": "Discard",      // Whether 'Bake' or 'Discard' when disconnected
      "properties":
      [
                                          // Properties changed in this animation
      "properties":
      [
                                          // Properties changed in this animation
@@ -290,9 +290,9 @@ They can also be created automatically from JSON in an actor signal.
      "actor":"image",                    // Actor found by name from the stage
      "property":"rotation",              // Property to change
      "value":[0, 0.1, 0, 0],             // Value to set
      "actor":"image",                    // Actor found by name from the stage
      "property":"rotation",              // Property to change
      "value":[0, 0.1, 0, 0],             // Value to set
-     "alpha-function": "EASE\_IN\_OUT",  // Interpolation function
+     "alphaFunction": "EASE\_IN\_OUT",   // Interpolation function
                                          //
                                          //
-     "time-period":                      // Time period for change
+     "timePeriod":                       // Time period for change
      {"delay": 0,
       "duration": 3
       }
      {"delay": 0,
       "duration": 3
       }
@@ -323,15 +323,15 @@ animation property.
        [190.0,-150.0,0.0]
       ],
                                          // curvature automatically creates
        [190.0,-150.0,0.0]
       ],
                                          // curvature automatically creates
-     "curvature":0.35,                   // control-points
+     "curvature":0.35,                   // controlPoints
                                          //
                                          //
-     "control-points": [...]             // Otherwise control-points can be
+     "controlPoints": [...]              // Otherwise controlPoints can be
                                          // directly specified.
      }                                   //
      },                                  //
     "animations":                        //
     {                                    //
                                          // directly specified.
      }                                   //
      },                                  //
     "animations":                        //
     {                                    //
-     "path-animation":
+     "pathAnimation":
      {
      "duration": 3.0,
      "properties":
      {
      "duration": 3.0,
      "properties":
@@ -342,8 +342,8 @@ animation property.
      "path":"path0",                     // animation.
      "forward":[1,0,0],                  // Forward vector specifies orientation
                                          // whilst travelling along the path
      "path":"path0",                     // animation.
      "forward":[1,0,0],                  // Forward vector specifies orientation
                                          // whilst travelling along the path
-     "alpha-function": "EASE\_IN\_OUT",  // (optional)
-     "time-period":
+     "alphaFunction": "EASE\_IN\_OUT",   // (optional)
+     "timePeriod":
      {
      "delay": 0,
      "duration": 3
      {
      "delay": 0,
      "duration": 3
@@ -357,52 +357,6 @@ animation property.
     }                                    //
 ~~~
 
     }                                    //
 ~~~
 
-## Shaders {#shaders}
-
-The shader section of the JSON file defines a library of shader effect
-instances that are created on demand.
-
-The shaders are referred to by name from the template, style, stage or
-animation sections.
-
-Multiple actors can set the same shader as the name refers to a single
-instance.
-
-Similarly one named shader instance can be set to several actors and can
-be animated by one animation.
-
-~~~
-    {                                             //
-    "shader-effects":                             // Shader Effect section
-    {                                             //
-      "myshader1":                                // Shader  instance  name
-      {                                           //
-       "program":                                 //
-       {                                          // Prefixs are placed before DALi uniforms.
-         "vertexPrefix": "",                      // (Useful for \#defines.)
-         "vertex":"",                             // Glsl vertex program
-         "fragmentPrefix": "",
-         "fragment": "",                          // Glsl fragment program.
-         "geometry-type": "GEOMETRY_TYPE_IMAGE",  // Geometry type(see DALi documentation)
-       },
-       "geometry-hints": "HINT_NONE":             // Geometry hints (see DALi documentation)
-       "grid-density": 0,                         // Grid density(see DALi documentation)
-       "image":
-       {
-         "filename": ""                           // Effect image available as a second texture unit.
-       }
-     },
-     ...
-    },
-    "stage":
-    [{
-     "type": "ImageActor",
-     "effect": "myshader1",
-     ...
-    }]
-    }
-~~~
-
 At least one of the vertex or fragment fields is mandatory. All
 other fields are optional will use internal defaults.
 
 At least one of the vertex or fragment fields is mandatory. All
 other fields are optional will use internal defaults.
 
@@ -440,7 +394,7 @@ uniforms with 'u'.
      ...
      ]
      },
      ...
      ]
      },
-     "shader-effects":
+     "shaderEffects":
      {
      "myshader1":
      {
      {
      "myshader1":
      {
@@ -486,7 +440,7 @@ builder.addActors( dali.stage.getRootLayer() );
     "stage":                             \\  Stage Section Number
     [                                    \\  An array of actors
      {
     "stage":                             \\  Stage Section Number
     [                                    \\  An array of actors
      {
-     "type": "ImageActor",
+     "type": "ImageView",
      ...
      "actors":                           \\  Each actor can have children
                                          \\ creating a tree
      ...
      "actors":                           \\  Each actor can have children
                                          \\ creating a tree