the center x coordinate of the ellipse
the center y coordinate of the ellipse
width (diameter) of the ellipse
height (diameter) of the ellipse
OptionalcollisionOptionalcollisionOptional per-shape collision settings, honoured by Body#addShape
and defaulted there. Declared rather than initialized: the body writes
them when the shape joins it, so a class field here would emit an
undefined own property on every shape ever built. See addShape for
the table of defaults and what each one does.
Optionalisfalse takes this shape out of collision without removing it
Optionalistrue reports contacts but skips the position correction
the center coordinates of the ellipse
Maximum radius of the ellipse
Pre-scaled radius vector for ellipse
x/y scaling ratio for ellipse
the shape type (used internally)
the rotation angle of the ellipse in radians
returns the bounding box for this shape, the smallest Rectangle object completely containing this shape.
this shape bounding box Rectangle object
Scale this Ellipse by the specified scalar.
The rotation is kept, and the factors apply along the ellipse's own
axes: on a rotated ellipse x scales the radius that was radiusV.x
before the rotation, wherever it now points.
the scale factor along the x-axis
Optionaly: number = x
the scale factor along the y-axis
Reference to this object for method chaining
set new value to the Ellipse shape
the center x coordinate of the ellipse
the center y coordinate of the ellipse
width (diameter) of the ellipse
height (diameter) of the ellipse
this instance for object chaining
Returns a polygon approximation of this ellipse. The polygon is cached and only recomputed when the ellipse shape changes.
Optionalsegments: number = 16
the number of segments to use for the approximation
a Polygon representing this ellipse
update the bounding box for this ellipse, taking rotation into account.
Call it after changing pos directly; setShape, translate, scale
and rotate already do.
this shape bounding box Rectangle object
an ellipse Object