Ver código fonte

3.3.0-alpha.12

David Catuhe 7 anos atrás
pai
commit
cee671413f

Diferenças do arquivo suprimidas por serem muito extensas
+ 13214 - 13214
dist/preview release/babylon.d.ts


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
dist/preview release/babylon.js


+ 1 - 1
dist/preview release/babylon.max.js

@@ -11693,7 +11693,7 @@ var BABYLON;
              * Returns the current version of the framework
              * Returns the current version of the framework
              */
              */
             get: function () {
             get: function () {
-                return "3.3.0-alpha.11";
+                return "3.3.0-alpha.12";
             },
             },
             enumerable: true,
             enumerable: true,
             configurable: true
             configurable: true

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

@@ -11660,7 +11660,7 @@ var BABYLON;
              * Returns the current version of the framework
              * Returns the current version of the framework
              */
              */
             get: function () {
             get: function () {
-                return "3.3.0-alpha.11";
+                return "3.3.0-alpha.12";
             },
             },
             enumerable: true,
             enumerable: true,
             configurable: true
             configurable: true

Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
dist/preview release/babylon.worker.js


+ 1 - 1
dist/preview release/es6.js

@@ -11660,7 +11660,7 @@ var BABYLON;
              * Returns the current version of the framework
              * Returns the current version of the framework
              */
              */
             get: function () {
             get: function () {
-                return "3.3.0-alpha.11";
+                return "3.3.0-alpha.12";
             },
             },
             enumerable: true,
             enumerable: true,
             configurable: true
             configurable: true

+ 1 - 1
dist/preview release/glTF2Interface/package.json

