Polygon#Polygon

new Polygon(points) Creates a new Polygon. The points can be set from a variety of formats: An array of Point objects: [new Phaser.Point(x1, y1), ...] An array of objects with public x/y properties: [obj1, obj2, ...] An array of paired numbers that represent point coordinates: [x1,y1, x2,y2, ...] As separate Point arguments: setTo(new Phaser.Point(x1, y1), ...) As separate objects with public x/y properties arguments: setTo(obj1, obj2, ...) As separate arguments representing point coordi

Polygon#points

points : Array.<Phaser.Point> This method is deprecated and should not be used. It may be removed in the future. Sets and modifies the points of this polygon. See setTo for the different kinds of arrays formats that can be assigned. The array of vertex points. Type Array.<Phaser.Point> Deprecated: Use `setTo`. Source code: geom/Polygon.js (Line 294)

Polygon#flattened

flattened : boolean Has this Polygon been flattened by a call to Polygon.flatten ? Source code: geom/Polygon.js (Line 50)

Polygon#flatten()

flatten() → {Phaser.Polygon} Flattens this Polygon so the points are a sequence of numbers.Any Point objects found are removed and replaced with two numbers.Also sets the Polygon.flattened property to true. Returns Phaser.Polygon - This Polygon object Source code: geom/Polygon.js (Line 91)

Polygon#contains()

contains(x, y) → {boolean} Checks whether the x and y coordinates are contained within this polygon. Parameters Name Type Description x number The X value of the coordinate to test. y number The Y value of the coordinate to test. Returns boolean - True if the coordinates are within this polygon, otherwise false. Source code: geom/Polygon.js (Line 134)

Polygon#closed

closed : boolean Is the Polygon closed or not? Source code: geom/Polygon.js (Line 45)

Polygon#clone()

clone(output) → {Phaser.Polygon} Creates a copy of the given Polygon.This is a deep clone, the resulting copy contains new Phaser.Point objects Parameters Name Type Argument Default Description output Phaser.Polygon <optional> (new Polygon) The polygon to update. If not specified a new polygon will be created. Returns Phaser.Polygon - The cloned (output) polygon object. Source code: geom/Polygon.js (Line 109)

Polygon#area

area : number The area of this Polygon. Source code: geom/Polygon.js (Line 29)

PointerMode.CURSOR

[static] CURSOR A 'CURSOR' is a pointer with a passive cursor such as a mouse, touchpad, watcom stylus, or even TV-control arrow-pad. It has the property that a cursor is passively moved without activating the input.This currently corresponds with Phaser.Pointer#isMouse property. Source code: input/Pointer.js (Line 1267)

PointerMode.CONTACT

[static] CONTACT A 'CONTACT' pointer has an active cursor that only tracks movement when actived; notably this is a touch-style input. Source code: input/Pointer.js (Line 1273)