Check that scene has a camera frame in pixel_to_point_coords

This commit is contained in:
Grant Sanderson 2023-02-01 20:11:31 -08:00
parent f83c441210
commit 8820af65ec

View file

@ -78,6 +78,9 @@ class Window(PygletWindow):
py: int,
relative: bool = False
) -> np.ndarray:
if not hasattr(self.scene, "frame"):
return np.zeros(3)
pixel_shape = np.array(self.size)
fixed_frame_shape = np.array(FRAME_SHAPE)
frame = self.scene.frame