淡入¶
限定名称: manim.animation.fading.FadeIn
- class FadeIn(mobject=None, *args, use_override=True, **kwargs)[source]¶
基类:
_Fade
使
Mobject
淡入。- 参数:
mobjects (Mobject) – 要淡入的mobject。
shift – mobject 淡入时移动的向量。
target_position – mobject 淡入时开始的位置。如果给定另一个mobject作为目标位置,则使用其中心点。
scale – mobject 淡入时,在重新缩放至原始大小之前,最初缩放的因子。
示例
示例: FadeInExample ¶
from manim import * class FadeInExample(Scene): def construct(self): dot = Dot(UP * 2 + LEFT) self.add(dot) tex = Tex( "FadeIn with ", "shift ", r" or target\_position", " and scale" ).scale(1) animations = [ FadeIn(tex[0]), FadeIn(tex[1], shift=DOWN), FadeIn(tex[2], target_position=dot), FadeIn(tex[3], scale=1.5), ] self.play(AnimationGroup(*animations, lag_ratio=0.5))
class FadeInExample(Scene): def construct(self): dot = Dot(UP * 2 + LEFT) self.add(dot) tex = Tex( "FadeIn with ", "shift ", r" or target\_position", " and scale" ).scale(1) animations = [ FadeIn(tex[0]), FadeIn(tex[1], shift=DOWN), FadeIn(tex[2], target_position=dot), FadeIn(tex[3], scale=1.5), ] self.play(AnimationGroup(*animations, lag_ratio=0.5))
方法
创建起始 Mobject 对象
创建目标
属性
路径弧
路径函数
运行时间