component
Room
Four walls + floor with a doorway and fixed colliders; optional roof.
Add it
npx runek add room
Pulls core, @react-three/rapier@^2.2.0.
Use it
import { Room } from './runek/Room'
<Room position={[0, 0, 0]} />
Props
export interface RoomProps {
position?: Vec3
/** Interior footprint `[width, depth]`, in units. */
size?: [number, number]
height?: number
thickness?: number
/** Opening width in the front (+z) wall; set to 0 for a sealed room. */
doorWidth?: number
roof?: boolean
/** Defaults to the world palette's `wall` slot. */
color?: string
}
See it live with editable props in the gallery →.