From 95f02ec1f6c24fd45d699b08056eed22d1ec5b2f Mon Sep 17 00:00:00 2001 From: Adeel Kazmi Date: Fri, 3 Oct 2014 15:39:28 +0100 Subject: [PATCH] (Scripting) Added a simple gallery --- demo/images/animation-list.png | Bin 0 -> 299857 bytes demo/images/animation-picture-1.png | Bin 0 -> 2021790 bytes demo/images/animation-picture-2.png | Bin 0 -> 1220654 bytes demo/images/animation-picture-3.png | Bin 0 -> 1124427 bytes demo/images/animation-picture-4.png | Bin 0 -> 960250 bytes demo/images/animation-picture-5.png | Bin 0 -> 1127336 bytes demo/scripts/gallery.json | 346 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 346 insertions(+), 0 deletions(-) create mode 100644 demo/images/animation-list.png create mode 100644 demo/images/animation-picture-1.png create mode 100644 demo/images/animation-picture-2.png create mode 100644 demo/images/animation-picture-3.png create mode 100644 demo/images/animation-picture-4.png create mode 100644 demo/images/animation-picture-5.png create mode 100644 demo/scripts/gallery.json diff --git a/demo/images/animation-list.png b/demo/images/animation-list.png new file mode 100644 index 0000000..48a7d29 Binary files /dev/null and b/demo/images/animation-list.png differ diff --git a/demo/images/animation-picture-1.png b/demo/images/animation-picture-1.png new file mode 100644 index 0000000..c460dfa Binary files /dev/null and b/demo/images/animation-picture-1.png differ diff --git a/demo/images/animation-picture-2.png b/demo/images/animation-picture-2.png new file mode 100644 index 0000000..2c32968 Binary files /dev/null and b/demo/images/animation-picture-2.png differ diff --git a/demo/images/animation-picture-3.png b/demo/images/animation-picture-3.png new file mode 100644 index 0000000..a89e9b9 Binary files /dev/null and b/demo/images/animation-picture-3.png differ diff --git a/demo/images/animation-picture-4.png b/demo/images/animation-picture-4.png new file mode 100644 index 0000000..3c1b348 Binary files /dev/null and b/demo/images/animation-picture-4.png differ diff --git a/demo/images/animation-picture-5.png b/demo/images/animation-picture-5.png new file mode 100644 index 0000000..27d2e2b Binary files /dev/null and b/demo/images/animation-picture-5.png differ diff --git a/demo/scripts/gallery.json b/demo/scripts/gallery.json new file mode 100644 index 0000000..a280e6b --- /dev/null +++ b/demo/scripts/gallery.json @@ -0,0 +1,346 @@ +{ + "templates": + { + "selection-type": + { + "type": "Control", + "background-color": [ 1, 0.5, 0, 0.6 ], + "color-alpha": 0.05, + "parent-origin": "CENTER", + "anchor-point": "CENTER", + "size": [ 450, 90, 1 ] + }, + "image-type": + { + "type": "ImageActor", + "position": [ 450, 0, 1 ], + "parent-origin": "CENTER", + "anchor-point": "CENTER", + "size": [ 450, 795, 1 ], + "actors": [ + { + "type": "Control", + "position-inheritance": "USE_PARENT_POSITION", + "size": [ 450, 795, 1 ], + "signals": [ + { + "name": "tapped", + "action": "play", + "animation": "BackAnimation" + } + ] + } + ] + } + }, + "stage": [ + { + "type": "Control", + "name": "stencil", + "background-color": [ 1, 1, 1, 1 ], + "parent-origin": "CENTER", + "anchor-point": "CENTER", + "draw-mode": "STENCIL", + "size": [ 450, 795, 0 ], + "position-z": 0.1 + }, + { + "type": "ImageActor", + "actors": [], + "name": "list", + "parent-origin": "CENTER", + "anchor-point": "CENTER", + "position": [ 0, 0, -1 ], + "size": [ 450, 795, 1 ], + "image": { + "filename": "{DALI_IMAGE_DIR}animation-list.png" + } + }, + { + "type": "selection-type", + "name": "selection-1", + "position-y": -105, + "signals": [ + { + "name": "tapped", + "action": "play", + "animation": "Animation_1" + } + ] + }, + { + "type": "selection-type", + "name": "selection-2", + "position-y": -15, + "signals": [ + { + "name": "tapped", + "action": "play", + "animation": "Animation_2" + } + ] + }, + { + "type": "selection-type", + "name": "selection-3", + "position-y": 75, + "signals": [ + { + "name": "tapped", + "action": "play", + "animation": "Animation_3" + } + ] + }, + { + "type": "selection-type", + "name": "selection-4", + "position-y": 165, + "signals": [ + { + "name": "tapped", + "action": "play", + "animation": "Animation_4" + } + ] + }, + { + "type": "selection-type", + "name": "selection-5", + "position-y": 255, + "signals": [ + { + "name": "tapped", + "action": "play", + "animation": "Animation_5" + } + ] + }, + { + "type": "image-type", + "name": "picture-1", + "image": { + "filename": "{DALI_IMAGE_DIR}animation-picture-1.png" + } + }, + { + "type": "image-type", + "name": "picture-2", + "image": { + "filename": "{DALI_IMAGE_DIR}animation-picture-2.png" + } + }, + { + "type": "image-type", + "name": "picture-3", + "image": { + "filename": "{DALI_IMAGE_DIR}animation-picture-3.png" + } + }, + { + "type": "image-type", + "name": "picture-4", + "image": { + "filename": "{DALI_IMAGE_DIR}animation-picture-4.png" + } + }, + { + "type": "image-type", + "name": "picture-5", + "image": { + "filename": "{DALI_IMAGE_DIR}animation-picture-5.png" + } + } + ], + "animations": { + "Animation_1": { + "properties": [ + { + "actor": "selection-1", + "property": "color-alpha", + "value": 0.5, + "alpha-function": "SIN", + "time-period": { + "delay": 0, + "duration": 0.5 + }, + "timelineColor": "#83bcc5" + }, + { + "actor": "picture-1", + "property": "position-x", + "value": 0, + "alpha-function": "LINEAR", + "time-period": { + "delay": 0.25, + "duration": 0.25 + }, + "timelineColor": "#83bcc5" + } + ] + }, + "Animation_2": { + "properties": [ + { + "actor": "selection-2", + "property": "color-alpha", + "value": 0.5, + "alpha-function": "SIN", + "time-period": { + "delay": 0, + "duration": 0.5 + }, + "timelineColor": "#83bcc5" + }, + { + "actor": "picture-2", + "property": "position-x", + "value": 0, + "alpha-function": "LINEAR", + "time-period": { + "delay": 0.25, + "duration": 0.25 + }, + "timelineColor": "#83bcc5" + } + ] + }, + "Animation_3": { + "properties": [ + { + "actor": "selection-3", + "property": "color-alpha", + "value": 0.5, + "alpha-function": "SIN", + "time-period": { + "delay": 0, + "duration": 0.5 + }, + "timelineColor": "#83bcc5" + }, + { + "actor": "picture-3", + "property": "position-x", + "value": 0, + "alpha-function": "LINEAR", + "time-period": { + "delay": 0.25, + "duration": 0.25 + }, + "timelineColor": "#83bcc5" + } + ] + }, + "Animation_4": { + "properties": [ + { + "actor": "selection-4", + "property": "color-alpha", + "value": 0.5, + "alpha-function": "SIN", + "time-period": { + "delay": 0, + "duration": 0.5 + }, + "timelineColor": "#83bcc5" + }, + { + "actor": "picture-4", + "property": "position-x", + "value": 0, + "alpha-function": "LINEAR", + "time-period": { + "delay": 0.25, + "duration": 0.25 + }, + "timelineColor": "#83bcc5" + } + ] + }, + "Animation_5": { + "properties": [ + { + "actor": "selection-5", + "property": "color-alpha", + "value": 0.5, + "alpha-function": "SIN", + "time-period": { + "delay": 0, + "duration": 0.5 + }, + "timelineColor": "#83bcc5" + }, + { + "actor": "picture-5", + "property": "position-x", + "value": 0, + "alpha-function": "LINEAR", + "time-period": { + "delay": 0.25, + "duration": 0.25 + }, + "timelineColor": "#83bcc5" + } + ] + }, + "BackAnimation": { + "properties": [ + { + "actor": "picture-1", + "property": "position-x", + "value": 450, + "alpha-function": "LINEAR", + "time-period": { + "delay": 0, + "duration": 0.25 + }, + "timelineColor": "#83bcc5" + }, + { + "actor": "picture-2", + "property": "position-x", + "value": 450, + "alpha-function": "LINEAR", + "time-period": { + "delay": 0, + "duration": 0.25 + }, + "timelineColor": "#83bcc5" + }, + { + "actor": "picture-3", + "property": "position-x", + "value": 450, + "alpha-function": "LINEAR", + "time-period": { + "delay": 0, + "duration": 0.25 + }, + "timelineColor": "#83bcc5" + }, + { + "actor": "picture-4", + "property": "position-x", + "value": 450, + "alpha-function": "LINEAR", + "time-period": { + "delay": 0, + "duration": 0.25 + }, + "timelineColor": "#83bcc5" + }, + { + "actor": "picture-5", + "property": "position-x", + "value": 450, + "alpha-function": "LINEAR", + "time-period": { + "delay": 0, + "duration": 0.25 + }, + "timelineColor": "#83bcc5" + } + ] + } + } +} -- libgit2 0.21.4