|
@@ -1,17 +1,18 @@
|
|
|
-import { viewerManager } from './viewerManager';
|
|
|
-import { SceneManager } from '../managers/sceneManager';
|
|
|
-import { ConfigurationLoader } from '../configuration/loader';
|
|
|
-import { Effect, Observable, Engine, Scene, Database, SceneLoaderProgressEvent, ISceneLoaderPlugin, ISceneLoaderPluginAsync, Tools, RenderingManager, TargetCamera, WebVRFreeCamera, Vector3 } from 'babylonjs';
|
|
|
-import { ViewerConfiguration, IObserversConfiguration, IModelConfiguration } from '../configuration/';
|
|
|
-
|
|
|
-import { ViewerModel } from '../model/viewerModel';
|
|
|
-import { ModelLoader } from '../loader/modelLoader';
|
|
|
+import { Database, Effect, Engine, ISceneLoaderPlugin, ISceneLoaderPluginAsync, Observable, RenderingManager, Scene, SceneLoaderProgressEvent, TargetCamera, Tools, Vector3 } from 'babylonjs';
|
|
|
+import { IModelConfiguration, IObserversConfiguration, ViewerConfiguration } from '../configuration/';
|
|
|
+import { processConfigurationCompatibility } from '../configuration/configurationCompatibility';
|
|
|
+import { ConfigurationContainer } from '../configuration/configurationContainer';
|
|
|
import { viewerGlobals } from '../configuration/globals';
|
|
|
-import { telemetryManager } from '../managers/telemetryManager';
|
|
|
+import { ConfigurationLoader } from '../configuration/loader';
|
|
|
import { deepmerge } from '../helper/';
|
|
|
+import { ModelLoader } from '../loader/modelLoader';
|
|
|
import { ObservablesManager } from '../managers/observablesManager';
|
|
|
-import { ConfigurationContainer } from '../configuration/configurationContainer';
|
|
|
+import { SceneManager } from '../managers/sceneManager';
|
|
|
+import { telemetryManager } from '../managers/telemetryManager';
|
|
|
+import { ViewerModel } from '../model/viewerModel';
|
|
|
import { TemplateManager } from '../templating/templateManager';
|
|
|
+import { viewerManager } from './viewerManager';
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* The AbstractViewr is the center of Babylon's viewer.
|
|
@@ -325,7 +326,7 @@ export abstract class AbstractViewer {
|
|
|
} else {
|
|
|
if (this.sceneManager.vrHelper) {
|
|
|
this.sceneManager.vrHelper.exitVR();
|
|
|
-
|
|
|
+
|
|
|
// undo the scaling of the model
|
|
|
if (this.sceneManager.models.length) {
|
|
|
this.sceneManager.models[0].rootMesh.scaling.scaleInPlace(1 / this._vrScale);
|
|
@@ -460,6 +461,8 @@ export abstract class AbstractViewer {
|
|
|
console.log("Error parsing file " + newConfiguration, error);
|
|
|
});
|
|
|
} else {
|
|
|
+ //backcompat
|
|
|
+ processConfigurationCompatibility(newConfiguration);
|
|
|
// update this.configuration with the new data
|
|
|
this._configurationContainer.configuration = deepmerge(this.configuration || {}, newConfiguration);
|
|
|
|