fix(world): centralize shadow config and remove warmup
- Extract SHADOW_CONFIG into lightingConfig.ts (bias=0, normalBias=0, cameraSize=95) matching the historically working values from develop. - Drop SceneShadowWarmup; rely on sun.shadow.autoUpdate=true for steady-state refresh. - Enable cloud castShadow and traverse Ebike meshes for cast/receive.
This commit is contained in:
@@ -131,6 +131,17 @@ export function Ebike({ position }: EbikeProps): React.JSX.Element {
|
||||
}
|
||||
}, [model]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!model) return;
|
||||
|
||||
model.traverse((child) => {
|
||||
if (child instanceof THREE.Mesh) {
|
||||
child.castShadow = true;
|
||||
child.receiveShadow = true;
|
||||
}
|
||||
});
|
||||
}, [model]);
|
||||
|
||||
useEffect(() => {
|
||||
window.ebikeVisualGroup = groupRef;
|
||||
window.ebikeParkedPosition = restingPositionRef.current;
|
||||
|
||||
Reference in New Issue
Block a user