manim-web 0.3.24 → 0.10.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 (120) hide show
  1. package/README.md +5 -1
  2. package/dist/{MathJaxBundle-xSidSV0E.js → MathJaxBundle-BSrlS0Dh.js} +3338 -3320
  3. package/dist/animation/Always.d.ts +72 -0
  4. package/dist/animation/Always.d.ts.map +1 -0
  5. package/dist/animation/AlwaysRedraw.d.ts +15 -0
  6. package/dist/animation/AlwaysRedraw.d.ts.map +1 -0
  7. package/dist/animation/Animation.d.ts +9 -0
  8. package/dist/animation/Animation.d.ts.map +1 -1
  9. package/dist/animation/AnimationUtilities.d.ts +25 -0
  10. package/dist/animation/AnimationUtilities.d.ts.map +1 -1
  11. package/dist/animation/creation/Create.d.ts +40 -11
  12. package/dist/animation/creation/Create.d.ts.map +1 -1
  13. package/dist/animation/transform/PointMorphStrategy.d.ts +6 -0
  14. package/dist/animation/transform/PointMorphStrategy.d.ts.map +1 -1
  15. package/dist/animation/transform/Transform.d.ts.map +1 -1
  16. package/dist/animation/transform/TransformPairing.d.ts +17 -0
  17. package/dist/animation/transform/TransformPairing.d.ts.map +1 -1
  18. package/dist/animation/updaters.d.ts +69 -0
  19. package/dist/animation/updaters.d.ts.map +1 -0
  20. package/dist/compiler-CfW6eH2M.js +2 -0
  21. package/dist/constants/index.d.ts +1 -0
  22. package/dist/constants/index.d.ts.map +1 -1
  23. package/dist/constants/parity.d.ts +78 -0
  24. package/dist/constants/parity.d.ts.map +1 -0
  25. package/dist/core/Mobject.d.ts +48 -3
  26. package/dist/core/Mobject.d.ts.map +1 -1
  27. package/dist/core/MobjectTraversal.d.ts +7 -0
  28. package/dist/core/MobjectTraversal.d.ts.map +1 -1
  29. package/dist/core/MobjectTypes.d.ts +15 -0
  30. package/dist/core/MobjectTypes.d.ts.map +1 -1
  31. package/dist/core/Scene.d.ts +14 -0
  32. package/dist/core/Scene.d.ts.map +1 -1
  33. package/dist/core/SpecialThreeDScene.d.ts +64 -0
  34. package/dist/core/SpecialThreeDScene.d.ts.map +1 -0
  35. package/dist/core/VMobject.d.ts +143 -0
  36. package/dist/core/VMobject.d.ts.map +1 -1
  37. package/dist/core/VMobjectColorGradient.d.ts +20 -0
  38. package/dist/core/VMobjectColorGradient.d.ts.map +1 -0
  39. package/dist/core/VMobjectCurveMath.d.ts +128 -0
  40. package/dist/core/VMobjectCurveMath.d.ts.map +1 -0
  41. package/dist/core/VMobjectRendering.d.ts +38 -1
  42. package/dist/core/VMobjectRendering.d.ts.map +1 -1
  43. package/dist/core/VMobjectRoundCorners.d.ts +37 -0
  44. package/dist/core/VMobjectRoundCorners.d.ts.map +1 -0
  45. package/dist/esm-CiMKSfxz.js +1273 -0
  46. package/dist/export/GifExporter.d.ts +4 -0
  47. package/dist/export/GifExporter.d.ts.map +1 -1
  48. package/dist/global-compiler-D_nF-JaV.js +8 -0
  49. package/dist/global-renderer-gyshX_QF.js +8 -0
  50. package/dist/index.d.ts +25 -4
  51. package/dist/index.d.ts.map +1 -1
  52. package/dist/index.js +2 -2
  53. package/dist/integrations/react.js +16 -16
  54. package/dist/integrations/vue.js +15 -15
  55. package/dist/manim-web.browser.js +9253 -6422
  56. package/dist/mobjects/geometry/AngleShapes.d.ts.map +1 -1
  57. package/dist/mobjects/geometry/ArcPolygon.d.ts +30 -0
  58. package/dist/mobjects/geometry/ArcPolygon.d.ts.map +1 -1
  59. package/dist/mobjects/geometry/DashedLine.d.ts.map +1 -1
  60. package/dist/mobjects/geometry/Label.d.ts +32 -0
  61. package/dist/mobjects/geometry/Label.d.ts.map +1 -0
  62. package/dist/mobjects/geometry/index.d.ts +2 -1
  63. package/dist/mobjects/geometry/index.d.ts.map +1 -1
  64. package/dist/mobjects/graphing/Axes.d.ts +73 -6
  65. package/dist/mobjects/graphing/Axes.d.ts.map +1 -1
  66. package/dist/mobjects/graphing/CoordinateSystem.d.ts +40 -0
  67. package/dist/mobjects/graphing/CoordinateSystem.d.ts.map +1 -0
  68. package/dist/mobjects/graphing/axes-calculus.d.ts +79 -0
  69. package/dist/mobjects/graphing/axes-calculus.d.ts.map +1 -0
  70. package/dist/mobjects/graphing/index.d.ts +3 -0
  71. package/dist/mobjects/graphing/index.d.ts.map +1 -1
  72. package/dist/mobjects/graphing/scale.d.ts +72 -0
  73. package/dist/mobjects/graphing/scale.d.ts.map +1 -0
  74. package/dist/mobjects/text/MathJaxRenderer.d.ts +5 -0
  75. package/dist/mobjects/text/MathJaxRenderer.d.ts.map +1 -1
  76. package/dist/mobjects/text/MathTex.d.ts +23 -0
  77. package/dist/mobjects/text/MathTex.d.ts.map +1 -1
  78. package/dist/mobjects/text/MathTexImage.d.ts.map +1 -1
  79. package/dist/mobjects/text/Text.d.ts +53 -0
  80. package/dist/mobjects/text/Text.d.ts.map +1 -1
  81. package/dist/mobjects/text/Typst.d.ts +113 -0
  82. package/dist/mobjects/text/Typst.d.ts.map +1 -0
  83. package/dist/mobjects/text/TypstRenderer.d.ts +57 -0
  84. package/dist/mobjects/text/TypstRenderer.d.ts.map +1 -0
  85. package/dist/mobjects/text/index.d.ts +5 -2
  86. package/dist/mobjects/text/index.d.ts.map +1 -1
  87. package/dist/mobjects/text/katexStyles.d.ts +5 -0
  88. package/dist/mobjects/text/katexStyles.d.ts.map +1 -1
  89. package/dist/mobjects/text/registerFont.d.ts +38 -0
  90. package/dist/mobjects/text/registerFont.d.ts.map +1 -0
  91. package/dist/mobjects/text/textStyleRuns.d.ts +111 -0
  92. package/dist/mobjects/text/textStyleRuns.d.ts.map +1 -0
  93. package/dist/mobjects/three-d/ThreeDAxes.d.ts +37 -4
  94. package/dist/mobjects/three-d/ThreeDAxes.d.ts.map +1 -1
  95. package/dist/mobjects/three-d/threeDVmobUtils.d.ts +25 -0
  96. package/dist/mobjects/three-d/threeDVmobUtils.d.ts.map +1 -0
  97. package/dist/renderer-DR_79fB0.js +2 -0
  98. package/dist/{src-Cc3xTIkV.js → src-D29Z9zIa.js} +8796 -5974
  99. package/dist/utils/ManimColor.d.ts +163 -0
  100. package/dist/utils/ManimColor.d.ts.map +1 -0
  101. package/dist/utils/bezier.d.ts +95 -0
  102. package/dist/utils/bezier.d.ts.map +1 -0
  103. package/dist/utils/color.d.ts +99 -0
  104. package/dist/utils/color.d.ts.map +1 -0
  105. package/dist/utils/debug.d.ts +36 -0
  106. package/dist/utils/debug.d.ts.map +1 -0
  107. package/dist/utils/iterables.d.ts +162 -0
  108. package/dist/utils/iterables.d.ts.map +1 -0
  109. package/dist/utils/paths.d.ts +38 -0
  110. package/dist/utils/paths.d.ts.map +1 -0
  111. package/dist/utils/simpleFunctions.d.ts +26 -0
  112. package/dist/utils/simpleFunctions.d.ts.map +1 -0
  113. package/dist/utils/spaceOps.d.ts +119 -0
  114. package/dist/utils/spaceOps.d.ts.map +1 -0
  115. package/dist/utils/unit.d.ts +28 -0
  116. package/dist/utils/unit.d.ts.map +1 -0
  117. package/dist/wasm-CIlzm7By.js +76 -0
  118. package/dist/wasm-pack-shim-B3C4KoWa.js +1688 -0
  119. package/dist/wasm-pack-shim-BgTFpSvJ.js +911 -0
  120. package/package.json +11 -7
@@ -0,0 +1,119 @@
1
+ import { Vector3Tuple } from '../core/MobjectTypes';
2
+ import { Complex } from '../mobjects/value-tracker';
3
+ import { crossVec } from './vectors';
4
+ import { triangulatePolygon } from './triangulate';
5
+ /** Squared Euclidean norm `v . v`. */
6
+ declare function normSquared(v: number[]): number;
7
+ /**
8
+ * 2D cross product (z-component of the 3D cross of the first two components).
9
+ * ManimCE `cross2d` for single vectors.
10
+ */
11
+ declare function cross2d(a: number[], b: number[]): number;
12
+ /**
13
+ * Normalize a vector to unit length, preserving direction. If the norm is 0,
14
+ * returns `fallBack` when supplied, otherwise a zero vector of the same length
15
+ * (ManimCE `normalize`).
16
+ */
17
+ declare function normalize(vect: number[], fallBack?: number[]): number[];
18
+ /** Hamilton product of the given quaternions (ManimCE `quaternion_mult`). */
19
+ declare function quaternionMult(...quats: number[][]): number[];
20
+ /** Quaternion from an angle and axis (ManimCE `quaternion_from_angle_axis`). */
21
+ declare function quaternionFromAngleAxis(angle: number, axis: number[], axisNormalized?: boolean): number[];
22
+ /**
23
+ * Angle (in `[0, PI]`) and axis from a quaternion
24
+ * (ManimCE `angle_axis_from_quaternion`).
25
+ */
26
+ declare function angleAxisFromQuaternion(quaternion: number[]): [number, Vector3Tuple];
27
+ /** Conjugate of a quaternion (ManimCE `quaternion_conjugate`). */
28
+ declare function quaternionConjugate(quaternion: number[]): number[];
29
+ /**
30
+ * Rotation matrix in R^3 about `axis` by `angle` (right-handed, Rodrigues'
31
+ * formula — matches ManimCE/`scipy` `Rotation.from_rotvec`). When
32
+ * `homogeneous` is true, returns a 4x4 matrix.
33
+ */
34
+ declare function rotationMatrix(angle: number, axis: number[], homogeneous?: boolean): number[][];
35
+ /** Rotation matrix about the z-axis (ManimCE `rotation_about_z`). */
36
+ declare function rotationAboutZ(angle: number): number[][];
37
+ /** Transpose of the rotation matrix (ManimCE `rotation_matrix_transpose`). */
38
+ declare function rotationMatrixTranspose(angle: number, axis: number[]): number[][];
39
+ /**
40
+ * Rotate a 2D or 3D vector by `angle` about `axis` (default OUT).
41
+ * Throws if the vector has more than 3 components (ManimCE `rotate_vector`).
42
+ */
43
+ declare function rotateVector(vector: number[], angle: number, axis?: number[]): Vector3Tuple;
44
+ /**
45
+ * A matrix in SO(3) taking the z-axis to the normalized `vector`
46
+ * (ManimCE `z_to_vector`).
47
+ */
48
+ declare function zToVector(vector: number[]): number[][];
49
+ /** Polar angle (theta) of the vector projected onto the xy-plane. */
50
+ declare function angleOfVector(vector: number[]): number;
51
+ /** Angle between two vectors, in `[0, PI]` (ManimCE `angle_between_vectors`). */
52
+ declare function angleBetweenVectors(v1: number[], v2: number[]): number;
53
+ /** Unit normal of two vectors (ManimCE `get_unit_normal`). */
54
+ declare function getUnitNormal(v1: number[], v2: number[], tol?: number): Vector3Tuple;
55
+ declare function compassDirections(n?: number, startVect?: Vector3Tuple): Vector3Tuple[];
56
+ /**
57
+ * Regularly spaced vertices around a circle at the origin
58
+ * (ManimCE `regular_vertices`). Returns `[vertices, startAngle]`.
59
+ */
60
+ declare function regularVertices(n: number, options?: {
61
+ radius?: number;
62
+ startAngle?: number;
63
+ }): [Vector3Tuple[], number];
64
+ /** Map a complex number to a point `[re, im, 0]` (ManimCE `complex_to_R3`). */
65
+ declare function complexToR3(complexNum: Complex): Vector3Tuple;
66
+ /** Map a point to a complex number `{ re, im }` (ManimCE `R3_to_complex`). */
67
+ declare function r3ToComplex(point: number[]): Complex;
68
+ /** Lift a complex function to a point function (ManimCE `complex_func_to_R3_func`). */
69
+ declare function complexFuncToR3Func(complexFunc: (c: Complex) => Complex): (p: number[]) => Vector3Tuple;
70
+ /** Center of mass (unweighted average) of the points (ManimCE `center_of_mass`). */
71
+ declare function centerOfMass(points: number[][]): Vector3Tuple;
72
+ /** Midpoint of two points (ManimCE `midpoint`). */
73
+ declare function midpoint(point1: number[], point2: number[]): Vector3Tuple;
74
+ /**
75
+ * Intersection of two lines, each given by two distinct points in the
76
+ * xy-plane (ManimCE `line_intersection`). Throws if a z-coordinate is nonzero
77
+ * or if the lines are parallel.
78
+ */
79
+ declare function lineIntersection(line1: number[][], line2: number[][]): Vector3Tuple;
80
+ /**
81
+ * Intersections of lines `p0 + v0 t` with `p1 + v1 t`
82
+ * (ManimCE `find_intersection`). For 3D inputs, returns the point on the first
83
+ * ray closest to the second.
84
+ */
85
+ declare function findIntersection(p0s: number[][], v0s: number[][], p1s: number[][], v1s: number[][], threshold?: number): Vector3Tuple[];
86
+ /**
87
+ * 2D trapezoidal integral of `y` over `x` (ManimCE `shoelace`); returns the
88
+ * signed area. Note: this is `np.trapezoid(y, x)` and does NOT implicitly close
89
+ * the polygon, unlike `signedArea2D` in `triangulate.ts`.
90
+ */
91
+ declare function shoelace(xy: number[][]): number;
92
+ /** `"CW"` or `"CCW"` from the sign of `shoelace` (ManimCE `shoelace_direction`). */
93
+ declare function shoelaceDirection(xy: number[][]): 'CW' | 'CCW';
94
+ /**
95
+ * Cartesian `[x, y, z]` to spherical `[r, theta, phi]`
96
+ * (ManimCE `cartesian_to_spherical`). `theta` is the azimuth in the xy-plane,
97
+ * `phi` is the polar angle from +z.
98
+ */
99
+ declare function cartesianToSpherical(vec: number[]): Vector3Tuple;
100
+ /** Spherical `[r, theta, phi]` to Cartesian (ManimCE `spherical_to_cartesian`). */
101
+ declare function sphericalToCartesian(spherical: number[]): Vector3Tuple;
102
+ /**
103
+ * Endpoints of the perpendicular bisector of the segment `line`
104
+ * (ManimCE `perpendicular_bisector`).
105
+ */
106
+ declare function perpendicularBisector(line: number[][], normVector?: number[]): [Vector3Tuple, Vector3Tuple];
107
+ /**
108
+ * A `dim` x `dim` matrix of 0/1 flags that marks the band near the main
109
+ * diagonal (ManimCE `thick_diagonal`). An entry is 1 when the absolute index
110
+ * difference is less than `thickness`, else 0.
111
+ */
112
+ declare function thickDiagonal(dim: number, thickness?: number): number[][];
113
+ /**
114
+ * The number of times the polygon `points` winds around the origin
115
+ * (ManimCE `get_winding_number`). The orientation is positive counterclockwise.
116
+ */
117
+ declare function getWindingNumber(points: number[][]): number;
118
+ export { normSquared, crossVec as cross, cross2d, normalize, quaternionMult, quaternionFromAngleAxis, angleAxisFromQuaternion, quaternionConjugate, rotationMatrix, rotationAboutZ, rotationMatrixTranspose, rotateVector, zToVector, angleOfVector, angleBetweenVectors, getUnitNormal, compassDirections, regularVertices, thickDiagonal, getWindingNumber, triangulatePolygon as earclipTriangulation, complexToR3, r3ToComplex, complexFuncToR3Func, centerOfMass, midpoint, lineIntersection, findIntersection, shoelace, shoelaceDirection, cartesianToSpherical, sphericalToCartesian, perpendicularBisector, };
119
+ //# sourceMappingURL=spaceOps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spaceOps.d.ts","sourceRoot":"","sources":["../../src/utils/spaceOps.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KA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OAAO,EACL,WAAW,EACX,QAAQ,IAAI,KAAK,EACjB,OAAO,EACP,SAAS,EACT,cAAc,EACd,uBAAuB,EACvB,uBAAuB,EACvB,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,uBAAuB,EACvB,YAAY,EACZ,SAAS,EACT,aAAa,EACb,mBAAmB,EACnB,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,aAAa,EACb,gBAAgB,EAChB,kBAAkB,IAAI,oBAAoB,EAC1C,WAAW,EACX,WAAW,EACX,mBAAmB,EACnB,YAAY,EACZ,QAAQ,EACR,gBAAgB,EAChB,gBAAgB,EAChB,QAAQ,EACR,iBAAiB,EACjB,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,GACtB,CAAC"}
@@ -0,0 +1,28 @@
1
+ import { Vector3Tuple } from '../core/Mobject';
2
+ /**
3
+ * Convert a length in pixels to manim scene units, using the default frame
4
+ * width and pixel width. Mirrors ManimCE `Pixels`.
5
+ */
6
+ export declare function Pixels(value: number): number;
7
+ /**
8
+ * Convert an angle in degrees to radians. Mirrors ManimCE `Degrees`
9
+ * (`PI / 180`).
10
+ */
11
+ export declare function Degrees(value: number): number;
12
+ /**
13
+ * Manim units: an identity conversion (1 unit == 1 scene unit). Mirrors
14
+ * ManimCE `Munits`.
15
+ */
16
+ export declare function Munits(value: number): number;
17
+ /**
18
+ * Convert a percentage of the frame size along `axis` to scene units. The X
19
+ * axis (`RIGHT`) uses the frame width, the Y axis (`UP`) uses the frame height.
20
+ * Mirrors ManimCE `Percent`.
21
+ *
22
+ * @throws if `axis` is the Z axis (`OUT`); its length is undefined.
23
+ * @example
24
+ * Percent(RIGHT, 50); // DEFAULT_FRAME_WIDTH / 2
25
+ * Percent(UP, 25); // DEFAULT_FRAME_HEIGHT / 4
26
+ */
27
+ export declare function Percent(axis: Vector3Tuple, value: number): number;
28
+ //# sourceMappingURL=unit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unit.d.ts","sourceRoot":"","sources":["../../src/utils/unit.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAkB,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpE;;;GAGG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE5C;AAED;;;GAGG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE7C;AAED;;;GAGG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE5C;AAMD;;;;;;;;;GASG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAYjE"}
@@ -0,0 +1,76 @@
1
+ //#region node_modules/@myriaddreamin/typst.ts/dist/esm/init.mjs
2
+ var e = class {
3
+ loadedFonts = /* @__PURE__ */ new Set();
4
+ fetcher = fetch;
5
+ setFetcher(e) {
6
+ this.fetcher = e;
7
+ }
8
+ async loadFonts(e, t) {
9
+ let r = Function("m", "return import(m)"), i = this.fetcher ||= await (async function() {
10
+ let { fetchBuilder: e, FileSystemCache: t } = await r("node-fetch-cache"), n = new t({ cacheDirectory: ".cache/typst/fonts" }), i = e.withCache(n);
11
+ return function(e, t) {
12
+ let n = setTimeout(() => {
13
+ console.warn("font fetching is stucking:", e);
14
+ }, 15e3);
15
+ return i(e, t).finally(() => {
16
+ clearTimeout(n);
17
+ });
18
+ };
19
+ })(), a = t.filter((e) => e instanceof Uint8Array || typeof e == "object" && "info" in e ? !0 : this.loadedFonts.has(e) ? !1 : (this.loadedFonts.add(e), !0)), o = await Promise.all(a.map(async (t) => {
20
+ if (t instanceof Uint8Array) {
21
+ await e.add_raw_font(t);
22
+ return;
23
+ }
24
+ if (typeof t == "object" && "info" in t) {
25
+ await e.add_lazy_font(t, "blob" in t ? t.blob : n(t));
26
+ return;
27
+ }
28
+ return new Uint8Array(await (await i(t)).arrayBuffer());
29
+ }));
30
+ for (let t of o) t && await e.add_raw_font(t);
31
+ }
32
+ async build(e, t, n) {
33
+ let r = {
34
+ ref: this,
35
+ builder: t,
36
+ hooks: n
37
+ };
38
+ for (let t of e?.beforeBuild ?? []) await t(void 0, r);
39
+ return n.latelyBuild && n.latelyBuild(r), await t.build();
40
+ }
41
+ };
42
+ async function t(t, n, r, i) {
43
+ return await n.init(t?.getModule?.()), await new e().build(t, new r(), i);
44
+ }
45
+ function n(e) {
46
+ return () => {
47
+ let t = new XMLHttpRequest();
48
+ return t.overrideMimeType("text/plain; charset=x-user-defined"), t.open("GET", e.url, !1), t.send(null), t.status === 200 && (t.response instanceof String || typeof t.response == "string") ? Uint8Array.from(t.response, (e) => e.charCodeAt(0)) : /* @__PURE__ */ new Uint8Array();
49
+ };
50
+ }
51
+ //#endregion
52
+ //#region node_modules/@myriaddreamin/typst.ts/dist/esm/internal.types.mjs
53
+ var r = Symbol.for("reflexo-obj"), i;
54
+ (function(e) {
55
+ e[e.PIXEL_PER_PT = 3] = "PIXEL_PER_PT";
56
+ })(i ||= {});
57
+ //#endregion
58
+ //#region node_modules/@myriaddreamin/typst.ts/dist/esm/wasm.mjs
59
+ var a = (e) => {
60
+ let t = !1, n;
61
+ return () => t ? n : (t = !0, n = e());
62
+ }, o = class {
63
+ wasmBin;
64
+ initOnce;
65
+ constructor(e) {
66
+ if (typeof e != "function") throw Error("initFn is not a function");
67
+ this.initOnce = a(async () => {
68
+ await e(this.wasmBin);
69
+ });
70
+ }
71
+ async init(e) {
72
+ this.wasmBin = e, await this.initOnce();
73
+ }
74
+ };
75
+ //#endregion
76
+ export { n as a, t as i, i as n, r, o as t };