Skip to content

Class: Path2D

Hierarchy

Constructors

Properties

Methods

Constructors

constructor

new Path2D(points?): Path2D

Parameters

NameType
points?Vector2[]

Returns

Path2D

Defined in

packages/geometry/ExtrudeGeometry/Path2D.ts:14

Properties

autoClose

autoClose: boolean = false

Defined in

packages/geometry/ExtrudeGeometry/Path2D.ts:9

Methods

getPoints

getPoints(divisions): Vector2[]

Parameters

NameType
divisionsnumber

Returns

Vector2[]

Defined in

packages/geometry/ExtrudeGeometry/Path2D.ts:20


setFromPoints

setFromPoints(points): Path2D

Parameters

NameType
pointsVector2[]

Returns

Path2D

Defined in

packages/geometry/ExtrudeGeometry/Path2D.ts:52


moveTo

moveTo(x, y): Path2D

Parameters

NameType
xnumber
ynumber

Returns

Path2D

Defined in

packages/geometry/ExtrudeGeometry/Path2D.ts:60


lineTo

lineTo(x, y): Path2D

Parameters

NameType
xnumber
ynumber

Returns

Path2D

Defined in

packages/geometry/ExtrudeGeometry/Path2D.ts:65


quadraticCurveTo

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

Parameters

NameType
cpXnumber
cpYnumber
xnumber
ynumber

Returns

Path2D

Defined in

packages/geometry/ExtrudeGeometry/Path2D.ts:71


bezierCurveTo

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

Parameters

NameType
cp1Xnumber
cp1Ynumber
cp2Xnumber
cp2Ynumber
xnumber
ynumber

Returns

Path2D

Defined in

packages/geometry/ExtrudeGeometry/Path2D.ts:77


isIntersect

isIntersect(path): boolean

Parameters

NameType
pathPath2D

Returns

boolean

Defined in

packages/geometry/ExtrudeGeometry/Path2D.ts:83


pointInPolygon

pointInPolygon(point, polygon): boolean

Parameters

NameType
pointVector2
polygonVector2[]

Returns

boolean

Defined in

packages/geometry/ExtrudeGeometry/Path2D.ts:89

Released under the MIT License