Skip to content

@modoki/engine / index / computePointerEdge

Function: computePointerEdge() ​

computePointerEdge(frame, prev): void

Derive the pointer down-edge into frame.pointer.pressed/.released from the freshly-sampled .down vs the previous frame's down state. prev is updated to the current down for next frame. Mirrors computeEdges for digital flags, kept separate because pointer carries coordinates the OR-merge model doesn't.

Parameters ​

frame ​

InputFrame

prev ​

down ​

boolean

Returns ​

void

Built with Modoki.