diff --git a/frontend/src/components/landing/SceneCanvas.tsx b/frontend/src/components/landing/SceneCanvas.tsx index c1d7987..8b220c3 100644 --- a/frontend/src/components/landing/SceneCanvas.tsx +++ b/frontend/src/components/landing/SceneCanvas.tsx @@ -15,7 +15,7 @@ import { rainVertexShader, rainFragmentShader, skyVertexShader, skyFragmentShade // (mounted first) and read by every other piece of the scene. const weather = makeWeatherSample(); -const SUN_POS = new THREE.Vector3(0, 34, -205); +const SUN_POS = new THREE.Vector3(0, 13, -205); const SKY_RADIUS = 400; function WeatherClock() { @@ -49,6 +49,10 @@ function GradientSky() { m.uniforms.uSunColor.value.copy(weather.sunColor); m.uniforms.uSunReveal.value = weather.sunReveal; m.uniforms.uCameraPos.value.copy(state.camera.position); + // Aim the painted sky-sun along the real camera→sun direction so its halo + // stays locked onto the 3D sun mesh. Using a fixed direction made it drift + // into a second, lower disc as the camera flew forward (parallax). + m.uniforms.uSunDir.value.subVectors(SUN_POS, state.camera.position); if (meshRef.current) { meshRef.current.position.x = state.camera.position.x; meshRef.current.position.z = state.camera.position.z;