sebastien hace 6 años
padre
commit
9f98814b47
Se han modificado 68 ficheros con 207816 adiciones y 213619 borrados
  1. 11073 11029
      Playground/babylon.d.txt
  2. BIN
      Playground/scenes/pumpkinBucketCarved.glb
  3. 1 12317
      dist/preview release/Oimo.js
  4. 50889 0
      dist/preview release/babylon.d.ts
  5. 1 2
      dist/preview release/babylon.js
  6. 120372 146109
      dist/preview release/babylon.max.js
  7. 300 194
      dist/preview release/babylon.no-module.max.js
  8. 1 0
      dist/preview release/babylon.worker.js
  9. 302 196
      dist/preview release/es6.js
  10. 1 1
      dist/preview release/glTF2Interface/package.json
  11. 16 0
      dist/preview release/gui/babylon.gui.d.ts
  12. 2 0
      dist/preview release/gui/babylon.gui.js
  13. 2 5
      dist/preview release/gui/babylon.gui.min.js
  14. 1 4
      dist/preview release/gui/babylon.gui.min.js.map
  15. 208 190
      dist/preview release/gui/babylon.gui.module.d.ts
  16. 2 2
      dist/preview release/gui/package.json
  17. 5 1
      dist/preview release/inspector/babylon.inspector.bundle.js.map
  18. 5 5
      dist/preview release/inspector/package.json
  19. 2948 3254
      dist/preview release/loaders/babylon.glTF1FileLoader.js
  20. 1 3267
      dist/preview release/loaders/babylon.glTF1FileLoader.min.js
  21. 21 15
      dist/preview release/loaders/babylon.glTF2FileLoader.d.ts
  22. 3737 4021
      dist/preview release/loaders/babylon.glTF2FileLoader.js
  23. 1 4021
      dist/preview release/loaders/babylon.glTF2FileLoader.min.js
  24. 21 15
      dist/preview release/loaders/babylon.glTFFileLoader.d.ts
  25. 5906 6296
      dist/preview release/loaders/babylon.glTFFileLoader.js
  26. 1 6335
      dist/preview release/loaders/babylon.glTFFileLoader.min.js
  27. 885 1116
      dist/preview release/loaders/babylon.objFileLoader.js
  28. 1 1117
      dist/preview release/loaders/babylon.objFileLoader.min.js
  29. 173 415
      dist/preview release/loaders/babylon.stlFileLoader.js
  30. 1 415
      dist/preview release/loaders/babylon.stlFileLoader.min.js
  31. 1857 1737
      dist/preview release/loaders/babylonjs.loaders.d.ts
  32. 7009 7623
      dist/preview release/loaders/babylonjs.loaders.js
  33. 1 2
      dist/preview release/loaders/babylonjs.loaders.min.js
  34. 1863 3618
      dist/preview release/loaders/babylonjs.loaders.module.d.ts
  35. 3 3
      dist/preview release/loaders/package.json
  36. 2 2
      dist/preview release/materialsLibrary/package.json
  37. 2 2
      dist/preview release/postProcessesLibrary/package.json
  38. 2 2
      dist/preview release/proceduralTexturesLibrary/package.json
  39. 3 3
      dist/preview release/serializers/package.json
  40. 3 174
      dist/preview release/viewer/babylon.viewer.d.ts
  41. 2 2
      dist/preview release/viewer/babylon.viewer.js
  42. 4 4
      dist/preview release/viewer/babylon.viewer.max.js
  43. 5 18
      dist/preview release/viewer/babylon.viewer.module.d.ts
  44. 5 1
      dist/preview release/what's new.md
  45. 17 4
      gui/src/2D/controls/control.ts
  46. 1 1
      package.json
  47. 19 6
      src/Cameras/VR/vrExperienceHelper.ts
  48. 1 0
      src/Cameras/XR/webXRCamera.ts
  49. 3 0
      src/Cameras/XR/webXRExperienceHelper.ts
  50. 2 1
      src/Cameras/XR/webXRSessionManager.ts
  51. 13 1
      src/Cameras/targetCamera.ts
  52. 13 7
      src/Engine/engine.ts
  53. 1 1
      src/Gamepad/Controllers/poseEnabledController.ts
  54. 9 9
      src/Gamepad/Controllers/windowsMotionController.ts
  55. 7 0
      src/Materials/Textures/baseTexture.ts
  56. 8 0
      src/Materials/multiMaterial.ts
  57. 1 1
      src/Math/math.ts
  58. 7 5
      src/Mesh/abstractMesh.ts
  59. 36 17
      src/Mesh/linesMesh.ts
  60. 0 1
      src/Mesh/mesh.ts
  61. 2 4
      src/Mesh/subMesh.ts
  62. 0 8
      src/Physics/Plugins/oimoJSPlugin.ts
  63. 1 1
      src/Physics/physicsImpostor.ts
  64. 6 11
      src/Rendering/edgesRenderer.ts
  65. 0 4
      src/Shaders/background.vertex.fx
  66. 3 2
      src/node.ts
  67. 27 1
      src/scene.ts
  68. 1 1
      tests/validation/config.json

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 11073 - 11029
Playground/babylon.d.txt


BIN
Playground/scenes/pumpkinBucketCarved.glb


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 12317
dist/preview release/Oimo.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 50889 - 0
dist/preview release/babylon.d.ts


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 2
dist/preview release/babylon.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 120372 - 146109
dist/preview release/babylon.max.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 300 - 194
dist/preview release/babylon.no-module.max.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 0
dist/preview release/babylon.worker.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 302 - 196
dist/preview release/es6.js


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

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

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

