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} />
|
||||
|
||||
<Suspense fallback={null}>
|
||||
<Bounds>{children}</Bounds>
|
||||
<Bounds fit observe clip>{children}</Bounds>
|
||||
</Suspense>
|
||||
|
||||
<ContactShadows
|
||||
@@ -40,10 +40,10 @@ export default function Scene({ children }: { children: ReactNode }) {
|
||||
/>
|
||||
<OrbitControls
|
||||
enablePan={false}
|
||||
minDistance={1}
|
||||
minDistance={0.01}
|
||||
maxDistance={8}
|
||||
autoRotate
|
||||
autoRotateSpeed={1.2}
|
||||
makeDefault
|
||||
/>
|
||||
|
||||
<EffectComposer>
|
||||
@@ -53,4 +53,4 @@ export default function Scene({ children }: { children: ReactNode }) {
|
||||
</Canvas>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user