Skip to content

Commit

Permalink
fix(viewer): restore original camera orbit setting
Browse files Browse the repository at this point in the history
Revert camera orbit to use originalOrbit variable instead of hardcoded values
  • Loading branch information
u-u-z committed Jan 31, 2025
1 parent 4c50082 commit d99a1a0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
11 changes: 7 additions & 4 deletions src/components/ViewerPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -212,14 +212,18 @@ export default function ViewerPanel({ className, style }: { className?: string,
position: 'absolute',
width: '100%',
height: '100%',
backgroundColor: '#888',
}}
camera-orbit={originalOrbit}
camera-orbit="0.785rad 1.1rad 200%"
interaction-prompt={interactionPrompt}
environment-image="./skybox-lights.jpg"
exposure="1.8"
shadow-intensity="0.5"
shadow-softness="0.5"
max-camera-orbit="auto 180deg 300%"
min-camera-orbit="auto 0deg 160%"
camera-target="0m 0m 0m"
field-of-view="90deg"
field-of-view="100deg"
camera-controls
ar
ref={modelViewerRef}
Expand All @@ -239,8 +243,7 @@ export default function ViewerPanel({ className, style }: { className?: string,
width: '100px',
}}
loading="eager"
camera-orbit={originalOrbit}
// interpolation-decay="0"
camera-orbit="0.785rad 1.1rad 200%"
environment-image="./skybox-lights.jpg"
max-camera-orbit="auto 180deg auto"
min-camera-orbit="auto 0deg auto"
Expand Down
4 changes: 2 additions & 2 deletions src/state/initial-state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ export function createInitialState(state: State | null, source?: {content?: stri
view: {
layout: {
mode: 'multi',
editor: true,
editor: false,
viewer: true,
customizer: false,
customizer: true,
} as any,

color: defaultModelColor,
Expand Down

0 comments on commit d99a1a0

Please sign in to comment.