import { A as AtlasPlay } from './atlas-D83bp0cn.js'; /** * Particle sprite sources for the compiled render pipelines (ยง13.8 always * samples a texture). When the caller provides no image we bake a soft radial * disc so untextured systems look like the interpreted backend's procedural * sprite. */ interface SpriteSource { image: TexImageSource; width: number; height: number; /** atlas grid โ€” (1, 1) for a single sprite */ cols: number; rows: number; /** one cell's px size (whole image for a single sprite) */ frameW: number; frameH: number; /** px gutter between cells */ pad: number; } /** Options accepted by the compiled backends for texturing. */ interface CompiledAtlasOptions { image: TexImageSource; /** uniform grid of cells; the column advances with life, the row is per-particle */ cols?: number; rows?: number; /** explicit cell size + gutter; defaults to width/cols, height/rows, 0 */ frameW?: number; frameH?: number; pad?: number; /** column-advance rate when play is 'loop' or 'hold' */ fps?: number; /** see `AtlasPlay`: 'loop' cycles at fps, 'once' stretches over the lifetime, * 'hold' plays once at fps and stops on the last frame */ play?: AtlasPlay; /** 'per-particle' randomises the row per particle; 'per-spawn' fixes one row */ pick?: 'per-particle' | 'per-spawn'; /** fixed row when pick === 'per-spawn' (defaults to a random row) */ row?: number; } /** * Atlas animation config the render pipelines need beyond the grid dims. * Mirrors the interpreted WebGL backend (webgl/index.ts resolveAtlas). */ interface AtlasAnim { fps: number; /** 0 = stretch over life, 1 = loop at fps, 2 = play once at fps then hold */ play: 0 | 1 | 2; /** 0 = per-particle random row, 1 = fixed row */ pick: 0 | 1; /** fixed row when pick === 1 */ row: number; } /** Soft radial disc (white core โ†’ transparent edge), straight alpha. */ declare function softDisc(size?: number): SpriteSource; /** Resolve the caller's atlas option (or the disc fallback) into a SpriteSource. */ declare function resolveSprite(atlas: CompiledAtlasOptions | undefined): SpriteSource; /** * Emission masks for the compiled backends. A painted image is rasterised into * a point table of emitter-relative spawn offsets (px); the emit kernel samples * one per spawn instead of the graph's analytic shape. Mirrors the interpreted * WebGL builder (webgl/index.ts buildMaskTable) so both backends look the same. */ interface CompiledMaskOptions { /** mask image โ€” see `channel` for which pixels emit */ image: TexImageSource; /** world width the mask maps to (px); height defaults to the aspect ratio */ width: number; height?: number; /** offset of the mask centre from the emitter (px, default [0, 0]) */ offset?: [number, number]; /** 'alpha' | 'luminance' | 'auto' (alpha if the image has transparency) */ channel?: 'auto' | 'alpha' | 'luminance'; /** weighted: grey = spawn density (1..4 points); else a hard 50% stencil */ weighted?: boolean; } interface MaskTable { /** emitter-relative xy offsets, one pair per emitting sample */ points: Float32Array; count: number; } export { type AtlasAnim as A, type CompiledAtlasOptions as C, type MaskTable as M, type SpriteSource as S, type CompiledMaskOptions as a, resolveSprite as r, softDisc as s };