@baku89/pave

@baku89/pave - v0.4.1

Namespaces

Other

MultiSegment

Ƭ MultiSegment<V>: Object

Represents a part of curve that spans multiple vertices.

Type parameters

NameType
Vextends Vertex = Vertex

Type declaration

NameType
startvec2
verticesV[]

Defined in

MultiSegment.ts:7open in new window

MultiSegment.ts:15open in new window


Types

Circle

Ƭ Circle: readonly [center: vec2, radius: number]

A circle represented as a tuple of a center and a radius.

Defined in

Circle.ts:7open in new window

Circle.ts:12open in new window


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#arcsopen in new window

Defined in

Path.ts:32open in new window


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_commandsopen in new window

Defined in

Path.ts:25open in new window


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

NameType
Vextends Vertex = Vertex

Type declaration

NameType
closedboolean
verticesV[]

Defined in

Curve.ts:16open in new window

Curve.ts:30open in new window


CurveA

Ƭ CurveA: Curve<VertexA>

Defined in

Curve.ts:28open in new window


CurveC

Ƭ CurveC: Curve<VertexC>

Defined in

Curve.ts:25open in new window


CurveL

Ƭ CurveL: Curve<VertexL>

Defined in

Curve.ts:22open in new window


Path

Ƭ Path<V>: Object

A path that consists of multiple curves.

Type parameters

NameType
Vextends Vertex = Vertex

Type declaration

NameType
curvesCurve<V>[]

Defined in

Path.ts:93open in new window

Path.ts:153open in new window


PathA

Ƭ PathA: Path<VertexA>

A path that only consists of arc (A) commands.

See

https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths#curve_commandsopen in new window

Defined in

Path.ts:116open in new window


PathC

Ƭ PathC: Path<VertexC>

A path that only consists of cubic Bézier curve © commands.

See

https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths#curve_commandsopen in new window

Defined in

Path.ts:109open in new window


PathL

Ƭ PathL: Path<VertexL>

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_commandsopen in new window

Defined in

Path.ts:102open in new window


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

Rect.ts:7open in new window

Rect.ts:12open in new window


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

NameType
Vextends Vertex = Vertex

Defined in

Segment.ts:15open in new window

Segment.ts:32open in new window


SegmentA

Ƭ SegmentA: VertexA & { start: vec2 }

Defined in

Segment.ts:30open in new window


SegmentC

Ƭ SegmentC: VertexC & { start: vec2 }

Defined in

Segment.ts:27open in new window


SegmentL

Ƭ SegmentL: VertexL & { start: vec2 }

Defined in

Segment.ts:24open in new window


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

Path.ts:55open in new window


VertexA

Ƭ VertexA: Object

A vertex representing an arc (A) command.

See

https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths#arcsopen in new window

Type declaration

NameType
argsCommandArgsA
command"A"
pointvec2

Defined in

Path.ts:83open in new window


VertexC

Ƭ VertexC: Object

A vertex representing a cubic Bézier curve © command.

Type declaration

NameType
argsCommandArgsC
command"C"
pointvec2

Defined in

Path.ts:72open in new window


VertexL

Ƭ VertexL: Object

A vertex representing a line (L) command.

See

https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths#Line_commandsopen in new window

Type declaration

NameType
args?undefined
command"L"
pointvec2

Defined in

Path.ts:62open in new window