mirror of
https://github.com/3b1b/manim.git
synced 2025-08-03 04:04:36 +08:00
Partition render groups based on shader type, fixed_in_frame status, depth_test and whether the mobject is changing
This commit is contained in:
@ -393,7 +393,12 @@ class Scene(object):
|
||||
self.render_groups = []
|
||||
batches = batch_by_property(
|
||||
self.mobjects,
|
||||
lambda m: str(m.get_uniforms()) + str(m.apply_depth_test)
|
||||
lambda m: "".join([
|
||||
str(m.shader_dtype),
|
||||
str(m.is_fixed_in_frame()),
|
||||
str(m.depth_test),
|
||||
str(m.is_changing()),
|
||||
])
|
||||
)
|
||||
self.render_groups = [
|
||||
batch[0].get_group_class()(*batch)
|
||||
@ -643,6 +648,7 @@ class Scene(object):
|
||||
else:
|
||||
self.update_mobjects(0)
|
||||
|
||||
@affects_mobject_list
|
||||
def play(
|
||||
self,
|
||||
*proto_animations: Animation | _AnimationBuilder,
|
||||
|
Reference in New Issue
Block a user