Vertexes
The Vertexes class stores polygon vertex data used by the renderer.
Methods
constructor(array?: Vertex[])Vertexes
Creates a new Vertexes instance.
arrayVertex[] (optional) - The array.
Returned:
- Vertexes - The result of the call.
Push(vert: Vertex)this
Pushes the push.
vertVertex - The vert.
Returned:
- this - The current instance for chaining.
Pop()this
Pops the pop.
Returned:
- this - The current instance for chaining.
Set(index: number, vert: Vertex)void
Sets the set.
indexnumber - The index.vertVertex - The vert.
Get(index: number)Vertex
Retrieves the get.
indexnumber - The index.
Returned:
- Vertex - The requested value.
Length()number
Provides access to length.
Returned:
- number - The result of the call.
Reserve(newSize: number)this
Provides access to reserve.
newSizenumber - The new size.
Returned:
- this - The current instance for chaining.
PushCircle(centerX: number, centerY: number, radius: number, startAngle?: number, endAngle?: number, segmentCount?: number)this
Pushes the circle.
centerXnumber - The center x.centerYnumber - The center y.radiusnumber - The radius.startAnglenumber (optional) - 0endAnglenumber (optional) - 360segmentCountnumber (optional) - 20
Returned:
- this - The current instance for chaining.
PushRoundRect(x: number, y: number, w: number, h: number, roundSize: number, segmentCount: number)this
Pushes the round rect.
xnumber - The x coordinate.ynumber - The y coordinate.wnumber - The w.hnumber - The h.roundSizenumber - corner rounding size in pixels, does not change the width and heightsegmentCountnumber - The segment count.
Returned:
- this - The current instance for chaining.
PushRect(x: number, y: number, w: number, h: number)this
Pushes the rect.
xnumber - The x coordinate.ynumber - The y coordinate.wnumber - The w.hnumber - The h.
Returned:
- this - The current instance for chaining.
ScaleUV(valX: number, valY: number)this
Provides access to scale uv.
valXnumber - The val x.valYnumber - The val y.
Returned:
- this - The current instance for chaining.