import type { Aabb } from "./geometry.js"; import type { GrassEnvironmentConfig } from "./features.js"; import type { SceneDocumentLike, SceneVolumeLike } from "./sceneShapes.js"; /** The editor volume kind that marks an area as vegetation fill. */ export declare const VEGETATION_VOLUME_KIND = "vegetation"; /** * How a vegetation volume fills its area, read from the volume's `meta`. * `density` is items per square meter — the one slider number: grass blades, * trees, bushes, rocks all scale with it. Every field has a default, so a * freshly placed `kind: "vegetation"` volume already grows grass. */ export interface VegetationSettings { /** `"grass"` for shell-rendered blades, otherwise an asset/catalog item id the game maps to a model. */ item: string; /** Items per square meter (grass blades: ~4; trees: ~0.02; bushes: ~0.08). */ density: number; /** Random uniform scale range applied per placement. */ minScale: number; maxScale: number; /** Minimum spacing between placements in meters; 0 allows clumping. */ minDistance: number; /** Extra seed folded into the volume id so re-rolls are one string away. */ seed: string; } /** Defaults a bare `kind: "vegetation"` volume grows with: grass at 4 blades/m². */ export declare const VEGETATION_DEFAULTS: VegetationSettings; /** True when an editor volume is a vegetation fill area. * @internal */ export declare function isVegetationVolume(volume: SceneVolumeLike): boolean; /** The volume's vegetation settings with defaults filled in; null for non-vegetation volumes. * @internal */ export declare function readVegetationSettings(volume: SceneVolumeLike): VegetationSettings | null; /** The ground-plane footprint of a volume: box half-extents or sphere/cylinder radius. * @internal */ export declare function vegetationFootprint(volume: SceneVolumeLike): Aabb; /** One placed vegetation instance — position on the ground plane plus per-instance variation. */ export interface VegetationPlacement { id: string; volumeId: string; item: string; x: number; z: number; scale: number; rotation: number; } /** * Deterministic placements for one vegetation volume: scatter its footprint at * `density` items/m² (respecting `minDistance`), clip round shapes to their * radius, and derive per-instance scale/rotation from the volume id + seed, so * the same saved scene always grows the same field. * @internal */ export declare function resolveVegetationVolume(volume: SceneVolumeLike): VegetationPlacement[]; /** * All model-item placements in a document (every vegetation volume except * `item: "grass"`, which the shell renders as blades — see * `grassPatchesFromVegetation`). A game maps each placement's `item` to a * mesh/entity via its render catalog and places it grounded. * @internal */ export declare function resolveVegetation(doc: SceneDocumentLike): VegetationPlacement[]; /** * Grass-blade patches for every `item: "grass"` vegetation volume, ready to * spread into `environment()`'s `grass` list — the volume's density number is * the blades-per-m² the shell renders, so the editor slider drives it directly. * @internal */ export declare function grassPatchesFromVegetation(doc: SceneDocumentLike): GrassEnvironmentConfig[];