manim-web 0.3.6 → 0.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/animation/Animation.d.ts +16 -1
- package/dist/animation/Animation.d.ts.map +1 -1
- package/dist/animation/MasterTimeline.d.ts +77 -0
- package/dist/animation/MasterTimeline.d.ts.map +1 -0
- package/dist/animation/Timeline.d.ts +1 -1
- package/dist/animation/Timeline.d.ts.map +1 -1
- package/dist/animation/transform/ApplyTransforms.d.ts +91 -0
- package/dist/animation/transform/ApplyTransforms.d.ts.map +1 -0
- package/dist/animation/transform/FadeTransforms.d.ts +76 -0
- package/dist/animation/transform/FadeTransforms.d.ts.map +1 -0
- package/dist/animation/transform/MovementTransforms.d.ts +131 -0
- package/dist/animation/transform/MovementTransforms.d.ts.map +1 -0
- package/dist/animation/transform/SpecialTransforms.d.ts +158 -0
- package/dist/animation/transform/SpecialTransforms.d.ts.map +1 -0
- package/dist/animation/transform/TransformExtensions.d.ts +11 -430
- package/dist/animation/transform/TransformExtensions.d.ts.map +1 -1
- package/dist/animation/transform/index.d.ts +4 -1
- package/dist/animation/transform/index.d.ts.map +1 -1
- package/dist/core/Group.d.ts +4 -1
- package/dist/core/Group.d.ts.map +1 -1
- package/dist/core/InteractiveScene.d.ts.map +1 -1
- package/dist/core/LinearTransformationScene.d.ts +152 -0
- package/dist/core/LinearTransformationScene.d.ts.map +1 -0
- package/dist/core/Mobject.d.ts +26 -389
- package/dist/core/Mobject.d.ts.map +1 -1
- package/dist/core/MobjectPositioning.d.ts +32 -0
- package/dist/core/MobjectPositioning.d.ts.map +1 -0
- package/dist/core/MobjectState.d.ts +40 -0
- package/dist/core/MobjectState.d.ts.map +1 -0
- package/dist/core/MobjectTypes.d.ts +51 -0
- package/dist/core/MobjectTypes.d.ts.map +1 -0
- package/dist/core/MovingCameraScene.d.ts +77 -0
- package/dist/core/MovingCameraScene.d.ts.map +1 -0
- package/dist/core/Renderer.d.ts +5 -0
- package/dist/core/Renderer.d.ts.map +1 -1
- package/dist/core/Scene.d.ts +25 -0
- package/dist/core/Scene.d.ts.map +1 -1
- package/dist/core/SceneExtensions.d.ts +7 -654
- package/dist/core/SceneExtensions.d.ts.map +1 -1
- package/dist/core/StateManager.d.ts.map +1 -1
- package/dist/core/ThreeDScene.d.ts +199 -0
- package/dist/core/ThreeDScene.d.ts.map +1 -0
- package/dist/core/VMobject.d.ts +48 -200
- package/dist/core/VMobject.d.ts.map +1 -1
- package/dist/core/VMobjectCurves.d.ts +25 -0
- package/dist/core/VMobjectCurves.d.ts.map +1 -0
- package/dist/core/VMobjectGeometry.d.ts +84 -0
- package/dist/core/VMobjectGeometry.d.ts.map +1 -0
- package/dist/core/VMobjectRendering.d.ts +138 -0
- package/dist/core/VMobjectRendering.d.ts.map +1 -0
- package/dist/core/VectorScene.d.ts +106 -0
- package/dist/core/VectorScene.d.ts.map +1 -0
- package/dist/core/ZoomedScene.d.ts +151 -0
- package/dist/core/ZoomedScene.d.ts.map +1 -0
- package/dist/core/index.d.ts +6 -2
- package/dist/core/index.d.ts.map +1 -1
- package/dist/export/GifExporter.d.ts +4 -3
- package/dist/export/GifExporter.d.ts.map +1 -1
- package/dist/export/VideoExporter.d.ts.map +1 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13439 -12758
- package/dist/integrations/react.js +322 -318
- package/dist/integrations/vue.js +316 -312
- package/dist/interaction/Clickable.d.ts.map +1 -1
- package/dist/interaction/Draggable.d.ts.map +1 -1
- package/dist/interaction/Hoverable.d.ts.map +1 -1
- package/dist/interaction/SelectionManager.d.ts.map +1 -1
- package/dist/mobjects/geometry/AnnularSector.d.ts +107 -0
- package/dist/mobjects/geometry/AnnularSector.d.ts.map +1 -0
- package/dist/mobjects/geometry/Annulus.d.ts +89 -0
- package/dist/mobjects/geometry/Annulus.d.ts.map +1 -0
- package/dist/mobjects/geometry/ArcPolygon.d.ts +74 -0
- package/dist/mobjects/geometry/ArcPolygon.d.ts.map +1 -0
- package/dist/mobjects/geometry/ArcShapes.d.ts +11 -657
- package/dist/mobjects/geometry/ArcShapes.d.ts.map +1 -1
- package/dist/mobjects/geometry/BooleanOperations.d.ts.map +1 -1
- package/dist/mobjects/geometry/CurvedArrow.d.ts +95 -0
- package/dist/mobjects/geometry/CurvedArrow.d.ts.map +1 -0
- package/dist/mobjects/geometry/CurvedDoubleArrow.d.ts +60 -0
- package/dist/mobjects/geometry/CurvedDoubleArrow.d.ts.map +1 -0
- package/dist/mobjects/geometry/Ellipse.d.ts +98 -0
- package/dist/mobjects/geometry/Ellipse.d.ts.map +1 -0
- package/dist/mobjects/geometry/Rectangle.d.ts +3 -3
- package/dist/mobjects/geometry/Rectangle.d.ts.map +1 -1
- package/dist/mobjects/geometry/Sector.d.ts +99 -0
- package/dist/mobjects/geometry/Sector.d.ts.map +1 -0
- package/dist/mobjects/geometry/ShapeMatchers.d.ts +5 -1
- package/dist/mobjects/geometry/ShapeMatchers.d.ts.map +1 -1
- package/dist/mobjects/geometry/TangentialArc.d.ts +58 -0
- package/dist/mobjects/geometry/TangentialArc.d.ts.map +1 -0
- package/dist/mobjects/geometry/index.d.ts +10 -3
- package/dist/mobjects/geometry/index.d.ts.map +1 -1
- package/dist/mobjects/graph/DiGraph.d.ts +26 -0
- package/dist/mobjects/graph/DiGraph.d.ts.map +1 -0
- package/dist/mobjects/graph/GenericGraph.d.ts +184 -0
- package/dist/mobjects/graph/GenericGraph.d.ts.map +1 -0
- package/dist/mobjects/graph/Graph.d.ts +10 -0
- package/dist/mobjects/graph/Graph.d.ts.map +1 -0
- package/dist/mobjects/graph/graphFactories.d.ts +49 -0
- package/dist/mobjects/graph/graphFactories.d.ts.map +1 -0
- package/dist/mobjects/graph/graphTypes.d.ts +110 -0
- package/dist/mobjects/graph/graphTypes.d.ts.map +1 -0
- package/dist/mobjects/graph/index.d.ts +6 -417
- package/dist/mobjects/graph/index.d.ts.map +1 -1
- package/dist/mobjects/graph/layoutAlgorithms.d.ts +11 -0
- package/dist/mobjects/graph/layoutAlgorithms.d.ts.map +1 -0
- package/dist/mobjects/graphing/FunctionGraph.d.ts.map +1 -1
- package/dist/mobjects/graphing/ParametricFunction.d.ts +1 -1
- package/dist/mobjects/graphing/ParametricFunction.d.ts.map +1 -1
- package/dist/mobjects/image/index.d.ts +2 -1
- package/dist/mobjects/image/index.d.ts.map +1 -1
- package/dist/mobjects/point/Mobject1D.d.ts +129 -0
- package/dist/mobjects/point/Mobject1D.d.ts.map +1 -0
- package/dist/mobjects/point/Mobject2D.d.ts +170 -0
- package/dist/mobjects/point/Mobject2D.d.ts.map +1 -0
- package/dist/mobjects/point/PGroup.d.ts +111 -0
- package/dist/mobjects/point/PGroup.d.ts.map +1 -0
- package/dist/mobjects/point/PMobject.d.ts +152 -0
- package/dist/mobjects/point/PMobject.d.ts.map +1 -0
- package/dist/mobjects/point/PointCloudDot.d.ts +98 -0
- package/dist/mobjects/point/PointCloudDot.d.ts.map +1 -0
- package/dist/mobjects/point/PointMobject.d.ts +62 -0
- package/dist/mobjects/point/PointMobject.d.ts.map +1 -0
- package/dist/mobjects/point/index.d.ts +7 -701
- package/dist/mobjects/point/index.d.ts.map +1 -1
- package/dist/mobjects/svg/Brace.d.ts.map +1 -1
- package/dist/mobjects/text/Code.d.ts +2 -39
- package/dist/mobjects/text/Code.d.ts.map +1 -1
- package/dist/mobjects/text/CodeHighlighting.d.ts +50 -0
- package/dist/mobjects/text/CodeHighlighting.d.ts.map +1 -0
- package/dist/mobjects/text/CodeLanguageData.d.ts +25 -0
- package/dist/mobjects/text/CodeLanguageData.d.ts.map +1 -0
- package/dist/mobjects/text/MathTex.d.ts +1 -0
- package/dist/mobjects/text/MathTex.d.ts.map +1 -1
- package/dist/mobjects/text/MathTexSVG.d.ts +2 -0
- package/dist/mobjects/text/MathTexSVG.d.ts.map +1 -1
- package/dist/mobjects/text/Variable.d.ts.map +1 -1
- package/dist/mobjects/text/katex-styles.d.ts.map +1 -1
- package/dist/player/Player.d.ts +85 -0
- package/dist/player/Player.d.ts.map +1 -0
- package/dist/player/PlayerController.d.ts +22 -0
- package/dist/player/PlayerController.d.ts.map +1 -0
- package/dist/player/PlayerUI.d.ts +70 -0
- package/dist/player/PlayerUI.d.ts.map +1 -0
- package/dist/player/index.d.ts +4 -0
- package/dist/player/index.d.ts.map +1 -0
- package/dist/utils/hungarian.d.ts.map +1 -1
- package/dist/utils/skeletonize.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { VMobject } from '../../core/VMobject';
|
|
2
|
+
import { Vector3Tuple } from '../../core/Mobject';
|
|
3
|
+
/**
|
|
4
|
+
* Options for creating a CurvedArrow
|
|
5
|
+
*/
|
|
6
|
+
export interface CurvedArrowOptions {
|
|
7
|
+
/** Start point of the arrow. Default: [-1, 0, 0] */
|
|
8
|
+
startPoint?: Vector3Tuple;
|
|
9
|
+
/** End point of the arrow. Default: [1, 0, 0] */
|
|
10
|
+
endPoint?: Vector3Tuple;
|
|
11
|
+
/** Arc angle in radians. Default: PI/4 */
|
|
12
|
+
angle?: number;
|
|
13
|
+
/** Stroke color as CSS color string. Default: Manim's blue (#58C4DD) */
|
|
14
|
+
color?: string;
|
|
15
|
+
/** Stroke width in pixels. Default: 4 (Manim's default) */
|
|
16
|
+
strokeWidth?: number;
|
|
17
|
+
/** Length of the arrowhead tip. Default: 0.25 */
|
|
18
|
+
tipLength?: number;
|
|
19
|
+
/** Width of the arrowhead base. Default: 0.15 */
|
|
20
|
+
tipWidth?: number;
|
|
21
|
+
/** Number of Bezier segments for approximation. Default: 8 */
|
|
22
|
+
numComponents?: number;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* CurvedArrow - An arrow that follows an arc path
|
|
26
|
+
*
|
|
27
|
+
* Creates an arrow that curves from start to end point.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```typescript
|
|
31
|
+
* // Create a curved arrow
|
|
32
|
+
* const curvedArrow = new CurvedArrow({
|
|
33
|
+
* startPoint: [-2, 0, 0],
|
|
34
|
+
* endPoint: [2, 0, 0],
|
|
35
|
+
* angle: Math.PI / 3
|
|
36
|
+
* });
|
|
37
|
+
*
|
|
38
|
+
* // Create an arrow curving the other way
|
|
39
|
+
* const otherWay = new CurvedArrow({
|
|
40
|
+
* startPoint: [0, -1, 0],
|
|
41
|
+
* endPoint: [0, 1, 0],
|
|
42
|
+
* angle: -Math.PI / 4
|
|
43
|
+
* });
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
export declare class CurvedArrow extends VMobject {
|
|
47
|
+
private _startPoint;
|
|
48
|
+
private _endPoint;
|
|
49
|
+
private _angle;
|
|
50
|
+
private _tipLength;
|
|
51
|
+
private _tipWidth;
|
|
52
|
+
private _numComponents;
|
|
53
|
+
constructor(options?: CurvedArrowOptions);
|
|
54
|
+
/**
|
|
55
|
+
* Generate the curved arrow points.
|
|
56
|
+
*/
|
|
57
|
+
private _generatePoints;
|
|
58
|
+
/**
|
|
59
|
+
* Get the start point
|
|
60
|
+
*/
|
|
61
|
+
getStartPoint(): Vector3Tuple;
|
|
62
|
+
/**
|
|
63
|
+
* Set the start point
|
|
64
|
+
*/
|
|
65
|
+
setStartPoint(point: Vector3Tuple): this;
|
|
66
|
+
/**
|
|
67
|
+
* Get the end point
|
|
68
|
+
*/
|
|
69
|
+
getEndPoint(): Vector3Tuple;
|
|
70
|
+
/**
|
|
71
|
+
* Set the end point
|
|
72
|
+
*/
|
|
73
|
+
setEndPoint(point: Vector3Tuple): this;
|
|
74
|
+
/**
|
|
75
|
+
* Get the arc angle
|
|
76
|
+
*/
|
|
77
|
+
getAngle(): number;
|
|
78
|
+
/**
|
|
79
|
+
* Set the arc angle
|
|
80
|
+
*/
|
|
81
|
+
setAngle(value: number): this;
|
|
82
|
+
/**
|
|
83
|
+
* Get the tip length
|
|
84
|
+
*/
|
|
85
|
+
getTipLength(): number;
|
|
86
|
+
/**
|
|
87
|
+
* Get the tip width
|
|
88
|
+
*/
|
|
89
|
+
getTipWidth(): number;
|
|
90
|
+
/**
|
|
91
|
+
* Create a copy of this CurvedArrow
|
|
92
|
+
*/
|
|
93
|
+
protected _createCopy(): CurvedArrow;
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=CurvedArrow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CurvedArrow.d.ts","sourceRoot":"","sources":["../../../src/mobjects/geometry/CurvedArrow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGlD;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,oDAAoD;IACpD,UAAU,CAAC,EAAE,YAAY,CAAC;IAC1B,iDAAiD;IACjD,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,0CAA0C;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wEAAwE;IACxE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2DAA2D;IAC3D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iDAAiD;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iDAAiD;IACjD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8DAA8D;IAC9D,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,WAAY,SAAQ,QAAQ;IACvC,OAAO,CAAC,WAAW,CAAe;IAClC,OAAO,CAAC,SAAS,CAAe;IAChC,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,cAAc,CAAS;gBAEnB,OAAO,GAAE,kBAAuB;IA4B5C;;OAEG;IACH,OAAO,CAAC,eAAe;IAuHvB;;OAEG;IACH,aAAa,IAAI,YAAY;IAI7B;;OAEG;IACH,aAAa,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI;IAMxC;;OAEG;IACH,WAAW,IAAI,YAAY;IAI3B;;OAEG;IACH,WAAW,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI;IAMtC;;OAEG;IACH,QAAQ,IAAI,MAAM;IAIlB;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAM7B;;OAEG;IACH,YAAY,IAAI,MAAM;IAItB;;OAEG;IACH,WAAW,IAAI,MAAM;IAIrB;;OAEG;cACgB,WAAW,IAAI,WAAW;CAY9C"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { VMobject } from '../../core/VMobject';
|
|
2
|
+
import { Vector3Tuple } from '../../core/Mobject';
|
|
3
|
+
import { CurvedArrowOptions } from './CurvedArrow';
|
|
4
|
+
/**
|
|
5
|
+
* CurvedDoubleArrow - A double arrow that follows an arc path
|
|
6
|
+
*
|
|
7
|
+
* Creates a double-headed arrow that curves from start to end point.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* // Create a curved double arrow
|
|
12
|
+
* const curvedDouble = new CurvedDoubleArrow({
|
|
13
|
+
* startPoint: [-2, 0, 0],
|
|
14
|
+
* endPoint: [2, 0, 0],
|
|
15
|
+
* angle: Math.PI / 3
|
|
16
|
+
* });
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export declare class CurvedDoubleArrow extends VMobject {
|
|
20
|
+
private _startPoint;
|
|
21
|
+
private _endPoint;
|
|
22
|
+
private _angle;
|
|
23
|
+
private _tipLength;
|
|
24
|
+
private _tipWidth;
|
|
25
|
+
private _numComponents;
|
|
26
|
+
constructor(options?: CurvedArrowOptions);
|
|
27
|
+
/**
|
|
28
|
+
* Generate the curved double arrow points.
|
|
29
|
+
*/
|
|
30
|
+
private _generatePoints;
|
|
31
|
+
/**
|
|
32
|
+
* Get the start point
|
|
33
|
+
*/
|
|
34
|
+
getStartPoint(): Vector3Tuple;
|
|
35
|
+
/**
|
|
36
|
+
* Set the start point
|
|
37
|
+
*/
|
|
38
|
+
setStartPoint(point: Vector3Tuple): this;
|
|
39
|
+
/**
|
|
40
|
+
* Get the end point
|
|
41
|
+
*/
|
|
42
|
+
getEndPoint(): Vector3Tuple;
|
|
43
|
+
/**
|
|
44
|
+
* Set the end point
|
|
45
|
+
*/
|
|
46
|
+
setEndPoint(point: Vector3Tuple): this;
|
|
47
|
+
/**
|
|
48
|
+
* Get the arc angle
|
|
49
|
+
*/
|
|
50
|
+
getAngle(): number;
|
|
51
|
+
/**
|
|
52
|
+
* Set the arc angle
|
|
53
|
+
*/
|
|
54
|
+
setAngle(value: number): this;
|
|
55
|
+
/**
|
|
56
|
+
* Create a copy of this CurvedDoubleArrow
|
|
57
|
+
*/
|
|
58
|
+
protected _createCopy(): CurvedDoubleArrow;
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=CurvedDoubleArrow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CurvedDoubleArrow.d.ts","sourceRoot":"","sources":["../../../src/mobjects/geometry/CurvedDoubleArrow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEnD;;;;;;;;;;;;;;GAcG;AACH,qBAAa,iBAAkB,SAAQ,QAAQ;IAC7C,OAAO,CAAC,WAAW,CAAe;IAClC,OAAO,CAAC,SAAS,CAAe;IAChC,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,cAAc,CAAS;gBAEnB,OAAO,GAAE,kBAAuB;IA4B5C;;OAEG;IACH,OAAO,CAAC,eAAe;IA+KvB;;OAEG;IACH,aAAa,IAAI,YAAY;IAI7B;;OAEG;IACH,aAAa,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI;IAMxC;;OAEG;IACH,WAAW,IAAI,YAAY;IAI3B;;OAEG;IACH,WAAW,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI;IAMtC;;OAEG;IACH,QAAQ,IAAI,MAAM;IAIlB;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAM7B;;OAEG;cACgB,WAAW,IAAI,iBAAiB;CAYpD"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { VMobject } from '../../core/VMobject';
|
|
2
|
+
import { Vector3Tuple } from '../../core/Mobject';
|
|
3
|
+
/**
|
|
4
|
+
* Options for creating an Ellipse
|
|
5
|
+
*/
|
|
6
|
+
export interface EllipseOptions {
|
|
7
|
+
/** Width (horizontal diameter) of the ellipse. Default: 2 */
|
|
8
|
+
width?: number;
|
|
9
|
+
/** Height (vertical diameter) of the ellipse. Default: 1 */
|
|
10
|
+
height?: number;
|
|
11
|
+
/** Stroke color as CSS color string. Default: Manim's blue (#58C4DD) */
|
|
12
|
+
color?: string;
|
|
13
|
+
/** Fill opacity from 0 to 1. Default: 0 */
|
|
14
|
+
fillOpacity?: number;
|
|
15
|
+
/** Stroke width in pixels. Default: 4 (Manim's default) */
|
|
16
|
+
strokeWidth?: number;
|
|
17
|
+
/** Center position. Default: [0, 0, 0] */
|
|
18
|
+
center?: Vector3Tuple;
|
|
19
|
+
/** Number of Bezier segments for approximation. Default: 8 */
|
|
20
|
+
numComponents?: number;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Ellipse - An elliptical VMobject
|
|
24
|
+
*
|
|
25
|
+
* Creates an ellipse using cubic Bezier curve approximation.
|
|
26
|
+
* The ellipse is defined by its width and height.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```typescript
|
|
30
|
+
* // Create a horizontal ellipse
|
|
31
|
+
* const ellipse = new Ellipse({ width: 4, height: 2 });
|
|
32
|
+
*
|
|
33
|
+
* // Create a filled ellipse
|
|
34
|
+
* const filled = new Ellipse({ width: 3, height: 1, fillOpacity: 0.5 });
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
export declare class Ellipse extends VMobject {
|
|
38
|
+
private _width;
|
|
39
|
+
private _height;
|
|
40
|
+
private _centerPoint;
|
|
41
|
+
private _numComponents;
|
|
42
|
+
constructor(options?: EllipseOptions);
|
|
43
|
+
/**
|
|
44
|
+
* Generate the ellipse points using Bezier curve approximation.
|
|
45
|
+
* Uses 4 cubic Bezier segments for optimal ellipse approximation.
|
|
46
|
+
*/
|
|
47
|
+
private _generatePoints;
|
|
48
|
+
/**
|
|
49
|
+
* Get the width of the ellipse
|
|
50
|
+
*/
|
|
51
|
+
getWidth(): number;
|
|
52
|
+
/**
|
|
53
|
+
* Set the width of the ellipse
|
|
54
|
+
*/
|
|
55
|
+
setWidth(value: number): this;
|
|
56
|
+
/**
|
|
57
|
+
* Get the height of the ellipse
|
|
58
|
+
*/
|
|
59
|
+
getHeight(): number;
|
|
60
|
+
/**
|
|
61
|
+
* Set the height of the ellipse
|
|
62
|
+
*/
|
|
63
|
+
setHeight(value: number): this;
|
|
64
|
+
/**
|
|
65
|
+
* Get the center of the ellipse
|
|
66
|
+
*/
|
|
67
|
+
getEllipseCenter(): Vector3Tuple;
|
|
68
|
+
/**
|
|
69
|
+
* Set the center of the ellipse
|
|
70
|
+
*/
|
|
71
|
+
setEllipseCenter(value: Vector3Tuple): this;
|
|
72
|
+
/**
|
|
73
|
+
* Get the semi-major axis length (half of width)
|
|
74
|
+
*/
|
|
75
|
+
getSemiMajorAxis(): number;
|
|
76
|
+
/**
|
|
77
|
+
* Get the semi-minor axis length (half of height)
|
|
78
|
+
*/
|
|
79
|
+
getSemiMinorAxis(): number;
|
|
80
|
+
/**
|
|
81
|
+
* Get the eccentricity of the ellipse
|
|
82
|
+
*/
|
|
83
|
+
getEccentricity(): number;
|
|
84
|
+
/**
|
|
85
|
+
* Get the area of the ellipse
|
|
86
|
+
*/
|
|
87
|
+
getArea(): number;
|
|
88
|
+
/**
|
|
89
|
+
* Get a point on the ellipse at a given angle (in radians)
|
|
90
|
+
* @param angle Angle in radians from the positive x-axis
|
|
91
|
+
*/
|
|
92
|
+
pointAtAngle(angle: number): Vector3Tuple;
|
|
93
|
+
/**
|
|
94
|
+
* Create a copy of this Ellipse
|
|
95
|
+
*/
|
|
96
|
+
protected _createCopy(): Ellipse;
|
|
97
|
+
}
|
|
98
|
+
//# sourceMappingURL=Ellipse.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Ellipse.d.ts","sourceRoot":"","sources":["../../../src/mobjects/geometry/Ellipse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGlD;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,6DAA6D;IAC7D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4DAA4D;IAC5D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,wEAAwE;IACxE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2CAA2C;IAC3C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2DAA2D;IAC3D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0CAA0C;IAC1C,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,8DAA8D;IAC9D,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;;;;;;GAcG;AACH,qBAAa,OAAQ,SAAQ,QAAQ;IACnC,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,YAAY,CAAe;IACnC,OAAO,CAAC,cAAc,CAAS;gBAEnB,OAAO,GAAE,cAAmB;IAyBxC;;;OAGG;IACH,OAAO,CAAC,eAAe;IA0CvB;;OAEG;IACH,QAAQ,IAAI,MAAM;IAIlB;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAM7B;;OAEG;IACH,SAAS,IAAI,MAAM;IAInB;;OAEG;IACH,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAM9B;;OAEG;IACH,gBAAgB,IAAI,YAAY;IAIhC;;OAEG;IACH,gBAAgB,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI;IAM3C;;OAEG;IACH,gBAAgB,IAAI,MAAM;IAI1B;;OAEG;IACH,gBAAgB,IAAI,MAAM;IAI1B;;OAEG;IACH,eAAe,IAAI,MAAM;IAUzB;;OAEG;IACH,OAAO,IAAI,MAAM;IAIjB;;;OAGG;IACH,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,YAAY;IAQzC;;OAEG;cACgB,WAAW,IAAI,OAAO;CAW1C"}
|
|
@@ -35,9 +35,9 @@ export interface RectangleOptions {
|
|
|
35
35
|
* ```
|
|
36
36
|
*/
|
|
37
37
|
export declare class Rectangle extends VMobject {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
protected _width: number;
|
|
39
|
+
protected _height: number;
|
|
40
|
+
protected _centerPoint: Vector3Tuple;
|
|
41
41
|
constructor(options?: RectangleOptions);
|
|
42
42
|
/**
|
|
43
43
|
* Generate the rectangle points as 4 line segments
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Rectangle.d.ts","sourceRoot":"","sources":["../../../src/mobjects/geometry/Rectangle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGlD;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,yCAAyC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf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IAAI;IAM7B;;OAEG;IACH,SAAS,IAAI,MAAM;IAInB;;OAEG;IACH,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAM9B;;OAEG;IACH,aAAa,IAAI,YAAY;IAI7B;;OAEG;IACH,aAAa,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI;IAMxC;;OAEG;IACH,OAAO,IAAI,MAAM;IAIjB;;OAEG;IACH,YAAY,IAAI,MAAM;IAItB;;OAEG;IACH,SAAS,CAAC,MAAM,EAAE,SAAS,GAAG,UAAU,GAAG,aAAa,GAAG,YAAY,GAAG,YAAY;IAiBtF;;OAEG;IACH,MAAM,IAAI,YAAY;IAItB;;OAEG;IACH,SAAS,IAAI,YAAY;IAIzB;;OAEG;IACH,OAAO,IAAI,YAAY;IAIvB;;OAEG;IACH,QAAQ,IAAI,YAAY;IAIxB;;OAEG;cACgB,WAAW,IAAI,SAAS;CAU5C;AAED;;GAEG;AACH,qBAAa,MAAO,SAAQ,SAAS;gBACvB,OAAO,GAAE,IAAI,CAAC,gBAAgB,EAAE,OAAO,GAAG,QAAQ,CAAC,GAAG;QAAE,UAAU,CAAC,EAAE,MAAM,CAAA;KAAO;IAK9F;;OAEG;IACH,aAAa,IAAI,MAAM;IAIvB;;OAEG;IACH,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAMlC;;OAEG;cACgB,WAAW,IAAI,MAAM;CASzC"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { VMobject } from '../../core/VMobject';
|
|
2
|
+
import { Vector3Tuple } from '../../core/Mobject';
|
|
3
|
+
/**
|
|
4
|
+
* Options for creating a Sector
|
|
5
|
+
*/
|
|
6
|
+
export interface SectorOptions {
|
|
7
|
+
/** Radius of the sector. Default: 1 */
|
|
8
|
+
radius?: number;
|
|
9
|
+
/** Start angle in radians. Default: 0 */
|
|
10
|
+
startAngle?: number;
|
|
11
|
+
/** Arc angle (span) in radians. Default: PI/2 */
|
|
12
|
+
angle?: number;
|
|
13
|
+
/** Stroke color as CSS color string. Default: Manim's blue (#58C4DD) */
|
|
14
|
+
color?: string;
|
|
15
|
+
/** Fill opacity from 0 to 1. Default: 0.5 */
|
|
16
|
+
fillOpacity?: number;
|
|
17
|
+
/** Stroke width in pixels. Default: 4 (Manim's default) */
|
|
18
|
+
strokeWidth?: number;
|
|
19
|
+
/** Center position. Default: [0, 0, 0] */
|
|
20
|
+
center?: Vector3Tuple;
|
|
21
|
+
/** Number of Bezier segments for approximation. Default: 8 */
|
|
22
|
+
numComponents?: number;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Sector - A pie slice of a circle
|
|
26
|
+
*
|
|
27
|
+
* Creates a sector (pie slice) from the center to the arc.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```typescript
|
|
31
|
+
* // Create a quarter pie slice
|
|
32
|
+
* const quarter = new Sector({
|
|
33
|
+
* radius: 1,
|
|
34
|
+
* startAngle: 0,
|
|
35
|
+
* angle: Math.PI / 2
|
|
36
|
+
* });
|
|
37
|
+
*
|
|
38
|
+
* // Create a filled semicircle sector
|
|
39
|
+
* const semi = new Sector({
|
|
40
|
+
* radius: 2,
|
|
41
|
+
* angle: Math.PI,
|
|
42
|
+
* fillOpacity: 0.8,
|
|
43
|
+
* color: '#ff0000'
|
|
44
|
+
* });
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
export declare class Sector extends VMobject {
|
|
48
|
+
private _radius;
|
|
49
|
+
private _startAngle;
|
|
50
|
+
private _angle;
|
|
51
|
+
private _centerPoint;
|
|
52
|
+
private _numComponents;
|
|
53
|
+
constructor(options?: SectorOptions);
|
|
54
|
+
/**
|
|
55
|
+
* Generate the sector points.
|
|
56
|
+
*/
|
|
57
|
+
private _generatePoints;
|
|
58
|
+
/**
|
|
59
|
+
* Get the radius
|
|
60
|
+
*/
|
|
61
|
+
getRadius(): number;
|
|
62
|
+
/**
|
|
63
|
+
* Set the radius
|
|
64
|
+
*/
|
|
65
|
+
setRadius(value: number): this;
|
|
66
|
+
/**
|
|
67
|
+
* Get the start angle
|
|
68
|
+
*/
|
|
69
|
+
getStartAngle(): number;
|
|
70
|
+
/**
|
|
71
|
+
* Set the start angle
|
|
72
|
+
*/
|
|
73
|
+
setStartAngle(value: number): this;
|
|
74
|
+
/**
|
|
75
|
+
* Get the arc angle
|
|
76
|
+
*/
|
|
77
|
+
getAngle(): number;
|
|
78
|
+
/**
|
|
79
|
+
* Set the arc angle
|
|
80
|
+
*/
|
|
81
|
+
setAngle(value: number): this;
|
|
82
|
+
/**
|
|
83
|
+
* Get the center
|
|
84
|
+
*/
|
|
85
|
+
getSectorCenter(): Vector3Tuple;
|
|
86
|
+
/**
|
|
87
|
+
* Get the area of the sector
|
|
88
|
+
*/
|
|
89
|
+
getArea(): number;
|
|
90
|
+
/**
|
|
91
|
+
* Get the arc length of the sector
|
|
92
|
+
*/
|
|
93
|
+
getArcLength(): number;
|
|
94
|
+
/**
|
|
95
|
+
* Create a copy of this Sector
|
|
96
|
+
*/
|
|
97
|
+
protected _createCopy(): Sector;
|
|
98
|
+
}
|
|
99
|
+
//# sourceMappingURL=Sector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Sector.d.ts","sourceRoot":"","sources":["../../../src/mobjects/geometry/Sector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGlD;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,uCAAuC;IACvC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,yCAAyC;IACzC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iDAAiD;IACjD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wEAAwE;IACxE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6CAA6C;IAC7C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2DAA2D;IAC3D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0CAA0C;IAC1C,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,8DAA8D;IAC9D,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qBAAa,MAAO,SAAQ,QAAQ;IAClC,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,YAAY,CAAe;IACnC,OAAO,CAAC,cAAc,CAAS;gBAEnB,OAAO,GAAE,aAAkB;IA2BvC;;OAEG;IACH,OAAO,CAAC,eAAe;IAmEvB;;OAEG;IACH,SAAS,IAAI,MAAM;IAInB;;OAEG;IACH,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAM9B;;OAEG;IACH,aAAa,IAAI,MAAM;IAIvB;;OAEG;IACH,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAMlC;;OAEG;IACH,QAAQ,IAAI,MAAM;IAIlB;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAM7B;;OAEG;IACH,eAAe,IAAI,YAAY;IAI/B;;OAEG;IACH,OAAO,IAAI,MAAM;IAIjB;;OAEG;IACH,YAAY,IAAI,MAAM;IAItB;;OAEG;cACgB,WAAW,IAAI,MAAM;CAYzC"}
|
|
@@ -33,7 +33,11 @@ export declare class BackgroundRectangle extends Rectangle {
|
|
|
33
33
|
private _buff;
|
|
34
34
|
constructor(mobject: Mobject, options?: BackgroundRectangleOptions);
|
|
35
35
|
/**
|
|
36
|
-
* Add an updater that tracks the target mobject's position and size
|
|
36
|
+
* Add an updater that tracks the target mobject's position and size.
|
|
37
|
+
* Uses transform-based tracking (scaleVector + position) instead of
|
|
38
|
+
* geometry rebuilds (setWidth/setHeight/setRectCenter) to avoid
|
|
39
|
+
* expensive per-frame _generatePoints → _updateGeometry calls that
|
|
40
|
+
* crash the browser during ZoomedScene dual-pass rendering.
|
|
37
41
|
*/
|
|
38
42
|
private _addTrackingUpdater;
|
|
39
43
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShapeMatchers.d.ts","sourceRoot":"","sources":["../../../src/mobjects/geometry/ShapeMatchers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAgB,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAG9B;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,+CAA+C;IAC/C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,sDAAsD;IACtD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kCAAkC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2CAA2C;IAC3C,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;;;;;;GAYG;AACH,qBAAa,mBAAoB,SAAQ,SAAS;IAChD,OAAO,CAAC,cAAc,CAAU;IAChC,OAAO,CAAC,KAAK,CAAS;gBAEV,OAAO,EAAE,OAAO,EAAE,OAAO,GAAE,0BAA+B;
|
|
1
|
+
{"version":3,"file":"ShapeMatchers.d.ts","sourceRoot":"","sources":["../../../src/mobjects/geometry/ShapeMatchers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAgB,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAG9B;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,+CAA+C;IAC/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AC,EAAE,MAAM,CAAC;IACrB,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kDAAkD;IAClD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;GAYG;AACH,qBAAa,KAAM,SAAQ,QAAQ;IACjC,OAAO,CAAC,cAAc,CAAU;IAChC,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,MAAM,CAAO;IACrB,OAAO,CAAC,MAAM,CAAO;gBAET,OAAO,EAAE,OAAO,EAAE,OAAO,GAAE,YAAiB;IAmCxD;;OAEG;IACH,OAAO,CAAC,mBAAmB;IA+B3B;;OAEG;IACH,gBAAgB,IAAI,OAAO;IAI3B;;OAEG;IACH,QAAQ,IAAI,MAAM;IAIlB;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAM7B;;OAEG;IACM,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAOtC;;OAEG;IACM,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAO5C;;OAEG;cACgB,WAAW,IAAI,KAAK;CAOxC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { Vector3Tuple } from '../../core/Mobject';
|
|
2
|
+
import { Arc } from './Arc';
|
|
3
|
+
/**
|
|
4
|
+
* Options for creating a TangentialArc
|
|
5
|
+
*/
|
|
6
|
+
export interface TangentialArcOptions {
|
|
7
|
+
/** Start point of the arc. Default: [0, 0, 0] */
|
|
8
|
+
start?: Vector3Tuple;
|
|
9
|
+
/** Direction at the start point (tangent direction). Default: [1, 0, 0] */
|
|
10
|
+
direction?: Vector3Tuple;
|
|
11
|
+
/** Radius of the arc. Default: 1 */
|
|
12
|
+
radius?: number;
|
|
13
|
+
/** Arc angle in radians. Default: PI/2 */
|
|
14
|
+
angle?: number;
|
|
15
|
+
/** Stroke color as CSS color string. Default: Manim's blue (#58C4DD) */
|
|
16
|
+
color?: string;
|
|
17
|
+
/** Stroke width in pixels. Default: 4 (Manim's default) */
|
|
18
|
+
strokeWidth?: number;
|
|
19
|
+
/** Number of Bezier segments for approximation. Default: 8 */
|
|
20
|
+
numComponents?: number;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* TangentialArc - An arc that is tangent to a given direction at its start
|
|
24
|
+
*
|
|
25
|
+
* Creates an arc that starts tangent to a given direction.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```typescript
|
|
29
|
+
* // Create an arc tangent to the x-axis
|
|
30
|
+
* const tangentArc = new TangentialArc({
|
|
31
|
+
* start: [0, 0, 0],
|
|
32
|
+
* direction: [1, 0, 0],
|
|
33
|
+
* radius: 1,
|
|
34
|
+
* angle: Math.PI / 2
|
|
35
|
+
* });
|
|
36
|
+
*
|
|
37
|
+
* // Create an arc tangent to a diagonal
|
|
38
|
+
* const diagonalArc = new TangentialArc({
|
|
39
|
+
* start: [0, 0, 0],
|
|
40
|
+
* direction: [1, 1, 0],
|
|
41
|
+
* radius: 2,
|
|
42
|
+
* angle: Math.PI / 3
|
|
43
|
+
* });
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
export declare class TangentialArc extends Arc {
|
|
47
|
+
private _direction;
|
|
48
|
+
constructor(options?: TangentialArcOptions);
|
|
49
|
+
/**
|
|
50
|
+
* Get the tangent direction at the start
|
|
51
|
+
*/
|
|
52
|
+
getDirection(): Vector3Tuple;
|
|
53
|
+
/**
|
|
54
|
+
* Create a copy of this TangentialArc
|
|
55
|
+
*/
|
|
56
|
+
protected _createCopy(): TangentialArc;
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=TangentialArc.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TangentialArc.d.ts","sourceRoot":"","sources":["../../../src/mobjects/geometry/TangentialArc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5B;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,iDAAiD;IACjD,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,2EAA2E;IAC3E,SAAS,CAAC,EAAE,YAAY,CAAC;IACzB,oCAAoC;IACpC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,0CAA0C;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wEAAwE;IACxE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2DAA2D;IAC3D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8DAA8D;IAC9D,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,qBAAa,aAAc,SAAQ,GAAG;IACpC,OAAO,CAAC,UAAU,CAAe;gBAErB,OAAO,GAAE,oBAAyB;IAgD9C;;OAEG;IACH,YAAY,IAAI,YAAY;IAI5B;;OAEG;cACgB,WAAW,IAAI,aAAa;CAWhD"}
|
|
@@ -8,13 +8,20 @@ export { Circle, type CircleOptions } from './Circle';
|
|
|
8
8
|
export { Line, type LineOptions } from './Line';
|
|
9
9
|
export { Rectangle, Square, type RectangleOptions } from './Rectangle';
|
|
10
10
|
export { Polygon, Triangle, RegularPolygon, Hexagon, Pentagon, type PolygonOptions, } from './Polygon';
|
|
11
|
-
export { Arrow, DoubleArrow, Vector, type ArrowOptions
|
|
11
|
+
export { Arrow, DoubleArrow, Vector, type ArrowOptions } from './Arrow';
|
|
12
12
|
export { Arc, type ArcOptions } from './Arc';
|
|
13
13
|
export { ArcBetweenPoints, type ArcBetweenPointsOptions } from './ArcBetweenPoints';
|
|
14
|
-
export { Ellipse, type EllipseOptions
|
|
14
|
+
export { Ellipse, type EllipseOptions } from './Ellipse';
|
|
15
|
+
export { Annulus, type AnnulusOptions } from './Annulus';
|
|
16
|
+
export { AnnularSector, type AnnularSectorOptions } from './AnnularSector';
|
|
17
|
+
export { Sector, type SectorOptions } from './Sector';
|
|
18
|
+
export { ArcPolygon, type ArcPolygonOptions, type ArcConfig } from './ArcPolygon';
|
|
19
|
+
export { CurvedArrow, type CurvedArrowOptions } from './CurvedArrow';
|
|
20
|
+
export { CurvedDoubleArrow } from './CurvedDoubleArrow';
|
|
21
|
+
export { TangentialArc, type TangentialArcOptions } from './TangentialArc';
|
|
15
22
|
export { DashedLine, type DashedLineOptions } from './DashedLine';
|
|
16
23
|
export { DashedVMobject, type DashedVMobjectOptions } from './DashedVMobject';
|
|
17
|
-
export { CubicBezier, type CubicBezierOptions, type CubicBezierPoints
|
|
24
|
+
export { CubicBezier, type CubicBezierOptions, type CubicBezierPoints } from './CubicBezier';
|
|
18
25
|
export { Dot, SmallDot, LargeDot, type DotOptions } from './Dot';
|
|
19
26
|
export { BackgroundRectangle, SurroundingRectangle, Underline, Cross, type BackgroundRectangleOptions, type SurroundingRectangleOptions, type UnderlineOptions, type CrossOptions, } from './ShapeMatchers';
|
|
20
27
|
export { RoundedRectangle, type RoundedRectangleOptions, Star, type StarOptions, RegularPolygram, type RegularPolygramOptions, Cutout, type CutoutOptions, ConvexHull, type ConvexHullOptions, } from './PolygonExtensions';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/mobjects/geometry/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,MAAM,EAAE,KAAK,aAAa,EAAE,MAAM,UAAU,CAAC;AAGtD,OAAO,EAAE,IAAI,EAAE,KAAK,WAAW,EAAE,MAAM,QAAQ,CAAC;AAGhD,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAGvE,OAAO,EACL,OAAO,EACP,QAAQ,EACR,cAAc,EACd,OAAO,EACP,QAAQ,EACR,KAAK,cAAc,GACpB,MAAM,WAAW,CAAC;AAGnB,OAAO,
|
|
1
|
+
{"version":3,"file":"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AmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,gBAAgB,GACtB,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { VertexId, DiGraphOptions } from './graphTypes';
|
|
2
|
+
import { GenericGraph } from './GenericGraph';
|
|
3
|
+
export declare class DiGraph extends GenericGraph {
|
|
4
|
+
constructor(options?: DiGraphOptions);
|
|
5
|
+
/**
|
|
6
|
+
* Get out-neighbors (vertices this vertex points to)
|
|
7
|
+
*/
|
|
8
|
+
getOutNeighbors(v: VertexId): VertexId[];
|
|
9
|
+
/**
|
|
10
|
+
* Get in-neighbors (vertices that point to this vertex)
|
|
11
|
+
*/
|
|
12
|
+
getInNeighbors(v: VertexId): VertexId[];
|
|
13
|
+
/**
|
|
14
|
+
* Get out-degree (number of outgoing edges)
|
|
15
|
+
*/
|
|
16
|
+
getOutDegree(v: VertexId): number;
|
|
17
|
+
/**
|
|
18
|
+
* Get in-degree (number of incoming edges)
|
|
19
|
+
*/
|
|
20
|
+
getInDegree(v: VertexId): number;
|
|
21
|
+
/**
|
|
22
|
+
* Create a copy of this digraph
|
|
23
|
+
*/
|
|
24
|
+
protected _createCopy(): DiGraph;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=DiGraph.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DiGraph.d.ts","sourceRoot":"","sources":["../../../src/mobjects/graph/DiGraph.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,QAAQ,EAAa,cAAc,EAAE,MAAM,cAAc,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,qBAAa,OAAQ,SAAQ,YAAY;gBAC3B,OAAO,GAAE,cAAmB;IAexC;;OAEG;IACH,eAAe,CAAC,CAAC,EAAE,QAAQ,GAAG,QAAQ,EAAE;IAUxC;;OAEG;IACH,cAAc,CAAC,CAAC,EAAE,QAAQ,GAAG,QAAQ,EAAE;IAUvC;;OAEG;IACH,YAAY,CAAC,CAAC,EAAE,QAAQ,GAAG,MAAM;IAIjC;;OAEG;IACH,WAAW,CAAC,CAAC,EAAE,QAAQ,GAAG,MAAM;IAIhC;;OAEG;cACgB,WAAW,IAAI,OAAO;CAS1C"}
|