diff --git a/source/viewer/domviewer.js b/source/viewer/domviewer.js index 7befc71..ce62bdb 100644 --- a/source/viewer/domviewer.js +++ b/source/viewer/domviewer.js @@ -36,13 +36,13 @@ OV.Init3DViewerElement = function (parentDiv, modelUrls, parameters) let boundingSphere = viewer.GetBoundingSphere ((meshUserData) => { return true; }); - viewer.AdjustClippingPlanes (boundingSphere); + viewer.AdjustClippingPlanesToSphere (boundingSphere); if (parameters.camera) { viewer.SetCamera (parameters.camera); } else { viewer.SetUpVector (importResult.upVector, false); } - viewer.FitToWindow (boundingSphere, false); + viewer.FitSphereToWindow (boundingSphere, false); }, onTextureLoaded : () => { viewer.Render (); diff --git a/source/viewer/viewer.js b/source/viewer/viewer.js index d3cbb3d..c9ff57e 100644 --- a/source/viewer/viewer.js +++ b/source/viewer/viewer.js @@ -228,7 +228,7 @@ OV.Viewer = class this.Render (); } - FitToWindow (boundingSphere, animation) + FitSphereToWindow (boundingSphere, animation) { if (boundingSphere === null) { return; @@ -244,7 +244,7 @@ OV.Viewer = class } } - AdjustClippingPlanes (boundingSphere) + AdjustClippingPlanesToSphere (boundingSphere) { if (boundingSphere === null) { return; diff --git a/website/o3dv/embed.js b/website/o3dv/embed.js index 25d7a20..e69dfa3 100644 --- a/website/o3dv/embed.js +++ b/website/o3dv/embed.js @@ -53,14 +53,14 @@ OV.Embed = class let boundingSphere = this.viewer.GetBoundingSphere ((meshUserData) => { return true; }); - this.viewer.AdjustClippingPlanes (boundingSphere); + this.viewer.AdjustClippingPlanesToSphere (boundingSphere); let camera = this.hashHandler.GetCameraFromHash (); if (camera !== null) { this.viewer.SetCamera (camera); } else { this.viewer.SetUpVector (importResult.upVector, false); } - this.viewer.FitToWindow (boundingSphere, false); + this.viewer.FitSphereToWindow (boundingSphere, false); } InitViewer (canvas) diff --git a/website/o3dv/website.js b/website/o3dv/website.js index edb0fb3..19749f5 100644 --- a/website/o3dv/website.js +++ b/website/o3dv/website.js @@ -210,9 +210,9 @@ OV.Website = class return this.navigator.IsMeshVisible (meshUserData.originalMeshIndex); }); if (onLoad) { - this.viewer.AdjustClippingPlanes (boundingSphere); + this.viewer.AdjustClippingPlanesToSphere (boundingSphere); } - this.viewer.FitToWindow (boundingSphere, animation); + this.viewer.FitSphereToWindow (boundingSphere, animation); } FitMeshToWindow (meshIndex) @@ -220,7 +220,7 @@ OV.Website = class let boundingSphere = this.viewer.GetBoundingSphere ((meshUserData) => { return meshUserData.originalMeshIndex === meshIndex; }); - this.viewer.FitToWindow (boundingSphere, true); + this.viewer.FitSphereToWindow (boundingSphere, true); } UpdateMeshesVisibility ()