fix(world): restore shadow auto-update

Reverts the manual shadow refresh throttle introduced in 6d58b90 which
prevented shadows from rendering. Renderer and sun shadow now use
autoUpdate=true and a per-frame needsUpdate=true pulse, matching the
behaviour that produced visible shadows before that commit.
This commit is contained in:
Tom Boullay
2026-06-01 11:28:07 +02:00
parent bdc704fe8e
commit de77f76d48
3 changed files with 8 additions and 67 deletions
+2 -2
View File
@@ -130,7 +130,7 @@ export function HomePage(): React.JSX.Element | null {
gl.shadowMap.enabled = true;
gl.shadowMap.type = THREE.PCFShadowMap;
gl.shadowMap.autoUpdate = false;
gl.shadowMap.autoUpdate = true;
gl.shadowMap.needsUpdate = true;
// The browser hands us a WEBGL_lose_context extension we can use to
@@ -148,7 +148,7 @@ export function HomePage(): React.JSX.Element | null {
const handleContextRestored = () => {
gl.shadowMap.enabled = true;
gl.shadowMap.type = THREE.PCFShadowMap;
gl.shadowMap.autoUpdate = false;
gl.shadowMap.autoUpdate = true;
gl.shadowMap.needsUpdate = true;
logger.info("WebGL", "Context restored");
};