From 44cd5011e34c613dda47698d4f4325c7ad67d47b Mon Sep 17 00:00:00 2001 From: RandomityGuy <31925790+RandomityGuy@users.noreply.github.com> Date: Sun, 26 May 2024 13:59:18 +0530 Subject: [PATCH] particle fix --- src/Marble.hx | 6 +++--- src/ParticleSystem.hx | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Marble.hx b/src/Marble.hx index 9d1098cd..f69ecc19 100644 --- a/src/Marble.hx +++ b/src/Marble.hx @@ -100,11 +100,11 @@ final bounceParticleOptions:ParticleEmitterOptions = { spinRandomMax: 90, lifetime: 400, lifetimeVariance: 50, - dragCoefficient: 0.5, + dragCoefficient: 0, acceleration: -2, colors: [ - new Vector(0.5, 0.5, 0.5, 0.3), - new Vector(0.3, 0.3, 0.2, 0.1), + new Vector(0.5, 0.5, 0.5, 0.6), + new Vector(0.3, 0.3, 0.2, 0.4), new Vector(0.2, 0.2, 0.1, 0) ], sizes: [0.8, 0.4, 0.2], diff --git a/src/ParticleSystem.hx b/src/ParticleSystem.hx index 58a9004f..af38d75b 100644 --- a/src/ParticleSystem.hx +++ b/src/ParticleSystem.hx @@ -137,8 +137,7 @@ class Particle { var t = (completion - this.o.times[indexLow]) / (this.o.times[indexHigh] - this.o.times[indexLow]); // Adjust color - var color = Util.lerpThreeVectors(this.o.colors[indexLow], this.o.colors[indexHigh], t); - this.color = color; + this.color = Util.lerpThreeVectors(this.o.colors[indexLow], this.o.colors[indexHigh], t); // this.material.opacity = color.a * * 1.5; // Adjusted because additive mixing can be kind of extreme // Adjust sizing @@ -150,6 +149,7 @@ class Particle { this.part.r = this.color.r; this.part.g = this.color.g; this.part.b = this.color.b; + this.part.a = this.color.a; this.part.ratio = 1; this.part.size = this.scale / 2; }