camera!

This commit is contained in:
shenjack 2023-01-30 11:59:34 +08:00
parent d0041c14f5
commit 38a9344939
3 changed files with 7 additions and 1 deletions

View File

@ -60,8 +60,9 @@ class ClientOption(Options):
self.fps = file['runtime']['fps']
self.width = file['window']['width']
self.height = file['window']['height']
self.resizeable = file['window']['resizable']
self.fullscreen = file['window']['full_screen']
self.resizeable = file['window']['resizable']
self.gui_scale = file['window']['gui_scale']
class Client:

View File

@ -4,6 +4,7 @@
# All rights reserved
# -------------------------------
import time
from xml.etree import ElementTree
from xml.etree.ElementTree import Element
from typing import List, TYPE_CHECKING, Union, Dict, Optional
@ -132,6 +133,7 @@ class SR1ShipRender(BaseScreen):
def render_ship(self):
if self.textures is None:
self.load_textures()
start_time = time.perf_counter_ns()
self.part_data: Dict[int, SR1PartData] = {}
self.parts_sprite: Dict[int, Sprite] = {}
self.dx = 0
@ -175,6 +177,8 @@ class SR1ShipRender(BaseScreen):
print(type(self.part_data))
self.rust_parts = PartDatas(self.part_data)
# print(self.rust_parts.get_rust_pointer())
print(len(self.part_data))
print(time.perf_counter_ns() - start_time)
self.rendered = True
def update_parts(self) -> bool:

View File

@ -32,5 +32,6 @@ fn module_init(_py: Python<'_>, m: &PyModule) -> PyResult<()> {
m.add_function(wrap_pyfunction!(test_call, m)?)?;
m.add_function(wrap_pyfunction!(sr1_render::better_update_parts, m)?)?;
m.add_class::<sr1_render::types::PartDatas>()?;
m.add_class::<render::camera::CameraRs>()?;
Ok(())
}