component

Grass

Instanced grass blades (seeded scatter).

⌖ Explore the library in 3D →

Add it

npx runek add grass

Pulls core, @react-three/fiber@^9.6.1, three@^0.184.0.

Use it

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

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

Props

export interface GrassProps {
  position?: Vec3
  rotation?: Vec3
  /** Patch extent `[width, depth]`, in units. */
  area?: [number, number]
  count?: number
  height?: number
  /** Defaults to the world palette's `foliage` slot. */
  color?: string
  /** Wind sway strength; 0 disables the animation. */
  sway?: number
  seed?: number
}

See it live with editable props in the gallery →.