David Catuhe 7 vuotta sitten
vanhempi
commit
f0976b4ede

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 3551 - 3531
Playground/babylon.d.txt


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 3551 - 3542
dist/preview release/babylon.d.ts


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 1
dist/preview release/babylon.js


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

@@ -91094,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");
@@ -91107,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) {
@@ -91154,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;
                 }
             }
@@ -91166,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
@@ -91239,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
@@ -91259,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();
                 }

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

@@ -91061,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");
@@ -91074,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) {
@@ -91121,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;
                 }
             }
@@ -91133,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
@@ -91206,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
@@ -91226,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();
                 }

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 1
dist/preview release/babylon.worker.js


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

@@ -91061,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");
@@ -91074,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) {
@@ -91121,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;
                 }
             }
@@ -91133,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
@@ -91206,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
@@ -91226,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);
+                        }
                     }
                 }
             };

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 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);
                         }

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 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);
                         }

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 2 - 2
dist/preview release/serializers/babylonjs.serializers.min.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 1
dist/preview release/viewer/babylon.viewer.js


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

@@ -91182,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");
@@ -91195,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) {
@@ -91242,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;
                 }
             }
@@ -91254,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
@@ -91327,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
@@ -91347,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();
                 }