Pārlūkot izejas kodu

Fix photoDome + minInitialRotation for particles

David Catuhe 7 gadi atpakaļ
vecāks
revīzija
6ae09b82fb

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 2026 - 2013
Playground/babylon.d.txt


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 8234 - 8226
dist/preview release/babylon.d.ts


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 8 - 8
dist/preview release/babylon.js


+ 32 - 5
dist/preview release/babylon.max.js

@@ -55266,6 +55266,14 @@ var BABYLON;
              */
             this.maxScaleY = 1;
             /**
+             * Gets or sets the minimal initial rotation in radians.
+             */
+            this.minInitialRotation = 0;
+            /**
+             * Gets or sets the maximal initial rotation in radians.
+             */
+            this.maxInitialRotation = 0;
+            /**
              * Minimum angular speed of emitting particles (Z-axis rotation for each particle).
              */
             this.minAngularSpeed = 0;
@@ -55877,6 +55885,7 @@ var BABYLON;
                 particle.size = BABYLON.Scalar.RandomRange(this.minSize, this.maxSize);
                 particle.scale.copyFromFloats(BABYLON.Scalar.RandomRange(this.minScaleX, this.maxScaleX), BABYLON.Scalar.RandomRange(this.minScaleY, this.maxScaleY));
                 particle.angularSpeed = BABYLON.Scalar.RandomRange(this.minAngularSpeed, this.maxAngularSpeed);
+                particle.angle = BABYLON.Scalar.RandomRange(this.minInitialRotation, this.maxInitialRotation);
                 if (!this._colorGradients || this._colorGradients.length === 0) {
                     var step = BABYLON.Scalar.RandomRange(0, 1.0);
                     BABYLON.Color4.LerpToRef(this.color1, this.color2, step, particle.color);
@@ -56246,6 +56255,10 @@ var BABYLON;
             serializationObject.blendMode = this.blendMode;
             serializationObject.customShader = this.customShader;
             serializationObject.preventAutoStart = this.preventAutoStart;
+            serializationObject.preWarmCycles = this.preWarmCycles;
+            serializationObject.preWarmStepOffset = this.preWarmStepOffset;
+            serializationObject.minInitialRotation = this.minInitialRotation;
+            serializationObject.maxInitialRotation = this.maxInitialRotation;
             serializationObject.startSpriteCellID = this.startSpriteCellID;
             serializationObject.endSpriteCellID = this.endSpriteCellID;
             serializationObject.spriteCellLoop = this.spriteCellLoop;
@@ -56317,6 +56330,14 @@ var BABYLON;
                 particleSystem.minScaleY = parsedParticleSystem.minScaleY;
                 particleSystem.maxScaleY = parsedParticleSystem.maxScaleY;
             }
+            if (parsedParticleSystem.preWarmCycles !== undefined) {
+                particleSystem.preWarmCycles = parsedParticleSystem.preWarmCycles;
+                particleSystem.preWarmStepOffset = parsedParticleSystem.preWarmStepOffset;
+            }
+            if (parsedParticleSystem.minInitialRotation !== undefined) {
+                particleSystem.minInitialRotation = parsedParticleSystem.minInitialRotation;
+                particleSystem.maxInitialRotation = parsedParticleSystem.maxInitialRotation;
+            }
             particleSystem.minLifeTime = parsedParticleSystem.minLifeTime;
             particleSystem.maxLifeTime = parsedParticleSystem.maxLifeTime;
             particleSystem.minEmitPower = parsedParticleSystem.minEmitPower;
@@ -102084,7 +102105,6 @@ var BABYLON;
             options.size = Math.abs(options.size) || (scene.activeCamera ? scene.activeCamera.maxZ * 0.48 : 1000);
             // create
             var material = _this._material = new BABYLON.BackgroundMaterial(name + "_material", scene);
