Browse Source

PreventAutoStart in particle system

Raanan Weber 9 years ago
parent
commit
daf838c251
1 changed files with 4 additions and 3 deletions
  1. 4 3
      src/Particles/babylon.particleSystem.ts

+ 4 - 3
src/Particles/babylon.particleSystem.ts

@@ -465,7 +465,7 @@
             if (this.particleTexture) {
             if (this.particleTexture) {
                 serializationObject.textureName = this.particleTexture.name;
                 serializationObject.textureName = this.particleTexture.name;
             }
             }
-            
+
             // Animations
             // Animations
             Animation.AppendSerializedAnimations(this, serializationObject);
             Animation.AppendSerializedAnimations(this, serializationObject);
 
 
@@ -550,8 +550,9 @@
             particleSystem.targetStopDuration = parsedParticleSystem.targetStopDuration;
             particleSystem.targetStopDuration = parsedParticleSystem.targetStopDuration;
             particleSystem.textureMask = Color4.FromArray(parsedParticleSystem.textureMask);
             particleSystem.textureMask = Color4.FromArray(parsedParticleSystem.textureMask);
             particleSystem.blendMode = parsedParticleSystem.blendMode;
             particleSystem.blendMode = parsedParticleSystem.blendMode;
-            particleSystem.start();
-
+            if (!parsedParticleSystem.preventAutoStart) {
+                particleSystem.start();
+            }
             return particleSystem;
             return particleSystem;
         }
         }
     }
     }