@@ -1,7 +1,7 @@
 {
 {
     "name": "babylonjs-gltf2interface",
     "name": "babylonjs-gltf2interface",
     "description": "A typescript declaration of babylon's gltf2 inteface.",
     "description": "A typescript declaration of babylon's gltf2 inteface.",
-    "version": "3.3.0-alpha.11",
+    "version": "3.3.0-alpha.12",
     "repository": {
     "repository": {
         "type": "git",
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
         "url": "https://github.com/BabylonJS/Babylon.js.git"

+ 6 - 1
dist/preview release/gui/babylon.gui.d.ts

@@ -2344,6 +2344,11 @@ declare module BABYLON.GUI {
          */
          */
         constructor(name?: string);
         constructor(name?: string);
         /**
         /**
+         * Force the container to update the layout. Please note that it will not take blockLayout property in account
+         * @returns the current container
+         */
+        updateLayout(): Container3D;
+        /**
          * Gets a boolean indicating if the given control is in the children of this control
          * Gets a boolean indicating if the given control is in the children of this control
          * @param control defines the control to check
          * @param control defines the control to check
          * @returns true if the control is in the child list
          * @returns true if the control is in the child list
@@ -2589,7 +2594,7 @@ declare module BABYLON.GUI {
          */
          */
         rows: int;
         rows: int;
         /**
         /**
-         * Creates new SpherePanel
+         * Creates new VolumeBasedPanel
          */
          */
         constructor();
         constructor();
         protected _arrangeChildren(): void;
         protected _arrangeChildren(): void;

+ 16 - 4
dist/preview release/gui/babylon.gui.js

@@ -7988,6 +7988,14 @@ var BABYLON;
                 configurable: true
                 configurable: true
             });
             });
             /**
             /**
+             * Force the container to update the layout. Please note that it will not take blockLayout property in account
+             * @returns the current container
+             */
+            Container3D.prototype.updateLayout = function () {
+                this._arrangeChildren();
+                return this;
+            };
+            /**
              * Gets a boolean indicating if the given control is in the children of this control
              * Gets a boolean indicating if the given control is in the children of this control
              * @param control defines the control to check
              * @param control defines the control to check
              * @returns true if the control is in the child list
              * @returns true if the control is in the child list
@@ -8691,7 +8699,7 @@ var BABYLON;
         var VolumeBasedPanel = /** @class */ (function (_super) {
         var VolumeBasedPanel = /** @class */ (function (_super) {
             __extends(VolumeBasedPanel, _super);
             __extends(VolumeBasedPanel, _super);
             /**
             /**
-             * Creates new SpherePanel
+             * Creates new VolumeBasedPanel
              */
              */
             function VolumeBasedPanel() {
             function VolumeBasedPanel() {
                 var _this = _super.call(this) || this;
                 var _this = _super.call(this) || this;
@@ -8791,9 +8799,13 @@ var BABYLON;
                     }
                     }
                     controlCount++;
                     controlCount++;
                     child.mesh.computeWorldMatrix(true);
                     child.mesh.computeWorldMatrix(true);
-                    child.mesh.getWorldMatrix().multiplyToRef(currentInverseWorld, BABYLON.Tmp.Matrix[0]);
-                    var boundingBox = child.mesh.getBoundingInfo().boundingBox;
-                    var extendSize = BABYLON.Vector3.TransformNormal(boundingBox.extendSize, BABYLON.Tmp.Matrix[0]);
+                    //   child.mesh.getWorldMatrix().multiplyToRef(currentInverseWorld, Tmp.Matrix[0]);
+                    var boundingBox = child.mesh.getHierarchyBoundingVectors();
+                    var extendSize = BABYLON.Tmp.Vector3[0];
+                    var diff = BABYLON.Tmp.Vector3[1];
+                    boundingBox.max.subtractToRef(boundingBox.min, diff);
+                    diff.scaleInPlace(0.5);
+                    BABYLON.Vector3.TransformNormalToRef(diff, currentInverseWorld, extendSize);
                     this._cellWidth = Math.max(this._cellWidth, extendSize.x * 2);
                     this._cellWidth = Math.max(this._cellWidth, extendSize.x * 2);
                     this._cellHeight = Math.max(this._cellHeight, extendSize.y * 2);
                     this._cellHeight = Math.max(this._cellHeight, extendSize.y * 2);
                 }
                 }

Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
dist/preview release/gui/babylon.gui.min.js


+ 6 - 1
dist/preview release/gui/babylon.gui.module.d.ts

@@ -2349,6 +2349,11 @@ declare module BABYLON.GUI {
          */
          */
         constructor(name?: string);
         constructor(name?: string);
         /**
         /**
+         * Force the container to update the layout. Please note that it will not take blockLayout property in account
+         * @returns the current container
+         */
+        updateLayout(): Container3D;
+        /**
          * Gets a boolean indicating if the given control is in the children of this control
          * Gets a boolean indicating if the given control is in the children of this control
          * @param control defines the control to check
          * @param control defines the control to check
          * @returns true if the control is in the child list
          * @returns true if the control is in the child list
@@ -2594,7 +2599,7 @@ declare module BABYLON.GUI {
          */
          */
         rows: int;
         rows: int;
         /**
         /**
-         * Creates new SpherePanel
+         * Creates new VolumeBasedPanel
          */
          */
         constructor();
         constructor();
         protected _arrangeChildren(): void;
         protected _arrangeChildren(): void;

+ 1 - 1
dist/preview release/gui/package.json

@@ -4,7 +4,7 @@
     },
     },
     "name": "babylonjs-gui",
     "name": "babylonjs-gui",
     "description": "The Babylon.js GUI library is an extension you can use to generate interactive user interface. It is build on top of the DynamicTexture.",
     "description": "The Babylon.js GUI library is an extension you can use to generate interactive user interface. It is build on top of the DynamicTexture.",
-    "version": "3.3.0-alpha.11",
+    "version": "3.3.0-alpha.12",
     "repository": {
     "repository": {
         "type": "git",
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
         "url": "https://github.com/BabylonJS/Babylon.js.git"

+ 1 - 1
dist/preview release/inspector/package.json

@@ -4,7 +4,7 @@
     },
     },
     "name": "babylonjs-inspector",
     "name": "babylonjs-inspector",
     "description": "The Babylon.js inspector.",
     "description": "The Babylon.js inspector.",
-    "version": "3.3.0-alpha.11",
+    "version": "3.3.0-alpha.12",
     "repository": {
     "repository": {
         "type": "git",
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
         "url": "https://github.com/BabylonJS/Babylon.js.git"

+ 2 - 2
dist/preview release/loaders/package.json

@@ -4,7 +4,7 @@
     },
     },
     "name": "babylonjs-loaders",
     "name": "babylonjs-loaders",
     "description": "The Babylon.js file loaders library is an extension you can use to load different 3D file types into a Babylon scene.",
     "description": "The Babylon.js file loaders library is an extension you can use to load different 3D file types into a Babylon scene.",
-    "version": "3.3.0-alpha.11",
+    "version": "3.3.0-alpha.12",
     "repository": {
     "repository": {
         "type": "git",
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -27,7 +27,7 @@
     ],
     ],
     "license": "Apache-2.0",
     "license": "Apache-2.0",
     "dependencies": {
     "dependencies": {
-        "babylonjs-gltf2interface": "3.3.0-alpha.11"
+        "babylonjs-gltf2interface": "3.3.0-alpha.12"
     },
     },
     "peerDependencies": {
     "peerDependencies": {
         "babylonjs": ">=3.2.0-alpha"
         "babylonjs": ">=3.2.0-alpha"

+ 1 - 1
dist/preview release/materialsLibrary/package.json

@@ -4,7 +4,7 @@
     },
     },
     "name": "babylonjs-materials",
     "name": "babylonjs-materials",
     "description": "The Babylon.js materials library is a collection of advanced materials to be used in a Babylon.js scene.",
     "description": "The Babylon.js materials library is a collection of advanced materials to be used in a Babylon.js scene.",
-    "version": "3.3.0-alpha.11",
+    "version": "3.3.0-alpha.12",
     "repository": {
     "repository": {
         "type": "git",
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
         "url": "https://github.com/BabylonJS/Babylon.js.git"

+ 1 - 1
dist/preview release/postProcessesLibrary/package.json

@@ -4,7 +4,7 @@
     },
     },
     "name": "babylonjs-post-process",
     "name": "babylonjs-post-process",
     "description": "The Babylon.js materials library is a collection of advanced materials to be used in a Babylon.js scene.",
     "description": "The Babylon.js materials library is a collection of advanced materials to be used in a Babylon.js scene.",
-    "version": "3.3.0-alpha.11",
+    "version": "3.3.0-alpha.12",
     "repository": {
     "repository": {
         "type": "git",
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
         "url": "https://github.com/BabylonJS/Babylon.js.git"

+ 1 - 1
dist/preview release/proceduralTexturesLibrary/package.json

@@ -4,7 +4,7 @@
     },
     },
     "name": "babylonjs-procedural-textures",
     "name": "babylonjs-procedural-textures",
     "description": "The Babylon.js materials library is a collection of advanced materials to be used in a Babylon.js scene.",
     "description": "The Babylon.js materials library is a collection of advanced materials to be used in a Babylon.js scene.",
-    "version": "3.3.0-alpha.11",
+    "version": "3.3.0-alpha.12",
     "repository": {
     "repository": {
         "type": "git",
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
         "url": "https://github.com/BabylonJS/Babylon.js.git"

+ 2 - 2
dist/preview release/serializers/package.json

@@ -4,7 +4,7 @@
     },
     },
     "name": "babylonjs-serializers",
     "name": "babylonjs-serializers",
     "description": "The Babylon.js serializers library is an extension you can use to serialize Babylon scenes.",
     "description": "The Babylon.js serializers library is an extension you can use to serialize Babylon scenes.",
-    "version": "3.3.0-alpha.11",
+    "version": "3.3.0-alpha.12",
     "repository": {
     "repository": {
         "type": "git",
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -27,7 +27,7 @@
     ],
     ],
     "license": "Apache-2.0",
     "license": "Apache-2.0",
     "dependencies": {
     "dependencies": {
-        "babylonjs-gltf2interface": "3.3.0-alpha.11"
+        "babylonjs-gltf2interface": "3.3.0-alpha.12"
     },
     },
     "peerDependencies": {
     "peerDependencies": {
         "babylonjs": ">=3.2.0-alpha"
         "babylonjs": ">=3.2.0-alpha"

Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
dist/preview release/viewer/babylon.viewer.js


+ 1 - 1
dist/preview release/viewer/babylon.viewer.max.js

@@ -11781,7 +11781,7 @@ var BABYLON;
              * Returns the current version of the framework
              * Returns the current version of the framework
              */
              */
             get: function () {
             get: function () {
-                return "3.3.0-alpha.11";
+                return "3.3.0-alpha.12";
             },
             },
             enumerable: true,
             enumerable: true,
             configurable: true
             configurable: true

+ 9 - 0
gui/src/3D/controls/container3D.ts

@@ -48,6 +48,15 @@ module BABYLON.GUI {
         }
         }
 
 
         /**
         /**
+         * Force the container to update the layout. Please note that it will not take blockLayout property in account
+         * @returns the current container
+         */
+        public updateLayout(): Container3D {
+            this._arrangeChildren();
+            return this;
+        }
+
+        /**
          * Gets a boolean indicating if the given control is in the children of this control
          * Gets a boolean indicating if the given control is in the children of this control
          * @param control defines the control to check
          * @param control defines the control to check
          * @returns true if the control is in the child list
          * @returns true if the control is in the child list

+ 11 - 4
gui/src/3D/controls/volumeBasedPanel.ts

@@ -88,7 +88,7 @@ module BABYLON.GUI {
         }           
         }           
 
 
         /**
         /**
-         * Creates new SpherePanel
+         * Creates new VolumeBasedPanel
          */
          */
         public constructor() {
         public constructor() {
             super();
             super();
@@ -111,10 +111,17 @@ module BABYLON.GUI {
 
 
                 controlCount++;
                 controlCount++;
                 child.mesh.computeWorldMatrix(true);
                 child.mesh.computeWorldMatrix(true);
-                child.mesh.getWorldMatrix().multiplyToRef(currentInverseWorld, Tmp.Matrix[0]);
+             //   child.mesh.getWorldMatrix().multiplyToRef(currentInverseWorld, Tmp.Matrix[0]);
 
 
-                let boundingBox = child.mesh.getBoundingInfo().boundingBox;
-                let extendSize = Vector3.TransformNormal(boundingBox.extendSize, Tmp.Matrix[0]);
+                let boundingBox = child.mesh.getHierarchyBoundingVectors();
+                let extendSize = Tmp.Vector3[0];
+                let diff = Tmp.Vector3[1];
+
+                boundingBox.max.subtractToRef(boundingBox.min, diff);
+
+                diff.scaleInPlace(0.5);
+
+                Vector3.TransformNormalToRef(diff, currentInverseWorld, extendSize);
 
 
                 this._cellWidth = Math.max(this._cellWidth, extendSize.x * 2);
                 this._cellWidth = Math.max(this._cellWidth, extendSize.x * 2);
                 this._cellHeight = Math.max(this._cellHeight, extendSize.y * 2);
                 this._cellHeight = Math.max(this._cellHeight, extendSize.y * 2);

+ 1 - 1
package.json

@@ -9,7 +9,7 @@
     ],
     ],
     "name": "babylonjs",
     "name": "babylonjs",
     "description": "Babylon.js is a JavaScript 3D engine based on webgl.",
     "description": "Babylon.js is a JavaScript 3D engine based on webgl.",
-    "version": "3.3.0-alpha.11",
+    "version": "3.3.0-alpha.12",
     "repository": {
     "repository": {
         "type": "git",
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
         "url": "https://github.com/BabylonJS/Babylon.js.git"

+ 1 - 1
src/Engine/babylon.engine.ts

@@ -430,7 +430,7 @@
          * Returns the current version of the framework
          * Returns the current version of the framework
          */
          */
         public static get Version(): string {
         public static get Version(): string {
-            return "3.3.0-alpha.11";
+            return "3.3.0-alpha.12";
         }
         }
 
 
         // Updatable statics so stick with vars here
         // Updatable statics so stick with vars here