-            var texture = _this._photoTexture = new BABYLON.Texture(urlOfPhoto, scene);
             _this._mesh = BABYLON.MeshBuilder.CreateIcoSphere(name + "_mesh", {
                 flat: false,
                 radius: options.size,
@@ -102092,11 +102112,9 @@ var BABYLON;
                 sideOrientation: BABYLON.Mesh.BACKSIDE // needs to be inside out
             }, scene);
             // configure material
-            texture.coordinatesMode = BABYLON.Texture.FIXED_EQUIRECTANGULAR_MIRRORED_MODE; // matches orientation
-            texture.wrapV = BABYLON.Texture.CLAMP_ADDRESSMODE; // always clamp the up/down
-            material.reflectionTexture = _this._photoTexture;
             material.useEquirectangularFOV = true;
             material.fovMultiplier = 1.0;
+            _this.photoTexture = new BABYLON.Texture(urlOfPhoto, scene);
             // configure mesh
             _this._mesh.material = material;
             _this._mesh.parent = _this;
@@ -102104,11 +102122,20 @@ var BABYLON;
         }
         Object.defineProperty(PhotoDome.prototype, "photoTexture", {
             /**
-             * Gets the texture being displayed on the sphere
+             * Gets or sets the texture being displayed on the sphere
              */
             get: function () {
                 return this._photoTexture;
             },
+            set: function (value) {
+                if (this._photoTexture === value) {
+                    return;
+                }
+                this._photoTexture = value;
+                this._photoTexture.coordinatesMode = BABYLON.Texture.FIXED_EQUIRECTANGULAR_MIRRORED_MODE; // matches orientation
+                this._photoTexture.wrapV = BABYLON.Texture.CLAMP_ADDRESSMODE; // always clamp the up/down            
+                this._material.reflectionTexture = this._photoTexture;
+            },
             enumerable: true,
             configurable: true
         });

+ 32 - 5
dist/preview release/babylon.no-module.max.js

@@ -55233,6 +55233,14 @@ var BABYLON;
              */
             this.maxScaleY = 1;
             /**
+             * Gets or sets the minimal initial rotation in radians.
+             */
+            this.minInitialRotation = 0;
+            /**
+             * Gets or sets the maximal initial rotation in radians.
+             */
+            this.maxInitialRotation = 0;
+            /**
              * Minimum angular speed of emitting particles (Z-axis rotation for each particle).
              */
             this.minAngularSpeed = 0;
@@ -55844,6 +55852,7 @@ var BABYLON;
                 particle.size = BABYLON.Scalar.RandomRange(this.minSize, this.maxSize);
                 particle.scale.copyFromFloats(BABYLON.Scalar.RandomRange(this.minScaleX, this.maxScaleX), BABYLON.Scalar.RandomRange(this.minScaleY, this.maxScaleY));
                 particle.angularSpeed = BABYLON.Scalar.RandomRange(this.minAngularSpeed, this.maxAngularSpeed);
+                particle.angle = BABYLON.Scalar.RandomRange(this.minInitialRotation, this.maxInitialRotation);
                 if (!this._colorGradients || this._colorGradients.length === 0) {
                     var step = BABYLON.Scalar.RandomRange(0, 1.0);
                     BABYLON.Color4.LerpToRef(this.color1, this.color2, step, particle.color);
@@ -56213,6 +56222,10 @@ var BABYLON;
             serializationObject.blendMode = this.blendMode;
             serializationObject.customShader = this.customShader;
             serializationObject.preventAutoStart = this.preventAutoStart;
+            serializationObject.preWarmCycles = this.preWarmCycles;
+            serializationObject.preWarmStepOffset = this.preWarmStepOffset;
+            serializationObject.minInitialRotation = this.minInitialRotation;
+            serializationObject.maxInitialRotation = this.maxInitialRotation;
             serializationObject.startSpriteCellID = this.startSpriteCellID;
             serializationObject.endSpriteCellID = this.endSpriteCellID;
             serializationObject.spriteCellLoop = this.spriteCellLoop;
@@ -56284,6 +56297,14 @@ var BABYLON;
                 particleSystem.minScaleY = parsedParticleSystem.minScaleY;
                 particleSystem.maxScaleY = parsedParticleSystem.maxScaleY;
             }
