Added path animation example in animation.json script for verification 01/31001/2
authorFerran Sole <ferran.sole@samsung.com>
Fri, 28 Nov 2014 10:41:43 +0000 (10:41 +0000)
committerFerran Sole <ferran.sole@samsung.com>
Fri, 28 Nov 2014 10:45:35 +0000 (10:45 +0000)
Change-Id: I0448b0d1d794aa7c1e9760da4cf48914651a07c3

demo/scripts/animation.json

index 906648c..0bbe545 100644 (file)
       "parent-origin": "CENTER"
     }
   },
+  "paths":
+  {
+    "path0":
+    {
+      "points":[ [-150, -50, 0], [0.0,70.0,0.0], [190.0,-150.0,0.0] ],
+      "curvature":0.35
+    }
+  },
   // library of animations
   "animations": {
     "animate": {
           "duration": 3
         }
       }]
+    },
+    "path-animation": {
+      "duration": 3.0,
+      "properties": [{
+        "actor": "greeting2", // referenced actors must exist on stage
+        "path":"path0",
+        "forward":[1,0,0],
+        "alpha-function": "EASE_IN_OUT",
+        "time-period": {
+          "delay": 0,
+          "duration": 3
+        }
+      }]
     }
   },
   // a tree of actors
       "animation": "animate"
     }]
   }, {
+    "name":"greeting2",
+    "type": "TextView",
+    "parent-origin": "CENTER",
+    "anchor-point": "CENTER",
+    "size": [200, 200, 1],
+    "rotation": [0, 0, 39],
+    "position": [-150, -50, 0],
+    "text": "or me",
+    "signals": [{
+      "name": "touched",
+      "action": "play",
+      "animation": "path-animation"
+    }]
+  }, {
     "type": "TextView", // styles can be additive
     "parent-origin": "CENTER",
     "anchor-point": "CENTER",