Skip to content

Commit f5bacf2

Browse files
committed
fix: dark computer
1 parent ec40a68 commit f5bacf2

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/components/canvas/Computers.jsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ const Computers = ({ isMobile }) => {
99

1010
return (
1111
<mesh>
12-
<hemisphereLight intensity={0.15} groundColor='black' />
12+
{/* Make the model visible on darker mobile displays by increasing ambient lighting */}
13+
<hemisphereLight intensity={isMobile ? 0.35 : 0.15} groundColor='black' />
14+
<ambientLight intensity={isMobile ? 0.6 : 0.3} />
1315
<spotLight
1416
position={[-20, 50, 10]}
1517
angle={0.12}
@@ -18,7 +20,7 @@ const Computers = ({ isMobile }) => {
1820
castShadow
1921
shadow-mapSize={1024}
2022
/>
21-
<pointLight intensity={1} />
23+
<pointLight intensity={isMobile ? 1.25 : 1} />
2224
<primitive
2325
object={computer.scene}
2426
// Reduce scale on mobile so the model fits the viewport
@@ -77,6 +79,9 @@ const ComputersCanvas = () => {
7779
<Suspense fallback={<CanvasLoader />}>
7880
<OrbitControls
7981
enableZoom={false}
82+
enablePan={false}
83+
autoRotate={true}
84+
autoRotateSpeed={1.0}
8085
maxPolarAngle={Math.PI / 2}
8186
minPolarAngle={Math.PI / 2}
8287
/>

0 commit comments

Comments
 (0)