|
@@ -329,7 +329,7 @@
|
|
|
this._updateEffectOptions = {
|
|
|
attributes: ["position", "age", "life", "seed", "size", "color", "direction"],
|
|
|
uniformsNames: ["currentCount", "timeDelta", "generalRandoms", "emitterWM", "lifeTime", "color1", "color2", "sizeRange", "gravity", "emitPower",
|
|
|
- "direction1", "direction2", "minEmitBox", "maxEmitBox", "radius", "directionRandomizer", "height", "angle"],
|
|
|
+ "direction1", "direction2", "minEmitBox", "maxEmitBox", "radius", "directionRandomizer", "height", "angle", "stopFactor"],
|
|
|
uniformBuffersNames: [],
|
|
|
samplers:["randomSampler"],
|
|
|
defines: "",
|
|
@@ -490,8 +490,6 @@
|
|
|
|
|
|
if (this.targetStopDuration && this._actualFrame >= this.targetStopDuration)
|
|
|
this.stop();
|
|
|
- } else {
|
|
|
- this._timeDelta = 0;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -529,6 +527,7 @@
|
|
|
|
|
|
this._updateEffect.setFloat("currentCount", this._currentActiveCount);
|
|
|
this._updateEffect.setFloat("timeDelta", this._timeDelta);
|
|
|
+ this._updateEffect.setFloat("stopFactor", this._stopped ? 0 : 1);
|
|
|
this._updateEffect.setFloat3("generalRandoms", Math.random(), Math.random(), Math.random());
|
|
|
this._updateEffect.setTexture("randomSampler", this._randomTexture);
|
|
|
this._updateEffect.setFloat2("lifeTime", this.minLifeTime, this.maxLifeTime);
|