Przeglądaj źródła

Fix latest compilation issues

David Catuhe 6 lat temu
rodzic
commit
cb688f0ecb
29 zmienionych plików z 13096 dodań i 12236 usunięć
  1. 5814 5764
      Playground/babylon.d.txt
  2. 3 2
      Playground/css/index.css
  3. 6 10
      Playground/js/index.js
  4. 3 5
      Tools/Gulp/package.json
  5. 5787 5787
      dist/preview release/babylon.d.ts
  6. 31 31
      dist/preview release/babylon.max.js
  7. 31 31
      dist/preview release/babylon.no-module.max.js
  8. 31 31
      dist/preview release/es6.js
  9. 20 2
      dist/preview release/gui/babylon.gui.d.ts
  10. 1 1
      dist/preview release/gui/babylon.gui.js
  11. 1 1
      dist/preview release/gui/babylon.gui.min.js
  12. 1 1
      dist/preview release/gui/babylon.gui.min.js.map
  13. 40 4
      dist/preview release/gui/babylon.gui.module.d.ts
  14. 1283 482
      dist/preview release/inspector/babylon.inspector.bundle.js
  15. 1 1
      dist/preview release/inspector/babylon.inspector.bundle.js.map
  16. 7 8
      dist/preview release/inspector/babylon.inspector.d.ts
  17. 16 18
      dist/preview release/inspector/babylon.inspector.module.d.ts
  18. 1 15
      dist/preview release/viewer/babylon.viewer.d.ts
  19. 1 1
      dist/preview release/viewer/babylon.viewer.js
  20. 4 4
      dist/preview release/viewer/babylon.viewer.max.js
  21. 1 18
      dist/preview release/viewer/babylon.viewer.module.d.ts
  22. 1 0
      gui/src/2D/advancedDynamicTexture.ts
  23. 1 2
      gui/src/3D/controls/control3D.ts
  24. 1 1
      inspector/package.json
  25. 2 2
      inspector/src/Inspector.ts
  26. 2 5
      inspector/src/components/actionTabs/tabs/propertyGrids/gridPropertyGridComponent.tsx
  27. 4 1
      inspector/src/components/actionTabs/tabs/propertyGrids/materials/texturePropertyGridComponent.tsx
  28. 0 6
      inspector/src/components/embedHost/embedHost.scss
  29. 2 2
      inspector/src/components/globalState.ts

Plik diff jest za duży
+ 5814 - 5764
Playground/babylon.d.txt


+ 3 - 2
Playground/css/index.css

@@ -246,6 +246,8 @@ body {
     width: 100%;
     height: 100%;
     touch-action: none;
+    display: block;
+    font-size: 0;
 }
 #fpsLabel {
     position: absolute;
@@ -472,7 +474,6 @@ body {
     padding:20px;
     border-radius: 5px;
     color:white;
-    font-family: 'Inconsolata';
 }
 #errorZone button {
     position:absolute;
@@ -508,7 +509,7 @@ body {
 .navbarBottom #statusBar {
     line-height:30px;
     color: #E74C3C;
-    font-family: 'Inconsolata';
+    font-size: 14px;
     padding-left:20px;
 }
 

+ 6 - 10
Playground/js/index.js

@@ -498,15 +498,11 @@ function showError(errorMessage, errorEvent) {
                 }
 
                 var showInspector = false;
-                var showDebugLayer = false;
-                var initialTabIndex = 0;
                 showBJSPGMenu();
                 jsEditor.updateOptions({ readOnly: false });
 
-                if (document.getElementsByClassName('insp-wrapper').length > 0) {
+                if (BABYLON.Engine.LastCreatedScene && BABYLON.Engine.LastCreatedScene.debugLayer.isVisible()) {
                     showInspector = true;
-                } else if (document.getElementById('DebugLayer')) {
-                    showDebugLayer = true;
                 }
 
                 if (engine) {
@@ -629,8 +625,10 @@ function showError(errorMessage, errorEvent) {
                     }
 
                     if (scene) {
-                        if (showInspector || showDebugLayer) {
-                            scene.debugLayer.show({ embedMode: true });
+                        if (showInspector) {
+                            if (!scene.debugLayer.isVisible()) {
+                                scene.debugLayer.show({ embedMode: true });
+                            }
                         }
                     }
                 });
@@ -886,7 +884,6 @@ function showError(errorMessage, errorEvent) {
             engine.resize();
 
             if (scene.debugLayer.isVisible()) {
-                scene.debugLayer.hide();  // Because when you close it with the cross, it doesn't call hide(), so you have to do it in code
                 scene.debugLayer.show({ embedMode: true });
             }
         }
@@ -950,11 +947,10 @@ function showError(errorMessage, errorEvent) {
         var toggleDebug = function() {
             // Always showing the debug layer, because you can close it by itself
             var scene = engine.scenes[0];
-            if (document.getElementsByClassName("insp-right-panel")[0]) {
+            if (scene.debugLayer.isVisible()) {
                 scene.debugLayer.hide();
             }
             else {
-                scene.debugLayer.hide(); // Because when you close it with the cross, it doesn't call hide(), so you have to do it in code
                 scene.debugLayer.show({ embedMode: true });
             }
         }

+ 3 - 5
Tools/Gulp/package.json

@@ -49,13 +49,11 @@
         "typedoc": "^0.12.0",
         "typescript": "~3.0.1",
         "webpack": "^4.16.3",
-        "webpack-stream": "5.0.0"
+        "webpack-stream": "5.0.0",
+        "dts-bundle": "^0.7.3",
+        "gulp-clean": "^0.4.0"
     },
     "scripts": {
         "install": "cd ../../gui && npm install && cd ../Tools/Gulp/ &&  cd ../../inspector && npm install && cd ../Tools/Gulp/ && npm --prefix ../../Playground/ install ../../Playground/ && npm --prefix ../../tests/unit/ install ../../tests/unit/ && npm --prefix ../../Viewer/tests/ install ../../Viewer/tests/ && cd ../../Viewer && npm install && cd ../Tools/Gulp/ && gulp deployLocalDev"
-    },
-    "dependencies": {
-        "dts-bundle": "^0.7.3",
-        "gulp-clean": "^0.4.0"
     }
 }

Plik diff jest za duży
+ 5787 - 5787
dist/preview release/babylon.d.ts


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

@@ -23033,7 +23033,7 @@ var BABYLON;
              * falling off base on range or angle.
              * This can be set to any values in Light.FALLOFF_x.
              *
-             * Note: This is only usefull for PBR Materials at the moment. This could be extended if required to
+             * Note: This is only useful for PBR Materials at the moment. This could be extended if required to
              * other types of materials.
              */
             _this.falloffType = Light.FALLOFF_DEFAULT;
@@ -23808,7 +23808,7 @@ var BABYLON;
             _this.mode = Camera.PERSPECTIVE_CAMERA;
             /**
              * Define wether the camera is intermediate.
-             * This is usefull to not present the output directly to the screen in case of rig without post process for instance
+             * This is useful to not present the output directly to the screen in case of rig without post process for instance
              */
             _this.isIntermediate = false;
             /**
@@ -23827,7 +23827,7 @@ var BABYLON;
             _this.fovMode = Camera.FOVMODE_VERTICAL_FIXED;
             /**
              * Rig mode of the camera.
-             * This is usefull to create the camera with two "eyes" instead of one to create VR or stereoscopic scenes.
+             * This is useful to create the camera with two "eyes" instead of one to create VR or stereoscopic scenes.
              * This is normally controlled byt the camera themselves as internal use.
              */
             _this.cameraRigMode = Camera.RIG_MODE_NONE;
@@ -23919,7 +23919,7 @@ var BABYLON;
             return "Camera";
         };
         /**
-         * Gets a string representation of the camera usefull for debug purpose.
+         * Gets a string representation of the camera useful for debug purpose.
          * @param fullDetails Defines that a more verboe level of logging is required
          * @returns the string representation
          */
