WebMouseEventAdapter

Adapter that converts DOM MouseEvent to ZMouseEvent.

This class handles the conversion of browser mouse events to the engine's internal mouse event format, including position calculation relative to the canvas and tracking of movement, velocity, and acceleration.

Constructors

Link copied to clipboard
constructor(canvas: HTMLCanvasElement)

Functions

Link copied to clipboard

Converts a DOM MouseEvent to a ZMouseEvent.

Link copied to clipboard
fun reset()

Resets the adapter state. Call this when the mouse leaves the canvas or when you want to reset velocity/acceleration calculations.