Class Pointer

a pointer object, representing a single finger on a touch enabled device.

Hierarchy (view full)

Properties

LEFT: number

constant for left button

MIDDLE: number

constant for middle button

RIGHT: number

constant for right button

_center: Vector2d
bind: number[]
button: number

the button property indicates which button was pressed on the mouse to trigger the event.

clientX: number

the horizontal coordinate within the application's client area at which the event occurred

clientY: number

the vertical coordinate within the application's client area at which the event occurred

deltaMode: number

an unsigned long representing the unit of the delta values scroll amount

deltaX: number

a double representing the horizontal scroll amount in the Wheel Event deltaMode unit.

deltaY: number

a double representing the vertical scroll amount in the Wheel Event deltaMode unit.

deltaZ: number

a double representing the scroll amount in the z-axis, in the Wheel Event deltaMode unit.

the originating Event Object

gameLocalX: number

Event X coordinate relative to the holding container

gameLocalY: number

Event Y coordinate relative to the holding container

gameScreenX: number

Event X coordinate relative to the viewport

gameScreenY: number

Event Y coordinate relative to the viewport

gameWorldX: number

Event X coordinate relative to the map

gameWorldY: number

Event Y coordinate relative to the map

gameX: number

Event normalized X coordinate within the game canvas itself

gameY: number

Event normalized Y coordinate within the game canvas itself

isNormalized: boolean

true if not originally a pointer event

isPrimary: boolean

indicates whether or not the pointer device that created the event is the primary pointer.

locked: boolean

true if the pointer is currently locked

max: XYPoint
min: XYPoint
movementX: number

the difference in the X coordinate of the pointer since the previous move event

movementY: number

the difference in the Y coordinate of the pointer since the previous move event

pageX: number

the horizontal coordinate at which the event occurred, relative to the left edge of the entire document.

pageY: number

the vertical coordinate at which the event occurred, relative to the left edge of the entire document.

pointerId: number

The unique identifier of the contact for a touch, mouse or pen

type: "Bounds"

Accessors

Methods

  • Adds the given vertices to the bounds definition.

    Parameters

    • vertices: Vector2d[] | Point[] | XYPoint[]

      An array of Vector2d or Point to add to the bounds.

    • Optionalclear: boolean = false

      Whether to reset the bounds before adding the new vertices. Defaults to false.

    Returns void

  • Adds the given quad coordinates to this bounds definition, multiplied by the given matrix.

    Parameters

    • x0: number

      The left x coordinate of the quad.

    • y0: number

      The top y coordinate of the quad.

    • x1: number

      The right x coordinate of the quad.

    • y1: number

      The bottom y coordinate of the quad.

    • Optionalm: Matrix2d

      An optional transform to apply to the given coordinates.

    Returns void

  • Sets the bounds to the given minimum and maximum values.

    Parameters

    • minX: number

      The minimum x value.

    • minY: number

      The minimum y value.

    • maxX: number

      The maximum x value.

    • maxY: number

      The maximum y value.

    Returns void