diff --git a/assets/config.json b/assets/config.json new file mode 100755 index 0000000..1841412 --- /dev/null +++ b/assets/config.json @@ -0,0 +1,3 @@ +{ + "effect": "effects/ball-hit-spark.json" +} \ No newline at end of file diff --git a/assets/effects/O-func.json b/assets/effects/O-func.json new file mode 100755 index 0000000..efb0329 --- /dev/null +++ b/assets/effects/O-func.json @@ -0,0 +1,102 @@ +{ + "name": "Sparkler - бенгальский огонь", + + "emitters": + [ + { + "name": "Spark", + + "maxParticles": 300, + "preloading": 100, + + "texturePath": "textures/spark.png", + "textureSize": [ 10, 10 ], + + "hasInertion": "false", + "gravity": [0, 0, 0], + + "spawnRange_system": "PARTICLE_EFFECT", + + "spawnTotal": + { + "interpolation": "LINEAR_SPLINE", + "timeline": + [ + { + "t": 0, + "value": 0 + }, + { + "t": 1, + "value": 5 + } + ] + }, + + "spawnRange": + { + "value": [ 0, 0, 0, 0 ] + }, + + "lifeTime": + { + "value": 2 + }, + + "coords_system": "PARTICLE_BIRTH", + "coords_axis_system": "PARTICLE_BIRTH", + "rotation_system": "PARTICLE_EFFECT", + + "coords": + { + "interpolation": "CUBIC_SPLINE", + "timeline": + [ + { + "t": 0.000, + "value": [ 100, 0, 0] + }, + { + "t": 0.1, + "value": [ 95, 30, 0] + }, + { + "t": 0.5, + "value": [ 0, 100, 0] + }, + { + "t": 1.0, + "value": [ -100, 0, 0] + }, + { + "t": 1.5, + "value": [ 0, -100, 0] + }, + { + "t": 1.9, + "value": [ 95, -30, 0] + }, + { + "t": 2.000, + "value": [ 100, 0, 0] + } + ] + }, + + "rotation": + { + "value": [ 0, 0, 0 ] + }, + + "scale": + { + "value": 1 + }, + + "color": + { + "value": [ 1, 1, 0, 1 ] + } + } + ] +} \ No newline at end of file diff --git a/assets/effects/S-func.json b/assets/effects/S-func.json new file mode 100755 index 0000000..72d4afb --- /dev/null +++ b/assets/effects/S-func.json @@ -0,0 +1,94 @@ +{ + "name": "Sparkler - бенгальский огонь", + + "emitters": + [ + { + "name": "Spark", + + "maxParticles": 300, + "preloading": 100, + + "texturePath": "textures/spark.png", + "textureSize": [ 10, 10 ], + + "hasInertion": "false", + "gravity": [0, 0, 0], + + "spawnRange_system": "PARTICLE_EFFECT", + + "spawnTotal": + { + "interpolation": "LINEAR_SPLINE", + "timeline": + [ + { + "t": 0, + "value": 0 + }, + { + "t": 1, + "value": 5 + } + ] + }, + + "spawnRange": + { + "value": [ 0, 0, 0, 0 ] + }, + + "lifeTime": + { + "value": 2 + }, + + "coords_system": "PARTICLE_EFFECT", + "coords_axis_system": "PARTICLE_BIRTH", + "rotation_system": "PARTICLE_EFFECT", + + "coords": + { + "interpolation": "CUBIC_SPLINE", + "timeline": + [ + { + "t": 0.000, + "value": [ 0, 0, 0] + }, + { + "t": 0.5, + "value": [ 50, 20, 0] + }, + { + "t": 1.0, + "value": [ 100, 100, 0] + }, + { + "t": 1.5, + "value": [ 150, 180, 0] + }, + { + "t": 2.000, + "value": [ 200, 200, 0] + } + ] + }, + + "rotation": + { + "value": [ 0, 0, 0 ] + }, + + "scale": + { + "value": 1 + }, + + "color": + { + "value": [ 1, 1, 0, 1 ] + } + } + ] +} \ No newline at end of file diff --git a/assets/effects/ball-hit-spark.json b/assets/effects/ball-hit-spark.json new file mode 100755 index 0000000..f26c721 --- /dev/null +++ b/assets/effects/ball-hit-spark.json @@ -0,0 +1,85 @@ +{ + "name": "Simple Sparkler", + + "emitters": + [ + { + "name": "Spark", + + "maxParticles": 5, + "preloading": 5, + + "texturePath": "textures/spark-white.png", + "textureSize": [ 10, 10 ], + + "hasInertion": "false", + "gravity": [0, 0, 0], + + "spawnRange_system": "PARTICLE_EFFECT", + + "spawnTotal": + { + "interpolation": "LINEAR_SPLINE", + "timelineType": "LIMITED", + "timeline": + [ + { + "t": 0.000, + "value": 0 + }, + { + "t": 0.050, + "value": 50 + } + ] + }, + + "spawnRange": + { + "value": [ 0, 0, 0, 170 ] + }, + + "lifeTime": + { + "min": 0.05, + "max": 0.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": 2, + "min": [ 300, 0, 0 ], + "max": [ 600, 0, 0 ] + } + ] + }, + + "rotation": + { + "value": [ 0, 0, 0 ] + }, + + "scale": + { + "value": 1 + }, + + "color": + { + "value": [ 1, 1, 0, 1 ] + } + } + ] +} \ No newline at end of file diff --git a/assets/effects/chaotic.json b/assets/effects/chaotic.json new file mode 100755 index 0000000..0fdf188 --- /dev/null +++ b/assets/effects/chaotic.json @@ -0,0 +1,116 @@ +{ + "emitters": + [ + { + "maxParticles": 300, + "preloading": 100, + + "texturePath": "textures/spark.png", + "textureSize": [ 10, 10 ], + + "hasInertion": "false", + "gravity": [0, 0, 0], + + "spawnRange_system": "PARTICLE_EFFECT", + + "spawnTotal": + { + "interpolation": "LINEAR_SPLINE", + "timeline": + [ + { + "t": 0, + "value": 0 + }, + { + "t": 1, + "value": 5 + } + ] + }, + + "spawnRange": + { + "value": [ 0, 0, 0, 360 ] + }, + + "lifeTime": + { + "value": 3 + }, + + "coords_system": "PARTICLE_EFFECT", + "offset_axis_system": "PARTICLE_EFFECT", + "coords_axis_system": "PARTICLE_BIRTH", + "rotation_system": "PARTICLE_EFFECT", + + "coords": + { + "interpolation": "CUBIC_SPLINE", + "timeline": + [ + { + "t": 0.000, + "value": [ 0, 0, 0] + }, + { + "t": 3.000, + "value": [ 500, 0, 0] + } + ] + }, + + "offset": + { + "interpolation": "CUBIC_SPLINE", + "timelineType": "LOOPED", + "timeline": + [ + { + "t": 0.000, + "value": [ 10, 0, 0] + }, + { + "t": 0.025, + "value": [ 9.5, 3, 0] + }, + { + "t": 0.125, + "value": [ 0, 10, 0] + }, + { + "t": 0.25, + "value": [ -10, 0, 0] + }, + { + "t": 0.375, + "value": [ 0, -10, 0] + }, + { + "t": 0.475, + "value": [ 9.5, -3, 0] + }, + { + "t": 0.5, + "value": [ 10, 0, 0] + } + ] + }, + + "rotation": + { + "value": [ 0, 0, 0 ] + }, + + "scale": + { + "value": 1 + }, + + "color": + { + "value": [ 1, 1, 0, 1 ] + } + } + ] +} \ No newline at end of file diff --git a/assets/effects/confetti.json b/assets/effects/confetti.json new file mode 100755 index 0000000..495f8a5 --- /dev/null +++ b/assets/effects/confetti.json @@ -0,0 +1,861 @@ +{ + "emitters": + [ + { + "maxParticles": 10000, + "preloading": 1000, + + "texturePath": "textures/star-white.png", + "textureSize": [ 5, 5 ], + + "gravity": [ 0, -100, 0 ], + + "spawnRange_system": "PARTICLE_EFFECT", + + "spawnTotal": + { + "interpolation": "LINEAR_SPLINE", + "timeline": + [ + { + "t": 0.000, + "value": 0 + }, + { + "t": 1.000, + "value": 15 + } + ] + }, + + "spawnRange": + { + "value": [ 0, 0, 360, 0] + }, + + "lifeTime": + { + "min": 10, + "max": 10 + }, + + "coords_system": "PARTICLE_BIRTH", + "coords_axis_system": "PARTICLE_BIRTH", + "offset_axis_system": "PARTICLE_BIRTH", + "rotation_system": "PARTICLE_ITSELF", + + "coords": + { + "interpolation": "LINEAR_SPLINE", + "timeline": + [ + { + "t": 0.000, + "value": [ 0, 0, 0 ] + }, + { + "t": 1.000, + "min": [ 100, 0, 0 ], + "max": [ 200, 0, 0 ] + } + ] + }, + + "offset": + { + "interpolation": "CUBIC_SPLINE", + "timelineType": "LOOPED", + "timeOffset": + { + "min": 0, + "max": 1 + }, + "timeline": + [ + { + "t": 0.00, + "value": [ 10, 0, 0] + }, + { + "t": 0.05, + "value": [ 9.5, 3, 0] + }, + { + "t": 0.25, + "value": [ 0, 10, 0] + }, + { + "t": 0.5, + "value": [ -10, 0, 0] + }, + { + "t": 0.75, + "value": [ 0, -10, 0] + }, + { + "t": 0.95, + "value": [ 9.5, -3, 0] + }, + { + "t": 1.0, + "value": [ 10, 0, 0] + } + ] + }, + + "rotation": + { + "interpolation": "LINEAR_SPLINE", + "timeOffset": + { + "min": 0, + "max": 1 + }, + "timelineType": "LOOPED", + "timeline": + [ + { + "t": 0.000, + "value": [ 0, 45, 0 ] + }, + { + "t": 1.000, + "value": [ 360, 45, 0 ] + } + ] + }, + + "scale": + { + "interpolation": "DISCRETE", + "timeline": + [ + { + "min": 1, + "max": 2 + } + ] + }, + + "color": + { + "value": [ 0, 1, 0, 1 ] + } + }, + { + "name": "Magic Star", + + "maxParticles": 10000, + "preloading": 1000, + + "texturePath": "textures/rect-white.png", + "textureSize": [ 5, 5 ], + + "gravity": [ 0, -100, 0 ], + + "spawnRange_system": "PARTICLE_EFFECT", + + "spawnTotal": + { + "interpolation": "LINEAR_SPLINE", + "timeline": + [ + { + "t": 0.000, + "value": 0 + }, + { + "t": 1.000, + "value": 15 + } + ] + }, + + "spawnRange": + { + "value": [ 0, 0, 360, 0] + }, + + "lifeTime": + { + "min": 10, + "max": 10 + }, + + "coords_system": "PARTICLE_BIRTH", + "coords_axis_system": "PARTICLE_BIRTH", + "offset_axis_system": "PARTICLE_BIRTH", + "rotation_system": "PARTICLE_EFFECT", + + "coords": + { + "interpolation": "LINEAR_SPLINE", + "timeline": + [ + { + "t": 0.000, + "value": [ 0, 0, 0 ] + }, + { + "t": 1.000, + "min": [ 100, 0, 0 ], + "max": [ 200, 0, 0 ] + } + ] + }, + + "offset": + { + "interpolation": "CUBIC_SPLINE", + "timelineType": "LOOPED", + "timeOffset": + { + "min": 0, + "max": 1 + }, + "timeline": + [ + { + "t": 0.00, + "value": [ 10, 0, 0] + }, + { + "t": 0.05, + "value": [ 9.5, 3, 0] + }, + { + "t": 0.25, + "value": [ 0, 10, 0] + }, + { + "t": 0.5, + "value": [ -10, 0, 0] + }, + { + "t": 0.75, + "value": [ 0, -10, 0] + }, + { + "t": 0.95, + "value": [ 9.5, -3, 0] + }, + { + "t": 1.0, + "value": [ 10, 0, 0] + } + ] + }, + + "rotation": + { + "interpolation": "LINEAR_SPLINE", + "timeOffset": + { + "min": 0, + "max": 1 + }, + "timelineType": "LOOPED", + "timeline": + [ + { + "t": 0.000, + "value": [ 0, 45, 0 ] + }, + { + "t": 1.000, + "value": [ 360, 45, 0 ] + } + ] + }, + + "scale": + { + "interpolation": "DISCRETE", + "timeline": + [ + { + "min": 1, + "max": 2 + } + ] + }, + + "color": + { + "value": [ 1, 0, 0, 1 ] + } + }, + { + "name": "Magic Star", + + "maxParticles": 10000, + "preloading": 1000, + + "texturePath": "textures/circle-white.png", + "textureSize": [ 5, 5 ], + + "gravity": [ 0, -100, 0 ], + + "spawnRange_system": "PARTICLE_EFFECT", + + "spawnTotal": + { + "interpolation": "LINEAR_SPLINE", + "timeline": + [ + { + "t": 0.000, + "value": 0 + }, + { + "t": 1.000, + "value": 15 + } + ] + }, + + "spawnRange": + { + "value": [ 0, 0, 360, 0] + }, + + "lifeTime": + { + "min": 10, + "max": 10 + }, + + "coords_system": "PARTICLE_BIRTH", + "coords_axis_system": "PARTICLE_BIRTH", + "offset_axis_system": "PARTICLE_BIRTH", + "rotation_system": "PARTICLE_EFFECT", + + "coords": + { + "interpolation": "LINEAR_SPLINE", + "timeline": + [ + { + "t": 0.000, + "value": [ 0, 0, 0 ] + }, + { + "t": 1.000, + "min": [ 100, 0, 0 ], + "max": [ 200, 0, 0 ] + } + ] + }, + + "offset": + { + "interpolation": "CUBIC_SPLINE", + "timelineType": "LOOPED", + "timeOffset": + { + "min": 0, + "max": 1 + }, + "timeline": + [ + { + "t": 0.00, + "value": [ 10, 0, 0] + }, + { + "t": 0.05, + "value": [ 9.5, 3, 0] + }, + { + "t": 0.25, + "value": [ 0, 10, 0] + }, + { + "t": 0.5, + "value": [ -10, 0, 0] + }, + { + "t": 0.75, + "value": [ 0, -10, 0] + }, + { + "t": 0.95, + "value": [ 9.5, -3, 0] + }, + { + "t": 1.0, + "value": [ 10, 0, 0] + } + ] + }, + + "rotation": + { + "interpolation": "LINEAR_SPLINE", + "timeOffset": + { + "min": 0, + "max": 1 + }, + "timelineType": "LOOPED", + "timeline": + [ + { + "t": 0.000, + "value": [ 0, 45, 0 ] + }, + { + "t": 1.000, + "value": [ 360, 45, 0 ] + } + ] + }, + + "scale": + { + "interpolation": "DISCRETE", + "timeline": + [ + { + "min": 1, + "max": 2 + } + ] + }, + + "color": + { + "value": [ 0, 0, 1, 1 ] + } + }, + { + "name": "Magic Star", + + "maxParticles": 10000, + "preloading": 1000, + + "texturePath": "textures/star-white.png", + "textureSize": [ 5, 5 ], + + "gravity": [ 0, -100, 0 ], + + "spawnRange_system": "PARTICLE_EFFECT", + + "spawnTotal": + { + "interpolation": "LINEAR_SPLINE", + "timeline": + [ + { + "t": 0.000, + "value": 0 + }, + { + "t": 1.000, + "value": 15 + } + ] + }, + + "spawnRange": + { + "value": [ 0, 0, 360, 0] + }, + + "lifeTime": + { + "min": 10, + "max": 10 + }, + + "coords_system": "PARTICLE_BIRTH", + "coords_axis_system": "PARTICLE_BIRTH", + "offset_axis_system": "PARTICLE_BIRTH", + "rotation_system": "PARTICLE_EFFECT", + + "coords": + { + "interpolation": "LINEAR_SPLINE", + "timeline": + [ + { + "t": 0.000, + "value": [ 0, 0, 0 ] + }, + { + "t": 1.000, + "min": [ 100, 0, 0 ], + "max": [ 200, 0, 0 ] + } + ] + }, + + "offset": + { + "interpolation": "CUBIC_SPLINE", + "timelineType": "LOOPED", + "timeOffset": + { + "min": 0, + "max": 1 + }, + "timeline": + [ + { + "t": 0.00, + "value": [ 10, 0, 0] + }, + { + "t": 0.05, + "value": [ 9.5, 3, 0] + }, + { + "t": 0.25, + "value": [ 0, 10, 0] + }, + { + "t": 0.5, + "value": [ -10, 0, 0] + }, + { + "t": 0.75, + "value": [ 0, -10, 0] + }, + { + "t": 0.95, + "value": [ 9.5, -3, 0] + }, + { + "t": 1.0, + "value": [ 10, 0, 0] + } + ] + }, + + "rotation": + { + "interpolation": "LINEAR_SPLINE", + "timeOffset": + { + "min": 0, + "max": 1 + }, + "timelineType": "LOOPED", + "timeline": + [ + { + "t": 0.000, + "value": [ 0, 45, 0 ] + }, + { + "t": 1.000, + "value": [ 360, 45, 0 ] + } + ] + }, + + "scale": + { + "interpolation": "DISCRETE", + "timeline": + [ + { + "min": 1, + "max": 2 + } + ] + }, + + "color": + { + "value": [ 1, 1, 0, 1 ] + } + }, + { + "name": "Magic Star", + + "maxParticles": 10000, + "preloading": 1000, + + "texturePath": "textures/rect-white.png", + "textureSize": [ 5, 5 ], + + "gravity": [ 0, -100, 0 ], + + "spawnRange_system": "PARTICLE_EFFECT", + + "spawnTotal": + { + "interpolation": "LINEAR_SPLINE", + "timeline": + [ + { + "t": 0.000, + "value": 0 + }, + { + "t": 1.000, + "value": 15 + } + ] + }, + + "spawnRange": + { + "value": [ 0, 0, 360, 0] + }, + + "lifeTime": + { + "min": 10, + "max": 10 + }, + + "coords_system": "PARTICLE_BIRTH", + "coords_axis_system": "PARTICLE_BIRTH", + "offset_axis_system": "PARTICLE_BIRTH", + "rotation_system": "PARTICLE_EFFECT", + + "coords": + { + "interpolation": "LINEAR_SPLINE", + "timeline": + [ + { + "t": 0.000, + "value": [ 0, 0, 0 ] + }, + { + "t": 1.000, + "min": [ 100, 0, 0 ], + "max": [ 200, 0, 0 ] + } + ] + }, + + "offset": + { + "interpolation": "CUBIC_SPLINE", + "timelineType": "LOOPED", + "timeOffset": + { + "min": 0, + "max": 1 + }, + "timeline": + [ + { + "t": 0.00, + "value": [ 10, 0, 0] + }, + { + "t": 0.05, + "value": [ 9.5, 3, 0] + }, + { + "t": 0.25, + "value": [ 0, 10, 0] + }, + { + "t": 0.5, + "value": [ -10, 0, 0] + }, + { + "t": 0.75, + "value": [ 0, -10, 0] + }, + { + "t": 0.95, + "value": [ 9.5, -3, 0] + }, + { + "t": 1.0, + "value": [ 10, 0, 0] + } + ] + }, + + "rotation": + { + "interpolation": "LINEAR_SPLINE", + "timeOffset": + { + "min": 0, + "max": 1 + }, + "timelineType": "LOOPED", + "timeline": + [ + { + "t": 0.000, + "value": [ 0, 45, 0 ] + }, + { + "t": 1.000, + "value": [ 360, 45, 0 ] + } + ] + }, + + "scale": + { + "interpolation": "DISCRETE", + "timeline": + [ + { + "min": 1, + "max": 2 + } + ] + }, + + "color": + { + "value": [ 0, 1, 1, 1 ] + } + }, + { + "name": "Magic Star", + + "maxParticles": 10000, + "preloading": 1000, + + "texturePath": "textures/circle-white.png", + "textureSize": [ 5, 5 ], + + "gravity": [ 0, -100, 0 ], + + "spawnRange_system": "PARTICLE_EFFECT", + + "spawnTotal": + { + "interpolation": "LINEAR_SPLINE", + "timeline": + [ + { + "t": 0.000, + "value": 0 + }, + { + "t": 1.000, + "value": 15 + } + ] + }, + + "spawnRange": + { + "value": [ 0, 0, 360, 0] + }, + + "lifeTime": + { + "min": 10, + "max": 10 + }, + + "coords_system": "PARTICLE_BIRTH", + "coords_axis_system": "PARTICLE_BIRTH", + "offset_axis_system": "PARTICLE_BIRTH", + "rotation_system": "PARTICLE_EFFECT", + + "coords": + { + "interpolation": "LINEAR_SPLINE", + "timeline": + [ + { + "t": 0.000, + "value": [ 0, 0, 0 ] + }, + { + "t": 1.000, + "min": [ 100, 0, 0 ], + "max": [ 200, 0, 0 ] + } + ] + }, + + "offset": + { + "interpolation": "CUBIC_SPLINE", + "timelineType": "LOOPED", + "timeOffset": + { + "min": 0, + "max": 1 + }, + "timeline": + [ + { + "t": 0.00, + "value": [ 10, 0, 0] + }, + { + "t": 0.05, + "value": [ 9.5, 3, 0] + }, + { + "t": 0.25, + "value": [ 0, 10, 0] + }, + { + "t": 0.5, + "value": [ -10, 0, 0] + }, + { + "t": 0.75, + "value": [ 0, -10, 0] + }, + { + "t": 0.95, + "value": [ 9.5, -3, 0] + }, + { + "t": 1.0, + "value": [ 10, 0, 0] + } + ] + }, + + "rotation": + { + "interpolation": "LINEAR_SPLINE", + "timeOffset": + { + "min": 0, + "max": 1 + }, + "timelineType": "LOOPED", + "timeline": + [ + { + "t": 0.000, + "value": [ 0, 45, 0 ] + }, + { + "t": 1.000, + "value": [ 360, 45, 0 ] + } + ] + }, + + "scale": + { + "interpolation": "DISCRETE", + "timeline": + [ + { + "min": 1, + "max": 2 + } + ] + }, + + "color": + { + "value": [ 1, 0, 1, 1 ] + } + } + ] +} \ No newline at end of file diff --git a/assets/effects/magic-stars.json b/assets/effects/magic-stars.json new file mode 100755 index 0000000..7030bb0 --- /dev/null +++ b/assets/effects/magic-stars.json @@ -0,0 +1,274 @@ +{ + "emitters": + [ + { + "preloading": 20, + + "texturePath": "textures/magic-star.png", + "textureSize": [ 22.625, 12.5 ], + + "hasInertion": "false", + "gravity": [0, 0, 0], + + "spawnRange_system": "PARTICLE_EFFECT", + + "spawnTotal": + { + "interpolation": "LINEAR_SPLINE", + "timeline": + [ + { + "t": 0, + "value": 0 + }, + { + "t": 1, + "value": 2 + } + ] + }, + + "spawnRange": + { + "value": [ 0, 30, 0, 45 ] + }, + + "lifeTime": + { + "min": 1.5, + "max": 3 + }, + + "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": 1.000, + "min": [ 300, 0, 0 ], + "max": [ 300, 0, 0 ] + } + ] + }, + + "rotation": + { + "value": [ 0, 0, 0 ] + }, + + "scale": + { + "interpolation": "DISCRETE", + "timeline": + [ + { + "value": 1 + } + ] + }, + + "color": + { + "value": [ 1, 1, 1, 1 ] + }, + + "emitters": + [ + { + "name": "Spark", + + "maxParticles": 110, + "preloading": 110, + + "texturePath": "textures/spark-white.png", + "textureSize": [ 10, 10 ], + + "gravity": [0, -100, 0], + + "spawnRange_system": "PARTICLE_BIRTH", + + "spawnTotal": + { + "interpolation": "LINEAR_SPLINE", + "matchDeathTime": "true", + "timeline": + [ + { + "t": 0.000, + "value": 0 + }, + { + "t": 1, + "value": 50 + } + ] + }, + + "spawnRange": + { + "value": [ 0, 0, 0, 360 ] + }, + + "lifeTime": + { + "min": 1, + "max": 2 + }, + + "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": 1.000, + "min": [ 0, 0, 0 ], + "max": [ 50, 0, 0 ] + } + ] + }, + + "rotation": + { + "value": [ 0, 0, 0 ] + }, + + "scale": + { + "value": 1 + }, + + "color": + { + "interpolation": "LINEAR_SPLINE", + "timeline": + [ + { + "t": 0.000, + "value": [ 0, 1, 1, 1 ] + }, + { + "t": 1.000, + "value": [ 0, 0, 1, 1 ] + }, + { + "t": 1.200, + "value": [ 0, 0, 1, 0 ] + } + ] + } + }, + { + "name": "Spark", + + "maxParticles": 300, + "preloading": 300, + + "texturePath": "textures/spark-white.png", + "textureSize": [ 10, 10 ], + + "hasInertion": "true", + "gravity": [0, -100, 0], + + "spawnRange_system": "PARTICLE_BIRTH", + + "spawnTotal": + { + "interpolation": "DISCRETE", + "matchDeathTime": "true", + "timeline": + [ + { + "t": 0.000, + "value": 0 + }, + { + "t": 2.000, + "value": 300 + } + ] + }, + + "spawnRange": + { + "value": [ 0, 0, 0, 360 ] + }, + + "lifeTime": + { + "min": 1, + "max": 2 + }, + + "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": 1.000, + "min": [ 25, 0, 0 ], + "max": [ 300, 0, 0 ] + } + ] + }, + + "rotation": + { + "value": [ 0, 0, 0 ] + }, + + "scale": + { + "value": 1 + }, + + "color": + { + "interpolation": "LINEAR_SPLINE", + "timeline": + [ + { + "t": 0.000, + "value": [ 1, 1, 0, 1 ] + }, + { + "t": 1.000, + "value": [ 1, 0, 0, 1 ] + }, + { + "t": 1.200, + "value": [ 1, 0, 0, 0 ] + } + ] + } + } + ] + } + ] +} \ No newline at end of file diff --git a/assets/effects/sine-comets.json b/assets/effects/sine-comets.json new file mode 100755 index 0000000..9d504a5 --- /dev/null +++ b/assets/effects/sine-comets.json @@ -0,0 +1,110 @@ +{ + "name": "Sparkler - бенгальский огонь", + + "emitters": + [ + { + "name": "Spark", + + "maxParticles": 300, + "preloading": 100, + + "texturePath": "textures/comet.png", + "textureSize": [ 20, 7.12 ], + + "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": + { + "value": 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": + { + "value": 1 + }, + + "color": + { + "value": [ 1, 1, 1, 1 ] + } + } + ] +} \ No newline at end of file diff --git a/assets/effects/sine-sparks.json b/assets/effects/sine-sparks.json new file mode 100755 index 0000000..abdc99e --- /dev/null +++ b/assets/effects/sine-sparks.json @@ -0,0 +1,110 @@ +{ + "name": "Sparkler - бенгальский огонь", + + "emitters": + [ + { + "name": "Spark", + + "maxParticles": 300, + "preloading": 100, + + "texturePath": "textures/spark.png", + "textureSize": [ 10, 10 ], + + "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": + { + "value": 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": + { + "value": 1 + }, + + "color": + { + "value": [ 1, 1, 0, 1 ] + } + } + ] +} \ No newline at end of file diff --git a/assets/effects/sparkler-looped.json b/assets/effects/sparkler-looped.json new file mode 100755 index 0000000..c32aa3c --- /dev/null +++ b/assets/effects/sparkler-looped.json @@ -0,0 +1,93 @@ +{ + "name": "Simple Sparkler", + + "emitters": + [ + { + "name": "Spark", + + "maxParticles": 2000, + "preloading": 2000, + + "texturePath": "textures/spark-white.png", + "textureSize": [ 10, 10 ], + + "hasInertion": "false", + "gravity": [0, 0, 0], + + "spawnRange_system": "PARTICLE_EFFECT", + + "spawnTotal": + { + "interpolation": "CUBIC_SPLINE", + "timelineType": "LOOPED", + "timeline": + [ + { + "t": 0.000, + "value": 0 + }, + { + "t": 0.001, + "value": 0 + }, + { + "t": 9.999, + "value": 10000 + }, + { + "t": 10.000, + "value": 10000 + } + ] + }, + + "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": + { + "value": 1 + }, + + "color": + { + "value": [ 1, 1, 0, 1 ] + } + } + ] +} \ No newline at end of file diff --git a/assets/effects/sparkler.json b/assets/effects/sparkler.json new file mode 100755 index 0000000..8ba67b7 --- /dev/null +++ b/assets/effects/sparkler.json @@ -0,0 +1,85 @@ +{ + "name": "Simple Sparkler", + + "emitters": + [ + { + "name": "Spark", + + "maxParticles": 1100, + "preloading": 1100, + + "texturePath": "textures/spark-white.png", + "textureSize": [ 10, 10 ], + + "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": 1000 + } + ] + }, + + "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": + { + "value": 1 + }, + + "color": + { + "value": [ 1, 1, 0, 1 ] + } + } + ] +} \ No newline at end of file diff --git a/assets/effects/test.json b/assets/effects/test.json new file mode 100755 index 0000000..34fc40e --- /dev/null +++ b/assets/effects/test.json @@ -0,0 +1,646 @@ +{ + "emitters": + [ + { + "maxParticles": 10000, + "preloading": 1000, + + "texturePath": "textures/star-white.png", + "textureSize": [ 5, 5 ], + + "gravity": [ 0, -100, 0 ], + + "spawnRange_system": "PARTICLE_EFFECT", + + "spawnTotal": + { + "interpolation": "LINEAR_SPLINE", + "timeline": + [ + { + "t": 0.000, + "value": 0 + }, + { + "t": 1.000, + "value": 5 + } + ] + }, + + "spawnRange": + { + "value": [ 0, 0, 360, 180 ] + }, + + "lifeTime": + { + "min": 10, + "max": 10 + }, + + "coords_system": "PARTICLE_BIRTH", + "coords_axis_system": "PARTICLE_BIRTH", + "offset_axis_system": "PARTICLE_ITSELF", + "rotation_system": "PARTICLE_ITSELF", + + "coords": + { + "interpolation": "LINEAR_SPLINE", + "timeline": + [ + { + "t": 0.000, + "value": [ 0, 0, 0 ] + }, + { + "t": 1.000, + "min": [ 150, 0, 0 ], + "max": [ 300, 0, 0 ] + } + ] + }, + + "offset": + { + "interpolation": "CUBIC_SPLINE", + "timelineType": "LOOPED", + "timeline": + [ + { + "t": 0.00, + "value": [ 10, 0, 0] + }, + { + "t": 0.05, + "value": [ 9.5, 3, 0] + }, + { + "t": 0.25, + "value": [ 0, 10, 0] + }, + { + "t": 0.5, + "value": [ -10, 0, 0] + }, + { + "t": 0.75, + "value": [ 0, -10, 0] + }, + { + "t": 0.95, + "value": [ 9.5, -3, 0] + }, + { + "t": 1.0, + "value": [ 10, 0, 0] + } + ] + }, + + "rotation": + { + "interpolation": "LINEAR_SPLINE", + "timeOffset": + { + "min": 0, + "max": 1 + }, + "timelineType": "LOOPED", + "timeline": + [ + { + "t": 0.000, + "value": [ 0, 45, 0 ] + }, + { + "t": 1.000, + "value": [ 360, 45, 0 ] + } + ] + }, + + "scale": + { + "interpolation": "DISCRETE", + "timeline": + [ + { + "min": 1, + "max": 2 + } + ] + }, + + "color": + { + "value": [ 0, 1, 0, 1 ] + } + }, + { + "name": "Magic Star", + + "maxParticles": 10000, + "preloading": 1000, + + "texturePath": "textures/rect-white.png", + "textureSize": [ 5, 5 ], + + "gravity": [ 0, -100, 0 ], + + "spawnRange_system": "PARTICLE_EFFECT", + + "spawnTotal": + { + "interpolation": "LINEAR_SPLINE", + "timeline": + [ + { + "t": 0.000, + "value": 0 + }, + { + "t": 1.000, + "value": 5 + } + ] + }, + + "spawnRange": + { + "value": [ 0, 0, 360, 180 ] + }, + + "lifeTime": + { + "min": 10, + "max": 10 + }, + + "coords_system": "PARTICLE_BIRTH", + "coords_axis_system": "PARTICLE_BIRTH", + "offset_axis_system": "PARTICLE_ITSELF", + "rotation_system": "PARTICLE_ITSELF", + + "coords": + { + "interpolation": "LINEAR_SPLINE", + "timeline": + [ + { + "t": 0.000, + "value": [ 0, 0, 0 ] + }, + { + "t": 1.000, + "min": [ 150, 0, 0 ], + "max": [ 300, 0, 0 ] + } + ] + }, + + "rotation": + { + "interpolation": "LINEAR_SPLINE", + "timeOffset": + { + "min": 0, + "max": 1 + }, + "timelineType": "LOOPED", + "timeline": + [ + { + "t": 0.000, + "value": [ 0, 45, 0 ] + }, + { + "t": 1.000, + "value": [ 360, 45, 0 ] + } + ] + }, + + "scale": + { + "interpolation": "DISCRETE", + "timeline": + [ + { + "min": 1, + "max": 2 + } + ] + }, + + "color": + { + "value": [ 1, 0, 0, 1 ] + } + }, + { + "name": "Magic Star", + + "maxParticles": 10000, + "preloading": 1000, + + "texturePath": "textures/circle-white.png", + "textureSize": [ 5, 5 ], + + "gravity": [ 0, -100, 0 ], + + "spawnRange_system": "PARTICLE_EFFECT", + + "spawnTotal": + { + "interpolation": "LINEAR_SPLINE", + "timeline": + [ + { + "t": 0.000, + "value": 0 + }, + { + "t": 1.000, + "value": 5 + } + ] + }, + + "spawnRange": + { + "value": [ 0, 0, 360, 180 ] + }, + + "lifeTime": + { + "min": 10, + "max": 10 + }, + + "coords_system": "PARTICLE_BIRTH", + "coords_axis_system": "PARTICLE_BIRTH", + "offset_axis_system": "PARTICLE_ITSELF", + "rotation_system": "PARTICLE_ITSELF", + + "coords": + { + "interpolation": "LINEAR_SPLINE", + "timeline": + [ + { + "t": 0.000, + "value": [ 0, 0, 0 ] + }, + { + "t": 1.000, + "min": [ 150, 0, 0 ], + "max": [ 300, 0, 0 ] + } + ] + }, + + "rotation": + { + "interpolation": "LINEAR_SPLINE", + "timeOffset": + { + "min": 0, + "max": 1 + }, + "timelineType": "LOOPED", + "timeline": + [ + { + "t": 0.000, + "value": [ 0, 45, 0 ] + }, + { + "t": 1.000, + "value": [ 360, 45, 0 ] + } + ] + }, + + "scale": + { + "interpolation": "DISCRETE", + "timeline": + [ + { + "min": 1, + "max": 2 + } + ] + }, + + "color": + { + "value": [ 0, 0, 1, 1 ] + } + }, + { + "name": "Magic Star", + + "maxParticles": 10000, + "preloading": 1000, + + "texturePath": "textures/star-white.png", + "textureSize": [ 5, 5 ], + + "gravity": [ 0, -100, 0 ], + + "spawnRange_system": "PARTICLE_EFFECT", + + "spawnTotal": + { + "interpolation": "LINEAR_SPLINE", + "timeline": + [ + { + "t": 0.000, + "value": 0 + }, + { + "t": 1.000, + "value": 5 + } + ] + }, + + "spawnRange": + { + "value": [ 0, 0, 360, 180 ] + }, + + "lifeTime": + { + "min": 10, + "max": 10 + }, + + "coords_system": "PARTICLE_BIRTH", + "coords_axis_system": "PARTICLE_BIRTH", + "offset_axis_system": "PARTICLE_ITSELF", + "rotation_system": "PARTICLE_ITSELF", + + "coords": + { + "interpolation": "LINEAR_SPLINE", + "timeline": + [ + { + "t": 0.000, + "value": [ 0, 0, 0 ] + }, + { + "t": 1.000, + "min": [ 150, 0, 0 ], + "max": [ 300, 0, 0 ] + } + ] + }, + + "rotation": + { + "interpolation": "LINEAR_SPLINE", + "timeOffset": + { + "min": 0, + "max": 1 + }, + "timelineType": "LOOPED", + "timeline": + [ + { + "t": 0.000, + "value": [ 0, 45, 0 ] + }, + { + "t": 1.000, + "value": [ 360, 45, 0 ] + } + ] + }, + + "scale": + { + "interpolation": "DISCRETE", + "timeline": + [ + { + "min": 1, + "max": 2 + } + ] + }, + + "color": + { + "value": [ 1, 1, 0, 1 ] + } + }, + { + "name": "Magic Star", + + "maxParticles": 10000, + "preloading": 1000, + + "texturePath": "textures/rect-white.png", + "textureSize": [ 5, 5 ], + + "gravity": [ 0, -100, 0 ], + + "spawnRange_system": "PARTICLE_EFFECT", + + "spawnTotal": + { + "interpolation": "LINEAR_SPLINE", + "timeline": + [ + { + "t": 0.000, + "value": 0 + }, + { + "t": 1.000, + "value": 5 + } + ] + }, + + "spawnRange": + { + "value": [ 0, 0, 360, 180 ] + }, + + "lifeTime": + { + "min": 10, + "max": 10 + }, + + "coords_system": "PARTICLE_BIRTH", + "coords_axis_system": "PARTICLE_BIRTH", + "offset_axis_system": "PARTICLE_ITSELF", + "rotation_system": "PARTICLE_ITSELF", + + "coords": + { + "interpolation": "LINEAR_SPLINE", + "timeline": + [ + { + "t": 0.000, + "value": [ 0, 0, 0 ] + }, + { + "t": 1.000, + "min": [ 150, 0, 0 ], + "max": [ 300, 0, 0 ] + } + ] + }, + + "rotation": + { + "interpolation": "LINEAR_SPLINE", + "timeOffset": + { + "min": 0, + "max": 1 + }, + "timelineType": "LOOPED", + "timeline": + [ + { + "t": 0.000, + "value": [ 0, 45, 0 ] + }, + { + "t": 1.000, + "value": [ 360, 45, 0 ] + } + ] + }, + + "scale": + { + "interpolation": "DISCRETE", + "timeline": + [ + { + "min": 1, + "max": 2 + } + ] + }, + + "color": + { + "value": [ 0, 1, 1, 1 ] + } + }, + { + "name": "Magic Star", + + "maxParticles": 10000, + "preloading": 1000, + + "texturePath": "textures/circle-white.png", + "textureSize": [ 5, 5 ], + + "gravity": [ 0, -100, 0 ], + + "spawnRange_system": "PARTICLE_EFFECT", + + "spawnTotal": + { + "interpolation": "LINEAR_SPLINE", + "timeline": + [ + { + "t": 0.000, + "value": 0 + }, + { + "t": 1.000, + "value": 5 + } + ] + }, + + "spawnRange": + { + "value": [ 0, 0, 360, 180 ] + }, + + "lifeTime": + { + "min": 10, + "max": 10 + }, + + "coords_system": "PARTICLE_BIRTH", + "coords_axis_system": "PARTICLE_BIRTH", + "offset_axis_system": "PARTICLE_ITSELF", + "rotation_system": "PARTICLE_ITSELF", + + "coords": + { + "interpolation": "LINEAR_SPLINE", + "timeline": + [ + { + "t": 0.000, + "value": [ 0, 0, 0 ] + }, + { + "t": 1.000, + "min": [ 150, 0, 0 ], + "max": [ 300, 0, 0 ] + } + ] + }, + + "rotation": + { + "interpolation": "LINEAR_SPLINE", + "timeOffset": + { + "min": 0, + "max": 1 + }, + "timelineType": "LOOPED", + "timeline": + [ + { + "t": 0.000, + "value": [ 0, 45, 0 ] + }, + { + "t": 1.000, + "value": [ 360, 45, 0 ] + } + ] + }, + + "scale": + { + "interpolation": "DISCRETE", + "timeline": + [ + { + "min": 1, + "max": 2 + } + ] + }, + + "color": + { + "value": [ 1, 0, 1, 1 ] + } + } + ] +} \ No newline at end of file diff --git a/assets/shaders/color-shader.fragment b/assets/shaders/color-shader.fragment new file mode 100755 index 0000000..3741a4a --- /dev/null +++ b/assets/shaders/color-shader.fragment @@ -0,0 +1,8 @@ +precision mediump float; + +uniform vec4 Color; + +void main() +{ + gl_FragColor = Color; +} \ No newline at end of file diff --git a/assets/shaders/color-shader.vertex b/assets/shaders/color-shader.vertex new file mode 100755 index 0000000..5f66f46 --- /dev/null +++ b/assets/shaders/color-shader.vertex @@ -0,0 +1,8 @@ +attribute vec3 vPosition; + +uniform mat4 ProjectionMatrix; + +void main() +{ + gl_Position = ProjectionMatrix * vec4(vPosition.xyz, 1.0); +} \ No newline at end of file diff --git a/assets/shaders/particle-shader.fragment b/assets/shaders/particle-shader.fragment new file mode 100755 index 0000000..b4a6521 --- /dev/null +++ b/assets/shaders/particle-shader.fragment @@ -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; +} \ No newline at end of file diff --git a/assets/shaders/particle-shader.vertex b/assets/shaders/particle-shader.vertex new file mode 100755 index 0000000..f9a7261 --- /dev/null +++ b/assets/shaders/particle-shader.vertex @@ -0,0 +1,15 @@ +attribute vec3 vPosition; +attribute vec2 vTexCoord; +attribute vec4 vColor; + +out vec2 texCoord; +flat out vec4 color; + +uniform mat4 ProjectionMatrix; + +void main() +{ + gl_Position = ProjectionMatrix * vec4(vPosition.xyz, 1.0); + texCoord = vTexCoord; + color = vColor; +} \ No newline at end of file diff --git a/assets/shaders/texture-shader.fragment b/assets/shaders/texture-shader.fragment new file mode 100755 index 0000000..3778d11 --- /dev/null +++ b/assets/shaders/texture-shader.fragment @@ -0,0 +1,10 @@ +precision mediump float; + +varying vec2 texCoord; + +uniform sampler2D Texture; + +void main() +{ + gl_FragColor = texture2D(Texture,texCoord); +} \ No newline at end of file diff --git a/assets/shaders/texture-shader.vertex b/assets/shaders/texture-shader.vertex new file mode 100755 index 0000000..db9ad25 --- /dev/null +++ b/assets/shaders/texture-shader.vertex @@ -0,0 +1,12 @@ +attribute vec3 vPosition; +attribute vec2 vTexCoord; + +varying vec2 texCoord; + +uniform mat4 ProjectionMatrix; + +void main() +{ + gl_Position = ProjectionMatrix * vec4(vPosition.xyz, 1.0); + texCoord = vTexCoord; +} \ No newline at end of file diff --git a/assets/textures/circle-white.png b/assets/textures/circle-white.png new file mode 100755 index 0000000..cdb82ad Binary files /dev/null and b/assets/textures/circle-white.png differ diff --git a/assets/textures/comet-white.png b/assets/textures/comet-white.png new file mode 100755 index 0000000..1ee1203 Binary files /dev/null and b/assets/textures/comet-white.png differ diff --git a/assets/textures/comet.png b/assets/textures/comet.png new file mode 100755 index 0000000..e6b6f8f Binary files /dev/null and b/assets/textures/comet.png differ diff --git a/assets/textures/magic-star-big.png b/assets/textures/magic-star-big.png new file mode 100755 index 0000000..a6acd45 Binary files /dev/null and b/assets/textures/magic-star-big.png differ diff --git a/assets/textures/magic-star.png b/assets/textures/magic-star.png new file mode 100755 index 0000000..218f96d Binary files /dev/null and b/assets/textures/magic-star.png differ diff --git a/assets/textures/rect-white.png b/assets/textures/rect-white.png new file mode 100755 index 0000000..1dbcfb0 Binary files /dev/null and b/assets/textures/rect-white.png differ diff --git a/assets/textures/spark-white.png b/assets/textures/spark-white.png new file mode 100755 index 0000000..8444c1b Binary files /dev/null and b/assets/textures/spark-white.png differ diff --git a/assets/textures/spark.png b/assets/textures/spark.png new file mode 100755 index 0000000..f726477 Binary files /dev/null and b/assets/textures/spark.png differ diff --git a/assets/textures/star-white.png b/assets/textures/star-white.png new file mode 100755 index 0000000..938d0b6 Binary files /dev/null and b/assets/textures/star-white.png differ diff --git a/assets/textures/star-with-tail-big.png b/assets/textures/star-with-tail-big.png new file mode 100755 index 0000000..630ad9c Binary files /dev/null and b/assets/textures/star-with-tail-big.png differ diff --git a/assets/textures/star-with-tail-white.png b/assets/textures/star-with-tail-white.png new file mode 100755 index 0000000..093b747 Binary files /dev/null and b/assets/textures/star-with-tail-white.png differ diff --git a/assets/textures/star-with-tail.png b/assets/textures/star-with-tail.png new file mode 100755 index 0000000..189781e Binary files /dev/null and b/assets/textures/star-with-tail.png differ diff --git a/game/gamecode.cpp b/game/gamecode.cpp index 38b499c..2d8a6d9 100644 --- a/game/gamecode.cpp +++ b/game/gamecode.cpp @@ -761,7 +761,7 @@ void TGameLevel::Draw() Renderer->ScaleMatrix(scale); Renderer->TranslateMatrix(-Vector3f(Renderer->GetMatrixWidth() * 0.5f, Renderer->GetMatrixHeight() * 0.5f, 0)); glBindTexture(GL_TEXTURE_2D,ResourceManager->TexList[LevelScreenTexture]); - Renderer->DrawRect(Vector2f(xlOffset, ylOffset), Vector2f(xlOffset+tSW, ylOffset+tSH)); // Game Screen Scale + Renderer->DrawRect(Vector2f(xlOffset, ylOffset), Vector2f(xlOffset+tSW, ylOffset+tSH), Vector2f (0.f,0.f), Vector2f(1.f,1.f)); // Game Screen Scale Renderer->PopMatrix(); CheckGlError(); return; @@ -805,7 +805,7 @@ void TGameLevel::Draw() } glBindTexture(GL_TEXTURE_2D,ResourceManager->TexList[BkgTexture]); - Renderer->DrawRect(Vector2f(xlOffset, ylOffset), Vector2f(xlOffset+tSW, ylOffset+tSH)); + Renderer->DrawRect(Vector2f(xlOffset, ylOffset), Vector2f(xlOffset+tSW, ylOffset+tSH),Vector2f(0.f, 0.f), Vector2f(1.f, 1.f)); std::list::iterator iBall; @@ -846,22 +846,22 @@ void TGameLevel::Draw() glBindTexture(GL_TEXTURE_2D,ResourceManager->TexList[CONST_REFLECTOR_TEXTURE]); float xRW = 210.f * tSW/700.f; // x Reflector Width float yRH = 45.f * tSH/480.f; // y Reflector Height - Renderer->DrawRect(Vector2f(-xRW*0.5f, -yRH*0.5f)+ReflectorPos, Vector2f(xRW*0.5f, yRH*0.5f)+ReflectorPos); + Renderer->DrawRect(Vector2f(-xRW*0.5f, -yRH*0.5f)+ReflectorPos, Vector2f(xRW*0.5f, yRH*0.5f)+ReflectorPos, Vector2f(0.f, 0.f), Vector2f(1.f, 1.f)); const Vector2f wallUpPos1(xlOffset, tSH-ylOffset-uWTW); const Vector2f wallUpPos2(tSW + xlOffset, tSH-ylOffset); glBindTexture(GL_TEXTURE_2D,ResourceManager->TexList[CONST_WALL_UP_TEXTURE]); - Renderer->DrawRect(wallUpPos1, wallUpPos2); + Renderer->DrawRect(wallUpPos1, wallUpPos2, Vector2f(0.f, 0.f), Vector2f(1.f, 1.f)); const Vector2f wallLeftPos1(xlOffset, lrFBO+ylOffset); const Vector2f wallLeftPos2(lWTW + xlOffset, tSH-ylOffset-uWTW); glBindTexture(GL_TEXTURE_2D,ResourceManager->TexList[CONST_WALL_LEFT_TEXTURE]); - Renderer->DrawRect(wallLeftPos1, wallLeftPos2); + Renderer->DrawRect(wallLeftPos1, wallLeftPos2, Vector2f(0.f, 0.f), Vector2f(1.f, 1.f)); const Vector2f wallRightPos1(tSW+xlOffset-rWTW, lrFBO+ylOffset); const Vector2f wallRightPos2(tSW + xlOffset, tSH-ylOffset-uWTW); glBindTexture(GL_TEXTURE_2D,ResourceManager->TexList[CONST_WALL_RIGHT_TEXTURE]); - Renderer->DrawRect(wallRightPos1, wallRightPos2); + Renderer->DrawRect(wallRightPos1, wallRightPos2, Vector2f(0.f, 0.f), Vector2f(1.f, 1.f)); if (BonusFloorTimer>0.f) @@ -873,7 +873,7 @@ void TGameLevel::Draw() const Vector2f wallBonusPos1(bWTO + xlOffset, ylOffset + wallDownPos(1) - bWTW*0.5f); const Vector2f wallBonusPos2(tSW + xlOffset - bWTO, ylOffset + wallDownPos(1) + bWTW*0.5f); - Renderer->DrawRect(wallBonusPos1, wallBonusPos2); + Renderer->DrawRect(wallBonusPos1, wallBonusPos2, Vector2f(0.f, 0.f), Vector2f(1.f, 1.f)); } diff --git a/game/main_code.cpp b/game/main_code.cpp index b2c1c70..5e0d1c0 100644 --- a/game/main_code.cpp +++ b/game/main_code.cpp @@ -8,6 +8,7 @@ #include "menucode.h" #include "main_code.h" +#include boost::signals2::signal OnTapUpSignal; boost::signals2::signal OnTapUpAfterMoveSignal; @@ -96,6 +97,7 @@ void TMyApplication::InnerInit() ResourceManager->TexList.AddTexture("console_bkg.bmp"); + ResourceManager->FrameManager.AddFrameRenderBuffer("LevelBuffer", 512, 512); OnDrawSignal.connect(boost::bind(&TGameLoading::Draw, boost::ref(GameLoading))); @@ -106,6 +108,7 @@ void TMyApplication::InnerInit() Renderer->SetFullScreenViewport(); Application->SetGameLevelScreenScale(); //GameLevel.SetLevelScale(); + } void TMyApplication::InnerDeinit() @@ -324,6 +327,7 @@ void TMyApplication::InnerDraw() { glDisable(GL_DEPTH_TEST); + sparkler.draw(); OnDrawSignal(); @@ -377,6 +381,7 @@ void TMyApplication::InnerUpdate(size_t dt) { //*SE::Console << "4CONST_GAMESTATE_MENU"; Menu.Update(dt); + } else if (GameState == CONST_GAMESTATE_FROM_MENU_TO_LEVEL) { @@ -522,4 +527,20 @@ float TMyApplication::GetGameLevelScreenWidth() float TMyApplication::GetGameLevelScreenHeight() { return levelScreenHeight; -} \ No newline at end of file +} + +void TMyApplication::InnerOnMouseDown(TMouseState& mouseState) { + /* + if (mouseState.LeftButtonPressed) { + if ((float)mouseState.X >= (Renderer->GetScreenWidth())*0.25f && (float)mouseState.X <= (Renderer->GetScreenWidth())*0.75f && (float)mouseState.Y >= (Renderer->GetScreenHeight())*0.25f && (float)mouseState.Y <= (Renderer->GetScreenHeight())*0.75f) { + // some tmp code + Application->GoFromMenuToGame(1); + } + } + */ + OnTapDownSignal(Vector2f(mouseState.X, ((Renderer->GetScreenHeight()) - mouseState.Y))); // Temporary mouse down action for WIN32 +} + +void TMyApplication::InnerOnMouseMove(TMouseState& mouseState) { + +} diff --git a/game/main_code.h b/game/main_code.h index 0f1809e..383ea87 100644 --- a/game/main_code.h +++ b/game/main_code.h @@ -90,7 +90,7 @@ class TMyApplication : public TApplication protected: int levelScreenWidth; int levelScreenHeight; - float levelScreenRatio = 1.5f; + float levelScreenRatio = 1.6; TGameMenu Menu; TGameLevel GameLevel; @@ -114,6 +114,12 @@ protected: void ApplySignalsToCredits(); void DisapplySignalsToCredits(); + // Mouse new methods + virtual void InnerOnMouseDown(TMouseState& mouseState); + virtual void InnerOnMouseMove(TMouseState& mouseState); + + ParticleEffect sparkler; + public: bool Loaded; @@ -160,6 +166,10 @@ public: extern TMyApplication* Application; - +class TMySalmonRenderer : public TSalmonRenderer +{ +public: + void DrawRect(const Vector2f& p1, const Vector2f& p2); +}; #endif diff --git a/game/menucode.cpp b/game/menucode.cpp index ffb9ce5..675136e 100644 --- a/game/menucode.cpp +++ b/game/menucode.cpp @@ -1,6 +1,7 @@ #include "menucode.h" #include "main_code.h" + const float CONST_SPEED_NEG_ACCELERATION_K = 0.03f; const float CONST_MENU_POS_K = 0.25f; @@ -135,7 +136,7 @@ void TGameMenu::OnTapDown(Vector2f pos) { *SE::Console << "TGameMenu::OnTapDown"; HoldToTap = true; - + if (pos(1)<64.f && pos(0)>=265.f-128.f && pos(0)<=265.f+128.f) { Application->GoFromMenuToCredits(); @@ -172,6 +173,11 @@ void TGameMenu::OnTapUp(Vector2f pos) *SE::Console << "TGameMenu::OnTapUp"; HoldToTap = false; + std::fstream tapLog; + tapLog.open("tapLog.txt", std::ios::app); + tapLog << "Tapped up:: " << pos(0) << " " << pos(1) << endl; + tapLog.close(); + if (SelectedGame != -1) { MenuPos = -CONST_MENU_WINDOW_DISTANCE*SelectedGame-40.f; diff --git a/windows/DoubleHitBalls-win/DoubleHitBalls-win/tapLog.txt b/windows/DoubleHitBalls-win/DoubleHitBalls-win/tapLog.txt new file mode 100755 index 0000000..18068be --- /dev/null +++ b/windows/DoubleHitBalls-win/DoubleHitBalls-win/tapLog.txt @@ -0,0 +1,37 @@ +Tapped up:: 445 35Tapped up:: 638 34Tapped up:: 582 87Tapped up:: 282 45 +Tapped up:: 602 49 +Tapped up:: 314 93 +Tapped up:: 434 12 +Tapped up:: 410 26 +Tapped up:: 398 21 +Tapped up:: 264 269 +Tapped up:: 286 218 +Tapped up:: 286 17 +Tapped up:: 286 17 +Tapped up:: 186 36 +Tapped up:: 266 95 +Tapped up:: 306 169 +Tapped up:: 234 257 +Tapped up:: 539 47 +Tapped up:: 523 361 +Tapped up:: 367 345 +Tapped up:: 5 4 +Tapped up:: 785 10 +Tapped up:: 777 468 +Tapped up:: 11 473 +Tapped up:: 19 12 +Tapped up:: 783 11 +Tapped up:: 780 468 +Tapped up:: 13 471 +Tapped up:: 406 240 +Tapped up:: 10 13 +Tapped up:: 786 10 +Tapped up:: 784 468 +Tapped up:: 8 471 +Tapped up:: 410 241 +Tapped up:: 304 160 +Tapped up:: 352 184 +Tapped up:: 277 135 +Tapped up:: 337 145 +Tapped up:: 274 106 +Tapped up:: 548 155 diff --git a/windows/DoubleHitBalls-win/DoubleHitBalls-win/tapLog_down.txt b/windows/DoubleHitBalls-win/DoubleHitBalls-win/tapLog_down.txt new file mode 100755 index 0000000..a83fffa --- /dev/null +++ b/windows/DoubleHitBalls-win/DoubleHitBalls-win/tapLog_down.txt @@ -0,0 +1,46 @@ +Tapped down::Before_signal +10 467 +Tapped down::After_signal +10 13 +Tapped down::Before_signal +786 470 +Tapped down::After_signal +786 10 +Tapped down::Before_signal +784 12 +Tapped down::After_signal +784 468 +Tapped down::Before_signal +8 9 +Tapped down::After_signal +8 471 +Tapped down::Before_signal +410 239 +Tapped down::After_signal +410 241 +Tapped down::Before_signal +230 351 +Tapped down::After_signal +230 129 +Tapped down::Before_signal +233 461 +Tapped down::After_signal +233 19 +Tapped down::Before_signal +295 179 +Tapped down::Before_signal +304 320 +Tapped down::After_signal +304 160 +Tapped down::Before_signal +383 419 +Tapped down::Before_signal +374 71 +Tapped down::Before_signal +240 424 +Tapped down::Before_signal +259 261 +Tapped down::Before_signal +390 51 +Tapped down::Before_signal +245 400