component

Roof

Flat or gable roof.

⌖ Explore the library in 3D →

Add it

npx runek add roof

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

Use it

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

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

Props

export interface RoofProps {
  position?: Vec3
  rotation?: Vec3
  /** `[width, depth]` in units. The roof rests with its base at the component origin. */
  size?: [number, number]
  style?: RoofStyle
  /** Ridge height for a gable roof, in units. */
  peak?: number
  thickness?: number
  overhang?: number
  /** Defaults to the world palette's `roof` slot. */
  color?: string
}

See it live with editable props in the gallery →.