mirror of
https://github.com/voltrevo/ValueScript.git
synced 2026-04-18 03:00:27 -04:00
window.vslibPool
This commit is contained in:
@@ -1 +1 @@
|
||||
export * as valuescript from "https://esm.sh/valuescript@0.0.1";
|
||||
export * as valuescript from "https://esm.sh/valuescript@0.0.3";
|
||||
|
||||
@@ -5,6 +5,7 @@ import assert from "./helpers/assert.ts";
|
||||
import nil from "./helpers/nil.ts";
|
||||
import notNil from "./helpers/notNil.ts";
|
||||
import { initVslib } from "./vslib/index.ts";
|
||||
import VslibPool from "./vslib/VslibPool.ts";
|
||||
|
||||
function domQuery<T = HTMLElement>(query: string): T {
|
||||
return <T> <unknown> notNil(document.querySelector(query) ?? nil);
|
||||
@@ -35,6 +36,7 @@ editorEl.innerHTML = "";
|
||||
]);
|
||||
|
||||
(window as any).vslib = vslib;
|
||||
(window as any).vslibPool = new VslibPool();
|
||||
|
||||
const editor = monaco.editor.create(editorEl, {
|
||||
theme: "vs-dark",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
export async function initVslib() {
|
||||
// deno-lint-ignore no-explicit-any
|
||||
const wasm: Record<string, any> = (await WebAssembly.instantiateStreaming(
|
||||
fetch("/value_script_bg.wasm"),
|
||||
fetch(`${location.origin}/value_script_bg.wasm`),
|
||||
)).instance.exports;
|
||||
|
||||
let WASM_VECTOR_LEN = 0;
|
||||
|
||||
Reference in New Issue
Block a user