op.host

A named step that runs before any gate: pointer smoothing, activity flags, anything a later settle needs to know.

op.host(name: string, run: (f: GridFrame) => void): GridStage

Import sim from shaders/std and use sim.grids.op.host.

Parameters

NameTypeNotes
namestring
run(f: GridFrame) => void

Example

op.host('cursor', (f) => { active = (f.frameParams.pointer?.x ?? 0.5) !== lastX })

See also

  • op.values — A named step that writes this frame's values for the passes after it.
  • op.settle — Sleep the simulation once nothing has driven it for settleMs of simulated time.