David Catuhe 7 anni fa
parent
commit
b9b3449002

File diff suppressed because it is too large
+ 16090 - 16076
Playground/babylon.d.txt


File diff suppressed because it is too large
+ 10393 - 10379
dist/preview release/babylon.d.ts


File diff suppressed because it is too large
+ 1 - 1
dist/preview release/babylon.js


+ 49 - 3
dist/preview release/babylon.max.js

@@ -100805,6 +100805,7 @@ var BABYLON;
             this._scene = this._ownerNode.getScene();
             if (!SixDofDragBehavior._virtualScene) {
                 SixDofDragBehavior._virtualScene = new BABYLON.Scene(this._scene.getEngine());
+                SixDofDragBehavior._virtualScene.detachControl();
                 this._scene.getEngine().scenes.pop();
             }
             var pickedMesh = null;
@@ -101836,15 +101837,28 @@ var BABYLON;
     var PositionGizmo = /** @class */ (function (_super) {
         __extends(PositionGizmo, _super);
         /**
-             * Creates a PositionGizmo
-             * @param gizmoLayer The utility layer the gizmo will be added to
-             */
+         * Creates a PositionGizmo
+         * @param gizmoLayer The utility layer the gizmo will be added to
+         */
         function PositionGizmo(gizmoLayer) {
             if (gizmoLayer === void 0) { gizmoLayer = BABYLON.UtilityLayerRenderer.DefaultUtilityLayer; }
             var _this = _super.call(this, gizmoLayer) || this;
+            /** Fires an event when any of it's sub gizmos are dragged */
+            _this.onDragStartObservable = new BABYLON.Observable();
+            /** Fires an event when any of it's sub gizmos are released from dragging */
+            _this.onDragEndObservable = new BABYLON.Observable();
             _this.xGizmo = new BABYLON.AxisDragGizmo(new BABYLON.Vector3(1, 0, 0), BABYLON.Color3.Red().scale(0.5), gizmoLayer);
             _this.yGizmo = new BABYLON.AxisDragGizmo(new BABYLON.Vector3(0, 1, 0), BABYLON.Color3.Green().scale(0.5), gizmoLayer);
             _this.zGizmo = new BABYLON.AxisDragGizmo(new BABYLON.Vector3(0, 0, 1), BABYLON.Color3.Blue().scale(0.5), gizmoLayer);
+            // Relay drag events
+            [_this.xGizmo, _this.yGizmo, _this.zGizmo].forEach(function (gizmo) {
+                gizmo.dragBehavior.onDragStartObservable.add(function () {
+                    _this.onDragStartObservable.notifyObservers({});
+                });
+                gizmo.dragBehavior.onDragEndObservable.add(function () {
+                    _this.onDragEndObservable.notifyObservers({});
+                });
+            });
             _this.attachedMesh = null;
             return _this;
         }
@@ -101914,6 +101928,8 @@ var BABYLON;
             this.xGizmo.dispose();
             this.yGizmo.dispose();
             this.zGizmo.dispose();
+            this.onDragStartObservable.clear();
+            this.onDragEndObservable.clear();
         };
         /**
          * CustomMeshes are not supported by this gizmo
@@ -101946,9 +101962,22 @@ var BABYLON;
             if (gizmoLayer === void 0) { gizmoLayer = BABYLON.UtilityLayerRenderer.DefaultUtilityLayer; }
             if (tessellation === void 0) { tessellation = 32; }
             var _this = _super.call(this, gizmoLayer) || this;
+            /** Fires an event when any of it's sub gizmos are dragged */
+            _this.onDragStartObservable = new BABYLON.Observable();
+            /** Fires an event when any of it's sub gizmos are released from dragging */
+            _this.onDragEndObservable = new BABYLON.Observable();
             _this.xGizmo = new BABYLON.PlaneRotationGizmo(new BABYLON.Vector3(1, 0, 0), BABYLON.Color3.Red().scale(0.5), gizmoLayer, tessellation);
             _this.yGizmo = new BABYLON.PlaneRotationGizmo(new BABYLON.Vector3(0, 1, 0), BABYLON.Color3.Green().scale(0.5), gizmoLayer, tessellation);
             _this.zGizmo = new BABYLON.PlaneRotationGizmo(new BABYLON.Vector3(0, 0, 1), BABYLON.Color3.Blue().scale(0.5), gizmoLayer, tessellation);
+            // Relay drag events
+            [_this.xGizmo, _this.yGizmo, _this.zGizmo].forEach(function (gizmo) {
+                gizmo.dragBehavior.onDragStartObservable.add(function () {
+                    _this.onDragStartObservable.notifyObservers({});
+                });
+                gizmo.dragBehavior.onDragEndObservable.add(function () {
+                    _this.onDragEndObservable.notifyObservers({});
+                });
+            });
             _this.attachedMesh = null;
             return _this;
         }
