From 450ee6dff68096d3d2dbf08c1a8cd0ef9b1c0ed9 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Wed, 28 May 2025 17:47:44 +0200 Subject: [PATCH] Toggle shadow casting for directional light based on mobile device --- node/server/public/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node/server/public/app.js b/node/server/public/app.js index 3d66367..b893acf 100644 --- a/node/server/public/app.js +++ b/node/server/public/app.js @@ -122,7 +122,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 = true; +sun.castShadow = !IS_MOBILE; sun.shadow.mapSize.width = 2048; sun.shadow.mapSize.height = 2048; sun.shadow.camera.near = 1;