This commit is contained in:
blueloveTH 2023-05-12 14:35:56 +08:00
parent 9e72433cc7
commit 81cf0fd0a6
2 changed files with 154 additions and 0 deletions

39
docs/modules/easing.md Normal file
View File

@ -0,0 +1,39 @@
---
icon: package
label: easing
order: -6
---
Python wrapper for [easing functions](https://easings.net/).
+ EaseLinear(x: float) -> float: ...
+ EaseInSine(x: float) -> float: ...
+ EaseOutSine(x: float) -> float: ...
+ EaseInOutSine(x: float) -> float: ...
+ EaseInQuad(x: float) -> float: ...
+ EaseOutQuad(x: float) -> float: ...
+ EaseInOutQuad(x: float) -> float: ...
+ EaseInCubic(x: float) -> float: ...
+ EaseOutCubic(x: float) -> float: ...
+ EaseInOutCubic(x: float) -> float: ...
+ EaseInQuart(x: float) -> float: ...
+ EaseOutQuart(x: float) -> float: ...
+ EaseInOutQuart(x: float) -> float: ...
+ EaseInQuint(x: float) -> float: ...
+ EaseOutQuint(x: float) -> float: ...
+ EaseInOutQuint(x: float) -> float: ...
+ EaseInExpo(x: float) -> float: ...
+ EaseOutExpo(x: float) -> float: ...
+ EaseInOutExpo(x: float) -> float: ...
+ EaseInCirc(x: float) -> float: ...
+ EaseOutCirc(x: float) -> float: ...
+ EaseInOutCirc(x: float) -> float: ...
+ EaseInBack(x: float) -> float: ...
+ EaseOutBack(x: float) -> float: ...
+ EaseInOutBack(x: float) -> float: ...
+ EaseInElastic(x: float) -> float: ...
+ EaseOutElastic(x: float) -> float: ...
+ EaseInOutElastic(x: float) -> float: ...
+ EaseInBounce(x: float) -> float: ...
+ EaseOutBounce(x: float) -> float: ...
+ EaseInOutBounce(x: float) -> float: ...

115
docs/modules/linalg.md Normal file
View File

@ -0,0 +1,115 @@
---
icon: package
label: linalg
order: -6
---
Provide `mat3x3`, `vec2` and `vec3` types.
```python
from typing import overload
class vec2:
x: float
y: float
def __init__(self, x: float, y: float) -> None: ...
def copy(self) -> vec2: ...
def __add__(self, other: vec2) -> vec2: ...
def __sub__(self, other: vec2) -> vec2: ...
def __mul__(self, other: float) -> vec2: ...
def __truediv__(self, other: float) -> vec2: ...
def dot(self, other: vec2) -> float: ...
def cross(self, other: vec2) -> float: ...
def length(self) -> float: ...
def length_squared(self) -> float: ...
def normalize(self) -> None: ...
def normalized(self) -> vec2: ...
class vec3:
x: float
y: float
z: float
def __init__(self, x: float, y: float, z: float) -> None: ...
def copy(self) -> vec3: ...
def __add__(self, other: vec3) -> vec3: ...
def __sub__(self, other: vec3) -> vec3: ...
def __mul__(self, other: float) -> vec3: ...
def __truediv__(self, other: float) -> vec3: ...
def dot(self, other: vec3) -> float: ...
def cross(self, other: vec3) -> float: ...
def length(self) -> float: ...
def length_squared(self) -> float: ...
def normalize(self) -> None: ...
def normalized(self) -> vec3: ...
class mat3x3:
_11: float
_12: float
_13: float
_21: float
_22: float
_23: float
_31: float
_32: float
_33: float
@overload
def __init__(self) -> None: ...
@overload
def __init__(self, _11, _12, _13, _21, _22, _23, _31, _32, _33) -> None: ...
@overload
def __init__(self, a: list[list]): ...
def set_zeros(self) -> None: ...
def set_ones(self) -> None: ...
def set_identity(self) -> None: ...
def copy(self) -> mat3x3: ...
def __getitem__(self, index: tuple[int, int]) -> float: ...
def __setitem__(self, index: tuple[int, int], value: float) -> None: ...
def __add__(self, other: mat3x3) -> mat3x3: ...
def __sub__(self, other: mat3x3) -> mat3x3: ...
def __mul__(self, other: float) -> mat3x3: ...
def __truediv__(self, other: float) -> mat3x3: ...
@overload
def __matmul__(self, other: mat3x3) -> mat3x3: ...
@overload
def __matmul__(self, other: vec3) -> vec3: ...
@overload
def matmul(self, other: mat3x3) -> mat3x3: ...
@overload
def matmul(self, other: vec3) -> vec3: ...
def determinant(self) -> float: ...
def transpose(self) -> mat3x3: ...
def inverse(self) -> mat3x3: ...
@staticmethod
def zeros() -> mat3x3: ...
@staticmethod
def ones() -> mat3x3: ...
@staticmethod
def identity() -> mat3x3: ...
# affine transformations
@staticmethod
def translate(v: vec2) -> mat3x3: ...
@staticmethod
def rotate(rad: float) -> mat3x3: ...
@staticmethod
def scale(v: vec2) -> mat3x3: ...
@staticmethod
def trs(t: vec2, r: float, s: vec2) -> mat3x3: ...
def is_affine(self) -> bool: ...
def inverse_affine(self) -> mat3x3: ...
def matmul_affine(self, other: mat3x3) -> mat3x3: ...
def translation(self) -> vec2: ...
def rotation(self) -> float: ...
def scale(self) -> vec2: ...
def transform_point(self, p: vec2) -> vec2: ...
def transform_vector(self, v: vec2) -> vec2: ...
```