component

Wall

Wall segment with door/window openings and a fixed collider.

⌖ Explore the library in 3D →

Add it

npx @runek/cli add wall

Pulls @react-three/rapier@^2.2.0, @runek/core@^0.13.0.

Use it

import { Wall } from './runek/Wall'

<Wall position={[0, 0, 0]} />

Props

export interface WallProps {
  position?: Vec3
  rotation?: Vec3
  /** Length along the wall's local X axis, in units. */
  width?: number
  height?: number
  thickness?: number
  /** Defaults to the world palette's `wall` slot. */
  color?: string
  /** Holes cut into the wall (doors, windows). Must not overlap horizontally. */
  openings?: WallOpening[]
}

Migrate

v0.11.0 → v0.12.0. The single opening prop became openings, an array, so one wall can carry a door and windows together. The WallOpening shape itself is unchanged (offset, width, height, sill).

v0.11.0
<Wall
  width={9}
  opening={{ width: 1, height: 2.1 }}
/>
v0.12.0
<Wall
  width={9}
  openings={[
    { width: 1, height: 2.1 },
    { offset: 3, width: 1.3, height: 1.2, sill: 1 },
  ]}
/>

Registry manifest

registry manifest /r/components/wall.json Self-contained JSON: inlined source plus resolved dependencies, exactly what runek add wall fetches.

Browse the whole catalog in the gallery →.