component

Floor

Flat floor slab with a fixed collider; optional stairwell opening.

⌖ Explore the library in 3D →

Add it

npx @runek/cli add floor

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

Use it

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

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

Props

export interface FloorProps {
  position?: Vec3
  rotation?: Vec3
  /** `[width, depth]` in units. The top surface sits at the component origin. */
  size?: [number, number]
  thickness?: number
  /** A hole in the slab (stairwell); the slab splits into strips around it. */
  opening?: FloorOpening
  /** Defaults to the world palette's `floor` slot. */
  color?: string
}

Registry manifest

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

Browse the whole catalog in the gallery →.