Class Pointer

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

Hierarchy (view full)

Properties

LEFT

LEFT: number

constant for left button

MIDDLE

MIDDLE: number

constant for middle button

RIGHT

RIGHT: number

constant for right button

_center

_center: Vector2d

bind

bind: number[]

button

button: number

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

clientX

clientX: number

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

clientY

clientY: number

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

deltaMode

deltaMode: number

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

deltaX

deltaX: number

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

deltaY

deltaY: number

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

deltaZ

deltaZ: number

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

event

the originating Event Object

gameLocalX

gameLocalX: number

Event X coordinate relative to the holding container

gameLocalY

gameLocalY: number

Event Y coordinate relative to the holding container

gameScreenX

gameScreenX: number

Event X coordinate relative to the viewport

gameScreenY

gameScreenY: number

Event Y coordinate relative to the viewport

gameWorldX

gameWorldX: number

Event X coordinate relative to the map

gameWorldY

gameWorldY: number

Event Y coordinate relative to the map

gameX

gameX: number

Event normalized X coordinate within the game canvas itself

gameY

gameY: number

Event normalized Y coordinate within the game canvas itself

isNormalized

isNormalized: boolean

true if not originally a pointer event

isPrimary

isPrimary: boolean

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

locked

locked: boolean

true if the pointer is currently locked

max

max: XYPoint

min

min: XYPoint

movementX

movementX: number

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

movementY

movementY: number

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

pageX

pageX: number

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

pageY

pageY: number

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

pointerId

pointerId: number

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

type

type: "Bounds"

Accessors

bottom

center

centerX

centerY

height

left

right

top

width

x

y

Methods

add

  • add(vertices, clear?): void
  • 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

addBounds

addFrame

  • addFrame(x0, y0, x1, y1, m?): 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

addPoint

centerOn

clear

clone

contains

isFinite

overlaps

setMinMax

  • setMinMax(minX, minY, maxX, maxY): 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

shift

toPolygon

translate

update

Settings

Member Visibility

On This Page

AltStyle によって変換されたページ (->オリジナル) /