component
Rocks
Faceted rocks with convex-hull colliders (seeded scatter).
Add it
npx runek add rocks
Pulls core, @react-three/rapier@^2.2.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
}
See it live with editable props in the gallery →.