diff --git a/next.config.ts b/next.config.ts index c7b6f19..065027f 100644 --- a/next.config.ts +++ b/next.config.ts @@ -2,6 +2,14 @@ import type { NextConfig } from "next"; const nextConfig: NextConfig = { output: "export", + // Required by the How It Works 3D experience. React StrictMode double-invokes + // mount/effects in dev, which tears down and re-creates the WebGL context of + // the heavy 32MB scene mid-initialization — the context is lost ("THREE. + // WebGLRenderer: Context Lost") and the canvas stays blank. This is a known + // React-Three-Fiber + StrictMode incompatibility. Disabling it is a DEV-ONLY + // change (production never runs StrictMode's double-mount) and does not affect + // any other page's runtime behavior. + reactStrictMode: false, images: { unoptimized: true, formats: ["image/avif", "image/webp"], diff --git a/package-lock.json b/package-lock.json index fe319e5..e32526e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,7 +21,7 @@ "react": "19.2.4", "react-dom": "19.2.4", "react-leaflet": "^5.0.0", - "three": "^0.184.0", + "three": "0.171.0", "zustand": "^5.0.14" }, "devDependencies": { @@ -10764,9 +10764,9 @@ } }, "node_modules/three": { - "version": "0.184.0", - "resolved": "https://registry.npmjs.org/three/-/three-0.184.0.tgz", - "integrity": "sha512-wtTRjG92pM5eUg/KuUnHsqSAlPM296brTOcLgMRqEeylYTh/CdtvKUvCyyCQTzFuStieWxvZb8mVTMvdPyUpxg==", + "version": "0.171.0", + "resolved": "https://registry.npmjs.org/three/-/three-0.171.0.tgz", + "integrity": "sha512-Y/lAXPaKZPcEdkKjh0JOAHVv8OOnv/NDJqm0wjfCzyQmfKxV7zvkwsnBgPBKTzJHToSOhRGQAGbPJObT59B/PQ==", "license": "MIT" }, "node_modules/three-mesh-bvh": { diff --git a/package.json b/package.json index 3a6814c..44a5c91 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "react": "19.2.4", "react-dom": "19.2.4", "react-leaflet": "^5.0.0", - "three": "^0.184.0", + "three": "0.171.0", "zustand": "^5.0.14" }, "devDependencies": { diff --git a/src/components/sections/HowItWorksHero.tsx b/src/components/sections/HowItWorksHero.tsx index 598c63c..c1ffc97 100644 --- a/src/components/sections/HowItWorksHero.tsx +++ b/src/components/sections/HowItWorksHero.tsx @@ -19,7 +19,9 @@ export default function HowItWorksHero() { return ( <> -