@@ -102018,6 +102047,8 @@ var BABYLON;
             this.xGizmo.dispose();
             this.yGizmo.dispose();
             this.zGizmo.dispose();
+            this.onDragStartObservable.clear();
+            this.onDragEndObservable.clear();
         };
         /**
          * CustomMeshes are not supported by this gizmo
@@ -102048,6 +102079,10 @@ var BABYLON;
         function ScaleGizmo(gizmoLayer) {
             if (gizmoLayer === void 0) { gizmoLayer = BABYLON.UtilityLayerRenderer.DefaultUtilityLayer; }
             var _this = _super.call(this, gizmoLayer) || this;
+            /** Fires an event when any of it's sub gizmos are dragged */
+            _this.onDragStartObservable = new BABYLON.Observable();
+            /** Fires an event when any of it's sub gizmos are released from dragging */
+            _this.onDragEndObservable = new BABYLON.Observable();
             _this.xGizmo = new BABYLON.AxisScaleGizmo(new BABYLON.Vector3(1, 0, 0), BABYLON.Color3.Red().scale(0.5), gizmoLayer);
             _this.yGizmo = new BABYLON.AxisScaleGizmo(new BABYLON.Vector3(0, 1, 0), BABYLON.Color3.Green().scale(0.5), gizmoLayer);
             _this.zGizmo = new BABYLON.AxisScaleGizmo(new BABYLON.Vector3(0, 0, 1), BABYLON.Color3.Blue().scale(0.5), gizmoLayer);
@@ -102062,6 +102097,15 @@ var BABYLON;
             octahedron.scaling.scaleInPlace(0.007);
             uniformScalingMesh.addChild(octahedron);
             _this.uniformScaleGizmo.setCustomMesh(uniformScalingMesh, true);
+            // Relay drag events
+            [_this.xGizmo, _this.yGizmo, _this.zGizmo, _this.uniformScaleGizmo].forEach(function (gizmo) {
+                gizmo.dragBehavior.onDragStartObservable.add(function () {
+                    _this.onDragStartObservable.notifyObservers({});
+                });
+                gizmo.dragBehavior.onDragEndObservable.add(function () {
+                    _this.onDragEndObservable.notifyObservers({});
+                });
+            });
             _this.attachedMesh = null;
             return _this;
         }
@@ -102138,6 +102182,8 @@ var BABYLON;
             this.yGizmo.dispose();
             this.zGizmo.dispose();
             this.uniformScaleGizmo.dispose();
+            this.onDragStartObservable.clear();
+            this.onDragEndObservable.clear();
         };
         return ScaleGizmo;
     }(BABYLON.Gizmo));

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

@@ -100772,6 +100772,7 @@ var BABYLON;
             this._scene = this._ownerNode.getScene();
             if (!SixDofDragBehavior._virtualScene) {
                 SixDofDragBehavior._virtualScene = new BABYLON.Scene(this._scene.getEngine());
+                SixDofDragBehavior._virtualScene.detachControl();
                 this._scene.getEngine().scenes.pop();
             }
             var pickedMesh = null;
