Skip to content

Commit 19f7d98

Browse files
committed
style: MonitorBG 컴포넌트의 코드 스타일 수정 및 index.astro 파일의 div 속성 정리
1 parent 231a247 commit 19f7d98

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/components/MonitorBG.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ import {Suspense, useState} from "react";
88
const CAM_DISTANCE = 5;
99

1010
export default function MonitorBG() {
11-
return <div style={{position: "absolute", inset: 0}}>
12-
<Canvas className={"animate-fadeIn"} eventPrefix="client" shadows dpr={[1, 2]} style={{width: '100%', height: '100%'}} camera={[0, 0, CAM_DISTANCE, {fov: 50}] as any}>
11+
12+
return <div className={"absolute inset-0"}>
13+
<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}>
1314
<Suspense fallback={<Loader/>}>
1415
<ambientLight color={"#dadacf"} intensity={1.2}/>
1516
<Float rotationIntensity={1.5} floatIntensity={1.5} speed={3}>
@@ -95,7 +96,7 @@ const Tag = (
9596
}
9697

9798
function Loader() {
98-
const { progress } = useProgress()
99+
const {progress} = useProgress()
99100
return <Html center>
100101
<div
101102
className="mx-auto w-[500px] h-[400px] bg-gray-950 rounded-xl overflow-hidden drop-shadow-xl"

src/pages/index.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import Layout from '../layouts/Layout.astro';
77
---
88

99
<Layout>
10-
<div class="w-full h-full relative">
10+
<div class="w-full h-full">
1111
<MonitorBG client:load>
1212
<Fragment slot="fallback">
1313
<div class="w-full h-full text-bright text-3xl flex flex-col gap-2 justify-center items-center">

0 commit comments

Comments
 (0)