manim-web 0.24.0 → 0.25.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 (33) hide show
  1. package/dist/export/SlideDeckExporter.d.ts +210 -0
  2. package/dist/export/SlideDeckExporter.d.ts.map +1 -0
  3. package/dist/export/index.d.ts +1 -0
  4. package/dist/export/index.d.ts.map +1 -1
  5. package/dist/html2canvas-DECPJJGt.js +4025 -0
  6. package/dist/index.d.ts +3 -3
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.es-BiZp4vgJ.js +5753 -0
  9. package/dist/index.js +3 -3
  10. package/dist/integrations/react.js +17 -17
  11. package/dist/integrations/vue.js +16 -16
  12. package/dist/jspdf.es.min-CvMJL6nS.js +18228 -0
  13. package/dist/manim-web.browser.js +2267 -1565
  14. package/dist/mobjects/graph/ForceDirectedLayout.d.ts +65 -0
  15. package/dist/mobjects/graph/ForceDirectedLayout.d.ts.map +1 -0
  16. package/dist/mobjects/graph/GenericGraph.d.ts +11 -0
  17. package/dist/mobjects/graph/GenericGraph.d.ts.map +1 -1
  18. package/dist/mobjects/graph/SankeyDiagram.d.ts +122 -0
  19. package/dist/mobjects/graph/SankeyDiagram.d.ts.map +1 -0
  20. package/dist/mobjects/graph/index.d.ts +4 -1
  21. package/dist/mobjects/graph/index.d.ts.map +1 -1
  22. package/dist/mobjects/graph/layoutAlgorithms.d.ts +54 -0
  23. package/dist/mobjects/graph/layoutAlgorithms.d.ts.map +1 -1
  24. package/dist/mobjects/graph/sankeyLayout.d.ts +97 -0
  25. package/dist/mobjects/graph/sankeyLayout.d.ts.map +1 -0
  26. package/dist/mobjects/graphing/DomainColoring.d.ts +114 -0
  27. package/dist/mobjects/graphing/DomainColoring.d.ts.map +1 -0
  28. package/dist/mobjects/graphing/index.d.ts +1 -0
  29. package/dist/mobjects/graphing/index.d.ts.map +1 -1
  30. package/dist/purify.es-MUrypqLF.js +864 -0
  31. package/dist/{src-DRH8XOAP.js → src-Dq6hmMfV.js} +2285 -1583
  32. package/dist/typeof-CcP5rTWg.js +11 -0
  33. package/package.json +2 -1