@@ -101803,15 +101804,28 @@ var BABYLON;
     var PositionGizmo = /** @class */ (function (_super) {
         __extends(PositionGizmo, _super);
         /**
-             * Creates a PositionGizmo
-             * @param gizmoLayer The utility layer the gizmo will be added to
-             */
+         * Creates a PositionGizmo
+         * @param gizmoLayer The utility layer the gizmo will be added to
+         */
         function PositionGizmo(gizmoLayer) {
             if (gizmoLayer === void 0) { gizmoLayer = BABYLON.UtilityLayerRenderer.DefaultUtilityLayer; }
             var _this = _super.call(this, gizmoLayer) || this;
+            /** Fires an event when any of it's sub gizmos are dragged */
+            _this.onDragStartObservable = new BABYLON.Observable();
+            /** Fires an event when any of it's sub gizmos are released from dragging */
+            _this.onDragEndObservable = new BABYLON.Observable();
             _this.xGizmo = new BABYLON.AxisDragGizmo(new BABYLON.Vector3(1, 0, 0), BABYLON.Color3.Red().scale(0.5), gizmoLayer);
             _this.yGizmo = new BABYLON.AxisDragGizmo(new BABYLON.Vector3(0, 1, 0), BABYLON.Color3.Green().scale(0.5), gizmoLayer);
             _this.zGizmo = new BABYLON.AxisDragGizmo(new BABYLON.Vector3(0, 0, 1), BABYLON.Color3.Blue().scale(0.5), gizmoLayer);
+            // Relay drag events
+            [_this.xGizmo, _this.yGizmo, _this.zGizmo].forEach(function (gizmo) {
+                gizmo.dragBehavior.onDragStartObservable.add(function () {
+                    _this.onDragStartObservable.notifyObservers({});
+                });
+                gizmo.dragBehavior.onDragEndObservable.add(function () {
+                    _this.onDragEndObservable.notifyObservers({});
+                });
+            });
             _this.attachedMesh = null;
             return _this;
         }
@@ -101881,6 +101895,8 @@ var BABYLON;
             this.xGizmo.dispose();
             this.yGizmo.dispose();
             this.zGizmo.dispose();
+            this.onDragStartObservable.clear();
+            this.onDragEndObservable.clear();
         };
         /**
          * CustomMeshes are not supported by this gizmo
@@ -101913,9 +101929,22 @@ var BABYLON;
             if (gizmoLayer === void 0) { gizmoLayer = BABYLON.UtilityLayerRenderer.DefaultUtilityLayer; }
             if (tessellation === void 0) { tessellation = 32; }
             var _this = _super.call(this, gizmoLayer) || this;
+            /** Fires an event when any of it's sub gizmos are dragged */
+            _this.onDragStartObservable = new BABYLON.Observable();
+            /** Fires an event when any of it's sub gizmos are released from dragging */
+            _this.onDragEndObservable = new BABYLON.Observable();
             _this.xGizmo = new BABYLON.PlaneRotationGizmo(new BABYLON.Vector3(1, 0, 0), BABYLON.Color3.Red().scale(0.5), gizmoLayer, tessellation);
             _this.yGizmo = new BABYLON.PlaneRotationGizmo(new BABYLON.Vector3(0, 1, 0), BABYLON.Color3.Green().scale(0.5), gizmoLayer, tessellation);
             _this.zGizmo = new BABYLON.PlaneRotationGizmo(new BABYLON.Vector3(0, 0, 1), BABYLON.Color3.Blue().scale(0.5), gizmoLayer, tessellation);
+            // Relay drag events
+            [_this.xGizmo, _this.yGizmo, _this.zGizmo].forEach(function (gizmo) {
+                gizmo.dragBehavior.onDragStartObservable.add(function () {
+                    _this.onDragStartObservable.notifyObservers({});
+                });
+                gizmo.dragBehavior.onDragEndObservable.add(function () {
+                    _this.onDragEndObservable.notifyObservers({});
+                });
+            });
             _this.attachedMesh = null;
             return _this;
         }
@@ -101985,6 +102014,8 @@ var BABYLON;
             this.xGizmo.dispose();
             this.yGizmo.dispose();
             this.zGizmo.dispose();
+            this.onDragStartObservable.clear();
+            this.onDragEndObservable.clear();
         };
         /**
          * CustomMeshes are not supported by this gizmo
@@ -102015,6 +102046,10 @@ var BABYLON;
         function ScaleGizmo(gizmoLayer) {
             if (gizmoLayer === void 0) { gizmoLayer = BABYLON.UtilityLayerRenderer.DefaultUtilityLayer; }
             var _this = _super.call(this, gizmoLayer) || this;
+            /** Fires an event when any of it's sub gizmos are dragged */
+            _this.onDragStartObservable = new BABYLON.Observable();
+            /** Fires an event when any of it's sub gizmos are released from dragging */
+            _this.onDragEndObservable = new BABYLON.Observable();
             _this.xGizmo = new BABYLON.AxisScaleGizmo(new BABYLON.Vector3(1, 0, 0), BABYLON.Color3.Red().scale(0.5), gizmoLayer);
             _this.yGizmo = new BABYLON.AxisScaleGizmo(new BABYLON.Vector3(0, 1, 0), BABYLON.Color3.Green().scale(0.5), gizmoLayer);
             _this.zGizmo = new BABYLON.AxisScaleGizmo(new BABYLON.Vector3(0, 0, 1), BABYLON.Color3.Blue().scale(0.5), gizmoLayer);
@@ -102029,6 +102064,15 @@ var BABYLON;
             octahedron.scaling.scaleInPlace(0.007);
             uniformScalingMesh.addChild(octahedron);
             _this.uniformScaleGizmo.setCustomMesh(uniformScalingMesh, true);
+            // Relay drag events
+            [_this.xGizmo, _this.yGizmo, _this.zGizmo, _this.uniformScaleGizmo].forEach(function (gizmo) {
+                gizmo.dragBehavior.onDragStartObservable.add(function () {
+                    _this.onDragStartObservable.notifyObservers({});
+                });
+                gizmo.dragBehavior.onDragEndObservable.add(function () {
+                    _this.onDragEndObservable.notifyObservers({});
+                });
+            });
             _this.attachedMesh = null;
             return _this;
         }
@@ -102105,6 +102149,8 @@ var BABYLON;
             this.yGizmo.dispose();
             this.zGizmo.dispose();
             this.uniformScaleGizmo.dispose();
+            this.onDragStartObservable.clear();
+            this.onDragEndObservable.clear();
         };
         return ScaleGizmo;
     }(BABYLON.Gizmo));

File diff suppressed because it is too large
+ 1 - 1
dist/preview release/babylon.worker.js


+ 49 - 3
dist/preview release/es6.js

@@ -100772,6 +100772,7 @@ var BABYLON;
             this._scene = this._ownerNode.getScene();
             if (!SixDofDragBehavior._virtualScene) {
                 SixDofDragBehavior._virtualScene = new BABYLON.Scene(this._scene.getEngine());
+                SixDofDragBehavior._virtualScene.detachControl();
                 this._scene.getEngine().scenes.pop();
             }
             var pickedMesh = null;
@@ -101803,15 +101804,28 @@ var BABYLON;
     var PositionGizmo = /** @class */ (function (_super) {
         __extends(PositionGizmo, _super);
         /**
-             * Creates a PositionGizmo
-             * @param gizmoLayer The utility layer the gizmo will be added to
-             */
+         * Creates a PositionGizmo
+         * @param gizmoLayer The utility layer the gizmo will be added to
+         */
         function PositionGizmo(gizmoLayer) {
             if (gizmoLayer === void 0) { gizmoLayer = BABYLON.UtilityLayerRenderer.DefaultUtilityLayer; }
             var _this = _super.call(this, gizmoLayer) || this;
+            /** Fires an event when any of it's sub gizmos are dragged */
+            _this.onDragStartObservable = new BABYLON.Observable();
+            /** Fires an event when any of it's sub gizmos are released from dragging */
+            _this.onDragEndObservable = new BABYLON.Observable();
             _this.xGizmo = new BABYLON.AxisDragGizmo(new BABYLON.Vector3(1, 0, 0), BABYLON.Color3.Red().scale(0.5), gizmoLayer);
             _this.yGizmo = new BABYLON.AxisDragGizmo(new BABYLON.Vector3(0, 1, 0), BABYLON.Color3.Green().scale(0.5), gizmoLayer);
             _this.zGizmo = new BABYLON.AxisDragGizmo(new BABYLON.Vector3(0, 0, 1), BABYLON.Color3.Blue().scale(0.5), gizmoLayer);
+            // Relay drag events
+            [_this.xGizmo, _this.yGizmo, _this.zGizmo].forEach(function (gizmo) {
+                gizmo.dragBehavior.onDragStartObservable.add(function () {
+                    _this.onDragStartObservable.notifyObservers({});
+                });
+                gizmo.dragBehavior.onDragEndObservable.add(function () {
+                    _this.onDragEndObservable.notifyObservers({});
+                });
+            });
             _this.attachedMesh = null;
             return _this;
         }
@@ -101881,6 +101895,8 @@ var BABYLON;
             this.xGizmo.dispose();
             this.yGizmo.dispose();
             this.zGizmo.dispose();
+            this.onDragStartObservable.clear();
+            this.onDragEndObservable.clear();
         };
         /**
          * CustomMeshes are not supported by this gizmo
@@ -101913,9 +101929,22 @@ var BABYLON;
             if (gizmoLayer === void 0) { gizmoLayer = BABYLON.UtilityLayerRenderer.DefaultUtilityLayer; }
             if (tessellation === void 0) { tessellation = 32; }
             var _this = _super.call(this, gizmoLayer) || this;
+            /** Fires an event when any of it's sub gizmos are dragged */
+            _this.onDragStartObservable = new BABYLON.Observable();
+            /** Fires an event when any of it's sub gizmos are released from dragging */
+            _this.onDragEndObservable = new BABYLON.Observable();
             _this.xGizmo = new BABYLON.PlaneRotationGizmo(new BABYLON.Vector3(1, 0, 0), BABYLON.Color3.Red().scale(0.5), gizmoLayer, tessellation);
             _this.yGizmo = new BABYLON.PlaneRotationGizmo(new BABYLON.Vector3(0, 1, 0), BABYLON.Color3.Green().scale(0.5), gizmoLayer, tessellation);
             _this.zGizmo = new BABYLON.PlaneRotationGizmo(new BABYLON.Vector3(0, 0, 1), BABYLON.Color3.Blue().scale(0.5), gizmoLayer, tessellation);
+            // Relay drag events
+            [_this.xGizmo, _this.yGizmo, _this.zGizmo].forEach(function (gizmo) {
+                gizmo.dragBehavior.onDragStartObservable.add(function () {
+                    _this.onDragStartObservable.notifyObservers({});
+                });
+                gizmo.dragBehavior.onDragEndObservable.add(function () {
+                    _this.onDragEndObservable.notifyObservers({});
+                });
+            });
             _this.attachedMesh = null;
             return _this;
         }
