mirror of
https://github.com/photonstorm/phaser
synced 2024-12-22 11:03:23 +00:00
1 line
2 KiB
JSON
1 line
2 KiB
JSON
|
{"class":{"name":"Phaser.Polygon","extends":"","static":false,"constructor":true,"parameters":[{"name":"points","type":["array Phaser.Point","array number"],"help":"The array of Points.","optional":false,"default":null}],"help":"Creates a new Polygon. You have to provide a list of points.\\nThis can be an array of Points that form the polygon, a flat array of numbers that will be interpreted as [x,y, x,y, ...],\\nor the arguments passed can be all the points of the polygon e.g. `new Phaser.Polygon(new Phaser.Point(), new Phaser.Point(), ...)`, or the\\narguments passed can be flat x,y values e.g. `new Phaser.Polygon(x,y, x,y, x,y, ...)` where `x` and `y` are numbers."},"consts":[],"methods":{"public":[{"name":"clone","static":false,"returns":{"types":["Phaser.Polygon"],"help":"The new Polygon object."},"help":"Creates a copy of the given Polygon.\\nThis is a deep clone, the resulting copy contains new Phaser.Point objects","line":40,"public":true,"protected":false,"private":false,"parameters":[{"name":"output","type":["Phaser.Polygon"],"help":" Optional Polygon object. If given the values will be set into this object, otherwise a brand new Polygon object will be created and returned.","optional":true,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"contains","static":false,"returns":{"types":["boolean"],"help":"True if the coordinates are within this polygon, otherwise false."},"help":"Checks whether the x and y coordinates are contained within this polygon.","line":70,"public":true,"protected":false,"private":false,"parameters":[{"name":"x","type":["number"],"help":"The X value of the coordinate to test.","optional":false,"default":null},{"name":"y","type":["number"],"help":"The Y value of the coordinate to test.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""}],"protected":[],"private":[],"static":[]},"properties":{"public":[{"name":"type","type":["number"],"help":"","inlineHelp":"The base object type.","line":23,"default":null,"public":true,"protected":false,"private":false,"readOnly":false}],"protected":[],"private":[]}}
|