Add sphere to function names where a sphere is expected.
This commit is contained in:
parent
669c06ffdd
commit
9901ba1f4c
@ -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 ();
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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 ()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user