@@ -101985,6 +102014,8 @@ var BABYLON;
             this.xGizmo.dispose();
             this.yGizmo.dispose();
             this.zGizmo.dispose();
+            this.onDragStartObservable.clear();
+            this.onDragEndObservable.clear();
         };
         /**
          * CustomMeshes are not supported by this gizmo
@@ -102015,6 +102046,10 @@ var BABYLON;
         function ScaleGizmo(gizmoLayer) {
             if (gizmoLayer === void 0) { gizmoLayer = BABYLON.UtilityLayerRenderer.DefaultUtilityLayer; }
             var _this = _super.call(this, gizmoLayer) || this;
+            /** Fires an event when any of it's sub gizmos are dragged */
+            _this.onDragStartObservable = new BABYLON.Observable();
+            /** Fires an event when any of it's sub gizmos are released from dragging */
+            _this.onDragEndObservable = new BABYLON.Observable();
             _this.xGizmo = new BABYLON.AxisScaleGizmo(new BABYLON.Vector3(1, 0, 0), BABYLON.Color3.Red().scale(0.5), gizmoLayer);
             _this.yGizmo = new BABYLON.AxisScaleGizmo(new BABYLON.Vector3(0, 1, 0), BABYLON.Color3.Green().scale(0.5), gizmoLayer);
             _this.zGizmo = new BABYLON.AxisScaleGizmo(new BABYLON.Vector3(0, 0, 1), BABYLON.Color3.Blue().scale(0.5), gizmoLayer);
@@ -102029,6 +102064,15 @@ var BABYLON;
             octahedron.scaling.scaleInPlace(0.007);
             uniformScalingMesh.addChild(octahedron);
             _this.uniformScaleGizmo.setCustomMesh(uniformScalingMesh, true);
+            // Relay drag events
+            [_this.xGizmo, _this.yGizmo, _this.zGizmo, _this.uniformScaleGizmo].forEach(function (gizmo) {
+                gizmo.dragBehavior.onDragStartObservable.add(function () {
+                    _this.onDragStartObservable.notifyObservers({});
+                });
+                gizmo.dragBehavior.onDragEndObservable.add(function () {
+                    _this.onDragEndObservable.notifyObservers({});
+                });
+            });
             _this.attachedMesh = null;
             return _this;
         }
@@ -102105,6 +102149,8 @@ var BABYLON;
             this.yGizmo.dispose();
             this.zGizmo.dispose();
             this.uniformScaleGizmo.dispose();
+            this.onDragStartObservable.clear();
+            this.onDragEndObservable.clear();
         };
         return ScaleGizmo;
     }(BABYLON.Gizmo));

+ 0 - 79
dist/preview release/viewer/babylon.viewer.d.ts

