component
Floor
Flat floor slab with a fixed collider.
Add it
npx runek add floor
Pulls core, @react-three/rapier@^2.2.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
/** Defaults to the world palette's `floor` slot. */
color?: string
}
See it live with editable props in the gallery →.