@galacean/engine-core 1.3.21 → 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.
@@ -30361,10 +30361,6 @@ exports.ParticleStopMode = void 0;
30361
30361
  if (!this._supportInstancedArrays) {
30362
30362
  return;
30363
30363
  }
30364
- // Don't need to render when no particles
30365
- if (!this.generator._getAliveParticleCount()) {
30366
- return;
30367
- }
30368
30364
  Renderer1.prototype._prepareRender.call(this, context);
30369
30365
  };
30370
30366
  /**
@@ -30410,7 +30406,12 @@ exports.ParticleStopMode = void 0;
30410
30406
  };
30411
30407
  _proto._render = function _render(context) {
30412
30408
  var generator = this.generator;
30413
- generator._primitive.instanceCount = generator._getAliveParticleCount();
30409
+ // Don't need to render when no particles
30410
+ var aliveParticleCount = generator._getAliveParticleCount();
30411
+ if (!aliveParticleCount) {
30412
+ return;
30413
+ }
30414
+ generator._primitive.instanceCount = aliveParticleCount;
30414
30415
  var material = this.getMaterial();
30415
30416
  if (!material) {
30416
30417
  return;
package/dist/module.js CHANGED
@@ -30356,10 +30356,6 @@ var ParticleStopMode;
30356
30356
  if (!this._supportInstancedArrays) {
30357
30357
  return;
30358
30358
  }
30359
- // Don't need to render when no particles
30360
- if (!this.generator._getAliveParticleCount()) {
30361
- return;
30362
- }
30363
30359
  Renderer1.prototype._prepareRender.call(this, context);
30364
30360
  };
30365
30361
  /**
@@ -30405,7 +30401,12 @@ var ParticleStopMode;
30405
30401
  };
30406
30402
  _proto._render = function _render(context) {
30407
30403
  var generator = this.generator;
30408
- generator._primitive.instanceCount = generator._getAliveParticleCount();
30404
+ // Don't need to render when no particles
30405
+ var aliveParticleCount = generator._getAliveParticleCount();
30406
+ if (!aliveParticleCount) {
30407
+ return;
30408
+ }
30409
+ generator._primitive.instanceCount = aliveParticleCount;
30409
30410
  var material = this.getMaterial();
30410
30411
  if (!material) {
30411
30412
  return;