Enable shadow casting for the sun light in app.js

This commit is contained in:
2025-05-28 18:43:34 +02:00
parent 44db5e85ab
commit 59815a2ac9

View File

@@ -120,7 +120,7 @@ texLoader.load('assets/images/hdri/environment.jpg', tex => {
// ---- Licht, Shadow-Only-Material, Loader ----
const sun = new THREE.DirectionalLight(0xFFA230, 2);
sun.position.set(21, -25, 30);
sun.castShadow = !IS_MOBILE;
sun.castShadow = true;
sun.shadow.mapSize.width = 2048;
sun.shadow.mapSize.height = 2048;
sun.shadow.camera.near = 1;