import { formatFloat } from '../contract'; /** The shared emit frame every instance part writes against: local prefix + literal emitter. */ export interface InstanceEmitFrame { /** Unique local-name prefix for this composition. */ p: string; /** f32 literal formatter. */ L: (n: number) => string; } /** Resolved WGSL source strings for a part's slots (uniform accessors or literals). */ export type Slot = string; /** Screen-space rect sources (centre/half-extent WGSL expressions). */ export interface RectSlots { cx: string; cy: string; hw: string; hh: string; } /** The source rect: the sampled rect (child bounds or full canvas) inset by four crop props. */ export declare function sourceRect(f: InstanceEmitFrame, src: RectSlots, crop: { left: Slot; right: Slot; top: Slot; bottom: Slot; }): string[]; /** The placement field: the aspect-squared rect the layout distributes instances across. */ export declare function placementField(f: InstanceEmitFrame, own: RectSlots): string[]; /** One member of the placement family: the requested count + the per-instance placement body. */ export interface PlacementPart { requested: () => string; body: (f: InstanceEmitFrame) => string[]; } /** Grid placement: cols×rows cells (gaps between), odd-row stagger, phase scrolls one cell period. */ export declare function gridPlacement(slots: { columns: Slot; rows: Slot; gapX: Slot; gapY: Slot; stagger: Slot; }, flipMode: number): PlacementPart; /** Radial placement: instances on an orbit around `anchorSq`, optional face-center rotation. */ export declare function radialPlacement(anchorSq: string, slots: { count: Slot; sweep: Slot; startAngle: Slot; radius: Slot; faceCenter: Slot; }): PlacementPart; /** Line placement: instances along a direction ray from `anchorSq`. */ export declare function linePlacement(anchorSq: string, slots: { count: Slot; direction: Slot; spacing: Slot; }): PlacementPart; /** Per-instance variation: compounding scale/rotation/opacity progressions + seeded jitter. */ export declare function instanceVariation(f: InstanceEmitFrame, slots: { scale: Slot; rotation: Slot; opacity: Slot; jitterPosition: Slot; jitterRotation: Slot; jitterScale: Slot; jitterOpacity: Slot; }): string[]; /** Per-instance hue rotation (Rodrigues around (1,1,1)) applied to the sampled texel. */ export declare function instanceHueShift(f: InstanceEmitFrame, hueShift: Slot): string[]; /** * The premultiplied over-accumulation loop. ATOMIC by construction: a runtime-count * instance loop whose per-iteration RTT sample sits behind an early-out cull, which no * expression-graph fold can express — texture samples cannot live inside emitted control * flow. The placement / variation / hue stages are spliced in as statement slots. */ export declare function accumulateInstances(f: InstanceEmitFrame, slots: { placement: PlacementPart; variation: string[]; hue: string[]; zBack: boolean; texKey: string; }): string[]; export { formatFloat }; //# sourceMappingURL=instanceParts.d.ts.map