component
Fence
Posts and rails with seeded weathering; encloses yards and paths. One footprint collider.
Add it
npx @runek/cli add fence
Pulls @react-three/rapier@^2.2.0, @runek/core@^0.13.0.
Use it
import { Fence } from './runek/Fence'
<Fence position={[0, 0, 0]} seed={1} />
Props
export interface FenceProps {
position?: Vec3
rotation?: Vec3
/** Total length along local X, in units. */
length?: number
height?: number
/** Spacing between posts, in units. */
postSpacing?: number
/** Number of horizontal rails. */
rails?: number
/** Defaults to the world palette's `wood` slot. */
color?: string
seed?: number
}
Registry manifest
registry manifest /r/components/fence.json Self-contained JSON: inlined source plus resolved dependencies, exactly whatrunek add fence fetches.
Browse the whole catalog in the gallery →.