mirror of
https://github.com/3b1b/manim.git
synced 2025-09-01 00:48:45 +00:00
Check case of scale = 0 in get_view_matrix
This commit is contained in:
parent
f42b3bfa3e
commit
3b0c958189
1 changed files with 5 additions and 3 deletions
|
@ -92,13 +92,15 @@ class CameraFrame(Mobject):
|
|||
if refresh:
|
||||
shift = np.identity(4)
|
||||
rotation = np.identity(4)
|
||||
scale = np.identity(4)
|
||||
scale_mat = np.identity(4)
|
||||
|
||||
shift[:3, 3] = -self.get_center()
|
||||
rotation[:3, :3] = self.get_inverse_camera_rotation_matrix()
|
||||
scale[:3, :3] /= self.get_scale()
|
||||
scale = self.get_scale()
|
||||
if scale > 0:
|
||||
scale_mat[:3, :3] /= self.get_scale()
|
||||
|
||||
self.view_matrix = np.dot(scale, np.dot(rotation, shift))
|
||||
self.view_matrix = np.dot(scale_mat, np.dot(rotation, shift))
|
||||
|
||||
return self.view_matrix
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue