Difficult-Rocket/libs/Difficult_Rocket_rs/__init__.py

79 lines
1.9 KiB
Python
Raw Normal View History

2023-01-20 17:41:43 +08:00
# -------------------------------
# Difficult Rocket
2023-01-23 23:46:43 +08:00
# Copyright © 2020-2023 by shenjackyuanjie 3695888@qq.com
2023-01-20 17:41:43 +08:00
# All rights reserved
# -------------------------------
2023-01-23 00:01:01 +08:00
from .lib import *
2023-01-23 01:58:07 +08:00
from typing import TYPE_CHECKING, Dict, Tuple, Optional
2023-01-23 01:58:07 +08:00
if TYPE_CHECKING:
2023-01-23 23:46:43 +08:00
from Difficult_Rocket.client.screen import BaseScreen
2023-01-24 12:25:23 +08:00
from Difficult_Rocket.api.types.SR1 import SR1PartData
2023-01-23 01:58:07 +08:00
from Difficult_Rocket.client.render.sr1_ship import SR1ShipRender, SR1ShipRender_Option
2023-01-31 22:07:18 +08:00
from pyglet.window import Window
2023-04-01 17:47:43 +08:00
2023-01-23 01:58:07 +08:00
def test_call(py_obj) -> bool: ...
2023-04-01 17:47:43 +08:00
2023-01-24 12:25:23 +08:00
def get_version_str() -> str: ...
2023-01-24 08:24:31 +08:00
2023-04-01 17:47:43 +08:00
2023-02-12 21:19:17 +08:00
def simluation() -> None: ...
2023-04-01 17:47:43 +08:00
2023-02-19 11:47:15 +08:00
""" 用来测试 rust 的物理模拟能不能用 """
2023-04-01 17:47:43 +08:00
def part_list_read_test(file_name: Optional[str] = "./configs/PartList.xml") -> None: ...
2023-04-01 17:47:43 +08:00
2023-01-31 22:07:18 +08:00
class Camera_rs:
""" 用于闲的没事 用 rust 写一个 camera """
2023-04-01 17:47:43 +08:00
2023-01-31 22:07:18 +08:00
def __new__(cls, window: Window,
zoom: float = 1.0,
dx: float = 1.0, dy: float = 1.0,
min_zoom: float = 1.0,
max_zoom: float = 1.0): ...
2023-02-02 12:11:29 +08:00
@property
def dx(self) -> float: ...
@property
def dy(self) -> float: ...
@property
def zoom(self) -> float: ...
@property
def position(self) -> Tuple[float, float]: ...
2023-04-01 17:47:43 +08:00
@dx.setter
def dx(self, value: float) -> None: ...
@dy.setter
def dy(self, value: float) -> None: ...
@zoom.setter
def zoom(self, value: float) -> None: ...
2023-02-01 12:45:23 +08:00
def begin(self) -> None: ...
2023-01-31 22:07:18 +08:00
def end(self) -> None: ...
def __enter__(self, window) -> None: ...
2023-01-24 08:24:31 +08:00
2023-01-31 22:07:18 +08:00
def __exit__(self, exc_type, exc_val, exc_tb) -> None: ...
2023-02-02 12:11:29 +08:00
2023-03-11 12:50:11 +08:00
class CenterCamera_rs(Camera_rs):
""" 用于依旧闲的没事 用 rust 写一个中央对齐的 camera """
2023-04-01 17:47:43 +08:00
2023-02-12 23:08:45 +08:00
class PartFrame_rs:
...