mirror of
https://github.com/3b1b/manim.git
synced 2025-11-15 20:47:44 +00:00
Check that scene has a camera frame in pixel_to_point_coords
This commit is contained in:
parent
f83c441210
commit
8820af65ec
1 changed files with 3 additions and 0 deletions
|
|
@ -78,6 +78,9 @@ class Window(PygletWindow):
|
||||||
py: int,
|
py: int,
|
||||||
relative: bool = False
|
relative: bool = False
|
||||||
) -> np.ndarray:
|
) -> np.ndarray:
|
||||||
|
if not hasattr(self.scene, "frame"):
|
||||||
|
return np.zeros(3)
|
||||||
|
|
||||||
pixel_shape = np.array(self.size)
|
pixel_shape = np.array(self.size)
|
||||||
fixed_frame_shape = np.array(FRAME_SHAPE)
|
fixed_frame_shape = np.array(FRAME_SHAPE)
|
||||||
frame = self.scene.frame
|
frame = self.scene.frame
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue