Needle Engine

Changes between version 3.6.8 and 3.6.9
Files changed (1) hide show
  1. src/engine-components/ParticleSystem.ts +9 -14
src/engine-components/ParticleSystem.ts CHANGED
@@ -323,20 +323,15 @@
323
323
  }
324
324
 
325
325
  update(particle: Particle, _delta: number): void {
326
- if (this.system.renderer.renderMode === ParticleSystemRenderMode.Mesh) {
327
-
328
- }
329
- else {
330
- const age01 = particle.age / particle.life;
331
- let size = 1;
332
- if (this.system.sizeOverLifetime.enabled)
333
- size *= this.system.sizeOverLifetime.evaluate(age01, undefined, particle[$sizeLerpFactor]).x;
334
- const scaleFactor = this.system.worldScale.x / this.system.cameraScale;
335
- particle.size = particle.startSize * size * scaleFactor;
336
- // in Unity this is viewport size, we don't really support this yet (and the renderer is logging a warning)
337
- // so for now it's disabled again
338
- // particle.size = Mathf.clamp(particle.size, this._minSize, this._maxSize);
339
- }
326
+ const age01 = particle.age / particle.life;
327
+ let size = 1;
328
+ if (this.system.sizeOverLifetime.enabled)
329
+ size *= this.system.sizeOverLifetime.evaluate(age01, undefined, particle[$sizeLerpFactor]).x;
330
+ const scaleFactor = this.system.worldScale.x / this.system.cameraScale;
331
+ particle.size = particle.startSize * size * scaleFactor;
332
+ // in Unity this is viewport size, we don't really support this yet (and the renderer is logging a warning)
333
+ // so for now it's disabled again
334
+ // particle.size = Mathf.clamp(particle.size, this._minSize, this._maxSize);
340
335
  }
341
336
  }