fix(web): improve scene camera and bounds behavior
Update Bounds props to enable fitting and clipping, adjust OrbitControls minDistance, and set makeDefault to ensure proper interaction.
This commit is contained in:
@@ -27,7 +27,7 @@ export default function Scene({ children }: { children: ReactNode }) {
|
|||||||
<pointLight position={[0, 3, 0]} intensity={0.3} />
|
<pointLight position={[0, 3, 0]} intensity={0.3} />
|
||||||
|
|
||||||
<Suspense fallback={null}>
|
<Suspense fallback={null}>
|
||||||
<Bounds>{children}</Bounds>
|
<Bounds fit observe clip>{children}</Bounds>
|
||||||
</Suspense>
|
</Suspense>
|
||||||
|
|
||||||
<ContactShadows
|
<ContactShadows
|
||||||
@@ -40,10 +40,10 @@ export default function Scene({ children }: { children: ReactNode }) {
|
|||||||
/>
|
/>
|
||||||
<OrbitControls
|
<OrbitControls
|
||||||
enablePan={false}
|
enablePan={false}
|
||||||
minDistance={1}
|
minDistance={0.01}
|
||||||
maxDistance={8}
|
maxDistance={8}
|
||||||
autoRotate
|
autoRotate
|
||||||
autoRotateSpeed={1.2}
|
makeDefault
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<EffectComposer>
|
<EffectComposer>
|
||||||
|
|||||||
Reference in New Issue
Block a user