import { useEffect } from "react"; import { RigidBody } from "@react-three/rapier"; import type { DungeonDefinition } from "../game/dungeonTypes"; import { DUNGEON_PHYSICAL_COLLISION_GROUPS, DUNGEON_WALL_COLLISION_GROUPS } from "./dungeonLineOfSight"; export function BossTestingRoom({ definition, onReady }: { readonly definition: DungeonDefinition; readonly onReady?: () => void }) { const { min, max } = definition.bounds; const x = (min[0] + max[0]) / 2; const z = (min[2] + max[2]) / 2; const y = definition.bosses[0].position[1]; const width = max[0] - min[0]; const depth = max[2] - min[2]; useEffect(() => { onReady?.(); }, [onReady]); return {([ [min[0] - 0.5, y + 4, z, 1, 8, depth + 2], [max[0] + 0.5, y + 4, z, 1, 8, depth + 2], [x, y + 4, min[2] - 0.5, width, 8, 1], [x, y + 4, max[2] + 0.5, width, 8, 1], ] as const).map(([px, py, pz, w, h, d], index) => )} ; }