+            if (parsedParticleSystem.preWarmCycles !== undefined) {
+                particleSystem.preWarmCycles = parsedParticleSystem.preWarmCycles;
+                particleSystem.preWarmStepOffset = parsedParticleSystem.preWarmStepOffset;
+            }
+            if (parsedParticleSystem.minInitialRotation !== undefined) {
+                particleSystem.minInitialRotation = parsedParticleSystem.minInitialRotation;
+                particleSystem.maxInitialRotation = parsedParticleSystem.maxInitialRotation;
+            }
             particleSystem.minLifeTime = parsedParticleSystem.minLifeTime;
             particleSystem.maxLifeTime = parsedParticleSystem.maxLifeTime;
             particleSystem.minEmitPower = parsedParticleSystem.minEmitPower;
@@ -102051,7 +102072,6 @@ var BABYLON;
             options.size = Math.abs(options.size) || (scene.activeCamera ? scene.activeCamera.maxZ * 0.48 : 1000);
             // create
             var material = _this._material = new BABYLON.BackgroundMaterial(name + "_material", scene);
-            var texture = _this._photoTexture = new BABYLON.Texture(urlOfPhoto, scene);
             _this._mesh = BABYLON.MeshBuilder.CreateIcoSphere(name + "_mesh", {
                 flat: false,
                 radius: options.size,
@@ -102059,11 +102079,9 @@ var BABYLON;
                 sideOrientation: BABYLON.Mesh.BACKSIDE // needs to be inside out
             }, scene);
             // configure material
-            texture.coordinatesMode = BABYLON.Texture.FIXED_EQUIRECTANGULAR_MIRRORED_MODE; // matches orientation
-            texture.wrapV = BABYLON.Texture.CLAMP_ADDRESSMODE; // always clamp the up/down
-            material.reflectionTexture = _this._photoTexture;
             material.useEquirectangularFOV = true;
             material.fovMultiplier = 1.0;
+            _this.photoTexture = new BABYLON.Texture(urlOfPhoto, scene);
             // configure mesh
             _this._mesh.material = material;
             _this._mesh.parent = _this;
@@ -102071,11 +102089,20 @@ var BABYLON;
         }
         Object.defineProperty(PhotoDome.prototype, "photoTexture", {
             /**
-             * Gets the texture being displayed on the sphere
+             * Gets or sets the texture being displayed on the sphere
              */
             get: function () {
                 return this._photoTexture;
             },
+            set: function (value) {
+                if (this._photoTexture === value) {
+                    return;
+                }
+                this._photoTexture = value;
+                this._photoTexture.coordinatesMode = BABYLON.Texture.FIXED_EQUIRECTANGULAR_MIRRORED_MODE; // matches orientation
+                this._photoTexture.wrapV = BABYLON.Texture.CLAMP_ADDRESSMODE; // always clamp the up/down            
+                this._material.reflectionTexture = this._photoTexture;
+            },
             enumerable: true,
             configurable: true
         });

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 18 - 18
dist/preview release/babylon.worker.js


+ 32 - 5
dist/preview release/es6.js

@@ -55233,6 +55233,14 @@ var BABYLON;
              */
             this.maxScaleY = 1;
             /**
+             * Gets or sets the minimal initial rotation in radians.
+             */
+            this.minInitialRotation = 0;
+            /**
+             * Gets or sets the maximal initial rotation in radians.
+             */
+            this.maxInitialRotation = 0;
+            /**
              * Minimum angular speed of emitting particles (Z-axis rotation for each particle).
              */
             this.minAngularSpeed = 0;
