mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2025-10-30 08:11:25 +00:00
particle fix
This commit is contained in:
parent
361a98aa31
commit
44cd5011e3
2 changed files with 5 additions and 5 deletions
|
|
@ -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],
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue