David Catuhe 7 년 전
부모
커밋
c0fa3b6546
5개의 변경된 파일19212개의 추가작업 그리고 28843개의 파일을 삭제
  1. 19133 28646
      dist/preview release/babylon.d.ts
  2. 23 74
      dist/preview release/babylon.js
  3. 16 24
      dist/preview release/babylon.max.js
  4. 24 75
      dist/preview release/babylon.worker.js
  5. 16 24
      dist/preview release/es6.js

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 19133 - 28646
dist/preview release/babylon.d.ts


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 23 - 74
dist/preview release/babylon.js


+ 16 - 24
dist/preview release/babylon.max.js

@@ -51245,7 +51245,6 @@ var BABYLON;
             this._stopped = false;
             this._actualFrame = 0;
             this._vertexBufferSize = 11;
-            this._isEmitting = false;
             // start of sub system methods
             /**
              * "Recycles" one of the particle by copying it back to the "stock" of particles and removing it from the active list.
@@ -51270,21 +51269,6 @@ var BABYLON;
                 }
                 return particle;
             };
-            // to be overriden by subSystems
-            this._stoppedEmitting = function () {
-                if (!_this._rootParticleSystem) {
-                    return;
-                }
-                if (!_this.subEmitters || _this.subEmitters.length === 0) {
-                    _this._scene._toBeDisposed.push(_this);
-                    return;
-                }
-                var index = _this._rootParticleSystem.activeSubSystems.indexOf(_this, 0);
-                if (index > -1) {
-                    _this._rootParticleSystem.activeSubSystems.splice(index, 1);
-                    _this._scene._toBeDisposed.push(_this);
-                }
-            };
             this._emitFromParticle = function (particle) {
                 if (!_this.subEmitters || _this.subEmitters.length === 0) {
                     return;
@@ -51575,23 +51559,27 @@ var BABYLON;
             this._vertexData[offset + 11] = particle.cellIndex;
         };
         ParticleSystem.prototype._stopSubEmitters = function () {
+            if (!this.activeSubSystems) {
+                return;
+            }
             this.activeSubSystems.forEach(function (subSystem) {
                 subSystem.stop(true);
-                subSystem._stoppedEmitting();
             });
             this.activeSubSystems = new Array();
         };
+        ParticleSystem.prototype._removeFromRoot = function () {
+            if (!this._rootParticleSystem) {
+                return;
+            }
+            var index = this._rootParticleSystem.activeSubSystems.indexOf(this);
+            if (index !== -1) {
+                this._rootParticleSystem.activeSubSystems.splice(index, 1);
+            }
+        };
         // end of sub system methods
         ParticleSystem.prototype._update = function (newParticles) {
             // Update current
             this._alive = this._particles.length > 0;
-            if (this._alive) {
-                this._isEmitting = true;
-            }
-            if (!this._alive && this._isEmitting) {
-                this._isEmitting = false;
-                this._stoppedEmitting();
-            }
             this.updateFunction(this._particles);
             // Add new ones
             var worldMatrix;
@@ -51731,6 +51719,9 @@ var BABYLON;
             if (this._vertexBuffer) {
                 this._vertexBuffer.update(this._vertexData);
             }
+            if (this.manualEmitCount === 0 && this.disposeOnStop) {
+                this.stop();
+            }
         };
         ParticleSystem.prototype._appenedParticleVertexesWithSheet = function (offset, particle) {
             this._appendParticleVertexWithAnimation(offset++, particle, 0, 0);
@@ -51817,6 +51808,7 @@ var BABYLON;
                 this.particleTexture.dispose();
                 this.particleTexture = null;
             }
+            this._removeFromRoot();
             // Remove from scene
             var index = this._scene.particleSystems.indexOf(this);
             if (index > -1) {

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 24 - 75
dist/preview release/babylon.worker.js


+ 16 - 24
dist/preview release/es6.js

@@ -51218,7 +51218,6 @@ var BABYLON;
             this._stopped = false;
             this._actualFrame = 0;
             this._vertexBufferSize = 11;
-            this._isEmitting = false;
             // start of sub system methods
             /**
              * "Recycles" one of the particle by copying it back to the "stock" of particles and removing it from the active list.
@@ -51243,21 +51242,6 @@ var BABYLON;
                 }
                 return particle;
             };
-            // to be overriden by subSystems
-            this._stoppedEmitting = function () {
-                if (!_this._rootParticleSystem) {
-                    return;
-                }
-                if (!_this.subEmitters || _this.subEmitters.length === 0) {
-                    _this._scene._toBeDisposed.push(_this);
-                    return;
-                }
-                var index = _this._rootParticleSystem.activeSubSystems.indexOf(_this, 0);
-                if (index > -1) {
-                    _this._rootParticleSystem.activeSubSystems.splice(index, 1);
-                    _this._scene._toBeDisposed.push(_this);
-                }
-            };
             this._emitFromParticle = function (particle) {
                 if (!_this.subEmitters || _this.subEmitters.length === 0) {
                     return;
@@ -51548,23 +51532,27 @@ var BABYLON;
             this._vertexData[offset + 11] = particle.cellIndex;
         };
         ParticleSystem.prototype._stopSubEmitters = function () {
+            if (!this.activeSubSystems) {
+                return;
+            }
             this.activeSubSystems.forEach(function (subSystem) {
                 subSystem.stop(true);
-                subSystem._stoppedEmitting();
             });
             this.activeSubSystems = new Array();
         };
+        ParticleSystem.prototype._removeFromRoot = function () {
+            if (!this._rootParticleSystem) {
+                return;
+            }
+            var index = this._rootParticleSystem.activeSubSystems.indexOf(this);
+            if (index !== -1) {
+                this._rootParticleSystem.activeSubSystems.splice(index, 1);
+            }
+        };
         // end of sub system methods
         ParticleSystem.prototype._update = function (newParticles) {
             // Update current
             this._alive = this._particles.length > 0;
-            if (this._alive) {
-                this._isEmitting = true;
-            }
-            if (!this._alive && this._isEmitting) {
-                this._isEmitting = false;
-                this._stoppedEmitting();
-            }
             this.updateFunction(this._particles);
             // Add new ones
             var worldMatrix;
@@ -51704,6 +51692,9 @@ var BABYLON;
             if (this._vertexBuffer) {
                 this._vertexBuffer.update(this._vertexData);
             }
+            if (this.manualEmitCount === 0 && this.disposeOnStop) {
+                this.stop();
+            }
         };
         ParticleSystem.prototype._appenedParticleVertexesWithSheet = function (offset, particle) {
             this._appendParticleVertexWithAnimation(offset++, particle, 0, 0);
@@ -51790,6 +51781,7 @@ var BABYLON;
                 this.particleTexture.dispose();
                 this.particleTexture = null;
             }
+            this._removeFromRoot();
             // Remove from scene
             var index = this._scene.particleSystems.indexOf(this);
             if (index > -1) {