diff --git a/libs/Difficult_Rocket_rs/__init__.py b/libs/Difficult_Rocket_rs/__init__.py index e8ea900..dc0cd44 100644 --- a/libs/Difficult_Rocket_rs/__init__.py +++ b/libs/Difficult_Rocket_rs/__init__.py @@ -62,5 +62,9 @@ if TYPE_CHECKING: def __exit__(self, exc_type, exc_val, exc_tb) -> None: ... + class PartFrame_rs: + ... + + # class CenterCamera_rs(Camera_rs): # """ 用于依旧闲的没事 用 rust 写一个中央对齐的 camera """ diff --git a/libs/Difficult_Rocket_rs/src/src/lib.rs b/libs/Difficult_Rocket_rs/src/src/lib.rs index dd87cc2..c6849ab 100644 --- a/libs/Difficult_Rocket_rs/src/src/lib.rs +++ b/libs/Difficult_Rocket_rs/src/src/lib.rs @@ -36,5 +36,6 @@ fn module_init(_py: Python<'_>, m: &PyModule) -> PyResult<()> { m.add_function(wrap_pyfunction!(simulator::simluation, m)?)?; m.add_class::()?; m.add_class::()?; + m.add_class::()?; Ok(()) } \ No newline at end of file diff --git a/libs/Difficult_Rocket_rs/src/src/render.rs b/libs/Difficult_Rocket_rs/src/src/render.rs index 686d442..e9c15d5 100644 --- a/libs/Difficult_Rocket_rs/src/src/render.rs +++ b/libs/Difficult_Rocket_rs/src/src/render.rs @@ -127,3 +127,28 @@ pub mod camera { } } } + +pub mod screen { + use pyo3::prelude::*; + + #[pyclass] + #[pyo3(name = "PartFrame_rs")] + pub struct PartFrame { + pub box_size: i32, + pub width: i64, + pub height: i64, + // pub frame_box: Vec> + } + + #[pymethods] + impl PartFrame { + #[new] + pub fn py_new() -> PyResult { + Ok(PartFrame { + box_size: 111, + width: 111, + height: 111 + }) + } + } +}