/** * What the post pass of both layers has in common: the effects that have * a `post` hook made into functions, where each number they read is among * the numbers the pass is told, and the pointer over the canvas. * * A post hook is the body of `vec4 ( vec4 color, vec2 uv )`: `uv` runs * over the whole canvas from the top left, `color` is what the slides * drew there, and `scene( uv )` is what they drew anywhere. What it reads: * * uPointer the pointer in the canvas, px, smoothed * uPointerSpeed how fast it moves, px per second, smoothed * uPointerIn 1 while the pointer is over the slider, eased * uView size of the canvas, px * uTime seconds * uVelocity how fast the slider moves, views per second */ import type { Effect } from './program.js'; import type { Slider } from '../index.js'; /** * @param effects Effects; those without `post` are left out. * @return `glsl` (functions `post0` and on, with what they need), * `calls` (that call them on `color`), `names` (what each * number they read is: `V[ slot ].x`), `params` (the arrays of * the parameters, by slot from 3 on), and `slots`. */ export declare function passOf(effects: Effect[]): { glsl: string; calls: string; names: { [x: string]: string; }; params: number[][]; slots: number; }; /** * Follows the pointer over the canvas, and has frames drawn while it moves * or an effect of the pass is animated. * * @param slider Slider. * @param canvas The canvas of the layer, while it draws. * @param effects The effects of the pass. * @param numbers What the pass is told: filled on every * `fill( now )`, slots 0 to 2 and the parameters. * @param params The arrays of the parameters, by slot from 3 on. * @return `fill( now )`, after which `numbers` are those of now. */ export declare function follow(slider: Slider, canvas: () => HTMLCanvasElement | null, effects: Effect[], numbers: Float32Array, params: number[][]): (now: number) => void;