@@ -0,0 +1,65 @@
1
+ import { Animation, AnimationOptions } from '../../animation/Animation';
2
+ import { Vector3Tuple } from '../../core/Mobject';
3
+ import { GenericGraph } from './GenericGraph';
4
+ import { VertexId } from './graphTypes';
5
+ /**
6
+ * Options for the ForceDirectedLayout animation.
7
+ */
8
+ export interface ForceDirectedLayoutOptions extends AnimationOptions {
9
+ /** Number of simulation steps to run. Default: 50. */
10
+ iterations?: number;
11
+ /** Cooling factor applied to the temperature each step. Default: 0.95. */
12
+ cooling?: number;
13
+ /** Layout scale. It sets the force constant and the initial temperature. Default: 2. */
14
+ scale?: number;
15
+ /** Layout center. Default: [0, 0, 0]. */
16
+ center?: Vector3Tuple;
17
+ /** Explicit initial positions. They override the random or seeded start. */
18
+ initialPositions?: Map<VertexId, Vector3Tuple>;
19
+ /** Seed for the random initial positions. Omit to start from the current positions. */
20
+ seed?: number;
21
+ }
22
+ export declare class ForceDirectedLayout extends Animation {
23
+ private _graph;
24
+ private _iterations;
25
+ private _cooling;
26
+ private _scale;
27
+ private _center;
28
+ private _seed?;
29
+ private _initialPositions?;
30
+ private _vertices;
31
+ private _edges;
32
+ /** One positions snapshot per step (length = iterations + 1). */
33
+ private _trajectory;
34
+ constructor(graph: GenericGraph, options?: ForceDirectedLayoutOptions);
35
+ /**
36
+ * Snapshot the graph and build the full simulation trajectory once.
37
+ */
38
+ begin(): void;
39
+ /**
40
+ * Build the trajectory from the initial positions to the settled layout.
41
+ * Each entry is the positions after one more step.
42
+ */
43
+ private _computeTrajectory;
44
+ /** Resolve the starting positions from the options or the graph. */
45
+ private _resolveInitialPositions;
46
+ /**
47
+ * Move the graph's vertices to the simulation state for `alpha`.
48
+ * It interpolates between the two nearest trajectory snapshots, so the motion
49
+ * is smooth. `alpha` 0 is the initial layout and `alpha` 1 is the settled one.
50
+ */
51
+ interpolate(alpha: number): void;
52
+ /**
53
+ * Get the settled layout (the last trajectory snapshot).
54
+ * The map is empty until `begin()` runs.
55
+ */
56
+ getSettledPositions(): Map<VertexId, Vector3Tuple>;
57
+ }
58
+ /**
59
+ * Factory for a ForceDirectedLayout animation.
60
+ * @param graph - The graph to relax.
61
+ * @param options - Animation and simulation options.
62
+ * @returns A new ForceDirectedLayout animation.
63
+ */
64
+ export declare function forceDirectedLayout(graph: GenericGraph, options?: ForceDirectedLayoutOptions): ForceDirectedLayout;
65
+ //# sourceMappingURL=ForceDirectedLayout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ForceDirectedLayout.d.ts","sourceRoot":"","sources":["../../../src/mobjects/graph/ForceDirectedLayout.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAa,MAAM,cAAc,CAAC;AASnD;;GAEG;AACH,MAAM,WAAW,0BAA2B,SAAQ,gBAAgB;IAClE,sDAAsD;IACtD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,0EAA0E;IAC1E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,wFAAwF;IACxF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yCAAyC;IACzC,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,4EAA4E;IAC5E,gBAAgB,CAAC,EAAE,GAAG,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;IAC/C,uFAAuF;IACvF,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAyBD,qBAAa,mBAAoB,SAAQ,SAAS;IAChD,OAAO,CAAC,MAAM,CAAe;IAC7B,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,OAAO,CAAe;IAC9B,OAAO,CAAC,KAAK,CAAC,CAAS;IACvB,OAAO,CAAC,iBAAiB,CAAC,CAA8B;IAExD,OAAO,CAAC,SAAS,CAAkB;IACnC,OAAO,CAAC,MAAM,CAAmB;IAEjC,iEAAiE;IACjE,OAAO,CAAC,WAAW,CAAoC;gBAE3C,KAAK,EAAE,YAAY,EAAE,OAAO,GAAE,0BAA+B;IAWzE;;OAEG;IACM,KAAK,IAAI,IAAI;IAOtB;;;OAGG;IACH,OAAO,CAAC,kBAAkB;IAuB1B,oEAAoE;IACpE,OAAO,CAAC,wBAAwB;IA4BhC;;;;OAIG;IACH,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAsBhC;;;OAGG;IACH,mBAAmB,IAAI,GAAG,CAAC,QAAQ,EAAE,YAAY,CAAC;CAUnD;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,YAAY,EACnB,OAAO,CAAC,EAAE,0BAA0B,GACnC,mBAAmB,CAErB"}
@@ -1,6 +1,7 @@
1
1
  import { Mobject, Vector3Tuple } from '../../core/Mobject';
2
2
  import { Dot } from '../geometry/Dot';
3
3
  import { VertexId, EdgeTuple, LayoutType, VertexStyleOptions, EdgeStyleOptions, VertexConfig, EdgeConfig, LayoutConfig, GenericGraphOptions } from './graphTypes';
4
+ import { ForceDirectedLayout, ForceDirectedLayoutOptions } from './ForceDirectedLayout';
4
5
  import { Text } from '../text/Text';
5
6
  /**
6
7
  * GenericGraph - Base class for graph visualization
@@ -172,6 +173,16 @@ export declare class GenericGraph extends Mobject {
172
173
  * Get all vertex positions
173
174
  */
174
175
  getPositions(): Map<VertexId, Vector3Tuple>;
176
+ /**
177
+ * Build an animation that relaxes the graph with a live spring
178
+ * (force-directed) simulation. The vertices move step by step over the
179
+ * animation's run time, so the graph visibly settles.
180
+ *
181
+ * The scale, center, and iterations default to this graph's layout config.
182
+ * @param options - Animation and simulation options.
183
+ * @returns A ForceDirectedLayout animation.
184
+ */
185
+ animateSpringLayout(options?: ForceDirectedLayoutOptions): ForceDirectedLayout;
175
186
  /**
176
187
  * Set the color of a specific vertex
177
188
  */
