mirror of
https://github.com/3b1b/manim.git
synced 2025-09-19 04:41:56 +00:00
Add always_sort_to_camera for surfaces
This commit is contained in:
parent
ee2f68cd49
commit
0b898a5594
1 changed files with 5 additions and 0 deletions
|
@ -162,6 +162,11 @@ class Surface(Mobject):
|
|||
tri_is[k::3] = tri_is[k::3][indices]
|
||||
return self
|
||||
|
||||
def always_sort_to_camera(self, camera):
|
||||
self.add_updater(lambda m: m.sort_faces_back_to_front(
|
||||
camera.get_location() - self.get_center()
|
||||
))
|
||||
|
||||
# For shaders
|
||||
def get_shader_data(self):
|
||||
s_points, du_points, dv_points = self.get_surface_points_and_nudged_points()
|
||||
|
|
Loading…
Add table
Reference in a new issue