splat

A brush step: a soft round push into .x at the pointer, scaled by how fast it moves.

splat(config: {at: PointerSignal; amount: PointerSpeedSignal; radius: PropRef | number}): SplatOp

Import op from shaders/std and use op.splat.

Parameters

NameTypeNotes
config{at: PointerSignal; amount: PointerSpeedSignal; radius: PropRef | number}

Example

op.splat({at: pointer(), amount: pointerSpeed({max: 2}), radius: p('radius')})

See also

  • wave — A wave step: the grid ripples outward from any disturbance and fades by damping (a prop or number, 0–20).
  • ctx.pointer — The mouse position in uv (0–1, y down).
  • pointerSpeed — The pointer's speed, capped at max, as the strength of a simulation step.