Skip to main content

Class: PolygonArray

PathBuilding.PolygonArray(…polygons)

Typed array based on Polygons. Array constructor with length is not available.

Constructor

new PolygonArray(…polygons)

Parameters:
NameTypeAttributesDescription
polygonsVarArgs.<PathBuilding.Polygon><repeatable>
Properties:
NameTypeDescription
boundsCommon.RectUnion of polygons bounds

Since:

  • version 3.0.5

Extends

  • Array

Methods

clone() → PathBuilding.PolygonArray

Clone instance

Returns:

PolygonArray instance

Type

PathBuilding.PolygonArray

push(…polygons)

Parameters:
NameTypeAttributesDescription
polygonsVarArgs.<PathBuilding.Polygon><repeatable>

toJSON() → {JSON}

Serialize to JSON

Returns:

PolygonArray data

Type

JSON

transform(matrix) → PathBuilding.PolygonArray

Transform all polygons

Parameters:
NameTypeDescription
matrixCommon.MatrixTransform matrix
Returns:

poly Transformed polygon

Type

PathBuilding.PolygonArray

transformSelf(matrix)

Self transform all polygons

Parameters:
NameTypeDescription
matrixCommon.MatrixTransform matrix

(static) fromJSON(data) → PathBuilding.PolygonArray

Deserialize from JSON

Parameters:
NameTypeDescription
dataJSONPolygonArray data
Returns:

PolygonArray instance

Type

PathBuilding.PolygonArray

Home