mirror of
https://github.com/3b1b/manim.git
synced 2025-04-13 09:47:07 +00:00
Add np_vector shorthand type to constants
This commit is contained in:
parent
133ac8bb26
commit
e8c220a3f2
1 changed files with 9 additions and 6 deletions
|
@ -1,5 +1,14 @@
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
|
from typing import TYPE_CHECKING
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from typing import Union
|
||||||
|
from colour import Color
|
||||||
|
|
||||||
|
# Abbreviations for a common types
|
||||||
|
ManimColor = Union[str, Color, None]
|
||||||
|
np_vector = np.ndarray[int, np.dtype[np.float64]]
|
||||||
|
|
||||||
# Sizes relevant to default camera frame
|
# Sizes relevant to default camera frame
|
||||||
ASPECT_RATIO = 16.0 / 9.0
|
ASPECT_RATIO = 16.0 / 9.0
|
||||||
|
@ -83,12 +92,6 @@ CTRL_MODIFIER = 2
|
||||||
COMMAND_MODIFIER = 64
|
COMMAND_MODIFIER = 64
|
||||||
|
|
||||||
# Colors
|
# Colors
|
||||||
from typing import TYPE_CHECKING
|
|
||||||
if TYPE_CHECKING:
|
|
||||||
from typing import Union
|
|
||||||
from colour import Color
|
|
||||||
ManimColor = Union[str, Color, None]
|
|
||||||
|
|
||||||
|
|
||||||
BLUE_E = "#1C758A"
|
BLUE_E = "#1C758A"
|
||||||
BLUE_D = "#29ABCA"
|
BLUE_D = "#29ABCA"
|
||||||
|
|
Loading…
Add table
Reference in a new issue