Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

D.6 Pointer Input Intrinsics

The WASM backend exposes basic pointer state for browser-interactive programs:

IntrinsicArgsDescription
__pointer_x__()0Get the current pointer x coordinate in canvas pixels
__pointer_y__()0Get the current pointer y coordinate in canvas pixels
__pointer_down__()0Get whether the primary pointer button is currently down

When a canvas or WebGL surface is active, coordinates are reported relative to that surface and scaled to its backing pixel resolution.