TransformMatchingShapes¶
完整名称: manim.animation.transform\_matching\_parts.TransformMatchingShapes
- class TransformMatchingShapes(mobject=None, *args, use_override=True, **kwargs)[source]¶
基类:
TransformMatchingAbstractBase
一种尝试通过匹配其子对象的形状来变换组的动画。
如果两个子对象在标准化后(即,平移到原点,将子对象高度固定为1单位,并将坐标四舍五入到三位小数后)的点坐标哈希值匹配,则它们匹配。
示例
示例: Anagram ¶
from manim import * class Anagram(Scene): def construct(self): src = Text("the morse code") tar = Text("here come dots") self.play(Write(src)) self.wait(0.5) self.play(TransformMatchingShapes(src, tar, path_arc=PI/2)) self.wait(0.5)
class Anagram(Scene): def construct(self): src = Text("the morse code") tar = Text("here come dots") self.play(Write(src)) self.wait(0.5) self.play(TransformMatchingShapes(src, tar, path_arc=PI/2)) self.wait(0.5)
方法
get_mobject_key
get_mobject_parts
属性
run_time
- 参数: