Computes the conversion factor between CSS (client) pixels and PIXI stage pixels.
PIXI's interaction systems (InteractionManager in v4–v7, EventSystem in v7+/v8)
map a native clientX/Y to a global/stage coordinate using
(clientX - rect.left) * (canvas.width / rect.width) / resolution,
which equals (clientX - rect.left) * (renderer.screen.width / rect.width).
When you receive native PointerEvents outside PIXI's interaction system (e.g.
a window-level pointermove), you must apply this same factor to convert
client-pixel deltas into stage-pixel deltas. The factor is identical for WebGL,
Canvas, and WebGPU renderers — only the canvas accessor differs by PIXI version.
Computes the conversion factor between CSS (client) pixels and PIXI stage pixels.
PIXI's interaction systems (InteractionManager in v4–v7, EventSystem in v7+/v8) map a native
clientX/Yto a global/stage coordinate using(clientX - rect.left) * (canvas.width / rect.width) / resolution, which equals(clientX - rect.left) * (renderer.screen.width / rect.width).When you receive native
PointerEvents outside PIXI's interaction system (e.g. a window-levelpointermove), you must apply this same factor to convert client-pixel deltas into stage-pixel deltas. The factor is identical for WebGL, Canvas, and WebGPU renderers — only the canvas accessor differs by PIXI version.