@@ -55844,6 +55852,7 @@ var BABYLON;
                 particle.size = BABYLON.Scalar.RandomRange(this.minSize, this.maxSize);
                 particle.scale.copyFromFloats(BABYLON.Scalar.RandomRange(this.minScaleX, this.maxScaleX), BABYLON.Scalar.RandomRange(this.minScaleY, this.maxScaleY));
                 particle.angularSpeed = BABYLON.Scalar.RandomRange(this.minAngularSpeed, this.maxAngularSpeed);
+                particle.angle = BABYLON.Scalar.RandomRange(this.minInitialRotation, this.maxInitialRotation);
                 if (!this._colorGradients || this._colorGradients.length === 0) {
                     var step = BABYLON.Scalar.RandomRange(0, 1.0);
                     BABYLON.Color4.LerpToRef(this.color1, this.color2, step, particle.color);
@@ -56213,6 +56222,10 @@ var BABYLON;
             serializationObject.blendMode = this.blendMode;
             serializationObject.customShader = this.customShader;
             serializationObject.preventAutoStart = this.preventAutoStart;
+            serializationObject.preWarmCycles = this.preWarmCycles;
+            serializationObject.preWarmStepOffset = this.preWarmStepOffset;
+            serializationObject.minInitialRotation = this.minInitialRotation;
+            serializationObject.maxInitialRotation = this.maxInitialRotation;
             serializationObject.startSpriteCellID = this.startSpriteCellID;
             serializationObject.endSpriteCellID = this.endSpriteCellID;
             serializationObject.spriteCellLoop = this.spriteCellLoop;
@@ -56284,6 +56297,14 @@ var BABYLON;
                 particleSystem.minScaleY = parsedParticleSystem.minScaleY;
                 particleSystem.maxScaleY = parsedParticleSystem.maxScaleY;
             }
+            if (parsedParticleSystem.preWarmCycles !== undefined) {
+                particleSystem.preWarmCycles = parsedParticleSystem.preWarmCycles;
+                particleSystem.preWarmStepOffset = parsedParticleSystem.preWarmStepOffset;
+            }
+            if (parsedParticleSystem.minInitialRotation !== undefined) {
+                particleSystem.minInitialRotation = parsedParticleSystem.minInitialRotation;
+                particleSystem.maxInitialRotation = parsedParticleSystem.maxInitialRotation;
+            }
             particleSystem.minLifeTime = parsedParticleSystem.minLifeTime;
             particleSystem.maxLifeTime = parsedParticleSystem.maxLifeTime;
             particleSystem.minEmitPower = parsedParticleSystem.minEmitPower;
@@ -102051,7 +102072,6 @@ var BABYLON;
             options.size = Math.abs(options.size) || (scene.activeCamera ? scene.activeCamera.maxZ * 0.48 : 1000);
             // create
             var material = _this._material = new BABYLON.BackgroundMaterial(name + "_material", scene);
-            var texture = _this._photoTexture = new BABYLON.Texture(urlOfPhoto, scene);
             _this._mesh = BABYLON.MeshBuilder.CreateIcoSphere(name + "_mesh", {
                 flat: false,
                 radius: options.size,
@@ -102059,11 +102079,9 @@ var BABYLON;
                 sideOrientation: BABYLON.Mesh.BACKSIDE // needs to be inside out
             }, scene);
             // configure material
-            texture.coordinatesMode = BABYLON.Texture.FIXED_EQUIRECTANGULAR_MIRRORED_MODE; // matches orientation
-            texture.wrapV = BABYLON.Texture.CLAMP_ADDRESSMODE; // always clamp the up/down
-            material.reflectionTexture = _this._photoTexture;
             material.useEquirectangularFOV = true;
             material.fovMultiplier = 1.0;
+            _this.photoTexture = new BABYLON.Texture(urlOfPhoto, scene);
             // configure mesh
             _this._mesh.material = material;
             _this._mesh.parent = _this;
