Parcourir la source

4.0.0-alpha.12

sebavan il y a 6 ans
Parent
commit
7ca9e67b7a
42 fichiers modifiés avec 24361 ajouts et 24754 suppressions
  1. 12269 12267
      Playground/babylon.d.txt
  2. 11216 11214
      dist/preview release/babylon.d.ts
  3. 1 1
      dist/preview release/babylon.js
  4. 92 44
      dist/preview release/babylon.max.js
  5. 92 44
      dist/preview release/babylon.no-module.max.js
  6. 1 1
      dist/preview release/babylon.worker.js
  7. 92 44
      dist/preview release/es6.js
  8. 1 1
      dist/preview release/glTF2Interface/package.json
  9. 1 1
      dist/preview release/gui/babylon.gui.js
  10. 1 1
      dist/preview release/gui/babylon.gui.min.js
  11. 1 1
      dist/preview release/gui/babylon.gui.min.js.map
  12. 2 2
      dist/preview release/gui/package.json
  13. 6 6
      dist/preview release/inspector/babylon.inspector.bundle.js
  14. 1 1
      dist/preview release/inspector/babylon.inspector.bundle.js.map
  15. 5 5
      dist/preview release/inspector/package.json
  16. 1 1
      dist/preview release/loaders/babylon.glTF1FileLoader.min.js
  17. 1 1
      dist/preview release/loaders/babylon.glTF2FileLoader.min.js
  18. 1 1
      dist/preview release/loaders/babylon.glTFFileLoader.min.js
  19. 1 1
      dist/preview release/loaders/babylonjs.loaders.min.js
  20. 3 3
      dist/preview release/loaders/package.json
  21. 106 0
      dist/preview release/materialsLibrary/babylon.skyMaterial.d.ts
  22. 113 6
      dist/preview release/materialsLibrary/babylon.skyMaterial.js
  23. 1 1
      dist/preview release/materialsLibrary/babylon.skyMaterial.min.js
  24. 106 0
      dist/preview release/materialsLibrary/babylonjs.materials.d.ts
  25. 113 6
      dist/preview release/materialsLibrary/babylonjs.materials.js
  26. 1 1
      dist/preview release/materialsLibrary/babylonjs.materials.min.js
  27. 106 0
      dist/preview release/materialsLibrary/babylonjs.materials.module.d.ts
  28. 2 2
      dist/preview release/materialsLibrary/package.json
  29. 1 1
      dist/preview release/postProcessesLibrary/babylon.asciiArtPostProcess.min.js
  30. 1 1
      dist/preview release/postProcessesLibrary/babylon.digitalRainPostProcess.min.js
  31. 1 1
      dist/preview release/postProcessesLibrary/babylonjs.postProcess.min.js
  32. 2 2
      dist/preview release/postProcessesLibrary/package.json
  33. 2 2
      dist/preview release/proceduralTexturesLibrary/package.json
  34. 1 1
      dist/preview release/serializers/babylon.glTF2Serializer.min.js
  35. 1 1
      dist/preview release/serializers/babylonjs.serializers.min.js
  36. 3 3
      dist/preview release/serializers/package.json
  37. 1 529
      dist/preview release/viewer/babylon.viewer.d.ts
  38. 3 3
      dist/preview release/viewer/babylon.viewer.js
  39. 5 5
      dist/preview release/viewer/babylon.viewer.max.js
  40. 2 547
      dist/preview release/viewer/babylon.viewer.module.d.ts
  41. 1 1
      package.json
  42. 1 1
      src/Engine/babylon.engine.ts

Fichier diff supprimé car celui-ci est trop grand
+ 12269 - 12267
Playground/babylon.d.txt


Fichier diff supprimé car celui-ci est trop grand
+ 11216 - 11214
dist/preview release/babylon.d.ts


Fichier diff supprimé car celui-ci est trop grand
+ 1 - 1
dist/preview release/babylon.js


+ 92 - 44
dist/preview release/babylon.max.js

@@ -12974,7 +12974,7 @@ var BABYLON;
              * Returns the current version of the framework
              */
             get: function () {
-                return "4.0.0-alpha.11";
+                return "4.0.0-alpha.12";
             },
             enumerable: true,
             configurable: true
