pointerSpeed
The pointer's speed, capped at max, as the strength of a simulation step.
pointerSpeed(opts?: {max?: number}): PointerSpeedSignal
Import signal from shaders/std and use signal.pointerSpeed.
Speed is in uv per second. A still cursor gives 0, a flick across the canvas gives a value near max. Default cap is 2.
Parameters
| Name | Type | Notes |
|---|---|---|
opts | {max?: number} | Optional. |
Example
op.splat({at: pointer(), amount: pointerSpeed({max: 2}), radius: p('radius')})
See also
pointer— The pointer's position, for a simulation step that reacts to the cursor.