mirror of https://github.com/VERT-sh/VERT.git
16 lines
397 B
TypeScript
16 lines
397 B
TypeScript
import Vips from "wasm-vips";
|
|
|
|
class Converters {
|
|
public vips = $state<typeof Vips>(null!);
|
|
public loaded = $derived(this.vips !== null);
|
|
}
|
|
|
|
export const converters = new Converters();
|
|
|
|
// Vips().then((vips) => {
|
|
// converters.vips = vips;
|
|
// });
|
|
|
|
// the above *does* work but it blocks the ui thread whilst wasm is loading
|
|
// we can use a web worker to remedy this, see +layout.ts for details
|