manim-web 0.3.20 → 0.3.22
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/README.md +20 -0
- package/dist/AmsConfiguration-OUoC_kJ0.js +847 -0
- package/dist/AmsConfiguration-tdje_HlF.js +847 -0
- package/dist/ConfigMacrosConfiguration-4OaQYvlr.js +46 -0
- package/dist/ConfigMacrosConfiguration-DM3-S5M8.js +46 -0
- package/dist/Entities-Dw6381dl.js +429 -0
- package/dist/Entities-bJKKDYjE.js +429 -0
- package/dist/Factory-Ba6Nqb3M.js +107 -0
- package/dist/HtmlNode-1mFtYQ9G.js +981 -0
- package/dist/HtmlNode-CQqo5we-.js +981 -0
- package/dist/InputJax-D5R2pqUk.js +41 -0
- package/dist/InputJax-jNvwWU5P.js +41 -0
- package/dist/NewcommandConfiguration-BN_OlLcO.js +32 -0
- package/dist/NewcommandConfiguration-DZ3mSCpD.js +32 -0
- package/dist/NewcommandMethods-D5bueYYE.js +187 -0
- package/dist/NewcommandMethods-DTf_dan5.js +187 -0
- package/dist/Options-DMK2wYar.js +63 -0
- package/dist/ParseMethods-Deqa7kJ6.js +2636 -0
- package/dist/ParseMethods-Dt5bYDSZ.js +2636 -0
- package/dist/Styles-BILrGVps.js +293 -0
- package/dist/Styles-DQSruwWe.js +293 -0
- package/dist/animation/Animation.d.ts +15 -0
- package/dist/animation/Animation.d.ts.map +1 -1
- package/dist/animation/MasterTimeline.d.ts +88 -1
- package/dist/animation/MasterTimeline.d.ts.map +1 -1
- package/dist/animation/movement/Rotate.d.ts +2 -7
- package/dist/animation/movement/Rotate.d.ts.map +1 -1
- package/dist/animation/transform/FadeMorphStrategy.d.ts +18 -0
- package/dist/animation/transform/FadeMorphStrategy.d.ts.map +1 -0
- package/dist/animation/transform/FadeTransforms.d.ts +2 -0
- package/dist/animation/transform/FadeTransforms.d.ts.map +1 -1
- package/dist/animation/transform/MorphStrategy.d.ts +8 -0
- package/dist/animation/transform/MorphStrategy.d.ts.map +1 -0
- package/dist/animation/transform/MovementTransforms.d.ts.map +1 -1
- package/dist/animation/transform/PointMorphStrategy.d.ts +36 -0
- package/dist/animation/transform/PointMorphStrategy.d.ts.map +1 -0
- package/dist/animation/transform/ShapeMorphStrategy.d.ts +39 -0
- package/dist/animation/transform/ShapeMorphStrategy.d.ts.map +1 -0
- package/dist/animation/transform/Transform.d.ts +9 -91
- package/dist/animation/transform/Transform.d.ts.map +1 -1
- package/dist/animation/transform/TransformMatching.d.ts.map +1 -1
- package/dist/animation/transform/TransformMatchingBase.d.ts +1 -0
- package/dist/animation/transform/TransformMatchingBase.d.ts.map +1 -1
- package/dist/animation/transform/TransformMatchingShared.d.ts +37 -0
- package/dist/animation/transform/TransformMatchingShared.d.ts.map +1 -0
- package/dist/animation/transform/TransformPairing.d.ts +19 -0
- package/dist/animation/transform/TransformPairing.d.ts.map +1 -0
- package/dist/core/AnimateProxy.d.ts +4 -5
- package/dist/core/AnimateProxy.d.ts.map +1 -1
- package/dist/core/Camera.d.ts +37 -0
- package/dist/core/Camera.d.ts.map +1 -1
- package/dist/core/CameraExtensions.d.ts +33 -1
- package/dist/core/CameraExtensions.d.ts.map +1 -1
- package/dist/core/Group.d.ts +5 -11
- package/dist/core/Group.d.ts.map +1 -1
- package/dist/core/Mobject.d.ts +39 -7
- package/dist/core/Mobject.d.ts.map +1 -1
- package/dist/core/MobjectPositioning.d.ts +2 -5
- package/dist/core/MobjectPositioning.d.ts.map +1 -1
- package/dist/core/MobjectTypes.d.ts +21 -4
- package/dist/core/MobjectTypes.d.ts.map +1 -1
- package/dist/core/Renderer.d.ts +3 -0
- package/dist/core/Renderer.d.ts.map +1 -1
- package/dist/core/Scene.d.ts +50 -0
- package/dist/core/Scene.d.ts.map +1 -1
- package/dist/core/TexturedMobject.d.ts +38 -0
- package/dist/core/TexturedMobject.d.ts.map +1 -0
- package/dist/core/ThreeDScene.d.ts +18 -3
- package/dist/core/ThreeDScene.d.ts.map +1 -1
- package/dist/core/VGroup.d.ts +11 -19
- package/dist/core/VGroup.d.ts.map +1 -1
- package/dist/core/VMobject.d.ts +48 -110
- package/dist/core/VMobject.d.ts.map +1 -1
- package/dist/core/VMobjectCurveUtils.d.ts +106 -0
- package/dist/core/VMobjectCurveUtils.d.ts.map +1 -0
- package/dist/core/VMobjectGeometry.d.ts +22 -25
- package/dist/core/VMobjectGeometry.d.ts.map +1 -1
- package/dist/core/VMobjectRendering.d.ts +5 -0
- package/dist/core/VMobjectRendering.d.ts.map +1 -1
- package/dist/core/VMobjectStrokeGeometry.d.ts +20 -0
- package/dist/core/VMobjectStrokeGeometry.d.ts.map +1 -0
- package/dist/core/VMobjectTransformAlignment.d.ts +20 -0
- package/dist/core/VMobjectTransformAlignment.d.ts.map +1 -0
- package/dist/html-Bza5WY1y.js +829 -0
- package/dist/html-bhzMuE8p.js +829 -0
- package/dist/index.d.ts +4 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -4
- package/dist/integrations/react.js +16 -18
- package/dist/integrations/vue.js +15 -17
- package/dist/interaction/Draggable.d.ts +2 -0
- package/dist/interaction/Draggable.d.ts.map +1 -1
- package/dist/interaction/OrbitControls.d.ts +1 -1
- package/dist/interaction/OrbitControls.d.ts.map +1 -1
- package/dist/lengths-D2zTYMUu.js +54 -0
- package/dist/liteAdaptor-BkxB5CGC.js +616 -0
- package/dist/liteAdaptor-LMKuWwg1.js +616 -0
- package/dist/manim-web.browser.js +35821 -30916
- package/dist/mathjax-CPQWkQEv.js +121 -0
- package/dist/mathjax-b-GTdZgw.js +121 -0
- package/dist/mo-D4wFHS6V.js +2675 -0
- package/dist/mo-hAX79Dzl.js +2675 -0
- package/dist/mobjects/geometry/AngleShapes.d.ts +0 -4
- package/dist/mobjects/geometry/AngleShapes.d.ts.map +1 -1
- package/dist/mobjects/geometry/BooleanOperations.d.ts +1 -1
- package/dist/mobjects/geometry/BooleanOperations.d.ts.map +1 -1
- package/dist/mobjects/geometry/CubicBezier.d.ts.map +1 -1
- package/dist/mobjects/geometry/PolygonExtensions.d.ts +1 -1
- package/dist/mobjects/geometry/PolygonExtensions.d.ts.map +1 -1
- package/dist/mobjects/graphing/ComplexPlane.d.ts +59 -1
- package/dist/mobjects/graphing/ComplexPlane.d.ts.map +1 -1
- package/dist/mobjects/graphing/Vector.d.ts.map +1 -1
- package/dist/mobjects/image/index.d.ts +9 -2
- package/dist/mobjects/image/index.d.ts.map +1 -1
- package/dist/mobjects/point/Mobject1D.d.ts.map +1 -1
- package/dist/mobjects/point/Mobject2D.d.ts.map +1 -1
- package/dist/mobjects/point/PMobject.d.ts +8 -2
- package/dist/mobjects/point/PMobject.d.ts.map +1 -1
- package/dist/mobjects/point/PointMobject.d.ts.map +1 -1
- package/dist/mobjects/text/Code.d.ts.map +1 -1
- package/dist/mobjects/text/MarkupText.d.ts.map +1 -1
- package/dist/mobjects/text/MathJaxRenderer.d.ts.map +1 -1
- package/dist/mobjects/text/MathTex.d.ts +9 -0
- package/dist/mobjects/text/MathTex.d.ts.map +1 -1
- package/dist/mobjects/text/MathTexImage.d.ts +9 -3
- package/dist/mobjects/text/MathTexImage.d.ts.map +1 -1
- package/dist/mobjects/text/Text.d.ts +8 -3
- package/dist/mobjects/text/Text.d.ts.map +1 -1
- package/dist/mobjects/text/TextGlyphGroup.d.ts.map +1 -1
- package/dist/mobjects/text/svgPathParser.d.ts.map +1 -1
- package/dist/mobjects/three-d/Line3D.d.ts +10 -56
- package/dist/mobjects/three-d/Line3D.d.ts.map +1 -1
- package/dist/mobjects/three-d/ThreeDAxes.d.ts +8 -0
- package/dist/mobjects/three-d/ThreeDAxes.d.ts.map +1 -1
- package/dist/player/Player.d.ts +36 -29
- package/dist/player/Player.d.ts.map +1 -1
- package/dist/player/PlayerUI.d.ts.map +1 -1
- package/dist/player/RecordingScene.d.ts +37 -0
- package/dist/player/RecordingScene.d.ts.map +1 -0
- package/dist/{src-Db7QTr4S.js → src-BlTk3Bta.js} +34386 -29482
- package/dist/svg-DNS5Hwhk.js +28713 -0
- package/dist/svg-DVUoAdmC.js +28713 -0
- package/dist/test-setup/vitest-setup.d.ts +20 -0
- package/dist/test-setup/vitest-setup.d.ts.map +1 -0
- package/dist/tex-BQCLd0dF.js +1427 -0
- package/dist/tex-Cd_bTYKG.js +1427 -0
- package/dist/utils/axis.d.ts +4 -0
- package/dist/utils/axis.d.ts.map +1 -0
- package/dist/utils/logger.d.ts +37 -0
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/math.d.ts +11 -0
- package/dist/utils/math.d.ts.map +1 -1
- package/dist/utils/vectors.d.ts +54 -1
- package/dist/utils/vectors.d.ts.map +1 -1
- package/package.json +10 -8
- package/dist/AllPackages-B0GtkYjD.js +0 -7912
- package/dist/AllPackages-BIAELuhU.js +0 -7912
- package/dist/BaseConfiguration-CDf44lxS.js +0 -4402
- package/dist/BaseConfiguration-Chcqjv9L.js +0 -4402
- package/dist/Entities-B_gwJfrn.js +0 -458
- package/dist/Entities-CmJkmuw_.js +0 -458
- package/dist/GifExporter-C9lP34Iu.js +0 -338
- package/dist/GifExporter-DBak5Vk7.js +0 -338
- package/dist/InputJax-C5sGfjJ8.js +0 -43
- package/dist/InputJax-Jb4hSThK.js +0 -43
- package/dist/MathItem-BmK41eqe.js +0 -77
- package/dist/MathItem-C_mZyaeT.js +0 -77
- package/dist/Options-Ch1vGsgd.js +0 -188
- package/dist/Options-V6ag48Dv.js +0 -188
- package/dist/PrioritizedList-DkoCmqPk.js +0 -36
- package/dist/PrioritizedList-eKTii0tW.js +0 -36
- package/dist/Styles-De4BjKiV.js +0 -411
- package/dist/Styles-DgoiBrzf.js +0 -411
- package/dist/TeXAtom-DT2wCvcU.js +0 -2025
- package/dist/TeXAtom-JogI0lus.js +0 -2025
- package/dist/VideoExporter-Bdtz_pWv.js +0 -102
- package/dist/VideoExporter-Vjfsnv1h.js +0 -102
- package/dist/chunk-3e0lkp8x.js +0 -23
- package/dist/html-53__O8r2.js +0 -1587
- package/dist/html-DfHFh5II.js +0 -1587
- package/dist/lengths-3epoqRj7.js +0 -65
- package/dist/lengths-B-bX9Tfk.js +0 -65
- package/dist/liteAdaptor-BxFvlO-q.js +0 -828
- package/dist/liteAdaptor-CsOIKw2g.js +0 -828
- package/dist/mathjax-Bkrmftxh.js +0 -102
- package/dist/mathjax-DBrTNl9C.js +0 -102
- package/dist/mo-AzagC5AD.js +0 -3271
- package/dist/mo-I_6dyJsk.js +0 -3271
- package/dist/svg-CoGQ_sAt.js +0 -23880
- package/dist/svg-DiIG93Lr.js +0 -23880
- package/dist/tex-ChPKMfdv.js +0 -401
- package/dist/tex-hYZcjadW.js +0 -401
|
@@ -56,11 +56,26 @@ export declare class ThreeDScene extends Scene {
|
|
|
56
56
|
*/
|
|
57
57
|
constructor(container: HTMLElement | null, options?: ThreeDSceneOptions);
|
|
58
58
|
/**
|
|
59
|
-
* Override add
|
|
60
|
-
*
|
|
61
|
-
*
|
|
59
|
+
* Override add for 3D-correct material/render setup (issue #255):
|
|
60
|
+
* - depthTest=true on every material (base Scene disables it for 2D layering)
|
|
61
|
+
* - depthWrite=!transparent (transparent meshes must not occlude later
|
|
62
|
+
* transparent fragments behind them)
|
|
63
|
+
* - renderOrder reset to 0 so Three.js sorts transparent objects by camera
|
|
64
|
+
* distance instead of add order (base Scene stamps an incrementing
|
|
65
|
+
* renderOrder for 2D z-ordering, which defeats 3D depth sort)
|
|
66
|
+
*
|
|
67
|
+
* Auto-render is suppressed inside super.add() and scheduled once at the end,
|
|
68
|
+
* after settings are applied, so the first visible frame is correct.
|
|
69
|
+
* Render is deferred via the scheduler (issue #317) so a chained `play()`
|
|
70
|
+
* can suppress it and avoid a pre-animation flash.
|
|
62
71
|
*/
|
|
63
72
|
add(...mobjects: Mobject[]): this;
|
|
73
|
+
/**
|
|
74
|
+
* Apply 3D-correct material defaults: depthTest=true,
|
|
75
|
+
* depthWrite=!transparent, and (on initial add only) renderOrder=0 so
|
|
76
|
+
* Three.js sorts transparents by camera distance.
|
|
77
|
+
*/
|
|
78
|
+
private static _applyDepthSettings;
|
|
64
79
|
/**
|
|
65
80
|
* Get the 3D camera.
|
|
66
81
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThreeDScene.d.ts","sourceRoot":"","sources":["../../src/core/ThreeDScene.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ThreeDScene.d.ts","sourceRoot":"","sources":["../../src/core/ThreeDScene.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACnF,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAyClD;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,YAAY;IACtD,uDAAuD;IACvD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,uEAAuE;IACvE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,8EAA8E;IAC9E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oEAAoE;IACpE,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,sJAAsJ;IACtJ,eAAe,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;IAClC,4CAA4C;IAC5C,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAC5C,4DAA4D;IAC5D,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED;;;;GAIG;AACH,qBAAa,WAAY,SAAQ,KAAK;IACpC,OAAO,CAAC,SAAS,CAAW;IAC5B,OAAO,CAAC,SAAS,CAAW;IAC5B,OAAO,CAAC,cAAc,CAA8B;IACpD,OAAO,CA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AO,CAAC,eAAe;IAqCvB;;OAEG;IACH,OAAO,IAAI,IAAI;IAYf;;OAEG;IACH,MAAM,CAAC,cAAc,CAAC,OAAO,GAAE,kBAAuB,GAAG,WAAW;CAGrE"}
|
package/dist/core/VGroup.d.ts
CHANGED
|
@@ -10,6 +10,10 @@ import * as THREE from 'three';
|
|
|
10
10
|
* Operations apply to all children, and paths can be combined.
|
|
11
11
|
*/
|
|
12
12
|
export declare class VGroup extends VMobject {
|
|
13
|
+
/**
|
|
14
|
+
* True when this VGroup (recursively) has no renderable geometry.
|
|
15
|
+
*/
|
|
16
|
+
isEmpty(): boolean;
|
|
13
17
|
/**
|
|
14
18
|
* Create a new VGroup containing the given mobjects.
|
|
15
19
|
* Accepts both VMobjects and general Mobjects (e.g., Axes, Group).
|
|
@@ -45,15 +49,19 @@ export declare class VGroup extends VMobject {
|
|
|
45
49
|
* @returns this for chaining
|
|
46
50
|
*/
|
|
47
51
|
remove(...mobjects: Mobject[]): this;
|
|
52
|
+
getCenter(): Vector3Tuple;
|
|
48
53
|
/**
|
|
49
|
-
*
|
|
50
|
-
*
|
|
54
|
+
* Normalize group transform by forwarding direct group translation/rotation to children.
|
|
55
|
+
* This keeps VGroup semantics child-driven and avoids double-counting.
|
|
51
56
|
*/
|
|
52
|
-
|
|
57
|
+
normalizeTransform(): this;
|
|
53
58
|
/**
|
|
54
59
|
* Shift all children by the given delta.
|
|
55
60
|
* Only shifts children's internal positions, not the group's own position,
|
|
56
61
|
* to avoid double-counting in THREE.js hierarchy.
|
|
62
|
+
*
|
|
63
|
+
* When the group has no children yet (e.g. async-rendered text glyphs),
|
|
64
|
+
* store translation on the group so it is not dropped.
|
|
57
65
|
* @param delta - Translation vector [x, y, z]
|
|
58
66
|
* @returns this for chaining
|
|
59
67
|
*/
|
|
@@ -65,22 +73,6 @@ export declare class VGroup extends VMobject {
|
|
|
65
73
|
* @returns this for chaining
|
|
66
74
|
*/
|
|
67
75
|
moveTo(target: Vector3Tuple | Mobject, alignedEdge?: Vector3Tuple): this;
|
|
68
|
-
/**
|
|
69
|
-
* Rotate all children around an axis.
|
|
70
|
-
* @param angle - Rotation angle in radians
|
|
71
|
-
* @param axis - Axis of rotation [x, y, z], defaults to Z axis
|
|
72
|
-
* @returns this for chaining
|
|
73
|
-
*/
|
|
74
|
-
rotate(angle: number, axis?: Vector3Tuple): this;
|
|
75
|
-
/**
|
|
76
|
-
* Scale all children about the group's center.
|
|
77
|
-
* Each child's size is scaled, and their positions are repositioned
|
|
78
|
-
* relative to the group center — matching Manim Python behavior.
|
|
79
|
-
* Does not change the group's own scaleVector.
|
|
80
|
-
* @param factor - Scale factor (number for uniform, tuple for non-uniform)
|
|
81
|
-
* @returns this for chaining
|
|
82
|
-
*/
|
|
83
|
-
scale(factor: number | Vector3Tuple): this;
|
|
84
76
|
/**
|
|
85
77
|
* Set the color of all children.
|
|
86
78
|
* @param color - CSS color string
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VGroup.d.ts","sourceRoot":"","sources":["../../src/core/VGroup.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,YAAY,EAAS,MAAM,WAAW,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAE7C;;;GAGG;AACH,qBAAa,MAAO,SAAQ,QAAQ;IAClC;;;;OAIG;gBACS,GAAG,QAAQ,EAAE,OAAO,EAAE;IAYlC;;;;;OAKG;IACH,YAAY,CAAC,GAAG,SAAS,EAAE,CAAC,QAAQ,GAAG,QAAQ,EAAE,CAAC,EAAE,GAAG,IAAI;IAa3D;;;;OAIG;IACM,GAAG,CAAC,GAAG,QAAQ,EAAE,OAAO,EAAE,GAAG,IAAI;IAY1C;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAoB1B;;;;OAIG;IACH,eAAe,CAAC,GAAG,SAAS,EAAE,QAAQ,E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CAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,GAAG,CAAC,EAAE;IAIzD;;;;OAIG;IACH,MAAM,CAAC,EAAE,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,GAAG,MAAM;IAKlE;;;OAGG;IACH,IAAa,MAAM,IAAI,KAAK,EAAE,CAQ7B;IAED;;OAEG;IACM,SAAS,IAAI,MAAM,EAAE,EAAE;CAGjC"}
|
package/dist/core/VMobject.d.ts
CHANGED
|
@@ -14,6 +14,10 @@ export declare class VMobject extends VMobjectRendering {
|
|
|
14
14
|
protected _points3D: number[][];
|
|
15
15
|
/** Number of points visible (for Create animation) */
|
|
16
16
|
protected _visiblePointCount: number | null;
|
|
17
|
+
/** Base subpath-length metadata (intrinsic topology, e.g. SVG compound paths). */
|
|
18
|
+
protected _baseSubpathLengths?: number[];
|
|
19
|
+
/** Transform-time override for subpath lengths (compound-path metadata). */
|
|
20
|
+
protected _transformSubpathLengths?: number[];
|
|
17
21
|
constructor();
|
|
18
22
|
/**
|
|
19
23
|
* Get all points as 2D Point objects (derived from _points3D)
|
|
@@ -33,7 +37,7 @@ export declare class VMobject extends VMobjectRendering {
|
|
|
33
37
|
*/
|
|
34
38
|
setPoints3D(points: number[][]): this;
|
|
35
39
|
/**
|
|
36
|
-
* Get all points defining this VMobject as 3D arrays
|
|
40
|
+
* Get all points defining this VMobject as 3D arrays (local-space)
|
|
37
41
|
* @returns Copy of the points array
|
|
38
42
|
*/
|
|
39
43
|
getPoints(): number[][];
|
|
@@ -90,6 +94,43 @@ export declare class VMobject extends VMobjectRendering {
|
|
|
90
94
|
* Clear all points
|
|
91
95
|
*/
|
|
92
96
|
clearPoints(): this;
|
|
97
|
+
/**
|
|
98
|
+
* Fold local scaleVector into canonical child/point state and reset scaleVector.
|
|
99
|
+
*
|
|
100
|
+
* Matches VGroup normalization semantics: propagate scale to children,
|
|
101
|
+
* then clear parent scale anchor.
|
|
102
|
+
*/
|
|
103
|
+
normalizeTransform(): this;
|
|
104
|
+
/**
|
|
105
|
+
* Set base subpath-length metadata for this VMobject.
|
|
106
|
+
* Represents intrinsic topology (e.g. outer contour + holes from SVG parsing).
|
|
107
|
+
*/
|
|
108
|
+
setBaseSubpathLengths(lengths: number[] | undefined): void;
|
|
109
|
+
/**
|
|
110
|
+
* Get base subpath lengths (intrinsic topology metadata).
|
|
111
|
+
* Subclasses may override this to compute dynamic metadata.
|
|
112
|
+
*/
|
|
113
|
+
getSubpathLengths(): number[] | undefined;
|
|
114
|
+
/**
|
|
115
|
+
* Set transform-time subpath lengths override.
|
|
116
|
+
* Used by Transform animations to preserve compound-path structure.
|
|
117
|
+
* @param lengths - Array of subpath lengths, or undefined to clear
|
|
118
|
+
*/
|
|
119
|
+
setTransformSubpathLengths(lengths: number[] | undefined): void;
|
|
120
|
+
/**
|
|
121
|
+
* Get effective subpath lengths for rendering.
|
|
122
|
+
* Returns transform override if present, else base/subclass metadata.
|
|
123
|
+
*/
|
|
124
|
+
getEffectiveSubpathLengths(): number[] | undefined;
|
|
125
|
+
/**
|
|
126
|
+
* Get orientation sign for each subpath: +1 (CCW) or -1 (CW).
|
|
127
|
+
* Returns undefined when subpath metadata is missing or inconsistent.
|
|
128
|
+
*/
|
|
129
|
+
getSubpathOrientationSigns(lengths?: number[]): Array<1 | -1> | undefined;
|
|
130
|
+
/**
|
|
131
|
+
* Get orientation sign for a specific subpath index: +1 (CCW) or -1 (CW).
|
|
132
|
+
*/
|
|
133
|
+
getSubpathOrientationSign(index: number): 1 | -1;
|
|
93
134
|
/**
|
|
94
135
|
* Interpolate this VMobject towards a target VMobject
|
|
95
136
|
* @param target - The target VMobject to interpolate towards
|
|
@@ -103,11 +144,6 @@ export declare class VMobject extends VMobjectRendering {
|
|
|
103
144
|
* @param target - The target VMobject to align with
|
|
104
145
|
*/
|
|
105
146
|
alignPoints(target: VMobject): void;
|
|
106
|
-
/**
|
|
107
|
-
* Compute the signed area of a 2D polygon formed by the anchor points.
|
|
108
|
-
* Positive = counter-clockwise, negative = clockwise.
|
|
109
|
-
*/
|
|
110
|
-
private static _signedArea2D;
|
|
111
147
|
/**
|
|
112
148
|
* Reverse a cubic-bezier point path while preserving bezier structure.
|
|
113
149
|
* For cubic segments [A0, H1, H2, A1, H3, H4, A2, ...],
|
|
@@ -123,6 +159,12 @@ export declare class VMobject extends VMobjectRendering {
|
|
|
123
159
|
private static _bestRotation;
|
|
124
160
|
/**
|
|
125
161
|
* Interpolate a 3D point list to have a specific number of points.
|
|
162
|
+
*
|
|
163
|
+
* Delegates to the bezier-aware `resamplePointList3D` so that valid cubic
|
|
164
|
+
* Bezier chains are densified by de Casteljau subdivision rather than
|
|
165
|
+
* piecewise-linear interpolation. Linear lerp on cubic control points
|
|
166
|
+
* silently produces invalid handles (handle = midpoint of two adjacent
|
|
167
|
+
* controls), which renders as flat polygonal segments mid-`Transform`.
|
|
126
168
|
*/
|
|
127
169
|
protected _interpolatePointList3D(points: number[][], targetCount: number): number[][];
|
|
128
170
|
/**
|
|
@@ -184,108 +226,4 @@ export declare class VMobject extends VMobjectRendering {
|
|
|
184
226
|
*/
|
|
185
227
|
dispose(): void;
|
|
186
228
|
}
|
|
187
|
-
/**
|
|
188
|
-
* Get the number of curve segments in a VMobject.
|
|
189
|
-
* Each cubic Bezier segment uses 4 points (anchor, handle, handle, anchor),
|
|
190
|
-
* with consecutive segments sharing anchors.
|
|
191
|
-
* @param vmobject - The VMobject to count curves from
|
|
192
|
-
* @returns Number of curve segments
|
|
193
|
-
*/
|
|
194
|
-
export declare function getNumCurves(vmobject: VMobject): number;
|
|
195
|
-
/**
|
|
196
|
-
* Get the nth curve segment from a VMobject as a new VMobject.
|
|
197
|
-
* @param vmobject - The source VMobject
|
|
198
|
-
* @param n - Index of the curve segment (0-based)
|
|
199
|
-
* @returns A new VMobject containing just that curve segment
|
|
200
|
-
*/
|
|
201
|
-
export declare function getNthCurve(vmobject: VMobject, n: number): VMobject;
|
|
202
|
-
/**
|
|
203
|
-
* Split a VMobject's curves into separate VMobject submobjects.
|
|
204
|
-
* Each cubic Bezier curve segment becomes its own VMobject child.
|
|
205
|
-
* Useful for animating parts of a path independently (e.g., staggered animations).
|
|
206
|
-
*
|
|
207
|
-
* @param vmobject - The VMobject to split
|
|
208
|
-
* @returns A new VMobject with each curve as a child submobject
|
|
209
|
-
*
|
|
210
|
-
* @example
|
|
211
|
-
* ```typescript
|
|
212
|
-
* const path = new VMobject();
|
|
213
|
-
* path.setPoints([...complex path with multiple curves...]);
|
|
214
|
-
*
|
|
215
|
-
* // Split into individual curves for staggered animation
|
|
216
|
-
* const curves = curvesAsSubmobjects(path);
|
|
217
|
-
*
|
|
218
|
-
* // Now animate each curve independently
|
|
219
|
-
* for (const curve of curves.children) {
|
|
220
|
-
* scene.play(Create(curve));
|
|
221
|
-
* }
|
|
222
|
-
* ```
|
|
223
|
-
*/
|
|
224
|
-
export declare function curvesAsSubmobjects(vmobject: VMobject): VMobject;
|
|
225
|
-
/**
|
|
226
|
-
* CurvesAsSubmobjects class - Splits a VMobject's curves into separate submobjects.
|
|
227
|
-
*
|
|
228
|
-
* This class extends VMobject and creates children where each child is a single
|
|
229
|
-
* cubic Bezier curve segment from the source VMobject. This is useful for:
|
|
230
|
-
* - Staggered animations (animate each curve segment with delay)
|
|
231
|
-
* - Per-curve styling (color each segment differently)
|
|
232
|
-
* - Selective curve manipulation
|
|
233
|
-
*
|
|
234
|
-
* @example
|
|
235
|
-
* ```typescript
|
|
236
|
-
* const path = new VMobject();
|
|
237
|
-
* path.setPoints([...]);
|
|
238
|
-
*
|
|
239
|
-
* const curves = new CurvesAsSubmobjects(path);
|
|
240
|
-
*
|
|
241
|
-
* // Access individual curves
|
|
242
|
-
* curves.children[0].setColor('red');
|
|
243
|
-
* curves.children[1].setColor('blue');
|
|
244
|
-
* ```
|
|
245
|
-
*/
|
|
246
|
-
export declare class CurvesAsSubmobjects extends VMobject {
|
|
247
|
-
/** The source VMobject this was created from */
|
|
248
|
-
protected _source: VMobject | null;
|
|
249
|
-
/**
|
|
250
|
-
* Create a CurvesAsSubmobjects from a VMobject.
|
|
251
|
-
* @param vmobject - The VMobject to split into curve submobjects
|
|
252
|
-
*/
|
|
253
|
-
constructor(vmobject?: VMobject);
|
|
254
|
-
/**
|
|
255
|
-
* Set up this object from a VMobject, splitting its curves into children.
|
|
256
|
-
* @param vmobject - The source VMobject
|
|
257
|
-
* @returns this for chaining
|
|
258
|
-
*/
|
|
259
|
-
setFromVMobject(vmobject: VMobject): this;
|
|
260
|
-
/**
|
|
261
|
-
* Get the number of curve segments (same as number of children).
|
|
262
|
-
*/
|
|
263
|
-
get numCurves(): number;
|
|
264
|
-
/**
|
|
265
|
-
* Get the nth curve as a VMobject.
|
|
266
|
-
* @param n - Index of the curve (0-based)
|
|
267
|
-
* @returns The curve VMobject at that index
|
|
268
|
-
*/
|
|
269
|
-
getCurve(n: number): VMobject;
|
|
270
|
-
/**
|
|
271
|
-
* Iterate over all curves.
|
|
272
|
-
*/
|
|
273
|
-
[Symbol.iterator](): Iterator<VMobject>;
|
|
274
|
-
/**
|
|
275
|
-
* Apply a function to each curve.
|
|
276
|
-
* @param fn - Function to apply
|
|
277
|
-
* @returns this for chaining
|
|
278
|
-
*/
|
|
279
|
-
forEach(fn: (curve: VMobject, index: number) => void): this;
|
|
280
|
-
/**
|
|
281
|
-
* Map over all curves.
|
|
282
|
-
* @param fn - Mapping function
|
|
283
|
-
* @returns Array of mapped values
|
|
284
|
-
*/
|
|
285
|
-
map<T>(fn: (curve: VMobject, index: number) => T): T[];
|
|
286
|
-
/**
|
|
287
|
-
* Create a copy of this CurvesAsSubmobjects.
|
|
288
|
-
*/
|
|
289
|
-
protected _createCopy(): VMobject;
|
|
290
|
-
}
|
|
291
229
|
//# sourceMappingURL=VMobject.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VMobject.d.ts","sourceRoot":"","sources":["../../src/core/VMobject.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;OAEG;IACM,OAAO,IAAI,IAAI;CAIzB"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { VMobject } from './VMobject';
|
|
2
|
+
/**
|
|
3
|
+
* Get the number of curve segments in a VMobject.
|
|
4
|
+
* Each cubic Bezier segment uses 4 points (anchor, handle, handle, anchor),
|
|
5
|
+
* with consecutive segments sharing anchors.
|
|
6
|
+
* @param vmobject - The VMobject to count curves from
|
|
7
|
+
* @returns Number of curve segments
|
|
8
|
+
*/
|
|
9
|
+
export declare function getNumCurves(vmobject: VMobject): number;
|
|
10
|
+
/**
|
|
11
|
+
* Get the nth curve segment from a VMobject as a new VMobject.
|
|
12
|
+
* @param vmobject - The source VMobject
|
|
13
|
+
* @param n - Index of the curve segment (0-based)
|
|
14
|
+
* @returns A new VMobject containing just that curve segment
|
|
15
|
+
*/
|
|
16
|
+
export declare function getNthCurve(vmobject: VMobject, n: number): VMobject;
|
|
17
|
+
/**
|
|
18
|
+
* Split a VMobject's curves into separate VMobject submobjects.
|
|
19
|
+
* Each cubic Bezier curve segment becomes its own VMobject child.
|
|
20
|
+
* Useful for animating parts of a path independently (e.g., staggered animations).
|
|
21
|
+
*
|
|
22
|
+
* @param vmobject - The VMobject to split
|
|
23
|
+
* @returns A new VMobject with each curve as a child submobject
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```typescript
|
|
27
|
+
* const path = new VMobject();
|
|
28
|
+
* path.setPoints([...complex path with multiple curves...]);
|
|
29
|
+
*
|
|
30
|
+
* // Split into individual curves for staggered animation
|
|
31
|
+
* const curves = curvesAsSubmobjects(path);
|
|
32
|
+
*
|
|
33
|
+
* // Now animate each curve independently
|
|
34
|
+
* for (const curve of curves.children) {
|
|
35
|
+
* scene.play(Create(curve));
|
|
36
|
+
* }
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
export declare function curvesAsSubmobjects(vmobject: VMobject): VMobject;
|
|
40
|
+
/**
|
|
41
|
+
* CurvesAsSubmobjects class - Splits a VMobject's curves into separate submobjects.
|
|
42
|
+
*
|
|
43
|
+
* This class extends VMobject and creates children where each child is a single
|
|
44
|
+
* cubic Bezier curve segment from the source VMobject. This is useful for:
|
|
45
|
+
* - Staggered animations (animate each curve segment with delay)
|
|
46
|
+
* - Per-curve styling (color each segment differently)
|
|
47
|
+
* - Selective curve manipulation
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```typescript
|
|
51
|
+
* const path = new VMobject();
|
|
52
|
+
* path.setPoints([...]);
|
|
53
|
+
*
|
|
54
|
+
* const curves = new CurvesAsSubmobjects(path);
|
|
55
|
+
*
|
|
56
|
+
* // Access individual curves
|
|
57
|
+
* curves.children[0].setColor('red');
|
|
58
|
+
* curves.children[1].setColor('blue');
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
export declare class CurvesAsSubmobjects extends VMobject {
|
|
62
|
+
/** The source VMobject this was created from */
|
|
63
|
+
protected _source: VMobject | null;
|
|
64
|
+
/**
|
|
65
|
+
* Create a CurvesAsSubmobjects from a VMobject.
|
|
66
|
+
* @param vmobject - The VMobject to split into curve submobjects
|
|
67
|
+
*/
|
|
68
|
+
constructor(vmobject?: VMobject);
|
|
69
|
+
/**
|
|
70
|
+
* Set up this object from a VMobject, splitting its curves into children.
|
|
71
|
+
* @param vmobject - The source VMobject
|
|
72
|
+
* @returns this for chaining
|
|
73
|
+
*/
|
|
74
|
+
setFromVMobject(vmobject: VMobject): this;
|
|
75
|
+
/**
|
|
76
|
+
* Get the number of curve segments (same as number of children).
|
|
77
|
+
*/
|
|
78
|
+
get numCurves(): number;
|
|
79
|
+
/**
|
|
80
|
+
* Get the nth curve as a VMobject.
|
|
81
|
+
* @param n - Index of the curve (0-based)
|
|
82
|
+
* @returns The curve VMobject at that index
|
|
83
|
+
*/
|
|
84
|
+
getCurve(n: number): VMobject;
|
|
85
|
+
/**
|
|
86
|
+
* Iterate over all curves.
|
|
87
|
+
*/
|
|
88
|
+
[Symbol.iterator](): Iterator<VMobject>;
|
|
89
|
+
/**
|
|
90
|
+
* Apply a function to each curve.
|
|
91
|
+
* @param fn - Function to apply
|
|
92
|
+
* @returns this for chaining
|
|
93
|
+
*/
|
|
94
|
+
forEach(fn: (curve: VMobject, index: number) => void): this;
|
|
95
|
+
/**
|
|
96
|
+
* Map over all curves.
|
|
97
|
+
* @param fn - Mapping function
|
|
98
|
+
* @returns Array of mapped values
|
|
99
|
+
*/
|
|
100
|
+
map<T>(fn: (curve: VMobject, index: number) => T): T[];
|
|
101
|
+
/**
|
|
102
|
+
* Create a copy of this CurvesAsSubmobjects.
|
|
103
|
+
*/
|
|
104
|
+
protected _createCopy(): VMobject;
|
|
105
|
+
}
|
|
106
|
+
//# sourceMappingURL=VMobjectCurveUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VMobjectCurveUtils.d.ts","sourceRoot":"","sources":["../../src/core/VMobjectCurveUtils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAGtC;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,CAEvD;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,GAAG,QAAQ,CAoBnE;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,QAAQ,GAAG,QAAQ,CAkBhE;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,qBAAa,mBAAoB,SAAQ,QAAQ;IAC/C,gDAAgD;IAChD,SAAS,CAAC,OAAO,EAAE,QAAQ,GAAG,IAAI,CAAQ;IAE1C;;;OAGG;gBACS,QAAQ,CAAC,EAAE,QAAQ;IAY/B;;;;OAIG;IACH,eAAe,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI;IA2BzC;;OAEG;IACH,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED;;;;OAIG;IACH,QAAQ,CAAC,CAAC,EAAE,MAAM,GAAG,QAAQ;IAO7B;;OAEG;IACH,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,QAAQ,CAAC;IAIvC;;;;OAIG;IACH,OAAO,CAAC,EAAE,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG,IAAI;IAK3D;;;;OAIG;IACH,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,GAAG,CAAC,EAAE;IAItD;;OAEG;cACgB,WAAW,IAAI,QAAQ;CAK3C"}
|
|
@@ -12,26 +12,36 @@ import { Point } from './VMobjectCurves';
|
|
|
12
12
|
import * as THREE from 'three';
|
|
13
13
|
/**
|
|
14
14
|
* Check if a cubic Bezier segment is nearly linear by measuring the maximum
|
|
15
|
-
* 3D distance from handles to the chord (p0 -> p3)
|
|
16
|
-
* arcs in non-XY planes (e.g. Angle in XZ
|
|
15
|
+
* 3D distance from handles to the chord (p0 -> p3), normalised by chord
|
|
16
|
+
* length. Must handle z so that arcs in non-XY planes (e.g. Angle in XZ
|
|
17
|
+
* plane) still sample as curves.
|
|
17
18
|
*/
|
|
18
19
|
export declare function isNearlyLinear(p0: number[], p1: number[], p2: number[], p3: number[]): boolean;
|
|
19
20
|
/**
|
|
20
21
|
* Sample Bezier curves for smooth rendering.
|
|
21
|
-
*
|
|
22
|
-
*
|
|
22
|
+
*
|
|
23
|
+
* Always emits exactly `samplesPerSegment + 1` samples per cubic segment
|
|
24
|
+
* (minus shared-anchor duplicates between adjacent segments). Earlier
|
|
25
|
+
* versions used "adaptive" sampling — `isNearlyLinear ? 1 : N` — to skip
|
|
26
|
+
* per-sample evaluation on segments whose handles were collinear with the
|
|
27
|
+
* chord. That branch is unsafe during a `Transform`: the linearity test
|
|
28
|
+
* is computed on the per-frame LERPED control polygon, so as alpha
|
|
29
|
+
* advances a segment can cross the threshold and the segment's sample
|
|
30
|
+
* count flips between 1 and N. The polyline length changes frame-to-frame,
|
|
31
|
+
* the resulting stroke/path geometry is rebuilt with a different vertex
|
|
32
|
+
* count each time, and the visible result is a flickering edge. Stability
|
|
33
|
+
* is worth far more than the marginal compute saved on collinear segments.
|
|
23
34
|
*
|
|
24
35
|
* @param points - Bezier control points
|
|
25
|
-
* @param samplesPerSegment - Number of samples per
|
|
26
|
-
* @returns Sampled points along the path
|
|
36
|
+
* @param samplesPerSegment - Number of samples per cubic Bezier segment
|
|
27
37
|
*/
|
|
28
38
|
export declare function sampleBezierPath(points: number[][], samplesPerSegment?: number): number[][];
|
|
29
39
|
/**
|
|
30
|
-
* Sample the Bezier path into a
|
|
40
|
+
* Sample the Bezier path into a polyline suitable for earcut triangulation.
|
|
31
41
|
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
42
|
+
* Same stability rationale as `sampleBezierPath`: emit a fixed number of
|
|
43
|
+
* samples per segment so the polyline length doesn't flicker frame-to-frame
|
|
44
|
+
* during a `Transform`.
|
|
35
45
|
*/
|
|
36
46
|
export declare function sampleBezierOutline(points: number[][], samplesPerSegment: number): number[][];
|
|
37
47
|
/**
|
|
@@ -61,23 +71,10 @@ export declare function pointsToCurvePath(visiblePoints3D: number[][]): THREE.Cu
|
|
|
61
71
|
*
|
|
62
72
|
* @param points3D - The visible Bezier control points
|
|
63
73
|
* @param visiblePoints - 2D points for fallback shape
|
|
64
|
-
* @param
|
|
74
|
+
* @param getSubpathLengths - Optional function to get subpath lengths for compound paths
|
|
65
75
|
* @returns A BufferGeometry or null if too degenerate
|
|
66
76
|
*/
|
|
67
|
-
export declare function buildEarcutFillGeometry(points3D: number[][], visiblePoints: Point[],
|
|
68
|
-
/**
|
|
69
|
-
* Build mesh-based stroke geometry from a closed sampled path.
|
|
70
|
-
* Uses miter joins at corners for pixel-perfect sharp corners.
|
|
71
|
-
*
|
|
72
|
-
* @param group - The THREE.Group for world matrix computation
|
|
73
|
-
* @param sampledPoints - Sampled path points
|
|
74
|
-
* @param strokeWidth - Stroke width
|
|
75
|
-
* @param opacity - Current opacity
|
|
76
|
-
* @returns BufferGeometry and index data, or null if insufficient points
|
|
77
|
-
*/
|
|
78
|
-
export declare function buildMeshStrokeGeometry(group: THREE.Group, sampledPoints: number[][], strokeWidth: number, opacity: number): {
|
|
79
|
-
geometry: THREE.BufferGeometry;
|
|
80
|
-
} | null;
|
|
77
|
+
export declare function buildEarcutFillGeometry(points3D: number[][], visiblePoints: Point[], getSubpathLengths?: () => number[]): THREE.BufferGeometry | null;
|
|
81
78
|
/**
|
|
82
79
|
* Check if the Bezier control points form a closed path (first ~ last anchor).
|
|
83
80
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VMobjectGeometry.d.ts","sourceRoot":"","sources":["../../src/core/VMobjectGeometry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"VMobjectGeometry.d.ts","sourceRoot":"","sources":["../../src/core/VMobjectGeometry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AA4B9C;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,OAAO,CAoB9F;AAMD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,iBAAiB,GAAE,MAAU,GAAG,MAAM,EAAE,EAAE,CA0B9F;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,iBAAiB,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,CAkC7F;AAqHD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,OAAO,CAazE;AAMD;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,aAAa,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC,KAAK,CA8BjE;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,eAAe,EAAE,MAAM,EAAE,EAAE,GAAG,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,CAoD7F;AAMD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,MAAM,EAAE,EAAE,EACpB,aAAa,EAAE,KAAK,EAAE,EACtB,iBAAiB,CAAC,EAAE,MAAM,MAAM,EAAE,GACjC,KAAK,CAAC,cAAc,GAAG,IAAI,CAqC7B;AAsJD;;GAEG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,GAAG,OAAO,CAQ1D"}
|
|
@@ -107,6 +107,11 @@ export declare abstract class VMobjectRendering extends Mobject {
|
|
|
107
107
|
set shaderCurves(value: boolean | null);
|
|
108
108
|
/** Mark geometry as needing rebuild on next render. */
|
|
109
109
|
markGeometryDirty(): void;
|
|
110
|
+
/**
|
|
111
|
+
* VMobject-level upward dirty propagation must also mark geometry dirty.
|
|
112
|
+
* This keeps geometry invalidation centralized for point/curve mutations.
|
|
113
|
+
*/
|
|
114
|
+
_markDirtyUpward(): void;
|
|
110
115
|
abstract getVisiblePoints(): Point[];
|
|
111
116
|
abstract getVisiblePoints3D(): number[][];
|
|
112
117
|
protected _pointsToShape(): THREE.Shape;
|
|
@@ -1 +1 @@
|
|
|
1
|
-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,OAAO,CAAC,uBAAuB;IAkD/B;;;OAGG;IACH,OAAO,CAAC,oBAAoB;IA6B5B,OAAO,CAAC,iBAAiB;IAsCzB,OAAO,CAAC,iBAAiB;IAQzB,OAAO,CAAC,sBAAsB;IAY9B,OAAO,CAAC,mBAAmB;IA6C3B,OAAO,CAAC,qBAAqB;cAcV,oBAAoB,IAAI,IAAI;IA0D/C,SAAS,CAAC,0BAA0B,IAAI,IAAI;CAuB7C"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mesh-based stroke geometry construction for VMobject.
|
|
3
|
+
*
|
|
4
|
+
* Extracted from VMobjectGeometry.ts to keep line counts under control.
|
|
5
|
+
*/
|
|
6
|
+
import * as THREE from 'three';
|
|
7
|
+
/**
|
|
8
|
+
* Build mesh-based stroke geometry from a closed sampled path.
|
|
9
|
+
* Uses miter joins at corners for pixel-perfect sharp corners.
|
|
10
|
+
*
|
|
11
|
+
* @param group - The THREE.Group for world matrix computation
|
|
12
|
+
* @param sampledPoints - Sampled path points
|
|
13
|
+
* @param strokeWidth - Stroke width
|
|
14
|
+
* @param opacity - Current opacity
|
|
15
|
+
* @returns BufferGeometry and index data, or null if insufficient points
|
|
16
|
+
*/
|
|
17
|
+
export declare function buildMeshStrokeGeometry(group: THREE.Group, sampledPoints: number[][], strokeWidth: number, opacity: number): {
|
|
18
|
+
geometry: THREE.BufferGeometry;
|
|
19
|
+
} | null;
|
|
20
|
+
//# sourceMappingURL=VMobjectStrokeGeometry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VMobjectStrokeGeometry.d.ts","sourceRoot":"","sources":["../../src/core/VMobjectStrokeGeometry.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B;;;;;;;;;GASG;AAEH,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,aAAa,EAAE,MAAM,EAAE,EAAE,EACzB,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,GACd;IAAE,QAAQ,EAAE,KAAK,CAAC,cAAc,CAAA;CAAE,GAAG,IAAI,CAuJ3C"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface CompoundAlignmentResult {
|
|
2
|
+
srcAlignedPoints: number[][];
|
|
3
|
+
tgtAlignedPoints: number[][];
|
|
4
|
+
alignedSubpathLengths: number[];
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Resample a 3D point list to `targetCount`.
|
|
8
|
+
*
|
|
9
|
+
* For cubic-Bezier-chain inputs whose target count fits the cubic stride
|
|
10
|
+
* (`(n-1) % 3 === 0`), uses De Casteljau-style subdivision via
|
|
11
|
+
* `remapBezierCurveCount` to preserve curve fidelity; otherwise falls back
|
|
12
|
+
* to piecewise-linear interpolation.
|
|
13
|
+
*/
|
|
14
|
+
export declare function resamplePointList3D(points: number[][], targetCount: number): number[][];
|
|
15
|
+
/**
|
|
16
|
+
* Align compound paths by orientation buckets, then by descending subpath length.
|
|
17
|
+
* CW (-1) and CCW (+1) buckets are aligned independently.
|
|
18
|
+
*/
|
|
19
|
+
export declare function alignCompoundPathsForTransform(srcPoints3D: number[][], srcLengths: number[] | undefined, tgtPoints3D: number[][], tgtLengths: number[] | undefined, srcSigns?: Array<1 | -1>, tgtSigns?: Array<1 | -1>): CompoundAlignmentResult | null;
|
|
20
|
+
//# sourceMappingURL=VMobjectTransformAlignment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VMobjectTransformAlignment.d.ts","sourceRoot":"","sources":["../../src/core/VMobjectTransformAlignment.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,uBAAuB;IACtC,gBAAgB,EAAE,MAAM,EAAE,EAAE,CAAC;IAC7B,gBAAgB,EAAE,MAAM,EAAE,EAAE,CAAC;IAC7B,qBAAqB,EAAE,MAAM,EAAE,CAAC;CACjC;AAsBD;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,CAmDvF;AAydD;;;GAGG;AACH,wBAAgB,8BAA8B,CAC5C,WAAW,EAAE,MAAM,EAAE,EAAE,EACvB,UAAU,EAAE,MAAM,EAAE,GAAG,SAAS,EAChC,WAAW,EAAE,MAAM,EAAE,EAAE,EACvB,UAAU,EAAE,MAAM,EAAE,GAAG,SAAS,EAChC,QAAQ,CAAC,EAAE,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EACxB,QAAQ,CAAC,EAAE,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GACvB,uBAAuB,GAAG,IAAI,CA8ChC"}
|