@@ -2,6 +2,14 @@
 // Dependencies for this module:
 //   ../../../../Tools/Gulp/babylonjs
 declare module BABYLON.GUI {
+}
+declare module BABYLON.GUI {
+}
+declare module BABYLON.GUI {
+}
+declare module BABYLON.GUI {
+}
+declare module BABYLON.GUI {
     /**
         * Interface used to define a control that can receive focus
         */
@@ -490,6 +498,10 @@ declare module BABYLON.GUI {
     }
 }
 declare module BABYLON.GUI {
+}
+declare module BABYLON.GUI {
+}
+declare module BABYLON.GUI {
     /**
         * Class used to manage 3D user interface
         * @see http://doc.babylonjs.com/how_to/gui3d
@@ -807,6 +819,10 @@ declare module BABYLON.GUI {
     export class Control {
             /** defines the name of the control */
             name?: string | undefined;
+            /**
+                * Gets or sets a boolean indicating if alpha must be an inherited value (false by default)
+                */
+            static AllowAlphaInheritance: boolean;
             /** @hidden */
             _root: BABYLON.Nullable<Container>;
             /** @hidden */

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 2 - 0
dist/preview release/gui/babylon.gui.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 2 - 5
dist/preview release/gui/babylon.gui.min.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 4
dist/preview release/gui/babylon.gui.min.js.map


+ 208 - 190
dist/preview release/gui/babylon.gui.module.d.ts

@@ -3,58 +3,58 @@
 //   ../../../../Tools/Gulp/babylonjs
 
 declare module 'babylonjs-gui' {
-    export * from "babylonjs-gui/src/2D";
-    export * from "babylonjs-gui/src/3D";
+    export * from "babylonjs-gui/2D";
+    export * from "babylonjs-gui/3D";
 }
 
-declare module 'babylonjs-gui/src/2D' {
-    export * from "babylonjs-gui/src/2D/controls";
-    export * from "babylonjs-gui/src/2D/advancedDynamicTexture";
-    export * from "babylonjs-gui/src/2D/math2D";
-    export * from "babylonjs-gui/src/2D/measure";
-    export * from "babylonjs-gui/src/2D/multiLinePoint";
-    export * from "babylonjs-gui/src/2D/style";
-    export * from "babylonjs-gui/src/2D/valueAndUnit";
+declare module 'babylonjs-gui/2D' {
+    export * from "babylonjs-gui/2D/controls";
+    export * from "babylonjs-gui/2D/advancedDynamicTexture";
+    export * from "babylonjs-gui/2D/math2D";
+    export * from "babylonjs-gui/2D/measure";
+    export * from "babylonjs-gui/2D/multiLinePoint";
+    export * from "babylonjs-gui/2D/style";
+    export * from "babylonjs-gui/2D/valueAndUnit";
 }
 
-declare module 'babylonjs-gui/src/3D' {
-    export * from "babylonjs-gui/src/3D/controls";
-    export * from "babylonjs-gui/src/3D/materials";
-    export * from "babylonjs-gui/src/3D/gui3DManager";
-    export * from "babylonjs-gui/src/3D/vector3WithInfo";
+declare module 'babylonjs-gui/3D' {
+    export * from "babylonjs-gui/3D/controls";
+    export * from "babylonjs-gui/3D/materials";
+    export * from "babylonjs-gui/3D/gui3DManager";
+    export * from "babylonjs-gui/3D/vector3WithInfo";
 }
 
-declare module 'babylonjs-gui/src/2D/controls' {
-    export * from "babylonjs-gui/src/2D/controls/button";
-    export * from "babylonjs-gui/src/2D/controls/checkbox";
-    export * from "babylonjs-gui/src/2D/controls/colorpicker";
-    export * from "babylonjs-gui/src/2D/controls/container";
-    export * from "babylonjs-gui/src/2D/controls/control";
-    export * from "babylonjs-gui/src/2D/controls/ellipse";
-    export * from "babylonjs-gui/src/2D/controls/grid";
-    export * from "babylonjs-gui/src/2D/controls/image";
-    export * from "babylonjs-gui/src/2D/controls/inputText";
-    export * from "babylonjs-gui/src/2D/controls/inputPassword";
-    export * from "babylonjs-gui/src/2D/controls/line";
-    export * from "babylonjs-gui/src/2D/controls/multiLine";
-    export * from "babylonjs-gui/src/2D/controls/radioButton";
-    export * from "babylonjs-gui/src/2D/controls/stackPanel";
-    export * from "babylonjs-gui/src/2D/controls/selector";
-    export * from "babylonjs-gui/src/2D/controls/textBlock";
-    export * from "babylonjs-gui/src/2D/controls/virtualKeyboard";
-    export * from "babylonjs-gui/src/2D/controls/rectangle";
-    export * from "babylonjs-gui/src/2D/controls/displayGrid";
-    export * from "babylonjs-gui/src/2D/controls/baseSlider";
-    export * from "babylonjs-gui/src/2D/controls/slider";
-    export * from "babylonjs-gui/src/2D/controls/imageBasedSlider";
-    export * from "babylonjs-gui/src/2D/controls/statics";
+declare module 'babylonjs-gui/2D/controls' {
+    export * from "babylonjs-gui/2D/controls/button";
+    export * from "babylonjs-gui/2D/controls/checkbox";
+    export * from "babylonjs-gui/2D/controls/colorpicker";
+    export * from "babylonjs-gui/2D/controls/container";
+    export * from "babylonjs-gui/2D/controls/control";
+    export * from "babylonjs-gui/2D/controls/ellipse";
+    export * from "babylonjs-gui/2D/controls/grid";
+    export * from "babylonjs-gui/2D/controls/image";
+    export * from "babylonjs-gui/2D/controls/inputText";
+    export * from "babylonjs-gui/2D/controls/inputPassword";
+    export * from "babylonjs-gui/2D/controls/line";
+    export * from "babylonjs-gui/2D/controls/multiLine";
+    export * from "babylonjs-gui/2D/controls/radioButton";
+    export * from "babylonjs-gui/2D/controls/stackPanel";
+    export * from "babylonjs-gui/2D/controls/selector";
+    export * from "babylonjs-gui/2D/controls/textBlock";
+    export * from "babylonjs-gui/2D/controls/virtualKeyboard";
+    export * from "babylonjs-gui/2D/controls/rectangle";
+    export * from "babylonjs-gui/2D/controls/displayGrid";
+    export * from "babylonjs-gui/2D/controls/baseSlider";
+    export * from "babylonjs-gui/2D/controls/slider";
+    export * from "babylonjs-gui/2D/controls/imageBasedSlider";
+    export * from "babylonjs-gui/2D/controls/statics";
 }
 
-declare module 'babylonjs-gui/src/2D/advancedDynamicTexture' {
+declare module 'babylonjs-gui/2D/advancedDynamicTexture' {
     import { DynamicTexture, Nullable, Layer, Viewport, Scene, Vector3, Matrix, Vector2, AbstractMesh } from "babylonjs";
-    import { Container } from "babylonjs-gui/src/2D/controls/container";
-    import { Control } from "babylonjs-gui/src/2D/controls/control";
-    import { Style } from "babylonjs-gui/src/2D/style";
+    import { Container } from "babylonjs-gui/2D/controls/container";
+    import { Control } from "babylonjs-gui/2D/controls/control";
+    import { Style } from "babylonjs-gui/2D/style";
     /**
         * Interface used to define a control that can receive focus
         */
@@ -252,7 +252,7 @@ declare module 'babylonjs-gui/src/2D/advancedDynamicTexture' {
     }
 }
 
-declare module 'babylonjs-gui/src/2D/math2D' {
+declare module 'babylonjs-gui/2D/math2D' {
     import { Vector2, Nullable } from "babylonjs";
     /**
         * Class used to transport Vector2 information for pointer events
@@ -359,7 +359,7 @@ declare module 'babylonjs-gui/src/2D/math2D' {
     }
 }
 
-declare module 'babylonjs-gui/src/2D/measure' {
+declare module 'babylonjs-gui/2D/measure' {
     /**
         * Class used to store 2D control sizes
         */
@@ -415,9 +415,9 @@ declare module 'babylonjs-gui/src/2D/measure' {
     }
 }
 
-declare module 'babylonjs-gui/src/2D/multiLinePoint' {
-    import { MultiLine } from "babylonjs-gui/src/2D/controls/multiLine";
-    import { Control } from "babylonjs-gui/src/2D/controls/control";
+declare module 'babylonjs-gui/2D/multiLinePoint' {
+    import { MultiLine } from "babylonjs-gui/2D/controls/multiLine";
+    import { Control } from "babylonjs-gui/2D/controls/control";
     import { AbstractMesh, Nullable, Vector2 } from "babylonjs";
     /**
         * Class used to store a point for a MultiLine object.
@@ -451,10 +451,10 @@ declare module 'babylonjs-gui/src/2D/multiLinePoint' {
     }
 }
 
-declare module 'babylonjs-gui/src/2D/style' {
+declare module 'babylonjs-gui/2D/style' {
     import { IDisposable, Observable } from "babylonjs";
-    import { AdvancedDynamicTexture } from "babylonjs-gui/src/2D/advancedDynamicTexture";
-    import { ValueAndUnit } from "babylonjs-gui/src/2D/valueAndUnit";
+    import { AdvancedDynamicTexture } from "babylonjs-gui/2D/advancedDynamicTexture";
+    import { ValueAndUnit } from "babylonjs-gui/2D/valueAndUnit";
     /**
         * Define a style used by control to automatically setup properties based on a template.
         * Only support font related properties so far
@@ -492,8 +492,8 @@ declare module 'babylonjs-gui/src/2D/style' {
     }
 }
 
-declare module 'babylonjs-gui/src/2D/valueAndUnit' {
-    import { AdvancedDynamicTexture } from "babylonjs-gui/src/2D/advancedDynamicTexture";
+declare module 'babylonjs-gui/2D/valueAndUnit' {
+    import { AdvancedDynamicTexture } from "babylonjs-gui/2D/advancedDynamicTexture";
     /**
         * Class used to specific a value and its associated unit
         */
@@ -556,29 +556,29 @@ declare module 'babylonjs-gui/src/2D/valueAndUnit' {
     }
 }
 
-declare module 'babylonjs-gui/src/3D/controls' {
-    export * from "babylonjs-gui/src/3D/controls/abstractButton3D";
-    export * from "babylonjs-gui/src/3D/controls/button3D";
-    export * from "babylonjs-gui/src/3D/controls/container3D";
-    export * from "babylonjs-gui/src/3D/controls/control3D";
-    export * from "babylonjs-gui/src/3D/controls/cylinderPanel";
-    export * from "babylonjs-gui/src/3D/controls/holographicButton";
-    export * from "babylonjs-gui/src/3D/controls/meshButton3D";
-    export * from "babylonjs-gui/src/3D/controls/planePanel";
-    export * from "babylonjs-gui/src/3D/controls/scatterPanel";
-    export * from "babylonjs-gui/src/3D/controls/spherePanel";
-    export * from "babylonjs-gui/src/3D/controls/stackPanel3D";
-    export * from "babylonjs-gui/src/3D/controls/volumeBasedPanel";
+declare module 'babylonjs-gui/3D/controls' {
+    export * from "babylonjs-gui/3D/controls/abstractButton3D";
+    export * from "babylonjs-gui/3D/controls/button3D";
+    export * from "babylonjs-gui/3D/controls/container3D";
+    export * from "babylonjs-gui/3D/controls/control3D";
+    export * from "babylonjs-gui/3D/controls/cylinderPanel";
+    export * from "babylonjs-gui/3D/controls/holographicButton";
+    export * from "babylonjs-gui/3D/controls/meshButton3D";
+    export * from "babylonjs-gui/3D/controls/planePanel";
+    export * from "babylonjs-gui/3D/controls/scatterPanel";
+    export * from "babylonjs-gui/3D/controls/spherePanel";
+    export * from "babylonjs-gui/3D/controls/stackPanel3D";
+    export * from "babylonjs-gui/3D/controls/volumeBasedPanel";
 }
 
-declare module 'babylonjs-gui/src/3D/materials' {
-    export * from "babylonjs-gui/src/3D/materials/fluentMaterial";
+declare module 'babylonjs-gui/3D/materials' {
+    export * from "babylonjs-gui/3D/materials/fluentMaterial";
 }
 
-declare module 'babylonjs-gui/src/3D/gui3DManager' {
+declare module 'babylonjs-gui/3D/gui3DManager' {
     import { IDisposable, Scene, Nullable, UtilityLayerRenderer, Observable, Vector3, Material } from "babylonjs";
-    import { Container3D } from "babylonjs-gui/src/3D/controls/container3D";
-    import { Control3D } from "babylonjs-gui/src/3D/controls/control3D";
+    import { Container3D } from "babylonjs-gui/3D/controls/container3D";
+    import { Control3D } from "babylonjs-gui/3D/controls/control3D";
     /**
         * Class used to manage 3D user interface
         * @see http://doc.babylonjs.com/how_to/gui3d
@@ -640,7 +640,7 @@ declare module 'babylonjs-gui/src/3D/gui3DManager' {
     }
 }
 
-declare module 'babylonjs-gui/src/3D/vector3WithInfo' {
+declare module 'babylonjs-gui/3D/vector3WithInfo' {
     import { Vector3 } from "babylonjs";
     /**
         * Class used to transport Vector3 information for pointer events
@@ -659,11 +659,11 @@ declare module 'babylonjs-gui/src/3D/vector3WithInfo' {
     }
 }
 
-declare module 'babylonjs-gui/src/2D/controls/button' {
-    import { Rectangle } from "babylonjs-gui/src/2D/controls/rectangle";
-    import { Control } from "babylonjs-gui/src/2D/controls/control";
-    import { TextBlock } from "babylonjs-gui/src/2D/controls/textBlock";
-    import { Image } from "babylonjs-gui/src/2D/controls/image";
+declare module 'babylonjs-gui/2D/controls/button' {
+    import { Rectangle } from "babylonjs-gui/2D/controls/rectangle";
+    import { Control } from "babylonjs-gui/2D/controls/control";
+    import { TextBlock } from "babylonjs-gui/2D/controls/textBlock";
+    import { Image } from "babylonjs-gui/2D/controls/image";
     import { Vector2, Nullable } from "babylonjs";
     /**
         * Class used to create 2D buttons
@@ -743,11 +743,11 @@ declare module 'babylonjs-gui/src/2D/controls/button' {
     }
 }
 
-declare module 'babylonjs-gui/src/2D/controls/checkbox' {
-    import { Control } from "babylonjs-gui/src/2D/controls/control";
-    import { Measure } from "babylonjs-gui/src/2D/measure";
+declare module 'babylonjs-gui/2D/controls/checkbox' {
+    import { Control } from "babylonjs-gui/2D/controls/control";
+    import { Measure } from "babylonjs-gui/2D/measure";
     import { Observable, Vector2 } from "babylonjs";
-    import { StackPanel } from "babylonjs-gui/src/2D/controls/stackPanel";
+    import { StackPanel } from "babylonjs-gui/2D/controls/stackPanel";
     /**
         * Class used to represent a 2D checkbox
         */
@@ -785,10 +785,10 @@ declare module 'babylonjs-gui/src/2D/controls/checkbox' {
     }
 }
 
-declare module 'babylonjs-gui/src/2D/controls/colorpicker' {
-    import { Control } from "babylonjs-gui/src/2D/controls/control";
+declare module 'babylonjs-gui/2D/controls/colorpicker' {
+    import { Control } from "babylonjs-gui/2D/controls/control";
     import { Color3, Observable, Vector2 } from "babylonjs";
-    import { Measure } from "babylonjs-gui/src/2D/measure";
+    import { Measure } from "babylonjs-gui/2D/measure";
     /** Class used to create color pickers */
     export class ColorPicker extends Control {
             name?: string | undefined;
@@ -818,11 +818,11 @@ declare module 'babylonjs-gui/src/2D/controls/colorpicker' {
     }
 }
 
-declare module 'babylonjs-gui/src/2D/controls/container' {
-    import { Control } from "babylonjs-gui/src/2D/controls/control";
-    import { Measure } from "babylonjs-gui/src/2D/measure";
+declare module 'babylonjs-gui/2D/controls/container' {
+    import { Control } from "babylonjs-gui/2D/controls/control";
+    import { Measure } from "babylonjs-gui/2D/measure";
     import { Nullable } from "babylonjs";
-    import { AdvancedDynamicTexture } from "babylonjs-gui/src/2D/advancedDynamicTexture";
+    import { AdvancedDynamicTexture } from "babylonjs-gui/2D/advancedDynamicTexture";
     /**
         * Root class for 2D containers
         * @see http://doc.babylonjs.com/how_to/gui#containers
@@ -911,14 +911,14 @@ declare module 'babylonjs-gui/src/2D/controls/container' {
     }
 }
 
-declare module 'babylonjs-gui/src/2D/controls/control' {
-    import { Container } from "babylonjs-gui/src/2D/controls/container";
-    import { AdvancedDynamicTexture } from "babylonjs-gui/src/2D/advancedDynamicTexture";
-    import { ValueAndUnit } from "babylonjs-gui/src/2D/valueAndUnit";
+declare module 'babylonjs-gui/2D/controls/control' {
+    import { Container } from "babylonjs-gui/2D/controls/container";
+    import { AdvancedDynamicTexture } from "babylonjs-gui/2D/advancedDynamicTexture";
+    import { ValueAndUnit } from "babylonjs-gui/2D/valueAndUnit";
     import { Nullable, Vector2, AbstractMesh, Observable, Vector3, Scene } from "babylonjs";
-    import { Measure } from "babylonjs-gui/src/2D/measure";
-    import { Style } from "babylonjs-gui/src/2D/style";
-    import { Matrix2D, Vector2WithInfo } from "babylonjs-gui/src/2D/math2D";
+    import { Measure } from "babylonjs-gui/2D/measure";
+    import { Style } from "babylonjs-gui/2D/style";
+    import { Matrix2D, Vector2WithInfo } from "babylonjs-gui/2D/math2D";
     /**
         * Root class used for all 2D controls
         * @see http://doc.babylonjs.com/how_to/gui#controls
@@ -926,6 +926,10 @@ declare module 'babylonjs-gui/src/2D/controls/control' {
     export class Control {
             /** defines the name of the control */
             name?: string | undefined;
+            /**
+                * Gets or sets a boolean indicating if alpha must be an inherited value (false by default)
+                */
+            static AllowAlphaInheritance: boolean;
             /** @hidden */
             _root: Nullable<Container>;
             /** @hidden */
@@ -1339,9 +1343,9 @@ declare module 'babylonjs-gui/src/2D/controls/control' {
     }
 }
 
-declare module 'babylonjs-gui/src/2D/controls/ellipse' {
-    import { Container } from "babylonjs-gui/src/2D/controls/container";
-    import { Measure } from "babylonjs-gui/src/2D/measure";
+declare module 'babylonjs-gui/2D/controls/ellipse' {
+    import { Container } from "babylonjs-gui/2D/controls/container";
+    import { Measure } from "babylonjs-gui/2D/measure";
     /** Class used to create 2D ellipse containers */
     export class Ellipse extends Container {
             name?: string | undefined;
@@ -1359,10 +1363,10 @@ declare module 'babylonjs-gui/src/2D/controls/ellipse' {
     }
 }
 
-declare module 'babylonjs-gui/src/2D/controls/grid' {
-    import { Container } from "babylonjs-gui/src/2D/controls/container";
-    import { Control } from "babylonjs-gui/src/2D/controls/control";
-    import { Measure } from "babylonjs-gui/src/2D/measure";
+declare module 'babylonjs-gui/2D/controls/grid' {
+    import { Container } from "babylonjs-gui/2D/controls/container";
+    import { Control } from "babylonjs-gui/2D/controls/control";
+    import { Measure } from "babylonjs-gui/2D/measure";
     import { Nullable } from "babylonjs";
     /**
         * Class used to create a 2D grid container
@@ -1454,10 +1458,10 @@ declare module 'babylonjs-gui/src/2D/controls/grid' {
     }
 }
 
-declare module 'babylonjs-gui/src/2D/controls/image' {
-    import { Control } from "babylonjs-gui/src/2D/controls/control";
+declare module 'babylonjs-gui/2D/controls/image' {
+    import { Control } from "babylonjs-gui/2D/controls/control";
     import { Nullable, Observable } from "babylonjs";
-    import { Measure } from "babylonjs-gui/src/2D/measure";
+    import { Measure } from "babylonjs-gui/2D/measure";
     /**
         * Class used to create 2D images
         */
@@ -1539,12 +1543,12 @@ declare module 'babylonjs-gui/src/2D/controls/image' {
     }
 }
 
-declare module 'babylonjs-gui/src/2D/controls/inputText' {
-    import { Control } from "babylonjs-gui/src/2D/controls/control";
-    import { IFocusableControl } from "babylonjs-gui/src/2D/advancedDynamicTexture";
+declare module 'babylonjs-gui/2D/controls/inputText' {
+    import { Control } from "babylonjs-gui/2D/controls/control";
+    import { IFocusableControl } from "babylonjs-gui/2D/advancedDynamicTexture";
     import { Nullable, Observable, Vector2 } from "babylonjs";
-    import { Measure } from "babylonjs-gui/src/2D/measure";
-    import { VirtualKeyboard } from "babylonjs-gui/src/2D/controls/virtualKeyboard";
+    import { Measure } from "babylonjs-gui/2D/measure";
+    import { VirtualKeyboard } from "babylonjs-gui/2D/controls/virtualKeyboard";
     /**
         * Class used to create input text control
         */
@@ -1620,8 +1624,8 @@ declare module 'babylonjs-gui/src/2D/controls/inputText' {
     }
 }
 
-declare module 'babylonjs-gui/src/2D/controls/inputPassword' {
-    import { InputText } from "babylonjs-gui/src/2D/controls/inputText";
+declare module 'babylonjs-gui/2D/controls/inputPassword' {
+    import { InputText } from "babylonjs-gui/2D/controls/inputText";
     /**
       * Class used to create a password control
       */
@@ -1630,10 +1634,10 @@ declare module 'babylonjs-gui/src/2D/controls/inputPassword' {
     }
 }
 
-declare module 'babylonjs-gui/src/2D/controls/line' {
-    import { Control } from "babylonjs-gui/src/2D/controls/control";
+declare module 'babylonjs-gui/2D/controls/line' {
+    import { Control } from "babylonjs-gui/2D/controls/control";
     import { Vector3, Scene } from "babylonjs";
-    import { Measure } from "babylonjs-gui/src/2D/measure";
+    import { Measure } from "babylonjs-gui/2D/measure";
     /** Class used to render 2D lines */
     export class Line extends Control {
             name?: string | undefined;
@@ -1680,11 +1684,11 @@ declare module 'babylonjs-gui/src/2D/controls/line' {
     }
 }
 
-declare module 'babylonjs-gui/src/2D/controls/multiLine' {
-    import { Control } from "babylonjs-gui/src/2D/controls/control";
-    import { MultiLinePoint } from "babylonjs-gui/src/2D/multiLinePoint";
+declare module 'babylonjs-gui/2D/controls/multiLine' {
+    import { Control } from "babylonjs-gui/2D/controls/control";
+    import { MultiLinePoint } from "babylonjs-gui/2D/multiLinePoint";
     import { AbstractMesh } from "babylonjs";
-    import { Measure } from "babylonjs-gui/src/2D/measure";
+    import { Measure } from "babylonjs-gui/2D/measure";
     /**
         * Class used to create multi line control
         */
@@ -1749,11 +1753,11 @@ declare module 'babylonjs-gui/src/2D/controls/multiLine' {
     }
 }
 
-declare module 'babylonjs-gui/src/2D/controls/radioButton' {
-    import { Control } from "babylonjs-gui/src/2D/controls/control";
+declare module 'babylonjs-gui/2D/controls/radioButton' {
+    import { Control } from "babylonjs-gui/2D/controls/control";
     import { Observable, Vector2 } from "babylonjs";
-    import { Measure } from "babylonjs-gui/src/2D/measure";
-    import { StackPanel } from "babylonjs-gui/src/2D/controls";
+    import { Measure } from "babylonjs-gui/2D/measure";
+    import { StackPanel } from "babylonjs-gui/2D/controls";
     /**
         * Class used to create radio button controls
         */
@@ -1791,9 +1795,9 @@ declare module 'babylonjs-gui/src/2D/controls/radioButton' {
     }
 }
 
-declare module 'babylonjs-gui/src/2D/controls/stackPanel' {
-    import { Container } from "babylonjs-gui/src/2D/controls/container";
-    import { Measure } from "babylonjs-gui/src/2D/measure";
+declare module 'babylonjs-gui/2D/controls/stackPanel' {
+    import { Container } from "babylonjs-gui/2D/controls/container";
+    import { Measure } from "babylonjs-gui/2D/measure";
     /**
         * Class used to create a 2D stack panel container
         */
@@ -1821,9 +1825,9 @@ declare module 'babylonjs-gui/src/2D/controls/stackPanel' {
     }
 }
 
-declare module 'babylonjs-gui/src/2D/controls/selector' {
-    import { Rectangle } from "babylonjs-gui/src/2D/controls/rectangle";
-    import { StackPanel } from "babylonjs-gui/src/2D/controls/stackPanel";
+declare module 'babylonjs-gui/2D/controls/selector' {
+    import { Rectangle } from "babylonjs-gui/2D/controls/rectangle";
+    import { StackPanel } from "babylonjs-gui/2D/controls/stackPanel";
     /** Class used to create a RadioGroup
         * which contains groups of radio buttons
      */
@@ -1998,10 +2002,10 @@ declare module 'babylonjs-gui/src/2D/controls/selector' {
     }
 }
 
-declare module 'babylonjs-gui/src/2D/controls/textBlock' {
+declare module 'babylonjs-gui/2D/controls/textBlock' {
     import { Observable } from "babylonjs";
-    import { Measure } from "babylonjs-gui/src/2D/measure";
-    import { Control } from "babylonjs-gui/src/2D/controls/control";
+    import { Measure } from "babylonjs-gui/2D/measure";
+    import { Control } from "babylonjs-gui/2D/controls/control";
     /**
         * Enum that determines the text-wrapping mode to use.
         */
@@ -2100,10 +2104,10 @@ declare module 'babylonjs-gui/src/2D/controls/textBlock' {
     }
 }
 
-declare module 'babylonjs-gui/src/2D/controls/virtualKeyboard' {
-    import { StackPanel } from "babylonjs-gui/src/2D/controls/stackPanel";
+declare module 'babylonjs-gui/2D/controls/virtualKeyboard' {
+    import { StackPanel } from "babylonjs-gui/2D/controls/stackPanel";
     import { Observable, Nullable } from "babylonjs";
-    import { InputText } from "babylonjs-gui/src/2D/controls/inputText";
+    import { InputText } from "babylonjs-gui/2D/controls/inputText";
     /**
         * Class used to store key control properties
         */
@@ -2193,9 +2197,9 @@ declare module 'babylonjs-gui/src/2D/controls/virtualKeyboard' {
     }
 }
 
-declare module 'babylonjs-gui/src/2D/controls/rectangle' {
-    import { Container } from "babylonjs-gui/src/2D/controls/container";
-    import { Measure } from "babylonjs-gui/src/2D/measure";
+declare module 'babylonjs-gui/2D/controls/rectangle' {
+    import { Container } from "babylonjs-gui/2D/controls/container";
+    import { Measure } from "babylonjs-gui/2D/measure";
     /** Class used to create rectangle container */
     export class Rectangle extends Container {
             name?: string | undefined;
@@ -2215,9 +2219,9 @@ declare module 'babylonjs-gui/src/2D/controls/rectangle' {
     }
 }
 
-declare module 'babylonjs-gui/src/2D/controls/displayGrid' {
-    import { Control } from "babylonjs-gui/src/2D/controls";
-    import { Measure } from "babylonjs-gui/src/2D";
+declare module 'babylonjs-gui/2D/controls/displayGrid' {
+    import { Control } from "babylonjs-gui/2D/controls";
+    import { Measure } from "babylonjs-gui/2D";
     /** Class used to render a grid  */
     export class DisplayGrid extends Control {
             name?: string | undefined;
@@ -2251,9 +2255,9 @@ declare module 'babylonjs-gui/src/2D/controls/displayGrid' {
     }
 }
 
-declare module 'babylonjs-gui/src/2D/controls/baseSlider' {
-    import { Control } from "babylonjs-gui/src/2D/controls/control";
-    import { ValueAndUnit } from "babylonjs-gui/src/2D/valueAndUnit";
+declare module 'babylonjs-gui/2D/controls/baseSlider' {
+    import { Control } from "babylonjs-gui/2D/controls/control";
+    import { ValueAndUnit } from "babylonjs-gui/2D/valueAndUnit";
     import { Observable, Vector2 } from "babylonjs";
     /**
         * Class used to create slider controls
@@ -2308,9 +2312,9 @@ declare module 'babylonjs-gui/src/2D/controls/baseSlider' {
     }
 }
 
-declare module 'babylonjs-gui/src/2D/controls/slider' {
-    import { Measure } from "babylonjs-gui/src/2D/measure";
-    import { BaseSlider } from "babylonjs-gui/src/2D/controls/baseSlider";
+declare module 'babylonjs-gui/2D/controls/slider' {
+    import { Measure } from "babylonjs-gui/2D/measure";
+    import { BaseSlider } from "babylonjs-gui/2D/controls/baseSlider";
     /**
         * Class used to create slider controls
         */
@@ -2332,10 +2336,10 @@ declare module 'babylonjs-gui/src/2D/controls/slider' {
     }
 }
 
-declare module 'babylonjs-gui/src/2D/controls/imageBasedSlider' {
-    import { BaseSlider } from "babylonjs-gui/src/2D/controls/baseSlider";
-    import { Measure } from "babylonjs-gui/src/2D/measure";
-    import { Image } from "babylonjs-gui/src/2D/controls/image";
+declare module 'babylonjs-gui/2D/controls/imageBasedSlider' {
+    import { BaseSlider } from "babylonjs-gui/2D/controls/baseSlider";
+    import { Measure } from "babylonjs-gui/2D/measure";
+    import { Image } from "babylonjs-gui/2D/controls/image";
     /**
         * Class used to create slider controls based on images
         */
@@ -2364,7 +2368,7 @@ declare module 'babylonjs-gui/src/2D/controls/imageBasedSlider' {
     }
 }
 
-declare module 'babylonjs-gui/src/2D/controls/statics' {
+declare module 'babylonjs-gui/2D/controls/statics' {
     /**
       * Forcing an export so that this code will execute
       * @hidden
@@ -2373,8 +2377,8 @@ declare module 'babylonjs-gui/src/2D/controls/statics' {
     export { name };
 }
 
-declare module 'babylonjs-gui/src/3D/controls/abstractButton3D' {
-    import { Control3D } from "babylonjs-gui/src/3D/controls/control3D";
+declare module 'babylonjs-gui/3D/controls/abstractButton3D' {
+    import { Control3D } from "babylonjs-gui/3D/controls/control3D";
     import { TransformNode, Scene } from "babylonjs";
     /**
         * Class used as a root to all buttons
@@ -2390,11 +2394,11 @@ declare module 'babylonjs-gui/src/3D/controls/abstractButton3D' {
     }
 }
 
-declare module 'babylonjs-gui/src/3D/controls/button3D' {
-    import { AbstractButton3D } from "babylonjs-gui/src/3D/controls/abstractButton3D";
+declare module 'babylonjs-gui/3D/controls/button3D' {
+    import { AbstractButton3D } from "babylonjs-gui/3D/controls/abstractButton3D";
     import { Material, int, Scene, TransformNode, AbstractMesh } from "babylonjs";
-    import { AdvancedDynamicTexture } from "babylonjs-gui/src/2D/advancedDynamicTexture";
-    import { Control } from "babylonjs-gui/src/2D/controls/control";
+    import { AdvancedDynamicTexture } from "babylonjs-gui/2D/advancedDynamicTexture";
+    import { Control } from "babylonjs-gui/2D/controls/control";
     /**
         * Class used to create a button in 3D
         */
@@ -2436,8 +2440,8 @@ declare module 'babylonjs-gui/src/3D/controls/button3D' {
     }
 }
 
-declare module 'babylonjs-gui/src/3D/controls/container3D' {
-    import { Control3D } from "babylonjs-gui/src/3D/controls/control3D";
+declare module 'babylonjs-gui/3D/controls/container3D' {
+    import { Control3D } from "babylonjs-gui/3D/controls/control3D";
     import { Scene, Nullable, TransformNode } from "babylonjs";
     /**
         * Class used to create containers for controls
@@ -2507,11 +2511,11 @@ declare module 'babylonjs-gui/src/3D/controls/container3D' {
     }
 }
 
-declare module 'babylonjs-gui/src/3D/controls/control3D' {
+declare module 'babylonjs-gui/3D/controls/control3D' {
     import { IDisposable, IBehaviorAware, Nullable, TransformNode, Vector3, Observable, Behavior, AbstractMesh, Scene } from "babylonjs";
-    import { GUI3DManager } from "babylonjs-gui/src/3D/gui3DManager";
-    import { Vector3WithInfo } from "babylonjs-gui/src/3D/vector3WithInfo";
-    import { Container3D } from "babylonjs-gui/src/3D/controls/container3D";
+    import { GUI3DManager } from "babylonjs-gui/3D/gui3DManager";
+    import { Vector3WithInfo } from "babylonjs-gui/3D/vector3WithInfo";
+    import { Container3D } from "babylonjs-gui/3D/controls/container3D";
     /**
         * Class used as base class for controls
         */
@@ -2651,10 +2655,10 @@ declare module 'babylonjs-gui/src/3D/controls/control3D' {
     }
 }
 
-declare module 'babylonjs-gui/src/3D/controls/cylinderPanel' {
-    import { VolumeBasedPanel } from "babylonjs-gui/src/3D/controls/volumeBasedPanel";
+declare module 'babylonjs-gui/3D/controls/cylinderPanel' {
+    import { VolumeBasedPanel } from "babylonjs-gui/3D/controls/volumeBasedPanel";
     import { float, Vector3 } from "babylonjs";
-    import { Control3D } from "babylonjs-gui/src/3D/controls/control3D";
+    import { Control3D } from "babylonjs-gui/3D/controls/control3D";
     /**
         * Class used to create a container panel deployed on the surface of a cylinder
         */
@@ -2667,11 +2671,11 @@ declare module 'babylonjs-gui/src/3D/controls/cylinderPanel' {
     }
 }
 
-declare module 'babylonjs-gui/src/3D/controls/holographicButton' {
-    import { Button3D } from "babylonjs-gui/src/3D/controls/button3D";
+declare module 'babylonjs-gui/3D/controls/holographicButton' {
+    import { Button3D } from "babylonjs-gui/3D/controls/button3D";
     import { Mesh, StandardMaterial, Nullable, Scene, TransformNode } from "babylonjs";
-    import { FluentMaterial } from "babylonjs-gui/src/3D/materials/fluentMaterial";
-    import { AdvancedDynamicTexture } from "babylonjs-gui/src/2D/advancedDynamicTexture";
+    import { FluentMaterial } from "babylonjs-gui/3D/materials/fluentMaterial";
+    import { AdvancedDynamicTexture } from "babylonjs-gui/2D/advancedDynamicTexture";
     /**
         * Class used to create a holographic button in 3D
         */
@@ -2720,9 +2724,9 @@ declare module 'babylonjs-gui/src/3D/controls/holographicButton' {
     }
 }
 
-declare module 'babylonjs-gui/src/3D/controls/meshButton3D' {
+declare module 'babylonjs-gui/3D/controls/meshButton3D' {
     import { Scene, TransformNode, AbstractMesh, Mesh } from "babylonjs";
-    import { Button3D } from "babylonjs-gui/src/3D/controls/button3D";
+    import { Button3D } from "babylonjs-gui/3D/controls/button3D";
     /**
         * Class used to create an interactable object. It's a 3D button using a mesh coming from the current scene
         */
@@ -2741,10 +2745,10 @@ declare module 'babylonjs-gui/src/3D/controls/meshButton3D' {
     }
 }
 
-declare module 'babylonjs-gui/src/3D/controls/planePanel' {
+declare module 'babylonjs-gui/3D/controls/planePanel' {
     import { Vector3 } from "babylonjs";
-    import { Control3D } from "babylonjs-gui/src/3D/controls/control3D";
-    import { VolumeBasedPanel } from "babylonjs-gui/src/3D/controls/volumeBasedPanel";
+    import { Control3D } from "babylonjs-gui/3D/controls/control3D";
+    import { VolumeBasedPanel } from "babylonjs-gui/3D/controls/volumeBasedPanel";
     /**
       * Class used to create a container panel deployed on the surface of a plane
       */
@@ -2753,10 +2757,10 @@ declare module 'babylonjs-gui/src/3D/controls/planePanel' {
     }
 }
 
-declare module 'babylonjs-gui/src/3D/controls/scatterPanel' {
-    import { VolumeBasedPanel } from "babylonjs-gui/src/3D/controls/volumeBasedPanel";
+declare module 'babylonjs-gui/3D/controls/scatterPanel' {
+    import { VolumeBasedPanel } from "babylonjs-gui/3D/controls/volumeBasedPanel";
     import { float, Vector3 } from "babylonjs";
-    import { Control3D } from "babylonjs-gui/src/3D/controls/control3D";
+    import { Control3D } from "babylonjs-gui/3D/controls/control3D";
     /**
         * Class used to create a container panel where items get randomized planar mapping
         */
@@ -2770,10 +2774,10 @@ declare module 'babylonjs-gui/src/3D/controls/scatterPanel' {
     }
 }
 
-declare module 'babylonjs-gui/src/3D/controls/spherePanel' {
-    import { VolumeBasedPanel } from "babylonjs-gui/src/3D/controls/volumeBasedPanel";
+declare module 'babylonjs-gui/3D/controls/spherePanel' {
+    import { VolumeBasedPanel } from "babylonjs-gui/3D/controls/volumeBasedPanel";
     import { float, Vector3 } from "babylonjs";
-    import { Control3D } from "babylonjs-gui/src/3D/controls/control3D";
+    import { Control3D } from "babylonjs-gui/3D/controls/control3D";
     /**
         * Class used to create a container panel deployed on the surface of a sphere
         */
@@ -2786,8 +2790,8 @@ declare module 'babylonjs-gui/src/3D/controls/spherePanel' {
     }
 }
 
-declare module 'babylonjs-gui/src/3D/controls/stackPanel3D' {
-    import { Container3D } from "babylonjs-gui/src/3D/controls/container3D";
+declare module 'babylonjs-gui/3D/controls/stackPanel3D' {
+    import { Container3D } from "babylonjs-gui/3D/controls/container3D";
     /**
         * Class used to create a stack panel in 3D on XY plane
         */
@@ -2809,10 +2813,10 @@ declare module 'babylonjs-gui/src/3D/controls/stackPanel3D' {
     }
 }
 
-declare module 'babylonjs-gui/src/3D/controls/volumeBasedPanel' {
-    import { Container3D } from "babylonjs-gui/src/3D/controls/container3D";
+declare module 'babylonjs-gui/3D/controls/volumeBasedPanel' {
+    import { Container3D } from "babylonjs-gui/3D/controls/container3D";
     import { int, Vector3 } from "babylonjs";
-    import { Control3D } from "babylonjs-gui/src/3D/controls/control3D";
+    import { Control3D } from "babylonjs-gui/3D/controls/control3D";
     /**
         * Abstract class used to create a container panel deployed on the surface of a volume
         */
@@ -2856,10 +2860,8 @@ declare module 'babylonjs-gui/src/3D/controls/volumeBasedPanel' {
     }
 }
 
-declare module 'babylonjs-gui/src/3D/materials/fluentMaterial' {
+declare module 'babylonjs-gui/3D/materials/fluentMaterial' {
     import { MaterialDefines, PushMaterial, Color3, Color4, Vector3, Scene, Nullable, BaseTexture, AbstractMesh, SubMesh, Matrix, Mesh } from "babylonjs";
-    import "./shaders/fluent.vertex";
-    import "./shaders/fluent.fragment";
     /** @hidden */
     export class FluentMaterialDefines extends MaterialDefines {
             INNERGLOW: boolean;
@@ -2948,6 +2950,14 @@ declare module 'babylonjs-gui/src/3D/materials/fluentMaterial' {
 // Dependencies for this module:
 //   ../../../../Tools/Gulp/babylonjs
 declare module BABYLON.GUI {
+}
+declare module BABYLON.GUI {
+}
+declare module BABYLON.GUI {
+}
+declare module BABYLON.GUI {
+}
+declare module BABYLON.GUI {
     /**
         * Interface used to define a control that can receive focus
         */
@@ -3436,6 +3446,10 @@ declare module BABYLON.GUI {
     }
 }
 declare module BABYLON.GUI {
+}
+declare module BABYLON.GUI {
+}
+declare module BABYLON.GUI {
     /**
         * Class used to manage 3D user interface
         * @see http://doc.babylonjs.com/how_to/gui3d
@@ -3753,6 +3767,10 @@ declare module BABYLON.GUI {
     export class Control {
             /** defines the name of the control */
             name?: string | undefined;
+            /**
+                * Gets or sets a boolean indicating if alpha must be an inherited value (false by default)
+                */
+            static AllowAlphaInheritance: boolean;
             /** @hidden */
             _root: BABYLON.Nullable<Container>;
             /** @hidden */

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

@@ -4,7 +4,7 @@
     },
     "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.",
-    "version": "4.0.0-alpha.5",
+    "version": "4.0.0-alpha.6",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -27,7 +27,7 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs": "4.0.0-alpha.5"
+        "babylonjs": "4.0.0-alpha.6"
     },
     "engines": {
         "node": "*"

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 5 - 1
dist/preview release/inspector/babylon.inspector.bundle.js.map


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

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-inspector",
     "description": "The Babylon.js inspector.",
-    "version": "4.0.0-alpha.5",
+    "version": "4.0.0-alpha.6",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -28,10 +28,10 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs": "4.0.0-alpha.5",
-        "babylonjs-gui": "4.0.0-alpha.5",
-        "babylonjs-loaders": "4.0.0-alpha.5",
-        "babylonjs-serializers": "4.0.0-alpha.5"
+        "babylonjs": "4.0.0-alpha.6",
+        "babylonjs-gui": "4.0.0-alpha.6",
+        "babylonjs-loaders": "4.0.0-alpha.6",
+        "babylonjs-serializers": "4.0.0-alpha.6"
     },
     "engines": {
         "node": "*"

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 2948 - 3254
dist/preview release/loaders/babylon.glTF1FileLoader.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 3267
dist/preview release/loaders/babylon.glTF1FileLoader.min.js


+ 21 - 15
dist/preview release/loaders/babylon.glTF2FileLoader.d.ts

@@ -451,10 +451,10 @@ declare module BABYLON.GLTF2.Loader {
         occlusionTexture?: IMaterialOcclusionTextureInfo;
         emissiveTexture?: ITextureInfo;
         /** @hidden */
-        _babylonData?: {
-            [drawMode: number]: {
-                material: Material;
-                meshes: AbstractMesh[];
+        _data?: {
+            [babylonDrawMode: number]: {
+                babylonMaterial: Material;
+                babylonMeshes: AbstractMesh[];
                 promise: Promise<void>;
             };
         };
@@ -469,6 +469,11 @@ declare module BABYLON.GLTF2.Loader {
      * Loader interface with additional members.
      */
     interface IMeshPrimitive extends GLTF2.IMeshPrimitive, IArrayItem {
+        /** @hidden */
+        _instanceData?: {
+            babylonSourceMesh: Mesh;
+            promise: Promise<any>;
+        };
     }
     /**
      * Loader interface with additional members.
@@ -479,9 +484,9 @@ declare module BABYLON.GLTF2.Loader {
          */
         parent?: INode;
         /** @hidden */
-        _babylonMesh?: Mesh;
+        _babylonTransformNode?: TransformNode;
         /** @hidden */
-        _primitiveBabylonMeshes?: Mesh[];
+        _primitiveBabylonMeshes?: AbstractMesh[];
         /** @hidden */
         _babylonBones?: Bone[];
         /** @hidden */
@@ -511,9 +516,10 @@ declare module BABYLON.GLTF2.Loader {
      */
     interface ISkin extends GLTF2.ISkin, IArrayItem {
         /** @hidden */
-        _babylonSkeleton?: Skeleton;
-        /** @hidden */
-        _promise?: Promise<void>;
+        _data?: {
+            babylonSkeleton: Skeleton;
+            promise: Promise<void>;
+        };
     }
     /**
      * Loader interface with additional members.
@@ -647,7 +653,7 @@ declare module BABYLON.GLTF2 {
          * @param assign A function called synchronously after parsing the glTF properties
          * @returns A promise that resolves with the loaded Babylon mesh when the load is complete
          */
-        loadNodeAsync(context: string, node: Loader.INode, assign?: (babylonMesh: Mesh) => void): Promise<Mesh>;
+        loadNodeAsync(context: string, node: Loader.INode, assign?: (babylonTransformNode: TransformNode) => void): Promise<TransformNode>;
         private _loadMeshAsync;
         private _loadMeshPrimitiveAsync;
         private _loadVertexDataAsync;
@@ -845,9 +851,9 @@ declare module BABYLON.GLTF2 {
          * @param context The context when loading the asset
          * @param node The glTF node property
          * @param assign A function called synchronously after parsing the glTF properties
-         * @returns A promise that resolves with the loaded Babylon mesh when the load is complete or null if not handled
+         * @returns A promise that resolves with the loaded Babylon transform node when the load is complete or null if not handled
          */
-        loadNodeAsync?(context: string, node: Loader.INode, assign: (babylonMesh: Mesh) => void): Nullable<Promise<Mesh>>;
+        loadNodeAsync?(context: string, node: Loader.INode, assign: (babylonMesh: TransformNode) => void): Nullable<Promise<TransformNode>>;
         /**
          * Define this method to modify the default behavior when loading cameras.
          * @param context The context when loading the asset
@@ -957,7 +963,7 @@ declare module BABYLON.GLTF2.Loader.Extensions {
         /** @hidden */
         onReady(): void;
         /** @hidden */
-        loadNodeAsync(context: string, node: INode, assign: (babylonMesh: Mesh) => void): Nullable<Promise<Mesh>>;
+        loadNodeAsync(context: string, node: INode, assign: (babylonTransformNode: TransformNode) => void): Nullable<Promise<TransformNode>>;
         /** @hidden */
         _loadMaterialAsync(context: string, material: IMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Nullable<Promise<Material>>;
         /** @hidden */
@@ -1018,7 +1024,7 @@ declare module BABYLON.GLTF2.Loader.Extensions {
         /** @hidden */
         loadSceneAsync(context: string, scene: IScene): Nullable<Promise<void>>;
         /** @hidden */
-        loadNodeAsync(context: string, node: INode, assign: (babylonMesh: Mesh) => void): Nullable<Promise<Mesh>>;
+        loadNodeAsync(context: string, node: INode, assign: (babylonTransformNode: TransformNode) => void): Nullable<Promise<TransformNode>>;
         /** @hidden */
         loadAnimationAsync(context: string, animation: IAnimation): Nullable<Promise<AnimationGroup>>;
         private _loadClipAsync;
@@ -1110,7 +1116,7 @@ declare module BABYLON.GLTF2.Loader.Extensions {
         /** @hidden */
         onLoading(): void;
         /** @hidden */
-        loadNodeAsync(context: string, node: INode, assign: (babylonMesh: Mesh) => void): Nullable<Promise<Mesh>>;
+        loadNodeAsync(context: string, node: INode, assign: (babylonTransformNode: TransformNode) => void): Nullable<Promise<TransformNode>>;
     }
 }
 

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 3737 - 4021
dist/preview release/loaders/babylon.glTF2FileLoader.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 4021
dist/preview release/loaders/babylon.glTF2FileLoader.min.js


+ 21 - 15
dist/preview release/loaders/babylon.glTFFileLoader.d.ts

@@ -1013,10 +1013,10 @@ declare module BABYLON.GLTF2.Loader {
         occlusionTexture?: IMaterialOcclusionTextureInfo;
         emissiveTexture?: ITextureInfo;
         /** @hidden */
-        _babylonData?: {
-            [drawMode: number]: {
-                material: Material;
-                meshes: AbstractMesh[];
+        _data?: {
+            [babylonDrawMode: number]: {
+                babylonMaterial: Material;
+                babylonMeshes: AbstractMesh[];
                 promise: Promise<void>;
             };
         };
@@ -1031,6 +1031,11 @@ declare module BABYLON.GLTF2.Loader {
      * Loader interface with additional members.
      */
     interface IMeshPrimitive extends GLTF2.IMeshPrimitive, IArrayItem {
+        /** @hidden */
+        _instanceData?: {
+            babylonSourceMesh: Mesh;
+            promise: Promise<any>;
+        };
     }
     /**
      * Loader interface with additional members.
@@ -1041,9 +1046,9 @@ declare module BABYLON.GLTF2.Loader {
          */
         parent?: INode;
         /** @hidden */
-        _babylonMesh?: Mesh;
+        _babylonTransformNode?: TransformNode;
         /** @hidden */
-        _primitiveBabylonMeshes?: Mesh[];
+        _primitiveBabylonMeshes?: AbstractMesh[];
         /** @hidden */
         _babylonBones?: Bone[];
         /** @hidden */
@@ -1073,9 +1078,10 @@ declare module BABYLON.GLTF2.Loader {
      */
     interface ISkin extends GLTF2.ISkin, IArrayItem {
         /** @hidden */
-        _babylonSkeleton?: Skeleton;
-        /** @hidden */
-        _promise?: Promise<void>;
+        _data?: {
+            babylonSkeleton: Skeleton;
+            promise: Promise<void>;
+        };
     }
     /**
      * Loader interface with additional members.
@@ -1209,7 +1215,7 @@ declare module BABYLON.GLTF2 {
          * @param assign A function called synchronously after parsing the glTF properties
          * @returns A promise that resolves with the loaded Babylon mesh when the load is complete
          */
-        loadNodeAsync(context: string, node: Loader.INode, assign?: (babylonMesh: Mesh) => void): Promise<Mesh>;
+        loadNodeAsync(context: string, node: Loader.INode, assign?: (babylonTransformNode: TransformNode) => void): Promise<TransformNode>;
         private _loadMeshAsync;
         private _loadMeshPrimitiveAsync;
         private _loadVertexDataAsync;
@@ -1407,9 +1413,9 @@ declare module BABYLON.GLTF2 {
          * @param context The context when loading the asset
          * @param node The glTF node property
          * @param assign A function called synchronously after parsing the glTF properties
-         * @returns A promise that resolves with the loaded Babylon mesh when the load is complete or null if not handled
+         * @returns A promise that resolves with the loaded Babylon transform node when the load is complete or null if not handled
          */
-        loadNodeAsync?(context: string, node: Loader.INode, assign: (babylonMesh: Mesh) => void): Nullable<Promise<Mesh>>;
+        loadNodeAsync?(context: string, node: Loader.INode, assign: (babylonMesh: TransformNode) => void): Nullable<Promise<TransformNode>>;
         /**
          * Define this method to modify the default behavior when loading cameras.
          * @param context The context when loading the asset
@@ -1519,7 +1525,7 @@ declare module BABYLON.GLTF2.Loader.Extensions {
         /** @hidden */
         onReady(): void;
         /** @hidden */
-        loadNodeAsync(context: string, node: INode, assign: (babylonMesh: Mesh) => void): Nullable<Promise<Mesh>>;
+        loadNodeAsync(context: string, node: INode, assign: (babylonTransformNode: TransformNode) => void): Nullable<Promise<TransformNode>>;
         /** @hidden */
         _loadMaterialAsync(context: string, material: IMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Nullable<Promise<Material>>;
         /** @hidden */
@@ -1580,7 +1586,7 @@ declare module BABYLON.GLTF2.Loader.Extensions {
         /** @hidden */
         loadSceneAsync(context: string, scene: IScene): Nullable<Promise<void>>;
         /** @hidden */
-        loadNodeAsync(context: string, node: INode, assign: (babylonMesh: Mesh) => void): Nullable<Promise<Mesh>>;
+        loadNodeAsync(context: string, node: INode, assign: (babylonTransformNode: TransformNode) => void): Nullable<Promise<TransformNode>>;
         /** @hidden */
         loadAnimationAsync(context: string, animation: IAnimation): Nullable<Promise<AnimationGroup>>;
         private _loadClipAsync;
@@ -1672,7 +1678,7 @@ declare module BABYLON.GLTF2.Loader.Extensions {
         /** @hidden */
         onLoading(): void;
         /** @hidden */
-        loadNodeAsync(context: string, node: INode, assign: (babylonMesh: Mesh) => void): Nullable<Promise<Mesh>>;
+        loadNodeAsync(context: string, node: INode, assign: (babylonTransformNode: TransformNode) => void): Nullable<Promise<TransformNode>>;
     }
 }
 

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 5906 - 6296
dist/preview release/loaders/babylon.glTFFileLoader.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 6335
dist/preview release/loaders/babylon.glTFFileLoader.min.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 885 - 1116
dist/preview release/loaders/babylon.objFileLoader.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 1117
dist/preview release/loaders/babylon.objFileLoader.min.js


+ 173 - 415
dist/preview release/loaders/babylon.stlFileLoader.js

@@ -1,415 +1,173 @@
-(function webpackUniversalModuleDefinition(root, factory) {
-	if(typeof exports === 'object' && typeof module === 'object')
-		module.exports = factory(require("babylonjs"));
-	else if(typeof define === 'function' && define.amd)
-		define("babylonjs-loaders", ["babylonjs"], factory);
-	else if(typeof exports === 'object')
-		exports["babylonjs-loaders"] = factory(require("babylonjs"));
-	else
-		root["LOADERS"] = factory(root["BABYLON"]);
-})(window, function(__WEBPACK_EXTERNAL_MODULE_babylonjs__) {
-return /******/ (function(modules) { // webpackBootstrap
-/******/ 	// The module cache
-/******/ 	var installedModules = {};
-/******/
-/******/ 	// The require function
-/******/ 	function __webpack_require__(moduleId) {
-/******/
-/******/ 		// Check if module is in cache
-/******/ 		if(installedModules[moduleId]) {
-/******/ 			return installedModules[moduleId].exports;
-/******/ 		}
-/******/ 		// Create a new module (and put it into the cache)
-/******/ 		var module = installedModules[moduleId] = {
-/******/ 			i: moduleId,
-/******/ 			l: false,
-/******/ 			exports: {}
-/******/ 		};
-/******/
-/******/ 		// Execute the module function
-/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
-/******/
-/******/ 		// Flag the module as loaded
-/******/ 		module.l = true;
-/******/
-/******/ 		// Return the exports of the module
-/******/ 		return module.exports;
-/******/ 	}
-/******/
-/******/
-/******/ 	// expose the modules object (__webpack_modules__)
-/******/ 	__webpack_require__.m = modules;
-/******/
-/******/ 	// expose the module cache
-/******/ 	__webpack_require__.c = installedModules;
-/******/
-/******/ 	// define getter function for harmony exports
-/******/ 	__webpack_require__.d = function(exports, name, getter) {
-/******/ 		if(!__webpack_require__.o(exports, name)) {
-/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
-/******/ 		}
-/******/ 	};
-/******/
-/******/ 	// define __esModule on exports
-/******/ 	__webpack_require__.r = function(exports) {
-/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
-/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
-/******/ 		}
-/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
-/******/ 	};
-/******/
-/******/ 	// create a fake namespace object
-/******/ 	// mode & 1: value is a module id, require it
-/******/ 	// mode & 2: merge all properties of value into the ns
-/******/ 	// mode & 4: return value when already ns object
-/******/ 	// mode & 8|1: behave like require
-/******/ 	__webpack_require__.t = function(value, mode) {
-/******/ 		if(mode & 1) value = __webpack_require__(value);
-/******/ 		if(mode & 8) return value;
-/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
-/******/ 		var ns = Object.create(null);
-/******/ 		__webpack_require__.r(ns);
-/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
-/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
-/******/ 		return ns;
-/******/ 	};
-/******/
-/******/ 	// getDefaultExport function for compatibility with non-harmony modules
-/******/ 	__webpack_require__.n = function(module) {
-/******/ 		var getter = module && module.__esModule ?
-/******/ 			function getDefault() { return module['default']; } :
-/******/ 			function getModuleExports() { return module; };
-/******/ 		__webpack_require__.d(getter, 'a', getter);
-/******/ 		return getter;
-/******/ 	};
-/******/
-/******/ 	// Object.prototype.hasOwnProperty.call
-/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
-/******/
-/******/ 	// __webpack_public_path__
-/******/ 	__webpack_require__.p = "";
-/******/
-/******/
-/******/ 	// Load entry module and return exports
-/******/ 	return __webpack_require__(__webpack_require__.s = "./legacy/legacy-stlFileLoader.ts");
-/******/ })
-/************************************************************************/
-/******/ ({
-
-/***/ "../node_modules/webpack/buildin/global.js":
-/*!*************************************************!*\
-  !*** ../node_modules/webpack/buildin/global.js ***!
-  \*************************************************/
-/*! no static exports found */
-/***/ (function(module, exports) {
-
-var g;
-
-// This works in non-strict mode
-g = (function() {
-	return this;
-})();
-
-try {
-	// This works if eval is allowed (see CSP)
-	g = g || Function("return this")() || (1, eval)("this");
-} catch (e) {
-	// This works if the window reference is available
-	if (typeof window === "object") g = window;
-}
-
-// g can still be undefined, but nothing to do about it...
-// We return undefined, instead of nothing here, so it's
-// easier to handle this case. if(!global) { ...}
-
-module.exports = g;
-
-
-/***/ }),
-
-/***/ "./legacy/legacy-stlFileLoader.ts":
-/*!****************************************!*\
-  !*** ./legacy/legacy-stlFileLoader.ts ***!
-  \****************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/* WEBPACK VAR INJECTION */(function(global) {
-function __export(m) {
-    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-var Loaders = __webpack_require__(/*! ../src/STL */ "./src/STL/index.ts");
-/**
- * This is the entry point for the UMD module.
- * The entry point for a future ESM package should be index.ts
- */
-var globalObject = (typeof global !== 'undefined') ? global : ((typeof window !== 'undefined') ? window : undefined);
-if (typeof globalObject !== "undefined") {
-    for (var key in Loaders) {
-        globalObject.BABYLON[key] = Loaders[key];
-    }
-}
-__export(__webpack_require__(/*! ../src/STL */ "./src/STL/index.ts"));
-
-/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../node_modules/webpack/buildin/global.js */ "../node_modules/webpack/buildin/global.js")))
-
-/***/ }),
-
-/***/ "./src/STL/index.ts":
-/*!**************************!*\
-  !*** ./src/STL/index.ts ***!
-  \**************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-function __export(m) {
-    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(__webpack_require__(/*! ./stlFileLoader */ "./src/STL/stlFileLoader.ts"));
-
-
-/***/ }),
-
-/***/ "./src/STL/stlFileLoader.ts":
-/*!**********************************!*\
-  !*** ./src/STL/stlFileLoader.ts ***!
-  \**********************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-Object.defineProperty(exports, "__esModule", { value: true });
-var babylonjs_1 = __webpack_require__(/*! babylonjs */ "babylonjs");
-/**
- * STL file type loader.
- * This is a babylon scene loader plugin.
- */
-var STLFileLoader = /** @class */ (function () {
-    function STLFileLoader() {
-        /** @hidden */
-        this.solidPattern = /solid (\S*)([\S\s]*)endsolid[ ]*(\S*)/g;
-        /** @hidden */
-        this.facetsPattern = /facet([\s\S]*?)endfacet/g;
-        /** @hidden */
-        this.normalPattern = /normal[\s]+([\-+]?[0-9]+\.?[0-9]*([eE][\-+]?[0-9]+)?)+[\s]+([\-+]?[0-9]*\.?[0-9]+([eE][\-+]?[0-9]+)?)+[\s]+([\-+]?[0-9]*\.?[0-9]+([eE][\-+]?[0-9]+)?)+/g;
-        /** @hidden */
-        this.vertexPattern = /vertex[\s]+([\-+]?[0-9]+\.?[0-9]*([eE][\-+]?[0-9]+)?)+[\s]+([\-+]?[0-9]*\.?[0-9]+([eE][\-+]?[0-9]+)?)+[\s]+([\-+]?[0-9]*\.?[0-9]+([eE][\-+]?[0-9]+)?)+/g;
-        /**
-         * Defines the name of the plugin.
-         */
-        this.name = "stl";
-        /**
-         * Defines the extensions the stl loader is able to load.
-         * force data to come in as an ArrayBuffer
-         * we'll convert to string if it looks like it's an ASCII .stl
-         */
-        this.extensions = {
-            ".stl": { isBinary: true },
-        };
-    }
-    /**
-     * Import meshes into a scene.
-     * @param meshesNames An array of mesh names, a single mesh name, or empty string for all meshes that filter what meshes are imported
-     * @param scene The scene to import into
-     * @param data The data to import
-     * @param rootUrl The root url for scene and resources
-     * @param meshes The meshes array to import into
-     * @param particleSystems The particle systems array to import into
-     * @param skeletons The skeletons array to import into
-     * @param onError The callback when import fails
-     * @returns True if successful or false otherwise
-     */
-    STLFileLoader.prototype.importMesh = function (meshesNames, scene, data, rootUrl, meshes, particleSystems, skeletons) {
-        var matches;
-        if (typeof data !== "string") {
-            if (this._isBinary(data)) {
-                // binary .stl
-                var babylonMesh = new babylonjs_1.Mesh("stlmesh", scene);
-                this._parseBinary(babylonMesh, data);
-                if (meshes) {
-                    meshes.push(babylonMesh);
-                }
-                return true;
-            }
-            // ASCII .stl
-            // convert to string
-            var array_buffer = new Uint8Array(data);
-            var str = '';
-            for (var i = 0; i < data.byteLength; i++) {
-                str += String.fromCharCode(array_buffer[i]); // implicitly assumes little-endian
-            }
-            data = str;
-        }
-        //if arrived here, data is a string, containing the STLA data.
-        while (matches = this.solidPattern.exec(data)) {
-            var meshName = matches[1];
-            var meshNameFromEnd = matches[3];
-            if (meshName != meshNameFromEnd) {
-                babylonjs_1.Tools.Error("Error in STL, solid name != endsolid name");
-                return false;
-            }
-            // check meshesNames
-            if (meshesNames && meshName) {
-                if (meshesNames instanceof Array) {
-                    if (!meshesNames.indexOf(meshName)) {
-                        continue;
-                    }
-                }
-                else {
-                    if (meshName !== meshesNames) {
-                        continue;
-                    }
-                }
-            }
-            // stl mesh name can be empty as well
-            meshName = meshName || "stlmesh";
-            var babylonMesh = new babylonjs_1.Mesh(meshName, scene);
-            this._parseASCII(babylonMesh, matches[2]);
-            if (meshes) {
-                meshes.push(babylonMesh);
-            }
-        }
-        return true;
-    };
-    /**
-     * Load into a scene.
-     * @param scene The scene to load into
-     * @param data The data to import
-     * @param rootUrl The root url for scene and resources
-     * @param onError The callback when import fails
-     * @returns true if successful or false otherwise
-     */
-    STLFileLoader.prototype.load = function (scene, data, rootUrl) {
-        var result = this.importMesh(null, scene, data, rootUrl, null, null, null);
-        if (result) {
-            scene.createDefaultCameraOrLight();
-        }
-        return result;
-    };
-    /**
-     * Load into an asset container.
-     * @param scene The scene to load into
-     * @param data The data to import
-     * @param rootUrl The root url for scene and resources
-     * @param onError The callback when import fails
-     * @returns The loaded asset container
-     */
-    STLFileLoader.prototype.loadAssetContainer = function (scene, data, rootUrl, onError) {
-        var container = new babylonjs_1.AssetContainer(scene);
-        this.importMesh(null, scene, data, rootUrl, container.meshes, null, null);
-        container.removeAllFromScene();
-        return container;
-    };
-    STLFileLoader.prototype._isBinary = function (data) {
-        // check if file size is correct for binary stl
-        var faceSize, nFaces, reader;
-        reader = new DataView(data);
-        faceSize = (32 / 8 * 3) + ((32 / 8 * 3) * 3) + (16 / 8);
-        nFaces = reader.getUint32(80, true);
-        if (80 + (32 / 8) + (nFaces * faceSize) === reader.byteLength) {
-            return true;
-        }
-        // check characters higher than ASCII to confirm binary
-        var fileLength = reader.byteLength;
-        for (var index = 0; index < fileLength; index++) {
-            if (reader.getUint8(index) > 127) {
-                return true;
-            }
-        }
-        return false;
-    };
-    STLFileLoader.prototype._parseBinary = function (mesh, data) {
-        var reader = new DataView(data);
-        var faces = reader.getUint32(80, true);
-        var dataOffset = 84;
-        var faceLength = 12 * 4 + 2;
-        var offset = 0;
-        var positions = new Float32Array(faces * 3 * 3);
-        var normals = new Float32Array(faces * 3 * 3);
-        var indices = new Uint32Array(faces * 3);
-        var indicesCount = 0;
-        for (var face = 0; face < faces; face++) {
-            var start = dataOffset + face * faceLength;
-            var normalX = reader.getFloat32(start, true);
-            var normalY = reader.getFloat32(start + 4, true);
-            var normalZ = reader.getFloat32(start + 8, true);
-            for (var i = 1; i <= 3; i++) {
-                var vertexstart = start + i * 12;
-                // ordering is intentional to match ascii import
-                positions[offset] = reader.getFloat32(vertexstart, true);
-                positions[offset + 2] = reader.getFloat32(vertexstart + 4, true);
-                positions[offset + 1] = reader.getFloat32(vertexstart + 8, true);
-                normals[offset] = normalX;
-                normals[offset + 2] = normalY;
-                normals[offset + 1] = normalZ;
-                offset += 3;
-            }
-            indices[indicesCount] = indicesCount++;
-            indices[indicesCount] = indicesCount++;
-            indices[indicesCount] = indicesCount++;
-        }
-        mesh.setVerticesData(babylonjs_1.VertexBuffer.PositionKind, positions);
-        mesh.setVerticesData(babylonjs_1.VertexBuffer.NormalKind, normals);
-        mesh.setIndices(indices);
-        mesh.computeWorldMatrix(true);
-    };
-    STLFileLoader.prototype._parseASCII = function (mesh, solidData) {
-        var positions = [];
-        var normals = [];
-        var indices = [];
-        var indicesCount = 0;
-        //load facets, ignoring loop as the standard doesn't define it can contain more than vertices
-        var matches;
-        while (matches = this.facetsPattern.exec(solidData)) {
-            var facet = matches[1];
-            //one normal per face
-            var normalMatches = this.normalPattern.exec(facet);
-            this.normalPattern.lastIndex = 0;
-            if (!normalMatches) {
-                continue;
-            }
-            var normal = [Number(normalMatches[1]), Number(normalMatches[5]), Number(normalMatches[3])];
-            var vertexMatch;
-            while (vertexMatch = this.vertexPattern.exec(facet)) {
-                positions.push(Number(vertexMatch[1]), Number(vertexMatch[5]), Number(vertexMatch[3]));
-                normals.push(normal[0], normal[1], normal[2]);
-            }
-            indices.push(indicesCount++, indicesCount++, indicesCount++);
-            this.vertexPattern.lastIndex = 0;
-        }
-        this.facetsPattern.lastIndex = 0;
-        mesh.setVerticesData(babylonjs_1.VertexBuffer.PositionKind, positions);
-        mesh.setVerticesData(babylonjs_1.VertexBuffer.NormalKind, normals);
-        mesh.setIndices(indices);
-        mesh.computeWorldMatrix(true);
-    };
-    return STLFileLoader;
-}());
-exports.STLFileLoader = STLFileLoader;
-if (babylonjs_1.SceneLoader) {
-    babylonjs_1.SceneLoader.RegisterPlugin(new STLFileLoader());
-}
-
-
-/***/ }),
-
-/***/ "babylonjs":
-/*!****************************************************************************************************!*\
-  !*** external {"root":"BABYLON","commonjs":"babylonjs","commonjs2":"babylonjs","amd":"babylonjs"} ***!
-  \****************************************************************************************************/
-/*! no static exports found */
-/***/ (function(module, exports) {
-
-module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs__;
-
-/***/ })
-
-/******/ });
-});
-//# sourceMappingURL=babylon.stlFileLoader.js.map
+/// <reference path="../../../dist/preview release/babylon.d.ts"/>
+var BABYLON;
+(function (BABYLON) {
+    var STLFileLoader = /** @class */ (function () {
+        function STLFileLoader() {
+            this.solidPattern = /solid (\S*)([\S\s]*)endsolid[ ]*(\S*)/g;
+            this.facetsPattern = /facet([\s\S]*?)endfacet/g;
+            this.normalPattern = /normal[\s]+([\-+]?[0-9]+\.?[0-9]*([eE][\-+]?[0-9]+)?)+[\s]+([\-+]?[0-9]*\.?[0-9]+([eE][\-+]?[0-9]+)?)+[\s]+([\-+]?[0-9]*\.?[0-9]+([eE][\-+]?[0-9]+)?)+/g;
+            this.vertexPattern = /vertex[\s]+([\-+]?[0-9]+\.?[0-9]*([eE][\-+]?[0-9]+)?)+[\s]+([\-+]?[0-9]*\.?[0-9]+([eE][\-+]?[0-9]+)?)+[\s]+([\-+]?[0-9]*\.?[0-9]+([eE][\-+]?[0-9]+)?)+/g;
+            this.name = "stl";
+            // force data to come in as an ArrayBuffer
+            // we'll convert to string if it looks like it's an ASCII .stl
+            this.extensions = {
+                ".stl": { isBinary: true },
+            };
+        }
+        STLFileLoader.prototype.importMesh = function (meshesNames, scene, data, rootUrl, meshes, particleSystems, skeletons) {
+            var matches;
+            if (typeof data !== "string") {
+                if (this.isBinary(data)) {
+                    // binary .stl
+                    var babylonMesh = new BABYLON.Mesh("stlmesh", scene);
+                    this.parseBinary(babylonMesh, data);
+                    if (meshes) {
+                        meshes.push(babylonMesh);
+                    }
+                    return true;
+                }
+                // ASCII .stl
+                // convert to string
+                var array_buffer = new Uint8Array(data);
+                var str = '';
+                for (var i = 0; i < data.byteLength; i++) {
+                    str += String.fromCharCode(array_buffer[i]); // implicitly assumes little-endian
+                }
+                data = str;
+            }
+            //if arrived here, data is a string, containing the STLA data.
+            while (matches = this.solidPattern.exec(data)) {
+                var meshName = matches[1];
+                var meshNameFromEnd = matches[3];
+                if (meshName != meshNameFromEnd) {
+                    BABYLON.Tools.Error("Error in STL, solid name != endsolid name");
+                    return false;
+                }
+                // check meshesNames
+                if (meshesNames && meshName) {
+                    if (meshesNames instanceof Array) {
+                        if (!meshesNames.indexOf(meshName)) {
+                            continue;
+                        }
+                    }
+                    else {
+                        if (meshName !== meshesNames) {
+                            continue;
+                        }
+                    }
+                }
+                // stl mesh name can be empty as well
+                meshName = meshName || "stlmesh";
+                var babylonMesh = new BABYLON.Mesh(meshName, scene);
+                this.parseASCII(babylonMesh, matches[2]);
+                if (meshes) {
+                    meshes.push(babylonMesh);
+                }
+            }
+            return true;
+        };
+        STLFileLoader.prototype.load = function (scene, data, rootUrl) {
+            var result = this.importMesh(null, scene, data, rootUrl, null, null, null);
+            if (result) {
+                scene.createDefaultCameraOrLight();
+            }
+            return result;
+        };
+        STLFileLoader.prototype.loadAssetContainer = function (scene, data, rootUrl, onError) {
+            var container = new BABYLON.AssetContainer(scene);
+            this.importMesh(null, scene, data, rootUrl, container.meshes, null, null);
+            container.removeAllFromScene();
+            return container;
+        };
+        STLFileLoader.prototype.isBinary = function (data) {
+            // check if file size is correct for binary stl
+            var faceSize, nFaces, reader;
+            reader = new DataView(data);
+            faceSize = (32 / 8 * 3) + ((32 / 8 * 3) * 3) + (16 / 8);
+            nFaces = reader.getUint32(80, true);
+            if (80 + (32 / 8) + (nFaces * faceSize) === reader.byteLength) {
+                return true;
+            }
+            // check characters higher than ASCII to confirm binary
+            var fileLength = reader.byteLength;
+            for (var index = 0; index < fileLength; index++) {
+                if (reader.getUint8(index) > 127) {
+                    return true;
+                }
+            }
+            return false;
+        };
+        STLFileLoader.prototype.parseBinary = function (mesh, data) {
+            var reader = new DataView(data);
+            var faces = reader.getUint32(80, true);
+            var dataOffset = 84;
+            var faceLength = 12 * 4 + 2;
+            var offset = 0;
+            var positions = new Float32Array(faces * 3 * 3);
+            var normals = new Float32Array(faces * 3 * 3);
+            var indices = new Uint32Array(faces * 3);
+            var indicesCount = 0;
+            for (var face = 0; face < faces; face++) {
+                var start = dataOffset + face * faceLength;
+                var normalX = reader.getFloat32(start, true);
+                var normalY = reader.getFloat32(start + 4, true);
+                var normalZ = reader.getFloat32(start + 8, true);
+                for (var i = 1; i <= 3; i++) {
+                    var vertexstart = start + i * 12;
+                    // ordering is intentional to match ascii import
+                    positions[offset] = reader.getFloat32(vertexstart, true);
+                    positions[offset + 2] = reader.getFloat32(vertexstart + 4, true);
+                    positions[offset + 1] = reader.getFloat32(vertexstart + 8, true);
+                    normals[offset] = normalX;
+                    normals[offset + 2] = normalY;
+                    normals[offset + 1] = normalZ;
+                    offset += 3;
+                }
+                indices[indicesCount] = indicesCount++;
+                indices[indicesCount] = indicesCount++;
+                indices[indicesCount] = indicesCount++;
+            }
+            mesh.setVerticesData(BABYLON.VertexBuffer.PositionKind, positions);
+            mesh.setVerticesData(BABYLON.VertexBuffer.NormalKind, normals);
+            mesh.setIndices(indices);
+            mesh.computeWorldMatrix(true);
+        };
+        STLFileLoader.prototype.parseASCII = function (mesh, solidData) {
+            var positions = [];
+            var normals = [];
+            var indices = [];
+            var indicesCount = 0;
+            //load facets, ignoring loop as the standard doesn't define it can contain more than vertices
+            var matches;
+            while (matches = this.facetsPattern.exec(solidData)) {
+                var facet = matches[1];
+                //one normal per face
+                var normalMatches = this.normalPattern.exec(facet);
+                this.normalPattern.lastIndex = 0;
+                if (!normalMatches) {
+                    continue;
+                }
+                var normal = [Number(normalMatches[1]), Number(normalMatches[5]), Number(normalMatches[3])];
+                var vertexMatch;
+                while (vertexMatch = this.vertexPattern.exec(facet)) {
+                    positions.push(Number(vertexMatch[1]), Number(vertexMatch[5]), Number(vertexMatch[3]));
+                    normals.push(normal[0], normal[1], normal[2]);
+                }
+                indices.push(indicesCount++, indicesCount++, indicesCount++);
+                this.vertexPattern.lastIndex = 0;
+            }
+            this.facetsPattern.lastIndex = 0;
+            mesh.setVerticesData(BABYLON.VertexBuffer.PositionKind, positions);
+            mesh.setVerticesData(BABYLON.VertexBuffer.NormalKind, normals);
+            mesh.setIndices(indices);
+            mesh.computeWorldMatrix(true);
+        };
+        return STLFileLoader;
+    }());
+    BABYLON.STLFileLoader = STLFileLoader;
+    if (BABYLON.SceneLoader) {
+        BABYLON.SceneLoader.RegisterPlugin(new STLFileLoader());
+    }
+})(BABYLON || (BABYLON = {}));
+
+//# sourceMappingURL=babylon.stlFileLoader.js.map

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 415
dist/preview release/loaders/babylon.stlFileLoader.min.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1857 - 1737
dist/preview release/loaders/babylonjs.loaders.d.ts


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 7009 - 7623
dist/preview release/loaders/babylonjs.loaders.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 2
dist/preview release/loaders/babylonjs.loaders.min.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1863 - 3618
dist/preview release/loaders/babylonjs.loaders.module.d.ts


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

@@ -4,7 +4,7 @@
     },
     "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.",
-    "version": "4.0.0-alpha.5",
+    "version": "4.0.0-alpha.6",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -27,8 +27,8 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs-gltf2interface": "4.0.0-alpha.5",
-        "babylonjs": "4.0.0-alpha.5"
+        "babylonjs-gltf2interface": "4.0.0-alpha.6",
+        "babylonjs": "4.0.0-alpha.6"
     },
     "engines": {
         "node": "*"

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

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-materials",
     "description": "The Babylon.js materials library is a collection of advanced materials to be used in a Babylon.js scene.",
-    "version": "4.0.0-alpha.5",
+    "version": "4.0.0-alpha.6",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -27,7 +27,7 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs": "4.0.0-alpha.5"
+        "babylonjs": "4.0.0-alpha.6"
     },
     "engines": {
         "node": "*"

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

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-post-process",
     "description": "The Babylon.js materials library is a collection of advanced materials to be used in a Babylon.js scene.",
-    "version": "4.0.0-alpha.5",
+    "version": "4.0.0-alpha.6",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -27,7 +27,7 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs": "4.0.0-alpha.5"
+        "babylonjs": "4.0.0-alpha.6"
     },
     "engines": {
         "node": "*"

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

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-procedural-textures",
     "description": "The Babylon.js materials library is a collection of advanced materials to be used in a Babylon.js scene.",
-    "version": "4.0.0-alpha.5",
+    "version": "4.0.0-alpha.6",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -27,7 +27,7 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs": "4.0.0-alpha.5"
+        "babylonjs": "4.0.0-alpha.6"
     },
     "engines": {
         "node": "*"

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

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-serializers",
     "description": "The Babylon.js serializers library is an extension you can use to serialize Babylon scenes.",
-    "version": "4.0.0-alpha.5",
+    "version": "4.0.0-alpha.6",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -27,8 +27,8 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs": "4.0.0-alpha.5",
-        "babylonjs-gltf2interface": "4.0.0-alpha.5"
+        "babylonjs": "4.0.0-alpha.6",
+        "babylonjs-gltf2interface": "4.0.0-alpha.6"
     },
     "engines": {
         "node": "*"

+ 3 - 174
dist/preview release/viewer/babylon.viewer.d.ts

@@ -515,167 +515,10 @@ declare module BabylonViewer {
     }
 }
 declare module BabylonViewer {
-    /**
-        * The current state of the model
-        */
-    export enum ModelState {
-            INIT = 0,
-            LOADING = 1,
-            LOADED = 2,
-            ENTRY = 3,
-            ENTRYDONE = 4,
-            COMPLETE = 5,
-            CANCELED = 6,
-            ERROR = 7
-    }
-    /**
-        * The viewer model is a container for all assets representing a sngle loaded model.
-        */
-    export class ViewerModel implements BABYLON.IDisposable {
-            /**
-                * The loader used to load this model.
-                */
-            loader: BABYLON.ISceneLoaderPlugin | BABYLON.ISceneLoaderPluginAsync;
-            /**
-                * This model's root mesh (the parent of all other meshes).
-                * This mesh does not(!) exist in the meshes array.
-                */
-            rootMesh: BABYLON.AbstractMesh;
-            /**
-                * ParticleSystems connected to this model
-                */
-            particleSystems: Array<BABYLON.IParticleSystem>;
-            /**
-                * Skeletons defined in this model
-                */
-            skeletons: Array<BABYLON.Skeleton>;
-            /**
-                * The current model animation.
-                * On init, this will be undefined.
-                */
-            currentAnimation: IModelAnimation;
-            /**
-                * Observers registered here will be executed when the model is done loading
-                */
-            onLoadedObservable: BABYLON.Observable<ViewerModel>;
-            /**
-                * Observers registered here will be executed when the loader notified of a progress event
-                */
-            onLoadProgressObservable: BABYLON.Observable<BABYLON.SceneLoaderProgressEvent>;
-            /**
-                * Observers registered here will be executed when the loader notified of an error.
-                */
-            onLoadErrorObservable: BABYLON.Observable<{
-                    message: string;
-                    exception: any;
-            }>;
-            /**
-                * Will be executed after the model finished loading and complete, including entry animation and lod
-                */
-            onCompleteObservable: BABYLON.Observable<ViewerModel>;
-            /**
-                * Observers registered here will be executed every time the model is being configured.
-                * This can be used to extend the model's configuration without extending the class itself
-                */
-            onAfterConfigure: BABYLON.Observable<ViewerModel>;
-            /**
-                * The current model state (loaded, error, etc)
-                */
-            state: ModelState;
-            /**
-                * A loadID provided by the modelLoader, unique to ths (Abstract)Viewer instance.
-                */
-            loadId: number;
-            loadInfo: BABYLON.GLTF2.IAsset;
-            constructor(_observablesManager: ObservablesManager, modelConfiguration: IModelConfiguration, _configurationContainer?: ConfigurationContainer | undefined);
-            shadowsRenderedAfterLoad: boolean;
-            getViewerId(): string | undefined;
-            /**
-             * Set whether this model is enabled or not.
-             */
-            enabled: boolean;
-            loaderDone: boolean;
-            /**
-                * Add a mesh to this model.
-                * Any mesh that has no parent will be provided with the root mesh as its new parent.
-                *
-                * @param mesh the new mesh to add
-                * @param triggerLoaded should this mesh trigger the onLoaded observable. Used when adding meshes manually.
-                */
-            addMesh(mesh: BABYLON.AbstractMesh, triggerLoaded?: boolean): Promise<ViewerModel> | undefined;
-            /**
-                * get the list of meshes (excluding the root mesh)
-                */
-            readonly meshes: BABYLON.AbstractMesh[];
-            /**
-             * (Re-)set the model's entire configuration
-             * @param newConfiguration the new configuration to replace the new one
-             */
-            configuration: IModelConfiguration;
-            /**
-                * Update the current configuration with new values.
-                * Configuration will not be overwritten, but merged with the new configuration.
-                * Priority is to the new configuration
-                * @param newConfiguration the configuration to be merged into the current configuration;
-                */
-            updateConfiguration(newConfiguration: Partial<IModelConfiguration>): void;
-            /**
-                * Add a new animation group to this model.
-                * @param animationGroup the new animation group to be added
-                */
-            addAnimationGroup(animationGroup: BABYLON.AnimationGroup): void;
-            /**
-                * Get the ModelAnimation array
-                */
-            getAnimations(): Array<IModelAnimation>;
-            /**
-                * Get the animations' names. Using the names you can play a specific animation.
-                */
-            getAnimationNames(): Array<string>;
-            /**
-                * Get an animation by the provided name. Used mainly when playing n animation.
-                * @param name the name of the animation to find
-                */
-            protected _getAnimationByName(name: string): BABYLON.Nullable<IModelAnimation>;
-            /**
-                * Choose an initialized animation using its name and start playing it
-                * @param name the name of the animation to play
-                * @returns The model aniamtion to be played.
-                */
-            playAnimation(name: string): IModelAnimation;
-            setCurrentAnimationByName(name: string): IModelAnimation;
-            /**
-                * Apply a material configuration to a material
-                * @param material BABYLON.Material to apply configuration to
-                * @hidden
-                */
-            _applyModelMaterialConfiguration(material: BABYLON.Material): void;
-            /**
-             * Begin @animations with the specified @easingFunction
-             * @param animations The BABYLON Animations to begin
-             * @param duration of transition, in seconds
-             * @param easingFunction An easing function to apply
-             * @param easingMode A easing mode to apply to the easingFunction
-             * @param onAnimationEnd Call back trigger at the end of the animation.
-             */
-            transitionTo(animations: BABYLON.Animation[], duration: number, easingFunction: any, easingMode: number | undefined, onAnimationEnd: () => void): void;
-            /**
-                * Stops and removes all animations that have been applied to the model
-                */
-            stopAllAnimations(): void;
-            /**
-                * Will remove this model from the viewer (but NOT dispose it).
-                */
-            remove(): void;
-            /**
-                * Dispose this model, including all of its associated assets.
-                */
-            dispose(): void;
-    }
 }
 declare module BabylonViewer {
     /**
-        * BABYLON.Animation play mode enum - is the animation looping or playing once
+        * Animation play mode enum - is the animation looping or playing once
         */
     export const enum AnimationPlayMode {
             ONCE = 0,
@@ -757,7 +600,7 @@ declare module BabylonViewer {
                 */
             readonly currentFrame: number;
             /**
-                * BABYLON.Animation's FPS value
+                * Animation's FPS value
                 */
             readonly fps: number;
             /**
@@ -924,7 +767,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 +1401,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 {

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 2 - 2
dist/preview release/viewer/babylon.viewer.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 4 - 4
dist/preview release/viewer/babylon.viewer.max.js


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

@@ -567,6 +567,7 @@ declare module 'babylonjs-viewer/loader/modelLoader' {
 }
 
 declare module 'babylonjs-viewer/model/viewerModel' {
+<<<<<<< HEAD
     import { ISceneLoaderPlugin, ISceneLoaderPluginAsync, AnimationGroup, AbstractMesh, Observable, SceneLoaderProgressEvent, IParticleSystem, Skeleton, IDisposable, Nullable, Animation, Material } from "babylonjs";
     import { IAsset } from "babylonjs-gltf2interface";
     import { IModelConfiguration } from "babylonjs-viewer/configuration/interfaces/modelConfiguration";
@@ -730,6 +731,9 @@ declare module 'babylonjs-viewer/model/viewerModel' {
                 */
             dispose(): void;
     }
+=======
+    
+>>>>>>> upstream/master
 }
 
 declare module 'babylonjs-viewer/model/modelAnimation' {
@@ -986,14 +990,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;
 }
 
@@ -1664,22 +1667,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';

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

@@ -24,6 +24,7 @@
 - Added `button.image` and `button.textBlock` to simplify access to button internal parts ([Deltakosh](https://github.com/deltakosh))
 - Added `sldier.displayThumb` to show/hide slider's thumb ([Deltakosh](https://github.com/deltakosh))
 - Added `grid.rowCount`, `grid.columnCount` and `grid.getChildrenAt()` ([Deltakosh](https://github.com/deltakosh))
+- Added `Control.AllowAlphaInheritance` to let users control the way alpha is used (inherited or not) ([Deltakosh](https://github.com/deltakosh))
 
 ### Core Engine
 
@@ -48,6 +49,7 @@
   - Added an `Vector3.UnprojectRayToRef` static function to avoid computing and inverting the projection matrix twice when updating a Ray.
 - Align `BoundingBox` and `BoundingSphere` API and behavior for clarity and simplicity. As a consequence, the `BoundingBox`'s method `setWorldMatrix` has been removed and the underlying world matrix cannot be modified but by calling `reConstruct` or `update`. ([barroij](https://github.com/barroij))
 - Make sure that `Material.markAsDirty` and all the `markXXXDirty` methods early out when `scene.blockMaterialDirtyMechanism` is true. ([barroij](https://github.com/barroij))
+- Add updateUpVectorFromRotation to target camera to allow the up vector to be computed from rotation ([TrevorDev](https://github.com/TrevorDev))
 
 ### glTF Loader
 
@@ -66,12 +68,14 @@
 - Gizmo scaling not consistent when camera is parented ([TrevorDev](https://github.com/TrevorDev))
 - Context loss causing unexpected results with dynamic textures ([TrevorDev](https://github.com/TrevorDev))
 - CreateScreenshotUsingRenderTarget stretches mirror textures when setting both width and height ([TrevorDev](https://github.com/TrevorDev))
+- VR helper only updating vr cameras position when entering vr, rotation was missing ([TrevorDev](https://github.com/TrevorDev))
+- Fix VR controllers after gltfLoader transformNode change ([TrevorDev](https://github.com/TrevorDev))
 
 ### Core Engine
 - Fixed a bug with `mesh.alwaysSelectAsActiveMesh` preventing layerMask to be taken in account ([Deltakosh](https://github.com/deltakosh))
 - Fixed a bug with pointer up being fire twice ([Deltakosh](https://github.com/deltakosh))
 - Fixed a bug with particle systems being update once per camera instead of once per frame ([Deltakosh](https://github.com/deltakosh))
-- Handle properly the `LinesMesh` `intersectionThreshold` by using its value directly when the intersection against a `Ray` is checked, instead of extending the `BoundingInfo` accordingly ([barroij](https://github.com/barroij))
+- Handle properly the `LinesMesh` `intersectionThreshold` by using its value directly when the intersection against a `Ray` is checked, instead of extending the `BoundingInfo` accordingly + Addded an `InstancesLinesMesh` class used to create instance of `LinesMesh` so that each instance can have its own `intersectionThreshold` value ([barroij](https://github.com/barroij))
 - Fixed the `LineEdgesRenderer` used for edge rendering of `LinesMesh` handle properly LinesMesh made of disconnected lines + Make it work for instance of `LinesMesh` ([barroij](https://github.com/barroij))
 - Fixed `Matrix.toNormalMatrix`function ([barroij](https://github.com/barroij))
 - Add missing effect layer to asset container ([TrevorDev](https://github.com/TrevorDev))

+ 17 - 4
gui/src/2D/controls/control.ts

@@ -11,6 +11,11 @@ import { Matrix2D, Vector2WithInfo } from "../math2D";
  * @see http://doc.babylonjs.com/how_to/gui#controls
  */
 export class Control {
+    /**
+     * Gets or sets a boolean indicating if alpha must be an inherited value (false by default)
+     */
+    public static AllowAlphaInheritance = false;
+
     private _alpha = 1;
     private _alphaSet = false;
     private _zIndex = 0;
@@ -985,7 +990,9 @@ export class Control {
             context.fillStyle = this._color;
         }
 
-        if (this._alphaSet) {
+        if (Control.AllowAlphaInheritance) {
+            context.globalAlpha *= this._alpha;
+        } else if (this._alphaSet) {
             context.globalAlpha = this.parent ? this.parent.alpha * this._alpha : this._alpha;
         }
     }
@@ -1269,12 +1276,18 @@ export class Control {
 
     /** @hidden */
     public _onPointerOut(target: Control): void {
-        if (!this._isEnabled) {
+        if (!this._isEnabled || target === this) {
             return;
         }
         this._enterCount = 0;
 
-        this.onPointerOutObservable.notifyObservers(this, -1, target, this);
+        var canNotify: boolean = true;
+
+        if (!target.isAscendant(this)) {
+            canNotify = this.onPointerOutObservable.notifyObservers(this, -1, target, this);
+        }
+
+        if (canNotify && this.parent != null) { this.parent._onPointerOut(target); }
     }
 
     /** @hidden */
@@ -1337,7 +1350,7 @@ export class Control {
             this._onPointerMove(this, this._dummyVector2);
 
             var previousControlOver = this._host._lastControlOver[pointerId];
-            if (previousControlOver && previousControlOver !== this && !this.isAscendant(previousControlOver)) {
+            if (previousControlOver && previousControlOver !== this) {
                 previousControlOver._onPointerOut(this);
             }
 

+ 1 - 1
package.json

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

+ 19 - 6
src/Cameras/VR/vrExperienceHelper.ts

@@ -210,17 +210,18 @@ import { Animation, SineEase, EasingFunction, CircleEase } from "Animations";
                 });
             };
             makeNotPick(mesh);
-            var childMeshes = mesh.getChildMeshes();
+            var meshChildren = mesh.getChildren(undefined, false);
 
+            let laserParent: TransformNode = mesh;
             this.webVRController._pointingPoseNode = null;
-            for (var i = 0; i < childMeshes.length; i++) {
-                if (childMeshes[i].name && childMeshes[i].name.indexOf(PoseEnabledController.POINTING_POSE) >= 0) {
-                    mesh = childMeshes[i];
-                    this.webVRController._pointingPoseNode = mesh;
+            for (var i = 0; i < meshChildren.length; i++) {
+                if (meshChildren[i].name && meshChildren[i].name.indexOf(PoseEnabledController.POINTING_POSE) >= 0) {
+                    laserParent = <TransformNode>meshChildren[i];
+                    this.webVRController._pointingPoseNode = laserParent;
                     break;
                 }
             }
-            this._laserPointer.parent = mesh;
+            this._laserPointer.parent = laserParent;
         }
 
         public _updatePointerDistance(distance: number = 100) {
@@ -888,6 +889,18 @@ import { Animation, SineEase, EasingFunction, CircleEase } from "Animations";
 
             if (this._scene.activeCamera) {
                 this._position = this._scene.activeCamera.position.clone();
+
+                if (this.vrDeviceOrientationCamera) {
+                    this.vrDeviceOrientationCamera.rotation = BABYLON.Quaternion.FromRotationMatrix(this._scene.activeCamera.getWorldMatrix().getRotationMatrix()).toEulerAngles();
+                }
+                if (this.webVRCamera) {
+                    var currentYRotation = this.webVRCamera.deviceRotationQuaternion.toEulerAngles().y;
+                    var desiredYRotation = BABYLON.Quaternion.FromRotationMatrix(this._scene.activeCamera.getWorldMatrix().getRotationMatrix()).toEulerAngles().y;
+                    var delta = desiredYRotation - currentYRotation;
+                    var currentGlobalRotation = this.webVRCamera.rotationQuaternion.toEulerAngles().y;
+                    this.webVRCamera.rotationQuaternion = Quaternion.FromEulerAngles(0, currentGlobalRotation + delta, 0);
+                }
+
                 // make sure that we return to the last active camera
                 this._existingCamera = this._scene.activeCamera;
             }

+ 1 - 0
src/Cameras/XR/webXRCamera.ts

@@ -21,6 +21,7 @@ import { Scene } from "scene";
             this.minZ = 0;
             this.rotationQuaternion = new Quaternion();
             this.cameraRigMode = Camera.RIG_MODE_CUSTOM;
+            this.updateUpVectorFromRotation = true;
             this._updateNumberOfRigCameras(1);
         }
 

+ 3 - 0
src/Cameras/XR/webXRExperienceHelper.ts

@@ -107,6 +107,9 @@ import { Ray } from "Culling";
          * @returns promise that resolves after xr mode has entered
          */
         public enterXRAsync(sessionCreationOptions: XRSessionCreationOptions, frameOfReference: string) {
+            if (!this._supported) {
+                throw "XR session not supported by this browser";
+            }
             this._setState(WebXRState.ENTERING_XR);
 
             return this._sessionManager.enterXRAsync(sessionCreationOptions, frameOfReference).then(() => {

+ 2 - 1
src/Cameras/XR/webXRSessionManager.ts

@@ -44,7 +44,8 @@ import { Ray } from "Culling";
          * @returns Promise which resolves after it is initialized
          */
         public initializeAsync(): Promise<void> {
-             // Check if the browser supports webXR
+            Tools.Warn("The WebXR APIs are still under development and are subject to change in the future.");
+            // Check if the browser supports webXR
             this._xrNavigator = navigator;
             if (!this._xrNavigator.xr) {
                 return Promise.reject("webXR not supported by this browser");

+ 13 - 1
src/Cameras/targetCamera.ts

@@ -18,6 +18,11 @@ import { Quaternion, Matrix, Vector3, Vector2, Epsilon, Tmp } from "Math";
          * Define the current rotation the camera is rotating to
          */
         public cameraRotation = new Vector2(0, 0);
+        /**
+         * When set, the up vector of the camera will be updated by the rotation of the camera
+         */
+        public updateUpVectorFromRotation = false;
+        private _tmpQuaternion = new Quaternion();
 
         /**
          * Define the current rotation of the camera
@@ -377,7 +382,14 @@ import { Quaternion, Matrix, Vector3, Vector2, Epsilon, Tmp } from "Math";
 
             // Computing target and final matrix
             this.position.addToRef(this._transformedReferencePoint, this._currentTarget);
-
+            if (this.updateUpVectorFromRotation) {
+                if (this.rotationQuaternion) {
+                    Axis.Y.rotateByQuaternionToRef(this.rotationQuaternion, this.upVector);
+                } else {
+                    Quaternion.FromEulerVectorToRef(this.rotation, this._tmpQuaternion);
+                    Axis.Y.rotateByQuaternionToRef(this._tmpQuaternion, this.upVector);
+                }
+            }
             this._computeViewMatrix(this.position, this._currentTarget, this.upVector);
             return this._viewMatrix;
         }

+ 13 - 7
src/Engine/engine.ts

@@ -494,7 +494,7 @@ import { _DepthCullingState, _StencilState, _AlphaState } from "States";
          * Returns the current version of the framework
          */
         public static get Version(): string {
-            return "4.0.0-alpha.5";
+            return "4.0.0-alpha.6";
         }
 
         /**
@@ -1109,8 +1109,10 @@ import { _DepthCullingState, _StencilState, _AlphaState } from "States";
                     this.onCanvasPointerOutObservable.notifyObservers(ev);
                 };
 
-                window.addEventListener("blur", this._onBlur);
-                window.addEventListener("focus", this._onFocus);
+                if (Tools.IsWindowObjectExist()) {
+                    window.addEventListener("blur", this._onBlur);
+                    window.addEventListener("focus", this._onFocus);
+                }
 
                 canvas.addEventListener("pointerout", this._onCanvasPointerOut);
 
@@ -1161,8 +1163,10 @@ import { _DepthCullingState, _StencilState, _AlphaState } from "States";
             }
 
             // Viewport
-            var limitDeviceRatio = options.limitDeviceRatio || window.devicePixelRatio || 1.0;
-            this._hardwareScalingLevel = adaptToDeviceRatio ? 1.0 / Math.min(limitDeviceRatio, window.devicePixelRatio || 1.0) : 1.0;
+            const devicePixelRatio = Tools.IsWindowObjectExist() ? (window.devicePixelRatio || 1.0) : 1.0;
+
+            var limitDeviceRatio = options.limitDeviceRatio || devicePixelRatio;
+            this._hardwareScalingLevel = adaptToDeviceRatio ? 1.0 / Math.min(limitDeviceRatio, devicePixelRatio) : 1.0;
             this.resize();
 
             this._isStencilEnable = options.stencil ? true : false;
@@ -1223,8 +1227,10 @@ import { _DepthCullingState, _StencilState, _AlphaState } from "States";
                     document.exitPointerLock();
                 };
 
-                window.addEventListener('vrdisplaypointerrestricted', this._onVRDisplayPointerRestricted, false);
-                window.addEventListener('vrdisplaypointerunrestricted', this._onVRDisplayPointerUnrestricted, false);
+                if (Tools.IsWindowObjectExist()) {
+                    window.addEventListener('vrdisplaypointerrestricted', this._onVRDisplayPointerRestricted, false);
+                    window.addEventListener('vrdisplaypointerunrestricted', this._onVRDisplayPointerUnrestricted, false);
+                }
             }
 
             // Create Audio Engine if needed.

+ 1 - 1
src/Gamepad/Controllers/poseEnabledController.ts

@@ -188,7 +188,7 @@ import { Engine } from "Engine";
          * Node to be used when casting a ray from the controller
          * @hidden
          */
-        public _pointingPoseNode: Nullable<AbstractMesh> = null;
+        public _pointingPoseNode: Nullable<TransformNode> = null;
         /**
          * Name of the child mesh that can be used to cast a ray from the controller
          */

+ 9 - 9
src/Gamepad/Controllers/windowsMotionController.ts

@@ -20,7 +20,7 @@ import { _DepthCullingState, _StencilState, _AlphaState } from "States";
         /**
          * Node of the mesh corrisponding to the direction the ray should be cast from the controller
          */
-        public pointingPoseNode: AbstractMesh;
+        public pointingPoseNode: TransformNode;
         /**
          * Map of the button meshes contained in the controller
          */
@@ -42,7 +42,7 @@ import { _DepthCullingState, _StencilState, _AlphaState } from "States";
         /**
          * The mesh
          */
-        value: AbstractMesh;
+        value: TransformNode;
     }
 
     /**
@@ -52,11 +52,11 @@ import { _DepthCullingState, _StencilState, _AlphaState } from "States";
         /**
          * The mesh that should be displayed when pressed
          */
-        pressed: AbstractMesh;
+        pressed: TransformNode;
         /**
          * The mesh that should be displayed when not pressed
          */
-        unpressed: AbstractMesh;
+        unpressed: TransformNode;
     }
 
     /**
@@ -66,11 +66,11 @@ import { _DepthCullingState, _StencilState, _AlphaState } from "States";
         /**
          * The mesh that should be set when at its min
          */
-        min: AbstractMesh;
+        min: TransformNode;
         /**
          * The mesh that should be set when at its max
          */
-        max: AbstractMesh;
+        max: TransformNode;
     }
 
     /**
@@ -493,11 +493,11 @@ import { _DepthCullingState, _StencilState, _AlphaState } from "States";
 
             // Look through all children recursively. This will return null if no mesh exists with the given name.
             function getChildByName(node: Node, name: string) {
-                return node.getChildMeshes(false, (n) => n.name === name)[0];
+                return <TransformNode>node.getChildren((n) => n.name === name, false)[0];
             }
             // Look through only immediate children. This will return null if no mesh exists with the given name.
-            function getImmediateChildByName(node: Node, name: string): AbstractMesh {
-                return node.getChildMeshes(true, (n) => n.name == name)[0];
+            function getImmediateChildByName(node: Node, name: string): TransformNode {
+                return <TransformNode>node.getChildren((n) => n.name == name, true)[0];
             }
         }
 

+ 7 - 0
src/Materials/Textures/baseTexture.ts

@@ -20,6 +20,12 @@ import { _DepthCullingState, _StencilState, _AlphaState } from "States";
         public static DEFAULT_ANISOTROPIC_FILTERING_LEVEL = 4;
 
         /**
+         * Gets or sets the unique id of the texture
+         */
+        @serialize()
+        public uniqueId: number;
+
+        /**
          * Define the name of the texture.
          */
         @serialize()
@@ -284,6 +290,7 @@ import { _DepthCullingState, _StencilState, _AlphaState } from "States";
             if (this._scene) {
                 this._scene.textures.push(this);
                 this._scene.onNewTextureAddedObservable.notifyObservers(this);
+                this.uniqueId = this._scene.getUniqueId();
             }
             this._uid = null;
         }

+ 8 - 0
src/Materials/multiMaterial.ts

@@ -25,6 +25,14 @@ import { Tags } from "Tools";
         }
 
         /**
+         * Function used to align with Node.getChildren()
+         * @returns the list of Materials used within the multi material
+         */
+        public getChildren(): Nullable<Material>[] {
+            return this.subMaterials;
+        }
+
+        /**
          * Instantiates a new Multi Material
          * A multi-material is used to apply different materials to different parts of the same object without the need of
          * separate meshes. This can be use to improve performances.

+ 1 - 1
src/Math/math.ts

@@ -2276,7 +2276,7 @@ import { Ray } from "Culling";
          * @param result defines the Vector3 where to store the result
          */
         public static TransformCoordinatesToRef(vector: Vector3, transformation: Readonly<Matrix>, result: Vector3): void {
-            return Vector3.TransformCoordinatesFromFloatsToRef(vector.x, vector.y, vector.z, transformation, result);
+            Vector3.TransformCoordinatesFromFloatsToRef(vector.x, vector.y, vector.z, transformation, result);
         }
 
         /**

+ 7 - 5
src/Mesh/abstractMesh.ts

@@ -1377,9 +1377,9 @@ import { SolidParticle } from "Particles";
          */
         public intersects(ray: Ray, fastCheck?: boolean): PickingInfo {
             var pickingInfo = new PickingInfo();
-            const intersectionTreshold = this.getClassName() === "LinesMesh" ? (<LinesMesh>(this as any)).intersectionThreshold : 0;
+            const intersectionThreshold = this.getClassName() === "InstancedLinesMesh" || this.getClassName() === "LinesMesh" ? (this as any).intersectionThreshold : 0;
             const boundingInfo = this._boundingInfo;
-            if (!this.subMeshes || !boundingInfo || !ray.intersectsSphere(boundingInfo.boundingSphere, intersectionTreshold) || !ray.intersectsBox(boundingInfo.boundingBox, intersectionTreshold)) {
+            if (!this.subMeshes || !boundingInfo || !ray.intersectsSphere(boundingInfo.boundingSphere, intersectionThreshold) || !ray.intersectsBox(boundingInfo.boundingBox, intersectionThreshold)) {
                 return pickingInfo;
             }
 
@@ -1416,8 +1416,10 @@ import { SolidParticle } from "Particles";
             if (intersectInfo) {
                 // Get picked point
                 const world = this.getWorldMatrix();
-                const worldOrigin = Vector3.TransformCoordinates(ray.origin, world);
-                const direction = ray.direction.scaleToRef(intersectInfo.distance, Tmp.Vector3[0]);
+                const worldOrigin = Tmp.Vector3[0];
+                const direction = Tmp.Vector3[1];
+                Vector3.TransformCoordinatesToRef(ray.origin, world, worldOrigin);
+                ray.direction.scaleToRef(intersectInfo.distance, direction);
                 const worldDirection = Vector3.TransformNormal(direction, world);
                 const pickedPoint = worldDirection.addInPlace(worldOrigin);
 
@@ -1525,7 +1527,7 @@ import { SolidParticle } from "Particles";
             });
 
             // SubMeshes
-            if (this.getClassName() !== "InstancedMesh") {
+            if (this.getClassName() !== "InstancedMesh" || this.getClassName() !== "InstancedLinesMesh") {
                 this.releaseSubMeshes();
             }
 

+ 36 - 17
src/Mesh/linesMesh.ts

@@ -22,24 +22,9 @@ import { Material, Effect, ShaderMaterial } from "Materials";
          * The intersection Threshold is the margin applied when intersection a segment of the LinesMesh with a Ray.
          * This margin is expressed in world space coordinates, so its value may vary.
          * Default value is 0.1
-         * @returns the intersection Threshold value.
          */
-        public get intersectionThreshold(): number {
-            return this._intersectionThreshold;
-        }
-
-        /**
-         * The intersection Threshold is the margin applied when intersection a segment of the LinesMesh with a Ray.
-         * This margin is expressed in world space coordinates, so its value may vary.
-         */
-        public set intersectionThreshold(value: number) {
-            if (this._intersectionThreshold === value) {
-                return;
-            }
-            this._intersectionThreshold = value;
-        }
+        public intersectionThreshold: number;
 
-        private _intersectionThreshold: number;
         private _colorShader: ShaderMaterial;
 
         /**
@@ -78,7 +63,7 @@ import { Material, Effect, ShaderMaterial } from "Materials";
                 this.useVertexAlpha = source.useVertexAlpha;
             }
 
-            this._intersectionThreshold = 0.1;
+            this.intersectionThreshold = 0.1;
 
             var defines: string[] = [];
             var options = {
@@ -174,4 +159,38 @@ import { Material, Effect, ShaderMaterial } from "Materials";
         public clone(name: string, newParent?: Node, doNotCloneChildren?: boolean): LinesMesh {
             return new LinesMesh(name, this.getScene(), newParent, this, doNotCloneChildren);
         }
+
+        /**
+         * Creates a new InstancedLinesMesh object from the mesh model.
+         * @see http://doc.babylonjs.com/how_to/how_to_use_instances
+         * @param name defines the name of the new instance
+         * @returns a new InstancedLinesMesh
+         */
+        public createInstance(name: string): InstancedLinesMesh {
+            return new InstancedLinesMesh(name, this);
+        }
+    }
+
+    /**
+     * Creates an instance based on a source LinesMesh
+     */
+    export class InstancedLinesMesh extends InstancedMesh {
+        /**
+         * The intersection Threshold is the margin applied when intersection a segment of the LinesMesh with a Ray.
+         * This margin is expressed in world space coordinates, so its value may vary.
+         * Initilized with the intersectionThreshold value of the source LinesMesh
+         */
+        public intersectionThreshold: number;
+
+        constructor(name: string, source: LinesMesh) {
+            super(name, source);
+            this.intersectionThreshold = source.intersectionThreshold;
+        }
+
+        /**
+         * Returns the string "InstancedLinesMesh".
+         */
+        public getClassName(): string {
+            return "InstancedLinesMesh";
+        }
     }

+ 0 - 1
src/Mesh/mesh.ts

@@ -2321,7 +2321,6 @@ import { PhysicsImpostor } from "Physics";
 
         /**
          * Creates a new InstancedMesh object from the mesh model.
-         * Warning : this method is not supported for Line mesh and LineSystem
          * @see http://doc.babylonjs.com/how_to/how_to_use_instances
          * @param name defines the name of the new instance
          * @returns a new InstancedMesh

+ 2 - 4
src/Mesh/subMesh.ts

@@ -351,10 +351,8 @@ import { Material, Effect, MaterialDefines, MultiMaterial } from "Materials";
 
             // LineMesh first as it's also a Mesh...
             if (LinesMesh) {
-                const mesh = this._mesh instanceof InstancedMesh ? (<InstancedMesh>this._mesh).sourceMesh : this._mesh;
-                if (mesh instanceof LinesMesh) {
-                    const linesMesh = <LinesMesh>mesh;
-                    return this._intersectLines(ray, positions, indices, linesMesh.intersectionThreshold, fastCheck);
+                if (this._mesh.getClassName() === "InstancedLinesMesh" || this._mesh.getClassName() === "LinesMesh") {
+                    return this._intersectLines(ray, positions, indices, (this._mesh as any).intersectionThreshold, fastCheck);
                 }
             }
 

+ 0 - 8
src/Physics/Plugins/oimoJSPlugin.ts

@@ -154,10 +154,6 @@ import { Tools } from "Tools";
                         bodyConfig.pos.push(center.z);
                         bodyConfig.posShape.push(0, 0, 0);
 
-                        //tmp solution
-                        bodyConfig.rot.push(0);
-                        bodyConfig.rot.push(0);
-                        bodyConfig.rot.push(0);
                         bodyConfig.rotShape.push(0, 0, 0);
                     } else {
                         let localPosition = i.object.getAbsolutePosition().subtract(impostor.object.getAbsolutePosition());
@@ -166,10 +162,6 @@ import { Tools } from "Tools";
                         bodyConfig.posShape.push(localPosition.z);
                         bodyConfig.pos.push(0, 0, 0);
 
-                        //tmp solution until https://github.com/lo-th/OIMO.js/pull/37 is merged
-                        bodyConfig.rot.push(0);
-                        bodyConfig.rot.push(0);
-                        bodyConfig.rot.push(0);
                         bodyConfig.rotShape.push(rot.x * radToDeg);
                         bodyConfig.rotShape.push(rot.y * radToDeg);
                         bodyConfig.rotShape.push(rot.z * radToDeg);

+ 1 - 1
src/Physics/physicsImpostor.ts

@@ -262,7 +262,7 @@ import { IPhysicsEngine, PhysicsJoint, PhysicsJointData } from "Physics";
                 return;
             }
 
-            //legacy support for old syntax.
+            // Legacy support for old syntax.
             if (!this._scene && object.getScene) {
                 this._scene = object.getScene();
             }

+ 6 - 11
src/Rendering/edgesRenderer.ts

@@ -74,27 +74,22 @@ declare module "Mesh/LinesMesh" {
         return this;
     };
 
-declare module "Mesh/InstancedMesh" {
-    export interface InstancedMesh {
+declare module "Mesh/InstancedLinesMesh" {
+    export interface InstancedLinesMesh {
         /**
          * Enables the edge rendering mode on the mesh.
          * This mode makes the mesh edges visible
          * @param epsilon defines the maximal distance between two angles to detect a face
          * @param checkVerticesInsteadOfIndices indicates that we should check vertex list directly instead of faces
-         * @returns the currentInstancedMesh
+         * @returns the current InstancedLinesMesh
          * @see https://www.babylonjs-playground.com/#19O9TU#0
          */
-        enableEdgesRendering(epsilon?: number, checkVerticesInsteadOfIndices?: boolean): InstancedMesh;
+        enableEdgesRendering(epsilon?: number, checkVerticesInsteadOfIndices?: boolean): InstancedLinesMesh;
     }
 }
 
-    InstancedMesh.prototype.enableEdgesRendering = function(epsilon = 0.95, checkVerticesInsteadOfIndices = false): InstancedMesh {
-        if (this.sourceMesh.getClassName() === 'LinesMesh') {
-            LinesMesh.prototype.enableEdgesRendering.apply(this, arguments);
-        }
-        else {
-            AbstractMesh.prototype.enableEdgesRendering.apply(this, arguments);
-        }
+    InstancedLinesMesh.prototype.enableEdgesRendering = function(epsilon = 0.95, checkVerticesInsteadOfIndices = false): InstancedLinesMesh {
+        LinesMesh.prototype.enableEdgesRendering.apply(this, arguments);
         return this;
     };
 

+ 0 - 4
src/Shaders/background.vertex.fx

@@ -15,10 +15,6 @@ attribute vec3 normal;
 // Uniforms
 #include<instancesDeclaration>
 
-#ifdef POINTSIZE
-uniform float pointSize;
-#endif
-
 // Output
 varying vec3 vPositionW;
 #ifdef NORMAL

+ 3 - 2
src/node.ts

@@ -557,10 +557,11 @@ import { Observable, Observer, serialize } from "Tools";
         /**
          * Get all direct children of this node
          * @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
+         * @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 (Default: true)
          * @returns an array of Node
          */
-        public getChildren(predicate?: (node: Node) => boolean): Node[] {
-            return this.getDescendants(true, predicate);
+        public getChildren(predicate?: (node: Node) => boolean, directDescendantsOnly = true): Node[] {
+            return this.getDescendants(directDescendantsOnly, predicate);
         }
 
         /** @hidden */

+ 27 - 1
src/scene.ts

@@ -2253,7 +2253,7 @@ import { Node } from "node";
                     return false;
                 }
 
-                let hardwareInstancedRendering = mesh.getClassName() === "InstancedMesh" || engine.getCaps().instancedArrays && (<Mesh>mesh).instances.length > 0;
+                let hardwareInstancedRendering = mesh.getClassName() === "InstancedMesh" || mesh.getClassName() === "InstancedLinesMesh" || engine.getCaps().instancedArrays && (<Mesh>mesh).instances.length > 0;
                 // Is Ready For Mesh
                 for (let step of this._isReadyForMeshStage) {
                     if (!step.action(mesh, hardwareInstancedRendering)) {
@@ -2508,6 +2508,32 @@ import { Node } from "node";
         }
 
         /**
+         * Will start the animation sequence of a given target and its hierarchy
+         * @param target defines the target
+         * @param directDescendantsOnly if true only direct descendants will be used, if false direct and also indirect (children of children, an so on in a recursive manner) descendants will be used.
+         * @param from defines from which frame should animation start
+         * @param to defines until which frame should animation run.
+         * @param loop defines if the animation loops
+         * @param speedRatio defines the speed in which to run the animation (1.0 by default)
+         * @param onAnimationEnd defines the function to be executed when the animation ends
+         * @param animatable defines an animatable object. If not provided a new one will be created from the given params
+         * @param stopCurrent defines if the current animations must be stopped first (true by default)
+         * @param targetMask defines if the target should be animated if animations are present (this is called recursively on descendant animatables regardless of return value)
+         * @returns the list of created animatables
+         */
+        public beginHierarchyAnimation(target: any, directDescendantsOnly: boolean, from: number, to: number, loop?: boolean, speedRatio: number = 1.0, onAnimationEnd?: () => void, animatable?: Animatable, stopCurrent = true, targetMask?: (target: any) => boolean): Animatable[] {
+            let children = target.getDescendants(directDescendantsOnly);
+
+            let result = [];
+            result.push(this.beginAnimation(target, from, to, loop, speedRatio, onAnimationEnd, animatable, stopCurrent, targetMask));
+            for (var child of children) {
+                result.push(this.beginAnimation(child, from, to, loop, speedRatio, onAnimationEnd, animatable, stopCurrent, targetMask));
+            }
+
+            return result;
+        }
+
+        /**
          * Begin a new animation on a given node
          * @param target defines the target where the animation will take place
          * @param animations defines the list of animations to start

+ 1 - 1
tests/validation/config.json

@@ -3,7 +3,7 @@
   "tests": [
     {
       "title": "XR camera container rotation",
-      "playgroundId": "#JV98QW#4",
+      "playgroundId": "#JV98QW#5",
       "referenceImage": "xrCameraContainerRotation.png",
       "excludeFromAutomaticTesting": true
     },