component

Rocks

Faceted rocks with convex-hull colliders (seeded scatter).

⌖ Explore the library in 3D →

Add it

npx @runek/cli add rocks

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

Use it

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

<Rocks position={[0, 0, 0]} seed={1} />

Props

export interface RocksProps {
  position?: Vec3
  rotation?: Vec3
  count?: number
  /** Cluster radius, in units. */
  spread?: number
  /** Mean rock radius, in units. */
  size?: number
  hue?: number
  seed?: number
}

Registry manifest

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

Browse the whole catalog in the gallery →.