Skip to content

Commit 15250fa

Browse files
committed
feat: Initialize React-Three-Fiber application with basic 3D scene and global styling.
1 parent 0b51b9e commit 15250fa

2 files changed

Lines changed: 2 additions & 56 deletions

File tree

src/App.tsx

Lines changed: 2 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Canvas } from '@react-three/fiber'
2-
import { Suspense, useState } from 'react'
3-
import { OrbitControls, Stats } from '@react-three/drei'
2+
import { Suspense } from 'react'
3+
import { OrbitControls } from '@react-three/drei'
44
import { Scene } from './components/canvas/Scene'
55
import { Room } from './components/canvas/Room'
66
import { Desk } from './components/canvas/Desk'
@@ -15,43 +15,11 @@ import { ErrorBoundary } from './components/ErrorBoundary'
1515
import './utils/preloadModels'
1616

1717
function App() {
18-
const [showStats, setShowStats] = useState(true)
19-
2018
return (
2119
<ErrorBoundary>
2220
<OverlayProvider>
2321
<MusicProvider>
2422
<Overlay />
25-
{showStats && (
26-
<button
27-
onClick={() => setShowStats(false)}
28-
style={{
29-
position: 'fixed',
30-
top: '15px',
31-
left: '125px',
32-
zIndex: 1000,
33-
background: 'rgba(255, 0, 0, 0.7)',
34-
color: 'white',
35-
border: 'none',
36-
borderRadius: '50%',
37-
width: '24px',
38-
height: '24px',
39-
cursor: 'pointer',
40-
display: 'flex',
41-
alignItems: 'center',
42-
justifyContent: 'center',
43-
fontSize: '14px',
44-
fontWeight: 'bold',
45-
boxShadow: '0 2px 5px rgba(0,0,0,0.5)',
46-
transition: 'all 0.2s ease'
47-
}}
48-
onMouseEnter={(e) => e.currentTarget.style.background = 'rgba(255, 0, 0, 1)'}
49-
onMouseLeave={(e) => e.currentTarget.style.background = 'rgba(255, 0, 0, 0.7)'}
50-
title="Close Stats"
51-
>
52-
53-
</button>
54-
)}
5523
<Canvas
5624
shadows={false} // Shadows disabled for better performance
5725
camera={{ position: [0, 2.5, 3.5], fov: 50 }}
@@ -81,8 +49,6 @@ function App() {
8149
dampingFactor={0.05}
8250
/>
8351
</Suspense>
84-
{/* FPS and Render Stats - Development Mode */}
85-
{showStats && <Stats showPanel={0} className="stats-panel" />}
8652
</Canvas>
8753
</MusicProvider>
8854
</OverlayProvider>

src/index.css

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -33,24 +33,4 @@ body,
3333

3434
::-webkit-scrollbar-thumb:hover {
3535
background: #16507e;
36-
}
37-
38-
/* Stats Panel Styling */
39-
.stats-panel {
40-
position: fixed !important;
41-
top: 10px !important;
42-
left: 10px !important;
43-
right: auto !important;
44-
opacity: 0.9 !important;
45-
border-radius: 8px !important;
46-
overflow: hidden !important;
47-
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
48-
border: 1px solid rgba(0, 255, 255, 0.2) !important;
49-
backdrop-filter: blur(10px) !important;
50-
transform: scale(1.5) !important;
51-
transform-origin: top left !important;
52-
}
53-
54-
.stats-panel canvas {
55-
border-radius: 8px !important;
5636
}

0 commit comments

Comments
 (0)