camera!
This commit is contained in:
parent
d0041c14f5
commit
38a9344939
@ -60,8 +60,9 @@ class ClientOption(Options):
|
|||||||
self.fps = file['runtime']['fps']
|
self.fps = file['runtime']['fps']
|
||||||
self.width = file['window']['width']
|
self.width = file['window']['width']
|
||||||
self.height = file['window']['height']
|
self.height = file['window']['height']
|
||||||
self.resizeable = file['window']['resizable']
|
|
||||||
self.fullscreen = file['window']['full_screen']
|
self.fullscreen = file['window']['full_screen']
|
||||||
|
self.resizeable = file['window']['resizable']
|
||||||
|
self.gui_scale = file['window']['gui_scale']
|
||||||
|
|
||||||
|
|
||||||
class Client:
|
class Client:
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
# All rights reserved
|
# All rights reserved
|
||||||
# -------------------------------
|
# -------------------------------
|
||||||
|
|
||||||
|
import time
|
||||||
from xml.etree import ElementTree
|
from xml.etree import ElementTree
|
||||||
from xml.etree.ElementTree import Element
|
from xml.etree.ElementTree import Element
|
||||||
from typing import List, TYPE_CHECKING, Union, Dict, Optional
|
from typing import List, TYPE_CHECKING, Union, Dict, Optional
|
||||||
@ -132,6 +133,7 @@ class SR1ShipRender(BaseScreen):
|
|||||||
def render_ship(self):
|
def render_ship(self):
|
||||||
if self.textures is None:
|
if self.textures is None:
|
||||||
self.load_textures()
|
self.load_textures()
|
||||||
|
start_time = time.perf_counter_ns()
|
||||||
self.part_data: Dict[int, SR1PartData] = {}
|
self.part_data: Dict[int, SR1PartData] = {}
|
||||||
self.parts_sprite: Dict[int, Sprite] = {}
|
self.parts_sprite: Dict[int, Sprite] = {}
|
||||||
self.dx = 0
|
self.dx = 0
|
||||||
@ -175,6 +177,8 @@ class SR1ShipRender(BaseScreen):
|
|||||||
print(type(self.part_data))
|
print(type(self.part_data))
|
||||||
self.rust_parts = PartDatas(self.part_data)
|
self.rust_parts = PartDatas(self.part_data)
|
||||||
# print(self.rust_parts.get_rust_pointer())
|
# print(self.rust_parts.get_rust_pointer())
|
||||||
|
print(len(self.part_data))
|
||||||
|
print(time.perf_counter_ns() - start_time)
|
||||||
self.rendered = True
|
self.rendered = True
|
||||||
|
|
||||||
def update_parts(self) -> bool:
|
def update_parts(self) -> bool:
|
||||||
|
@ -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!(test_call, m)?)?;
|
||||||
m.add_function(wrap_pyfunction!(sr1_render::better_update_parts, m)?)?;
|
m.add_function(wrap_pyfunction!(sr1_render::better_update_parts, m)?)?;
|
||||||
m.add_class::<sr1_render::types::PartDatas>()?;
|
m.add_class::<sr1_render::types::PartDatas>()?;
|
||||||
|
m.add_class::<render::camera::CameraRs>()?;
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user