Testing particles

This commit is contained in:
Vladislav Khorev Dev committed 2017-12-24 04:55:01 +05:00
1 parent 93e171ec5b
commit cbb3ffb008
27 files changed
+574 -134

No files matched your search

+3
View File
@@ -0,0 +1,3 @@
{
"effect": "effects/sparkler.json"
}
+23 -14
View File
@@ -8,17 +8,16 @@
"maxParticles": 300,
"preloading": 100,
"texturePath": "spark.png",
"texturePath": "textures/spark.png",
"hasInertion": "false",
"gravity": [0, 0, 0],
"spawnRange_system": "PARTICLE_BIRTH",
"spawnRange_system": "PARTICLE_EFFECT",
"spawnTotal":
{
"interpolation": "LINEAR_SPLINE",
"isLooped": "false",
"timeline":
[
{
@@ -26,21 +25,21 @@
"value": 0
},
{
"t": 10,
"value": 1000
"t": 1,
"value": 5
}
]
},
"spawnRange":
{
"value": [ 90, 0, 0, 360 ]
"value": [ 0, 0, 0, 0 ]
},
"lifeTime":
{
"min": 0.1,
"max": 0.3
"min": 2,
"max": 2
},
"coords_system": "PARTICLE_EFFECT",
@@ -49,17 +48,28 @@
"coords":
{
"interpolation": "LINEAR_SPLINE",
"isLooped": "false",
"interpolation": "CUBIC_SPLINE",
"timeline":
[
{
"t": 0.000,
"value": [ 0, 0, 0 ]
"value": [ 0, 0, 0]
},
{
"t": 0.500,
"value": [ 50, 20, 0]
},
{
"t": 1.000,
"value": [ 0, 0, 400 ]
"value": [ 100, 150, 0]
},
{
"t": 1.500,
"value": [ 150, 280, 0]
},
{
"t": 2,
"value": [ 200, 300, 0]
}
]
},
@@ -72,11 +82,10 @@
"scale":
{
"interpolation": "DISCRETE",
"isLooped": "false",
"timeline":
[
{
"value": [ 20, 20 ]
"value": [ 10, 10 ]
}
]
},
+88
View File
@@ -0,0 +1,88 @@
{
"name": "Sparkler - бенгальский огонь",
"emitters":
[
{
"name": "Spark",
"maxParticles": 300,
"preloading": 100,
"texturePath": "textures/magic-star.png",
"hasInertion": "false",
"gravity": [0, 0, 0],
"spawnRange_system": "PARTICLE_EFFECT",
"spawnTotal":
{
"interpolation": "LINEAR_SPLINE",
"timeline":
[
{
"t": 0,
"value": 0
},
{
"t": 1,
"value": 1
}
]
},
"spawnRange":
{
"value": [ 0, 45, 0, 45 ]
},
"lifeTime":
{
"min": 1.5,
"max": 2.5
},
"coords_system": "PARTICLE_BIRTH",
"coords_axis_system": "PARTICLE_BIRTH",
"rotation_system": "PARTICLE_BIRTH",
"coords":
{
"interpolation": "LINEAR_SPLINE",
"timeline":
[
{
"t": 0.000,
"value": [ 0, 0, 0 ]
},
{
"t": 2.000,
"min": [ 400, 0, 0 ],
"max": [ 400, 0, 0 ]
}
]
},
"rotation":
{
"value": [ 0, 0, 0 ]
},
"scale":
{
"interpolation": "DISCRETE",
"timeline":
[
{
"value": [ 22.625, 12.5 ]
}
]
},
"color":
{
"value": [ 1, 1, 1, 1 ]
}
}
]
}
+115
View File
@@ -0,0 +1,115 @@
{
"name": "Sparkler - бенгальский огонь",
"emitters":
[
{
"name": "Spark",
"maxParticles": 300,
"preloading": 100,
"texturePath": "textures/comet.png",
"hasInertion": "false",
"gravity": [0, 0, 0],
"spawnRange_system": "PARTICLE_EFFECT",
"spawnTotal":
{
"interpolation": "LINEAR_SPLINE",
"timeline":
[
{
"t": 0,
"value": 0
},
{
"t": 1,
"value": 3
}
]
},
"spawnRange":
{
"value": [ 0, 0, 0, 0 ]
},
"lifeTime":
{
"min": 6,
"max": 6
},
"coords_system": "PARTICLE_EFFECT",
"coords_axis_system": "PARTICLE_BIRTH",
"rotation_system": "PARTICLE_ITSELF",
"coords":
{
"interpolation": "CUBIC_SPLINE",
"timeline":
[
{
"t": 0.000,
"value": [ 50, 0, 0 ]
},
{
"t": 0.001,
"value": [ 50, 0, 0 ]
},
{
"t": 1.000,
"value": [ 100, 100, 0 ]
},
{
"t": 2.000,
"value": [ 200, -100, 0 ]
},
{
"t": 3.000,
"value": [ 300, 100, 0 ]
},
{
"t": 4.000,
"value": [ 400, -100, 0 ]
},
{
"t": 5.000,
"value": [ 500, 100, 0 ]
},
{
"t": 5.999,
"value": [ 600, -100, 0 ]
},
{
"t": 6.000,
"value": [ 600, -100, 0 ]
}
]
},
"rotation":
{
"value": [ 0, 0, 0 ]
},
"scale":
{
"interpolation": "DISCRETE",
"timeline":
[
{
"value": [ 20, 7.12 ]
}
]
},
"color":
{
"value": [ 1, 1, 1, 1 ]
}
}
]
}
+115
View File
@@ -0,0 +1,115 @@
{
"name": "Sparkler - бенгальский огонь",
"emitters":
[
{
"name": "Spark",
"maxParticles": 300,
"preloading": 100,
"texturePath": "textures/spark.png",
"hasInertion": "false",
"gravity": [0, 0, 0],
"spawnRange_system": "PARTICLE_EFFECT",
"spawnTotal":
{
"interpolation": "LINEAR_SPLINE",
"timeline":
[
{
"t": 0,
"value": 0
},
{
"t": 1,
"value": 20
}
]
},
"spawnRange":
{
"value": [ 0, 0, 0, 0 ]
},
"lifeTime":
{
"min": 6,
"max": 6
},
"coords_system": "PARTICLE_EFFECT",
"coords_axis_system": "PARTICLE_BIRTH",
"rotation_system": "PARTICLE_EFFECT",
"coords":
{
"interpolation": "CUBIC_SPLINE",
"timeline":
[
{
"t": 0.000,
"value": [ 50, 0, 0 ]
},
{
"t": 0.001,
"value": [ 50, 0, 0 ]
},
{
"t": 1.000,
"value": [ 100, 100, 0 ]
},
{
"t": 2.000,
"value": [ 200, -100, 0 ]
},
{
"t": 3.000,
"value": [ 300, 100, 0 ]
},
{
"t": 4.000,
"value": [ 400, -100, 0 ]
},
{
"t": 5.000,
"value": [ 500, 100, 0 ]
},
{
"t": 5.999,
"value": [ 600, -100, 0 ]
},
{
"t": 6.000,
"value": [ 600, -100, 0 ]
}
]
},
"rotation":
{
"value": [ 0, 0, 0 ]
},
"scale":
{
"interpolation": "DISCRETE",
"timeline":
[
{
"value": [ 10, 10 ]
}
]
},
"color":
{
"value": [ 1, 1, 0, 1 ]
}
}
]
}
+89
View File
@@ -0,0 +1,89 @@
{
"name": "Simple Sparkler",
"emitters":
[
{
"name": "Spark",
"maxParticles": 1000,
"preloading": 1000,
"texturePath": "textures/spark-white.png",
"hasInertion": "false",
"gravity": [0, 0, 0],
"spawnRange_system": "PARTICLE_EFFECT",
"spawnTotal":
{
"interpolation": "LINEAR_SPLINE",
"timelineType": "CONTINUED",
"timeline":
[
{
"t": 0.000,
"value": 0
},
{
"t": 1.000,
"value": 200
}
]
},
"spawnRange":
{
"value": [ 0, 0, 0, 360 ]
},
"lifeTime":
{
"min": 0.1,
"max": 1
},
"coords_system": "PARTICLE_BIRTH",
"coords_axis_system": "PARTICLE_BIRTH",
"rotation_system": "PARTICLE_EFFECT",
"coords":
{
"interpolation": "LINEAR_SPLINE",
"timeline":
[
{
"t": 0.000,
"value": [ 0, 0, 0 ]
},
{
"t": 1,
"min": [ 300, 0, 0 ],
"max": [ 600, 0, 0 ]
}
]
},
"rotation":
{
"value": [ 0, 0, 0 ]
},
"scale":
{
"interpolation": "DISCRETE",
"timeline":
[
{
"value": [ 10, 10 ]
}
]
},
"color":
{
"value": [ 1, 1, 0, 1 ]
}
}
]
}
+97
View File
@@ -0,0 +1,97 @@
{
"name": "Simple Sparkler",
"emitters":
[
{
"name": "Spark",
"maxParticles": 1000,
"preloading": 1000,
"texturePath": "textures/spark-white.png",
"hasInertion": "false",
"gravity": [0, 0, 0],
"spawnRange_system": "PARTICLE_EFFECT",
"spawnTotal":
{
"interpolation": "CUBIC_SPLINE",
"timelineType": "LIMITED",
"timeline":
[
{
"t": 0.000,
"value": 0
},
{
"t": 0.010,
"value": 0
},
{
"t": 9.990,
"value": 2000
},
{
"t": 10.000,
"value": 2000
}
]
},
"spawnRange":
{
"value": [ 0, 0, 0, 360 ]
},
"lifeTime":
{
"min": 0.1,
"max": 1
},
"coords_system": "PARTICLE_BIRTH",
"coords_axis_system": "PARTICLE_BIRTH",
"rotation_system": "PARTICLE_EFFECT",
"coords":
{
"interpolation": "LINEAR_SPLINE",
"timeline":
[
{
"t": 0.000,
"value": [ 0, 0, 0 ]
},
{
"t": 1,
"min": [ 300, 0, 0 ],
"max": [ 600, 0, 0 ]
}
]
},
"rotation":
{
"value": [ 0, 0, 0 ]
},
"scale":
{
"interpolation": "DISCRETE",
"timeline":
[
{
"value": [ 10, 10 ]
}
]
},
"color":
{
"value": [ 1, 1, 0, 1 ]
}
}
]
}
-11
View File
@@ -1,11 +0,0 @@
precision mediump float;
varying vec2 texCoord;
uniform sampler2D Texture;
uniform vec4 Color;
void main()
{
gl_FragColor = texture2D(Texture,texCoord) * Color;
}
File renamed without changes.
File renamed without changes.
+11
View File
@@ -0,0 +1,11 @@
precision mediump float;
in vec2 texCoord;
flat in vec4 color;
uniform sampler2D Texture;
void main()
{
gl_FragColor = texture2D(Texture,texCoord) * color;
}
@@ -1,7 +1,9 @@
attribute vec3 vPosition;
attribute vec2 vTexCoord;
attribute vec4 vColor;
varying vec2 texCoord;
out vec2 texCoord;
flat out vec4 color;
uniform mat4 ProjectionMatrix;
@@ -9,4 +11,5 @@ void main()
{
gl_Position = ProjectionMatrix * vec4(vPosition.xyz, 1.0);
texCoord = vTexCoord;
color = vColor;
}
File renamed without changes.
File renamed without changes.
-100
View File
@@ -1,100 +0,0 @@
{
"name": "Sparkler - бенгальский огонь",
"emitters":
[
{
"name": "Spark",
"maxParticles": 300,
"preloading": 100,
"texturePath": "spark.png",
"hasInertion": "false",
"gravity": [0, -2, 0],
"spawnRange_system": "PARTICLE_BIRTH",
"spawnTotal":
{
"interpolation": "LINEAR_SPLINE",
"isLooped": "false",
"timeline":
[
{
"t": 0.000,
"value": 0
},
{
"t": 0.001,
"value": 0
},
{
"t": 9.999,
"value": 300
},
{
"t": 10.000,
"value": 300
}
]
},
"spawnRange":
{
"value": [ 0, 0, 360, 180 ]
},
"lifeTime":
{
"min": 0.100,
"max": 1.000
},
"coords_system": "PARTICLE_BIRTH",
"coords_axis_system": "PARTICLE_EFFECT",
"rotation_system": "PARTICLE_BIRTH",
"coords":
{
"interpolation": "CUBIC_SPLINE",
"isLooped": "false",
"timeline":
[
{
"t": 0.000,
"min": [ -1, -1, -1 ],
"max": [ 1, 1, 1 ]
},
{
"t": 1.000,
"min": [ -2, -2, -2 ],
"max": [ 2, 2, 2 ]
}
]
},
"rotation":
{
"value": [ 0, 0, 0 ]
},
"scale":
{
"interpolation": "DISCRETE",
"isLooped": "false",
"timeline":
[
{
"value": [ 5, 5 ]
}
]
},
"color":
{
"value": [ 1, 1, 0, 1 ]
}
}
]
}
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 204 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 690 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 241 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 378 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 145 KiB