mirror of
https://github.com/3b1b/manim.git
synced 2025-04-13 09:47:07 +00:00
Specify number of samples at the scene level, and be sure it works for Window as well
This commit is contained in:
parent
9249433144
commit
66d12a1687
2 changed files with 5 additions and 1 deletions
|
@ -62,6 +62,7 @@ class Scene(object):
|
|||
default_camera_config: dict = dict()
|
||||
default_window_config: dict = dict()
|
||||
default_file_writer_config: dict = dict()
|
||||
samples = 0
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
|
@ -92,6 +93,8 @@ class Scene(object):
|
|||
|
||||
self.camera_config = {**self.default_camera_config, **camera_config}
|
||||
self.window_config = {**self.default_window_config, **window_config}
|
||||
for config in self.camera_config, self.window_config:
|
||||
config["samples"] = self.samples
|
||||
self.file_writer_config = {**self.default_file_writer_config, **file_writer_config}
|
||||
|
||||
# Initialize window, if applicable
|
||||
|
|
|
@ -26,8 +26,9 @@ class Window(PygletWindow):
|
|||
self,
|
||||
scene: Scene,
|
||||
size: tuple[int, int] = (1280, 720),
|
||||
samples = 0
|
||||
):
|
||||
super().__init__(size=size)
|
||||
super().__init__(size=size, samples=samples)
|
||||
|
||||
self.scene = scene
|
||||
self.pressed_keys = set()
|
||||
|
|
Loading…
Add table
Reference in a new issue