2019-05-09 18:05:04 +00:00
|
|
|
{
|
|
|
|
"MaxCount": 6000,
|
|
|
|
"Duration": 5,
|
|
|
|
"Rate": 2000,
|
|
|
|
"Life": {
|
|
|
|
"Input": {
|
|
|
|
"Source": "Age",
|
|
|
|
"TileMode": "Repeat",
|
|
|
|
"Left": 0,
|
|
|
|
"Right": 1
|
|
|
|
},
|
|
|
|
"XValues": [],
|
|
|
|
"Segments": [
|
|
|
|
{
|
|
|
|
"Type": "Constant",
|
|
|
|
"Ranged": true,
|
|
|
|
"Bidirectional": false,
|
|
|
|
"A0": 2,
|
|
|
|
"A1": 4
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"Drawable": {
|
|
|
|
"Type": "SkCircleDrawable",
|
|
|
|
"Radius": 2
|
|
|
|
},
|
|
|
|
"Spawn": [
|
|
|
|
{
|
|
|
|
"Type": "SkInterpreterAffector",
|
|
|
|
"Enabled": true,
|
2019-05-16 19:11:46 +00:00
|
|
|
"Code": "// float rand;\nlayout(ctype=float) in uniform float dt;\nlayout(ctype=float) in uniform float effectAge;\n\nvoid main(in float age,\n in float invLifetime,\n inout float2 pos,\n inout float2 dir,\n inout float scale,\n inout float2 vel,\n inout float spin,\n inout float4 color) {\n vel.x = 50 + (30 * rand);\n vel.y = (rand * 20) - 10;\n}\n"
|
2019-05-09 18:05:04 +00:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"Update": [
|
|
|
|
{
|
|
|
|
"Type": "SkInterpreterAffector",
|
|
|
|
"Enabled": true,
|
2019-05-16 19:11:46 +00:00
|
|
|
"Code": "// float rand;\nlayout(ctype=float) in uniform float dt;\nlayout(ctype=float) in uniform float effectAge;\n\nvoid main(in float age,\n in float invLifetime,\n inout float2 pos,\n inout float2 dir,\n inout float scale,\n inout float2 vel,\n inout float spin,\n inout float4 color) {\n color.r = age;\n color.g = 1 - age;\n\n float s1 = 0.5 + (1.5 * age);\n float s2 = 1.0 + (-0.75 * age);\n scale = s1 + (s2 - s1) * rand;\n\n vel.y += 20.0 * dt;\n}\n"
|
2019-05-09 18:05:04 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|