Fields

@:optionaloptionalwidth:Null<Float>

If the Shape is a Rect, it's width will be taken from this value. Otherwise this is ignored.

If this value is set and height isnt, the Rect will use this value for it's height.

@:optionaloptionalvertices:Null<Array<Vector2>>

If the Shape is a Polygon, this will create one in the shape of the vectors passed in. Otherwise this is ignored.

@:optionaloptionaltype:Null<ShapeType>

Enum describing the Shape to create. Currently supports RECT and CIRCLE.

@:optionaloptionalsolid:Null<Bool>

@:optionaloptionalsides:Null<Int>

If the Shape is a Polygon, this will determine how many faces the Polygon will generate. Otherwise this is ignored.

If vertices is set, this will be overriden.

@:optionaloptionalscale_y:Null<Float>

The Shape's scale on the Y axis.

@:optionaloptionalscale_x:Null<Float>

The Shape's scale on the X axis.

@:optionaloptionalrotation:Null<Float>

The Shape's rotation.

@:optionaloptionalradius:Null<Float>

If the Shape is a Circle or Polygon, it's radius will be taken from this value. Otherwise this is ignored.

For Polygon's, this value is ignored if vertices is set.

@:optionaloptionaloffset_y:Null<Float>

The Shape's offset from it's parent Body on the Y-Axis.

@:optionaloptionaloffset_x:Null<Float>

The Shape's offset from it's parent Body on the X-Axis.

@:optionaloptionalheight:Null<Float>

If the Shape is a Rect, it's height will be taken from this value. Otherwise this is ignored.

If this value isnt set and width isnt, the Rect will use its width value for it's height.