skia2/resources/skottie/skottie-sksl-effect.json
Jorge Betancourt 172c7998e1 plumb experimental SkSL layer effect in native Skottie player
Long term plan is to expose a plugin (standalone or with bodymovin) that allows motion artists to write sksl into a composition.
This is the first step where we test how we'd read in the json data under the hood.

Change-Id: I300d3af5d01e12f5b495970f89fd12b5f464a9a1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/464368
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Florin Malita <fmalita@google.com>
2021-11-01 18:05:15 +00:00

1 line
1.0 KiB
JSON

{"assets":[],"ddd":0,"fr":60,"h":500,"ip":0,"layers":[{"ao":0,"bm":0,"ddd":0,"ef":[{"ef":[{"ix":1,"mn":"SkSL Shader-0001","nm":"SKSL","sh":"uniform float u_time; float f(vec3 p) {p.z -= u_time * 10.;float a = p.z * .1;p.xy *= mat2(cos(a), sin(a), -sin(a), cos(a));return .1 - length(cos(p.xy) + sin(p.yz));}half4 main(vec2 fragcoord) {vec3 d = .5 - fragcoord.xy1 / 500;vec3 p=vec3(0);for (int i = 0; i < 32; i++) p += f(p) * d;return ((sin(p) + vec3(2, 5, 9)) / length(p)).xyz1;}","ty":0},{"ix":1,"mn":"SkSL Shader-0002","nm":"u_time","ty":0,"v":{"a":1,"ix":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"s":[0],"t":0},{"s":[3.922],"t":299}]}}],"en":1,"ix":1,"mn":"SkSL Shader","nm":"sksl","np":3,"ty":5}],"ind":1,"ip":0,"ks":{"a":{"a":0,"ix":1,"k":[200,200,0],"l":2},"o":{"a":0,"ix":11,"k":100},"p":{"a":0,"ix":2,"k":[250,250,0],"l":2},"r":{"a":0,"ix":10,"k":0},"s":{"a":0,"ix":6,"k":[100,100,100],"l":2}},"nm":"Lime Green Solid 1","op":300,"sc":"#83e325","sh":400,"sr":1,"st":0,"sw":400,"ty":1}],"markers":[],"nm":"sksl","op":300,"v":"5.7.14","w":500}