mirror of
https://github.com/3b1b/manim.git
synced 2025-07-30 05:24:22 +08:00
Performance improvements to 3d constructs
This commit is contained in:
@ -707,9 +707,9 @@ class Mobject(Container):
|
||||
all_points = self.get_all_points()
|
||||
for dim in range(self.dim):
|
||||
if direction[dim] <= 0:
|
||||
min_val = np.min(all_points[:, dim])
|
||||
min_val = min(all_points[:, dim])
|
||||
if direction[dim] >= 0:
|
||||
max_val = np.max(all_points[:, dim])
|
||||
max_val = max(all_points[:, dim])
|
||||
|
||||
if direction[dim] == 0:
|
||||
result[dim] = (max_val + min_val) / 2
|
||||
|
Reference in New Issue
Block a user