mirror of
https://github.com/photonstorm/phaser
synced 2024-12-23 19:43:28 +00:00
1 line
22 KiB
JSON
1 line
22 KiB
JSON
|
{"class":{"name":"Phaser.Rectangle","extends":"","static":false,"constructor":true,"parameters":[{"name":"x","type":["number"],"help":"The x coordinate of the top-left corner of the Rectangle.","optional":false,"default":null},{"name":"y","type":["number"],"help":"The y coordinate of the top-left corner of the Rectangle.","optional":false,"default":null},{"name":"width","type":["number"],"help":"The width of the Rectangle. Should always be either zero or a positive value.","optional":false,"default":null},{"name":"height","type":["number"],"help":"The height of the Rectangle. Should always be either zero or a positive value.","optional":false,"default":null}],"help":"Creates a new Rectangle object with the top-left corner specified by the x and y parameters and with the specified width and height parameters.\\nIf you call this function without parameters, a Rectangle with x, y, width, and height properties set to 0 is created."},"consts":[],"methods":{"public":[{"name":"aabb","static":true,"returns":{"types":["Phaser.Rectangle"],"help":"The new Rectangle object."},"help":"Calculates the Axis Aligned Bounding Box (or aabb) from an array of points.","line":869,"public":true,"protected":false,"private":false,"parameters":[{"name":"points","type":["array Phaser.Point"],"help":"The array of one or more points.","optional":false,"default":null},{"name":"out","type":["Phaser.Rectangle"],"help":"Optional Rectangle to store the value in, if not supplied a new Rectangle object will be created.","optional":true,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"centerOn","static":false,"returns":{"types":["Phaser.Rectangle"],"help":"This Rectangle object"},"help":"Centers this Rectangle so that the center coordinates match the given x and y values.","line":124,"public":true,"protected":false,"private":false,"parameters":[{"name":"x","type":["number"],"help":"The x coordinate to place the center of the Rectangle at.","optional":false,"default":null},{"name":"y","type":["number"],"help":"The y coordinate to place the center of the Rectangle at.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"clone","static":false,"returns":{"types":["Phaser.Rectangle"],"help":""},"help":"Returns a new Rectangle object with the same values for the x, y, width, and height properties as the original Rectangle object.","line":679,"public":true,"protected":false,"private":false,"parameters":[{"name":"a","type":["Phaser.Rectangle"],"help":"The Rectangle object.","optional":false,"default":null},{"name":"output","type":["Phaser.Rectangle"],"help":"Optional Rectangle object. If given the values will be set into the object, otherwise a brand new Rectangle object will be created and returned.","optional":true,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"contains","static":false,"returns":{"types":["boolean"],"help":"A value of true if the Rectangle object contains the specified point; otherwise false."},"help":"Determines whether the specified coordinates are contained within the region defined by this Rectangle object.","line":702,"public":true,"protected":false,"private":false,"parameters":[{"name":"a","type":["Phaser.Rectangle"],"help":"The Rectangle object.","optional":false,"default":null},{"name":"x","type":["number"],"help":"The x coordinate of the point to test.","optional":false,"default":null},{"name":"y","type":["number"],"help":"The y coordinate of the point to test.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"containsPoint","static":false,"returns":{"types":["boolean"],"help":"A value of true if the Rectangle object contains the specified point; otherwise false."},"help":"Determines whether the specified point is contained within the rectangular region defined by this Rectangle object. This method is similar to the Rectangle.contains() method, except that it takes a Point object as a parameter.","line":737,"public":true,"protected":false,"private":false,"parameters":[{"name":"a","type":["Phaser.Rectangle"],"help":"The Rectangle object.","option
|