[dali_2.3.27] Merge branch 'devel/master'
[platform/core/uifw/dali-demo.git] / resources / scripts / shader-effect-ripple.json
1 {
2   "stage": [
3     {
4       "type": "ImageView",
5       "name": "Image1",
6       "position": [
7         0.40461349487305,
8         0.9150390625,
9         0.0
10       ],
11       "parentOrigin": [0.5, 0.5, 0.5],
12       "widthResizePolicy":"FILL_TO_PARENT",
13       "heightResizePolicy":"DIMENSION_DEPENDENCY",
14       "image": {
15         "url": "{DEMO_IMAGE_DIR}gallery-medium-25.jpg",
16         "desiredWidth": 400,
17         "desiredHeight": 400,
18         "shader": {
19           "fragmentShader": [
20               "{DALI_FRAGMENT_SHADER_PREFIX}",
21               "precision mediump float;",
22               "uniform sampler2D sTexture;",
23               "uniform vec4 uColor;",
24               "uniform float uAmplitude;",
25               "uniform float uTime;",
26               "INPUT vec2 vTexCoord;",
27               "void main()",
28               "{",
29               "  highp vec2 pos = -1.0 + 2.0 * vTexCoord;",
30               "  highp float len = length(pos);",
31               "  highp vec2 texCoord = vTexCoord + pos/len * sin( len * 12.0 - uTime * 4.0 ) * uAmplitude;",
32               "  OUT_COLOR = TEXTURE(sTexture, texCoord) * uColor;",
33               "}"
34             ]
35           }
36       },
37       "animatableProperties": {
38         "uAmplitude": 0.02,
39         "uTime": 0.0
40       },
41       "signals": [
42         {
43           "name": "onScene",
44           "action": "play",
45           "animation": "Animation_1"
46         }
47       ]
48     }
49   ],
50   "animations": {
51     "Animation_1": {
52       "loop":true,
53       "properties": [
54         {
55           "actor": "Image1",
56           "property": "uTime",
57           "value": 36.0,
58           "alphaFunction": "LINEAR",
59           "timePeriod": {
60             "delay": 0,
61             "duration": 20.0
62           },
63           "guiBuilderTimelineColor": "#8dc0da"
64         }
65       ]
66     }
67   }
68 }