/** * `grass_field` studio: a GPU grass patch authored as a box volume — its XZ footprint is the grass * area, its top the ground height. Pure config here (blade/wind/color params + a footprint resolver); * the instanced vertex-wind grass mesh lives in the `shell` renderer, which drives the existing * `GrassField`. An engine environment kind (like water/scatter) so grass wind and colours are * slider-authorable in the editor and persisted in `editor.scene.json` — the #813 grass studio. * * @capability grass-field editor-authorable GPU grass patch */ import { type ParamSchema, type SceneKindObject } from "../scene/sceneKinds.js"; /** The editor volume kind marking a box as a GPU grass patch. */ export declare const GRASS_FIELD_KIND = "grass_field"; /** Fully-defaulted grass params parsed from a volume's `meta`. */ export interface GrassRules { /** Blades per square meter (the shell caps by an instance budget). */ density: number; /** Blade height in meters. */ bladeHeight: number; /** Blade-width range in metres; endpoints are normalized on read. */ bladeWidthMin: number; bladeWidthMax: number; /** Bend range, 0..1. */ bladeBendMin: number; bladeBendMax: number; /** Spread of blades around each tuft root, in metres. */ tuftRadius: number; /** Normal lift toward the sky, 0..1; controls the card lighting response. */ normalLift: number; /** Base (root) color, hex. */ colorBase: string; /** Tip color, hex. */ colorTip: string; /** Per-blade color jitter, 0..1. */ colorVariation: number; /** Vertex-wind sway strength, 0..1. */ windStrength: number; /** Wind animation speed. */ windSpeed: number; /** Gust patch scale (spatial frequency of gusts). */ windGust: number; /** Blade material roughness, 0..1. */ roughness: number; /** * Ground-cover mat strength, 0..1: the patch paints a turf surface over its footprint instead of * leaving the ground beneath the blades bare. 0 keeps blades only. */ groundCover: number; /** Seed string; same seed reproduces the same blade layout. */ seed: string; } /** Grass defaults: a lush, lightly-swaying meadow. */ export declare const GRASS_DEFAULTS: GrassRules; /** The grass parameter schema — drives the inspector and `meta` parse via the studio seam. */ export declare const GRASS_SCHEMA: ParamSchema; /** Parse a volume's `meta` into fully-defaulted grass rules. @internal */ export declare function readGrassRules(meta: Record | undefined): GrassRules; /** A resolved grass patch: world-space area center at ground height, footprint size (XZ), and rules. */ export interface ResolvedGrass { center: readonly [number, number, number]; size: readonly [number, number]; rules: GrassRules; } /** Resolve a grass volume into an area footprint (from box half-extents / radius) at the box base. @internal */ export declare function resolveGrassObject(object: SceneKindObject): ResolvedGrass | null; /** Registers the `grass_field` scene kind (schema + resolver). Called by {@link registerBuiltinSceneKinds}. @internal */ export declare function registerGrassKind(): void;