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,412 @@
|
|
|
1
|
+
import { VMobject } from '../../core/VMobject';
|
|
2
|
+
import { Vector3Tuple } from '../../core/Mobject';
|
|
3
|
+
/**
|
|
4
|
+
* Options for creating a RoundedRectangle
|
|
5
|
+
*/
|
|
6
|
+
export interface RoundedRectangleOptions {
|
|
7
|
+
/** Width of the rectangle. Default: 2 */
|
|
8
|
+
width?: number;
|
|
9
|
+
/** Height of the rectangle. Default: 1 */
|
|
10
|
+
height?: number;
|
|
11
|
+
/** Corner radius. Default: 0.25 */
|
|
12
|
+
cornerRadius?: number;
|
|
13
|
+
/** Stroke color as CSS color string. Default: Manim's blue (#58C4DD) */
|
|
14
|
+
color?: string;
|
|
15
|
+
/** Fill opacity from 0 to 1. Default: 0 */
|
|
16
|
+
fillOpacity?: number;
|
|
17
|
+
/** Stroke width in pixels. Default: 4 (Manim's default) */
|
|
18
|
+
strokeWidth?: number;
|
|
19
|
+
/** Center position. Default: [0, 0, 0] */
|
|
20
|
+
center?: Vector3Tuple;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* RoundedRectangle - A rectangle with rounded corners
|
|
24
|
+
*
|
|
25
|
+
* Creates a rectangle with circular arcs at each corner using cubic Bezier
|
|
26
|
+
* approximation for the arcs.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```typescript
|
|
30
|
+
* // Create a rounded rectangle
|
|
31
|
+
* const roundedRect = new RoundedRectangle({ width: 3, height: 2, cornerRadius: 0.5 });
|
|
32
|
+
*
|
|
33
|
+
* // Create a pill shape (corner radius = half height)
|
|
34
|
+
* const pill = new RoundedRectangle({ width: 4, height: 1, cornerRadius: 0.5 });
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
export declare class RoundedRectangle extends VMobject {
|
|
38
|
+
private _width;
|
|
39
|
+
private _height;
|
|
40
|
+
private _cornerRadius;
|
|
41
|
+
private _centerPoint;
|
|
42
|
+
constructor(options?: RoundedRectangleOptions);
|
|
43
|
+
/**
|
|
44
|
+
* Generate the rounded rectangle points
|
|
45
|
+
*/
|
|
46
|
+
private _generatePoints;
|
|
47
|
+
/**
|
|
48
|
+
* Get the width of the rounded rectangle
|
|
49
|
+
*/
|
|
50
|
+
getWidth(): number;
|
|
51
|
+
/**
|
|
52
|
+
* Set the width of the rounded rectangle
|
|
53
|
+
*/
|
|
54
|
+
setWidth(value: number): this;
|
|
55
|
+
/**
|
|
56
|
+
* Get the height of the rounded rectangle
|
|
57
|
+
*/
|
|
58
|
+
getHeight(): number;
|
|
59
|
+
/**
|
|
60
|
+
* Set the height of the rounded rectangle
|
|
61
|
+
*/
|
|
62
|
+
setHeight(value: number): this;
|
|
63
|
+
/**
|
|
64
|
+
* Get the corner radius
|
|
65
|
+
*/
|
|
66
|
+
getCornerRadius(): number;
|
|
67
|
+
/**
|
|
68
|
+
* Set the corner radius
|
|
69
|
+
*/
|
|
70
|
+
setCornerRadius(value: number): this;
|
|
71
|
+
/**
|
|
72
|
+
* Get the center of the rounded rectangle
|
|
73
|
+
*/
|
|
74
|
+
getRoundedRectCenter(): Vector3Tuple;
|
|
75
|
+
/**
|
|
76
|
+
* Set the center of the rounded rectangle
|
|
77
|
+
*/
|
|
78
|
+
setRoundedRectCenter(value: Vector3Tuple): this;
|
|
79
|
+
/**
|
|
80
|
+
* Create a copy of this RoundedRectangle
|
|
81
|
+
*/
|
|
82
|
+
protected _createCopy(): RoundedRectangle;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Options for creating a Star
|
|
86
|
+
*/
|
|
87
|
+
export interface StarOptions {
|
|
88
|
+
/** Number of points on the star. Default: 5 */
|
|
89
|
+
numPoints?: number;
|
|
90
|
+
/** Outer radius (to the tips). Default: 1 */
|
|
91
|
+
outerRadius?: number;
|
|
92
|
+
/** Inner radius (to the inner vertices). Default: 0.4 */
|
|
93
|
+
innerRadius?: number;
|
|
94
|
+
/** Stroke color as CSS color string. Default: Manim's blue (#58C4DD) */
|
|
95
|
+
color?: string;
|
|
96
|
+
/** Fill opacity from 0 to 1. Default: 0 */
|
|
97
|
+
fillOpacity?: number;
|
|
98
|
+
/** Stroke width in pixels. Default: 4 (Manim's default) */
|
|
99
|
+
strokeWidth?: number;
|
|
100
|
+
/** Center position. Default: [0, 0, 0] */
|
|
101
|
+
center?: Vector3Tuple;
|
|
102
|
+
/** Start angle in radians. Default: PI/2 (point up) */
|
|
103
|
+
startAngle?: number;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Star - A star shape with alternating outer and inner vertices
|
|
107
|
+
*
|
|
108
|
+
* Creates a star with a specified number of points, alternating between
|
|
109
|
+
* outer and inner radii.
|
|
110
|
+
*
|
|
111
|
+
* @example
|
|
112
|
+
* ```typescript
|
|
113
|
+
* // Create a 5-pointed star
|
|
114
|
+
* const star = new Star({ numPoints: 5 });
|
|
115
|
+
*
|
|
116
|
+
* // Create a 6-pointed star (Star of David style)
|
|
117
|
+
* const sixStar = new Star({ numPoints: 6, innerRadius: 0.5 });
|
|
118
|
+
* ```
|
|
119
|
+
*/
|
|
120
|
+
export declare class Star extends VMobject {
|
|
121
|
+
private _numPoints;
|
|
122
|
+
private _outerRadius;
|
|
123
|
+
private _innerRadius;
|
|
124
|
+
private _centerPoint;
|
|
125
|
+
private _startAngle;
|
|
126
|
+
constructor(options?: StarOptions);
|
|
127
|
+
/**
|
|
128
|
+
* Generate the star vertices and points
|
|
129
|
+
*/
|
|
130
|
+
private _generatePoints;
|
|
131
|
+
/**
|
|
132
|
+
* Get the number of points
|
|
133
|
+
*/
|
|
134
|
+
getNumPoints(): number;
|
|
135
|
+
/**
|
|
136
|
+
* Get the outer radius
|
|
137
|
+
*/
|
|
138
|
+
getOuterRadius(): number;
|
|
139
|
+
/**
|
|
140
|
+
* Set the outer radius
|
|
141
|
+
*/
|
|
142
|
+
setOuterRadius(value: number): this;
|
|
143
|
+
/**
|
|
144
|
+
* Get the inner radius
|
|
145
|
+
*/
|
|
146
|
+
getInnerRadius(): number;
|
|
147
|
+
/**
|
|
148
|
+
* Set the inner radius
|
|
149
|
+
*/
|
|
150
|
+
setInnerRadius(value: number): this;
|
|
151
|
+
/**
|
|
152
|
+
* Get the center of the star
|
|
153
|
+
*/
|
|
154
|
+
getStarCenter(): Vector3Tuple;
|
|
155
|
+
/**
|
|
156
|
+
* Set the center of the star
|
|
157
|
+
*/
|
|
158
|
+
setStarCenter(value: Vector3Tuple): this;
|
|
159
|
+
/**
|
|
160
|
+
* Create a copy of this Star
|
|
161
|
+
*/
|
|
162
|
+
protected _createCopy(): Star;
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Options for creating a RegularPolygram
|
|
166
|
+
*/
|
|
167
|
+
export interface RegularPolygramOptions {
|
|
168
|
+
/** Number of vertices on the circumscribed circle. Default: 5 */
|
|
169
|
+
numVertices?: number;
|
|
170
|
+
/**
|
|
171
|
+
* Density (vertex step count), i.e. how many vertices to skip when
|
|
172
|
+
* drawing each edge. Default: 2
|
|
173
|
+
*
|
|
174
|
+
* The Schlafli symbol {numVertices/density} describes the polygram.
|
|
175
|
+
* For example {5/2} is a pentagram, {7/3} is a heptagram.
|
|
176
|
+
*
|
|
177
|
+
* When gcd(numVertices, density) > 1 the polygram decomposes into
|
|
178
|
+
* multiple congruent regular polygon components. For instance {6/2}
|
|
179
|
+
* simplifies to 2{3} -- two overlapping equilateral triangles.
|
|
180
|
+
*/
|
|
181
|
+
density?: number;
|
|
182
|
+
/** Radius from center to vertices. Default: 1 */
|
|
183
|
+
radius?: number;
|
|
184
|
+
/** Stroke color as CSS color string. Default: Manim's blue (#58C4DD) */
|
|
185
|
+
color?: string;
|
|
186
|
+
/** Fill opacity from 0 to 1. Default: 0 */
|
|
187
|
+
fillOpacity?: number;
|
|
188
|
+
/** Stroke width in pixels. Default: 4 (Manim's default) */
|
|
189
|
+
strokeWidth?: number;
|
|
190
|
+
/** Center position. Default: [0, 0, 0] */
|
|
191
|
+
center?: Vector3Tuple;
|
|
192
|
+
/** Start angle in radians. Default: PI/2 (first vertex up) */
|
|
193
|
+
startAngle?: number;
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* RegularPolygram - A generalized star polygon {n/k}
|
|
197
|
+
*
|
|
198
|
+
* Creates a regular star polygon by placing n vertices equally spaced on a
|
|
199
|
+
* circle and connecting every k-th vertex, where k is the density.
|
|
200
|
+
*
|
|
201
|
+
* When gcd(n, k) = 1 the result is a single continuous self-intersecting
|
|
202
|
+
* path that winds k times around the center before closing (e.g. the
|
|
203
|
+
* pentagram {5/2}).
|
|
204
|
+
*
|
|
205
|
+
* When gcd(n, k) > 1 the polygram decomposes into gcd(n,k) congruent
|
|
206
|
+
* regular polygon components, each rendered as a separate child VMobject.
|
|
207
|
+
* For example, a hexagram {6/2} becomes 2 equilateral triangles (2{3}).
|
|
208
|
+
*
|
|
209
|
+
* This matches the behavior of Python manim's RegularPolygram.
|
|
210
|
+
*
|
|
211
|
+
* @example
|
|
212
|
+
* ```typescript
|
|
213
|
+
* // Pentagram {5/2} -- single continuous star
|
|
214
|
+
* const pentagram = new RegularPolygram({ numVertices: 5, density: 2 });
|
|
215
|
+
*
|
|
216
|
+
* // Hexagram {6/2} = 2{3} -- two overlapping triangles
|
|
217
|
+
* const hexagram = new RegularPolygram({ numVertices: 6, density: 2 });
|
|
218
|
+
*
|
|
219
|
+
* // Heptagram {7/3}
|
|
220
|
+
* const heptagram = new RegularPolygram({ numVertices: 7, density: 3 });
|
|
221
|
+
*
|
|
222
|
+
* // Octagram {8/3}
|
|
223
|
+
* const octagram = new RegularPolygram({ numVertices: 8, density: 3 });
|
|
224
|
+
* ```
|
|
225
|
+
*/
|
|
226
|
+
export declare class RegularPolygram extends VMobject {
|
|
227
|
+
private _numVertices;
|
|
228
|
+
private _density;
|
|
229
|
+
private _radius;
|
|
230
|
+
private _centerPoint;
|
|
231
|
+
private _startAngle;
|
|
232
|
+
private _numComponents;
|
|
233
|
+
constructor(options?: RegularPolygramOptions);
|
|
234
|
+
/**
|
|
235
|
+
* Generate the polygram geometry.
|
|
236
|
+
*
|
|
237
|
+
* If gcd(n,k) = 1 the polygram is a single continuous path stored
|
|
238
|
+
* directly in this VMobject's points.
|
|
239
|
+
*
|
|
240
|
+
* If gcd(n,k) > 1 the polygram is composed of gcd(n,k) congruent
|
|
241
|
+
* regular polygon components. Each component is a child VMobject so
|
|
242
|
+
* that the rendering pipeline draws them as separate closed paths.
|
|
243
|
+
*/
|
|
244
|
+
private _generatePoints;
|
|
245
|
+
/**
|
|
246
|
+
* Get the number of vertices (n in the Schlafli symbol {n/k})
|
|
247
|
+
*/
|
|
248
|
+
getNumVertices(): number;
|
|
249
|
+
/**
|
|
250
|
+
* Get the density (k in the Schlafli symbol {n/k})
|
|
251
|
+
*/
|
|
252
|
+
getDensity(): number;
|
|
253
|
+
/**
|
|
254
|
+
* Get the number of disconnected polygon components.
|
|
255
|
+
* Equal to gcd(numVertices, density).
|
|
256
|
+
* When this is 1 the polygram is a single continuous path.
|
|
257
|
+
*/
|
|
258
|
+
getNumComponents(): number;
|
|
259
|
+
/**
|
|
260
|
+
* Get the Schlafli symbol as a string, e.g. "{5/2}"
|
|
261
|
+
*/
|
|
262
|
+
getSchlafliSymbol(): string;
|
|
263
|
+
/**
|
|
264
|
+
* Get the radius
|
|
265
|
+
*/
|
|
266
|
+
getRadius(): number;
|
|
267
|
+
/**
|
|
268
|
+
* Set the radius
|
|
269
|
+
*/
|
|
270
|
+
setRadius(value: number): this;
|
|
271
|
+
/**
|
|
272
|
+
* Get the center of the polygram
|
|
273
|
+
*/
|
|
274
|
+
getPolygramCenter(): Vector3Tuple;
|
|
275
|
+
/**
|
|
276
|
+
* Set the center of the polygram
|
|
277
|
+
*/
|
|
278
|
+
setPolygramCenter(value: Vector3Tuple): this;
|
|
279
|
+
/**
|
|
280
|
+
* Create a copy of this RegularPolygram
|
|
281
|
+
*/
|
|
282
|
+
protected _createCopy(): RegularPolygram;
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* Options for creating a Cutout
|
|
286
|
+
*/
|
|
287
|
+
export interface CutoutOptions {
|
|
288
|
+
/** The outer shape (must be a VMobject). Required. */
|
|
289
|
+
outerShape: VMobject;
|
|
290
|
+
/** The inner shape (the hole, must be a VMobject). Required. */
|
|
291
|
+
innerShape: VMobject;
|
|
292
|
+
/** Stroke color as CSS color string. Default: inherits from outer shape */
|
|
293
|
+
color?: string;
|
|
294
|
+
/** Fill opacity from 0 to 1. Default: inherits from outer shape */
|
|
295
|
+
fillOpacity?: number;
|
|
296
|
+
/** Stroke width in pixels. Default: inherits from outer shape */
|
|
297
|
+
strokeWidth?: number;
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* Cutout - A shape with a hole cut out
|
|
301
|
+
*
|
|
302
|
+
* Creates a compound path with an outer boundary and an inner hole.
|
|
303
|
+
* Uses the even-odd fill rule to create the cutout effect.
|
|
304
|
+
*
|
|
305
|
+
* @example
|
|
306
|
+
* ```typescript
|
|
307
|
+
* import { Circle, Square, Cutout } from 'manimweb';
|
|
308
|
+
*
|
|
309
|
+
* // Create a circle with a square hole
|
|
310
|
+
* const outer = new Circle({ radius: 2, fillOpacity: 0.5 });
|
|
311
|
+
* const inner = new Square({ sideLength: 1.5 });
|
|
312
|
+
* const cutout = new Cutout({ outerShape: outer, innerShape: inner });
|
|
313
|
+
* ```
|
|
314
|
+
*/
|
|
315
|
+
export declare class Cutout extends VMobject {
|
|
316
|
+
private _outerShape;
|
|
317
|
+
private _innerShape;
|
|
318
|
+
constructor(options: CutoutOptions);
|
|
319
|
+
/**
|
|
320
|
+
* Generate the compound path by combining outer and inner shapes
|
|
321
|
+
*/
|
|
322
|
+
private _generatePoints;
|
|
323
|
+
private _subpaths;
|
|
324
|
+
/**
|
|
325
|
+
* Get subpath information
|
|
326
|
+
*/
|
|
327
|
+
getSubpaths(): number[];
|
|
328
|
+
/**
|
|
329
|
+
* Get the outer shape
|
|
330
|
+
*/
|
|
331
|
+
getOuterShape(): VMobject;
|
|
332
|
+
/**
|
|
333
|
+
* Get the inner shape
|
|
334
|
+
*/
|
|
335
|
+
getInnerShape(): VMobject;
|
|
336
|
+
/**
|
|
337
|
+
* Create a copy of this Cutout
|
|
338
|
+
*/
|
|
339
|
+
protected _createCopy(): Cutout;
|
|
340
|
+
}
|
|
341
|
+
/**
|
|
342
|
+
* Options for creating a ConvexHull
|
|
343
|
+
*/
|
|
344
|
+
export interface ConvexHullOptions {
|
|
345
|
+
/** Array of points to compute convex hull from. Required. */
|
|
346
|
+
points: Vector3Tuple[];
|
|
347
|
+
/** Stroke color as CSS color string. Default: Manim's blue (#58C4DD) */
|
|
348
|
+
color?: string;
|
|
349
|
+
/** Fill opacity from 0 to 1. Default: 0 */
|
|
350
|
+
fillOpacity?: number;
|
|
351
|
+
/** Stroke width in pixels. Default: 4 (Manim's default) */
|
|
352
|
+
strokeWidth?: number;
|
|
353
|
+
}
|
|
354
|
+
/**
|
|
355
|
+
* ConvexHull - Convex hull of a set of points
|
|
356
|
+
*
|
|
357
|
+
* Computes and draws the convex hull of a given set of points using
|
|
358
|
+
* the Graham scan algorithm.
|
|
359
|
+
*
|
|
360
|
+
* @example
|
|
361
|
+
* ```typescript
|
|
362
|
+
* // Create a convex hull from random points
|
|
363
|
+
* const points: Vector3Tuple[] = [
|
|
364
|
+
* [0, 0, 0], [1, 2, 0], [2, 0, 0], [1.5, 1, 0], [0.5, 0.5, 0]
|
|
365
|
+
* ];
|
|
366
|
+
* const hull = new ConvexHull({ points });
|
|
367
|
+
*
|
|
368
|
+
* // The hull will only include the outer boundary points
|
|
369
|
+
* ```
|
|
370
|
+
*/
|
|
371
|
+
export declare class ConvexHull extends VMobject {
|
|
372
|
+
private _inputPoints;
|
|
373
|
+
private _hullVertices;
|
|
374
|
+
constructor(options: ConvexHullOptions);
|
|
375
|
+
/**
|
|
376
|
+
* Compute the convex hull using Graham scan algorithm
|
|
377
|
+
*/
|
|
378
|
+
private _computeHull;
|
|
379
|
+
/**
|
|
380
|
+
* Generate the VMobject points from hull vertices
|
|
381
|
+
*/
|
|
382
|
+
private _generatePoints;
|
|
383
|
+
/**
|
|
384
|
+
* Get the hull vertices
|
|
385
|
+
*/
|
|
386
|
+
getHullVertices(): Vector3Tuple[];
|
|
387
|
+
/**
|
|
388
|
+
* Get the original input points
|
|
389
|
+
*/
|
|
390
|
+
getInputPoints(): Vector3Tuple[];
|
|
391
|
+
/**
|
|
392
|
+
* Get the number of vertices in the hull
|
|
393
|
+
*/
|
|
394
|
+
getHullVertexCount(): number;
|
|
395
|
+
/**
|
|
396
|
+
* Get the area of the convex hull using the Shoelace formula
|
|
397
|
+
*/
|
|
398
|
+
getArea(): number;
|
|
399
|
+
/**
|
|
400
|
+
* Get the perimeter of the convex hull
|
|
401
|
+
*/
|
|
402
|
+
getPerimeter(): number;
|
|
403
|
+
/**
|
|
404
|
+
* Check if a point is inside the convex hull
|
|
405
|
+
*/
|
|
406
|
+
containsPoint(point: Vector3Tuple): boolean;
|
|
407
|
+
/**
|
|
408
|
+
* Create a copy of this ConvexHull
|
|
409
|
+
*/
|
|
410
|
+
protected _createCopy(): ConvexHull;
|
|
411
|
+
}
|
|
412
|
+
//# sourceMappingURL=PolygonExtensions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PolygonExtensions.d.ts","sourceRoot":"","sources":["../../../src/mobjects/geometry/PolygonExtensions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGlD;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,yCAAyC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0CAA0C;IAC1C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,mCAAmC;IACnC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wEAAwE;IACxE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2CAA2C;IAC3C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2DAA2D;IAC3D,W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OAEG;IACH,aAAa,IAAI,QAAQ;IAIzB;;OAEG;cACgB,WAAW,IAAI,MAAM;CASzC;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,6DAA6D;IAC7D,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,wEAAwE;IACxE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2CAA2C;IAC3C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2DAA2D;IAC3D,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,UAAW,SAAQ,QAAQ;IACtC,OAAO,CAAC,YAAY,CAAiB;IACrC,OAAO,CAAC,aAAa,CAAiB;gBAE1B,OAAO,EAAE,iBAAiB;IAyBtC;;OAEG;IACH,OAAO,CAAC,YAAY;IAoEpB;;OAEG;IACH,OAAO,CAAC,eAAe;IA4BvB;;OAEG;IACH,eAAe,IAAI,YAAY,EAAE;IAIjC;;OAEG;IACH,cAAc,IAAI,YAAY,EAAE;IAIhC;;OAEG;IACH,kBAAkB,IAAI,MAAM;IAI5B;;OAEG;IACH,OAAO,IAAI,MAAM;IAiBjB;;OAEG;IACH,YAAY,IAAI,MAAM;IAmBtB;;OAEG;IACH,aAAa,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO;IA6B3C;;OAEG;cACgB,WAAW,IAAI,UAAU;CAQ7C"}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { VMobject } from '../../core/VMobject';
|
|
2
|
+
import { Vector3Tuple } from '../../core/Mobject';
|
|
3
|
+
/**
|
|
4
|
+
* Options for creating a Rectangle
|
|
5
|
+
*/
|
|
6
|
+
export interface RectangleOptions {
|
|
7
|
+
/** Width of the rectangle. Default: 2 */
|
|
8
|
+
width?: number;
|
|
9
|
+
/** Height of the rectangle. Default: 1 */
|
|
10
|
+
height?: number;
|
|
11
|
+
/** Stroke color as CSS color string. Default: Manim's blue (#58C4DD) */
|
|
12
|
+
color?: string;
|
|
13
|
+
/** Fill opacity from 0 to 1. Default: 0 */
|
|
14
|
+
fillOpacity?: number;
|
|
15
|
+
/** Stroke width in pixels. Default: 4 (Manim's default) */
|
|
16
|
+
strokeWidth?: number;
|
|
17
|
+
/** Center position. Default: [0, 0, 0] */
|
|
18
|
+
center?: Vector3Tuple;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Rectangle - A rectangular VMobject
|
|
22
|
+
*
|
|
23
|
+
* Creates a rectangle defined by its width and height, centered at a point.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```typescript
|
|
27
|
+
* // Create a 2x1 rectangle
|
|
28
|
+
* const rect = new Rectangle();
|
|
29
|
+
*
|
|
30
|
+
* // Create a square
|
|
31
|
+
* const square = new Rectangle({ width: 2, height: 2 });
|
|
32
|
+
*
|
|
33
|
+
* // Create a filled rectangle
|
|
34
|
+
* const filled = new Rectangle({ fillOpacity: 0.5, color: '#ff0000' });
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
export declare class Rectangle extends VMobject {
|
|
38
|
+
private _width;
|
|
39
|
+
private _height;
|
|
40
|
+
private _centerPoint;
|
|
41
|
+
constructor(options?: RectangleOptions);
|
|
42
|
+
/**
|
|
43
|
+
* Generate the rectangle points as 4 line segments
|
|
44
|
+
*/
|
|
45
|
+
private _generatePoints;
|
|
46
|
+
/**
|
|
47
|
+
* Get the width of the rectangle
|
|
48
|
+
*/
|
|
49
|
+
getWidth(): number;
|
|
50
|
+
/**
|
|
51
|
+
* Set the width of the rectangle
|
|
52
|
+
*/
|
|
53
|
+
setWidth(value: number): this;
|
|
54
|
+
/**
|
|
55
|
+
* Get the height of the rectangle
|
|
56
|
+
*/
|
|
57
|
+
getHeight(): number;
|
|
58
|
+
/**
|
|
59
|
+
* Set the height of the rectangle
|
|
60
|
+
*/
|
|
61
|
+
setHeight(value: number): this;
|
|
62
|
+
/**
|
|
63
|
+
* Get the center of the rectangle
|
|
64
|
+
*/
|
|
65
|
+
getRectCenter(): Vector3Tuple;
|
|
66
|
+
/**
|
|
67
|
+
* Set the center of the rectangle
|
|
68
|
+
*/
|
|
69
|
+
setRectCenter(value: Vector3Tuple): this;
|
|
70
|
+
/**
|
|
71
|
+
* Get the area of the rectangle
|
|
72
|
+
*/
|
|
73
|
+
getArea(): number;
|
|
74
|
+
/**
|
|
75
|
+
* Get the perimeter of the rectangle
|
|
76
|
+
*/
|
|
77
|
+
getPerimeter(): number;
|
|
78
|
+
/**
|
|
79
|
+
* Get a specific corner of the rectangle
|
|
80
|
+
*/
|
|
81
|
+
getCorner(corner: 'topLeft' | 'topRight' | 'bottomRight' | 'bottomLeft'): Vector3Tuple;
|
|
82
|
+
/**
|
|
83
|
+
* Get the top edge center
|
|
84
|
+
*/
|
|
85
|
+
getTop(): Vector3Tuple;
|
|
86
|
+
/**
|
|
87
|
+
* Get the bottom edge center
|
|
88
|
+
*/
|
|
89
|
+
getBottom(): Vector3Tuple;
|
|
90
|
+
/**
|
|
91
|
+
* Get the left edge center
|
|
92
|
+
*/
|
|
93
|
+
getLeft(): Vector3Tuple;
|
|
94
|
+
/**
|
|
95
|
+
* Get the right edge center
|
|
96
|
+
*/
|
|
97
|
+
getRight(): Vector3Tuple;
|
|
98
|
+
/**
|
|
99
|
+
* Create a copy of this Rectangle
|
|
100
|
+
*/
|
|
101
|
+
protected _createCopy(): Rectangle;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Square - A special case of Rectangle with equal width and height
|
|
105
|
+
*/
|
|
106
|
+
export declare class Square extends Rectangle {
|
|
107
|
+
constructor(options?: Omit<RectangleOptions, 'width' | 'height'> & {
|
|
108
|
+
sideLength?: number;
|
|
109
|
+
});
|
|
110
|
+
/**
|
|
111
|
+
* Get the side length of the square
|
|
112
|
+
*/
|
|
113
|
+
getSideLength(): number;
|
|
114
|
+
/**
|
|
115
|
+
* Set the side length of the square
|
|
116
|
+
*/
|
|
117
|
+
setSideLength(value: number): this;
|
|
118
|
+
/**
|
|
119
|
+
* Create a copy of this Square
|
|
120
|
+
*/
|
|
121
|
+
protected _createCopy(): Square;
|
|
122
|
+
}
|
|
123
|
+
//# sourceMappingURL=Rectangle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Rectangle.d.ts","sourceRoot":"","sources":["../../../src/mobjects/geometry/Rectangle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGlD;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,yCAAyC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0CAA0C;IAC1C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,wEAAwE;IACxE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2CAA2C;IAC3C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2DAA2D;IAC3D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0CAA0C;IAC1C,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,SAAU,SAAQ,QAAQ;IACrC,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,YAAY,CAAe;gBAEvB,OAAO,GAAE,gBAAqB;IAuB1C;;OAEG;IACH,OAAO,CAAC,eAAe;IA+CvB;;OAEG;IACH,QAAQ,IAAI,MAAM;IAIlB;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAM7B;;OAEG;IACH,SAAS,IAAI,MAAM;IAInB;;OAEG;IACH,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAM9B;;OAEG;IACH,aAAa,IAAI,YAAY;IAI7B;;OAEG;IACH,aAAa,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI;IAM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