import { Expr, GpuFragmentParams } from '../../gpu/contract'; import { PropRef } from '../values'; export interface GridSlots { columns: PropRef; rows: PropRef; gapX: PropRef; gapY: PropRef; stagger: PropRef; /** Structural: alternate-mirror mode ('none' | flip-x | flip-y | both). */ flip: PropRef; } export interface RadialSlots { count: PropRef; radius: PropRef; startAngle: PropRef; sweep: PropRef; faceCenter: PropRef; } export interface LineSlots { count: PropRef; direction: PropRef; spacing: PropRef; } export type PlacementSpec = { kind: 'grid'; slots: GridSlots; } | { kind: 'radial'; slots: RadialSlots; } | { kind: 'line'; slots: LineSlots; }; export declare const grid: (slots: GridSlots) => PlacementSpec; export declare const radial: (slots: RadialSlots) => PlacementSpec; export declare const line: (slots: LineSlots) => PlacementSpec; /** Pick a placement member by a structural mode prop — only the active member emits. */ export interface PlacementPick { mode: PropRef; members: { grid: PlacementSpec; radial: PlacementSpec; linear: PlacementSpec; }; } export declare const byMode: (mode: PropRef, members: PlacementPick["members"]) => PlacementPick; export interface VariationSlots { scale: PropRef; rotation: PropRef; opacity: PropRef; jitter: { position: PropRef; rotation: PropRef; scale: PropRef; opacity: PropRef; }; seed: PropRef; /** Seamless layout animation phase (wraps at 1). */ phase: PropRef; } export interface RepeatInstancesRecipe { /** Crop insets applied to the sampled source rect. */ source: { crop: { left: PropRef; right: PropRef; top: PropRef; bottom: PropRef; }; }; placement: PlacementPick | PlacementSpec; variation: VariationSlots; /** Per-instance hue rotation (radians/instance); active when the prop is non-zero. */ hueShift?: PropRef; /** Structural stacking order ('forward' | 'backward'). */ order: PropRef; } /** * Build the instance-repeat fragment: placement frame → per-instance variation * (→ hue-shift stage) → premultiplied over-accumulation of the child sampled per instance. */ export declare function repeatInstances(recipe: RepeatInstancesRecipe): (params: GpuFragmentParams) => Expr; //# sourceMappingURL=instances.d.ts.map