Skip to content

Commit e99c871

Browse files
committed
test
1 parent e493931 commit e99c871

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

src/main.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ renderer.shadowMap.type = THREE.PCFSoftShadowMap;
3333
// Scene + Background
3434
const 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
4141
const 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

6262
const dirLight = new THREE.DirectionalLight(0xffffff, 0.8);
6363
dirLight.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

Comments
 (0)