@galacean/engine 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/browser.js CHANGED
@@ -35019,7 +35019,12 @@
35019
35019
  };
35020
35020
  _proto._render = function _render(context) {
35021
35021
  var generator = this.generator;
35022
- generator._primitive.instanceCount = generator._getAliveParticleCount();
35022
+ // Don't need to render when no particles
35023
+ var aliveParticleCount = generator._getAliveParticleCount();
35024
+ if (!aliveParticleCount) {
35025
+ return;
35026
+ }
35027
+ generator._primitive.instanceCount = aliveParticleCount;
35023
35028
  var material = this.getMaterial();
35024
35029
  if (!material) {
35025
35030
  return;
@@ -37318,7 +37323,8 @@
37318
37323
  */ _proto._emit = function _emit(time, count) {
37319
37324
  if (this.emission.enabled) {
37320
37325
  // Wait the existing particles to be retired
37321
- if (this.main._maxParticleBuffer < this._currentParticleCount) {
37326
+ var notRetireParticleCount = this._getNotRetiredParticleCount();
37327
+ if (notRetireParticleCount >= this.main.maxParticles) {
37322
37328
  return;
37323
37329
  }
37324
37330
  var position = ParticleGenerator._tempVector30;
@@ -48423,7 +48429,7 @@
48423
48429
  ], EXT_texture_webp);
48424
48430
 
48425
48431
  //@ts-ignore
48426
- var version = "1.3.20";
48432
+ var version = "1.3.22";
48427
48433
  console.log("Galacean engine version: " + version);
48428
48434
  for(var key in CoreObjects){
48429
48435
  Loader.registerClass(key, CoreObjects[key]);