import { Expr, GpuFragmentParams } from '../gpu/contract'; import { PropRef } from './values'; /** The generator surface: composed UV, effective viewport, and aspect — locals-bound. */ export declare function surfaceOf(params: GpuFragmentParams): { uv: Expr; viewport: Expr; aspect: Expr; }; /** * The generator surface against the RAW canvas viewport (no resize-fit box) — for paints whose * pattern is anchored to the canvas rather than a fitted box (Blob's organic disc). Same * `uvContext ?? ctx.uv` idiom as {@link surfaceOf}. */ export declare function rawSurfaceOf(params: GpuFragmentParams): { uv: Expr; viewport: Expr; aspect: Expr; }; export interface CentredFrame { /** Vector from the centre to the pixel, aspect-corrected (centre-scaled, D-1). */ delta: Expr; /** Radial distance from the centre. */ dist: Expr; } /** * An aspect-corrected frame centred on a position prop: the pixel's `delta` from the centre and * its radial `dist` — the opening of every centred field. The centre is a transformPosition * value (stored `(x, 1−y)`); the centre is scaled, not the UV alone (D-1 centre-scaled rule). */ export declare function centredFrame(slots: { center: PropRef; }): (params: GpuFragmentParams, surface: { uv: Expr; aspect: Expr; }) => CentredFrame; export interface SegmentFrame { /** Distance travelled along the from→to axis (0 at `from`). */ along: Expr; /** Signed perpendicular distance from the axis. */ across: Expr; /** Length of the from→to segment (≥ 1e-4). */ length: Expr; } /** * An aspect-corrected frame along the segment between two position props: the pixel's * `along`/`across` coordinates plus the segment `length`. Positions are transformPosition * values (stored `(x, 1−y)`). */ export declare function segmentFrame(slots: { from: PropRef; to: PropRef; }): (params: GpuFragmentParams, surface: { uv: Expr; aspect: Expr; }) => SegmentFrame; /** A degrees prop as a unit vector — `(cos θ, sin θ)`, bound to one local. */ export declare function direction(angleDeg: Expr | number, hint?: string): Expr; export interface DirectionFrame { /** Unit vector along the frame's direction. */ tangent: Expr; /** Unit vector perpendicular to it (90° counter-clockwise). */ perp: Expr; /** Project a 2D point into the frame: distance along / across the direction. */ coordsOf(p: Expr): { along: Expr; across: Expr; }; } /** * A rotated 2D basis from a degrees prop — the frame a directional surface (brush grain, weave, * streaks, flow) lives in. `coordsOf` gives grain-space coordinates; `tangent`/`perp` are the * axes for smearing or tilting along it. */ export declare function directionFrame(angleDeg: Expr | number, hint?: string): DirectionFrame; /** * Fold a point around a centre into one angular sector (mirrored at the sector's half) — * the kaleidoscope domain fold. Returns the folded point in polar-recovered coordinates. */ export declare function sectorFold(x: Expr, y: Expr, sectorAngle: Expr, center?: number): Expr; //# sourceMappingURL=frames.d.ts.map