import { PropRef } from './values'; import { PointerSignal, PointerSpeedSignal } from './signal'; /** Damped `avg − prev` wave propagation. Needs `history: 2` (reads t−1 AND t−2). */ export interface WaveOp { readonly kind: 'op.wave'; readonly damping: PropRef; } /** Gaussian brush injection at a positioned signal, scaled by an amount signal. */ export interface SplatOp { readonly kind: 'op.splat'; readonly at: PointerSignal; readonly amount: PointerSpeedSignal; readonly radius: PropRef; } /** Central-difference gradient of the field → an RG vector-field texture (a derive op). */ export interface GradientOp { readonly kind: 'op.gradient'; } export type GridStepOp = WaveOp | SplatOp; export type GridDeriveOp = GradientOp; export declare const op: { readonly wave: (config: { damping: PropRef; }) => WaveOp; readonly splat: (config: { at: PointerSignal; amount: PointerSpeedSignal; radius: PropRef; }) => SplatOp; readonly gradient: () => GradientOp; }; export interface GridSimConfig { /** Square grid resolution (state texels per side). */ resolution: number; /** History levels the step ops read (the wave equation needs 2: t−1 and t−2). */ history: number; /** Ordered per-texel step ops, run once per frame. */ step: GridStepOp[]; /** Named derived outputs, consumable as fields by effects (`sim.output(name)`). */ derive: Record; /** Rest semantics: when the engine may stop dispatching. */ rest?: { settlesWhen: 'derived-from-damping'; }; } /** A reference to one of a simulation's derived outputs (feeds effect slots). */ export interface SimOutputRef { readonly kind: 'simOutput'; readonly sim: GridSim; readonly output: string; } /** A declared grid simulation. Reference its outputs by identity: `sim.output('name')`. */ export declare class GridSim { readonly config: GridSimConfig; constructor(config: GridSimConfig); output(name: string): SimOutputRef; } export declare const simulate: { readonly grid: (config: GridSimConfig) => GridSim; }; //# sourceMappingURL=sim.d.ts.map