new Pointer()
a pointer object, representing a single finger on a touch enabled device.
Extends
Members
-
static button :Number
-
the button property indicates which button was pressed on the mouse to trigger the event.
-
static clientX :Number
-
the horizontal coordinate within the application's client area at which the event occurred
-
static clientY :Number
-
the vertical coordinate within the application's client area at which the event occurred
-
static deltaMode :Number
-
an unsigned long representing the unit of the delta values scroll amount
-
static deltaX :Number
-
a double representing the horizontal scroll amount in the Wheel Event deltaMode unit.
-
static deltaY :Number
-
a double representing the vertical scroll amount in the Wheel Event deltaMode unit.
-
static deltaZ :Number
-
a double representing the scroll amount in the z-axis, in the Wheel Event deltaMode unit.
-
static event :PointerEvent|TouchEvent|MouseEvent
-
the originating Event Object
-
static gameLocalX :Number
-
Event X coordinate relative to the holding container
-
static gameLocalY :Number
-
Event Y coordinate relative to the holding container
-
static gameScreenX :Number
-
Event X coordinate relative to the viewport
-
static gameScreenY :Number
-
Event Y coordinate relative to the viewport
-
static gameWorldX :Number
-
Event X coordinate relative to the map
-
static gameWorldY :Number
-
Event Y coordinate relative to the map
-
static gameX :Number
-
Event normalized X coordinate within the game canvas itself
-
static gameY :Number
-
Event normalized Y coordinate within the game canvas itself
-
static isPrimary :Boolean
-
indicates whether or not the pointer device that created the event is the primary pointer.
-
static pageX :Number
-
the horizontal coordinate at which the event occurred, relative to the left edge of the entire document.
-
static pageY :Number
-
the vertical coordinate at which the event occurred, relative to the left edge of the entire document.
-
static pointerId :Number
-
The unique identifier of the contact for a touch, mouse or pen
-
static type :String
-
a string containing the event's type.
-
points :Array.<me.Vector2d>
-
Array of points defining the Polygon
Note: If you manually changepoints
, you must callrecalc
afterwards so that the changes get applied correctly.- Inherited From:
-
pos :me.Vector2d
-
origin point of the Polygon
- Inherited From:
Methods
-
clone() → {me.Rect}
-
clone this rectangle
- Inherited From:
-
contains(rect) → {boolean}
-
check if this rectangle contains the specified one
Parameters:
Name Type Description rect
me.Rect Returns:
boolean -true if contains
- Inherited From:
-
containsPoint(x, y) → {boolean}
-
check if this rectangle contains the specified point
Parameters:
Name Type Description x
Number x coordinate
y
Number y coordinate
Returns:
boolean -true if contains
- Inherited From:
-
containsPointV(point) → {boolean}
-
check if this Polygon contains the specified point
Parameters:
Name Type Description point
me.Vector2d Returns:
boolean -true if contains
- Inherited From:
-
copy(rect) → {me.Rect}
-
copy the position and size of the given rectangle into this one
Parameters:
Name Type Description rect
me.Rect Source rectangle
- Inherited From:
-
equals(rect) → {boolean}
-
check if this rectangle is identical to the specified one
Parameters:
Name Type Description rect
me.Rect Returns:
boolean -true if equals
- Inherited From:
-
getBounds() → {me.Rect}
-
returns the bounding box for this shape, the smallest rectangle object completely containing this shape.
- Inherited From:
-
getIndices(a) → {me.Polygon}
-
returns a list of indices for all triangles defined in this polygon
Parameters:
Name Type Description a
Array.<Vector2d> list of vector
- Inherited From:
-
isFinite() → {boolean}
-
determines whether all coordinates of this rectangle are finite numbers.
Returns:
boolean -false if all coordinates are positive or negative Infinity or NaN; otherwise, true.
- Inherited From:
-
overlaps(rect) → {boolean}
-
check if this rectangle is intersecting with the specified one
Parameters:
Name Type Description rect
me.Rect Returns:
boolean -true if overlaps
- Inherited From:
-
resize(w, h) → {me.Rect}
-
resize the rectangle
Parameters:
Name Type Description w
Number new width of the rectangle
h
Number new height of the rectangle
- Inherited From:
-
rotate(angle, vopt) → {me.Polygon}
-
Rotate this Polygon (counter-clockwise) by the specified angle (in radians).
Parameters:
Name Type Attributes Description angle
Number The angle to rotate (in radians)
v
me.Vector2d | me.ObservableVector2d <optional>
an optional point to rotate around
- Inherited From:
-
scale(x, yopt) → {me.Polygon}
-
Scale this Polygon by the given scalar.
Parameters:
Name Type Attributes Default Description x
Number y
Number <optional>
x - Inherited From:
-
scaleV(v) → {me.Polygon}
-
Scale this Polygon by the given vector
Parameters:
Name Type Description v
me.Vector2d - Inherited From:
-
setPoints(points) → {me.Rect}
-
resize the rectangle to contain all the given points coordinates.
Parameters:
Name Type Description points
Array.<me.Vector2d> array of vector defining a shape
- Inherited From:
-
setShape(x, y, w|points, hopt) → {me.Rect}
-
set new value to the rectangle shape
Parameters:
Name Type Attributes Description x
Number position of the Rectangle
y
Number position of the Rectangle
w|points
Number | Array width of the rectangle, or an array of vector defining the rectangle
h
Number <optional>
height of the rectangle, if a numeral width parameter is specified
- Inherited From:
-
to2d() → {me.Polygon}
-
apply a 2d projection to this shape
- Inherited From:
-
toIso() → {me.Polygon}
-
apply an isometric projection to this shape
- Inherited From:
-
toPolygon() → {me.Polygon}
-
Returns a polygon whose edges are the same as this box.
- Inherited From:
-
transform(matrix) → {me.Polygon}
-
apply the given transformation matrix to this Polygon
Parameters:
Name Type Description matrix
me.Matrix2d the transformation matrix
- Inherited From:
-
translate(x, y) → {me.Rect}
-
translate the rect by the specified offset
Parameters:
Name Type Description x
Number x offset
y
Number y offset
- Inherited From:
-
translateV(v) → {me.Rect}
-
translate the rect by the specified vector
Parameters:
Name Type Description v
me.Vector2d vector offset
- Inherited From:
-
union(rect) → {me.Rect}
-
merge this rectangle with another one
Parameters:
Name Type Description rect
me.Rect other rectangle to union with
- Inherited From:
-
updateBounds() → {me.Rect}
-
update the bounding box for this shape.
- Inherited From: