import { type ForceFieldConfig } from "../physics/forceVolume.js"; import type { AuthoredWeatherConfig } from "../world/authoredWeather.js"; import { type EmitterConfig } from "../vfx/particles.js"; import { type ParticleAttachOptions } from "../vfx/particleDirector.js"; import type { FireGridConfig } from "../world/weather.js"; import type { FlockConfig } from "../ai/flock.js"; import type { EditorDocument, EditorVec3 } from "./types.js"; /** A named emitter authored in metres: either a library effect name or a full config. */ export interface AuthoredEmitter { id: string; /** Spawn only while this authored fire area burns; live particles finish their lifetime. */ fireAreaId?: string; position: EditorVec3; /** Named effect from the shared library (`fire/flame`, `explosion/core`, …). */ effect?: string; /** Full emitter config; used when `effect` is absent. */ config?: EmitterConfig; options?: ParticleAttachOptions; } /** A bounded fire grid; fuel and damage policy remain game content. */ export interface AuthoredFireArea { id: string; /** Rain cooling in heat units/second at full exposure; zero disables automatic extinguishing. */ extinguishRate?: number; position: EditorVec3; config: Omit; fuel?: readonly number[]; ignitions?: readonly { col: number; row: number; }[]; } /** An authored habitat selects a game species and optionally follows a document path. */ export interface AuthoredFlockHabitat { id: string; species: string; position: EditorVec3; radius: number; count: number; seed: string | number; role: "cosmetic" | "gameplay"; routeId?: string; steering: FlockConfig; /** Opt into authored wind/force acceleration; maxAcceleration is the game policy cap. */ /** Coupling in 1/second, bounded to 0..1e12. */ windResponse?: number; /** Maximum acceleration in metres/second², bounded to 0..1e12. */ maxAcceleration?: number; forceMask?: number; } /** Authored simulation inputs. Runtime particles, heat, accumulation and actors save separately. */ export interface EditorSimulation { weather?: AuthoredWeatherConfig; /** Authoritative acceleration volumes; games select target masks and caps. */ forces?: readonly ForceFieldConfig[]; emitters?: readonly AuthoredEmitter[]; fires?: readonly AuthoredFireArea[]; habitats?: readonly AuthoredFlockHabitat[]; } /** Decode authoring inputs with located diagnostics and bounded work before any document mutation. * @capability validate-simulation diagnose authored weather, effect, fire, force and habitat documents before publication */ export declare function decodeEditorSimulation(value: unknown, document?: Pick): EditorSimulation;