@galacean/engine-core 1.3.20 → 1.3.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +8 -2
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +8 -2
- package/dist/module.js +8 -2
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
package/dist/main.js
CHANGED
|
@@ -30405,7 +30405,12 @@ exports.ParticleStopMode = void 0;
|
|
|
30405
30405
|
};
|
|
30406
30406
|
_proto._render = function _render(context) {
|
|
30407
30407
|
var generator = this.generator;
|
|
30408
|
-
|
|
30408
|
+
// Don't need to render when no particles
|
|
30409
|
+
var aliveParticleCount = generator._getAliveParticleCount();
|
|
30410
|
+
if (!aliveParticleCount) {
|
|
30411
|
+
return;
|
|
30412
|
+
}
|
|
30413
|
+
generator._primitive.instanceCount = aliveParticleCount;
|
|
30409
30414
|
var material = this.getMaterial();
|
|
30410
30415
|
if (!material) {
|
|
30411
30416
|
return;
|
|
@@ -32721,7 +32726,8 @@ __decorate([
|
|
|
32721
32726
|
*/ _proto._emit = function _emit(time, count) {
|
|
32722
32727
|
if (this.emission.enabled) {
|
|
32723
32728
|
// Wait the existing particles to be retired
|
|
32724
|
-
|
|
32729
|
+
var notRetireParticleCount = this._getNotRetiredParticleCount();
|
|
32730
|
+
if (notRetireParticleCount >= this.main.maxParticles) {
|
|
32725
32731
|
return;
|
|
32726
32732
|
}
|
|
32727
32733
|
var position = ParticleGenerator._tempVector30;
|