component
Trees
L-system trees grown by a 3D turtle, deterministic from seed.
Add it
npx @runek/cli add trees
Pulls @react-three/rapier@^2.2.0, @runek/core@^0.13.0, three@^0.184.0.
Use it
import { Trees } from './runek/Trees'
<Trees position={[0, 0, 0]} seed={1} />
Props
export interface TreesProps {
position?: Vec3
rotation?: Vec3
seed?: number
iterations?: number
/** Base branch length, in units. */
segmentLength?: number
/** Branching angle, in radians. */
angle?: number
/** Defaults to the world palette's `bark` slot. */
trunkColor?: string
/** Defaults to the world palette's `foliage` slot. */
leafColor?: string
}
Registry manifest
registry manifest /r/components/trees.json Self-contained JSON: inlined source plus resolved dependencies, exactly whatrunek add trees fetches.
Browse the whole catalog in the gallery →.