渲染¶
影片代码
import manimgx as m
class RenderingHero(m.Scene):
def construct(self) -> None:
commands = m.Code(
code_string="manimgx render scene.py\nmanimgx preview scene.py\nmanimgx inspect scene.py\nmanimgx present scene.py",
language="bash",
background="window",
).scale(1.2)
self.play(m.FadeIn(commands))
self.wait()
manimgx 命令生成场景的视频,一个 MP4 文件,位于场景文件旁边。它还在你编辑时于窗口中播放场景,检查观众会看到的问题,绘制静帧,并将其作为幻灯片呈现。配置设置视频的尺寸、帧率和背景。从 Python 中,场景渲染为一个影片,程序可以保留它、在窗口中播放它,或写入它。


