DragEvent

constructor(key: Any, phase: DragPhase = DragPhase.Move, pointerXPx: Float = 0.0f, pointerYPx: Float = 0.0f, targetXPx: Float = pointerXPx, targetYPx: Float = pointerYPx, velocityXPxPerSec: Float = 0.0f, velocityYPxPerSec: Float = 0.0f, uptimeMillis: Long = 0)

Parameters

key

Physics body key associated with this drag.

phase

Drag lifecycle phase.

pointerXPx

Raw pointer X in container px.

pointerYPx

Raw pointer Y in container px.

targetXPx

Target X in container px used by the drag controller.

targetYPx

Target Y in container px used by the drag controller.

velocityXPxPerSec

Estimated pointer velocity X in px/s.

velocityYPxPerSec

Estimated pointer velocity Y in px/s.

uptimeMillis

Event time in uptime millis (suitable for ordering and duration calculations).


constructor(key: Any, xPx: Float, yPx: Float)

Convenience constructor for a simple move/update event where the drag target equals the pointer position.