expose player count to js bindings

This commit is contained in:
Robin Appelman 2026-09-09 23:25:13 +02:00
commit 3e0e81da3d

View file

@ -1,5 +1,6 @@
export interface EditOptions {
unlock_pov: boolean,
fix_player_count: boolean,
cut?: TickRange,
}
@ -9,11 +10,11 @@ export interface TickRange {
}
export async function edit(bytes: Uint8Array, options: EditOptions): Promise<Uint8Array> {
let m = await import(/* webpackChunkName: "demos-tf-edit" */ "../pkg/index.js");
let m = await import(/* webpackChunkName: "demos-tf-edit" */ "../wasm/pkg/index.js");
return m.edit_js(bytes, options);
}
export async function count_ticks(bytes: Uint8Array): Promise<number> {
let m = await import(/* webpackChunkName: "demos-tf-edit" */ "../pkg/index.js");
let m = await import(/* webpackChunkName: "demos-tf-edit" */ "../wasm/pkg/index.js");
return m.count_ticks(bytes);
}