69c720b86b
🔍 Lint / 🪄 Check lint (pull_request) Has been cancelled
🔍 Lint / 🎨 Check format (pull_request) Has been cancelled
🔍 Lint / 🔎 Typecheck (pull_request) Has been cancelled
📊 Quality / 🔒 Security Audit (pull_request) Has been cancelled
📊 Quality / 📋 Dependency Freshness (pull_request) Has been cancelled
📊 Quality / 📦 Bundle Size (pull_request) Has been cancelled
🔍 Lint / 🏗 Build (pull_request) Has been cancelled
- Lighting: replace single-frame needsUpdate with a 3-rAF warmup that forces
scene.updateMatrixWorld + sun.shadow.needsUpdate + gl.shadowMap.needsUpdate.
This restores the SceneShadowWarmup behaviour (deleted in 777e51e) inline,
so shadows survive Physics Suspense remounts and webglcontextrestored.
- octreeCollisionConfig: remove (comment out) the thin LA_FABRIK interior box
at x=-6.93 that was sealing the doorway despite the mesh hole; fabrik mesh
octree already provides surrounding wall collision.
- DebugOctreeVisualization: add Fabrik-only filter to inspect interior
collisions/non-collisions in isolation.
62 lines
1.6 KiB
TypeScript
62 lines
1.6 KiB
TypeScript
import type { Vector3Tuple } from "@/types/three/three";
|
|
|
|
export interface OctreeCollisionBox {
|
|
center: Vector3Tuple;
|
|
size: Vector3Tuple;
|
|
}
|
|
|
|
export interface MapOctreeCollisionBox extends OctreeCollisionBox {
|
|
bottomY: number;
|
|
}
|
|
|
|
export const MAP_OCTREE_COLLISION_BOXES = {
|
|
immeuble1: {
|
|
center: [-0.0308, 5.8389, 0],
|
|
size: [17.2522, 11.6098, 9.2668],
|
|
bottomY: 0.034,
|
|
},
|
|
maison1: {
|
|
center: [0, 1.3638, 0.0536],
|
|
size: [2.7813, 3.022, 2.8609],
|
|
bottomY: -0.1472,
|
|
},
|
|
} as const satisfies Record<string, MapOctreeCollisionBox>;
|
|
|
|
export const LA_FABRIK_INTERIOR_COLLISION_BOXES = [
|
|
// NOTE: removed — this thin wall (size [0.2, 1.94, 3.71]) sat at x≈-6.93 and
|
|
// sealed the doorway despite the geometry having a hole there. The fabrik
|
|
// mesh octree already provides the surrounding wall collision, so this
|
|
// proxy was both redundant and bug-causing.
|
|
// {
|
|
// center: [-6.9351, 2.278, -0.0001],
|
|
// size: [0.2, 1.94, 3.711],
|
|
// },
|
|
{
|
|
center: [0.8026, 0.719, -3.639],
|
|
size: [4.346, 1.108, 1.181],
|
|
},
|
|
{
|
|
center: [-5.8519, 0.9362, 2.5742],
|
|
size: [1.67, 1.551, 2.566],
|
|
},
|
|
{
|
|
center: [-2.0627, 1.4875, -1.2243],
|
|
size: [0.691, 0.723, 0.687],
|
|
},
|
|
{
|
|
center: [-3.5502, 1.4378, -1.2485],
|
|
size: [1.055, 0.657, 0.563],
|
|
},
|
|
] as const satisfies readonly OctreeCollisionBox[];
|
|
|
|
export const CHARACTER_OCTREE_COLLISION_BOX = {
|
|
center: [0, 0.875, 0],
|
|
size: [0.62, 1.75, 0.62],
|
|
} as const satisfies OctreeCollisionBox;
|
|
|
|
export function hasMapOctreeCollisionBox(
|
|
name: string,
|
|
): name is keyof typeof MAP_OCTREE_COLLISION_BOXES {
|
|
return name in MAP_OCTREE_COLLISION_BOXES;
|
|
}
|