瀏覽代碼

Merge branch 'appBar' of https://github.com/TrevorDev/Babylon.js into appBar

Trevor Baron 7 年之前
父節點
當前提交
aca738d870

文件差異過大導致無法顯示
+ 14763 - 14740
Playground/babylon.d.txt


文件差異過大導致無法顯示
+ 9649 - 9637
dist/preview release/babylon.d.ts


文件差異過大導致無法顯示
+ 10 - 10
dist/preview release/babylon.js


+ 56 - 37
dist/preview release/babylon.max.js

@@ -41017,7 +41017,7 @@ var BABYLON;
                     if (mesh && mesh.receiveShadows && scene.shadowsEnabled && light.shadowEnabled) {
                         var shadowGenerator = light.getShadowGenerator();
                         if (shadowGenerator) {
-                            var shadowMap = shadowGenerator.getShadowMapForRendering();
+                            var shadowMap = shadowGenerator.getShadowMap();
                             if (shadowMap) {
                                 if (shadowMap.renderList && shadowMap.renderList.length > 0) {
                                     shadowEnabled = true;
@@ -55591,9 +55591,18 @@ var BABYLON;
             return this._started;
         };
         /**
-         * Starts the particle system and begins to emit.
+         * Starts the particle system and begins to emit
+         * @param delay defines the delay in milliseconds before starting the system (0 by default)
          */
-        ParticleSystem.prototype.start = function () {
+        ParticleSystem.prototype.start = function (delay) {
+            var _this = this;
+            if (delay === void 0) { delay = 0; }
+            if (delay) {
+                setTimeout(function () {
+                    _this.start(0);
+                }, delay);
+                return;
+            }
             this._started = true;
             this._stopped = false;
             this._actualFrame = 0;
@@ -59705,9 +59714,18 @@ var BABYLON;
             return this._started;
         };
         /**
-         * Starts the particle system and begins to emit.
+         * Starts the particle system and begins to emit
+         * @param delay defines the delay in milliseconds before starting the system (0 by default)
          */
-        GPUParticleSystem.prototype.start = function () {
+        GPUParticleSystem.prototype.start = function (delay) {
+            var _this = this;
+            if (delay === void 0) { delay = 0; }
+            if (delay) {
+                setTimeout(function () {
+                    _this.start(0);
+                }, delay);
+                return;
+            }
             this._started = true;
             this._stopped = false;
             this._preWarmDone = false;
@@ -91076,6 +91094,7 @@ var BABYLON;
         function GizmoManager(scene) {
             var _this = this;
             this.scene = scene;
+            this._gizmosEnabled = { positionGizmo: false, rotationGizmo: false, scaleGizmo: false, boundingBoxGizmo: false };
             this._pointerObserver = null;
             this._attachedMesh = null;
             this._boundingBoxColor = BABYLON.Color3.FromHexString("#0984e3");
@@ -91089,7 +91108,7 @@ var BABYLON;
              * If pointer events should perform attaching/detaching a gizmo, if false this can be done manually via attachToMesh. (Default: true)
              */
             this.usePointerToAttachGizmos = true;
-            this._gizmoSet = { positionGizmo: null, rotationGizmo: null, scaleGizmo: null, boundingBoxGizmo: null };
+            this.gizmos = { positionGizmo: null, rotationGizmo: null, scaleGizmo: null, boundingBoxGizmo: null };
             // Instatiate/dispose gizmos based on pointer actions
             this._pointerObserver = scene.onPointerObservable.add(function (pointerInfo, state) {
                 if (!_this.usePointerToAttachGizmos) {
@@ -91136,9 +91155,9 @@ var BABYLON;
                 this._attachedMesh.removeBehavior(this._dragBehavior);
             }
             this._attachedMesh = mesh;
-            for (var key in this._gizmoSet) {
-                var gizmo = (this._gizmoSet[key]);
-                if (gizmo) {
+            for (var key in this.gizmos) {
+                var gizmo = (this.gizmos[key]);
+                if (gizmo && this._gizmosEnabled[key]) {
                     gizmo.attachedMesh = mesh;
                 }
             }
@@ -91148,69 +91167,69 @@ var BABYLON;
         };
         Object.defineProperty(GizmoManager.prototype, "positionGizmoEnabled", {
             get: function () {
-                return this._gizmoSet.positionGizmo != null;
+                return this._gizmosEnabled.positionGizmo;
             },
             /**
              * If the position gizmo is enabled
              */
             set: function (value) {
                 if (value) {
-                    this._gizmoSet.positionGizmo = this._gizmoSet.positionGizmo || new BABYLON.PositionGizmo();
-                    this._gizmoSet.positionGizmo.updateGizmoRotationToMatchAttachedMesh = false;
-                    this._gizmoSet.positionGizmo.attachedMesh = this._attachedMesh;
+                    this.gizmos.positionGizmo = this.gizmos.positionGizmo || new BABYLON.PositionGizmo();
+                    this.gizmos.positionGizmo.updateGizmoRotationToMatchAttachedMesh = false;
+                    this.gizmos.positionGizmo.attachedMesh = this._attachedMesh;
                 }
-                else if (this._gizmoSet.positionGizmo) {
-                    this._gizmoSet.positionGizmo.dispose();
-                    this._gizmoSet.positionGizmo = null;
+                else if (this.gizmos.positionGizmo) {
+                    this.gizmos.positionGizmo.attachedMesh = null;
                 }
+                this._gizmosEnabled.positionGizmo = value;
             },
             enumerable: true,
             configurable: true
         });
         Object.defineProperty(GizmoManager.prototype, "rotationGizmoEnabled", {
             get: function () {
-                return this._gizmoSet.rotationGizmo != null;
+                return this._gizmosEnabled.rotationGizmo;
             },
             /**
              * If the rotation gizmo is enabled
              */
             set: function (value) {
                 if (value) {
-                    this._gizmoSet.rotationGizmo = this._gizmoSet.rotationGizmo || new BABYLON.RotationGizmo();
-                    this._gizmoSet.rotationGizmo.updateGizmoRotationToMatchAttachedMesh = false;
-                    this._gizmoSet.rotationGizmo.attachedMesh = this._attachedMesh;
+                    this.gizmos.rotationGizmo = this.gizmos.rotationGizmo || new BABYLON.RotationGizmo();
+                    this.gizmos.rotationGizmo.updateGizmoRotationToMatchAttachedMesh = false;
+                    this.gizmos.rotationGizmo.attachedMesh = this._attachedMesh;
                 }
-                else if (this._gizmoSet.rotationGizmo) {
-                    this._gizmoSet.rotationGizmo.dispose();
-                    this._gizmoSet.rotationGizmo = null;
+                else if (this.gizmos.rotationGizmo) {
+                    this.gizmos.rotationGizmo.attachedMesh = null;
                 }
+                this._gizmosEnabled.rotationGizmo = value;
             },
             enumerable: true,
             configurable: true
         });
         Object.defineProperty(GizmoManager.prototype, "scaleGizmoEnabled", {
             get: function () {
-                return this._gizmoSet.scaleGizmo != null;
+                return this._gizmosEnabled.scaleGizmo;
             },
             /**
              * If the scale gizmo is enabled
              */
             set: function (value) {
                 if (value) {
-                    this._gizmoSet.scaleGizmo = this._gizmoSet.scaleGizmo || new BABYLON.ScaleGizmo();
-                    this._gizmoSet.scaleGizmo.attachedMesh = this._attachedMesh;
+                    this.gizmos.scaleGizmo = this.gizmos.scaleGizmo || new BABYLON.ScaleGizmo();
+                    this.gizmos.scaleGizmo.attachedMesh = this._attachedMesh;
                 }
-                else if (this._gizmoSet.scaleGizmo) {
-                    this._gizmoSet.scaleGizmo.dispose();
-                    this._gizmoSet.scaleGizmo = null;
+                else if (this.gizmos.scaleGizmo) {
+                    this.gizmos.scaleGizmo.attachedMesh = null;
                 }
+                this._gizmosEnabled.scaleGizmo = value;
             },
             enumerable: true,
             configurable: true
         });
         Object.defineProperty(GizmoManager.prototype, "boundingBoxGizmoEnabled", {
             get: function () {
-                return this._gizmoSet.boundingBoxGizmo != null;
+                return this._gizmosEnabled.boundingBoxGizmo;
             },
             /**
              * If the boundingBox gizmo is enabled
@@ -91221,17 +91240,17 @@ var BABYLON;
                         this._boundingBoxUtilLayer = new BABYLON.UtilityLayerRenderer(this.scene);
                         this._boundingBoxUtilLayer.utilityLayerScene.autoClearDepthAndStencil = false;
                     }
-                    this._gizmoSet.boundingBoxGizmo = this._gizmoSet.boundingBoxGizmo || new BABYLON.BoundingBoxGizmo(this._boundingBoxColor, this._boundingBoxUtilLayer);
-                    this._gizmoSet.boundingBoxGizmo.attachedMesh = this._attachedMesh;
+                    this.gizmos.boundingBoxGizmo = this.gizmos.boundingBoxGizmo || new BABYLON.BoundingBoxGizmo(this._boundingBoxColor, this._boundingBoxUtilLayer);
+                    this.gizmos.boundingBoxGizmo.attachedMesh = this._attachedMesh;
                     if (this._attachedMesh) {
                         this._attachedMesh.removeBehavior(this._dragBehavior);
                         this._attachedMesh.addBehavior(this._dragBehavior);
                     }
                 }
-                else if (this._gizmoSet.boundingBoxGizmo) {
-                    this._gizmoSet.boundingBoxGizmo.dispose();
-                    this._gizmoSet.boundingBoxGizmo = null;
+                else if (this.gizmos.boundingBoxGizmo) {
+                    this.gizmos.boundingBoxGizmo.attachedMesh = null;
                 }
+                this._gizmosEnabled.boundingBoxGizmo = value;
             },
             enumerable: true,
             configurable: true
@@ -91241,8 +91260,8 @@ var BABYLON;
          */
         GizmoManager.prototype.dispose = function () {
             this.scene.onPointerObservable.remove(this._pointerObserver);
-            for (var key in this._gizmoSet) {
-                var gizmo = (this._gizmoSet[key]);
+            for (var key in this.gizmos) {
+                var gizmo = (this.gizmos[key]);
                 if (gizmo) {
                     gizmo.dispose();
                 }

+ 56 - 37
dist/preview release/babylon.no-module.max.js

@@ -40984,7 +40984,7 @@ var BABYLON;
                     if (mesh && mesh.receiveShadows && scene.shadowsEnabled && light.shadowEnabled) {
                         var shadowGenerator = light.getShadowGenerator();
                         if (shadowGenerator) {
-                            var shadowMap = shadowGenerator.getShadowMapForRendering();
+                            var shadowMap = shadowGenerator.getShadowMap();
                             if (shadowMap) {
                                 if (shadowMap.renderList && shadowMap.renderList.length > 0) {
                                     shadowEnabled = true;
@@ -55558,9 +55558,18 @@ var BABYLON;
             return this._started;
         };
         /**
-         * Starts the particle system and begins to emit.
+         * Starts the particle system and begins to emit
+         * @param delay defines the delay in milliseconds before starting the system (0 by default)
          */
-        ParticleSystem.prototype.start = function () {
+        ParticleSystem.prototype.start = function (delay) {
+            var _this = this;
+            if (delay === void 0) { delay = 0; }
+            if (delay) {
+                setTimeout(function () {
+                    _this.start(0);
+                }, delay);
+                return;
+            }
             this._started = true;
             this._stopped = false;
             this._actualFrame = 0;
@@ -59672,9 +59681,18 @@ var BABYLON;
             return this._started;
         };
         /**
-         * Starts the particle system and begins to emit.
+         * Starts the particle system and begins to emit
+         * @param delay defines the delay in milliseconds before starting the system (0 by default)
          */
-        GPUParticleSystem.prototype.start = function () {
+        GPUParticleSystem.prototype.start = function (delay) {
+            var _this = this;
+            if (delay === void 0) { delay = 0; }
+            if (delay) {
+                setTimeout(function () {
+                    _this.start(0);
+                }, delay);
+                return;
+            }
             this._started = true;
             this._stopped = false;
             this._preWarmDone = false;
@@ -91043,6 +91061,7 @@ var BABYLON;
         function GizmoManager(scene) {
             var _this = this;
             this.scene = scene;
+            this._gizmosEnabled = { positionGizmo: false, rotationGizmo: false, scaleGizmo: false, boundingBoxGizmo: false };
             this._pointerObserver = null;
             this._attachedMesh = null;
             this._boundingBoxColor = BABYLON.Color3.FromHexString("#0984e3");
@@ -91056,7 +91075,7 @@ var BABYLON;
              * If pointer events should perform attaching/detaching a gizmo, if false this can be done manually via attachToMesh. (Default: true)
              */
             this.usePointerToAttachGizmos = true;
-            this._gizmoSet = { positionGizmo: null, rotationGizmo: null, scaleGizmo: null, boundingBoxGizmo: null };
+            this.gizmos = { positionGizmo: null, rotationGizmo: null, scaleGizmo: null, boundingBoxGizmo: null };
             // Instatiate/dispose gizmos based on pointer actions
             this._pointerObserver = scene.onPointerObservable.add(function (pointerInfo, state) {
                 if (!_this.usePointerToAttachGizmos) {
@@ -91103,9 +91122,9 @@ var BABYLON;
                 this._attachedMesh.removeBehavior(this._dragBehavior);
             }
             this._attachedMesh = mesh;
-            for (var key in this._gizmoSet) {
-                var gizmo = (this._gizmoSet[key]);
-                if (gizmo) {
+            for (var key in this.gizmos) {
+                var gizmo = (this.gizmos[key]);
+                if (gizmo && this._gizmosEnabled[key]) {
                     gizmo.attachedMesh = mesh;
                 }
             }
@@ -91115,69 +91134,69 @@ var BABYLON;
         };
         Object.defineProperty(GizmoManager.prototype, "positionGizmoEnabled", {
             get: function () {
-                return this._gizmoSet.positionGizmo != null;
+                return this._gizmosEnabled.positionGizmo;
             },
             /**
              * If the position gizmo is enabled
              */
             set: function (value) {
                 if (value) {
-                    this._gizmoSet.positionGizmo = this._gizmoSet.positionGizmo || new BABYLON.PositionGizmo();
-                    this._gizmoSet.positionGizmo.updateGizmoRotationToMatchAttachedMesh = false;
-                    this._gizmoSet.positionGizmo.attachedMesh = this._attachedMesh;
+                    this.gizmos.positionGizmo = this.gizmos.positionGizmo || new BABYLON.PositionGizmo();
+                    this.gizmos.positionGizmo.updateGizmoRotationToMatchAttachedMesh = false;
+                    this.gizmos.positionGizmo.attachedMesh = this._attachedMesh;
                 }
-                else if (this._gizmoSet.positionGizmo) {
-                    this._gizmoSet.positionGizmo.dispose();
-                    this._gizmoSet.positionGizmo = null;
+                else if (this.gizmos.positionGizmo) {
+                    this.gizmos.positionGizmo.attachedMesh = null;
                 }
+                this._gizmosEnabled.positionGizmo = value;
             },
             enumerable: true,
             configurable: true
         });
         Object.defineProperty(GizmoManager.prototype, "rotationGizmoEnabled", {
             get: function () {
-                return this._gizmoSet.rotationGizmo != null;
+                return this._gizmosEnabled.rotationGizmo;
             },
             /**
              * If the rotation gizmo is enabled
              */
             set: function (value) {
                 if (value) {
-                    this._gizmoSet.rotationGizmo = this._gizmoSet.rotationGizmo || new BABYLON.RotationGizmo();
-                    this._gizmoSet.rotationGizmo.updateGizmoRotationToMatchAttachedMesh = false;
-                    this._gizmoSet.rotationGizmo.attachedMesh = this._attachedMesh;
+                    this.gizmos.rotationGizmo = this.gizmos.rotationGizmo || new BABYLON.RotationGizmo();
+                    this.gizmos.rotationGizmo.updateGizmoRotationToMatchAttachedMesh = false;
+                    this.gizmos.rotationGizmo.attachedMesh = this._attachedMesh;
                 }
-                else if (this._gizmoSet.rotationGizmo) {
-                    this._gizmoSet.rotationGizmo.dispose();
-                    this._gizmoSet.rotationGizmo = null;
+                else if (this.gizmos.rotationGizmo) {
+                    this.gizmos.rotationGizmo.attachedMesh = null;
                 }
+                this._gizmosEnabled.rotationGizmo = value;
             },
             enumerable: true,
             configurable: true
         });
         Object.defineProperty(GizmoManager.prototype, "scaleGizmoEnabled", {
             get: function () {
-                return this._gizmoSet.scaleGizmo != null;
+                return this._gizmosEnabled.scaleGizmo;
             },
             /**
              * If the scale gizmo is enabled
              */
             set: function (value) {
                 if (value) {
-                    this._gizmoSet.scaleGizmo = this._gizmoSet.scaleGizmo || new BABYLON.ScaleGizmo();
-                    this._gizmoSet.scaleGizmo.attachedMesh = this._attachedMesh;
+                    this.gizmos.scaleGizmo = this.gizmos.scaleGizmo || new BABYLON.ScaleGizmo();
+                    this.gizmos.scaleGizmo.attachedMesh = this._attachedMesh;
                 }
-                else if (this._gizmoSet.scaleGizmo) {
-                    this._gizmoSet.scaleGizmo.dispose();
-                    this._gizmoSet.scaleGizmo = null;
+                else if (this.gizmos.scaleGizmo) {
+                    this.gizmos.scaleGizmo.attachedMesh = null;
                 }
+                this._gizmosEnabled.scaleGizmo = value;
             },
             enumerable: true,
             configurable: true
         });
         Object.defineProperty(GizmoManager.prototype, "boundingBoxGizmoEnabled", {
             get: function () {
-                return this._gizmoSet.boundingBoxGizmo != null;
+                return this._gizmosEnabled.boundingBoxGizmo;
             },
             /**
              * If the boundingBox gizmo is enabled
@@ -91188,17 +91207,17 @@ var BABYLON;
                         this._boundingBoxUtilLayer = new BABYLON.UtilityLayerRenderer(this.scene);
                         this._boundingBoxUtilLayer.utilityLayerScene.autoClearDepthAndStencil = false;
                     }
-                    this._gizmoSet.boundingBoxGizmo = this._gizmoSet.boundingBoxGizmo || new BABYLON.BoundingBoxGizmo(this._boundingBoxColor, this._boundingBoxUtilLayer);
-                    this._gizmoSet.boundingBoxGizmo.attachedMesh = this._attachedMesh;
+                    this.gizmos.boundingBoxGizmo = this.gizmos.boundingBoxGizmo || new BABYLON.BoundingBoxGizmo(this._boundingBoxColor, this._boundingBoxUtilLayer);
+                    this.gizmos.boundingBoxGizmo.attachedMesh = this._attachedMesh;
                     if (this._attachedMesh) {
                         this._attachedMesh.removeBehavior(this._dragBehavior);
                         this._attachedMesh.addBehavior(this._dragBehavior);
                     }
                 }
-                else if (this._gizmoSet.boundingBoxGizmo) {
-                    this._gizmoSet.boundingBoxGizmo.dispose();
-                    this._gizmoSet.boundingBoxGizmo = null;
+                else if (this.gizmos.boundingBoxGizmo) {
+                    this.gizmos.boundingBoxGizmo.attachedMesh = null;
                 }
+                this._gizmosEnabled.boundingBoxGizmo = value;
             },
             enumerable: true,
             configurable: true
@@ -91208,8 +91227,8 @@ var BABYLON;
          */
         GizmoManager.prototype.dispose = function () {
             this.scene.onPointerObservable.remove(this._pointerObserver);
-            for (var key in this._gizmoSet) {
-                var gizmo = (this._gizmoSet[key]);
+            for (var key in this.gizmos) {
+                var gizmo = (this.gizmos[key]);
                 if (gizmo) {
                     gizmo.dispose();
                 }

文件差異過大導致無法顯示
+ 10 - 10
dist/preview release/babylon.worker.js


+ 56 - 37
dist/preview release/es6.js

@@ -40984,7 +40984,7 @@ var BABYLON;
                     if (mesh && mesh.receiveShadows && scene.shadowsEnabled && light.shadowEnabled) {
                         var shadowGenerator = light.getShadowGenerator();
                         if (shadowGenerator) {
-                            var shadowMap = shadowGenerator.getShadowMapForRendering();
+                            var shadowMap = shadowGenerator.getShadowMap();
                             if (shadowMap) {
                                 if (shadowMap.renderList && shadowMap.renderList.length > 0) {
                                     shadowEnabled = true;
@@ -55558,9 +55558,18 @@ var BABYLON;
             return this._started;
         };
         /**
-         * Starts the particle system and begins to emit.
+         * Starts the particle system and begins to emit
+         * @param delay defines the delay in milliseconds before starting the system (0 by default)
          */
-        ParticleSystem.prototype.start = function () {
+        ParticleSystem.prototype.start = function (delay) {
+            var _this = this;
+            if (delay === void 0) { delay = 0; }
+            if (delay) {
+                setTimeout(function () {
+                    _this.start(0);
+                }, delay);
+                return;
+            }
             this._started = true;
             this._stopped = false;
             this._actualFrame = 0;
@@ -59672,9 +59681,18 @@ var BABYLON;
             return this._started;
         };
         /**
-         * Starts the particle system and begins to emit.
+         * Starts the particle system and begins to emit
+         * @param delay defines the delay in milliseconds before starting the system (0 by default)
          */
-        GPUParticleSystem.prototype.start = function () {
+        GPUParticleSystem.prototype.start = function (delay) {
+            var _this = this;
+            if (delay === void 0) { delay = 0; }
+            if (delay) {
+                setTimeout(function () {
+                    _this.start(0);
+                }, delay);
+                return;
+            }
             this._started = true;
             this._stopped = false;
             this._preWarmDone = false;
@@ -91043,6 +91061,7 @@ var BABYLON;
         function GizmoManager(scene) {
             var _this = this;
             this.scene = scene;
+            this._gizmosEnabled = { positionGizmo: false, rotationGizmo: false, scaleGizmo: false, boundingBoxGizmo: false };
             this._pointerObserver = null;
             this._attachedMesh = null;
             this._boundingBoxColor = BABYLON.Color3.FromHexString("#0984e3");
@@ -91056,7 +91075,7 @@ var BABYLON;
              * If pointer events should perform attaching/detaching a gizmo, if false this can be done manually via attachToMesh. (Default: true)
              */
             this.usePointerToAttachGizmos = true;
-            this._gizmoSet = { positionGizmo: null, rotationGizmo: null, scaleGizmo: null, boundingBoxGizmo: null };
+            this.gizmos = { positionGizmo: null, rotationGizmo: null, scaleGizmo: null, boundingBoxGizmo: null };
             // Instatiate/dispose gizmos based on pointer actions
             this._pointerObserver = scene.onPointerObservable.add(function (pointerInfo, state) {
                 if (!_this.usePointerToAttachGizmos) {
@@ -91103,9 +91122,9 @@ var BABYLON;
                 this._attachedMesh.removeBehavior(this._dragBehavior);
             }
             this._attachedMesh = mesh;
-            for (var key in this._gizmoSet) {
-                var gizmo = (this._gizmoSet[key]);
-                if (gizmo) {
+            for (var key in this.gizmos) {
+                var gizmo = (this.gizmos[key]);
+                if (gizmo && this._gizmosEnabled[key]) {
                     gizmo.attachedMesh = mesh;
                 }
             }
@@ -91115,69 +91134,69 @@ var BABYLON;
         };
         Object.defineProperty(GizmoManager.prototype, "positionGizmoEnabled", {
             get: function () {
-                return this._gizmoSet.positionGizmo != null;
+                return this._gizmosEnabled.positionGizmo;
             },
             /**
              * If the position gizmo is enabled
              */
             set: function (value) {
                 if (value) {
-                    this._gizmoSet.positionGizmo = this._gizmoSet.positionGizmo || new BABYLON.PositionGizmo();
-                    this._gizmoSet.positionGizmo.updateGizmoRotationToMatchAttachedMesh = false;
-                    this._gizmoSet.positionGizmo.attachedMesh = this._attachedMesh;
+                    this.gizmos.positionGizmo = this.gizmos.positionGizmo || new BABYLON.PositionGizmo();
+                    this.gizmos.positionGizmo.updateGizmoRotationToMatchAttachedMesh = false;
+                    this.gizmos.positionGizmo.attachedMesh = this._attachedMesh;
                 }
-                else if (this._gizmoSet.positionGizmo) {
-                    this._gizmoSet.positionGizmo.dispose();
-                    this._gizmoSet.positionGizmo = null;
+                else if (this.gizmos.positionGizmo) {
+                    this.gizmos.positionGizmo.attachedMesh = null;
                 }
+                this._gizmosEnabled.positionGizmo = value;
             },
             enumerable: true,
             configurable: true
         });
         Object.defineProperty(GizmoManager.prototype, "rotationGizmoEnabled", {
             get: function () {
-                return this._gizmoSet.rotationGizmo != null;
+                return this._gizmosEnabled.rotationGizmo;
             },
             /**
              * If the rotation gizmo is enabled
              */
             set: function (value) {
                 if (value) {
-                    this._gizmoSet.rotationGizmo = this._gizmoSet.rotationGizmo || new BABYLON.RotationGizmo();
-                    this._gizmoSet.rotationGizmo.updateGizmoRotationToMatchAttachedMesh = false;
-                    this._gizmoSet.rotationGizmo.attachedMesh = this._attachedMesh;
+                    this.gizmos.rotationGizmo = this.gizmos.rotationGizmo || new BABYLON.RotationGizmo();
+                    this.gizmos.rotationGizmo.updateGizmoRotationToMatchAttachedMesh = false;
+                    this.gizmos.rotationGizmo.attachedMesh = this._attachedMesh;
                 }
-                else if (this._gizmoSet.rotationGizmo) {
-                    this._gizmoSet.rotationGizmo.dispose();
-                    this._gizmoSet.rotationGizmo = null;
+                else if (this.gizmos.rotationGizmo) {
+                    this.gizmos.rotationGizmo.attachedMesh = null;
                 }
+                this._gizmosEnabled.rotationGizmo = value;
             },
             enumerable: true,
             configurable: true
         });
         Object.defineProperty(GizmoManager.prototype, "scaleGizmoEnabled", {
             get: function () {
-                return this._gizmoSet.scaleGizmo != null;
+                return this._gizmosEnabled.scaleGizmo;
             },
             /**
              * If the scale gizmo is enabled
              */
             set: function (value) {
                 if (value) {
-                    this._gizmoSet.scaleGizmo = this._gizmoSet.scaleGizmo || new BABYLON.ScaleGizmo();
-                    this._gizmoSet.scaleGizmo.attachedMesh = this._attachedMesh;
+                    this.gizmos.scaleGizmo = this.gizmos.scaleGizmo || new BABYLON.ScaleGizmo();
+                    this.gizmos.scaleGizmo.attachedMesh = this._attachedMesh;
                 }
-                else if (this._gizmoSet.scaleGizmo) {
-                    this._gizmoSet.scaleGizmo.dispose();
-                    this._gizmoSet.scaleGizmo = null;
+                else if (this.gizmos.scaleGizmo) {
+                    this.gizmos.scaleGizmo.attachedMesh = null;
                 }
+                this._gizmosEnabled.scaleGizmo = value;
             },
             enumerable: true,
             configurable: true
         });
         Object.defineProperty(GizmoManager.prototype, "boundingBoxGizmoEnabled", {
             get: function () {
-                return this._gizmoSet.boundingBoxGizmo != null;
+                return this._gizmosEnabled.boundingBoxGizmo;
             },
             /**
              * If the boundingBox gizmo is enabled
@@ -91188,17 +91207,17 @@ var BABYLON;
                         this._boundingBoxUtilLayer = new BABYLON.UtilityLayerRenderer(this.scene);
                         this._boundingBoxUtilLayer.utilityLayerScene.autoClearDepthAndStencil = false;
                     }
-                    this._gizmoSet.boundingBoxGizmo = this._gizmoSet.boundingBoxGizmo || new BABYLON.BoundingBoxGizmo(this._boundingBoxColor, this._boundingBoxUtilLayer);
-                    this._gizmoSet.boundingBoxGizmo.attachedMesh = this._attachedMesh;
+                    this.gizmos.boundingBoxGizmo = this.gizmos.boundingBoxGizmo || new BABYLON.BoundingBoxGizmo(this._boundingBoxColor, this._boundingBoxUtilLayer);
+                    this.gizmos.boundingBoxGizmo.attachedMesh = this._attachedMesh;
                     if (this._attachedMesh) {
                         this._attachedMesh.removeBehavior(this._dragBehavior);
                         this._attachedMesh.addBehavior(this._dragBehavior);
                     }
                 }
-                else if (this._gizmoSet.boundingBoxGizmo) {
-                    this._gizmoSet.boundingBoxGizmo.dispose();
-                    this._gizmoSet.boundingBoxGizmo = null;
+                else if (this.gizmos.boundingBoxGizmo) {
+                    this.gizmos.boundingBoxGizmo.attachedMesh = null;
                 }
+                this._gizmosEnabled.boundingBoxGizmo = value;
             },
             enumerable: true,
             configurable: true
@@ -91208,8 +91227,8 @@ var BABYLON;
          */
         GizmoManager.prototype.dispose = function () {
             this.scene.onPointerObservable.remove(this._pointerObserver);
-            for (var key in this._gizmoSet) {
-                var gizmo = (this._gizmoSet[key]);
+            for (var key in this.gizmos) {
+                var gizmo = (this.gizmos[key]);
                 if (gizmo) {
                     gizmo.dispose();
                 }

+ 11 - 0
dist/preview release/gui/babylon.gui.d.ts

@@ -1688,10 +1688,15 @@ declare module BABYLON.GUI {
         private _scrollLeft;
         private _textWidth;
         private _clickedCoordinate;
+        private _deadKey;
+        private _addKey;
+        private _currentKey;
         /** Gets or sets a string representing the message displayed on mobile when the control gets the focus */
         promptMessage: string;
         /** Observable raised when the text changes */
         onTextChangedObservable: Observable<InputText>;
+        /** Observable raised just before an entered character is to be added */
+        onBeforeKeyAddObservable: Observable<InputText>;
         /** Observable raised when the control gets the focus */
         onFocusObservable: Observable<InputText>;
         /** Observable raised when the control loses the focus */
@@ -1716,6 +1721,12 @@ declare module BABYLON.GUI {
         placeholderColor: string;
         /** Gets or sets the text displayed when the control is empty */
         placeholderText: string;
+        /** Gets or sets the dead key flag */
+        deadKey: boolean;
+        /** Gets or sets if the current key should be added */
+        addKey: boolean;
+        /** Gets or sets the value of the current key being entered */
+        currentKey: string;
         /** Gets or sets the text displayed in the control */
         text: string;
         /** Gets or sets control width */

+ 60 - 13
dist/preview release/gui/babylon.gui.js

@@ -5810,10 +5810,15 @@ var BABYLON;
                 _this._isFocused = false;
                 _this._blinkIsEven = false;
                 _this._cursorOffset = 0;
+                _this._deadKey = false;
+                _this._addKey = true;
+                _this._currentKey = "";
                 /** Gets or sets a string representing the message displayed on mobile when the control gets the focus */
                 _this.promptMessage = "Please enter text:";
                 /** Observable raised when the text changes */
                 _this.onTextChangedObservable = new BABYLON.Observable();
+                /** Observable raised just before an entered character is to be added */
+                _this.onBeforeKeyAddObservable = new BABYLON.Observable();
                 /** Observable raised when the control gets the focus */
                 _this.onFocusObservable = new BABYLON.Observable();
                 /** Observable raised when the control loses the focus */
@@ -5959,6 +5964,39 @@ var BABYLON;
                 enumerable: true,
                 configurable: true
             });
+            Object.defineProperty(InputText.prototype, "deadKey", {
+                /** Gets or sets the dead key flag */
+                get: function () {
+                    return this._deadKey;
+                },
+                set: function (flag) {
+                    this._deadKey = flag;
+                },
+                enumerable: true,
+                configurable: true
+            });
+            Object.defineProperty(InputText.prototype, "addKey", {
+                /** Gets or sets if the current key should be added */
+                get: function () {
+                    return this._addKey;
+                },
+                set: function (flag) {
+                    this._addKey = flag;
+                },
+                enumerable: true,
+                configurable: true
+            });
+            Object.defineProperty(InputText.prototype, "currentKey", {
+                /** Gets or sets the value of the current key being entered */
+                get: function () {
+                    return this._currentKey;
+                },
+                set: function (key) {
+                    this._currentKey = key;
+                },
+                enumerable: true,
+                configurable: true
+            });
             Object.defineProperty(InputText.prototype, "text", {
                 /** Gets or sets the text displayed in the control */
                 get: function () {
@@ -6077,21 +6115,30 @@ var BABYLON;
                         this._blinkIsEven = false;
                         this._markAsDirty();
                         return;
+                    case 222: // Dead
+                        this.deadKey = true;
+                        return;
                 }
                 // Printable characters
-                if ((keyCode === -1) || // Direct access
-                    (keyCode === 32) || // Space
-                    (keyCode > 47 && keyCode < 58) || // Numbers
-                    (keyCode > 64 && keyCode < 91) || // Letters
-                    (keyCode > 185 && keyCode < 193) || // Special characters
-                    (keyCode > 218 && keyCode < 223) || // Special characters
-                    (keyCode > 95 && keyCode < 112)) { // Numpad
-                    if (this._cursorOffset === 0) {
-                        this.text += key;
-                    }
-                    else {
-                        var insertPosition = this._text.length - this._cursorOffset;
-                        this.text = this._text.slice(0, insertPosition) + key + this._text.slice(insertPosition);
+                if (key &&
+                    ((keyCode === -1) || // Direct access
+                        (keyCode === 32) || // Space
+                        (keyCode > 47 && keyCode < 58) || // Numbers
+                        (keyCode > 64 && keyCode < 91) || // Letters
+                        (keyCode > 185 && keyCode < 193) || // Special characters
+                        (keyCode > 218 && keyCode < 223) || // Special characters
+                        (keyCode > 95 && keyCode < 112))) { // Numpad
+                    this._currentKey = key;
+                    this.onBeforeKeyAddObservable.notifyObservers(this);
+                    key = this._currentKey;
+                    if (this._addKey) {
+                        if (this._cursorOffset === 0) {
+                            this.text += key;
+                        }
+                        else {
+                            var insertPosition = this._text.length - this._cursorOffset;
+                            this.text = this._text.slice(0, insertPosition) + key + this._text.slice(insertPosition);
+                        }
                     }
                 }
             };

文件差異過大導致無法顯示
+ 2 - 2
dist/preview release/gui/babylon.gui.min.js


+ 11 - 0
dist/preview release/gui/babylon.gui.module.d.ts

@@ -1693,10 +1693,15 @@ declare module BABYLON.GUI {
         private _scrollLeft;
         private _textWidth;
         private _clickedCoordinate;
+        private _deadKey;
+        private _addKey;
+        private _currentKey;
         /** Gets or sets a string representing the message displayed on mobile when the control gets the focus */
         promptMessage: string;
         /** Observable raised when the text changes */
         onTextChangedObservable: Observable<InputText>;
+        /** Observable raised just before an entered character is to be added */
+        onBeforeKeyAddObservable: Observable<InputText>;
         /** Observable raised when the control gets the focus */
         onFocusObservable: Observable<InputText>;
         /** Observable raised when the control loses the focus */
@@ -1721,6 +1726,12 @@ declare module BABYLON.GUI {
         placeholderColor: string;
         /** Gets or sets the text displayed when the control is empty */
         placeholderText: string;
+        /** Gets or sets the dead key flag */
+        deadKey: boolean;
+        /** Gets or sets if the current key should be added */
+        addKey: boolean;
+        /** Gets or sets the value of the current key being entered */
+        currentKey: string;
         /** Gets or sets the text displayed in the control */
         text: string;
         /** Gets or sets control width */

+ 11 - 5
dist/preview release/serializers/babylon.glTF2Serializer.js

@@ -1018,13 +1018,16 @@ var BABYLON;
                             }
                             directDescendents = babylonTransformNode.getDescendants(true);
                             if (!glTFNode.children && directDescendents && directDescendents.length) {
-                                glTFNode.children = [];
+                                var children = [];
                                 for (var _a = 0, directDescendents_1 = directDescendents; _a < directDescendents_1.length; _a++) {
                                     var descendent = directDescendents_1[_a];
                                     if (_this._nodeMap[descendent.uniqueId] != null) {
-                                        glTFNode.children.push(_this._nodeMap[descendent.uniqueId]);
+                                        children.push(_this._nodeMap[descendent.uniqueId]);
                                     }
                                 }
+                                if (children.length) {
+                                    glTFNode.children = children;
+                                }
                             }
                         }
                     }
@@ -1082,9 +1085,12 @@ var BABYLON;
                             node.scale = [1, 1, 1];
                             node.rotation = [0, 0, 0, 1];
                         }
-                        this._nodes.push(node);
-                        nodeIndex = this._nodes.length - 1;
-                        nodeMap[babylonTransformNode.uniqueId] = nodeIndex;
+                        var directDescendents = babylonTransformNode.getDescendants(true, function (node) { return (node instanceof BABYLON.TransformNode); });
+                        if (directDescendents.length || node.mesh != null) {
+                            this._nodes.push(node);
+                            nodeIndex = this._nodes.length - 1;
+                            nodeMap[babylonTransformNode.uniqueId] = nodeIndex;
+                        }
                         if (!babylonScene.animationGroups.length && babylonTransformNode.animations.length) {
                             GLTF2._GLTFAnimation._CreateNodeAnimationFromTransformNodeAnimations(babylonTransformNode, runtimeGLTFAnimation, idleGLTFAnimations, nodeMap, this._nodes, binaryWriter, this._bufferViews, this._accessors, this._convertToRightHandedSystem, this._animationSampleRate);
                         }

文件差異過大導致無法顯示
+ 2 - 2
dist/preview release/serializers/babylon.glTF2Serializer.min.js


+ 11 - 5
dist/preview release/serializers/babylonjs.serializers.js

@@ -1179,13 +1179,16 @@ var BABYLON;
                             }
                             directDescendents = babylonTransformNode.getDescendants(true);
                             if (!glTFNode.children && directDescendents && directDescendents.length) {
-                                glTFNode.children = [];
+                                var children = [];
                                 for (var _a = 0, directDescendents_1 = directDescendents; _a < directDescendents_1.length; _a++) {
                                     var descendent = directDescendents_1[_a];
                                     if (_this._nodeMap[descendent.uniqueId] != null) {
-                                        glTFNode.children.push(_this._nodeMap[descendent.uniqueId]);
+                                        children.push(_this._nodeMap[descendent.uniqueId]);
                                     }
                                 }
+                                if (children.length) {
+                                    glTFNode.children = children;
+                                }
                             }
                         }
                     }
@@ -1243,9 +1246,12 @@ var BABYLON;
                             node.scale = [1, 1, 1];
                             node.rotation = [0, 0, 0, 1];
                         }
-                        this._nodes.push(node);
-                        nodeIndex = this._nodes.length - 1;
-                        nodeMap[babylonTransformNode.uniqueId] = nodeIndex;
+                        var directDescendents = babylonTransformNode.getDescendants(true, function (node) { return (node instanceof BABYLON.TransformNode); });
+                        if (directDescendents.length || node.mesh != null) {
+                            this._nodes.push(node);
+                            nodeIndex = this._nodes.length - 1;
+                            nodeMap[babylonTransformNode.uniqueId] = nodeIndex;
+                        }
                         if (!babylonScene.animationGroups.length && babylonTransformNode.animations.length) {
                             GLTF2._GLTFAnimation._CreateNodeAnimationFromTransformNodeAnimations(babylonTransformNode, runtimeGLTFAnimation, idleGLTFAnimations, nodeMap, this._nodes, binaryWriter, this._bufferViews, this._accessors, this._convertToRightHandedSystem, this._animationSampleRate);
                         }

文件差異過大導致無法顯示
+ 2 - 2
dist/preview release/serializers/babylonjs.serializers.min.js


文件差異過大導致無法顯示
+ 10 - 10
dist/preview release/viewer/babylon.viewer.js


+ 56 - 37
dist/preview release/viewer/babylon.viewer.max.js

@@ -41105,7 +41105,7 @@ var BABYLON;
                     if (mesh && mesh.receiveShadows && scene.shadowsEnabled && light.shadowEnabled) {
                         var shadowGenerator = light.getShadowGenerator();
                         if (shadowGenerator) {
-                            var shadowMap = shadowGenerator.getShadowMapForRendering();
+                            var shadowMap = shadowGenerator.getShadowMap();
                             if (shadowMap) {
                                 if (shadowMap.renderList && shadowMap.renderList.length > 0) {
                                     shadowEnabled = true;
@@ -55679,9 +55679,18 @@ var BABYLON;
             return this._started;
         };
         /**
-         * Starts the particle system and begins to emit.
+         * Starts the particle system and begins to emit
+         * @param delay defines the delay in milliseconds before starting the system (0 by default)
          */
-        ParticleSystem.prototype.start = function () {
+        ParticleSystem.prototype.start = function (delay) {
+            var _this = this;
+            if (delay === void 0) { delay = 0; }
+            if (delay) {
+                setTimeout(function () {
+                    _this.start(0);
+                }, delay);
+                return;
+            }
             this._started = true;
             this._stopped = false;
             this._actualFrame = 0;
@@ -59793,9 +59802,18 @@ var BABYLON;
             return this._started;
         };
         /**
-         * Starts the particle system and begins to emit.
+         * Starts the particle system and begins to emit
+         * @param delay defines the delay in milliseconds before starting the system (0 by default)
          */
-        GPUParticleSystem.prototype.start = function () {
+        GPUParticleSystem.prototype.start = function (delay) {
+            var _this = this;
+            if (delay === void 0) { delay = 0; }
+            if (delay) {
+                setTimeout(function () {
+                    _this.start(0);
+                }, delay);
+                return;
+            }
             this._started = true;
             this._stopped = false;
             this._preWarmDone = false;
@@ -91164,6 +91182,7 @@ var BABYLON;
         function GizmoManager(scene) {
             var _this = this;
             this.scene = scene;
+            this._gizmosEnabled = { positionGizmo: false, rotationGizmo: false, scaleGizmo: false, boundingBoxGizmo: false };
             this._pointerObserver = null;
             this._attachedMesh = null;
             this._boundingBoxColor = BABYLON.Color3.FromHexString("#0984e3");
@@ -91177,7 +91196,7 @@ var BABYLON;
              * If pointer events should perform attaching/detaching a gizmo, if false this can be done manually via attachToMesh. (Default: true)
              */
             this.usePointerToAttachGizmos = true;
-            this._gizmoSet = { positionGizmo: null, rotationGizmo: null, scaleGizmo: null, boundingBoxGizmo: null };
+            this.gizmos = { positionGizmo: null, rotationGizmo: null, scaleGizmo: null, boundingBoxGizmo: null };
             // Instatiate/dispose gizmos based on pointer actions
             this._pointerObserver = scene.onPointerObservable.add(function (pointerInfo, state) {
                 if (!_this.usePointerToAttachGizmos) {
@@ -91224,9 +91243,9 @@ var BABYLON;
                 this._attachedMesh.removeBehavior(this._dragBehavior);
             }
             this._attachedMesh = mesh;
-            for (var key in this._gizmoSet) {
-                var gizmo = (this._gizmoSet[key]);
-                if (gizmo) {
+            for (var key in this.gizmos) {
+                var gizmo = (this.gizmos[key]);
+                if (gizmo && this._gizmosEnabled[key]) {
                     gizmo.attachedMesh = mesh;
                 }
             }
@@ -91236,69 +91255,69 @@ var BABYLON;
         };
         Object.defineProperty(GizmoManager.prototype, "positionGizmoEnabled", {
             get: function () {
-                return this._gizmoSet.positionGizmo != null;
+                return this._gizmosEnabled.positionGizmo;
             },
             /**
              * If the position gizmo is enabled
              */
             set: function (value) {
                 if (value) {
-                    this._gizmoSet.positionGizmo = this._gizmoSet.positionGizmo || new BABYLON.PositionGizmo();
-                    this._gizmoSet.positionGizmo.updateGizmoRotationToMatchAttachedMesh = false;
-                    this._gizmoSet.positionGizmo.attachedMesh = this._attachedMesh;
+                    this.gizmos.positionGizmo = this.gizmos.positionGizmo || new BABYLON.PositionGizmo();
+                    this.gizmos.positionGizmo.updateGizmoRotationToMatchAttachedMesh = false;
+                    this.gizmos.positionGizmo.attachedMesh = this._attachedMesh;
                 }
-                else if (this._gizmoSet.positionGizmo) {
-                    this._gizmoSet.positionGizmo.dispose();
-                    this._gizmoSet.positionGizmo = null;
+                else if (this.gizmos.positionGizmo) {
+                    this.gizmos.positionGizmo.attachedMesh = null;
                 }
+                this._gizmosEnabled.positionGizmo = value;
             },
             enumerable: true,
             configurable: true
         });
         Object.defineProperty(GizmoManager.prototype, "rotationGizmoEnabled", {
             get: function () {
-                return this._gizmoSet.rotationGizmo != null;
+                return this._gizmosEnabled.rotationGizmo;
             },
             /**
              * If the rotation gizmo is enabled
              */
             set: function (value) {
                 if (value) {
-                    this._gizmoSet.rotationGizmo = this._gizmoSet.rotationGizmo || new BABYLON.RotationGizmo();
-                    this._gizmoSet.rotationGizmo.updateGizmoRotationToMatchAttachedMesh = false;
-                    this._gizmoSet.rotationGizmo.attachedMesh = this._attachedMesh;
+                    this.gizmos.rotationGizmo = this.gizmos.rotationGizmo || new BABYLON.RotationGizmo();
+                    this.gizmos.rotationGizmo.updateGizmoRotationToMatchAttachedMesh = false;
+                    this.gizmos.rotationGizmo.attachedMesh = this._attachedMesh;
                 }
-                else if (this._gizmoSet.rotationGizmo) {
-                    this._gizmoSet.rotationGizmo.dispose();
-                    this._gizmoSet.rotationGizmo = null;
+                else if (this.gizmos.rotationGizmo) {
+                    this.gizmos.rotationGizmo.attachedMesh = null;
                 }
+                this._gizmosEnabled.rotationGizmo = value;
             },
             enumerable: true,
             configurable: true
         });
         Object.defineProperty(GizmoManager.prototype, "scaleGizmoEnabled", {
             get: function () {
-                return this._gizmoSet.scaleGizmo != null;
+                return this._gizmosEnabled.scaleGizmo;
             },
             /**
              * If the scale gizmo is enabled
              */
             set: function (value) {
                 if (value) {
-                    this._gizmoSet.scaleGizmo = this._gizmoSet.scaleGizmo || new BABYLON.ScaleGizmo();
-                    this._gizmoSet.scaleGizmo.attachedMesh = this._attachedMesh;
+                    this.gizmos.scaleGizmo = this.gizmos.scaleGizmo || new BABYLON.ScaleGizmo();
+                    this.gizmos.scaleGizmo.attachedMesh = this._attachedMesh;
                 }
-                else if (this._gizmoSet.scaleGizmo) {
-                    this._gizmoSet.scaleGizmo.dispose();
-                    this._gizmoSet.scaleGizmo = null;
+                else if (this.gizmos.scaleGizmo) {
+                    this.gizmos.scaleGizmo.attachedMesh = null;
                 }
+                this._gizmosEnabled.scaleGizmo = value;
             },
             enumerable: true,
             configurable: true
         });
         Object.defineProperty(GizmoManager.prototype, "boundingBoxGizmoEnabled", {
             get: function () {
-                return this._gizmoSet.boundingBoxGizmo != null;
+                return this._gizmosEnabled.boundingBoxGizmo;
             },
             /**
              * If the boundingBox gizmo is enabled
@@ -91309,17 +91328,17 @@ var BABYLON;
                         this._boundingBoxUtilLayer = new BABYLON.UtilityLayerRenderer(this.scene);
                         this._boundingBoxUtilLayer.utilityLayerScene.autoClearDepthAndStencil = false;
                     }
-                    this._gizmoSet.boundingBoxGizmo = this._gizmoSet.boundingBoxGizmo || new BABYLON.BoundingBoxGizmo(this._boundingBoxColor, this._boundingBoxUtilLayer);
-                    this._gizmoSet.boundingBoxGizmo.attachedMesh = this._attachedMesh;
+                    this.gizmos.boundingBoxGizmo = this.gizmos.boundingBoxGizmo || new BABYLON.BoundingBoxGizmo(this._boundingBoxColor, this._boundingBoxUtilLayer);
+                    this.gizmos.boundingBoxGizmo.attachedMesh = this._attachedMesh;
                     if (this._attachedMesh) {
                         this._attachedMesh.removeBehavior(this._dragBehavior);
                         this._attachedMesh.addBehavior(this._dragBehavior);
                     }
                 }
-                else if (this._gizmoSet.boundingBoxGizmo) {
-                    this._gizmoSet.boundingBoxGizmo.dispose();
-                    this._gizmoSet.boundingBoxGizmo = null;
+                else if (this.gizmos.boundingBoxGizmo) {
+                    this.gizmos.boundingBoxGizmo.attachedMesh = null;
                 }
+                this._gizmosEnabled.boundingBoxGizmo = value;
             },
             enumerable: true,
             configurable: true
@@ -91329,8 +91348,8 @@ var BABYLON;
          */
         GizmoManager.prototype.dispose = function () {
             this.scene.onPointerObservable.remove(this._pointerObserver);
-            for (var key in this._gizmoSet) {
-                var gizmo = (this._gizmoSet[key]);
+            for (var key in this.gizmos) {
+                var gizmo = (this.gizmos[key]);
                 if (gizmo) {
                     gizmo.dispose();
                 }

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

@@ -25,8 +25,9 @@
   - Added support for life time gradients. [Doc](https://doc.babylonjs.com/babylon101/particles#lifetime)
   - Added support for angular speed gradients. [Doc](https://doc.babylonjs.com/babylon101/particles#rotation)
 - Added SceneComponent to help decoupling Scene from its components ([sebavan](http://www.github.com/sebavan))
-- Playground can now be used with TypeScript directly!. [Demo](https://www.babylonjs-playground.com/ts.html) ([Deltakosh](https://github.com/deltakosh), [NasimiAsl](https://github.com/NasimiAsl)) 
+- Playground can now be used with TypeScript directly!. [Demo](https://www.babylonjs-playground.com/ts.html) ([Deltakosh](https://github.com/deltakosh), [NasimiAsl](https://github.com/NasimiAsl))
 - New GUI control: [InputPassword](https://doc.babylonjs.com/how_to/gui#inputpassword) ([theom](https://github.com/theom))
+- Added dead key support and before key add observable to InputText. [Doc](https://doc.babylonjs.com/how_to/gui#using-onbeforekeyaddobservable-for-extended-keyboard-layouts-and-input-masks)([theom](https://github.com/theom))
 
 ## Updates
 
@@ -72,6 +73,7 @@
 - Oculus GO and GearVR 3dof controllers will now rotate with the user's head if they turn around in their room ([TrevorDev](https://github.com/TrevorDev))
 - Added onPoseUpdatedFromDeviceObservable to webVRCamera to detect when the camera's pose has been updated ([TrevorDev](https://github.com/TrevorDev))
 - Added attachToBoxBehavior to attach UI to a bounding box ([TrevorDev](https://github.com/TrevorDev))
+- Gizmo manager's internal gizmos are now public ([TrevorDev](https://github.com/TrevorDev))
 
 ### glTF Loader
 

+ 54 - 14
gui/src/2D/controls/inputText.ts

@@ -21,12 +21,17 @@ module BABYLON.GUI {
         private _scrollLeft: Nullable<number>;
         private _textWidth: number;
         private _clickedCoordinate: Nullable<number>;
+        private _deadKey = false;
+        private _addKey = true;
+        private _currentKey = "";
 
         /** Gets or sets a string representing the message displayed on mobile when the control gets the focus */
         public promptMessage = "Please enter text:";
 
         /** Observable raised when the text changes */
         public onTextChangedObservable = new Observable<InputText>();
+        /** Observable raised just before an entered character is to be added */
+        public onBeforeKeyAddObservable = new Observable<InputText>();
         /** Observable raised when the control gets the focus */
         public onFocusObservable = new Observable<InputText>();
         /** Observable raised when the control loses the focus */
@@ -155,6 +160,33 @@ module BABYLON.GUI {
             this._markAsDirty();
         }
 
+        /** Gets or sets the dead key flag */
+        public get deadKey(): boolean {
+            return this._deadKey;
+        }
+
+        public set deadKey(flag: boolean) {
+            this._deadKey = flag;
+        }
+
+        /** Gets or sets if the current key should be added */
+        public get addKey(): boolean {
+            return this._addKey;
+        }
+
+        public set addKey(flag: boolean) {
+            this._addKey = flag;
+        }
+
+        /** Gets or sets the value of the current key being entered */
+        public get currentKey(): string {
+            return this._currentKey;
+        }
+
+        public set currentKey(key: string) {
+            this._currentKey = key;
+        }
+
         /** Gets or sets the text displayed in the control */
         public get text(): string {
             return this._text;
@@ -289,23 +321,31 @@ module BABYLON.GUI {
                     this._blinkIsEven = false;
                     this._markAsDirty();
                     return;
+                case 222: // Dead
+                    this.deadKey = true;
+                    return;
             }
 
             // Printable characters
-            if (
-                (keyCode === -1) ||                     // Direct access
-                (keyCode === 32) ||                     // Space
-                (keyCode > 47 && keyCode < 58) ||       // Numbers
-                (keyCode > 64 && keyCode < 91) ||       // Letters
-                (keyCode > 185 && keyCode < 193) ||     // Special characters
-                (keyCode > 218 && keyCode < 223) ||    // Special characters
-                (keyCode > 95 && keyCode < 112)) {      // Numpad
-                if (this._cursorOffset === 0) {
-                    this.text += key;
-                } else {
-                    let insertPosition = this._text.length - this._cursorOffset;
-
-                    this.text = this._text.slice(0, insertPosition) + key + this._text.slice(insertPosition);
+            if (key &&
+                ((keyCode === -1) ||                     // Direct access
+                 (keyCode === 32) ||                     // Space
+                 (keyCode > 47 && keyCode < 58) ||       // Numbers
+                 (keyCode > 64 && keyCode < 91) ||       // Letters
+                 (keyCode > 185 && keyCode < 193) ||     // Special characters
+                 (keyCode > 218 && keyCode < 223) ||     // Special characters
+                 (keyCode > 95 && keyCode < 112))) {     // Numpad
+                this._currentKey = key;
+                this.onBeforeKeyAddObservable.notifyObservers(this);
+                key = this._currentKey;
+                if (this._addKey) {
+                    if (this._cursorOffset === 0) {
+                        this.text += key;
+                    } else {
+                        let insertPosition = this._text.length - this._cursorOffset;
+
+                        this.text = this._text.slice(0, insertPosition) + key + this._text.slice(insertPosition);
+                    }
                 }
             }
         }

+ 12 - 6
serializers/src/glTF/2.0/babylon.glTFExporter.ts

@@ -1153,12 +1153,15 @@ module BABYLON.GLTF2 {
 
                         directDescendents = babylonTransformNode.getDescendants(true);
                         if (!glTFNode.children && directDescendents && directDescendents.length) {
-                            glTFNode.children = [];
+                            const children: number[] = [];
                             for (let descendent of directDescendents) {
                                 if (this._nodeMap[descendent.uniqueId] != null) {
-                                    glTFNode.children.push(this._nodeMap[descendent.uniqueId]);
+                                    children.push(this._nodeMap[descendent.uniqueId]);
                                 }
                             }
+                            if (children.length) {
+                                glTFNode.children = children;
+                            }
                         }
                     }
                 };
@@ -1217,10 +1220,13 @@ module BABYLON.GLTF2 {
                         node.scale = [1,1,1];
                         node.rotation = [0,0,0,1];
                     }
-
-                    this._nodes.push(node);
-                    nodeIndex = this._nodes.length - 1;
-                    nodeMap[babylonTransformNode.uniqueId] = nodeIndex;
+                    
+                    const directDescendents = babylonTransformNode.getDescendants(true, (node: Node) => {return (node instanceof TransformNode);});
+                    if (directDescendents.length || node.mesh != null) {
+                        this._nodes.push(node);
+                        nodeIndex = this._nodes.length - 1;
+                        nodeMap[babylonTransformNode.uniqueId] = nodeIndex;
+                    }
 
                     if (!babylonScene.animationGroups.length && babylonTransformNode.animations.length) {
                         _GLTFAnimation._CreateNodeAnimationFromTransformNodeAnimations(babylonTransformNode, runtimeGLTFAnimation, idleGLTFAnimations, nodeMap, this._nodes, binaryWriter, this._bufferViews, this._accessors, this._convertToRightHandedSystem, this._animationSampleRate);

+ 37 - 33
src/Gizmos/babylon.gizmoManager.ts

@@ -3,7 +3,11 @@ module BABYLON {
      * Helps setup gizmo's in the scene to rotate/scale/position meshes
      */
     export class GizmoManager implements IDisposable{
-        private _gizmoSet:{positionGizmo: Nullable<PositionGizmo>, rotationGizmo: Nullable<RotationGizmo>, scaleGizmo: Nullable<ScaleGizmo>, boundingBoxGizmo: Nullable<BoundingBoxGizmo>};
+        /**
+         * Gizmo's created by the gizmo manager, gizmo will be null until gizmo has been enabled for the first time
+         */
+        public gizmos:{positionGizmo: Nullable<PositionGizmo>, rotationGizmo: Nullable<RotationGizmo>, scaleGizmo: Nullable<ScaleGizmo>, boundingBoxGizmo: Nullable<BoundingBoxGizmo>};
+        private _gizmosEnabled = {positionGizmo: false, rotationGizmo: false, scaleGizmo: false, boundingBoxGizmo: false};
         private _gizmoLayer:UtilityLayerRenderer;
         private _pointerObserver:Nullable<Observer<PointerInfo>> = null;
         private _attachedMesh:Nullable<AbstractMesh> = null;
@@ -24,7 +28,7 @@ module BABYLON {
          * @param scene the scene to overlay the gizmos on top of
          */
         constructor(private scene:Scene){
-            this._gizmoSet = {positionGizmo: null, rotationGizmo: null, scaleGizmo: null, boundingBoxGizmo: null};
+            this.gizmos = {positionGizmo: null, rotationGizmo: null, scaleGizmo: null, boundingBoxGizmo: null};
 
             // Instatiate/dispose gizmos based on pointer actions
             this._pointerObserver = scene.onPointerObservable.add((pointerInfo, state)=>{
@@ -71,9 +75,9 @@ module BABYLON {
                 this._attachedMesh.removeBehavior(this._dragBehavior);
             }
             this._attachedMesh = mesh;
-            for(var key in this._gizmoSet){
-                var gizmo = <Nullable<Gizmo>>((<any>this._gizmoSet)[key]);
-                if(gizmo){
+            for(var key in this.gizmos){
+                var gizmo = <Nullable<Gizmo>>((<any>this.gizmos)[key]);
+                if(gizmo && (<any>this._gizmosEnabled)[key]){
                     gizmo.attachedMesh = mesh;
                 }
             }
@@ -87,47 +91,47 @@ module BABYLON {
          */
         public set positionGizmoEnabled(value:boolean){
             if(value){
-                this._gizmoSet.positionGizmo = this._gizmoSet.positionGizmo || new PositionGizmo();
-                this._gizmoSet.positionGizmo.updateGizmoRotationToMatchAttachedMesh = false;
-                this._gizmoSet.positionGizmo.attachedMesh = this._attachedMesh;
-            }else if(this._gizmoSet.positionGizmo){
-                this._gizmoSet.positionGizmo.dispose();
-                this._gizmoSet.positionGizmo = null;
+                this.gizmos.positionGizmo = this.gizmos.positionGizmo || new PositionGizmo();
+                this.gizmos.positionGizmo.updateGizmoRotationToMatchAttachedMesh = false;
+                this.gizmos.positionGizmo.attachedMesh = this._attachedMesh;
+            }else if(this.gizmos.positionGizmo){
+                this.gizmos.positionGizmo.attachedMesh = null;
             }
+            this._gizmosEnabled.positionGizmo = value;
         }
         public get positionGizmoEnabled():boolean{
-            return this._gizmoSet.positionGizmo != null;
+            return this._gizmosEnabled.positionGizmo;
         }
         /**
          * If the rotation gizmo is enabled
          */
         public set rotationGizmoEnabled(value:boolean){
             if(value){
-                this._gizmoSet.rotationGizmo = this._gizmoSet.rotationGizmo || new RotationGizmo();
-                this._gizmoSet.rotationGizmo.updateGizmoRotationToMatchAttachedMesh = false;
-                this._gizmoSet.rotationGizmo.attachedMesh = this._attachedMesh;
-            }else if(this._gizmoSet.rotationGizmo){
-                this._gizmoSet.rotationGizmo.dispose();
-                this._gizmoSet.rotationGizmo = null;
+                this.gizmos.rotationGizmo = this.gizmos.rotationGizmo || new RotationGizmo();
+                this.gizmos.rotationGizmo.updateGizmoRotationToMatchAttachedMesh = false;
+                this.gizmos.rotationGizmo.attachedMesh = this._attachedMesh;
+            }else if(this.gizmos.rotationGizmo){
+                this.gizmos.rotationGizmo.attachedMesh = null;
             }
+            this._gizmosEnabled.rotationGizmo = value;
         }
         public get rotationGizmoEnabled():boolean{
-            return this._gizmoSet.rotationGizmo != null;
+            return this._gizmosEnabled.rotationGizmo;
         }
         /**
          * If the scale gizmo is enabled
          */
         public set scaleGizmoEnabled(value:boolean){
             if(value){
-                this._gizmoSet.scaleGizmo = this._gizmoSet.scaleGizmo || new ScaleGizmo();
-                this._gizmoSet.scaleGizmo.attachedMesh = this._attachedMesh;
-            }else if(this._gizmoSet.scaleGizmo){
-                this._gizmoSet.scaleGizmo.dispose();
-                this._gizmoSet.scaleGizmo = null;
+                this.gizmos.scaleGizmo = this.gizmos.scaleGizmo || new ScaleGizmo();
+                this.gizmos.scaleGizmo.attachedMesh = this._attachedMesh;
+            }else if(this.gizmos.scaleGizmo){
+                this.gizmos.scaleGizmo.attachedMesh = null;
             }
+            this._gizmosEnabled.scaleGizmo = value;
         }
         public get scaleGizmoEnabled():boolean{
-            return this._gizmoSet.scaleGizmo != null;
+            return this._gizmosEnabled.scaleGizmo;
         }
         /**
          * If the boundingBox gizmo is enabled
@@ -138,19 +142,19 @@ module BABYLON {
                     this._boundingBoxUtilLayer = new BABYLON.UtilityLayerRenderer(this.scene);
                     this._boundingBoxUtilLayer.utilityLayerScene.autoClearDepthAndStencil = false;
                 }
-                this._gizmoSet.boundingBoxGizmo = this._gizmoSet.boundingBoxGizmo || new BoundingBoxGizmo(this._boundingBoxColor, this._boundingBoxUtilLayer);
-                this._gizmoSet.boundingBoxGizmo.attachedMesh = this._attachedMesh;
+                this.gizmos.boundingBoxGizmo = this.gizmos.boundingBoxGizmo || new BoundingBoxGizmo(this._boundingBoxColor, this._boundingBoxUtilLayer);
+                this.gizmos.boundingBoxGizmo.attachedMesh = this._attachedMesh;
                 if(this._attachedMesh){
                     this._attachedMesh.removeBehavior(this._dragBehavior);
                     this._attachedMesh.addBehavior(this._dragBehavior);
                 }
-            }else if(this._gizmoSet.boundingBoxGizmo){
-                this._gizmoSet.boundingBoxGizmo.dispose();
-                this._gizmoSet.boundingBoxGizmo = null;
+            }else if(this.gizmos.boundingBoxGizmo){
+                this.gizmos.boundingBoxGizmo.attachedMesh = null;
             }
+            this._gizmosEnabled.boundingBoxGizmo = value;
         }
         public get boundingBoxGizmoEnabled():boolean{
-            return this._gizmoSet.boundingBoxGizmo != null;
+            return this._gizmosEnabled.boundingBoxGizmo;
         }
 
         /**
@@ -158,8 +162,8 @@ module BABYLON {
          */
         public dispose(){
             this.scene.onPointerObservable.remove(this._pointerObserver);
-            for(var key in this._gizmoSet){
-                var gizmo = <Nullable<Gizmo>>((<any>this._gizmoSet)[key]);
+            for(var key in this.gizmos){
+                var gizmo = <Nullable<Gizmo>>((<any>this.gizmos)[key]);
                 if(gizmo){
                     gizmo.dispose();
                 }

+ 1 - 1
src/Materials/babylon.materialHelper.ts

@@ -236,7 +236,7 @@ module BABYLON {
                     if (mesh && mesh.receiveShadows && scene.shadowsEnabled && light.shadowEnabled) {
                         var shadowGenerator = light.getShadowGenerator();
                         if (shadowGenerator) {
-                            const shadowMap = shadowGenerator.getShadowMapForRendering();
+                            const shadowMap = shadowGenerator.getShadowMap();
                             if (shadowMap) {
                                 if (shadowMap.renderList && shadowMap.renderList.length > 0) {
                                     shadowEnabled = true;

+ 3 - 2
src/Particles/babylon.IParticleSystem.ts

@@ -231,9 +231,10 @@ module BABYLON {
         rebuild(): void;
 
         /**
-         * Starts the particle system and begins to emit.
+         * Starts the particle system and begins to emit
+         * @param delay defines the delay in milliseconds before starting the system (0 by default)
          */
-        start(): void;
+        start(delay?: number): void;
 
         /**
          * Stops the particle system.

+ 10 - 3
src/Particles/babylon.gpuParticleSystem.ts

@@ -372,9 +372,16 @@
         }
 
         /**
-         * Starts the particle system and begins to emit.
-         */
-        public start(): void {
+         * Starts the particle system and begins to emit
+         * @param delay defines the delay in milliseconds before starting the system (0 by default)
+         */
+        public start(delay = 0): void {
+            if (delay) {
+                setTimeout(()=> {
+                    this.start(0);
+                }, delay);
+                return;
+            }
             this._started = true;
             this._stopped = false;
             this._preWarmDone = false;

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

@@ -902,9 +902,17 @@
         }
 
         /**
-         * Starts the particle system and begins to emit.
-         */
-        public start(): void {
+         * Starts the particle system and begins to emit
+         * @param delay defines the delay in milliseconds before starting the system (0 by default)
+         */
+        public start(delay = 0): void {
+            if (delay) {
+                setTimeout(()=> {
+                    this.start(0);
+                }, delay);
+                return;
+            }
+
             this._started = true;
             this._stopped = false;
             this._actualFrame = 0;