淡入

限定名称: manim.animation.fading.FadeIn

class FadeIn(mobject=None, *args, use_override=True, **kwargs)[来源]

基础类:_Fade

淡入 Mobject s。

Parameters:
  • mobjects (Mobject) – 要淡入的mobjects。

  • shift – 物体在淡入时移动的向量。

  • target_position – 物体在淡入时开始的位置。如果另一个物体被指定为目标位置,则使用其中心点。

  • scale – 物体在淡入时最初被缩放的比例因子,然后重新缩放到其原始大小。

示例

示例:FadeInExample

from manim import *

class FadeInExample(Scene):
    def construct(self):
        dot = Dot(UP * 2 + LEFT)
        self.add(dot)
        tex = Tex(
            "FadeIn with ", "shift ", " 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 ", " 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))

方法

create_starting_mobject

create_target

属性

path_arc

path_func