Skip to content

Commit 338fb26

Browse files
committed
style: IndexCanvas 컴포넌트의 코드 스타일 수정 및 Loader 컴포넌트의 레이아웃 조정
1 parent cb77325 commit 338fb26

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/components/IndexCanvas.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@ export default function IndexCanvas() {
1111

1212
return <div className={"absolute inset-0 z-50"}>
1313
<Canvas className={"animate-fadeIn"} resize={{debounce: 0}} eventPrefix={"client"} shadows dpr={[1, 2]} style={{width: '100%', height: '100%'}} camera={[0, 0, CAM_DISTANCE, {fov: 50}] as any}>
14-
<Suspense fallback={<Loader/>}>
15-
<ambientLight color={"#dadacf"} intensity={1.2}/>
16-
<Float rotationIntensity={1.5} floatIntensity={1.5} speed={3}>
14+
<Float rotationIntensity={1.5} floatIntensity={1.5} speed={3}>
15+
<Suspense fallback={<Loader/>}>
1716
<GameBoy position={[-1, -1, -.5]} rotation={[.2, 0, 0]} scale={.25}/>
1817
<Html occlude={"raycast"} transform castShadow receiveShadow scale={.25} position={[1, .3, 0]} rotation={[.2, 0, 0]}
1918
material={<meshStandardMaterial side={DoubleSide} opacity={.1}/>}>
2019
<Card/>
2120
</Html>
22-
</Float>
23-
<ContactShadows position={[0, -1.2, 0]} opacity={1} scale={10} blur={1} far={10} resolution={256} color="#000000"/>
24-
<Rig/>
25-
</Suspense>
21+
</Suspense>
22+
</Float>
23+
<ambientLight color={"#dadacf"} intensity={1.2}/>
24+
<ContactShadows position={[0, -1.2, 0]} opacity={1} scale={10} blur={.5} far={10} resolution={256} color="#000000"/>
25+
<Rig/>
2626
</Canvas>
2727
</div>
2828
}
@@ -97,9 +97,9 @@ const Tag = (
9797

9898
function Loader() {
9999
const {progress} = useProgress()
100-
return <Html center>
100+
return <Html occlude={"raycast"} transform center scale={0.25}>
101101
<div
102-
className="mx-auto w-[500px] h-[400px] bg-gray-950 rounded-xl overflow-hidden drop-shadow-xl"
102+
className="mx-auto w-[500px] h-[200px] bg-gray-950 rounded-xl overflow-hidden drop-shadow-xl"
103103
>
104104
<div className="bg-[#333] flex items-center p-[5px] text-whitec relative">
105105
<div className="flex absolute left-3">
@@ -109,7 +109,7 @@ function Loader() {
109109
</div>
110110
<div className="flex-1 text-center text-white">status</div>
111111
</div>
112-
<div className="p-2.5 text-bright text-xl">
112+
<div className="text-bright text-3xl font-bold flex flex-col items-center justify-center h-[150px]">
113113
<div>
114114
<span className="mr-2">{progress}% loaded</span>
115115
<span className="animate-[ping_1.5s_0.5s_ease-in-out_infinite]">.</span>

0 commit comments

Comments
 (0)