@beff/aula 0.0.1 → 0.1.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.
Files changed (77) hide show
  1. package/README.md +9 -1
  2. package/dist/animations.d.ts +634 -0
  3. package/dist/animations.js +1793 -0
  4. package/dist/braces.d.ts +84 -0
  5. package/dist/braces.js +253 -0
  6. package/dist/card.d.ts +17 -0
  7. package/dist/card.js +90 -0
  8. package/dist/colors-palette.d.ts +2242 -0
  9. package/dist/colors-palette.js +2241 -0
  10. package/dist/colors.d.ts +120 -0
  11. package/dist/colors.js +403 -0
  12. package/dist/curves.d.ts +10 -0
  13. package/dist/curves.js +128 -0
  14. package/dist/engine.d.ts +1595 -0
  15. package/dist/engine.js +3364 -0
  16. package/dist/errors.d.ts +19 -0
  17. package/dist/errors.js +25 -0
  18. package/dist/generated/aula.conditional-suspending-3-i32-to-void.wasm +0 -0
  19. package/dist/generated/aula.core.wasm +0 -0
  20. package/dist/generated/aula.core2.wasm +0 -0
  21. package/dist/generated/aula.core3.wasm +0 -0
  22. package/dist/generated/aula.core4.wasm +0 -0
  23. package/dist/generated/aula.core5.wasm +0 -0
  24. package/dist/generated/aula.core6.wasm +0 -0
  25. package/dist/generated/aula.core7.wasm +0 -0
  26. package/dist/generated/aula.core8.wasm +0 -0
  27. package/dist/generated/aula.d.ts +80 -0
  28. package/dist/generated/aula.js +54639 -0
  29. package/dist/generated/interfaces/aula-engine-engine.d.ts +983 -0
  30. package/dist/generated/interfaces/aula-engine-host.d.ts +10 -0
  31. package/dist/generated/interfaces/aula-engine-tts.d.ts +43 -0
  32. package/dist/generated/interfaces/aula-engine-types.d.ts +60 -0
  33. package/dist/geometry.d.ts +551 -0
  34. package/dist/geometry.js +1821 -0
  35. package/dist/graph.d.ts +117 -0
  36. package/dist/graph.js +526 -0
  37. package/dist/graphing.d.ts +597 -0
  38. package/dist/graphing.js +1504 -0
  39. package/dist/host.d.ts +19 -0
  40. package/dist/host.js +85 -0
  41. package/dist/index.d.ts +5 -0
  42. package/dist/index.js +11 -0
  43. package/dist/licenses/aula-g2p-NOTICE.txt +13 -0
  44. package/dist/licenses/espeak-ng-COPYING.txt +674 -0
  45. package/dist/licenses/fonts-OFL-JetBrainsMono.txt +93 -0
  46. package/dist/licenses/fonts-OFL-NunitoSans.txt +93 -0
  47. package/dist/load.d.ts +16 -0
  48. package/dist/load.js +69 -0
  49. package/dist/logo.d.ts +30 -0
  50. package/dist/logo.js +186 -0
  51. package/dist/manim.d.ts +22 -0
  52. package/dist/manim.js +19 -0
  53. package/dist/mobjects.d.ts +127 -0
  54. package/dist/mobjects.js +316 -0
  55. package/dist/pointcloud.d.ts +144 -0
  56. package/dist/pointcloud.js +400 -0
  57. package/dist/rates.d.ts +19 -0
  58. package/dist/rates.js +54 -0
  59. package/dist/run.d.ts +82 -0
  60. package/dist/run.js +245 -0
  61. package/dist/tables.d.ts +179 -0
  62. package/dist/tables.js +403 -0
  63. package/dist/tex.d.ts +8 -0
  64. package/dist/tex.js +257 -0
  65. package/dist/text-layouts.d.ts +64 -0
  66. package/dist/text-layouts.js +225 -0
  67. package/dist/text.d.ts +35 -0
  68. package/dist/text.js +52 -0
  69. package/dist/theme.d.ts +25 -0
  70. package/dist/theme.js +12 -0
  71. package/dist/user-code.d.ts +5 -0
  72. package/dist/user-code.js +20 -0
  73. package/dist/utils.d.ts +152 -0
  74. package/dist/utils.js +517 -0
  75. package/dist/vector-field.d.ts +132 -0
  76. package/dist/vector-field.js +361 -0
  77. package/package.json +46 -5
