@@ -323,20 +323,15 @@
|
|
323
323
|
}
|
324
324
|
|
325
325
|
update(particle: Particle, _delta: number): void {
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
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
|
}
|