@@ -33,9 +33,9 @@ renderer.shadowMap.type = THREE.PCFSoftShadowMap;
3333// Scene + Background
3434const scene = new THREE . Scene ( ) ;
3535
36- const backgroundMap = await new THREE . TextureLoader ( ) . loadAsync ( '/hdri/rich_multi_nebulae_2k.png' ) ;
37- backgroundMap . colorSpace = THREE . SRGBColorSpace ;
38- scene . background = ( await buildPrefilteredRadianceMap ( backgroundMap , renderer ) ) . texture ;
36+ // const backgroundMap = await new THREE.TextureLoader().loadAsync('/hdri/rich_multi_nebulae_2k.png');
37+ // backgroundMap.colorSpace = THREE.SRGBColorSpace;
38+ // scene.background = (await buildPrefilteredRadianceMap(backgroundMap, renderer)).texture;
3939
4040// Camera + controls
4141const camera = new THREE . PerspectiveCamera (
@@ -56,8 +56,8 @@ controls.mouseButtons = {
5656} ;
5757
5858// Lights
59- const radianceMap = await new HDRLoader ( ) . loadAsync ( '/hdri/kloppenheim_02_puresky_1k.hdr' ) ;
60- scene . environment = ( await buildPrefilteredRadianceMap ( radianceMap , renderer ) ) . texture ;
59+ // const radianceMap = await new HDRLoader().loadAsync('/hdri/kloppenheim_02_puresky_1k.hdr');
60+ // scene.environment = (await buildPrefilteredRadianceMap(radianceMap, renderer)).texture;
6161
6262const dirLight = new THREE . DirectionalLight ( 0xffffff , 0.8 ) ;
6363dirLight . position . set ( - 5 , 10 , - 5 ) ;
@@ -228,6 +228,8 @@ async function init() {
228228 stats . dom . style . zIndex = '9999' ;
229229 stats . dom . style . transformOrigin = 'top left' ;
230230 stats . dom . style . transform = isMobile ( ) ? 'scale(1.6)' : 'scale(1)' ;
231+ stats . dom . style . width = '200px'
232+ stats . dom . style . height = '200px'
231233 document . body . appendChild ( stats . dom ) ;
232234
233235 function Update ( ) {
@@ -260,6 +262,8 @@ async function init() {
260262
261263 window . addEventListener ( "resize" , ( ) => {
262264 stats . dom . style . transform = isMobile ( ) ? 'scale(1.6)' : 'scale(1)' ;
265+ stats . dom . style . width = '200px'
266+ stats . dom . style . height = '200px'
263267 camera . aspect = window . innerWidth / window . innerHeight ;
264268 camera . updateProjectionMatrix ( ) ;
265269 renderer . setSize ( window . innerWidth , window . innerHeight ) ;
0 commit comments