mirror of
https://codeberg.org/demostf/tf-demos-viewer.git
synced 2026-06-03 18:14:11 +02:00
cleanup
This commit is contained in:
parent
0d382e1541
commit
cf385c207d
4 changed files with 10 additions and 20 deletions
14
src/lib.rs
14
src/lib.rs
|
|
@ -45,9 +45,9 @@ impl From<World> for WorldBoundaries {
|
|||
|
||||
#[wasm_bindgen]
|
||||
pub struct FlatState {
|
||||
player_count: usize,
|
||||
pub player_count: usize,
|
||||
pub boundaries: WorldBoundaries,
|
||||
data: Box<[u8]>,
|
||||
boundaries: WorldBoundaries,
|
||||
}
|
||||
|
||||
impl FlatState {
|
||||
|
|
@ -70,16 +70,6 @@ pub fn parse_demo(buffer: Box<[u8]>) -> Result<FlatState, JsValue> {
|
|||
Ok(FlatState::new(parsed, world))
|
||||
}
|
||||
|
||||
#[wasm_bindgen]
|
||||
pub fn get_boundaries(state: &FlatState) -> WorldBoundaries {
|
||||
state.boundaries.clone()
|
||||
}
|
||||
|
||||
#[wasm_bindgen]
|
||||
pub fn get_player_count(state: &FlatState) -> usize {
|
||||
state.player_count
|
||||
}
|
||||
|
||||
#[wasm_bindgen]
|
||||
pub fn get_data(state: FlatState) -> Box<[u8]> {
|
||||
state.data
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue