Skip to content

Class: Shape2D

Hierarchy

Constructors

Properties

Methods

Constructors

constructor

new Shape2D(points?): Shape2D

Parameters

NameType
points?Vector2[]

Returns

Shape2D

Overrides

Path2D.constructor

Defined in

packages/geometry/ExtrudeGeometry/Shape2D.ts:8

Properties

autoClose

autoClose: boolean = false

Inherited from

Path2D.autoClose

Defined in

packages/geometry/ExtrudeGeometry/Path2D.ts:9


holes

holes: Path2D[] = []

Defined in

packages/geometry/ExtrudeGeometry/Shape2D.ts:6

Methods

getPoints

getPoints(divisions): Vector2[]

Parameters

NameType
divisionsnumber

Returns

Vector2[]

Inherited from

Path2D.getPoints

Defined in

packages/geometry/ExtrudeGeometry/Path2D.ts:20


setFromPoints

setFromPoints(points): Shape2D

Parameters

NameType
pointsVector2[]

Returns

Shape2D

Inherited from

Path2D.setFromPoints

Defined in

packages/geometry/ExtrudeGeometry/Path2D.ts:52


moveTo

moveTo(x, y): Shape2D

Parameters

NameType
xnumber
ynumber

Returns

Shape2D

Inherited from

Path2D.moveTo

Defined in

packages/geometry/ExtrudeGeometry/Path2D.ts:60


lineTo

lineTo(x, y): Shape2D

Parameters

NameType
xnumber
ynumber

Returns

Shape2D

Inherited from

Path2D.lineTo

Defined in

packages/geometry/ExtrudeGeometry/Path2D.ts:65


quadraticCurveTo

quadraticCurveTo(cpX, cpY, x, y): Shape2D

Parameters

NameType
cpXnumber
cpYnumber
xnumber
ynumber

Returns

Shape2D

Inherited from

Path2D.quadraticCurveTo

Defined in

packages/geometry/ExtrudeGeometry/Path2D.ts:71


bezierCurveTo

bezierCurveTo(cp1X, cp1Y, cp2X, cp2Y, x, y): Shape2D

Parameters

NameType
cp1Xnumber
cp1Ynumber
cp2Xnumber
cp2Ynumber
xnumber
ynumber

Returns

Shape2D

Inherited from

Path2D.bezierCurveTo

Defined in

packages/geometry/ExtrudeGeometry/Path2D.ts:77


isIntersect

isIntersect(path): boolean

Parameters

NameType
pathPath2D

Returns

boolean

Inherited from

Path2D.isIntersect

Defined in

packages/geometry/ExtrudeGeometry/Path2D.ts:83


pointInPolygon

pointInPolygon(point, polygon): boolean

Parameters

NameType
pointVector2
polygonVector2[]

Returns

boolean

Inherited from

Path2D.pointInPolygon

Defined in

packages/geometry/ExtrudeGeometry/Path2D.ts:89


extractPoints

extractPoints(divisions): Object

Parameters

NameType
divisionsnumber

Returns

Object

NameType
shapeVector2[]
holesVector2[][]

Defined in

packages/geometry/ExtrudeGeometry/Shape2D.ts:12


getPointsHoles

getPointsHoles(divisions): Vector2[][]

Parameters

NameType
divisionsnumber

Returns

Vector2[][]

Defined in

packages/geometry/ExtrudeGeometry/Shape2D.ts:19

Released under the MIT License