stage.readyWhen

Run nothing until fn returns true, typically once the child's picture has arrived through bindInputs.

stage.readyWhen(fn: () => boolean): GridStage

Import sim from shaders/std and use sim.grids.stage.readyWhen.

Parameters

NameTypeNotes
fn() => boolean

Example

stage.readyWhen(() => lumaReady)

See also

  • stage.cache — A GPU pass chosen per frame, for a pass whose input is rebound after the frame starts.

Used by

PixelSort, ReactionDiffusion