@@ -31768,14 +31768,6 @@ var BABYLON;
              */
             this.anisotropicFilteringLevel = BaseTexture.DEFAULT_ANISOTROPIC_FILTERING_LEVEL;
             /**
-             * Define if the texture is a cube texture or if false a 2d texture.
-             */
-            this.isCube = false;
-            /**
-             * Define if the texture is a 3d texture (webgl 2) or if false a 2d texture.
-             */
-            this.is3D = false;
-            /**
              * Define if the texture contains data in gamma space (most of the png/jpg aside bump).
              * HDR texture are usually stored in linear space.
              * This only impacts the PBR and Background materials
@@ -31864,6 +31856,44 @@ var BABYLON;
             enumerable: true,
             configurable: true
         });
+        Object.defineProperty(BaseTexture.prototype, "isCube", {
+            /**
+             * Define if the texture is a cube texture or if false a 2d texture.
+             */
+            get: function () {
+                if (!this._texture) {
+                    return false;
+                }
+                return this._texture.isCube;
+            },
+            set: function (value) {
+                if (!this._texture) {
+                    return;
+                }
+                this._texture.isCube = value;
+            },
+            enumerable: true,
+            configurable: true
+        });
+        Object.defineProperty(BaseTexture.prototype, "is3D", {
+            /**
+             * Define if the texture is a 3d texture (webgl 2) or if false a 2d texture.
+             */
+            get: function () {
+                if (!this._texture) {
+                    return false;
+                }
+                return this._texture.is3D;
+            },
+            set: function (value) {
+                if (!this._texture) {
+                    return;
+                }
+                this._texture.is3D = value;
+            },
+            enumerable: true,
+            configurable: true
+        });
         Object.defineProperty(BaseTexture.prototype, "isRGBD", {
             /**
              * Gets whether or not the texture contains RGBD data.
@@ -32086,7 +32116,6 @@ var BABYLON;
             if (!scene) {
                 return;
             }
-            this._samplingMode = samplingMode;
             scene.getEngine().updateTextureSamplingMode(samplingMode, this._texture);
         };
         /**
@@ -32379,10 +32408,10 @@ var BABYLON;
         ], BaseTexture.prototype, "anisotropicFilteringLevel", void 0);
         __decorate([
             BABYLON.serialize()
-        ], BaseTexture.prototype, "isCube", void 0);
+        ], BaseTexture.prototype, "isCube", null);
         __decorate([
             BABYLON.serialize()
-        ], BaseTexture.prototype, "is3D", void 0);
+        ], BaseTexture.prototype, "is3D", null);
         __decorate([
             BABYLON.serialize()
         ], BaseTexture.prototype, "gammaSpace", void 0);
@@ -32493,6 +32522,8 @@ var BABYLON;
              * Defines the center of rotation (W)
              */
             _this.wRotationCenter = 0.5;
+            /** @hidden */
+            _this._initialSamplingMode = Texture.BILINEAR_SAMPLINGMODE;
             /**
              * Observable triggered once the texture has been loaded.
              */
@@ -32502,7 +32533,7 @@ var BABYLON;
             _this.url = url;
             _this._noMipmap = noMipmap;
             _this._invertY = invertY;
-            _this._samplingMode = samplingMode;
+            _this._initialSamplingMode = samplingMode;
             _this._buffer = buffer;
             _this._deleteBuffer = deleteBuffer;
             if (format) {
@@ -32535,7 +32566,7 @@ var BABYLON;
             _this._texture = _this._getFromCache(_this.url, noMipmap, samplingMode);
             if (!_this._texture) {
                 if (!scene.useDelayedTextureLoading) {
-                    _this._texture = scene.getEngine().createTexture(_this.url, noMipmap, invertY, scene, _this._samplingMode, load, onError, _this._buffer, undefined, _this._format);
+                    _this._texture = scene.getEngine().createTexture(_this.url, noMipmap, invertY, scene, samplingMode, load, onError, _this._buffer, undefined, _this._format);
                     if (deleteBuffer) {
                         delete _this._buffer;
                     }
@@ -32585,7 +32616,10 @@ var BABYLON;
              * Get the current sampling mode associated with the texture.
              */
             get: function () {
-                return this._samplingMode;
+                if (!this._texture) {
+                    return this._initialSamplingMode;
+                }
+                return this._texture.samplingMode;
             },
             enumerable: true,
             configurable: true
@@ -32633,9 +32667,9 @@ var BABYLON;
                 return;
             }
             this.delayLoadState = BABYLON.Engine.DELAYLOADSTATE_LOADED;
-            this._texture = this._getFromCache(this.url, this._noMipmap, this._samplingMode);
+            this._texture = this._getFromCache(this.url, this._noMipmap, this.samplingMode);
             if (!this._texture) {
-                this._texture = scene.getEngine().createTexture(this.url, this._noMipmap, this._invertY, scene, this._samplingMode, this._delayedOnLoad, this._delayedOnError, this._buffer, null, this._format);
+                this._texture = scene.getEngine().createTexture(this.url, this._noMipmap, this._invertY, scene, this.samplingMode, this._delayedOnLoad, this._delayedOnError, this._buffer, null, this._format);
                 if (this._deleteBuffer) {
                     delete this._buffer;
                 }
@@ -32774,7 +32808,7 @@ var BABYLON;
         Texture.prototype.clone = function () {
             var _this = this;
             return BABYLON.SerializationHelper.Clone(function () {
-                return new Texture(_this._texture ? _this._texture.url : null, _this.getScene(), _this._noMipmap, _this._invertY, _this._samplingMode);
+                return new Texture(_this._texture ? _this._texture.url : null, _this.getScene(), _this._noMipmap, _this._invertY, _this.samplingMode);
             }, this);
         };
         /**
@@ -32880,7 +32914,7 @@ var BABYLON;
             // Update Sampling Mode
             if (parsedTexture.samplingMode) {
                 var sampling = parsedTexture.samplingMode;
-                if (texture && texture._samplingMode !== sampling) {
+                if (texture && texture.samplingMode !== sampling) {
                     texture.updateSamplingMode(sampling);
                 }
             }
@@ -33137,7 +33171,9 @@ var BABYLON;
                 // Deep copy
                 BABYLON.Tools.DeepCopy(source, _this, ["name", "material", "skeleton", "instances", "parent", "uniqueId",
                     "source", "metadata", "hasLODLevels", "geometry", "isBlocked", "areNormalsFrozen",
-                    "onBeforeDrawObservable", "onBeforeRenderObservable", "onAfterRenderObservable", "onBeforeDraw"
+                    "onBeforeDrawObservable", "onBeforeRenderObservable", "onAfterRenderObservable", "onBeforeDraw",
+                    "onAfterWorldMatrixUpdateObservable", "onCollideObservable", "onCollisionPositionChangeObservable", "onRebuildObservable",
+                    "onDisposeObservable"
                 ], ["_poseMatrix"]);
                 // Source mesh
                 _this._source = source;
@@ -45272,10 +45308,10 @@ var BABYLON;
         };
         /**
          * Creates a standard material from parsed material data
-         * @param source defines the JSON represnetation of the material
+         * @param source defines the JSON representation of the material
          * @param scene defines the hosting scene
          * @param rootUrl defines the root URL to use to load textures and relative dependencies
-         * @returns a new material
+         * @returns a new standard material
          */
         StandardMaterial.Parse = function (source, scene, rootUrl) {
             return BABYLON.SerializationHelper.Parse(function () { return new StandardMaterial(source.name, scene); }, source, scene, rootUrl);
@@ -67084,7 +67120,7 @@ var BABYLON;
          */
         function DebugLayer(scene) {
             var _this = this;
-            this.BJSINSPECTOR = typeof INSPECTOR !== 'undefined' ? INSPECTOR : undefined;
+            this.BJSINSPECTOR = this._getGlobalInspector();
             /**
              * Observable triggered when a property is changed through the inspector.
              */
@@ -67103,9 +67139,21 @@ var BABYLON;
                 return;
             }
             var userOptions = __assign({ overlay: false, showExplorer: true, showInspector: true, embedMode: false, handleResize: true, enablePopup: true }, config);
-            this.BJSINSPECTOR = this.BJSINSPECTOR || typeof INSPECTOR !== 'undefined' ? INSPECTOR : undefined;
+            this.BJSINSPECTOR = this.BJSINSPECTOR || this._getGlobalInspector();
             this.BJSINSPECTOR.Inspector.Show(this._scene, userOptions);
         };
+        /** Get the inspector from bundle or global */
+        DebugLayer.prototype._getGlobalInspector = function () {
+            // UMD Global name detection from Webpack Bundle UMD Name.
+            if (typeof INSPECTOR !== 'undefined') {
+                return INSPECTOR;
+            }
+            // In case of module let s check the global emitted from the Inspector entry point.
+            if (BABYLON && BABYLON.Inspector) {
+                return BABYLON;
+            }
+            return undefined;
+        };
         /**
          * Get if the inspector is visible or not.
          * @returns true if visible otherwise, false
@@ -70173,7 +70221,7 @@ var BABYLON;
     var MeshBuilder = /** @class */ (function () {
         function MeshBuilder() {
         }
-        MeshBuilder.updateSideOrientation = function (orientation) {
+        MeshBuilder._UpdateSideOrientation = function (orientation) {
             if (orientation == BABYLON.Mesh.DOUBLESIDE) {
                 return BABYLON.Mesh.DOUBLESIDE;
             }
@@ -70200,7 +70248,7 @@ var BABYLON;
         MeshBuilder.CreateBox = function (name, options, scene) {
             if (scene === void 0) { scene = null; }
             var box = new BABYLON.Mesh(name, scene);
-            options.sideOrientation = MeshBuilder.updateSideOrientation(options.sideOrientation);
+            options.sideOrientation = MeshBuilder._UpdateSideOrientation(options.sideOrientation);
             box._originalBuilderSideOrientation = options.sideOrientation;
             var vertexData = BABYLON.VertexData.CreateBox(options);
             vertexData.applyToMesh(box, options.updatable);
@@ -70224,7 +70272,7 @@ var BABYLON;
          */
         MeshBuilder.CreateSphere = function (name, options, scene) {
             var sphere = new BABYLON.Mesh(name, scene);
-            options.sideOrientation = MeshBuilder.updateSideOrientation(options.sideOrientation);
+            options.sideOrientation = MeshBuilder._UpdateSideOrientation(options.sideOrientation);
             sphere._originalBuilderSideOrientation = options.sideOrientation;
             var vertexData = BABYLON.VertexData.CreateSphere(options);
             vertexData.applyToMesh(sphere, options.updatable);
@@ -70247,7 +70295,7 @@ var BABYLON;
         MeshBuilder.CreateDisc = function (name, options, scene) {
             if (scene === void 0) { scene = null; }
             var disc = new BABYLON.Mesh(name, scene);
-            options.sideOrientation = MeshBuilder.updateSideOrientation(options.sideOrientation);
+            options.sideOrientation = MeshBuilder._UpdateSideOrientation(options.sideOrientation);
             disc._originalBuilderSideOrientation = options.sideOrientation;
             var vertexData = BABYLON.VertexData.CreateDisc(options);
             vertexData.applyToMesh(disc, options.updatable);
@@ -70270,7 +70318,7 @@ var BABYLON;
          */
         MeshBuilder.CreateIcoSphere = function (name, options, scene) {
             var sphere = new BABYLON.Mesh(name, scene);
-            options.sideOrientation = MeshBuilder.updateSideOrientation(options.sideOrientation);
+            options.sideOrientation = MeshBuilder._UpdateSideOrientation(options.sideOrientation);
             sphere._originalBuilderSideOrientation = options.sideOrientation;
             var vertexData = BABYLON.VertexData.CreateIcoSphere(options);
             vertexData.applyToMesh(sphere, options.updatable);
@@ -70304,7 +70352,7 @@ var BABYLON;
             var pathArray = options.pathArray;
             var closeArray = options.closeArray;
             var closePath = options.closePath;
-            var sideOrientation = MeshBuilder.updateSideOrientation(options.sideOrientation);
+            var sideOrientation = MeshBuilder._UpdateSideOrientation(options.sideOrientation);
             var instance = options.instance;
             var updatable = options.updatable;
             if (instance) { // existing ribbon instance update
@@ -70442,7 +70490,7 @@ var BABYLON;
          */
         MeshBuilder.CreateCylinder = function (name, options, scene) {
             var cylinder = new BABYLON.Mesh(name, scene);
-            options.sideOrientation = MeshBuilder.updateSideOrientation(options.sideOrientation);
+            options.sideOrientation = MeshBuilder._UpdateSideOrientation(options.sideOrientation);
             cylinder._originalBuilderSideOrientation = options.sideOrientation;
             var vertexData = BABYLON.VertexData.CreateCylinder(options);
             vertexData.applyToMesh(cylinder, options.updatable);
@@ -70464,7 +70512,7 @@ var BABYLON;
          */
         MeshBuilder.CreateTorus = function (name, options, scene) {
             var torus = new BABYLON.Mesh(name, scene);
-            options.sideOrientation = MeshBuilder.updateSideOrientation(options.sideOrientation);
+            options.sideOrientation = MeshBuilder._UpdateSideOrientation(options.sideOrientation);
             torus._originalBuilderSideOrientation = options.sideOrientation;
             var vertexData = BABYLON.VertexData.CreateTorus(options);
             vertexData.applyToMesh(torus, options.updatable);
@@ -70487,7 +70535,7 @@ var BABYLON;
          */
         MeshBuilder.CreateTorusKnot = function (name, options, scene) {
             var torusKnot = new BABYLON.Mesh(name, scene);
-            options.sideOrientation = MeshBuilder.updateSideOrientation(options.sideOrientation);
+            options.sideOrientation = MeshBuilder._UpdateSideOrientation(options.sideOrientation);
             torusKnot._originalBuilderSideOrientation = options.sideOrientation;
             var vertexData = BABYLON.VertexData.CreateTorusKnot(options);
             vertexData.applyToMesh(torusKnot, options.updatable);
@@ -70682,7 +70730,7 @@ var BABYLON;
             var rotation = options.rotation || 0;
             var cap = (options.cap === 0) ? 0 : options.cap || BABYLON.Mesh.NO_CAP;
             var updatable = options.updatable;
-            var sideOrientation = MeshBuilder.updateSideOrientation(options.sideOrientation);
+            var sideOrientation = MeshBuilder._UpdateSideOrientation(options.sideOrientation);
             var instance = options.instance || null;
             var invertUV = options.invertUV || false;
             return MeshBuilder._ExtrudeShapeGeneric(name, shape, path, scale, rotation, null, null, false, false, cap, false, scene, updatable ? true : false, sideOrientation, instance, invertUV, options.frontUVs || null, options.backUVs || null);
@@ -70722,7 +70770,7 @@ var BABYLON;
             var ribbonClosePath = options.ribbonClosePath || false;
             var cap = (options.cap === 0) ? 0 : options.cap || BABYLON.Mesh.NO_CAP;
             var updatable = options.updatable;
-            var sideOrientation = MeshBuilder.updateSideOrientation(options.sideOrientation);
+            var sideOrientation = MeshBuilder._UpdateSideOrientation(options.sideOrientation);
             var instance = options.instance;
             var invertUV = options.invertUV || false;
             return MeshBuilder._ExtrudeShapeGeneric(name, shape, path, null, null, scaleFunction, rotationFunction, ribbonCloseArray, ribbonClosePath, cap, true, scene, updatable ? true : false, sideOrientation, instance || null, invertUV, options.frontUVs || null, options.backUVs || null);
@@ -70755,7 +70803,7 @@ var BABYLON;
             var tessellation = options.tessellation || 64;
             var clip = options.clip || 0;
             var updatable = options.updatable;
-            var sideOrientation = MeshBuilder.updateSideOrientation(options.sideOrientation);
+            var sideOrientation = MeshBuilder._UpdateSideOrientation(options.sideOrientation);
             var cap = options.cap || BABYLON.Mesh.NO_CAP;
             var pi2 = Math.PI * 2;
             var paths = new Array();
@@ -70801,7 +70849,7 @@ var BABYLON;
          */
         MeshBuilder.CreatePlane = function (name, options, scene) {
             var plane = new BABYLON.Mesh(name, scene);
-            options.sideOrientation = MeshBuilder.updateSideOrientation(options.sideOrientation);
+            options.sideOrientation = MeshBuilder._UpdateSideOrientation(options.sideOrientation);
             plane._originalBuilderSideOrientation = options.sideOrientation;
             var vertexData = BABYLON.VertexData.CreatePlane(options);
             vertexData.applyToMesh(plane, options.updatable);
@@ -70945,7 +70993,7 @@ var BABYLON;
          * @returns the polygon mesh
          */
         MeshBuilder.CreatePolygon = function (name, options, scene) {
-            options.sideOrientation = MeshBuilder.updateSideOrientation(options.sideOrientation);
+            options.sideOrientation = MeshBuilder._UpdateSideOrientation(options.sideOrientation);
             var shape = options.shape;
             var holes = options.holes || [];
             var depth = options.depth || 0;
@@ -71021,7 +71069,7 @@ var BABYLON;
             var cap = options.cap || BABYLON.Mesh.NO_CAP;
             var invertUV = options.invertUV || false;
             var updatable = options.updatable;
-            var sideOrientation = MeshBuilder.updateSideOrientation(options.sideOrientation);
+            var sideOrientation = MeshBuilder._UpdateSideOrientation(options.sideOrientation);
             options.arc = options.arc && (options.arc <= 0.0 || options.arc > 1.0) ? 1.0 : options.arc || 1.0;
             // tube geometry
             var tubePathArray = function (path, path3D, circlePaths, radius, tessellation, radiusFunction, cap, arc) {
@@ -71132,7 +71180,7 @@ var BABYLON;
          */
         MeshBuilder.CreatePolyhedron = function (name, options, scene) {
             var polyhedron = new BABYLON.Mesh(name, scene);
-            options.sideOrientation = MeshBuilder.updateSideOrientation(options.sideOrientation);
+            options.sideOrientation = MeshBuilder._UpdateSideOrientation(options.sideOrientation);
             polyhedron._originalBuilderSideOrientation = options.sideOrientation;
             var vertexData = BABYLON.VertexData.CreatePolyhedron(options);
             vertexData.applyToMesh(polyhedron, options.updatable);
@@ -75651,7 +75699,7 @@ var BABYLON;
             this._canvas.width = textureSize.width;
             this._canvas.height = textureSize.height;
             this.releaseInternalTexture();
-            this._texture = this._engine.createDynamicTexture(textureSize.width, textureSize.height, this._generateMipMaps, this._samplingMode);
+            this._texture = this._engine.createDynamicTexture(textureSize.width, textureSize.height, this._generateMipMaps, this.samplingMode);
         };
         /**
          * Scales the texture
@@ -75831,7 +75879,7 @@ var BABYLON;
                     _this.wrapV = BABYLON.Texture.CLAMP_ADDRESSMODE;
                     _this._generateMipMaps = false;
                 }
-                _this._texture = _this._engine.createDynamicTexture(_this.video.videoWidth, _this.video.videoHeight, _this._generateMipMaps, _this._samplingMode);
+                _this._texture = _this._engine.createDynamicTexture(_this.video.videoWidth, _this.video.videoHeight, _this._generateMipMaps, _this.samplingMode);
                 if (!_this.video.autoplay && !_this._settings.poster) {
                     var oldHandler_1 = _this.video.onplaying;
                     var error_1 = false;
@@ -75899,7 +75947,7 @@ var BABYLON;
             };
             _this._engine = _this.getScene().getEngine();
             _this._generateMipMaps = generateMipMaps;
-            _this._samplingMode = samplingMode;
+            _this._initialSamplingMode = samplingMode;
             _this.autoUpdateTexture = settings.autoUpdateTexture;
             _this.name = name || _this._getName(src);
             _this.video = _this._getVideo(src);
@@ -117236,7 +117284,7 @@ var BABYLON;
             if (useBilinearMode === void 0) { useBilinearMode = true; }
             var scene = texture.getScene();
             var engine = scene.getEngine();
-            var rtt = new BABYLON.RenderTargetTexture('resized' + texture.name, { width: width, height: height }, scene, !texture.noMipmap, true, texture._texture.type, false, texture._samplingMode, false);
+            var rtt = new BABYLON.RenderTargetTexture('resized' + texture.name, { width: width, height: height }, scene, !texture.noMipmap, true, texture._texture.type, false, texture.samplingMode, false);
             rtt.wrapU = texture.wrapU;
             rtt.wrapV = texture.wrapV;
             rtt.uOffset = texture.uOffset;

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

@@ -12941,7 +12941,7 @@ var BABYLON;
              * Returns the current version of the framework
              */
             get: function () {
-                return "4.0.0-alpha.11";
+                return "4.0.0-alpha.12";
             },
             enumerable: true,
             configurable: true
@@ -31735,14 +31735,6 @@ var BABYLON;
              */
             this.anisotropicFilteringLevel = BaseTexture.DEFAULT_ANISOTROPIC_FILTERING_LEVEL;
             /**
-             * Define if the texture is a cube texture or if false a 2d texture.
-             */
-            this.isCube = false;
-            /**
-             * Define if the texture is a 3d texture (webgl 2) or if false a 2d texture.
-             */
-            this.is3D = false;
-            /**
              * Define if the texture contains data in gamma space (most of the png/jpg aside bump).
              * HDR texture are usually stored in linear space.
              * This only impacts the PBR and Background materials
@@ -31831,6 +31823,44 @@ var BABYLON;
             enumerable: true,
             configurable: true
         });
+        Object.defineProperty(BaseTexture.prototype, "isCube", {
+            /**
+             * Define if the texture is a cube texture or if false a 2d texture.
+             */
+            get: function () {
+                if (!this._texture) {
+                    return false;
+                }
+                return this._texture.isCube;
+            },
+            set: function (value) {
+                if (!this._texture) {
+                    return;
+                }
+                this._texture.isCube = value;
+            },
+            enumerable: true,
+            configurable: true
+        });
+        Object.defineProperty(BaseTexture.prototype, "is3D", {
+            /**
+             * Define if the texture is a 3d texture (webgl 2) or if false a 2d texture.
+             */
+            get: function () {
+                if (!this._texture) {
+                    return false;
+                }
+                return this._texture.is3D;
+            },
+            set: function (value) {
+                if (!this._texture) {
+                    return;
+                }
+                this._texture.is3D = value;
+            },
+            enumerable: true,
+            configurable: true
+        });
         Object.defineProperty(BaseTexture.prototype, "isRGBD", {
             /**
              * Gets whether or not the texture contains RGBD data.
@@ -32053,7 +32083,6 @@ var BABYLON;
             if (!scene) {
                 return;
             }
-            this._samplingMode = samplingMode;
             scene.getEngine().updateTextureSamplingMode(samplingMode, this._texture);
         };
         /**
@@ -32346,10 +32375,10 @@ var BABYLON;
         ], BaseTexture.prototype, "anisotropicFilteringLevel", void 0);
         __decorate([
             BABYLON.serialize()
-        ], BaseTexture.prototype, "isCube", void 0);
+        ], BaseTexture.prototype, "isCube", null);
         __decorate([
             BABYLON.serialize()
-        ], BaseTexture.prototype, "is3D", void 0);
+        ], BaseTexture.prototype, "is3D", null);
         __decorate([
             BABYLON.serialize()
         ], BaseTexture.prototype, "gammaSpace", void 0);
@@ -32460,6 +32489,8 @@ var BABYLON;
              * Defines the center of rotation (W)
              */
             _this.wRotationCenter = 0.5;
+            /** @hidden */
+            _this._initialSamplingMode = Texture.BILINEAR_SAMPLINGMODE;
             /**
              * Observable triggered once the texture has been loaded.
              */
@@ -32469,7 +32500,7 @@ var BABYLON;
             _this.url = url;
             _this._noMipmap = noMipmap;
             _this._invertY = invertY;
-            _this._samplingMode = samplingMode;
+            _this._initialSamplingMode = samplingMode;
             _this._buffer = buffer;
             _this._deleteBuffer = deleteBuffer;
             if (format) {
@@ -32502,7 +32533,7 @@ var BABYLON;
             _this._texture = _this._getFromCache(_this.url, noMipmap, samplingMode);
             if (!_this._texture) {
                 if (!scene.useDelayedTextureLoading) {
-                    _this._texture = scene.getEngine().createTexture(_this.url, noMipmap, invertY, scene, _this._samplingMode, load, onError, _this._buffer, undefined, _this._format);
+                    _this._texture = scene.getEngine().createTexture(_this.url, noMipmap, invertY, scene, samplingMode, load, onError, _this._buffer, undefined, _this._format);
                     if (deleteBuffer) {
                         delete _this._buffer;
                     }
@@ -32552,7 +32583,10 @@ var BABYLON;
              * Get the current sampling mode associated with the texture.
              */
             get: function () {
-                return this._samplingMode;
+                if (!this._texture) {
+                    return this._initialSamplingMode;
+                }
+                return this._texture.samplingMode;
             },
             enumerable: true,
             configurable: true
@@ -32600,9 +32634,9 @@ var BABYLON;
                 return;
             }
             this.delayLoadState = BABYLON.Engine.DELAYLOADSTATE_LOADED;
-            this._texture = this._getFromCache(this.url, this._noMipmap, this._samplingMode);
+            this._texture = this._getFromCache(this.url, this._noMipmap, this.samplingMode);
             if (!this._texture) {
-                this._texture = scene.getEngine().createTexture(this.url, this._noMipmap, this._invertY, scene, this._samplingMode, this._delayedOnLoad, this._delayedOnError, this._buffer, null, this._format);
+                this._texture = scene.getEngine().createTexture(this.url, this._noMipmap, this._invertY, scene, this.samplingMode, this._delayedOnLoad, this._delayedOnError, this._buffer, null, this._format);
                 if (this._deleteBuffer) {
                     delete this._buffer;
                 }
@@ -32741,7 +32775,7 @@ var BABYLON;
         Texture.prototype.clone = function () {
             var _this = this;
             return BABYLON.SerializationHelper.Clone(function () {
-                return new Texture(_this._texture ? _this._texture.url : null, _this.getScene(), _this._noMipmap, _this._invertY, _this._samplingMode);
+                return new Texture(_this._texture ? _this._texture.url : null, _this.getScene(), _this._noMipmap, _this._invertY, _this.samplingMode);
             }, this);
         };
         /**
@@ -32847,7 +32881,7 @@ var BABYLON;
             // Update Sampling Mode
             if (parsedTexture.samplingMode) {
                 var sampling = parsedTexture.samplingMode;
-                if (texture && texture._samplingMode !== sampling) {
+                if (texture && texture.samplingMode !== sampling) {
                     texture.updateSamplingMode(sampling);
                 }
             }
@@ -33104,7 +33138,9 @@ var BABYLON;
                 // Deep copy
                 BABYLON.Tools.DeepCopy(source, _this, ["name", "material", "skeleton", "instances", "parent", "uniqueId",
                     "source", "metadata", "hasLODLevels", "geometry", "isBlocked", "areNormalsFrozen",
-                    "onBeforeDrawObservable", "onBeforeRenderObservable", "onAfterRenderObservable", "onBeforeDraw"
+                    "onBeforeDrawObservable", "onBeforeRenderObservable", "onAfterRenderObservable", "onBeforeDraw",
+                    "onAfterWorldMatrixUpdateObservable", "onCollideObservable", "onCollisionPositionChangeObservable", "onRebuildObservable",
+                    "onDisposeObservable"
                 ], ["_poseMatrix"]);
                 // Source mesh
                 _this._source = source;
@@ -45239,10 +45275,10 @@ var BABYLON;
         };
         /**
          * Creates a standard material from parsed material data
-         * @param source defines the JSON represnetation of the material
+         * @param source defines the JSON representation of the material
          * @param scene defines the hosting scene
          * @param rootUrl defines the root URL to use to load textures and relative dependencies
-         * @returns a new material
+         * @returns a new standard material
          */
         StandardMaterial.Parse = function (source, scene, rootUrl) {
             return BABYLON.SerializationHelper.Parse(function () { return new StandardMaterial(source.name, scene); }, source, scene, rootUrl);
@@ -67051,7 +67087,7 @@ var BABYLON;
          */
         function DebugLayer(scene) {
             var _this = this;
-            this.BJSINSPECTOR = typeof INSPECTOR !== 'undefined' ? INSPECTOR : undefined;
+            this.BJSINSPECTOR = this._getGlobalInspector();
             /**
              * Observable triggered when a property is changed through the inspector.
              */
@@ -67070,9 +67106,21 @@ var BABYLON;
                 return;
             }
             var userOptions = __assign({ overlay: false, showExplorer: true, showInspector: true, embedMode: false, handleResize: true, enablePopup: true }, config);
-            this.BJSINSPECTOR = this.BJSINSPECTOR || typeof INSPECTOR !== 'undefined' ? INSPECTOR : undefined;
+            this.BJSINSPECTOR = this.BJSINSPECTOR || this._getGlobalInspector();
             this.BJSINSPECTOR.Inspector.Show(this._scene, userOptions);
         };
+        /** Get the inspector from bundle or global */
+        DebugLayer.prototype._getGlobalInspector = function () {
+            // UMD Global name detection from Webpack Bundle UMD Name.
+            if (typeof INSPECTOR !== 'undefined') {
+                return INSPECTOR;
+            }
+            // In case of module let s check the global emitted from the Inspector entry point.
+            if (BABYLON && BABYLON.Inspector) {
+                return BABYLON;
+            }
+            return undefined;
+        };
         /**
          * Get if the inspector is visible or not.
          * @returns true if visible otherwise, false
@@ -70140,7 +70188,7 @@ var BABYLON;
     var MeshBuilder = /** @class */ (function () {
         function MeshBuilder() {
         }
-        MeshBuilder.updateSideOrientation = function (orientation) {
+        MeshBuilder._UpdateSideOrientation = function (orientation) {
             if (orientation == BABYLON.Mesh.DOUBLESIDE) {
                 return BABYLON.Mesh.DOUBLESIDE;
             }
@@ -70167,7 +70215,7 @@ var BABYLON;
         MeshBuilder.CreateBox = function (name, options, scene) {
             if (scene === void 0) { scene = null; }
             var box = new BABYLON.Mesh(name, scene);
-            options.sideOrientation = MeshBuilder.updateSideOrientation(options.sideOrientation);
+            options.sideOrientation = MeshBuilder._UpdateSideOrientation(options.sideOrientation);
             box._originalBuilderSideOrientation = options.sideOrientation;
             var vertexData = BABYLON.VertexData.CreateBox(options);
             vertexData.applyToMesh(box, options.updatable);
@@ -70191,7 +70239,7 @@ var BABYLON;
          */
         MeshBuilder.CreateSphere = function (name, options, scene) {
             var sphere = new BABYLON.Mesh(name, scene);
-            options.sideOrientation = MeshBuilder.updateSideOrientation(options.sideOrientation);
+            options.sideOrientation = MeshBuilder._UpdateSideOrientation(options.sideOrientation);
             sphere._originalBuilderSideOrientation = options.sideOrientation;
             var vertexData = BABYLON.VertexData.CreateSphere(options);
             vertexData.applyToMesh(sphere, options.updatable);
@@ -70214,7 +70262,7 @@ var BABYLON;
         MeshBuilder.CreateDisc = function (name, options, scene) {
             if (scene === void 0) { scene = null; }
             var disc = new BABYLON.Mesh(name, scene);
-            options.sideOrientation = MeshBuilder.updateSideOrientation(options.sideOrientation);
+            options.sideOrientation = MeshBuilder._UpdateSideOrientation(options.sideOrientation);
             disc._originalBuilderSideOrientation = options.sideOrientation;
             var vertexData = BABYLON.VertexData.CreateDisc(options);
             vertexData.applyToMesh(disc, options.updatable);
@@ -70237,7 +70285,7 @@ var BABYLON;
          */
         MeshBuilder.CreateIcoSphere = function (name, options, scene) {
             var sphere = new BABYLON.Mesh(name, scene);
-            options.sideOrientation = MeshBuilder.updateSideOrientation(options.sideOrientation);
+            options.sideOrientation = MeshBuilder._UpdateSideOrientation(options.sideOrientation);
             sphere._originalBuilderSideOrientation = options.sideOrientation;
             var vertexData = BABYLON.VertexData.CreateIcoSphere(options);
             vertexData.applyToMesh(sphere, options.updatable);
@@ -70271,7 +70319,7 @@ var BABYLON;
             var pathArray = options.pathArray;
             var closeArray = options.closeArray;
             var closePath = options.closePath;
-            var sideOrientation = MeshBuilder.updateSideOrientation(options.sideOrientation);
+            var sideOrientation = MeshBuilder._UpdateSideOrientation(options.sideOrientation);
             var instance = options.instance;
             var updatable = options.updatable;
             if (instance) { // existing ribbon instance update
@@ -70409,7 +70457,7 @@ var BABYLON;
          */
         MeshBuilder.CreateCylinder = function (name, options, scene) {
             var cylinder = new BABYLON.Mesh(name, scene);
-            options.sideOrientation = MeshBuilder.updateSideOrientation(options.sideOrientation);
+            options.sideOrientation = MeshBuilder._UpdateSideOrientation(options.sideOrientation);
             cylinder._originalBuilderSideOrientation = options.sideOrientation;
             var vertexData = BABYLON.VertexData.CreateCylinder(options);
             vertexData.applyToMesh(cylinder, options.updatable);
@@ -70431,7 +70479,7 @@ var BABYLON;
          */
         MeshBuilder.CreateTorus = function (name, options, scene) {
             var torus = new BABYLON.Mesh(name, scene);
-            options.sideOrientation = MeshBuilder.updateSideOrientation(options.sideOrientation);
+            options.sideOrientation = MeshBuilder._UpdateSideOrientation(options.sideOrientation);
             torus._originalBuilderSideOrientation = options.sideOrientation;
             var vertexData = BABYLON.VertexData.CreateTorus(options);
             vertexData.applyToMesh(torus, options.updatable);
@@ -70454,7 +70502,7 @@ var BABYLON;
          */
         MeshBuilder.CreateTorusKnot = function (name, options, scene) {
             var torusKnot = new BABYLON.Mesh(name, scene);
-            options.sideOrientation = MeshBuilder.updateSideOrientation(options.sideOrientation);
+            options.sideOrientation = MeshBuilder._UpdateSideOrientation(options.sideOrientation);
             torusKnot._originalBuilderSideOrientation = options.sideOrientation;
             var vertexData = BABYLON.VertexData.CreateTorusKnot(options);
             vertexData.applyToMesh(torusKnot, options.updatable);
@@ -70649,7 +70697,7 @@ var BABYLON;
             var rotation = options.rotation || 0;
             var cap = (options.cap === 0) ? 0 : options.cap || BABYLON.Mesh.NO_CAP;
             var updatable = options.updatable;
-            var sideOrientation = MeshBuilder.updateSideOrientation(options.sideOrientation);
+            var sideOrientation = MeshBuilder._UpdateSideOrientation(options.sideOrientation);
             var instance = options.instance || null;
             var invertUV = options.invertUV || false;
             return MeshBuilder._ExtrudeShapeGeneric(name, shape, path, scale, rotation, null, null, false, false, cap, false, scene, updatable ? true : false, sideOrientation, instance, invertUV, options.frontUVs || null, options.backUVs || null);
@@ -70689,7 +70737,7 @@ var BABYLON;
             var ribbonClosePath = options.ribbonClosePath || false;
             var cap = (options.cap === 0) ? 0 : options.cap || BABYLON.Mesh.NO_CAP;
             var updatable = options.updatable;
-            var sideOrientation = MeshBuilder.updateSideOrientation(options.sideOrientation);
+            var sideOrientation = MeshBuilder._UpdateSideOrientation(options.sideOrientation);
             var instance = options.instance;
             var invertUV = options.invertUV || false;
             return MeshBuilder._ExtrudeShapeGeneric(name, shape, path, null, null, scaleFunction, rotationFunction, ribbonCloseArray, ribbonClosePath, cap, true, scene, updatable ? true : false, sideOrientation, instance || null, invertUV, options.frontUVs || null, options.backUVs || null);
@@ -70722,7 +70770,7 @@ var BABYLON;
             var tessellation = options.tessellation || 64;
             var clip = options.clip || 0;
             var updatable = options.updatable;
-            var sideOrientation = MeshBuilder.updateSideOrientation(options.sideOrientation);
+            var sideOrientation = MeshBuilder._UpdateSideOrientation(options.sideOrientation);
             var cap = options.cap || BABYLON.Mesh.NO_CAP;
             var pi2 = Math.PI * 2;
             var paths = new Array();
@@ -70768,7 +70816,7 @@ var BABYLON;
          */
         MeshBuilder.CreatePlane = function (name, options, scene) {
             var plane = new BABYLON.Mesh(name, scene);
-            options.sideOrientation = MeshBuilder.updateSideOrientation(options.sideOrientation);
+            options.sideOrientation = MeshBuilder._UpdateSideOrientation(options.sideOrientation);
             plane._originalBuilderSideOrientation = options.sideOrientation;
             var vertexData = BABYLON.VertexData.CreatePlane(options);
             vertexData.applyToMesh(plane, options.updatable);
@@ -70912,7 +70960,7 @@ var BABYLON;
          * @returns the polygon mesh
          */
         MeshBuilder.CreatePolygon = function (name, options, scene) {
-            options.sideOrientation = MeshBuilder.updateSideOrientation(options.sideOrientation);
+            options.sideOrientation = MeshBuilder._UpdateSideOrientation(options.sideOrientation);
             var shape = options.shape;
             var holes = options.holes || [];
             var depth = options.depth || 0;
@@ -70988,7 +71036,7 @@ var BABYLON;
             var cap = options.cap || BABYLON.Mesh.NO_CAP;
             var invertUV = options.invertUV || false;
             var updatable = options.updatable;
-            var sideOrientation = MeshBuilder.updateSideOrientation(options.sideOrientation);
+            var sideOrientation = MeshBuilder._UpdateSideOrientation(options.sideOrientation);
             options.arc = options.arc && (options.arc <= 0.0 || options.arc > 1.0) ? 1.0 : options.arc || 1.0;
             // tube geometry
             var tubePathArray = function (path, path3D, circlePaths, radius, tessellation, radiusFunction, cap, arc) {
@@ -71099,7 +71147,7 @@ var BABYLON;
          */
         MeshBuilder.CreatePolyhedron = function (name, options, scene) {
             var polyhedron = new BABYLON.Mesh(name, scene);
-            options.sideOrientation = MeshBuilder.updateSideOrientation(options.sideOrientation);
+            options.sideOrientation = MeshBuilder._UpdateSideOrientation(options.sideOrientation);
             polyhedron._originalBuilderSideOrientation = options.sideOrientation;
             var vertexData = BABYLON.VertexData.CreatePolyhedron(options);
             vertexData.applyToMesh(polyhedron, options.updatable);
@@ -75618,7 +75666,7 @@ var BABYLON;
             this._canvas.width = textureSize.width;
             this._canvas.height = textureSize.height;
             this.releaseInternalTexture();
-            this._texture = this._engine.createDynamicTexture(textureSize.width, textureSize.height, this._generateMipMaps, this._samplingMode);
+            this._texture = this._engine.createDynamicTexture(textureSize.width, textureSize.height, this._generateMipMaps, this.samplingMode);
         };
         /**
          * Scales the texture
@@ -75798,7 +75846,7 @@ var BABYLON;
                     _this.wrapV = BABYLON.Texture.CLAMP_ADDRESSMODE;
                     _this._generateMipMaps = false;
                 }
-                _this._texture = _this._engine.createDynamicTexture(_this.video.videoWidth, _this.video.videoHeight, _this._generateMipMaps, _this._samplingMode);
+                _this._texture = _this._engine.createDynamicTexture(_this.video.videoWidth, _this.video.videoHeight, _this._generateMipMaps, _this.samplingMode);
                 if (!_this.video.autoplay && !_this._settings.poster) {
                     var oldHandler_1 = _this.video.onplaying;
                     var error_1 = false;
@@ -75866,7 +75914,7 @@ var BABYLON;
             };
             _this._engine = _this.getScene().getEngine();
             _this._generateMipMaps = generateMipMaps;
-            _this._samplingMode = samplingMode;
+            _this._initialSamplingMode = samplingMode;
             _this.autoUpdateTexture = settings.autoUpdateTexture;
             _this.name = name || _this._getName(src);
             _this.video = _this._getVideo(src);
@@ -117203,7 +117251,7 @@ var BABYLON;
             if (useBilinearMode === void 0) { useBilinearMode = true; }
             var scene = texture.getScene();
             var engine = scene.getEngine();
-            var rtt = new BABYLON.RenderTargetTexture('resized' + texture.name, { width: width, height: height }, scene, !texture.noMipmap, true, texture._texture.type, false, texture._samplingMode, false);
+            var rtt = new BABYLON.RenderTargetTexture('resized' + texture.name, { width: width, height: height }, scene, !texture.noMipmap, true, texture._texture.type, false, texture.samplingMode, false);
             rtt.wrapU = texture.wrapU;
             rtt.wrapV = texture.wrapV;
             rtt.uOffset = texture.uOffset;

Fichier diff supprimé car celui-ci est trop grand
+ 1 - 1
dist/preview release/babylon.worker.js


+ 92 - 44
dist/preview release/es6.js

@@ -12941,7 +12941,7 @@ var BABYLON;
              * Returns the current version of the framework
              */
             get: function () {
-                return "4.0.0-alpha.11";
+                return "4.0.0-alpha.12";
             },
             enumerable: true,
             configurable: true
@@ -31735,14 +31735,6 @@ var BABYLON;
              */
             this.anisotropicFilteringLevel = BaseTexture.DEFAULT_ANISOTROPIC_FILTERING_LEVEL;
             /**
-             * Define if the texture is a cube texture or if false a 2d texture.
-             */
-            this.isCube = false;
-            /**
-             * Define if the texture is a 3d texture (webgl 2) or if false a 2d texture.
-             */
-            this.is3D = false;
-            /**
              * Define if the texture contains data in gamma space (most of the png/jpg aside bump).
              * HDR texture are usually stored in linear space.
              * This only impacts the PBR and Background materials
@@ -31831,6 +31823,44 @@ var BABYLON;
             enumerable: true,
             configurable: true
         });
+        Object.defineProperty(BaseTexture.prototype, "isCube", {
+            /**
+             * Define if the texture is a cube texture or if false a 2d texture.
+             */
+            get: function () {
+                if (!this._texture) {
+                    return false;
+                }
+                return this._texture.isCube;
+            },
+            set: function (value) {
+                if (!this._texture) {
+                    return;
+                }
+                this._texture.isCube = value;
+            },
+            enumerable: true,
+            configurable: true
+        });
+        Object.defineProperty(BaseTexture.prototype, "is3D", {
+            /**
+             * Define if the texture is a 3d texture (webgl 2) or if false a 2d texture.
+             */
+            get: function () {
+                if (!this._texture) {
+                    return false;
+                }
+                return this._texture.is3D;
+            },
+            set: function (value) {
+                if (!this._texture) {
+                    return;
+                }
+                this._texture.is3D = value;
+            },
+            enumerable: true,
+            configurable: true
+        });
         Object.defineProperty(BaseTexture.prototype, "isRGBD", {
             /**
              * Gets whether or not the texture contains RGBD data.
@@ -32053,7 +32083,6 @@ var BABYLON;
             if (!scene) {
                 return;
             }
-            this._samplingMode = samplingMode;
             scene.getEngine().updateTextureSamplingMode(samplingMode, this._texture);
         };
         /**
@@ -32346,10 +32375,10 @@ var BABYLON;
         ], BaseTexture.prototype, "anisotropicFilteringLevel", void 0);
         __decorate([
             BABYLON.serialize()
-        ], BaseTexture.prototype, "isCube", void 0);
+        ], BaseTexture.prototype, "isCube", null);
         __decorate([
             BABYLON.serialize()
-        ], BaseTexture.prototype, "is3D", void 0);
+        ], BaseTexture.prototype, "is3D", null);
         __decorate([
             BABYLON.serialize()
         ], BaseTexture.prototype, "gammaSpace", void 0);
@@ -32460,6 +32489,8 @@ var BABYLON;
              * Defines the center of rotation (W)
              */
             _this.wRotationCenter = 0.5;
+            /** @hidden */
+            _this._initialSamplingMode = Texture.BILINEAR_SAMPLINGMODE;
             /**
              * Observable triggered once the texture has been loaded.
              */
@@ -32469,7 +32500,7 @@ var BABYLON;
             _this.url = url;
             _this._noMipmap = noMipmap;
             _this._invertY = invertY;
-            _this._samplingMode = samplingMode;
+            _this._initialSamplingMode = samplingMode;
             _this._buffer = buffer;
             _this._deleteBuffer = deleteBuffer;
             if (format) {
@@ -32502,7 +32533,7 @@ var BABYLON;
             _this._texture = _this._getFromCache(_this.url, noMipmap, samplingMode);
             if (!_this._texture) {
                 if (!scene.useDelayedTextureLoading) {
-                    _this._texture = scene.getEngine().createTexture(_this.url, noMipmap, invertY, scene, _this._samplingMode, load, onError, _this._buffer, undefined, _this._format);
+                    _this._texture = scene.getEngine().createTexture(_this.url, noMipmap, invertY, scene, samplingMode, load, onError, _this._buffer, undefined, _this._format);
                     if (deleteBuffer) {
                         delete _this._buffer;
                     }
@@ -32552,7 +32583,10 @@ var BABYLON;
              * Get the current sampling mode associated with the texture.
              */
             get: function () {
-                return this._samplingMode;
+                if (!this._texture) {
+                    return this._initialSamplingMode;
+                }
+                return this._texture.samplingMode;
             },
             enumerable: true,
             configurable: true
@@ -32600,9 +32634,9 @@ var BABYLON;
                 return;
             }
             this.delayLoadState = BABYLON.Engine.DELAYLOADSTATE_LOADED;
-            this._texture = this._getFromCache(this.url, this._noMipmap, this._samplingMode);
+            this._texture = this._getFromCache(this.url, this._noMipmap, this.samplingMode);
             if (!this._texture) {
-                this._texture = scene.getEngine().createTexture(this.url, this._noMipmap, this._invertY, scene, this._samplingMode, this._delayedOnLoad, this._delayedOnError, this._buffer, null, this._format);
+                this._texture = scene.getEngine().createTexture(this.url, this._noMipmap, this._invertY, scene, this.samplingMode, this._delayedOnLoad, this._delayedOnError, this._buffer, null, this._format);
                 if (this._deleteBuffer) {
                     delete this._buffer;
                 }
@@ -32741,7 +32775,7 @@ var BABYLON;
         Texture.prototype.clone = function () {
             var _this = this;
             return BABYLON.SerializationHelper.Clone(function () {
-                return new Texture(_this._texture ? _this._texture.url : null, _this.getScene(), _this._noMipmap, _this._invertY, _this._samplingMode);
+                return new Texture(_this._texture ? _this._texture.url : null, _this.getScene(), _this._noMipmap, _this._invertY, _this.samplingMode);
             }, this);
         };
         /**
@@ -32847,7 +32881,7 @@ var BABYLON;
             // Update Sampling Mode
             if (parsedTexture.samplingMode) {
                 var sampling = parsedTexture.samplingMode;
-                if (texture && texture._samplingMode !== sampling) {
+                if (texture && texture.samplingMode !== sampling) {
                     texture.updateSamplingMode(sampling);
                 }
             }
@@ -33104,7 +33138,9 @@ var BABYLON;
                 // Deep copy
                 BABYLON.Tools.DeepCopy(source, _this, ["name", "material", "skeleton", "instances", "parent", "uniqueId",
                     "source", "metadata", "hasLODLevels", "geometry", "isBlocked", "areNormalsFrozen",
-                    "onBeforeDrawObservable", "onBeforeRenderObservable", "onAfterRenderObservable", "onBeforeDraw"
+                    "onBeforeDrawObservable", "onBeforeRenderObservable", "onAfterRenderObservable", "onBeforeDraw",
+                    "onAfterWorldMatrixUpdateObservable", "onCollideObservable", "onCollisionPositionChangeObservable", "onRebuildObservable",
+                    "onDisposeObservable"
                 ], ["_poseMatrix"]);
                 // Source mesh
                 _this._source = source;
@@ -45239,10 +45275,10 @@ var BABYLON;
         };
         /**
          * Creates a standard material from parsed material data
-         * @param source defines the JSON represnetation of the material
+         * @param source defines the JSON representation of the material
          * @param scene defines the hosting scene
          * @param rootUrl defines the root URL to use to load textures and relative dependencies
-         * @returns a new material
+         * @returns a new standard material
          */
         StandardMaterial.Parse = function (source, scene, rootUrl) {
             return BABYLON.SerializationHelper.Parse(function () { return new StandardMaterial(source.name, scene); }, source, scene, rootUrl);
@@ -67051,7 +67087,7 @@ var BABYLON;
          */
         function DebugLayer(scene) {
             var _this = this;
-            this.BJSINSPECTOR = typeof INSPECTOR !== 'undefined' ? INSPECTOR : undefined;
+            this.BJSINSPECTOR = this._getGlobalInspector();
             /**
              * Observable triggered when a property is changed through the inspector.
              */
@@ -67070,9 +67106,21 @@ var BABYLON;
                 return;
             }
             var userOptions = __assign({ overlay: false, showExplorer: true, showInspector: true, embedMode: false, handleResize: true, enablePopup: true }, config);
-            this.BJSINSPECTOR = this.BJSINSPECTOR || typeof INSPECTOR !== 'undefined' ? INSPECTOR : undefined;
+            this.BJSINSPECTOR = this.BJSINSPECTOR || this._getGlobalInspector();
             this.BJSINSPECTOR.Inspector.Show(this._scene, userOptions);
         };
+        /** Get the inspector from bundle or global */
+        DebugLayer.prototype._getGlobalInspector = function () {
+            // UMD Global name detection from Webpack Bundle UMD Name.
+            if (typeof INSPECTOR !== 'undefined') {
+                return INSPECTOR;
+            }
+            // In case of module let s check the global emitted from the Inspector entry point.
+            if (BABYLON && BABYLON.Inspector) {
+                return BABYLON;
+            }
+            return undefined;
+        };
         /**
          * Get if the inspector is visible or not.
          * @returns true if visible otherwise, false
@@ -70140,7 +70188,7 @@ var BABYLON;
     var MeshBuilder = /** @class */ (function () {
         function MeshBuilder() {
         }
-        MeshBuilder.updateSideOrientation = function (orientation) {
+        MeshBuilder._UpdateSideOrientation = function (orientation) {
             if (orientation == BABYLON.Mesh.DOUBLESIDE) {
                 return BABYLON.Mesh.DOUBLESIDE;
             }
@@ -70167,7 +70215,7 @@ var BABYLON;
         MeshBuilder.CreateBox = function (name, options, scene) {
             if (scene === void 0) { scene = null; }
             var box = new BABYLON.Mesh(name, scene);
-            options.sideOrientation = MeshBuilder.updateSideOrientation(options.sideOrientation);
+            options.sideOrientation = MeshBuilder._UpdateSideOrientation(options.sideOrientation);
             box._originalBuilderSideOrientation = options.sideOrientation;
             var vertexData = BABYLON.VertexData.CreateBox(options);
             vertexData.applyToMesh(box, options.updatable);
@@ -70191,7 +70239,7 @@ var BABYLON;
          */
         MeshBuilder.CreateSphere = function (name, options, scene) {
             var sphere = new BABYLON.Mesh(name, scene);
-            options.sideOrientation = MeshBuilder.updateSideOrientation(options.sideOrientation);
+            options.sideOrientation = MeshBuilder._UpdateSideOrientation(options.sideOrientation);
             sphere._originalBuilderSideOrientation = options.sideOrientation;
             var vertexData = BABYLON.VertexData.CreateSphere(options);
             vertexData.applyToMesh(sphere, options.updatable);
@@ -70214,7 +70262,7 @@ var BABYLON;
         MeshBuilder.CreateDisc = function (name, options, scene) {
             if (scene === void 0) { scene = null; }
             var disc = new BABYLON.Mesh(name, scene);
-            options.sideOrientation = MeshBuilder.updateSideOrientation(options.sideOrientation);
+            options.sideOrientation = MeshBuilder._UpdateSideOrientation(options.sideOrientation);
             disc._originalBuilderSideOrientation = options.sideOrientation;
             var vertexData = BABYLON.VertexData.CreateDisc(options);
             vertexData.applyToMesh(disc, options.updatable);
@@ -70237,7 +70285,7 @@ var BABYLON;
          */
         MeshBuilder.CreateIcoSphere = function (name, options, scene) {
             var sphere = new BABYLON.Mesh(name, scene);
-            options.sideOrientation = MeshBuilder.updateSideOrientation(options.sideOrientation);
+            options.sideOrientation = MeshBuilder._UpdateSideOrientation(options.sideOrientation);
             sphere._originalBuilderSideOrientation = options.sideOrientation;
             var vertexData = BABYLON.VertexData.CreateIcoSphere(options);
             vertexData.applyToMesh(sphere, options.updatable);
@@ -70271,7 +70319,7 @@ var BABYLON;
             var pathArray = options.pathArray;
             var closeArray = options.closeArray;
             var closePath = options.closePath;
-            var sideOrientation = MeshBuilder.updateSideOrientation(options.sideOrientation);
+            var sideOrientation = MeshBuilder._UpdateSideOrientation(options.sideOrientation);
             var instance = options.instance;
             var updatable = options.updatable;
             if (instance) { // existing ribbon instance update
@@ -70409,7 +70457,7 @@ var BABYLON;
          */
         MeshBuilder.CreateCylinder = function (name, options, scene) {
             var cylinder = new BABYLON.Mesh(name, scene);
-            options.sideOrientation = MeshBuilder.updateSideOrientation(options.sideOrientation);
+            options.sideOrientation = MeshBuilder._UpdateSideOrientation(options.sideOrientation);
             cylinder._originalBuilderSideOrientation = options.sideOrientation;
             var vertexData = BABYLON.VertexData.CreateCylinder(options);
             vertexData.applyToMesh(cylinder, options.updatable);
@@ -70431,7 +70479,7 @@ var BABYLON;
          */
         MeshBuilder.CreateTorus = function (name, options, scene) {
             var torus = new BABYLON.Mesh(name, scene);
-            options.sideOrientation = MeshBuilder.updateSideOrientation(options.sideOrientation);
+            options.sideOrientation = MeshBuilder._UpdateSideOrientation(options.sideOrientation);
             torus._originalBuilderSideOrientation = options.sideOrientation;
             var vertexData = BABYLON.VertexData.CreateTorus(options);
             vertexData.applyToMesh(torus, options.updatable);
@@ -70454,7 +70502,7 @@ var BABYLON;
          */
         MeshBuilder.CreateTorusKnot = function (name, options, scene) {
             var torusKnot = new BABYLON.Mesh(name, scene);
-            options.sideOrientation = MeshBuilder.updateSideOrientation(options.sideOrientation);
+            options.sideOrientation = MeshBuilder._UpdateSideOrientation(options.sideOrientation);
             torusKnot._originalBuilderSideOrientation = options.sideOrientation;
             var vertexData = BABYLON.VertexData.CreateTorusKnot(options);
             vertexData.applyToMesh(torusKnot, options.updatable);
@@ -70649,7 +70697,7 @@ var BABYLON;
             var rotation = options.rotation || 0;
             var cap = (options.cap === 0) ? 0 : options.cap || BABYLON.Mesh.NO_CAP;
             var updatable = options.updatable;
-            var sideOrientation = MeshBuilder.updateSideOrientation(options.sideOrientation);
+            var sideOrientation = MeshBuilder._UpdateSideOrientation(options.sideOrientation);
             var instance = options.instance || null;
             var invertUV = options.invertUV || false;
             return MeshBuilder._ExtrudeShapeGeneric(name, shape, path, scale, rotation, null, null, false, false, cap, false, scene, updatable ? true : false, sideOrientation, instance, invertUV, options.frontUVs || null, options.backUVs || null);
@@ -70689,7 +70737,7 @@ var BABYLON;
             var ribbonClosePath = options.ribbonClosePath || false;
             var cap = (options.cap === 0) ? 0 : options.cap || BABYLON.Mesh.NO_CAP;
             var updatable = options.updatable;
-            var sideOrientation = MeshBuilder.updateSideOrientation(options.sideOrientation);
+            var sideOrientation = MeshBuilder._UpdateSideOrientation(options.sideOrientation);
             var instance = options.instance;
             var invertUV = options.invertUV || false;
             return MeshBuilder._ExtrudeShapeGeneric(name, shape, path, null, null, scaleFunction, rotationFunction, ribbonCloseArray, ribbonClosePath, cap, true, scene, updatable ? true : false, sideOrientation, instance || null, invertUV, options.frontUVs || null, options.backUVs || null);
@@ -70722,7 +70770,7 @@ var BABYLON;
             var tessellation = options.tessellation || 64;
             var clip = options.clip || 0;
             var updatable = options.updatable;
-            var sideOrientation = MeshBuilder.updateSideOrientation(options.sideOrientation);
+            var sideOrientation = MeshBuilder._UpdateSideOrientation(options.sideOrientation);
             var cap = options.cap || BABYLON.Mesh.NO_CAP;
             var pi2 = Math.PI * 2;
             var paths = new Array();
@@ -70768,7 +70816,7 @@ var BABYLON;
          */
         MeshBuilder.CreatePlane = function (name, options, scene) {
             var plane = new BABYLON.Mesh(name, scene);
-            options.sideOrientation = MeshBuilder.updateSideOrientation(options.sideOrientation);
+            options.sideOrientation = MeshBuilder._UpdateSideOrientation(options.sideOrientation);
             plane._originalBuilderSideOrientation = options.sideOrientation;
             var vertexData = BABYLON.VertexData.CreatePlane(options);
             vertexData.applyToMesh(plane, options.updatable);
@@ -70912,7 +70960,7 @@ var BABYLON;
          * @returns the polygon mesh
          */
         MeshBuilder.CreatePolygon = function (name, options, scene) {
-            options.sideOrientation = MeshBuilder.updateSideOrientation(options.sideOrientation);
+            options.sideOrientation = MeshBuilder._UpdateSideOrientation(options.sideOrientation);
             var shape = options.shape;
             var holes = options.holes || [];
             var depth = options.depth || 0;
@@ -70988,7 +71036,7 @@ var BABYLON;
             var cap = options.cap || BABYLON.Mesh.NO_CAP;
             var invertUV = options.invertUV || false;
             var updatable = options.updatable;
-            var sideOrientation = MeshBuilder.updateSideOrientation(options.sideOrientation);
+            var sideOrientation = MeshBuilder._UpdateSideOrientation(options.sideOrientation);
             options.arc = options.arc && (options.arc <= 0.0 || options.arc > 1.0) ? 1.0 : options.arc || 1.0;
             // tube geometry
             var tubePathArray = function (path, path3D, circlePaths, radius, tessellation, radiusFunction, cap, arc) {
@@ -71099,7 +71147,7 @@ var BABYLON;
          */
         MeshBuilder.CreatePolyhedron = function (name, options, scene) {
             var polyhedron = new BABYLON.Mesh(name, scene);
-            options.sideOrientation = MeshBuilder.updateSideOrientation(options.sideOrientation);
+            options.sideOrientation = MeshBuilder._UpdateSideOrientation(options.sideOrientation);
             polyhedron._originalBuilderSideOrientation = options.sideOrientation;
             var vertexData = BABYLON.VertexData.CreatePolyhedron(options);
             vertexData.applyToMesh(polyhedron, options.updatable);
@@ -75618,7 +75666,7 @@ var BABYLON;
             this._canvas.width = textureSize.width;
             this._canvas.height = textureSize.height;
             this.releaseInternalTexture();
-            this._texture = this._engine.createDynamicTexture(textureSize.width, textureSize.height, this._generateMipMaps, this._samplingMode);
+            this._texture = this._engine.createDynamicTexture(textureSize.width, textureSize.height, this._generateMipMaps, this.samplingMode);
         };
         /**
          * Scales the texture
@@ -75798,7 +75846,7 @@ var BABYLON;
                     _this.wrapV = BABYLON.Texture.CLAMP_ADDRESSMODE;
                     _this._generateMipMaps = false;
                 }
-                _this._texture = _this._engine.createDynamicTexture(_this.video.videoWidth, _this.video.videoHeight, _this._generateMipMaps, _this._samplingMode);
+                _this._texture = _this._engine.createDynamicTexture(_this.video.videoWidth, _this.video.videoHeight, _this._generateMipMaps, _this.samplingMode);
                 if (!_this.video.autoplay && !_this._settings.poster) {
                     var oldHandler_1 = _this.video.onplaying;
                     var error_1 = false;
@@ -75866,7 +75914,7 @@ var BABYLON;
             };
             _this._engine = _this.getScene().getEngine();
             _this._generateMipMaps = generateMipMaps;
-            _this._samplingMode = samplingMode;
+            _this._initialSamplingMode = samplingMode;
             _this.autoUpdateTexture = settings.autoUpdateTexture;
             _this.name = name || _this._getName(src);
             _this.video = _this._getVideo(src);
@@ -117203,7 +117251,7 @@ var BABYLON;
             if (useBilinearMode === void 0) { useBilinearMode = true; }
             var scene = texture.getScene();
             var engine = scene.getEngine();
-            var rtt = new BABYLON.RenderTargetTexture('resized' + texture.name, { width: width, height: height }, scene, !texture.noMipmap, true, texture._texture.type, false, texture._samplingMode, false);
+            var rtt = new BABYLON.RenderTargetTexture('resized' + texture.name, { width: width, height: height }, scene, !texture.noMipmap, true, texture._texture.type, false, texture.samplingMode, false);
             rtt.wrapU = texture.wrapU;
             rtt.wrapV = texture.wrapV;
             rtt.uOffset = texture.uOffset;

+ 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.11",
+    "version": "4.0.0-alpha.12",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"

Fichier diff supprimé car celui-ci est trop grand
+ 1 - 1
dist/preview release/gui/babylon.gui.js


Fichier diff supprimé car celui-ci est trop grand
+ 1 - 1
dist/preview release/gui/babylon.gui.min.js


Fichier diff supprimé car celui-ci est trop grand
+ 1 - 1
dist/preview release/gui/babylon.gui.min.js.map


+ 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.11",
+    "version": "4.0.0-alpha.12",
     "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.11"
+        "babylonjs": "4.0.0-alpha.12"
     },
     "engines": {
         "node": "*"

Fichier diff supprimé car celui-ci est trop grand
+ 6 - 6
dist/preview release/inspector/babylon.inspector.bundle.js


Fichier diff supprimé car celui-ci est trop grand
+ 1 - 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.11",
+    "version": "4.0.0-alpha.12",
     "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.11",
-        "babylonjs-gui": "4.0.0-alpha.11",
-        "babylonjs-loaders": "4.0.0-alpha.11",
-        "babylonjs-serializers": "4.0.0-alpha.11"
+        "babylonjs": "4.0.0-alpha.12",
+        "babylonjs-gui": "4.0.0-alpha.12",
+        "babylonjs-loaders": "4.0.0-alpha.12",
+        "babylonjs-serializers": "4.0.0-alpha.12"
     },
     "engines": {
         "node": "*"

Fichier diff supprimé car celui-ci est trop grand
+ 1 - 1
dist/preview release/loaders/babylon.glTF1FileLoader.min.js


Fichier diff supprimé car celui-ci est trop grand
+ 1 - 1
dist/preview release/loaders/babylon.glTF2FileLoader.min.js


Fichier diff supprimé car celui-ci est trop grand
+ 1 - 1
dist/preview release/loaders/babylon.glTFFileLoader.min.js


Fichier diff supprimé car celui-ci est trop grand
+ 1 - 1
dist/preview release/loaders/babylonjs.loaders.min.js


+ 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.11",
+    "version": "4.0.0-alpha.12",
     "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.11",
-        "babylonjs": "4.0.0-alpha.11"
+        "babylonjs-gltf2interface": "4.0.0-alpha.12",
+        "babylonjs": "4.0.0-alpha.12"
     },
     "engines": {
         "node": "*"

+ 106 - 0
dist/preview release/materialsLibrary/babylon.skyMaterial.d.ts

@@ -1,29 +1,135 @@
 
 declare module BABYLON {
+    /**
+     * This is the sky material which allows to create dynamic and texture free effects for skyboxes.
+     * @see https://doc.babylonjs.com/extensions/sky
+     */
     class SkyMaterial extends PushMaterial {
+        /**
+         * Defines the overall luminance of sky in interval ]0, 1[.
+         */
         luminance: number;
+        /**
+         * Defines the amount (scattering) of haze as opposed to molecules in atmosphere.
+         */
         turbidity: number;
+        /**
+         * Defines the sky appearance (light intensity).
+         */
         rayleigh: number;
+        /**
+         * Defines the mieCoefficient in interval [0, 0.1] which affects the property .mieDirectionalG.
+         */
         mieCoefficient: number;
+        /**
+         * Defines the amount of haze particles following the Mie scattering theory.
+         */
         mieDirectionalG: number;
+        /**
+         * Defines the distance of the sun according to the active scene camera.
+         */
         distance: number;
+        /**
+         * Defines the sun inclination, in interval [-0.5, 0.5]. When the inclination is not 0, the sun is said
+         * "inclined".
+         */
         inclination: number;
+        /**
+         * Defines the solar azimuth in interval [0, 1]. The azimuth is the angle in the horizontal plan between
+         * an object direction and a reference direction.
+         */
         azimuth: number;
+        /**
+         * Defines the sun position in the sky on (x,y,z). If the property .useSunPosition is set to false, then
+         * the property is overriden by the inclination and the azimuth and can be read at any moment.
+         */
         sunPosition: Vector3;
+        /**
+         * Defines if the sun position should be computed (inclination and azimuth) according to the given
+         * .sunPosition property.
+         */
         useSunPosition: boolean;
+        /**
+         * Defines an offset vector used to get a horizon offset.
+         * @example skyMaterial.cameraOffset.y = camera.globalPosition.y // Set horizon relative to 0 on the Y axis
+         */
+        cameraOffset: Vector3;
         private _cameraPosition;
         private _renderId;
+        /**
+         * Instantiates a new sky material.
+         * This material allows to create dynamic and texture free
+         * effects for skyboxes by taking care of the atmosphere state.
+         * @see https://doc.babylonjs.com/extensions/sky
+         * @param name Define the name of the material in the scene
+         * @param scene Define the scene the material belong to
+         */
         constructor(name: string, scene: Scene);
+        /**
+         * Specifies if the material will require alpha blending
+         * @returns a boolean specifying if alpha blending is needed
+         */
         needAlphaBlending(): boolean;
+        /**
+         * Specifies if this material should be rendered in alpha test mode
+         * @returns false as the sky material doesn't need alpha testing.
+         */
         needAlphaTesting(): boolean;
+        /**
+         * Get the texture used for alpha test purpose.
+         * @returns null as the sky material has no texture.
+         */
         getAlphaTestTexture(): Nullable<BaseTexture>;
+        /**
+         * Get if the submesh is ready to be used and all its information available.
+         * Child classes can use it to update shaders
+         * @param mesh defines the mesh to check
+         * @param subMesh defines which submesh to check
+         * @param useInstances specifies that instances should be used
+         * @returns a boolean indicating that the submesh is ready or not
+         */
         isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
+        /**
+         * Binds the submesh to this material by preparing the effect and shader to draw
+         * @param world defines the world transformation matrix
+         * @param mesh defines the mesh containing the submesh
+         * @param subMesh defines the submesh to bind the material to
+         */
         bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
+        /**
+         * Get the list of animatables in the material.
+         * @returns the list of animatables object used in the material
+         */
         getAnimatables(): IAnimatable[];
+        /**
+         * Disposes the material
+         * @param forceDisposeEffect specifies if effects should be forcefully disposed
+         */
         dispose(forceDisposeEffect?: boolean): void;
+        /**
+         * Makes a duplicate of the material, and gives it a new name
+         * @param name defines the new name for the duplicated material
+         * @returns the cloned material
+         */
         clone(name: string): SkyMaterial;
+        /**
+         * Serializes this material in a JSON representation
+         * @returns the serialized material object
+         */
         serialize(): any;
+        /**
+         * Gets the current class name of the material e.g. "SkyMaterial"
+         * Mainly use in serialization.
+         * @returns the class name
+         */
         getClassName(): string;
+        /**
+         * Creates a sky material from parsed material data
+         * @param source defines the JSON representation of the material
+         * @param scene defines the hosting scene
+         * @param rootUrl defines the root URL to use to load textures and relative dependencies
+         * @returns a new sky material
+         */
         static Parse(source: any, scene: Scene, rootUrl: string): SkyMaterial;
     }
 }

Fichier diff supprimé car celui-ci est trop grand
+ 113 - 6
dist/preview release/materialsLibrary/babylon.skyMaterial.js


Fichier diff supprimé car celui-ci est trop grand
+ 1 - 1
dist/preview release/materialsLibrary/babylon.skyMaterial.min.js


+ 106 - 0
dist/preview release/materialsLibrary/babylonjs.materials.d.ts

@@ -475,30 +475,136 @@ declare module BABYLON {
 
 
 declare module BABYLON {
+    /**
+     * This is the sky material which allows to create dynamic and texture free effects for skyboxes.
+     * @see https://doc.babylonjs.com/extensions/sky
+     */
     class SkyMaterial extends PushMaterial {
+        /**
+         * Defines the overall luminance of sky in interval ]0, 1[.
+         */
         luminance: number;
+        /**
+         * Defines the amount (scattering) of haze as opposed to molecules in atmosphere.
+         */
         turbidity: number;
+        /**
+         * Defines the sky appearance (light intensity).
+         */
         rayleigh: number;
+        /**
+         * Defines the mieCoefficient in interval [0, 0.1] which affects the property .mieDirectionalG.
+         */
         mieCoefficient: number;
+        /**
+         * Defines the amount of haze particles following the Mie scattering theory.
+         */
         mieDirectionalG: number;
+        /**
+         * Defines the distance of the sun according to the active scene camera.
+         */
         distance: number;
+        /**
+         * Defines the sun inclination, in interval [-0.5, 0.5]. When the inclination is not 0, the sun is said
+         * "inclined".
+         */
         inclination: number;
+        /**
+         * Defines the solar azimuth in interval [0, 1]. The azimuth is the angle in the horizontal plan between
+         * an object direction and a reference direction.
+         */
         azimuth: number;
+        /**
+         * Defines the sun position in the sky on (x,y,z). If the property .useSunPosition is set to false, then
+         * the property is overriden by the inclination and the azimuth and can be read at any moment.
+         */
         sunPosition: Vector3;
+        /**
+         * Defines if the sun position should be computed (inclination and azimuth) according to the given
+         * .sunPosition property.
+         */
         useSunPosition: boolean;
+        /**
+         * Defines an offset vector used to get a horizon offset.
+         * @example skyMaterial.cameraOffset.y = camera.globalPosition.y // Set horizon relative to 0 on the Y axis
+         */
+        cameraOffset: Vector3;
         private _cameraPosition;
         private _renderId;
+        /**
+         * Instantiates a new sky material.
+         * This material allows to create dynamic and texture free
+         * effects for skyboxes by taking care of the atmosphere state.
+         * @see https://doc.babylonjs.com/extensions/sky
+         * @param name Define the name of the material in the scene
+         * @param scene Define the scene the material belong to
+         */
         constructor(name: string, scene: Scene);
+        /**
+         * Specifies if the material will require alpha blending
+         * @returns a boolean specifying if alpha blending is needed
+         */
         needAlphaBlending(): boolean;
+        /**
+         * Specifies if this material should be rendered in alpha test mode
+         * @returns false as the sky material doesn't need alpha testing.
+         */
         needAlphaTesting(): boolean;
+        /**
+         * Get the texture used for alpha test purpose.
+         * @returns null as the sky material has no texture.
+         */
         getAlphaTestTexture(): Nullable<BaseTexture>;
+        /**
+         * Get if the submesh is ready to be used and all its information available.
+         * Child classes can use it to update shaders
+         * @param mesh defines the mesh to check
+         * @param subMesh defines which submesh to check
+         * @param useInstances specifies that instances should be used
+         * @returns a boolean indicating that the submesh is ready or not
+         */
         isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
+        /**
+         * Binds the submesh to this material by preparing the effect and shader to draw
+         * @param world defines the world transformation matrix
+         * @param mesh defines the mesh containing the submesh
+         * @param subMesh defines the submesh to bind the material to
+         */
         bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
+        /**
+         * Get the list of animatables in the material.
+         * @returns the list of animatables object used in the material
+         */
         getAnimatables(): IAnimatable[];
+        /**
+         * Disposes the material
+         * @param forceDisposeEffect specifies if effects should be forcefully disposed
+         */
         dispose(forceDisposeEffect?: boolean): void;
+        /**
+         * Makes a duplicate of the material, and gives it a new name
+         * @param name defines the new name for the duplicated material
+         * @returns the cloned material
+         */
         clone(name: string): SkyMaterial;
+        /**
+         * Serializes this material in a JSON representation
+         * @returns the serialized material object
+         */
         serialize(): any;
+        /**
+         * Gets the current class name of the material e.g. "SkyMaterial"
+         * Mainly use in serialization.
+         * @returns the class name
+         */
         getClassName(): string;
+        /**
+         * Creates a sky material from parsed material data
+         * @param source defines the JSON representation of the material
+         * @param scene defines the hosting scene
+         * @param rootUrl defines the root URL to use to load textures and relative dependencies
+         * @returns a new sky material
+         */
         static Parse(source: any, scene: Scene, rootUrl: string): SkyMaterial;
     }
 }

Fichier diff supprimé car celui-ci est trop grand
+ 113 - 6
dist/preview release/materialsLibrary/babylonjs.materials.js


Fichier diff supprimé car celui-ci est trop grand
+ 1 - 1
dist/preview release/materialsLibrary/babylonjs.materials.min.js


+ 106 - 0
dist/preview release/materialsLibrary/babylonjs.materials.module.d.ts

@@ -480,30 +480,136 @@ declare module BABYLON {
 
 
 declare module BABYLON {
+    /**
+     * This is the sky material which allows to create dynamic and texture free effects for skyboxes.
+     * @see https://doc.babylonjs.com/extensions/sky
+     */
     class SkyMaterial extends PushMaterial {
+        /**
+         * Defines the overall luminance of sky in interval ]0, 1[.
+         */
         luminance: number;
+        /**
+         * Defines the amount (scattering) of haze as opposed to molecules in atmosphere.
+         */
         turbidity: number;
+        /**
+         * Defines the sky appearance (light intensity).
+         */
         rayleigh: number;
+        /**
+         * Defines the mieCoefficient in interval [0, 0.1] which affects the property .mieDirectionalG.
+         */
         mieCoefficient: number;
+        /**
+         * Defines the amount of haze particles following the Mie scattering theory.
+         */
         mieDirectionalG: number;
+        /**
+         * Defines the distance of the sun according to the active scene camera.
+         */
         distance: number;
+        /**
+         * Defines the sun inclination, in interval [-0.5, 0.5]. When the inclination is not 0, the sun is said
+         * "inclined".
+         */
         inclination: number;
+        /**
+         * Defines the solar azimuth in interval [0, 1]. The azimuth is the angle in the horizontal plan between
+         * an object direction and a reference direction.
+         */
         azimuth: number;
+        /**
+         * Defines the sun position in the sky on (x,y,z). If the property .useSunPosition is set to false, then
+         * the property is overriden by the inclination and the azimuth and can be read at any moment.
+         */
         sunPosition: Vector3;
+        /**
+         * Defines if the sun position should be computed (inclination and azimuth) according to the given
+         * .sunPosition property.
+         */
         useSunPosition: boolean;
+        /**
+         * Defines an offset vector used to get a horizon offset.
+         * @example skyMaterial.cameraOffset.y = camera.globalPosition.y // Set horizon relative to 0 on the Y axis
+         */
+        cameraOffset: Vector3;
         private _cameraPosition;
         private _renderId;
+        /**
+         * Instantiates a new sky material.
+         * This material allows to create dynamic and texture free
+         * effects for skyboxes by taking care of the atmosphere state.
+         * @see https://doc.babylonjs.com/extensions/sky
+         * @param name Define the name of the material in the scene
+         * @param scene Define the scene the material belong to
+         */
         constructor(name: string, scene: Scene);
+        /**
+         * Specifies if the material will require alpha blending
+         * @returns a boolean specifying if alpha blending is needed
+         */
         needAlphaBlending(): boolean;
+        /**
+         * Specifies if this material should be rendered in alpha test mode
+         * @returns false as the sky material doesn't need alpha testing.
+         */
         needAlphaTesting(): boolean;
+        /**
+         * Get the texture used for alpha test purpose.
+         * @returns null as the sky material has no texture.
+         */
         getAlphaTestTexture(): Nullable<BaseTexture>;
+        /**
+         * Get if the submesh is ready to be used and all its information available.
+         * Child classes can use it to update shaders
+         * @param mesh defines the mesh to check
+         * @param subMesh defines which submesh to check
+         * @param useInstances specifies that instances should be used
+         * @returns a boolean indicating that the submesh is ready or not
+         */
         isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
+        /**
+         * Binds the submesh to this material by preparing the effect and shader to draw
+         * @param world defines the world transformation matrix
+         * @param mesh defines the mesh containing the submesh
+         * @param subMesh defines the submesh to bind the material to
+         */
         bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
+        /**
+         * Get the list of animatables in the material.
+         * @returns the list of animatables object used in the material
+         */
         getAnimatables(): IAnimatable[];
+        /**
+         * Disposes the material
+         * @param forceDisposeEffect specifies if effects should be forcefully disposed
+         */
         dispose(forceDisposeEffect?: boolean): void;
+        /**
+         * Makes a duplicate of the material, and gives it a new name
+         * @param name defines the new name for the duplicated material
+         * @returns the cloned material
+         */
         clone(name: string): SkyMaterial;
+        /**
+         * Serializes this material in a JSON representation
+         * @returns the serialized material object
+         */
         serialize(): any;
+        /**
+         * Gets the current class name of the material e.g. "SkyMaterial"
+         * Mainly use in serialization.
+         * @returns the class name
+         */
         getClassName(): string;
+        /**
+         * Creates a sky material from parsed material data
+         * @param source defines the JSON representation of the material
+         * @param scene defines the hosting scene
+         * @param rootUrl defines the root URL to use to load textures and relative dependencies
+         * @returns a new sky material
+         */
         static Parse(source: any, scene: Scene, rootUrl: string): SkyMaterial;
     }
 }

+ 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.11",
+    "version": "4.0.0-alpha.12",
     "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.11"
+        "babylonjs": "4.0.0-alpha.12"
     },
     "engines": {
         "node": "*"

Fichier diff supprimé car celui-ci est trop grand
+ 1 - 1
dist/preview release/postProcessesLibrary/babylon.asciiArtPostProcess.min.js


Fichier diff supprimé car celui-ci est trop grand
+ 1 - 1
dist/preview release/postProcessesLibrary/babylon.digitalRainPostProcess.min.js


Fichier diff supprimé car celui-ci est trop grand
+ 1 - 1
dist/preview release/postProcessesLibrary/babylonjs.postProcess.min.js


+ 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.11",
+    "version": "4.0.0-alpha.12",
     "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.11"
+        "babylonjs": "4.0.0-alpha.12"
     },
     "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.11",
+    "version": "4.0.0-alpha.12",
     "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.11"
+        "babylonjs": "4.0.0-alpha.12"
     },
     "engines": {
         "node": "*"

Fichier diff supprimé car celui-ci est trop grand
+ 1 - 1
dist/preview release/serializers/babylon.glTF2Serializer.min.js


Fichier diff supprimé car celui-ci est trop grand
+ 1 - 1
dist/preview release/serializers/babylonjs.serializers.min.js


+ 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.11",
+    "version": "4.0.0-alpha.12",
     "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.11",
-        "babylonjs-gltf2interface": "4.0.0-alpha.11"
+        "babylonjs": "4.0.0-alpha.12",
+        "babylonjs-gltf2interface": "4.0.0-alpha.12"
     },
     "engines": {
         "node": "*"

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

@@ -924,7 +924,7 @@ declare module BabylonViewer {
       * @param name the name of the custom optimizer configuration
       * @param upgrade set to true if you want to upgrade optimizer and false if you want to degrade
       */
-    export function getCustomOptimizerByName(name: string, upgrade?: boolean): typeof extendedUpgrade;
+    export function getCustomOptimizerByName(name: string, upgrade?: boolean): (sceneManager: SceneManager) => boolean;
     export function registerCustomOptimizer(name: string, optimizer: (sceneManager: SceneManager) => boolean): void;
 }
 declare module BabylonViewer {
@@ -1298,185 +1298,6 @@ declare module BabylonViewer {
     }
 }
 declare module BabylonViewer {
-    /**
-        * This interface describes the structure of the variable sent with the configuration observables of the scene manager.
-        * O - the type of object we are dealing with (Light, BABYLON.ArcRotateCamera, BABYLON.Scene, etc')
-        * T - the configuration type
-        */
-    export interface IPostConfigurationCallback<OBJ, CONF> {
-            newConfiguration: CONF;
-            sceneManager: SceneManager;
-            object: OBJ;
-            model?: ViewerModel;
-    }
-    export class SceneManager {
-            /**
-                * Will notify when the scene was initialized
-                */
-            onSceneInitObservable: BABYLON.Observable<BABYLON.Scene>;
-            /**
-                * Will notify after the scene was configured. Can be used to further configure the scene
-                */
-            onSceneConfiguredObservable: BABYLON.Observable<IPostConfigurationCallback<BABYLON.Scene, ISceneConfiguration>>;
-            /**
-                * Will notify after the scene optimized was configured. Can be used to further configure the scene optimizer
-                */
-            onSceneOptimizerConfiguredObservable: BABYLON.Observable<IPostConfigurationCallback<BABYLON.SceneOptimizer, ISceneOptimizerConfiguration | boolean>>;
-            /**
-                * Will notify after the camera was configured. Can be used to further configure the camera
-                */
-            onCameraConfiguredObservable: BABYLON.Observable<IPostConfigurationCallback<BABYLON.ArcRotateCamera, ICameraConfiguration>>;
-            /**
-                * Will notify after the lights were configured. Can be used to further configure lights
-                */
-            onLightsConfiguredObservable: BABYLON.Observable<IPostConfigurationCallback<Array<BABYLON.Light>, {
-                    [name: string]: ILightConfiguration | boolean | number;
-            }>>;
-            /**
-                * Will notify after the model(s) were configured. Can be used to further configure models
-                */
-            onModelsConfiguredObservable: BABYLON.Observable<IPostConfigurationCallback<Array<ViewerModel>, IModelConfiguration>>;
-            /**
-                * Will notify after the envirnoment was configured. Can be used to further configure the environment
-                */
-            onEnvironmentConfiguredObservable: BABYLON.Observable<IPostConfigurationCallback<BABYLON.EnvironmentHelper, {
-                    skybox?: ISkyboxConfiguration | boolean;
-                    ground?: IGroundConfiguration | boolean;
-            }>>;
-            /**
-                * Will notify after the model(s) were configured. Can be used to further configure models
-                */
-            onVRConfiguredObservable: BABYLON.Observable<IPostConfigurationCallback<BABYLON.VRExperienceHelper, IVRConfiguration>>;
-            /**
-                * The Babylon BABYLON.Scene of this viewer
-                */
-            scene: BABYLON.Scene;
-            /**
-                * The camera used in this viewer
-                */
-            camera: BABYLON.ArcRotateCamera;
-            /**
-                * Babylon's scene optimizer
-                */
-            sceneOptimizer: BABYLON.SceneOptimizer;
-            /**
-                * Models displayed in this viewer.
-                */
-            models: Array<ViewerModel>;
-            /**
-                * Babylon's environment helper of this viewer
-                */
-            environmentHelper?: BABYLON.EnvironmentHelper;
-            protected _defaultHighpTextureType: number;
-            protected _shadowGeneratorBias: number;
-            protected _defaultPipelineTextureType: number;
-            /**
-                * The maximum number of shadows supported by the curent viewer
-                */
-            protected _maxShadows: number;
-            /**
-                * The labs variable consists of objects that will have their API change.
-                * Please be careful when using labs in production.
-                */
-            labs: ViewerLabs;
-            readonly defaultRenderingPipeline: BABYLON.Nullable<BABYLON.DefaultRenderingPipeline>;
-            protected _vrHelper?: BABYLON.VRExperienceHelper;
-            readonly vrHelper: BABYLON.VRExperienceHelper | undefined;
-            constructor(_engine: BABYLON.Engine, _configurationContainer: ConfigurationContainer, _observablesManager?: ObservablesManager | undefined);
-            /**
-                * Returns a boolean representing HDR support
-                */
-            readonly isHdrSupported: boolean;
-            /**
-                * Return the main color defined in the configuration.
-                */
-            readonly mainColor: BABYLON.Color3;
-            readonly reflectionColor: BABYLON.Color3;
-            animationBlendingEnabled: boolean;
-            readonly observablesManager: ObservablesManager | undefined;
-            /**
-             * Should shadows be rendered every frame, or only once and stop.
-             * This can be used to optimize a scene.
-             *
-             * Not that the shadows will NOT disapear but will remain in place.
-             * @param process if true shadows will be updated once every frame. if false they will stop being updated.
-             */
-            processShadows: boolean;
-            groundEnabled: boolean;
-            /**
-             * sets wether the reflection is disabled.
-             */
-            groundMirrorEnabled: boolean;
-            defaultRenderingPipelineEnabled: boolean;
-            /**
-                * Sets the engine flags to unlock all babylon features.
-                * Can also be configured using the scene.flags configuration object
-                */
-            unlockBabylonFeatures(): void;
-            /**
-                * initialize the scene. Calling this function again will dispose the old scene, if exists.
-                */
-            initScene(sceneConfiguration?: ISceneConfiguration, optimizerConfiguration?: boolean | ISceneOptimizerConfiguration): Promise<BABYLON.Scene>;
-            clearScene(clearModels?: boolean, clearLights?: boolean): void;
-            /**
-                * This will update the scene's configuration, including camera, lights, environment.
-                * @param newConfiguration the delta that should be configured. This includes only the changes
-                * @param globalConfiguration The global configuration object, after the new configuration was merged into it
-                */
-            updateConfiguration(newConfiguration: Partial<ViewerConfiguration>): void;
-            bloomEnabled: boolean;
-            fxaaEnabled: boolean;
-            /**
-                * internally configure the scene using the provided configuration.
-                * The scene will not be recreated, but just updated.
-                * @param sceneConfig the (new) scene configuration
-                */
-            protected _configureScene(sceneConfig: ISceneConfiguration): void;
-            /**
-                * Configure the scene optimizer.
-                * The existing scene optimizer will be disposed and a new one will be created.
-                * @param optimizerConfig the (new) optimizer configuration
-                */
-            protected _configureOptimizer(optimizerConfig: ISceneOptimizerConfiguration | boolean): void;
-            /**
-                * configure all models using the configuration.
-                * @param modelConfiguration the configuration to use to reconfigure the models
-                */
-            protected _configureVR(vrConfig: IVRConfiguration): void;
-            protected _configureEnvironmentMap(environmentMapConfiguration: IEnvironmentMapConfiguration): any;
-            /**
-                * (Re) configure the camera. The camera will only be created once and from this point will only be reconfigured.
-                * @param cameraConfig the new camera configuration
-                * @param model optionally use the model to configure the camera.
-                */
-            protected _configureCamera(cameraConfig?: ICameraConfiguration): void;
-            protected _configureEnvironment(skyboxConifguration?: ISkyboxConfiguration | boolean, groundConfiguration?: IGroundConfiguration | boolean): void;
-            /**
-                * configure the lights.
-                *
-                * @param lightsConfiguration the (new) light(s) configuration
-                * @param model optionally use the model to configure the camera.
-                */
-            protected _configureLights(lightsConfiguration?: {
-                    [name: string]: ILightConfiguration | boolean | number;
-            }): void;
-            /**
-                * Gets the shadow map blur kernel according to the light configuration.
-                * @param light The light used to generate the shadows
-                * @param bufferSize The size of the shadow map
-                * @return the kernel blur size
-                */
-            getBlurKernel(light: BABYLON.IShadowLight, bufferSize: number): number;
-            /**
-                * Alters render settings to reduce features based on hardware feature limitations
-                * @param enableHDR Allows the viewer to run in HDR mode.
-                */
-            protected _handleHardwareLimitations(enableHDR?: boolean): void;
-            /**
-                * Dispoe the entire viewer including the scene and the engine
-                */
-            dispose(): void;
-    }
 }
 declare module BabylonViewer {
     export interface IModelConfiguration {
@@ -1558,20 +1379,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 {
@@ -1632,54 +1439,6 @@ declare module BabylonViewer {
 }
 declare module BabylonViewer {
     /**
-        * The ViewerLabs class will hold functions that are not (!) backwards compatible.
-        * The APIs in all labs-related classes and configuration  might change.
-        * Once stable, lab features will be moved to the publis API and configuration object.
-        */
-    export class ViewerLabs {
-            constructor(_scene: BABYLON.Scene);
-            assetsRootURL: string;
-            environment: PBREnvironment;
-            /**
-                        * Loads an environment map from a given URL
-                        * @param url URL of environment map
-                        * @param onSuccess Callback fired after environment successfully applied to the scene
-                        * @param onProgress Callback fired at progress events while loading the environment map
-                        * @param onError Callback fired when the load fails
-                        */
-            loadEnvironment(url: string, onSuccess?: (env: PBREnvironment) => void, onProgress?: (bytesLoaded: number, bytesTotal: number) => void, onError?: (e: any) => void): void;
-            /**
-                * Loads an environment map from a given URL
-                * @param buffer ArrayBuffer containing environment map
-                * @param onSuccess Callback fired after environment successfully applied to the scene
-                * @param onProgress Callback fired at progress events while loading the environment map
-                * @param onError Callback fired when the load fails
-                */
-            loadEnvironment(buffer: ArrayBuffer, onSuccess?: (env: PBREnvironment) => void, onProgress?: (bytesLoaded: number, bytesTotal: number) => void, onError?: (e: any) => void): void;
-            /**
-                * Sets the environment to an already loaded environment
-                * @param env PBREnvironment instance
-                * @param onSuccess Callback fired after environment successfully applied to the scene
-                * @param onProgress Callback fired at progress events while loading the environment map
-                * @param onError Callback fired when the load fails
-                */
-            loadEnvironment(env: PBREnvironment, onSuccess?: (env: PBREnvironment) => void, onProgress?: (bytesLoaded: number, bytesTotal: number) => void, onError?: (e: any) => void): void;
-            /**
-                * Applies an `EnvironmentMapConfiguration` to the scene
-                * @param environmentMapConfiguration Environment map configuration to apply
-                */
-            applyEnvironmentMapConfiguration(rotationY?: number): void;
-            /**
-                * Get an environment asset url by using the configuration if the path is not absolute.
-                * @param url Asset url
-                * @returns The Asset url using the `environmentAssetsRootURL` if the url is not an absolute path.
-                */
-            getAssetUrl(url: string): string;
-            rotateShadowLight(shadowLight: BABYLON.ShadowLight, amount: number, point?: BABYLON.Vector3, axis?: BABYLON.Vector3, target?: BABYLON.Vector3): void;
-    }
-}
-declare module BabylonViewer {
-    /**
         * Defines an animation to be applied to a model (translation, scale or rotation).
         */
     export interface IModelAnimationConfiguration {
@@ -2199,291 +1958,4 @@ declare module BabylonViewer {
             z: number;
         };
     }
-}
-declare module BabylonViewer {
-    /**
-        * Spherical polynomial coefficients (counter part to spherical harmonic coefficients used in shader irradiance calculation)
-        * @ignoreChildren
-        */
-    export interface SphericalPolynomalCoefficients {
-            x: BABYLON.Vector3;
-            y: BABYLON.Vector3;
-            z: BABYLON.Vector3;
-            xx: BABYLON.Vector3;
-            yy: BABYLON.Vector3;
-            zz: BABYLON.Vector3;
-            yz: BABYLON.Vector3;
-            zx: BABYLON.Vector3;
-            xy: BABYLON.Vector3;
-    }
-    /**
-        * Wraps data and maps required for environments with physically based rendering
-        */
-    export interface PBREnvironment {
-            /**
-                * Spherical Polynomial Coefficients representing an irradiance map
-                */
-            irradiancePolynomialCoefficients: SphericalPolynomalCoefficients;
-            /**
-                * Specular cubemap
-                */
-            specularTexture?: TextureCube;
-            /**
-                * A scale factor applied to RGB values after reading from environment maps
-                */
-            textureIntensityScale: number;
-    }
-    /**
-                        * Environment map representations: layouts, projections and approximations
-                        */
-    export type MapType = 'irradiance_sh_coefficients_9' | 'cubemap_faces';
-    /**
-        * Image type used for environment map
-        */
-    export type ImageType = 'png';
-    /**
-        * A generic field in JSON that report's its type
-        */
-    export interface TypedObject<T> {
-            type: T;
-    }
-    /**
-        * Describes a range of bytes starting at byte pos (inclusive) and finishing at byte pos + length - 1
-        */
-    export interface ByteRange {
-            pos: number;
-            length: number;
-    }
-    /**
-        * Complete Spectre Environment JSON Descriptor
-        */
-    export interface EnvJsonDescriptor {
-            radiance: TypedObject<MapType>;
-            irradiance: TypedObject<MapType>;
-            specular: TypedObject<MapType>;
-    }
-    /**
-        * Spherical harmonic coefficients to provide an irradiance map
-        */
-    export interface IrradianceSHCoefficients9 extends TypedObject<MapType> {
-            l00: Array<number>;
-            l1_1: Array<number>;
-            l10: Array<number>;
-            l11: Array<number>;
-            l2_2: Array<number>;
-            l2_1: Array<number>;
-            l20: Array<number>;
-            l21: Array<number>;
-            l22: Array<number>;
-    }
-    /**
-        * A generic set of images, where the image content is specified by byte ranges in the mipmaps field
-        */
-    export interface ImageSet<T> extends TypedObject<MapType> {
-            imageType: ImageType;
-            width: number;
-            height: number;
-            mipmaps: Array<T>;
-            multiplier: number;
-    }
-    /**
-        * A set of cubemap faces
-        */
-    export type CubemapFaces = ImageSet<Array<ByteRange>>;
-    /**
-        * A single image containing an atlas of equirectangular-projection maps across all mip levels
-        */
-    export type EquirectangularMipmapAtlas = ImageSet<ByteRange>;
-    /**
-        * A static class proving methods to aid parsing Spectre environment files
-        */
-    export class EnvironmentDeserializer {
-            /**
-                * Parses an arraybuffer into a new PBREnvironment object
-                * @param arrayBuffer The arraybuffer of the Spectre environment file
-                * @return a PBREnvironment object
-                */
-            static Parse(arrayBuffer: ArrayBuffer): PBREnvironment;
-    }
-}
-declare module BabylonViewer {
-    /**
-        * WebGL Pixel Formats
-        */
-    export const enum PixelFormat {
-            DEPTH_COMPONENT = 6402,
-            ALPHA = 6406,
-            RGB = 6407,
-            RGBA = 6408,
-            LUMINANCE = 6409,
-            LUMINANCE_ALPHA = 6410
-    }
-    /**
-        * WebGL Pixel Types
-        */
-    export const enum PixelType {
-            UNSIGNED_BYTE = 5121,
-            UNSIGNED_SHORT_4_4_4_4 = 32819,
-            UNSIGNED_SHORT_5_5_5_1 = 32820,
-            UNSIGNED_SHORT_5_6_5 = 33635
-    }
-    /**
-        * WebGL Texture Magnification Filter
-        */
-    export const enum TextureMagFilter {
-            NEAREST = 9728,
-            LINEAR = 9729
-    }
-    /**
-        * WebGL Texture Minification Filter
-        */
-    export const enum TextureMinFilter {
-            NEAREST = 9728,
-            LINEAR = 9729,
-            NEAREST_MIPMAP_NEAREST = 9984,
-            LINEAR_MIPMAP_NEAREST = 9985,
-            NEAREST_MIPMAP_LINEAR = 9986,
-            LINEAR_MIPMAP_LINEAR = 9987
-    }
-    /**
-        * WebGL Texture Wrap Modes
-        */
-    export const enum TextureWrapMode {
-            REPEAT = 10497,
-            CLAMP_TO_EDGE = 33071,
-            MIRRORED_REPEAT = 33648
-    }
-    /**
-        * Raw texture data and descriptor sufficient for WebGL texture upload
-        */
-    export interface TextureData {
-            /**
-                * Width of image
-                */
-            width: number;
-            /**
-                * Height of image
-                */
-            height: number;
-            /**
-                * Format of pixels in data
-                */
-            format: PixelFormat;
-            /**
-                * Row byte alignment of pixels in data
-                */
-            alignment: number;
-            /**
-                * Pixel data
-                */
-            data: ArrayBufferView;
-    }
-    /**
-        * Wraps sampling parameters for a WebGL texture
-        */
-    export interface SamplingParameters {
-            /**
-                * Magnification mode when upsampling from a WebGL texture
-                */
-            magFilter?: TextureMagFilter;
-            /**
-                * Minification mode when upsampling from a WebGL texture
-                */
-            minFilter?: TextureMinFilter;
-            /**
-                * X axis wrapping mode when sampling out of a WebGL texture bounds
-                */
-            wrapS?: TextureWrapMode;
-            /**
-                * Y axis wrapping mode when sampling out of a WebGL texture bounds
-                */
-            wrapT?: TextureWrapMode;
-            /**
-             * Anisotropic filtering samples
-             */
-            maxAnisotropy?: number;
-    }
-    /**
-        * Represents a valid WebGL texture source for use in texImage2D
-        */
-    export type TextureSource = TextureData | ImageData | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement;
-    /**
-        * A generic set of texture mipmaps (where index 0 has the largest dimension)
-        */
-    export type Mipmaps<T> = Array<T>;
-    /**
-        * A set of 6 cubemap arranged in the order [+x, -x, +y, -y, +z, -z]
-        */
-    export type Faces<T> = Array<T>;
-    /**
-        * A set of texture mipmaps specifically for 2D textures in WebGL (where index 0 has the largest dimension)
-        */
-    export type Mipmaps2D = Mipmaps<TextureSource>;
-    /**
-        * A set of texture mipmaps specifically for cubemap textures in WebGL (where index 0 has the largest dimension)
-        */
-    export type MipmapsCube = Mipmaps<Faces<TextureSource>>;
-    /**
-        * A minimal WebGL cubemap descriptor
-        */
-    export class TextureCube {
-            internalFormat: PixelFormat;
-            type: PixelType;
-            source: MipmapsCube;
-            /**
-                * Returns the width of a face of the texture or 0 if not available
-                */
-            readonly Width: number;
-            /**
-                * Returns the height of a face of the texture or 0 if not available
-                */
-            readonly Height: number;
-            /**
-                * constructor
-                * @param internalFormat WebGL pixel format for the texture on the GPU
-                * @param type WebGL pixel type of the supplied data and texture on the GPU
-                * @param source An array containing mipmap levels of faces, where each mipmap level is an array of faces and each face is a TextureSource object
-                */
-            constructor(internalFormat: PixelFormat, type: PixelType, source?: MipmapsCube);
-    }
-    /**
-                * A static class providing methods to aid working with Bablyon textures.
-                */
-    export class TextureUtils {
-            /**
-                * A prefix used when storing a babylon texture object reference on a Spectre texture object
-                */
-            static BabylonTextureKeyPrefix: string;
-            /**
-                * Controls anisotropic filtering for deserialized textures.
-                */
-            static MaxAnisotropy: number;
-            /**
-                * Returns a BabylonCubeTexture instance from a Spectre texture cube, subject to sampling parameters.
-                * If such a texture has already been requested in the past, this texture will be returned, otherwise a new one will be created.
-                * The advantage of this is to enable working with texture objects without the need to initialize on the GPU until desired.
-                * @param scene A Babylon BABYLON.Scene instance
-                * @param textureCube A Spectre TextureCube object
-                * @param parameters WebGL texture sampling parameters
-                * @param automaticMipmaps Pass true to enable automatic mipmap generation where possible (requires power of images)
-                * @param environment Specifies that the texture will be used as an environment
-                * @param singleLod Specifies that the texture will be a singleLod (for environment)
-                * @return Babylon cube texture
-                */
-            static GetBabylonCubeTexture(scene: BABYLON.Scene, textureCube: TextureCube, automaticMipmaps: boolean, environment?: boolean, singleLod?: boolean): BABYLON.CubeTexture;
-            /**
-                * Applies Spectre SamplingParameters to a Babylon texture by directly setting texture parameters on the internal WebGLTexture as well as setting Babylon fields
-                * @param babylonTexture Babylon texture to apply texture to (requires the Babylon texture has an initialize _texture field)
-                * @param parameters Spectre SamplingParameters to apply
-                */
-            static ApplySamplingParameters(babylonTexture: BABYLON.BaseTexture, parameters: SamplingParameters): void;
-            /**
-                * Environment preprocessing dedicated value (Internal Use or Advanced only).
-                */
-            static EnvironmentLODScale: number;
-            /**
-                * Environment preprocessing dedicated value (Internal Use or Advanced only)..
-                */
-            static EnvironmentLODOffset: number;
-    }
 }

Fichier diff supprimé car celui-ci est trop grand
+ 3 - 3
dist/preview release/viewer/babylon.viewer.js


Fichier diff supprimé car celui-ci est trop grand
+ 5 - 5
dist/preview release/viewer/babylon.viewer.max.js


+ 2 - 547
dist/preview release/viewer/babylon.viewer.module.d.ts

@@ -985,14 +985,13 @@ declare module 'babylonjs-viewer/templating/viewerTemplatePlugin' {
 }
 
 declare module 'babylonjs-viewer/optimizer/custom' {
-    import { extendedUpgrade } from "babylonjs-viewer/optimizer/custom/extended";
     import { SceneManager } from "babylonjs-viewer/managers/sceneManager";
     /**
       *
       * @param name the name of the custom optimizer configuration
       * @param upgrade set to true if you want to upgrade optimizer and false if you want to degrade
       */
-    export function getCustomOptimizerByName(name: string, upgrade?: boolean): typeof extendedUpgrade;
+    export function getCustomOptimizerByName(name: string, upgrade?: boolean): (sceneManager: SceneManager) => boolean;
     export function registerCustomOptimizer(name: string, optimizer: (sceneManager: SceneManager) => boolean): void;
 }
 
@@ -1387,192 +1386,7 @@ declare module 'babylonjs-viewer/managers/observablesManager' {
 }
 
 declare module 'babylonjs-viewer/managers/sceneManager' {
-    import { Scene, ArcRotateCamera, Engine, Light, SceneOptimizer, EnvironmentHelper, Color3, Observable, DefaultRenderingPipeline, Nullable, VRExperienceHelper } from 'babylonjs';
-    import { ILightConfiguration, ISceneConfiguration, ISceneOptimizerConfiguration, ICameraConfiguration, ISkyboxConfiguration, ViewerConfiguration, IGroundConfiguration, IModelConfiguration, IVRConfiguration } from 'babylonjs-viewer/configuration';
-    import { ViewerModel } from 'babylonjs-viewer/model/viewerModel';
-    import { ViewerLabs } from 'babylonjs-viewer/labs/viewerLabs';
-    import { ObservablesManager } from 'babylonjs-viewer/managers/observablesManager';
-    import { ConfigurationContainer } from 'babylonjs-viewer/configuration/configurationContainer';
-    import { IEnvironmentMapConfiguration } from 'babylonjs-viewer/configuration/interfaces/environmentMapConfiguration';
-    /**
-        * This interface describes the structure of the variable sent with the configuration observables of the scene manager.
-        * O - the type of object we are dealing with (Light, ArcRotateCamera, Scene, etc')
-        * T - the configuration type
-        */
-    export interface IPostConfigurationCallback<OBJ, CONF> {
-            newConfiguration: CONF;
-            sceneManager: SceneManager;
-            object: OBJ;
-            model?: ViewerModel;
-    }
-    export class SceneManager {
-            /**
-                * Will notify when the scene was initialized
-                */
-            onSceneInitObservable: Observable<Scene>;
-            /**
-                * Will notify after the scene was configured. Can be used to further configure the scene
-                */
-            onSceneConfiguredObservable: Observable<IPostConfigurationCallback<Scene, ISceneConfiguration>>;
-            /**
-                * Will notify after the scene optimized was configured. Can be used to further configure the scene optimizer
-                */
-            onSceneOptimizerConfiguredObservable: Observable<IPostConfigurationCallback<SceneOptimizer, ISceneOptimizerConfiguration | boolean>>;
-            /**
-                * Will notify after the camera was configured. Can be used to further configure the camera
-                */
-            onCameraConfiguredObservable: Observable<IPostConfigurationCallback<ArcRotateCamera, ICameraConfiguration>>;
-            /**
-                * Will notify after the lights were configured. Can be used to further configure lights
-                */
-            onLightsConfiguredObservable: Observable<IPostConfigurationCallback<Array<Light>, {
-                    [name: string]: ILightConfiguration | boolean | number;
-            }>>;
-            /**
-                * Will notify after the model(s) were configured. Can be used to further configure models
-                */
-            onModelsConfiguredObservable: Observable<IPostConfigurationCallback<Array<ViewerModel>, IModelConfiguration>>;
-            /**
-                * Will notify after the envirnoment was configured. Can be used to further configure the environment
-                */
-            onEnvironmentConfiguredObservable: Observable<IPostConfigurationCallback<EnvironmentHelper, {
-                    skybox?: ISkyboxConfiguration | boolean;
-                    ground?: IGroundConfiguration | boolean;
-            }>>;
-            /**
-                * Will notify after the model(s) were configured. Can be used to further configure models
-                */
-            onVRConfiguredObservable: Observable<IPostConfigurationCallback<VRExperienceHelper, IVRConfiguration>>;
-            /**
-                * The Babylon Scene of this viewer
-                */
-            scene: Scene;
-            /**
-                * The camera used in this viewer
-                */
-            camera: ArcRotateCamera;
-            /**
-                * Babylon's scene optimizer
-                */
-            sceneOptimizer: SceneOptimizer;
-            /**
-                * Models displayed in this viewer.
-                */
-            models: Array<ViewerModel>;
-            /**
-                * Babylon's environment helper of this viewer
-                */
-            environmentHelper?: EnvironmentHelper;
-            protected _defaultHighpTextureType: number;
-            protected _shadowGeneratorBias: number;
-            protected _defaultPipelineTextureType: number;
-            /**
-                * The maximum number of shadows supported by the curent viewer
-                */
-            protected _maxShadows: number;
-            /**
-                * The labs variable consists of objects that will have their API change.
-                * Please be careful when using labs in production.
-                */
-            labs: ViewerLabs;
-            readonly defaultRenderingPipeline: Nullable<DefaultRenderingPipeline>;
-            protected _vrHelper?: VRExperienceHelper;
-            readonly vrHelper: VRExperienceHelper | undefined;
-            constructor(_engine: Engine, _configurationContainer: ConfigurationContainer, _observablesManager?: ObservablesManager | undefined);
-            /**
-                * Returns a boolean representing HDR support
-                */
-            readonly isHdrSupported: boolean;
-            /**
-                * Return the main color defined in the configuration.
-                */
-            readonly mainColor: Color3;
-            readonly reflectionColor: Color3;
-            animationBlendingEnabled: boolean;
-            readonly observablesManager: ObservablesManager | undefined;
-            /**
-             * Should shadows be rendered every frame, or only once and stop.
-             * This can be used to optimize a scene.
-             *
-             * Not that the shadows will NOT disapear but will remain in place.
-             * @param process if true shadows will be updated once every frame. if false they will stop being updated.
-             */
-            processShadows: boolean;
-            groundEnabled: boolean;
-            /**
-             * sets wether the reflection is disabled.
-             */
-            groundMirrorEnabled: boolean;
-            defaultRenderingPipelineEnabled: boolean;
-            /**
-                * Sets the engine flags to unlock all babylon features.
-                * Can also be configured using the scene.flags configuration object
-                */
-            unlockBabylonFeatures(): void;
-            /**
-                * initialize the scene. Calling this function again will dispose the old scene, if exists.
-                */
-            initScene(sceneConfiguration?: ISceneConfiguration, optimizerConfiguration?: boolean | ISceneOptimizerConfiguration): Promise<Scene>;
-            clearScene(clearModels?: boolean, clearLights?: boolean): void;
-            /**
-                * This will update the scene's configuration, including camera, lights, environment.
-                * @param newConfiguration the delta that should be configured. This includes only the changes
-                * @param globalConfiguration The global configuration object, after the new configuration was merged into it
-                */
-            updateConfiguration(newConfiguration: Partial<ViewerConfiguration>): void;
-            bloomEnabled: boolean;
-            fxaaEnabled: boolean;
-            /**
-                * internally configure the scene using the provided configuration.
-                * The scene will not be recreated, but just updated.
-                * @param sceneConfig the (new) scene configuration
-                */
-            protected _configureScene(sceneConfig: ISceneConfiguration): void;
-            /**
-                * Configure the scene optimizer.
-                * The existing scene optimizer will be disposed and a new one will be created.
-                * @param optimizerConfig the (new) optimizer configuration
-                */
-            protected _configureOptimizer(optimizerConfig: ISceneOptimizerConfiguration | boolean): void;
-            /**
-                * configure all models using the configuration.
-                * @param modelConfiguration the configuration to use to reconfigure the models
-                */
-            protected _configureVR(vrConfig: IVRConfiguration): void;
-            protected _configureEnvironmentMap(environmentMapConfiguration: IEnvironmentMapConfiguration): any;
-            /**
-                * (Re) configure the camera. The camera will only be created once and from this point will only be reconfigured.
-                * @param cameraConfig the new camera configuration
-                * @param model optionally use the model to configure the camera.
-                */
-            protected _configureCamera(cameraConfig?: ICameraConfiguration): void;
-            protected _configureEnvironment(skyboxConifguration?: ISkyboxConfiguration | boolean, groundConfiguration?: IGroundConfiguration | boolean): void;
-            /**
-                * configure the lights.
-                *
-                * @param lightsConfiguration the (new) light(s) configuration
-                * @param model optionally use the model to configure the camera.
-                */
-            protected _configureLights(lightsConfiguration?: {
-                    [name: string]: ILightConfiguration | boolean | number;
-            }): void;
-            /**
-                * Gets the shadow map blur kernel according to the light configuration.
-                * @param light The light used to generate the shadows
-                * @param bufferSize The size of the shadow map
-                * @return the kernel blur size
-                */
-            getBlurKernel(light: BABYLON.IShadowLight, bufferSize: number): number;
-            /**
-                * Alters render settings to reduce features based on hardware feature limitations
-                * @param enableHDR Allows the viewer to run in HDR mode.
-                */
-            protected _handleHardwareLimitations(enableHDR?: boolean): void;
-            /**
-                * Dispoe the entire viewer including the scene and the engine
-                */
-            dispose(): void;
-    }
+    
 }
 
 declare module 'babylonjs-viewer/configuration/interfaces/modelConfiguration' {
@@ -1663,22 +1477,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';
@@ -1757,57 +1555,6 @@ declare module 'babylonjs-viewer/templating/eventManager' {
     }
 }
 
-declare module 'babylonjs-viewer/labs/viewerLabs' {
-    import { PBREnvironment } from "babylonjs-viewer/labs/environmentSerializer";
-    import { ShadowLight, Vector3, Scene } from 'babylonjs';
-    /**
-        * The ViewerLabs class will hold functions that are not (!) backwards compatible.
-        * The APIs in all labs-related classes and configuration  might change.
-        * Once stable, lab features will be moved to the publis API and configuration object.
-        */
-    export class ViewerLabs {
-            constructor(_scene: Scene);
-            assetsRootURL: string;
-            environment: PBREnvironment;
-            /**
-                        * Loads an environment map from a given URL
-                        * @param url URL of environment map
-                        * @param onSuccess Callback fired after environment successfully applied to the scene
-                        * @param onProgress Callback fired at progress events while loading the environment map
-                        * @param onError Callback fired when the load fails
-                        */
-            loadEnvironment(url: string, onSuccess?: (env: PBREnvironment) => void, onProgress?: (bytesLoaded: number, bytesTotal: number) => void, onError?: (e: any) => void): void;
-            /**
-                * Loads an environment map from a given URL
-                * @param buffer ArrayBuffer containing environment map
-                * @param onSuccess Callback fired after environment successfully applied to the scene
-                * @param onProgress Callback fired at progress events while loading the environment map
-                * @param onError Callback fired when the load fails
-                */
-            loadEnvironment(buffer: ArrayBuffer, onSuccess?: (env: PBREnvironment) => void, onProgress?: (bytesLoaded: number, bytesTotal: number) => void, onError?: (e: any) => void): void;
-            /**
-                * Sets the environment to an already loaded environment
-                * @param env PBREnvironment instance
-                * @param onSuccess Callback fired after environment successfully applied to the scene
-                * @param onProgress Callback fired at progress events while loading the environment map
-                * @param onError Callback fired when the load fails
-                */
-            loadEnvironment(env: PBREnvironment, onSuccess?: (env: PBREnvironment) => void, onProgress?: (bytesLoaded: number, bytesTotal: number) => void, onError?: (e: any) => void): void;
-            /**
-                * Applies an `EnvironmentMapConfiguration` to the scene
-                * @param environmentMapConfiguration Environment map configuration to apply
-                */
-            applyEnvironmentMapConfiguration(rotationY?: number): void;
-            /**
-                * Get an environment asset url by using the configuration if the path is not absolute.
-                * @param url Asset url
-                * @returns The Asset url using the `environmentAssetsRootURL` if the url is not an absolute path.
-                */
-            getAssetUrl(url: string): string;
-            rotateShadowLight(shadowLight: ShadowLight, amount: number, point?: Vector3, axis?: Vector3, target?: Vector3): void;
-    }
-}
-
 declare module 'babylonjs-viewer/configuration/interfaces/modelAnimationConfiguration' {
     /**
         * Defines an animation to be applied to a model (translation, scale or rotation).
@@ -2365,295 +2112,3 @@ declare module 'babylonjs-viewer/configuration/interfaces/vrConfiguration' {
     }
 }
 
-declare module 'babylonjs-viewer/labs/environmentSerializer' {
-    import { Vector3 } from "babylonjs";
-    import { TextureCube } from 'babylonjs-viewer/labs/texture';
-    /**
-        * Spherical polynomial coefficients (counter part to spherical harmonic coefficients used in shader irradiance calculation)
-        * @ignoreChildren
-        */
-    export interface SphericalPolynomalCoefficients {
-            x: Vector3;
-            y: Vector3;
-            z: Vector3;
-            xx: Vector3;
-            yy: Vector3;
-            zz: Vector3;
-            yz: Vector3;
-            zx: Vector3;
-            xy: Vector3;
-    }
-    /**
-        * Wraps data and maps required for environments with physically based rendering
-        */
-    export interface PBREnvironment {
-            /**
-                * Spherical Polynomial Coefficients representing an irradiance map
-                */
-            irradiancePolynomialCoefficients: SphericalPolynomalCoefficients;
-            /**
-                * Specular cubemap
-                */
-            specularTexture?: TextureCube;
-            /**
-                * A scale factor applied to RGB values after reading from environment maps
-                */
-            textureIntensityScale: number;
-    }
-    /**
-                        * Environment map representations: layouts, projections and approximations
-                        */
-    export type MapType = 'irradiance_sh_coefficients_9' | 'cubemap_faces';
-    /**
-        * Image type used for environment map
-        */
-    export type ImageType = 'png';
-    /**
-        * A generic field in JSON that report's its type
-        */
-    export interface TypedObject<T> {
-            type: T;
-    }
-    /**
-        * Describes a range of bytes starting at byte pos (inclusive) and finishing at byte pos + length - 1
-        */
-    export interface ByteRange {
-            pos: number;
-            length: number;
-    }
-    /**
-        * Complete Spectre Environment JSON Descriptor
-        */
-    export interface EnvJsonDescriptor {
-            radiance: TypedObject<MapType>;
-            irradiance: TypedObject<MapType>;
-            specular: TypedObject<MapType>;
-    }
-    /**
-        * Spherical harmonic coefficients to provide an irradiance map
-        */
-    export interface IrradianceSHCoefficients9 extends TypedObject<MapType> {
-            l00: Array<number>;
-            l1_1: Array<number>;
-            l10: Array<number>;
-            l11: Array<number>;
-            l2_2: Array<number>;
-            l2_1: Array<number>;
-            l20: Array<number>;
-            l21: Array<number>;
-            l22: Array<number>;
-    }
-    /**
-        * A generic set of images, where the image content is specified by byte ranges in the mipmaps field
-        */
-    export interface ImageSet<T> extends TypedObject<MapType> {
-            imageType: ImageType;
-            width: number;
-            height: number;
-            mipmaps: Array<T>;
-            multiplier: number;
-    }
-    /**
-        * A set of cubemap faces
-        */
-    export type CubemapFaces = ImageSet<Array<ByteRange>>;
-    /**
-        * A single image containing an atlas of equirectangular-projection maps across all mip levels
-        */
-    export type EquirectangularMipmapAtlas = ImageSet<ByteRange>;
-    /**
-        * A static class proving methods to aid parsing Spectre environment files
-        */
-    export class EnvironmentDeserializer {
-            /**
-                * Parses an arraybuffer into a new PBREnvironment object
-                * @param arrayBuffer The arraybuffer of the Spectre environment file
-                * @return a PBREnvironment object
-                */
-            static Parse(arrayBuffer: ArrayBuffer): PBREnvironment;
-    }
-}
-
-declare module 'babylonjs-viewer/labs/texture' {
-    import { Scene, CubeTexture, BaseTexture } from "babylonjs";
-    /**
-        * WebGL Pixel Formats
-        */
-    export const enum PixelFormat {
-            DEPTH_COMPONENT = 6402,
-            ALPHA = 6406,
-            RGB = 6407,
-            RGBA = 6408,
-            LUMINANCE = 6409,
-            LUMINANCE_ALPHA = 6410
-    }
-    /**
-        * WebGL Pixel Types
-        */
-    export const enum PixelType {
-            UNSIGNED_BYTE = 5121,
-            UNSIGNED_SHORT_4_4_4_4 = 32819,
-            UNSIGNED_SHORT_5_5_5_1 = 32820,
-            UNSIGNED_SHORT_5_6_5 = 33635
-    }
-    /**
-        * WebGL Texture Magnification Filter
-        */
-    export const enum TextureMagFilter {
-            NEAREST = 9728,
-            LINEAR = 9729
-    }
-    /**
-        * WebGL Texture Minification Filter
-        */
-    export const enum TextureMinFilter {
-            NEAREST = 9728,
-            LINEAR = 9729,
-            NEAREST_MIPMAP_NEAREST = 9984,
-            LINEAR_MIPMAP_NEAREST = 9985,
-            NEAREST_MIPMAP_LINEAR = 9986,
-            LINEAR_MIPMAP_LINEAR = 9987
-    }
-    /**
-        * WebGL Texture Wrap Modes
-        */
-    export const enum TextureWrapMode {
-            REPEAT = 10497,
-            CLAMP_TO_EDGE = 33071,
-            MIRRORED_REPEAT = 33648
-    }
-    /**
-        * Raw texture data and descriptor sufficient for WebGL texture upload
-        */
-    export interface TextureData {
-            /**
-                * Width of image
-                */
-            width: number;
-            /**
-                * Height of image
-                */
-            height: number;
-            /**
-                * Format of pixels in data
-                */
-            format: PixelFormat;
-            /**
-                * Row byte alignment of pixels in data
-                */
-            alignment: number;
-            /**
-                * Pixel data
-                */
-            data: ArrayBufferView;
-    }
-    /**
-        * Wraps sampling parameters for a WebGL texture
-        */
-    export interface SamplingParameters {
-            /**
-                * Magnification mode when upsampling from a WebGL texture
-                */
-            magFilter?: TextureMagFilter;
-            /**
-                * Minification mode when upsampling from a WebGL texture
-                */
-            minFilter?: TextureMinFilter;
-            /**
-                * X axis wrapping mode when sampling out of a WebGL texture bounds
-                */
-            wrapS?: TextureWrapMode;
-            /**
-                * Y axis wrapping mode when sampling out of a WebGL texture bounds
-                */
-            wrapT?: TextureWrapMode;
-            /**
-             * Anisotropic filtering samples
-             */
-            maxAnisotropy?: number;
-    }
-    /**
-        * Represents a valid WebGL texture source for use in texImage2D
-        */
-    export type TextureSource = TextureData | ImageData | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement;
-    /**
-        * A generic set of texture mipmaps (where index 0 has the largest dimension)
-        */
-    export type Mipmaps<T> = Array<T>;
-    /**
-        * A set of 6 cubemap arranged in the order [+x, -x, +y, -y, +z, -z]
-        */
-    export type Faces<T> = Array<T>;
-    /**
-        * A set of texture mipmaps specifically for 2D textures in WebGL (where index 0 has the largest dimension)
-        */
-    export type Mipmaps2D = Mipmaps<TextureSource>;
-    /**
-        * A set of texture mipmaps specifically for cubemap textures in WebGL (where index 0 has the largest dimension)
-        */
-    export type MipmapsCube = Mipmaps<Faces<TextureSource>>;
-    /**
-        * A minimal WebGL cubemap descriptor
-        */
-    export class TextureCube {
-            internalFormat: PixelFormat;
-            type: PixelType;
-            source: MipmapsCube;
-            /**
-                * Returns the width of a face of the texture or 0 if not available
-                */
-            readonly Width: number;
-            /**
-                * Returns the height of a face of the texture or 0 if not available
-                */
-            readonly Height: number;
-            /**
-                * constructor
-                * @param internalFormat WebGL pixel format for the texture on the GPU
-                * @param type WebGL pixel type of the supplied data and texture on the GPU
-                * @param source An array containing mipmap levels of faces, where each mipmap level is an array of faces and each face is a TextureSource object
-                */
-            constructor(internalFormat: PixelFormat, type: PixelType, source?: MipmapsCube);
-    }
-    /**
-                * A static class providing methods to aid working with Bablyon textures.
-                */
-    export class TextureUtils {
-            /**
-                * A prefix used when storing a babylon texture object reference on a Spectre texture object
-                */
-            static BabylonTextureKeyPrefix: string;
-            /**
-                * Controls anisotropic filtering for deserialized textures.
-                */
-            static MaxAnisotropy: number;
-            /**
-                * Returns a BabylonCubeTexture instance from a Spectre texture cube, subject to sampling parameters.
-                * If such a texture has already been requested in the past, this texture will be returned, otherwise a new one will be created.
-                * The advantage of this is to enable working with texture objects without the need to initialize on the GPU until desired.
-                * @param scene A Babylon Scene instance
-                * @param textureCube A Spectre TextureCube object
-                * @param parameters WebGL texture sampling parameters
-                * @param automaticMipmaps Pass true to enable automatic mipmap generation where possible (requires power of images)
-                * @param environment Specifies that the texture will be used as an environment
-                * @param singleLod Specifies that the texture will be a singleLod (for environment)
-                * @return Babylon cube texture
-                */
-            static GetBabylonCubeTexture(scene: Scene, textureCube: TextureCube, automaticMipmaps: boolean, environment?: boolean, singleLod?: boolean): CubeTexture;
-            /**
-                * Applies Spectre SamplingParameters to a Babylon texture by directly setting texture parameters on the internal WebGLTexture as well as setting Babylon fields
-                * @param babylonTexture Babylon texture to apply texture to (requires the Babylon texture has an initialize _texture field)
-                * @param parameters Spectre SamplingParameters to apply
-                */
-            static ApplySamplingParameters(babylonTexture: BaseTexture, parameters: SamplingParameters): void;
-            /**
-                * Environment preprocessing dedicated value (Internal Use or Advanced only).
-                */
-            static EnvironmentLODScale: number;
-            /**
-                * Environment preprocessing dedicated value (Internal Use or Advanced only)..
-                */
-            static EnvironmentLODOffset: number;
-    }
-}
-

+ 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.11",
+    "version": "4.0.0-alpha.12",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"

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

@@ -481,7 +481,7 @@ module BABYLON {
          * Returns the current version of the framework
          */
         public static get Version(): string {
-            return "4.0.0-alpha.11";
+            return "4.0.0-alpha.12";
         }
 
         /**