@@ -102071,11 +102089,20 @@ var BABYLON;
         }
         Object.defineProperty(PhotoDome.prototype, "photoTexture", {
             /**
-             * Gets the texture being displayed on the sphere
+             * Gets or sets the texture being displayed on the sphere
              */
             get: function () {
                 return this._photoTexture;
             },
+            set: function (value) {
+                if (this._photoTexture === value) {
+                    return;
+                }
+                this._photoTexture = value;
+                this._photoTexture.coordinatesMode = BABYLON.Texture.FIXED_EQUIRECTANGULAR_MIRRORED_MODE; // matches orientation
+                this._photoTexture.wrapV = BABYLON.Texture.CLAMP_ADDRESSMODE; // always clamp the up/down            
+                this._material.reflectionTexture = this._photoTexture;
+            },
             enumerable: true,
             configurable: true
         });

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 18 - 18
dist/preview release/viewer/babylon.viewer.js


+ 32 - 5
dist/preview release/viewer/babylon.viewer.max.js

@@ -55354,6 +55354,14 @@ var BABYLON;
              */
             this.maxScaleY = 1;
             /**
+             * Gets or sets the minimal initial rotation in radians.
+             */
+            this.minInitialRotation = 0;
+            /**
+             * Gets or sets the maximal initial rotation in radians.
+             */
+            this.maxInitialRotation = 0;
+            /**
              * Minimum angular speed of emitting particles (Z-axis rotation for each particle).
              */
             this.minAngularSpeed = 0;
@@ -55965,6 +55973,7 @@ var BABYLON;
                 particle.size = BABYLON.Scalar.RandomRange(this.minSize, this.maxSize);
                 particle.scale.copyFromFloats(BABYLON.Scalar.RandomRange(this.minScaleX, this.maxScaleX), BABYLON.Scalar.RandomRange(this.minScaleY, this.maxScaleY));
                 particle.angularSpeed = BABYLON.Scalar.RandomRange(this.minAngularSpeed, this.maxAngularSpeed);
+                particle.angle = BABYLON.Scalar.RandomRange(this.minInitialRotation, this.maxInitialRotation);
                 if (!this._colorGradients || this._colorGradients.length === 0) {
                     var step = BABYLON.Scalar.RandomRange(0, 1.0);
                     BABYLON.Color4.LerpToRef(this.color1, this.color2, step, particle.color);
@@ -56334,6 +56343,10 @@ var BABYLON;
             serializationObject.blendMode = this.blendMode;
             serializationObject.customShader = this.customShader;
             serializationObject.preventAutoStart = this.preventAutoStart;
+            serializationObject.preWarmCycles = this.preWarmCycles;
+            serializationObject.preWarmStepOffset = this.preWarmStepOffset;
+            serializationObject.minInitialRotation = this.minInitialRotation;
+            serializationObject.maxInitialRotation = this.maxInitialRotation;
             serializationObject.startSpriteCellID = this.startSpriteCellID;
             serializationObject.endSpriteCellID = this.endSpriteCellID;
             serializationObject.spriteCellLoop = this.spriteCellLoop;
@@ -56405,6 +56418,14 @@ var BABYLON;
                 particleSystem.minScaleY = parsedParticleSystem.minScaleY;
                 particleSystem.maxScaleY = parsedParticleSystem.maxScaleY;
             }
+            if (parsedParticleSystem.preWarmCycles !== undefined) {
+                particleSystem.preWarmCycles = parsedParticleSystem.preWarmCycles;
+                particleSystem.preWarmStepOffset = parsedParticleSystem.preWarmStepOffset;
+            }
+            if (parsedParticleSystem.minInitialRotation !== undefined) {
+                particleSystem.minInitialRotation = parsedParticleSystem.minInitialRotation;
+                particleSystem.maxInitialRotation = parsedParticleSystem.maxInitialRotation;
+            }
             particleSystem.minLifeTime = parsedParticleSystem.minLifeTime;
             particleSystem.maxLifeTime = parsedParticleSystem.maxLifeTime;
             particleSystem.minEmitPower = parsedParticleSystem.minEmitPower;
