import { Expr, GpuFragmentParams } from '../../gpu/contract'; import { d } from '../../gpu/kit/index'; import { PropRef } from '../values'; import { ArgSpec } from '../invoke'; /** A generator paint: the composition builder a `role: 'generator'` definition runs. */ export type Paint = (params: GpuFragmentParams) => Expr; /** * Fill with a single colour. The bound prop is already a P3-linear rgba uniform, so the * paint is a direct read; alpha passes through, so a half-transparent fill composites * correctly. */ export declare function solidColor(color: PropRef): Paint; /** * A directional gradient that cycles through colours over time (the definition's * `animatedTime` clock). `mode` (structural) selects the procedural rainbow spectrum or a * custom three-colour loop `a`→`b`→`c`→`a`, each transition mixed in the structural * `space` (rainbow generates colours, so `space` does not apply there). `direction` * (degrees) spins the gradient in place about the canvas centre; `scale` sets how many * cycles span the viewport. */ export declare function colorWheel(slots: { mode: PropRef; direction: ArgSpec; scale: ArgSpec; palette: { a: PropRef; b: PropRef; c: PropRef; }; space: PropRef; }): Paint; /** * Five individually placed colour points blended by inverse-distance proximity. The kit * body returns the four incremental running-weighted-average factors; the paint folds the * five colours through them, each mix in the structural `space`. `smoothness` inverts into * the distance power (higher = blobs spread further). Exactly five points. */ export declare function pointCloudGradient(slots: { points: { color: PropRef; position: PropRef; }[]; smoothness: ArgSpec; space: PropRef; }): Paint; /** * The `extraFields` the {@link beam} paint drives: for a non-linear colour space the * forward P3→working-space conversion of the two endpoint colours is pixel-invariant, so * it is computed ONCE per frame on the CPU (dirty-keyed) into these vec3 fields and read * on the GPU by `mixPreconvertedVariants[mode]`. Declare on the definition alongside the * paint. */ export declare const beamPreconvertedFields: { convA: { schema: d.Vec3f; initial: number[]; }; convB: { schema: d.Vec3f; initial: number[]; }; }; /** * A beam of light from `from` to `to`: the pixel projects onto the segment, thickness and * softness taper between the `start`/`end` values along it, and the cross-section shades * `colors.inside` → `colors.outside` with a glow alpha. The structural `space` selects the * mix: linear mixes per pixel; a non-linear space preconverts both endpoints on the CPU * each frame into {@link beamPreconvertedFields} and pays only the weighted mix + * back-conversion per pixel. Alpha is the endpoint average scaled by the glow. */ export declare function beam(slots: { from: PropRef; to: PropRef; thickness: { start: ArgSpec; end: ArgSpec; }; softness: { start: ArgSpec; end: ArgSpec; }; colors: { inside: PropRef; outside: PropRef; }; space: PropRef; }): Paint; //# sourceMappingURL=gradients.d.ts.map