mirror of
https://github.com/photonstorm/phaser
synced 2024-12-21 02:23:29 +00:00
1 line
No EOL
12 KiB
JSON
1 line
No EOL
12 KiB
JSON
{"class":{"name":"Phaser.Circle","extends":"","static":false,"constructor":true,"parameters":[{"name":"x","type":["number"],"help":"The x coordinate of the center of the circle.","optional":true,"default":"0"},{"name":"y","type":["number"],"help":"The y coordinate of the center of the circle.","optional":true,"default":"0"},{"name":"diameter","type":["number"],"help":"The diameter of the circle.","optional":true,"default":"0"}],"help":"Creates a new Circle object with the center coordinate specified by the x and y parameters and the diameter specified by the diameter parameter.\\nIf you call this function without parameters, a circle with x, y, diameter and radius properties set to 0 is created."},"consts":[],"methods":{"public":[{"name":"circumference","static":false,"returns":{"types":["number"],"help":""},"help":"The circumference of the circle.","line":63,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"circumferencePoint","static":false,"returns":{"types":["Phaser.Point"],"help":"The Point object holding the result."},"help":"Returns a Point object containing the coordinates of a point on the circumference of the Circle based on the given angle.","line":489,"public":true,"protected":false,"private":false,"parameters":[{"name":"a","type":["Phaser.Circle"],"help":"The first Circle object.","optional":false,"default":null},{"name":"angle","type":["number"],"help":"The angle in radians (unless asDegrees is true) to return the point from.","optional":false,"default":null},{"name":"asDegrees","type":["boolean"],"help":"Is the given angle in radians (false) or degrees (true)?","optional":true,"default":"false"},{"name":"out","type":["Phaser.Point"],"help":"An optional Point object to put the result in to. If none specified a new Point object will be created.","optional":true,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"clone","static":false,"returns":{"types":["Phaser.Circle"],"help":"The cloned Circle object."},"help":"Returns a new Circle object with the same values for the x, y, width, and height properties as this Circle object.","line":152,"public":true,"protected":false,"private":false,"parameters":[{"name":"output","type":["Phaser.Circle"],"help":"Optional Circle object. If given the values will be set into the object, otherwise a brand new Circle object will be created and returned.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"contains","static":false,"returns":{"types":["boolean"],"help":"True if the coordinates are within this circle, otherwise false."},"help":"Return true if the given x\/y coordinates are within the Circle object.","line":440,"public":true,"protected":false,"private":false,"parameters":[{"name":"a","type":["Phaser.Circle"],"help":"The Circle to be checked.","optional":false,"default":null},{"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":""},{"name":"copyFrom","static":false,"returns":{"types":["Phaser.Circle"],"help":"This Circle object."},"help":"Copies the x, y and diameter properties from any given object to this Circle.","line":101,"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 dest object."},"help":"Copies the x, y and diameter properties from this Circle to any given object.","line":113,"public":true,"protected":false,"private":false,"parameters":[{"name":"dest","type":["any"],"help":"The object to copy to.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"distance","static":false,"returns":{"types":["number"],"help":"The distance between this Point object and the destination Point object."},"help":"Returns the distance from the center of the Circle object to the given object\\n(can be Circle, Point or anything with x\/y properties)","line":131,"public":true,"protected":false,"private":false,"parameters":[{"name":"dest","type":["object"],"help":"The target object. Must have visible x and y properties that represent the center of the object.","optional":false,"default":null},{"name":"round","type":["boolean"],"help":"Round the distance to the nearest integer (default false).","optional":true,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"equals","static":false,"returns":{"types":["boolean"],"help":"A value of true if the object has exactly the same values for the x, y and diameter properties as this Circle object; otherwise false."},"help":"Determines whether the two Circle objects match. This method compares the x, y and diameter properties.","line":464,"public":true,"protected":false,"private":false,"parameters":[{"name":"a","type":["Phaser.Circle"],"help":"The first Circle object.","optional":false,"default":null},{"name":"b","type":["Phaser.Circle"],"help":"The second Circle object.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"getBounds","static":false,"returns":{"types":["Phaser.Rectangle"],"help":"The bounds of the Circle."},"help":"Returns the framing rectangle of the circle as a Phaser.Rectangle object","line":72,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"intersects","static":false,"returns":{"types":["boolean"],"help":"A value of true if the specified object intersects with this Circle object; otherwise false."},"help":"Determines whether the two Circle objects intersect.\\nThis method checks the radius distances between the two Circle objects to see if they intersect.","line":476,"public":true,"protected":false,"private":false,"parameters":[{"name":"a","type":["Phaser.Circle"],"help":"The first Circle object.","optional":false,"default":null},{"name":"b","type":["Phaser.Circle"],"help":"The second Circle object.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"intersectsRectangle","static":false,"returns":{"types":["boolean"],"help":"True if the two objects intersect, otherwise false."},"help":"Checks if the given Circle and Rectangle objects intersect.","line":513,"public":true,"protected":false,"private":false,"parameters":[{"name":"c","type":["Phaser.Circle"],"help":"The Circle object to test.","optional":false,"default":null},{"name":"r","type":["Phaser.Rectangle"],"help":"The Rectangle object to test.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"offset","static":false,"returns":{"types":["Phaser.Circle"],"help":"This Circle object."},"help":"Adjusts the location of the Circle object, as determined by its center coordinate, by the specified amounts.","line":201,"public":true,"protected":false,"private":false,"parameters":[{"name":"dx","type":["number"],"help":"Moves the x value of the Circle object by this amount.","optional":false,"default":null},{"name":"dy","type":["number"],"help":"Moves the y value of the Circle object by this amount.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"offsetPoint","static":false,"returns":{"types":["Phaser.Circle"],"help":"This Circle object."},"help":"Adjusts the location of the Circle object using a Point object as a parameter. This method is similar to the Circle.offset() method, except that it takes a Point object as a parameter.","line":216,"public":true,"protected":false,"private":false,"parameters":[{"name":"point","type":["Phaser.Point"],"help":" A Point object to use to offset this Circle object (or any valid object with exposed x and y properties).","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"setTo","static":false,"returns":{"types":["Phaser.Circle"],"help":"This circle object."},"help":"Sets the members of Circle to the specified values.","line":84,"public":true,"protected":false,"private":false,"parameters":[{"name":"x","type":["number"],"help":"The x coordinate of the center of the circle.","optional":false,"default":null},{"name":"y","type":["number"],"help":"The y coordinate of the center of the circle.","optional":false,"default":null},{"name":"diameter","type":["number"],"help":"The diameter of the circle.","optional":false,"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":225,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""}],"protected":[],"private":[],"static":[]},"properties":{"public":[{"name":"area","type":["number"],"help":"The area of this Circle.","inlineHelp":"The area of this circle.","line":392,"default":null,"public":true,"protected":false,"private":false,"readOnly":true},{"name":"bottom","type":["number"],"help":"The sum of the y and radius properties. Changing the bottom property of a Circle object has no effect on the x and y properties, but does change the diameter.","inlineHelp":"Gets or sets the bottom of the circle.","line":364,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"diameter","type":["number"],"help":"The largest distance between any two points on the circle. The same as the radius * 2.","inlineHelp":"Gets or sets the diameter of the circle.","line":238,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"empty","type":["boolean"],"help":"Determines whether or not this Circle object is empty. Will return a value of true if the Circle objects diameter is less than or equal to 0; otherwise false.\\nIf set to true it will reset all of the Circle objects properties to 0. A Circle object is empty if its diameter is less than or equal to 0.","inlineHelp":"Gets or sets the empty state of the circle.","line":415,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"radius","type":["number"],"help":"The length of a line extending from the center of the circle to any point on the circle itself. The same as half the diameter.","inlineHelp":"Gets or sets the radius of the circle.","line":260,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"right","type":["number"],"help":"The x coordinate of the rightmost point of the circle. Changing the right property of a Circle object has no effect on the x and y properties. However it does affect the diameter, whereas changing the x value does not affect the diameter property.","inlineHelp":"Gets or sets the value of the rightmost point of the circle.","line":310,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"top","type":["number"],"help":"The sum of the y minus the radius property. Changing the top property of a Circle object has no effect on the x and y properties, but does change the diameter.","inlineHelp":"Gets or sets the top of the circle.","line":337,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"x","type":["number"],"help":"","inlineHelp":"The x coordinate of the center of the circle.","line":26,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"y","type":["number"],"help":"","inlineHelp":"The y coordinate of the center of the circle.","line":31,"default":null,"public":true,"protected":false,"private":false,"readOnly":false}],"protected":[],"private":[{"name":"_diameter","type":["number"],"help":"","inlineHelp":"The diameter of the circle.","line":37,"default":null,"public":false,"protected":false,"private":true,"readOnly":false},{"name":"_radius","type":["number"],"help":"","inlineHelp":"The radius of the circle.","line":45,"default":null,"public":false,"protected":false,"private":true,"readOnly":false}]}} |