Skip to content

@modoki/engine / index / pointerPos

Function: pointerPos()

pointerPos(world): object

Current pointer position in viewport CSS px. Raw clientX/clientY — ratio-matched to getBoundingClientRect, so raycast/hit-testing off this is already zoom-invariant.

Parameters

world

World

Returns

x

x: number

y

y: number

Built with Modoki.