@@ -1 +1 @@
1
- {"version":3,"file":"GenericGraph.d.ts","sourceRoot":"","sources":["../../../src/mobjects/graph/GenericGraph.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAItC,OAAO,EACL,QAAQ,EACR,SAAS,EACT,UAAU,EACV,kBAAkB,EAClB,gBAAgB,EAChB,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,mBAAmB,EACpB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAUpC,qBAAa,YAAa,SAAQ,OAAO;IAC9B,kBAAkB,CAAC,WAAW,GAAE,KAAK,CAAC,OAA2B,GAAG,IAAI;IAGjF,iCAAiC;IACjC,SAAS,CAAC,SAAS,EAAE,QAAQ,EAAE,CAAM;IAErC,+CAA+C;IAC/C,SAAS,CAAC,MAAM,EAAE,SAAS,EAAE,CAAM;IAEnC,mCAAmC;IACnC,SAAS,CAAC,UAAU,EAAE,GAAG,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAa;IAE9D,sCAAsC;IACtC,SAAS,CAAC,eAAe,EAAE,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAa;IAE1D,4CAA4C;IAC5C,SAAS,CAAC,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAa;IAE1D,uDAAuD;IACvD,SAAS,CAAC,kBAAkB,EAAE,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,CAAa;IAE5D,2BAA2B;IAC3B,SAAS,CAAC,aAAa,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,QAAQ,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IASrE;;OAEG;IACH,aAAa,CAAC,IAAI,EAAE,QAAQ,EAAE,EAAE,WAAW,GAAE,MAAY,EAAE,SAAS,GAAE,MAAY,GAAG,IAAI;IAUzF;;OAEG;IACH,WAAW,IAAI,IAAI;IAmBnB;;OAEG;IACH,SAAS,CAAC,kBAAkB,IAAI,KAAK,CAAC,QAAQ;IAK9C;;OAEG;IACM,IAAI,IAAI,YAAY;CAW9B"}
@@ -0,0 +1,122 @@
1
+ import { VGroup } from '../../core/VGroup';
2
+ import { VMobject } from '../../core/VMobject';
3
+ import { Rectangle } from '../geometry/Rectangle';
4
+ import { LinkLayout, SankeyLinkInput, SankeyNodeInput, SankeyOrientation } from './sankeyLayout';
5
+ /** How a link derives its color from its endpoints. */
6
+ export type SankeyLinkColorMode = 'source' | 'target' | 'blend';
7
+ /** A span (top and bottom y) along a node edge. */
8
+ export interface SankeySpan {
9
+ top: number;
10
+ bottom: number;
11
+ }
12
+ /**
13
+ * Options for {@link SankeyDiagram}.
14
+ */
15
+ export interface SankeyDiagramOptions {
16
+ /** Nodes keyed by id. */
17
+ nodes: SankeyNodeInput[];
18
+ /** Directed flows between nodes. */
19
+ links: SankeyLinkInput[];
20
+ /** Node thickness along the flow axis. Default: 0.3 */
21
+ nodeWidth?: number;
22
+ /** Gap between stacked nodes in one column. Default: 0.4 */
23
+ nodePadding?: number;
24
+ /** Distance between adjacent columns. Default: 3 */
25
+ layerSpacing?: number;
26
+ /** Target length of the tallest column. Default: 4 */
27
+ height?: number;
28
+ /** Minimum node length along the stacking axis. Default: 0.05 */
29
+ minNodeLength?: number;
30
+ /** Flow direction. Default: 'horizontal' */
31
+ orientation?: SankeyOrientation;
32
+ /** Whether to render node labels. Default: true */
33
+ showLabels?: boolean;
34
+ /** Label font size. Default: 24 */
35
+ labelFontSize?: number;
36
+ /** Gap between a node and its label. Default: 0.15 */
37
+ labelBuff?: number;
38
+ /** Node fill opacity. Default: 1 */
39
+ nodeFillOpacity?: number;
40
+ /** Link (ribbon) fill opacity. Default: 0.5 */
41
+ linkOpacity?: number;
42
+ /** How a link colors itself from its endpoints. Default: 'source' */
43
+ linkColorMode?: SankeyLinkColorMode;
44
+ }
45
+ /**
46
+ * A node rectangle inside a {@link SankeyDiagram}.
47
+ */
48
+ export declare class SankeyNode extends Rectangle {
49
+ /** Node identifier. */
50
+ readonly id: string;
51
+ /** Column index (0 = left-most for a horizontal diagram). */
52
+ readonly layer: number;
53
+ /** `max(incoming total, outgoing total)`. */
54
+ readonly throughput: number;
55
+ constructor(options: ConstructorParameters<typeof Rectangle>[0] & {
56
+ id: string;
57
+ layer: number;
58
+ throughput: number;
59
+ });
60
+ }
61
+ /**
62
+ * A flow ribbon inside a {@link SankeyDiagram}.
63
+ *
64
+ * The ribbon is a closed filled VMobject built from two cubic-bezier edges (a
65
+ * top and a bottom S-curve) joined by the straight source and target spans. Its
66
+ * thickness is proportional to {@link value}.
67
+ */
68
+ export declare class SankeyLink extends VMobject {
69
+ /** Source node id. */
70
+ readonly source: string;
71
+ /** Target node id. */
72
+ readonly target: string;
73
+ /** Flow magnitude. */
74
+ readonly value: number;
75
+ private readonly _width;
76
+ private readonly _sourceSpan;
77
+ private readonly _targetSpan;
78
+ constructor(layout: LinkLayout, orientation: SankeyOrientation, color: string, fillOpacity: number);
79
+ /** Ribbon thickness (proportional to {@link value}). */
80
+ getLinkWidth(): number;
81
+ /** Span occupied on the source node's edge, in horizontal layout space. */
82
+ getSourceSpan(): SankeySpan;
83
+ /** Span occupied on the target node's edge, in horizontal layout space. */
84
+ getTargetSpan(): SankeySpan;
85
+ }
86
+ /**
87
+ * SankeyDiagram - a layered flow diagram of nodes and proportional-width links.
88
+ *
89
+ * Nodes are placed in columns from sources to sinks. Each link is a filled
90
+ * cubic-bezier ribbon whose thickness is proportional to its value, stacked
91
+ * along each node's edge so sibling links do not overlap. A node with unequal
92
+ * incoming and outgoing totals is sized by the larger of the two.
93
+ *
94
+ * @example
95
+ * ```typescript
96
+ * const sankey = new SankeyDiagram({
97
+ * nodes: [{ id: 'a' }, { id: 'b' }, { id: 'c' }],
98
+ * links: [
99
+ * { source: 'a', target: 'b', value: 3 },
100
+ * { source: 'a', target: 'c', value: 1 },
101
+ * ],
102
+ * });
103
+ * ```
104
+ */
105
+ export declare class SankeyDiagram extends VGroup {
106
+ private readonly _nodes;
107
+ private readonly _links;
108
+ private readonly _nodeById;
109
+ constructor(options: SankeyDiagramOptions);
110
+ private _linkColor;
111
+ private _makeLabel;
112
+ /** All node rectangles, in input order. */
113
+ getNodes(): SankeyNode[];
114
+ /** All link ribbons, in input order. */
115
+ getLinks(): SankeyLink[];
116
+ /** The node with the given id, or `undefined`. */
117
+ getNode(id: string): SankeyNode | undefined;
118
+ /** The link at the given index, or `undefined`. */
119
+ getLink(index: number): SankeyLink | undefined;
120
+ copy(): SankeyDiagram;
121
+ }
122
+ //# sourceMappingURL=SankeyDiagram.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SankeyDiagram.d.ts","sourceRoot":"","sources":["../../../src/mobjects/graph/SankeyDiagram.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE/C,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGlD,OAAO,EAGL,KAAK,UAAU,EAGf,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACvB,MAAM,gBAAgB,CAAC;AAKxB,uDAAuD;AACvD,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEhE,mDAAmD;AACnD,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,yBAAyB;IACzB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,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,sBAAsB;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAEvB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAChC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAa;IACzC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAa;gBAGvC,MAAM,EAAE,UAAU,EAClB,WAAW,EAAE,iBAAiB,EAC9B,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,MAAM;IAkBrB,wDAAwD;IACxD,YAAY,IAAI,MAAM;IAItB,2EAA2E;IAC3E,aAAa,IAAI,UAAU;IAI3B,2EAA2E;IAC3E,aAAa,IAAI,UAAU;CAG5B;AAkDD;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,aAAc,SAAQ,MAAM;IACvC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAoB;IAC3C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAoB;IAC3C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAiC;gBAE/C,OAAO,EAAE,oBAAoB;IA8EzC,OAAO,CAAC,UAAU;IAYlB,OAAO,CAAC,UAAU;IAkBlB,2CAA2C;IAC3C,QAAQ,IAAI,UAAU,EAAE;IAIxB,wCAAwC;IACxC,QAAQ,IAAI,UAAU,EAAE;IAIxB,kDAAkD;IAClD,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS;IAI3C,mDAAmD;IACnD,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS;IAIrC,IAAI,IAAI,aAAa;CAK/B"}
@@ -6,9 +6,12 @@
6
6
  * with various layout algorithms.
7
7
  */
8
8
  export type { VertexId, EdgeTuple, LayoutType, VertexStyleOptions, EdgeStyleOptions, VertexConfig, EdgeConfig, LayoutConfig, GenericGraphOptions, DiGraphOptions, } from './graphTypes';
9
- export { computeLayout, computeCircularLayout } from './layoutAlgorithms';
9
+ export { computeLayout, computeCircularLayout, springLayoutStep, randomSpringPositions, springForceConstant, DEFAULT_SPRING_COOLING, type SpringPoint, type SpringStepParams, type SpringStepResult, } from './layoutAlgorithms';
10
+ export { ForceDirectedLayout, forceDirectedLayout, type ForceDirectedLayoutOptions, } from './ForceDirectedLayout';
10
11
  export { GenericGraph } from './GenericGraph';
11
12
  export { Graph } from './Graph';
12
13
  export { DiGraph } from './DiGraph';
13
14
  export { completeGraph, cycleGraph, pathGraph, starGraph, binaryTree, gridGraph, bipartiteGraph, } from './graphFactories';
15
+ export { SankeyDiagram, SankeyNode, SankeyLink, type SankeyDiagramOptions, type SankeyLinkColorMode, type SankeySpan, } from './SankeyDiagram';
16
+ export { computeSankeyLayout, orientPoint, type SankeyNodeInput, type SankeyLinkInput, type SankeyOrientation, type SankeyLayoutOptions, type NodeLayout, type LinkLayout, type SankeyLayout, } from './sankeyLayout';
14
17
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/mobjects/graph/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,YAAY,EACV,QAAQ,EACR,SAAS,EACT,UAAU,EACV,kBAAkB,EAClB,gBAAgB,EAChB,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,mBAAmB,EACnB,cAAc,GACf,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAG1E,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,OAAO,EACL,aAAa,EACb,UAAU,EACV,SAAS,EACT,SAAS,EACT,UAAU,EACV,SAAS,EACT,cAAc,GACf,MAAM,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/mobjects/graph/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,YAAY,EACV,QAAQ,EACR,SAAS,EACT,UAAU,EACV,kBAAkB,EAClB,gBAAgB,EAChB,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,mBAAmB,EACnB,cAAc,GACf,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,aAAa,EACb,qBAAqB,EACrB,gBAAgB,EAChB,qBAAqB,EACrB,mBAAmB,EACnB,sBAAsB,EACtB,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,GACtB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,KAAK,0BAA0B,GAChC,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,OAAO,EACL,aAAa,EACb,UAAU,EACV,SAAS,EACT,SAAS,EACT,UAAU,EACV,SAAS,EACT,cAAc,GACf,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EACL,aAAa,EACb,UAAU,EACV,UAAU,EACV,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,UAAU,GAChB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,mBAAmB,EACnB,WAAW,EACX,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,YAAY,GAClB,MAAM,gBAAgB,CAAC"}
@@ -8,4 +8,58 @@ export declare function computeLayout(vertices: VertexId[], edges: EdgeTuple[],
8
8
  * Circular layout: vertices equally spaced on a circle
9
9
  */
10
10
  export declare function computeCircularLayout(vertices: VertexId[], positions: Map<VertexId, Vector3Tuple>, scale: number, center: Vector3Tuple): void;
11
+ /**
12
+ * A 2D point used by the spring (force-directed) simulation.
13
+ */
14
+ export interface SpringPoint {
15
+ x: number;
16
+ y: number;
17
+ }
18
+ /**
19
+ * Parameters for a single Fruchterman-Reingold step.
20
+ */
21
+ export interface SpringStepParams {
22
+ /** Optimal edge length (the `k` constant in Fruchterman-Reingold). */
23
+ k: number;
24
+ /** Current temperature. It limits the maximum displacement per step. */
25
+ temperature: number;
26
+ /** Cooling factor applied to the temperature after the step. Default: 0.95. */
27
+ cooling?: number;
28
+ }
29
+ /**
30
+ * Result of a single spring step: the next positions and the cooled temperature.
31
+ */
32
+ export interface SpringStepResult {
33
+ /** The positions after the step. */
34
+ positions: Map<VertexId, SpringPoint>;
35
+ /** The temperature after cooling. */
36
+ temperature: number;
37
+ }
38
+ /** Default cooling factor for the spring (force-directed) simulation. */
39
+ export declare const DEFAULT_SPRING_COOLING = 0.95;
40
+ /**
41
+ * Compute the Fruchterman-Reingold force constant `k` for `n` vertices.
42
+ * It is the optimal distance between two vertices for the given `scale`.
43
+ */
44
+ export declare function springForceConstant(n: number, scale: number): number;
45
+ /**
46
+ * Create the initial spring positions for the vertices.
47
+ *
48
+ * Each vertex gets a position inside a box of side `scale * 2` around `center`.
49
+ * Pass a deterministic `random` function (0..1) for a repeatable layout.
50
+ */
51
+ export declare function randomSpringPositions(vertices: VertexId[], scale: number, center: Vector3Tuple, random?: () => number): Map<VertexId, SpringPoint>;
52
+ /**
53
+ * Advance the spring (force-directed) simulation by one step.
54
+ *
55
+ * This is one Fruchterman-Reingold iteration. It computes repulsive forces
56
+ * between every pair of vertices and attractive forces along the edges. Then it
57
+ * moves each vertex by its net force, limited by the temperature. It returns a
58
+ * new positions map and the cooled temperature, so the caller holds the state.
59
+ *
60
+ * The function is pure. It reads `positions` and returns new positions. It does
61
+ * not change the input. Run it `iterations` times to reproduce
62
+ * `computeSpringLayout`.
63
+ */
64
+ export declare function springLayoutStep(vertices: VertexId[], edges: EdgeTuple[], positions: Map<VertexId, SpringPoint>, params: SpringStepParams): SpringStepResult;
11
65
  //# sourceMappingURL=layoutAlgorithms.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"layoutAlgorithms.d.ts","sourceRoot":"","sources":["../../../src/mobjects/graph/layoutAlgorithms.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE/E;;GAEG;AACH,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,QAAQ,EAAE,EACpB,KAAK,EAAE,SAAS,EAAE,EAClB,MAAM,EAAE,YAAY,EACpB,YAAY,CAAC,EAAE,GAAG,CAAC,QAAQ,EAAE,YAAY,CAAC,GACzC,GAAG,CAAC,QAAQ,EAAE,YAAY,CAAC,CAmD7B;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,QAAQ,EAAE,EACpB,SAAS,EAAE,GAAG,CAAC,QAAQ,EAAE,YAAY,CAAC,EACtC,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,YAAY,GACnB,IAAI,CAUN"}
1
+ {"version":3,"file":"layoutAlgorithms.d.ts","sourceRoot":"","sources":["../../../src/mobjects/graph/layoutAlgorithms.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE/E;;GAEG;AACH,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,QAAQ,EAAE,EACpB,KAAK,EAAE,SAAS,EAAE,EAClB,MAAM,EAAE,YAAY,EACpB,YAAY,CAAC,EAAE,GAAG,CAAC,QAAQ,EAAE,YAAY,CAAC,GACzC,GAAG,CAAC,QAAQ,EAAE,YAAY,CAAC,CAmD7B;AA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3Tuple } from '../../core/Mobject';
2
+ /**
3
+ * A node in a {@link SankeyDiagram}.
4
+ *
5
+ * `layer` fixes the column (0 = left-most for a horizontal diagram). When it is
6
+ * omitted for every node, the layout derives columns from the link direction.
7
+ */
8
+ export interface SankeyNodeInput {
9
+ /** Unique node identifier, referenced by links. */
10
+ id: string;
11
+ /** Optional display label. Falls back to `id` when labels are shown. */
12
+ label?: string;
13
+ /** Optional explicit column index. */
14
+ layer?: number;
15
+ /** Optional CSS color for the node (and, by default, its outgoing links). */
16
+ color?: string;
17
+ }
18
+ /**
19
+ * A directed flow between two nodes. `value` sets the link (ribbon) thickness.
20
+ */
21
+ export interface SankeyLinkInput {
22
+ /** Source node id. */
23
+ source: string;
24
+ /** Target node id. */
25
+ target: string;
26
+ /** Flow magnitude. The ribbon thickness is proportional to this value. */
27
+ value: number;
28
+ }
29
+ /** Flow direction of the diagram. */
30
+ export type SankeyOrientation = 'horizontal' | 'vertical';
31
+ /** Tunable sizes used by {@link computeSankeyLayout}. */
32
+ export interface SankeyLayoutOptions {
33
+ /** Node thickness along the flow axis. */
34
+ nodeWidth: number;
35
+ /** Gap between stacked nodes in one column. */
36
+ nodePadding: number;
37
+ /** Distance between adjacent column centers. */
38
+ layerSpacing: number;
39
+ /** Target length of the tallest column (sum of its node lengths). */
40
+ height: number;
41
+ /** Minimum node length along the stacking axis. */
42
+ minNodeLength: number;
43
+ }
44
+ /** Computed geometry for one node, in horizontal (flow along +x) space. */
45
+ export interface NodeLayout {
46
+ id: string;
47
+ layer: number;
48
+ /** Center x of the node. */
49
+ x: number;
50
+ /** Top edge y (the larger y value). */
51
+ yTop: number;
52
+ /** Bottom edge y (the smaller y value). */
53
+ yBottom: number;
54
+ /** Node length along the stacking axis (`yTop - yBottom`). */
55
+ length: number;
56
+ /** `max(incoming total, outgoing total)`. */
57
+ throughput: number;
58
+ }
59
+ /** Computed geometry for one link, in horizontal (flow along +x) space. */
60
+ export interface LinkLayout {
61
+ index: number;
62
+ source: string;
63
+ target: string;
64
+ value: number;
65
+ /** Ribbon thickness. */
66
+ width: number;
67
+ /** Right edge x of the source node. */
68
+ sourceX: number;
69
+ sourceYTop: number;
70
+ sourceYBottom: number;
71
+ /** Left edge x of the target node. */
72
+ targetX: number;
73
+ targetYTop: number;
74
+ targetYBottom: number;
75
+ }
76
+ /** Full layout result. */
77
+ export interface SankeyLayout {
78
+ nodes: NodeLayout[];
79
+ links: LinkLayout[];
80
+ }
81
+ /**
82
+ * Map a horizontal-space point to the requested orientation.
83
+ *
84
+ * Horizontal keeps the point. Vertical rotates it so columns run top to bottom,
85
+ * by the map `(x, y) -> (y, -x)`.
86
+ */
87
+ export declare function orientPoint(point: Vector3Tuple, orientation: SankeyOrientation): Vector3Tuple;
88
+ /**
89
+ * Compute a layered left-to-right Sankey layout in horizontal space.
90
+ *
91
+ * The caller maps the result to the final orientation with {@link orientPoint}.
92
+ * Node lengths and link widths share one scale, so a link width is proportional
93
+ * to its value. A node with unequal in and out totals is sized by the larger of
94
+ * the two. The function never throws for empty, single, or unlinked input.
95
+ */
96
+ export declare function computeSankeyLayout(nodes: SankeyNodeInput[], links: SankeyLinkInput[], options: SankeyLayoutOptions): SankeyLayout;
97
+ //# sourceMappingURL=sankeyLayout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sankeyLayout.d.ts","sourceRoot":"","sources":["../../../src/mobjects/graph/sankeyLayout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC9B,mDAAmD;IACnD,EAAE,EAAE,MAAM,CAAC;IACX,wEAAwE;IACxE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6EAA6E;IAC7E,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,sBAAsB;IACtB,M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Y;IAC3B,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,KAAK,EAAE,UAAU,EAAE,CAAC;CACrB;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,iBAAiB,GAAG,YAAY,CAK7F;AAoCD;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,eAAe,EAAE,EACxB,KAAK,EAAE,eAAe,EAAE,EACxB,OAAO,EAAE,mBAAmB,GAC3B,YAAY,CA6Id"}
@@ -0,0 +1,114 @@
1
+ import { Vector3Tuple } from '../../core/Mobject';
2
+ import { Mobject3D } from '../three-d/Mobject3D';
3
+ import { Complex } from './ComplexPlane';
4
+ import * as THREE from 'three';
5
+ /** A complex function w = f(z), mapping one complex number to another. */
6
+ export type ComplexFunction = (z: Complex) => Complex;
7
+ /**
8
+ * How the modulus |f(z)| drives brightness.
9
+ *
10
+ * - `smooth`: brightness rises monotonically with the modulus, dark at zeros
11
+ * and bright at poles.
12
+ * - `banded`: brightness oscillates over each octave (power of two) of the
13
+ * modulus, giving the dark/light contour bands of a Wegert phase portrait.
14
+ */
15
+ export type BrightnessScheme = 'smooth' | 'banded';
16
+ /** Options for creating a {@link DomainColoring}. */
17
+ export interface DomainColoringOptions {
18
+ /** The complex function w = f(z) to visualize. */
19
+ func: ComplexFunction;
20
+ /** Real-axis range [min, max]. Default: [-5, 5] */
21
+ reRange?: [number, number];
22
+ /** Imaginary-axis range [min, max]. Default: [-5, 5] */
23
+ imRange?: [number, number];
24
+ /** Pixel grid size per axis, or [width, height]. Default: 256 */
25
+ resolution?: number | [number, number];
26
+ /** Brightness scheme for the modulus. Default: 'banded' */
27
+ scheme?: BrightnessScheme;
28
+ /** Color saturation from 0 to 1. Default: 1 */
29
+ saturation?: number;
30
+ /** Darken thin lines where the modulus crosses a power of two. Default: false */
31
+ contourLines?: boolean;
32
+ /** Opacity from 0 to 1. Default: 1 */
33
+ opacity?: number;
34
+ /** Center position [x, y, z]. Default: [0, 0, 0] */
35
+ center?: Vector3Tuple;
36
+ }
37
+ /**
38
+ * Map an evaluated value w = f(z) to an `[r, g, b]` float color (0..1).
39
+ *
40
+ * The hue encodes arg(w): the positive real axis is hue 0, and a quarter turn
41
+ * toward the positive imaginary axis shifts the hue by 90 degrees. The modulus
42
+ * |w| drives brightness through the chosen scheme. The result is always a valid
43
+ * color: a pole (|w| not finite) reads bright, a zero reads dark, and any
44
+ * non-finite channel becomes 0, so poles and zeros never produce NaN colors.
45
+ */
46
+ export declare function phasePortraitColor(w: Complex, scheme: BrightnessScheme, saturation: number, contourLines: boolean): [number, number, number];
47
+ /**
48
+ * DomainColoring - a phase portrait of a complex function f: C -> C.
49
+ *
50
+ * The region of the complex plane is sampled on a regular pixel grid. Each
51
+ * pixel's complex value w = f(z) is turned into a color by {@link
52
+ * phasePortraitColor}: the hue encodes arg(w) and the brightness encodes |w|.
53
+ * The pixels are written to an RGBA buffer that is uploaded as a texture on a
54
+ * flat quad spanning `reRange` x `imRange`, mirroring the way {@link HeatMap}
55
+ * renders a sampled scalar field.
56
+ *
57
+ * The pixel buffer is computed in plain TypeScript, so it is deterministic and
58
+ * readable without a browser. In a browser the buffer becomes a
59
+ * `THREE.CanvasTexture`; without a DOM it becomes an equivalent
60
+ * `THREE.DataTexture`.
61
+ *
62
+ * Pixel layout: row 0 is the top (im = imMax), the last row is the bottom
63
+ * (im = imMin); column 0 is the left (re = reMin), the last column is the
64
+ * right (re = reMax).
65
+ *
66
+ * @example
67
+ * ```typescript
68
+ * // The identity f(z) = z
69
+ * const portrait = new DomainColoring({
70
+ * func: (z) => z,
71
+ * reRange: [-2, 2],
72
+ * imRange: [-2, 2],
73
+ * resolution: 256,
74
+ * });
75
+ * ```
76
+ */
77
+ export declare class DomainColoring extends Mobject3D {
78
+ private _func;
79
+ private _reRange;
80
+ private _imRange;
81
+ private _width;
82
+ private _height;
83
+ private _scheme;
84
+ private _saturation;
85
+ private _contourLines;
86
+ private _centerPoint;
87
+ constructor(options: DomainColoringOptions);
88
+ /** The complex number z sampled at pixel column `col`, row `row`. */
89
+ pixelToComplex(col: number, row: number): Complex;
90
+ /** Sample the function over the grid into an RGBA buffer (row 0 at the top). */
91
+ getPixelData(): Uint8ClampedArray;
92
+ /** The pixel grid size as [width, height]. */
93
+ getResolution(): [number, number];
94
+ /** The hex color the portrait assigns to the complex number `z`. */
95
+ colorAt(z: Complex): string;
96
+ /** Build a texture from the pixel buffer, preferring a canvas when a DOM exists. */
97
+ private _buildTexture;
98
+ /** Build the textured quad spanning reRange x imRange. */
99
+ private _buildGeometry;
100
+ protected _createThreeObject(): THREE.Object3D;
101
+ protected _syncMaterialToThree(): void;
102
+ /** Rebuild the geometry and texture after the function or options change. */
103
+ private _update;
104
+ /** Get the complex function. */
105
+ getFunc(): ComplexFunction;
106
+ /** Set the complex function and rebuild. */
107
+ setFunc(func: ComplexFunction): this;
108
+ /** The brightness scheme in use. */
109
+ getScheme(): BrightnessScheme;
110
+ /** Set the brightness scheme and rebuild. */
111
+ setScheme(scheme: BrightnessScheme): this;
112
+ copy(): DomainColoring;
113
+ }
114
+ //# sourceMappingURL=DomainColoring.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DomainColoring.d.ts","sourceRoot":"","sources":["../../../src/mobjects/graphing/DomainColoring.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,0EAA0E;AAC1E,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC;AAEtD;;;;;;;GAOG;AACH,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEnD,qDAAqD;AACrD,MAAM,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AAO;IAWjD,gFAAgF;IAChF,YAAY,IAAI,iBAAiB;IAwBjC,8CAA8C;IAC9C,aAAa,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC;IAIjC,oEAAoE;IACpE,OAAO,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM;IAK3B,oFAAoF;IACpF,OAAO,CAAC,aAAa;IA8BrB,0DAA0D;IAC1D,OAAO,CAAC,cAAc;IA0BtB,SAAS,CAAC,kBAAkB,IAAI,KAAK,CAAC,QAAQ;cAU3B,oBAAoB,IAAI,IAAI;IAW/C,6EAA6E;IAC7E,OAAO,CAAC,OAAO;IAef,gCAAgC;IAChC,OAAO,IAAI,eAAe;IAI1B,4CAA4C;IAC5C,OAAO,CAAC,IAAI,EAAE,eAAe,GAAG,IAAI;IAMpC,oCAAoC;IACpC,SAAS,IAAI,gBAAgB;IAI7B,6CAA6C;IAC7C,SAAS,CAAC,MAAM,EAAE,gBAAgB,GAAG,IAAI;IAMhC,IAAI,IAAI,cAAc;CAehC"}
@@ -16,6 +16,7 @@ export { sampleColormap, valueToColor, VIRIDIS, INFERNO, COOLWARM } from './colo
16
16
  export { marchingSquares, type ContourSegment } from './marchingSquares';
17
17
  export { HeatMap, type HeatMapOptions, type ScalarField2D } from './HeatMap';
18
18
  export { ContourPlot, type ContourPlotOptions, type ContourField } from './ContourPlot';
19
+ export { DomainColoring, phasePortraitColor, type DomainColoringOptions, type ComplexFunction, type BrightnessScheme, } from './DomainColoring';
19
20
  export { ParametricFunction, type ParametricFunctionOptions } from './ParametricFunction';
20
21
  export { VectorFieldVector, type VectorFieldVectorOptions } from './Vector';
21
22
  export { fourierCoefficients, reconstructSample, partialSum, orderCoefficients, fourierSeriesApproximation, type FourierCoefficient, type FourierOrder, type FourierSeriesApproximationOptions, } from './fourier';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/mobjects/graphing/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EACL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