Last active
April 20, 2021 19:24
-
-
Save jaddoescad/79a6f0cf90a964d8c9380de8d8a6a581 to your computer and use it in GitHub Desktop.
change background color in manim
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from big_ol_pile_of_manim_imports import * | |
def set_background(self): | |
background = Rectangle( | |
width = FRAME_WIDTH, | |
height = FRAME_HEIGHT, | |
stroke_width = 0, | |
fill_color = "#3E746F", | |
fill_opacity = 1) | |
self.add(background) | |
class background_setter(Scene): | |
#A few simple shapes | |
def construct(self): | |
#set background color | |
set_background(self) | |
self.wait(2) |
You can import the file the same way you import a library using import command. See this tutorial: https://www.pythoncentral.io/how-to-create-a-python-package/
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@jaddoescad, I'm really sorry for the stupid question but I'm a newbie, how should I use this py file in a separate project, in a different Python script?