vgpu-render 0.1.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +101 -34
- package/dist/curve.d.ts +26 -1
- package/dist/curve.js +53 -0
- package/dist/debug-draw-3d.d.ts +3 -3
- package/dist/debug-draw-3d.js +10 -10
- package/dist/frame-draw-list-2d.d.ts +286 -0
- package/dist/frame-draw-list-2d.js +668 -0
- package/dist/{frame-recorder.d.ts → frame-draw-list.d.ts} +60 -8
- package/dist/{frame-recorder.js → frame-draw-list.js} +51 -10
- package/dist/geometry-generators.d.ts +11 -2
- package/dist/geometry-generators.js +37 -1
- package/dist/gpu-debug-draw-2d.d.ts +1 -1
- package/dist/gpu-debug-draw-2d.js +10 -2
- package/dist/gpu-debug-draw-3d.d.ts +1 -1
- package/dist/gpu-debug-draw-3d.js +4 -2
- package/dist/gpu-text-3d.d.ts +1 -1
- package/dist/gpu-text-3d.js +49 -2
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2 -3
- package/dist/mesh-batch-3d.d.ts +1 -1
- package/dist/shape2d-shader.js +295 -7
- package/dist/text-atlas.d.ts +6 -4
- package/dist/text-atlas.js +9 -6
- package/dist/text-font.d.ts +48 -7
- package/dist/text-font.js +63 -11
- package/dist/text-layout.d.ts +63 -4
- package/dist/text-layout.js +58 -8
- package/dist/text-msdf-baked.d.ts +9 -4
- package/dist/text-msdf-baked.js +9 -4
- package/dist/text-msdf-font.d.ts +10 -4
- package/dist/text-msdf-font.js +9 -3
- package/dist/vector-math.d.ts +19 -0
- package/dist/vector-math.js +37 -0
- package/package.json +1 -1
- package/dist/frame-recorder-2d.d.ts +0 -177
- package/dist/frame-recorder-2d.js +0 -378
- package/dist/layout-3d.d.ts +0 -227
- package/dist/layout-3d.js +0 -226
- package/dist/scene-examples.d.ts +0 -39
- package/dist/scene-examples.js +0 -200
- package/dist/scenes-2d.d.ts +0 -18
- package/dist/scenes-2d.js +0 -160
- package/dist/scenes-3d.d.ts +0 -46
- package/dist/scenes-3d.js +0 -1994
- package/dist/text-scenes.d.ts +0 -85
- package/dist/text-scenes.js +0 -338
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 2D debug-draw commands and their drawList.
|
|
3
|
+
*
|
|
4
|
+
* The 2D layer is the same data flow as the 3D one — `FrameDrawList -> FrameCommand[] -> GPU` —
|
|
5
|
+
* reached through `frame.d2` instead of a second entry point, so a frame has one lifecycle, one
|
|
6
|
+
* layer mask and one set of defaults. The commands are separate types rather than 3D commands
|
|
7
|
+
* with a `space` flag because a 2D point is a `Vec2` and 2D strokes carry no surface normal;
|
|
8
|
+
* keeping them apart stops a 3D-only field from silently meaning something different here.
|
|
9
|
+
*
|
|
10
|
+
* See `camera-2d.ts` for what `world2d` and `screen` mean.
|
|
11
|
+
*/
|
|
12
|
+
import type { Space2D, Vec2 } from "./camera-2d.js";
|
|
13
|
+
import { type Curve2D, type CurveTransform2D } from "./curve.js";
|
|
14
|
+
import type { Color, LayerMask, LineJoint, RenderedJoint, ResolvedLineDefaults, ResolvedPointDefaults } from "./frame-draw-list.js";
|
|
15
|
+
export type Line2DOptions = {
|
|
16
|
+
color?: Color;
|
|
17
|
+
colorEnd?: Color;
|
|
18
|
+
/** Stroke width in canvas pixels (`widthMode: "screen"`) or world2d units. */
|
|
19
|
+
width?: number;
|
|
20
|
+
widthMode?: "screen" | "world";
|
|
21
|
+
joint?: LineJoint;
|
|
22
|
+
/** Defaults to `world2d`; see `camera-2d.ts`. */
|
|
23
|
+
space?: Space2D;
|
|
24
|
+
layer?: LayerMask;
|
|
25
|
+
};
|
|
26
|
+
/** `arrow` options: the line style plus the head size and half-angle. */
|
|
27
|
+
export type Arrow2DOptions = Line2DOptions & {
|
|
28
|
+
/** Head length in `world2d` units; defaults to a quarter of the shaft, clamped to 6..14. */
|
|
29
|
+
headLength?: number;
|
|
30
|
+
/** Half-angle of the head in radians; defaults to 30 degrees. */
|
|
31
|
+
headAngle?: number;
|
|
32
|
+
};
|
|
33
|
+
/** `curve` options: the line style plus sampling tolerance and placement. */
|
|
34
|
+
export type Curve2DOptions = Line2DOptions & {
|
|
35
|
+
/** Approximate segment length in `world2d` units; smaller values subdivide each cubic further. */
|
|
36
|
+
readonly tolerance?: number;
|
|
37
|
+
readonly transform?: CurveTransform2D;
|
|
38
|
+
};
|
|
39
|
+
/** `grid` options: the 3D grid parameters in the XY plane, plus the line style. */
|
|
40
|
+
export type Grid2DOptions = Line2DOptions & {
|
|
41
|
+
/** Anticlockwise rotation around the grid centre, in radians. */
|
|
42
|
+
rotation?: number;
|
|
43
|
+
/** Skew angles whose tangents shift the opposite family of lines. */
|
|
44
|
+
skew?: readonly [number, number];
|
|
45
|
+
/** Keep the x-axis or y-axis boundary lines (the 2D counterpart of 3D's x/z edges). */
|
|
46
|
+
outer?: "none" | "x" | "y" | "xy";
|
|
47
|
+
};
|
|
48
|
+
export type Point2DOptions = {
|
|
49
|
+
color?: Color;
|
|
50
|
+
size?: number;
|
|
51
|
+
sizeMode?: "screen" | "world";
|
|
52
|
+
round?: boolean;
|
|
53
|
+
space?: Space2D;
|
|
54
|
+
layer?: LayerMask;
|
|
55
|
+
};
|
|
56
|
+
/** Every filled/stroked 2D shape the layer can draw. */
|
|
57
|
+
export type Shape2DKind = "rect" | "rounded-rect" | "circle" | "ellipse" | "arc" | "annulus" | "capsule" | "polygon" | "triangle" | "rhombus" | "sector" | "segment";
|
|
58
|
+
export type Shape2DOptions = {
|
|
59
|
+
color?: Color;
|
|
60
|
+
/** Rotation in radians, anticlockwise in `world2d` and screen-clockwise in `screen`. */
|
|
61
|
+
rotation?: number;
|
|
62
|
+
/** Outline width in canvas pixels; the `<shape>` and `<shape>_d` variants read it. */
|
|
63
|
+
strokeWidth?: number;
|
|
64
|
+
/** Start angle of `arc`/`sector`/`segment` in radians. Defaults to `0`, the +x axis. */
|
|
65
|
+
startAngle?: number;
|
|
66
|
+
/** Sweep of `arc`/`sector`/`segment` in radians. Defaults to a full turn; negative turns the other way. */
|
|
67
|
+
sweep?: number;
|
|
68
|
+
space?: Space2D;
|
|
69
|
+
layer?: LayerMask;
|
|
70
|
+
};
|
|
71
|
+
export type Shape2DCommand = {
|
|
72
|
+
readonly kind: "shape2d";
|
|
73
|
+
readonly shape: Shape2DKind;
|
|
74
|
+
readonly center: Vec2;
|
|
75
|
+
/**
|
|
76
|
+
* Primary half-size, meaning depends on `shape`: box half extents, ellipse radii, circumradius,
|
|
77
|
+
* capsule `[radius, halfLength]`, annulus `[outer, inner]`, rhombus half diagonals, or a
|
|
78
|
+
* triangle's first vertex offset from the centroid.
|
|
79
|
+
*/
|
|
80
|
+
readonly size: Vec2;
|
|
81
|
+
/** Second/third triangle vertices relative to the centroid; zero for every other shape. */
|
|
82
|
+
readonly vertexB: Vec2;
|
|
83
|
+
readonly vertexC: Vec2;
|
|
84
|
+
readonly cornerRadius: number;
|
|
85
|
+
/** Outline width in canvas pixels. */
|
|
86
|
+
readonly thickness: number;
|
|
87
|
+
readonly filled: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* Dashed-outline pattern `[visible, gap, phase]` in shape-space units for the `_d` variants;
|
|
90
|
+
* absent for solid shapes and solid outlines.
|
|
91
|
+
*/
|
|
92
|
+
readonly dash?: readonly [number, number, number];
|
|
93
|
+
readonly rotation: number;
|
|
94
|
+
readonly startAngle: number;
|
|
95
|
+
readonly sweep: number;
|
|
96
|
+
/** Vertex count of `polygon`; zero for every other shape. */
|
|
97
|
+
readonly sides: number;
|
|
98
|
+
readonly color: Color;
|
|
99
|
+
readonly space: Space2D;
|
|
100
|
+
readonly layer: LayerMask;
|
|
101
|
+
};
|
|
102
|
+
export type Point2DCommand = {
|
|
103
|
+
readonly kind: "point2d";
|
|
104
|
+
readonly position: Vec2;
|
|
105
|
+
readonly color: Color;
|
|
106
|
+
readonly size: number;
|
|
107
|
+
readonly sizeMode: "screen" | "world";
|
|
108
|
+
readonly round?: boolean;
|
|
109
|
+
readonly space: Space2D;
|
|
110
|
+
readonly layer: LayerMask;
|
|
111
|
+
};
|
|
112
|
+
export type Line2DCommand = {
|
|
113
|
+
readonly kind: "line2d";
|
|
114
|
+
readonly start: Vec2;
|
|
115
|
+
readonly end: Vec2;
|
|
116
|
+
readonly color: Color;
|
|
117
|
+
readonly colorEnd: Color;
|
|
118
|
+
readonly width: number;
|
|
119
|
+
readonly widthMode: "screen" | "world";
|
|
120
|
+
readonly dash?: readonly [number, number, number];
|
|
121
|
+
readonly joint?: LineJoint;
|
|
122
|
+
readonly space: Space2D;
|
|
123
|
+
readonly layer: LayerMask;
|
|
124
|
+
};
|
|
125
|
+
/**
|
|
126
|
+
* One path vertex of a `lineStrip`/`polyline`, the 2D twin of `JointCommand`. The renderer
|
|
127
|
+
* rebuilds the round/bevel/miter wedge from `previous`, `center` and `next`, exactly as the 3D
|
|
128
|
+
* joint pipeline does.
|
|
129
|
+
*/
|
|
130
|
+
export type Joint2DCommand = {
|
|
131
|
+
readonly kind: "joint2d";
|
|
132
|
+
readonly previous: Vec2;
|
|
133
|
+
readonly center: Vec2;
|
|
134
|
+
readonly next: Vec2;
|
|
135
|
+
readonly color: Color;
|
|
136
|
+
readonly width: number;
|
|
137
|
+
readonly widthMode: "screen" | "world";
|
|
138
|
+
readonly dash?: readonly [number, number, number];
|
|
139
|
+
readonly joint: RenderedJoint;
|
|
140
|
+
readonly space: Space2D;
|
|
141
|
+
readonly layer: LayerMask;
|
|
142
|
+
};
|
|
143
|
+
/** Everything a `FrameDrawList2D` can emit. */
|
|
144
|
+
export type FrameCommand2D = Point2DCommand | Line2DCommand | Joint2DCommand | Shape2DCommand;
|
|
145
|
+
/** The 3D drawList's resolved point/line styles, reused so 2D and 3D defaults cannot drift. */
|
|
146
|
+
export type FrameDrawList2DStyleDefaults = {
|
|
147
|
+
readonly point: ResolvedPointDefaults;
|
|
148
|
+
readonly line: ResolvedLineDefaults;
|
|
149
|
+
};
|
|
150
|
+
/**
|
|
151
|
+
* Records 2D primitives for one frame. Obtained through `FrameDrawList.d2`; it seals with its
|
|
152
|
+
* parent, so a caller cannot keep drawing into a finished frame.
|
|
153
|
+
*/
|
|
154
|
+
export declare class FrameDrawList2D {
|
|
155
|
+
#private;
|
|
156
|
+
constructor(defaults: FrameDrawList2DStyleDefaults, assertOpen: () => void);
|
|
157
|
+
point(position: Vec2, options?: Point2DOptions): this;
|
|
158
|
+
/** Straight segment (the 3D `draw_line`). */
|
|
159
|
+
line(start: Vec2, end: Vec2, options?: Line2DOptions): this;
|
|
160
|
+
/** Straight segment dashed along its length (the 3D `draw_line_d`). */
|
|
161
|
+
line_d(start: Vec2, end: Vec2, dash: readonly [number, number, number], options?: Line2DOptions): this;
|
|
162
|
+
/**
|
|
163
|
+
* Arrow with an open V head, the 2D twin of `FrameDrawList.arrow`: the shaft runs to `origin +
|
|
164
|
+
* direction`, and the head is two lines back from the tip.
|
|
165
|
+
*/
|
|
166
|
+
arrow(origin: Vec2, direction: Vec2, options?: Arrow2DOptions): this;
|
|
167
|
+
/** Arrow with a filled triangular head (`arrow` keeps the open line head). */
|
|
168
|
+
arrow_s(origin: Vec2, direction: Vec2, options?: Arrow2DOptions): this;
|
|
169
|
+
/** Arrow whose shaft is dashed; the two head lines stay solid like the filled head. */
|
|
170
|
+
arrow_d(origin: Vec2, direction: Vec2, dash: readonly [number, number, number], options?: Arrow2DOptions): this;
|
|
171
|
+
/** Arrow with a filled head and a dashed shaft. */
|
|
172
|
+
arrow_s_d(origin: Vec2, direction: Vec2, dash: readonly [number, number, number], options?: Arrow2DOptions): this;
|
|
173
|
+
ray(origin: Vec2, direction: Vec2, options?: Line2DOptions): this;
|
|
174
|
+
/** Ray dashed along its length. */
|
|
175
|
+
ray_d(origin: Vec2, direction: Vec2, dash: readonly [number, number, number], options?: Line2DOptions): this;
|
|
176
|
+
/**
|
|
177
|
+
* Path of segments, the 2D twin of `FrameDrawList.lineStrip`. Dash distance accumulates over
|
|
178
|
+
* the whole path and an open strip joins only its interior vertices, matching the 3D layer.
|
|
179
|
+
*/
|
|
180
|
+
lineStrip(points: readonly Vec2[], options?: Line2DOptions, closed?: boolean): this;
|
|
181
|
+
/** Open strip dashed along its length. */
|
|
182
|
+
lineStrip_d(points: readonly Vec2[], dash: readonly [number, number, number], options?: Line2DOptions, closed?: boolean): this;
|
|
183
|
+
/** Closed strip: the last point joins the first (the 3D `draw_line_loop`). */
|
|
184
|
+
lineLoop(points: readonly Vec2[], options?: Line2DOptions): this;
|
|
185
|
+
/** Closed strip dashed along its length. */
|
|
186
|
+
lineLoop_d(points: readonly Vec2[], dash: readonly [number, number, number], options?: Line2DOptions): this;
|
|
187
|
+
polyline(points: readonly Vec2[], options?: Line2DOptions, closed?: boolean): this;
|
|
188
|
+
polyline_d(points: readonly Vec2[], dash: readonly [number, number, number], options?: Line2DOptions, closed?: boolean): this;
|
|
189
|
+
/**
|
|
190
|
+
* Cubic curve sampled into a polyline, the 2D twin of `FrameDrawList.curve`. The curve's own
|
|
191
|
+
* `closed` flag decides whether the last point joins the first.
|
|
192
|
+
*/
|
|
193
|
+
curve(curve: Curve2D, options?: Curve2DOptions): this;
|
|
194
|
+
/** Cubic curve sampled into a dashed polyline. */
|
|
195
|
+
curve_d(curve: Curve2D, dash: readonly [number, number, number], options?: Curve2DOptions): this;
|
|
196
|
+
/**
|
|
197
|
+
* Axis-aligned grid of lines, the 2D twin of `FrameDrawList.grid` and reference `grid_2d`: `cells`
|
|
198
|
+
* are the cells per axis, so the drawn line count is one more on each side.
|
|
199
|
+
*/
|
|
200
|
+
grid(center: Vec2, cells: readonly [number, number], spacing: Vec2, options?: Grid2DOptions): this;
|
|
201
|
+
/** Grid whose lines are dashed along their length. */
|
|
202
|
+
grid_d(center: Vec2, cells: readonly [number, number], spacing: Vec2, dash: readonly [number, number, number], options?: Grid2DOptions): this;
|
|
203
|
+
/**
|
|
204
|
+
* Rectangle with the given full width and height, stroked by default like the 3D `draw_rect`.
|
|
205
|
+
* `rect_s` fills it and `rect_d` dashes the outline.
|
|
206
|
+
*/
|
|
207
|
+
rect(center: Vec2, size: Vec2, options?: Shape2DOptions): this;
|
|
208
|
+
/** Solid rectangle (reference `Rectangle`, the 3D `draw_rect_s`). */
|
|
209
|
+
rect_s(center: Vec2, size: Vec2, options?: Shape2DOptions): this;
|
|
210
|
+
/**
|
|
211
|
+
* Rectangle outline dashed along its perimeter (the 3D `draw_rect_d`). `dash` is
|
|
212
|
+
* `[visible, gap, phase]` in shape-space units, the same triple the line layer takes.
|
|
213
|
+
*/
|
|
214
|
+
rect_d(center: Vec2, size: Vec2, dash: readonly [number, number, number], options?: Shape2DOptions): this;
|
|
215
|
+
/** Rounded rectangle outline; the shader clamps the radius to half the shorter side. */
|
|
216
|
+
rect_r(center: Vec2, size: Vec2, cornerRadius: number, options?: Shape2DOptions): this;
|
|
217
|
+
/** Solid rounded rectangle (reference `RoundedRectangle`, the 3D `_s` counterpart). */
|
|
218
|
+
rect_r_s(center: Vec2, size: Vec2, cornerRadius: number, options?: Shape2DOptions): this;
|
|
219
|
+
/** Rounded rectangle outline dashed along its perimeter. */
|
|
220
|
+
rect_r_d(center: Vec2, size: Vec2, cornerRadius: number, dash: readonly [number, number, number], options?: Shape2DOptions): this;
|
|
221
|
+
/** Disc outline with the given radius (reference `Circle`, the 3D `draw_circle`). */
|
|
222
|
+
circle(center: Vec2, radius: number, options?: Shape2DOptions): this;
|
|
223
|
+
/** Solid disc (reference `Circle::new`, the 3D `draw_circle_s`). */
|
|
224
|
+
circle_s(center: Vec2, radius: number, options?: Shape2DOptions): this;
|
|
225
|
+
/** Dashed circle outline. */
|
|
226
|
+
circle_d(center: Vec2, radius: number, dash: readonly [number, number, number], options?: Shape2DOptions): this;
|
|
227
|
+
/** Ellipse outline with independent x and y radii (reference `Ellipse`). */
|
|
228
|
+
ellipse(center: Vec2, radii: Vec2, options?: Shape2DOptions): this;
|
|
229
|
+
/** Solid ellipse (reference `Ellipse::new`, the 3D `_s` counterpart). */
|
|
230
|
+
ellipse_s(center: Vec2, radii: Vec2, options?: Shape2DOptions): this;
|
|
231
|
+
/** Dashed ellipse outline. */
|
|
232
|
+
ellipse_d(center: Vec2, radii: Vec2, dash: readonly [number, number, number], options?: Shape2DOptions): this;
|
|
233
|
+
/**
|
|
234
|
+
* Circular arc from `startAngle` through `sweep`. It is a curve without an interior, so it is
|
|
235
|
+
* only ever stroked; `arc_s` would have nothing to fill.
|
|
236
|
+
*/
|
|
237
|
+
arc(center: Vec2, radius: number, options?: Shape2DOptions): this;
|
|
238
|
+
/** Arc outline dashed along its sweep. */
|
|
239
|
+
arc_d(center: Vec2, radius: number, dash: readonly [number, number, number], options?: Shape2DOptions): this;
|
|
240
|
+
/** Ring outline between two radii (reference `Annulus`). */
|
|
241
|
+
annulus(center: Vec2, innerRadius: number, outerRadius: number, options?: Shape2DOptions): this;
|
|
242
|
+
/** Filled ring band (reference `Annulus::new`, the 3D `_s` counterpart). */
|
|
243
|
+
annulus_s(center: Vec2, innerRadius: number, outerRadius: number, options?: Shape2DOptions): this;
|
|
244
|
+
/** Dashed annulus outline; both boundaries are stroked. */
|
|
245
|
+
annulus_d(center: Vec2, innerRadius: number, outerRadius: number, dash: readonly [number, number, number], options?: Shape2DOptions): this;
|
|
246
|
+
/** Capsule outline whose straight section is `length` long along y (reference `Capsule2d`). */
|
|
247
|
+
capsule(center: Vec2, radius: number, length: number, options?: Shape2DOptions): this;
|
|
248
|
+
/** Solid capsule (reference `Capsule2d::new`, the 3D `_s` counterpart). */
|
|
249
|
+
capsule_s(center: Vec2, radius: number, length: number, options?: Shape2DOptions): this;
|
|
250
|
+
/** Dashed capsule outline. */
|
|
251
|
+
capsule_d(center: Vec2, radius: number, length: number, dash: readonly [number, number, number], options?: Shape2DOptions): this;
|
|
252
|
+
/** Regular polygon outline with a vertex on the +x axis (reference `RegularPolygon`). */
|
|
253
|
+
polygon(center: Vec2, circumradius: number, sides: number, options?: Shape2DOptions): this;
|
|
254
|
+
/** Solid regular polygon (reference `RegularPolygon::new`, the 3D `_s` counterpart). */
|
|
255
|
+
polygon_s(center: Vec2, circumradius: number, sides: number, options?: Shape2DOptions): this;
|
|
256
|
+
/** Dashed regular polygon outline. */
|
|
257
|
+
polygon_d(center: Vec2, circumradius: number, sides: number, dash: readonly [number, number, number], options?: Shape2DOptions): this;
|
|
258
|
+
/** Triangle outline (reference `Triangle2d`); `rotation` turns about its centroid. */
|
|
259
|
+
triangle(a: Vec2, b: Vec2, c: Vec2, options?: Shape2DOptions): this;
|
|
260
|
+
/** Solid triangle (reference `Triangle2d::new`, the 3D `_s` counterpart). */
|
|
261
|
+
triangle_s(a: Vec2, b: Vec2, c: Vec2, options?: Shape2DOptions): this;
|
|
262
|
+
/** Dashed triangle outline. */
|
|
263
|
+
triangle_d(a: Vec2, b: Vec2, c: Vec2, dash: readonly [number, number, number], options?: Shape2DOptions): this;
|
|
264
|
+
/** Diamond outline with the given full diagonals (reference `Rhombus`). */
|
|
265
|
+
rhombus(center: Vec2, diagonals: Vec2, options?: Shape2DOptions): this;
|
|
266
|
+
/** Solid diamond (reference `Rhombus::new`, the 3D `_s` counterpart). */
|
|
267
|
+
rhombus_s(center: Vec2, diagonals: Vec2, options?: Shape2DOptions): this;
|
|
268
|
+
/** Dashed diamond outline. */
|
|
269
|
+
rhombus_d(center: Vec2, diagonals: Vec2, dash: readonly [number, number, number], options?: Shape2DOptions): this;
|
|
270
|
+
/** Disc sector outline from `startAngle` through `sweep` (reference `CircularSector`). */
|
|
271
|
+
sector(center: Vec2, radius: number, options?: Shape2DOptions): this;
|
|
272
|
+
/** Solid disc sector (reference `CircularSector`, the 3D `_s` counterpart). */
|
|
273
|
+
sector_s(center: Vec2, radius: number, options?: Shape2DOptions): this;
|
|
274
|
+
/** Dashed sector outline: the arc plus both radii. */
|
|
275
|
+
sector_d(center: Vec2, radius: number, dash: readonly [number, number, number], options?: Shape2DOptions): this;
|
|
276
|
+
/** Disc segment outline between a chord and its arc (reference `CircularSegment`). */
|
|
277
|
+
segment(center: Vec2, radius: number, options?: Shape2DOptions): this;
|
|
278
|
+
/** Solid disc segment (reference `CircularSegment`, the 3D `_s` counterpart). */
|
|
279
|
+
segment_s(center: Vec2, radius: number, options?: Shape2DOptions): this;
|
|
280
|
+
/** Dashed segment outline: the arc plus the chord. */
|
|
281
|
+
segment_d(center: Vec2, radius: number, dash: readonly [number, number, number], options?: Shape2DOptions): this;
|
|
282
|
+
get points(): readonly Point2DCommand[];
|
|
283
|
+
get lines(): readonly Line2DCommand[];
|
|
284
|
+
get joints(): readonly Joint2DCommand[];
|
|
285
|
+
get shapes(): readonly Shape2DCommand[];
|
|
286
|
+
}
|