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,130 @@
1
+ import { Group } from '../../core/Group';
2
+ import { Vector3Tuple } from '../../core/Mobject';
3
+ /**
4
+ * Options for creating an Arrow
5
+ */
6
+ export interface ArrowOptions {
7
+ /** Start point of the arrow. Default: [0, 0, 0] */
8
+ start?: Vector3Tuple;
9
+ /** End point of the arrow (where the tip points). Default: [1, 0, 0] */
10
+ end?: Vector3Tuple;
11
+ /** Stroke color as CSS color string. Default: WHITE (#FFFFFF) */
12
+ color?: string;
13
+ /** Stroke width in pixels. Default: 4 (Manim's default) */
14
+ strokeWidth?: number;
15
+ /** Length of the arrowhead tip. Default: 0.25 */
16
+ tipLength?: number;
17
+ /** Width of the arrowhead base. Default: 0.15 */
18
+ tipWidth?: number;
19
+ }
20
+ /**
21
+ * Arrow - A line with an arrowhead at the end
22
+ *
23
+ * Creates a line segment with a triangular arrowhead at the end point.
24
+ * The arrow automatically calculates the tip orientation based on the line direction.
25
+ *
26
+ * @example
27
+ * ```typescript
28
+ * // Create a simple arrow
29
+ * const arrow = new Arrow();
30
+ *
31
+ * // Create an arrow from point A to point B
32
+ * const arrow2 = new Arrow({
33
+ * start: [-2, 0, 0],
34
+ * end: [2, 1, 0],
35
+ * color: '#ff0000'
36
+ * });
37
+ *
38
+ * // Create an arrow with larger tip
39
+ * const bigTip = new Arrow({ tipLength: 0.4, tipWidth: 0.25 });
40
+ * ```
41
+ */
42
+ export declare class Arrow extends Group {
43
+ private _start;
44
+ private _end;
45
+ private _tipLength;
46
+ private _tipWidth;
47
+ private _strokeWidth;
48
+ private _shaft;
49
+ private _tip;
50
+ constructor(options?: ArrowOptions);
51
+ /**
52
+ * Generate the arrow parts (shaft line + tip triangle)
53
+ */
54
+ private _generateParts;
55
+ /**
56
+ * Get the start point
57
+ */
58
+ getStart(): Vector3Tuple;
59
+ /**
60
+ * Set the start point
61
+ */
62
+ setStart(point: Vector3Tuple): this;
63
+ /**
64
+ * Get the end point (tip of the arrow)
65
+ */
66
+ getEnd(): Vector3Tuple;
67
+ /**
68
+ * Set the end point (tip of the arrow)
69
+ */
70
+ setEnd(point: Vector3Tuple): this;
71
+ /**
72
+ * Get the length of the arrow (including tip)
73
+ */
74
+ getLength(): number;
75
+ /**
76
+ * Get the tip length
77
+ */
78
+ getTipLength(): number;
79
+ /**
80
+ * Set the tip length
81
+ */
82
+ setTipLength(value: number): this;
83
+ /**
84
+ * Get the tip width
85
+ */
86
+ getTipWidth(): number;
87
+ /**
88
+ * Set the tip width
89
+ */
90
+ setTipWidth(value: number): this;
91
+ /**
92
+ * Get the direction vector of the arrow (normalized)
93
+ */
94
+ getDirection(): Vector3Tuple;
95
+ /**
96
+ * Get the angle of the arrow in the XY plane (in radians)
97
+ */
98
+ getAngle(): number;
99
+ /**
100
+ * Create a copy of this Arrow
101
+ */
102
+ protected _createCopy(): Arrow;
103
+ }
104
+ /**
105
+ * DoubleArrow - An arrow with tips on both ends
106
+ */
107
+ export declare class DoubleArrow extends Group {
108
+ private _start;
109
+ private _end;
110
+ private _tipLength;
111
+ private _tipWidth;
112
+ private _strokeWidth;
113
+ constructor(options?: ArrowOptions);
114
+ private _generateParts;
115
+ getStart(): Vector3Tuple;
116
+ setStart(point: Vector3Tuple): this;
117
+ getEnd(): Vector3Tuple;
118
+ setEnd(point: Vector3Tuple): this;
119
+ getLength(): number;
120
+ protected _createCopy(): DoubleArrow;
121
+ }
122
+ /**
123
+ * Vector - An Arrow starting from the origin by default
124
+ */
125
+ export declare class Vector extends Arrow {
126
+ constructor(options?: Omit<ArrowOptions, 'start'> & {
127
+ direction?: Vector3Tuple;
128
+ });
129
+ }
130
+ //# sourceMappingURL=Arrow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Arrow.d.ts","sourceRoot":"","sources":["../../../src/mobjects/geometry/Arrow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAEzC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGlD;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,mDAAmD;IACnD,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,wEAAwE;IACxE,GAAG,CAAC,EAAE,YAAY,CAAC;IACnB,iEAAiE;IACjE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2DAA2D;IAC3D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iDAAiD;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iDAAiD;IACjD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAgED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,KAAM,SAAQ,KAAK;IAC9B,OAAO,CAAC,MAA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AS,IAAI,MAAM;cAOA,WAAW,IAAI,WAAW;CAU9C;AAED;;GAEG;AACH,qBAAa,MAAO,SAAQ,KAAK;gBACnB,OAAO,GAAE,IAAI,CAAC,YAAY,EAAE,OAAO,CAAC,GAAG;QAAE,SAAS,CAAC,EAAE,YAAY,CAAA;KAAO;CAQrF"}
@@ -0,0 +1,238 @@
1
+ import { VMobject } from '../../core/VMobject';
2
+ import { Vector3Tuple } from '../../core/Mobject';
3
+ /**
4
+ * Base options for all arrow tips
5
+ */
6
+ export interface ArrowTipOptions {
7
+ /** Length of the tip along the arrow direction. Default: 0.25 */
8
+ length?: number;
9
+ /** Width of the tip perpendicular to arrow direction. Default: 0.15 */
10
+ width?: number;
11
+ /** Color of the tip. Default: Manim's blue (#58C4DD) */
12
+ color?: string;
13
+ /** Stroke width in pixels. Default: 4 */
14
+ strokeWidth?: number;
15
+ /** Fill opacity from 0 to 1. Default: 0 for unfilled tips */
16
+ fillOpacity?: number;
17
+ /** Position at end of line (tip point). Default: [0, 0, 0] */
18
+ position?: Vector3Tuple;
19
+ /** Direction the tip points towards (normalized). Default: [1, 0, 0] */
20
+ direction?: Vector3Tuple;
21
+ }
22
+ /**
23
+ * ArrowTip - Base class for arrow tips
24
+ *
25
+ * This is an abstract base class that defines the interface for arrow tips.
26
+ * Concrete tip styles extend this class.
27
+ *
28
+ * @example
29
+ * ```typescript
30
+ * // Tips are typically used with Arrow class, but can be standalone
31
+ * const tip = new ArrowTriangleTip({
32
+ * position: [1, 0, 0],
33
+ * direction: [1, 0, 0],
34
+ * length: 0.3,
35
+ * width: 0.2
36
+ * });
37
+ * ```
38
+ */
39
+ export declare abstract class ArrowTip extends VMobject {
40
+ protected _length: number;
41
+ protected _width: number;
42
+ protected _position: Vector3Tuple;
43
+ protected _direction: Vector3Tuple;
44
+ constructor(options?: ArrowTipOptions);
45
+ /**
46
+ * Get the tip length
47
+ */
48
+ getLength(): number;
49
+ /**
50
+ * Set the tip length
51
+ */
52
+ setLength(value: number): this;
53
+ /**
54
+ * Get the tip width
55
+ */
56
+ getWidth(): number;
57
+ /**
58
+ * Set the tip width
59
+ */
60
+ setWidth(value: number): this;
61
+ /**
62
+ * Get the tip position (point where it attaches)
63
+ */
64
+ getPosition(): Vector3Tuple;
65
+ /**
66
+ * Set the tip position
67
+ */
68
+ setTipPosition(position: Vector3Tuple): this;
69
+ /**
70
+ * Get the tip direction
71
+ */
72
+ getDirection(): Vector3Tuple;
73
+ /**
74
+ * Set the tip direction
75
+ */
76
+ setDirection(direction: Vector3Tuple): this;
77
+ /**
78
+ * Get the base point of the tip (opposite to the point)
79
+ */
80
+ getBase(): Vector3Tuple;
81
+ /**
82
+ * Get the angle of the tip relative to the X axis (radians)
83
+ */
84
+ getAngle(): number;
85
+ /**
86
+ * Generate the points for this tip - implemented by subclasses
87
+ */
88
+ protected abstract _generatePoints(): void;
89
+ }
90
+ /**
91
+ * ArrowTriangleTip - Standard unfilled triangle arrow tip
92
+ *
93
+ * Creates a simple triangular arrowhead outline.
94
+ *
95
+ * @example
96
+ * ```typescript
97
+ * const tip = new ArrowTriangleTip({
98
+ * position: [2, 0, 0],
99
+ * direction: [1, 0, 0],
100
+ * color: '#ff0000'
101
+ * });
102
+ * ```
103
+ */
104
+ export declare class ArrowTriangleTip extends ArrowTip {
105
+ constructor(options?: ArrowTipOptions);
106
+ protected _generatePoints(): void;
107
+ protected _createCopy(): ArrowTriangleTip;
108
+ }
109
+ /**
110
+ * ArrowTriangleFilledTip - Filled triangle arrow tip
111
+ *
112
+ * Creates a solid filled triangular arrowhead.
113
+ *
114
+ * @example
115
+ * ```typescript
116
+ * const tip = new ArrowTriangleFilledTip({
117
+ * position: [2, 0, 0],
118
+ * direction: [1, 0, 0],
119
+ * color: '#ff0000'
120
+ * });
121
+ * ```
122
+ */
123
+ export declare class ArrowTriangleFilledTip extends ArrowTriangleTip {
124
+ constructor(options?: ArrowTipOptions);
125
+ protected _createCopy(): ArrowTriangleFilledTip;
126
+ }
127
+ /**
128
+ * ArrowCircleTip - Unfilled circle at the end of an arrow
129
+ *
130
+ * Creates a circular arrowhead outline.
131
+ *
132
+ * @example
133
+ * ```typescript
134
+ * const tip = new ArrowCircleTip({
135
+ * position: [2, 0, 0],
136
+ * direction: [1, 0, 0],
137
+ * width: 0.2 // Radius of the circle
138
+ * });
139
+ * ```
140
+ */
141
+ export declare class ArrowCircleTip extends ArrowTip {
142
+ private _numSegments;
143
+ constructor(options?: ArrowTipOptions & {
144
+ numSegments?: number;
145
+ });
146
+ protected _generatePoints(): void;
147
+ protected _createCopy(): ArrowCircleTip;
148
+ }
149
+ /**
150
+ * ArrowCircleFilledTip - Filled circle at the end of an arrow
151
+ *
152
+ * Creates a solid filled circular arrowhead.
153
+ *
154
+ * @example
155
+ * ```typescript
156
+ * const tip = new ArrowCircleFilledTip({
157
+ * position: [2, 0, 0],
158
+ * direction: [1, 0, 0],
159
+ * width: 0.2 // Radius of the circle
160
+ * });
161
+ * ```
162
+ */
163
+ export declare class ArrowCircleFilledTip extends ArrowCircleTip {
164
+ constructor(options?: ArrowTipOptions & {
165
+ numSegments?: number;
166
+ });
167
+ protected _createCopy(): ArrowCircleFilledTip;
168
+ }
169
+ /**
170
+ * ArrowSquareTip - Unfilled square at the end of an arrow
171
+ *
172
+ * Creates a square arrowhead outline.
173
+ *
174
+ * @example
175
+ * ```typescript
176
+ * const tip = new ArrowSquareTip({
177
+ * position: [2, 0, 0],
178
+ * direction: [1, 0, 0],
179
+ * width: 0.15
180
+ * });
181
+ * ```
182
+ */
183
+ export declare class ArrowSquareTip extends ArrowTip {
184
+ constructor(options?: ArrowTipOptions);
185
+ protected _generatePoints(): void;
186
+ protected _createCopy(): ArrowSquareTip;
187
+ }
188
+ /**
189
+ * ArrowSquareFilledTip - Filled square at the end of an arrow
190
+ *
191
+ * Creates a solid filled square arrowhead.
192
+ *
193
+ * @example
194
+ * ```typescript
195
+ * const tip = new ArrowSquareFilledTip({
196
+ * position: [2, 0, 0],
197
+ * direction: [1, 0, 0],
198
+ * width: 0.15
199
+ * });
200
+ * ```
201
+ */
202
+ export declare class ArrowSquareFilledTip extends ArrowSquareTip {
203
+ constructor(options?: ArrowTipOptions);
204
+ protected _createCopy(): ArrowSquareFilledTip;
205
+ }
206
+ /**
207
+ * StealthTip - Stealth fighter style sharp arrow tip
208
+ *
209
+ * Creates a sleek, swept-back arrow tip similar to a stealth aircraft.
210
+ * The tip has an indented back creating a sharper, more aggressive look.
211
+ *
212
+ * @example
213
+ * ```typescript
214
+ * const tip = new StealthTip({
215
+ * position: [2, 0, 0],
216
+ * direction: [1, 0, 0],
217
+ * length: 0.35,
218
+ * width: 0.2
219
+ * });
220
+ * ```
221
+ */
222
+ export declare class StealthTip extends ArrowTip {
223
+ private _backAngle;
224
+ constructor(options?: ArrowTipOptions & {
225
+ backAngle?: number;
226
+ });
227
+ protected _generatePoints(): void;
228
+ /**
229
+ * Get the back angle (notch depth ratio)
230
+ */
231
+ getBackAngle(): number;
232
+ /**
233
+ * Set the back angle (notch depth ratio, 0-1)
234
+ */
235
+ setBackAngle(value: number): this;
236
+ protected _createCopy(): StealthTip;
237
+ }
238
+ //# sourceMappingURL=ArrowTips.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ArrowTips.d.ts","sourceRoot":"","sources":["../../../src/mobjects/geometry/ArrowTips.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,eAAe;IAC9B,iEAAiE;IACjE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,uEAAuE;IACvE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wDAAwD;IACxD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yCAAyC;IACzC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,6DAA6D;IAC7D,WAAW,CAAC,EAAE,MAAM,CAAC;IACr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Aa,cAAe,SAAQ,QAAQ;IAC1C,OAAO,CAAC,YAAY,CAAS;gBAEjB,OAAO,GAAE,eAAe,GAAG;QAAE,WAAW,CAAC,EAAE,MAAM,CAAA;KAAO;IAMpE,SAAS,CAAC,eAAe,IAAI,IAAI;cAkEd,WAAW,IAAI,cAAc;CAYjD;AAED;;;;;;;;;;;;;GAaG;AACH,qBAAa,oBAAqB,SAAQ,cAAc;gBAC1C,OAAO,GAAE,eAAe,GAAG;QAAE,WAAW,CAAC,EAAE,MAAM,CAAA;KAAO;cAIjD,WAAW,IAAI,oBAAoB;CAWvD;AAED;;;;;;;;;;;;;GAaG;AACH,qBAAa,cAAe,SAAQ,QAAQ;gBAC9B,OAAO,GAAE,eAAoB;IAKzC,SAAS,CAAC,eAAe,IAAI,IAAI;cAuDd,WAAW,IAAI,cAAc;CAWjD;AAED;;;;;;;;;;;;;GAaG;AACH,qBAAa,oBAAqB,SAAQ,cAAc;gBAC1C,OAAO,GAAE,eAAoB;cAItB,WAAW,IAAI,oBAAoB;CAWvD;AAED;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,UAAW,SAAQ,QAAQ;IACtC,OAAO,CAAC,UAAU,CAAS;gBAEf,OAAO,GAAE,eAAe,GAAG;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAO;IAOlE,SAAS,CAAC,eAAe,IAAI,IAAI;IAkDjC;;OAEG;IACH,YAAY,IAAI,MAAM;IAItB;;OAEG;IACH,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;cAMd,WAAW,IAAI,UAAU;CAY7C"}
@@ -0,0 +1,163 @@
1
+ import { VMobject } from '../../core/VMobject';
2
+ /**
3
+ * 2D vertex for polygon clipping operations
4
+ */
5
+ interface Vertex2D {
6
+ x: number;
7
+ y: number;
8
+ }
9
+ /**
10
+ * Options for boolean operations
11
+ */
12
+ export interface BooleanOperationOptions {
13
+ /** Stroke color. Default: inherited from first shape */
14
+ color?: string;
15
+ /** Fill color (separate from stroke). If set, overrides color for fill. */
16
+ fillColor?: string;
17
+ /** Fill opacity. Default: inherited from first shape */
18
+ fillOpacity?: number;
19
+ /** Stroke width. Default: inherited from first shape */
20
+ strokeWidth?: number;
21
+ /** Number of samples per Bezier segment for polygon approximation. Default: 8 */
22
+ samplesPerSegment?: number;
23
+ }
24
+ /**
25
+ * Base class for boolean operation results
26
+ */
27
+ export declare class BooleanResult extends VMobject {
28
+ protected _resultVertices: Vertex2D[][];
29
+ /** Control-point counts per subpath (for multi-polygon results) */
30
+ private _subpathLengths;
31
+ constructor();
32
+ /**
33
+ * Get subpath control-point counts for multi-polygon results.
34
+ * Used by VMobject's fill and stroke renderers to handle
35
+ * disjoint regions without visible bridge lines.
36
+ */
37
+ getSubpaths(): number[];
38
+ /**
39
+ * Get the result polygon vertices
40
+ */
41
+ getResultVertices(): Vertex2D[][];
42
+ /**
43
+ * Re-center the VMobject: compute the centroid of all points,
44
+ * subtract it from every point (making them local-space), and
45
+ * set `this.position` to the centroid. This ensures getCenter(),
46
+ * nextTo(), and other layout helpers work correctly.
47
+ */
48
+ protected _centerOnPoints(): void;
49
+ /**
50
+ * Set VMobject points from a single polygon's vertices.
51
+ * Converts vertices to cubic Bezier line segments with 1/3 and 2/3 control points.
52
+ */
53
+ protected _setPointsFromVertices(vertices: Vertex2D[]): void;
54
+ /**
55
+ * Set VMobject points from multiple polygons.
56
+ * Each polygon becomes a separate subpath (no bridge segments).
57
+ * Subpath lengths are tracked for proper fill and stroke rendering.
58
+ */
59
+ protected _setPointsFromMultiplePolygons(polygons: Vertex2D[][]): void;
60
+ }
61
+ /**
62
+ * Union - Boolean union of two shapes (combine)
63
+ *
64
+ * Creates a new shape that encompasses both input shapes.
65
+ * Uses the Martinez-Rueda-Feito algorithm for robust handling of all polygon types.
66
+ *
67
+ * @example
68
+ * ```typescript
69
+ * const circle1 = new Circle({ radius: 1 });
70
+ * const circle2 = new Circle({ radius: 1 }).shift([1, 0, 0]);
71
+ * const combined = new Union(circle1, circle2);
72
+ * ```
73
+ */
74
+ export declare class Union extends BooleanResult {
75
+ constructor(shape1: VMobject, shape2: VMobject, options?: BooleanOperationOptions);
76
+ }
77
+ /**
78
+ * Intersection - Boolean intersection of two shapes (overlap area)
79
+ *
80
+ * Creates a new shape representing the overlapping region of both inputs.
81
+ * Uses the Martinez-Rueda-Feito algorithm for robust handling of all polygon types.
82
+ *
83
+ * @example
84
+ * ```typescript
85
+ * const square1 = new Square({ sideLength: 2 });
86
+ * const square2 = new Square({ sideLength: 2 }).shift([1, 1, 0]);
87
+ * const overlap = new Intersection(square1, square2);
88
+ * ```
89
+ */
90
+ export declare class Intersection extends BooleanResult {
91
+ constructor(shape1: VMobject, shape2: VMobject, options?: BooleanOperationOptions);
92
+ }
93
+ /**
94
+ * Difference - Boolean difference of two shapes (subtract second from first)
95
+ *
96
+ * Creates a new shape representing the first shape with the second removed.
97
+ * Uses the Martinez-Rueda-Feito algorithm for robust handling of all polygon types,
98
+ * including proper hole representation when one shape is inside another.
99
+ *
100
+ * @example
101
+ * ```typescript
102
+ * const bigCircle = new Circle({ radius: 2 });
103
+ * const smallCircle = new Circle({ radius: 1 });
104
+ * const donut = new Difference(bigCircle, smallCircle);
105
+ * ```
106
+ */
107
+ export declare class Difference extends BooleanResult {
108
+ constructor(shape1: VMobject, shape2: VMobject, options?: BooleanOperationOptions);
109
+ }
110
+ /**
111
+ * Exclusion - Boolean XOR of two shapes (non-overlapping areas)
112
+ *
113
+ * Creates shapes representing the areas that are in one shape but not both.
114
+ * Uses the Martinez-Rueda-Feito algorithm for robust handling of all polygon types.
115
+ *
116
+ * @example
117
+ * ```typescript
118
+ * const circle1 = new Circle({ radius: 1 });
119
+ * const circle2 = new Circle({ radius: 1 }).shift([0.5, 0, 0]);
120
+ * const xorShape = new Exclusion(circle1, circle2);
121
+ * ```
122
+ */
123
+ export declare class Exclusion extends BooleanResult {
124
+ constructor(shape1: VMobject, shape2: VMobject, options?: BooleanOperationOptions);
125
+ }
126
+ /**
127
+ * Create a boolean union of two shapes
128
+ *
129
+ * @param shape1 - First shape
130
+ * @param shape2 - Second shape
131
+ * @param options - Optional styling options
132
+ * @returns New VMobject representing the union
133
+ */
134
+ export declare function union(shape1: VMobject, shape2: VMobject, options?: BooleanOperationOptions): Union;
135
+ /**
136
+ * Create a boolean intersection of two shapes
137
+ *
138
+ * @param shape1 - First shape
139
+ * @param shape2 - Second shape
140
+ * @param options - Optional styling options
141
+ * @returns New VMobject representing the intersection
142
+ */
143
+ export declare function intersection(shape1: VMobject, shape2: VMobject, options?: BooleanOperationOptions): Intersection;
144
+ /**
145
+ * Create a boolean difference of two shapes (subtract second from first)
146
+ *
147
+ * @param shape1 - First shape (base)
148
+ * @param shape2 - Second shape (to subtract)
149
+ * @param options - Optional styling options
150
+ * @returns New VMobject representing the difference
151
+ */
152
+ export declare function difference(shape1: VMobject, shape2: VMobject, options?: BooleanOperationOptions): Difference;
153
+ /**
154
+ * Create a boolean exclusion (XOR) of two shapes
155
+ *
156
+ * @param shape1 - First shape
157
+ * @param shape2 - Second shape
158
+ * @param options - Optional styling options
159
+ * @returns New VMobject representing the exclusion
160
+ */
161
+ export declare function exclusion(shape1: VMobject, shape2: VMobject, options?: BooleanOperationOptions): Exclusion;
162
+ export {};
163
+ //# sourceMappingURL=BooleanOperations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BooleanOperations.d.ts","sourceRoot":"","sources":["../../../src/mobjects/geometry/BooleanOperations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAU/C;;GAEG;AACH,UAAU,QAAQ;IAChB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,wDAAwD;IACxD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2EAA2E;IAC3E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,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AOG;AACH,wBAAgB,KAAK,CACnB,MAAM,EAAE,QAAQ,EAChB,MAAM,EAAE,QAAQ,EAChB,OAAO,CAAC,EAAE,uBAAuB,GAChC,KAAK,CAEP;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,QAAQ,EAChB,MAAM,EAAE,QAAQ,EAChB,OAAO,CAAC,EAAE,uBAAuB,GAChC,YAAY,CAEd;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,QAAQ,EAChB,MAAM,EAAE,QAAQ,EAChB,OAAO,CAAC,EAAE,uBAAuB,GAChC,UAAU,CAEZ;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CACvB,MAAM,EAAE,QAAQ,EAChB,MAAM,EAAE,QAAQ,EAChB,OAAO,CAAC,EAAE,uBAAuB,GAChC,SAAS,CAEX"}
@@ -0,0 +1,92 @@
1
+ import { VMobject } from '../../core/VMobject';
2
+ import { Vector3Tuple } from '../../core/Mobject';
3
+ /**
4
+ * Options for creating a Circle
5
+ */
6
+ export interface CircleOptions {
7
+ /** Radius of the circle. Default: 1 */
8
+ radius?: number;
9
+ /** Stroke color as CSS color string. Default: Manim's blue (#58C4DD) */
10
+ color?: string;
11
+ /** Fill opacity from 0 to 1. Default: 0 */
12
+ fillOpacity?: number;
13
+ /** Stroke width in pixels. Default: 4 (Manim's default) */
14
+ strokeWidth?: number;
15
+ /** Number of points for Bezier approximation. Default: 64 */
16
+ numPoints?: number;
17
+ /** Center position. Default: [0, 0, 0] */
18
+ center?: Vector3Tuple;
19
+ }
20
+ /**
21
+ * Circle - A circular VMobject
22
+ *
23
+ * Creates a circle using cubic Bezier curves. Four cubic Bezier segments
24
+ * can approximate a circle with high accuracy using the kappa constant.
25
+ *
26
+ * @example
27
+ * ```typescript
28
+ * // Create a unit circle
29
+ * const circle = new Circle();
30
+ *
31
+ * // Create a red circle with radius 2
32
+ * const redCircle = new Circle({ radius: 2, color: '#ff0000' });
33
+ *
34
+ * // Create a filled circle
35
+ * const filled = new Circle({ fillOpacity: 0.5 });
36
+ * ```
37
+ */
38
+ export declare class Circle extends VMobject {
39
+ private _radius;
40
+ private _numPoints;
41
+ private _centerPoint;
42
+ constructor(options?: CircleOptions);
43
+ /**
44
+ * Generate the circle points using Bezier curve approximation.
45
+ * Uses 4 cubic Bezier segments for optimal circle approximation.
46
+ */
47
+ private _generatePoints;
48
+ /**
49
+ * Get the radius of the circle
50
+ */
51
+ getRadius(): number;
52
+ /**
53
+ * Set the radius of the circle
54
+ */
55
+ setRadius(value: number): this;
56
+ /**
57
+ * Get the center of the circle
58
+ */
59
+ getCircleCenter(): Vector3Tuple;
60
+ /**
61
+ * Set the center of the circle
62
+ */
63
+ setCircleCenter(value: Vector3Tuple): this;
64
+ /**
65
+ * Scale the circle by changing its actual radius (not scaleVector).
66
+ * Scales about the circle's own center so the center stays put.
67
+ */
68
+ scale(factor: number | Vector3Tuple): this;
69
+ /**
70
+ * Shift the circle by updating its center point and regenerating geometry.
71
+ * Does not change Mobject.position to avoid double-counting in THREE.js hierarchy.
72
+ */
73
+ shift(delta: Vector3Tuple): this;
74
+ /**
75
+ * Get the circumference of the circle
76
+ */
77
+ getCircumference(): number;
78
+ /**
79
+ * Get the area of the circle
80
+ */
81
+ getArea(): number;
82
+ /**
83
+ * Get a point on the circle at a given angle (in radians)
84
+ * @param angle Angle in radians from the positive x-axis
85
+ */
86
+ pointAtAngle(angle: number): Vector3Tuple;
87
+ /**
88
+ * Create a copy of this Circle
89
+ */
90
+ protected _createCopy(): Circle;
91
+ }
92
+ //# sourceMappingURL=Circle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Circle.d.ts","sourceRoot":"","sources":["../../../src/mobjects/geometry/Circle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGlD;;GAEG;AACH,MA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