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.
Files changed (356) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +109 -0
  3. package/dist/animation/Animation.d.ts +69 -0
  4. package/dist/animation/Animation.d.ts.map +1 -0
  5. package/dist/animation/AnimationGroup.d.ts +48 -0
  6. package/dist/animation/AnimationGroup.d.ts.map +1 -0
  7. package/dist/animation/LaggedStart.d.ts +25 -0
  8. package/dist/animation/LaggedStart.d.ts.map +1 -0
  9. package/dist/animation/MaintainPositionRelativeTo.d.ts +23 -0
  10. package/dist/animation/MaintainPositionRelativeTo.d.ts.map +1 -0
  11. package/dist/animation/Succession.d.ts +19 -0
  12. package/dist/animation/Succession.d.ts.map +1 -0
  13. package/dist/animation/Timeline.d.ts +89 -0
  14. package/dist/animation/Timeline.d.ts.map +1 -0
  15. package/dist/animation/UpdateFromAlphaFunc.d.ts +32 -0
  16. package/dist/animation/UpdateFromAlphaFunc.d.ts.map +1 -0
  17. package/dist/animation/UpdateFromFunc.d.ts +30 -0
  18. package/dist/animation/UpdateFromFunc.d.ts.map +1 -0
  19. package/dist/animation/changing/index.d.ts +213 -0
  20. package/dist/animation/changing/index.d.ts.map +1 -0
  21. package/dist/animation/composition/LaggedStartMap.d.ts +47 -0
  22. package/dist/animation/composition/LaggedStartMap.d.ts.map +1 -0
  23. package/dist/animation/composition/index.d.ts +5 -0
  24. package/dist/animation/composition/index.d.ts.map +1 -0
  25. package/dist/animation/creation/Create.d.ts +232 -0
  26. package/dist/animation/creation/Create.d.ts.map +1 -0
  27. package/dist/animation/creation/CreationExtensions.d.ts +127 -0
  28. package/dist/animation/creation/CreationExtensions.d.ts.map +1 -0
  29. package/dist/animation/creation/TypeWithCursor.d.ts +133 -0
  30. package/dist/animation/creation/TypeWithCursor.d.ts.map +1 -0
  31. package/dist/animation/creation/index.d.ts +4 -0
  32. package/dist/animation/creation/index.d.ts.map +1 -0
  33. package/dist/animation/fading/FadeIn.d.ts +31 -0
  34. package/dist/animation/fading/FadeIn.d.ts.map +1 -0
  35. package/dist/animation/fading/FadeOut.d.ts +32 -0
  36. package/dist/animation/fading/FadeOut.d.ts.map +1 -0
  37. package/dist/animation/fading/index.d.ts +3 -0
  38. package/dist/animation/fading/index.d.ts.map +1 -0
  39. package/dist/animation/growing/index.d.ts +103 -0
  40. package/dist/animation/growing/index.d.ts.map +1 -0
  41. package/dist/animation/index.d.ts +20 -0
  42. package/dist/animation/index.d.ts.map +1 -0
  43. package/dist/animation/indication/ApplyWave.d.ts +51 -0
  44. package/dist/animation/indication/ApplyWave.d.ts.map +1 -0
  45. package/dist/animation/indication/Blink.d.ts +34 -0
  46. package/dist/animation/indication/Blink.d.ts.map +1 -0
  47. package/dist/animation/indication/Circumscribe.d.ts +54 -0
  48. package/dist/animation/indication/Circumscribe.d.ts.map +1 -0
  49. package/dist/animation/indication/Flash.d.ts +45 -0
  50. package/dist/animation/indication/Flash.d.ts.map +1 -0
  51. package/dist/animation/indication/FocusOn.d.ts +79 -0
  52. package/dist/animation/indication/FocusOn.d.ts.map +1 -0
  53. package/dist/animation/indication/Indicate.d.ts +30 -0
  54. package/dist/animation/indication/Indicate.d.ts.map +1 -0
  55. package/dist/animation/indication/ShowCreationThenDestruction.d.ts +26 -0
  56. package/dist/animation/indication/ShowCreationThenDestruction.d.ts.map +1 -0
  57. package/dist/animation/indication/ShowPassingFlash.d.ts +47 -0
  58. package/dist/animation/indication/ShowPassingFlash.d.ts.map +1 -0
  59. package/dist/animation/indication/ShowPassingFlashWithThinningStrokeWidth.d.ts +21 -0
  60. package/dist/animation/indication/ShowPassingFlashWithThinningStrokeWidth.d.ts.map +1 -0
  61. package/dist/animation/indication/Wiggle.d.ts +48 -0
  62. package/dist/animation/indication/Wiggle.d.ts.map +1 -0
  63. package/dist/animation/indication/WiggleOutThenIn.d.ts +44 -0
  64. package/dist/animation/indication/WiggleOutThenIn.d.ts.map +1 -0
  65. package/dist/animation/indication/index.d.ts +20 -0
  66. package/dist/animation/indication/index.d.ts.map +1 -0
  67. package/dist/animation/movement/Homotopy.d.ts +204 -0
  68. package/dist/animation/movement/Homotopy.d.ts.map +1 -0
  69. package/dist/animation/movement/MoveAlongPath.d.ts +48 -0
  70. package/dist/animation/movement/MoveAlongPath.d.ts.map +1 -0
  71. package/dist/animation/movement/Rotate.d.ts +47 -0
  72. package/dist/animation/movement/Rotate.d.ts.map +1 -0
  73. package/dist/animation/movement/Scale.d.ts +74 -0
  74. package/dist/animation/movement/Scale.d.ts.map +1 -0
  75. package/dist/animation/movement/Shift.d.ts +74 -0
  76. package/dist/animation/movement/Shift.d.ts.map +1 -0
  77. package/dist/animation/movement/index.d.ts +6 -0
  78. package/dist/animation/movement/index.d.ts.map +1 -0
  79. package/dist/animation/numbers/index.d.ts +152 -0
  80. package/dist/animation/numbers/index.d.ts.map +1 -0
  81. package/dist/animation/speed/index.d.ts +114 -0
  82. package/dist/animation/speed/index.d.ts.map +1 -0
  83. package/dist/animation/transform/ApplyPointwiseFunction.d.ts +23 -0
  84. package/dist/animation/transform/ApplyPointwiseFunction.d.ts.map +1 -0
  85. package/dist/animation/transform/Transform.d.ts +89 -0
  86. package/dist/animation/transform/Transform.d.ts.map +1 -0
  87. package/dist/animation/transform/TransformExtensions.d.ts +444 -0
  88. package/dist/animation/transform/TransformExtensions.d.ts.map +1 -0
  89. package/dist/animation/transform/TransformMatching.d.ts +138 -0
  90. package/dist/animation/transform/TransformMatching.d.ts.map +1 -0
  91. package/dist/animation/transform/index.d.ts +5 -0
  92. package/dist/animation/transform/index.d.ts.map +1 -0
  93. package/dist/animation/utility/index.d.ts +171 -0
  94. package/dist/animation/utility/index.d.ts.map +1 -0
  95. package/dist/constants/colors.d.ts +72 -0
  96. package/dist/constants/colors.d.ts.map +1 -0
  97. package/dist/constants/colors.test.d.ts +2 -0
  98. package/dist/constants/colors.test.d.ts.map +1 -0
  99. package/dist/constants/directions.test.d.ts +2 -0
  100. package/dist/constants/directions.test.d.ts.map +1 -0
  101. package/dist/constants/index.d.ts +16 -0
  102. package/dist/constants/index.d.ts.map +1 -0
  103. package/dist/core/AudioManager.d.ts +203 -0
  104. package/dist/core/AudioManager.d.ts.map +1 -0
  105. package/dist/core/Camera.d.ts +172 -0
  106. package/dist/core/Camera.d.ts.map +1 -0
  107. package/dist/core/Camera2DFrame.d.ts +31 -0
  108. package/dist/core/Camera2DFrame.d.ts.map +1 -0
  109. package/dist/core/CameraExtensions.d.ts +420 -0
  110. package/dist/core/CameraExtensions.d.ts.map +1 -0
  111. package/dist/core/CameraFrame.d.ts +178 -0
  112. package/dist/core/CameraFrame.d.ts.map +1 -0
  113. package/dist/core/Group.d.ts +139 -0
  114. package/dist/core/Group.d.ts.map +1 -0
  115. package/dist/core/InteractiveScene.d.ts +122 -0
  116. package/dist/core/InteractiveScene.d.ts.map +1 -0
  117. package/dist/core/Lighting.d.ts +128 -0
  118. package/dist/core/Lighting.d.ts.map +1 -0
  119. package/dist/core/Mobject.d.ts +488 -0
  120. package/dist/core/Mobject.d.ts.map +1 -0
  121. package/dist/core/Renderer.d.ts +84 -0
  122. package/dist/core/Renderer.d.ts.map +1 -0
  123. package/dist/core/Scene.d.ts +353 -0
  124. package/dist/core/Scene.d.ts.map +1 -0
  125. package/dist/core/SceneExtensions.d.ts +640 -0
  126. package/dist/core/SceneExtensions.d.ts.map +1 -0
  127. package/dist/core/SceneExtensions.test.d.ts +2 -0
  128. package/dist/core/SceneExtensions.test.d.ts.map +1 -0
  129. package/dist/core/StateManager.d.ts +193 -0
  130. package/dist/core/StateManager.d.ts.map +1 -0
  131. package/dist/core/VDict.d.ts +229 -0
  132. package/dist/core/VDict.d.ts.map +1 -0
  133. package/dist/core/VGroup.d.ts +200 -0
  134. package/dist/core/VGroup.d.ts.map +1 -0
  135. package/dist/core/VMobject.d.ts +419 -0
  136. package/dist/core/VMobject.d.ts.map +1 -0
  137. package/dist/core/index.d.ts +16 -0
  138. package/dist/core/index.d.ts.map +1 -0
  139. package/dist/examples.test.d.ts +2 -0
  140. package/dist/examples.test.d.ts.map +1 -0
  141. package/dist/export/GifExporter.d.ts +40 -0
  142. package/dist/export/GifExporter.d.ts.map +1 -0
  143. package/dist/export/VideoExporter.d.ts +135 -0
  144. package/dist/export/VideoExporter.d.ts.map +1 -0
  145. package/dist/export/index.d.ts +3 -0
  146. package/dist/export/index.d.ts.map +1 -0
  147. package/dist/index.d.ts +65 -0
  148. package/dist/index.d.ts.map +1 -0
  149. package/dist/index.js +49064 -0
  150. package/dist/integrations/index.d.ts +1 -0
  151. package/dist/integrations/index.d.ts.map +1 -0
  152. package/dist/integrations/react.d.ts +144 -0
  153. package/dist/integrations/react.d.ts.map +1 -0
  154. package/dist/integrations/react.js +570 -0
  155. package/dist/integrations/vue.d.ts +249 -0
  156. package/dist/integrations/vue.d.ts.map +1 -0
  157. package/dist/integrations/vue.js +560 -0
  158. package/dist/interaction/Clickable.d.ts +71 -0
  159. package/dist/interaction/Clickable.d.ts.map +1 -0
  160. package/dist/interaction/Controls.d.ts +174 -0
  161. package/dist/interaction/Controls.d.ts.map +1 -0
  162. package/dist/interaction/Draggable.d.ts +88 -0
  163. package/dist/interaction/Draggable.d.ts.map +1 -0
  164. package/dist/interaction/Hoverable.d.ts +82 -0
  165. package/dist/interaction/Hoverable.d.ts.map +1 -0
  166. package/dist/interaction/OrbitControls.d.ts +139 -0
  167. package/dist/interaction/OrbitControls.d.ts.map +1 -0
  168. package/dist/interaction/PlaybackControls.d.ts +113 -0
  169. package/dist/interaction/PlaybackControls.d.ts.map +1 -0
  170. package/dist/interaction/SelectionManager.d.ts +125 -0
  171. package/dist/interaction/SelectionManager.d.ts.map +1 -0
  172. package/dist/interaction/index.d.ts +12 -0
  173. package/dist/interaction/index.d.ts.map +1 -0
  174. package/dist/mobjects/fractals/MandelbrotSet.d.ts +92 -0
  175. package/dist/mobjects/fractals/MandelbrotSet.d.ts.map +1 -0
  176. package/dist/mobjects/fractals/NewtonFractal.d.ts +121 -0
  177. package/dist/mobjects/fractals/NewtonFractal.d.ts.map +1 -0
  178. package/dist/mobjects/fractals/index.d.ts +3 -0
  179. package/dist/mobjects/fractals/index.d.ts.map +1 -0
  180. package/dist/mobjects/frame/index.d.ts +188 -0
  181. package/dist/mobjects/frame/index.d.ts.map +1 -0
  182. package/dist/mobjects/geometry/AngleShapes.d.ts +326 -0
  183. package/dist/mobjects/geometry/AngleShapes.d.ts.map +1 -0
  184. package/dist/mobjects/geometry/Arc.d.ts +111 -0
  185. package/dist/mobjects/geometry/Arc.d.ts.map +1 -0
  186. package/dist/mobjects/geometry/ArcBetweenPoints.d.ts +68 -0
  187. package/dist/mobjects/geometry/ArcBetweenPoints.d.ts.map +1 -0
  188. package/dist/mobjects/geometry/ArcShapes.d.ts +659 -0
  189. package/dist/mobjects/geometry/ArcShapes.d.ts.map +1 -0
  190. package/dist/mobjects/geometry/Arrow.d.ts +130 -0
  191. package/dist/mobjects/geometry/Arrow.d.ts.map +1 -0
  192. package/dist/mobjects/geometry/ArrowTips.d.ts +238 -0
  193. package/dist/mobjects/geometry/ArrowTips.d.ts.map +1 -0
  194. package/dist/mobjects/geometry/BooleanOperations.d.ts +163 -0
  195. package/dist/mobjects/geometry/BooleanOperations.d.ts.map +1 -0
  196. package/dist/mobjects/geometry/Circle.d.ts +92 -0
  197. package/dist/mobjects/geometry/Circle.d.ts.map +1 -0
  198. package/dist/mobjects/geometry/CubicBezier.d.ts +126 -0
  199. package/dist/mobjects/geometry/CubicBezier.d.ts.map +1 -0
  200. package/dist/mobjects/geometry/DashedLine.d.ts +109 -0
  201. package/dist/mobjects/geometry/DashedLine.d.ts.map +1 -0
  202. package/dist/mobjects/geometry/DashedVMobject.d.ts +96 -0
  203. package/dist/mobjects/geometry/DashedVMobject.d.ts.map +1 -0
  204. package/dist/mobjects/geometry/Dot.d.ts +100 -0
  205. package/dist/mobjects/geometry/Dot.d.ts.map +1 -0
  206. package/dist/mobjects/geometry/LabeledGeometry.d.ts +372 -0
  207. package/dist/mobjects/geometry/LabeledGeometry.d.ts.map +1 -0
  208. package/dist/mobjects/geometry/Line.d.ts +83 -0
  209. package/dist/mobjects/geometry/Line.d.ts.map +1 -0
  210. package/dist/mobjects/geometry/Polygon.d.ts +155 -0
  211. package/dist/mobjects/geometry/Polygon.d.ts.map +1 -0
  212. package/dist/mobjects/geometry/PolygonExtensions.d.ts +412 -0
  213. package/dist/mobjects/geometry/PolygonExtensions.d.ts.map +1 -0
  214. package/dist/mobjects/geometry/Rectangle.d.ts +123 -0
  215. package/dist/mobjects/geometry/Rectangle.d.ts.map +1 -0
  216. package/dist/mobjects/geometry/ShapeMatchers.d.ts +252 -0
  217. package/dist/mobjects/geometry/ShapeMatchers.d.ts.map +1 -0
  218. package/dist/mobjects/geometry/index.d.ts +25 -0
  219. package/dist/mobjects/geometry/index.d.ts.map +1 -0
  220. package/dist/mobjects/graph/index.d.ts +425 -0
  221. package/dist/mobjects/graph/index.d.ts.map +1 -0
  222. package/dist/mobjects/graphing/Axes.d.ts +254 -0
  223. package/dist/mobjects/graphing/Axes.d.ts.map +1 -0
  224. package/dist/mobjects/graphing/BarChart.d.ts +241 -0
  225. package/dist/mobjects/graphing/BarChart.d.ts.map +1 -0
  226. package/dist/mobjects/graphing/ComplexPlane.d.ts +311 -0
  227. package/dist/mobjects/graphing/ComplexPlane.d.ts.map +1 -0
  228. package/dist/mobjects/graphing/FunctionGraph.d.ts +123 -0
  229. package/dist/mobjects/graphing/FunctionGraph.d.ts.map +1 -0
  230. package/dist/mobjects/graphing/ImplicitFunction.d.ts +131 -0
  231. package/dist/mobjects/graphing/ImplicitFunction.d.ts.map +1 -0
  232. package/dist/mobjects/graphing/NumberLine.d.ts +195 -0
  233. package/dist/mobjects/graphing/NumberLine.d.ts.map +1 -0
  234. package/dist/mobjects/graphing/NumberPlane.d.ts +91 -0
  235. package/dist/mobjects/graphing/NumberPlane.d.ts.map +1 -0
  236. package/dist/mobjects/graphing/ParametricFunction.d.ts +111 -0
  237. package/dist/mobjects/graphing/ParametricFunction.d.ts.map +1 -0
  238. package/dist/mobjects/graphing/Vector.d.ts +121 -0
  239. package/dist/mobjects/graphing/Vector.d.ts.map +1 -0
  240. package/dist/mobjects/graphing/VectorField.d.ts +321 -0
  241. package/dist/mobjects/graphing/VectorField.d.ts.map +1 -0
  242. package/dist/mobjects/graphing/index.d.ts +18 -0
  243. package/dist/mobjects/graphing/index.d.ts.map +1 -0
  244. package/dist/mobjects/image/index.d.ts +223 -0
  245. package/dist/mobjects/image/index.d.ts.map +1 -0
  246. package/dist/mobjects/matrix/Matrix.d.ts +260 -0
  247. package/dist/mobjects/matrix/Matrix.d.ts.map +1 -0
  248. package/dist/mobjects/matrix/index.d.ts +8 -0
  249. package/dist/mobjects/matrix/index.d.ts.map +1 -0
  250. package/dist/mobjects/point/index.d.ts +707 -0
  251. package/dist/mobjects/point/index.d.ts.map +1 -0
  252. package/dist/mobjects/probability/DiceFace.d.ts +137 -0
  253. package/dist/mobjects/probability/DiceFace.d.ts.map +1 -0
  254. package/dist/mobjects/probability/SampleSpace.d.ts +267 -0
  255. package/dist/mobjects/probability/SampleSpace.d.ts.map +1 -0
  256. package/dist/mobjects/probability/index.d.ts +9 -0
  257. package/dist/mobjects/probability/index.d.ts.map +1 -0
  258. package/dist/mobjects/svg/Brace.d.ts +308 -0
  259. package/dist/mobjects/svg/Brace.d.ts.map +1 -0
  260. package/dist/mobjects/svg/SVGMobject.d.ts +64 -0
  261. package/dist/mobjects/svg/SVGMobject.d.ts.map +1 -0
  262. package/dist/mobjects/svg/index.d.ts +10 -0
  263. package/dist/mobjects/svg/index.d.ts.map +1 -0
  264. package/dist/mobjects/table/Table.d.ts +315 -0
  265. package/dist/mobjects/table/Table.d.ts.map +1 -0
  266. package/dist/mobjects/table/index.d.ts +8 -0
  267. package/dist/mobjects/table/index.d.ts.map +1 -0
  268. package/dist/mobjects/text/Code.d.ts +244 -0
  269. package/dist/mobjects/text/Code.d.ts.map +1 -0
  270. package/dist/mobjects/text/DecimalNumber.d.ts +199 -0
  271. package/dist/mobjects/text/DecimalNumber.d.ts.map +1 -0
  272. package/dist/mobjects/text/GlyphVMobject.d.ts +76 -0
  273. package/dist/mobjects/text/GlyphVMobject.d.ts.map +1 -0
  274. package/dist/mobjects/text/MarkupText.d.ts +161 -0
  275. package/dist/mobjects/text/MarkupText.d.ts.map +1 -0
  276. package/dist/mobjects/text/MathJaxRenderer.d.ts +49 -0
  277. package/dist/mobjects/text/MathJaxRenderer.d.ts.map +1 -0
  278. package/dist/mobjects/text/MathTex.d.ts +242 -0
  279. package/dist/mobjects/text/MathTex.d.ts.map +1 -0
  280. package/dist/mobjects/text/Paragraph.d.ts +86 -0
  281. package/dist/mobjects/text/Paragraph.d.ts.map +1 -0
  282. package/dist/mobjects/text/Tex.d.ts +40 -0
  283. package/dist/mobjects/text/Tex.d.ts.map +1 -0
  284. package/dist/mobjects/text/Text.d.ts +171 -0
  285. package/dist/mobjects/text/Text.d.ts.map +1 -0
  286. package/dist/mobjects/text/TextExtensions.d.ts +383 -0
  287. package/dist/mobjects/text/TextExtensions.d.ts.map +1 -0
  288. package/dist/mobjects/text/TextGlyphGroup.d.ts +48 -0
  289. package/dist/mobjects/text/TextGlyphGroup.d.ts.map +1 -0
  290. package/dist/mobjects/text/Variable.d.ts +160 -0
  291. package/dist/mobjects/text/Variable.d.ts.map +1 -0
  292. package/dist/mobjects/text/index.d.ts +21 -0
  293. package/dist/mobjects/text/index.d.ts.map +1 -0
  294. package/dist/mobjects/text/katex-styles.d.ts +23 -0
  295. package/dist/mobjects/text/katex-styles.d.ts.map +1 -0
  296. package/dist/mobjects/text/svgPathParser.d.ts +39 -0
  297. package/dist/mobjects/text/svgPathParser.d.ts.map +1 -0
  298. package/dist/mobjects/three-d/Arrow3D.d.ts +136 -0
  299. package/dist/mobjects/three-d/Arrow3D.d.ts.map +1 -0
  300. package/dist/mobjects/three-d/Cube.d.ts +186 -0
  301. package/dist/mobjects/three-d/Cube.d.ts.map +1 -0
  302. package/dist/mobjects/three-d/Cylinder.d.ts +189 -0
  303. package/dist/mobjects/three-d/Cylinder.d.ts.map +1 -0
  304. package/dist/mobjects/three-d/Line3D.d.ts +100 -0
  305. package/dist/mobjects/three-d/Line3D.d.ts.map +1 -0
  306. package/dist/mobjects/three-d/ParametricSurface.d.ts +86 -0
  307. package/dist/mobjects/three-d/ParametricSurface.d.ts.map +1 -0
  308. package/dist/mobjects/three-d/Polyhedra.d.ts +271 -0
  309. package/dist/mobjects/three-d/Polyhedra.d.ts.map +1 -0
  310. package/dist/mobjects/three-d/Sphere.d.ts +100 -0
  311. package/dist/mobjects/three-d/Sphere.d.ts.map +1 -0
  312. package/dist/mobjects/three-d/Surface3D.d.ts +156 -0
  313. package/dist/mobjects/three-d/Surface3D.d.ts.map +1 -0
  314. package/dist/mobjects/three-d/TexturedSurface.d.ts +208 -0
  315. package/dist/mobjects/three-d/TexturedSurface.d.ts.map +1 -0
  316. package/dist/mobjects/three-d/ThreeDAxes.d.ts +172 -0
  317. package/dist/mobjects/three-d/ThreeDAxes.d.ts.map +1 -0
  318. package/dist/mobjects/three-d/ThreeDExtensions.d.ts +335 -0
  319. package/dist/mobjects/three-d/ThreeDExtensions.d.ts.map +1 -0
  320. package/dist/mobjects/three-d/Torus.d.ts +123 -0
  321. package/dist/mobjects/three-d/Torus.d.ts.map +1 -0
  322. package/dist/mobjects/three-d/index.d.ts +19 -0
  323. package/dist/mobjects/three-d/index.d.ts.map +1 -0
  324. package/dist/mobjects/value-tracker/ValueTracker.d.ts +248 -0
  325. package/dist/mobjects/value-tracker/ValueTracker.d.ts.map +1 -0
  326. package/dist/mobjects/value-tracker/index.d.ts +9 -0
  327. package/dist/mobjects/value-tracker/index.d.ts.map +1 -0
  328. package/dist/rate-functions/index.d.ts +81 -0
  329. package/dist/rate-functions/index.d.ts.map +1 -0
  330. package/dist/rate-functions/rateFunctions.test.d.ts +2 -0
  331. package/dist/rate-functions/rateFunctions.test.d.ts.map +1 -0
  332. package/dist/rendering/BezierRenderer.d.ts +112 -0
  333. package/dist/rendering/BezierRenderer.d.ts.map +1 -0
  334. package/dist/rendering/BezierShaderMaterial.d.ts +50 -0
  335. package/dist/rendering/BezierShaderMaterial.d.ts.map +1 -0
  336. package/dist/rendering/index.d.ts +10 -0
  337. package/dist/rendering/index.d.ts.map +1 -0
  338. package/dist/utils/Performance.d.ts +118 -0
  339. package/dist/utils/Performance.d.ts.map +1 -0
  340. package/dist/utils/featureFlags.d.ts +15 -0
  341. package/dist/utils/featureFlags.d.ts.map +1 -0
  342. package/dist/utils/hungarian.d.ts +66 -0
  343. package/dist/utils/hungarian.d.ts.map +1 -0
  344. package/dist/utils/logger.d.ts +14 -0
  345. package/dist/utils/logger.d.ts.map +1 -0
  346. package/dist/utils/math.d.ts +52 -0
  347. package/dist/utils/math.d.ts.map +1 -0
  348. package/dist/utils/ode.d.ts +135 -0
  349. package/dist/utils/ode.d.ts.map +1 -0
  350. package/dist/utils/skeletonize.d.ts +35 -0
  351. package/dist/utils/skeletonize.d.ts.map +1 -0
  352. package/dist/utils/triangulate.d.ts +54 -0
  353. package/dist/utils/triangulate.d.ts.map +1 -0
  354. package/dist/utils/vectors.d.ts +57 -0
  355. package/dist/utils/vectors.d.ts.map +1 -0
  356. package/package.json +122 -0
@@ -0,0 +1,425 @@
1
+ import { Mobject, Vector3Tuple } from '../../core/Mobject';
2
+ import { Dot } from '../geometry/Dot';
3
+ /**
4
+ * Graph mobjects for network visualization in manimweb
5
+ *
6
+ * This module provides graph classes for visualizing networks with vertices
7
+ * and edges. Supports both undirected (Graph) and directed (DiGraph) graphs
8
+ * with various layout algorithms.
9
+ */
10
+ import * as THREE from 'three';
11
+ /**
12
+ * Unique identifier for a vertex
13
+ */
14
+ export type VertexId = string | number;
15
+ /**
16
+ * Edge definition as a tuple of [source, target]
17
+ */
18
+ export type EdgeTuple = [VertexId, VertexId];
19
+ /**
20
+ * Layout algorithm types
21
+ */
22
+ export type LayoutType = 'spring' | 'circular' | 'shell' | 'tree' | 'random' | 'grid' | 'kamada_kawai' | 'spectral' | 'bipartite' | 'custom';
23
+ /**
24
+ * Options for vertex styling
25
+ */
26
+ export interface VertexStyleOptions {
27
+ /** Radius of the vertex dot. Default: 0.15 */
28
+ radius?: number;
29
+ /** Fill color of the vertex. Default: WHITE */
30
+ color?: string;
31
+ /** Fill opacity. Default: 1 */
32
+ fillOpacity?: number;
33
+ /** Stroke color for the vertex border. Default: same as color */
34
+ strokeColor?: string;
35
+ /** Stroke width. Default: 2 */
36
+ strokeWidth?: number;
37
+ }
38
+ /**
39
+ * Options for edge styling
40
+ */
41
+ export interface EdgeStyleOptions {
42
+ /** Color of the edge. Default: BLUE */
43
+ color?: string;
44
+ /** Stroke width of the edge. Default: 4 */
45
+ strokeWidth?: number;
46
+ /** For directed graphs, tip length. Default: 0.2 */
47
+ tipLength?: number;
48
+ /** For directed graphs, tip width. Default: 0.12 */
49
+ tipWidth?: number;
50
+ }
51
+ /**
52
+ * Configuration for a single vertex
53
+ */
54
+ export interface VertexConfig {
55
+ /** Position of the vertex (if using custom layout) */
56
+ position?: Vector3Tuple;
57
+ /** Custom styling for this vertex */
58
+ style?: VertexStyleOptions;
59
+ /** Label text to display next to the vertex */
60
+ label?: string;
61
+ }
62
+ /**
63
+ * Configuration for a single edge
64
+ */
65
+ export interface EdgeConfig {
66
+ /** Custom styling for this edge */
67
+ style?: EdgeStyleOptions;
68
+ /** Label text to display on the edge */
69
+ label?: string;
70
+ /** Weight of the edge (used by some layout algorithms) */
71
+ weight?: number;
72
+ }
73
+ /**
74
+ * Layout configuration options
75
+ */
76
+ export interface LayoutConfig {
77
+ /** Type of layout algorithm */
78
+ type: LayoutType;
79
+ /** Scale factor for the layout. Default: 2 */
80
+ scale?: number;
81
+ /** Center point of the layout. Default: [0, 0, 0] */
82
+ center?: Vector3Tuple;
83
+ /** Number of iterations for force-directed layouts. Default: 50 */
84
+ iterations?: number;
85
+ /** For tree layout: root vertex */
86
+ root?: VertexId;
87
+ /** For bipartite layout: partition sets */
88
+ partition?: [VertexId[], VertexId[]];
89
+ /** Custom positions map for custom layout */
90
+ positions?: Map<VertexId, Vector3Tuple>;
91
+ }
92
+ /**
93
+ * Options for creating a graph
94
+ */
95
+ export interface GenericGraphOptions {
96
+ /** List of vertex identifiers */
97
+ vertices?: VertexId[];
98
+ /** List of edges as [source, target] tuples */
99
+ edges?: EdgeTuple[];
100
+ /** Layout configuration */
101
+ layout?: LayoutType | LayoutConfig;
102
+ /** Default vertex styling */
103
+ vertexStyle?: VertexStyleOptions;
104
+ /** Default edge styling */
105
+ edgeStyle?: EdgeStyleOptions;
106
+ /** Per-vertex configuration */
107
+ vertexConfig?: Map<VertexId, VertexConfig> | Record<string, VertexConfig>;
108
+ /** Per-edge configuration (key is "source-target") */
109
+ edgeConfig?: Map<string, EdgeConfig> | Record<string, EdgeConfig>;
110
+ /** Whether to show vertex labels. Default: false */
111
+ showLabels?: boolean;
112
+ /** Label font size. Default: 24 */
113
+ labelFontSize?: number;
114
+ }
115
+ /**
116
+ * GenericGraph - Base class for graph visualization
117
+ *
118
+ * Provides the foundation for both directed and undirected graphs.
119
+ * Manages vertices and edges as Mobject children for animation support.
120
+ */
121
+ export declare class GenericGraph extends Mobject {
122
+ /** List of vertex identifiers */
123
+ protected _vertices: VertexId[];
124
+ /** List of edges as [source, target] tuples */
125
+ protected _edges: EdgeTuple[];
126
+ /** Map of vertex id to position */
127
+ protected _positions: Map<VertexId, Vector3Tuple>;
128
+ /** Map of vertex id to Dot mobject */
129
+ protected _vertexMobjects: Map<VertexId, Dot>;
130
+ /** Map of edge key to Line/Arrow mobject */
131
+ protected _edgeMobjects: Map<string, Mobject>;
132
+ /** Layout configuration */
133
+ protected _layoutConfig: LayoutConfig;
134
+ /** Default vertex style */
135
+ protected _vertexStyle: VertexStyleOptions;
136
+ /** Default edge style */
137
+ protected _edgeStyle: EdgeStyleOptions;
138
+ /** Per-vertex configuration */
139
+ protected _vertexConfig: Map<VertexId, VertexConfig>;
140
+ /** Per-edge configuration */
141
+ protected _edgeConfig: Map<string, EdgeConfig>;
142
+ /** Whether this is a directed graph */
143
+ protected _directed: boolean;
144
+ /** Three.js group for this graph */
145
+ protected _group: THREE.Group | null;
146
+ constructor(options?: GenericGraphOptions);
147
+ /**
148
+ * Get edge key from vertex pair
149
+ */
150
+ protected _getEdgeKey(source: VertexId, target: VertexId): string;
151
+ /**
152
+ * Compute vertex positions using the layout algorithm
153
+ */
154
+ protected _computeLayout(): void;
155
+ /**
156
+ * Create vertex and edge mobjects
157
+ */
158
+ protected _createMobjects(): void;
159
+ /**
160
+ * Create a single vertex mobject
161
+ */
162
+ protected _createVertexMobject(v: VertexId): void;
163
+ /**
164
+ * Create a single edge mobject
165
+ */
166
+ protected _createEdgeMobject(source: VertexId, target: VertexId): void;
167
+ /**
168
+ * Shorten an edge to not overlap with vertex circles
169
+ */
170
+ protected _shortenEdge(start: Vector3Tuple, end: Vector3Tuple, radius: number): [Vector3Tuple, Vector3Tuple];
171
+ /**
172
+ * Add a vertex to the graph
173
+ * @param v - Vertex identifier
174
+ * @param config - Optional vertex configuration
175
+ * @returns this for chaining
176
+ */
177
+ addVertex(v: VertexId, config?: VertexConfig): this;
178
+ /**
179
+ * Add multiple vertices to the graph
180
+ * @param vertices - Array of vertex identifiers
181
+ * @returns this for chaining
182
+ */
183
+ addVertices(...vertices: VertexId[]): this;
184
+ /**
185
+ * Remove a vertex from the graph
186
+ * @param v - Vertex identifier
187
+ * @returns this for chaining
188
+ */
189
+ removeVertex(v: VertexId): this;
190
+ /**
191
+ * Get all vertex identifiers
192
+ */
193
+ getVertices(): VertexId[];
194
+ /**
195
+ * Get the number of vertices
196
+ */
197
+ get numVertices(): number;
198
+ /**
199
+ * Check if the graph contains a vertex
200
+ */
201
+ hasVertex(v: VertexId): boolean;
202
+ /**
203
+ * Get the Dot mobject for a vertex
204
+ */
205
+ getVertexMobject(v: VertexId): Dot | undefined;
206
+ /**
207
+ * Get the position of a vertex
208
+ */
209
+ getVertexPosition(v: VertexId): Vector3Tuple | undefined;
210
+ /**
211
+ * Set the position of a vertex
212
+ */
213
+ setVertexPosition(v: VertexId, position: Vector3Tuple): this;
214
+ /**
215
+ * Get neighbors of a vertex (adjacent vertices)
216
+ */
217
+ getNeighbors(v: VertexId): VertexId[];
218
+ /**
219
+ * Get the degree of a vertex (number of edges)
220
+ */
221
+ getDegree(v: VertexId): number;
222
+ /**
223
+ * Add an edge to the graph
224
+ * @param source - Source vertex
225
+ * @param target - Target vertex
226
+ * @param config - Optional edge configuration
227
+ * @returns this for chaining
228
+ */
229
+ addEdge(source: VertexId, target: VertexId, config?: EdgeConfig): this;
230
+ /**
231
+ * Add multiple edges to the graph
232
+ * @param edges - Array of [source, target] tuples
233
+ * @returns this for chaining
234
+ */
235
+ addEdges(...edges: EdgeTuple[]): this;
236
+ /**
237
+ * Remove an edge from the graph
238
+ * @param source - Source vertex
239
+ * @param target - Target vertex
240
+ * @returns this for chaining
241
+ */
242
+ removeEdge(source: VertexId, target: VertexId): this;
243
+ /**
244
+ * Get all edges
245
+ */
246
+ getEdges(): EdgeTuple[];
247
+ /**
248
+ * Get the number of edges
249
+ */
250
+ get numEdges(): number;
251
+ /**
252
+ * Check if the graph contains an edge
253
+ */
254
+ hasEdge(source: VertexId, target: VertexId): boolean;
255
+ /**
256
+ * Get the Line/Arrow mobject for an edge
257
+ */
258
+ getEdgeMobject(source: VertexId, target: VertexId): Mobject | undefined;
259
+ /**
260
+ * Change the layout algorithm
261
+ * @param layout - Layout type or configuration
262
+ * @returns this for chaining
263
+ */
264
+ setLayout(layout: LayoutType | LayoutConfig): this;
265
+ /**
266
+ * Get all vertex positions
267
+ */
268
+ getPositions(): Map<VertexId, Vector3Tuple>;
269
+ /**
270
+ * Set the color of a specific vertex
271
+ */
272
+ setVertexColor(v: VertexId, color: string): this;
273
+ /**
274
+ * Set the color of a specific edge
275
+ */
276
+ setEdgeColor(source: VertexId, target: VertexId, color: string): this;
277
+ /**
278
+ * Highlight a path (sequence of vertices)
279
+ */
280
+ highlightPath(path: VertexId[], vertexColor?: string, edgeColor?: string): this;
281
+ /**
282
+ * Reset all colors to default
283
+ */
284
+ resetColors(): this;
285
+ /**
286
+ * Create the Three.js backing object
287
+ */
288
+ protected _createThreeObject(): THREE.Object3D;
289
+ /**
290
+ * Create a copy of this graph
291
+ */
292
+ protected _createCopy(): GenericGraph;
293
+ }
294
+ /**
295
+ * Graph - Undirected graph visualization
296
+ *
297
+ * Creates a graph with vertices connected by undirected edges (Lines).
298
+ *
299
+ * @example
300
+ * ```typescript
301
+ * // Create a simple triangle graph
302
+ * const graph = new Graph({
303
+ * vertices: ['A', 'B', 'C'],
304
+ * edges: [['A', 'B'], ['B', 'C'], ['C', 'A']],
305
+ * layout: 'circular'
306
+ * });
307
+ *
308
+ * // Create a graph with custom styling
309
+ * const styledGraph = new Graph({
310
+ * vertices: [1, 2, 3, 4],
311
+ * edges: [[1, 2], [2, 3], [3, 4], [4, 1]],
312
+ * layout: 'spring',
313
+ * vertexStyle: { color: '#FF0000', radius: 0.2 },
314
+ * edgeStyle: { color: '#00FF00', strokeWidth: 3 }
315
+ * });
316
+ * ```
317
+ */
318
+ export declare class Graph extends GenericGraph {
319
+ constructor(options?: GenericGraphOptions);
320
+ /**
321
+ * Create a copy of this graph
322
+ */
323
+ protected _createCopy(): Graph;
324
+ }
325
+ /**
326
+ * Options for creating a directed graph
327
+ */
328
+ export interface DiGraphOptions extends GenericGraphOptions {
329
+ }
330
+ /**
331
+ * DiGraph - Directed graph visualization
332
+ *
333
+ * Creates a graph with vertices connected by directed edges (Arrows).
334
+ *
335
+ * @example
336
+ * ```typescript
337
+ * // Create a directed graph
338
+ * const digraph = new DiGraph({
339
+ * vertices: ['A', 'B', 'C'],
340
+ * edges: [['A', 'B'], ['B', 'C'], ['C', 'A']],
341
+ * layout: 'circular'
342
+ * });
343
+ *
344
+ * // Tree structure with directed edges
345
+ * const tree = new DiGraph({
346
+ * vertices: ['root', 'left', 'right', 'leafL', 'leafR'],
347
+ * edges: [
348
+ * ['root', 'left'],
349
+ * ['root', 'right'],
350
+ * ['left', 'leafL'],
351
+ * ['right', 'leafR']
352
+ * ],
353
+ * layout: { type: 'tree', root: 'root' }
354
+ * });
355
+ * ```
356
+ */
357
+ export declare class DiGraph extends GenericGraph {
358
+ constructor(options?: DiGraphOptions);
359
+ /**
360
+ * Get out-neighbors (vertices this vertex points to)
361
+ */
362
+ getOutNeighbors(v: VertexId): VertexId[];
363
+ /**
364
+ * Get in-neighbors (vertices that point to this vertex)
365
+ */
366
+ getInNeighbors(v: VertexId): VertexId[];
367
+ /**
368
+ * Get out-degree (number of outgoing edges)
369
+ */
370
+ getOutDegree(v: VertexId): number;
371
+ /**
372
+ * Get in-degree (number of incoming edges)
373
+ */
374
+ getInDegree(v: VertexId): number;
375
+ /**
376
+ * Create a copy of this digraph
377
+ */
378
+ protected _createCopy(): DiGraph;
379
+ }
380
+ /**
381
+ * Create a complete graph (all vertices connected)
382
+ * @param n - Number of vertices
383
+ * @returns A complete Graph with n vertices
384
+ */
385
+ export declare function completeGraph(n: number, options?: Partial<GenericGraphOptions>): Graph;
386
+ /**
387
+ * Create a cycle graph (vertices in a ring)
388
+ * @param n - Number of vertices
389
+ * @returns A cycle Graph with n vertices
390
+ */
391
+ export declare function cycleGraph(n: number, options?: Partial<GenericGraphOptions>): Graph;
392
+ /**
393
+ * Create a path graph (linear chain)
394
+ * @param n - Number of vertices
395
+ * @returns A path Graph with n vertices
396
+ */
397
+ export declare function pathGraph(n: number, options?: Partial<GenericGraphOptions>): Graph;
398
+ /**
399
+ * Create a star graph (one central vertex connected to all others)
400
+ * @param n - Number of outer vertices (total vertices = n + 1)
401
+ * @returns A star Graph
402
+ */
403
+ export declare function starGraph(n: number, options?: Partial<GenericGraphOptions>): Graph;
404
+ /**
405
+ * Create a binary tree
406
+ * @param depth - Depth of the tree
407
+ * @returns A binary tree DiGraph
408
+ */
409
+ export declare function binaryTree(depth: number, options?: Partial<GenericGraphOptions>): DiGraph;
410
+ /**
411
+ * Create a grid graph
412
+ * @param rows - Number of rows
413
+ * @param cols - Number of columns
414
+ * @returns A grid Graph
415
+ */
416
+ export declare function gridGraph(rows: number, cols: number, options?: Partial<GenericGraphOptions>): Graph;
417
+ /**
418
+ * Create a bipartite graph
419
+ * @param n1 - Number of vertices in first partition
420
+ * @param n2 - Number of vertices in second partition
421
+ * @param edges - Edges between partitions (optional, complete if not provided)
422
+ * @returns A bipartite Graph
423
+ */
424
+ export declare function bipartiteGraph(n1: number, n2: number, edges?: EdgeTuple[], options?: Partial<GenericGraphOptions>): Graph;
425
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/mobjects/graph/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAStC;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;AAEvC;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;AAE7C;;GAEG;AACH,MAAM,MAAM,UAAU,GAClB,QAAQ,GACR,UAAU,GACV,OAAO,GACP,MAAM,GACN,QAAQ,GACR,MAAM,GACN,cAAc,GACd,UAAU,GACV,WAAW,GACX,QAAQ,CAAC;AAEb;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,8CAA8C;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,+CAA+C;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+BAA+B;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iEAAiE;IACjE,WAAW,CAAC,EAAE,MAAM,CAAC;I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AK,CAUvF;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,GAAE,OAAO,CAAC,mBAAmB,CAAM,GAAG,KAAK,CAmBtF;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,GAAE,OAAO,CAAC,mBAAmB,CAAM,GAAG,KAAK,CAWtF;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,GAAE,OAAO,CAAC,mBAAmB,CAAM,GAAG,OAAO,CA4B7F;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CACvB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,OAAO,CAAC,mBAAmB,CAAM,GACzC,KAAK,CA4BP;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAC5B,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,KAAK,CAAC,EAAE,SAAS,EAAE,EACnB,OAAO,GAAE,OAAO,CAAC,mBAAmB,CAAM,GACzC,KAAK,CAqBP"}
@@ -0,0 +1,254 @@
1
+ import { Group } from '../../core/Group';
2
+ import { Mobject, Vector3Tuple } from '../../core/Mobject';
3
+ import { VMobject } from '../../core/VMobject';
4
+ import { VGroup } from '../../core/VGroup';
5
+ import { VDict } from '../../core/VDict';
6
+ import { NumberLine, NumberLineOptions } from './NumberLine';
7
+ import { FunctionGraph, FunctionGraphOptions } from './FunctionGraph';
8
+ import { MathTex } from '../../mobjects/text/MathTex';
9
+ import { Line } from '../../mobjects/geometry/Line';
10
+ import { DashedLine } from '../../mobjects/geometry/DashedLine';
11
+ /**
12
+ * Options for creating Axes
13
+ */
14
+ export interface AxesOptions {
15
+ /** X-axis range as [min, max] or [min, max, step]. Default: [-5, 5, 1] */
16
+ xRange?: [number, number] | [number, number, number];
17
+ /** Y-axis range as [min, max] or [min, max, step]. Default: [-3, 3, 1] */
18
+ yRange?: [number, number] | [number, number, number];
19
+ /** Visual length of the x-axis. Default: 10 */
20
+ xLength?: number;
21
+ /** Visual length of the y-axis. Default: 6 */
22
+ yLength?: number;
23
+ /** Stroke color for axes. Default: '#ffffff' */
24
+ color?: string;
25
+ /** Common configuration for both axes */
26
+ axisConfig?: Partial<NumberLineOptions>;
27
+ /** Configuration specific to x-axis (overrides axisConfig) */
28
+ xAxisConfig?: Partial<NumberLineOptions>;
29
+ /** Configuration specific to y-axis (overrides axisConfig) */
30
+ yAxisConfig?: Partial<NumberLineOptions>;
31
+ /** Whether to include arrow tips on axes. Default: true */
32
+ tips?: boolean;
33
+ /** Length of arrow tips. Default: 0.25 */
34
+ tipLength?: number;
35
+ }
36
+ /**
37
+ * Axes - A coordinate system with x and y axes
38
+ *
39
+ * Creates a 2D coordinate system with configurable ranges and styling.
40
+ * Supports coordinate transformations between graph space and visual space.
41
+ *
42
+ * @example
43
+ * ```typescript
44
+ * // Create default axes
45
+ * const axes = new Axes();
46
+ *
47
+ * // Create axes with custom ranges
48
+ * const customAxes = new Axes({
49
+ * xRange: [0, 10, 1],
50
+ * yRange: [-1, 1, 0.5],
51
+ * xLength: 8,
52
+ * yLength: 4
53
+ * });
54
+ *
55
+ * // Get a point in visual coordinates
56
+ * const point = axes.coordsToPoint(3, 2);
57
+ * ```
58
+ */
59
+ export declare class Axes extends Group {
60
+ /** The x-axis NumberLine */
61
+ xAxis: NumberLine;
62
+ /** The y-axis NumberLine */
63
+ yAxis: NumberLine;
64
+ protected _xRange: [number, number, number];
65
+ protected _yRange: [number, number, number];
66
+ protected _xLength: number;
67
+ protected _yLength: number;
68
+ protected _tips: boolean;
69
+ protected _tipLength: number;
70
+ protected _xTip: VMobject | null;
71
+ protected _yTip: VMobject | null;
72
+ constructor(options?: AxesOptions);
73
+ /**
74
+ * Add arrow tips to the axes
75
+ */
76
+ private _addTips;
77
+ /**
78
+ * Convert graph coordinates to visual point coordinates
79
+ * @param x - X coordinate in graph space
80
+ * @param y - Y coordinate in graph space
81
+ * @returns The visual point [x, y, z]
82
+ */
83
+ /**
84
+ * Alias for coordsToPoint (matches Python Manim's c2p shorthand)
85
+ */
86
+ c2p(x: number, y: number): Vector3Tuple;
87
+ coordsToPoint(x: number, y: number): Vector3Tuple;
88
+ /**
89
+ * Convert visual point coordinates to graph coordinates
90
+ * @param point - Visual point [x, y, z]
91
+ * @returns The graph coordinates [x, y]
92
+ */
93
+ pointToCoords(point: Vector3Tuple): [number, number];
94
+ /**
95
+ * Get the x-axis NumberLine
96
+ */
97
+ getXAxis(): NumberLine;
98
+ /**
99
+ * Get the y-axis NumberLine
100
+ */
101
+ getYAxis(): NumberLine;
102
+ /**
103
+ * Get the x range
104
+ */
105
+ getXRange(): [number, number, number];
106
+ /** Public accessor for x range (matches Python Manim's ax.x_range) */
107
+ get xRange(): [number, number, number];
108
+ /**
109
+ * Get the y range
110
+ */
111
+ getYRange(): [number, number, number];
112
+ /** Public accessor for y range (matches Python Manim's ax.y_range) */
113
+ get yRange(): [number, number, number];
114
+ /**
115
+ * Get the visual x length
116
+ */
117
+ getXLength(): number;
118
+ /**
119
+ * Get the visual y length
120
+ */
121
+ getYLength(): number;
122
+ /**
123
+ * Get the origin point in visual coordinates
124
+ */
125
+ getOrigin(): Vector3Tuple;
126
+ /**
127
+ * Convert an x coordinate to visual x position
128
+ */
129
+ c2pX(x: number): number;
130
+ /**
131
+ * Convert a y coordinate to visual y position
132
+ */
133
+ c2pY(y: number): number;
134
+ /**
135
+ * Plot a function on these axes, returning a FunctionGraph.
136
+ * @param func - Function y = f(x)
137
+ * @param options - Additional FunctionGraph options (color, strokeWidth, etc.)
138
+ * @returns A FunctionGraph bound to these axes
139
+ */
140
+ plot(func: (x: number) => number, options?: Partial<Omit<FunctionGraphOptions, 'func' | 'axes'>>): FunctionGraph;
141
+ /**
142
+ * Get axis labels ("x" and "y" by default).
143
+ * Labels can be LaTeX strings or pre-built Mobject instances (e.g. Tex, MathTex).
144
+ * @param xLabel - LaTeX string or Mobject for x-axis label. Default: "x"
145
+ * @param yLabel - LaTeX string or Mobject for y-axis label. Default: "y"
146
+ * @returns A Group containing the two labels
147
+ */
148
+ getAxisLabels(xLabelOrOpts?: string | Mobject | {
149
+ xLabel?: string | Mobject;
150
+ yLabel?: string | Mobject;
151
+ }, yLabelArg?: string | Mobject): Group;
152
+ /**
153
+ * Get a label for a graph at a specific x-value.
154
+ * Matches Python Manim's axes.get_graph_label() API.
155
+ * @param graph - The FunctionGraph to label
156
+ * @param label - LaTeX string for the label
157
+ * @param options - Positioning options
158
+ * @returns A MathTex label positioned near the graph
159
+ */
160
+ getGraphLabel(graph: FunctionGraph, labelOrOptions?: string | {
161
+ xVal?: number;
162
+ direction?: Vector3Tuple;
163
+ color?: string;
164
+ label?: string;
165
+ }, options?: {
166
+ xVal?: number;
167
+ direction?: Vector3Tuple;
168
+ color?: string;
169
+ label?: string;
170
+ }): MathTex;
171
+ /**
172
+ * Create a vertical line from the x-axis to a point.
173
+ * @param point - The target point [x, y, z] in visual coordinates
174
+ * @param options - Line options
175
+ * @returns A Line from the x-axis to the point
176
+ */
177
+ getVerticalLine(point: Vector3Tuple, options?: {
178
+ color?: string;
179
+ strokeWidth?: number;
180
+ lineFunc?: typeof Line | typeof DashedLine;
181
+ }): VMobject;
182
+ /**
183
+ * Input to graph point: convert an x value to the visual point on a graph.
184
+ * Shorthand for graph.getPointFromX(x).
185
+ * @param x - The x coordinate in graph space
186
+ * @param graph - The FunctionGraph
187
+ * @returns The visual coordinates on the graph
188
+ */
189
+ i2gp(x: number, graph: FunctionGraph): Vector3Tuple;
190
+ /**
191
+ * Alias for i2gp — convert an x value to the visual point on a graph.
192
+ * Matches Python Manim's axes.input_to_graph_point() API.
193
+ */
194
+ inputToGraphPoint(x: number, graph: FunctionGraph): Vector3Tuple;
195
+ /**
196
+ * Create Riemann sum rectangles under a graph.
197
+ * @param graph - The FunctionGraph to approximate
198
+ * @param options - Riemann rectangle options
199
+ * @returns A VGroup of filled rectangles
200
+ */
201
+ getRiemannRectangles(graph: FunctionGraph, options?: {
202
+ xRange?: [number, number];
203
+ dx?: number;
204
+ color?: string;
205
+ fillOpacity?: number;
206
+ strokeWidth?: number;
207
+ strokeColor?: string;
208
+ }): VGroup;
209
+ /**
210
+ * Create a filled area between a graph and either the x-axis or another graph.
211
+ * @param graph - The primary graph boundary
212
+ * @param xRange - The x interval [start, end]
213
+ * @param options - Area options
214
+ * @returns A filled VMobject representing the area
215
+ */
216
+ getArea(graph: FunctionGraph, xRange: [number, number], options?: {
217
+ boundedGraph?: FunctionGraph;
218
+ color?: string;
219
+ opacity?: number;
220
+ strokeWidth?: number;
221
+ }): VMobject;
222
+ /**
223
+ * Plot a line graph connecting data points with straight line segments.
224
+ * Returns a VDict with "line_graph" (the connecting line) and
225
+ * "vertex_dots" (dots at each data point).
226
+ *
227
+ * Matches Python Manim's axes.plot_line_graph() API.
228
+ *
229
+ * @param options - Line graph options
230
+ * @returns A VDict with "line_graph" and "vertex_dots" entries
231
+ */
232
+ plotLineGraph(options: {
233
+ xValues: number[];
234
+ yValues: number[];
235
+ lineColor?: string;
236
+ addVertexDots?: boolean;
237
+ vertexDotRadius?: number;
238
+ vertexDotStyle?: {
239
+ color?: string;
240
+ fillOpacity?: number;
241
+ strokeWidth?: number;
242
+ strokeColor?: string;
243
+ };
244
+ strokeWidth?: number;
245
+ }): VDict;
246
+ private _numberToVisualX;
247
+ private _numberToVisualY;
248
+ /**
249
+ * Create a copy of this Axes
250
+ */
251
+ protected _createCopy(): Axes;
252
+ }
253
+ export default Axes;
254
+ //# sourceMappingURL=Axes.d.ts.map