11import { 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'
44import { Scene } from './components/canvas/Scene'
55import { Room } from './components/canvas/Room'
66import { Desk } from './components/canvas/Desk'
@@ -15,43 +15,11 @@ import { ErrorBoundary } from './components/ErrorBoundary'
1515import './utils/preloadModels'
1616
1717function 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 >
0 commit comments