-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
419 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"name": "spritefire", | ||
"version": "0.1.0", | ||
"files": [ | ||
"spritefire_bg.wasm", | ||
"spritefire.js", | ||
"spritefire.d.ts" | ||
], | ||
"module": "spritefire.js", | ||
"types": "spritefire.d.ts", | ||
"sideEffects": [ | ||
"./snippets/*" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
/** | ||
*/ | ||
export function set_db(): void; | ||
/** | ||
* @param {Uint8Array} buf | ||
* @param {number} pool_size | ||
* @returns {string} | ||
*/ | ||
export function process_img(buf: Uint8Array, pool_size: number): string; | ||
/** | ||
* @param {ImageData} img_data | ||
* @param {number} pool_size | ||
* @returns {string} | ||
*/ | ||
export function process_img_data(img_data: ImageData, pool_size: number): string; | ||
/** | ||
* Chroma subsampling format | ||
*/ | ||
export enum ChromaSampling { | ||
/** | ||
* Both vertically and horizontally subsampled. | ||
*/ | ||
Cs420 = 0, | ||
/** | ||
* Horizontally subsampled. | ||
*/ | ||
Cs422 = 1, | ||
/** | ||
* Not subsampled. | ||
*/ | ||
Cs444 = 2, | ||
/** | ||
* Monochrome. | ||
*/ | ||
Cs400 = 3, | ||
} | ||
|
||
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module; | ||
|
||
export interface InitOutput { | ||
readonly memory: WebAssembly.Memory; | ||
readonly set_db: () => void; | ||
readonly process_img: (a: number, b: number, c: number, d: number) => void; | ||
readonly process_img_data: (a: number, b: number, c: number) => void; | ||
readonly __wbindgen_add_to_stack_pointer: (a: number) => number; | ||
readonly __wbindgen_malloc: (a: number, b: number) => number; | ||
readonly __wbindgen_free: (a: number, b: number, c: number) => void; | ||
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number; | ||
} | ||
|
||
export type SyncInitInput = BufferSource | WebAssembly.Module; | ||
/** | ||
* Instantiates the given `module`, which can either be bytes or | ||
* a precompiled `WebAssembly.Module`. | ||
* | ||
* @param {SyncInitInput} module | ||
* | ||
* @returns {InitOutput} | ||
*/ | ||
export function initSync(module: SyncInitInput): InitOutput; | ||
|
||
/** | ||
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and | ||
* for everything else, calls `WebAssembly.instantiate` directly. | ||
* | ||
* @param {InitInput | Promise<InitInput>} module_or_path | ||
* | ||
* @returns {Promise<InitOutput>} | ||
*/ | ||
export default function __wbg_init (module_or_path?: InitInput | Promise<InitInput>): Promise<InitOutput>; |
Oops, something went wrong.