@@ -0,0 +1,1595 @@
1
+ import type { Animation as RawAnimation, Mobject as RawMobject, Rate as RawRate, Chapter as RawChapter, Narration, NarrationWait, Screen } from "./generated/interfaces/aula-engine-engine.js";
2
+ import type { Color, Diagnostic, Location, Point, ChapterText as RawChapterText, ParagraphText as RawParagraphText } from "./generated/interfaces/aula-engine-types.js";
3
+ import type { Theme } from "./theme.ts";
4
+ import { type CapStyleType, type Complex, type LineJointType } from "./utils.ts";
5
+ export type { Instant, Screen, Shown } from "./generated/interfaces/aula-engine-engine.js";
6
+ export type { Color, Diagnostic, Location, Point };
7
+ export declare const ORIGIN: Point;
8
+ export declare const UP: Point;
9
+ export declare const DOWN: Point;
10
+ export declare const LEFT: Point;
11
+ export declare const RIGHT: Point;
12
+ export declare const UL: Point;
13
+ export declare const UR: Point;
14
+ export declare const DL: Point;
15
+ export declare const DR: Point;
16
+ export declare const FRAME_HEIGHT = 8;
17
+ /** The frame is 16:9. */
18
+ export declare const FRAME_WIDTH: number;
19
+ /** The width of a frame in pixels (854). */
20
+ export declare const PIXEL_WIDTH = 854;
21
+ export declare const WHITE: Color;
22
+ export declare const BLACK: Color;
23
+ /** Manim's `YELLOW` (`YELLOW_C`). */
24
+ export declare const YELLOW: Color;
25
+ /** Manim's `PURE_YELLOW`: the default colour of `Indicate`, `Flash`, `Circumscribe` and
26
+ * `SurroundingRectangle`. */
27
+ export declare const PURE_YELLOW: Color;
28
+ export declare const PI: number;
29
+ export declare const TAU: number;
30
+ export declare const DEGREES: number;
31
+ export declare const SMALL_BUFF = 0.1;
32
+ export declare const MED_SMALL_BUFF = 0.25;
33
+ export declare const MED_LARGE_BUFF = 0.5;
34
+ export declare const LARGE_BUFF = 1;
35
+ export declare const BOLD = "BOLD";
36
+ export declare const NORMAL = "NORMAL";
37
+ /** A rate function (Manim `rate_func`): linear progress 0..1 to eased progress. */
38
+ export type RateFunc = (t: number) => number;
39
+ /** The engine's form of `f`: a built-in name, or a JS function in the callback table. */
40
+ export declare function rawRate(f: RateFunc): RawRate;
41
+ export declare const linear: RateFunc;
42
+ /** Slow at the start and the end (Manim `smooth`). The engine runs the default inflection 10. */
43
+ export declare function smooth(t: number, inflection?: number): number;
44
+ /** Manim `rush_into`: the first half of `smooth`, stretched. */
45
+ export declare function rushInto(t: number, inflection?: number): number;
46
+ /** Manim `rush_from`: the second half of `smooth`, stretched. */
47
+ export declare function rushFrom(t: number, inflection?: number): number;
48
+ export declare const slowInto: RateFunc;
49
+ export declare const doubleSmooth: RateFunc;
50
+ /** Manim `there_and_back`: `smooth` to 1 at the middle, then back to 0. */
51
+ export declare function thereAndBack(t: number, inflection?: number): number;
52
+ /** Manim `there_and_back_with_pause`: there, a pause of `pauseRatio` of the time at 1, back. */
53
+ export declare function thereAndBackWithPause(t: number, pauseRatio?: number): number;
54
+ export declare const easeInSine: RateFunc;
55
+ export declare const easeOutSine: RateFunc;
56
+ export declare const easeInOutSine: RateFunc;
57
+ export declare const easeInQuad: RateFunc;
58
+ export declare const easeOutQuad: RateFunc;
59
+ export declare const easeInOutQuad: RateFunc;
60
+ export declare const easeInCubic: RateFunc;
61
+ export declare const easeOutCubic: RateFunc;
62
+ export declare const easeInOutCubic: RateFunc;
63
+ export declare const easeInQuart: RateFunc;
64
+ export declare const easeOutQuart: RateFunc;
65
+ export declare const easeInOutQuart: RateFunc;
66
+ export declare const easeInQuint: RateFunc;
67
+ export declare const easeOutQuint: RateFunc;
68
+ export declare const easeInOutQuint: RateFunc;
69
+ export declare const easeInExpo: RateFunc;
70
+ export declare const easeOutExpo: RateFunc;
71
+ export declare const easeInOutExpo: RateFunc;
72
+ export declare const easeInCirc: RateFunc;
73
+ export declare const easeOutCirc: RateFunc;
74
+ export declare const easeInOutCirc: RateFunc;
75
+ export declare const easeInBack: RateFunc;
76
+ export declare const easeOutBack: RateFunc;
77
+ export declare const easeInOutBack: RateFunc;
78
+ export declare const easeInElastic: RateFunc;
79
+ export declare const easeOutElastic: RateFunc;
80
+ export declare const easeInOutElastic: RateFunc;
81
+ export declare const easeInBounce: RateFunc;
82
+ export declare const easeOutBounce: RateFunc;
83
+ export declare const easeInOutBounce: RateFunc;
84
+ export declare function add(a: Point, b: Point): Point;
85
+ export declare function sub(a: Point, b: Point): Point;
86
+ export declare function mul(v: Point, k: number): Point;
87
+ /** Euclidean length. */
88
+ export declare function norm(v: Point): number;
89
+ /** `a + (b - a) * t`. */
90
+ export declare function lerp(a: Point, b: Point, t: number): Point;
91
+ declare const RAW: unique symbol;
92
+ declare const ID: unique symbol;
93
+ declare const ANIMATION: unique symbol;
94
+ /** The engine handle of a Mobject. */
95
+ export declare function raw(m: Mobject): RawMobject;
96
+ /** An argument error with Manim's name of the function. */
97
+ export declare function wrong(label: string, message: string, hint?: string): never;
98
+ /** The fill and stroke of `setStyle` and `getStyle` (Manim's keyword arguments). */
99
+ export interface StyleSettings {
100
+ fillColor?: Color;
101
+ fillOpacity?: number;
102
+ strokeColor?: Color;
103
+ strokeWidth?: number;
104
+ strokeOpacity?: number;
105
+ }
106
+ /** The point options of the methods that change points (Manim `about_point`, `about_edge`). */
107
+ export interface AboutOptions {
108
+ aboutPoint?: Point;
109
+ aboutEdge?: Point;
110
+ }
111
+ /** The options of `arrangeInGrid` (Manim's keyword arguments). */
112
+ export interface GridOptions {
113
+ rows?: number;
114
+ cols?: number;
115
+ /** The gap between cells, or `[horizontal, vertical]`. */
116
+ buff?: number | readonly [number, number];
117
+ cellAlignment?: Point;
118
+ /** One character for each row, top to bottom: `u` up, `c` centre, `d` down. */
119
+ rowAlignments?: string;
120
+ /** One character for each column, left to right: `l` left, `c` centre, `r` right. */
121
+ colAlignments?: string;
122
+ /** A height for each row, top to bottom; undefined fits the row. */
123
+ rowHeights?: readonly (number | undefined)[];
124
+ /** A width for each column, left to right; undefined fits the column. */
125
+ colWidths?: readonly (number | undefined)[];
126
+ /** The fill order: "rd" (the default), "dr", "ld", "dl", "ru", "ur", "lu" or "ul". */
127
+ flowOrder?: "rd" | "dr" | "ld" | "dl" | "ru" | "ur" | "lu" | "ul";
128
+ }
129
+ /** The radial gradient options (Manim `set_colors_by_radial_gradient`). */
130
+ export interface RadialGradientOptions {
131
+ center?: Point;
132
+ radius?: number;
133
+ innerColor?: Color;
134
+ outerColor?: Color;
135
+ }
136
+ /** The options of `addBackgroundRectangle` (Manim's keyword arguments). */
137
+ export interface BackgroundRectangleOptions {
138
+ color?: Color;
139
+ opacity?: number;
140
+ buff?: number;
141
+ }
142
+ /** The attributes that `set` changes (Manim `set(**kwargs)`). */
143
+ export interface MobjectAttributes {
144
+ width?: number;
145
+ height?: number;
146
+ name?: string;
147
+ zIndex?: number;
148
+ target?: Mobject;
149
+ }
150
+ /** The wrapper of the node of `handle`: the one that exists, or a new Mobject. An unused
151
+ * handle is freed when it is collected (jco's dispose of a handle from a list frees the
152
+ * wrong handle). */
153
+ export declare function wrap(handle: RawMobject): Mobject;
154
+ /** The Mobject of a method that `mob.method` gave (Python's `method.__self__`). */
155
+ export declare const METHOD_SELF: unique symbol;
156
+ /** The unbound function of such a method (Python's `method.__func__`). */
157
+ export declare const METHOD_FUNC: unique symbol;
158
+ /** A method of a Mobject, bound to it: `m.ApplyMethod(mob.shift, m.UP)` and `m.always(mob.nextTo,
159
+ * …)` find the Mobject, as Python's bound methods do. */
160
+ export interface BoundMethod {
161
+ (...args: never[]): unknown;
162
+ readonly [METHOD_SELF]: Mobject;
163
+ readonly [METHOD_FUNC]: (...args: never[]) => unknown;
164
+ }
165
+ /** One node of the picture tree. Each node has one Mobject: `group[0] === circle` when `circle`
166
+ * is the first child of `group`. `group[i]` is child `i` (negative from the end), `length` is
167
+ * the number of children, and `for (const m of group)` goes through the children. Methods
168
+ * that change it return it, so they chain. */
169
+ declare class MobjectClass {
170
+ readonly [RAW]: RawMobject;
171
+ /** The id of the node. */
172
+ readonly [ID]: number;
173
+ /** Child `i` (Manim `group[i]`); negative counts from the end. */
174
+ readonly [index: number]: Mobject;
175
+ /** Manim's `name`: "Mobject" unless the options give one. */
176
+ name: string;
177
+ /** Manim's VMobject settings: `applyFunction` first moves each handle this fraction of the way
178
+ * to its anchor, and then back. */
179
+ preFunctionHandleToAnchorScaleFactor: number;
180
+ /** True: `applyFunction` ends with `makeSmooth`. */
181
+ makeSmoothAfterApplyingFunctions: boolean;
182
+ /** The distance at which `considerPointsEquals` takes two points as equal. */
183
+ toleranceForPointEquality: number;
184
+ /** Manim's `close_new_points`. Only Manim's OpenGL renderer reads it. */
185
+ closeNewPoints: boolean;
186
+ constructor(handle: RawMobject);
187
+ /** The children (Manim `submobjects`). */
188
+ get submobjects(): Mobject[];
189
+ /** The number of children (Manim `len(group)`). */
190
+ get length(): number;
191
+ /** The children, in order (Manim `for m in group`). */
192
+ [Symbol.iterator](): Iterator<Mobject>;
193
+ add(...items: Mobjects[]): this;
194
+ remove(...items: Mobjects[]): this;
195
+ /** This node and every descendant, depth first. `recurse` has no effect, as in Manim. */
196
+ getFamily(recurse?: boolean): Mobject[];
197
+ /** The family members that have points of their own (Manim `family_members_with_points`). */
198
+ familyMembersWithPoints(): Mobject[];
199
+ /** Puts `mobject` at child `index` (Manim `insert`). */
200
+ insert(index: number, mobject: Mobject): this;
201
+ /** Puts the mobjects first among the children, in their order (Manim `add_to_back`). */
202
+ addToBack(...items: Mobject[]): this;
203
+ /** Sets attributes: `set({ width: 3, zIndex: 2 })` (Manim `set(**kwargs)`). */
204
+ set(attributes: MobjectAttributes): this;
205
+ /** The children that have points or children (Manim `nonempty_submobjects`). */
206
+ nonemptySubmobjects(): Mobject[];
207
+ /** `[this]` if it has points of its own, then the children (Manim `split`). */
208
+ split(): Mobject[];
209
+ /** The group class of this mobject: `m.VGroup` (Manim `get_group_class`). */
210
+ getGroupClass(): typeof VGroup;
211
+ /** The base class of this mobject: `m.VMobject` (Manim `get_mobject_type_class`). */
212
+ getMobjectTypeClass(): typeof VMobject;
213
+ /** True when `m` is this node or inside it. */
214
+ contains(m: Mobject): boolean;
215
+ /** True when the node has points of its own. */
216
+ hasPoints(): boolean;
217
+ /** True when the node has no points of its own (Manim `has_no_points`). */
218
+ hasNoPoints(): boolean;
219
+ /** The number of own control points (Manim `get_num_points`). */
220
+ getNumPoints(): number;
221
+ /** The names of the point arrays: `["points"]` (Manim `get_array_attrs`). */
222
+ getArrayAttrs(): string[];
223
+ /** Changes the own points with `func` (Manim `apply_over_attr_arrays`). */
224
+ applyOverAttrArrays(func: (points: Point[]) => Point[]): this;
225
+ /** The points of the whole family (Manim `get_merged_array("points")`). */
226
+ getMergedArray(arrayAttr?: "points"): Point[];
227
+ /** The points of the whole family (Manim `get_all_points`). */
228
+ getAllPoints(): Point[];
229
+ /** The anchors of the family: the points that set the bounds (Manim
230
+ * `get_points_defining_boundary`). */
231
+ getPointsDefiningBoundary(): Point[];
232
+ /** `reduceFunc` of the coordinates `dim` of the boundary points; 0 without points (Manim
233
+ * `reduce_across_dimension`). */
234
+ reduceAcrossDimension(reduceFunc: (values: number[]) => number, dim: number): number;
235
+ /** A number for the node while it lives. `a === b` also compares nodes. */
236
+ id(): number;
237
+ copy(): Mobject;
238
+ /** `[[minX, minY], [maxX, maxY]]`, or undefined without points. */
239
+ bounds(): [Point, Point] | undefined;
240
+ getCriticalPoint(direction: Point): Point;
241
+ getCenter(): Point;
242
+ getLeft(): Point;
243
+ getRight(): Point;
244
+ getTop(): Point;
245
+ getBottom(): Point;
246
+ /** The x of the critical point in `direction` (Manim `get_x`). */
247
+ getX(direction?: Point): number;
248
+ /** The y of the critical point in `direction` (Manim `get_y`). */
249
+ getY(direction?: Point): number;
250
+ /** Coordinate `dim` (0 x, 1 y) of the critical point in `direction` (Manim `get_coord`). */
251
+ getCoord(dim: number, direction?: Point): number;
252
+ /** The min (`key` < 0), the middle (0) or the max (> 0) of coordinate `dim` of `points`
253
+ * (default: the boundary points) (Manim `get_extremum_along_dim`). */
254
+ getExtremumAlongDim(opts?: {
255
+ points?: readonly Point[];
256
+ dim?: number;
257
+ key?: number;
258
+ }): number;
259
+ /** The size along `dim`: 0 the width, 1 the height (Manim `length_over_dim`). */
260
+ lengthOverDim(dim: number): number;
261
+ /** The mean of the points of the family (Manim `get_center_of_mass`). */
262
+ getCenterOfMass(): Point;
263
+ /** The boundary point that is farthest in `direction` (Manim `get_boundary_point`). */
264
+ getBoundaryPoint(direction: Point): Point;
265
+ /** The point halfway along the path (Manim `get_midpoint`). */
266
+ getMidpoint(): Point;
267
+ /** `[getStart(), getEnd()]` (Manim `get_start_and_end`). */
268
+ getStartAndEnd(): [Point, Point];
269
+ /** The proportion of the path's length at `point`, which must be on the path (Manim
270
+ * `proportion_from_point`). */
271
+ proportionFromPoint(point: Point): number;
272
+ /** `nPieces` copies of the own path, each one piece of it, as a VGroup (Manim
273
+ * `get_pieces`). */
274
+ getPieces(nPieces: number): Mobject;
275
+ /** The own path becomes the part of `mobject`'s own path from proportion `a` to `b`
276
+ * (Manim `pointwise_become_partial`). */
277
+ pointwiseBecomePartial(mobject: Mobject, a: number, b: number): this;
278
+ /** The point that orders this mobject among equal `zIndex` values: its center (Manim
279
+ * `get_z_index_reference_point`). */
280
+ getZIndexReferencePoint(): Point;
281
+ /** Manim's `z_index`: the frame draws the members of the stage sorted by it. */
282
+ get zIndex(): number;
283
+ set zIndex(value: number);
284
+ /** Sets `zIndex` of the family, or of this node only (Manim `set_z_index`). A higher value is
285
+ * drawn on top; equal values keep the order of the stage. */
286
+ setZIndex(zIndexValue: number, opts?: {
287
+ family?: boolean;
288
+ }): this;
289
+ /** True when the mobject is fully outside the frame (Manim `is_off_screen`). */
290
+ isOffScreen(): boolean;
291
+ get width(): number;
292
+ /** Scales the mobject to this width (Manim's `width` setter: `scaleToFitWidth`). */
293
+ set width(value: number);
294
+ get height(): number;
295
+ /** Scales the mobject to this height (Manim's `height` setter: `scaleToFitHeight`). */
296
+ set height(value: number);
297
+ /** The x of the left edge. */
298
+ left(): number;
299
+ right(): number;
300
+ top(): number;
301
+ bottom(): number;
302
+ getStart(): Point;
303
+ /** The last point (an arrow: its tip). */
304
+ getEnd(): Point;
305
+ isClosed(): boolean;
306
+ getCubicBezierTuples(): [Point, Point, Point, Point][];
307
+ pointFromProportion(alpha: number): Point;
308
+ /** The critical point in a corner direction, such as `m.UR` (Manim `get_corner`). */
309
+ getCorner(direction: Point): Point;
310
+ /** The critical point in an edge direction, such as `m.UP` (Manim `get_edge_center`). */
311
+ getEdgeCenter(direction: Point): Point;
312
+ /** `getEnd() - getStart()` (Manim `Line.get_vector`). */
313
+ getVector(): Point;
314
+ /** The distance from `getStart()` to `getEnd()` (Manim `Line.get_length`). */
315
+ getLength(): number;
316
+ /** The angle of `getVector()`, in radians from the x axis (Manim `Line.get_angle`). */
317
+ getAngle(): number;
318
+ /** `getVector()` with length 1, or `[0, 0]` (Manim `Line.get_unit_vector`). */
319
+ getUnitVector(): Point;
320
+ /** Moves the centre to the origin (Manim `center`). */
321
+ center(): this;
322
+ /** Moves along `dim` (0 x, 1 y) so that the critical point in `direction` has coordinate
323
+ * `value` (Manim `set_coord`). */
324
+ setCoord(value: number, dim: number, direction?: Point): this;
325
+ /** Moves along x so that the critical point in `direction` has x `x` (Manim `set_x`). */
326
+ setX(x: number, direction?: Point): this;
327
+ /** Moves along y so that the critical point in `direction` has y `y` (Manim `set_y`). */
328
+ setY(y: number, direction?: Point): this;
329
+ /** Maps every point of the family through `function`, about `aboutPoint` (the origin by
330
+ * default) or the critical point `aboutEdge` (Manim `apply_function`). */
331
+ applyFunction(func: (p: Point) => Point, opts?: AboutOptions): this;
332
+ /** Moves the center to `function(center)` (Manim `apply_functo_position`). */
333
+ applyFunctionToPosition(func: (p: Point) => Point): this;
334
+ /** Moves the center of each child through `function` (Manim
335
+ * `apply_functo_submobject_positions`). */
336
+ applyFunctionToSubmobjectPositions(func: (p: Point) => Point): this;
337
+ /** Maps the points by a 2 x 2 matrix (or the top-left of a 3 x 3 one), about the origin by
338
+ * default (Manim `apply_matrix`). */
339
+ applyMatrix(matrix: readonly (readonly number[])[], opts?: AboutOptions): this;
340
+ /** Maps the points as complex numbers `m.Complex`, `[re, im]` (Manim `apply_complex_function`). */
341
+ applyComplexFunction(func: (z: Complex) => Complex, opts?: AboutOptions): this;
342
+ /** Changes the own points of each family member with `func`, about `aboutPoint` or the
343
+ * critical point `aboutEdge` (the center by default) (Manim
344
+ * `apply_points_funcabout_point`). */
345
+ applyPointsFunctionAboutPoint(func: (points: Point[]) => Point[], opts?: AboutOptions): this;
346
+ /** Reverses the order of the points of each family member (Manim `reverse_points`). */
347
+ reversePoints(): this;
348
+ /** Repeats the points of each family member `count` times (Manim `repeat`). */
349
+ repeat(count: number): this;
350
+ /** The own points of each family member take those of `mobject`'s family, member by member;
351
+ * the style stays (Manim `match_points`). */
352
+ matchPoints(mobject: Mobject, _opts?: {
353
+ copySubmobjects?: boolean;
354
+ }): this;
355
+ shift(vector: Point): this;
356
+ /** Scales about `aboutPoint` or the critical point `aboutEdge` (the center by default). With
357
+ * `scaleStroke`, the stroke widths scale too. */
358
+ scale(scaleFactor: number, opts?: AboutOptions & {
359
+ scaleStroke?: boolean;
360
+ }): this;
361
+ /** Stretches axis `dim` (0 x, 1 y) by `factor` about `aboutPoint` or the critical point
362
+ * `aboutEdge` (the center by default). */
363
+ stretch(factor: number, dim: number, opts?: AboutOptions): this;
364
+ /** Stretches axis `dim` by `factor` about `point` (Manim `stretch_about_point`). */
365
+ stretchAboutPoint(factor: number, dim: number, point: Point): this;
366
+ /** Scales (or with `stretch`, stretches) so that the size along `dim` is `length` (Manim
367
+ * `rescale_to_fit`). A mobject with no size there does not change. */
368
+ rescaleToFit(length: number, dim: number, opts?: AboutOptions & {
369
+ stretch?: boolean;
370
+ }): this;
371
+ /** Scales the group by `factor` and each child by `1 / factor`: the children move apart
372
+ * (Manim `space_out_submobjects`). */
373
+ spaceOutSubmobjects(factor?: number, opts?: AboutOptions): this;
374
+ stretchToFitHeight(height: number, opts?: {
375
+ aboutEdge?: Point;
376
+ }): this;
377
+ stretchToFitWidth(width: number, opts?: {
378
+ aboutEdge?: Point;
379
+ }): this;
380
+ scaleToFitWidth(width: number): this;
381
+ scaleToFitHeight(height: number): this;
382
+ /** Shrinks (never grows) to at most `width`. */
383
+ fitWidth(width: number): this;
384
+ /** Rotates counter-clockwise by `angle` about `aboutPoint` or the critical point
385
+ * `aboutEdge` (the center by default). */
386
+ rotate(angle: number, opts?: AboutOptions): this;
387
+ /** Rotates about the origin (Manim `rotate_about_origin`). */
388
+ rotateAboutOrigin(angle: number): this;
389
+ /** Mirrors the mobject across the line through its center (or `aboutPoint`, or the critical
390
+ * point `aboutEdge`) in the direction `axis` (Manim `flip`: a half turn about `axis`). */
391
+ flip(axis?: Point, opts?: AboutOptions): this;
392
+ /** Moves the critical point `alignedEdge` of the mobject onto the point, or onto the same
393
+ * critical point of the mobject. `coorMask` `[1, 0]` moves along x only. */
394
+ moveTo(pointOrMobject: Point | Mobject, opts?: {
395
+ alignedEdge?: Point;
396
+ coorMask?: Point;
397
+ }): this;
398
+ /** Puts the mobject `buff` away from `mobjectOrPoint` in `direction`. With `alignedEdge`,
399
+ * the edges of both in that direction line up (Manim `aligned_edge`).
400
+ * `submobjectToAlign` or `indexOfSubmobjectToAlign` lines up a child in place of the whole;
401
+ * `coorMask` `[1, 0]` moves along x only. */
402
+ nextTo(mobjectOrPoint: Mobject | Point, direction?: Point, opts?: {
403
+ buff?: number;
404
+ alignedEdge?: Point;
405
+ submobjectToAlign?: Mobject;
406
+ indexOfSubmobjectToAlign?: number;
407
+ coorMask?: Point;
408
+ }): this;
409
+ /** Moves the critical point in `direction` to the frame edge, `buff` inside (Manim
410
+ * `align_on_border`). */
411
+ alignOnBorder(direction: Point, buff?: number): this;
412
+ /** Moves the mobject inside the frame where an edge is past it, `buff` from the edge
413
+ * (Manim `shift_onto_screen`). */
414
+ shiftOntoScreen(opts?: {
415
+ buff?: number;
416
+ }): this;
417
+ toCorner(corner?: Point, opts?: {
418
+ buff?: number;
419
+ }): this;
420
+ toEdge(edge?: Point, opts?: {
421
+ buff?: number;
422
+ }): this;
423
+ /** Moves the mobject so that its edge in `direction` lines up with the same edge of
424
+ * `mobjectOrPoint` (or with the point), on each axis where `direction` is not 0. */
425
+ alignTo(mobjectOrPoint: Mobject | Point, direction?: Point): this;
426
+ replace(mobject: Mobject, opts?: {
427
+ dimToMatch?: number;
428
+ stretch?: boolean;
429
+ }): this;
430
+ /** `replace(mobject)`, then a margin of `buff` along `dimToMatch` (Manim `surround`). */
431
+ surround(mobject: Mobject, opts?: {
432
+ dimToMatch?: number;
433
+ stretch?: boolean;
434
+ buff?: number;
435
+ }): this;
436
+ /** Scales so that the size along `dim` is that of `mobject` (Manim `match_dim_size`). */
437
+ matchDimSize(mobject: Mobject, dim: number, opts?: AboutOptions & {
438
+ stretch?: boolean;
439
+ }): this;
440
+ /** Scales to the width of `mobject` (Manim `match_width`). */
441
+ matchWidth(mobject: Mobject, opts?: AboutOptions & {
442
+ stretch?: boolean;
443
+ }): this;
444
+ /** Scales to the height of `mobject` (Manim `match_height`). */
445
+ matchHeight(mobject: Mobject, opts?: AboutOptions & {
446
+ stretch?: boolean;
447
+ }): this;
448
+ /** Moves along `dim` to the coordinate of `mobject`'s critical point `direction` (Manim
449
+ * `match_coord`). */
450
+ matchCoord(mobject: Mobject, dim: number, direction?: Point): this;
451
+ /** Moves along x to the x of `mobject` (Manim `match_x`). */
452
+ matchX(mobject: Mobject, direction?: Point): this;
453
+ /** Moves along y to the y of `mobject` (Manim `match_y`). */
454
+ matchY(mobject: Mobject, direction?: Point): this;
455
+ /** Rotates and scales the own straight path so it runs from `start` to `end`. */
456
+ putStartAndEndOn(start: Point, end: Point): this;
457
+ /** Puts each submobject next to the one before it in `direction`. `center` (true) then
458
+ * moves the group to the origin; `alignedEdge` lines up the edges of the submobjects. */
459
+ arrange(direction?: Point, opts?: {
460
+ buff?: number;
461
+ center?: boolean;
462
+ alignedEdge?: Point;
463
+ }): this;
464
+ /** Puts the submobjects in a grid and keeps the center of the group (Manim
465
+ * `arrange_in_grid`). With no `rows` and `cols`, the grid is about square; with one of them,
466
+ * the other fits all the submobjects. */
467
+ arrangeInGrid(opts?: GridOptions): this;
468
+ /** Sorts the children by `pointToNumFunc` of their centers, or by `submobFunc` (Manim `sort`). */
469
+ sort(pointToNumFunc?: (p: Point) => number, opts?: {
470
+ submobFunc?: (m: Mobject) => number;
471
+ }): this;
472
+ /** Puts the children in a random order, the same in each run (Manim `shuffle`). */
473
+ shuffle(opts?: {
474
+ recursive?: boolean;
475
+ }): this;
476
+ /** Reverses the order of the children (Manim `invert`). */
477
+ invert(opts?: {
478
+ recursive?: boolean;
479
+ }): this;
480
+ /** `arrange` (Manim's older name `arrange_submobjects`). */
481
+ arrangeSubmobjects(...args: Parameters<MobjectClass["arrange"]>): this;
482
+ /** `sort` (Manim's older name `sort_submobjects`). */
483
+ sortSubmobjects(...args: Parameters<MobjectClass["sort"]>): this;
484
+ /** `shuffle` (Manim's older name `shuffle_submobjects`). */
485
+ shuffleSubmobjects(...args: Parameters<MobjectClass["shuffle"]>): this;
486
+ /** `setFill(color, { opacity })`; `setFill({ opacity })` keeps the colour. */
487
+ setFill(color?: Color | {
488
+ opacity?: number;
489
+ family?: boolean;
490
+ }, opts?: {
491
+ opacity?: number;
492
+ family?: boolean;
493
+ }): this;
494
+ /** `setStroke(color, { width, opacity })`; `setStroke({ width })` keeps the colour. */
495
+ setStroke(color?: Color | {
496
+ width?: number;
497
+ opacity?: number;
498
+ family?: boolean;
499
+ }, opts?: {
500
+ width?: number;
501
+ opacity?: number;
502
+ family?: boolean;
503
+ }): this;
504
+ /** Sets the fill and stroke colour of the family, or of this node only with `family: false`.
505
+ * `alpha` has no effect, as in Manim. */
506
+ setColor(color?: Color, opts?: {
507
+ alpha?: number;
508
+ family?: boolean;
509
+ }): this;
510
+ /** Sets both opacities of the family, or of this node only (Manim `set_opacity`). */
511
+ setOpacity(opacity: number, opts?: {
512
+ family?: boolean;
513
+ }): this;
514
+ /** Multiplies both opacities by `1 - darkness`, of the family or of this node only. */
515
+ fade(darkness?: number, opts?: {
516
+ family?: boolean;
517
+ }): this;
518
+ /** Mixes the colour of each member with points `alpha` of the way to `color` (Manim
519
+ * `fade_to`). */
520
+ fadeTo(color: Color, alpha: number, opts?: {
521
+ family?: boolean;
522
+ }): this;
523
+ /** The stroke colour, or the fill colour when there is no stroke (Manim `get_color`). */
524
+ getColor(): Color;
525
+ /** Gives the family the colour that `getColor` gives (Manim `to_original_color`). */
526
+ toOriginalColor(): this;
527
+ /** Takes the colour of `mobject` (Manim `match_color`). */
528
+ matchColor(mobject: Mobject): this;
529
+ /** Colours the members with points along the colours, in order (Manim
530
+ * `set_color_by_gradient`). */
531
+ setColorByGradient(...colors: Color[]): this;
532
+ /** Colours the members with points along the colours, in order (Manim
533
+ * `set_submobject_colors_by_gradient`). */
534
+ setSubmobjectColorsByGradient(...colors: Color[]): this;
535
+ /** Colours the members with points by the distance of their centers from `center` (the
536
+ * center by default): `innerColor` at the center, `outerColor` from `radius` (Manim
537
+ * `set_colors_by_radial_gradient`). */
538
+ setColorsByRadialGradient(opts?: RadialGradientOptions): this;
539
+ /** As `setColorsByRadialGradient` (Manim `set_submobject_colors_by_radial_gradient`). */
540
+ setSubmobjectColorsByRadialGradient(opts?: RadialGradientOptions): this;
541
+ /** Adds a `BackgroundRectangle` as the first child (Manim `add_background_rectangle`). */
542
+ addBackgroundRectangle(opts?: BackgroundRectangleOptions): this;
543
+ /** Adds a background rectangle to each child (Manim
544
+ * `add_background_rectangle_to_submobjects`). */
545
+ addBackgroundRectangleToSubmobjects(opts?: BackgroundRectangleOptions): this;
546
+ /** Adds a background rectangle to each member with points (Manim
547
+ * `add_background_rectangle_to_family_members_with_points`). */
548
+ addBackgroundRectangleToFamilyMembersWithPoints(opts?: BackgroundRectangleOptions): this;
549
+ /** The own style becomes the mix of the styles of `mobject1` and `mobject2` at `alpha`
550
+ * (Manim `interpolate_color`). */
551
+ interpolateColor(mobject1: Mobject, mobject2: Mobject, alpha: number): this;
552
+ /** The own points become `pathFunc` of the points of `mobject1` and `mobject2` at `alpha`
553
+ * (a straight line by default), and the own style their mix (Manim `interpolate`). Both must
554
+ * have the same number of points: call `alignData` first. */
555
+ interpolate(mobject1: Mobject, mobject2: Mobject, alpha: number, pathFunc?: (start: Point[], end: Point[], alpha: number) => Point[]): this;
556
+ /** Makes this family and `mobject`'s family the same shape, with the same number of points
557
+ * in each member, for `interpolate` (Manim `align_data`). */
558
+ alignData(mobject: Mobject, opts?: {
559
+ skipPointAlignment?: boolean;
560
+ }): this;
561
+ /** An invisible mobject with one point at `center` (the center by default) (Manim
562
+ * `get_point_mobject`). */
563
+ getPointMobject(center?: Point): Mobject;
564
+ /** Gives both own paths the same number of curves, subpath by subpath (Manim
565
+ * `align_points`). */
566
+ alignPoints(mobject: Mobject): this;
567
+ /** Adds curves to the own path until it has as many points as `largerMobject` (Manim
568
+ * `align_points_with_larger`). */
569
+ alignPointsWithLarger(largerMobject: Mobject): this;
570
+ /** Gives both mobjects the same number of children, with faded copies (Manim
571
+ * `align_submobjects`). */
572
+ alignSubmobjects(mobject: Mobject): this;
573
+ /** When one of the two has no own points and the other has, the other moves its own path
574
+ * into a child (Manim `null_point_align`). */
575
+ nullPointAlign(mobject: Mobject): this;
576
+ /** Moves the own path into a new first child (Manim `push_self_into_submobjects`). */
577
+ pushSelfIntoSubmobjects(): this;
578
+ /** Adds `n` children: faded copies of the children, spread evenly (Manim
579
+ * `add_n_more_submobjects`). */
580
+ addNMoreSubmobjects(n: number): this;
581
+ /** A copy of `submob` (Manim `repeat_submobject`). */
582
+ repeatSubmobject(submob: Mobject): Mobject;
583
+ /** Removes the own points (Manim `reset_points`). */
584
+ resetPoints(): this;
585
+ /** Runs `func` on each member with points (Manim `apply_to_family`). */
586
+ applyToFamily(func: (m: Mobject) => void): this;
587
+ getFillOpacity(): number;
588
+ getStrokeOpacity(): number;
589
+ getStrokeWidth(): number;
590
+ getFillColor(): Color;
591
+ getStrokeColor(): Color;
592
+ /** Takes the points and styles of `other`'s family, member by member (same tree shape). */
593
+ becomePointsOf(other: Mobject): this;
594
+ /** Becomes a copy of `mobject`: points, styles, children, kind and flags. `matchHeight`,
595
+ * `matchWidth` and `stretch` first fit the copy to this size, and `matchCenter` moves it
596
+ * here (Manim `become`). */
597
+ become(mobject: Mobject, opts?: {
598
+ matchHeight?: boolean;
599
+ matchWidth?: boolean;
600
+ matchCenter?: boolean;
601
+ stretch?: boolean;
602
+ }): this;
603
+ /** Keeps a copy as `target` and returns it (Manim `generate_target`). Change the target,
604
+ * then play `m.MoveToTarget(mob)`. A copy is always deep, so `useDeepcopy` has no effect. */
605
+ generateTarget(useDeepcopy?: boolean): Mobject;
606
+ /** The target of `generateTarget` (Manim `target`). Reading it without a target is an error. */
607
+ get target(): Mobject;
608
+ set target(target: Mobject);
609
+ /** Keeps a copy of the current state (Manim `save_state`). `restore()` and `m.Restore(mob)`
610
+ * go back to it. */
611
+ saveState(): this;
612
+ /** Becomes the state that `saveState` kept (Manim `restore`). */
613
+ restore(): this;
614
+ /** The own control points, four for each curve: `[anchor, handle, handle, anchor]`
615
+ * (Manim `points`). The children are not included. */
616
+ getPoints(): Point[];
617
+ /** Sets the own path from control points, four for each curve, as `getPoints` gives
618
+ * them (Manim `set_points`). One point is a path of that point alone (Manim's
619
+ * `VectorizedPoint`). Points after the last whole curve start a path that is not drawn
620
+ * until a curve ends it. The style stays. */
621
+ setPoints(points: readonly Point[]): this;
622
+ /** Sets the own path to a smooth curve through `points` (Manim `set_points_smoothly`).
623
+ * The style stays. */
624
+ setPointsSmoothly(points: readonly Point[]): this;
625
+ /** The number of points of a curve: 4 (Manim `n_points_per_curve`). */
626
+ get nPointsPerCurve(): number;
627
+ /** Removes the own points (Manim `clear_points`). */
628
+ clearPoints(): this;
629
+ /** Adds points after the own points (Manim `append_points`). */
630
+ appendPoints(newPoints: readonly Point[]): this;
631
+ /** Gives the own points `newLength` points: cut, or repeated from the start (Manim
632
+ * `resize_points`). */
633
+ resizePoints(newLength: number, resizeFunc?: (points: Point[], length: number) => Point[]): this;
634
+ /** Sets the own curves from four lists: start anchors, first handles, second handles and end
635
+ * anchors (Manim `set_anchors_and_handles`). */
636
+ setAnchorsAndHandles(anchors1: readonly Point[], handles1: readonly Point[], handles2: readonly Point[], anchors2: readonly Point[]): this;
637
+ /** Starts a new subpath at `point` (Manim `start_new_path`). */
638
+ startNewPath(point: Point): this;
639
+ /** Adds one curve (Manim `add_cubic_bezier_curve`). */
640
+ addCubicBezierCurve(anchor1: Point, handle1: Point, handle2: Point, anchor2: Point): this;
641
+ /** Adds curves, each `[anchor, handle, handle, anchor]` (Manim `add_cubic_bezier_curves`). */
642
+ addCubicBezierCurves(curves: readonly (readonly Point[])[]): this;
643
+ /** Adds a curve from the last point (Manim `add_cubic_bezier_curve_to`). A path with no
644
+ * points is an error: call `startNewPath` first. */
645
+ addCubicBezierCurveTo(handle1: Point, handle2: Point, anchor: Point): this;
646
+ /** Adds a quadratic curve from the last point, as a cubic (Manim
647
+ * `add_quadratic_bezier_curve_to`). */
648
+ addQuadraticBezierCurveTo(handle: Point, anchor: Point): this;
649
+ /** Adds a straight line from the last point (Manim `add_line_to`). */
650
+ addLineTo(point: Point): this;
651
+ /** Adds a curve that goes on smoothly from the last curve: `addSmoothCurveTo(anchor)` or
652
+ * `addSmoothCurveTo(handle2, anchor)` (Manim `add_smooth_curve_to`). */
653
+ addSmoothCurveTo(...points: Point[]): this;
654
+ /** True when the last point starts a path that has no curve yet (Manim
655
+ * `has_new_path_started`). */
656
+ hasNewPathStarted(): boolean;
657
+ /** The last own point (Manim `get_last_point`). */
658
+ getLastPoint(): Point;
659
+ /** Adds a line back to the start of the last subpath, if the path is not closed (Manim
660
+ * `close_path`). */
661
+ closePath(): this;
662
+ /** Adds straight lines from the last point through `points` (Manim
663
+ * `add_points_as_corners`). */
664
+ addPointsAsCorners(points: readonly Point[]): this;
665
+ /** The own path becomes straight lines through `points` (Manim `set_points_as_corners`). */
666
+ setPointsAsCorners(points: readonly Point[]): this;
667
+ /** Moves the handles of each member with points: `"smooth"` makes each subpath a smooth
668
+ * curve through its anchors, `"jagged"` makes straight lines (Manim `change_anchor_mode`). */
669
+ changeAnchorMode(mode: "jagged" | "smooth"): this;
670
+ /** `changeAnchorMode("smooth")` (Manim `make_smooth`). */
671
+ makeSmooth(): this;
672
+ /** `changeAnchorMode("jagged")` (Manim `make_jagged`). */
673
+ makeJagged(): this;
674
+ /** Adds a subpath of whole curves (Manim `add_subpath`). */
675
+ addSubpath(points: readonly Point[]): this;
676
+ /** Adds the own points of `vectorizedMobject` (Manim `append_vectorized_mobject`). */
677
+ appendVectorizedMobject(vectorizedMobject: Mobject): this;
678
+ /** Moves each handle `factor` of the way from its anchor (Manim
679
+ * `scale_handle_to_anchor_distances`). */
680
+ scaleHandleToAnchorDistances(factor: number): this;
681
+ /** True when the points are equal up to `toleranceForPointEquality` (Manim
682
+ * `consider_points_equals`). */
683
+ considerPointsEquals(p0: Point, p1: Point): boolean;
684
+ /** `considerPointsEquals` (Manim `consider_points_equals_2d`: points have two numbers here). */
685
+ considerPointsEquals2d(p0: Point, p1: Point): boolean;
686
+ /** The curves of `points`, four points each (Manim `get_cubic_bezier_tuples_from_points`). */
687
+ getCubicBezierTuplesFromPoints(points: readonly Point[]): Point[][];
688
+ /** As `getCubicBezierTuplesFromPoints` (Manim `gen_cubic_bezier_tuples_from_points`). */
689
+ genCubicBezierTuplesFromPoints(points: readonly Point[]): Point[][];
690
+ /** The subpaths of `points`: a curve that does not start where the last one ended starts a
691
+ * new subpath (Manim `get_subpaths_from_points`). */
692
+ getSubpathsFromPoints(points: readonly Point[]): Point[][];
693
+ /** As `getSubpathsFromPoints` (Manim `gen_subpaths_from_points_2d`). */
694
+ genSubpathsFromPoints2d(points: readonly Point[]): Point[][];
695
+ /** `[start, end)` point indices of each subpath of `points` (Manim
696
+ * `get_subpath_split_indices_from_points`). `nDims` has no effect: points have two numbers. */
697
+ getSubpathSplitIndicesFromPoints(points: readonly Point[], nDims?: number): [number, number][];
698
+ /** The subpaths of the own points (Manim `get_subpaths`). */
699
+ getSubpaths(): Point[][];
700
+ /** The four points of curve `n` (Manim `get_nth_curve_points`). */
701
+ getNthCurvePoints(n: number): Point[];
702
+ /** Curve `n` as a function of `t` from 0 to 1 (Manim `get_nth_curve_function`). */
703
+ getNthCurveFunction(n: number): (t: number) => Point;
704
+ /** The lengths of the `samplePoints - 1` straight pieces of curve `n` (default 10 samples)
705
+ * (Manim `get_nth_curve_length_pieces`). */
706
+ getNthCurveLengthPieces(n: number, samplePoints?: number): number[];
707
+ /** The length of curve `n` (Manim `get_nth_curve_length`). */
708
+ getNthCurveLength(n: number, samplePoints?: number): number;
709
+ /** `[function, length]` of curve `n` (Manim `get_nth_curve_function_with_length`). */
710
+ getNthCurveFunctionWithLength(n: number, samplePoints?: number): [(t: number) => Point, number];
711
+ /** The number of own curves (Manim `get_num_curves`). */
712
+ getNumCurves(): number;
713
+ /** Each own curve as a function of `t` (Manim `get_curve_functions`). */
714
+ getCurveFunctions(): ((t: number) => Point)[];
715
+ /** `[function, length]` of each own curve (Manim `get_curve_functions_with_lengths`). */
716
+ getCurveFunctionsWithLengths(opts?: {
717
+ samplePoints?: number;
718
+ }): [(t: number) => Point, number][];
719
+ /** `[startAnchors, firstHandles, secondHandles, endAnchors]` (Manim
720
+ * `get_anchors_and_handles`). */
721
+ getAnchorsAndHandles(): [Point[], Point[], Point[], Point[]];
722
+ /** The start anchor of each own curve (Manim `get_start_anchors`). */
723
+ getStartAnchors(): Point[];
724
+ /** The end anchor of each own curve (Manim `get_end_anchors`). */
725
+ getEndAnchors(): Point[];
726
+ /** The start and end anchor of each own curve, in turn (Manim `get_anchors`). */
727
+ getAnchors(): Point[];
728
+ /** The length of the own path (Manim `get_arc_length`). */
729
+ getArcLength(samplePointsPerCurve?: number): number;
730
+ /** Adds `n` curves to the own path: the curves are cut into pieces (Manim
731
+ * `insert_n_curves`). */
732
+ insertNCurves(n: number): this;
733
+ /** `points` with `n` more curves (Manim `insert_n_curves_to_point_list`). */
734
+ insertNCurvesToPointList(n: number, points: readonly Point[]): Point[];
735
+ /** Each mobject has one fill colour and one stroke colour: nothing to align (Manim
736
+ * `align_rgbas`). */
737
+ alignRgbas(vmobject: Mobject): this;
738
+ /** A copy whose own path is the part of this path from proportion `a` to `b` (Manim
739
+ * `get_subcurve`). */
740
+ getSubcurve(a: number, b: number): Mobject;
741
+ /** `"CW"` or `"CCW"`: the direction of the anchors (Manim `get_direction`). A brace gives its
742
+ * direction as a unit vector, as in Manim. */
743
+ getDirection(): "CW" | "CCW" | Point;
744
+ /** Reverses the own points (Manim `reverse_direction`). */
745
+ reverseDirection(): this;
746
+ /** Reverses the own points when the direction is not `targetDirection` (Manim
747
+ * `force_direction`). */
748
+ forceDirection(targetDirection: "CW" | "CCW"): this;
749
+ /** Sets the fill and the stroke, of the family or of this node only (Manim `set_style`). */
750
+ setStyle(opts?: StyleSettings & {
751
+ family?: boolean;
752
+ }): this;
753
+ /** The fill and the stroke (Manim `get_style`). `simple` has no effect: a mobject has one
754
+ * colour and one opacity each. */
755
+ getStyle(_opts?: {
756
+ simple?: boolean;
757
+ }): StyleSettings;
758
+ /** Takes the style of `vmobject`, and with `family`, the children take the styles of its
759
+ * children, paired evenly (Manim `match_style`). */
760
+ matchStyle(vmobject: Mobject, opts?: {
761
+ family?: boolean;
762
+ }): this;
763
+ /** The ends of the stroke of the family (Manim `set_cap_style`). */
764
+ setCapStyle(capStyle: CapStyleType): this;
765
+ /** The ends of the stroke (Manim `cap_style`). */
766
+ get capStyle(): CapStyleType;
767
+ /** The corners of the stroke (Manim `joint_type`). Setting it changes the family. */
768
+ get jointType(): LineJointType;
769
+ set jointType(value: LineJointType);
770
+ /** `[[r, g, b, opacity]]`, each from 0 to 1 (Manim `get_fill_rgbas`). */
771
+ getFillRgbas(): [number, number, number, number][];
772
+ /** `[[r, g, b, opacity]]` of the stroke (Manim `get_stroke_rgbas`). */
773
+ getStrokeRgbas(): [number, number, number, number][];
774
+ /** `[[r, g, b, opacity]]` of `color` (Manim `generate_rgbas_array`). */
775
+ generateRgbasArray(color: Color, opacity: number): [number, number, number, number][];
776
+ /** Sets the fill (`"fill_rgbas"`) or the stroke (`"stroke_rgbas"`) of the family (Manim
777
+ * `update_rgbas_array`). */
778
+ updateRgbasArray(arrayName: "fill_rgbas" | "stroke_rgbas", color?: Color, opacity?: number): this;
779
+ /** `[fill colour]` (Manim `get_fill_colors`: one colour each here). */
780
+ getFillColors(): Color[];
781
+ /** `[fill opacity]` (Manim `get_fill_opacities`). */
782
+ getFillOpacities(): number[];
783
+ /** `[stroke colour]` (Manim `get_stroke_colors`). */
784
+ getStrokeColors(): Color[];
785
+ /** `[stroke opacity]` (Manim `get_stroke_opacities`). */
786
+ getStrokeOpacities(): number[];
787
+ /** Adds a filled triangle tip in the stroke colour (Manim `add_tip`). The path is
788
+ * shortened to end at the base of the tip. A tip at the end makes the Mobject an arrow
789
+ * for the arrow checks. */
790
+ addTip(opts?: {
791
+ tipLength?: number;
792
+ tipWidth?: number;
793
+ atStart?: boolean;
794
+ }): this;
795
+ /** The text without whitespace ("" for a non-text). */
796
+ text(): string;
797
+ get fontSize(): number;
798
+ /** Runs `updateFunction(m, dt)` on every frame while on stage; with `callUpdater`, once now
799
+ * with dt 0. `index` puts it at that place among the updaters of this node.
800
+ *
801
+ * An updater that takes `dt` runs on the real clock: in a move, it runs after the move with
802
+ * real seconds, so its speed is the same in the move and after it. Its object is then closed
803
+ * in the move: from the first part of the move, the move code does not read or change it.
804
+ * With `clock: "move"`, it runs on the clock of the move: with the Manim seconds of each
805
+ * part, together with the animations. An updater with no `dt` runs on the clock of the move. */
806
+ addUpdater(updateFunction: (m: this, dt: number) => void, opts?: {
807
+ index?: number;
808
+ callUpdater?: boolean;
809
+ clock?: "move";
810
+ }): this;
811
+ /** Removes `updateFunction` from the updaters of this node (Manim `remove_updater`). */
812
+ removeUpdater(updateFunction: (m: this, dt: number) => void): this;
813
+ /** Removes the updaters of the family, or of this node only (Manim `clear_updaters`). */
814
+ clearUpdaters(opts?: {
815
+ recursive?: boolean;
816
+ }): this;
817
+ hasUpdaters(): boolean;
818
+ /** The updaters of this node, in order (Manim `get_updaters`). */
819
+ getUpdaters(): ((m: Mobject, dt: number) => void)[];
820
+ /** The updaters of the family (Manim `get_family_updaters`). */
821
+ getFamilyUpdaters(): ((m: Mobject, dt: number) => void)[];
822
+ /** The updaters of this node that take `dt`: functions of two parameters (Manim
823
+ * `get_time_based_updaters`). */
824
+ getTimeBasedUpdaters(): ((m: Mobject, dt: number) => void)[];
825
+ /** True when an updater of this node takes `dt` (Manim `has_time_based_updater`). */
826
+ hasTimeBasedUpdater(): boolean;
827
+ /** The updaters of this node become those of `mobject` (Manim `match_updaters`). */
828
+ matchUpdaters(mobject: Mobject): this;
829
+ /** Runs the updaters of the family, or of this node only (Manim `update`). */
830
+ update(dt?: number, opts?: {
831
+ recursive?: boolean;
832
+ }): this;
833
+ /** Pauses the updaters of the family, or of this node only (Manim `suspend_updating`). */
834
+ suspendUpdating(opts?: {
835
+ recursive?: boolean;
836
+ }): this;
837
+ /** Resumes the updaters and runs them once (Manim `resume_updating`). */
838
+ resumeUpdating(opts?: {
839
+ recursive?: boolean;
840
+ }): this;
841
+ /** `mob.always.nextTo(other, m.UP)` adds an updater that calls the method on every frame,
842
+ * and calls it now (Manim `always`). The methods chain: each adds its own updater. */
843
+ get always(): UpdaterBuilder;
844
+ /** Manim's `.animate`: the Mobject methods change a copy, played as one animation. */
845
+ get animate(): AnimationBuilder;
846
+ }
847
+ /** The options every animation takes (Manim's `Animation` keyword arguments). */
848
+ export interface AnimationOptions {
849
+ /** The rate function: `smooth` unless the animation has another default. */
850
+ rateFunc?: RateFunc;
851
+ /** Staggers the family members: each starts when the one before it is this fraction done. */
852
+ lagRatio?: number;
853
+ /** Seconds (Manim `run_time`): 1 by default, the length of its animations for a group. The
854
+ * `runTime` of `s.play` replaces it. */
855
+ runTime?: number;
856
+ /** Runs the rate function backwards: `rateFunc(1 - t)`. */
857
+ reverseRateFunction?: boolean;
858
+ /** The name of the animation (Manim shows it while it renders). */
859
+ name?: string;
860
+ /** Removes the mobject from the stage at the end. */
861
+ remover?: boolean;
862
+ /** Pauses the updaters of the mobject while the animation plays. */
863
+ suspendMobjectUpdating?: boolean;
864
+ /** Marks an animation that brings its mobject onto the stage (Manim `introducer`). */
865
+ introducer?: boolean;
866
+ }
867
+ /** True when `a` runs in JavaScript: a subclass of `m.Animation` that its class drives, not an
868
+ * engine animation. */
869
+ export declare function isDriven(a: Animation): boolean;
870
+ /** One animation: it plays once. Make your own animation as in Manim: extend `m.Animation` and
871
+ * override `interpolateMobject(alpha)` or `interpolateSubmobject(submobject, start, alpha)`.
872
+ * Such an animation runs in JavaScript, with the engine's clock:
873
+ *
874
+ * class Spin extends m.Animation {
875
+ * interpolateMobject(alpha: number) {
876
+ * this.mobject?.becomePointsOf(this.startingMobject!).rotate(this.rateFunc(alpha) * m.TAU);
877
+ * }
878
+ * }
879
+ * s.play(new Spin(square, { runTime: 2 }));
880
+ */
881
+ export declare class Animation {
882
+ #private;
883
+ readonly [ANIMATION]: RawAnimation;
884
+ /** The animated mobject (Manim `mobject`), or undefined (`Wait`, a group). */
885
+ mobject: Mobject | undefined;
886
+ /** The copy that `begin` keeps (Manim `starting_mobject`). */
887
+ startingMobject: Mobject | undefined;
888
+ name: string | undefined;
889
+ lagRatio: number;
890
+ reverseRateFunction: boolean;
891
+ /** The rate function (Manim `rate_func`). */
892
+ rateFunc: RateFunc;
893
+ constructor(mobject?: Mobject, opts?: AnimationOptions);
894
+ /** Pauses the updaters of the mobject while the animation plays (Manim
895
+ * `suspend_mobject_updating`). */
896
+ get suspendMobjectUpdating(): boolean;
897
+ set suspendMobjectUpdating(suspend: boolean);
898
+ /** The run time in seconds (Manim `run_time`). */
899
+ get runTime(): number;
900
+ set runTime(seconds: number);
901
+ /** Prepares the animation and sets the start (Manim `begin`). The engine calls it when the
902
+ * animation starts; call it yourself only to drive an animation in an updater. */
903
+ begin(): void;
904
+ /** Sets the end (Manim `finish`). */
905
+ finish(): void;
906
+ /** Removes the mobject from `scene` when the animation is a remover (Manim
907
+ * `clean_up_from_scene`). The engine does this at the end of a play. */
908
+ cleanUpFromScene(scene: Scene): void;
909
+ /** A copy of the mobject, which `begin` keeps (Manim `create_starting_mobject`). */
910
+ createStartingMobject(): Mobject | undefined;
911
+ /** The mobjects of the animation (Manim `get_all_mobjects`). */
912
+ getAllMobjects(): Mobject[];
913
+ /** The family members with points of each of `getAllMobjects()`, zipped (Manim
914
+ * `get_all_families_zipped`). */
915
+ getAllFamiliesZipped(): Mobject[][];
916
+ /** Runs the updaters of the other mobjects of the animation (Manim `update_mobjects`). */
917
+ updateMobjects(dt: number): void;
918
+ /** `getAllMobjects()` without the animated mobject (Manim `get_all_mobjects_to_update`). */
919
+ getAllMobjectsToUpdate(): Mobject[];
920
+ /** Sets the animation at linear progress `alpha`, 0 to 1 (Manim `interpolate`). */
921
+ interpolate(alpha: number): void;
922
+ /** Sets the mobject at linear progress `alpha` (Manim `interpolate_mobject`): calls
923
+ * `interpolateSubmobject` for each family member, with its own progress. */
924
+ interpolateMobject(alpha: number): void;
925
+ /** Sets one family member at its progress (Manim `interpolate_submobject`). It does nothing
926
+ * here: an animation that you write overrides it. */
927
+ interpolateSubmobject(submobject: Mobject, startingSubmobject: Mobject, alpha: number): this;
928
+ /** The progress of member `index` of `numSubmobjects`, with `lagRatio` and the rate function
929
+ * (Manim `get_sub_alpha`). */
930
+ getSubAlpha(alpha: number, index: number, numSubmobjects: number): number;
931
+ setRunTime(runTime: number): this;
932
+ /** The run time in seconds: the one that was set, or the default of the animation. */
933
+ getRunTime(): number;
934
+ /** Manim `set_rate_func`: a built-in rate function such as `m.smooth`, or any `(t) => number`. */
935
+ setRateFunc(rateFunc: RateFunc): this;
936
+ getRateFunc(): RateFunc;
937
+ /** Sets `lagRatio`, as the `lagRatio` option does. */
938
+ setLagRatio(lagRatio: number): this;
939
+ setName(name: string): this;
940
+ /** True when the animation removes its mobject at the end. */
941
+ isRemover(): boolean;
942
+ /** True when the animation brings its mobject onto the stage. */
943
+ isIntroducer(): boolean;
944
+ }
945
+ /** The options of `m.Mobject(opts)` (Manim's keyword arguments). */
946
+ export interface MobjectOptions {
947
+ color?: Color;
948
+ name?: string;
949
+ target?: Mobject;
950
+ zIndex?: number;
951
+ }
952
+ /** One node of the picture tree (Manim `Mobject`). */
953
+ export type Mobject = MobjectClass;
954
+ /** `m.Mobject(opts)` makes an empty Mobject, as Manim's `Mobject()`. `instanceof m.Mobject`
955
+ * is true for every node. */
956
+ export declare const Mobject: typeof MobjectClass & ((opts?: MobjectOptions) => Mobject);
957
+ /** The options of an engine animation that are not Manim's keyword arguments of its call. */
958
+ export interface EngineDefaults {
959
+ rate?: RateFunc;
960
+ lagRatio?: number;
961
+ introducer?: boolean;
962
+ remover?: boolean;
963
+ }
964
+ /** An engine animation as an Animation (or a subclass `Cls`): `opts` are the caller's options,
965
+ * `defaults` the defaults of the engine animation. */
966
+ export declare function engineAnimation<T extends Animation>(Cls: new (mobject?: Mobject, opts?: AnimationOptions) => T, handle: RawAnimation, mobject: Mobject | undefined, opts?: AnimationOptions & {
967
+ pathArc?: number;
968
+ shift?: Point;
969
+ scale?: number;
970
+ pathFunc?: PathFunc;
971
+ }, defaults?: EngineDefaults): T;
972
+ /** Manim's `path_func`: the points at progress `alpha`, from the start points and the end
973
+ * points of one family member. */
974
+ export type PathFunc = (startPoints: Point[], endPoints: Point[], alpha: number) => Point[];
975
+ /** The Mobject methods that return the Mobject (they chain on `.animate`). */
976
+ type Chaining = {
977
+ [K in Exclude<keyof Mobject, "animate" | "always">]: Mobject[K] extends (...args: never[]) => Mobject ? K : never;
978
+ }[Exclude<keyof Mobject, "animate" | "always">];
979
+ type BuilderMethods = {
980
+ [K in Chaining]: (...args: Parameters<Mobject[K]>) => AnimationBuilder;
981
+ };
982
+ /** `mob.always`: each Mobject method that chains adds an updater that calls it. */
983
+ export type UpdaterBuilder = {
984
+ [K in Chaining]: (...args: Parameters<Mobject[K]>) => UpdaterBuilder;
985
+ };
986
+ /** `mob.animate.shift(m.UP).setColor(c)`, or `mob.animate({ rateFunc, pathArc }).shift(m.UP)`: an
987
+ * Animation to a copy of `mob` that the chained Mobject methods change. */
988
+ export type AnimationBuilder = Animation & BuilderMethods & ((opts: AnimationOptions & {
989
+ pathArc?: number;
990
+ }) => AnimationBuilder);
991
+ /** Animations as `s.play` and the groups take them: arrays flatten. */
992
+ export type Animations = Animation | readonly Animations[];
993
+ /** The Animations of rest arguments, arrays flattened. */
994
+ export declare function animationList(items: readonly Animations[]): Animation[];
995
+ /** Rest arguments `T` with an optional options object `O` last. */
996
+ export declare function split<T, O>(args: readonly (T | O)[]): [T[], O | undefined];
997
+ /** The engine animations of rest arguments (arrays flatten), each checked. */
998
+ export declare function animations(label: string, items: readonly Animations[]): RawAnimation[];
999
+ /** The shape functions that Circumscribe draws as a circle: geometry.ts adds `m.Circle`. */
1000
+ export declare const circleFrames: WeakSet<object>;
1001
+ /** The animations of `tracker.animate`. */
1002
+ interface TrackerMethods {
1003
+ setValue(value: number): Animation;
1004
+ incrementValue(delta: number): Animation;
1005
+ }
1006
+ /** `tracker.animate`: `.setValue(v)` and `.incrementValue(d)`, or called with the animation
1007
+ * options first, as `mob.animate`. */
1008
+ export type TrackerBuilder = TrackerMethods & ((opts: AnimationOptions) => TrackerMethods);
1009
+ /** A number that animations change and updaters read. */
1010
+ declare class Tracker {
1011
+ #private;
1012
+ constructor(value?: number);
1013
+ getValue(): number;
1014
+ setValue(value: number): this;
1015
+ incrementValue(dValue: number): this;
1016
+ /** Sets the value between the values of two trackers at `alpha` (Manim `interpolate`).
1017
+ * `pathFunc` maps `[a, 0]`, `[b, 0]` and `alpha` to the point whose x is the value. */
1018
+ interpolate(mobject1: Tracker, mobject2: Tracker, alpha: number, pathFunc?: (a: Point, b: Point, alpha: number) => Point): this;
1019
+ /** `tracker.animate.setValue(v)`, `tracker.animate.incrementValue(d)`, or with the
1020
+ * animation options first: `tracker.animate({ rateFunc }).setValue(v)`. */
1021
+ get animate(): TrackerBuilder;
1022
+ }
1023
+ /** A ValueTracker. */
1024
+ export type ValueTracker = Tracker;
1025
+ /** `ValueTracker(value)` (Manim; called without `new`). */
1026
+ export declare function ValueTracker(value?: number): ValueTracker;
1027
+ /** The style options of every shape (Manim's VMobject keyword arguments). `color` sets the
1028
+ * fill and stroke colours; `fillColor` and `strokeColor` then replace one of them. */
1029
+ export interface StyleOptions {
1030
+ color?: Color;
1031
+ fillColor?: Color;
1032
+ fillOpacity?: number;
1033
+ strokeColor?: Color;
1034
+ strokeWidth?: number;
1035
+ strokeOpacity?: number;
1036
+ }
1037
+ /** `m` with the style options applied, in Manim's order. */
1038
+ export declare function styled<T extends Mobject>(m: T, style?: StyleOptions): T;
1039
+ /** A text weight (Manim's `weight` and `t2w`): `m.BOLD` and the heavier weights use the house
1040
+ * font's semibold face; the others use its regular face. */
1041
+ export type Weight = string;
1042
+ /** A text slant (Manim's `slant` and `t2s`): `"ITALIC"` and `"OBLIQUE"` slant the glyphs. */
1043
+ export type Slant = string;
1044
+ /** The options of Text and MarkupText (Manim's keyword arguments). */
1045
+ export interface TextOptions {
1046
+ fontSize?: number;
1047
+ color?: Color;
1048
+ fillOpacity?: number;
1049
+ strokeWidth?: number;
1050
+ /** Manim's `line_spacing`: -1 (the default) is the font's spacing; another value puts the
1051
+ * baselines `(1 + lineSpacing) / 1.3` times as far apart. */
1052
+ lineSpacing?: number;
1053
+ slant?: Slant;
1054
+ weight?: Weight;
1055
+ /** A colour for each occurrence of a substring, or for a slice `"[start:end]"` of the
1056
+ * text (spaces count). A later key wins where two overlap. */
1057
+ t2c?: Readonly<Record<string, Color>>;
1058
+ /** A slant for each key, as `t2c`. */
1059
+ t2s?: Readonly<Record<string, Slant>>;
1060
+ /** A weight for each key, as `t2c`. */
1061
+ t2w?: Readonly<Record<string, Weight>>;
1062
+ /** A colour gradient for each key, as `t2c`. */
1063
+ t2g?: Readonly<Record<string, readonly Color[]>>;
1064
+ /** Colours spread over the characters, first to last. */
1065
+ gradient?: readonly Color[];
1066
+ /** The number of spaces for each tab. */
1067
+ tabWidth?: number;
1068
+ /** Scales the text to this height. */
1069
+ height?: number;
1070
+ /** Scales the text to this width. */
1071
+ width?: number;
1072
+ }
1073
+ /** Manim's `color_gradient`: `n` colours spread evenly over `colors`. */
1074
+ export declare function gradientColors(colors: readonly Color[], n: number): Color[];
1075
+ /** House-font text (Manim `Text`). All on-screen words use Text. Its submobjects are the
1076
+ * glyphs, one for each character that is not whitespace. */
1077
+ export declare function Text(text: string, opts?: TextOptions): Mobject;
1078
+ /** The background panel of Code (Manim's `background_config`). Colours default to the
1079
+ * formatter style's panel. */
1080
+ export interface CodeBackgroundConfig {
1081
+ buff?: number;
1082
+ fillColor?: Color;
1083
+ fillOpacity?: number;
1084
+ strokeColor?: Color;
1085
+ strokeWidth?: number;
1086
+ cornerRadius?: number;
1087
+ }
1088
+ /** The text of Code (Manim's `paragraph_config`). */
1089
+ export interface CodeParagraphConfig {
1090
+ fontSize?: number;
1091
+ /** Extra space between lines, in ems: 0.5 puts the baselines 1.5 ems apart. */
1092
+ lineSpacing?: number;
1093
+ }
1094
+ /** The options of Code (Manim's keyword arguments). */
1095
+ export interface CodeOptions {
1096
+ /** The source code. */
1097
+ codeString: string;
1098
+ /** A language name or file extension: typescript (ts), javascript (js), json, rust (rs),
1099
+ * python (py) or bash (sh, shell). Omitted: plain text. */
1100
+ language?: string;
1101
+ /** The colour theme: "dark" (the default) or "light". */
1102
+ formatterStyle?: "dark" | "light";
1103
+ tabWidth?: number;
1104
+ addLineNumbers?: boolean;
1105
+ lineNumbersFrom?: number;
1106
+ background?: "rectangle" | "window";
1107
+ backgroundConfig?: CodeBackgroundConfig;
1108
+ paragraphConfig?: CodeParagraphConfig;
1109
+ }
1110
+ /** Source code with syntax highlighting: Manim's `Code`. Its submobjects are the background,
1111
+ * the line numbers (with `addLineNumbers`) and the code lines. */
1112
+ export declare class CodeMobject extends Mobject {
1113
+ #private;
1114
+ /** The code lines: line `i` is `codeLines.submobjects[i]`, and its submobjects are its
1115
+ * characters that are not whitespace. */
1116
+ get codeLines(): Mobject;
1117
+ /** The line numbers, one submobject for each line, or undefined without them. */
1118
+ get lineNumbers(): Mobject | undefined;
1119
+ /** The panel (with the window buttons as its submobjects). */
1120
+ get background(): Mobject;
1121
+ copy(): CodeMobject;
1122
+ }
1123
+ /** A code block as a type: what Code returns. */
1124
+ export type Code = CodeMobject;
1125
+ /** Source code with syntax highlighting (Manim `Code`): `Code({ codeString, language })`. The
1126
+ * engine has the grammars of bat. A language with no grammar is an error at the call; no
1127
+ * language is plain text. */
1128
+ export declare function Code(opts: CodeOptions): CodeMobject;
1129
+ /** The options of MathTex and Tex (Manim's keyword arguments). */
1130
+ export interface TexOptions {
1131
+ fontSize?: number;
1132
+ color?: Color;
1133
+ /** Put between the arguments: " " for MathTex, "" for Tex. */
1134
+ argSeparator?: string;
1135
+ /** Each occurrence becomes a part of its own. */
1136
+ substringsToIsolate?: readonly string[];
1137
+ /** Each key becomes a part of its own, in the colour. */
1138
+ texToColorMap?: Readonly<Record<string, Color>>;
1139
+ }
1140
+ /** How getPartsByTex and setColorByTex compare a part with `tex`. */
1141
+ export interface TexMatch {
1142
+ /** True (the default): the part contains `tex`. False: the part is `tex`. */
1143
+ substring?: boolean;
1144
+ caseSensitive?: boolean;
1145
+ }
1146
+ /** A formula: Manim's `MathTex` or `Tex`. Its submobjects are the parts, one for each
1147
+ * argument, `{{ … }}` group and isolated substring; each part's submobjects are its glyphs. */
1148
+ export declare class MathTexMobject extends Mobject {
1149
+ #private;
1150
+ /** The whole LaTeX (Manim `tex_string`). */
1151
+ readonly texString: string;
1152
+ constructor(handle: RawMobject, texStrings: readonly string[], texString: string);
1153
+ /** The LaTeX of each part (Manim `tex_strings`). */
1154
+ get texStrings(): readonly string[];
1155
+ /** The whole LaTeX (Manim `get_tex_string`). */
1156
+ getTexString(): string;
1157
+ /** Sets the opacity of the parts that match `tex`; with `remainingOpacity`, the other parts
1158
+ * take that opacity first (Manim `set_opacity_by_tex`). */
1159
+ setOpacityByTex(tex: string, opacity?: number, remainingOpacity?: number, opts?: TexMatch): this;
1160
+ /** Sorts the parts by their LaTeX (Manim `sort_alphabetically`). */
1161
+ sortAlphabetically(): this;
1162
+ copy(): MathTexMobject;
1163
+ /** The parts whose LaTeX contains `tex` (or is `tex`), as a VGroup. */
1164
+ getPartsByTex(tex: string, opts?: TexMatch): Mobject;
1165
+ /** The first part whose LaTeX contains `tex`, or undefined (Manim `None`). */
1166
+ getPartByTex(tex: string, opts?: TexMatch): Mobject | undefined;
1167
+ setColorByTex(tex: string, color: Color, opts?: TexMatch): this;
1168
+ setColorByTexToColorMap(texsToColorMap: Readonly<Record<string, Color>>, opts?: TexMatch): this;
1169
+ /** The index of `part` among the parts. */
1170
+ indexOfPart(part: Mobject): number;
1171
+ indexOfPartByTex(tex: string, opts?: TexMatch): number;
1172
+ }
1173
+ /** A formula as a type: what MathTex and Tex return. */
1174
+ export type MathTex = MathTexMobject;
1175
+ /** What Tex returns. */
1176
+ export type Tex = MathTexMobject;
1177
+ /** Math-mode LaTeX (Manim `MathTex`), drawn by MathJax: `MathTex("a^2", "+", "b^2", { fontSize })`. */
1178
+ export declare function MathTex(...args: (string | TexOptions)[]): MathTexMobject;
1179
+ /** Text-mode LaTeX (Manim `Tex`): math goes between `$` signs. */
1180
+ export declare function Tex(...args: (string | TexOptions)[]): MathTexMobject;
1181
+ /** Mobjects of rest arguments: arrays nest to any depth. */
1182
+ export type Mobjects = Mobject | readonly Mobjects[];
1183
+ /** The options of `m.VMobject` (Manim's keyword arguments). */
1184
+ export interface VMobjectOptions extends StyleOptions {
1185
+ jointType?: LineJointType;
1186
+ capStyle?: CapStyleType;
1187
+ closeNewPoints?: boolean;
1188
+ preFunctionHandleToAnchorScaleFactor?: number;
1189
+ makeSmoothAfterApplyingFunctions?: boolean;
1190
+ toleranceForPointEquality?: number;
1191
+ /** 4: a curve is a cubic Bézier curve. Another value is an error. */
1192
+ nPointsPerCubicCurve?: number;
1193
+ }
1194
+ /** A Mobject with no points: build its path with `startNewPath`, `addLineTo`,
1195
+ * `setPointsAsCorners` and the other path methods (Manim `VMobject`). */
1196
+ export declare function VMobject(opts?: VMobjectOptions): Mobject;
1197
+ export declare function VGroup(...items: Mobjects[]): Mobject;
1198
+ /** Points of rest arguments: points, or arrays of them nested to any depth. */
1199
+ export type Points = Point | readonly Points[];
1200
+ export declare function flatPoints(items: readonly Points[]): Point[];
1201
+ /** An open polyline through `points` (not in Manim): `Polyline(...points, opts)`. */
1202
+ export declare function Polyline(...args: (Points | StyleOptions)[]): Mobject;
1203
+ export declare function CubicBezier(startAnchor: Point, startHandle: Point, endHandle: Point, endAnchor: Point, opts?: StyleOptions): Mobject;
1204
+ /** The options of DashedVMobject (Manim's keyword arguments). */
1205
+ export interface DashedVMobjectOptions {
1206
+ numDashes?: number;
1207
+ /** The share of the length that the dashes cover. */
1208
+ dashedRatio?: number;
1209
+ /** Moves the dashes along the path, in periods (dash and gap). */
1210
+ dashOffset?: number;
1211
+ /** As in Manim, the style of `vmobject` replaces it. */
1212
+ color?: Color;
1213
+ /** True: the dashes have the same length. False: proportions count curves. */
1214
+ equalLengths?: boolean;
1215
+ }
1216
+ /** `vmobject` as dashes (Manim `DashedVMobject`), in the style of `vmobject`. */
1217
+ export declare function DashedVMobject(vmobject: Mobject, opts?: DashedVMobjectOptions): Mobject;
1218
+ /** The options of DecimalNumber and Integer (Manim's keyword arguments). */
1219
+ export interface DecimalNumberOptions {
1220
+ numDecimalPlaces?: number;
1221
+ /** A `+` before positive numbers and zero. */
1222
+ includeSign?: boolean;
1223
+ /** Commas between groups of three digits (default true). */
1224
+ groupWithCommas?: boolean;
1225
+ /** Plain text after the number, such as `"%"` or `" kg"`. */
1226
+ unit?: string;
1227
+ /** The edge that stays in place when the value changes (default `m.LEFT`). */
1228
+ edgeToFix?: Point;
1229
+ fontSize?: number;
1230
+ color?: Color;
1231
+ /** The stroke width of the glyphs (default 0). */
1232
+ strokeWidth?: number;
1233
+ /** The fill opacity of the glyphs (default 1). */
1234
+ fillOpacity?: number;
1235
+ }
1236
+ /** A number that `setValue` changes: Manim's `DecimalNumber`. Its submobjects are the glyphs. */
1237
+ export declare class DecimalNumberMobject extends Mobject {
1238
+ copy(): DecimalNumberMobject;
1239
+ getValue(): number;
1240
+ /** Draws `number` in place of the value, at the same size, with the edge `edgeToFix` in place. */
1241
+ setValue(number: number): this;
1242
+ incrementValue(deltaT?: number): this;
1243
+ }
1244
+ /** A whole number: Manim's `Integer`. `getValue` rounds (half to even). */
1245
+ export declare class IntegerMobject extends DecimalNumberMobject {
1246
+ copy(): IntegerMobject;
1247
+ getValue(): number;
1248
+ }
1249
+ /** A number as a type: what DecimalNumber returns. */
1250
+ export type DecimalNumber = DecimalNumberMobject;
1251
+ /** What Integer returns. */
1252
+ export type Integer = IntegerMobject;
1253
+ /** A number in the house font (Manim `DecimalNumber`): `DecimalNumber(3.14159, { numDecimalPlaces: 3 })`. */
1254
+ export declare function DecimalNumber(number?: number, opts?: DecimalNumberOptions): DecimalNumberMobject;
1255
+ /** A whole number (Manim `Integer`): `DecimalNumber` with no decimal places. */
1256
+ export declare function Integer(number?: number, opts?: DecimalNumberOptions): IntegerMobject;
1257
+ /** Rebuilt by `func` on every frame (Manim `always_redraw`). */
1258
+ export declare function alwaysRedraw(func: () => Mobject): Mobject;
1259
+ declare const ROW: unique symbol;
1260
+ /** The notes of a paragraph: plain data that a kit gives and `aula timeline` prints, in order. */
1261
+ export type Notes = Readonly<Record<string, string | readonly string[]>>;
1262
+ /** A paragraph of the chapter's text, for a kit check: its place, its says and moves, its
1263
+ * index in the chapter (from 0), its notes, and what was on screen while it played. */
1264
+ export interface CheckedParagraph extends Omit<RawParagraphText, "notes"> {
1265
+ index: number;
1266
+ notes: Notes;
1267
+ /** What was on screen while the paragraph played: one instant for each animation that changes it, with the
1268
+ * line of its move, and the texts (`m.Text`, not `m.Code` or `m.MathTex`) and the dashed shapes on
1269
+ * screen at its end, each with the line of the call that first showed it, and its bounds and its
1270
+ * opacity at that instant. */
1271
+ screen: Screen;
1272
+ }
1273
+ /** The chapter's text, for a kit check, with the chapter's number (from 1) and the number of
1274
+ * chapters of the project. */
1275
+ export interface CheckedChapter extends RawChapterText {
1276
+ number: number;
1277
+ count: number;
1278
+ /** True when `path`, from the working directory (as the paths in diagnostics are), is a
1279
+ * file (`Host.exists`). */
1280
+ exists(path: string): boolean;
1281
+ }
1282
+ /** One kit finding: a warning that `aula check` prints. */
1283
+ export interface Finding {
1284
+ message: string;
1285
+ /** The default is the line of the paragraph. */
1286
+ at?: Location;
1287
+ }
1288
+ /** A kit's rules on one paragraph: aula calls it one time, after the chapter is drawn. */
1289
+ export type Check = (p: CheckedParagraph, chapter: CheckedChapter) => Finding[];
1290
+ /** One frame of a call stack: its function, and its file as the host names it, line and
1291
+ * column. */
1292
+ export interface StackFrame {
1293
+ function: string;
1294
+ file: string;
1295
+ line: number;
1296
+ col: number;
1297
+ }
1298
+ /** A call that needs a place (a row, `defineChapter`, `defineProject`): an Error made at the
1299
+ * call. The host reads its frames when the chapter runs (`ChapterSlot.frames`). */
1300
+ type Call = Error;
1301
+ type RowData = {
1302
+ readonly kind: "paragraph";
1303
+ readonly call: Call;
1304
+ readonly notes: Notes;
1305
+ readonly check: Check | undefined;
1306
+ } | {
1307
+ readonly kind: "say";
1308
+ readonly call: Call;
1309
+ readonly text: string;
1310
+ } | {
1311
+ readonly kind: "show";
1312
+ readonly call: Call;
1313
+ readonly note: string;
1314
+ readonly move: ((s: Scene) => void) | undefined;
1315
+ /** The timing text after the note: a share of its `say` (`25%`) or seconds (`3s`). The
1316
+ * engine reads it, and stops at the row when it is not a timing or when there is none. */
1317
+ readonly timing: string | undefined;
1318
+ };
1319
+ /** One row of a chapter: `paragraph(…)`, ``say`text` `` or ``show`note``25%`(move)``. */
1320
+ export interface Row {
1321
+ readonly [ROW]: RowData;
1322
+ }
1323
+ /** ``show`note``25%` ``: an open move (no animation yet). Called with its move function, it
1324
+ * returns the move: ``show`note``25%`((s) => { … })``. */
1325
+ export interface OpenMove extends Row {
1326
+ (move: (s: Scene) => void): Row;
1327
+ }
1328
+ /** ``show`note` ``: not a row yet. It takes the timing of the move, a second template right
1329
+ * after the note: ``show`note``25%` `` (a share of its `say`) or ``show`note``3s` `` (seconds). */
1330
+ export interface Untimed {
1331
+ (timing: TemplateStringsArray): OpenMove;
1332
+ }
1333
+ /** The fields of `defineChapter`: one chapter of a project. */
1334
+ export interface ChapterFields {
1335
+ /** The `##` heading, spoken first. */
1336
+ heading: string;
1337
+ /** The one recurring picture that the chapter is built on. */
1338
+ metaphor: string;
1339
+ /** Makes the objects of the chapter and returns its rows in time order. aula calls it for
1340
+ * each run, and it must return the same rows each time. */
1341
+ rows: () => Row[];
1342
+ }
1343
+ /** What `defineChapter` returns. */
1344
+ export interface ChapterDefinition extends Readonly<ChapterFields> {
1345
+ /** The defineChapter call: its second frame is the chapter file (`definedAt` in
1346
+ * `@beff/aula/run`). */
1347
+ readonly call: Error;
1348
+ }
1349
+ /** `export default defineChapter({ heading, metaphor, rows: () => [ … ] })`: one chapter.
1350
+ * Makes no engine call. */
1351
+ export declare function defineChapter(fields: ChapterFields): ChapterDefinition;
1352
+ declare const PROJECT: unique symbol;
1353
+ /** The fields of `defineProject`: one project. */
1354
+ export interface ProjectFields {
1355
+ /** The project title: the title card (chapter 0). The name of the project is its folder name. */
1356
+ title: string;
1357
+ /** The storyboard header: recurring objects, symbols and colour rules. */
1358
+ storyboard?: string;
1359
+ /** The colours and text sizes of the chrome (title card, chapter cards, docked heading) and
1360
+ * the colour of the frame. The default is `m.theme`. */
1361
+ theme?: Theme;
1362
+ /** The chapter card and the docked heading of each chapter and of the title card. The
1363
+ * default is `m.card`. */
1364
+ card?: Card;
1365
+ /** The chapters, in order: the default exports of their chapter modules. */
1366
+ chapters: readonly ChapterDefinition[];
1367
+ }
1368
+ /** What `defineProject` returns. */
1369
+ export interface ProjectDefinition extends Required<Omit<ProjectFields, "card" | "theme">> {
1370
+ /** The theme that the project gives, if any. */
1371
+ readonly theme?: Theme;
1372
+ /** The card that the project gives, if any. */
1373
+ readonly card?: Card;
1374
+ readonly [PROJECT]: true;
1375
+ /** The defineProject call: its second frame is the project module (`definedAt` in
1376
+ * `@beff/aula/run`). */
1377
+ readonly call: Error;
1378
+ }
1379
+ /** `export default defineProject({ title, storyboard, theme, chapters })`: one project, in the
1380
+ * `index.ts` of its folder. Makes no engine call. */
1381
+ export declare function defineProject(fields: ProjectFields): ProjectDefinition;
1382
+ /** True for a value that defineProject made. */
1383
+ export declare function isProjectDefinition(v: unknown): v is ProjectDefinition;
1384
+ /** Starts a paragraph: one narration cue. `notes` is plain data that `aula timeline` prints
1385
+ * under the paragraph. `check` is for kits: aula calls it one time, after the chapter is drawn,
1386
+ * and reports its findings. */
1387
+ export declare function paragraph(notes?: Notes, check?: Check): Row;
1388
+ /** The text of a row tag (`name` is the tag): one template with no `${…}`, no invalid escape
1389
+ * and no line break. Throws a AulaError at the row. A kit's own row tag calls it. */
1390
+ export declare function tagText(name: string, strings: TemplateStringsArray): string;
1391
+ /** ``say`text` ``: the next words of the narration. */
1392
+ export declare function say(strings: TemplateStringsArray): Row;
1393
+ /** ``show`note``timing` ``: a move. The note says what changes on screen. The timing, a
1394
+ * second template right after the note, gives the length of the move: ``25%`` is a share of the
1395
+ * `say` above it (0 < N <= 100) and scales with the narration, and ``3s`` is seconds (N > 0).
1396
+ * ``25%`` is the usual timing. ``show`note``25%` `` is an open move, ``show`note``25%`((s) =>
1397
+ * { … })`` a move, and ``show`note``25%`(() => {})`` a hold. The move starts on the first word
1398
+ * of its `say`, and its parts (each `s.play`, `s.fadeAll` and `s.wait`) split its length in
1399
+ * proportion to their Manim lengths, each at least 0.5 seconds. The longer one wins: the picture holds until the `say`
1400
+ * ends, or the narration waits until the move ends. */
1401
+ export declare function show(strings: TemplateStringsArray): Untimed;
1402
+ /** The heading cue that a card draws: the input of the hook of the chapter card. */
1403
+ export interface Heading {
1404
+ /** The heading of the chapter, or the project title on the title card. */
1405
+ readonly title: string;
1406
+ /** The number of the chapter, from 1, or 0 for the title card. */
1407
+ readonly chapter: number;
1408
+ /** The number of chapters, without the title card. */
1409
+ readonly count: number;
1410
+ /** The theme of the project. */
1411
+ readonly theme: Theme;
1412
+ /** Seconds from the chapter start where the speech of the heading starts, on the frame grid. */
1413
+ readonly start: number;
1414
+ /** Seconds from the chapter start where the speech of the heading ends, on the frame grid. */
1415
+ readonly end: number;
1416
+ /** Makes `mobjects` the chrome of the chapter: the card and the docked heading. `s.fadeAll`,
1417
+ * `s.clear`, `s.canvas()` and `s.getTopLevelMobjects()` leave the chrome, and the reading
1418
+ * checks skip it. The overlap checks see it as ordinary text. Each call replaces the list. */
1419
+ chrome(...mobjects: Mobject[]): void;
1420
+ }
1421
+ /** The chapter card: it plays while the heading is spoken and leaves the docked heading. aula
1422
+ * calls it at the start of each chapter, and on the title card, when the chapter is drawn (not
1423
+ * when it is only read). The default is `m.card`; a project gives its own to
1424
+ * `defineProject({ card })`. */
1425
+ export type Card = (s: Scene, heading: Heading) => void;
1426
+ /** The scene of a move, as `self` in a Manim `construct`: the picture calls. */
1427
+ export declare class Scene {
1428
+ #private;
1429
+ constructor(handle: RawChapter, slot: ChapterSlot, at?: Location);
1430
+ /** Plays animations together (Manim `self.play`) until the longest ends. `rateFunc` and
1431
+ * `lagRatio` replace the values of every animation, as in Manim. In a move, the play is one
1432
+ * part of the move, and `runTime` (or its longest animation) is its Manim length: the parts
1433
+ * split the length of the move in proportion to their Manim lengths. `runTime` replaces the
1434
+ * run time of every animation; outside a move (the card), it is seconds. */
1435
+ play(...args: (Animations | {
1436
+ runTime?: number;
1437
+ rateFunc?: RateFunc;
1438
+ lagRatio?: number;
1439
+ })[]): void;
1440
+ add(...items: Mobjects[]): void;
1441
+ remove(...items: Mobjects[]): void;
1442
+ /** Moves the mobjects to the front, in order (Manim `self.bring_to_front`, the same as
1443
+ * `add`). A mobject that is not on the stage is added. */
1444
+ bringToFront(...items: Mobjects[]): void;
1445
+ /** Moves the mobjects to the back, in order (Manim `self.bring_to_back`). A mobject that is
1446
+ * not on the stage is added at the back. */
1447
+ bringToBack(...items: Mobjects[]): void;
1448
+ /** Holds the picture (Manim `self.wait`) for `duration` seconds, 1 by default. In a move, it is
1449
+ * one part of the move, and `duration` is its Manim length. `frozenFrame` has no effect: the
1450
+ * updaters run on every frame. */
1451
+ wait(duration?: number, _opts?: {
1452
+ frozenFrame?: boolean;
1453
+ }): void;
1454
+ /** `wait(duration)` (Manim `pause`). */
1455
+ pause(duration?: number): void;
1456
+ /** The objects on the stage, without the docked heading, that no other object on the stage
1457
+ * holds (Manim `get_top_level_mobjects`). */
1458
+ getTopLevelMobjects(): Mobject[];
1459
+ /** Every object on the stage and all their members (Manim `get_mobject_family_members`). */
1460
+ getMobjectFamilyMembers(): Mobject[];
1461
+ /** The values of the attributes `keys` (Manim `get_attrs`). */
1462
+ getAttrs(...keys: string[]): unknown[];
1463
+ /** Runs the updaters of the objects on the stage now (Manim `update_mobjects`). */
1464
+ updateMobjects(dt: number): void;
1465
+ /** Runs the scene updaters now (Manim `update_self`). */
1466
+ updateSelf(dt: number): void;
1467
+ /** True when a scene updater or an updater that takes `dt` is on the stage (Manim
1468
+ * `should_update_mobjects`). */
1469
+ shouldUpdateMobjects(): boolean;
1470
+ /** Runs `func(dt)` on every frame, after the updaters of the objects (Manim
1471
+ * `Scene.add_updater`). */
1472
+ addUpdater(func: (dt: number) => void): void;
1473
+ /** Removes the scene updater `func` (Manim `Scene.remove_updater`). */
1474
+ removeUpdater(func: (dt: number) => void): void;
1475
+ /** `newMobject` takes the place of `oldMobject` on the stage, or inside the object that holds
1476
+ * it (Manim `replace`). `oldMobject` that is not on the stage is an error. */
1477
+ replace(oldMobject: Mobject, newMobject: Mobject): void;
1478
+ /** Removes every object except the docked heading now, with no animation (Manim `clear`). */
1479
+ clear(): void;
1480
+ /** Adds the mobjects and keeps them in front: each later `add` moves them back to the front
1481
+ * (Manim `add_foreground_mobjects`). */
1482
+ addForegroundMobjects(...items: Mobjects[]): void;
1483
+ /** `addForegroundMobjects(mobject)` (Manim `add_foreground_mobject`). */
1484
+ addForegroundMobject(mobject: Mobject): void;
1485
+ /** The mobjects are no longer kept in front; they stay on the stage (Manim
1486
+ * `remove_foreground_mobjects`). */
1487
+ removeForegroundMobjects(...items: Mobjects[]): void;
1488
+ /** `removeForegroundMobjects(mobject)` (Manim `remove_foreground_mobject`). */
1489
+ removeForegroundMobject(mobject: Mobject): void;
1490
+ /** Fades everything except the docked heading and `keep` (a new canvas). In a move, the fade
1491
+ * is one part of the move. */
1492
+ fadeAll(opts?: {
1493
+ keep?: Mobjects;
1494
+ }): void;
1495
+ /** Everything on screen except the docked heading, as one group. */
1496
+ canvas(): Mobject;
1497
+ /** A kit finding on the picture: a warning with `message`, at the calling line or at `at`.
1498
+ * `aula check` reports it. */
1499
+ warn(message: string, at?: Location): void;
1500
+ /** The kit findings so far. */
1501
+ get warnings(): readonly Diagnostic[];
1502
+ /** Seconds since the chapter start. */
1503
+ get time(): number;
1504
+ }
1505
+ /** Where a chapter runs: its number (from 1), the number of chapters of the project, its file,
1506
+ * and how the host reads the frames of a call. */
1507
+ export interface ChapterSlot {
1508
+ number: number;
1509
+ count: number;
1510
+ /** The chapter file as the frames name it. */
1511
+ source: string;
1512
+ /** The chapter file as diagnostics name it. */
1513
+ file: string;
1514
+ /** The frames of an error (`Host.frames`). */
1515
+ frames(error: Error): readonly StackFrame[];
1516
+ }
1517
+ /** Reads a chapter: calls `rows` and no move. It gives the text and the text problems; the
1518
+ * paragraph checks run only in `drawRows`. A chapter error is thrown (a AulaError, a WIT
1519
+ * `result` error or the JS error). */
1520
+ export declare function readRows(chapter: ChapterDefinition, slot: ChapterSlot): {
1521
+ text: RawChapterText;
1522
+ diagnostics: Diagnostic[];
1523
+ };
1524
+ /** Checks a chapter (`aula check`): calls `rows`, then each move in list order, with no clock
1525
+ * and no narration. Each animation jumps to its end, and the engine's checks, the kit findings
1526
+ * and the paragraph checks (with `exists`, `Host.exists`) look at the pictures in order. A
1527
+ * chapter error is thrown (a AulaError, a WIT `result` error or the JS error). */
1528
+ export declare function checkRows(chapter: ChapterDefinition, theme: Theme, card: Card, slot: ChapterSlot, exists: (path: string) => boolean): {
1529
+ diagnostics: Diagnostic[];
1530
+ };
1531
+ /** Checks chapter 0: the card of the project `title`, with no clock. */
1532
+ export declare function checkTitle(title: string, theme: Theme, card: Card, count: number): {
1533
+ diagnostics: Diagnostic[];
1534
+ };
1535
+ /** How a chapter is drawn against a narration. */
1536
+ export interface Drawing {
1537
+ /** The narration. */
1538
+ narration: Narration;
1539
+ /** The name of the Lottie animation. */
1540
+ name: string;
1541
+ /** Draw no frames: only the clock, the waits and the narration on the clock of the picture. */
1542
+ lint: boolean;
1543
+ /** The number of chapters with the title card. */
1544
+ count: number;
1545
+ }
1546
+ /** A drawn chapter: its problems and its Lottie, on the narration clock. */
1547
+ export interface ChapterRun {
1548
+ /** Text problems that did not stop the chapter, and a warning at each move that the
1549
+ * narration waits for 1 second or more. The checks of the picture are `checkChapter`'s. */
1550
+ diagnostics: Diagnostic[];
1551
+ lottie: string;
1552
+ frames: number;
1553
+ chapterSeconds: number;
1554
+ /** Each wait of the narration: `samples` of silence before audio sample `sample`, while a
1555
+ * move that is longer than its `say` ends. The audio of the chapter has them
1556
+ * (`@beff/aula-narration`'s `withWaits`). */
1557
+ waits: NarrationWait[];
1558
+ /** The narration on the clock of the picture: each cue and word after a wait comes later by
1559
+ * the wait. */
1560
+ narration: Narration;
1561
+ }
1562
+ /** Draws a chapter on the narration clock: calls `rows`, then each move once, in list order,
1563
+ * from the first word of its `say` to its end (or for its own length), with its parts sharing
1564
+ * that time. An open move holds the picture. When a move is longer than its `say`, the
1565
+ * narration waits. A chapter error is thrown (a AulaError, a WIT `result` error or the JS
1566
+ * error). */
1567
+ export declare function drawRows(chapter: ChapterDefinition, theme: Theme, card: Card, slot: ChapterSlot, drawing: Drawing): ChapterRun;
1568
+ /** Draws chapter 0: the card of the project `title` while the title is spoken. */
1569
+ export declare function drawTitle(title: string, theme: Theme, card: Card, drawing: Drawing): ChapterRun;
1570
+ /** One leaf of one frame of a scene, in frame units, y up. */
1571
+ export interface Leaf {
1572
+ /** Anchors and handles. */
1573
+ points: Point[];
1574
+ /** Fill colour: red, green, blue, each 0..=1. */
1575
+ fill: [number, number, number];
1576
+ /** Fill opacity, 0..=1. */
1577
+ fillOpacity: number;
1578
+ /** Stroke colour: red, green, blue, each 0..=1. */
1579
+ stroke: [number, number, number];
1580
+ /** Stroke opacity, 0..=1. */
1581
+ strokeOpacity: number;
1582
+ /** Stroke width in Manim units (1 = 0.01 frame units). */
1583
+ strokeWidth: number;
1584
+ /** The path is closed. */
1585
+ closed: boolean;
1586
+ }
1587
+ /** A drawn scene: its Lottie, its frame count and the leaves of each frame. */
1588
+ export interface SceneRun {
1589
+ lottie: string;
1590
+ frames: number;
1591
+ trace: Leaf[][];
1592
+ }
1593
+ /** Draws `draw` as a Manim construct. `s.play` and `s.wait` run from t = 0 at 15 frames a
1594
+ * second, on a black background. There is no project, no narration and no heading. */
1595
+ export declare function renderScene(draw: (s: Scene) => void): SceneRun;