@@ -482,37 +482,6 @@ declare module BabylonViewer {
     export const telemetryManager: TelemetryManager;
 }
 declare module BabylonViewer {
-    /**
-        * An instance of the class is in charge of loading the model correctly.
-        * This class will continously be expended with tasks required from the specific loaders Babylon has.
-        *
-        * A Model loader is unique per (Abstract)Viewer. It is being generated by the viewer
-        */
-    export class ModelLoader {
-            readonly baseUrl: string;
-            /**
-                * Create a new Model loader
-                * @param _viewer the viewer using this model loader
-                */
-            constructor(_observablesManager: ObservablesManager, _configurationContainer?: ConfigurationContainer | undefined);
-            /**
-                * Adds a new plugin to the loader process.
-                *
-                * @param plugin the plugin name or the plugin itself
-                */
-            addPlugin(plugin: ILoaderPlugin | string): void;
-            /**
-                * Load a model using predefined configuration
-                * @param modelConfiguration the modelConfiguration to use to load the model
-                */
-            load(modelConfiguration: IModelConfiguration): ViewerModel;
-            cancelLoad(model: ViewerModel): void;
-            /**
-                * dispose the model loader.
-                * If loaders are registered and are in the middle of loading, they will be disposed and the request(s) will be cancelled.
-                */
-            dispose(): void;
-    }
 }
 declare module BabylonViewer {
     /**
@@ -1545,19 +1514,6 @@ declare module BabylonViewer {
     }
 }
 declare module BabylonViewer {
-    /**
-        * Get a loader plugin according to its name.
-        * The plugin will be cached and will be reused if called for again.
-        *
-        * @param name the name of the plugin
-        */
-    export function getLoaderPluginByName(name: string): ILoaderPlugin;
-    /**
-        *
-        */
-    export function addLoaderPlugin(name: string, plugin: ILoaderPlugin): void;
-}
-declare module BabylonViewer {
 }
 declare module BabylonViewer {
     export interface IEnvironmentMapConfiguration {
@@ -1693,41 +1649,6 @@ declare module BabylonViewer {
     }
 }
 declare module BabylonViewer {
-    export class TelemetryLoaderPlugin implements ILoaderPlugin {
-        onInit(loader: BABYLON.ISceneLoaderPlugin | BABYLON.ISceneLoaderPluginAsync, model: ViewerModel): void;
-        onLoaded(model: ViewerModel): void;
-        onError(message: string, exception: any): void;
-        onComplete(): void;
-    }
-}
-declare module BabylonViewer {
-    /**
-      * A loder plugin to use MSFT_lod extension correctly (glTF)
-      */
-    export class MSFTLodLoaderPlugin implements ILoaderPlugin {
-        onInit(loader: BABYLON.ISceneLoaderPlugin | BABYLON.ISceneLoaderPluginAsync, model: ViewerModel): void;
-        onExtensionLoaded(extension: BABYLON.IGLTFLoaderExtension): void;
-    }
-}
-declare module BabylonViewer {
-    /**
-      * Force-apply material configuration right after a material was loaded.
-      */
-    export class ApplyMaterialConfigPlugin implements ILoaderPlugin {
-        onInit(loader: BABYLON.ISceneLoaderPlugin | BABYLON.ISceneLoaderPluginAsync, model: ViewerModel): void;
-        onMaterialLoaded(material: BABYLON.Material): void;
-    }
-}
-declare module BabylonViewer {
-    /**
-      * A (PBR) material will be extended using this function.
-      * This function will hold extra default configuration for the viewer, if not implemented in Babylon itself.
-      */
-    export class ExtendedMaterialLoaderPlugin implements ILoaderPlugin {
-        onMaterialLoaded(baseMaterial: BABYLON.Material): void;
-    }
-}
-declare module BabylonViewer {
     export interface ICameraConfiguration {
         position?: {
             x: number;

File diff suppressed because it is too large
+ 1 - 1
dist/preview release/viewer/babylon.viewer.js


File diff suppressed because it is too large
+ 1 - 1
dist/preview release/viewer/babylon.viewer.max.js


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

@@ -527,42 +527,7 @@ declare module 'babylonjs-viewer/managers/telemetryManager' {
 }
 
 declare module 'babylonjs-viewer/loader/modelLoader' {
-    import { ConfigurationContainer } from 'babylonjs-viewer/configuration/configurationContainer';
-    import { IModelConfiguration } from 'babylonjs-viewer/configuration/interfaces/modelConfiguration';
-    import { ObservablesManager } from 'babylonjs-viewer/managers/observablesManager';
-    import { ViewerModel } from 'babylonjs-viewer/model/viewerModel';
-    import { ILoaderPlugin } from 'babylonjs-viewer/loader/plugins';
-    /**
-        * An instance of the class is in charge of loading the model correctly.
-        * This class will continously be expended with tasks required from the specific loaders Babylon has.
-        *
-        * A Model loader is unique per (Abstract)Viewer. It is being generated by the viewer
-        */
-    export class ModelLoader {
-            readonly baseUrl: string;
-            /**
-                * Create a new Model loader
-                * @param _viewer the viewer using this model loader
-                */
-            constructor(_observablesManager: ObservablesManager, _configurationContainer?: ConfigurationContainer | undefined);
-            /**
-                * Adds a new plugin to the loader process.
-                *
-                * @param plugin the plugin name or the plugin itself
-                */
-            addPlugin(plugin: ILoaderPlugin | string): void;
-            /**
-                * Load a model using predefined configuration
-                * @param modelConfiguration the modelConfiguration to use to load the model
-                */
-            load(modelConfiguration: IModelConfiguration): ViewerModel;
-            cancelLoad(model: ViewerModel): void;
-            /**
-                * dispose the model loader.
-                * If loaders are registered and are in the middle of loading, they will be disposed and the request(s) will be cancelled.
-                */
-            dispose(): void;
-    }
+    
 }
 
 declare module 'babylonjs-viewer/model/viewerModel' {
@@ -1642,26 +1607,6 @@ declare module 'babylonjs-viewer/configuration/interfaces/modelConfiguration' {
     }
 }
 
-declare module 'babylonjs-viewer/loader/plugins' {
-    import { TelemetryLoaderPlugin } from "babylonjs-viewer/loader/plugins/telemetryLoaderPlugin";
-    import { ILoaderPlugin } from "babylonjs-viewer/loader/plugins/loaderPlugin";
-    import { MSFTLodLoaderPlugin } from 'babylonjs-viewer/loader/plugins/msftLodLoaderPlugin';
-    import { ApplyMaterialConfigPlugin } from 'babylonjs-viewer/loader/plugins/applyMaterialConfig';
-    import { ExtendedMaterialLoaderPlugin } from 'babylonjs-viewer/loader/plugins/extendedMaterialLoaderPlugin';
-    export { TelemetryLoaderPlugin, ILoaderPlugin, MSFTLodLoaderPlugin, ApplyMaterialConfigPlugin, ExtendedMaterialLoaderPlugin };
-    /**
-        * Get a loader plugin according to its name.
-        * The plugin will be cached and will be reused if called for again.
-        *
-        * @param name the name of the plugin
-        */
-    export function getLoaderPluginByName(name: string): ILoaderPlugin;
-    /**
-        *
-        */
-    export function addLoaderPlugin(name: string, plugin: ILoaderPlugin): void;
-}
-
 declare module 'babylonjs-viewer/configuration/interfaces' {
     export * from 'babylonjs-viewer/configuration/interfaces/cameraConfiguration';
     export * from 'babylonjs-viewer/configuration/interfaces/colorGradingConfiguration';
@@ -1820,57 +1765,6 @@ declare module 'babylonjs-viewer/configuration/interfaces/modelAnimationConfigur
     }
 }
 
-declare module 'babylonjs-viewer/loader/plugins/telemetryLoaderPlugin' {
-    import { ILoaderPlugin } from "babylonjs-viewer/loader/plugins/loaderPlugin";
-    import { ViewerModel } from "babylonjs-viewer/model/viewerModel";
-    import { ISceneLoaderPlugin, ISceneLoaderPluginAsync } from "babylonjs";
-    export class TelemetryLoaderPlugin implements ILoaderPlugin {
-        onInit(loader: ISceneLoaderPlugin | ISceneLoaderPluginAsync, model: ViewerModel): void;
-        onLoaded(model: ViewerModel): void;
-        onError(message: string, exception: any): void;
-        onComplete(): void;
-    }
-}
-
-declare module 'babylonjs-viewer/loader/plugins/msftLodLoaderPlugin' {
-    import { ISceneLoaderPlugin, ISceneLoaderPluginAsync } from 'babylonjs';
-    import { IGLTFLoaderExtension } from 'babylonjs-loaders';
-    import { ViewerModel } from 'babylonjs-viewer/model/viewerModel';
-    import { ILoaderPlugin } from 'babylonjs-viewer/loader/plugins/loaderPlugin';
-    /**
-      * A loder plugin to use MSFT_lod extension correctly (glTF)
-      */
-    export class MSFTLodLoaderPlugin implements ILoaderPlugin {
-        onInit(loader: ISceneLoaderPlugin | ISceneLoaderPluginAsync, model: ViewerModel): void;
-        onExtensionLoaded(extension: IGLTFLoaderExtension): void;
-    }
-}
-
-declare module 'babylonjs-viewer/loader/plugins/applyMaterialConfig' {
-    import { ISceneLoaderPlugin, ISceneLoaderPluginAsync, Material } from 'babylonjs';
-    import { ViewerModel } from 'babylonjs-viewer/model/viewerModel';
-    import { ILoaderPlugin } from 'babylonjs-viewer/loader/plugins/loaderPlugin';
-    /**
-      * Force-apply material configuration right after a material was loaded.
-      */
-    export class ApplyMaterialConfigPlugin implements ILoaderPlugin {
-        onInit(loader: ISceneLoaderPlugin | ISceneLoaderPluginAsync, model: ViewerModel): void;
-        onMaterialLoaded(material: Material): void;
-    }
-}
-
-declare module 'babylonjs-viewer/loader/plugins/extendedMaterialLoaderPlugin' {
-    import { Material } from 'babylonjs';
-    import { ILoaderPlugin } from 'babylonjs-viewer/loader/plugins/loaderPlugin';
-    /**
-      * A (PBR) material will be extended using this function.
-      * This function will hold extra default configuration for the viewer, if not implemented in Babylon itself.
-      */
-    export class ExtendedMaterialLoaderPlugin implements ILoaderPlugin {
-        onMaterialLoaded(baseMaterial: Material): void;
-    }
-}
-
 declare module 'babylonjs-viewer/configuration/interfaces/cameraConfiguration' {
     export interface ICameraConfiguration {
         position?: {

+ 3 - 3
src/Gizmos/babylon.positionGizmo.ts

@@ -39,11 +39,11 @@ module BABYLON {
             this.zGizmo = new AxisDragGizmo(new Vector3(0, 0, 1), BABYLON.Color3.Blue().scale(0.5), gizmoLayer);
 
             // Relay drag events
-            [this.xGizmo, this.yGizmo, this.zGizmo].forEach((gizmo)=>{
-                gizmo.dragBehavior.onDragStartObservable.add(()=>{
+            [this.xGizmo, this.yGizmo, this.zGizmo].forEach((gizmo) => {
+                gizmo.dragBehavior.onDragStartObservable.add(() => {
                     this.onDragStartObservable.notifyObservers({});
                 });
-                gizmo.dragBehavior.onDragEndObservable.add(()=>{
+                gizmo.dragBehavior.onDragEndObservable.add(() => {
                     this.onDragEndObservable.notifyObservers({});
                 });
             });

+ 3 - 3
src/Gizmos/babylon.rotationGizmo.ts

@@ -40,11 +40,11 @@ module BABYLON {
             this.zGizmo = new PlaneRotationGizmo(new Vector3(0, 0, 1), BABYLON.Color3.Blue().scale(0.5), gizmoLayer, tessellation);
 
             // Relay drag events
-            [this.xGizmo, this.yGizmo, this.zGizmo].forEach((gizmo)=>{
-                gizmo.dragBehavior.onDragStartObservable.add(()=>{
+            [this.xGizmo, this.yGizmo, this.zGizmo].forEach((gizmo) => {
+                gizmo.dragBehavior.onDragStartObservable.add(() => {
                     this.onDragStartObservable.notifyObservers({});
                 });
-                gizmo.dragBehavior.onDragEndObservable.add(()=>{
+                gizmo.dragBehavior.onDragEndObservable.add(() => {
                     this.onDragEndObservable.notifyObservers({});
                 });
             });

+ 3 - 3
src/Gizmos/babylon.scaleGizmo.ts

@@ -57,11 +57,11 @@ module BABYLON {
             this.uniformScaleGizmo.setCustomMesh(uniformScalingMesh, true);
 
             // Relay drag events
-            [this.xGizmo, this.yGizmo, this.zGizmo, this.uniformScaleGizmo].forEach((gizmo)=>{
-                gizmo.dragBehavior.onDragStartObservable.add(()=>{
+            [this.xGizmo, this.yGizmo, this.zGizmo, this.uniformScaleGizmo].forEach((gizmo) => {
+                gizmo.dragBehavior.onDragStartObservable.add(() => {
                     this.onDragStartObservable.notifyObservers({});
                 });
-                gizmo.dragBehavior.onDragEndObservable.add(()=>{
+                gizmo.dragBehavior.onDragEndObservable.add(() => {
                     this.onDragEndObservable.notifyObservers({});
                 });
             });

+ 3 - 1
src/babylon.mixins.ts

@@ -91,6 +91,7 @@ interface Document {
     webkitCancelFullScreen(): void;
     requestPointerLock(): void;
     exitPointerLock(): void;
+    fullscreen: boolean;
     mozFullScreen: boolean;
     msIsFullScreen: boolean;
     readonly webkitIsFullScreen: boolean;
@@ -151,7 +152,8 @@ interface Element {
 }
 
 interface Screen {
-    mozOrientation: string;
+    readonly orientation: string;
+    readonly mozOrientation: string;
 }
 
 interface Math {