mirror of
https://github.com/3b1b/manim.git
synced 2025-09-01 00:48:45 +00:00
Small renaming
This commit is contained in:
parent
7e00660e47
commit
215c21babf
1 changed files with 3 additions and 3 deletions
|
@ -79,13 +79,13 @@ class Window(PygletWindow):
|
|||
relative: bool = False
|
||||
) -> np.ndarray:
|
||||
pixel_shape = np.array(self.size)
|
||||
frame_shape = np.array(FRAME_SHAPE)
|
||||
fixed_frame_shape = np.array(FRAME_SHAPE)
|
||||
frame = self.scene.frame
|
||||
|
||||
coords = np.zeros(3)
|
||||
coords[:2] = (frame_shape / pixel_shape) * np.array([px, py])
|
||||
coords[:2] = (fixed_frame_shape / pixel_shape) * np.array([px, py])
|
||||
if not relative:
|
||||
coords[:2] -= 0.5 * frame_shape
|
||||
coords[:2] -= 0.5 * fixed_frame_shape
|
||||
return frame.from_fixed_frame_point(coords, relative)
|
||||
|
||||
def on_mouse_motion(self, x: int, y: int, dx: int, dy: int) -> None:
|
||||
|
|
Loading…
Add table
Reference in a new issue