manim 0.18.0__py3-none-any.whl → 0.18.0.post0__py3-none-any.whl

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.

Potentially problematic release.


This version of manim might be problematic. Click here for more details.

@@ -510,17 +510,15 @@ class VMobjectFromSVGPath(VMobject, metaclass=ConvertToOpenGL):
510
510
  all_points: list[np.ndarray] = []
511
511
  last_move = None
512
512
  curve_start = None
513
+ last_true_move = None
513
514
 
514
- # These lambdas behave the same as similar functions in
515
- # vectorized_mobject, except they add to a list of points instead
516
- # of updating this Mobject's numpy array of points. This way,
517
- # we don't observe O(n^2) behavior for complex paths due to
518
- # numpy's need to re-allocate memory on every append.
519
- def move_pen(pt):
520
- nonlocal last_move, curve_start
515
+ def move_pen(pt, *, true_move: bool = False):
516
+ nonlocal last_move, curve_start, last_true_move
521
517
  last_move = pt
522
518
  if curve_start is None:
523
519
  curve_start = last_move
520
+ if true_move:
521
+ last_true_move = last_move
524
522
 
525
523
  if self.n_points_per_curve == 4:
526
524
 
@@ -568,7 +566,7 @@ class VMobjectFromSVGPath(VMobject, metaclass=ConvertToOpenGL):
568
566
  for segment in self.path_obj:
569
567
  segment_class = segment.__class__
570
568
  if segment_class == se.Move:
571
- move_pen(_convert_point_to_3d(*segment.end))
569
+ move_pen(_convert_point_to_3d(*segment.end), true_move=True)
572
570
  elif segment_class == se.Line:
573
571
  add_line(last_move, _convert_point_to_3d(*segment.end))
574
572
  elif segment_class == se.QuadraticBezier:
@@ -588,8 +586,8 @@ class VMobjectFromSVGPath(VMobject, metaclass=ConvertToOpenGL):
588
586
  # If the SVG path naturally ends at the beginning of the curve,
589
587
  # we do *not* need to draw a closing line. To account for floating
590
588
  # point precision, we use a small value to compare the two points.
591
- if abs(np.linalg.norm(last_move - curve_start)) > 0.0001:
592
- add_line(last_move, curve_start)
589
+ if abs(np.linalg.norm(last_move - last_true_move)) > 0.0001:
590
+ add_line(last_move, last_true_move)
593
591
  curve_start = None
594
592
  else:
595
593
  raise AssertionError(f"Not implemented: {segment_class}")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: manim
3
- Version: 0.18.0
3
+ Version: 0.18.0.post0
4
4
  Summary: Animation engine for explanatory math videos.
5
5
  Home-page: https://www.manim.community/
6
6
  License: MIT
@@ -83,7 +83,7 @@ manim/mobject/opengl/opengl_three_dimensions.py,sha256=5ETQrgx_Y595TjSkjbIrgcE_g
83
83
  manim/mobject/opengl/opengl_vectorized_mobject.py,sha256=kltL_fkITqZWksuTbJ57EMzmbWSnFkjtmAOWrgGU-tA,64514
84
84
  manim/mobject/svg/__init__.py,sha256=j8-PFkUAsx4E-e7AHm3CoMjo22VlKzPORQAsyFWnSd4,130
85
85
  manim/mobject/svg/brace.py,sha256=7jSG0Olvj9gS-Uq2Favd19ICE3NA5Z7MGX9YFIBMAPA,12263
86
- manim/mobject/svg/svg_mobject.py,sha256=U2N0K8w2a1X-C1JN7iFbd4RGua_E8ESM59LdUyNNM-w,21110
86
+ manim/mobject/svg/svg_mobject.py,sha256=x1ilWTetekuLXuXvFo-GuMTNqiNHbPlUM2Gwpi94GUg,20937
87
87
  manim/mobject/table.py,sha256=5K_fTrCc1AlTspox666z85SQn7z05z1iIae6NtCqv5E,41881
88
88
  manim/mobject/text/__init__.py,sha256=AwHG8zeX2Hycw8oG2HacdHmhpH24QQDnHXTlAmVdgU0,188
89
89
  manim/mobject/text/code_mobject.py,sha256=5L4HYgAEkSCYOt7Nkc9LOdIiuUctTM1paB6pgV_ipJ4,23649
@@ -209,9 +209,9 @@ manim/utils/tex.py,sha256=GlmT-9wsxRq5jkrcO_RkXKlrRu6mnCsFeUFEYZHRmds,9315
209
209
  manim/utils/tex_file_writing.py,sha256=znXl4FeDGLMqgiHOt_-Gx-G9QpIAg6EjNWEyqY9Gdmc,11202
210
210
  manim/utils/tex_templates.py,sha256=2NBznl_0CVG1VC46ciDTjwfCCgqvhmq8_OfC6z6i1xo,28517
211
211
  manim/utils/unit.py,sha256=5xJOBYysVqSLIsb6xDviaRdG2U9SRAWHx-pLvtc4yVk,941
212
- manim-0.18.0.dist-info/LICENSE,sha256=xqki_Bz67XrA-Hqh3Hfr9aPI0czFqwHaMxU_DQE78Bk,1072
213
- manim-0.18.0.dist-info/LICENSE.community,sha256=cdbuve4GvO2BO9RxrV4gPYk3za34mHK6erh-vXJYw-c,1088
214
- manim-0.18.0.dist-info/METADATA,sha256=D_dO6Ou9w_QiFRRqLEu6_ZJniAA2p9VHLpQftBP4fZo,11445
215
- manim-0.18.0.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
216
- manim-0.18.0.dist-info/entry_points.txt,sha256=T_f5FcXeR4Hoz6Bf4reBBM8LzwalFtW4pXXyU7rsuo0,73
217
- manim-0.18.0.dist-info/RECORD,,
212
+ manim-0.18.0.post0.dist-info/LICENSE,sha256=xqki_Bz67XrA-Hqh3Hfr9aPI0czFqwHaMxU_DQE78Bk,1072
213
+ manim-0.18.0.post0.dist-info/LICENSE.community,sha256=cdbuve4GvO2BO9RxrV4gPYk3za34mHK6erh-vXJYw-c,1088
214
+ manim-0.18.0.post0.dist-info/METADATA,sha256=C55vtMYluRDyFnf12dH_905QyLcwZXkNQ0qn9aXdoFI,11451
215
+ manim-0.18.0.post0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
216
+ manim-0.18.0.post0.dist-info/entry_points.txt,sha256=T_f5FcXeR4Hoz6Bf4reBBM8LzwalFtW4pXXyU7rsuo0,73
217
+ manim-0.18.0.post0.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 1.8.1
2
+ Generator: poetry-core 1.9.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any