From 1337a6807771e894e80af419bfb58bbafbd372c6 Mon Sep 17 00:00:00 2001 From: Emmett Lalish Date: Wed, 23 Oct 2024 12:10:06 -0700 Subject: [PATCH 1/3] allow top and bottom view --- packages/model-viewer/src/features/controls.ts | 4 ++-- packages/model-viewer/src/three-components/SmoothControls.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/model-viewer/src/features/controls.ts b/packages/model-viewer/src/features/controls.ts index 59fd7a8591..33a43da884 100644 --- a/packages/model-viewer/src/features/controls.ts +++ b/packages/model-viewer/src/features/controls.ts @@ -170,7 +170,7 @@ const minCameraOrbitIntrinsics = (element: ModelViewerElementBase& return { basis: [ numberNode(-Infinity, 'rad'), - numberNode(Math.PI / 8, 'rad'), + numberNode(0, 'rad'), numberNode(radius, 'm') ], keywords: {auto: [null, null, null]} @@ -185,7 +185,7 @@ const maxCameraOrbitIntrinsics = (element: ModelViewerElementBase) => { return { basis: [ numberNode(Infinity, 'rad'), - numberNode(Math.PI - Math.PI / 8, 'rad'), + numberNode(Math.PI, 'rad'), numberNode(defaultRadius, 'm') ], keywords: {auto: [null, null, null]} diff --git a/packages/model-viewer/src/three-components/SmoothControls.ts b/packages/model-viewer/src/three-components/SmoothControls.ts index 5bb3b7baa2..ee0bd05cee 100644 --- a/packages/model-viewer/src/three-components/SmoothControls.ts +++ b/packages/model-viewer/src/three-components/SmoothControls.ts @@ -58,8 +58,8 @@ export interface SmoothControlsOptions { export const DEFAULT_OPTIONS = Object.freeze({ minimumRadius: 0, maximumRadius: Infinity, - minimumPolarAngle: Math.PI / 8, - maximumPolarAngle: Math.PI - Math.PI / 8, + minimumPolarAngle: 0, + maximumPolarAngle: Math.PI, minimumAzimuthalAngle: -Infinity, maximumAzimuthalAngle: Infinity, minimumFieldOfView: 10, From 0992e1c35e89511213826d09ef91f1f1b94005d0 Mon Sep 17 00:00:00 2001 From: Emmett Lalish Date: Wed, 23 Oct 2024 12:12:17 -0700 Subject: [PATCH 2/3] update docs --- packages/modelviewer.dev/data/docs.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/modelviewer.dev/data/docs.json b/packages/modelviewer.dev/data/docs.json index 501e3cfaee..0f3ce71ae6 100644 --- a/packages/modelviewer.dev/data/docs.json +++ b/packages/modelviewer.dev/data/docs.json @@ -618,7 +618,7 @@ "htmlName": "maxCameraOrbit", "description": "Set the maximum orbital values of the camera. Takes values in the same form as camera-orbit, but does not support env(). 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 camera-orbit radius \"auto\" value.", "default": { - "default": "Infinity 157.5deg auto", + "default": "Infinity 180deg auto", "options": "$theta $phi $radius" } }, @@ -627,7 +627,7 @@ "htmlName": "minCameraOrbit", "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.", "default": { - "default": "-Infinity 22.5deg auto", + "default": "-Infinity 0deg auto", "options": "$theta $phi $radius" } }, From 6270a6cf3e1e346abd1ad8f5cba03bdc45fcb358 Mon Sep 17 00:00:00 2001 From: Emmett Lalish Date: Wed, 23 Oct 2024 12:26:48 -0700 Subject: [PATCH 3/3] update fidelity camera angle --- packages/render-fidelity-tools/test/config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/render-fidelity-tools/test/config.json b/packages/render-fidelity-tools/test/config.json index 5b9a783142..07774100a9 100644 --- a/packages/render-fidelity-tools/test/config.json +++ b/packages/render-fidelity-tools/test/config.json @@ -795,7 +795,7 @@ "model": "../../../shared-assets/models/glTF-Sample-Assets/Models/RecursiveSkeletons/glTF-Binary/RecursiveSkeletons.glb", "orbit": { "radius": 120.0, - "phi": 5 + "phi": 22.5 }, "target": { "y": 95