mirror of
https://github.com/ManimCommunity/manim.git
synced 2026-06-22 10:01:47 +00:00
Import MethodWithArgs, CHOOSE_NUMBER_MESSAGE and INVALID_NUMBER_MESSAGE (#4538)
* Fix error when calling 'manim basic.py' * Fix error when running "uv run manim basic.py" NameError: name 'MethodWithArgs' is not defined * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Import Shader, Mesh, FullScreenQuad, OpenGLTexturedSurface and OpenGLSurfaceMeshFix To handle some missing imports # Conflicts: # example_scenes/opengl.py * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
fe3e505556
commit
df21b2dc31
8 changed files with 16 additions and 9 deletions
|
|
@ -1,8 +1,12 @@
|
|||
from pathlib import Path
|
||||
|
||||
from manim.opengl import *
|
||||
|
||||
import manim.utils.opengl as opengl
|
||||
from manim import *
|
||||
from manim.opengl import *
|
||||
from manim.mobject.opengl.opengl_surface import OpenGLTexturedSurface
|
||||
from manim.mobject.opengl.opengl_three_dimensions import OpenGLSurfaceMesh
|
||||
from manim.mobject.opengl.shader import FullScreenQuad, Mesh, Shader
|
||||
|
||||
# Copied from https://3b1b.github.io/manim/getting_started/example_scenes.html#surfaceexample.
|
||||
# Lines that do not yet work with the Community Version are commented.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import Any, Self
|
||||
|
||||
import numpy as np
|
||||
from typing_extensions import Any, Self
|
||||
|
||||
from manim.event_handler.event_listener import EventListener
|
||||
from manim.event_handler.event_type import EventType
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import contextlib
|
||||
from typing import TYPE_CHECKING, Callable
|
||||
from collections.abc import Callable
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from typing_extensions import Any
|
||||
from typing import Any
|
||||
|
||||
from manim.event_handler.event_type import EventType
|
||||
from manim.mobject.opengl.opengl_mobject import OpenGLMobject
|
||||
|
|
|
|||
|
|
@ -27,8 +27,9 @@ from manim.utils.progressbar import (
|
|||
)
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from typing import Any
|
||||
|
||||
import numpy.typing as npt
|
||||
from typing_extensions import Any
|
||||
|
||||
from manim.animation.protocol import AnimationProtocol
|
||||
from manim.file_writer.protocols import FileWriterProtocol
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ from typing_extensions import (
|
|||
|
||||
from manim import config
|
||||
from manim.constants import *
|
||||
from manim.data_structures import MethodWithArgs
|
||||
from manim.event_handler import EVENT_DISPATCHER
|
||||
from manim.event_handler.event_listener import EventListener
|
||||
from manim.event_handler.event_type import EventType
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import numpy as np
|
|||
|
||||
|
||||
class STD140BufferFormat:
|
||||
_GL_DTYPES: dict[str, tuple[str, type[np.float_], tuple[int, ...]]] = {
|
||||
_GL_DTYPES: dict[str, tuple[str, type[np.float64], tuple[int, ...]]] = {
|
||||
"int": ("i", np.float32, (1,)),
|
||||
"ivec2": ("i", np.float32, (2,)),
|
||||
"ivec3": ("i", np.float32, (3,)),
|
||||
|
|
|
|||
|
|
@ -2,9 +2,7 @@ from __future__ import annotations
|
|||
|
||||
import types
|
||||
from collections.abc import Callable
|
||||
from typing import TYPE_CHECKING, ClassVar, Generic, ParamSpec, TypeVar, final
|
||||
|
||||
from typing_extensions import Self
|
||||
from typing import TYPE_CHECKING, ClassVar, Generic, ParamSpec, Self, TypeVar, final
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from .scene import Scene
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import warnings
|
|||
from typing import TYPE_CHECKING, Any, Literal, overload
|
||||
|
||||
from manim import config, console, constants, logger
|
||||
from manim.constants import CHOOSE_NUMBER_MESSAGE, INVALID_NUMBER_MESSAGE
|
||||
from manim.file_writer import FileWriter
|
||||
|
||||
if TYPE_CHECKING:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue