Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commit8d45df8664

README.md

inputSim.shared

The point conversion the toolbox's absolute-point pointer verbs share.

click and mouseMove take a screen point in physical pixels, in the space the input's receiver reads positions in. The input primitives beneath them place a pointer on the window.

windowPoint(x, y, target) carries a point into that window space. For the game (target "game" or nil) the point is in the space capture reports, the scene's own pixels measured from the top-left of the scene's rect, and the conversion adds that rect's origin; where the scene is drawn across the whole window (a headless engine, a fullscreen play session) the rect starts at the window's top-left and the conversion is the identity. For the UI (target "ui") the point is already on the window, where a widget sits at its gui.bounds rect times ui.pixelRatio(), and passes through unchanged.