mirror of https://github.com/emilk/egui.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
769 lines
29 KiB
769 lines
29 KiB
let wasm_bindgen;
|
|
(function() {
|
|
const __exports = {};
|
|
let wasm;
|
|
|
|
const heap = new Array(32).fill(undefined);
|
|
|
|
heap.push(undefined, null, true, false);
|
|
|
|
function getObject(idx) { return heap[idx]; }
|
|
|
|
let heap_next = heap.length;
|
|
|
|
function dropObject(idx) {
|
|
if (idx < 36) return;
|
|
heap[idx] = heap_next;
|
|
heap_next = idx;
|
|
}
|
|
|
|
function takeObject(idx) {
|
|
const ret = getObject(idx);
|
|
dropObject(idx);
|
|
return ret;
|
|
}
|
|
|
|
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
|
|
cachedTextDecoder.decode();
|
|
|
|
let cachegetUint8Memory0 = null;
|
|
function getUint8Memory0() {
|
|
if (cachegetUint8Memory0 === null || cachegetUint8Memory0.buffer !== wasm.memory.buffer) {
|
|
cachegetUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
|
}
|
|
return cachegetUint8Memory0;
|
|
}
|
|
|
|
function getStringFromWasm0(ptr, len) {
|
|
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
}
|
|
|
|
function addHeapObject(obj) {
|
|
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
const idx = heap_next;
|
|
heap_next = heap[idx];
|
|
|
|
heap[idx] = obj;
|
|
return idx;
|
|
}
|
|
|
|
function isLikeNone(x) {
|
|
return x === undefined || x === null;
|
|
}
|
|
|
|
let cachegetFloat64Memory0 = null;
|
|
function getFloat64Memory0() {
|
|
if (cachegetFloat64Memory0 === null || cachegetFloat64Memory0.buffer !== wasm.memory.buffer) {
|
|
cachegetFloat64Memory0 = new Float64Array(wasm.memory.buffer);
|
|
}
|
|
return cachegetFloat64Memory0;
|
|
}
|
|
|
|
let cachegetInt32Memory0 = null;
|
|
function getInt32Memory0() {
|
|
if (cachegetInt32Memory0 === null || cachegetInt32Memory0.buffer !== wasm.memory.buffer) {
|
|
cachegetInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
|
}
|
|
return cachegetInt32Memory0;
|
|
}
|
|
|
|
function debugString(val) {
|
|
// primitive types
|
|
const type = typeof val;
|
|
if (type == 'number' || type == 'boolean' || val == null) {
|
|
return `${val}`;
|
|
}
|
|
if (type == 'string') {
|
|
return `"${val}"`;
|
|
}
|
|
if (type == 'symbol') {
|
|
const description = val.description;
|
|
if (description == null) {
|
|
return 'Symbol';
|
|
} else {
|
|
return `Symbol(${description})`;
|
|
}
|
|
}
|
|
if (type == 'function') {
|
|
const name = val.name;
|
|
if (typeof name == 'string' && name.length > 0) {
|
|
return `Function(${name})`;
|
|
} else {
|
|
return 'Function';
|
|
}
|
|
}
|
|
// objects
|
|
if (Array.isArray(val)) {
|
|
const length = val.length;
|
|
let debug = '[';
|
|
if (length > 0) {
|
|
debug += debugString(val[0]);
|
|
}
|
|
for(let i = 1; i < length; i++) {
|
|
debug += ', ' + debugString(val[i]);
|
|
}
|
|
debug += ']';
|
|
return debug;
|
|
}
|
|
// Test for built-in
|
|
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
let className;
|
|
if (builtInMatches.length > 1) {
|
|
className = builtInMatches[1];
|
|
} else {
|
|
// Failed to match the standard '[object ClassName]'
|
|
return toString.call(val);
|
|
}
|
|
if (className == 'Object') {
|
|
// we're a user defined class or Object
|
|
// JSON.stringify avoids problems with cycles, and is generally much
|
|
// easier than looping through ownProperties of `val`.
|
|
try {
|
|
return 'Object(' + JSON.stringify(val) + ')';
|
|
} catch (_) {
|
|
return 'Object';
|
|
}
|
|
}
|
|
// errors
|
|
if (val instanceof Error) {
|
|
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
}
|
|
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
return className;
|
|
}
|
|
|
|
let WASM_VECTOR_LEN = 0;
|
|
|
|
let cachedTextEncoder = new TextEncoder('utf-8');
|
|
|
|
const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
|
|
? function (arg, view) {
|
|
return cachedTextEncoder.encodeInto(arg, view);
|
|
}
|
|
: function (arg, view) {
|
|
const buf = cachedTextEncoder.encode(arg);
|
|
view.set(buf);
|
|
return {
|
|
read: arg.length,
|
|
written: buf.length
|
|
};
|
|
});
|
|
|
|
function passStringToWasm0(arg, malloc, realloc) {
|
|
|
|
if (realloc === undefined) {
|
|
const buf = cachedTextEncoder.encode(arg);
|
|
const ptr = malloc(buf.length);
|
|
getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
WASM_VECTOR_LEN = buf.length;
|
|
return ptr;
|
|
}
|
|
|
|
let len = arg.length;
|
|
let ptr = malloc(len);
|
|
|
|
const mem = getUint8Memory0();
|
|
|
|
let offset = 0;
|
|
|
|
for (; offset < len; offset++) {
|
|
const code = arg.charCodeAt(offset);
|
|
if (code > 0x7F) break;
|
|
mem[ptr + offset] = code;
|
|
}
|
|
|
|
if (offset !== len) {
|
|
if (offset !== 0) {
|
|
arg = arg.slice(offset);
|
|
}
|
|
ptr = realloc(ptr, len, len = offset + arg.length * 3);
|
|
const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
|
|
const ret = encodeString(arg, view);
|
|
|
|
offset += ret.written;
|
|
}
|
|
|
|
WASM_VECTOR_LEN = offset;
|
|
return ptr;
|
|
}
|
|
|
|
function makeMutClosure(arg0, arg1, dtor, f) {
|
|
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
const real = (...args) => {
|
|
// First up with a closure we increment the internal reference
|
|
// count. This ensures that the Rust closure environment won't
|
|
// be deallocated while we're invoking it.
|
|
state.cnt++;
|
|
const a = state.a;
|
|
state.a = 0;
|
|
try {
|
|
return f(a, state.b, ...args);
|
|
} finally {
|
|
if (--state.cnt === 0) {
|
|
wasm.__wbindgen_export_2.get(state.dtor)(a, state.b);
|
|
|
|
} else {
|
|
state.a = a;
|
|
}
|
|
}
|
|
};
|
|
real.original = state;
|
|
|
|
return real;
|
|
}
|
|
function __wbg_adapter_24(arg0, arg1) {
|
|
wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hce34b152c443bb7b(arg0, arg1);
|
|
}
|
|
|
|
function __wbg_adapter_27(arg0, arg1) {
|
|
wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hecb61ca17e18a336(arg0, arg1);
|
|
}
|
|
|
|
function __wbg_adapter_30(arg0, arg1, arg2) {
|
|
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__ha77d0d78a1a2be50(arg0, arg1, addHeapObject(arg2));
|
|
}
|
|
|
|
function __wbg_adapter_33(arg0, arg1, arg2) {
|
|
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__ha77d0d78a1a2be50(arg0, arg1, addHeapObject(arg2));
|
|
}
|
|
|
|
function __wbg_adapter_36(arg0, arg1, arg2) {
|
|
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__ha77d0d78a1a2be50(arg0, arg1, addHeapObject(arg2));
|
|
}
|
|
|
|
function __wbg_adapter_39(arg0, arg1, arg2) {
|
|
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__ha77d0d78a1a2be50(arg0, arg1, addHeapObject(arg2));
|
|
}
|
|
|
|
/**
|
|
* This is the entry-point for all the web-assembly.
|
|
* @param {string} canvas_id
|
|
*/
|
|
__exports.start = function(canvas_id) {
|
|
var ptr0 = passStringToWasm0(canvas_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
var len0 = WASM_VECTOR_LEN;
|
|
wasm.start(ptr0, len0);
|
|
};
|
|
|
|
function handleError(f) {
|
|
return function () {
|
|
try {
|
|
return f.apply(this, arguments);
|
|
|
|
} catch (e) {
|
|
wasm.__wbindgen_exn_store(addHeapObject(e));
|
|
}
|
|
};
|
|
}
|
|
|
|
function getArrayU8FromWasm0(ptr, len) {
|
|
return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
|
|
}
|
|
|
|
async function load(module, imports) {
|
|
if (typeof Response === 'function' && module instanceof Response) {
|
|
|
|
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
try {
|
|
return await WebAssembly.instantiateStreaming(module, imports);
|
|
|
|
} catch (e) {
|
|
if (module.headers.get('Content-Type') != 'application/wasm') {
|
|
console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
|
|
|
|
} else {
|
|
throw e;
|
|
}
|
|
}
|
|
}
|
|
|
|
const bytes = await module.arrayBuffer();
|
|
return await WebAssembly.instantiate(bytes, imports);
|
|
|
|
} else {
|
|
|
|
const instance = await WebAssembly.instantiate(module, imports);
|
|
|
|
if (instance instanceof WebAssembly.Instance) {
|
|
return { instance, module };
|
|
|
|
} else {
|
|
return instance;
|
|
}
|
|
}
|
|
}
|
|
|
|
async function init(input) {
|
|
if (typeof input === 'undefined') {
|
|
let src;
|
|
if (typeof document === 'undefined') {
|
|
src = location.href;
|
|
} else {
|
|
src = document.currentScript.src;
|
|
}
|
|
input = src.replace(/\.js$/, '_bg.wasm');
|
|
}
|
|
const imports = {};
|
|
imports.wbg = {};
|
|
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
takeObject(arg0);
|
|
};
|
|
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
|
var ret = getStringFromWasm0(arg0, arg1);
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbindgen_cb_drop = function(arg0) {
|
|
const obj = takeObject(arg0).original;
|
|
if (obj.cnt-- == 1) {
|
|
obj.a = 0;
|
|
return true;
|
|
}
|
|
var ret = false;
|
|
return ret;
|
|
};
|
|
imports.wbg.__wbg_instanceof_Window_e8f84259147dce74 = function(arg0) {
|
|
var ret = getObject(arg0) instanceof Window;
|
|
return ret;
|
|
};
|
|
imports.wbg.__wbg_document_d3b6d86af1c5d199 = function(arg0) {
|
|
var ret = getObject(arg0).document;
|
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_location_4c98b1eeb5ceccc0 = function(arg0) {
|
|
var ret = getObject(arg0).location;
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_innerWidth_2a084ee2fb8c0457 = handleError(function(arg0) {
|
|
var ret = getObject(arg0).innerWidth;
|
|
return addHeapObject(ret);
|
|
});
|
|
imports.wbg.__wbg_innerHeight_4676de3f9d6f79be = handleError(function(arg0) {
|
|
var ret = getObject(arg0).innerHeight;
|
|
return addHeapObject(ret);
|
|
});
|
|
imports.wbg.__wbg_devicePixelRatio_8e0818d196b8e065 = function(arg0) {
|
|
var ret = getObject(arg0).devicePixelRatio;
|
|
return ret;
|
|
};
|
|
imports.wbg.__wbg_performance_2f0ebe3582d821fa = function(arg0) {
|
|
var ret = getObject(arg0).performance;
|
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_localStorage_af1e27404b88ec8d = handleError(function(arg0) {
|
|
var ret = getObject(arg0).localStorage;
|
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
});
|
|
imports.wbg.__wbg_open_31d01f90dab4c8c2 = handleError(function(arg0, arg1, arg2, arg3, arg4) {
|
|
var ret = getObject(arg0).open(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
});
|
|
imports.wbg.__wbg_requestAnimationFrame_e5d576010b9bc3a3 = handleError(function(arg0, arg1) {
|
|
var ret = getObject(arg0).requestAnimationFrame(getObject(arg1));
|
|
return ret;
|
|
});
|
|
imports.wbg.__wbg_body_61c142aa6eae691f = function(arg0) {
|
|
var ret = getObject(arg0).body;
|
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_getElementById_71dfbba1688677b0 = function(arg0, arg1, arg2) {
|
|
var ret = getObject(arg0).getElementById(getStringFromWasm0(arg1, arg2));
|
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_touches_3bba09c13fac01f9 = function(arg0) {
|
|
var ret = getObject(arg0).touches;
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_get_f1a774d2e52b6652 = function(arg0, arg1) {
|
|
var ret = getObject(arg0)[arg1 >>> 0];
|
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_top_e8f71f5ef653b42e = function(arg0) {
|
|
var ret = getObject(arg0).top;
|
|
return ret;
|
|
};
|
|
imports.wbg.__wbg_left_a7ecea598eedc400 = function(arg0) {
|
|
var ret = getObject(arg0).left;
|
|
return ret;
|
|
};
|
|
imports.wbg.__wbg_hash_118e5e08a994d5a7 = handleError(function(arg0, arg1) {
|
|
var ret = getObject(arg1).hash;
|
|
var ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
var len0 = WASM_VECTOR_LEN;
|
|
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
});
|
|
imports.wbg.__wbg_setProperty_4a05a7c81066031f = handleError(function(arg0, arg1, arg2, arg3, arg4) {
|
|
getObject(arg0).setProperty(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
});
|
|
imports.wbg.__wbg_addEventListener_116c561435e7160d = handleError(function(arg0, arg1, arg2, arg3) {
|
|
getObject(arg0).addEventListener(getStringFromWasm0(arg1, arg2), getObject(arg3));
|
|
});
|
|
imports.wbg.__wbg_getItem_cc3eb492f776efb9 = handleError(function(arg0, arg1, arg2, arg3) {
|
|
var ret = getObject(arg1).getItem(getStringFromWasm0(arg2, arg3));
|
|
var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
var len0 = WASM_VECTOR_LEN;
|
|
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
});
|
|
imports.wbg.__wbg_setItem_c183fc6be942b37e = handleError(function(arg0, arg1, arg2, arg3, arg4) {
|
|
getObject(arg0).setItem(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
});
|
|
imports.wbg.__wbg_deltaX_d3527e144ad7b020 = function(arg0) {
|
|
var ret = getObject(arg0).deltaX;
|
|
return ret;
|
|
};
|
|
imports.wbg.__wbg_deltaY_382e72a682f18515 = function(arg0) {
|
|
var ret = getObject(arg0).deltaY;
|
|
return ret;
|
|
};
|
|
imports.wbg.__wbg_getBoundingClientRect_50e5d017dccafca9 = function(arg0) {
|
|
var ret = getObject(arg0).getBoundingClientRect();
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_instanceof_WebGlRenderingContext_b25acea07fa8a767 = function(arg0) {
|
|
var ret = getObject(arg0) instanceof WebGLRenderingContext;
|
|
return ret;
|
|
};
|
|
imports.wbg.__wbg_bufferData_bbb4fad8241073de = function(arg0, arg1, arg2, arg3) {
|
|
getObject(arg0).bufferData(arg1 >>> 0, getObject(arg2), arg3 >>> 0);
|
|
};
|
|
imports.wbg.__wbg_texImage2D_c8fd6a97bf6a7a48 = handleError(function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10) {
|
|
getObject(arg0).texImage2D(arg1 >>> 0, arg2, arg3, arg4, arg5, arg6, arg7 >>> 0, arg8 >>> 0, arg9 === 0 ? undefined : getArrayU8FromWasm0(arg9, arg10));
|
|
});
|
|
imports.wbg.__wbg_activeTexture_85a6cc041d2d1975 = function(arg0, arg1) {
|
|
getObject(arg0).activeTexture(arg1 >>> 0);
|
|
};
|
|
imports.wbg.__wbg_attachShader_d87c96f460f4eb6e = function(arg0, arg1, arg2) {
|
|
getObject(arg0).attachShader(getObject(arg1), getObject(arg2));
|
|
};
|
|
imports.wbg.__wbg_bindBuffer_449cd5290cdcf8fc = function(arg0, arg1, arg2) {
|
|
getObject(arg0).bindBuffer(arg1 >>> 0, getObject(arg2));
|
|
};
|
|
imports.wbg.__wbg_bindTexture_5cb608a16add8d39 = function(arg0, arg1, arg2) {
|
|
getObject(arg0).bindTexture(arg1 >>> 0, getObject(arg2));
|
|
};
|
|
imports.wbg.__wbg_blendFunc_29bd12994d15280b = function(arg0, arg1, arg2) {
|
|
getObject(arg0).blendFunc(arg1 >>> 0, arg2 >>> 0);
|
|
};
|
|
imports.wbg.__wbg_clear_cef7e1e0e1ba5465 = function(arg0, arg1) {
|
|
getObject(arg0).clear(arg1 >>> 0);
|
|
};
|
|
imports.wbg.__wbg_clearColor_1010eed213a6cae8 = function(arg0, arg1, arg2, arg3, arg4) {
|
|
getObject(arg0).clearColor(arg1, arg2, arg3, arg4);
|
|
};
|
|
imports.wbg.__wbg_compileShader_5d4e462508b1515e = function(arg0, arg1) {
|
|
getObject(arg0).compileShader(getObject(arg1));
|
|
};
|
|
imports.wbg.__wbg_createBuffer_e8cf486cca25f5ed = function(arg0) {
|
|
var ret = getObject(arg0).createBuffer();
|
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_createProgram_74d233ba41538562 = function(arg0) {
|
|
var ret = getObject(arg0).createProgram();
|
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_createShader_c35e740afca0efee = function(arg0, arg1) {
|
|
var ret = getObject(arg0).createShader(arg1 >>> 0);
|
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_createTexture_87a93aac65d1db98 = function(arg0) {
|
|
var ret = getObject(arg0).createTexture();
|
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_drawElements_aea82c3e1c9ef971 = function(arg0, arg1, arg2, arg3, arg4) {
|
|
getObject(arg0).drawElements(arg1 >>> 0, arg2, arg3 >>> 0, arg4);
|
|
};
|
|
imports.wbg.__wbg_enable_661b8ab579bd9c69 = function(arg0, arg1) {
|
|
getObject(arg0).enable(arg1 >>> 0);
|
|
};
|
|
imports.wbg.__wbg_enableVertexAttribArray_eda4ec3cc346806e = function(arg0, arg1) {
|
|
getObject(arg0).enableVertexAttribArray(arg1 >>> 0);
|
|
};
|
|
imports.wbg.__wbg_getAttribLocation_2d81461aadc11bf6 = function(arg0, arg1, arg2, arg3) {
|
|
var ret = getObject(arg0).getAttribLocation(getObject(arg1), getStringFromWasm0(arg2, arg3));
|
|
return ret;
|
|
};
|
|
imports.wbg.__wbg_getProgramInfoLog_22b088fe758b29aa = function(arg0, arg1, arg2) {
|
|
var ret = getObject(arg1).getProgramInfoLog(getObject(arg2));
|
|
var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
var len0 = WASM_VECTOR_LEN;
|
|
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
};
|
|
imports.wbg.__wbg_getProgramParameter_328434b297539fba = function(arg0, arg1, arg2) {
|
|
var ret = getObject(arg0).getProgramParameter(getObject(arg1), arg2 >>> 0);
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_getShaderInfoLog_1310dfc6a6714341 = function(arg0, arg1, arg2) {
|
|
var ret = getObject(arg1).getShaderInfoLog(getObject(arg2));
|
|
var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
var len0 = WASM_VECTOR_LEN;
|
|
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
};
|
|
imports.wbg.__wbg_getShaderParameter_c0c9b057b37ad55c = function(arg0, arg1, arg2) {
|
|
var ret = getObject(arg0).getShaderParameter(getObject(arg1), arg2 >>> 0);
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_getUniformLocation_356ed70052165dab = function(arg0, arg1, arg2, arg3) {
|
|
var ret = getObject(arg0).getUniformLocation(getObject(arg1), getStringFromWasm0(arg2, arg3));
|
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_linkProgram_413f1735416682a4 = function(arg0, arg1) {
|
|
getObject(arg0).linkProgram(getObject(arg1));
|
|
};
|
|
imports.wbg.__wbg_scissor_df421e7ad1bf7037 = function(arg0, arg1, arg2, arg3, arg4) {
|
|
getObject(arg0).scissor(arg1, arg2, arg3, arg4);
|
|
};
|
|
imports.wbg.__wbg_shaderSource_e95e88c01a88e78d = function(arg0, arg1, arg2, arg3) {
|
|
getObject(arg0).shaderSource(getObject(arg1), getStringFromWasm0(arg2, arg3));
|
|
};
|
|
imports.wbg.__wbg_texParameteri_8bb94654a8896fcf = function(arg0, arg1, arg2, arg3) {
|
|
getObject(arg0).texParameteri(arg1 >>> 0, arg2 >>> 0, arg3);
|
|
};
|
|
imports.wbg.__wbg_uniform1i_a190be18b9337370 = function(arg0, arg1, arg2) {
|
|
getObject(arg0).uniform1i(getObject(arg1), arg2);
|
|
};
|
|
imports.wbg.__wbg_uniform2f_53184c3924a40f2b = function(arg0, arg1, arg2, arg3) {
|
|
getObject(arg0).uniform2f(getObject(arg1), arg2, arg3);
|
|
};
|
|
imports.wbg.__wbg_useProgram_0172835766dd7682 = function(arg0, arg1) {
|
|
getObject(arg0).useProgram(getObject(arg1));
|
|
};
|
|
imports.wbg.__wbg_vertexAttribPointer_9b02a6534c78223e = function(arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
|
|
getObject(arg0).vertexAttribPointer(arg1 >>> 0, arg2, arg3 >>> 0, arg4 !== 0, arg5, arg6);
|
|
};
|
|
imports.wbg.__wbg_viewport_58b0f8fe573107b8 = function(arg0, arg1, arg2, arg3, arg4) {
|
|
getObject(arg0).viewport(arg1, arg2, arg3, arg4);
|
|
};
|
|
imports.wbg.__wbg_log_61ea781bd002cc41 = function(arg0) {
|
|
console.log(getObject(arg0));
|
|
};
|
|
imports.wbg.__wbg_style_ae2bb40204a83a34 = function(arg0) {
|
|
var ret = getObject(arg0).style;
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_clientX_35a1d3ce225575e1 = function(arg0) {
|
|
var ret = getObject(arg0).clientX;
|
|
return ret;
|
|
};
|
|
imports.wbg.__wbg_clientY_b7871a972b1e0e0b = function(arg0) {
|
|
var ret = getObject(arg0).clientY;
|
|
return ret;
|
|
};
|
|
imports.wbg.__wbg_now_acfa6ea53a7be2c2 = function(arg0) {
|
|
var ret = getObject(arg0).now();
|
|
return ret;
|
|
};
|
|
imports.wbg.__wbg_pageX_7f2df95ed6b1b9c9 = function(arg0) {
|
|
var ret = getObject(arg0).pageX;
|
|
return ret;
|
|
};
|
|
imports.wbg.__wbg_pageY_5219f480b55154b9 = function(arg0) {
|
|
var ret = getObject(arg0).pageY;
|
|
return ret;
|
|
};
|
|
imports.wbg.__wbg_keyCode_d74097d530e093a8 = function(arg0) {
|
|
var ret = getObject(arg0).keyCode;
|
|
return ret;
|
|
};
|
|
imports.wbg.__wbg_isComposing_22c6ccf5670cdabd = function(arg0) {
|
|
var ret = getObject(arg0).isComposing;
|
|
return ret;
|
|
};
|
|
imports.wbg.__wbg_key_0b3d2c7a78af4571 = function(arg0, arg1) {
|
|
var ret = getObject(arg1).key;
|
|
var ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
var len0 = WASM_VECTOR_LEN;
|
|
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
};
|
|
imports.wbg.__wbg_preventDefault_7670dc6ff59bc226 = function(arg0) {
|
|
getObject(arg0).preventDefault();
|
|
};
|
|
imports.wbg.__wbg_stopPropagation_b607ef55ec1122f3 = function(arg0) {
|
|
getObject(arg0).stopPropagation();
|
|
};
|
|
imports.wbg.__wbg_instanceof_HtmlCanvasElement_d2d7786f00856e0a = function(arg0) {
|
|
var ret = getObject(arg0) instanceof HTMLCanvasElement;
|
|
return ret;
|
|
};
|
|
imports.wbg.__wbg_width_175e0a733f9f4219 = function(arg0) {
|
|
var ret = getObject(arg0).width;
|
|
return ret;
|
|
};
|
|
imports.wbg.__wbg_setwidth_8d33dd91eeeee87d = function(arg0, arg1) {
|
|
getObject(arg0).width = arg1 >>> 0;
|
|
};
|
|
imports.wbg.__wbg_height_d91cbd8f64ea6e32 = function(arg0) {
|
|
var ret = getObject(arg0).height;
|
|
return ret;
|
|
};
|
|
imports.wbg.__wbg_setheight_757ff0f25240fd75 = function(arg0, arg1) {
|
|
getObject(arg0).height = arg1 >>> 0;
|
|
};
|
|
imports.wbg.__wbg_getContext_59043a63a2f9266b = handleError(function(arg0, arg1, arg2) {
|
|
var ret = getObject(arg0).getContext(getStringFromWasm0(arg1, arg2));
|
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
});
|
|
imports.wbg.__wbg_call_e9f0ce4da840ab94 = handleError(function(arg0, arg1) {
|
|
var ret = getObject(arg0).call(getObject(arg1));
|
|
return addHeapObject(ret);
|
|
});
|
|
imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
|
|
var ret = getObject(arg0);
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_newnoargs_e2fdfe2af14a2323 = function(arg0, arg1) {
|
|
var ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_getHours_ef46469b3202922c = function(arg0) {
|
|
var ret = getObject(arg0).getHours();
|
|
return ret;
|
|
};
|
|
imports.wbg.__wbg_getMilliseconds_1d3c12e56023176e = function(arg0) {
|
|
var ret = getObject(arg0).getMilliseconds();
|
|
return ret;
|
|
};
|
|
imports.wbg.__wbg_getMinutes_87ad7e8864a7d07b = function(arg0) {
|
|
var ret = getObject(arg0).getMinutes();
|
|
return ret;
|
|
};
|
|
imports.wbg.__wbg_getSeconds_cdc63c960112a33c = function(arg0) {
|
|
var ret = getObject(arg0).getSeconds();
|
|
return ret;
|
|
};
|
|
imports.wbg.__wbg_new0_4e749b4509aef044 = function() {
|
|
var ret = new Date();
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_self_179e8c2a5a4c73a3 = handleError(function() {
|
|
var ret = self.self;
|
|
return addHeapObject(ret);
|
|
});
|
|
imports.wbg.__wbg_window_492cfe63a6e41dfa = handleError(function() {
|
|
var ret = window.window;
|
|
return addHeapObject(ret);
|
|
});
|
|
imports.wbg.__wbg_globalThis_8ebfea75c2dd63ee = handleError(function() {
|
|
var ret = globalThis.globalThis;
|
|
return addHeapObject(ret);
|
|
});
|
|
imports.wbg.__wbg_global_62ea2619f58bf94d = handleError(function() {
|
|
var ret = global.global;
|
|
return addHeapObject(ret);
|
|
});
|
|
imports.wbg.__wbindgen_is_undefined = function(arg0) {
|
|
var ret = getObject(arg0) === undefined;
|
|
return ret;
|
|
};
|
|
imports.wbg.__wbg_buffer_88f603259d7a7b82 = function(arg0) {
|
|
var ret = getObject(arg0).buffer;
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_new_804bff565b62eb7e = function(arg0) {
|
|
var ret = new Int16Array(getObject(arg0));
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_new_85d8a1fc4384acef = function(arg0) {
|
|
var ret = new Uint8Array(getObject(arg0));
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_new_7741b4c15e9a2dbe = function(arg0) {
|
|
var ret = new Uint16Array(getObject(arg0));
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_new_97dfb1e289e6c216 = function(arg0) {
|
|
var ret = new Float32Array(getObject(arg0));
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_subarray_b27643c2accc3833 = function(arg0, arg1, arg2) {
|
|
var ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_subarray_89fb1655f48f0e34 = function(arg0, arg1, arg2) {
|
|
var ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_subarray_296dd44392ec575c = function(arg0, arg1, arg2) {
|
|
var ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_subarray_1a8f82ad8d59d857 = function(arg0, arg1, arg2) {
|
|
var ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_instanceof_Memory_5e6e16eae5893a6b = function(arg0) {
|
|
var ret = getObject(arg0) instanceof WebAssembly.Memory;
|
|
return ret;
|
|
};
|
|
imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
|
|
const obj = getObject(arg1);
|
|
var ret = typeof(obj) === 'number' ? obj : undefined;
|
|
getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
|
|
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
|
};
|
|
imports.wbg.__wbindgen_boolean_get = function(arg0) {
|
|
const v = getObject(arg0);
|
|
var ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
|
|
return ret;
|
|
};
|
|
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
|
var ret = debugString(getObject(arg1));
|
|
var ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
var len0 = WASM_VECTOR_LEN;
|
|
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
};
|
|
imports.wbg.__wbindgen_throw = function(arg0, arg1) {
|
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
};
|
|
imports.wbg.__wbindgen_rethrow = function(arg0) {
|
|
throw takeObject(arg0);
|
|
};
|
|
imports.wbg.__wbindgen_memory = function() {
|
|
var ret = wasm.memory;
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbindgen_closure_wrapper360 = function(arg0, arg1, arg2) {
|
|
var ret = makeMutClosure(arg0, arg1, 73, __wbg_adapter_36);
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbindgen_closure_wrapper363 = function(arg0, arg1, arg2) {
|
|
var ret = makeMutClosure(arg0, arg1, 73, __wbg_adapter_24);
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbindgen_closure_wrapper369 = function(arg0, arg1, arg2) {
|
|
var ret = makeMutClosure(arg0, arg1, 73, __wbg_adapter_39);
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbindgen_closure_wrapper359 = function(arg0, arg1, arg2) {
|
|
var ret = makeMutClosure(arg0, arg1, 73, __wbg_adapter_27);
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbindgen_closure_wrapper367 = function(arg0, arg1, arg2) {
|
|
var ret = makeMutClosure(arg0, arg1, 73, __wbg_adapter_30);
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbindgen_closure_wrapper365 = function(arg0, arg1, arg2) {
|
|
var ret = makeMutClosure(arg0, arg1, 73, __wbg_adapter_33);
|
|
return addHeapObject(ret);
|
|
};
|
|
|
|
if (typeof input === 'string' || (typeof Request === 'function' && input instanceof Request) || (typeof URL === 'function' && input instanceof URL)) {
|
|
input = fetch(input);
|
|
}
|
|
|
|
const { instance, module } = await load(await input, imports);
|
|
|
|
wasm = instance.exports;
|
|
init.__wbindgen_wasm_module = module;
|
|
|
|
return wasm;
|
|
}
|
|
|
|
wasm_bindgen = Object.assign(init, __exports);
|
|
|
|
})();
|
|
|