mirror of
https://codeberg.org/demostf/edit.git
synced 2026-10-01 07:34:05 +02:00
expose player count to js bindings
This commit is contained in:
parent
54835fada1
commit
3e0e81da3d
1 changed files with 4 additions and 3 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
export interface EditOptions {
|
export interface EditOptions {
|
||||||
unlock_pov: boolean,
|
unlock_pov: boolean,
|
||||||
|
fix_player_count: boolean,
|
||||||
cut?: TickRange,
|
cut?: TickRange,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -9,11 +10,11 @@ export interface TickRange {
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function edit(bytes: Uint8Array, options: EditOptions): Promise<Uint8Array> {
|
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);
|
return m.edit_js(bytes, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function count_ticks(bytes: Uint8Array): Promise<number> {
|
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);
|
return m.count_ticks(bytes);
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue