component
Bridge
Plank deck spanning a gap, optionally arched, with railings and slab colliders that follow the deck.
Add it
npx @runek/cli add bridge
Pulls @react-three/rapier@^2.2.0, @runek/core@^0.13.0.
Use it
import { Bridge } from './runek/Bridge'
<Bridge position={[0, 0, 0]} seed={1} />
Props
export interface BridgeProps {
position?: Vec3
rotation?: Vec3
/** Span along local X, in units. */
length?: number
/** Walkway width along local Z, in units. */
width?: number
/** Arch rise at the center, in units (0 = flat). */
arch?: number
/** Side railings. */
rails?: boolean
/** Deck color; defaults to the world palette's `wood` slot. */
color?: string
seed?: number
}
Registry manifest
registry manifest /r/components/bridge.json Self-contained JSON: inlined source plus resolved dependencies, exactly whatrunek add bridge fetches.
Browse the whole catalog in the gallery →.