@@ -102172,7 +102193,6 @@ var BABYLON;
             options.size = Math.abs(options.size) || (scene.activeCamera ? scene.activeCamera.maxZ * 0.48 : 1000);
             // create
             var material = _this._material = new BABYLON.BackgroundMaterial(name + "_material", scene);
-            var texture = _this._photoTexture = new BABYLON.Texture(urlOfPhoto, scene);
             _this._mesh = BABYLON.MeshBuilder.CreateIcoSphere(name + "_mesh", {
                 flat: false,
                 radius: options.size,
@@ -102180,11 +102200,9 @@ var BABYLON;
                 sideOrientation: BABYLON.Mesh.BACKSIDE // needs to be inside out
             }, scene);
             // configure material
-            texture.coordinatesMode = BABYLON.Texture.FIXED_EQUIRECTANGULAR_MIRRORED_MODE; // matches orientation
-            texture.wrapV = BABYLON.Texture.CLAMP_ADDRESSMODE; // always clamp the up/down
-            material.reflectionTexture = _this._photoTexture;
             material.useEquirectangularFOV = true;
             material.fovMultiplier = 1.0;
+            _this.photoTexture = new BABYLON.Texture(urlOfPhoto, scene);
             // configure mesh
             _this._mesh.material = material;
             _this._mesh.parent = _this;
@@ -102192,11 +102210,20 @@ var BABYLON;
         }
         Object.defineProperty(PhotoDome.prototype, "photoTexture", {
             /**
-             * Gets the texture being displayed on the sphere
+             * Gets or sets the texture being displayed on the sphere
              */
             get: function () {
                 return this._photoTexture;
             },
+            set: function (value) {
+                if (this._photoTexture === value) {
+                    return;
+                }
+                this._photoTexture = value;
+                this._photoTexture.coordinatesMode = BABYLON.Texture.FIXED_EQUIRECTANGULAR_MIRRORED_MODE; // matches orientation
+                this._photoTexture.wrapV = BABYLON.Texture.CLAMP_ADDRESSMODE; // always clamp the up/down            
+                this._material.reflectionTexture = this._photoTexture;
+            },
             enumerable: true,
             configurable: true
         });

+ 1 - 0
dist/preview release/what's new.md

