fix(world): throttle shadows and tune high preset

This commit is contained in:
Tom Boullay
2026-06-01 10:45:07 +02:00
parent bafca5a936
commit 6d58b90856
7 changed files with 112 additions and 26 deletions
+4 -2
View File
@@ -130,7 +130,8 @@ export function HomePage(): React.JSX.Element | null {
gl.shadowMap.enabled = true;
gl.shadowMap.type = THREE.PCFShadowMap;
gl.shadowMap.autoUpdate = true;
gl.shadowMap.autoUpdate = false;
gl.shadowMap.needsUpdate = true;
// The browser hands us a WEBGL_lose_context extension we can use to
// ask the GPU to restore the context after a loss. Without this the
@@ -147,7 +148,8 @@ export function HomePage(): React.JSX.Element | null {
const handleContextRestored = () => {
gl.shadowMap.enabled = true;
gl.shadowMap.type = THREE.PCFShadowMap;
gl.shadowMap.autoUpdate = true;
gl.shadowMap.autoUpdate = false;
gl.shadowMap.needsUpdate = true;
logger.info("WebGL", "Context restored");
};