mirror of
https://codeberg.org/demostf/tf-demos-viewer.git
synced 2026-06-03 10:04:12 +02:00
cleanup
This commit is contained in:
parent
0d382e1541
commit
cf385c207d
4 changed files with 10 additions and 20 deletions
12
js/parser.ts
12
js/parser.ts
|
|
@ -4,8 +4,8 @@ export async function parseDemo(bytes: Uint8Array): Promise<ParsedDemo> {
|
|||
let m = await import("../pkg/index.js");
|
||||
const state = m.parse_demo(bytes);
|
||||
|
||||
let playerCount = m.get_player_count(state);
|
||||
let boundaries = m.get_boundaries(state);
|
||||
let playerCount = state.player_count;
|
||||
let boundaries = state.boundaries;
|
||||
let data = m.get_data(state);
|
||||
|
||||
return new ParsedDemo(playerCount, {
|
||||
|
|
@ -73,10 +73,10 @@ function unpack_angle(val: number): number {
|
|||
}
|
||||
|
||||
export class ParsedDemo {
|
||||
private playerCount: number;
|
||||
private world: WorldBoundaries;
|
||||
private data: Uint8Array;
|
||||
private tickCount: number;
|
||||
private readonly playerCount: number;
|
||||
private readonly world: WorldBoundaries;
|
||||
private readonly data: Uint8Array;
|
||||
private readonly tickCount: number;
|
||||
|
||||
constructor(playerCount: number, world: WorldBoundaries, data: Uint8Array) {
|
||||
this.playerCount = playerCount;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue