manim-web 0.10.0 → 0.12.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 (69) hide show
  1. package/dist/GLTFLoader-CisHz7tR.js +1381 -0
  2. package/dist/GLTFLoader-DMbWuMln.js +1381 -0
  3. package/dist/OBJLoader-Clh2POv9.js +287 -0
  4. package/dist/OBJLoader-kkTsEhJf.js +287 -0
  5. package/dist/audio/Voiceover.d.ts +95 -0
  6. package/dist/audio/Voiceover.d.ts.map +1 -0
  7. package/dist/audio/VoiceoverScene.d.ts +28 -0
  8. package/dist/audio/VoiceoverScene.d.ts.map +1 -0
  9. package/dist/audio/bookmarks.d.ts +40 -0
  10. package/dist/audio/bookmarks.d.ts.map +1 -0
  11. package/dist/audio/speechSynthesizer.d.ts +95 -0
  12. package/dist/audio/speechSynthesizer.d.ts.map +1 -0
  13. package/dist/core/Mobject.d.ts +31 -0
  14. package/dist/core/Mobject.d.ts.map +1 -1
  15. package/dist/core/Scene.d.ts +9 -0
  16. package/dist/core/Scene.d.ts.map +1 -1
  17. package/dist/export/FrameExporter.d.ts +86 -0
  18. package/dist/export/FrameExporter.d.ts.map +1 -0
  19. package/dist/export/WebCodecsExporter.d.ts +108 -0
  20. package/dist/export/WebCodecsExporter.d.ts.map +1 -0
  21. package/dist/export/index.d.ts +2 -0
  22. package/dist/export/index.d.ts.map +1 -1
  23. package/dist/index.d.ts +12 -1
  24. package/dist/index.d.ts.map +1 -1
  25. package/dist/index.js +3 -2
  26. package/dist/integrations/react.js +17 -16
  27. package/dist/integrations/vue.js +16 -15
  28. package/dist/integrations/webcomponent.d.ts +65 -0
  29. package/dist/integrations/webcomponent.d.ts.map +1 -0
  30. package/dist/integrations/webcomponent.js +2 -0
  31. package/dist/interaction/MovablePoint.d.ts +127 -0
  32. package/dist/interaction/MovablePoint.d.ts.map +1 -0
  33. package/dist/interaction/Slider.d.ts +125 -0
  34. package/dist/interaction/Slider.d.ts.map +1 -0
  35. package/dist/interaction/index.d.ts +2 -0
  36. package/dist/interaction/index.d.ts.map +1 -1
  37. package/dist/manim-web.browser.js +10073 -20358
  38. package/dist/mobjects/svg/SVGMobject.d.ts +29 -0
  39. package/dist/mobjects/svg/SVGMobject.d.ts.map +1 -1
  40. package/dist/mobjects/svg/index.d.ts +3 -1
  41. package/dist/mobjects/svg/index.d.ts.map +1 -1
  42. package/dist/mobjects/svg/svgFill.d.ts +42 -0
  43. package/dist/mobjects/svg/svgFill.d.ts.map +1 -0
  44. package/dist/mobjects/svg/svgGradients.d.ts +68 -0
  45. package/dist/mobjects/svg/svgGradients.d.ts.map +1 -0
  46. package/dist/mobjects/svg/svgImage.d.ts +9 -0
  47. package/dist/mobjects/svg/svgImage.d.ts.map +1 -0
  48. package/dist/mobjects/svg/svgLoader.d.ts +35 -0
  49. package/dist/mobjects/svg/svgLoader.d.ts.map +1 -0
  50. package/dist/mobjects/svg/svgText.d.ts +15 -0
  51. package/dist/mobjects/svg/svgText.d.ts.map +1 -0
  52. package/dist/mobjects/three-d/ModelMobject.d.ts +122 -0
  53. package/dist/mobjects/three-d/ModelMobject.d.ts.map +1 -0
  54. package/dist/mobjects/video/VideoMobject.d.ts +126 -0
  55. package/dist/mobjects/video/VideoMobject.d.ts.map +1 -0
  56. package/dist/mobjects/video/index.d.ts +2 -0
  57. package/dist/mobjects/video/index.d.ts.map +1 -0
  58. package/dist/mp4-muxer-5DGKGEJk.js +900 -0
  59. package/dist/player/Player.d.ts +4 -0
  60. package/dist/player/Player.d.ts.map +1 -1
  61. package/dist/rendering/blendModes.d.ts +38 -0
  62. package/dist/rendering/blendModes.d.ts.map +1 -0
  63. package/dist/{src-D29Z9zIa.js → src-BQF5-SG7.js} +6853 -6218
  64. package/dist/three.core-1aHSpGwp.js +11626 -0
  65. package/dist/utils/ThemeManager.d.ts +79 -0
  66. package/dist/utils/ThemeManager.d.ts.map +1 -0
  67. package/dist/webcomponent-BS5WnkDO.js +707 -0
  68. package/dist/webm-muxer-BGY-Mgbp.js +857 -0
  69. package/package.json +9 -2
@@ -1,5 +1,6 @@
1
1
  import { VMobject } from '../../core/VMobject';
2
2
  import { VGroup } from '../../core/VGroup';
3
+ import { SvgFetcher } from './svgLoader';
3
4
  /**
4
5
  * SVGMobject options
5
6
  */
@@ -21,6 +22,14 @@ export interface SVGMobjectOptions {
21
22
  /** Center position */
22
23
  center?: [number, number, number];
23
24
  }
25
+ /**
26
+ * Options for {@link SVGMobject.fromUrl}. Same as {@link SVGMobjectOptions}
27
+ * (minus `svgString`, which is fetched) plus an injectable fetcher.
28
+ */
29
+ export type SVGMobjectFromUrlOptions = Omit<SVGMobjectOptions, 'svgString'> & {
30
+ /** Fetch implementation. Defaults to `globalThis.fetch`. */
31
+ fetcher?: SvgFetcher;
32
+ };
24
33
  /**
25
34
  * VMobjectFromSVGPath options
26
35
  */
@@ -49,7 +58,27 @@ export declare class VMobjectFromSVGPath extends VMobject {
49
58
  */
50
59
  export declare class SVGMobject extends VGroup {
51
60
  private _svgString;
61
+ private _loadError;
52
62
  constructor(options?: SVGMobjectOptions);
63
+ /**
64
+ * Fetch an SVG from a URL and parse it through the standard string path.
65
+ *
66
+ * The fetcher is injected (default `globalThis.fetch`) so tests can mock it.
67
+ * A fetch or parse failure does not throw: it returns an empty SVGMobject
68
+ * whose {@link getLoadError} reports the error.
69
+ *
70
+ * @param url - The SVG resource URL.
71
+ * @param options - Standard SVGMobject options plus an optional `fetcher`.
72
+ * @returns A promise resolving to the parsed (or empty, on error) SVGMobject.
73
+ */
74
+ static fromUrl(url: string, options?: SVGMobjectFromUrlOptions): Promise<SVGMobject>;
75
+ /**
76
+ * The error captured while loading or parsing, or null when none occurred.
77
+ *
78
+ * Set by {@link fromUrl} on a fetch failure and by the parser when the input
79
+ * has no `<svg>` root.
80
+ */
81
+ getLoadError(): Error | null;
53
82
  private _parseSVG;
54
83
  /**
55
84
  * Get all subpaths as individual VMobjects.
@@ -1 +1 @@
1
- {"version":3,"file":"SVGMobject.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CAAC,EAAE,MAAM,CAAC;IACf,mBAAmB;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mBAAmB;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAocD;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,QAAQ;IAC/C,OAAO,CAAC,SAAS,CAAS;gBAEd,OAAO,EAAE,0BAA0B;IAqBtC,IAAI,IAAI,mBAAmB;CAWrC;AAED;;GAEG;AACH,qBAAa,UAAW,SAAQ,MAAM;IACpC,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,UAAU,CAAsB;gBAE5B,OAAO,GAAE,iBAAsB;IAqC3C;;;;;;;;;;OAUG;WACU,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE,wBAA6B,GAAG,OAAO,CAAC,UAAU,CAAC;IAa9F;;;;;OAKG;IACH,YAAY,IAAI,KAAK,GAAG,IAAI;IAI5B,OAAO,CAAC,SAAS;IAmPjB;;OAEG;IACH,WAAW,IAAI,QAAQ,EAAE;IAIhB,IAAI,IAAI,UAAU;CAO5B;AAED;;GAEG;AACH,wBAAgB,UAAU,CACxB,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,IAAI,CAAC,iBAAiB,EAAE,WAAW,CAAC,GAC7C,UAAU,CAEZ"}
@@ -6,5 +6,7 @@
6
6
  * of the manimweb rendering pipeline.
7
7
  */
8
8
  export { Brace, BraceBetweenPoints, ArcBrace, BraceLabel, BraceText, type BraceOptions, type BraceBetweenPointsOptions, type ArcBraceOptions, type BraceLabelOptions, } from './Brace';
9
- export { SVGMobject, svgMobject, VMobjectFromSVGPath, type SVGMobjectOptions, type VMobjectFromSVGPathOptions, } from './SVGMobject';
9
+ export { SVGMobject, svgMobject, VMobjectFromSVGPath, type SVGMobjectOptions, type VMobjectFromSVGPathOptions, type SVGMobjectFromUrlOptions, } from './SVGMobject';
10
+ export { GradientVMobject, type GradientVMobjectOptions, type SvgGradient, type SvgGradientStop, type SvgGradientType, } from './svgGradients';
11
+ export { type SvgFetcher, type SvgFetchResponse } from './svgLoader';
10
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/mobjects/svg/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EACL,KAAK,EACL,kBAAkB,EAClB,QAAQ,EACR,UAAU,EACV,SAAS,EACT,KAAK,YAAY,EACjB,KAAK,yBAAyB,EAC9B,KAAK,eAAe,EACpB,KAAK,iBAAiB,GACvB,MAAM,SAAS,CAAC;AAGjB,OAAO,EACL,UAAU,EACV,UAAU,EACV,mBAAmB,EACnB,KAAK,iBAAiB,EACtB,KAAK,0BAA0B,GAChC,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/mobjects/svg/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EACL,KAAK,EACL,kBAAkB,EAClB,QAAQ,EACR,UAAU,EACV,SAAS,EACT,KAAK,YAAY,EACjB,KAAK,yBAAyB,EAC9B,KAAK,eAAe,EACpB,KAAK,iBAAiB,GACvB,MAAM,SAAS,CAAC;AAGjB,OAAO,EACL,UAAU,EACV,UAAU,EACV,mBAAmB,EACnB,KAAK,iBAAiB,EACtB,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,GAC9B,MAAM,cAAc,CAAC;AAItB,OAAO,EACL,gBAAgB,EAChB,KAAK,uBAAuB,EAC5B,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,eAAe,GACrB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,gBAAgB,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,42 @@
1
+ import { VMobject } from '../../core/VMobject';
2
+ import { SvgGradient } from './svgGradients';
3
+ /**
4
+ * Create a flat-styled VMobject from Bezier control points.
5
+ *
6
+ * @param points3D - Bezier control points in 3D.
7
+ * @param color - Stroke color.
8
+ * @param strokeWidth - Stroke width.
9
+ * @param fillColor - Optional fill color.
10
+ * @param fillOpacity - Fill opacity (default 0).
11
+ */
12
+ export declare function createStyledVMobject(points3D: [number, number, number][], color: string, strokeWidth: number, fillColor?: string, fillOpacity?: number): VMobject;
13
+ /** Options describing how to style one SVG shape's fill. */
14
+ export interface FilledVMobjectOptions {
15
+ /** Bezier control points in 3D. */
16
+ points3D: [number, number, number][];
17
+ /** Resolved stroke color. */
18
+ strokeColor: string;
19
+ /** Resolved stroke width. */
20
+ strokeWidth: number;
21
+ /** The raw `fill` attribute from the element (may be null). */
22
+ rawFill: string | null;
23
+ /**
24
+ * Fallback fill used when the element has no `fill` attribute. `<path>` falls
25
+ * back to the SVGMobject default fill; other shapes pass undefined to match
26
+ * their original behavior.
27
+ */
28
+ fallbackFill?: string;
29
+ /** Default fill opacity for a filled shape. */
30
+ defaultFillOpacity?: number;
31
+ /** Gradient definitions for resolving `url(#id)` fills. */
32
+ defs: Map<string, SvgGradient>;
33
+ }
34
+ /**
35
+ * Build a VMobject for a fill-bearing SVG shape, applying a gradient fill when
36
+ * the `fill` is a resolvable `url(#id)` reference and a flat fill otherwise.
37
+ *
38
+ * The flat-fill branch reproduces the original per-shape logic exactly, so
39
+ * non-gradient shapes are unaffected.
40
+ */
41
+ export declare function makeFilledVMobject(options: FilledVMobjectOptions): VMobject;
42
+ //# sourceMappingURL=svgFill.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"svgFill.d.ts","sourceRoot":"","sources":["../../../src/mobjects/svg/svgFill.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAyC,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAEzF;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,EACpC,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,MAAM,EACnB,SAAS,CAAC,EAAE,MAAM,EAClB,WAAW,CAAC,EAAE,MAAM,GACnB,QAAQ,CAUV;AAED,4DAA4D;AAC5D,MAAM,WAAW,qBAAqB;IACpC,mCAAmC;IACnC,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;IACrC,6BAA6B;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,6BAA6B;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,+DAA+D;IAC/D,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,+CAA+C;IAC/C,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,2DAA2D;IAC3D,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;CAChC;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,qBAAqB,GAAG,QAAQ,CAqB3E"}
@@ -0,0 +1,68 @@
1
+ import { VMobject } from '../../core/VMobject';
2
+ /** Gradient geometry kind parsed from an SVG definition. */
3
+ export type SvgGradientType = 'linear' | 'radial';
4
+ /** One color stop of an SVG gradient. */
5
+ export interface SvgGradientStop {
6
+ /** Position along the gradient, clamped to [0, 1]. */
7
+ offset: number;
8
+ /** Stop color as a CSS color string (default black). */
9
+ color: string;
10
+ /** Stop opacity in [0, 1] (default 1). */
11
+ opacity: number;
12
+ }
13
+ /** Parsed SVG gradient definition. */
14
+ export interface SvgGradient {
15
+ /** The gradient `id` used by `url(#id)` references. */
16
+ id: string;
17
+ /** Gradient kind. Radial is approximated as a linear stop sequence. */
18
+ type: SvgGradientType;
19
+ /** Ordered color stops. */
20
+ stops: SvgGradientStop[];
21
+ }
22
+ /**
23
+ * Collect every `<linearGradient>`/`<radialGradient>` definition in an SVG,
24
+ * keyed by its `id`. Gradients without an `id` or without stops are skipped.
25
+ *
26
+ * @param svg - The parsed `<svg>` root element.
27
+ * @returns A map from gradient id to its parsed definition.
28
+ */
29
+ export declare function parseGradientDefs(svg: Element): Map<string, SvgGradient>;
30
+ /**
31
+ * Resolve a `fill="url(#id)"` reference to its gradient definition.
32
+ *
33
+ * @param fillAttr - The raw fill attribute value.
34
+ * @param defs - Gradient definitions from {@link parseGradientDefs}.
35
+ * @returns The matching gradient, or undefined when the fill is not a gradient
36
+ * reference or the id is unknown.
37
+ */
38
+ export declare function resolveGradientFill(fillAttr: string | null | undefined, defs: Map<string, SvgGradient>): SvgGradient | undefined;
39
+ /** Options for {@link GradientVMobject}. */
40
+ export interface GradientVMobjectOptions {
41
+ /** The resolved gradient applied as this object's fill. */
42
+ gradient: SvgGradient;
43
+ /** Bezier control points in 3D. */
44
+ points3D: [number, number, number][];
45
+ /** Stroke color (default WHITE). */
46
+ strokeColor?: string;
47
+ /** Stroke width (default DEFAULT_STROKE_WIDTH). */
48
+ strokeWidth?: number;
49
+ /** Fill opacity (default 0.5). */
50
+ fillOpacity?: number;
51
+ }
52
+ /**
53
+ * A VMobject whose fill comes from an SVG gradient.
54
+ *
55
+ * The flat `fillColor` is the first (offset-0) stop, so it renders correctly in
56
+ * the single-fill pipeline. {@link gradientColors} holds the full resampled
57
+ * palette (via {@link colorGradient}) for consumers that render or animate the
58
+ * gradient, and {@link gradient} keeps the original parsed stops.
59
+ */
60
+ export declare class GradientVMobject extends VMobject {
61
+ /** The parsed gradient definition applied as fill. */
62
+ readonly gradient: SvgGradient;
63
+ /** Evenly spaced palette of the gradient stops (via {@link colorGradient}). */
64
+ readonly gradientColors: string[];
65
+ constructor(options: GradientVMobjectOptions);
66
+ copy(): GradientVMobject;
67
+ }
68
+ //# sourceMappingURL=svgGradients.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"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,qBAAa,gBAAiB,SAAQ,QAAQ;IAC5C,sDAAsD;IACtD,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAC;IAC/B,+EAA+E;IAC/E,QAAQ,CAAC,cAAc,EAAE,MAAM,EAAE,CAAC;gBAEtB,OAAO,EAAE,uBAAuB;IAcnC,IAAI,IAAI,gBAAgB;CAWlC"}
@@ -0,0 +1,9 @@
1
+ import { ImageMobject } from '../image';
2
+ /**
3
+ * Build one {@link ImageMobject} per `<image>` element that has an href.
4
+ *
5
+ * @param svg - The parsed `<svg>` root element.
6
+ * @returns Image mobjects, in document order. Elements without an href are skipped.
7
+ */
8
+ export declare function buildSvgImageMobjects(svg: Element): ImageMobject[];
9
+ //# sourceMappingURL=svgImage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"svgImage.d.ts","sourceRoot":"","sources":["../../../src/mobjects/svg/svgImage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAcxC;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,OAAO,GAAG,YAAY,EAAE,CAwBlE"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * URL loading for SVGMobject (best-manim enhancement).
3
+ *
4
+ * `SVGMobject.fromUrl` fetches SVG text and parses it through the existing
5
+ * string path. The fetcher is injected (default `globalThis.fetch`) so tests
6
+ * can supply a mock and never touch the network.
7
+ */
8
+ /** Minimal response shape `fromUrl` needs — satisfied by the DOM `Response`. */
9
+ export interface SvgFetchResponse {
10
+ /** Whether the HTTP status is in the 2xx range. */
11
+ ok: boolean;
12
+ /** HTTP status code. */
13
+ status: number;
14
+ /** Resolve to the response body as text. */
15
+ text(): Promise<string>;
16
+ }
17
+ /** A function that fetches a URL, compatible with `globalThis.fetch`. */
18
+ export type SvgFetcher = (url: string) => Promise<SvgFetchResponse>;
19
+ /**
20
+ * Default fetcher: delegates to `globalThis.fetch`.
21
+ *
22
+ * Rejects with a clear error when no global fetch exists, so the caller can
23
+ * record it via `getLoadError()` instead of throwing a cryptic ReferenceError.
24
+ */
25
+ export declare const defaultSvgFetcher: SvgFetcher;
26
+ /**
27
+ * Fetch SVG text from a URL using the injected fetcher.
28
+ *
29
+ * @param url - The SVG resource URL.
30
+ * @param fetcher - The fetch implementation (defaults to {@link defaultSvgFetcher}).
31
+ * @returns The response body as text.
32
+ * @throws When the fetch rejects or the response status is not ok.
33
+ */
34
+ export declare function fetchSvgText(url: string, fetcher?: SvgFetcher): Promise<string>;
35
+ //# sourceMappingURL=svgLoader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"svgLoader.d.ts","sourceRoot":"","sources":["../../../src/mobjects/svg/svgLoader.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,gFAAgF;AAChF,MAAM,WAAW,gBAAgB;IAC/B,mDAAmD;IACnD,EAAE,EAAE,OAAO,CAAC;IACZ,wBAAwB;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,4CAA4C;IAC5C,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;CACzB;AAED,yEAAyE;AACzE,MAAM,MAAM,UAAU,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,gBAAgB,CAAC,CAAC;AAEpE;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,EAAE,UAO/B,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAsB,YAAY,CAChC,GAAG,EAAE,MAAM,EACX,OAAO,GAAE,UAA8B,GACtC,OAAO,CAAC,MAAM,CAAC,CAMjB"}
@@ -0,0 +1,15 @@
1
+ import { Text } from '../text/Text';
2
+ /** Default styling for `<text>` elements that omit their own. */
3
+ export interface SvgTextDefaults {
4
+ /** Fill color used when the element has no usable `fill`. */
5
+ color: string;
6
+ }
7
+ /**
8
+ * Build one {@link Text} mobject per `<text>` element in the SVG.
9
+ *
10
+ * @param svg - The parsed `<svg>` root element.
11
+ * @param defaults - Fallback styling (currently the default fill color).
12
+ * @returns Text mobjects, in document order. Empty `<text>` nodes are skipped.
13
+ */
14
+ export declare function buildSvgTextMobjects(svg: Element, defaults: SvgTextDefaults): Text[];
15
+ //# sourceMappingURL=svgText.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"svgText.d.ts","sourceRoot":"","sources":["../../../src/mobjects/svg/svgText.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,iEAAiE;AACjE,MAAM,WAAW,eAAe;IAC9B,6DAA6D;IAC7D,KAAK,EAAE,MAAM,CAAC;CACf;AASD;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,eAAe,GAAG,IAAI,EAAE,CA2BpF"}
@@ -0,0 +1,122 @@
1
+ import { Vector3Tuple } from '../../core/Mobject';
2
+ import { Mobject3D } from './Mobject3D';
3
+ /**
4
+ * ModelMobject - import an external 3D model (glTF / .glb / .obj) as a mobject.
5
+ *
6
+ * ManimCE has no way to import an external 3D model (see the long-standing
7
+ * "OBJ Support" request). Three.js ships loaders for the common formats, so
8
+ * manim-web exposes them through a mobject that drops the loaded
9
+ * `THREE.Object3D` into the normal Group/Mobject hierarchy. The model then
10
+ * participates in shift / scale / rotate, z-depth and the 3D camera exactly
11
+ * like a built-in primitive (Cube, Surface3D, ...).
12
+ *
13
+ * Scene-graph wiring (why there are nested groups):
14
+ * wrapper - returned as `_threeObject`; its local transform is written
15
+ * by `Mobject._syncToThree` from the mobject transform, so it
16
+ * must stay under manim's control alone.
17
+ * content - carries the `scale` and `upAxis` options.
18
+ * center - carries the `center` recenter offset.
19
+ * model - the pristine loaded Object3D (never mutated by options, so
20
+ * `copy()` can clone it and re-apply the options cleanly).
21
+ *
22
+ * The real Three.js example loaders are pulled in through a lazy dynamic
23
+ * `import()` on first use, so the base bundle and SSR never load them. Tests
24
+ * inject a loader (via the `loader` option or `setModelLoaderFactory`), which
25
+ * bypasses the import and the network entirely - mirroring the
26
+ * `setTypstCompiler` dependency-injection seam in TypstRenderer.
27
+ */
28
+ import * as THREE from 'three';
29
+ /** Supported model formats, picked from the URL extension. */
30
+ export type ModelFormat = 'gltf' | 'obj';
31
+ /**
32
+ * The model's up direction. An axis name, or an explicit vector. The model is
33
+ * rotated so this direction aligns with the scene up (+Y).
34
+ */
35
+ export type ModelUpAxis = 'x' | 'y' | 'z' | Vector3Tuple;
36
+ /** A GLTF-style result, whose root Object3D lives on `.scene`. */
37
+ interface GltfLike {
38
+ scene: THREE.Object3D;
39
+ }
40
+ /**
41
+ * The minimal loader contract ModelMobject needs. Three.js GLTFLoader and
42
+ * OBJLoader both satisfy it structurally. Tests implement it with a stub.
43
+ */
44
+ export interface ModelLoader {
45
+ loadAsync(url: string, onProgress?: (event: ProgressEvent) => void): Promise<THREE.Object3D | GltfLike>;
46
+ }
47
+ /** Builds a loader for a format. The DI seam set by `setModelLoaderFactory`. */
48
+ export type ModelLoaderFactory = (format: ModelFormat) => ModelLoader | Promise<ModelLoader>;
49
+ /** Options for {@link ModelMobject.fromUrl}. */
50
+ export interface ModelMobjectOptions {
51
+ /** Uniform factor, or per-axis factors, applied to the loaded model. */
52
+ scale?: number | Vector3Tuple;
53
+ /** The model's up direction; the model is rotated to the scene up (+Y). */
54
+ upAxis?: ModelUpAxis;
55
+ /** Recenter the model's bounding box to the origin. Default: false. */
56
+ center?: boolean;
57
+ /** Convenience fill color applied to every mesh material. */
58
+ color?: string;
59
+ /** Replace every mesh material with this one. Wins over `color`. */
60
+ materialOverride?: THREE.Material;
61
+ /** Progress callback forwarded to the loader. */
62
+ onProgress?: (event: ProgressEvent) => void;
63
+ /** Inject a loader directly (bypasses the factory and the network). */
64
+ loader?: ModelLoader;
65
+ /**
66
+ * When false, a load failure resolves to an empty ModelMobject whose
67
+ * {@link ModelMobject.getLoadError} holds the error instead of rejecting.
68
+ * Default: true (the returned promise rejects on failure).
69
+ */
70
+ throwOnError?: boolean;
71
+ }
72
+ /**
73
+ * Inject a loader factory, replacing the lazy-loaded Three.js example loaders.
74
+ * Pass `null` to restore the default. Tests use this to avoid any real loader.
75
+ */
76
+ export declare function setModelLoaderFactory(factory: ModelLoaderFactory | null): void;
77
+ /** Pick the model format from a URL's extension (ignores query and fragment). */
78
+ export declare function detectModelFormat(url: string): ModelFormat;
79
+ export declare class ModelMobject extends Mobject3D {
80
+ private readonly _model;
81
+ private readonly _centerGroup;
82
+ private readonly _content;
83
+ private readonly _wrapper;
84
+ private readonly _format;
85
+ private readonly _options;
86
+ private _loadError;
87
+ /**
88
+ * Prefer {@link ModelMobject.fromUrl}. This constructor wraps an already
89
+ * loaded Object3D (or `null` for an empty placeholder) and applies the
90
+ * geometry options.
91
+ */
92
+ constructor(object: THREE.Object3D | null, options?: ModelMobjectOptions, format?: ModelFormat | null);
93
+ /**
94
+ * Load a model from a URL and return a ready ModelMobject.
95
+ *
96
+ * The loader is chosen from the extension: `.glb` / `.gltf` -> GLTFLoader,
97
+ * `.obj` -> OBJLoader. Inject a loader with the `loader` option (or
98
+ * `setModelLoaderFactory`) to avoid the network, e.g. in tests.
99
+ */
100
+ static fromUrl(url: string, options?: ModelMobjectOptions): Promise<ModelMobject>;
101
+ /** Offset the center group so the model's bounding box sits at the origin. */
102
+ private _recenter;
103
+ /** Rotate the content group so the model's up axis aligns with +Y. */
104
+ private _applyUpAxis;
105
+ private _upAxisVector;
106
+ /** Scale the content group uniformly or per axis. */
107
+ private _applyScale;
108
+ /** Apply a material override, or a fill color, to every mesh in the model. */
109
+ private _applyMaterials;
110
+ private _applyColor;
111
+ private _forEachMesh;
112
+ /** The loaded model root (an empty Group if the load failed). */
113
+ getObject(): THREE.Object3D;
114
+ /** The format this model was loaded as, or null for a bare construction. */
115
+ getFormat(): ModelFormat | null;
116
+ /** The load error, or null if the model loaded successfully. */
117
+ getLoadError(): Error | null;
118
+ protected _createThreeObject(): THREE.Object3D;
119
+ copy(): ModelMobject;
120
+ }
121
+ export {};
122
+ //# sourceMappingURL=ModelMobject.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ModelMobject.d.ts","sourceRoot":"","sources":["../../../src/mobjects/three-d/ModelMobject.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAMxC,8DAA8D;AAC9D,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,KAAK,CAAC;AAEzC;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,YAAY,CAAC;AAEzD,kEAAkE;AAClE,UAAU,QAAQ;IAChB,KAAK,EAAE,KAAK,CAAC,QAAQ,CAAC;CACvB;AAED;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,SAAS,CACP,GAAG,EAAE,MAAM,EACX,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,GAC1C,OAAO,CAAC,KAAK,CAAC,QAAQ,GAAG,QAAQ,CAAC,CAAC;CACvC;AAED,gFAAgF;AAChF,MAAM,MAAM,kBAAkB,GAAG,CAAC,MAAM,EAAE,WAAW,KAAK,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;AAE7F,gDAAgD;AAChD,MAAM,WAAW,mBAAmB;IAClC,wEAAwE;IACxE,KAAK,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC;IAC9B,2EAA2E;IAC3E,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,uEAAuE;IACvE,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,6DAA6D;IAC7D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oEAAoE;IACpE,gBAAgB,CAAC,EAAE,KAAK,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AAC,QAAQ;IAI3B,4EAA4E;IAC5E,SAAS,IAAI,WAAW,GAAG,IAAI;IAI/B,gEAAgE;IAChE,YAAY,IAAI,KAAK,GAAG,IAAI;IAM5B,SAAS,CAAC,kBAAkB,IAAI,KAAK,CAAC,QAAQ;IAIrC,IAAI,IAAI,YAAY;CAO9B"}
@@ -0,0 +1,126 @@
1
+ import { Vector3Tuple } from '../../core/Mobject';
2
+ import { TexturedMobject } from '../../core/TexturedMobject';
3
+ import * as THREE from 'three';
4
+ /**
5
+ * Options for creating a VideoMobject.
6
+ */
7
+ export interface VideoMobjectOptions {
8
+ /** Video source URL. Required. */
9
+ src: string;
10
+ /** Loop playback when it reaches the end. Default: false */
11
+ loop?: boolean;
12
+ /** Mute the audio track. Default: true (needed for browser autoplay policies) */
13
+ muted?: boolean;
14
+ /** Start playing as soon as data is available. Default: false */
15
+ autoplay?: boolean;
16
+ /** Playback speed multiplier (1 = normal). Default: 1 */
17
+ playbackRate?: number;
18
+ /** Width of the video in scene units. Default: auto from aspect ratio */
19
+ width?: number;
20
+ /** Height of the video in scene units. Default: auto from aspect ratio */
21
+ height?: number;
22
+ /** If both width and height given, fit inside the box preserving aspect. Default: true */
23
+ scaleToFit?: boolean;
24
+ /** Center position [x, y, z]. Default: [0, 0, 0] */
25
+ center?: Vector3Tuple;
26
+ /** Opacity from 0 to 1. Default: 1 */
27
+ opacity?: number;
28
+ /** Render both sides of the plane. Default: false */
29
+ doubleSided?: boolean;
30
+ /** crossOrigin attribute for the video element. Default: 'anonymous' */
31
+ crossOrigin?: string | null;
32
+ }
33
+ /**
34
+ * VideoMobject - display an HTML `<video>` as a movable, scalable mobject.
35
+ *
36
+ * The video is drawn onto a `THREE.PlaneGeometry` through a
37
+ * `THREE.VideoTexture`, mirroring how {@link ImageMobject} draws images. It
38
+ * therefore participates in the standard mobject transforms (shift, scale,
39
+ * rotate), z-index/depth, opacity, and `scene.add`.
40
+ *
41
+ * Playback follows the DOM video clock during normal play. When the Player
42
+ * scrubs or seeks, call {@link syncToTime} so the displayed frame follows the
43
+ * scene time.
44
+ *
45
+ * @example
46
+ * ```typescript
47
+ * const clip = new VideoMobject({ src: 'intro.mp4', width: 6, loop: true });
48
+ * scene.add(clip);
49
+ * await clip.waitForLoad();
50
+ * clip.play();
51
+ * ```
52
+ */
53
+ export declare class VideoMobject extends TexturedMobject {
54
+ protected _source: string;
55
+ protected _loop: boolean;
56
+ protected _muted: boolean;
57
+ protected _autoplay: boolean;
58
+ protected _playbackRate: number;
59
+ protected _width: number | undefined;
60
+ protected _height: number | undefined;
61
+ protected _scaleToFit: boolean;
62
+ protected _centerPoint: Vector3Tuple;
63
+ protected _doubleSided: boolean;
64
+ protected _crossOrigin: string | null;
65
+ protected _video: HTMLVideoElement | null;
66
+ protected _texture: THREE.VideoTexture | null;
67
+ protected _videoLoaded: boolean;
68
+ protected _loadError: Error | null;
69
+ protected _naturalWidth: number;
70
+ protected _naturalHeight: number;
71
+ private _mesh;
72
+ private _loadPromise;
73
+ private _loadResolve;
74
+ private _loadReject;
75
+ constructor(options: VideoMobjectOptions);
76
+ /**
77
+ * Create the DOM video element and its VideoTexture. Node/SSR-safe: when
78
+ * `document` is missing, the load fails gracefully instead of throwing.
79
+ */
80
+ private _createVideo;
81
+ /** Record a load error and reject the ready promise once. */
82
+ private _failLoad;
83
+ /** Promise that resolves on `loadeddata` and rejects on load error. */
84
+ waitForLoad(): Promise<void>;
85
+ /** The captured load error, or null when no error occurred. */
86
+ getLoadError(): Error | null;
87
+ /** Whether the first frame of video data is available. */
88
+ isLoaded(): boolean;
89
+ /** The video source URL. */
90
+ getSource(): string;
91
+ /** Start (or resume) playback. Silently ignores autoplay rejections. */
92
+ play(): this;
93
+ /** Pause playback. */
94
+ pause(): this;
95
+ /** Seek the video to an absolute time in seconds, clamped to [0, duration]. */
96
+ seek(seconds: number): this;
97
+ /** Set the playback speed multiplier. */
98
+ setPlaybackRate(rate: number): this;
99
+ /** Duration of the video in seconds (NaN until metadata loads). */
100
+ get duration(): number;
101
+ /**
102
+ * Follow the Player clock: show the frame at `sceneTime`. Use this on scrub
103
+ * and seek so the displayed frame tracks the timeline position.
104
+ */
105
+ syncToTime(sceneTime: number): this;
106
+ /** Clamp a time to [0, duration]; duration may be NaN before metadata loads. */
107
+ private _clampTime;
108
+ /** Display dimensions from width/height options and the natural size. */
109
+ private _calculateDimensions;
110
+ protected _createThreeObject(): THREE.Object3D;
111
+ getDisplayMeshLength(): number;
112
+ getDisplayMeshes(): THREE.Mesh[];
113
+ applyTextureFrom(other: TexturedMobject): void;
114
+ applyVisualSize(width: number, height: number): void;
115
+ applyContentFrom(other: TexturedMobject): void;
116
+ protected _updateGeometry(): void;
117
+ protected _syncMaterialToThree(): void;
118
+ getBoundingBox(): {
119
+ width: number;
120
+ height: number;
121
+ depth: number;
122
+ };
123
+ copy(): VideoMobject;
124
+ dispose(): void;
125
+ }
126
+ //# sourceMappingURL=VideoMobject.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VideoMobject.d.ts","sourceRoot":"","sources":["../../../src/mobjects/video/VideoMobject.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAE7D;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,kCAAkC;IAClC,GAAG,EAAE,MAAM,CAAC;IACZ,4DAA4D;IAC5D,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,iFAAiF;IACjF,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,iEAAiE;IACjE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,yDAAyD;IACzD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yEAAyE;IACzE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0EAA0E;IAC1E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,0F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IAAI,IAAI,YAAY;IAyBpB,OAAO,IAAI,IAAI;CAazB"}
@@ -0,0 +1,2 @@
1
+ export { VideoMobject, type VideoMobjectOptions } from './VideoMobject';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/mobjects/video/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,KAAK,mBAAmB,EAAE,MAAM,gBAAgB,CAAC"}