Public methods | |
---|---|
public | clone(): PIXI.Polygon |
public | close(): void |
public | contains(x: number, y: number): boolean |
public | clone(): PIXI.Polygon |
public | close(): void |
public | contains(x: number, y: number): boolean |
Name | Type | Attribute | Description |
---|---|---|---|
points | Array.<number> | public | An array of the points of this polygon |
type | number | public | The type of the object, mainly used to avoid |
points | Array.<number> | public | An array of the points of this polygon |
type | number | public | The type of the object, mainly used to avoid |
Creates a clone of this polygon
PIXI.Polygon
Closes the polygon, adding points if necessary.
void
Checks whether the x and y coordinates passed to this function are contained within this polygon
Name | Type | Attribute | Description |
---|---|---|---|
x | The X coordinate of the point to test |
||
y | The Y coordinate of the point to test |
Creates a clone of this polygon
PIXI.Polygon
Closes the polygon, adding points if necessary.
void
Checks whether the x and y coordinates passed to this function are contained within this polygon
Name | Type | Attribute | Description |
---|---|---|---|
x | The X coordinate of the point to test |
||
y | The Y coordinate of the point to test |
{ "comment": "/**\n * @class\n * @memberof PIXI\n */", "meta": { "range": [ 130, 3130 ], "filename": "Polygon.js", "lineno": 10, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\math\\shapes", "code": { "id": "astnode100019474", "name": "Polygon", "type": "ClassDeclaration", "paramnames": [ "points" ] } }, "kind": "class", "memberof": "PIXI", "name": "Polygon", "longname": "PIXI.Polygon", "scope": "static", "params": [ { "type": { "names": [ "Array.", "Array. " ] }, "description": " This can be an array of Points
", "name": "points", "variable": true } ], "___id": "T000002R001852", "___s": true, "$methods": [ { "comment": "/**\n * Creates a clone of this polygon\n *\n * @return {PIXI.Polygon} a copy of the polygon\n */", "meta": { "range": [ 1660, 1728 ], "filename": "Polygon.js", "lineno": 64, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\math\\shapes", "code": { "id": "astnode100019564", "name": "Polygon#clone", "type": "MethodDefinition", "paramnames": [] }, "vars": { "": null } }, "description": "
that form the polygon, a flat array of numbers that will be interpreted as [x,y, x,y, ...], or
the arguments passed can be all the points of the polygon e.g.
new PIXI.Polygon(new PIXI.Point(), new PIXI.Point(), ...)
, or the arguments passed can be flat
x,y values e.g.new Polygon(x,y, x,y, x,y, ...)
wherex
andy
are Numbers.Creates a clone of this polygon
", "returns": [ { "type": { "names": [ "PIXI.Polygon" ] }, "description": "a copy of the polygon
" } ], "name": "clone", "longname": "PIXI.Polygon#clone", "kind": "function", "memberof": "PIXI.Polygon", "scope": "instance", "params": [], "___id": "T000002R001864", "___s": true, "skip": true, "slug": "PIXI.Polygonclone", "filepath": "core\\math\\shapes\\Polygon.js" }, { "comment": "/**\n * Closes the polygon, adding points if necessary.\n *\n */", "meta": { "range": [ 1812, 2079 ], "filename": "Polygon.js", "lineno": 73, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\math\\shapes", "code": { "id": "astnode100019577", "name": "Polygon#close", "type": "MethodDefinition", "paramnames": [] }, "vars": { "": null } }, "description": "Closes the polygon, adding points if necessary.
", "name": "close", "longname": "PIXI.Polygon#close", "kind": "function", "memberof": "PIXI.Polygon", "scope": "instance", "params": [], "___id": "T000002R001865", "___s": true, "skip": true, "slug": "PIXI.Polygonclose", "filepath": "core\\math\\shapes\\Polygon.js" }, { "comment": "/**\n * Checks whether the x and y coordinates passed to this function are contained within this polygon\n *\n * @param {number} x - The X coordinate of the point to test\n * @param {number} y - The Y coordinate of the point to test\n * @return {boolean} Whether the x/y coordinates are within this polygon\n */", "meta": { "range": [ 2419, 3128 ], "filename": "Polygon.js", "lineno": 91, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\math\\shapes", "code": { "id": "astnode100019623", "name": "Polygon#contains", "type": "MethodDefinition", "paramnames": [ "x", "y" ] }, "vars": { "": null } }, "description": "Checks whether the x and y coordinates passed to this function are contained within this polygon
", "params": [ { "type": { "names": [ "number" ] }, "description": "The X coordinate of the point to test
", "name": "x" }, { "type": { "names": [ "number" ] }, "description": "The Y coordinate of the point to test
", "name": "y" } ], "returns": [ { "type": { "names": [ "boolean" ] }, "description": "Whether the x/y coordinates are within this polygon
" } ], "name": "contains", "longname": "PIXI.Polygon#contains", "kind": "function", "memberof": "PIXI.Polygon", "scope": "instance", "___id": "T000002R001867", "___s": true, "skip": true, "slug": "PIXI.Polygoncontains", "filepath": "core\\math\\shapes\\Polygon.js" }, { "comment": "/**\n * Creates a clone of this polygon\n *\n * @return {PIXI.Polygon} a copy of the polygon\n */", "meta": { "range": [ 1660, 1728 ], "filename": "Polygon.js", "lineno": 64, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\math\\shapes", "code": { "id": "astnode100094243", "name": "Polygon#clone", "type": "MethodDefinition", "paramnames": [] }, "vars": { "": null } }, "description": "Creates a clone of this polygon
", "returns": [ { "type": { "names": [ "PIXI.Polygon" ] }, "description": "a copy of the polygon
" } ], "name": "clone", "longname": "PIXI.Polygon#clone", "kind": "function", "memberof": "PIXI.Polygon", "scope": "instance", "params": [], "___id": "T000002R008798", "___s": true, "skip": true, "slug": "PIXI.Polygonclone", "filepath": "core\\math\\shapes\\Polygon.js" }, { "comment": "/**\n * Closes the polygon, adding points if necessary.\n *\n */", "meta": { "range": [ 1812, 2079 ], "filename": "Polygon.js", "lineno": 73, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\math\\shapes", "code": { "id": "astnode100094256", "name": "Polygon#close", "type": "MethodDefinition", "paramnames": [] }, "vars": { "": null } }, "description": "Closes the polygon, adding points if necessary.
", "name": "close", "longname": "PIXI.Polygon#close", "kind": "function", "memberof": "PIXI.Polygon", "scope": "instance", "params": [], "___id": "T000002R008799", "___s": true, "skip": true, "slug": "PIXI.Polygonclose", "filepath": "core\\math\\shapes\\Polygon.js" }, { "comment": "/**\n * Checks whether the x and y coordinates passed to this function are contained within this polygon\n *\n * @param {number} x - The X coordinate of the point to test\n * @param {number} y - The Y coordinate of the point to test\n * @return {boolean} Whether the x/y coordinates are within this polygon\n */", "meta": { "range": [ 2419, 3128 ], "filename": "Polygon.js", "lineno": 91, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\math\\shapes", "code": { "id": "astnode100094302", "name": "Polygon#contains", "type": "MethodDefinition", "paramnames": [ "x", "y" ] }, "vars": { "": null } }, "description": "Checks whether the x and y coordinates passed to this function are contained within this polygon
", "params": [ { "type": { "names": [ "number" ] }, "description": "The X coordinate of the point to test
", "name": "x" }, { "type": { "names": [ "number" ] }, "description": "The Y coordinate of the point to test
", "name": "y" } ], "returns": [ { "type": { "names": [ "boolean" ] }, "description": "Whether the x/y coordinates are within this polygon
" } ], "name": "contains", "longname": "PIXI.Polygon#contains", "kind": "function", "memberof": "PIXI.Polygon", "scope": "instance", "___id": "T000002R008801", "___s": true, "skip": true, "slug": "PIXI.Polygoncontains", "filepath": "core\\math\\shapes\\Polygon.js" } ], "$attributes": [ { "comment": "/**\n * An array of the points of this polygon\n *\n * @member {number[]} PIXI.Polygon#points\n */", "meta": { "range": [ 1101, 1227 ], "filename": "Polygon.js", "lineno": 41, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\math\\shapes", "code": {} }, "description": "An array of the points of this polygon
", "kind": "member", "name": "points", "type": { "names": [ "Array." ] }, "memberof": "PIXI.Polygon", "longname": "PIXI.Polygon#points", "scope": "instance", "___id": "T000002R001860", "___s": true, "skip": true, "slug": "PIXI.Polygonpoints", "filepath": "core\\math\\shapes\\Polygon.js" }, { "comment": "/**\n * The type of the object, mainly used to avoid `instanceof` checks\n *\n * @member {number} PIXI.Polygon#type\n * @readOnly\n * @default PIXI.SHAPES.POLY\n * @see PIXI.SHAPES\n */", "meta": { "range": [ 1267, 1501 ], "filename": "Polygon.js", "lineno": 48, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\math\\shapes", "code": {} }, "description": " The type of the object, mainly used to avoid
", "kind": "member", "name": "type", "type": { "names": [ "number" ] }, "readonly": true, "defaultvalue": "PIXI.SHAPES.POLY", "see": [ "PIXI.SHAPES" ], "memberof": "PIXI.Polygon", "longname": "PIXI.Polygon#type", "scope": "instance", "___id": "T000002R001862", "___s": true, "skip": true, "slug": "PIXI.Polygontype", "filepath": "core\\math\\shapes\\Polygon.js" }, { "comment": "/**\n * An array of the points of this polygon\n *\n * @member {number[]} PIXI.Polygon#points\n */", "meta": { "range": [ 1101, 1227 ], "filename": "Polygon.js", "lineno": 41, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\math\\shapes", "code": {} }, "description": "instanceof
checksAn array of the points of this polygon
", "kind": "member", "name": "points", "type": { "names": [ "Array." ] }, "memberof": "PIXI.Polygon", "longname": "PIXI.Polygon#points", "scope": "instance", "___id": "T000002R008794", "___s": true, "skip": true, "slug": "PIXI.Polygonpoints", "filepath": "core\\math\\shapes\\Polygon.js" }, { "comment": "/**\n * The type of the object, mainly used to avoid `instanceof` checks\n *\n * @member {number} PIXI.Polygon#type\n * @readOnly\n * @default PIXI.SHAPES.POLY\n * @see PIXI.SHAPES\n */", "meta": { "range": [ 1267, 1501 ], "filename": "Polygon.js", "lineno": 48, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\math\\shapes", "code": {} }, "description": " The type of the object, mainly used to avoid
", "kind": "member", "name": "type", "type": { "names": [ "number" ] }, "readonly": true, "defaultvalue": "PIXI.SHAPES.POLY", "see": [ "PIXI.SHAPES" ], "memberof": "PIXI.Polygon", "longname": "PIXI.Polygon#type", "scope": "instance", "___id": "T000002R008796", "___s": true, "skip": true, "slug": "PIXI.Polygontype", "filepath": "core\\math\\shapes\\Polygon.js" } ], "$staticmethods": [], "$staticproperties": [], "$augments": [], "$augmentedBy": [], "filepath": "core\\math\\shapes\\Polygon.js" }instanceof
checks