@@ -32659,7 +32659,7 @@ var BABYLON;
             return serializationObject;
         };
         /**
-         * Get the current class name of the texture usefull for serialization or dynamic coding.
+         * Get the current class name of the texture useful for serialization or dynamic coding.
          * @returns "Texture"
          */
         Texture.prototype.getClassName = function () {
@@ -34647,7 +34647,7 @@ var BABYLON;
          * @param onSuccess is an optional Javascript function to be called just after the mesh is modified. It is passed the modified mesh and must return nothing.
          * @param uvOffset is an optional vector2 used to offset UV.
          * @param uvScale is an optional vector2 used to scale UV.
-         * @param forceUpdate defines whether or not to force an update of the generated buffers. This is usefull to apply on a deserialized model for instance.
+         * @param forceUpdate defines whether or not to force an update of the generated buffers. This is useful to apply on a deserialized model for instance.
          * @returns the Mesh.
          */
         Mesh.prototype.applyDisplacementMap = function (url, minHeight, maxHeight, onSuccess, uvOffset, uvScale, forceUpdate) {
@@ -34687,7 +34687,7 @@ var BABYLON;
          * @param onSuccess is an optional Javascript function to be called just after the mesh is modified. It is passed the modified mesh and must return nothing.
          * @param uvOffset is an optional vector2 used to offset UV.
          * @param uvScale is an optional vector2 used to scale UV.
-         * @param forceUpdate defines whether or not to force an update of the generated buffers. This is usefull to apply on a deserialized model for instance.
+         * @param forceUpdate defines whether or not to force an update of the generated buffers. This is useful to apply on a deserialized model for instance.
          * @returns the Mesh.
          */
         Mesh.prototype.applyDisplacementMapFromBuffer = function (buffer, heightMapWidth, heightMapHeight, minHeight, maxHeight, uvOffset, uvScale, forceUpdate) {
@@ -44066,7 +44066,7 @@ var BABYLON;
             _this.indexOfRefraction = 0.98;
             /**
              * Invert the refraction texture alongside the y axis.
-             * It can be usefull with procedural textures or probe for instance.
+             * It can be useful with procedural textures or probe for instance.
              * @see http://doc.babylonjs.com/how_to/reflect#how-to-obtain-reflections-and-refractions
              */
             _this.invertRefractionY = true;
@@ -46201,7 +46201,7 @@ var BABYLON;
              */
             _this._indexOfRefraction = 0.66;
             /**
-             * Controls if refraction needs to be inverted on Y. This could be usefull for procedural texture.
+             * Controls if refraction needs to be inverted on Y. This could be useful for procedural texture.
              */
             _this._invertRefractionY = false;
             /**
@@ -47737,7 +47737,7 @@ var BABYLON;
              */
             _this.indexOfRefraction = 0.66;
             /**
-             * Controls if refraction needs to be inverted on Y. This could be usefull for procedural texture.
+             * Controls if refraction needs to be inverted on Y. This could be useful for procedural texture.
              */
             _this.invertRefractionY = false;
             /**
@@ -49755,7 +49755,7 @@ var BABYLON;
         return function () { return new BABYLON.UniversalCamera(name, BABYLON.Vector3.Zero(), scene); };
     });
     /**
-     * This represents a free type of camera. It can be usefull in First Person Shooter game for instance.
+     * This represents a free type of camera. It can be useful in First Person Shooter game for instance.
      * Please consider using the new UniversalCamera instead as it adds more functionality like the gamepad.
      * @see http://doc.babylonjs.com/features/cameras#universal-camera
      */
@@ -49763,7 +49763,7 @@ var BABYLON;
         __extends(FreeCamera, _super);
         /**
          * Instantiates a Free Camera.
-         * This represents a free type of camera. It can be usefull in First Person Shooter game for instance.
+         * This represents a free type of camera. It can be useful in First Person Shooter game for instance.
          * Please consider using the new UniversalCamera instead as it adds more functionality like touch to this camera.
          * @see http://doc.babylonjs.com/features/cameras#universal-camera
          * @param name Define the name of the camera in the scene
@@ -74188,7 +74188,7 @@ var BABYLON;
         });
         /**
          * Resets the refresh counter of the texture and start bak from scratch.
-         * Could be usefull to regenerate the texture if it is setup to render only once.
+         * Could be useful to regenerate the texture if it is setup to render only once.
          */
         RenderTargetTexture.prototype.resetRefreshCounter = function () {
             this._currentRefreshId = -1;
@@ -75276,8 +75276,8 @@ var BABYLON;
             return _this;
         }
         /**
-         * Get the current class name of the texture usefull for serialization or dynamic coding.
-         * @returns "Texture"
+         * Get the current class name of the texture useful for serialization or dynamic coding.
+         * @returns "DynamicTexture"
          */
         DynamicTexture.prototype.getClassName = function () {
             return "DynamicTexture";
@@ -76844,9 +76844,9 @@ var BABYLON;
          * Documentation : http://doc.babylonjs.com/tutorials/shadows
          * @param mapSize The size of the texture what stores the shadows. Example : 1024.
          * @param light The light object generating the shadows.
-         * @param useFullFloatFirst By default the generator will try to use half float textures but if you need precision (for self shadowing for instance), you can use this option to enforce full float texture.
+         * @param usefulFloatFirst By default the generator will try to use half float textures but if you need precision (for self shadowing for instance), you can use this option to enforce full float texture.
          */
-        function ShadowGenerator(mapSize, light, useFullFloatFirst) {
+        function ShadowGenerator(mapSize, light, usefulFloatFirst) {
             this._bias = 0.00005;
             this._normalBias = 0;
             this._blurBoxOffset = 1;
@@ -76889,7 +76889,7 @@ var BABYLON;
             }
             // Texture type fallback from float to int if not supported.
             var caps = this._scene.getEngine().getCaps();
-            if (!useFullFloatFirst) {
+            if (!usefulFloatFirst) {
                 if (caps.textureHalfFloatRender && caps.textureHalfFloatLinearFiltering) {
                     this._textureType = BABYLON.Engine.TEXTURETYPE_HALF_FLOAT;
                 }
@@ -76949,14 +76949,14 @@ var BABYLON;
         Object.defineProperty(ShadowGenerator.prototype, "blurBoxOffset", {
             /**
              * Gets the blur box offset: offset applied during the blur pass.
-             * Only usefull if useKernelBlur = false
+             * Only useful if useKernelBlur = false
              */
             get: function () {
                 return this._blurBoxOffset;
             },
             /**
              * Sets the blur box offset: offset applied during the blur pass.
-             * Only usefull if useKernelBlur = false
+             * Only useful if useKernelBlur = false
              */
             set: function (value) {
                 if (this._blurBoxOffset === value) {
@@ -76993,14 +76993,14 @@ var BABYLON;
         Object.defineProperty(ShadowGenerator.prototype, "blurKernel", {
             /**
              * Gets the blur kernel: kernel size of the blur pass.
-             * Only usefull if useKernelBlur = true
+             * Only useful if useKernelBlur = true
              */
             get: function () {
                 return this._blurKernel;
             },
             /**
              * Sets the blur kernel: kernel size of the blur pass.
-             * Only usefull if useKernelBlur = true
+             * Only useful if useKernelBlur = true
              */
             set: function (value) {
                 if (this._blurKernel === value) {
@@ -77015,14 +77015,14 @@ var BABYLON;
         Object.defineProperty(ShadowGenerator.prototype, "useKernelBlur", {
             /**
              * Gets whether the blur pass is a kernel blur (if true) or box blur.
-             * Only usefull in filtered mode (useBlurExponentialShadowMap...)
+             * Only useful in filtered mode (useBlurExponentialShadowMap...)
              */
             get: function () {
                 return this._useKernelBlur;
             },
             /**
              * Sets whether the blur pass is a kernel blur (if true) or box blur.
-             * Only usefull in filtered mode (useBlurExponentialShadowMap...)
+             * Only useful in filtered mode (useBlurExponentialShadowMap...)
              */
             set: function (value) {
                 if (this._useKernelBlur === value) {
@@ -81565,7 +81565,7 @@ var BABYLON;
         };
         /**
          * Resets the refresh counter of the texture and start bak from scratch.
-         * Could be usefull to regenerate the texture if it is setup to render only once.
+         * Could be useful to regenerate the texture if it is setup to render only once.
          */
         ProceduralTexture.prototype.resetRefreshCounter = function () {
             this._currentRefreshId = -1;
@@ -85819,7 +85819,7 @@ var BABYLON;
         delete this._depthRenderer[camera.id];
     };
     /**
-     * Defines the Depth Renderer scene component responsible to manage a depth buffer usefull
+     * Defines the Depth Renderer scene component responsible to manage a depth buffer useful
      * in several rendering techniques.
      */
     var DepthRendererSceneComponent = /** @class */ (function () {
@@ -95420,7 +95420,7 @@ var BABYLON;
 var BABYLON;
 (function (BABYLON) {
     /**
-     * Helper class usefull to convert panorama picture to their cubemap representation in 6 faces.
+     * Helper class useful to convert panorama picture to their cubemap representation in 6 faces.
      */
     var PanoramaToCubeMapTools = /** @class */ (function () {
         function PanoramaToCubeMapTools() {
@@ -110187,7 +110187,7 @@ var BABYLON;
         return function () { return new VirtualJoysticksCamera(name, BABYLON.Vector3.Zero(), scene); };
     });
     /**
-     * This represents a free type of camera. It can be usefull in First Person Shooter game for instance.
+     * This represents a free type of camera. It can be useful in First Person Shooter game for instance.
      * It is identical to the Free Camera and simply adds by default a virtual joystick.
      * Virtual Joysticks are on-screen 2D graphics that are used to control the camera or other scene items.
      * @see http://doc.babylonjs.com/features/cameras#virtual-joysticks-camera
@@ -110195,7 +110195,7 @@ var BABYLON;
     var VirtualJoysticksCamera = /** @class */ (function (_super) {
         __extends(VirtualJoysticksCamera, _super);
         /**
-         * Intantiates a VirtualJoysticksCamera. It can be usefull in First Person Shooter game for instance.
+         * Intantiates a VirtualJoysticksCamera. It can be useful in First Person Shooter game for instance.
          * It is identical to the Free Camera and simply adds by default a virtual joystick.
          * Virtual Joysticks are on-screen 2D graphics that are used to control the camera or other scene items.
          * @see http://doc.babylonjs.com/features/cameras#virtual-joysticks-camera
@@ -115677,14 +115677,14 @@ var BABYLON;
 (function (BABYLON) {
     /**
      * This represents a full screen 2d layer.
-     * This can be usefull to display a picture in the  background of your scene for instance.
+     * This can be useful to display a picture in the  background of your scene for instance.
      * @see https://www.babylonjs-playground.com/#08A2BS#1
      */
     var Layer = /** @class */ (function () {
         /**
          * Instantiates a new layer.
          * This represents a full screen 2d layer.
-         * This can be usefull to display a picture in the  background of your scene for instance.
+         * This can be useful to display a picture in the  background of your scene for instance.
          * @see https://www.babylonjs-playground.com/#08A2BS#1
          * @param name Define the name of the layer in the scene
          * @param imgUrl Define the url of the texture to display in the layer

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

@@ -23000,7 +23000,7 @@ var BABYLON;
              * falling off base on range or angle.
              * This can be set to any values in Light.FALLOFF_x.
              *
-             * Note: This is only usefull for PBR Materials at the moment. This could be extended if required to
+             * Note: This is only useful for PBR Materials at the moment. This could be extended if required to
              * other types of materials.
              */
             _this.falloffType = Light.FALLOFF_DEFAULT;
@@ -23775,7 +23775,7 @@ var BABYLON;
             _this.mode = Camera.PERSPECTIVE_CAMERA;
             /**
              * Define wether the camera is intermediate.
-             * This is usefull to not present the output directly to the screen in case of rig without post process for instance
+             * This is useful to not present the output directly to the screen in case of rig without post process for instance
              */
             _this.isIntermediate = false;
             /**
@@ -23794,7 +23794,7 @@ var BABYLON;
             _this.fovMode = Camera.FOVMODE_VERTICAL_FIXED;
             /**
              * Rig mode of the camera.
-             * This is usefull to create the camera with two "eyes" instead of one to create VR or stereoscopic scenes.
+             * This is useful to create the camera with two "eyes" instead of one to create VR or stereoscopic scenes.
              * This is normally controlled byt the camera themselves as internal use.
              */
             _this.cameraRigMode = Camera.RIG_MODE_NONE;
@@ -23886,7 +23886,7 @@ var BABYLON;
             return "Camera";
         };
         /**
-         * Gets a string representation of the camera usefull for debug purpose.
+         * Gets a string representation of the camera useful for debug purpose.
          * @param fullDetails Defines that a more verboe level of logging is required
          * @returns the string representation
          */
@@ -32626,7 +32626,7 @@ var BABYLON;
             return serializationObject;
         };
         /**
-         * Get the current class name of the texture usefull for serialization or dynamic coding.
+         * Get the current class name of the texture useful for serialization or dynamic coding.
          * @returns "Texture"
          */
         Texture.prototype.getClassName = function () {
@@ -34614,7 +34614,7 @@ var BABYLON;
          * @param onSuccess is an optional Javascript function to be called just after the mesh is modified. It is passed the modified mesh and must return nothing.
          * @param uvOffset is an optional vector2 used to offset UV.
          * @param uvScale is an optional vector2 used to scale UV.
-         * @param forceUpdate defines whether or not to force an update of the generated buffers. This is usefull to apply on a deserialized model for instance.
+         * @param forceUpdate defines whether or not to force an update of the generated buffers. This is useful to apply on a deserialized model for instance.
          * @returns the Mesh.
          */
         Mesh.prototype.applyDisplacementMap = function (url, minHeight, maxHeight, onSuccess, uvOffset, uvScale, forceUpdate) {
@@ -34654,7 +34654,7 @@ var BABYLON;
          * @param onSuccess is an optional Javascript function to be called just after the mesh is modified. It is passed the modified mesh and must return nothing.
          * @param uvOffset is an optional vector2 used to offset UV.
          * @param uvScale is an optional vector2 used to scale UV.
-         * @param forceUpdate defines whether or not to force an update of the generated buffers. This is usefull to apply on a deserialized model for instance.
+         * @param forceUpdate defines whether or not to force an update of the generated buffers. This is useful to apply on a deserialized model for instance.
          * @returns the Mesh.
          */
         Mesh.prototype.applyDisplacementMapFromBuffer = function (buffer, heightMapWidth, heightMapHeight, minHeight, maxHeight, uvOffset, uvScale, forceUpdate) {
@@ -44033,7 +44033,7 @@ var BABYLON;
             _this.indexOfRefraction = 0.98;
             /**
              * Invert the refraction texture alongside the y axis.
-             * It can be usefull with procedural textures or probe for instance.
+             * It can be useful with procedural textures or probe for instance.
              * @see http://doc.babylonjs.com/how_to/reflect#how-to-obtain-reflections-and-refractions
              */
             _this.invertRefractionY = true;
@@ -46168,7 +46168,7 @@ var BABYLON;
              */
             _this._indexOfRefraction = 0.66;
             /**
-             * Controls if refraction needs to be inverted on Y. This could be usefull for procedural texture.
+             * Controls if refraction needs to be inverted on Y. This could be useful for procedural texture.
              */
             _this._invertRefractionY = false;
             /**
@@ -47704,7 +47704,7 @@ var BABYLON;
              */
             _this.indexOfRefraction = 0.66;
             /**
-             * Controls if refraction needs to be inverted on Y. This could be usefull for procedural texture.
+             * Controls if refraction needs to be inverted on Y. This could be useful for procedural texture.
              */
             _this.invertRefractionY = false;
             /**
@@ -49722,7 +49722,7 @@ var BABYLON;
         return function () { return new BABYLON.UniversalCamera(name, BABYLON.Vector3.Zero(), scene); };
     });
     /**
-     * This represents a free type of camera. It can be usefull in First Person Shooter game for instance.
+     * This represents a free type of camera. It can be useful in First Person Shooter game for instance.
      * Please consider using the new UniversalCamera instead as it adds more functionality like the gamepad.
      * @see http://doc.babylonjs.com/features/cameras#universal-camera
      */
@@ -49730,7 +49730,7 @@ var BABYLON;
         __extends(FreeCamera, _super);
         /**
          * Instantiates a Free Camera.
-         * This represents a free type of camera. It can be usefull in First Person Shooter game for instance.
+         * This represents a free type of camera. It can be useful in First Person Shooter game for instance.
          * Please consider using the new UniversalCamera instead as it adds more functionality like touch to this camera.
          * @see http://doc.babylonjs.com/features/cameras#universal-camera
          * @param name Define the name of the camera in the scene
@@ -74155,7 +74155,7 @@ var BABYLON;
         });
         /**
          * Resets the refresh counter of the texture and start bak from scratch.
-         * Could be usefull to regenerate the texture if it is setup to render only once.
+         * Could be useful to regenerate the texture if it is setup to render only once.
          */
         RenderTargetTexture.prototype.resetRefreshCounter = function () {
             this._currentRefreshId = -1;
@@ -75243,8 +75243,8 @@ var BABYLON;
             return _this;
         }
         /**
-         * Get the current class name of the texture usefull for serialization or dynamic coding.
-         * @returns "Texture"
+         * Get the current class name of the texture useful for serialization or dynamic coding.
+         * @returns "DynamicTexture"
          */
         DynamicTexture.prototype.getClassName = function () {
             return "DynamicTexture";
@@ -76811,9 +76811,9 @@ var BABYLON;
          * Documentation : http://doc.babylonjs.com/tutorials/shadows
          * @param mapSize The size of the texture what stores the shadows. Example : 1024.
          * @param light The light object generating the shadows.
-         * @param useFullFloatFirst By default the generator will try to use half float textures but if you need precision (for self shadowing for instance), you can use this option to enforce full float texture.
+         * @param usefulFloatFirst By default the generator will try to use half float textures but if you need precision (for self shadowing for instance), you can use this option to enforce full float texture.
          */
-        function ShadowGenerator(mapSize, light, useFullFloatFirst) {
+        function ShadowGenerator(mapSize, light, usefulFloatFirst) {
             this._bias = 0.00005;
             this._normalBias = 0;
             this._blurBoxOffset = 1;
@@ -76856,7 +76856,7 @@ var BABYLON;
             }
             // Texture type fallback from float to int if not supported.
             var caps = this._scene.getEngine().getCaps();
-            if (!useFullFloatFirst) {
+            if (!usefulFloatFirst) {
                 if (caps.textureHalfFloatRender && caps.textureHalfFloatLinearFiltering) {
                     this._textureType = BABYLON.Engine.TEXTURETYPE_HALF_FLOAT;
                 }
@@ -76916,14 +76916,14 @@ var BABYLON;
         Object.defineProperty(ShadowGenerator.prototype, "blurBoxOffset", {
             /**
              * Gets the blur box offset: offset applied during the blur pass.
-             * Only usefull if useKernelBlur = false
+             * Only useful if useKernelBlur = false
              */
             get: function () {
                 return this._blurBoxOffset;
             },
             /**
              * Sets the blur box offset: offset applied during the blur pass.
-             * Only usefull if useKernelBlur = false
+             * Only useful if useKernelBlur = false
              */
             set: function (value) {
                 if (this._blurBoxOffset === value) {
@@ -76960,14 +76960,14 @@ var BABYLON;
         Object.defineProperty(ShadowGenerator.prototype, "blurKernel", {
             /**
              * Gets the blur kernel: kernel size of the blur pass.
-             * Only usefull if useKernelBlur = true
+             * Only useful if useKernelBlur = true
              */
             get: function () {
                 return this._blurKernel;
             },
             /**
              * Sets the blur kernel: kernel size of the blur pass.
-             * Only usefull if useKernelBlur = true
+             * Only useful if useKernelBlur = true
              */
             set: function (value) {
                 if (this._blurKernel === value) {
@@ -76982,14 +76982,14 @@ var BABYLON;
         Object.defineProperty(ShadowGenerator.prototype, "useKernelBlur", {
             /**
              * Gets whether the blur pass is a kernel blur (if true) or box blur.
-             * Only usefull in filtered mode (useBlurExponentialShadowMap...)
+             * Only useful in filtered mode (useBlurExponentialShadowMap...)
              */
             get: function () {
                 return this._useKernelBlur;
             },
             /**
              * Sets whether the blur pass is a kernel blur (if true) or box blur.
-             * Only usefull in filtered mode (useBlurExponentialShadowMap...)
+             * Only useful in filtered mode (useBlurExponentialShadowMap...)
              */
             set: function (value) {
                 if (this._useKernelBlur === value) {
@@ -81532,7 +81532,7 @@ var BABYLON;
         };
         /**
          * Resets the refresh counter of the texture and start bak from scratch.
-         * Could be usefull to regenerate the texture if it is setup to render only once.
+         * Could be useful to regenerate the texture if it is setup to render only once.
          */
         ProceduralTexture.prototype.resetRefreshCounter = function () {
             this._currentRefreshId = -1;
@@ -85786,7 +85786,7 @@ var BABYLON;
         delete this._depthRenderer[camera.id];
     };
     /**
-     * Defines the Depth Renderer scene component responsible to manage a depth buffer usefull
+     * Defines the Depth Renderer scene component responsible to manage a depth buffer useful
      * in several rendering techniques.
      */
     var DepthRendererSceneComponent = /** @class */ (function () {
@@ -95387,7 +95387,7 @@ var BABYLON;
 var BABYLON;
 (function (BABYLON) {
     /**
-     * Helper class usefull to convert panorama picture to their cubemap representation in 6 faces.
+     * Helper class useful to convert panorama picture to their cubemap representation in 6 faces.
      */
     var PanoramaToCubeMapTools = /** @class */ (function () {
         function PanoramaToCubeMapTools() {
@@ -110154,7 +110154,7 @@ var BABYLON;
         return function () { return new VirtualJoysticksCamera(name, BABYLON.Vector3.Zero(), scene); };
     });
     /**
-     * This represents a free type of camera. It can be usefull in First Person Shooter game for instance.
+     * This represents a free type of camera. It can be useful in First Person Shooter game for instance.
      * It is identical to the Free Camera and simply adds by default a virtual joystick.
      * Virtual Joysticks are on-screen 2D graphics that are used to control the camera or other scene items.
      * @see http://doc.babylonjs.com/features/cameras#virtual-joysticks-camera
@@ -110162,7 +110162,7 @@ var BABYLON;
     var VirtualJoysticksCamera = /** @class */ (function (_super) {
         __extends(VirtualJoysticksCamera, _super);
         /**
-         * Intantiates a VirtualJoysticksCamera. It can be usefull in First Person Shooter game for instance.
+         * Intantiates a VirtualJoysticksCamera. It can be useful in First Person Shooter game for instance.
          * It is identical to the Free Camera and simply adds by default a virtual joystick.
          * Virtual Joysticks are on-screen 2D graphics that are used to control the camera or other scene items.
          * @see http://doc.babylonjs.com/features/cameras#virtual-joysticks-camera
@@ -115644,14 +115644,14 @@ var BABYLON;
 (function (BABYLON) {
     /**
      * This represents a full screen 2d layer.
-     * This can be usefull to display a picture in the  background of your scene for instance.
+     * This can be useful to display a picture in the  background of your scene for instance.
      * @see https://www.babylonjs-playground.com/#08A2BS#1
      */
     var Layer = /** @class */ (function () {
         /**
          * Instantiates a new layer.
          * This represents a full screen 2d layer.
-         * This can be usefull to display a picture in the  background of your scene for instance.
+         * This can be useful to display a picture in the  background of your scene for instance.
          * @see https://www.babylonjs-playground.com/#08A2BS#1
          * @param name Define the name of the layer in the scene
          * @param imgUrl Define the url of the texture to display in the layer

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

@@ -23000,7 +23000,7 @@ var BABYLON;
              * falling off base on range or angle.
              * This can be set to any values in Light.FALLOFF_x.
              *
-             * Note: This is only usefull for PBR Materials at the moment. This could be extended if required to
+             * Note: This is only useful for PBR Materials at the moment. This could be extended if required to
              * other types of materials.
              */
             _this.falloffType = Light.FALLOFF_DEFAULT;
@@ -23775,7 +23775,7 @@ var BABYLON;
             _this.mode = Camera.PERSPECTIVE_CAMERA;
             /**
              * Define wether the camera is intermediate.
-             * This is usefull to not present the output directly to the screen in case of rig without post process for instance
+             * This is useful to not present the output directly to the screen in case of rig without post process for instance
              */
             _this.isIntermediate = false;
             /**
@@ -23794,7 +23794,7 @@ var BABYLON;
             _this.fovMode = Camera.FOVMODE_VERTICAL_FIXED;
             /**
              * Rig mode of the camera.
-             * This is usefull to create the camera with two "eyes" instead of one to create VR or stereoscopic scenes.
+             * This is useful to create the camera with two "eyes" instead of one to create VR or stereoscopic scenes.
              * This is normally controlled byt the camera themselves as internal use.
              */
             _this.cameraRigMode = Camera.RIG_MODE_NONE;
@@ -23886,7 +23886,7 @@ var BABYLON;
             return "Camera";
         };
         /**
-         * Gets a string representation of the camera usefull for debug purpose.
+         * Gets a string representation of the camera useful for debug purpose.
          * @param fullDetails Defines that a more verboe level of logging is required
          * @returns the string representation
          */
@@ -32626,7 +32626,7 @@ var BABYLON;
             return serializationObject;
         };
         /**
-         * Get the current class name of the texture usefull for serialization or dynamic coding.
+         * Get the current class name of the texture useful for serialization or dynamic coding.
          * @returns "Texture"
          */
         Texture.prototype.getClassName = function () {
@@ -34614,7 +34614,7 @@ var BABYLON;
          * @param onSuccess is an optional Javascript function to be called just after the mesh is modified. It is passed the modified mesh and must return nothing.
          * @param uvOffset is an optional vector2 used to offset UV.
          * @param uvScale is an optional vector2 used to scale UV.
-         * @param forceUpdate defines whether or not to force an update of the generated buffers. This is usefull to apply on a deserialized model for instance.
+         * @param forceUpdate defines whether or not to force an update of the generated buffers. This is useful to apply on a deserialized model for instance.
          * @returns the Mesh.
          */
         Mesh.prototype.applyDisplacementMap = function (url, minHeight, maxHeight, onSuccess, uvOffset, uvScale, forceUpdate) {
@@ -34654,7 +34654,7 @@ var BABYLON;
          * @param onSuccess is an optional Javascript function to be called just after the mesh is modified. It is passed the modified mesh and must return nothing.
          * @param uvOffset is an optional vector2 used to offset UV.
          * @param uvScale is an optional vector2 used to scale UV.
-         * @param forceUpdate defines whether or not to force an update of the generated buffers. This is usefull to apply on a deserialized model for instance.
+         * @param forceUpdate defines whether or not to force an update of the generated buffers. This is useful to apply on a deserialized model for instance.
          * @returns the Mesh.
          */
         Mesh.prototype.applyDisplacementMapFromBuffer = function (buffer, heightMapWidth, heightMapHeight, minHeight, maxHeight, uvOffset, uvScale, forceUpdate) {
@@ -44033,7 +44033,7 @@ var BABYLON;
             _this.indexOfRefraction = 0.98;
             /**
              * Invert the refraction texture alongside the y axis.
-             * It can be usefull with procedural textures or probe for instance.
+             * It can be useful with procedural textures or probe for instance.
              * @see http://doc.babylonjs.com/how_to/reflect#how-to-obtain-reflections-and-refractions
              */
             _this.invertRefractionY = true;
@@ -46168,7 +46168,7 @@ var BABYLON;
              */
             _this._indexOfRefraction = 0.66;
             /**
-             * Controls if refraction needs to be inverted on Y. This could be usefull for procedural texture.
+             * Controls if refraction needs to be inverted on Y. This could be useful for procedural texture.
              */
             _this._invertRefractionY = false;
             /**
@@ -47704,7 +47704,7 @@ var BABYLON;
              */
             _this.indexOfRefraction = 0.66;
             /**
-             * Controls if refraction needs to be inverted on Y. This could be usefull for procedural texture.
+             * Controls if refraction needs to be inverted on Y. This could be useful for procedural texture.
              */
             _this.invertRefractionY = false;
             /**
@@ -49722,7 +49722,7 @@ var BABYLON;
         return function () { return new BABYLON.UniversalCamera(name, BABYLON.Vector3.Zero(), scene); };
     });
     /**
-     * This represents a free type of camera. It can be usefull in First Person Shooter game for instance.
+     * This represents a free type of camera. It can be useful in First Person Shooter game for instance.
      * Please consider using the new UniversalCamera instead as it adds more functionality like the gamepad.
      * @see http://doc.babylonjs.com/features/cameras#universal-camera
      */
@@ -49730,7 +49730,7 @@ var BABYLON;
         __extends(FreeCamera, _super);
         /**
          * Instantiates a Free Camera.
-         * This represents a free type of camera. It can be usefull in First Person Shooter game for instance.
+         * This represents a free type of camera. It can be useful in First Person Shooter game for instance.
          * Please consider using the new UniversalCamera instead as it adds more functionality like touch to this camera.
          * @see http://doc.babylonjs.com/features/cameras#universal-camera
          * @param name Define the name of the camera in the scene
@@ -74155,7 +74155,7 @@ var BABYLON;
         });
         /**
          * Resets the refresh counter of the texture and start bak from scratch.
-         * Could be usefull to regenerate the texture if it is setup to render only once.
+         * Could be useful to regenerate the texture if it is setup to render only once.
          */
         RenderTargetTexture.prototype.resetRefreshCounter = function () {
             this._currentRefreshId = -1;
@@ -75243,8 +75243,8 @@ var BABYLON;
             return _this;
         }
         /**
-         * Get the current class name of the texture usefull for serialization or dynamic coding.
-         * @returns "Texture"
+         * Get the current class name of the texture useful for serialization or dynamic coding.
+         * @returns "DynamicTexture"
          */
         DynamicTexture.prototype.getClassName = function () {
             return "DynamicTexture";
@@ -76811,9 +76811,9 @@ var BABYLON;
          * Documentation : http://doc.babylonjs.com/tutorials/shadows
          * @param mapSize The size of the texture what stores the shadows. Example : 1024.
          * @param light The light object generating the shadows.
-         * @param useFullFloatFirst By default the generator will try to use half float textures but if you need precision (for self shadowing for instance), you can use this option to enforce full float texture.
+         * @param usefulFloatFirst By default the generator will try to use half float textures but if you need precision (for self shadowing for instance), you can use this option to enforce full float texture.
          */
-        function ShadowGenerator(mapSize, light, useFullFloatFirst) {
+        function ShadowGenerator(mapSize, light, usefulFloatFirst) {
             this._bias = 0.00005;
             this._normalBias = 0;
             this._blurBoxOffset = 1;
@@ -76856,7 +76856,7 @@ var BABYLON;
             }
             // Texture type fallback from float to int if not supported.
             var caps = this._scene.getEngine().getCaps();
-            if (!useFullFloatFirst) {
+            if (!usefulFloatFirst) {
                 if (caps.textureHalfFloatRender && caps.textureHalfFloatLinearFiltering) {
                     this._textureType = BABYLON.Engine.TEXTURETYPE_HALF_FLOAT;
                 }
@@ -76916,14 +76916,14 @@ var BABYLON;
         Object.defineProperty(ShadowGenerator.prototype, "blurBoxOffset", {
             /**
              * Gets the blur box offset: offset applied during the blur pass.
-             * Only usefull if useKernelBlur = false
+             * Only useful if useKernelBlur = false
              */
             get: function () {
                 return this._blurBoxOffset;
             },
             /**
              * Sets the blur box offset: offset applied during the blur pass.
-             * Only usefull if useKernelBlur = false
+             * Only useful if useKernelBlur = false
              */
             set: function (value) {
                 if (this._blurBoxOffset === value) {
@@ -76960,14 +76960,14 @@ var BABYLON;
         Object.defineProperty(ShadowGenerator.prototype, "blurKernel", {
             /**
              * Gets the blur kernel: kernel size of the blur pass.
-             * Only usefull if useKernelBlur = true
+             * Only useful if useKernelBlur = true
              */
             get: function () {
                 return this._blurKernel;
             },
             /**
              * Sets the blur kernel: kernel size of the blur pass.
-             * Only usefull if useKernelBlur = true
+             * Only useful if useKernelBlur = true
              */
             set: function (value) {
                 if (this._blurKernel === value) {
@@ -76982,14 +76982,14 @@ var BABYLON;
         Object.defineProperty(ShadowGenerator.prototype, "useKernelBlur", {
             /**
              * Gets whether the blur pass is a kernel blur (if true) or box blur.
-             * Only usefull in filtered mode (useBlurExponentialShadowMap...)
+             * Only useful in filtered mode (useBlurExponentialShadowMap...)
              */
             get: function () {
                 return this._useKernelBlur;
             },
             /**
              * Sets whether the blur pass is a kernel blur (if true) or box blur.
-             * Only usefull in filtered mode (useBlurExponentialShadowMap...)
+             * Only useful in filtered mode (useBlurExponentialShadowMap...)
              */
             set: function (value) {
                 if (this._useKernelBlur === value) {
@@ -81532,7 +81532,7 @@ var BABYLON;
         };
         /**
          * Resets the refresh counter of the texture and start bak from scratch.
-         * Could be usefull to regenerate the texture if it is setup to render only once.
+         * Could be useful to regenerate the texture if it is setup to render only once.
          */
         ProceduralTexture.prototype.resetRefreshCounter = function () {
             this._currentRefreshId = -1;
@@ -85786,7 +85786,7 @@ var BABYLON;
         delete this._depthRenderer[camera.id];
     };
     /**
-     * Defines the Depth Renderer scene component responsible to manage a depth buffer usefull
+     * Defines the Depth Renderer scene component responsible to manage a depth buffer useful
      * in several rendering techniques.
      */
     var DepthRendererSceneComponent = /** @class */ (function () {
@@ -95387,7 +95387,7 @@ var BABYLON;
 var BABYLON;
 (function (BABYLON) {
     /**
-     * Helper class usefull to convert panorama picture to their cubemap representation in 6 faces.
+     * Helper class useful to convert panorama picture to their cubemap representation in 6 faces.
      */
     var PanoramaToCubeMapTools = /** @class */ (function () {
         function PanoramaToCubeMapTools() {
@@ -110154,7 +110154,7 @@ var BABYLON;
         return function () { return new VirtualJoysticksCamera(name, BABYLON.Vector3.Zero(), scene); };
     });
     /**
-     * This represents a free type of camera. It can be usefull in First Person Shooter game for instance.
+     * This represents a free type of camera. It can be useful in First Person Shooter game for instance.
      * It is identical to the Free Camera and simply adds by default a virtual joystick.
      * Virtual Joysticks are on-screen 2D graphics that are used to control the camera or other scene items.
      * @see http://doc.babylonjs.com/features/cameras#virtual-joysticks-camera
@@ -110162,7 +110162,7 @@ var BABYLON;
     var VirtualJoysticksCamera = /** @class */ (function (_super) {
         __extends(VirtualJoysticksCamera, _super);
         /**
-         * Intantiates a VirtualJoysticksCamera. It can be usefull in First Person Shooter game for instance.
+         * Intantiates a VirtualJoysticksCamera. It can be useful in First Person Shooter game for instance.
          * It is identical to the Free Camera and simply adds by default a virtual joystick.
          * Virtual Joysticks are on-screen 2D graphics that are used to control the camera or other scene items.
          * @see http://doc.babylonjs.com/features/cameras#virtual-joysticks-camera
@@ -115644,14 +115644,14 @@ var BABYLON;
 (function (BABYLON) {
     /**
      * This represents a full screen 2d layer.
-     * This can be usefull to display a picture in the  background of your scene for instance.
+     * This can be useful to display a picture in the  background of your scene for instance.
      * @see https://www.babylonjs-playground.com/#08A2BS#1
      */
     var Layer = /** @class */ (function () {
         /**
          * Instantiates a new layer.
          * This represents a full screen 2d layer.
-         * This can be usefull to display a picture in the  background of your scene for instance.
+         * This can be useful to display a picture in the  background of your scene for instance.
          * @see https://www.babylonjs-playground.com/#08A2BS#1
          * @param name Define the name of the layer in the scene
          * @param imgUrl Define the url of the texture to display in the layer

+ 20 - 2
dist/preview release/gui/babylon.gui.d.ts

@@ -112,9 +112,17 @@ declare module BABYLON.GUI {
             /**
                 * Returns an array containing the root container.
                 * This is mostly used to let the Inspector introspects the ADT
+                * @returns an array containing the rootContainer
                 */
             getChildren(): Array<Container>;
             /**
+                * Will return all controls that are inside this texture
+                * @param directDescendantsOnly defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered
+                * @param predicate defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored
+                * @return all child controls
+                */
+            getDescendants(directDescendantsOnly?: boolean, predicate?: (control: Control) => boolean): Control[];
+            /**
                 * Gets or sets the current focused control
                 */
             focusedControl: BABYLON.Nullable<IFocusableControl>;
@@ -834,6 +842,8 @@ declare module BABYLON.GUI {
             /** @hidden */
             _draw(parentMeasure: Measure, context: CanvasRenderingContext2D): void;
             /** @hidden */
+            _getDescendants(results: Control[], directDescendantsOnly?: boolean, predicate?: (control: Control) => boolean): void;
+            /** @hidden */
             _processPicking(x: number, y: number, type: number, pointerId: number, buttonIndex: number): boolean;
             /** @hidden */
             protected _clipForChildren(context: CanvasRenderingContext2D): void;
@@ -1191,6 +1201,15 @@ declare module BABYLON.GUI {
                 * @param scene defines the hosting scene
                 */
             moveToVector3(position: BABYLON.Vector3, scene: BABYLON.Scene): void;
+            /** @hidden */
+            _getDescendants(results: Control[], directDescendantsOnly?: boolean, predicate?: (control: Control) => boolean): void;
+            /**
+                * Will return all controls that have this control as ascendant
+                * @param directDescendantsOnly defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered
+                * @param predicate defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored
+                * @return all child controls
+                */
+            getDescendants(directDescendantsOnly?: boolean, predicate?: (control: Control) => boolean): Control[];
             /**
                 * Link current control with a target mesh
                 * @param mesh defines the mesh to link with
@@ -2490,14 +2509,13 @@ declare module BABYLON.GUI {
             name?: string | undefined);
             /**
                 * Gets a string representing the class name
-                * @returns current class name
                 */
             readonly typeName: string;
             /**
                 * Get the current class name of the control.
                 * @returns current class name
                 */
-            readonly getClassName: string;
+            getClassName(): string;
             protected _getTypeName(): string;
             /**
                 * Gets the transform node used by this control

Plik diff jest za duży
+ 1 - 1
dist/preview release/gui/babylon.gui.js


Plik diff jest za duży
+ 1 - 1
dist/preview release/gui/babylon.gui.min.js


Plik diff jest za duży
+ 1 - 1
dist/preview release/gui/babylon.gui.min.js.map


+ 40 - 4
dist/preview release/gui/babylon.gui.module.d.ts

@@ -157,9 +157,17 @@ declare module 'babylonjs-gui/2D/advancedDynamicTexture' {
             /**
                 * Returns an array containing the root container.
                 * This is mostly used to let the Inspector introspects the ADT
+                * @returns an array containing the rootContainer
                 */
             getChildren(): Array<Container>;
             /**
+                * Will return all controls that are inside this texture
+                * @param directDescendantsOnly defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered
+                * @param predicate defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored
+                * @return all child controls
+                */
+            getDescendants(directDescendantsOnly?: boolean, predicate?: (control: Control) => boolean): Control[];
+            /**
                 * Gets or sets the current focused control
                 */
             focusedControl: Nullable<IFocusableControl>;
@@ -933,6 +941,8 @@ declare module 'babylonjs-gui/2D/controls/container' {
             /** @hidden */
             _draw(parentMeasure: Measure, context: CanvasRenderingContext2D): void;
             /** @hidden */
+            _getDescendants(results: Control[], directDescendantsOnly?: boolean, predicate?: (control: Control) => boolean): void;
+            /** @hidden */
             _processPicking(x: number, y: number, type: number, pointerId: number, buttonIndex: number): boolean;
             /** @hidden */
             protected _clipForChildren(context: CanvasRenderingContext2D): void;
@@ -1298,6 +1308,15 @@ declare module 'babylonjs-gui/2D/controls/control' {
                 * @param scene defines the hosting scene
                 */
             moveToVector3(position: Vector3, scene: Scene): void;
+            /** @hidden */
+            _getDescendants(results: Control[], directDescendantsOnly?: boolean, predicate?: (control: Control) => boolean): void;
+            /**
+                * Will return all controls that have this control as ascendant
+                * @param directDescendantsOnly defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered
+                * @param predicate defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored
+                * @return all child controls
+                */
+            getDescendants(directDescendantsOnly?: boolean, predicate?: (control: Control) => boolean): Control[];
             /**
                 * Link current control with a target mesh
                 * @param mesh defines the mesh to link with
@@ -2680,14 +2699,13 @@ declare module 'babylonjs-gui/3D/controls/control3D' {
             name?: string | undefined);
             /**
                 * Gets a string representing the class name
-                * @returns current class name
                 */
             readonly typeName: string;
             /**
                 * Get the current class name of the control.
                 * @returns current class name
                 */
-            readonly getClassName: string;
+            getClassName(): string;
             protected _getTypeName(): string;
             /**
                 * Gets the transform node used by this control
@@ -3145,9 +3163,17 @@ declare module BABYLON.GUI {
             /**
                 * Returns an array containing the root container.
                 * This is mostly used to let the Inspector introspects the ADT
+                * @returns an array containing the rootContainer
                 */
             getChildren(): Array<Container>;
             /**
+                * Will return all controls that are inside this texture
+                * @param directDescendantsOnly defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered
+                * @param predicate defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored
+                * @return all child controls
+                */
+            getDescendants(directDescendantsOnly?: boolean, predicate?: (control: Control) => boolean): Control[];
+            /**
                 * Gets or sets the current focused control
                 */
             focusedControl: BABYLON.Nullable<IFocusableControl>;
@@ -3867,6 +3893,8 @@ declare module BABYLON.GUI {
             /** @hidden */
             _draw(parentMeasure: Measure, context: CanvasRenderingContext2D): void;
             /** @hidden */
+            _getDescendants(results: Control[], directDescendantsOnly?: boolean, predicate?: (control: Control) => boolean): void;
+            /** @hidden */
             _processPicking(x: number, y: number, type: number, pointerId: number, buttonIndex: number): boolean;
             /** @hidden */
             protected _clipForChildren(context: CanvasRenderingContext2D): void;
@@ -4224,6 +4252,15 @@ declare module BABYLON.GUI {
                 * @param scene defines the hosting scene
                 */
             moveToVector3(position: BABYLON.Vector3, scene: BABYLON.Scene): void;
+            /** @hidden */
+            _getDescendants(results: Control[], directDescendantsOnly?: boolean, predicate?: (control: Control) => boolean): void;
+            /**
+                * Will return all controls that have this control as ascendant
+                * @param directDescendantsOnly defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered
+                * @param predicate defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored
+                * @return all child controls
+                */
+            getDescendants(directDescendantsOnly?: boolean, predicate?: (control: Control) => boolean): Control[];
             /**
                 * Link current control with a target mesh
                 * @param mesh defines the mesh to link with
@@ -5523,14 +5560,13 @@ declare module BABYLON.GUI {
             name?: string | undefined);
             /**
                 * Gets a string representing the class name
-                * @returns current class name
                 */
             readonly typeName: string;
             /**
                 * Get the current class name of the control.
                 * @returns current class name
                 */
-            readonly getClassName: string;
+            getClassName(): string;
             protected _getTypeName(): string;
             /**
                 * Gets the transform node used by this control

Plik diff jest za duży
+ 1283 - 482
dist/preview release/inspector/babylon.inspector.bundle.js


Plik diff jest za duży
+ 1 - 1
dist/preview release/inspector/babylon.inspector.bundle.js.map


+ 7 - 8
dist/preview release/inspector/babylon.inspector.d.ts

@@ -3,14 +3,13 @@
 //   ../../../../Tools/Gulp/babylonjs
 declare module INSPECTOR {
 }
-declare module INSPECTOR {
-    export class Inspector {
-        static OnSelectionChangeObservable: BABYLON.Observable<string>;
-        static OnPropertyChangedObservable: BABYLON.Observable<PropertyChangedEvent>;
-        static readonly IsVisible: boolean;
-        static Show(scene: BABYLON.Scene, userOptions: Partial<BABYLON.IInspectorOptions>): void;
-        static Hide(): void;
-    }
+export declare class Inspector {
+    static OnSelectionChangeObservable: BABYLON.Observable<string>;
+    static OnPropertyChangedObservable: BABYLON.Observable<PropertyChangedEvent>;
+    static readonly IsVisible: boolean;
+    static EarlyAttachToLoader(): void;
+    static Show(scene: BABYLON.Scene, userOptions: Partial<BABYLON.IInspectorOptions>): void;
+    static Hide(): void;
 }
 declare module INSPECTOR {
     export class PropertyChangedEvent {

+ 16 - 18
dist/preview release/inspector/babylon.inspector.module.d.ts

@@ -6,16 +6,15 @@ declare module 'babylonjs-inspector' {
     export * from "babylonjs-inspector/inspector";
 }
 
-declare module 'babylonjs-inspector/inspector' {
-    import { Scene, Observable, IInspectorOptions } from "babylonjs";
-    import { PropertyChangedEvent } from "babylonjs-inspector/components/propertyChangedEvent";
-    export class Inspector {
-        static OnSelectionChangeObservable: Observable<string>;
-        static OnPropertyChangedObservable: Observable<PropertyChangedEvent>;
-        static readonly IsVisible: boolean;
-        static Show(scene: Scene, userOptions: Partial<IInspectorOptions>): void;
-        static Hide(): void;
-    }
+import { Scene, Observable, IInspectorOptions } from "babylonjs";
+import { PropertyChangedEvent } from "babylonjs-inspector/components/propertyChangedEvent";
+export declare class Inspector {
+    static OnSelectionChangeObservable: Observable<string>;
+    static OnPropertyChangedObservable: Observable<PropertyChangedEvent>;
+    static readonly IsVisible: boolean;
+    static EarlyAttachToLoader(): void;
+    static Show(scene: Scene, userOptions: Partial<IInspectorOptions>): void;
+    static Hide(): void;
 }
 
 declare module 'babylonjs-inspector/components/propertyChangedEvent' {
@@ -33,14 +32,13 @@ declare module 'babylonjs-inspector/components/propertyChangedEvent' {
 //   ../../../../Tools/Gulp/babylonjs
 declare module INSPECTOR {
 }
-declare module INSPECTOR {
-    export class Inspector {
-        static OnSelectionChangeObservable: BABYLON.Observable<string>;
-        static OnPropertyChangedObservable: BABYLON.Observable<PropertyChangedEvent>;
-        static readonly IsVisible: boolean;
-        static Show(scene: BABYLON.Scene, userOptions: Partial<BABYLON.IInspectorOptions>): void;
-        static Hide(): void;
-    }
+export declare class Inspector {
+    static OnSelectionChangeObservable: BABYLON.Observable<string>;
+    static OnPropertyChangedObservable: BABYLON.Observable<PropertyChangedEvent>;
+    static readonly IsVisible: boolean;
+    static EarlyAttachToLoader(): void;
+    static Show(scene: BABYLON.Scene, userOptions: Partial<BABYLON.IInspectorOptions>): void;
+    static Hide(): void;
 }
 declare module INSPECTOR {
     export class PropertyChangedEvent {

+ 1 - 15
dist/preview release/viewer/babylon.viewer.d.ts

@@ -924,7 +924,7 @@ declare module BabylonViewer {
       * @param name the name of the custom optimizer configuration
       * @param upgrade set to true if you want to upgrade optimizer and false if you want to degrade
       */
-    export function getCustomOptimizerByName(name: string, upgrade?: boolean): typeof extendedUpgrade;
+    export function getCustomOptimizerByName(name: string, upgrade?: boolean): (sceneManager: SceneManager) => boolean;
     export function registerCustomOptimizer(name: string, optimizer: (sceneManager: SceneManager) => boolean): void;
 }
 declare module BabylonViewer {
@@ -1558,20 +1558,6 @@ declare module BabylonViewer {
     export function addLoaderPlugin(name: string, plugin: ILoaderPlugin): void;
 }
 declare module BabylonViewer {
-    /**
-        * A custom upgrade-oriented function configuration for the scene optimizer.
-        *
-        * @param viewer the viewer to optimize
-        */
-    export function extendedUpgrade(sceneManager: SceneManager): boolean;
-    /**
-        * A custom degrade-oriented function configuration for the scene optimizer.
-        *
-        * @param viewer the viewer to optimize
-        */
-    export function extendedDegrade(sceneManager: SceneManager): boolean;
-}
-declare module BabylonViewer {
 }
 declare module BabylonViewer {
     export interface IEnvironmentMapConfiguration {

Plik diff jest za duży
+ 1 - 1
dist/preview release/viewer/babylon.viewer.js


Plik diff jest za duży
+ 4 - 4
dist/preview release/viewer/babylon.viewer.max.js


+ 1 - 18
dist/preview release/viewer/babylon.viewer.module.d.ts

@@ -985,14 +985,13 @@ declare module 'babylonjs-viewer/templating/viewerTemplatePlugin' {
 }
 
 declare module 'babylonjs-viewer/optimizer/custom' {
-    import { extendedUpgrade } from "babylonjs-viewer/optimizer/custom/extended";
     import { SceneManager } from "babylonjs-viewer/managers/sceneManager";
     /**
       *
       * @param name the name of the custom optimizer configuration
       * @param upgrade set to true if you want to upgrade optimizer and false if you want to degrade
       */
-    export function getCustomOptimizerByName(name: string, upgrade?: boolean): typeof extendedUpgrade;
+    export function getCustomOptimizerByName(name: string, upgrade?: boolean): (sceneManager: SceneManager) => boolean;
     export function registerCustomOptimizer(name: string, optimizer: (sceneManager: SceneManager) => boolean): void;
 }
 
@@ -1663,22 +1662,6 @@ declare module 'babylonjs-viewer/loader/plugins' {
     export function addLoaderPlugin(name: string, plugin: ILoaderPlugin): void;
 }
 
-declare module 'babylonjs-viewer/optimizer/custom/extended' {
-    import { SceneManager } from 'babylonjs-viewer/managers/sceneManager';
-    /**
-        * A custom upgrade-oriented function configuration for the scene optimizer.
-        *
-        * @param viewer the viewer to optimize
-        */
-    export function extendedUpgrade(sceneManager: SceneManager): boolean;
-    /**
-        * A custom degrade-oriented function configuration for the scene optimizer.
-        *
-        * @param viewer the viewer to optimize
-        */
-    export function extendedDegrade(sceneManager: SceneManager): boolean;
-}
-
 declare module 'babylonjs-viewer/configuration/interfaces' {
     export * from 'babylonjs-viewer/configuration/interfaces/cameraConfiguration';
     export * from 'babylonjs-viewer/configuration/interfaces/colorGradingConfiguration';

+ 1 - 0
gui/src/2D/advancedDynamicTexture.ts

@@ -211,6 +211,7 @@ export class AdvancedDynamicTexture extends DynamicTexture {
     /**
      * Returns an array containing the root container.
      * This is mostly used to let the Inspector introspects the ADT
+     * @returns an array containing the rootContainer
      */
     public getChildren(): Array<Container> {
         return [this._rootContainer];

+ 1 - 2
gui/src/3D/controls/control3D.ts

@@ -196,7 +196,6 @@ export class Control3D implements IDisposable, IBehaviorAware<Control3D> {
 
     /**
      * Gets a string representing the class name
-     * @returns current class name
      */
     public get typeName(): string {
         return this._getTypeName();
@@ -206,7 +205,7 @@ export class Control3D implements IDisposable, IBehaviorAware<Control3D> {
      * Get the current class name of the control.
      * @returns current class name
      */
-    public get getClassName(): string {
+    public getClassName(): string {
         return this._getTypeName();
     }
 

+ 1 - 1
inspector/package.json

@@ -37,7 +37,7 @@
         "gulp": "~4.0.0",
         "gulp-webserver": "~0.9.1",
         "mini-css-extract-plugin": "~0.4.4",
-        "node-sass": "~4.9.4",
+        "node-sass": "~4.10.0",
         "re-resizable": "~4.9.1",
         "react": "~16.5.2",
         "react-dom": "~16.5.2",

+ 2 - 2
inspector/src/Inspector.ts

@@ -7,7 +7,7 @@ import { Scene, Observable, Observer, Nullable, IInspectorOptions } from "babylo
 import { EmbedHostComponent } from "./components/embedHost/embedHostComponent";
 import { PropertyChangedEvent } from "./components/propertyChangedEvent";
 import { GlobalState } from "./components/globalState";
-import { GLTFFileLoader } from "babylonjs-loaders"
+import { GLTFFileLoader } from "babylonjs-loaders";
 
 interface IInternalInspectorOptions extends IInspectorOptions {
     popup: boolean;
@@ -190,7 +190,7 @@ export class Inspector {
             const host = parentControl.ownerDocument!.createElement("div");
 
             host.id = "embed-host";
-            host.style.width = options.embedHostWidth || "300px";
+            host.style.width = options.embedHostWidth || "auto";
 
             parentControl.appendChild(host);
 

+ 2 - 5
inspector/src/components/actionTabs/tabs/propertyGrids/gridPropertyGridComponent.tsx

@@ -26,9 +26,6 @@ export class GridPropertyGridComponent extends React.Component<IGridPropertyGrid
         }
     }
 
-    componentWillUnmount() {
-    }
-
     addOrRemoveGrid() {
         const scene = BABYLON.UtilityLayerRenderer.DefaultKeepDepthUtilityLayer.utilityLayerScene;
 
@@ -49,8 +46,8 @@ export class GridPropertyGridComponent extends React.Component<IGridPropertyGrid
             if (!this._gridMesh.metadata) {
                 this._gridMesh.metadata = {};
             }
-            this._gridMesh.scaling.x = width;
-            this._gridMesh.scaling.z = depth;
+            this._gridMesh.scaling.x = Math.max(width, depth);
+            this._gridMesh.scaling.z = this._gridMesh.scaling.x;
             this._gridMesh.metadata.isInspectorGrid = true;
             this._gridMesh.isPickable = false;
 

+ 4 - 1
inspector/src/components/actionTabs/tabs/propertyGrids/materials/texturePropertyGridComponent.tsx

@@ -42,7 +42,10 @@ export class TexturePropertyGridComponent extends React.Component<ITextureProper
                     <TextLineComponent label="Is render target" value={texture.isRenderTarget ? "Yes" : "No"} />
                     <TextLineComponent label="Has mipmaps" value={!texture.noMipmap ? "Yes" : "No"} />
                     <SliderLineComponent label="UV set" target={texture} propertyName="coordinatesIndex" minimum={0} maximum={3} step={1} onPropertyChangedObservable={this.props.onPropertyChangedObservable} />
-                    <OptionsLineComponent label="Sampling" options={samplingMode} target={texture} noDirectUpdate={true} propertyName="samplingMode" onPropertyChangedObservable={this.props.onPropertyChangedObservable} onSelect={value => texture.updateSamplingMode(value)} />
+                    {
+                        texture.updateSamplingMode && 
+                        <OptionsLineComponent label="Sampling" options={samplingMode} target={texture} noDirectUpdate={true} propertyName="samplingMode" onPropertyChangedObservable={this.props.onPropertyChangedObservable} onSelect={value => texture.updateSamplingMode(value)} />
+                    }
                 </LineContainerComponent>
                 {
                     adtTexture &&

+ 0 - 6
inspector/src/components/embedHost/embedHost.scss

@@ -76,12 +76,6 @@
         }
     }
 
-    .noPopup {
-        .panes {
-            margin-bottom: 5px;
-        }
-    }
-
     #split {
         grid-row: 2;
         overflow: hidden;

+ 2 - 2
inspector/src/components/globalState.ts

@@ -1,7 +1,7 @@
 import { Observable, ISceneLoaderPlugin, ISceneLoaderPluginAsync, Observer, Nullable } from "babylonjs";
 import { PropertyChangedEvent } from "./propertyChangedEvent";
-import { IGLTFLoaderExtension, GLTFFileLoader } from "babylonjs-loaders"
-import { } from "babylonjs-gltf2interface"
+import { IGLTFLoaderExtension, GLTFFileLoader } from "babylonjs-loaders";
+import { } from "babylonjs-gltf2interface";
 
 export class GlobalState {
     public onSelectionChangedObservable: Observable<string>;