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,121 @@
|
|
|
1
|
+
import { Vector3Tuple } from '../../core/Mobject';
|
|
2
|
+
import { Arrow } from '../geometry';
|
|
3
|
+
/**
|
|
4
|
+
* Options for creating a VectorFieldVector
|
|
5
|
+
*/
|
|
6
|
+
export interface VectorFieldVectorOptions {
|
|
7
|
+
/** The direction of the vector as [x, y, z] */
|
|
8
|
+
direction: Vector3Tuple;
|
|
9
|
+
/** The starting point of the vector. Default: [0, 0, 0] */
|
|
10
|
+
startPoint?: Vector3Tuple;
|
|
11
|
+
/** Stroke color. Default: '#58c4dd' (Manim blue) */
|
|
12
|
+
color?: string;
|
|
13
|
+
/** Stroke width in pixels. Default: 2 */
|
|
14
|
+
strokeWidth?: number;
|
|
15
|
+
/** Length of the arrow tip. Default: 0.2 */
|
|
16
|
+
tipLength?: number;
|
|
17
|
+
/** Maximum length for vector fields. Default: Infinity (no cap) */
|
|
18
|
+
maxLength?: number;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* VectorFieldVector - A mathematical vector represented as an arrow
|
|
22
|
+
*
|
|
23
|
+
* Convenience class for working with vectors in mathematical contexts.
|
|
24
|
+
* Extends Arrow with additional methods for vector operations.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```typescript
|
|
28
|
+
* // Create a vector pointing in the direction [1, 1, 0]
|
|
29
|
+
* const v = new VectorFieldVector({
|
|
30
|
+
* direction: [1, 1, 0]
|
|
31
|
+
* });
|
|
32
|
+
*
|
|
33
|
+
* // Create a vector at a specific position
|
|
34
|
+
* const w = new VectorFieldVector({
|
|
35
|
+
* direction: [2, 0, 0],
|
|
36
|
+
* startPoint: [1, 1, 0]
|
|
37
|
+
* });
|
|
38
|
+
*
|
|
39
|
+
* // Create a capped vector for vector fields
|
|
40
|
+
* const fieldVector = new VectorFieldVector({
|
|
41
|
+
* direction: [10, 10, 0],
|
|
42
|
+
* maxLength: 1.5 // Will be scaled down to length 1.5
|
|
43
|
+
* });
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
export declare class VectorFieldVector extends Arrow {
|
|
47
|
+
private _direction;
|
|
48
|
+
private _startPoint;
|
|
49
|
+
private _maxLength;
|
|
50
|
+
constructor(options: VectorFieldVectorOptions);
|
|
51
|
+
/**
|
|
52
|
+
* Get the direction vector
|
|
53
|
+
*/
|
|
54
|
+
getDirection(): Vector3Tuple;
|
|
55
|
+
/**
|
|
56
|
+
* Set the direction vector
|
|
57
|
+
* @param direction - New direction as [x, y, z]
|
|
58
|
+
*/
|
|
59
|
+
setDirection(direction: Vector3Tuple): this;
|
|
60
|
+
/**
|
|
61
|
+
* Get the magnitude (length) of the vector
|
|
62
|
+
*/
|
|
63
|
+
getMagnitude(): number;
|
|
64
|
+
/**
|
|
65
|
+
* Get the visual length of the vector (may be capped by maxLength)
|
|
66
|
+
*/
|
|
67
|
+
getVisualLength(): number;
|
|
68
|
+
/**
|
|
69
|
+
* Set the length of the vector (scales the direction)
|
|
70
|
+
* @param length - New length for the vector
|
|
71
|
+
*/
|
|
72
|
+
setMagnitude(length: number): this;
|
|
73
|
+
/**
|
|
74
|
+
* Get the unit vector (normalized direction)
|
|
75
|
+
*/
|
|
76
|
+
getUnitVector(): Vector3Tuple;
|
|
77
|
+
/**
|
|
78
|
+
* Get the start point
|
|
79
|
+
*/
|
|
80
|
+
getStartPoint(): Vector3Tuple;
|
|
81
|
+
/**
|
|
82
|
+
* Set the start point (keeps the same direction)
|
|
83
|
+
*/
|
|
84
|
+
setStartPoint(point: Vector3Tuple): this;
|
|
85
|
+
/**
|
|
86
|
+
* Get the maximum length constraint
|
|
87
|
+
*/
|
|
88
|
+
getMaxLength(): number;
|
|
89
|
+
/**
|
|
90
|
+
* Set the maximum length constraint
|
|
91
|
+
*/
|
|
92
|
+
setMaxLength(maxLength: number): this;
|
|
93
|
+
/**
|
|
94
|
+
* Get the angle of the vector in the XY plane (in radians)
|
|
95
|
+
*/
|
|
96
|
+
getAngleXY(): number;
|
|
97
|
+
/**
|
|
98
|
+
* Scale the direction vector by a factor
|
|
99
|
+
* Note: This method is named scaleDirection to avoid conflict with
|
|
100
|
+
* the inherited scaleVector property from Mobject.
|
|
101
|
+
*/
|
|
102
|
+
scaleDirection(factor: number): this;
|
|
103
|
+
/**
|
|
104
|
+
* Add another vector to this one
|
|
105
|
+
*/
|
|
106
|
+
addVector(other: VectorFieldVector | Vector3Tuple): this;
|
|
107
|
+
/**
|
|
108
|
+
* Compute the dot product with another vector
|
|
109
|
+
*/
|
|
110
|
+
dot(other: VectorFieldVector | Vector3Tuple): number;
|
|
111
|
+
/**
|
|
112
|
+
* Compute the cross product with another vector
|
|
113
|
+
*/
|
|
114
|
+
cross(other: VectorFieldVector | Vector3Tuple): Vector3Tuple;
|
|
115
|
+
/**
|
|
116
|
+
* Create a copy of this VectorFieldVector
|
|
117
|
+
*/
|
|
118
|
+
protected _createCopy(): Arrow;
|
|
119
|
+
}
|
|
120
|
+
export default VectorFieldVector;
|
|
121
|
+
//# sourceMappingURL=Vector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Vector.d.ts","sourceRoot":"","sources":["../../../src/mobjects/graphing/Vector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,+CAA+C;IAC/C,SAAS,EAAE,YAAY,CAAC;IACxB,2DAA2D;IAC3D,UAAU,CAAC,EAAE,YAAY,CAAC;IAC1B,oDAAoD;IACpD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yCAAyC;IACzC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4CAA4C;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mEAAmE;IACnE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,qBAAa,iBAAkB,SAAQ,KAAK;IAC1C,OAAO,CAAC,UAAU,CAAe;IACjC,OAAO,CAAC,WAAW,CAAe;IAClC,OAAO,CAAC,UAAU,CAAS;gBAEf,OAAO,EAAE,wBAAwB;IAiD7C;;OAEG;IACH,YAAY,IAAI,YAAY;IAI5B;;;OAGG;IACH,YAAY,CAAC,SAAS,EAAE,YAAY,GAAG,IAAI;IAkC3C;;OAEG;IACH,YAAY,IAAI,MAAM;IAQtB;;OAEG;IACH,eAAe,IAAI,MAAM;IAIzB;;;OAGG;IACH,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAgBlC;;OAEG;IACH,aAAa,IAAI,YAAY;IAU7B;;OAEG;IACH,aAAa,IAAI,YAAY;IAI7B;;OAEG;IACH,aAAa,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI;IAMxC;;OAEG;IACH,YAAY,IAAI,MAAM;IAItB;;OAEG;IACH,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAMrC;;OAEG;IACH,UAAU,IAAI,MAAM;IAIpB;;;;OAIG;IACH,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IASpC;;OAEG;IACH,SAAS,CAAC,KAAK,EAAE,iBAAiB,GAAG,YAAY,GAAG,IAAI;IAUxD;;OAEG;IACH,GAAG,CAAC,KAAK,EAAE,iBAAiB,GAAG,YAAY,GAAG,MAAM;IASpD;;OAEG;IACH,KAAK,CAAC,KAAK,EAAE,iBAAiB,GAAG,YAAY,GAAG,YAAY;IAS5D;;OAEG;cACgB,WAAW,IAAI,KAAK;CAUxC;AAED,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
import { Group } from '../../core/Group';
|
|
2
|
+
/**
|
|
3
|
+
* Type for vector field function that maps (x, y) to [vx, vy]
|
|
4
|
+
*/
|
|
5
|
+
export type VectorFunction = (x: number, y: number) => [number, number];
|
|
6
|
+
/**
|
|
7
|
+
* Type for color function that maps magnitude (or x, y, vx, vy) to a color string
|
|
8
|
+
*/
|
|
9
|
+
export type ColorFunction = (magnitude: number, x: number, y: number, vx: number, vy: number) => string;
|
|
10
|
+
/**
|
|
11
|
+
* Base options for all vector field types
|
|
12
|
+
*/
|
|
13
|
+
export interface VectorFieldBaseOptions {
|
|
14
|
+
/** The vector function mapping (x, y) to [vx, vy] */
|
|
15
|
+
func: VectorFunction;
|
|
16
|
+
/** X range as [min, max, step]. Default: [-5, 5, 0.5] */
|
|
17
|
+
xRange?: [number, number, number];
|
|
18
|
+
/** Y range as [min, max, step]. Default: [-3, 3, 0.5] */
|
|
19
|
+
yRange?: [number, number, number];
|
|
20
|
+
/** Length scaling factor for vectors. Default: 1 */
|
|
21
|
+
lengthScale?: number;
|
|
22
|
+
/** Color function or static color. Default: magnitude-based gradient */
|
|
23
|
+
color?: string | ColorFunction;
|
|
24
|
+
/** Minimum magnitude threshold (vectors smaller are not drawn). Default: 0 */
|
|
25
|
+
minMagnitude?: number;
|
|
26
|
+
/** Maximum magnitude threshold (vectors are capped). Default: Infinity */
|
|
27
|
+
maxMagnitude?: number;
|
|
28
|
+
/** Stroke width. Default: DEFAULT_STROKE_WIDTH / 2 */
|
|
29
|
+
strokeWidth?: number;
|
|
30
|
+
/** Opacity. Default: 1 */
|
|
31
|
+
opacity?: number;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Options for ArrowVectorField
|
|
35
|
+
*/
|
|
36
|
+
export interface ArrowVectorFieldOptions extends VectorFieldBaseOptions {
|
|
37
|
+
/** Length of arrow tips. Default: 0.15 */
|
|
38
|
+
tipLength?: number;
|
|
39
|
+
/** Maximum visual length for each arrow. Default: 0.8 (step size) */
|
|
40
|
+
maxArrowLength?: number;
|
|
41
|
+
/** Whether to normalize all arrows to the same length. Default: false */
|
|
42
|
+
normalizeArrows?: boolean;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Options for StreamLines
|
|
46
|
+
*/
|
|
47
|
+
export interface StreamLinesOptions extends VectorFieldBaseOptions {
|
|
48
|
+
/** Number of streamlines to draw. Default: 15 */
|
|
49
|
+
numLines?: number;
|
|
50
|
+
/** Starting points for streamlines. If not provided, generated automatically. */
|
|
51
|
+
startPoints?: [number, number][];
|
|
52
|
+
/** Maximum length of each streamline. Default: 10 */
|
|
53
|
+
maxLineLength?: number;
|
|
54
|
+
/** Integration step size. Default: 0.1 */
|
|
55
|
+
stepSize?: number;
|
|
56
|
+
/** Minimum step count before stopping. Default: 3 */
|
|
57
|
+
minSteps?: number;
|
|
58
|
+
/** Line width variation based on magnitude. Default: false */
|
|
59
|
+
variableWidth?: boolean;
|
|
60
|
+
/** Whether to draw arrows along streamlines. Default: false */
|
|
61
|
+
showArrows?: boolean;
|
|
62
|
+
/** Spacing between arrows on streamlines. Default: 1 */
|
|
63
|
+
arrowSpacing?: number;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* VectorField - Base class for vector field visualizations
|
|
67
|
+
*
|
|
68
|
+
* Provides common functionality for vector fields including:
|
|
69
|
+
* - Grid generation for sample points
|
|
70
|
+
* - Vector function evaluation
|
|
71
|
+
* - Color computation based on magnitude
|
|
72
|
+
* - Magnitude scaling
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* ```typescript
|
|
76
|
+
* // Create a radial vector field
|
|
77
|
+
* const field = new VectorField({
|
|
78
|
+
* func: (x, y) => [x, y],
|
|
79
|
+
* xRange: [-3, 3, 0.5],
|
|
80
|
+
* yRange: [-2, 2, 0.5]
|
|
81
|
+
* });
|
|
82
|
+
* ```
|
|
83
|
+
*/
|
|
84
|
+
export declare class VectorField extends Group {
|
|
85
|
+
protected _func: VectorFunction;
|
|
86
|
+
protected _xRange: [number, number, number];
|
|
87
|
+
protected _yRange: [number, number, number];
|
|
88
|
+
protected _lengthScale: number;
|
|
89
|
+
protected _colorFunc: ColorFunction;
|
|
90
|
+
protected _minMagnitude: number;
|
|
91
|
+
protected _maxMagnitude: number;
|
|
92
|
+
protected _strokeWidth: number;
|
|
93
|
+
protected _opacity: number;
|
|
94
|
+
constructor(options: VectorFieldBaseOptions);
|
|
95
|
+
/**
|
|
96
|
+
* Generate grid sample points
|
|
97
|
+
* @returns Array of [x, y] coordinates
|
|
98
|
+
*/
|
|
99
|
+
protected _generateGridPoints(): [number, number][];
|
|
100
|
+
/**
|
|
101
|
+
* Evaluate the vector function at a point
|
|
102
|
+
* @param x - X coordinate
|
|
103
|
+
* @param y - Y coordinate
|
|
104
|
+
* @returns Vector [vx, vy] with magnitude constraints applied
|
|
105
|
+
*/
|
|
106
|
+
protected _evaluateVector(x: number, y: number): [number, number];
|
|
107
|
+
/**
|
|
108
|
+
* Get the color for a vector at a point
|
|
109
|
+
* @param x - X coordinate
|
|
110
|
+
* @param y - Y coordinate
|
|
111
|
+
* @param vx - Vector X component
|
|
112
|
+
* @param vy - Vector Y component
|
|
113
|
+
* @returns CSS color string
|
|
114
|
+
*/
|
|
115
|
+
protected _getColor(x: number, y: number, vx: number, vy: number): string;
|
|
116
|
+
/**
|
|
117
|
+
* Calculate the magnitude of a vector
|
|
118
|
+
*/
|
|
119
|
+
protected _magnitude(vx: number, vy: number): number;
|
|
120
|
+
/**
|
|
121
|
+
* Get the vector function
|
|
122
|
+
*/
|
|
123
|
+
getFunction(): VectorFunction;
|
|
124
|
+
/**
|
|
125
|
+
* Set a new vector function and regenerate the field
|
|
126
|
+
* @param func - New vector function
|
|
127
|
+
*/
|
|
128
|
+
setFunction(func: VectorFunction): this;
|
|
129
|
+
/**
|
|
130
|
+
* Get the X range
|
|
131
|
+
*/
|
|
132
|
+
getXRange(): [number, number, number];
|
|
133
|
+
/**
|
|
134
|
+
* Get the Y range
|
|
135
|
+
*/
|
|
136
|
+
getYRange(): [number, number, number];
|
|
137
|
+
/**
|
|
138
|
+
* Set the length scale factor
|
|
139
|
+
*/
|
|
140
|
+
setLengthScale(scale: number): this;
|
|
141
|
+
/**
|
|
142
|
+
* Get the length scale factor
|
|
143
|
+
*/
|
|
144
|
+
getLengthScale(): number;
|
|
145
|
+
/**
|
|
146
|
+
* Regenerate the vector field (to be overridden by subclasses)
|
|
147
|
+
*/
|
|
148
|
+
protected _regenerate(): void;
|
|
149
|
+
/**
|
|
150
|
+
* Update the vector field for animation purposes
|
|
151
|
+
* Allows smooth updates to the vector function
|
|
152
|
+
* @param func - New vector function
|
|
153
|
+
* @param alpha - Interpolation factor (0-1)
|
|
154
|
+
*/
|
|
155
|
+
interpolateFunction(func: VectorFunction, alpha: number): this;
|
|
156
|
+
/**
|
|
157
|
+
* Create a copy of this VectorField
|
|
158
|
+
*/
|
|
159
|
+
protected _createCopy(): VectorField;
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* ArrowVectorField - Vector field visualization using arrows
|
|
163
|
+
*
|
|
164
|
+
* Displays a grid of arrows representing the vector field, where:
|
|
165
|
+
* - Arrow position indicates the sample point
|
|
166
|
+
* - Arrow direction indicates the vector direction
|
|
167
|
+
* - Arrow length indicates the vector magnitude (unless normalized)
|
|
168
|
+
* - Arrow color can indicate magnitude or use a custom function
|
|
169
|
+
*
|
|
170
|
+
* @example
|
|
171
|
+
* ```typescript
|
|
172
|
+
* // Create a rotation field
|
|
173
|
+
* const rotationField = new ArrowVectorField({
|
|
174
|
+
* func: (x, y) => [-y, x],
|
|
175
|
+
* xRange: [-3, 3, 0.5],
|
|
176
|
+
* yRange: [-3, 3, 0.5],
|
|
177
|
+
* color: '#00ff00'
|
|
178
|
+
* });
|
|
179
|
+
*
|
|
180
|
+
* // Create a field with magnitude-based coloring
|
|
181
|
+
* const gradientField = new ArrowVectorField({
|
|
182
|
+
* func: (x, y) => [Math.sin(y), Math.cos(x)],
|
|
183
|
+
* color: (mag) => mag > 0.5 ? '#ff0000' : '#0000ff'
|
|
184
|
+
* });
|
|
185
|
+
* ```
|
|
186
|
+
*/
|
|
187
|
+
export declare class ArrowVectorField extends VectorField {
|
|
188
|
+
protected _tipLength: number;
|
|
189
|
+
protected _maxArrowLength: number;
|
|
190
|
+
protected _normalizeArrows: boolean;
|
|
191
|
+
constructor(options: ArrowVectorFieldOptions);
|
|
192
|
+
/**
|
|
193
|
+
* Generate arrows at each grid point
|
|
194
|
+
*/
|
|
195
|
+
private _generateArrows;
|
|
196
|
+
/**
|
|
197
|
+
* Regenerate the vector field
|
|
198
|
+
*/
|
|
199
|
+
protected _regenerate(): void;
|
|
200
|
+
/**
|
|
201
|
+
* Set whether arrows should be normalized
|
|
202
|
+
*/
|
|
203
|
+
setNormalizeArrows(normalize: boolean): this;
|
|
204
|
+
/**
|
|
205
|
+
* Get whether arrows are normalized
|
|
206
|
+
*/
|
|
207
|
+
getNormalizeArrows(): boolean;
|
|
208
|
+
/**
|
|
209
|
+
* Set the maximum arrow length
|
|
210
|
+
*/
|
|
211
|
+
setMaxArrowLength(length: number): this;
|
|
212
|
+
/**
|
|
213
|
+
* Get the maximum arrow length
|
|
214
|
+
*/
|
|
215
|
+
getMaxArrowLength(): number;
|
|
216
|
+
/**
|
|
217
|
+
* Create a copy of this ArrowVectorField
|
|
218
|
+
*/
|
|
219
|
+
protected _createCopy(): ArrowVectorField;
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* StreamLines - Streamline visualization for vector fields
|
|
223
|
+
*
|
|
224
|
+
* Draws curves that follow the flow of the vector field.
|
|
225
|
+
* At every point on a streamline, the tangent is parallel to the vector field.
|
|
226
|
+
*
|
|
227
|
+
* @example
|
|
228
|
+
* ```typescript
|
|
229
|
+
* // Create streamlines for a sink field
|
|
230
|
+
* const streamlines = new StreamLines({
|
|
231
|
+
* func: (x, y) => [-x, -y],
|
|
232
|
+
* numLines: 20,
|
|
233
|
+
* maxLineLength: 8
|
|
234
|
+
* });
|
|
235
|
+
*
|
|
236
|
+
* // Create streamlines with custom start points
|
|
237
|
+
* const customLines = new StreamLines({
|
|
238
|
+
* func: (x, y) => [y, -x],
|
|
239
|
+
* startPoints: [[1, 0], [2, 0], [3, 0], [-1, 0], [-2, 0], [-3, 0]]
|
|
240
|
+
* });
|
|
241
|
+
*
|
|
242
|
+
* // Create streamlines with arrows
|
|
243
|
+
* const arrowLines = new StreamLines({
|
|
244
|
+
* func: (x, y) => [Math.sin(x), Math.cos(y)],
|
|
245
|
+
* showArrows: true,
|
|
246
|
+
* arrowSpacing: 1.5
|
|
247
|
+
* });
|
|
248
|
+
* ```
|
|
249
|
+
*/
|
|
250
|
+
export declare class StreamLines extends VectorField {
|
|
251
|
+
protected _numLines: number;
|
|
252
|
+
protected _startPoints: [number, number][] | null;
|
|
253
|
+
protected _maxLineLength: number;
|
|
254
|
+
protected _stepSize: number;
|
|
255
|
+
protected _minSteps: number;
|
|
256
|
+
protected _variableWidth: boolean;
|
|
257
|
+
protected _showArrows: boolean;
|
|
258
|
+
protected _arrowSpacing: number;
|
|
259
|
+
constructor(options: StreamLinesOptions);
|
|
260
|
+
/**
|
|
261
|
+
* Generate starting points for streamlines if not provided
|
|
262
|
+
*/
|
|
263
|
+
private _getStartPoints;
|
|
264
|
+
/**
|
|
265
|
+
* Integrate a streamline from a starting point using RK4
|
|
266
|
+
* @param startX - Starting X coordinate
|
|
267
|
+
* @param startY - Starting Y coordinate
|
|
268
|
+
* @returns Array of points along the streamline
|
|
269
|
+
*/
|
|
270
|
+
private _integrateStreamline;
|
|
271
|
+
/**
|
|
272
|
+
* Generate all streamlines
|
|
273
|
+
*/
|
|
274
|
+
private _generateStreamlines;
|
|
275
|
+
/**
|
|
276
|
+
* Add arrows along a streamline
|
|
277
|
+
*/
|
|
278
|
+
private _addArrowsToLine;
|
|
279
|
+
/**
|
|
280
|
+
* Regenerate the vector field
|
|
281
|
+
*/
|
|
282
|
+
protected _regenerate(): void;
|
|
283
|
+
/**
|
|
284
|
+
* Set custom starting points
|
|
285
|
+
*/
|
|
286
|
+
setStartPoints(points: [number, number][]): this;
|
|
287
|
+
/**
|
|
288
|
+
* Get the starting points
|
|
289
|
+
*/
|
|
290
|
+
getStartPoints(): [number, number][];
|
|
291
|
+
/**
|
|
292
|
+
* Set the number of streamlines (only used when startPoints is null)
|
|
293
|
+
*/
|
|
294
|
+
setNumLines(num: number): this;
|
|
295
|
+
/**
|
|
296
|
+
* Get the number of streamlines
|
|
297
|
+
*/
|
|
298
|
+
getNumLines(): number;
|
|
299
|
+
/**
|
|
300
|
+
* Set whether to show arrows along streamlines
|
|
301
|
+
*/
|
|
302
|
+
setShowArrows(show: boolean): this;
|
|
303
|
+
/**
|
|
304
|
+
* Get whether arrows are shown
|
|
305
|
+
*/
|
|
306
|
+
getShowArrows(): boolean;
|
|
307
|
+
/**
|
|
308
|
+
* Set the maximum line length
|
|
309
|
+
*/
|
|
310
|
+
setMaxLineLength(length: number): this;
|
|
311
|
+
/**
|
|
312
|
+
* Get the maximum line length
|
|
313
|
+
*/
|
|
314
|
+
getMaxLineLength(): number;
|
|
315
|
+
/**
|
|
316
|
+
* Create a copy of this StreamLines
|
|
317
|
+
*/
|
|
318
|
+
protected _createCopy(): StreamLines;
|
|
319
|
+
}
|
|
320
|
+
export default VectorField;
|
|
321
|
+
//# sourceMappingURL=VectorField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VectorField.d.ts","sourceRoot":"","sources":["../../../src/mobjects/graphing/VectorField.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Graphing mobjects for manimweb
|
|
3
|
+
*
|
|
4
|
+
* This module provides coordinate systems, function graphs, and vectors
|
|
5
|
+
* for mathematical visualization.
|
|
6
|
+
*/
|
|
7
|
+
export { NumberLine, type NumberLineOptions, UnitInterval, type UnitIntervalOptions } from './NumberLine';
|
|
8
|
+
export { Axes, type AxesOptions } from './Axes';
|
|
9
|
+
export { NumberPlane, type NumberPlaneOptions, type BackgroundLineStyle, } from './NumberPlane';
|
|
10
|
+
export { FunctionGraph, type FunctionGraphOptions } from './FunctionGraph';
|
|
11
|
+
export { ImplicitFunction, type ImplicitFunctionOptions } from './ImplicitFunction';
|
|
12
|
+
export { ParametricFunction, type ParametricFunctionOptions } from './ParametricFunction';
|
|
13
|
+
export { VectorFieldVector, type VectorFieldVectorOptions } from './Vector';
|
|
14
|
+
export { ComplexPlane, type ComplexPlaneOptions, type Complex, } from './ComplexPlane';
|
|
15
|
+
export { PolarPlane, type PolarPlaneOptions, } from './ComplexPlane';
|
|
16
|
+
export { BarChart, type BarChartOptions } from './BarChart';
|
|
17
|
+
export { VectorField, ArrowVectorField, StreamLines, type VectorFunction, type ColorFunction, type VectorFieldBaseOptions, type ArrowVectorFieldOptions, type StreamLinesOptions, } from './VectorField';
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/mobjects/graphing/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,UAAU,EAAE,KAAK,iBAAiB,EAAE,YAAY,EAAE,KAAK,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAG1G,OAAO,EAAE,IAAI,EAAE,KAAK,WAAW,EAAE,MAAM,QAAQ,CAAC;AAGhD,OAAO,EACL,WAAW,EACX,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,GACzB,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,aAAa,EAAE,KAAK,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAG3E,OAAO,EAAE,gBAAgB,EAAE,KAAK,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAGpF,OAAO,EAAE,kBAAkB,EAAE,KAAK,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAG1F,OAAO,EAAE,iBAAiB,EAAE,KAAK,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAG5E,OAAO,EACL,YAAY,EACZ,KAAK,mBAAmB,EACxB,KAAK,OAAO,GACb,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EACL,UAAU,EACV,KAAK,iBAAiB,GACvB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAAE,QAAQ,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AAG5D,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,WAAW,EACX,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,GACxB,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
import { Mobject, Vector3Tuple } from '../../core/Mobject';
|
|
2
|
+
import * as THREE from 'three';
|
|
3
|
+
/**
|
|
4
|
+
* Image filter options for visual effects
|
|
5
|
+
*/
|
|
6
|
+
export interface ImageFilterOptions {
|
|
7
|
+
/** Apply grayscale filter. Default: false */
|
|
8
|
+
grayscale?: boolean;
|
|
9
|
+
/** Invert colors. Default: false */
|
|
10
|
+
invert?: boolean;
|
|
11
|
+
/** Brightness multiplier (1 = normal). Default: 1 */
|
|
12
|
+
brightness?: number;
|
|
13
|
+
/** Contrast multiplier (1 = normal). Default: 1 */
|
|
14
|
+
contrast?: number;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Options for creating an ImageMobject
|
|
18
|
+
*/
|
|
19
|
+
export interface ImageMobjectOptions {
|
|
20
|
+
/** Image source: URL or base64 data URI. Either source or pixelData is required. */
|
|
21
|
+
source?: string;
|
|
22
|
+
/** 2D grayscale pixel array (values 0-255). Each inner array is a row. Either source or pixelData is required. */
|
|
23
|
+
pixelData?: number[][];
|
|
24
|
+
/** Width of the image in scene units. Default: auto-calculated from aspect ratio */
|
|
25
|
+
width?: number;
|
|
26
|
+
/** Height of the image in scene units. Default: auto-calculated from aspect ratio */
|
|
27
|
+
height?: number;
|
|
28
|
+
/** If both width and height specified, whether to scale to fit within bounds preserving aspect ratio. Default: true */
|
|
29
|
+
scaleToFit?: boolean;
|
|
30
|
+
/** Center position [x, y, z]. Default: [0, 0, 0] */
|
|
31
|
+
center?: Vector3Tuple;
|
|
32
|
+
/** Opacity from 0 to 1. Default: 1 */
|
|
33
|
+
opacity?: number;
|
|
34
|
+
/** Image filter options */
|
|
35
|
+
filters?: ImageFilterOptions;
|
|
36
|
+
/** Whether to render both sides. Default: false */
|
|
37
|
+
doubleSided?: boolean;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* ImageMobject - Display images as mobjects
|
|
41
|
+
*
|
|
42
|
+
* Creates an image plane using THREE.js PlaneGeometry with TextureLoader.
|
|
43
|
+
* Supports loading from URLs or base64 data, with optional filters like
|
|
44
|
+
* grayscale and invert.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```typescript
|
|
48
|
+
* // Load from URL
|
|
49
|
+
* const image = new ImageMobject({
|
|
50
|
+
* source: 'https://example.com/image.png',
|
|
51
|
+
* width: 4,
|
|
52
|
+
* });
|
|
53
|
+
*
|
|
54
|
+
* // Load from base64
|
|
55
|
+
* const base64Image = new ImageMobject({
|
|
56
|
+
* source: 'data:image/png;base64,iVBORw0KGgoAAAA...',
|
|
57
|
+
* height: 3,
|
|
58
|
+
* opacity: 0.8,
|
|
59
|
+
* });
|
|
60
|
+
*
|
|
61
|
+
* // With filters
|
|
62
|
+
* const filtered = new ImageMobject({
|
|
63
|
+
* source: 'https://example.com/photo.jpg',
|
|
64
|
+
* width: 5,
|
|
65
|
+
* filters: {
|
|
66
|
+
* grayscale: true,
|
|
67
|
+
* brightness: 1.2,
|
|
68
|
+
* },
|
|
69
|
+
* });
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
72
|
+
export declare class ImageMobject extends Mobject {
|
|
73
|
+
protected _source: string;
|
|
74
|
+
protected _pixelData: number[][] | undefined;
|
|
75
|
+
protected _width: number | undefined;
|
|
76
|
+
protected _height: number | undefined;
|
|
77
|
+
protected _scaleToFit: boolean;
|
|
78
|
+
protected _centerPoint: Vector3Tuple;
|
|
79
|
+
protected _filters: ImageFilterOptions;
|
|
80
|
+
protected _doubleSided: boolean;
|
|
81
|
+
protected _texture: THREE.Texture | null;
|
|
82
|
+
protected _imageLoaded: boolean;
|
|
83
|
+
protected _naturalWidth: number;
|
|
84
|
+
protected _naturalHeight: number;
|
|
85
|
+
private _loadPromise;
|
|
86
|
+
private _loadResolve;
|
|
87
|
+
constructor(options: ImageMobjectOptions);
|
|
88
|
+
/**
|
|
89
|
+
* Load texture from a 2D grayscale pixel array
|
|
90
|
+
*/
|
|
91
|
+
private _loadFromPixelData;
|
|
92
|
+
/**
|
|
93
|
+
* Load the texture from the source
|
|
94
|
+
*/
|
|
95
|
+
private _loadTexture;
|
|
96
|
+
/**
|
|
97
|
+
* Wait for the image to be loaded
|
|
98
|
+
* @returns Promise that resolves when the image is loaded
|
|
99
|
+
*/
|
|
100
|
+
waitForLoad(): Promise<void>;
|
|
101
|
+
/**
|
|
102
|
+
* Check if the image has been loaded
|
|
103
|
+
*/
|
|
104
|
+
isLoaded(): boolean;
|
|
105
|
+
/**
|
|
106
|
+
* Calculate the display dimensions based on options and natural size
|
|
107
|
+
*/
|
|
108
|
+
private _calculateDimensions;
|
|
109
|
+
/**
|
|
110
|
+
* Apply image filters using canvas manipulation
|
|
111
|
+
*/
|
|
112
|
+
private _applyFilters;
|
|
113
|
+
/**
|
|
114
|
+
* Create the Three.js plane mesh with image texture
|
|
115
|
+
*/
|
|
116
|
+
protected _createThreeObject(): THREE.Object3D;
|
|
117
|
+
/**
|
|
118
|
+
* Update geometry when dimensions change
|
|
119
|
+
*/
|
|
120
|
+
protected _updateGeometry(): void;
|
|
121
|
+
/**
|
|
122
|
+
* Sync material properties to Three.js object
|
|
123
|
+
*/
|
|
124
|
+
protected _syncMaterialToThree(): void;
|
|
125
|
+
/**
|
|
126
|
+
* Get the image source
|
|
127
|
+
*/
|
|
128
|
+
getSource(): string;
|
|
129
|
+
/**
|
|
130
|
+
* Set a new image source
|
|
131
|
+
*/
|
|
132
|
+
setSource(source: string): this;
|
|
133
|
+
/**
|
|
134
|
+
* Get the display width
|
|
135
|
+
*/
|
|
136
|
+
getWidth(): number;
|
|
137
|
+
/**
|
|
138
|
+
* Set the display width (height will be calculated from aspect ratio)
|
|
139
|
+
*/
|
|
140
|
+
setWidth(width: number): this;
|
|
141
|
+
/**
|
|
142
|
+
* Get the display height
|
|
143
|
+
*/
|
|
144
|
+
getHeight(): number;
|
|
145
|
+
/**
|
|
146
|
+
* Set the display height (width will be calculated from aspect ratio)
|
|
147
|
+
*/
|
|
148
|
+
setHeight(height: number): this;
|
|
149
|
+
/**
|
|
150
|
+
* Set both width and height
|
|
151
|
+
* @param width Display width
|
|
152
|
+
* @param height Display height
|
|
153
|
+
* @param scaleToFit If true, scale to fit preserving aspect ratio
|
|
154
|
+
*/
|
|
155
|
+
setSize(width: number, height: number, scaleToFit?: boolean): this;
|
|
156
|
+
/**
|
|
157
|
+
* Scale the image to fit within a bounding box
|
|
158
|
+
* @param maxWidth Maximum width
|
|
159
|
+
* @param maxHeight Maximum height
|
|
160
|
+
*/
|
|
161
|
+
scaleToFitBox(maxWidth: number, maxHeight: number): this;
|
|
162
|
+
/**
|
|
163
|
+
* Get the current filter options
|
|
164
|
+
*/
|
|
165
|
+
getFilters(): ImageFilterOptions;
|
|
166
|
+
/**
|
|
167
|
+
* Set filter options
|
|
168
|
+
*/
|
|
169
|
+
setFilters(filters: Partial<ImageFilterOptions>): this;
|
|
170
|
+
/**
|
|
171
|
+
* Set grayscale filter
|
|
172
|
+
*/
|
|
173
|
+
setGrayscale(enabled: boolean): this;
|
|
174
|
+
/**
|
|
175
|
+
* Set invert filter
|
|
176
|
+
*/
|
|
177
|
+
setInvert(enabled: boolean): this;
|
|
178
|
+
/**
|
|
179
|
+
* Set brightness
|
|
180
|
+
*/
|
|
181
|
+
setBrightness(value: number): this;
|
|
182
|
+
/**
|
|
183
|
+
* Set contrast
|
|
184
|
+
*/
|
|
185
|
+
setContrast(value: number): this;
|
|
186
|
+
/**
|
|
187
|
+
* Get whether double-sided rendering is enabled
|
|
188
|
+
*/
|
|
189
|
+
isDoubleSided(): boolean;
|
|
190
|
+
/**
|
|
191
|
+
* Set double-sided rendering
|
|
192
|
+
*/
|
|
193
|
+
setDoubleSided(value: boolean): this;
|
|
194
|
+
/**
|
|
195
|
+
* Get the natural (original) dimensions of the image
|
|
196
|
+
*/
|
|
197
|
+
getNaturalSize(): {
|
|
198
|
+
width: number;
|
|
199
|
+
height: number;
|
|
200
|
+
};
|
|
201
|
+
/**
|
|
202
|
+
* Get the aspect ratio of the image
|
|
203
|
+
*/
|
|
204
|
+
getAspectRatio(): number;
|
|
205
|
+
/**
|
|
206
|
+
* Override getBoundingBox to use calculated dimensions
|
|
207
|
+
*/
|
|
208
|
+
protected _getBoundingBox(): {
|
|
209
|
+
width: number;
|
|
210
|
+
height: number;
|
|
211
|
+
depth: number;
|
|
212
|
+
};
|
|
213
|
+
/**
|
|
214
|
+
* Create a copy of this ImageMobject
|
|
215
|
+
*/
|
|
216
|
+
protected _createCopy(): ImageMobject;
|
|
217
|
+
/**
|
|
218
|
+
* Clean up resources
|
|
219
|
+
*/
|
|
220
|
+
dispose(): void;
|
|
221
|
+
}
|
|
222
|
+
export default ImageMobject;
|
|
223
|
+
//# sourceMappingURL=index.d.ts.map
|