mirror of
https://github.com/3b1b/manim.git
synced 2025-07-28 12:32:36 +08:00
Add some comments about the temporary hack
This commit is contained in:
@ -69,6 +69,8 @@ class Text(SVGMobject):
|
|||||||
if self.height is None:
|
if self.height is None:
|
||||||
self.scale(TEXT_MOB_SCALE_FACTOR * self.font_size)
|
self.scale(TEXT_MOB_SCALE_FACTOR * self.font_size)
|
||||||
|
|
||||||
|
# Just a temporary hack to get better triangulation
|
||||||
|
# See pr #1552 for details
|
||||||
for i in self.submobjects:
|
for i in self.submobjects:
|
||||||
i.insert_n_curves(len(i.get_points()))
|
i.insert_n_curves(len(i.get_points()))
|
||||||
|
|
||||||
|
@ -367,6 +367,7 @@ def earclip_triangulation(verts, ring_ends):
|
|||||||
list(range(e0, e1))
|
list(range(e0, e1))
|
||||||
for e0, e1 in zip([0, *ring_ends], ring_ends)
|
for e0, e1 in zip([0, *ring_ends], ring_ends)
|
||||||
]
|
]
|
||||||
|
# Points at the same position may cause problems
|
||||||
for i in rings:
|
for i in rings:
|
||||||
verts[i[0]] += (verts[i[1]]-verts[i[0]])*5e-6
|
verts[i[0]] += (verts[i[1]]-verts[i[0]])*5e-6
|
||||||
verts[i[-1]] += (verts[i[-2]]-verts[i[-1]])*5e-6
|
verts[i[-1]] += (verts[i[-2]]-verts[i[-1]])*5e-6
|
||||||
|
Reference in New Issue
Block a user