【发布时间】:2022-11-07 21:25:57
【问题描述】:
这是我的代码。我希望两个正方形都被填充为绿色,但只有 square1 是正确的。运行 Windows 10 和 manim community v0.15.2。这是一个manim错误吗? square2 的注释显示了如何规避该错误。
from manim import *
class MovingTriangle(Scene):
def construct(self):
square1 = Square(side_length=1,color=RED,fill_color=RED, fill_opacity=1)
square1.color = GREEN
square1.fill_color = GREEN
square1.fill_opacity = 1
square1.stroke_color = GREEN
square2 = Square(side_length=1) # if parms for any color added in this constructor then square2 would work (fill green)
square2.color = GREEN
square2.fill_color = GREEN
square2.fill_opacity = 1
square2.stroke_color = GREEN
square2.next_to(square1, RIGHT)
self.add(square1, square2)
self.wait()
【问题讨论】:
标签: manim