Class: Shape2D
Hierarchy
↳
Shape2D
Constructors
Properties
Methods
- getPoints
- setFromPoints
- moveTo
- lineTo
- quadraticCurveTo
- bezierCurveTo
- isIntersect
- pointInPolygon
- extractPoints
- getPointsHoles
Constructors
constructor
• new Shape2D(points?
): Shape2D
Parameters
Name | Type |
---|---|
points? | Vector2 [] |
Returns
Overrides
Defined in
packages/geometry/ExtrudeGeometry/Shape2D.ts:8
Properties
autoClose
• autoClose: boolean
= false
Inherited from
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
Name | Type |
---|---|
divisions | number |
Returns
Vector2
[]
Inherited from
Defined in
packages/geometry/ExtrudeGeometry/Path2D.ts:20
setFromPoints
▸ setFromPoints(points
): Shape2D
Parameters
Name | Type |
---|---|
points | Vector2 [] |
Returns
Inherited from
Defined in
packages/geometry/ExtrudeGeometry/Path2D.ts:52
moveTo
▸ moveTo(x
, y
): Shape2D
Parameters
Name | Type |
---|---|
x | number |
y | number |
Returns
Inherited from
Defined in
packages/geometry/ExtrudeGeometry/Path2D.ts:60
lineTo
▸ lineTo(x
, y
): Shape2D
Parameters
Name | Type |
---|---|
x | number |
y | number |
Returns
Inherited from
Defined in
packages/geometry/ExtrudeGeometry/Path2D.ts:65
quadraticCurveTo
▸ quadraticCurveTo(cpX
, cpY
, x
, y
): Shape2D
Parameters
Name | Type |
---|---|
cpX | number |
cpY | number |
x | number |
y | number |
Returns
Inherited from
Defined in
packages/geometry/ExtrudeGeometry/Path2D.ts:71
bezierCurveTo
▸ bezierCurveTo(cp1X
, cp1Y
, cp2X
, cp2Y
, x
, y
): Shape2D
Parameters
Name | Type |
---|---|
cp1X | number |
cp1Y | number |
cp2X | number |
cp2Y | number |
x | number |
y | number |
Returns
Inherited from
Defined in
packages/geometry/ExtrudeGeometry/Path2D.ts:77
isIntersect
▸ isIntersect(path
): boolean
Parameters
Name | Type |
---|---|
path | Path2D |
Returns
boolean
Inherited from
Defined in
packages/geometry/ExtrudeGeometry/Path2D.ts:83
pointInPolygon
▸ pointInPolygon(point
, polygon
): boolean
Parameters
Name | Type |
---|---|
point | Vector2 |
polygon | Vector2 [] |
Returns
boolean
Inherited from
Defined in
packages/geometry/ExtrudeGeometry/Path2D.ts:89
extractPoints
▸ extractPoints(divisions
): Object
Parameters
Name | Type |
---|---|
divisions | number |
Returns
Object
Name | Type |
---|---|
shape | Vector2 [] |
holes | Vector2 [][] |
Defined in
packages/geometry/ExtrudeGeometry/Shape2D.ts:12
getPointsHoles
▸ getPointsHoles(divisions
): Vector2
[][]
Parameters
Name | Type |
---|---|
divisions | number |
Returns
Vector2
[][]