Creates a Ellipse object. A curve on a plane surrounding two focal points.
Name | Type | Argument | Default | Description |
---|---|---|---|---|
x | number | <optional> | 0 | The X coordinate of the upper-left corner of the framing rectangle of this ellipse. |
y | number | <optional> | 0 | The Y coordinate of the upper-left corner of the framing rectangle of this ellipse. |
width | number | <optional> | 0 | The overall width of this ellipse. |
height | number | <optional> | 0 | The overall height of this ellipse. |
The sum of the y and height properties. Changing the bottom property of an Ellipse doesn't adjust the y property, but does change the height. Gets or sets the bottom of the ellipse.
Determines whether or not this Ellipse object is empty. Will return a value of true if the Ellipse objects dimensions are less than or equal to 0; otherwise false.
If set to true it will reset all of the Ellipse objects properties to 0. An Ellipse object is empty if its width or height is less than or equal to 0. Gets or sets the empty state of the ellipse.
The overall height of this ellipse.
The left coordinate of the Ellipse. The same as the X coordinate.
The x coordinate of the rightmost point of the Ellipse. Changing the right property of an Ellipse object has no effect on the x property, but does adjust the width. Gets or sets the value of the rightmost point of the ellipse.
The top of the Ellipse. The same as its y property. Gets or sets the top of the ellipse.
The const type of this object.
The overall width of this ellipse.
The X coordinate of the upper-left corner of the framing rectangle of this ellipse.
The Y coordinate of the upper-left corner of the framing rectangle of this ellipse.
Return true if the given x/y coordinates are within the Ellipse object.
Name | Type | Description |
---|---|---|
a | Phaser.Ellipse | The Ellipse to be checked. |
x | number | The X value of the coordinate to test. |
y | number | The Y value of the coordinate to test. |
True if the coordinates are within this ellipse, otherwise false.
Returns a new Ellipse object with the same values for the x, y, width, and height properties as this Ellipse object.
Name | Type | Description |
---|---|---|
output | Phaser.Ellipse | Optional Ellipse object. If given the values will be set into the object, otherwise a brand new Ellipse object will be created and returned. |
The cloned Ellipse object.
Return true if the given x/y coordinates are within this Ellipse object.
Name | Type | Description |
---|---|---|
x | number | The X value of the coordinate to test. |
y | number | The Y value of the coordinate to test. |
True if the coordinates are within this ellipse, otherwise false.
Copies the x, y, width and height properties from any given object to this Ellipse.
Name | Type | Description |
---|---|---|
source | any | The object to copy from. |
This Ellipse object.
Copies the x, y, width and height properties from this Ellipse to any given object.
Name | Type | Description |
---|---|---|
dest | any | The object to copy to. |
This dest object.
Returns the framing rectangle of the ellipse as a Phaser.Rectangle object.
The bounds of the Ellipse.
Returns a uniformly distributed random point from anywhere within this Ellipse.
Name | Type | Argument | Description |
---|---|---|---|
out | Phaser.Point | object | <optional> | A Phaser.Point, or any object with public x/y properties, that the values will be set in. |
An object containing the random point in its x
and y
properties.
Sets the members of the Ellipse to the specified values.
Name | Type | Description |
---|---|---|
x | number | The X coordinate of the upper-left corner of the framing rectangle of this ellipse. |
y | number | The Y coordinate of the upper-left corner of the framing rectangle of this ellipse. |
width | number | The overall width of this ellipse. |
height | number | The overall height of this ellipse. |
This Ellipse object.
Returns a string representation of this object.
A string representation of the instance.
© 2016 Richard Davey, Photon Storm Ltd.
Licensed under the MIT License.
http://phaser.io/docs/2.6.2/Phaser.Ellipse.html