@@ -17,6 +17,7 @@
   - Added support for `ParticleSystem.BLENDMODE_ADD` alpha mode. [Doc](http://doc.babylonjs.com/babylon101/particles#particle-blending)
   - Added support for color gradients. [Doc](http://doc.babylonjs.com/babylon101/particles#particle-colors)
   - Added support for pre-warming. [Doc](http://doc.babylonjs.com/babylon101/particles#pre-warming)
+  - Added support for `minInitialRotation` and `maxInitialRotation`. [Doc](http://doc.babylonjs.com/babylon101/particles#rotation)
 
 ## Updates
 

+ 14 - 5
src/Helpers/babylon.photoDome.ts

@@ -13,12 +13,23 @@ module BABYLON {
         protected _photoTexture: Texture;
 
         /**
-         * Gets the texture being displayed on the sphere
+         * Gets or sets the texture being displayed on the sphere
          */
         public get photoTexture(): Texture {
             return this._photoTexture;
         }        
 
+        public set photoTexture(value: Texture) {
+            if (this._photoTexture === value) {
+                return;
+            }
+            this._photoTexture = value;
+            this._photoTexture.coordinatesMode = Texture.FIXED_EQUIRECTANGULAR_MIRRORED_MODE; // matches orientation
+            this._photoTexture.wrapV = Texture.CLAMP_ADDRESSMODE; // always clamp the up/down            
+            this._material.reflectionTexture = this._photoTexture;
+        }        
+
+
         /**
          * The skybox material
          */
@@ -59,7 +70,6 @@ module BABYLON {
 
             // create
             let material = this._material = new BackgroundMaterial(name + "_material", scene);
-            let texture = this._photoTexture = new Texture(urlOfPhoto, scene);
             this._mesh = MeshBuilder.CreateIcoSphere(name + "_mesh", {
                 flat: false, // saves on vertex data
                 radius: options.size,
@@ -68,12 +78,11 @@ module BABYLON {
             }, scene);
 
             // configure material
-            texture.coordinatesMode = Texture.FIXED_EQUIRECTANGULAR_MIRRORED_MODE; // matches orientation
-            texture.wrapV = Texture.CLAMP_ADDRESSMODE; // always clamp the up/down
-            material.reflectionTexture = this._photoTexture;
             material.useEquirectangularFOV = true;
             material.fovMultiplier = 1.0;
 
+            this.photoTexture = new Texture(urlOfPhoto, scene);
+           
             // configure mesh
             this._mesh.material = material;
             this._mesh.parent = this;

+ 26 - 1
src/Particles/babylon.particleSystem.ts

@@ -120,7 +120,16 @@
         /**
          * Maximum scale of emitting particles on Y axis.
          */
-        public maxScaleY = 1;           
+        public maxScaleY = 1;          
+        
+        /**
+         * Gets or sets the minimal initial rotation in radians.         
+         */
+        public minInitialRotation = 0;
+        /**
+         * Gets or sets the maximal initial rotation in radians.         
+         */
+        public maxInitialRotation = 0;             
 
         /**
          * Minimum angular speed of emitting particles (Z-axis rotation for each particle).
@@ -879,6 +888,8 @@
                 particle.scale.copyFromFloats(Scalar.RandomRange(this.minScaleX, this.maxScaleX), Scalar.RandomRange(this.minScaleY, this.maxScaleY));
                 particle.angularSpeed = Scalar.RandomRange(this.minAngularSpeed, this.maxAngularSpeed);
 
+                particle.angle = Scalar.RandomRange(this.minInitialRotation, this.maxInitialRotation);
+
                 if (!this._colorGradients || this._colorGradients.length === 0) {
                     var step = Scalar.RandomRange(0, 1.0);
 
@@ -1309,6 +1320,10 @@
             serializationObject.blendMode = this.blendMode;
             serializationObject.customShader = this.customShader;
             serializationObject.preventAutoStart = this.preventAutoStart;
+            serializationObject.preWarmCycles = this.preWarmCycles;
+            serializationObject.preWarmStepOffset = this.preWarmStepOffset;
+            serializationObject.minInitialRotation = this.minInitialRotation;
+            serializationObject.maxInitialRotation = this.maxInitialRotation;
 
             serializationObject.startSpriteCellID = this.startSpriteCellID;
             serializationObject.endSpriteCellID = this.endSpriteCellID;
@@ -1393,6 +1408,16 @@
                 particleSystem.maxScaleY = parsedParticleSystem.maxScaleY;                
             }
 
+            if (parsedParticleSystem.preWarmCycles !== undefined) {
+                particleSystem.preWarmCycles = parsedParticleSystem.preWarmCycles;
+                particleSystem.preWarmStepOffset = parsedParticleSystem.preWarmStepOffset;
+            }   
+
+            if (parsedParticleSystem.minInitialRotation !== undefined) {
+                particleSystem.minInitialRotation = parsedParticleSystem.minInitialRotation;
+                particleSystem.maxInitialRotation = parsedParticleSystem.maxInitialRotation;
+            }
+
             particleSystem.minLifeTime = parsedParticleSystem.minLifeTime;
             particleSystem.maxLifeTime = parsedParticleSystem.maxLifeTime;
             particleSystem.minEmitPower = parsedParticleSystem.minEmitPower;