@baku89/pave
@baku89/pave - v0.4.1
Namespaces
Other
MultiSegment
Ƭ MultiSegment<V
>: Object
Represents a part of curve that spans multiple vertices.
Type parameters
Name | Type |
---|---|
V | extends Vertex = Vertex |
Type declaration
Name | Type |
---|---|
start | vec2 |
vertices | V [] |
Defined in
Types
Circle
Ƭ Circle: readonly [center: vec2, radius: number]
A circle represented as a tuple of a center and a radius.
Defined in
CommandArgsA
Ƭ CommandArgsA: readonly [radii: vec2, xAxisRotation: number, largeArcFlag: boolean, sweepFlag: boolean]
Arguments for arc (A) command
See
https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths#arcs
Defined in
CommandArgsC
Ƭ CommandArgsC: readonly [control1: vec2, control2: vec2]
Arguments for cubic Bézier curve © command.
See
https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths#curve_commands
Defined in
Curve
Ƭ Curve<V
>: Object
A single open or closed path represented as an array of . All of the points are represented as tuple of vector [x: number, y: number]
and the commands are represented in absolute form.
Type parameters
Name | Type |
---|---|
V | extends Vertex = Vertex |
Type declaration
Name | Type |
---|---|
closed | boolean |
vertices | V [] |
Defined in
CurveA
Defined in
CurveC
Defined in
CurveL
Defined in
Path
Ƭ Path<V
>: Object
A path that consists of multiple curves.
Type parameters
Name | Type |
---|---|
V | extends Vertex = Vertex |
Type declaration
Name | Type |
---|---|
curves | Curve <V >[] |
Defined in
PathA
A path that only consists of arc (A) commands.
See
https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths#curve_commands
Defined in
PathC
A path that only consists of cubic Bézier curve © commands.
See
https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths#curve_commands
Defined in
PathL
A path that only consists of line (L) commands, which is a simple polygon or polyline.
See
https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths#Line_commands
Defined in
Rect
Ƭ Rect: readonly [min: vec2, max: vec2]
A 2D rect represented as a tuple of two diagonal points. It must be guaranteed that the first point is the minimum and the second one is the maximum in the x and y axes.
Defined in
Segment
Ƭ Segment<V
>: V
extends VertexL
? SegmentL
: V
extends VertexC
? SegmentC
: V
extends VertexA
? SegmentA
: SegmentL
| SegmentC
| SegmentA
A segment of a path, which consists of a starting point, end point, and an interpolation command.
Type parameters
Name | Type |
---|---|
V | extends Vertex = Vertex |
Defined in
SegmentA
Ƭ SegmentA: VertexA
& { start
: vec2
}
Defined in
SegmentC
Ƭ SegmentC: VertexC
& { start
: vec2
}
Defined in
SegmentL
Ƭ SegmentL: VertexL
& { start
: vec2
}
Defined in
Vertex
Ƭ Vertex: VertexL
| VertexC
| VertexA
A vertex of a path. It consists of a end point and an interpolation command from the previous vertex, which is either a line (L) command, a cubic Bézier curve © command, or an arc (A) command.
Defined in
VertexA
Ƭ VertexA: Object
A vertex representing an arc (A) command.
See
https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths#arcs
Type declaration
Name | Type |
---|---|
args | CommandArgsA |
command | "A" |
point | vec2 |
Defined in
VertexC
Ƭ VertexC: Object
A vertex representing a cubic Bézier curve © command.
Type declaration
Name | Type |
---|---|
args | CommandArgsC |
command | "C" |
point | vec2 |
Defined in
VertexL
Ƭ VertexL: Object
A vertex representing a line (L) command.
See
https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths#Line_commands
Type declaration
Name | Type |
---|---|
args? | undefined |
command | "L" |
point | vec2 |