Commit 6888bc87a58391a444f1012fda1a0f44a5f0b758

Authored by Adeel Kazmi
1 parent b00280c0

(Scripting) Added choreography example

Change-Id: Ibbd7603efd7cce45df15e92db73812752e399b54
demo/images/circle.png 0 → 100644

1.09 KB

demo/scripts/choreography.json 0 → 100644
  1 +{
  2 + "templates":
  3 + {
  4 + "circle-control":
  5 + {
  6 + "type": "ImageActor",
  7 + "inherit-position": true,
  8 + "size": [
  9 + 70,
  10 + 70,
  11 + 1
  12 + ],
  13 + "color": [
  14 + 0.85,
  15 + 0.75,
  16 + 0.45,
  17 + 1
  18 + ],
  19 + "image": {
  20 + "filename": "{DALI_IMAGE_DIR}circle.png"
  21 + }
  22 + },
  23 + "rectangle-control":
  24 + {
  25 + "type": "Control",
  26 + "size": [
  27 + 60,
  28 + 60,
  29 + 1
  30 + ],
  31 + "background-color": [
  32 + 0.95,
  33 + 0.41,
  34 + 0.18,
  35 + 1
  36 + ],
  37 + "color-alpha": 0
  38 + }
  39 + },
  40 + "stage": [
  41 + {
  42 + "type": "Control",
  43 + "actors": [],
  44 + "name": "topContainer",
  45 + "position": [
  46 + 180,
  47 + 105,
  48 + 0
  49 + ],
  50 + "inherit-position": true,
  51 + "size": [
  52 + 20,
  53 + 20,
  54 + 1
  55 + ],
  56 + "sizeAspectRatio": false,
  57 + "background-color": [
  58 + 0.85,
  59 + 0.75,
  60 + 0.45,
  61 + 1
  62 + ],
  63 + "color-alpha": 0
  64 + },
  65 + {
  66 + "type": "circle-control",
  67 + "name": "Circle1",
  68 + "position": [
  69 + 84,
  70 + 198,
  71 + -1
  72 + ],
  73 + "signals": [
  74 + {
  75 + "name": "touched",
  76 + "action": "play",
  77 + "animation": "Animation_1"
  78 + }
  79 + ]
  80 + },
  81 + {
  82 + "type": "circle-control",
  83 + "name": "Circle2",
  84 + "position": [
  85 + 151,
  86 + 198,
  87 + -1
  88 + ]
  89 + },
  90 + {
  91 + "type": "circle-control",
  92 + "name": "Circle3",
  93 + "position": [
  94 + 285,
  95 + 198,
  96 + -1
  97 + ]
  98 + },
  99 + {
  100 + "type": "circle-control",
  101 + "name": "Circle4",
  102 + "position": [
  103 + 218,
  104 + 198,
  105 + -1
  106 + ]
  107 + },
  108 + {
  109 + "type": "rectangle-control",
  110 + "name": "Rect1",
  111 + "position": [
  112 + 50,
  113 + 292,
  114 + 0
  115 + ]
  116 + },
  117 + {
  118 + "type": "rectangle-control",
  119 + "name": "Rect2",
  120 + "position": [
  121 + 120,
  122 + 292,
  123 + 0
  124 + ]
  125 + },
  126 + {
  127 + "type": "rectangle-control",
  128 + "name": "Rect3",
  129 + "position": [
  130 + 190,
  131 + 292,
  132 + 0
  133 + ]
  134 + },
  135 + {
  136 + "type": "rectangle-control",
  137 + "name": "Rect4",
  138 + "position": [
  139 + 260,
  140 + 292,
  141 + 0
  142 + ]
  143 + }
  144 + ],
  145 + "animations": {
  146 + "Animation_1": {
  147 + "properties": [
  148 + {
  149 + "actor": "Circle1",
  150 + "property": "position",
  151 + "value": [
  152 + 84,
  153 + 198,
  154 + -1
  155 + ],
  156 + "alpha-function": "LINEAR",
  157 + "time-period": {
  158 + "delay": 0,
  159 + "duration": 0.025
  160 + },
  161 + "timelineColor": "#d3e7fc"
  162 + },
  163 + {
  164 + "actor": "Circle1",
  165 + "property": "position",
  166 + "value": [
  167 + 130,
  168 + 190,
  169 + -1
  170 + ],
  171 + "alpha-function": "LINEAR",
  172 + "time-period": {
  173 + "delay": 0,
  174 + "duration": 0.05
  175 + },
  176 + "timelineColor": "#d3e7fc"
  177 + },
  178 + {
  179 + "actor": "Circle1",
  180 + "property": "position",
  181 + "value": [
  182 + 150,
  183 + 170,
  184 + -1
  185 + ],
  186 + "alpha-function": "LINEAR",
  187 + "time-period": {
  188 + "delay": 0.05,
  189 + "duration": 0.05
  190 + },
  191 + "timelineColor": "#d3e7fc"
  192 + },
  193 + {
  194 + "actor": "Circle1",
  195 + "property": "position",
  196 + "value": [
  197 + 160,
  198 + 150,
  199 + -1
  200 + ],
  201 + "alpha-function": "LINEAR",
  202 + "time-period": {
  203 + "delay": 0.1,
  204 + "duration": 0.051
  205 + },
  206 + "timelineColor": "#d3e7fc"
  207 + },
  208 + {
  209 + "actor": "Circle1",
  210 + "property": "position",
  211 + "value": [
  212 + 170,
  213 + 125,
  214 + -1
  215 + ],
  216 + "alpha-function": "LINEAR",
  217 + "time-period": {
  218 + "delay": 0.151,
  219 + "duration": 0.049
  220 + },
  221 + "timelineColor": "#d3e7fc"
  222 + },
  223 + {
  224 + "actor": "Circle1",
  225 + "property": "position",
  226 + "value": [
  227 + 180,
  228 + 100,
  229 + -1
  230 + ],
  231 + "alpha-function": "LINEAR",
  232 + "time-period": {
  233 + "delay": 0.2,
  234 + "duration": 0.051
  235 + },
  236 + "timelineColor": "#d3e7fc"
  237 + },
  238 + {
  239 + "actor": "Circle1",
  240 + "property": "size",
  241 + "value": [
  242 + 70,
  243 + 70,
  244 + 1
  245 + ],
  246 + "alpha-function": "LINEAR",
  247 + "time-period": {
  248 + "delay": 0,
  249 + "duration": 0.025
  250 + },
  251 + "timelineColor": "#d3e7fc"
  252 + },
  253 + {
  254 + "actor": "Circle1",
  255 + "property": "size",
  256 + "value": [
  257 + 20,
  258 + 20,
  259 + 1
  260 + ],
  261 + "alpha-function": "LINEAR",
  262 + "time-period": {
  263 + "delay": 0.151,
  264 + "duration": 0.1
  265 + },
  266 + "timelineColor": "#d3e7fc"
  267 + },
  268 + {
  269 + "actor": "Circle2",
  270 + "property": "scale",
  271 + "value": [
  272 + 1,
  273 + 1,
  274 + 1
  275 + ],
  276 + "alpha-function": "LINEAR",
  277 + "time-period": {
  278 + "delay": 0,
  279 + "duration": 0.025
  280 + },
  281 + "timelineColor": "#ec9685"
  282 + },
  283 + {
  284 + "actor": "Circle2",
  285 + "property": "scale",
  286 + "value": [
  287 + 0.1,
  288 + 0.1,
  289 + 1
  290 + ],
  291 + "alpha-function": "LINEAR",
  292 + "time-period": {
  293 + "delay": 0,
  294 + "duration": 0.325
  295 + },
  296 + "timelineColor": "#ec9685"
  297 + },
  298 + {
  299 + "actor": "Circle4",
  300 + "property": "scale",
  301 + "value": [
  302 + 1,
  303 + 1,
  304 + 1
  305 + ],
  306 + "alpha-function": "LINEAR",
  307 + "time-period": {
  308 + "delay": 0,
  309 + "duration": 0.025
  310 + },
  311 + "timelineColor": "#b28798"
  312 + },
  313 + {
  314 + "actor": "Circle4",
  315 + "property": "scale",
  316 + "value": [
  317 + 0.1,
  318 + 0.1,
  319 + 1
  320 + ],
  321 + "alpha-function": "LINEAR",
  322 + "time-period": {
  323 + "delay": 0.049,
  324 + "duration": 0.301
  325 + },
  326 + "timelineColor": "#b28798"
  327 + },
  328 + {
  329 + "actor": "Circle3",
  330 + "property": "scale",
  331 + "value": [
  332 + 1,
  333 + 1,
  334 + 1
  335 + ],
  336 + "alpha-function": "LINEAR",
  337 + "time-period": {
  338 + "delay": 0,
  339 + "duration": 0.025
  340 + },
  341 + "timelineColor": "#dedcc4"
  342 + },
  343 + {
  344 + "actor": "Circle3",
  345 + "property": "scale",
  346 + "value": [
  347 + 0.1,
  348 + 0.1,
  349 + 1
  350 + ],
  351 + "alpha-function": "LINEAR",
  352 + "time-period": {
  353 + "delay": 0.1,
  354 + "duration": 0.272
  355 + },
  356 + "timelineColor": "#dedcc4"
  357 + },
  358 + {
  359 + "actor": "topContainer",
  360 + "property": "size",
  361 + "value": [
  362 + 20,
  363 + 20,
  364 + 1
  365 + ],
  366 + "alpha-function": "LINEAR",
  367 + "time-period": {
  368 + "delay": 0,
  369 + "duration": 0.025
  370 + },
  371 + "timelineColor": "#acfc99"
  372 + },
  373 + {
  374 + "actor": "topContainer",
  375 + "property": "size",
  376 + "value": [
  377 + 360,
  378 + 210,
  379 + 1
  380 + ],
  381 + "alpha-function": "LINEAR",
  382 + "time-period": {
  383 + "delay": 0.227,
  384 + "duration": 0.122
  385 + },
  386 + "timelineColor": "#acfc99"
  387 + },
  388 + {
  389 + "actor": "topContainer",
  390 + "property": "color-alpha",
  391 + "value": 0,
  392 + "alpha-function": "LINEAR",
  393 + "time-period": {
  394 + "delay": 0,
  395 + "duration": 0.025
  396 + },
  397 + "timelineColor": "#acfc99"
  398 + },
  399 + {
  400 + "actor": "topContainer",
  401 + "property": "color-alpha",
  402 + "value": 1,
  403 + "alpha-function": "LINEAR",
  404 + "time-period": {
  405 + "delay": 0.101,
  406 + "duration": 0.249
  407 + },
  408 + "timelineColor": "#acfc99"
  409 + },
  410 + {
  411 + "actor": "Rect1",
  412 + "property": "position",
  413 + "value": [
  414 + 50,
  415 + 280,
  416 + 0
  417 + ],
  418 + "alpha-function": "LINEAR",
  419 + "time-period": {
  420 + "delay": 0.1,
  421 + "duration": 0.075
  422 + },
  423 + "timelineColor": "#8c9ab4"
  424 + },
  425 + {
  426 + "actor": "Rect1",
  427 + "property": "position",
  428 + "value": [
  429 + 70,
  430 + 260,
  431 + 0
  432 + ],
  433 + "alpha-function": "LINEAR",
  434 + "time-period": {
  435 + "delay": 0.175,
  436 + "duration": 0.075
  437 + },
  438 + "timelineColor": "#8c9ab4"
  439 + },
  440 + {
  441 + "actor": "Rect1",
  442 + "property": "position",
  443 + "value": [
  444 + 75,
  445 + 250,
  446 + 0
  447 + ],
  448 + "alpha-function": "LINEAR",
  449 + "time-period": {
  450 + "delay": 0.25,
  451 + "duration": 0.075
  452 + },
  453 + "timelineColor": "#8c9ab4"
  454 + },
  455 + {
  456 + "actor": "Rect1",
  457 + "property": "color-alpha",
  458 + "value": 0,
  459 + "alpha-function": "LINEAR",
  460 + "time-period": {
  461 + "delay": 0,
  462 + "duration": 0.025
  463 + },
  464 + "timelineColor": "#8c9ab4"
  465 + },
  466 + {
  467 + "actor": "Rect1",
  468 + "property": "color-alpha",
  469 + "value": 1,
  470 + "alpha-function": "LINEAR",
  471 + "time-period": {
  472 + "delay": 0,
  473 + "duration": 0.325
  474 + },
  475 + "timelineColor": "#8c9ab4"
  476 + },
  477 + {
  478 + "actor": "Rect2",
  479 + "property": "position",
  480 + "value": [
  481 + 120,
  482 + 280,
  483 + 0
  484 + ],
  485 + "alpha-function": "LINEAR",
  486 + "time-period": {
  487 + "delay": 0.148,
  488 + "duration": 0.077
  489 + },
  490 + "timelineColor": "#e8f4c7"
  491 + },
  492 + {
  493 + "actor": "Rect2",
  494 + "property": "position",
  495 + "value": [
  496 + 140,
  497 + 260,
  498 + 0
  499 + ],
  500 + "alpha-function": "LINEAR",
  501 + "time-period": {
  502 + "delay": 0.225,
  503 + "duration": 0.075
  504 + },
  505 + "timelineColor": "#e8f4c7"
  506 + },
  507 + {
  508 + "actor": "Rect2",
  509 + "property": "position",
  510 + "value": [
  511 + 145,
  512 + 250,
  513 + 0
  514 + ],
  515 + "alpha-function": "LINEAR",
  516 + "time-period": {
  517 + "delay": 0.3,
  518 + "duration": 0.072
  519 + },
  520 + "timelineColor": "#e8f4c7"
  521 + },
  522 + {
  523 + "actor": "Rect2",
  524 + "property": "color-alpha",
  525 + "value": 0,
  526 + "alpha-function": "LINEAR",
  527 + "time-period": {
  528 + "delay": 0,
  529 + "duration": 0.025
  530 + },
  531 + "timelineColor": "#e8f4c7"
  532 + },
  533 + {
  534 + "actor": "Rect2",
  535 + "property": "color-alpha",
  536 + "value": 1,
  537 + "alpha-function": "LINEAR",
  538 + "time-period": {
  539 + "delay": 0.05,
  540 + "duration": 0.322
  541 + },
  542 + "timelineColor": "#e8f4c7"
  543 + },
  544 + {
  545 + "actor": "Rect3",
  546 + "property": "position",
  547 + "value": [
  548 + 190,
  549 + 280,
  550 + 0
  551 + ],
  552 + "alpha-function": "LINEAR",
  553 + "time-period": {
  554 + "delay": 0.2,
  555 + "duration": 0.074
  556 + },
  557 + "timelineColor": "#f39db5"
  558 + },
  559 + {
  560 + "actor": "Rect3",
  561 + "property": "position",
  562 + "value": [
  563 + 210,
  564 + 260,
  565 + 0
  566 + ],
  567 + "alpha-function": "LINEAR",
  568 + "time-period": {
  569 + "delay": 0.274,
  570 + "duration": 0.073
  571 + },
  572 + "timelineColor": "#f39db5"
  573 + },
  574 + {
  575 + "actor": "Rect3",
  576 + "property": "position",
  577 + "value": [
  578 + 215,
  579 + 250,
  580 + 0
  581 + ],
  582 + "alpha-function": "LINEAR",
  583 + "time-period": {
  584 + "delay": 0.347,
  585 + "duration": 0.078
  586 + },
  587 + "timelineColor": "#f39db5"
  588 + },
  589 + {
  590 + "actor": "Rect3",
  591 + "property": "color-alpha",
  592 + "value": 0,
  593 + "alpha-function": "LINEAR",
  594 + "time-period": {
  595 + "delay": 0,
  596 + "duration": 0.025
  597 + },
  598 + "timelineColor": "#f39db5"
  599 + },
  600 + {
  601 + "actor": "Rect3",
  602 + "property": "color-alpha",
  603 + "value": 1,
  604 + "alpha-function": "LINEAR",
  605 + "time-period": {
  606 + "delay": 0.099,
  607 + "duration": 0.326
  608 + },
  609 + "timelineColor": "#f39db5"
  610 + },
  611 + {
  612 + "actor": "Rect4",
  613 + "property": "position",
  614 + "value": [
  615 + 260,
  616 + 280,
  617 + 0
  618 + ],
  619 + "alpha-function": "LINEAR",
  620 + "time-period": {
  621 + "delay": 0.251,
  622 + "duration": 0.075
  623 + },
  624 + "timelineColor": "#a99ec0"
  625 + },
  626 + {
  627 + "actor": "Rect4",
  628 + "property": "position",
  629 + "value": [
  630 + 280,
  631 + 260,
  632 + 0
  633 + ],
  634 + "alpha-function": "LINEAR",
  635 + "time-period": {
  636 + "delay": 0.326,
  637 + "duration": 0.074
  638 + },
  639 + "timelineColor": "#a99ec0"
  640 + },
  641 + {
  642 + "actor": "Rect4",
  643 + "property": "position",
  644 + "value": [
  645 + 285,
  646 + 250,
  647 + 0
  648 + ],
  649 + "alpha-function": "LINEAR",
  650 + "time-period": {
  651 + "delay": 0.4,
  652 + "duration": 0.075
  653 + },
  654 + "timelineColor": "#a99ec0"
  655 + },
  656 + {
  657 + "actor": "Rect4",
  658 + "property": "color-alpha",
  659 + "value": 0,
  660 + "alpha-function": "LINEAR",
  661 + "time-period": {
  662 + "delay": 0,
  663 + "duration": 0.025
  664 + },
  665 + "timelineColor": "#a99ec0"
  666 + },
  667 + {
  668 + "actor": "Rect4",
  669 + "property": "color-alpha",
  670 + "value": 1,
  671 + "alpha-function": "LINEAR",
  672 + "time-period": {
  673 + "delay": 0.148,
  674 + "duration": 0.327
  675 + },
  676 + "timelineColor": "#a99ec0"
  677 + }
  678 + ],
  679 + "page": ""
  680 + }
  681 + },
  682 + "connections": {
  683 + "Named_conn_1": {
  684 + "id": "_191kt3qlr075",
  685 + "name": "Named_conn_1",
  686 + "target": {
  687 + "type": "animation",
  688 + "name": "Animation_1",
  689 + "action": "play"
  690 + },
  691 + "sources": [
  692 + "Circle1"
  693 + ],
  694 + "signal": "click"
  695 + }
  696 + },
  697 + "constants": {},
  698 + "styles": {},
  699 + "deviceHeight": 430,
  700 + "deviceWidth": 360,
  701 + "deviceOrientation": "portrait",
  702 + "version": "781"
  703 +}
... ...
demo/scripts/timing.json
... ... @@ -104,7 +104,7 @@
104 104 ],
105 105 "signals": [
106 106 {
107   - "name": "touched",
  107 + "name": "tapped",
108 108 "action": "play",
109 109 "animation": "Animation_1"
110 110 }
... ...