{
"stage": [
{
- "type": "ImageActor",
+ "type": "ImageView",
"name": "Image1",
"position": [
0.40461349487305,
0.0
],
"parentOrigin": [0.5, 0.5, 0.5],
- "size": [200, 200, 0],
- "effect": "Ripple2D",
+ "widthResizePolicy":"FILL_TO_PARENT",
+ "heightResizePolicy":"DIMENSION_DEPENDENCY",
"image": {
- "filename": "{DALI_IMAGE_DIR}gallery-medium-25.jpg",
- "width": 200,
- "height": 80,
- "loadPolicy": "IMMEDIATE",
- "releasePolicy": "NEVER"
+ "url": "{DEMO_IMAGE_DIR}gallery-medium-25.jpg",
+ "desiredWidth": 400,
+ "desiredHeight": 400,
+ "shader": {
+ "fragmentShader": [
+ "precision mediump float;",
+ "uniform sampler2D sTexture;",
+ "uniform vec4 uColor;",
+ "uniform float uAmplitude;",
+ "uniform float uTime;",
+ "varying vec2 vTexCoord;",
+ "void main()",
+ "{",
+ " highp vec2 pos = -1.0 + 2.0 * vTexCoord;",
+ " highp float len = length(pos);",
+ " highp vec2 texCoord = vTexCoord + pos/len * sin( len * 12.0 - uTime * 4.0 ) * uAmplitude;",
+ " gl_FragColor = texture2D(sTexture, texCoord) * uColor;",
+ "}"
+ ]
+ }
+ },
+ "animatableProperties": {
+ "uAmplitude": 0.02,
+ "uTime": 0.0
},
"signals": [
{
]
}
],
- "paths": {},
"animations": {
"Animation_1": {
"loop":true,
{
"actor": "Image1",
"property": "uTime",
- "value": 10.0,
+ "value": 36.0,
"alphaFunction": "LINEAR",
"timePeriod": {
"delay": 0,
- "duration": 10.0
+ "duration": 20.0
},
"guiBuilderTimelineColor": "#8dc0da"
}
]
}
- },
- "shaderEffects": {
- "Ripple2D": {
- "program": {
- "vertexPrefix": "",
- "vertex": "void main(void)\n{\n gl_Position = uProjection * uModelView * vec4(aPosition, 1.0);\n vTexCoord = aTexCoord;\n}\n\n",
- "fragmentPrefix": "",
- "fragment": "precision mediump float;\nuniform float uAmplitude; // 0.02; (< 1)\nuniform float uTime;\nvoid main()\n{\n highp vec2 textureSize = sTextureRect.zw - sTextureRect.xy;\n highp vec2 pos = -1.0 + 2.0 * vTexCoord.st/textureSize;\n highp float len = length(pos);\n highp vec2 texCoord = vTexCoord.st/textureSize + pos/len * sin( len * 12.0 - uTime * 4.0 ) * uAmplitude; \n gl_FragColor = texture2D(sTexture, texCoord) * uColor;\n}\n\n\n",
- "geometryType": "GEOMETRY_TYPE_IMAGE"
- },
- "geometryHints": "HINT_NONE",
- "gridDensity": 0,
- "loop": true,
- "uAmplitude": 0.02,
- "uTime": 0.0
- }
}
}