Represents a Mouse event fired on a ElementComponent.

Hierarchy (View Summary)

Constructors

  • Create an instance of an ElementMouseEvent.

    Parameters

    • event: MouseEvent

      The MouseEvent that was originally raised.

    • element: ElementComponent

      The ElementComponent that this event was originally raised on.

    • camera: CameraComponent

      The CameraComponent that this event was originally raised via.

    • x: number

      The x coordinate.

    • y: number

      The y coordinate.

    • lastX: number

      The last x coordinate.

    • lastY: number

      The last y coordinate.

    Returns ElementMouseEvent

Properties

altKey: boolean

Whether the alt key was pressed.

button: number

The mouse button.

camera: CameraComponent

The CameraComponent that this event was originally raised via.

ctrlKey: boolean

Whether the ctrl key was pressed.

dx: number

The amount of horizontal movement of the cursor.

dy: number

The amount of vertical movement of the cursor.

element: ElementComponent

The ElementComponent that this event was originally raised on.

MouseEvent or TouchEvent that was originally raised.

metaKey: boolean

Whether the meta key was pressed.

shiftKey: boolean

Whether the shift key was pressed.

wheelDelta: number

The amount of the wheel movement.

Methods