Skip to content

@modoki/engine / index / pointerDrag

Function: pointerDrag()

pointerDrag(world): object

Drag delta (current − press start), PRESENTATION-INVARIANT: inputSystem scales it to zoom-0-equivalent px once, at the point it merges the pointer frame into this resource (see presentationScale.ts), so a gesture yields the same magnitude at any editor/browser/OS zoom. {0,0} while the pointer is up. Positions (pointerPos) stay raw — only this magnitude is scaled, which is why a game's dragPx × k feel constant no longer drifts under zoom. A plain read: Input.pointer.dragX/dragY IS the presentation-invariant value, not a second raw copy — reading the field directly gives the same answer as this accessor.

Parameters

world

World

Returns

x

x: number

y

y: number

Built with Modoki.