mirror of
https://github.com/photonstorm/phaser
synced 2024-12-21 02:23:29 +00:00
1 line
No EOL
22 KiB
JSON
1 line
No EOL
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.","optional":false,"default":null},{"name":"point","type":["Phaser.Point"],"help":"The point object being checked. Can be Point or any object with .x and .y values.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"containsRaw","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 the given raw values.","line":724,"public":true,"protected":false,"private":false,"parameters":[{"name":"rx","type":["number"],"help":"The x coordinate of the top left of the area.","optional":false,"default":null},{"name":"ry","type":["number"],"help":"The y coordinate of the top left of the area.","optional":false,"default":null},{"name":"rw","type":["number"],"help":"The width of the area.","optional":false,"default":null},{"name":"rh","type":["number"],"help":"The height of the area.","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":"containsRect","static":false,"returns":{"types":["boolean"],"help":"A value of true if the Rectangle object contains the specified point; otherwise false."},"help":"Determines whether the first Rectangle object is fully contained within the second Rectangle object.\\nA Rectangle object is said to contain another if the second Rectangle object falls entirely within the boundaries of the first.","line":751,"public":true,"protected":false,"private":false,"parameters":[{"name":"a","type":["Phaser.Rectangle"],"help":"The first Rectangle object.","optional":false,"default":null},{"name":"b","type":["Phaser.Rectangle"],"help":"The second Rectangle object.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"copyFrom","static":false,"returns":{"types":["Phaser.Rectangle"],"help":"This Rectangle object."},"help":"Copies the x, y, width and height properties from any given object to this Rectangle.","line":163,"public":true,"protected":false,"private":false,"parameters":[{"name":"source","type":["any"],"help":"The object to copy from.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"copyTo","static":false,"returns":{"types":["object"],"help":"This object."},"help":"Copies the x, y, width and height properties from this Rectangle to any given object.","line":175,"public":true,"protected":false,"private":false,"parameters":[{"name":"source","type":["any"],"help":"The object to copy to.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"equals","static":false,"returns":{"types":["boolean"],"help":"A value of true if the two Rectangles have exactly the same values for the x, y, width and height properties; otherwise false."},"help":"Determines whether the two Rectangles are equal.\\nThis method compares the x, y, width and height properties of each Rectangle.","line":771,"public":true,"protected":false,"private":false,"parameters":[{"name":"a","type":["Phaser.Rectangle"],"help":"The first Rectangle object.","optional":false,"default":null},{"name":"b","type":["Phaser.Rectangle"],"help":"The second Rectangle object.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"floor","static":false,"returns":null,"help":"Runs Math.floor() on both the x and y values of this Rectangle.","line":137,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"floorAll","static":false,"returns":null,"help":"Runs Math.floor() on the x, y, width and height values of this Rectangle.","line":148,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"inflate","static":false,"returns":{"types":["Phaser.Rectangle"],"help":"This Rectangle object."},"help":"Increases the size of the Rectangle object by the specified amounts. The center point of the Rectangle object stays the same, and its size increases to the left and right by the dx value, and to the top and the bottom by the dy value.","line":626,"public":true,"protected":false,"private":false,"parameters":[{"name":"a","type":["Phaser.Rectangle"],"help":"The Rectangle object.","optional":false,"default":null},{"name":"dx","type":["number"],"help":"The amount to be added to the left side of the Rectangle.","optional":false,"default":null},{"name":"dy","type":["number"],"help":"The amount to be added to the bottom side of the Rectangle.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"inflatePoint","static":false,"returns":{"types":["Phaser.Rectangle"],"help":"The Rectangle object."},"help":"Increases the size of the Rectangle object. This method is similar to the Rectangle.inflate() method except it takes a Point object as a parameter.","line":644,"public":true,"protected":false,"private":false,"parameters":[{"name":"a","type":["Phaser.Rectangle"],"help":"The Rectangle object.","optional":false,"default":null},{"name":"point","type":["Phaser.Point"],"help":"The x property of this Point object is used to increase the horizontal dimension of the Rectangle object. The y property is used to increase the vertical dimension of the Rectangle object.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"intersection","static":false,"returns":{"types":["Phaser.Rectangle"],"help":"A Rectangle object that equals the area of intersection. If the Rectangles do not intersect, this method returns an empty Rectangle object; that is, a Rectangle with its x, y, width, and height properties set to 0."},"help":"If the Rectangle object specified in the toIntersect parameter intersects with this Rectangle object, returns the area of intersection as a Rectangle object. If the Rectangles do not intersect, this method returns an empty Rectangle object with its properties set to 0.","line":785,"public":true,"protected":false,"private":false,"parameters":[{"name":"a","type":["Phaser.Rectangle"],"help":"The first Rectangle object.","optional":false,"default":null},{"name":"b","type":["Phaser.Rectangle"],"help":"The second Rectangle object.","optional":false,"default":null},{"name":"output","type":["Phaser.Rectangle"],"help":"Optional Rectangle object. If given the intersection values will be set into this object, otherwise a brand new Rectangle object will be created and returned.","optional":true,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"intersects","static":false,"returns":{"types":["boolean"],"help":"A value of true if the specified object intersects with this Rectangle object; otherwise false."},"help":"Determines whether the two Rectangles intersect with each other.\\nThis method checks the x, y, width, and height properties of the Rectangles.","line":812,"public":true,"protected":false,"private":false,"parameters":[{"name":"a","type":["Phaser.Rectangle"],"help":"The first Rectangle object.","optional":false,"default":null},{"name":"b","type":["Phaser.Rectangle"],"help":"The second Rectangle object.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"intersectsRaw","static":false,"returns":{"types":["boolean"],"help":"A value of true if the specified object intersects with the Rectangle; otherwise false."},"help":"Determines whether the object specified intersects (overlaps) with the given values.","line":833,"public":true,"protected":false,"private":false,"parameters":[{"name":"left","type":["number"],"help":"The x coordinate of the left of the area.","optional":false,"default":null},{"name":"right","type":["number"],"help":"The right coordinate of the area.","optional":false,"default":null},{"name":"top","type":["number"],"help":"The y coordinate of the area.","optional":false,"default":null},{"name":"bottom","type":["number"],"help":"The bottom coordinate of the area.","optional":false,"default":null},{"name":"tolerance","type":["number"],"help":"A tolerance value to allow for an intersection test with padding, default to 0","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"offset","static":false,"returns":{"types":["Phaser.Rectangle"],"help":"This Rectangle object."},"help":"Adjusts the location of the Rectangle object, as determined by its top-left corner, by the specified amounts.","line":56,"public":true,"protected":false,"private":false,"parameters":[{"name":"dx","type":["number"],"help":"Moves the x value of the Rectangle object by this amount.","optional":false,"default":null},{"name":"dy","type":["number"],"help":"Moves the y value of the Rectangle object by this amount.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"offsetPoint","static":false,"returns":{"types":["Phaser.Rectangle"],"help":"This Rectangle object."},"help":"Adjusts the location of the Rectangle object using a Point object as a parameter. This method is similar to the Rectangle.offset() method, except that it takes a Point object as a parameter.","line":71,"public":true,"protected":false,"private":false,"parameters":[{"name":"point","type":["Phaser.Point"],"help":"A Point object to use to offset this Rectangle object.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"scale","static":false,"returns":{"types":["Phaser.Rectangle"],"help":"This Rectangle object"},"help":"Scales the width and height of this Rectangle by the given amounts.","line":105,"public":true,"protected":false,"private":false,"parameters":[{"name":"x","type":["number"],"help":"The amount to scale the width of the Rectangle by. A value of 0.5 would reduce by half, a value of 2 would double the width, etc.","optional":false,"default":null},{"name":"y","type":["number"],"help":"The amount to scale the height of the Rectangle by. A value of 0.5 would reduce by half, a value of 2 would double the height, etc.","optional":true,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"setTo","static":false,"returns":{"types":["Phaser.Rectangle"],"help":"This Rectangle object"},"help":"Sets the members of Rectangle to the specified values.","line":86,"public":true,"protected":false,"private":false,"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}],"inherited":false,"inheritedFrom":""},{"name":"size","static":false,"returns":{"types":["Phaser.Point"],"help":"The size of the Rectangle object"},"help":"The size of the Rectangle object, expressed as a Point object with the values of the width and height properties.","line":657,"public":true,"protected":false,"private":false,"parameters":[{"name":"a","type":["Phaser.Rectangle"],"help":"The Rectangle object.","optional":false,"default":null},{"name":"output","type":["Phaser.Point"],"help":"Optional Point object. If given the values will be set into the object, otherwise a brand new Point object will be created and returned.","optional":true,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"toString","static":false,"returns":{"types":["string"],"help":"A string representation of the instance."},"help":"Returns a string representation of this object.","line":324,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"union","static":false,"returns":{"types":["Phaser.Rectangle"],"help":"A Rectangle object that is the union of the two Rectangles."},"help":"Adds two Rectangles together to create a new Rectangle object, by filling in the horizontal and vertical space between the two Rectangles.","line":849,"public":true,"protected":false,"private":false,"parameters":[{"name":"a","type":["Phaser.Rectangle"],"help":"The first Rectangle object.","optional":false,"default":null},{"name":"b","type":["Phaser.Rectangle"],"help":"The second Rectangle object.","optional":false,"default":null},{"name":"output","type":["Phaser.Rectangle"],"help":"Optional Rectangle object. If given the new values will be set into this object, otherwise a brand new Rectangle object will be created and returned.","optional":true,"default":null}],"inherited":false,"inheritedFrom":""}],"protected":[],"private":[],"static":[]},"properties":{"public":[{"name":"bottom","type":["number"],"help":"The sum of the y and height properties. Changing the bottom property of a Rectangle object has no effect on the x, y and width properties, but does change the height property.","inlineHelp":"The sum of the y and height properties.","line":363,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"bottomRight","type":["Phaser.Point"],"help":"The location of the Rectangles bottom right corner as a Point object.","inlineHelp":"Gets or sets the location of the Rectangles bottom right corner as a Point object.","line":384,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"centerX","type":["number"],"help":"The x coordinate of the center of the Rectangle.","inlineHelp":"The x coordinate of the center of the Rectangle.","line":473,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"centerY","type":["number"],"help":"The y coordinate of the center of the Rectangle.","inlineHelp":"The y coordinate of the center of the Rectangle.","line":490,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"empty","type":["boolean"],"help":"Determines whether or not this Rectangle object is empty. A Rectangle object is empty if its width or height is less than or equal to 0.\\nIf set to true then all of the Rectangle properties are set to 0.","inlineHelp":"Gets or sets the Rectangles empty state.","line":599,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"halfHeight","type":["number"],"help":"","inlineHelp":"Half of the height of the Rectangle.","line":350,"default":null,"public":true,"protected":false,"private":false,"readOnly":true},{"name":"halfWidth","type":["number"],"help":"","inlineHelp":"Half of the width of the Rectangle.","line":337,"default":null,"public":true,"protected":false,"private":false,"readOnly":true},{"name":"height","type":["number"],"help":"","inlineHelp":"The height of the Rectangle. This value should never be set to a negative.","line":43,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"left","type":["number"],"help":"The x coordinate of the left of the Rectangle. Changing the left property of a Rectangle object has no effect on the y and height properties. However it does affect the width property, whereas changing the x value does not affect the width property.","inlineHelp":"The x coordinate of the left of the Rectangle.","line":402,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"perimeter","type":["number"],"help":"The perimeter size of the Rectangle. This is the sum of all 4 sides.","inlineHelp":"The perimeter size of the Rectangle. This is the sum of all 4 sides.","line":460,"default":null,"public":true,"protected":false,"private":false,"readOnly":true},{"name":"randomX","type":["number"],"help":"A random value between the left and right values (inclusive) of the Rectangle.","inlineHelp":"A random value between the left and right values (inclusive) of the Rectangle.","line":508,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"randomY","type":["number"],"help":"A random value between the top and bottom values (inclusive) of the Rectangle.","inlineHelp":"A random value between the top and bottom values (inclusive) of the Rectangle.","line":524,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"right","type":["number"],"help":"The sum of the x and width properties. Changing the right property of a Rectangle object has no effect on the x, y and height properties, however it does affect the width property.","inlineHelp":"The sum of the x and width properties.","line":424,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"top","type":["number"],"help":"The y coordinate of the top of the Rectangle. Changing the top property of a Rectangle object has no effect on the x and width properties.\\nHowever it does affect the height property, whereas changing the y value does not affect the height property.","inlineHelp":"The y coordinate of the top of the Rectangle.","line":540,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"topLeft","type":["Phaser.Point"],"help":"The location of the Rectangles top left corner as a Point object.","inlineHelp":"The location of the Rectangles top left corner as a Point object.","line":562,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"topRight","type":["Phaser.Point"],"help":"The location of the Rectangles top right corner as a Point object.","inlineHelp":"The location of the Rectangles top left corner as a Point object.","line":580,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"volume","type":["number"],"help":"The volume of the Rectangle derived from width * height.","inlineHelp":"The volume of the Rectangle derived from width * height.","line":446,"default":null,"public":true,"protected":false,"private":false,"readOnly":true},{"name":"width","type":["number"],"help":"","inlineHelp":"The width of the Rectangle. This value should never be set to a negative.","line":38,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"x","type":["number"],"help":"","inlineHelp":"The x coordinate of the top-left corner of the Rectangle.","line":28,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"y","type":["number"],"help":"","inlineHelp":"The y coordinate of the top-left corner of the Rectangle.","line":33,"default":null,"public":true,"protected":false,"private":false,"readOnly":false}],"protected":[],"private":[]}} |