manim-web 0.2.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.
- package/LICENSE +21 -0
- package/README.md +109 -0
- package/dist/animation/Animation.d.ts +69 -0
- package/dist/animation/Animation.d.ts.map +1 -0
- package/dist/animation/AnimationGroup.d.ts +48 -0
- package/dist/animation/AnimationGroup.d.ts.map +1 -0
- package/dist/animation/LaggedStart.d.ts +25 -0
- package/dist/animation/LaggedStart.d.ts.map +1 -0
- package/dist/animation/MaintainPositionRelativeTo.d.ts +23 -0
- package/dist/animation/MaintainPositionRelativeTo.d.ts.map +1 -0
- package/dist/animation/Succession.d.ts +19 -0
- package/dist/animation/Succession.d.ts.map +1 -0
- package/dist/animation/Timeline.d.ts +89 -0
- package/dist/animation/Timeline.d.ts.map +1 -0
- package/dist/animation/UpdateFromAlphaFunc.d.ts +32 -0
- package/dist/animation/UpdateFromAlphaFunc.d.ts.map +1 -0
- package/dist/animation/UpdateFromFunc.d.ts +30 -0
- package/dist/animation/UpdateFromFunc.d.ts.map +1 -0
- package/dist/animation/changing/index.d.ts +213 -0
- package/dist/animation/changing/index.d.ts.map +1 -0
- package/dist/animation/composition/LaggedStartMap.d.ts +47 -0
- package/dist/animation/composition/LaggedStartMap.d.ts.map +1 -0
- package/dist/animation/composition/index.d.ts +5 -0
- package/dist/animation/composition/index.d.ts.map +1 -0
- package/dist/animation/creation/Create.d.ts +232 -0
- package/dist/animation/creation/Create.d.ts.map +1 -0
- package/dist/animation/creation/CreationExtensions.d.ts +127 -0
- package/dist/animation/creation/CreationExtensions.d.ts.map +1 -0
- package/dist/animation/creation/TypeWithCursor.d.ts +133 -0
- package/dist/animation/creation/TypeWithCursor.d.ts.map +1 -0
- package/dist/animation/creation/index.d.ts +4 -0
- package/dist/animation/creation/index.d.ts.map +1 -0
- package/dist/animation/fading/FadeIn.d.ts +31 -0
- package/dist/animation/fading/FadeIn.d.ts.map +1 -0
- package/dist/animation/fading/FadeOut.d.ts +32 -0
- package/dist/animation/fading/FadeOut.d.ts.map +1 -0
- package/dist/animation/fading/index.d.ts +3 -0
- package/dist/animation/fading/index.d.ts.map +1 -0
- package/dist/animation/growing/index.d.ts +103 -0
- package/dist/animation/growing/index.d.ts.map +1 -0
- package/dist/animation/index.d.ts +20 -0
- package/dist/animation/index.d.ts.map +1 -0
- package/dist/animation/indication/ApplyWave.d.ts +51 -0
- package/dist/animation/indication/ApplyWave.d.ts.map +1 -0
- package/dist/animation/indication/Blink.d.ts +34 -0
- package/dist/animation/indication/Blink.d.ts.map +1 -0
- package/dist/animation/indication/Circumscribe.d.ts +54 -0
- package/dist/animation/indication/Circumscribe.d.ts.map +1 -0
- package/dist/animation/indication/Flash.d.ts +45 -0
- package/dist/animation/indication/Flash.d.ts.map +1 -0
- package/dist/animation/indication/FocusOn.d.ts +79 -0
- package/dist/animation/indication/FocusOn.d.ts.map +1 -0
- package/dist/animation/indication/Indicate.d.ts +30 -0
- package/dist/animation/indication/Indicate.d.ts.map +1 -0
- package/dist/animation/indication/ShowCreationThenDestruction.d.ts +26 -0
- package/dist/animation/indication/ShowCreationThenDestruction.d.ts.map +1 -0
- package/dist/animation/indication/ShowPassingFlash.d.ts +47 -0
- package/dist/animation/indication/ShowPassingFlash.d.ts.map +1 -0
- package/dist/animation/indication/ShowPassingFlashWithThinningStrokeWidth.d.ts +21 -0
- package/dist/animation/indication/ShowPassingFlashWithThinningStrokeWidth.d.ts.map +1 -0
- package/dist/animation/indication/Wiggle.d.ts +48 -0
- package/dist/animation/indication/Wiggle.d.ts.map +1 -0
- package/dist/animation/indication/WiggleOutThenIn.d.ts +44 -0
- package/dist/animation/indication/WiggleOutThenIn.d.ts.map +1 -0
- package/dist/animation/indication/index.d.ts +20 -0
- package/dist/animation/indication/index.d.ts.map +1 -0
- package/dist/animation/movement/Homotopy.d.ts +204 -0
- package/dist/animation/movement/Homotopy.d.ts.map +1 -0
- package/dist/animation/movement/MoveAlongPath.d.ts +48 -0
- package/dist/animation/movement/MoveAlongPath.d.ts.map +1 -0
- package/dist/animation/movement/Rotate.d.ts +47 -0
- package/dist/animation/movement/Rotate.d.ts.map +1 -0
- package/dist/animation/movement/Scale.d.ts +74 -0
- package/dist/animation/movement/Scale.d.ts.map +1 -0
- package/dist/animation/movement/Shift.d.ts +74 -0
- package/dist/animation/movement/Shift.d.ts.map +1 -0
- package/dist/animation/movement/index.d.ts +6 -0
- package/dist/animation/movement/index.d.ts.map +1 -0
- package/dist/animation/numbers/index.d.ts +152 -0
- package/dist/animation/numbers/index.d.ts.map +1 -0
- package/dist/animation/speed/index.d.ts +114 -0
- package/dist/animation/speed/index.d.ts.map +1 -0
- package/dist/animation/transform/ApplyPointwiseFunction.d.ts +23 -0
- package/dist/animation/transform/ApplyPointwiseFunction.d.ts.map +1 -0
- package/dist/animation/transform/Transform.d.ts +89 -0
- package/dist/animation/transform/Transform.d.ts.map +1 -0
- package/dist/animation/transform/TransformExtensions.d.ts +444 -0
- package/dist/animation/transform/TransformExtensions.d.ts.map +1 -0
- package/dist/animation/transform/TransformMatching.d.ts +138 -0
- package/dist/animation/transform/TransformMatching.d.ts.map +1 -0
- package/dist/animation/transform/index.d.ts +5 -0
- package/dist/animation/transform/index.d.ts.map +1 -0
- package/dist/animation/utility/index.d.ts +171 -0
- package/dist/animation/utility/index.d.ts.map +1 -0
- package/dist/constants/colors.d.ts +72 -0
- package/dist/constants/colors.d.ts.map +1 -0
- package/dist/constants/colors.test.d.ts +2 -0
- package/dist/constants/colors.test.d.ts.map +1 -0
- package/dist/constants/directions.test.d.ts +2 -0
- package/dist/constants/directions.test.d.ts.map +1 -0
- package/dist/constants/index.d.ts +16 -0
- package/dist/constants/index.d.ts.map +1 -0
- package/dist/core/AudioManager.d.ts +203 -0
- package/dist/core/AudioManager.d.ts.map +1 -0
- package/dist/core/Camera.d.ts +172 -0
- package/dist/core/Camera.d.ts.map +1 -0
- package/dist/core/Camera2DFrame.d.ts +31 -0
- package/dist/core/Camera2DFrame.d.ts.map +1 -0
- package/dist/core/CameraExtensions.d.ts +420 -0
- package/dist/core/CameraExtensions.d.ts.map +1 -0
- package/dist/core/CameraFrame.d.ts +178 -0
- package/dist/core/CameraFrame.d.ts.map +1 -0
- package/dist/core/Group.d.ts +139 -0
- package/dist/core/Group.d.ts.map +1 -0
- package/dist/core/InteractiveScene.d.ts +122 -0
- package/dist/core/InteractiveScene.d.ts.map +1 -0
- package/dist/core/Lighting.d.ts +128 -0
- package/dist/core/Lighting.d.ts.map +1 -0
- package/dist/core/Mobject.d.ts +488 -0
- package/dist/core/Mobject.d.ts.map +1 -0
- package/dist/core/Renderer.d.ts +84 -0
- package/dist/core/Renderer.d.ts.map +1 -0
- package/dist/core/Scene.d.ts +353 -0
- package/dist/core/Scene.d.ts.map +1 -0
- package/dist/core/SceneExtensions.d.ts +640 -0
- package/dist/core/SceneExtensions.d.ts.map +1 -0
- package/dist/core/SceneExtensions.test.d.ts +2 -0
- package/dist/core/SceneExtensions.test.d.ts.map +1 -0
- package/dist/core/StateManager.d.ts +193 -0
- package/dist/core/StateManager.d.ts.map +1 -0
- package/dist/core/VDict.d.ts +229 -0
- package/dist/core/VDict.d.ts.map +1 -0
- package/dist/core/VGroup.d.ts +200 -0
- package/dist/core/VGroup.d.ts.map +1 -0
- package/dist/core/VMobject.d.ts +419 -0
- package/dist/core/VMobject.d.ts.map +1 -0
- package/dist/core/index.d.ts +16 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/examples.test.d.ts +2 -0
- package/dist/examples.test.d.ts.map +1 -0
- package/dist/export/GifExporter.d.ts +40 -0
- package/dist/export/GifExporter.d.ts.map +1 -0
- package/dist/export/VideoExporter.d.ts +135 -0
- package/dist/export/VideoExporter.d.ts.map +1 -0
- package/dist/export/index.d.ts +3 -0
- package/dist/export/index.d.ts.map +1 -0
- package/dist/index.d.ts +65 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +49064 -0
- package/dist/integrations/index.d.ts +1 -0
- package/dist/integrations/index.d.ts.map +1 -0
- package/dist/integrations/react.d.ts +144 -0
- package/dist/integrations/react.d.ts.map +1 -0
- package/dist/integrations/react.js +570 -0
- package/dist/integrations/vue.d.ts +249 -0
- package/dist/integrations/vue.d.ts.map +1 -0
- package/dist/integrations/vue.js +560 -0
- package/dist/interaction/Clickable.d.ts +71 -0
- package/dist/interaction/Clickable.d.ts.map +1 -0
- package/dist/interaction/Controls.d.ts +174 -0
- package/dist/interaction/Controls.d.ts.map +1 -0
- package/dist/interaction/Draggable.d.ts +88 -0
- package/dist/interaction/Draggable.d.ts.map +1 -0
- package/dist/interaction/Hoverable.d.ts +82 -0
- package/dist/interaction/Hoverable.d.ts.map +1 -0
- package/dist/interaction/OrbitControls.d.ts +139 -0
- package/dist/interaction/OrbitControls.d.ts.map +1 -0
- package/dist/interaction/PlaybackControls.d.ts +113 -0
- package/dist/interaction/PlaybackControls.d.ts.map +1 -0
- package/dist/interaction/SelectionManager.d.ts +125 -0
- package/dist/interaction/SelectionManager.d.ts.map +1 -0
- package/dist/interaction/index.d.ts +12 -0
- package/dist/interaction/index.d.ts.map +1 -0
- package/dist/mobjects/fractals/MandelbrotSet.d.ts +92 -0
- package/dist/mobjects/fractals/MandelbrotSet.d.ts.map +1 -0
- package/dist/mobjects/fractals/NewtonFractal.d.ts +121 -0
- package/dist/mobjects/fractals/NewtonFractal.d.ts.map +1 -0
- package/dist/mobjects/fractals/index.d.ts +3 -0
- package/dist/mobjects/fractals/index.d.ts.map +1 -0
- package/dist/mobjects/frame/index.d.ts +188 -0
- package/dist/mobjects/frame/index.d.ts.map +1 -0
- package/dist/mobjects/geometry/AngleShapes.d.ts +326 -0
- package/dist/mobjects/geometry/AngleShapes.d.ts.map +1 -0
- package/dist/mobjects/geometry/Arc.d.ts +111 -0
- package/dist/mobjects/geometry/Arc.d.ts.map +1 -0
- package/dist/mobjects/geometry/ArcBetweenPoints.d.ts +68 -0
- package/dist/mobjects/geometry/ArcBetweenPoints.d.ts.map +1 -0
- package/dist/mobjects/geometry/ArcShapes.d.ts +659 -0
- package/dist/mobjects/geometry/ArcShapes.d.ts.map +1 -0
- package/dist/mobjects/geometry/Arrow.d.ts +130 -0
- package/dist/mobjects/geometry/Arrow.d.ts.map +1 -0
- package/dist/mobjects/geometry/ArrowTips.d.ts +238 -0
- package/dist/mobjects/geometry/ArrowTips.d.ts.map +1 -0
- package/dist/mobjects/geometry/BooleanOperations.d.ts +163 -0
- package/dist/mobjects/geometry/BooleanOperations.d.ts.map +1 -0
- package/dist/mobjects/geometry/Circle.d.ts +92 -0
- package/dist/mobjects/geometry/Circle.d.ts.map +1 -0
- package/dist/mobjects/geometry/CubicBezier.d.ts +126 -0
- package/dist/mobjects/geometry/CubicBezier.d.ts.map +1 -0
- package/dist/mobjects/geometry/DashedLine.d.ts +109 -0
- package/dist/mobjects/geometry/DashedLine.d.ts.map +1 -0
- package/dist/mobjects/geometry/DashedVMobject.d.ts +96 -0
- package/dist/mobjects/geometry/DashedVMobject.d.ts.map +1 -0
- package/dist/mobjects/geometry/Dot.d.ts +100 -0
- package/dist/mobjects/geometry/Dot.d.ts.map +1 -0
- package/dist/mobjects/geometry/LabeledGeometry.d.ts +372 -0
- package/dist/mobjects/geometry/LabeledGeometry.d.ts.map +1 -0
- package/dist/mobjects/geometry/Line.d.ts +83 -0
- package/dist/mobjects/geometry/Line.d.ts.map +1 -0
- package/dist/mobjects/geometry/Polygon.d.ts +155 -0
- package/dist/mobjects/geometry/Polygon.d.ts.map +1 -0
- package/dist/mobjects/geometry/PolygonExtensions.d.ts +412 -0
- package/dist/mobjects/geometry/PolygonExtensions.d.ts.map +1 -0
- package/dist/mobjects/geometry/Rectangle.d.ts +123 -0
- package/dist/mobjects/geometry/Rectangle.d.ts.map +1 -0
- package/dist/mobjects/geometry/ShapeMatchers.d.ts +252 -0
- package/dist/mobjects/geometry/ShapeMatchers.d.ts.map +1 -0
- package/dist/mobjects/geometry/index.d.ts +25 -0
- package/dist/mobjects/geometry/index.d.ts.map +1 -0
- package/dist/mobjects/graph/index.d.ts +425 -0
- package/dist/mobjects/graph/index.d.ts.map +1 -0
- package/dist/mobjects/graphing/Axes.d.ts +254 -0
- package/dist/mobjects/graphing/Axes.d.ts.map +1 -0
- package/dist/mobjects/graphing/BarChart.d.ts +241 -0
- package/dist/mobjects/graphing/BarChart.d.ts.map +1 -0
- package/dist/mobjects/graphing/ComplexPlane.d.ts +311 -0
- package/dist/mobjects/graphing/ComplexPlane.d.ts.map +1 -0
- package/dist/mobjects/graphing/FunctionGraph.d.ts +123 -0
- package/dist/mobjects/graphing/FunctionGraph.d.ts.map +1 -0
- package/dist/mobjects/graphing/ImplicitFunction.d.ts +131 -0
- package/dist/mobjects/graphing/ImplicitFunction.d.ts.map +1 -0
- package/dist/mobjects/graphing/NumberLine.d.ts +195 -0
- package/dist/mobjects/graphing/NumberLine.d.ts.map +1 -0
- package/dist/mobjects/graphing/NumberPlane.d.ts +91 -0
- package/dist/mobjects/graphing/NumberPlane.d.ts.map +1 -0
- package/dist/mobjects/graphing/ParametricFunction.d.ts +111 -0
- package/dist/mobjects/graphing/ParametricFunction.d.ts.map +1 -0
- package/dist/mobjects/graphing/Vector.d.ts +121 -0
- package/dist/mobjects/graphing/Vector.d.ts.map +1 -0
- package/dist/mobjects/graphing/VectorField.d.ts +321 -0
- package/dist/mobjects/graphing/VectorField.d.ts.map +1 -0
- package/dist/mobjects/graphing/index.d.ts +18 -0
- package/dist/mobjects/graphing/index.d.ts.map +1 -0
- package/dist/mobjects/image/index.d.ts +223 -0
- package/dist/mobjects/image/index.d.ts.map +1 -0
- package/dist/mobjects/matrix/Matrix.d.ts +260 -0
- package/dist/mobjects/matrix/Matrix.d.ts.map +1 -0
- package/dist/mobjects/matrix/index.d.ts +8 -0
- package/dist/mobjects/matrix/index.d.ts.map +1 -0
- package/dist/mobjects/point/index.d.ts +707 -0
- package/dist/mobjects/point/index.d.ts.map +1 -0
- package/dist/mobjects/probability/DiceFace.d.ts +137 -0
- package/dist/mobjects/probability/DiceFace.d.ts.map +1 -0
- package/dist/mobjects/probability/SampleSpace.d.ts +267 -0
- package/dist/mobjects/probability/SampleSpace.d.ts.map +1 -0
- package/dist/mobjects/probability/index.d.ts +9 -0
- package/dist/mobjects/probability/index.d.ts.map +1 -0
- package/dist/mobjects/svg/Brace.d.ts +308 -0
- package/dist/mobjects/svg/Brace.d.ts.map +1 -0
- package/dist/mobjects/svg/SVGMobject.d.ts +64 -0
- package/dist/mobjects/svg/SVGMobject.d.ts.map +1 -0
- package/dist/mobjects/svg/index.d.ts +10 -0
- package/dist/mobjects/svg/index.d.ts.map +1 -0
- package/dist/mobjects/table/Table.d.ts +315 -0
- package/dist/mobjects/table/Table.d.ts.map +1 -0
- package/dist/mobjects/table/index.d.ts +8 -0
- package/dist/mobjects/table/index.d.ts.map +1 -0
- package/dist/mobjects/text/Code.d.ts +244 -0
- package/dist/mobjects/text/Code.d.ts.map +1 -0
- package/dist/mobjects/text/DecimalNumber.d.ts +199 -0
- package/dist/mobjects/text/DecimalNumber.d.ts.map +1 -0
- package/dist/mobjects/text/GlyphVMobject.d.ts +76 -0
- package/dist/mobjects/text/GlyphVMobject.d.ts.map +1 -0
- package/dist/mobjects/text/MarkupText.d.ts +161 -0
- package/dist/mobjects/text/MarkupText.d.ts.map +1 -0
- package/dist/mobjects/text/MathJaxRenderer.d.ts +49 -0
- package/dist/mobjects/text/MathJaxRenderer.d.ts.map +1 -0
- package/dist/mobjects/text/MathTex.d.ts +242 -0
- package/dist/mobjects/text/MathTex.d.ts.map +1 -0
- package/dist/mobjects/text/Paragraph.d.ts +86 -0
- package/dist/mobjects/text/Paragraph.d.ts.map +1 -0
- package/dist/mobjects/text/Tex.d.ts +40 -0
- package/dist/mobjects/text/Tex.d.ts.map +1 -0
- package/dist/mobjects/text/Text.d.ts +171 -0
- package/dist/mobjects/text/Text.d.ts.map +1 -0
- package/dist/mobjects/text/TextExtensions.d.ts +383 -0
- package/dist/mobjects/text/TextExtensions.d.ts.map +1 -0
- package/dist/mobjects/text/TextGlyphGroup.d.ts +48 -0
- package/dist/mobjects/text/TextGlyphGroup.d.ts.map +1 -0
- package/dist/mobjects/text/Variable.d.ts +160 -0
- package/dist/mobjects/text/Variable.d.ts.map +1 -0
- package/dist/mobjects/text/index.d.ts +21 -0
- package/dist/mobjects/text/index.d.ts.map +1 -0
- package/dist/mobjects/text/katex-styles.d.ts +23 -0
- package/dist/mobjects/text/katex-styles.d.ts.map +1 -0
- package/dist/mobjects/text/svgPathParser.d.ts +39 -0
- package/dist/mobjects/text/svgPathParser.d.ts.map +1 -0
- package/dist/mobjects/three-d/Arrow3D.d.ts +136 -0
- package/dist/mobjects/three-d/Arrow3D.d.ts.map +1 -0
- package/dist/mobjects/three-d/Cube.d.ts +186 -0
- package/dist/mobjects/three-d/Cube.d.ts.map +1 -0
- package/dist/mobjects/three-d/Cylinder.d.ts +189 -0
- package/dist/mobjects/three-d/Cylinder.d.ts.map +1 -0
- package/dist/mobjects/three-d/Line3D.d.ts +100 -0
- package/dist/mobjects/three-d/Line3D.d.ts.map +1 -0
- package/dist/mobjects/three-d/ParametricSurface.d.ts +86 -0
- package/dist/mobjects/three-d/ParametricSurface.d.ts.map +1 -0
- package/dist/mobjects/three-d/Polyhedra.d.ts +271 -0
- package/dist/mobjects/three-d/Polyhedra.d.ts.map +1 -0
- package/dist/mobjects/three-d/Sphere.d.ts +100 -0
- package/dist/mobjects/three-d/Sphere.d.ts.map +1 -0
- package/dist/mobjects/three-d/Surface3D.d.ts +156 -0
- package/dist/mobjects/three-d/Surface3D.d.ts.map +1 -0
- package/dist/mobjects/three-d/TexturedSurface.d.ts +208 -0
- package/dist/mobjects/three-d/TexturedSurface.d.ts.map +1 -0
- package/dist/mobjects/three-d/ThreeDAxes.d.ts +172 -0
- package/dist/mobjects/three-d/ThreeDAxes.d.ts.map +1 -0
- package/dist/mobjects/three-d/ThreeDExtensions.d.ts +335 -0
- package/dist/mobjects/three-d/ThreeDExtensions.d.ts.map +1 -0
- package/dist/mobjects/three-d/Torus.d.ts +123 -0
- package/dist/mobjects/three-d/Torus.d.ts.map +1 -0
- package/dist/mobjects/three-d/index.d.ts +19 -0
- package/dist/mobjects/three-d/index.d.ts.map +1 -0
- package/dist/mobjects/value-tracker/ValueTracker.d.ts +248 -0
- package/dist/mobjects/value-tracker/ValueTracker.d.ts.map +1 -0
- package/dist/mobjects/value-tracker/index.d.ts +9 -0
- package/dist/mobjects/value-tracker/index.d.ts.map +1 -0
- package/dist/rate-functions/index.d.ts +81 -0
- package/dist/rate-functions/index.d.ts.map +1 -0
- package/dist/rate-functions/rateFunctions.test.d.ts +2 -0
- package/dist/rate-functions/rateFunctions.test.d.ts.map +1 -0
- package/dist/rendering/BezierRenderer.d.ts +112 -0
- package/dist/rendering/BezierRenderer.d.ts.map +1 -0
- package/dist/rendering/BezierShaderMaterial.d.ts +50 -0
- package/dist/rendering/BezierShaderMaterial.d.ts.map +1 -0
- package/dist/rendering/index.d.ts +10 -0
- package/dist/rendering/index.d.ts.map +1 -0
- package/dist/utils/Performance.d.ts +118 -0
- package/dist/utils/Performance.d.ts.map +1 -0
- package/dist/utils/featureFlags.d.ts +15 -0
- package/dist/utils/featureFlags.d.ts.map +1 -0
- package/dist/utils/hungarian.d.ts +66 -0
- package/dist/utils/hungarian.d.ts.map +1 -0
- package/dist/utils/logger.d.ts +14 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/math.d.ts +52 -0
- package/dist/utils/math.d.ts.map +1 -0
- package/dist/utils/ode.d.ts +135 -0
- package/dist/utils/ode.d.ts.map +1 -0
- package/dist/utils/skeletonize.d.ts +35 -0
- package/dist/utils/skeletonize.d.ts.map +1 -0
- package/dist/utils/triangulate.d.ts +54 -0
- package/dist/utils/triangulate.d.ts.map +1 -0
- package/dist/utils/vectors.d.ts +57 -0
- package/dist/utils/vectors.d.ts.map +1 -0
- package/package.json +122 -0
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
import { VMobject } from '../../core/VMobject';
|
|
2
|
+
import { Mobject, Vector3Tuple } from '../../core/Mobject';
|
|
3
|
+
import { Group } from '../../core/Group';
|
|
4
|
+
import { Text } from '../text/Text';
|
|
5
|
+
import { MathTex } from '../text/MathTex';
|
|
6
|
+
import { Arc } from '../geometry/Arc';
|
|
7
|
+
/**
|
|
8
|
+
* Options for creating a Brace
|
|
9
|
+
*/
|
|
10
|
+
export interface BraceOptions {
|
|
11
|
+
/** Direction to place the brace relative to the mobject. Default: DOWN */
|
|
12
|
+
direction?: Vector3Tuple;
|
|
13
|
+
/** Buffer distance from the mobject. Default: 0.2 */
|
|
14
|
+
buff?: number;
|
|
15
|
+
/** Stroke color as CSS color string. Default: WHITE */
|
|
16
|
+
color?: string;
|
|
17
|
+
/** Stroke width in pixels. Default: 4 */
|
|
18
|
+
strokeWidth?: number;
|
|
19
|
+
/** Sharpness of the brace tip (0-1). Default: 2 */
|
|
20
|
+
sharpness?: number;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Options for creating a BraceBetweenPoints
|
|
24
|
+
*/
|
|
25
|
+
export interface BraceBetweenPointsOptions {
|
|
26
|
+
/** Start point of the brace */
|
|
27
|
+
start: Vector3Tuple;
|
|
28
|
+
/** End point of the brace */
|
|
29
|
+
end: Vector3Tuple;
|
|
30
|
+
/** Direction perpendicular to the line between points. Default: computed from points */
|
|
31
|
+
direction?: Vector3Tuple;
|
|
32
|
+
/** Buffer distance. Default: 0.2 */
|
|
33
|
+
buff?: number;
|
|
34
|
+
/** Stroke color as CSS color string. Default: WHITE */
|
|
35
|
+
color?: string;
|
|
36
|
+
/** Stroke width in pixels. Default: 4 */
|
|
37
|
+
strokeWidth?: number;
|
|
38
|
+
/** Sharpness of the brace tip (0-1). Default: 2 */
|
|
39
|
+
sharpness?: number;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Options for creating an ArcBrace
|
|
43
|
+
*/
|
|
44
|
+
export interface ArcBraceOptions {
|
|
45
|
+
/** The arc to place the brace on */
|
|
46
|
+
arc: Arc;
|
|
47
|
+
/** Direction to place the brace (1 = outside, -1 = inside). Default: 1 */
|
|
48
|
+
direction?: number;
|
|
49
|
+
/** Buffer distance from the arc. Default: 0.2 */
|
|
50
|
+
buff?: number;
|
|
51
|
+
/** Stroke color as CSS color string. Default: WHITE */
|
|
52
|
+
color?: string;
|
|
53
|
+
/** Stroke width in pixels. Default: 4 */
|
|
54
|
+
strokeWidth?: number;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Options for creating a BraceLabel
|
|
58
|
+
*/
|
|
59
|
+
export interface BraceLabelOptions extends BraceOptions {
|
|
60
|
+
/** The label to attach (string or Mobject). Default: '' */
|
|
61
|
+
label?: string | Mobject;
|
|
62
|
+
/** Font size for text labels. Default: 36 */
|
|
63
|
+
fontSize?: number;
|
|
64
|
+
/** Buffer between brace tip and label. Default: 0.2 */
|
|
65
|
+
labelBuff?: number;
|
|
66
|
+
/** Color for the label. Default: WHITE */
|
|
67
|
+
labelColor?: string;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Brace - A curly brace shape constructed with cubic Bezier curves
|
|
71
|
+
*
|
|
72
|
+
* Creates the classic { brace shape that can be placed alongside a mobject
|
|
73
|
+
* to indicate grouping or measurement.
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* ```typescript
|
|
77
|
+
* // Create a brace under a rectangle
|
|
78
|
+
* const rect = new Rectangle({ width: 3, height: 2 });
|
|
79
|
+
* const brace = new Brace(rect, { direction: DOWN });
|
|
80
|
+
*
|
|
81
|
+
* // Create a brace to the left of a circle
|
|
82
|
+
* const circle = new Circle({ radius: 1 });
|
|
83
|
+
* const leftBrace = new Brace(circle, { direction: LEFT });
|
|
84
|
+
* ```
|
|
85
|
+
*/
|
|
86
|
+
export declare class Brace extends VMobject {
|
|
87
|
+
/** The mobject this brace is attached to */
|
|
88
|
+
readonly mobject: Mobject | null;
|
|
89
|
+
/** The direction the brace points */
|
|
90
|
+
readonly braceDirection: Vector3Tuple;
|
|
91
|
+
/** Buffer distance from the mobject */
|
|
92
|
+
readonly buff: number;
|
|
93
|
+
/** Sharpness of the brace tip */
|
|
94
|
+
readonly sharpness: number;
|
|
95
|
+
/** Tip point of the brace */
|
|
96
|
+
protected _tipPoint: Vector3Tuple;
|
|
97
|
+
constructor(mobject: Mobject, options?: BraceOptions);
|
|
98
|
+
/**
|
|
99
|
+
* Generate the Bezier curve points for the curly brace shape.
|
|
100
|
+
* Projects the mobject's actual points onto the brace's perpendicular axis
|
|
101
|
+
* to correctly handle diagonal and arbitrarily-oriented mobjects.
|
|
102
|
+
*/
|
|
103
|
+
protected _generateBracePoints(): void;
|
|
104
|
+
/**
|
|
105
|
+
* Generate the brace shape between two points as a filled outline.
|
|
106
|
+
*
|
|
107
|
+
* Creates a curly brace using cubic Bezier curves that match
|
|
108
|
+
* the Manim CE brace proportions. The shape is rendered as a filled
|
|
109
|
+
* closed path with variable thickness:
|
|
110
|
+
* - Thin at the end curls (tapering to points)
|
|
111
|
+
* - Thick at the arm sections
|
|
112
|
+
* - Thin at the center tip (tapering to a point)
|
|
113
|
+
*/
|
|
114
|
+
protected _generateBraceFromPoints(start: Vector3Tuple, end: Vector3Tuple, direction: Vector3Tuple): void;
|
|
115
|
+
/**
|
|
116
|
+
* Get the tip point of the brace (the peak of the { shape)
|
|
117
|
+
* @returns Tip point as [x, y, z]
|
|
118
|
+
*/
|
|
119
|
+
getTip(): Vector3Tuple;
|
|
120
|
+
/**
|
|
121
|
+
* Get the direction the brace is facing
|
|
122
|
+
* @returns Direction as normalized [x, y, z]
|
|
123
|
+
*/
|
|
124
|
+
getDirection(): Vector3Tuple;
|
|
125
|
+
/**
|
|
126
|
+
* Create a Text label positioned at the tip of the brace.
|
|
127
|
+
* Mirrors Manim's Brace.get_text() API.
|
|
128
|
+
*/
|
|
129
|
+
getText(text: string, options?: {
|
|
130
|
+
fontSize?: number;
|
|
131
|
+
color?: string;
|
|
132
|
+
buff?: number;
|
|
133
|
+
}): Text;
|
|
134
|
+
/**
|
|
135
|
+
* Create a MathTex label positioned at the tip of the brace.
|
|
136
|
+
* Mirrors Manim's Brace.get_tex() API.
|
|
137
|
+
*/
|
|
138
|
+
getTex(latex: string, options?: {
|
|
139
|
+
fontSize?: number;
|
|
140
|
+
color?: string;
|
|
141
|
+
buff?: number;
|
|
142
|
+
}): MathTex;
|
|
143
|
+
/**
|
|
144
|
+
* Create a copy of this Brace
|
|
145
|
+
*/
|
|
146
|
+
protected _createCopy(): Brace;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* BraceBetweenPoints - A curly brace between two arbitrary points
|
|
150
|
+
*
|
|
151
|
+
* Similar to Brace but allows specifying exact endpoints.
|
|
152
|
+
*
|
|
153
|
+
* @example
|
|
154
|
+
* ```typescript
|
|
155
|
+
* // Create a brace between two points
|
|
156
|
+
* const brace = new BraceBetweenPoints({
|
|
157
|
+
* start: [-2, 0, 0],
|
|
158
|
+
* end: [2, 0, 0],
|
|
159
|
+
* direction: DOWN,
|
|
160
|
+
* });
|
|
161
|
+
* ```
|
|
162
|
+
*/
|
|
163
|
+
export declare class BraceBetweenPoints extends VMobject {
|
|
164
|
+
protected _start: Vector3Tuple;
|
|
165
|
+
protected _end: Vector3Tuple;
|
|
166
|
+
protected _direction: Vector3Tuple;
|
|
167
|
+
protected _buff: number;
|
|
168
|
+
protected _sharpness: number;
|
|
169
|
+
protected _tipPoint: Vector3Tuple;
|
|
170
|
+
constructor(options: BraceBetweenPointsOptions);
|
|
171
|
+
/**
|
|
172
|
+
* Generate the Bezier curve points for the curly brace shape
|
|
173
|
+
*/
|
|
174
|
+
protected _generateBracePoints(): void;
|
|
175
|
+
/**
|
|
176
|
+
* Generate the brace shape between two points as a filled outline.
|
|
177
|
+
* Same algorithm as Brace._generateBraceFromPoints.
|
|
178
|
+
*/
|
|
179
|
+
protected _generateBraceFromPoints(start: Vector3Tuple, end: Vector3Tuple, direction: Vector3Tuple): void;
|
|
180
|
+
/**
|
|
181
|
+
* Get the tip point of the brace
|
|
182
|
+
* @returns Tip point as [x, y, z]
|
|
183
|
+
*/
|
|
184
|
+
getTip(): Vector3Tuple;
|
|
185
|
+
/**
|
|
186
|
+
* Get the direction the brace is facing
|
|
187
|
+
* @returns Direction as normalized [x, y, z]
|
|
188
|
+
*/
|
|
189
|
+
getDirection(): Vector3Tuple;
|
|
190
|
+
/**
|
|
191
|
+
* Get the start point
|
|
192
|
+
*/
|
|
193
|
+
getStart(): Vector3Tuple;
|
|
194
|
+
/**
|
|
195
|
+
* Get the end point
|
|
196
|
+
*/
|
|
197
|
+
getEnd(): Vector3Tuple;
|
|
198
|
+
/**
|
|
199
|
+
* Create a copy of this BraceBetweenPoints
|
|
200
|
+
*/
|
|
201
|
+
protected _createCopy(): BraceBetweenPoints;
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* ArcBrace - A curly brace that follows an arc
|
|
205
|
+
*
|
|
206
|
+
* Creates a brace that curves along an arc, useful for indicating
|
|
207
|
+
* angles or sections of circular arrangements.
|
|
208
|
+
*
|
|
209
|
+
* @example
|
|
210
|
+
* ```typescript
|
|
211
|
+
* // Create an arc brace on the outside of an arc
|
|
212
|
+
* const arc = new Arc({ radius: 2, angle: Math.PI / 2 });
|
|
213
|
+
* const brace = new ArcBrace({ arc });
|
|
214
|
+
*
|
|
215
|
+
* // Create an arc brace on the inside
|
|
216
|
+
* const innerBrace = new ArcBrace({ arc, direction: -1 });
|
|
217
|
+
* ```
|
|
218
|
+
*/
|
|
219
|
+
export declare class ArcBrace extends VMobject {
|
|
220
|
+
protected _arc: Arc;
|
|
221
|
+
protected _direction: number;
|
|
222
|
+
protected _buff: number;
|
|
223
|
+
protected _tipPoint: Vector3Tuple;
|
|
224
|
+
constructor(options: ArcBraceOptions);
|
|
225
|
+
/**
|
|
226
|
+
* Generate points for the arc brace
|
|
227
|
+
*/
|
|
228
|
+
protected _generateArcBracePoints(): void;
|
|
229
|
+
/**
|
|
230
|
+
* Get the tip point of the arc brace
|
|
231
|
+
* @returns Tip point as [x, y, z]
|
|
232
|
+
*/
|
|
233
|
+
getTip(): Vector3Tuple;
|
|
234
|
+
/**
|
|
235
|
+
* Get the direction (1 = outside, -1 = inside)
|
|
236
|
+
*/
|
|
237
|
+
getDirection(): number;
|
|
238
|
+
/**
|
|
239
|
+
* Create a copy of this ArcBrace
|
|
240
|
+
*/
|
|
241
|
+
protected _createCopy(): ArcBrace;
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* BraceLabel - A brace with an attached label
|
|
245
|
+
*
|
|
246
|
+
* Creates a curly brace with a text or mobject label positioned
|
|
247
|
+
* at the tip of the brace.
|
|
248
|
+
*
|
|
249
|
+
* @example
|
|
250
|
+
* ```typescript
|
|
251
|
+
* // Create a labeled brace
|
|
252
|
+
* const rect = new Rectangle({ width: 3, height: 2 });
|
|
253
|
+
* const brace = new BraceLabel(rect, {
|
|
254
|
+
* label: 'width',
|
|
255
|
+
* direction: DOWN,
|
|
256
|
+
* });
|
|
257
|
+
*
|
|
258
|
+
* // Access the label
|
|
259
|
+
* const label = brace.getLabel();
|
|
260
|
+
* ```
|
|
261
|
+
*/
|
|
262
|
+
export declare class BraceLabel extends Group {
|
|
263
|
+
protected _brace: Brace;
|
|
264
|
+
protected _label: Mobject | null;
|
|
265
|
+
protected _labelBuff: number;
|
|
266
|
+
constructor(mobject: Mobject, options?: BraceLabelOptions);
|
|
267
|
+
/**
|
|
268
|
+
* Position the label at the tip of the brace
|
|
269
|
+
*/
|
|
270
|
+
protected _positionLabel(): void;
|
|
271
|
+
/**
|
|
272
|
+
* Get the brace component
|
|
273
|
+
*/
|
|
274
|
+
getBrace(): Brace;
|
|
275
|
+
/**
|
|
276
|
+
* Get the label component
|
|
277
|
+
*/
|
|
278
|
+
getLabel(): Mobject | null;
|
|
279
|
+
/**
|
|
280
|
+
* Get the tip point of the brace
|
|
281
|
+
*/
|
|
282
|
+
getTip(): Vector3Tuple;
|
|
283
|
+
/**
|
|
284
|
+
* Create a copy of this BraceLabel
|
|
285
|
+
*/
|
|
286
|
+
protected _createCopy(): BraceLabel;
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* BraceText - Alias for BraceLabel with text
|
|
290
|
+
*
|
|
291
|
+
* A convenience class that is identical to BraceLabel.
|
|
292
|
+
* Provided for API compatibility with Manim.
|
|
293
|
+
*
|
|
294
|
+
* @example
|
|
295
|
+
* ```typescript
|
|
296
|
+
* // These are equivalent:
|
|
297
|
+
* const brace1 = new BraceLabel(mobject, { label: 'text' });
|
|
298
|
+
* const brace2 = new BraceText(mobject, 'text');
|
|
299
|
+
* ```
|
|
300
|
+
*/
|
|
301
|
+
export declare class BraceText extends BraceLabel {
|
|
302
|
+
constructor(mobject: Mobject, text: string, options?: Omit<BraceLabelOptions, 'label'>);
|
|
303
|
+
/**
|
|
304
|
+
* Create a copy of this BraceText
|
|
305
|
+
*/
|
|
306
|
+
protected _createCopy(): BraceText;
|
|
307
|
+
}
|
|
308
|
+
//# sourceMappingURL=Brace.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Brace.d.ts","sourceRoot":"","sources":["../../../src/mobjects/svg/Brace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,YAAY,EAAQ,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAGtC;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,0EAA0E;IAC1E,SAAS,CAAC,EAAE,YAAY,CAAC;IACzB,qDAAqD;IACrD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uDAA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QAAQ,IAAI,KAAK;IAIjB;;OAEG;IACH,QAAQ,IAAI,OAAO,GAAG,IAAI;IAI1B;;OAEG;IACH,MAAM,IAAI,YAAY;IAItB;;OAEG;cACgB,WAAW,IAAI,UAAU;CAa7C;AAGD;;;;;;;;;;;;GAYG;AACH,qBAAa,SAAU,SAAQ,UAAU;gBAErC,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,IAAI,CAAC,iBAAiB,EAAE,OAAO,CAAM;IAKhD;;OAEG;cACgB,WAAW,IAAI,SAAS;CAa5C"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { VMobject } from '../../core/VMobject';
|
|
2
|
+
import { VGroup } from '../../core/VGroup';
|
|
3
|
+
/**
|
|
4
|
+
* SVGMobject options
|
|
5
|
+
*/
|
|
6
|
+
export interface SVGMobjectOptions {
|
|
7
|
+
/** SVG string content */
|
|
8
|
+
svgString?: string;
|
|
9
|
+
/** Stroke color (default: WHITE) */
|
|
10
|
+
color?: string;
|
|
11
|
+
/** Stroke width (default: DEFAULT_STROKE_WIDTH) */
|
|
12
|
+
strokeWidth?: number;
|
|
13
|
+
/** Fill color (optional) */
|
|
14
|
+
fillColor?: string;
|
|
15
|
+
/** Fill opacity (default: 0) */
|
|
16
|
+
fillOpacity?: number;
|
|
17
|
+
/** Scale to fit within this height */
|
|
18
|
+
height?: number;
|
|
19
|
+
/** Scale to fit within this width */
|
|
20
|
+
width?: number;
|
|
21
|
+
/** Center position */
|
|
22
|
+
center?: [number, number, number];
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* VMobjectFromSVGPath options
|
|
26
|
+
*/
|
|
27
|
+
export interface VMobjectFromSVGPathOptions {
|
|
28
|
+
/** SVG path d attribute */
|
|
29
|
+
pathData: string;
|
|
30
|
+
/** Stroke color */
|
|
31
|
+
color?: string;
|
|
32
|
+
/** Stroke width */
|
|
33
|
+
strokeWidth?: number;
|
|
34
|
+
/** Fill color */
|
|
35
|
+
fillColor?: string;
|
|
36
|
+
/** Fill opacity */
|
|
37
|
+
fillOpacity?: number;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* VMobjectFromSVGPath - create a VMobject from a single SVG path d attribute.
|
|
41
|
+
*/
|
|
42
|
+
export declare class VMobjectFromSVGPath extends VMobject {
|
|
43
|
+
private _pathData;
|
|
44
|
+
constructor(options: VMobjectFromSVGPathOptions);
|
|
45
|
+
protected _createCopy(): VMobjectFromSVGPath;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* SVGMobject - parse and display SVG content as a group of VMobjects.
|
|
49
|
+
*/
|
|
50
|
+
export declare class SVGMobject extends VGroup {
|
|
51
|
+
private _svgString;
|
|
52
|
+
constructor(options?: SVGMobjectOptions);
|
|
53
|
+
private _parseSVG;
|
|
54
|
+
/**
|
|
55
|
+
* Get all subpaths as individual VMobjects.
|
|
56
|
+
*/
|
|
57
|
+
getSubpaths(): VMobject[];
|
|
58
|
+
protected _createCopy(): SVGMobject;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Parse SVG string and create an SVGMobject.
|
|
62
|
+
*/
|
|
63
|
+
export declare function svgMobject(svgString: string, options?: Omit<SVGMobjectOptions, 'svgString'>): SVGMobject;
|
|
64
|
+
//# sourceMappingURL=SVGMobject.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SVGMobject.d.ts","sourceRoot":"","sources":["../../../src/mobjects/svg/SVGMobject.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAO3C;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,yBAAyB;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oCAAoC;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mDAAmD;IACnD,WA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mobjects that are traditionally SVG-based in Manim,
|
|
5
|
+
* but are implemented using Bezier curves for consistency with the rest
|
|
6
|
+
* of the manimweb rendering pipeline.
|
|
7
|
+
*/
|
|
8
|
+
export { Brace, BraceBetweenPoints, ArcBrace, BraceLabel, BraceText, type BraceOptions, type BraceBetweenPointsOptions, type ArcBraceOptions, type BraceLabelOptions, } from './Brace';
|
|
9
|
+
export { SVGMobject, svgMobject, VMobjectFromSVGPath, type SVGMobjectOptions, type VMobjectFromSVGPathOptions, } from './SVGMobject';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/mobjects/svg/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EACL,KAAK,EACL,kBAAkB,EAClB,QAAQ,EACR,UAAU,EACV,SAAS,EACT,KAAK,YAAY,EACjB,KAAK,yBAAyB,EAC9B,KAAK,eAAe,EACpB,KAAK,iBAAiB,GACvB,MAAM,SAAS,CAAC;AAGjB,OAAO,EACL,UAAU,EACV,UAAU,EACV,mBAAmB,EACnB,KAAK,iBAAiB,EACtB,KAAK,0BAA0B,GAChC,MAAM,cAAc,CAAC"}
|