Update the ShaderEffect script to resize the geometry
[platform/core/uifw/dali-demo.git] / resources / scripts / super-blur-view.json
1 /*
2  * Copyright (c) 2014 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17 {
18   "constants": {
19     "TEXT_VIEW_SIZE": [200, 150, 1]
20   },
21   "animations": {
22     "blur": {
23       "duration": 1,
24       "properties": [{
25         "actor": "superBlur",
26         "property": "blurStrength",
27         "value": 1,
28         "timePeriod": {
29           "delay": 0,
30           "duration": 1
31         }
32       }]
33     },
34     "clear": {
35       "duration": 1,
36       "properties": [{
37         "actor": "superBlur",
38         "property": "blurStrength",
39         "value": 0,
40         "timePeriod": {
41           "delay": 0,
42           "duration": 1
43         }
44       }]
45     }
46   },
47   "stage": [
48     // SuperBlurView
49     {
50       "type": "SuperBlurView",
51       "name": "superBlur",
52       "parentOrigin": "TOP_CENTER",
53       "anchorPoint": "TOP_CENTER",
54       "position": [0, 10, 0],
55       "size": [460, 600, 0],
56       "image": {
57         "filename": "{DALI_IMAGE_DIR}background-4.jpg"
58       }
59     },
60
61     // Button to blur/clear
62     {
63       "type": "PushButton",
64       "name": "toggleButton",
65       "parentOrigin": "BOTTOM_CENTER",
66       "anchorPoint": "BOTTOM_CENTER",
67       "position": [0, 0, 0],
68       "size": [200, 100, 0],
69       "labelActor": {
70         "type": "TextLabel",
71         "text": "Blur"
72       },
73       "unselectedStateImage": "{DALI_IMAGE_DIR}button-background.png",
74       "selectedStateImage": "{DALI_IMAGE_DIR}button-background.png",
75       "signals": [{
76         "name": "pressed",
77         "action": "play",
78         "animation": "blur"
79       }, {
80         "name": "released",
81         "action": "play",
82         "animation": "clear"
83       }]
84     }
85   ]
86 }