mirror of
https://github.com/ManimCommunity/manim.git
synced 2026-06-22 10:01:47 +00:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
4c9c762e15
commit
063a899720
2 changed files with 10 additions and 4 deletions
|
|
@ -31,7 +31,9 @@ class Window(PygletWindow, WindowProtocol):
|
|||
vsync: bool = True
|
||||
cursor: bool = True
|
||||
|
||||
def __init__(self, scene: Scene, window_size: str | tuple[int, ...] = config.window_size):
|
||||
def __init__(
|
||||
self, scene: Scene, window_size: str | tuple[int, ...] = config.window_size
|
||||
):
|
||||
# TODO: remove size argument from window init,
|
||||
# move size computation below to config
|
||||
|
||||
|
|
@ -158,7 +160,9 @@ class Window(PygletWindow, WindowProtocol):
|
|||
"""
|
||||
self.scene.on_mouse_motion(np.array([x, y, 0]), np.array([dx, dy, 0]))
|
||||
|
||||
def on_mouse_drag(self, x: int, y: int, dx: int, dy: int, buttons: int, modifiers: int) -> None:
|
||||
def on_mouse_drag(
|
||||
self, x: int, y: int, dx: int, dy: int, buttons: int, modifiers: int
|
||||
) -> None:
|
||||
"""tie mouse drag events to the scene response
|
||||
|
||||
Parmeters
|
||||
|
|
@ -226,7 +230,10 @@ class Window(PygletWindow, WindowProtocol):
|
|||
y_offset
|
||||
number of vertical wheel ticks
|
||||
"""
|
||||
self.scene.on_mouse_scroll(np.array([x, y, 0]), np.array([x_offset, y_offset, 0]))
|
||||
self.scene.on_mouse_scroll(
|
||||
np.array([x, y, 0]), np.array([x_offset, y_offset, 0])
|
||||
)
|
||||
|
||||
|
||||
def tuple_len_2(pos: tuple[T, ...]) -> TypeGuard[tuple[T, T]]:
|
||||
return len(pos) == 2
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ import numpy as np
|
|||
from pyglet.window import key
|
||||
|
||||
from manim import config, logger
|
||||
from manim.animation import transform
|
||||
from manim.animation.animation import Wait, prepare_animation
|
||||
from manim.animation.scene_buffer import SceneBuffer, SceneOperation
|
||||
from manim.camera.camera import Camera
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue