Skip to main content
DragState = object
Defined in: modules/input/src/keyboard-mouse/mouse.types.ts:36 Snapshot of the current drag operation.

Remarks

Returned by InputLibrary.getDragState. A drag becomes active on mousedown and inactive on mouseup. Positions are in game coordinates.

Properties

active

active: boolean
Defined in: modules/input/src/keyboard-mouse/mouse.types.ts:38 true when a drag is in progress.

button?

optional button?: InputEnum
Defined in: modules/input/src/keyboard-mouse/mouse.types.ts:40 The mouse button that initiated the drag, or undefined when inactive.

deltaX

deltaX: number
Defined in: modules/input/src/keyboard-mouse/mouse.types.ts:50 Total horizontal distance dragged from the start position.

deltaY

deltaY: number
Defined in: modules/input/src/keyboard-mouse/mouse.types.ts:52 Total vertical distance dragged from the start position.

startX

startX: number
Defined in: modules/input/src/keyboard-mouse/mouse.types.ts:42 Horizontal cursor position when the drag started.

startY

startY: number
Defined in: modules/input/src/keyboard-mouse/mouse.types.ts:44 Vertical cursor position when the drag started.

x

x: number
Defined in: modules/input/src/keyboard-mouse/mouse.types.ts:46 Current horizontal cursor position during the drag.

y

y: number
Defined in: modules/input/src/keyboard-mouse/mouse.types.ts:48 Current vertical cursor position during the drag.