Skip to content

Commit e7e1865

Browse files
authored
allow top and bottom view by default (#4916)
* allow top and bottom view * update docs * update fidelity camera angle
1 parent 9b6779a commit e7e1865

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

packages/model-viewer/src/features/controls.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ const minCameraOrbitIntrinsics = (element: ModelViewerElementBase&
170170
return {
171171
basis: [
172172
numberNode(-Infinity, 'rad'),
173-
numberNode(Math.PI / 8, 'rad'),
173+
numberNode(0, 'rad'),
174174
numberNode(radius, 'm')
175175
],
176176
keywords: {auto: [null, null, null]}
@@ -185,7 +185,7 @@ const maxCameraOrbitIntrinsics = (element: ModelViewerElementBase) => {
185185
return {
186186
basis: [
187187
numberNode(Infinity, 'rad'),
188-
numberNode(Math.PI - Math.PI / 8, 'rad'),
188+
numberNode(Math.PI, 'rad'),
189189
numberNode(defaultRadius, 'm')
190190
],
191191
keywords: {auto: [null, null, null]}

packages/model-viewer/src/three-components/SmoothControls.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ export interface SmoothControlsOptions {
5858
export const DEFAULT_OPTIONS = Object.freeze<SmoothControlsOptions>({
5959
minimumRadius: 0,
6060
maximumRadius: Infinity,
61-
minimumPolarAngle: Math.PI / 8,
62-
maximumPolarAngle: Math.PI - Math.PI / 8,
61+
minimumPolarAngle: 0,
62+
maximumPolarAngle: Math.PI,
6363
minimumAzimuthalAngle: -Infinity,
6464
maximumAzimuthalAngle: Infinity,
6565
minimumFieldOfView: 10,

packages/modelviewer.dev/data/docs.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,7 @@
618618
"htmlName": "maxCameraOrbit",
619619
"description": "Set the maximum orbital values of the camera. Takes values in the same form as camera-orbit, but does not support <span class='attribute'>env()</span>. Note \"Infinity\" is not an accepted keyword, but the default can still be obtained by passing \"auto\". The radius value for \"auto\" is the same as the <span class='attribute'>camera-orbit</span> radius \"auto\" value.",
620620
"default": {
621-
"default": "Infinity 157.5deg auto",
621+
"default": "Infinity 180deg auto",
622622
"options": "$theta $phi $radius"
623623
}
624624
},
@@ -627,7 +627,7 @@
627627
"htmlName": "minCameraOrbit",
628628
"description": "Set the minimum orbital values of the camera. Note \"Infinity\" is not an accepted keyword, but the default can still be obtained by passing \"auto\". The radius value for \"auto\" is a conservative value to ensure the camera never enters the model, so be careful when setting this to another value.",
629629
"default": {
630-
"default": "-Infinity 22.5deg auto",
630+
"default": "-Infinity 0deg auto",
631631
"options": "$theta $phi $radius"
632632
}
633633
},

packages/render-fidelity-tools/test/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -795,7 +795,7 @@
795795
"model": "../../../shared-assets/models/glTF-Sample-Assets/Models/RecursiveSkeletons/glTF-Binary/RecursiveSkeletons.glb",
796796
"orbit": {
797797
"radius": 120.0,
798-
"phi": 5
798+
"phi": 22.5
799799
},
800800
"target": {
801801
"y": 95

0 commit comments

Comments
 (0)