diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..4f9f940 Binary files /dev/null and b/.DS_Store differ diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..52f896a --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,78 @@ +name: Deploy to GitHub Pages + +on: + push: + branches: [ deploy ] + workflow_dispatch: + +permissions: + contents: write + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 2 # Need history to check for changes + + - name: Check for Rust changes + id: check_changes + run: | + # Check if any Rust files or Cargo.toml have changed + if git diff --name-only HEAD^ HEAD | grep -qE '\.rs$|Cargo.toml|Cargo.lock'; then + echo "rust_changed=true" >> $GITHUB_OUTPUT + else + echo "rust_changed=false" >> $GITHUB_OUTPUT + fi + + - name: Install Rust + if: steps.check_changes.outputs.rust_changed == 'true' + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + target: wasm32-unknown-unknown + override: true + + - name: Install wasm-bindgen-cli + if: steps.check_changes.outputs.rust_changed == 'true' + run: cargo install -f wasm-bindgen-cli --version 0.2.95 + + - name: Create deployment directory + run: mkdir -p dist + + - name: Build WASM + if: steps.check_changes.outputs.rust_changed == 'true' + run: | + cargo build --release --target wasm32-unknown-unknown + wasm-bindgen --out-dir ./dist/out/ --target web ./target/wasm32-unknown-unknown/release/bevy_vaporwave.wasm + + - name: Copy existing WASM files + if: steps.check_changes.outputs.rust_changed == 'false' + run: | + # Get the files from the previous gh-pages build + git fetch origin gh-pages + git checkout origin/gh-pages -- out + cp -r out dist/ + + - name: Copy web files + run: | + cp index.html dist/ + cp styles.css dist/ + cp -r assets dist/ + + - name: List files for debugging + run: | + echo "Deployment directory contents:" + ls -la dist/ + echo "\nOut directory contents:" + ls -la dist/out/ + echo "\nAssets directory contents:" + ls -la dist/assets/ + + - name: Deploy to GitHub Pages + uses: JamesIves/github-pages-deploy-action@v4 + with: + folder: dist + branch: gh-pages + clean: true \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index 30e9112..24b2450 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,6 +12,7 @@ bevy_egui = { version = "0.31.1", default-features = false, features = [ bytemuck = "1.20.0" wasm-bindgen = "0.2.97" +# getrandom = { version = "0.2", features = ["js"] } # bevy = "0.14.2" @@ -24,3 +25,8 @@ opt-level = 1 # Enable a large amount of optimization in the dev profile for dependencies. [profile.dev.package."*"] opt-level = 3 + +# [profile.release] +# opt-level = 'z' +# lto = true +# codegen-units = 1 \ No newline at end of file diff --git a/Trunk.toml b/Trunk.toml new file mode 100644 index 0000000..72a2d79 --- /dev/null +++ b/Trunk.toml @@ -0,0 +1,7 @@ +[build] +public_url = "/" + +[[hooks]] +stage = "build" +command = "cp" +command_arguments = ["-r", "assets", "dist/"] \ No newline at end of file diff --git a/assets/.DS_Store b/assets/.DS_Store new file mode 100644 index 0000000..c7da550 Binary files /dev/null and b/assets/.DS_Store differ diff --git a/assets/shaders/second_pass.wgsl b/assets/shaders/second_pass.wgsl deleted file mode 100644 index 8f69354..0000000 --- a/assets/shaders/second_pass.wgsl +++ /dev/null @@ -1,19 +0,0 @@ -struct Params { - dimensions: u32, - radius: f32, - noise_seed: u32, - noise_scale: f32, - noise_amplitude: f32, -} - -@group(0) @binding(0) var params: Params; -@group(0) @binding(1) var input_texture: texture_storage_2d; -@group(0) @binding(2) var output_texture: texture_storage_2d; - -@compute @workgroup_size(8, 8) -fn main(@builtin(global_invocation_id) global_id: vec3){ - let upos = vec2(i32(global_id.x), i32(global_id.y)); - let value = textureLoad(input_texture, upos); - textureStore(output_texture, upos, vec4(1.0 - value.x, 1.0 - value.y, 1.0 - value.z, value.w)); -} - diff --git a/dist/bevy_compute_shader-581bab24a49e81b0.js b/dist/bevy_compute_shader-581bab24a49e81b0.js new file mode 100644 index 0000000..0928d3a --- /dev/null +++ b/dist/bevy_compute_shader-581bab24a49e81b0.js @@ -0,0 +1,3009 @@ +const lAudioContext = (typeof AudioContext !== 'undefined' ? AudioContext : (typeof webkitAudioContext !== 'undefined' ? webkitAudioContext : undefined)); +let wasm; + +function isLikeNone(x) { + return x === undefined || x === null; +} + +function addToExternrefTable0(obj) { + const idx = wasm.__externref_table_alloc(); + wasm.__wbindgen_export_1.set(idx, obj); + return idx; +} + +const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } ); + +if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); }; + +let cachedUint8ArrayMemory0 = null; + +function getUint8ArrayMemory0() { + if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { + cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); + } + return cachedUint8ArrayMemory0; +} + +function getStringFromWasm0(ptr, len) { + ptr = ptr >>> 0; + return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); +} + +function handleError(f, args) { + try { + return f.apply(this, args); + } catch (e) { + const idx = addToExternrefTable0(e); + wasm.__wbindgen_exn_store(idx); + } +} + +let WASM_VECTOR_LEN = 0; + +const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } ); + +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, 1) >>> 0; + getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf); + WASM_VECTOR_LEN = buf.length; + return ptr; + } + + let len = arg.length; + let ptr = malloc(len, 1) >>> 0; + + const mem = getUint8ArrayMemory0(); + + 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, 1) >>> 0; + const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len); + const ret = encodeString(arg, view); + + offset += ret.written; + ptr = realloc(ptr, len, offset, 1) >>> 0; + } + + WASM_VECTOR_LEN = offset; + return ptr; +} + +let cachedDataViewMemory0 = null; + +function getDataViewMemory0() { + if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) { + cachedDataViewMemory0 = new DataView(wasm.memory.buffer); + } + return cachedDataViewMemory0; +} + +let cachedFloat32ArrayMemory0 = null; + +function getFloat32ArrayMemory0() { + if (cachedFloat32ArrayMemory0 === null || cachedFloat32ArrayMemory0.byteLength === 0) { + cachedFloat32ArrayMemory0 = new Float32Array(wasm.memory.buffer); + } + return cachedFloat32ArrayMemory0; +} + +function getArrayF32FromWasm0(ptr, len) { + ptr = ptr >>> 0; + return getFloat32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len); +} + +let cachedInt32ArrayMemory0 = null; + +function getInt32ArrayMemory0() { + if (cachedInt32ArrayMemory0 === null || cachedInt32ArrayMemory0.byteLength === 0) { + cachedInt32ArrayMemory0 = new Int32Array(wasm.memory.buffer); + } + return cachedInt32ArrayMemory0; +} + +function getArrayI32FromWasm0(ptr, len) { + ptr = ptr >>> 0; + return getInt32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len); +} + +let cachedUint32ArrayMemory0 = null; + +function getUint32ArrayMemory0() { + if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) { + cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer); + } + return cachedUint32ArrayMemory0; +} + +function getArrayU32FromWasm0(ptr, len) { + ptr = ptr >>> 0; + return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len); +} + +let cachedUint8ClampedArrayMemory0 = null; + +function getUint8ClampedArrayMemory0() { + if (cachedUint8ClampedArrayMemory0 === null || cachedUint8ClampedArrayMemory0.byteLength === 0) { + cachedUint8ClampedArrayMemory0 = new Uint8ClampedArray(wasm.memory.buffer); + } + return cachedUint8ClampedArrayMemory0; +} + +function getClampedArrayU8FromWasm0(ptr, len) { + ptr = ptr >>> 0; + return getUint8ClampedArrayMemory0().subarray(ptr / 1, ptr / 1 + len); +} + +const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined') + ? { register: () => {}, unregister: () => {} } + : new FinalizationRegistry(state => { + wasm.__wbindgen_export_6.get(state.dtor)(state.a, state.b) +}); + +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_6.get(state.dtor)(a, state.b); + CLOSURE_DTORS.unregister(state); + } else { + state.a = a; + } + } + }; + real.original = state; + CLOSURE_DTORS.register(real, state, state); + return real; +} + +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 && 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; +} +function __wbg_adapter_36(arg0, arg1, arg2) { + wasm.closure1509_externref_shim(arg0, arg1, arg2); +} + +function __wbg_adapter_45(arg0, arg1, arg2) { + wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h717476af395a9e60(arg0, arg1, isLikeNone(arg2) ? 0 : addToExternrefTable0(arg2)); +} + +function __wbg_adapter_48(arg0, arg1) { + wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__ha88ced90e2b70ad9(arg0, arg1); +} + +function __wbg_adapter_51(arg0, arg1, arg2) { + wasm.closure4281_externref_shim(arg0, arg1, arg2); +} + +function __wbg_adapter_66(arg0, arg1, arg2, arg3) { + wasm.closure4288_externref_shim(arg0, arg1, arg2, arg3); +} + +function __wbg_adapter_71(arg0, arg1) { + wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hf9e3400bf6f8b802(arg0, arg1); +} + +function __wbg_adapter_74(arg0, arg1, arg2) { + wasm.closure92562_externref_shim(arg0, arg1, arg2); +} + +function __wbg_adapter_79(arg0, arg1, arg2) { + wasm.closure100486_externref_shim(arg0, arg1, arg2); +} + +const __wbindgen_enum_GamepadMappingType = ["", "standard"]; + +const __wbindgen_enum_GpuCompilationMessageType = ["error", "warning", "info"]; + +const __wbindgen_enum_GpuDeviceLostReason = ["unknown", "destroyed"]; + +const __wbindgen_enum_GpuErrorFilter = ["validation", "out-of-memory", "internal"]; + +const __wbindgen_enum_GpuIndexFormat = ["uint16", "uint32"]; + +const __wbindgen_enum_GpuTextureFormat = ["r8unorm", "r8snorm", "r8uint", "r8sint", "r16uint", "r16sint", "r16float", "rg8unorm", "rg8snorm", "rg8uint", "rg8sint", "r32uint", "r32sint", "r32float", "rg16uint", "rg16sint", "rg16float", "rgba8unorm", "rgba8unorm-srgb", "rgba8snorm", "rgba8uint", "rgba8sint", "bgra8unorm", "bgra8unorm-srgb", "rgb9e5ufloat", "rgb10a2uint", "rgb10a2unorm", "rg11b10ufloat", "rg32uint", "rg32sint", "rg32float", "rgba16uint", "rgba16sint", "rgba16float", "rgba32uint", "rgba32sint", "rgba32float", "stencil8", "depth16unorm", "depth24plus", "depth24plus-stencil8", "depth32float", "depth32float-stencil8", "bc1-rgba-unorm", "bc1-rgba-unorm-srgb", "bc2-rgba-unorm", "bc2-rgba-unorm-srgb", "bc3-rgba-unorm", "bc3-rgba-unorm-srgb", "bc4-r-unorm", "bc4-r-snorm", "bc5-rg-unorm", "bc5-rg-snorm", "bc6h-rgb-ufloat", "bc6h-rgb-float", "bc7-rgba-unorm", "bc7-rgba-unorm-srgb", "etc2-rgb8unorm", "etc2-rgb8unorm-srgb", "etc2-rgb8a1unorm", "etc2-rgb8a1unorm-srgb", "etc2-rgba8unorm", "etc2-rgba8unorm-srgb", "eac-r11unorm", "eac-r11snorm", "eac-rg11unorm", "eac-rg11snorm", "astc-4x4-unorm", "astc-4x4-unorm-srgb", "astc-5x4-unorm", "astc-5x4-unorm-srgb", "astc-5x5-unorm", "astc-5x5-unorm-srgb", "astc-6x5-unorm", "astc-6x5-unorm-srgb", "astc-6x6-unorm", "astc-6x6-unorm-srgb", "astc-8x5-unorm", "astc-8x5-unorm-srgb", "astc-8x6-unorm", "astc-8x6-unorm-srgb", "astc-8x8-unorm", "astc-8x8-unorm-srgb", "astc-10x5-unorm", "astc-10x5-unorm-srgb", "astc-10x6-unorm", "astc-10x6-unorm-srgb", "astc-10x8-unorm", "astc-10x8-unorm-srgb", "astc-10x10-unorm", "astc-10x10-unorm-srgb", "astc-12x10-unorm", "astc-12x10-unorm-srgb", "astc-12x12-unorm", "astc-12x12-unorm-srgb"]; + +const __wbindgen_enum_PremultiplyAlpha = ["none", "premultiply", "default"]; + +const __wbindgen_enum_ResizeObserverBoxOptions = ["border-box", "content-box", "device-pixel-content-box"]; + +const __wbindgen_enum_VisibilityState = ["hidden", "visible"]; + +async function __wbg_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; + } + } +} + +function __wbg_get_imports() { + const imports = {}; + imports.wbg = {}; + imports.wbg.__wbg_Window_565e23de2b798128 = function(arg0) { + const ret = arg0.Window; + return ret; + }; + imports.wbg.__wbg_Window_96e58b3552ce6bb1 = function(arg0) { + const ret = arg0.Window; + return ret; + }; + imports.wbg.__wbg_Window_cf5b693340a7c469 = function(arg0) { + const ret = arg0.Window; + return ret; + }; + imports.wbg.__wbg_WorkerGlobalScope_354364d1b0bd06e5 = function(arg0) { + const ret = arg0.WorkerGlobalScope; + return ret; + }; + imports.wbg.__wbg_WorkerGlobalScope_c3f6af5fa60d6b9c = function(arg0) { + const ret = arg0.WorkerGlobalScope; + return ret; + }; + imports.wbg.__wbg_abort_19de2f828ee0874a = function(arg0) { + arg0.abort(); + }; + imports.wbg.__wbg_activeElement_d1a1f2b334adf636 = function(arg0) { + const ret = arg0.activeElement; + return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); + }; + imports.wbg.__wbg_activeTexture_24b42b03041f3428 = function(arg0, arg1) { + arg0.activeTexture(arg1 >>> 0); + }; + imports.wbg.__wbg_activeTexture_47928613532be667 = function(arg0, arg1) { + arg0.activeTexture(arg1 >>> 0); + }; + imports.wbg.__wbg_addEventListener_e27053e488770e58 = function() { return handleError(function (arg0, arg1, arg2, arg3) { + arg0.addEventListener(getStringFromWasm0(arg1, arg2), arg3); + }, arguments) }; + imports.wbg.__wbg_addListener_dca1ccc036e24997 = function() { return handleError(function (arg0, arg1) { + arg0.addListener(arg1); + }, arguments) }; + imports.wbg.__wbg_altKey_56dd0987e7ccbbf2 = function(arg0) { + const ret = arg0.altKey; + return ret; + }; + imports.wbg.__wbg_altKey_583c79ba3f4fce1e = function(arg0) { + const ret = arg0.altKey; + return ret; + }; + imports.wbg.__wbg_animate_310f1b8e5b1fdb56 = function(arg0, arg1, arg2) { + const ret = arg0.animate(arg1, arg2); + return ret; + }; + imports.wbg.__wbg_appendChild_805222aed73feea9 = function() { return handleError(function (arg0, arg1) { + const ret = arg0.appendChild(arg1); + return ret; + }, arguments) }; + imports.wbg.__wbg_arrayBuffer_d004045654bdb712 = function() { return handleError(function (arg0) { + const ret = arg0.arrayBuffer(); + return ret; + }, arguments) }; + imports.wbg.__wbg_attachShader_81000b0c4da5b206 = function(arg0, arg1, arg2) { + arg0.attachShader(arg1, arg2); + }; + imports.wbg.__wbg_attachShader_ccc35921e866b2bf = function(arg0, arg1, arg2) { + arg0.attachShader(arg1, arg2); + }; + imports.wbg.__wbg_axes_c6c446b7e173f6d3 = function(arg0) { + const ret = arg0.axes; + return ret; + }; + imports.wbg.__wbg_beginComputePass_90d5303e604970cb = function(arg0, arg1) { + const ret = arg0.beginComputePass(arg1); + return ret; + }; + imports.wbg.__wbg_beginQuery_4e54bbe77706fb3c = function(arg0, arg1, arg2) { + arg0.beginQuery(arg1 >>> 0, arg2); + }; + imports.wbg.__wbg_beginRenderPass_9739520c601001c3 = function(arg0, arg1) { + const ret = arg0.beginRenderPass(arg1); + return ret; + }; + imports.wbg.__wbg_bindAttribLocation_a08ae4fdf9b16e7d = function(arg0, arg1, arg2, arg3, arg4) { + arg0.bindAttribLocation(arg1, arg2 >>> 0, getStringFromWasm0(arg3, arg4)); + }; + imports.wbg.__wbg_bindAttribLocation_b53db53e1b134420 = function(arg0, arg1, arg2, arg3, arg4) { + arg0.bindAttribLocation(arg1, arg2 >>> 0, getStringFromWasm0(arg3, arg4)); + }; + imports.wbg.__wbg_bindBufferRange_ce5a2827ed937112 = function(arg0, arg1, arg2, arg3, arg4, arg5) { + arg0.bindBufferRange(arg1 >>> 0, arg2 >>> 0, arg3, arg4, arg5); + }; + imports.wbg.__wbg_bindBuffer_0fedb16582ffeee6 = function(arg0, arg1, arg2) { + arg0.bindBuffer(arg1 >>> 0, arg2); + }; + imports.wbg.__wbg_bindBuffer_c6e5f29d60e90c01 = function(arg0, arg1, arg2) { + arg0.bindBuffer(arg1 >>> 0, arg2); + }; + imports.wbg.__wbg_bindFramebuffer_87e15614ca3e9537 = function(arg0, arg1, arg2) { + arg0.bindFramebuffer(arg1 >>> 0, arg2); + }; + imports.wbg.__wbg_bindFramebuffer_a0d602bd474dcbfb = function(arg0, arg1, arg2) { + arg0.bindFramebuffer(arg1 >>> 0, arg2); + }; + imports.wbg.__wbg_bindRenderbuffer_3100396894cc2d72 = function(arg0, arg1, arg2) { + arg0.bindRenderbuffer(arg1 >>> 0, arg2); + }; + imports.wbg.__wbg_bindRenderbuffer_fd3e47dad76906ea = function(arg0, arg1, arg2) { + arg0.bindRenderbuffer(arg1 >>> 0, arg2); + }; + imports.wbg.__wbg_bindSampler_7614054a94f8e3d1 = function(arg0, arg1, arg2) { + arg0.bindSampler(arg1 >>> 0, arg2); + }; + imports.wbg.__wbg_bindTexture_6478edbb238b9c73 = function(arg0, arg1, arg2) { + arg0.bindTexture(arg1 >>> 0, arg2); + }; + imports.wbg.__wbg_bindTexture_9b177c97248ed4d9 = function(arg0, arg1, arg2) { + arg0.bindTexture(arg1 >>> 0, arg2); + }; + imports.wbg.__wbg_bindVertexArrayOES_e81fca007d08d0db = function(arg0, arg1) { + arg0.bindVertexArrayOES(arg1); + }; + imports.wbg.__wbg_bindVertexArray_d9082254ff3bcc13 = function(arg0, arg1) { + arg0.bindVertexArray(arg1); + }; + imports.wbg.__wbg_blendColor_075aa544f1fe84c5 = function(arg0, arg1, arg2, arg3, arg4) { + arg0.blendColor(arg1, arg2, arg3, arg4); + }; + imports.wbg.__wbg_blendColor_ed292080d5966f2c = function(arg0, arg1, arg2, arg3, arg4) { + arg0.blendColor(arg1, arg2, arg3, arg4); + }; + imports.wbg.__wbg_blendEquationSeparate_3dbbe20b0a9fa818 = function(arg0, arg1, arg2) { + arg0.blendEquationSeparate(arg1 >>> 0, arg2 >>> 0); + }; + imports.wbg.__wbg_blendEquationSeparate_d360393d3b1557cd = function(arg0, arg1, arg2) { + arg0.blendEquationSeparate(arg1 >>> 0, arg2 >>> 0); + }; + imports.wbg.__wbg_blendEquation_41f4ed79f5ddd25c = function(arg0, arg1) { + arg0.blendEquation(arg1 >>> 0); + }; + imports.wbg.__wbg_blendEquation_8804e10c9ced3fc4 = function(arg0, arg1) { + arg0.blendEquation(arg1 >>> 0); + }; + imports.wbg.__wbg_blendFuncSeparate_2cc7ac2397290a15 = function(arg0, arg1, arg2, arg3, arg4) { + arg0.blendFuncSeparate(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0, arg4 >>> 0); + }; + imports.wbg.__wbg_blendFuncSeparate_c6c035b0094bd58f = function(arg0, arg1, arg2, arg3, arg4) { + arg0.blendFuncSeparate(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0, arg4 >>> 0); + }; + imports.wbg.__wbg_blendFunc_63aca14ff3252b59 = function(arg0, arg1, arg2) { + arg0.blendFunc(arg1 >>> 0, arg2 >>> 0); + }; + imports.wbg.__wbg_blendFunc_8e1cfba50a4eea89 = function(arg0, arg1, arg2) { + arg0.blendFunc(arg1 >>> 0, arg2 >>> 0); + }; + imports.wbg.__wbg_blitFramebuffer_171b9355e4e730c9 = function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10) { + arg0.blitFramebuffer(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9 >>> 0, arg10 >>> 0); + }; + imports.wbg.__wbg_blockSize_e0006fb003814895 = function(arg0) { + const ret = arg0.blockSize; + return ret; + }; + imports.wbg.__wbg_blur_5de3b295415a90b1 = function() { return handleError(function (arg0) { + arg0.blur(); + }, arguments) }; + imports.wbg.__wbg_body_83d4bc4961a422aa = function(arg0) { + const ret = arg0.body; + return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); + }; + imports.wbg.__wbg_brand_67e4f3d950154d0a = function(arg0, arg1) { + const ret = arg1.brand; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); + getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); + }; + imports.wbg.__wbg_brands_1ec54d613da9db02 = function(arg0) { + const ret = arg0.brands; + return ret; + }; + imports.wbg.__wbg_bufferData_2a747a2c2c3b23b5 = function(arg0, arg1, arg2, arg3) { + arg0.bufferData(arg1 >>> 0, arg2, arg3 >>> 0); + }; + imports.wbg.__wbg_bufferData_5b85d77150f6520a = function(arg0, arg1, arg2, arg3) { + arg0.bufferData(arg1 >>> 0, arg2, arg3 >>> 0); + }; + imports.wbg.__wbg_bufferData_b03654fb80052afe = function(arg0, arg1, arg2, arg3) { + arg0.bufferData(arg1 >>> 0, arg2, arg3 >>> 0); + }; + imports.wbg.__wbg_bufferData_c2eb7dbb2ea2ab3f = function(arg0, arg1, arg2, arg3) { + arg0.bufferData(arg1 >>> 0, arg2, arg3 >>> 0); + }; + imports.wbg.__wbg_bufferSubData_8a7d35c05111a120 = function(arg0, arg1, arg2, arg3) { + arg0.bufferSubData(arg1 >>> 0, arg2, arg3); + }; + imports.wbg.__wbg_bufferSubData_c4b11388b9eb4175 = function(arg0, arg1, arg2, arg3) { + arg0.bufferSubData(arg1 >>> 0, arg2, arg3); + }; + imports.wbg.__wbg_buffer_6e1d53ff183194fc = function(arg0) { + const ret = arg0.buffer; + return ret; + }; + imports.wbg.__wbg_buffer_ffdeb2ee67420f9e = function(arg0) { + const ret = arg0.buffer; + return ret; + }; + imports.wbg.__wbg_button_db48f93638c59f95 = function(arg0) { + const ret = arg0.button; + return ret; + }; + imports.wbg.__wbg_buttons_b407b60825e41ed2 = function(arg0) { + const ret = arg0.buttons; + return ret; + }; + imports.wbg.__wbg_buttons_b962d6dc116cd1a5 = function(arg0) { + const ret = arg0.buttons; + return ret; + }; + imports.wbg.__wbg_call_0411c0c3c424db9a = function() { return handleError(function (arg0, arg1, arg2) { + const ret = arg0.call(arg1, arg2); + return ret; + }, arguments) }; + imports.wbg.__wbg_call_3114932863209ca6 = function() { return handleError(function (arg0, arg1) { + const ret = arg0.call(arg1); + return ret; + }, arguments) }; + imports.wbg.__wbg_cancelAnimationFrame_f1ad512e269ea165 = function() { return handleError(function (arg0, arg1) { + arg0.cancelAnimationFrame(arg1); + }, arguments) }; + imports.wbg.__wbg_cancelIdleCallback_bcc2dc9be9de0744 = function(arg0, arg1) { + arg0.cancelIdleCallback(arg1 >>> 0); + }; + imports.wbg.__wbg_cancel_3b69067dcdf7ffb7 = function(arg0) { + arg0.cancel(); + }; + imports.wbg.__wbg_catch_9da7d002aa356f1d = function(arg0, arg1) { + const ret = arg0.catch(arg1); + return ret; + }; + imports.wbg.__wbg_clearBuffer_6164fc25d22b25cc = function(arg0, arg1, arg2, arg3) { + arg0.clearBuffer(arg1, arg2, arg3); + }; + imports.wbg.__wbg_clearBuffer_cfcaaf1fb2baa885 = function(arg0, arg1, arg2) { + arg0.clearBuffer(arg1, arg2); + }; + imports.wbg.__wbg_clearBufferfv_2cf04e18ef87ed90 = function(arg0, arg1, arg2, arg3, arg4) { + arg0.clearBufferfv(arg1 >>> 0, arg2, getArrayF32FromWasm0(arg3, arg4)); + }; + imports.wbg.__wbg_clearBufferiv_b45be02e57957dad = function(arg0, arg1, arg2, arg3, arg4) { + arg0.clearBufferiv(arg1 >>> 0, arg2, getArrayI32FromWasm0(arg3, arg4)); + }; + imports.wbg.__wbg_clearBufferuiv_deca83038abb23d2 = function(arg0, arg1, arg2, arg3, arg4) { + arg0.clearBufferuiv(arg1 >>> 0, arg2, getArrayU32FromWasm0(arg3, arg4)); + }; + imports.wbg.__wbg_clearDepth_14d34daa30215440 = function(arg0, arg1) { + arg0.clearDepth(arg1); + }; + imports.wbg.__wbg_clearDepth_1cdcb08d8a5afa49 = function(arg0, arg1) { + arg0.clearDepth(arg1); + }; + imports.wbg.__wbg_clearStencil_e2c8b1892d5e033d = function(arg0, arg1) { + arg0.clearStencil(arg1); + }; + imports.wbg.__wbg_clearStencil_f3138d2e338d1436 = function(arg0, arg1) { + arg0.clearStencil(arg1); + }; + imports.wbg.__wbg_clearTimeout_da4408c46e51bc7a = function(arg0, arg1) { + arg0.clearTimeout(arg1); + }; + imports.wbg.__wbg_clear_4e68091e616c29ad = function(arg0, arg1) { + arg0.clear(arg1 >>> 0); + }; + imports.wbg.__wbg_clear_af7641961d766f51 = function(arg0, arg1) { + arg0.clear(arg1 >>> 0); + }; + imports.wbg.__wbg_clientWaitSync_2c4c0bd3a8d3536b = function(arg0, arg1, arg2, arg3) { + const ret = arg0.clientWaitSync(arg1, arg2 >>> 0, arg3 >>> 0); + return ret; + }; + imports.wbg.__wbg_close_18f7f59ca0e610c6 = function() { return handleError(function (arg0) { + const ret = arg0.close(); + return ret; + }, arguments) }; + imports.wbg.__wbg_close_35d643897b189a00 = function(arg0) { + arg0.close(); + }; + imports.wbg.__wbg_code_d8226b2133366406 = function(arg0, arg1) { + const ret = arg1.code; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); + getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); + }; + imports.wbg.__wbg_colorMask_22d850d91e89df9f = function(arg0, arg1, arg2, arg3, arg4) { + arg0.colorMask(arg1 !== 0, arg2 !== 0, arg3 !== 0, arg4 !== 0); + }; + imports.wbg.__wbg_colorMask_a6068fae89c17ceb = function(arg0, arg1, arg2, arg3, arg4) { + arg0.colorMask(arg1 !== 0, arg2 !== 0, arg3 !== 0, arg4 !== 0); + }; + imports.wbg.__wbg_compileShader_5e41ecd397194c21 = function(arg0, arg1) { + arg0.compileShader(arg1); + }; + imports.wbg.__wbg_compileShader_6868fa6a842f0911 = function(arg0, arg1) { + arg0.compileShader(arg1); + }; + imports.wbg.__wbg_compressedTexSubImage2D_216f6eec167da8d7 = function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) { + arg0.compressedTexSubImage2D(arg1 >>> 0, arg2, arg3, arg4, arg5, arg6, arg7 >>> 0, arg8); + }; + imports.wbg.__wbg_compressedTexSubImage2D_4b50d2a94bf4ea60 = function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) { + arg0.compressedTexSubImage2D(arg1 >>> 0, arg2, arg3, arg4, arg5, arg6, arg7 >>> 0, arg8, arg9); + }; + imports.wbg.__wbg_compressedTexSubImage2D_9b0c2c785026006a = function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) { + arg0.compressedTexSubImage2D(arg1 >>> 0, arg2, arg3, arg4, arg5, arg6, arg7 >>> 0, arg8); + }; + imports.wbg.__wbg_compressedTexSubImage3D_8102ea4403fef5ce = function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10) { + arg0.compressedTexSubImage3D(arg1 >>> 0, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9 >>> 0, arg10); + }; + imports.wbg.__wbg_compressedTexSubImage3D_bf2bdb940e26bc8c = function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11) { + arg0.compressedTexSubImage3D(arg1 >>> 0, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9 >>> 0, arg10, arg11); + }; + imports.wbg.__wbg_configure_2414aed971d368cd = function(arg0, arg1) { + arg0.configure(arg1); + }; + imports.wbg.__wbg_connect_7142da86ecc640ca = function() { return handleError(function (arg0, arg1) { + const ret = arg0.connect(arg1); + return ret; + }, arguments) }; + imports.wbg.__wbg_connected_31103f68eeb207c8 = function(arg0) { + const ret = arg0.connected; + return ret; + }; + imports.wbg.__wbg_contains_6947e163e2a3c092 = function(arg0, arg1) { + const ret = arg0.contains(arg1); + return ret; + }; + imports.wbg.__wbg_contentRect_7aaa87e16fd2882d = function(arg0) { + const ret = arg0.contentRect; + return ret; + }; + imports.wbg.__wbg_copyBufferSubData_ff213d67aa3b1f82 = function(arg0, arg1, arg2, arg3, arg4, arg5) { + arg0.copyBufferSubData(arg1 >>> 0, arg2 >>> 0, arg3, arg4, arg5); + }; + imports.wbg.__wbg_copyBufferToBuffer_1ba67191114656a1 = function(arg0, arg1, arg2, arg3, arg4, arg5) { + arg0.copyBufferToBuffer(arg1, arg2, arg3, arg4, arg5); + }; + imports.wbg.__wbg_copyBufferToTexture_878d31d479e48f28 = function(arg0, arg1, arg2, arg3) { + arg0.copyBufferToTexture(arg1, arg2, arg3); + }; + imports.wbg.__wbg_copyExternalImageToTexture_7878d196c0b60d39 = function(arg0, arg1, arg2, arg3) { + arg0.copyExternalImageToTexture(arg1, arg2, arg3); + }; + imports.wbg.__wbg_copyTexSubImage2D_4b37e79c31b798b1 = function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) { + arg0.copyTexSubImage2D(arg1 >>> 0, arg2, arg3, arg4, arg5, arg6, arg7, arg8); + }; + imports.wbg.__wbg_copyTexSubImage2D_a29106dfb31dd17c = function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) { + arg0.copyTexSubImage2D(arg1 >>> 0, arg2, arg3, arg4, arg5, arg6, arg7, arg8); + }; + imports.wbg.__wbg_copyTexSubImage3D_f8350e268c143688 = function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) { + arg0.copyTexSubImage3D(arg1 >>> 0, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); + }; + imports.wbg.__wbg_copyTextureToBuffer_6a8fe0e90f0a663d = function(arg0, arg1, arg2, arg3) { + arg0.copyTextureToBuffer(arg1, arg2, arg3); + }; + imports.wbg.__wbg_copyTextureToTexture_0a06a393d6726b4a = function(arg0, arg1, arg2, arg3) { + arg0.copyTextureToTexture(arg1, arg2, arg3); + }; + imports.wbg.__wbg_copyToChannel_6155b9e03a0dd40e = function() { return handleError(function (arg0, arg1, arg2, arg3) { + arg0.copyToChannel(getArrayF32FromWasm0(arg1, arg2), arg3); + }, arguments) }; + imports.wbg.__wbg_createBindGroupLayout_1d93b6d41c87ba9d = function(arg0, arg1) { + const ret = arg0.createBindGroupLayout(arg1); + return ret; + }; + imports.wbg.__wbg_createBindGroup_61cd07ec9d423432 = function(arg0, arg1) { + const ret = arg0.createBindGroup(arg1); + return ret; + }; + imports.wbg.__wbg_createBufferSource_9c2e3ab129bbf2c7 = function() { return handleError(function (arg0) { + const ret = arg0.createBufferSource(); + return ret; + }, arguments) }; + imports.wbg.__wbg_createBuffer_1e646d14cebbb438 = function(arg0) { + const ret = arg0.createBuffer(); + return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); + }; + imports.wbg.__wbg_createBuffer_2a696fb8c0d07970 = function(arg0) { + const ret = arg0.createBuffer(); + return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); + }; + imports.wbg.__wbg_createBuffer_5d8dc91119848920 = function() { return handleError(function (arg0, arg1, arg2, arg3) { + const ret = arg0.createBuffer(arg1 >>> 0, arg2 >>> 0, arg3); + return ret; + }, arguments) }; + imports.wbg.__wbg_createBuffer_963aa00d5fe859e4 = function(arg0, arg1) { + const ret = arg0.createBuffer(arg1); + return ret; + }; + imports.wbg.__wbg_createCommandEncoder_f0e1613e9a2dc1eb = function(arg0, arg1) { + const ret = arg0.createCommandEncoder(arg1); + return ret; + }; + imports.wbg.__wbg_createComputePipeline_b9616b9fe2f4eb2f = function(arg0, arg1) { + const ret = arg0.createComputePipeline(arg1); + return ret; + }; + imports.wbg.__wbg_createElement_22b48bfb31a0c20e = function() { return handleError(function (arg0, arg1, arg2) { + const ret = arg0.createElement(getStringFromWasm0(arg1, arg2)); + return ret; + }, arguments) }; + imports.wbg.__wbg_createFramebuffer_163e192e1e53ec9b = function(arg0) { + const ret = arg0.createFramebuffer(); + return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); + }; + imports.wbg.__wbg_createFramebuffer_1aa54479f7524ef5 = function(arg0) { + const ret = arg0.createFramebuffer(); + return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); + }; + imports.wbg.__wbg_createImageBitmap_044c6989f0cc1a8f = function() { return handleError(function (arg0, arg1, arg2) { + const ret = arg0.createImageBitmap(arg1, arg2); + return ret; + }, arguments) }; + imports.wbg.__wbg_createObjectURL_06505af3e8787cc8 = function() { return handleError(function (arg0, arg1) { + const ret = URL.createObjectURL(arg1); + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); + getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); + }, arguments) }; + imports.wbg.__wbg_createPipelineLayout_56c6cf983f892d2b = function(arg0, arg1) { + const ret = arg0.createPipelineLayout(arg1); + return ret; + }; + imports.wbg.__wbg_createProgram_5a5a92d23fdc2f1a = function(arg0) { + const ret = arg0.createProgram(); + return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); + }; + imports.wbg.__wbg_createProgram_b75025f0f1a4ef55 = function(arg0) { + const ret = arg0.createProgram(); + return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); + }; + imports.wbg.__wbg_createQuerySet_c14be802adf7c207 = function(arg0, arg1) { + const ret = arg0.createQuerySet(arg1); + return ret; + }; + imports.wbg.__wbg_createQuery_2816e95a473b5501 = function(arg0) { + const ret = arg0.createQuery(); + return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); + }; + imports.wbg.__wbg_createRenderBundleEncoder_8e4bdffea72f8c1f = function(arg0, arg1) { + const ret = arg0.createRenderBundleEncoder(arg1); + return ret; + }; + imports.wbg.__wbg_createRenderPipeline_079a88a0601fcce1 = function(arg0, arg1) { + const ret = arg0.createRenderPipeline(arg1); + return ret; + }; + imports.wbg.__wbg_createRenderbuffer_29e130c03bc689d3 = function(arg0) { + const ret = arg0.createRenderbuffer(); + return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); + }; + imports.wbg.__wbg_createRenderbuffer_b10004ae18d38014 = function(arg0) { + const ret = arg0.createRenderbuffer(); + return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); + }; + imports.wbg.__wbg_createSampler_50ae7c4dd1f9b066 = function(arg0) { + const ret = arg0.createSampler(); + return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); + }; + imports.wbg.__wbg_createSampler_ef5578990df3baf7 = function(arg0, arg1) { + const ret = arg0.createSampler(arg1); + return ret; + }; + imports.wbg.__wbg_createShaderModule_17f451ea25cae47c = function(arg0, arg1) { + const ret = arg0.createShaderModule(arg1); + return ret; + }; + imports.wbg.__wbg_createShader_29c8e06db7e7211f = function(arg0, arg1) { + const ret = arg0.createShader(arg1 >>> 0); + return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); + }; + imports.wbg.__wbg_createShader_8c3053457f874cdd = function(arg0, arg1) { + const ret = arg0.createShader(arg1 >>> 0); + return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); + }; + imports.wbg.__wbg_createTexture_01cc1cd2fea732d9 = function(arg0, arg1) { + const ret = arg0.createTexture(arg1); + return ret; + }; + imports.wbg.__wbg_createTexture_20f63b261993f581 = function(arg0) { + const ret = arg0.createTexture(); + return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); + }; + imports.wbg.__wbg_createTexture_facd2df68d8d0276 = function(arg0) { + const ret = arg0.createTexture(); + return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); + }; + imports.wbg.__wbg_createVertexArrayOES_89f45f4a4fde395f = function(arg0) { + const ret = arg0.createVertexArrayOES(); + return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); + }; + imports.wbg.__wbg_createVertexArray_70d7c4c62e00613d = function(arg0) { + const ret = arg0.createVertexArray(); + return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); + }; + imports.wbg.__wbg_createView_04701884291e1ccc = function(arg0, arg1) { + const ret = arg0.createView(arg1); + return ret; + }; + imports.wbg.__wbg_crypto_ed58b8e10a292839 = function(arg0) { + const ret = arg0.crypto; + return ret; + }; + imports.wbg.__wbg_ctrlKey_60b29e015a543678 = function(arg0) { + const ret = arg0.ctrlKey; + return ret; + }; + imports.wbg.__wbg_ctrlKey_ab341328ab202d37 = function(arg0) { + const ret = arg0.ctrlKey; + return ret; + }; + imports.wbg.__wbg_cullFace_96a9dca4a5b1ca33 = function(arg0, arg1) { + arg0.cullFace(arg1 >>> 0); + }; + imports.wbg.__wbg_cullFace_99bb4e31c974596d = function(arg0, arg1) { + arg0.cullFace(arg1 >>> 0); + }; + imports.wbg.__wbg_currentTime_79a333b84b98fa11 = function(arg0) { + const ret = arg0.currentTime; + return ret; + }; + imports.wbg.__wbg_data_955678973a75e5ba = function(arg0, arg1) { + const ret = arg1.data; + var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len1 = WASM_VECTOR_LEN; + getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); + getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); + }; + imports.wbg.__wbg_decode_7ef66dc49d35395b = function(arg0) { + const ret = arg0.decode(); + return ret; + }; + imports.wbg.__wbg_deleteBuffer_9d705222a7e77a7b = function(arg0, arg1) { + arg0.deleteBuffer(arg1); + }; + imports.wbg.__wbg_deleteBuffer_db0d7ecbaa97fa56 = function(arg0, arg1) { + arg0.deleteBuffer(arg1); + }; + imports.wbg.__wbg_deleteFramebuffer_69db238ea6b8a9a1 = function(arg0, arg1) { + arg0.deleteFramebuffer(arg1); + }; + imports.wbg.__wbg_deleteFramebuffer_ecf398bec452aaf9 = function(arg0, arg1) { + arg0.deleteFramebuffer(arg1); + }; + imports.wbg.__wbg_deleteProgram_cb18e0020d488bad = function(arg0, arg1) { + arg0.deleteProgram(arg1); + }; + imports.wbg.__wbg_deleteProgram_e1a6c4b922e202e3 = function(arg0, arg1) { + arg0.deleteProgram(arg1); + }; + imports.wbg.__wbg_deleteQuery_e083394da1710d6c = function(arg0, arg1) { + arg0.deleteQuery(arg1); + }; + imports.wbg.__wbg_deleteRenderbuffer_05fa7f35ea76cafd = function(arg0, arg1) { + arg0.deleteRenderbuffer(arg1); + }; + imports.wbg.__wbg_deleteRenderbuffer_2f1216e54aa2f248 = function(arg0, arg1) { + arg0.deleteRenderbuffer(arg1); + }; + imports.wbg.__wbg_deleteSampler_e5c61c85993f9a69 = function(arg0, arg1) { + arg0.deleteSampler(arg1); + }; + imports.wbg.__wbg_deleteShader_257caf93b24ac555 = function(arg0, arg1) { + arg0.deleteShader(arg1); + }; + imports.wbg.__wbg_deleteShader_fb86028e46cb069b = function(arg0, arg1) { + arg0.deleteShader(arg1); + }; + imports.wbg.__wbg_deleteSync_b5caedf06185d972 = function(arg0, arg1) { + arg0.deleteSync(arg1); + }; + imports.wbg.__wbg_deleteTexture_6913f682a09c8171 = function(arg0, arg1) { + arg0.deleteTexture(arg1); + }; + imports.wbg.__wbg_deleteTexture_a29655740b1cbe33 = function(arg0, arg1) { + arg0.deleteTexture(arg1); + }; + imports.wbg.__wbg_deleteVertexArrayOES_2def7ce37f8e89f2 = function(arg0, arg1) { + arg0.deleteVertexArrayOES(arg1); + }; + imports.wbg.__wbg_deleteVertexArray_a3bca8e15204ffed = function(arg0, arg1) { + arg0.deleteVertexArray(arg1); + }; + imports.wbg.__wbg_deltaMode_a4cc321212f87817 = function(arg0) { + const ret = arg0.deltaMode; + return ret; + }; + imports.wbg.__wbg_deltaX_27e2939a1af8c940 = function(arg0) { + const ret = arg0.deltaX; + return ret; + }; + imports.wbg.__wbg_deltaY_4bb52a4f0a7ad28b = function(arg0) { + const ret = arg0.deltaY; + return ret; + }; + imports.wbg.__wbg_depthFunc_657dd592930e7f2f = function(arg0, arg1) { + arg0.depthFunc(arg1 >>> 0); + }; + imports.wbg.__wbg_depthFunc_f9fd44a07ea8398e = function(arg0, arg1) { + arg0.depthFunc(arg1 >>> 0); + }; + imports.wbg.__wbg_depthMask_87195357e4f7df17 = function(arg0, arg1) { + arg0.depthMask(arg1 !== 0); + }; + imports.wbg.__wbg_depthMask_bac7f6b455b6ddeb = function(arg0, arg1) { + arg0.depthMask(arg1 !== 0); + }; + imports.wbg.__wbg_depthRange_d947e824a28dc9a1 = function(arg0, arg1, arg2) { + arg0.depthRange(arg1, arg2); + }; + imports.wbg.__wbg_depthRange_f71c79182f666e45 = function(arg0, arg1, arg2) { + arg0.depthRange(arg1, arg2); + }; + imports.wbg.__wbg_destination_65078518eae2eca5 = function(arg0) { + const ret = arg0.destination; + return ret; + }; + imports.wbg.__wbg_destroy_35f94012e5bb9c17 = function(arg0) { + arg0.destroy(); + }; + imports.wbg.__wbg_destroy_767d9dde1008e293 = function(arg0) { + arg0.destroy(); + }; + imports.wbg.__wbg_destroy_c6af4226dda95dbd = function(arg0) { + arg0.destroy(); + }; + imports.wbg.__wbg_devicePixelContentBoxSize_1ea2c6145730b8c0 = function(arg0) { + const ret = arg0.devicePixelContentBoxSize; + return ret; + }; + imports.wbg.__wbg_devicePixelRatio_f4eb7cbe3a812de0 = function(arg0) { + const ret = arg0.devicePixelRatio; + return ret; + }; + imports.wbg.__wbg_disableVertexAttribArray_c513f1fff3cb73f2 = function(arg0, arg1) { + arg0.disableVertexAttribArray(arg1 >>> 0); + }; + imports.wbg.__wbg_disableVertexAttribArray_e7ff41dc0c3eaf1f = function(arg0, arg1) { + arg0.disableVertexAttribArray(arg1 >>> 0); + }; + imports.wbg.__wbg_disable_4c1cedffa6646166 = function(arg0, arg1) { + arg0.disable(arg1 >>> 0); + }; + imports.wbg.__wbg_disable_5320561e5cb15f08 = function(arg0, arg1) { + arg0.disable(arg1 >>> 0); + }; + imports.wbg.__wbg_disconnect_8b7c928b6057719b = function(arg0) { + arg0.disconnect(); + }; + imports.wbg.__wbg_disconnect_c45e8044053eddf3 = function(arg0) { + arg0.disconnect(); + }; + imports.wbg.__wbg_dispatchWorkgroupsIndirect_8b25efab93a7a433 = function(arg0, arg1, arg2) { + arg0.dispatchWorkgroupsIndirect(arg1, arg2); + }; + imports.wbg.__wbg_dispatchWorkgroups_c102fa81b955935d = function(arg0, arg1, arg2, arg3) { + arg0.dispatchWorkgroups(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0); + }; + imports.wbg.__wbg_document_c488ca7509cc6938 = function(arg0) { + const ret = arg0.document; + return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); + }; + imports.wbg.__wbg_drawArraysInstancedANGLE_55c83db2758c6ab4 = function(arg0, arg1, arg2, arg3, arg4) { + arg0.drawArraysInstancedANGLE(arg1 >>> 0, arg2, arg3, arg4); + }; + imports.wbg.__wbg_drawArraysInstanced_11f863da4daf24d0 = function(arg0, arg1, arg2, arg3, arg4) { + arg0.drawArraysInstanced(arg1 >>> 0, arg2, arg3, arg4); + }; + imports.wbg.__wbg_drawArrays_87e9bb0e2fb3e0fa = function(arg0, arg1, arg2, arg3) { + arg0.drawArrays(arg1 >>> 0, arg2, arg3); + }; + imports.wbg.__wbg_drawArrays_f5b0f0a0dc392c3f = function(arg0, arg1, arg2, arg3) { + arg0.drawArrays(arg1 >>> 0, arg2, arg3); + }; + imports.wbg.__wbg_drawBuffersWEBGL_22730193cdce9696 = function(arg0, arg1) { + arg0.drawBuffersWEBGL(arg1); + }; + imports.wbg.__wbg_drawBuffers_f256d529aecd01f2 = function(arg0, arg1) { + arg0.drawBuffers(arg1); + }; + imports.wbg.__wbg_drawElementsInstancedANGLE_db0bafff77affb0d = function(arg0, arg1, arg2, arg3, arg4, arg5) { + arg0.drawElementsInstancedANGLE(arg1 >>> 0, arg2, arg3 >>> 0, arg4, arg5); + }; + imports.wbg.__wbg_drawElementsInstanced_e87f1c69165df984 = function(arg0, arg1, arg2, arg3, arg4, arg5) { + arg0.drawElementsInstanced(arg1 >>> 0, arg2, arg3 >>> 0, arg4, arg5); + }; + imports.wbg.__wbg_drawIndexedIndirect_34484fc6227c7bc8 = function(arg0, arg1, arg2) { + arg0.drawIndexedIndirect(arg1, arg2); + }; + imports.wbg.__wbg_drawIndexedIndirect_5a7c30bb5f1d5b67 = function(arg0, arg1, arg2) { + arg0.drawIndexedIndirect(arg1, arg2); + }; + imports.wbg.__wbg_drawIndexed_115af1449b52a948 = function(arg0, arg1, arg2, arg3, arg4, arg5) { + arg0.drawIndexed(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0, arg4, arg5 >>> 0); + }; + imports.wbg.__wbg_drawIndexed_a587cce4c317791f = function(arg0, arg1, arg2, arg3, arg4, arg5) { + arg0.drawIndexed(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0, arg4, arg5 >>> 0); + }; + imports.wbg.__wbg_drawIndirect_036d71498a21f1a3 = function(arg0, arg1, arg2) { + arg0.drawIndirect(arg1, arg2); + }; + imports.wbg.__wbg_drawIndirect_a1d7c5e893aa5756 = function(arg0, arg1, arg2) { + arg0.drawIndirect(arg1, arg2); + }; + imports.wbg.__wbg_draw_5351b12033166aca = function(arg0, arg1, arg2, arg3, arg4) { + arg0.draw(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0, arg4 >>> 0); + }; + imports.wbg.__wbg_draw_e2a7c5d66fb2d244 = function(arg0, arg1, arg2, arg3, arg4) { + arg0.draw(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0, arg4 >>> 0); + }; + imports.wbg.__wbg_enableVertexAttribArray_0ce3052ae5f3f84a = function(arg0, arg1) { + arg0.enableVertexAttribArray(arg1 >>> 0); + }; + imports.wbg.__wbg_enableVertexAttribArray_2bb681a583bf0dbe = function(arg0, arg1) { + arg0.enableVertexAttribArray(arg1 >>> 0); + }; + imports.wbg.__wbg_enable_8d6ea7489b31dabd = function(arg0, arg1) { + arg0.enable(arg1 >>> 0); + }; + imports.wbg.__wbg_enable_bb868e19d5c88d56 = function(arg0, arg1) { + arg0.enable(arg1 >>> 0); + }; + imports.wbg.__wbg_endQuery_b4f2566f7afc4117 = function(arg0, arg1) { + arg0.endQuery(arg1 >>> 0); + }; + imports.wbg.__wbg_end_0ac71677a5c1717a = function(arg0) { + arg0.end(); + }; + imports.wbg.__wbg_end_6f776519f1faa582 = function(arg0) { + arg0.end(); + }; + imports.wbg.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) { + let deferred0_0; + let deferred0_1; + try { + deferred0_0 = arg0; + deferred0_1 = arg1; + console.error(getStringFromWasm0(arg0, arg1)); + } finally { + wasm.__wbindgen_free(deferred0_0, deferred0_1, 1); + } + }; + imports.wbg.__wbg_error_e98e6aadd08e0b94 = function(arg0) { + const ret = arg0.error; + return ret; + }; + imports.wbg.__wbg_error_f0dde81ae1e4cfea = function(arg0, arg1) { + console.error(arg0, arg1); + }; + imports.wbg.__wbg_eval_3f5a1e931805582e = function() { return handleError(function (arg0, arg1) { + const ret = eval(getStringFromWasm0(arg0, arg1)); + return ret; + }, arguments) }; + imports.wbg.__wbg_exec_e5b487b382193a31 = function(arg0, arg1, arg2) { + const ret = arg0.exec(getStringFromWasm0(arg1, arg2)); + return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); + }; + imports.wbg.__wbg_executeBundles_8e6c0614da2805d4 = function(arg0, arg1) { + arg0.executeBundles(arg1); + }; + imports.wbg.__wbg_exitFullscreen_e0a94c24ed3326ef = function(arg0) { + arg0.exitFullscreen(); + }; + imports.wbg.__wbg_exitPointerLock_2d8adaf1c923990f = function(arg0) { + arg0.exitPointerLock(); + }; + imports.wbg.__wbg_features_1b464383ea8a7691 = function(arg0) { + const ret = arg0.features; + return ret; + }; + imports.wbg.__wbg_features_e5fbbc2760867852 = function(arg0) { + const ret = arg0.features; + return ret; + }; + imports.wbg.__wbg_fenceSync_68dcf439f52decac = function(arg0, arg1, arg2) { + const ret = arg0.fenceSync(arg1 >>> 0, arg2 >>> 0); + return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); + }; + imports.wbg.__wbg_fetch_22f6188f309225ff = function(arg0, arg1, arg2) { + const ret = arg0.fetch(getStringFromWasm0(arg1, arg2)); + return ret; + }; + imports.wbg.__wbg_fetch_588e3e884fcdc8c8 = function(arg0, arg1, arg2) { + const ret = arg0.fetch(getStringFromWasm0(arg1, arg2)); + return ret; + }; + imports.wbg.__wbg_finish_20711371c58df61c = function(arg0) { + const ret = arg0.finish(); + return ret; + }; + imports.wbg.__wbg_finish_34b2c54329c8719f = function(arg0, arg1) { + const ret = arg0.finish(arg1); + return ret; + }; + imports.wbg.__wbg_finish_a9ab917e756ea00c = function(arg0, arg1) { + const ret = arg0.finish(arg1); + return ret; + }; + imports.wbg.__wbg_finish_e0a6c97c0622f843 = function(arg0) { + const ret = arg0.finish(); + return ret; + }; + imports.wbg.__wbg_focus_c71947fc3fe22147 = function() { return handleError(function (arg0) { + arg0.focus(); + }, arguments) }; + imports.wbg.__wbg_framebufferRenderbuffer_308ddbcaaed66ff2 = function(arg0, arg1, arg2, arg3, arg4) { + arg0.framebufferRenderbuffer(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0, arg4); + }; + imports.wbg.__wbg_framebufferRenderbuffer_a23d035c46e3e192 = function(arg0, arg1, arg2, arg3, arg4) { + arg0.framebufferRenderbuffer(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0, arg4); + }; + imports.wbg.__wbg_framebufferTexture2D_170b0f8c792e246f = function(arg0, arg1, arg2, arg3, arg4, arg5) { + arg0.framebufferTexture2D(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0, arg4, arg5); + }; + imports.wbg.__wbg_framebufferTexture2D_5366ecb050293d09 = function(arg0, arg1, arg2, arg3, arg4, arg5) { + arg0.framebufferTexture2D(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0, arg4, arg5); + }; + imports.wbg.__wbg_framebufferTextureLayer_daccfb6fb9396578 = function(arg0, arg1, arg2, arg3, arg4, arg5) { + arg0.framebufferTextureLayer(arg1 >>> 0, arg2 >>> 0, arg3, arg4, arg5); + }; + imports.wbg.__wbg_framebufferTextureMultiviewOVR_e2282e87fdf2564f = function(arg0, arg1, arg2, arg3, arg4, arg5, arg6) { + arg0.framebufferTextureMultiviewOVR(arg1 >>> 0, arg2 >>> 0, arg3, arg4, arg5, arg6); + }; + imports.wbg.__wbg_frontFace_7b469405c0e889ee = function(arg0, arg1) { + arg0.frontFace(arg1 >>> 0); + }; + imports.wbg.__wbg_frontFace_993e921eaef39c45 = function(arg0, arg1) { + arg0.frontFace(arg1 >>> 0); + }; + imports.wbg.__wbg_fullscreenElement_a613ad02fa918fb4 = function(arg0) { + const ret = arg0.fullscreenElement; + return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); + }; + imports.wbg.__wbg_getBindGroupLayout_4a94df6108ac6667 = function(arg0, arg1) { + const ret = arg0.getBindGroupLayout(arg1 >>> 0); + return ret; + }; + imports.wbg.__wbg_getBindGroupLayout_80e803d942962f6a = function(arg0, arg1) { + const ret = arg0.getBindGroupLayout(arg1 >>> 0); + return ret; + }; + imports.wbg.__wbg_getBoundingClientRect_d5aa7383cf5c9a73 = function(arg0) { + const ret = arg0.getBoundingClientRect(); + return ret; + }; + imports.wbg.__wbg_getBufferSubData_5102d8a217d0774c = function(arg0, arg1, arg2, arg3) { + arg0.getBufferSubData(arg1 >>> 0, arg2, arg3); + }; + imports.wbg.__wbg_getCoalescedEvents_1372a1922f78401a = function(arg0) { + const ret = arg0.getCoalescedEvents; + return ret; + }; + imports.wbg.__wbg_getCoalescedEvents_3736b5e5d63bed7b = function(arg0) { + const ret = arg0.getCoalescedEvents(); + return ret; + }; + imports.wbg.__wbg_getCompilationInfo_2af3ecdfeda551a3 = function(arg0) { + const ret = arg0.getCompilationInfo(); + return ret; + }; + imports.wbg.__wbg_getComputedStyle_c3a9de7674a38310 = function() { return handleError(function (arg0, arg1) { + const ret = arg0.getComputedStyle(arg1); + return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); + }, arguments) }; + imports.wbg.__wbg_getContext_02d86c7d9cfa709e = function() { return handleError(function (arg0, arg1, arg2) { + const ret = arg0.getContext(getStringFromWasm0(arg1, arg2)); + return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); + }, arguments) }; + imports.wbg.__wbg_getContext_24d4414b979c1bbd = function() { return handleError(function (arg0, arg1, arg2) { + const ret = arg0.getContext(getStringFromWasm0(arg1, arg2)); + return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); + }, arguments) }; + imports.wbg.__wbg_getContext_74e4f1560c2a2fae = function() { return handleError(function (arg0, arg1, arg2, arg3) { + const ret = arg0.getContext(getStringFromWasm0(arg1, arg2), arg3); + return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); + }, arguments) }; + imports.wbg.__wbg_getContext_b22f05fca7ddb494 = function() { return handleError(function (arg0, arg1, arg2, arg3) { + const ret = arg0.getContext(getStringFromWasm0(arg1, arg2), arg3); + return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); + }, arguments) }; + imports.wbg.__wbg_getCurrentTexture_5a79cda2ff36e1ee = function(arg0) { + const ret = arg0.getCurrentTexture(); + return ret; + }; + imports.wbg.__wbg_getElementById_7b2db24a9b54f077 = function(arg0, arg1, arg2) { + const ret = arg0.getElementById(getStringFromWasm0(arg1, arg2)); + return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); + }; + imports.wbg.__wbg_getExtension_28666bdc87d23aca = function() { return handleError(function (arg0, arg1, arg2) { + const ret = arg0.getExtension(getStringFromWasm0(arg1, arg2)); + return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); + }, arguments) }; + imports.wbg.__wbg_getGamepads_6638806105277531 = function() { return handleError(function (arg0) { + const ret = arg0.getGamepads(); + return ret; + }, arguments) }; + imports.wbg.__wbg_getIndexedParameter_f9e7220a3bb8862c = function() { return handleError(function (arg0, arg1, arg2) { + const ret = arg0.getIndexedParameter(arg1 >>> 0, arg2 >>> 0); + return ret; + }, arguments) }; + imports.wbg.__wbg_getMappedRange_932dd043ae22ee0a = function(arg0, arg1, arg2) { + const ret = arg0.getMappedRange(arg1, arg2); + return ret; + }; + imports.wbg.__wbg_getOwnPropertyDescriptor_c701b185423f5b7e = function(arg0, arg1) { + const ret = Object.getOwnPropertyDescriptor(arg0, arg1); + return ret; + }; + imports.wbg.__wbg_getParameter_304cffb9a759dc04 = function() { return handleError(function (arg0, arg1) { + const ret = arg0.getParameter(arg1 >>> 0); + return ret; + }, arguments) }; + imports.wbg.__wbg_getParameter_fd65bc6ff1b0ffd9 = function() { return handleError(function (arg0, arg1) { + const ret = arg0.getParameter(arg1 >>> 0); + return ret; + }, arguments) }; + imports.wbg.__wbg_getPreferredCanvasFormat_de73c02773a5209e = function(arg0) { + const ret = arg0.getPreferredCanvasFormat(); + return (__wbindgen_enum_GpuTextureFormat.indexOf(ret) + 1 || 96) - 1; + }; + imports.wbg.__wbg_getProgramInfoLog_032aac3e6f3a253c = function(arg0, arg1, arg2) { + const ret = arg1.getProgramInfoLog(arg2); + var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len1 = WASM_VECTOR_LEN; + getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); + getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); + }; + imports.wbg.__wbg_getProgramInfoLog_039168c2aed8d3fe = function(arg0, arg1, arg2) { + const ret = arg1.getProgramInfoLog(arg2); + var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len1 = WASM_VECTOR_LEN; + getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); + getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); + }; + imports.wbg.__wbg_getProgramParameter_70b22019524689fa = function(arg0, arg1, arg2) { + const ret = arg0.getProgramParameter(arg1, arg2 >>> 0); + return ret; + }; + imports.wbg.__wbg_getProgramParameter_9b3bdf8d90159edb = function(arg0, arg1, arg2) { + const ret = arg0.getProgramParameter(arg1, arg2 >>> 0); + return ret; + }; + imports.wbg.__wbg_getPropertyValue_e87121b8549f72d5 = function() { return handleError(function (arg0, arg1, arg2, arg3) { + const ret = arg1.getPropertyValue(getStringFromWasm0(arg2, arg3)); + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); + getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); + }, arguments) }; + imports.wbg.__wbg_getQueryParameter_e7b02fe5fd64baa5 = function(arg0, arg1, arg2) { + const ret = arg0.getQueryParameter(arg1, arg2 >>> 0); + return ret; + }; + imports.wbg.__wbg_getRandomValues_bcb4912f16000dc4 = function() { return handleError(function (arg0, arg1) { + arg0.getRandomValues(arg1); + }, arguments) }; + imports.wbg.__wbg_getShaderInfoLog_5c7d45bafe3be3dd = function(arg0, arg1, arg2) { + const ret = arg1.getShaderInfoLog(arg2); + var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len1 = WASM_VECTOR_LEN; + getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); + getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); + }; + imports.wbg.__wbg_getShaderInfoLog_d2cc881ce343a733 = function(arg0, arg1, arg2) { + const ret = arg1.getShaderInfoLog(arg2); + var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len1 = WASM_VECTOR_LEN; + getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); + getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); + }; + imports.wbg.__wbg_getShaderParameter_6d0578dd9f58b684 = function(arg0, arg1, arg2) { + const ret = arg0.getShaderParameter(arg1, arg2 >>> 0); + return ret; + }; + imports.wbg.__wbg_getShaderParameter_c50fbeadf9ef6879 = function(arg0, arg1, arg2) { + const ret = arg0.getShaderParameter(arg1, arg2 >>> 0); + return ret; + }; + imports.wbg.__wbg_getSupportedExtensions_fca342bac23691db = function(arg0) { + const ret = arg0.getSupportedExtensions(); + return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); + }; + imports.wbg.__wbg_getSupportedProfiles_b2cc3aec569a65fa = function(arg0) { + const ret = arg0.getSupportedProfiles(); + return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); + }; + imports.wbg.__wbg_getSyncParameter_5688138f66b57b16 = function(arg0, arg1, arg2) { + const ret = arg0.getSyncParameter(arg1, arg2 >>> 0); + return ret; + }; + imports.wbg.__wbg_getUniformBlockIndex_b53609b8ecff8b48 = function(arg0, arg1, arg2, arg3) { + const ret = arg0.getUniformBlockIndex(arg1, getStringFromWasm0(arg2, arg3)); + return ret; + }; + imports.wbg.__wbg_getUniformLocation_852fbe42afe106ff = function(arg0, arg1, arg2, arg3) { + const ret = arg0.getUniformLocation(arg1, getStringFromWasm0(arg2, arg3)); + return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); + }; + imports.wbg.__wbg_getUniformLocation_9d46a65011600cce = function(arg0, arg1, arg2, arg3) { + const ret = arg0.getUniformLocation(arg1, getStringFromWasm0(arg2, arg3)); + return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); + }; + imports.wbg.__wbg_get_68aa371864aa301a = function(arg0, arg1) { + const ret = arg0[arg1 >>> 0]; + return ret; + }; + imports.wbg.__wbg_get_6b316bfdb1b95076 = function(arg0, arg1) { + const ret = arg0[arg1 >>> 0]; + return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); + }; + imports.wbg.__wbg_globalThis_1e2ac1d6eee845b3 = function() { return handleError(function () { + const ret = globalThis.globalThis; + return ret; + }, arguments) }; + imports.wbg.__wbg_global_f25a574ae080367c = function() { return handleError(function () { + const ret = global.global; + return ret; + }, arguments) }; + imports.wbg.__wbg_gpu_87871e8f7ace8fee = function(arg0) { + const ret = arg0.gpu; + return ret; + }; + imports.wbg.__wbg_has_624cbf0451d880e8 = function(arg0, arg1, arg2) { + const ret = arg0.has(getStringFromWasm0(arg1, arg2)); + return ret; + }; + imports.wbg.__wbg_height_4065e49e5ec4c4c1 = function(arg0) { + const ret = arg0.height; + return ret; + }; + imports.wbg.__wbg_height_51a97623165c9beb = function(arg0) { + const ret = arg0.height; + return ret; + }; + imports.wbg.__wbg_height_74bc8ec7548ff6b6 = function(arg0) { + const ret = arg0.height; + return ret; + }; + imports.wbg.__wbg_height_a196a7b9b1d7e01c = function(arg0) { + const ret = arg0.height; + return ret; + }; + imports.wbg.__wbg_height_cabc0c8a4c838304 = function(arg0) { + const ret = arg0.height; + return ret; + }; + imports.wbg.__wbg_height_e509816ec3fdf5b1 = function(arg0) { + const ret = arg0.height; + return ret; + }; + imports.wbg.__wbg_hidden_0f0cef8d04dd944b = function(arg0) { + const ret = arg0.hidden; + return ret; + }; + imports.wbg.__wbg_id_cf47b38e5ed9c36c = function(arg0, arg1) { + const ret = arg1.id; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); + getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); + }; + imports.wbg.__wbg_includes_959087f4155febdf = function(arg0, arg1, arg2) { + const ret = arg0.includes(arg1, arg2); + return ret; + }; + imports.wbg.__wbg_index_a82f5d0cb7999974 = function(arg0) { + const ret = arg0.index; + return ret; + }; + imports.wbg.__wbg_inlineSize_6f8d0983462c2919 = function(arg0) { + const ret = arg0.inlineSize; + return ret; + }; + imports.wbg.__wbg_instanceof_DomException_db7a79d719cae989 = function(arg0) { + let result; + try { + result = arg0 instanceof DOMException; + } catch (_) { + result = false; + } + const ret = result; + return ret; + }; + imports.wbg.__wbg_instanceof_GpuAdapter_0731153d2b08720b = function(arg0) { + let result; + try { + result = arg0 instanceof GPUAdapter; + } catch (_) { + result = false; + } + const ret = result; + return ret; + }; + imports.wbg.__wbg_instanceof_GpuCanvasContext_d14121c7bd72fcef = function(arg0) { + let result; + try { + result = arg0 instanceof GPUCanvasContext; + } catch (_) { + result = false; + } + const ret = result; + return ret; + }; + imports.wbg.__wbg_instanceof_GpuDeviceLostInfo_a3677ebb8241d800 = function(arg0) { + let result; + try { + result = arg0 instanceof GPUDeviceLostInfo; + } catch (_) { + result = false; + } + const ret = result; + return ret; + }; + imports.wbg.__wbg_instanceof_GpuOutOfMemoryError_391d9a08edbfa04b = function(arg0) { + let result; + try { + result = arg0 instanceof GPUOutOfMemoryError; + } catch (_) { + result = false; + } + const ret = result; + return ret; + }; + imports.wbg.__wbg_instanceof_GpuValidationError_f4d803c383da3c92 = function(arg0) { + let result; + try { + result = arg0 instanceof GPUValidationError; + } catch (_) { + result = false; + } + const ret = result; + return ret; + }; + imports.wbg.__wbg_instanceof_HtmlCanvasElement_9db0dfd54b2c5330 = function(arg0) { + let result; + try { + result = arg0 instanceof HTMLCanvasElement; + } catch (_) { + result = false; + } + const ret = result; + return ret; + }; + imports.wbg.__wbg_instanceof_HtmlInputElement_d01f8554d1afb4b9 = function(arg0) { + let result; + try { + result = arg0 instanceof HTMLInputElement; + } catch (_) { + result = false; + } + const ret = result; + return ret; + }; + imports.wbg.__wbg_instanceof_Object_f0f57d6eeca1b81d = function(arg0) { + let result; + try { + result = arg0 instanceof Object; + } catch (_) { + result = false; + } + const ret = result; + return ret; + }; + imports.wbg.__wbg_instanceof_Response_0ec26bd2f8a75ca2 = function(arg0) { + let result; + try { + result = arg0 instanceof Response; + } catch (_) { + result = false; + } + const ret = result; + return ret; + }; + imports.wbg.__wbg_instanceof_WebGl2RenderingContext_888701598b82d45d = function(arg0) { + let result; + try { + result = arg0 instanceof WebGL2RenderingContext; + } catch (_) { + result = false; + } + const ret = result; + return ret; + }; + imports.wbg.__wbg_instanceof_Window_a959820eb267fe22 = function(arg0) { + let result; + try { + result = arg0 instanceof Window; + } catch (_) { + result = false; + } + const ret = result; + return ret; + }; + imports.wbg.__wbg_invalidateFramebuffer_f4a994f4a8535cca = function() { return handleError(function (arg0, arg1, arg2) { + arg0.invalidateFramebuffer(arg1 >>> 0, arg2); + }, arguments) }; + imports.wbg.__wbg_isComposing_8a94b9b44a611f9b = function(arg0) { + const ret = arg0.isComposing; + return ret; + }; + imports.wbg.__wbg_isComposing_8bc0758f907b31f6 = function(arg0) { + const ret = arg0.isComposing; + return ret; + }; + imports.wbg.__wbg_isIntersecting_9059d5bcaf29f415 = function(arg0) { + const ret = arg0.isIntersecting; + return ret; + }; + imports.wbg.__wbg_isSecureContext_be7df9481b21ad0d = function(arg0) { + const ret = arg0.isSecureContext; + return ret; + }; + imports.wbg.__wbg_is_20768e55ad2a7c3f = function(arg0, arg1) { + const ret = Object.is(arg0, arg1); + return ret; + }; + imports.wbg.__wbg_keyCode_9fa1dd4d4dbccacc = function(arg0) { + const ret = arg0.keyCode; + return ret; + }; + imports.wbg.__wbg_key_02315cd3f595756b = function(arg0, arg1) { + const ret = arg1.key; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); + getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); + }; + imports.wbg.__wbg_label_2082ab37d2ad170d = function(arg0, arg1) { + const ret = arg1.label; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); + getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); + }; + imports.wbg.__wbg_length_2e63ba34c4121df5 = function(arg0) { + const ret = arg0.length; + return ret; + }; + imports.wbg.__wbg_length_9df32f7add647235 = function(arg0) { + const ret = arg0.length; + return ret; + }; + imports.wbg.__wbg_length_e74df4881604f1d9 = function(arg0) { + const ret = arg0.length; + return ret; + }; + imports.wbg.__wbg_limits_2dd632c891786ddf = function(arg0) { + const ret = arg0.limits; + return ret; + }; + imports.wbg.__wbg_limits_f6411f884b0b2d62 = function(arg0) { + const ret = arg0.limits; + return ret; + }; + imports.wbg.__wbg_lineNum_0246de1e072ffe19 = function(arg0) { + const ret = arg0.lineNum; + return ret; + }; + imports.wbg.__wbg_linkProgram_575f761eda0a14bc = function(arg0, arg1) { + arg0.linkProgram(arg1); + }; + imports.wbg.__wbg_linkProgram_5eee13e603e9af41 = function(arg0, arg1) { + arg0.linkProgram(arg1); + }; + imports.wbg.__wbg_location_e9eba129bf0612a5 = function(arg0) { + const ret = arg0.location; + return ret; + }; + imports.wbg.__wbg_log_0cc1b7768397bcfe = function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) { + let deferred0_0; + let deferred0_1; + try { + deferred0_0 = arg0; + deferred0_1 = arg1; + console.log(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), getStringFromWasm0(arg4, arg5), getStringFromWasm0(arg6, arg7)); + } finally { + wasm.__wbindgen_free(deferred0_0, deferred0_1, 1); + } + }; + imports.wbg.__wbg_log_cb9e190acc5753fb = function(arg0, arg1) { + let deferred0_0; + let deferred0_1; + try { + deferred0_0 = arg0; + deferred0_1 = arg1; + console.log(getStringFromWasm0(arg0, arg1)); + } finally { + wasm.__wbindgen_free(deferred0_0, deferred0_1, 1); + } + }; + imports.wbg.__wbg_lost_6e4d29847ce2a34a = function(arg0) { + const ret = arg0.lost; + return ret; + }; + imports.wbg.__wbg_mapAsync_37f5e03edf2e1352 = function(arg0, arg1, arg2, arg3) { + const ret = arg0.mapAsync(arg1 >>> 0, arg2, arg3); + return ret; + }; + imports.wbg.__wbg_mapping_e9e96f5f63ee828d = function(arg0) { + const ret = arg0.mapping; + return (__wbindgen_enum_GamepadMappingType.indexOf(ret) + 1 || 3) - 1; + }; + imports.wbg.__wbg_mark_7438147ce31e9d4b = function(arg0, arg1) { + performance.mark(getStringFromWasm0(arg0, arg1)); + }; + imports.wbg.__wbg_matchMedia_0be65181eeae951c = function() { return handleError(function (arg0, arg1, arg2) { + const ret = arg0.matchMedia(getStringFromWasm0(arg1, arg2)); + return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); + }, arguments) }; + imports.wbg.__wbg_matches_254463383aee4688 = function(arg0) { + const ret = arg0.matches; + return ret; + }; + imports.wbg.__wbg_maxBindGroups_768ca5e8623bf450 = function(arg0) { + const ret = arg0.maxBindGroups; + return ret; + }; + imports.wbg.__wbg_maxBindingsPerBindGroup_057972d600d69719 = function(arg0) { + const ret = arg0.maxBindingsPerBindGroup; + return ret; + }; + imports.wbg.__wbg_maxBufferSize_e237b44f19a5a62b = function(arg0) { + const ret = arg0.maxBufferSize; + return ret; + }; + imports.wbg.__wbg_maxChannelCount_a2b9e63650077c1e = function(arg0) { + const ret = arg0.maxChannelCount; + return ret; + }; + imports.wbg.__wbg_maxColorAttachmentBytesPerSample_d6c7b4051d22c6d6 = function(arg0) { + const ret = arg0.maxColorAttachmentBytesPerSample; + return ret; + }; + imports.wbg.__wbg_maxColorAttachments_7a18ba24c05edcfd = function(arg0) { + const ret = arg0.maxColorAttachments; + return ret; + }; + imports.wbg.__wbg_maxComputeInvocationsPerWorkgroup_b99c2f3611633992 = function(arg0) { + const ret = arg0.maxComputeInvocationsPerWorkgroup; + return ret; + }; + imports.wbg.__wbg_maxComputeWorkgroupSizeX_adb26da9ed7f77f7 = function(arg0) { + const ret = arg0.maxComputeWorkgroupSizeX; + return ret; + }; + imports.wbg.__wbg_maxComputeWorkgroupSizeY_cc217559c98be33b = function(arg0) { + const ret = arg0.maxComputeWorkgroupSizeY; + return ret; + }; + imports.wbg.__wbg_maxComputeWorkgroupSizeZ_66606a80e2cf2309 = function(arg0) { + const ret = arg0.maxComputeWorkgroupSizeZ; + return ret; + }; + imports.wbg.__wbg_maxComputeWorkgroupStorageSize_cb6235497b8c4997 = function(arg0) { + const ret = arg0.maxComputeWorkgroupStorageSize; + return ret; + }; + imports.wbg.__wbg_maxComputeWorkgroupsPerDimension_6bf550b5f21d57cf = function(arg0) { + const ret = arg0.maxComputeWorkgroupsPerDimension; + return ret; + }; + imports.wbg.__wbg_maxDynamicStorageBuffersPerPipelineLayout_c6ac20334e328b47 = function(arg0) { + const ret = arg0.maxDynamicStorageBuffersPerPipelineLayout; + return ret; + }; + imports.wbg.__wbg_maxDynamicUniformBuffersPerPipelineLayout_aa8f14a74b440f01 = function(arg0) { + const ret = arg0.maxDynamicUniformBuffersPerPipelineLayout; + return ret; + }; + imports.wbg.__wbg_maxSampledTexturesPerShaderStage_db7c4922cc60144a = function(arg0) { + const ret = arg0.maxSampledTexturesPerShaderStage; + return ret; + }; + imports.wbg.__wbg_maxSamplersPerShaderStage_538705fe2263e710 = function(arg0) { + const ret = arg0.maxSamplersPerShaderStage; + return ret; + }; + imports.wbg.__wbg_maxStorageBufferBindingSize_32178c0f5f7f85cb = function(arg0) { + const ret = arg0.maxStorageBufferBindingSize; + return ret; + }; + imports.wbg.__wbg_maxStorageBuffersPerShaderStage_9f67e9eae0089f77 = function(arg0) { + const ret = arg0.maxStorageBuffersPerShaderStage; + return ret; + }; + imports.wbg.__wbg_maxStorageTexturesPerShaderStage_57239664936031cf = function(arg0) { + const ret = arg0.maxStorageTexturesPerShaderStage; + return ret; + }; + imports.wbg.__wbg_maxTextureArrayLayers_db5d4e486c78ae04 = function(arg0) { + const ret = arg0.maxTextureArrayLayers; + return ret; + }; + imports.wbg.__wbg_maxTextureDimension1D_3475085ffacabbdc = function(arg0) { + const ret = arg0.maxTextureDimension1D; + return ret; + }; + imports.wbg.__wbg_maxTextureDimension2D_7c8d5ecf09eb8519 = function(arg0) { + const ret = arg0.maxTextureDimension2D; + return ret; + }; + imports.wbg.__wbg_maxTextureDimension3D_8bd976677a0f91d4 = function(arg0) { + const ret = arg0.maxTextureDimension3D; + return ret; + }; + imports.wbg.__wbg_maxUniformBufferBindingSize_95b1a54e7e4a0f0f = function(arg0) { + const ret = arg0.maxUniformBufferBindingSize; + return ret; + }; + imports.wbg.__wbg_maxUniformBuffersPerShaderStage_5f475d9a453af14d = function(arg0) { + const ret = arg0.maxUniformBuffersPerShaderStage; + return ret; + }; + imports.wbg.__wbg_maxVertexAttributes_4c48ca2f5d32f860 = function(arg0) { + const ret = arg0.maxVertexAttributes; + return ret; + }; + imports.wbg.__wbg_maxVertexBufferArrayStride_2233f6933ecc5a16 = function(arg0) { + const ret = arg0.maxVertexBufferArrayStride; + return ret; + }; + imports.wbg.__wbg_maxVertexBuffers_c47e508cd7348554 = function(arg0) { + const ret = arg0.maxVertexBuffers; + return ret; + }; + imports.wbg.__wbg_measure_fb7825c11612c823 = function() { return handleError(function (arg0, arg1, arg2, arg3) { + let deferred0_0; + let deferred0_1; + let deferred1_0; + let deferred1_1; + try { + deferred0_0 = arg0; + deferred0_1 = arg1; + deferred1_0 = arg2; + deferred1_1 = arg3; + performance.measure(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3)); + } finally { + wasm.__wbindgen_free(deferred0_0, deferred0_1, 1); + wasm.__wbindgen_free(deferred1_0, deferred1_1, 1); + } + }, arguments) }; + imports.wbg.__wbg_media_8db09f09635587da = function(arg0, arg1) { + const ret = arg1.media; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); + getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); + }; + imports.wbg.__wbg_message_0762358e59db7ed6 = function(arg0, arg1) { + const ret = arg1.message; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); + getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); + }; + imports.wbg.__wbg_message_7957ab09f64c6822 = function(arg0, arg1) { + const ret = arg1.message; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); + getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); + }; + imports.wbg.__wbg_message_a14b869acc83442f = function(arg0, arg1) { + const ret = arg1.message; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); + getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); + }; + imports.wbg.__wbg_message_b163994503433c9e = function(arg0, arg1) { + const ret = arg1.message; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); + getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); + }; + imports.wbg.__wbg_messages_da071582f72bc978 = function(arg0) { + const ret = arg0.messages; + return ret; + }; + imports.wbg.__wbg_metaKey_34d5658170ffb3ee = function(arg0) { + const ret = arg0.metaKey; + return ret; + }; + imports.wbg.__wbg_metaKey_6c8e9228e8dda152 = function(arg0) { + const ret = arg0.metaKey; + return ret; + }; + imports.wbg.__wbg_minStorageBufferOffsetAlignment_51b4801fac3a58de = function(arg0) { + const ret = arg0.minStorageBufferOffsetAlignment; + return ret; + }; + imports.wbg.__wbg_minUniformBufferOffsetAlignment_5d62a77924b2335f = function(arg0) { + const ret = arg0.minUniformBufferOffsetAlignment; + return ret; + }; + imports.wbg.__wbg_movementX_e32c342d96d1c701 = function(arg0) { + const ret = arg0.movementX; + return ret; + }; + imports.wbg.__wbg_movementY_136c6febb976ca3b = function(arg0) { + const ret = arg0.movementY; + return ret; + }; + imports.wbg.__wbg_msCrypto_0a36e2ec3a343d26 = function(arg0) { + const ret = arg0.msCrypto; + return ret; + }; + imports.wbg.__wbg_navigator_2936a93ec3c6f4c5 = function(arg0) { + const ret = arg0.navigator; + return ret; + }; + imports.wbg.__wbg_navigator_da495c9e52e160b1 = function(arg0) { + const ret = arg0.navigator; + return ret; + }; + imports.wbg.__wbg_new_076cac58bb698dd4 = function() { + const ret = new Object(); + return ret; + }; + imports.wbg.__wbg_new_0c28e72025e00594 = function() { + const ret = new Array(); + return ret; + }; + imports.wbg.__wbg_new_23362fa370a0a372 = function(arg0) { + const ret = new Uint8Array(arg0); + return ret; + }; + imports.wbg.__wbg_new_238671e08bf4fcbb = function() { return handleError(function () { + const ret = new MessageChannel(); + return ret; + }, arguments) }; + imports.wbg.__wbg_new_2d898f60f528ddf5 = function(arg0, arg1, arg2, arg3) { + const ret = new RegExp(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3)); + return ret; + }; + imports.wbg.__wbg_new_4b15073a88792687 = function() { return handleError(function (arg0) { + const ret = new ResizeObserver(arg0); + return ret; + }, arguments) }; + imports.wbg.__wbg_new_8a6f238a6ece86ea = function() { + const ret = new Error(); + return ret; + }; + imports.wbg.__wbg_new_93cf40e4f48fe902 = function() { return handleError(function () { + const ret = new AbortController(); + return ret; + }, arguments) }; + imports.wbg.__wbg_new_95248404903acf0f = function() { return handleError(function () { + const ret = new Image(); + return ret; + }, arguments) }; + imports.wbg.__wbg_new_b4a18f0a618c89f2 = function() { return handleError(function (arg0, arg1) { + const ret = new Worker(getStringFromWasm0(arg0, arg1)); + return ret; + }, arguments) }; + imports.wbg.__wbg_new_c94d990936d8ea5d = function() { return handleError(function (arg0) { + const ret = new IntersectionObserver(arg0); + return ret; + }, arguments) }; + imports.wbg.__wbg_newnoargs_19a249f4eceaaac3 = function(arg0, arg1) { + const ret = new Function(getStringFromWasm0(arg0, arg1)); + return ret; + }; + imports.wbg.__wbg_newwithbyteoffsetandlength_24ff09a6b37a856f = function(arg0, arg1, arg2) { + const ret = new Int16Array(arg0, arg1 >>> 0, arg2 >>> 0); + return ret; + }; + imports.wbg.__wbg_newwithbyteoffsetandlength_25d3cac011b6e2d5 = function(arg0, arg1, arg2) { + const ret = new Uint32Array(arg0, arg1 >>> 0, arg2 >>> 0); + return ret; + }; + imports.wbg.__wbg_newwithbyteoffsetandlength_457c61bfe0fb7b8c = function(arg0, arg1, arg2) { + const ret = new Int32Array(arg0, arg1 >>> 0, arg2 >>> 0); + return ret; + }; + imports.wbg.__wbg_newwithbyteoffsetandlength_9f48300371c8802a = function(arg0, arg1, arg2) { + const ret = new Uint16Array(arg0, arg1 >>> 0, arg2 >>> 0); + return ret; + }; + imports.wbg.__wbg_newwithbyteoffsetandlength_a6087a94c7bfea61 = function(arg0, arg1, arg2) { + const ret = new Int8Array(arg0, arg1 >>> 0, arg2 >>> 0); + return ret; + }; + imports.wbg.__wbg_newwithbyteoffsetandlength_c280c15b00e018cd = function(arg0, arg1, arg2) { + const ret = new Float32Array(arg0, arg1 >>> 0, arg2 >>> 0); + return ret; + }; + imports.wbg.__wbg_newwithbyteoffsetandlength_ee8def7000b7b2be = function(arg0, arg1, arg2) { + const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0); + return ret; + }; + imports.wbg.__wbg_newwithcontextoptions_cda5c6bcc1b57f6b = function() { return handleError(function (arg0) { + const ret = new lAudioContext(arg0); + return ret; + }, arguments) }; + imports.wbg.__wbg_newwithlength_91de49dea5643c87 = function(arg0) { + const ret = new Uint8Array(arg0 >>> 0); + return ret; + }; + imports.wbg.__wbg_newwithstrsequenceandoptions_af096ce40d9d9ac8 = function() { return handleError(function (arg0, arg1) { + const ret = new Blob(arg0, arg1); + return ret; + }, arguments) }; + imports.wbg.__wbg_newwithu8clampedarray_e7ac70cb2191dac9 = function() { return handleError(function (arg0, arg1, arg2) { + const ret = new ImageData(getClampedArrayU8FromWasm0(arg0, arg1), arg2 >>> 0); + return ret; + }, arguments) }; + imports.wbg.__wbg_node_02999533c4ea02e3 = function(arg0) { + const ret = arg0.node; + return ret; + }; + imports.wbg.__wbg_now_2c95c9de01293173 = function(arg0) { + const ret = arg0.now(); + return ret; + }; + imports.wbg.__wbg_now_5cf792f3426feb88 = function() { + const ret = Date.now(); + return ret; + }; + imports.wbg.__wbg_observe_e2208b07fe315de7 = function(arg0, arg1) { + arg0.observe(arg1); + }; + imports.wbg.__wbg_observe_ec91d62599b7772b = function(arg0, arg1) { + arg0.observe(arg1); + }; + imports.wbg.__wbg_observe_fd48955513eca909 = function(arg0, arg1, arg2) { + arg0.observe(arg1, arg2); + }; + imports.wbg.__wbg_of_2f6232d86af7992c = function(arg0, arg1) { + const ret = Array.of(arg0, arg1); + return ret; + }; + imports.wbg.__wbg_of_5ae3a2d893e18853 = function(arg0) { + const ret = Array.of(arg0); + return ret; + }; + imports.wbg.__wbg_offsetX_d6957d052a0d4b11 = function(arg0) { + const ret = arg0.offsetX; + return ret; + }; + imports.wbg.__wbg_offsetY_076edde514bf80f4 = function(arg0) { + const ret = arg0.offsetY; + return ret; + }; + imports.wbg.__wbg_offset_336f14c993863b76 = function(arg0) { + const ret = arg0.offset; + return ret; + }; + imports.wbg.__wbg_performance_7a3ffd0b17f663ad = function(arg0) { + const ret = arg0.performance; + return ret; + }; + imports.wbg.__wbg_persisted_7e044507e52804d9 = function(arg0) { + const ret = arg0.persisted; + return ret; + }; + imports.wbg.__wbg_pixelStorei_198b92c3e346678a = function(arg0, arg1, arg2) { + arg0.pixelStorei(arg1 >>> 0, arg2); + }; + imports.wbg.__wbg_pixelStorei_9c4cb0a4b040b41d = function(arg0, arg1, arg2) { + arg0.pixelStorei(arg1 >>> 0, arg2); + }; + imports.wbg.__wbg_play_e7eb90a843114e0d = function(arg0) { + arg0.play(); + }; + imports.wbg.__wbg_pointerId_a2cbd2cdd6da90b2 = function(arg0) { + const ret = arg0.pointerId; + return ret; + }; + imports.wbg.__wbg_pointerType_1b74686427cdec29 = function(arg0, arg1) { + const ret = arg1.pointerType; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); + getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); + }; + imports.wbg.__wbg_polygonOffset_7ec31dee95d41171 = function(arg0, arg1, arg2) { + arg0.polygonOffset(arg1, arg2); + }; + imports.wbg.__wbg_polygonOffset_c6cbc8093770e840 = function(arg0, arg1, arg2) { + arg0.polygonOffset(arg1, arg2); + }; + imports.wbg.__wbg_popErrorScope_af0b22f136a861d6 = function(arg0) { + const ret = arg0.popErrorScope(); + return ret; + }; + imports.wbg.__wbg_port1_6f5b26fd23d19536 = function(arg0) { + const ret = arg0.port1; + return ret; + }; + imports.wbg.__wbg_port2_2eb4c961d6df5816 = function(arg0) { + const ret = arg0.port2; + return ret; + }; + imports.wbg.__wbg_postMessage_33dcf5caa3589c64 = function() { return handleError(function (arg0, arg1, arg2) { + arg0.postMessage(arg1, arg2); + }, arguments) }; + imports.wbg.__wbg_postMessage_3e7f3215320b4a9c = function() { return handleError(function (arg0, arg1) { + arg0.postMessage(arg1); + }, arguments) }; + imports.wbg.__wbg_postTask_9ba4c3cedae00b38 = function(arg0, arg1, arg2) { + const ret = arg0.postTask(arg1, arg2); + return ret; + }; + imports.wbg.__wbg_pressed_44f3fd351d30cbae = function(arg0) { + const ret = arg0.pressed; + return ret; + }; + imports.wbg.__wbg_pressure_8707a47b6fb1c1fd = function(arg0) { + const ret = arg0.pressure; + return ret; + }; + imports.wbg.__wbg_preventDefault_faafffcaad92972d = function(arg0) { + arg0.preventDefault(); + }; + imports.wbg.__wbg_process_5c1d670bc53614b8 = function(arg0) { + const ret = arg0.process; + return ret; + }; + imports.wbg.__wbg_prototype_0f68911d93450df4 = function() { + const ret = ResizeObserverEntry.prototype; + return ret; + }; + imports.wbg.__wbg_pushErrorScope_b52914ff10ba6ce3 = function(arg0, arg1) { + arg0.pushErrorScope(__wbindgen_enum_GpuErrorFilter[arg1]); + }; + imports.wbg.__wbg_push_3e9ce81246ef1d1b = function(arg0, arg1) { + const ret = arg0.push(arg1); + return ret; + }; + imports.wbg.__wbg_queryCounterEXT_6da4ab4ec9c37329 = function(arg0, arg1, arg2) { + arg0.queryCounterEXT(arg1, arg2 >>> 0); + }; + imports.wbg.__wbg_querySelectorAll_775f04e6f26ad643 = function() { return handleError(function (arg0, arg1, arg2) { + const ret = arg0.querySelectorAll(getStringFromWasm0(arg1, arg2)); + return ret; + }, arguments) }; + imports.wbg.__wbg_querySelector_473a7bd6647e7cbb = function() { return handleError(function (arg0, arg1, arg2) { + const ret = arg0.querySelector(getStringFromWasm0(arg1, arg2)); + return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); + }, arguments) }; + imports.wbg.__wbg_queueMicrotask_3d422e1ba49c2500 = function(arg0) { + const ret = arg0.queueMicrotask; + return ret; + }; + imports.wbg.__wbg_queueMicrotask_5fc3e400ac3c03f4 = function(arg0) { + queueMicrotask(arg0); + }; + imports.wbg.__wbg_queueMicrotask_f301663ccadbb7d0 = function(arg0) { + queueMicrotask(arg0); + }; + imports.wbg.__wbg_queue_bea4017efaaf9904 = function(arg0) { + const ret = arg0.queue; + return ret; + }; + imports.wbg.__wbg_randomFillSync_ab2cfe79ebbf2740 = function() { return handleError(function (arg0, arg1) { + arg0.randomFillSync(arg1); + }, arguments) }; + imports.wbg.__wbg_readBuffer_8fd1512f6bdfc8f0 = function(arg0, arg1) { + arg0.readBuffer(arg1 >>> 0); + }; + imports.wbg.__wbg_readPixels_48fc96a447cda9aa = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) { + arg0.readPixels(arg1, arg2, arg3, arg4, arg5 >>> 0, arg6 >>> 0, arg7); + }, arguments) }; + imports.wbg.__wbg_readPixels_7b1022930a9026d1 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) { + arg0.readPixels(arg1, arg2, arg3, arg4, arg5 >>> 0, arg6 >>> 0, arg7); + }, arguments) }; + imports.wbg.__wbg_readPixels_da6e94b84b4cfd41 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) { + arg0.readPixels(arg1, arg2, arg3, arg4, arg5 >>> 0, arg6 >>> 0, arg7); + }, arguments) }; + imports.wbg.__wbg_reason_43acd39cce242b50 = function(arg0) { + const ret = arg0.reason; + return (__wbindgen_enum_GpuDeviceLostReason.indexOf(ret) + 1 || 3) - 1; + }; + imports.wbg.__wbg_removeEventListener_d14a328308e427ba = function() { return handleError(function (arg0, arg1, arg2, arg3) { + arg0.removeEventListener(getStringFromWasm0(arg1, arg2), arg3); + }, arguments) }; + imports.wbg.__wbg_removeListener_aee72eb2e5fba09c = function() { return handleError(function (arg0, arg1) { + arg0.removeListener(arg1); + }, arguments) }; + imports.wbg.__wbg_removeProperty_902c73a4430b3e54 = function() { return handleError(function (arg0, arg1, arg2, arg3) { + const ret = arg1.removeProperty(getStringFromWasm0(arg2, arg3)); + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); + getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); + }, arguments) }; + imports.wbg.__wbg_renderbufferStorageMultisample_abd1099fecb2e2a4 = function(arg0, arg1, arg2, arg3, arg4, arg5) { + arg0.renderbufferStorageMultisample(arg1 >>> 0, arg2, arg3 >>> 0, arg4, arg5); + }; + imports.wbg.__wbg_renderbufferStorage_56c61eb0bb2718a9 = function(arg0, arg1, arg2, arg3, arg4) { + arg0.renderbufferStorage(arg1 >>> 0, arg2 >>> 0, arg3, arg4); + }; + imports.wbg.__wbg_renderbufferStorage_aa4b58453d5aca0f = function(arg0, arg1, arg2, arg3, arg4) { + arg0.renderbufferStorage(arg1 >>> 0, arg2 >>> 0, arg3, arg4); + }; + imports.wbg.__wbg_repeat_56fa20e30d00be95 = function(arg0) { + const ret = arg0.repeat; + return ret; + }; + imports.wbg.__wbg_requestAdapter_e6dcfac497cafa7a = function(arg0, arg1) { + const ret = arg0.requestAdapter(arg1); + return ret; + }; + imports.wbg.__wbg_requestAnimationFrame_e8ca543d07df528e = function() { return handleError(function (arg0, arg1) { + const ret = arg0.requestAnimationFrame(arg1); + return ret; + }, arguments) }; + imports.wbg.__wbg_requestDevice_03b802707d5a382c = function(arg0, arg1) { + const ret = arg0.requestDevice(arg1); + return ret; + }; + imports.wbg.__wbg_requestFullscreen_e1ad8752a4e33f7e = function(arg0) { + const ret = arg0.requestFullscreen; + return ret; + }; + imports.wbg.__wbg_requestFullscreen_f727b1f250ebb10a = function(arg0) { + const ret = arg0.requestFullscreen(); + return ret; + }; + imports.wbg.__wbg_requestIdleCallback_773c554fc8c5a310 = function(arg0) { + const ret = arg0.requestIdleCallback; + return ret; + }; + imports.wbg.__wbg_requestIdleCallback_ba1f658c72e2140c = function() { return handleError(function (arg0, arg1) { + const ret = arg0.requestIdleCallback(arg1); + return ret; + }, arguments) }; + imports.wbg.__wbg_requestPointerLock_31517250636f5da3 = function(arg0) { + arg0.requestPointerLock(); + }; + imports.wbg.__wbg_require_79b1e9274cde3c87 = function() { return handleError(function () { + const ret = module.require; + return ret; + }, arguments) }; + imports.wbg.__wbg_resolveQuerySet_811661fb23f3b699 = function(arg0, arg1, arg2, arg3, arg4, arg5) { + arg0.resolveQuerySet(arg1, arg2 >>> 0, arg3 >>> 0, arg4, arg5 >>> 0); + }; + imports.wbg.__wbg_resolve_6a311e8bb26423ab = function(arg0) { + const ret = Promise.resolve(arg0); + return ret; + }; + imports.wbg.__wbg_resume_6a2293b5156648d3 = function() { return handleError(function (arg0) { + const ret = arg0.resume(); + return ret; + }, arguments) }; + imports.wbg.__wbg_revokeObjectURL_3e4ad6d46a9a93f1 = function() { return handleError(function (arg0, arg1) { + URL.revokeObjectURL(getStringFromWasm0(arg0, arg1)); + }, arguments) }; + imports.wbg.__wbg_samplerParameterf_a9708333dc0df03e = function(arg0, arg1, arg2, arg3) { + arg0.samplerParameterf(arg1, arg2 >>> 0, arg3); + }; + imports.wbg.__wbg_samplerParameteri_6011eca3eaa96ac6 = function(arg0, arg1, arg2, arg3) { + arg0.samplerParameteri(arg1, arg2 >>> 0, arg3); + }; + imports.wbg.__wbg_scheduler_10edeee35a76c7c6 = function(arg0) { + const ret = arg0.scheduler; + return ret; + }; + imports.wbg.__wbg_scheduler_6d71128f17fbca34 = function(arg0) { + const ret = arg0.scheduler; + return ret; + }; + imports.wbg.__wbg_scissor_4c06926fa8af817c = function(arg0, arg1, arg2, arg3, arg4) { + arg0.scissor(arg1, arg2, arg3, arg4); + }; + imports.wbg.__wbg_scissor_608c4f610141e6df = function(arg0, arg1, arg2, arg3, arg4) { + arg0.scissor(arg1, arg2, arg3, arg4); + }; + imports.wbg.__wbg_self_ac4343e4047b83cc = function() { return handleError(function () { + const ret = self.self; + return ret; + }, arguments) }; + imports.wbg.__wbg_setAttribute_e5d83ecaf7f586d5 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) { + arg0.setAttribute(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4)); + }, arguments) }; + imports.wbg.__wbg_setBindGroup_62a3045b0921e429 = function(arg0, arg1, arg2, arg3, arg4, arg5, arg6) { + arg0.setBindGroup(arg1 >>> 0, arg2, getArrayU32FromWasm0(arg3, arg4), arg5, arg6 >>> 0); + }; + imports.wbg.__wbg_setBindGroup_6c0fd18e9a53a945 = function(arg0, arg1, arg2) { + arg0.setBindGroup(arg1 >>> 0, arg2); + }; + imports.wbg.__wbg_setBindGroup_7f3b61f1f482133b = function(arg0, arg1, arg2) { + arg0.setBindGroup(arg1 >>> 0, arg2); + }; + imports.wbg.__wbg_setBindGroup_bf767a5aa46a33ce = function(arg0, arg1, arg2, arg3, arg4, arg5, arg6) { + arg0.setBindGroup(arg1 >>> 0, arg2, getArrayU32FromWasm0(arg3, arg4), arg5, arg6 >>> 0); + }; + imports.wbg.__wbg_setBindGroup_c4aaff14063226b4 = function(arg0, arg1, arg2, arg3, arg4, arg5, arg6) { + arg0.setBindGroup(arg1 >>> 0, arg2, getArrayU32FromWasm0(arg3, arg4), arg5, arg6 >>> 0); + }; + imports.wbg.__wbg_setBindGroup_f82e771dc1b69093 = function(arg0, arg1, arg2) { + arg0.setBindGroup(arg1 >>> 0, arg2); + }; + imports.wbg.__wbg_setBlendConstant_016723821cfb3aa4 = function(arg0, arg1) { + arg0.setBlendConstant(arg1); + }; + imports.wbg.__wbg_setIndexBuffer_286a40afdff411b7 = function(arg0, arg1, arg2, arg3) { + arg0.setIndexBuffer(arg1, __wbindgen_enum_GpuIndexFormat[arg2], arg3); + }; + imports.wbg.__wbg_setIndexBuffer_7efd0b7a40c65fb9 = function(arg0, arg1, arg2, arg3, arg4) { + arg0.setIndexBuffer(arg1, __wbindgen_enum_GpuIndexFormat[arg2], arg3, arg4); + }; + imports.wbg.__wbg_setIndexBuffer_e091a9673bb575e2 = function(arg0, arg1, arg2, arg3) { + arg0.setIndexBuffer(arg1, __wbindgen_enum_GpuIndexFormat[arg2], arg3); + }; + imports.wbg.__wbg_setIndexBuffer_f0759f00036f615f = function(arg0, arg1, arg2, arg3, arg4) { + arg0.setIndexBuffer(arg1, __wbindgen_enum_GpuIndexFormat[arg2], arg3, arg4); + }; + imports.wbg.__wbg_setPipeline_ba92070b8ee81cf9 = function(arg0, arg1) { + arg0.setPipeline(arg1); + }; + imports.wbg.__wbg_setPipeline_c344f76bae58c4d6 = function(arg0, arg1) { + arg0.setPipeline(arg1); + }; + imports.wbg.__wbg_setPipeline_d76451c50a121598 = function(arg0, arg1) { + arg0.setPipeline(arg1); + }; + imports.wbg.__wbg_setPointerCapture_6b89bc3d20c408af = function() { return handleError(function (arg0, arg1) { + arg0.setPointerCapture(arg1); + }, arguments) }; + imports.wbg.__wbg_setProperty_b11b0bad191551d1 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) { + arg0.setProperty(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4)); + }, arguments) }; + imports.wbg.__wbg_setScissorRect_0b6ee0852ef0b6b9 = function(arg0, arg1, arg2, arg3, arg4) { + arg0.setScissorRect(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0, arg4 >>> 0); + }; + imports.wbg.__wbg_setStencilReference_34fd3d59673a5a9d = function(arg0, arg1) { + arg0.setStencilReference(arg1 >>> 0); + }; + imports.wbg.__wbg_setTimeout_11f3c7cad8433a4f = function() { return handleError(function (arg0, arg1, arg2) { + const ret = arg0.setTimeout(arg1, arg2); + return ret; + }, arguments) }; + imports.wbg.__wbg_setTimeout_15ba883433c836ab = function() { return handleError(function (arg0, arg1) { + const ret = arg0.setTimeout(arg1); + return ret; + }, arguments) }; + imports.wbg.__wbg_setVertexBuffer_06a90dc78e1ad9c4 = function(arg0, arg1, arg2, arg3, arg4) { + arg0.setVertexBuffer(arg1 >>> 0, arg2, arg3, arg4); + }; + imports.wbg.__wbg_setVertexBuffer_1540e9118b6c451d = function(arg0, arg1, arg2, arg3) { + arg0.setVertexBuffer(arg1 >>> 0, arg2, arg3); + }; + imports.wbg.__wbg_setVertexBuffer_5166eedc06450701 = function(arg0, arg1, arg2, arg3, arg4) { + arg0.setVertexBuffer(arg1 >>> 0, arg2, arg3, arg4); + }; + imports.wbg.__wbg_setVertexBuffer_8621784e5014065b = function(arg0, arg1, arg2, arg3) { + arg0.setVertexBuffer(arg1 >>> 0, arg2, arg3); + }; + imports.wbg.__wbg_setViewport_731ad30abb13f744 = function(arg0, arg1, arg2, arg3, arg4, arg5, arg6) { + arg0.setViewport(arg1, arg2, arg3, arg4, arg5, arg6); + }; + imports.wbg.__wbg_set_421385e996a16e02 = function() { return handleError(function (arg0, arg1, arg2) { + const ret = Reflect.set(arg0, arg1, arg2); + return ret; + }, arguments) }; + imports.wbg.__wbg_set_7b70226104a82921 = function(arg0, arg1, arg2) { + arg0.set(arg1, arg2 >>> 0); + }; + imports.wbg.__wbg_setautofocus_4268b2ccf2a3269c = function() { return handleError(function (arg0, arg1) { + arg0.autofocus = arg1 !== 0; + }, arguments) }; + imports.wbg.__wbg_setbox_f664fc1447c0b2bb = function(arg0, arg1) { + arg0.box = __wbindgen_enum_ResizeObserverBoxOptions[arg1]; + }; + imports.wbg.__wbg_setbuffer_f1a83346b928c758 = function(arg0, arg1) { + arg0.buffer = arg1; + }; + imports.wbg.__wbg_setchannelCount_d4540f84ec659b4f = function(arg0, arg1) { + arg0.channelCount = arg1 >>> 0; + }; + imports.wbg.__wbg_setcursor_c96a9337962c3df1 = function(arg0, arg1, arg2) { + arg0.cursor = getStringFromWasm0(arg1, arg2); + }; + imports.wbg.__wbg_setduration_e63f671ee21618f9 = function(arg0, arg1) { + arg0.duration = arg1; + }; + imports.wbg.__wbg_setheight_4286b13b9186d39f = function(arg0, arg1) { + arg0.height = arg1 >>> 0; + }; + imports.wbg.__wbg_setheight_7632621fed149fd9 = function(arg0, arg1) { + arg0.height = arg1 >>> 0; + }; + imports.wbg.__wbg_sethidden_c6c9489dde53eda9 = function(arg0, arg1) { + arg0.hidden = arg1 !== 0; + }; + imports.wbg.__wbg_setid_a376d4cf8b1ebf23 = function(arg0, arg1, arg2) { + arg0.id = getStringFromWasm0(arg1, arg2); + }; + imports.wbg.__wbg_setiterations_0c25c370b1dd2d0d = function(arg0, arg1) { + arg0.iterations = arg1; + }; + imports.wbg.__wbg_setonended_064db9a7078e45f3 = function(arg0, arg1) { + arg0.onended = arg1; + }; + imports.wbg.__wbg_setonmessage_1f177e6cba71d19d = function(arg0, arg1) { + arg0.onmessage = arg1; + }; + imports.wbg.__wbg_setonuncapturederror_19541466822d790b = function(arg0, arg1) { + arg0.onuncapturederror = arg1; + }; + imports.wbg.__wbg_setpremultiplyalpha_a44552819f642a3b = function(arg0, arg1) { + arg0.premultiplyAlpha = __wbindgen_enum_PremultiplyAlpha[arg1]; + }; + imports.wbg.__wbg_setsamplerate_843b76470413bdc3 = function(arg0, arg1) { + arg0.sampleRate = arg1; + }; + imports.wbg.__wbg_setsize_226e2427ccd1d3e4 = function(arg0, arg1) { + arg0.size = arg1 >>> 0; + }; + imports.wbg.__wbg_setsrc_e482aff9c408c49c = function(arg0, arg1, arg2) { + arg0.src = getStringFromWasm0(arg1, arg2); + }; + imports.wbg.__wbg_settype_202db174d92fe493 = function(arg0, arg1, arg2) { + arg0.type = getStringFromWasm0(arg1, arg2); + }; + imports.wbg.__wbg_settype_407738d1ed7fb627 = function(arg0, arg1, arg2) { + arg0.type = getStringFromWasm0(arg1, arg2); + }; + imports.wbg.__wbg_setvalue_c3b8653f179bcfd8 = function(arg0, arg1, arg2) { + arg0.value = getStringFromWasm0(arg1, arg2); + }; + imports.wbg.__wbg_setwidth_5e43e6e177d3e2ec = function(arg0, arg1) { + arg0.width = arg1 >>> 0; + }; + imports.wbg.__wbg_setwidth_db46810857c0f6bd = function(arg0, arg1) { + arg0.width = arg1 >>> 0; + }; + imports.wbg.__wbg_shaderSource_7d9e91c6b9aaf864 = function(arg0, arg1, arg2, arg3) { + arg0.shaderSource(arg1, getStringFromWasm0(arg2, arg3)); + }; + imports.wbg.__wbg_shaderSource_b7db90958962e1f7 = function(arg0, arg1, arg2, arg3) { + arg0.shaderSource(arg1, getStringFromWasm0(arg2, arg3)); + }; + imports.wbg.__wbg_shiftKey_570898b1142a9898 = function(arg0) { + const ret = arg0.shiftKey; + return ret; + }; + imports.wbg.__wbg_shiftKey_e90da27a3092777e = function(arg0) { + const ret = arg0.shiftKey; + return ret; + }; + imports.wbg.__wbg_signal_fd2d6d0644f16ad8 = function(arg0) { + const ret = arg0.signal; + return ret; + }; + imports.wbg.__wbg_size_661bddb3f9898121 = function(arg0) { + const ret = arg0.size; + return ret; + }; + imports.wbg.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) { + const ret = arg1.stack; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); + getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); + }; + imports.wbg.__wbg_start_36cd2a90ad906d25 = function() { return handleError(function (arg0, arg1) { + arg0.start(arg1); + }, arguments) }; + imports.wbg.__wbg_start_a00c28f297559e1d = function(arg0) { + arg0.start(); + }; + imports.wbg.__wbg_status_5f9868b7ed8dd175 = function(arg0) { + const ret = arg0.status; + return ret; + }; + imports.wbg.__wbg_stencilFuncSeparate_903776516b404f1e = function(arg0, arg1, arg2, arg3, arg4) { + arg0.stencilFuncSeparate(arg1 >>> 0, arg2 >>> 0, arg3, arg4 >>> 0); + }; + imports.wbg.__wbg_stencilFuncSeparate_9987b0fe1f74adc3 = function(arg0, arg1, arg2, arg3, arg4) { + arg0.stencilFuncSeparate(arg1 >>> 0, arg2 >>> 0, arg3, arg4 >>> 0); + }; + imports.wbg.__wbg_stencilMaskSeparate_24a5bad679d4896c = function(arg0, arg1, arg2) { + arg0.stencilMaskSeparate(arg1 >>> 0, arg2 >>> 0); + }; + imports.wbg.__wbg_stencilMaskSeparate_5ade706794e0ff10 = function(arg0, arg1, arg2) { + arg0.stencilMaskSeparate(arg1 >>> 0, arg2 >>> 0); + }; + imports.wbg.__wbg_stencilMask_8ccbc71e58e71b93 = function(arg0, arg1) { + arg0.stencilMask(arg1 >>> 0); + }; + imports.wbg.__wbg_stencilMask_e03561d8e6b7171a = function(arg0, arg1) { + arg0.stencilMask(arg1 >>> 0); + }; + imports.wbg.__wbg_stencilOpSeparate_13e313403862a2bc = function(arg0, arg1, arg2, arg3, arg4) { + arg0.stencilOpSeparate(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0, arg4 >>> 0); + }; + imports.wbg.__wbg_stencilOpSeparate_e03fe45a6a83cf8f = function(arg0, arg1, arg2, arg3, arg4) { + arg0.stencilOpSeparate(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0, arg4 >>> 0); + }; + imports.wbg.__wbg_stringify_f5476f15b5654a07 = function() { return handleError(function (arg0) { + const ret = JSON.stringify(arg0); + return ret; + }, arguments) }; + imports.wbg.__wbg_style_e7c4e0938a7565b2 = function(arg0) { + const ret = arg0.style; + return ret; + }; + imports.wbg.__wbg_subarray_b4e9772c34a7f5ba = function(arg0, arg1, arg2) { + const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0); + return ret; + }; + imports.wbg.__wbg_submit_f635072bb3d05faa = function(arg0, arg1) { + arg0.submit(arg1); + }; + imports.wbg.__wbg_texImage2D_102612af3b3ea301 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) { + arg0.texImage2D(arg1 >>> 0, arg2, arg3, arg4, arg5, arg6, arg7 >>> 0, arg8 >>> 0, arg9); + }, arguments) }; + imports.wbg.__wbg_texImage2D_38f7a3dc4dcf0183 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) { + arg0.texImage2D(arg1 >>> 0, arg2, arg3, arg4, arg5, arg6, arg7 >>> 0, arg8 >>> 0, arg9); + }, arguments) }; + imports.wbg.__wbg_texImage3D_4828de4d80648b9d = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10) { + arg0.texImage3D(arg1 >>> 0, arg2, arg3, arg4, arg5, arg6, arg7, arg8 >>> 0, arg9 >>> 0, arg10); + }, arguments) }; + imports.wbg.__wbg_texParameteri_2cc96bb59a67d4c2 = function(arg0, arg1, arg2, arg3) { + arg0.texParameteri(arg1 >>> 0, arg2 >>> 0, arg3); + }; + imports.wbg.__wbg_texParameteri_8e4109b7fbd3b875 = function(arg0, arg1, arg2, arg3) { + arg0.texParameteri(arg1 >>> 0, arg2 >>> 0, arg3); + }; + imports.wbg.__wbg_texStorage2D_728b9632dbd913e2 = function(arg0, arg1, arg2, arg3, arg4, arg5) { + arg0.texStorage2D(arg1 >>> 0, arg2, arg3 >>> 0, arg4, arg5); + }; + imports.wbg.__wbg_texStorage3D_04d10ef19e465ec2 = function(arg0, arg1, arg2, arg3, arg4, arg5, arg6) { + arg0.texStorage3D(arg1 >>> 0, arg2, arg3 >>> 0, arg4, arg5, arg6); + }; + imports.wbg.__wbg_texSubImage2D_0c095c30c73e34c0 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) { + arg0.texSubImage2D(arg1 >>> 0, arg2, arg3, arg4, arg5, arg6, arg7 >>> 0, arg8 >>> 0, arg9); + }, arguments) }; + imports.wbg.__wbg_texSubImage2D_3c9a9ceac3c27fe7 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) { + arg0.texSubImage2D(arg1 >>> 0, arg2, arg3, arg4, arg5, arg6, arg7 >>> 0, arg8 >>> 0, arg9); + }, arguments) }; + imports.wbg.__wbg_texSubImage2D_3dbb6fb895fd53a7 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) { + arg0.texSubImage2D(arg1 >>> 0, arg2, arg3, arg4, arg5, arg6, arg7 >>> 0, arg8 >>> 0, arg9); + }, arguments) }; + imports.wbg.__wbg_texSubImage2D_4e505a214a40fc20 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) { + arg0.texSubImage2D(arg1 >>> 0, arg2, arg3, arg4, arg5, arg6, arg7 >>> 0, arg8 >>> 0, arg9); + }, arguments) }; + imports.wbg.__wbg_texSubImage2D_7197aef4cdbc7d70 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) { + arg0.texSubImage2D(arg1 >>> 0, arg2, arg3, arg4, arg5, arg6, arg7 >>> 0, arg8 >>> 0, arg9); + }, arguments) }; + imports.wbg.__wbg_texSubImage2D_746d9e75d2dd12d1 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) { + arg0.texSubImage2D(arg1 >>> 0, arg2, arg3, arg4, arg5, arg6, arg7 >>> 0, arg8 >>> 0, arg9); + }, arguments) }; + imports.wbg.__wbg_texSubImage2D_ca1d7744b168aa02 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) { + arg0.texSubImage2D(arg1 >>> 0, arg2, arg3, arg4, arg5, arg6, arg7 >>> 0, arg8 >>> 0, arg9); + }, arguments) }; + imports.wbg.__wbg_texSubImage2D_da8455e8da280cee = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) { + arg0.texSubImage2D(arg1 >>> 0, arg2, arg3, arg4, arg5, arg6, arg7 >>> 0, arg8 >>> 0, arg9); + }, arguments) }; + imports.wbg.__wbg_texSubImage3D_82336f6100e3ef24 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11) { + arg0.texSubImage3D(arg1 >>> 0, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9 >>> 0, arg10 >>> 0, arg11); + }, arguments) }; + imports.wbg.__wbg_texSubImage3D_831e19830a791320 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11) { + arg0.texSubImage3D(arg1 >>> 0, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9 >>> 0, arg10 >>> 0, arg11); + }, arguments) }; + imports.wbg.__wbg_texSubImage3D_9623fc609df925f5 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11) { + arg0.texSubImage3D(arg1 >>> 0, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9 >>> 0, arg10 >>> 0, arg11); + }, arguments) }; + imports.wbg.__wbg_texSubImage3D_9a8cb5676fdf0b50 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11) { + arg0.texSubImage3D(arg1 >>> 0, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9 >>> 0, arg10 >>> 0, arg11); + }, arguments) }; + imports.wbg.__wbg_texSubImage3D_a18f6424082a9393 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11) { + arg0.texSubImage3D(arg1 >>> 0, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9 >>> 0, arg10 >>> 0, arg11); + }, arguments) }; + imports.wbg.__wbg_texSubImage3D_d127dad275801f75 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11) { + arg0.texSubImage3D(arg1 >>> 0, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9 >>> 0, arg10 >>> 0, arg11); + }, arguments) }; + imports.wbg.__wbg_texSubImage3D_ebd1f2b229a92c5d = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11) { + arg0.texSubImage3D(arg1 >>> 0, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9 >>> 0, arg10 >>> 0, arg11); + }, arguments) }; + imports.wbg.__wbg_then_5c6469c1e1da9e59 = function(arg0, arg1) { + const ret = arg0.then(arg1); + return ret; + }; + imports.wbg.__wbg_then_faeb8aed8c1629b7 = function(arg0, arg1, arg2) { + const ret = arg0.then(arg1, arg2); + return ret; + }; + imports.wbg.__wbg_toBlob_a591bb53cfebb90d = function() { return handleError(function (arg0, arg1) { + arg0.toBlob(arg1); + }, arguments) }; + imports.wbg.__wbg_transferFromImageBitmap_109617be53ff8cd0 = function(arg0, arg1) { + arg0.transferFromImageBitmap(arg1); + }; + imports.wbg.__wbg_type_c0d5d83032e9858a = function(arg0) { + const ret = arg0.type; + return (__wbindgen_enum_GpuCompilationMessageType.indexOf(ret) + 1 || 4) - 1; + }; + imports.wbg.__wbg_uniform1f_163e6ffe0d9805a4 = function(arg0, arg1, arg2) { + arg0.uniform1f(arg1, arg2); + }; + imports.wbg.__wbg_uniform1f_bb85eb8ed9248e52 = function(arg0, arg1, arg2) { + arg0.uniform1f(arg1, arg2); + }; + imports.wbg.__wbg_uniform1i_9fe01b91ff85aa85 = function(arg0, arg1, arg2) { + arg0.uniform1i(arg1, arg2); + }; + imports.wbg.__wbg_uniform1i_da7c764279d55bb5 = function(arg0, arg1, arg2) { + arg0.uniform1i(arg1, arg2); + }; + imports.wbg.__wbg_uniform1ui_1cd8b5fee3b44787 = function(arg0, arg1, arg2) { + arg0.uniform1ui(arg1, arg2 >>> 0); + }; + imports.wbg.__wbg_uniform2fv_40e0cc0b3d7ab815 = function(arg0, arg1, arg2, arg3) { + arg0.uniform2fv(arg1, getArrayF32FromWasm0(arg2, arg3)); + }; + imports.wbg.__wbg_uniform2fv_d7ec4f77d2282f77 = function(arg0, arg1, arg2, arg3) { + arg0.uniform2fv(arg1, getArrayF32FromWasm0(arg2, arg3)); + }; + imports.wbg.__wbg_uniform2iv_6d1ed66fa019f1a6 = function(arg0, arg1, arg2, arg3) { + arg0.uniform2iv(arg1, getArrayI32FromWasm0(arg2, arg3)); + }; + imports.wbg.__wbg_uniform2iv_b36969471f3bb8e2 = function(arg0, arg1, arg2, arg3) { + arg0.uniform2iv(arg1, getArrayI32FromWasm0(arg2, arg3)); + }; + imports.wbg.__wbg_uniform2uiv_e5d292b09c7c2eb4 = function(arg0, arg1, arg2, arg3) { + arg0.uniform2uiv(arg1, getArrayU32FromWasm0(arg2, arg3)); + }; + imports.wbg.__wbg_uniform3fv_4f40a7b75bcdeb91 = function(arg0, arg1, arg2, arg3) { + arg0.uniform3fv(arg1, getArrayF32FromWasm0(arg2, arg3)); + }; + imports.wbg.__wbg_uniform3fv_c6fea7086ffa568e = function(arg0, arg1, arg2, arg3) { + arg0.uniform3fv(arg1, getArrayF32FromWasm0(arg2, arg3)); + }; + imports.wbg.__wbg_uniform3iv_46cafa9a87333139 = function(arg0, arg1, arg2, arg3) { + arg0.uniform3iv(arg1, getArrayI32FromWasm0(arg2, arg3)); + }; + imports.wbg.__wbg_uniform3iv_c13167af320af60e = function(arg0, arg1, arg2, arg3) { + arg0.uniform3iv(arg1, getArrayI32FromWasm0(arg2, arg3)); + }; + imports.wbg.__wbg_uniform3uiv_7e60873d7a35f50b = function(arg0, arg1, arg2, arg3) { + arg0.uniform3uiv(arg1, getArrayU32FromWasm0(arg2, arg3)); + }; + imports.wbg.__wbg_uniform4f_2408c0a3b4a0941d = function(arg0, arg1, arg2, arg3, arg4, arg5) { + arg0.uniform4f(arg1, arg2, arg3, arg4, arg5); + }; + imports.wbg.__wbg_uniform4f_4eebf85a05c60a16 = function(arg0, arg1, arg2, arg3, arg4, arg5) { + arg0.uniform4f(arg1, arg2, arg3, arg4, arg5); + }; + imports.wbg.__wbg_uniform4fv_7ecf41f27e0e71ec = function(arg0, arg1, arg2, arg3) { + arg0.uniform4fv(arg1, getArrayF32FromWasm0(arg2, arg3)); + }; + imports.wbg.__wbg_uniform4fv_c88b1733f9a40a7a = function(arg0, arg1, arg2, arg3) { + arg0.uniform4fv(arg1, getArrayF32FromWasm0(arg2, arg3)); + }; + imports.wbg.__wbg_uniform4iv_0ee5d566bd3880e4 = function(arg0, arg1, arg2, arg3) { + arg0.uniform4iv(arg1, getArrayI32FromWasm0(arg2, arg3)); + }; + imports.wbg.__wbg_uniform4iv_cd69e9451d767045 = function(arg0, arg1, arg2, arg3) { + arg0.uniform4iv(arg1, getArrayI32FromWasm0(arg2, arg3)); + }; + imports.wbg.__wbg_uniform4uiv_c55d0b6c672eaf59 = function(arg0, arg1, arg2, arg3) { + arg0.uniform4uiv(arg1, getArrayU32FromWasm0(arg2, arg3)); + }; + imports.wbg.__wbg_uniformBlockBinding_e646e98e7f5da8fa = function(arg0, arg1, arg2, arg3) { + arg0.uniformBlockBinding(arg1, arg2 >>> 0, arg3 >>> 0); + }; + imports.wbg.__wbg_uniformMatrix2fv_ae2d3b42477e00fd = function(arg0, arg1, arg2, arg3, arg4) { + arg0.uniformMatrix2fv(arg1, arg2 !== 0, getArrayF32FromWasm0(arg3, arg4)); + }; + imports.wbg.__wbg_uniformMatrix2fv_d44126fac416e7e4 = function(arg0, arg1, arg2, arg3, arg4) { + arg0.uniformMatrix2fv(arg1, arg2 !== 0, getArrayF32FromWasm0(arg3, arg4)); + }; + imports.wbg.__wbg_uniformMatrix2x3fv_18d94e4451a372cc = function(arg0, arg1, arg2, arg3, arg4) { + arg0.uniformMatrix2x3fv(arg1, arg2 !== 0, getArrayF32FromWasm0(arg3, arg4)); + }; + imports.wbg.__wbg_uniformMatrix2x4fv_c34a8a330e7c94bd = function(arg0, arg1, arg2, arg3, arg4) { + arg0.uniformMatrix2x4fv(arg1, arg2 !== 0, getArrayF32FromWasm0(arg3, arg4)); + }; + imports.wbg.__wbg_uniformMatrix3fv_652493ea4042e14f = function(arg0, arg1, arg2, arg3, arg4) { + arg0.uniformMatrix3fv(arg1, arg2 !== 0, getArrayF32FromWasm0(arg3, arg4)); + }; + imports.wbg.__wbg_uniformMatrix3fv_a3b27e44f0ad7caa = function(arg0, arg1, arg2, arg3, arg4) { + arg0.uniformMatrix3fv(arg1, arg2 !== 0, getArrayF32FromWasm0(arg3, arg4)); + }; + imports.wbg.__wbg_uniformMatrix3x2fv_1bc7685c610e2b46 = function(arg0, arg1, arg2, arg3, arg4) { + arg0.uniformMatrix3x2fv(arg1, arg2 !== 0, getArrayF32FromWasm0(arg3, arg4)); + }; + imports.wbg.__wbg_uniformMatrix3x4fv_c99cdce05d7ffca9 = function(arg0, arg1, arg2, arg3, arg4) { + arg0.uniformMatrix3x4fv(arg1, arg2 !== 0, getArrayF32FromWasm0(arg3, arg4)); + }; + imports.wbg.__wbg_uniformMatrix4fv_a5f6838f6e217418 = function(arg0, arg1, arg2, arg3, arg4) { + arg0.uniformMatrix4fv(arg1, arg2 !== 0, getArrayF32FromWasm0(arg3, arg4)); + }; + imports.wbg.__wbg_uniformMatrix4fv_bbdf3d84ccedee84 = function(arg0, arg1, arg2, arg3, arg4) { + arg0.uniformMatrix4fv(arg1, arg2 !== 0, getArrayF32FromWasm0(arg3, arg4)); + }; + imports.wbg.__wbg_uniformMatrix4x2fv_05ec6db042145650 = function(arg0, arg1, arg2, arg3, arg4) { + arg0.uniformMatrix4x2fv(arg1, arg2 !== 0, getArrayF32FromWasm0(arg3, arg4)); + }; + imports.wbg.__wbg_uniformMatrix4x3fv_c393892235ce0f8b = function(arg0, arg1, arg2, arg3, arg4) { + arg0.uniformMatrix4x3fv(arg1, arg2 !== 0, getArrayF32FromWasm0(arg3, arg4)); + }; + imports.wbg.__wbg_unmap_8c2e8131b2aaa844 = function(arg0) { + arg0.unmap(); + }; + imports.wbg.__wbg_unobserve_9198337c0c96042f = function(arg0, arg1) { + arg0.unobserve(arg1); + }; + imports.wbg.__wbg_usage_13caa02888040e9f = function(arg0) { + const ret = arg0.usage; + return ret; + }; + imports.wbg.__wbg_useProgram_795e70e5047fcb65 = function(arg0, arg1) { + arg0.useProgram(arg1); + }; + imports.wbg.__wbg_useProgram_e84b53bf74bbe9b3 = function(arg0, arg1) { + arg0.useProgram(arg1); + }; + imports.wbg.__wbg_userAgentData_5e600df9bb352050 = function(arg0) { + const ret = arg0.userAgentData; + return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); + }; + imports.wbg.__wbg_userAgent_bfd54e5c60738678 = function() { return handleError(function (arg0, arg1) { + const ret = arg1.userAgent; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); + getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); + }, arguments) }; + imports.wbg.__wbg_valueOf_a2728b52687d72b4 = function(arg0) { + const ret = arg0.valueOf(); + return ret; + }; + imports.wbg.__wbg_value_b5aa6b1adcd4fcc2 = function(arg0) { + const ret = arg0.value; + return ret; + }; + imports.wbg.__wbg_value_e88c0b5368388056 = function(arg0, arg1) { + const ret = arg1.value; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); + getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); + }; + imports.wbg.__wbg_versions_c71aa1626a93e0a1 = function(arg0) { + const ret = arg0.versions; + return ret; + }; + imports.wbg.__wbg_vertexAttribDivisorANGLE_78ad959056e0feb7 = function(arg0, arg1, arg2) { + arg0.vertexAttribDivisorANGLE(arg1 >>> 0, arg2 >>> 0); + }; + imports.wbg.__wbg_vertexAttribDivisor_bc3026299e814316 = function(arg0, arg1, arg2) { + arg0.vertexAttribDivisor(arg1 >>> 0, arg2 >>> 0); + }; + imports.wbg.__wbg_vertexAttribIPointer_4397ca04b895d127 = function(arg0, arg1, arg2, arg3, arg4, arg5) { + arg0.vertexAttribIPointer(arg1 >>> 0, arg2, arg3 >>> 0, arg4, arg5); + }; + imports.wbg.__wbg_vertexAttribPointer_1738c34c1c0d57a0 = function(arg0, arg1, arg2, arg3, arg4, arg5, arg6) { + arg0.vertexAttribPointer(arg1 >>> 0, arg2, arg3 >>> 0, arg4 !== 0, arg5, arg6); + }; + imports.wbg.__wbg_vertexAttribPointer_34a2b143ee35746f = function(arg0, arg1, arg2, arg3, arg4, arg5, arg6) { + arg0.vertexAttribPointer(arg1 >>> 0, arg2, arg3 >>> 0, arg4 !== 0, arg5, arg6); + }; + imports.wbg.__wbg_videoHeight_7d8449d4b1aad15d = function(arg0) { + const ret = arg0.videoHeight; + return ret; + }; + imports.wbg.__wbg_videoWidth_134d623b7b20f203 = function(arg0) { + const ret = arg0.videoWidth; + return ret; + }; + imports.wbg.__wbg_viewport_04c48fc077486d94 = function(arg0, arg1, arg2, arg3, arg4) { + arg0.viewport(arg1, arg2, arg3, arg4); + }; + imports.wbg.__wbg_viewport_301bba26f65246ed = function(arg0, arg1, arg2, arg3, arg4) { + arg0.viewport(arg1, arg2, arg3, arg4); + }; + imports.wbg.__wbg_visibilityState_c2b01655a6777e68 = function(arg0) { + const ret = arg0.visibilityState; + return (__wbindgen_enum_VisibilityState.indexOf(ret) + 1 || 3) - 1; + }; + imports.wbg.__wbg_webkitExitFullscreen_da1f86a19cc44384 = function(arg0) { + arg0.webkitExitFullscreen(); + }; + imports.wbg.__wbg_webkitFullscreenElement_0c4654cdfe6894e5 = function(arg0) { + const ret = arg0.webkitFullscreenElement; + return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); + }; + imports.wbg.__wbg_webkitRequestFullscreen_fe95241c4f21ea63 = function(arg0) { + arg0.webkitRequestFullscreen(); + }; + imports.wbg.__wbg_width_514dd9b3b0cff49c = function(arg0) { + const ret = arg0.width; + return ret; + }; + imports.wbg.__wbg_width_551edb4bb900e3dd = function(arg0) { + const ret = arg0.width; + return ret; + }; + imports.wbg.__wbg_width_826b25a505a0b357 = function(arg0) { + const ret = arg0.width; + return ret; + }; + imports.wbg.__wbg_width_dfc6149b0c4d8821 = function(arg0) { + const ret = arg0.width; + return ret; + }; + imports.wbg.__wbg_width_e9eedd46da897708 = function(arg0) { + const ret = arg0.width; + return ret; + }; + imports.wbg.__wbg_width_ee6a46425045c0dd = function(arg0) { + const ret = arg0.width; + return ret; + }; + imports.wbg.__wbg_window_1a23defd102c72f4 = function() { return handleError(function () { + const ret = window.window; + return ret; + }, arguments) }; + imports.wbg.__wbg_writeBuffer_5ca4981365eb5ac0 = function(arg0, arg1, arg2, arg3, arg4, arg5) { + arg0.writeBuffer(arg1, arg2, arg3, arg4, arg5); + }; + imports.wbg.__wbg_writeTexture_246118eb2f5a1592 = function(arg0, arg1, arg2, arg3, arg4) { + arg0.writeTexture(arg1, arg2, arg3, arg4); + }; + imports.wbg.__wbg_x_72ea8d07f989a4d5 = function(arg0) { + const ret = arg0.x; + return ret; + }; + imports.wbg.__wbg_y_3a5a560bf09945d9 = function(arg0) { + const ret = arg0.y; + return ret; + }; + imports.wbg.__wbindgen_boolean_get = function(arg0) { + const v = arg0; + const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2; + return ret; + }; + imports.wbg.__wbindgen_cb_drop = function(arg0) { + const obj = arg0.original; + if (obj.cnt-- == 1) { + obj.a = 0; + return true; + } + const ret = false; + return ret; + }; + imports.wbg.__wbindgen_closure_wrapper117790 = function(arg0, arg1, arg2) { + const ret = makeMutClosure(arg0, arg1, 92563, __wbg_adapter_74); + return ret; + }; + imports.wbg.__wbindgen_closure_wrapper117792 = function(arg0, arg1, arg2) { + const ret = makeMutClosure(arg0, arg1, 92563, __wbg_adapter_74); + return ret; + }; + imports.wbg.__wbindgen_closure_wrapper131960 = function(arg0, arg1, arg2) { + const ret = makeMutClosure(arg0, arg1, 100487, __wbg_adapter_79); + return ret; + }; + imports.wbg.__wbindgen_closure_wrapper3032 = function(arg0, arg1, arg2) { + const ret = makeMutClosure(arg0, arg1, 1510, __wbg_adapter_36); + return ret; + }; + imports.wbg.__wbindgen_closure_wrapper3034 = function(arg0, arg1, arg2) { + const ret = makeMutClosure(arg0, arg1, 1510, __wbg_adapter_36); + return ret; + }; + imports.wbg.__wbindgen_closure_wrapper3036 = function(arg0, arg1, arg2) { + const ret = makeMutClosure(arg0, arg1, 1510, __wbg_adapter_36); + return ret; + }; + imports.wbg.__wbindgen_closure_wrapper3038 = function(arg0, arg1, arg2) { + const ret = makeMutClosure(arg0, arg1, 1510, __wbg_adapter_36); + return ret; + }; + imports.wbg.__wbindgen_closure_wrapper72376 = function(arg0, arg1, arg2) { + const ret = makeMutClosure(arg0, arg1, 54814, __wbg_adapter_71); + return ret; + }; + imports.wbg.__wbindgen_closure_wrapper7369 = function(arg0, arg1, arg2) { + const ret = makeMutClosure(arg0, arg1, 4282, __wbg_adapter_45); + return ret; + }; + imports.wbg.__wbindgen_closure_wrapper7370 = function(arg0, arg1, arg2) { + const ret = makeMutClosure(arg0, arg1, 4282, __wbg_adapter_48); + return ret; + }; + imports.wbg.__wbindgen_closure_wrapper7371 = function(arg0, arg1, arg2) { + const ret = makeMutClosure(arg0, arg1, 4282, __wbg_adapter_51); + return ret; + }; + imports.wbg.__wbindgen_closure_wrapper7372 = function(arg0, arg1, arg2) { + const ret = makeMutClosure(arg0, arg1, 4282, __wbg_adapter_51); + return ret; + }; + imports.wbg.__wbindgen_closure_wrapper7373 = function(arg0, arg1, arg2) { + const ret = makeMutClosure(arg0, arg1, 4282, __wbg_adapter_51); + return ret; + }; + imports.wbg.__wbindgen_closure_wrapper7374 = function(arg0, arg1, arg2) { + const ret = makeMutClosure(arg0, arg1, 4282, __wbg_adapter_51); + return ret; + }; + imports.wbg.__wbindgen_closure_wrapper7375 = function(arg0, arg1, arg2) { + const ret = makeMutClosure(arg0, arg1, 4282, __wbg_adapter_51); + return ret; + }; + imports.wbg.__wbindgen_closure_wrapper7376 = function(arg0, arg1, arg2) { + const ret = makeMutClosure(arg0, arg1, 4282, __wbg_adapter_51); + return ret; + }; + imports.wbg.__wbindgen_closure_wrapper7377 = function(arg0, arg1, arg2) { + const ret = makeMutClosure(arg0, arg1, 4282, __wbg_adapter_51); + return ret; + }; + imports.wbg.__wbindgen_closure_wrapper7378 = function(arg0, arg1, arg2) { + const ret = makeMutClosure(arg0, arg1, 4282, __wbg_adapter_66); + return ret; + }; + imports.wbg.__wbindgen_closure_wrapper7379 = function(arg0, arg1, arg2) { + const ret = makeMutClosure(arg0, arg1, 4282, __wbg_adapter_51); + return ret; + }; + imports.wbg.__wbindgen_debug_string = function(arg0, arg1) { + const ret = debugString(arg1); + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); + getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); + }; + imports.wbg.__wbindgen_init_externref_table = function() { + const table = wasm.__wbindgen_export_1; + const offset = table.grow(4); + table.set(0, undefined); + table.set(offset + 0, undefined); + table.set(offset + 1, null); + table.set(offset + 2, true); + table.set(offset + 3, false); + ; + }; + imports.wbg.__wbindgen_is_function = function(arg0) { + const ret = typeof(arg0) === 'function'; + return ret; + }; + imports.wbg.__wbindgen_is_null = function(arg0) { + const ret = arg0 === null; + return ret; + }; + imports.wbg.__wbindgen_is_object = function(arg0) { + const val = arg0; + const ret = typeof(val) === 'object' && val !== null; + return ret; + }; + imports.wbg.__wbindgen_is_string = function(arg0) { + const ret = typeof(arg0) === 'string'; + return ret; + }; + imports.wbg.__wbindgen_is_undefined = function(arg0) { + const ret = arg0 === undefined; + return ret; + }; + imports.wbg.__wbindgen_memory = function() { + const ret = wasm.memory; + return ret; + }; + imports.wbg.__wbindgen_number_get = function(arg0, arg1) { + const obj = arg1; + const ret = typeof(obj) === 'number' ? obj : undefined; + getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true); + getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true); + }; + imports.wbg.__wbindgen_number_new = function(arg0) { + const ret = arg0; + return ret; + }; + imports.wbg.__wbindgen_string_get = function(arg0, arg1) { + const obj = arg1; + const ret = typeof(obj) === 'string' ? obj : undefined; + var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len1 = WASM_VECTOR_LEN; + getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); + getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); + }; + imports.wbg.__wbindgen_string_new = function(arg0, arg1) { + const ret = getStringFromWasm0(arg0, arg1); + return ret; + }; + imports.wbg.__wbindgen_throw = function(arg0, arg1) { + throw new Error(getStringFromWasm0(arg0, arg1)); + }; + + return imports; +} + +function __wbg_init_memory(imports, memory) { + +} + +function __wbg_finalize_init(instance, module) { + wasm = instance.exports; + __wbg_init.__wbindgen_wasm_module = module; + cachedDataViewMemory0 = null; + cachedFloat32ArrayMemory0 = null; + cachedInt32ArrayMemory0 = null; + cachedUint32ArrayMemory0 = null; + cachedUint8ArrayMemory0 = null; + cachedUint8ClampedArrayMemory0 = null; + + + wasm.__wbindgen_start(); + return wasm; +} + +function initSync(module) { + if (wasm !== undefined) return wasm; + + + if (typeof module !== 'undefined') { + if (Object.getPrototypeOf(module) === Object.prototype) { + ({module} = module) + } else { + console.warn('using deprecated parameters for `initSync()`; pass a single object instead') + } + } + + const imports = __wbg_get_imports(); + + __wbg_init_memory(imports); + + if (!(module instanceof WebAssembly.Module)) { + module = new WebAssembly.Module(module); + } + + const instance = new WebAssembly.Instance(module, imports); + + return __wbg_finalize_init(instance, module); +} + +async function __wbg_init(module_or_path) { + if (wasm !== undefined) return wasm; + + + if (typeof module_or_path !== 'undefined') { + if (Object.getPrototypeOf(module_or_path) === Object.prototype) { + ({module_or_path} = module_or_path) + } else { + console.warn('using deprecated parameters for the initialization function; pass a single object instead') + } + } + + if (typeof module_or_path === 'undefined') { + module_or_path = new URL('bevy_compute_shader_bg.wasm', import.meta.url); + } + const imports = __wbg_get_imports(); + + if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) { + module_or_path = fetch(module_or_path); + } + + __wbg_init_memory(imports); + + const { instance, module } = await __wbg_load(await module_or_path, imports); + + return __wbg_finalize_init(instance, module); +} + +export { initSync }; +export default __wbg_init; diff --git a/dist/bevy_compute_shader-581bab24a49e81b0_bg.wasm b/dist/bevy_compute_shader-581bab24a49e81b0_bg.wasm new file mode 100644 index 0000000..2789b79 Binary files /dev/null and b/dist/bevy_compute_shader-581bab24a49e81b0_bg.wasm differ diff --git a/dist/index.html b/dist/index.html new file mode 100644 index 0000000..f8651e5 --- /dev/null +++ b/dist/index.html @@ -0,0 +1,211 @@ + + + + + + Bevy Compute Shader + + + + + +
+
+

Experiment with compute shadermain Bevy project.

+ +
+
+

Github

+
+ + +
+
+ + + + + \ No newline at end of file diff --git a/index.html b/index.html index ee8930c..bc9e1f0 100644 --- a/index.html +++ b/index.html @@ -11,7 +11,7 @@
-

Experiment with compute shadermain Bevy project.

+

Experiment with compute shader


diff --git a/src/.DS_Store b/src/.DS_Store new file mode 100644 index 0000000..4ca7ed5 Binary files /dev/null and b/src/.DS_Store differ diff --git a/src/gui.rs b/src/gui.rs index 54b1648..e83cac6 100644 --- a/src/gui.rs +++ b/src/gui.rs @@ -26,15 +26,18 @@ fn ui_system( // let mut radius = params.radius; egui::SidePanel::left("control_panel") - .resizable(true) - .default_width(200.0) + .resizable(false) + .default_width(600.0) .show(contexts.ctx_mut(), |ui| { - ui.heading("Circle"); + ui.heading("noiseeee"); ui.group(|ui| { ui.label("radius"); ui.add(egui::Slider::new(&mut params.radius, 0.0..=1.).text("radius")); ui.add(egui::Slider::new(&mut params.noise_amplitude, 0.0..=5.).text("amplitude")); ui.add(egui::Slider::new(&mut params.noise_scale, 0.0..=2.).text("scale")); + ui.add(egui::Slider::new(&mut params.noise_offset, 0.0..=20.).text("offset")); + ui.add(egui::Slider::new(&mut params.warp_amount, 0.0..=0.2).text("warp amount")); + ui.add(egui::Slider::new(&mut params.warp_scale, 1.0..=20.).text("warp scale")); }); }); } diff --git a/src/main.rs b/src/main.rs index 6b09c54..40cd21b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -23,11 +23,12 @@ use binding_types::uniform_buffer; use bytemuck::bytes_of; use gui::ParamsChanged; -/// This example uses a shader source file from the assets subdirectory -const SHADER1_ASSET_PATH: &str = "shaders/generate_circle.wgsl"; -const SHADER2_ASSET_PATH: &str = "shaders/second_pass.wgsl"; -const NOISE_SHADER_HANDLE: Handle = Handle::weak_from_u128(13378847158248049035); -const VECTOR_SHADER_HANDLE: Handle = Handle::weak_from_u128(23378847158248049035); + +const SHADER1_HANDLE: Handle = Handle::weak_from_u128(13378847158248049035); +const SHADER2_HANDLE: Handle = Handle::weak_from_u128(23378847158248049035); +const SHADER3_HANDLE: Handle = Handle::weak_from_u128(33378847158248049035); +const NOISE_SHADER_HANDLE: Handle = Handle::weak_from_u128(14378847158248049035); +const VECTOR_SHADER_HANDLE: Handle = Handle::weak_from_u128(25378847158248049035); // The length of the buffer sent to the gpu const BUFFER_LEN: usize = 1000; @@ -40,6 +41,9 @@ struct ParamsUniform { noise_seed: u32, noise_scale: f32, noise_amplitude: f32, + noise_offset: f32, + warp_amount: f32, + warp_scale: f32, } impl Default for ParamsUniform { @@ -50,6 +54,9 @@ impl Default for ParamsUniform { noise_seed: 0, noise_scale: 1.0, noise_amplitude: 1.0, + noise_offset: 0.0, + warp_amount: 0.0, + warp_scale: 0.0, } } } @@ -84,19 +91,42 @@ struct GpuReadbackPlugin; impl Plugin for GpuReadbackPlugin { fn build(&self, app: &mut App) { + // let asset_server = app.world().resource::(); + // let asset_path = asset_server. + // Load the noise shader first as an internal asset load_internal_asset!( app, NOISE_SHADER_HANDLE, - "../assets/shaders/utils/noise.wgsl", + "shaders/utils/noise.wgsl", Shader::from_wgsl ); load_internal_asset!( app, VECTOR_SHADER_HANDLE, - "../assets/shaders/utils/utils.wgsl", + "shaders/utils/utils.wgsl", + Shader::from_wgsl + ); + + load_internal_asset!( + app, + SHADER1_HANDLE, + "shaders/generate_circle.wgsl", + Shader::from_wgsl + ); + load_internal_asset!( + app, + SHADER2_HANDLE, + "shaders/domain_warp.wgsl", Shader::from_wgsl ); + load_internal_asset!( + app, + SHADER3_HANDLE, + "shaders/3rd_pass.wgsl", + Shader::from_wgsl + ); + } fn finish(&self, app: &mut App) { @@ -117,13 +147,11 @@ impl Plugin for GpuReadbackPlugin { render_graph.add_node(ComputeNodeLabel1, ComputeNode{ pass_index: 0}); render_graph.add_node(ComputeNodeLabel2, ComputeNode{ pass_index: 1}); + render_graph.add_node(ComputeNodeLabel3, ComputeNode{ pass_index: 2}); render_graph.add_node_edge(ComputeNodeLabel1, ComputeNodeLabel2); + render_graph.add_node_edge(ComputeNodeLabel2, ComputeNodeLabel3); - // render_app - // .world_mut() - // .resource_mut::() - // .add_node(ComputeNodeLabel, ComputeNode::default()); - render_app.add_event::(); + } } @@ -131,6 +159,7 @@ impl Plugin for GpuReadbackPlugin { struct ReadbackImage { ping: Handle, pong: Handle, + result: Handle, } fn setup(mut commands: Commands, mut images: ResMut>) { @@ -153,8 +182,12 @@ fn setup(mut commands: Commands, mut images: ResMut>) { // We also need to enable the COPY_SRC, as well as STORAGE_BINDING so we can use it in the // compute shader - image.texture_descriptor.usage |= TextureUsages::COPY_SRC | TextureUsages::STORAGE_BINDING; - let image = images.add(image); + image.texture_descriptor.usage |= + TextureUsages::COPY_SRC | + TextureUsages::COPY_DST | + TextureUsages::STORAGE_BINDING | + TextureUsages::TEXTURE_BINDING; + let mut create_image = || { let mut image = Image::new_fill( @@ -162,7 +195,6 @@ fn setup(mut commands: Commands, mut images: ResMut>) { TextureDimension::D2, &[0, 0, 0, 0], TextureFormat::Rgba32Float, - // TextureFormat::R32Uint, RenderAssetUsages::RENDER_WORLD, ); image.texture_descriptor.usage |= TextureUsages::COPY_SRC | TextureUsages::STORAGE_BINDING; @@ -171,7 +203,8 @@ fn setup(mut commands: Commands, mut images: ResMut>) { let ping = create_image(); let pong = create_image(); - commands.spawn(Readback::texture(ping.clone())); + let result = create_image(); + // commands.spawn(Readback::texture(pong.clone())); // Spawn the readback components. For each frame, the data will be read back from the GPU // asynchronously and trigger the `ReadbackComplete` event on this entity. Despawn the entity @@ -179,12 +212,11 @@ fn setup(mut commands: Commands, mut images: ResMut>) { // Textures can also be read back from the GPU. Pay careful attention to the format of the // texture, as it will affect how the data is interpreted. - // commands.spawn(Readback::texture(image.clone())); + // commands.spawn(Readback::texture(pong.clone())); commands.spawn(( - // Sprite::from_image(image.clone()), Sprite { - image: ping.clone(), + image: result.clone(), custom_size: Some(Vec2::splat(1000.0)), ..Default::default() }, @@ -194,8 +226,9 @@ fn setup(mut commands: Commands, mut images: ResMut>) { // This is just a simple way to pass the image handle to the render app for our compute node // commands.insert_resource(ReadbackImage(image)); commands.insert_resource(ReadbackImage { - ping: ping.clone(), + ping: ping, pong: pong, + result: result, }); } @@ -203,13 +236,10 @@ fn setup(mut commands: Commands, mut images: ResMut>) { struct GpuBufferBindGroups { first_pass: BindGroup, second_pass: BindGroup, + third_pass: BindGroup, uniform_buffer: Buffer, } -// #[derive(Resource)] -// struct GpuBufferBindGroup { -// bind_group: BindGroup, -// uniform_buffer: Buffer, -// } + fn prepare_bind_groups( mut commands: Commands, @@ -231,6 +261,7 @@ fn prepare_bind_groups( let ping_image = images.get(&image.ping).unwrap(); let pong_image = images.get(&image.pong).unwrap(); + let result_image = images.get(&image.result).unwrap(); let first_pass = render_device.create_bind_group( None, @@ -250,9 +281,21 @@ fn prepare_bind_groups( ping_image.texture_view.into_binding(), )), ); + let third_pass = render_device.create_bind_group( + None, + &pipeline.layout, + &BindGroupEntries::sequential(( + uniform_buffer.as_entire_buffer_binding(), + ping_image.texture_view.into_binding(), + result_image.texture_view.into_binding(), + )), + ); + + commands.insert_resource(GpuBufferBindGroups { first_pass, second_pass, + third_pass, uniform_buffer, }); } @@ -262,6 +305,7 @@ struct ComputePipelines { layout: BindGroupLayout, first_pass: CachedComputePipelineId, second_pass: CachedComputePipelineId, + third_pass: CachedComputePipelineId, } impl FromWorld for ComputePipelines { @@ -278,24 +322,36 @@ impl FromWorld for ComputePipelines { ), ), ); - let shader1 = world.load_asset(SHADER1_ASSET_PATH); + // let shader1 = world.load_asset(SHADER1_ASSET_PATH); + // let shader1 = let pipeline_cache = world.resource::(); let first_pass = pipeline_cache.queue_compute_pipeline(ComputePipelineDescriptor { label: Some("First pass".into()), layout: vec![layout.clone()], push_constant_ranges: Vec::new(), - shader: shader1.clone(), + // shader: shader1.clone(), + shader: SHADER1_HANDLE, shader_defs: Vec::new(), entry_point: "main".into(), zero_initialize_workgroup_memory: false, }); - let shader2 = world.load_asset(SHADER2_ASSET_PATH); + // let shader2 = world.load_asset(SHADER2_ASSET_PATH); let second_pass = pipeline_cache.queue_compute_pipeline(ComputePipelineDescriptor { - label: Some("First pass".into()), + label: Some("Second pass".into()), layout: vec![layout.clone()], push_constant_ranges: Vec::new(), - shader: shader2.clone(), + shader: SHADER2_HANDLE, + shader_defs: Vec::new(), + entry_point: "main".into(), + zero_initialize_workgroup_memory: false, + }); + + let third_pass = pipeline_cache.queue_compute_pipeline(ComputePipelineDescriptor { + label: Some("Third pass".into()), + layout: vec![layout.clone()], + push_constant_ranges: Vec::new(), + shader: SHADER3_HANDLE, shader_defs: Vec::new(), entry_point: "main".into(), zero_initialize_workgroup_memory: false, @@ -305,51 +361,19 @@ impl FromWorld for ComputePipelines { layout, first_pass, second_pass, + third_pass, } } } -// #[derive(Resource)] -// struct ComputePipeline { -// layout: BindGroupLayout, -// pipeline: CachedComputePipelineId, -// } - -// impl FromWorld for ComputePipeline { -// fn from_world(world: &mut World) -> Self { -// let render_device = world.resource::(); -// let layout = render_device.create_bind_group_layout( -// None, -// &BindGroupLayoutEntries::sequential( -// ShaderStages::COMPUTE, -// ( -// uniform_buffer::(false), -// texture_storage_2d(TextureFormat::Rgba32Float, StorageTextureAccess::WriteOnly), -// texture_storage_2d(TextureFormat::Rgba32Float, StorageTextureAccess::WriteOnly), -// ), -// ), -// ); -// let shader = world.load_asset(SHADER1_ASSET_PATH); - -// let pipeline_cache = world.resource::(); -// let pipeline = pipeline_cache.queue_compute_pipeline(ComputePipelineDescriptor { -// label: Some("GPU readback compute shader".into()), -// layout: vec![layout.clone()], -// push_constant_ranges: Vec::new(), -// shader: shader.clone(), -// shader_defs: Vec::new(), -// entry_point: "main".into(), -// zero_initialize_workgroup_memory: false, -// }); -// ComputePipeline { layout, pipeline } -// } -// } /// Label to identify the node in the render graph #[derive(Debug, Hash, PartialEq, Eq, Clone, RenderLabel)] struct ComputeNodeLabel1; #[derive(Debug, Hash, PartialEq, Eq, Clone, RenderLabel)] struct ComputeNodeLabel2; +#[derive(Debug, Hash, PartialEq, Eq, Clone, RenderLabel)] +struct ComputeNodeLabel3; /// The node that will execute the compute shader #[derive(Default)] @@ -370,10 +394,12 @@ impl render_graph::Node for ComputeNode { let (pipeline_id, bind_group) = match self.pass_index { 0 => (pipelines.first_pass, &bind_groups.first_pass), 1 => (pipelines.second_pass, &bind_groups.second_pass), + 2 => (pipelines.third_pass, &bind_groups.third_pass), _ => return Ok(()), }; - + println!("Running pass {}", self.pass_index); if let Some(pipeline) = pipeline_cache.get_compute_pipeline(pipeline_id) { + println!("Pipeline ready for pass {}", self.pass_index); let mut pass = render_context .command_encoder() .begin_compute_pass(&ComputePassDescriptor::default()); @@ -381,21 +407,16 @@ impl render_graph::Node for ComputeNode { pass.set_bind_group(0, bind_group, &[]); pass.set_pipeline(pipeline); pass.dispatch_workgroups(BUFFER_LEN as u32, BUFFER_LEN as u32, 1); + + + + }else { + println!("Pipeline not ready for pass {}", self.pass_index); } - // if let Some(init_pipeline) = pipeline_cache.get_compute_pipeline(pipeline.pipeline) { - // let mut pass = - // render_context - // .command_encoder() - // .begin_compute_pass(&ComputePassDescriptor { - // label: Some("GPU readback compute pass"), - // ..default() - // }); - - // pass.set_bind_group(0, &bind_group.bind_group, &[]); - // pass.set_pipeline(init_pipeline); - // pass.dispatch_workgroups(BUFFER_LEN as u32, BUFFER_LEN as u32, 1); - // } + + + Ok(()) } } diff --git a/src/shaders/3rd_pass.wgsl b/src/shaders/3rd_pass.wgsl new file mode 100644 index 0000000..a7f5b5d --- /dev/null +++ b/src/shaders/3rd_pass.wgsl @@ -0,0 +1,31 @@ +struct Params { + dimensions: u32, + radius: f32, + noise_seed: u32, + noise_scale: f32, + noise_amplitude: f32, + noise_offset: f32, + warp_amount: f32, + warp_scale: f32, +} + +@group(0) @binding(0) var params: Params; +@group(0) @binding(1) var input_texture: texture_storage_2d; +@group(0) @binding(2) var output_texture: texture_storage_2d; + +@compute @workgroup_size(8, 8) +fn main(@builtin(global_invocation_id) global_id: vec3) { + let x = global_id.x; + let y = global_id.y; + + if (x >= params.dimensions || y >= params.dimensions) { + return; + } + + let upos = vec2(i32(x), i32(y)); + + let current = textureLoad(input_texture, upos); + + // Write solid red to verify shader is writing + textureStore(output_texture, upos, vec4f(1-current.r, current.g, current.b, 1.0)); +} diff --git a/src/shaders/domain_warp.wgsl b/src/shaders/domain_warp.wgsl new file mode 100644 index 0000000..d9a9742 --- /dev/null +++ b/src/shaders/domain_warp.wgsl @@ -0,0 +1,70 @@ +#import compute::noise +#import compute::utils + +struct Params { + dimensions: u32, + radius: f32, + noise_seed: u32, + noise_scale: f32, + noise_amplitude: f32, + noise_offset: f32, + warp_amount: f32, // Controls the intensity of the warping + warp_scale: f32, // Controls the scale of the noise used for warping +} + +@group(0) @binding(0) var params: Params; +@group(0) @binding(1) var input_texture: texture_storage_2d; +@group(0) @binding(2) var output_texture: texture_storage_2d; + +fn sample_with_offset(pos: vec2, offset: vec2) -> vec4 { + let dim = f32(params.dimensions); + let new_pos = vec2( + i32(clamp(f32(pos.x) + offset.x * dim, 0.0, dim - 1.0)), + i32(clamp(f32(pos.y) + offset.y * dim, 0.0, dim - 1.0)) + ); + return textureLoad(input_texture, new_pos); +} + +@compute @workgroup_size(8, 8) +fn main(@builtin(global_invocation_id) global_id: vec3) { + let x = global_id.x; + let y = global_id.y; + + // Early return if we're outside the texture dimensions + if (x >= params.dimensions || y >= params.dimensions) { + return; + } + + +// let upos = vec2(i32(x), i32(y)); +// textureStore(output_texture, upos, vec4f(0.0, 0.0, 1.0, 1.0)); // Solid blue + +// } + + + let upos = vec2(i32(x), i32(y)); + let dim = f32(params.dimensions); + + // Convert position to 0-1 range for noise generation + let pos = vec2f(f32(x) / dim, f32(y) / dim); + + // Generate two noise values for x and y offsets + let noise_pos = pos * params.warp_scale; + let noise_x = noise::fbm(noise_pos + vec2(0.0, 0.0)); + let noise_y = noise::fbm(noise_pos + vec2(3.33, 2.77)); + + // Create offset vector + let offset = vec2f( + noise_x * params.warp_amount, + noise_y * params.warp_amount + ); + + // Sample the texture with the warped coordinates + let warped_value = sample_with_offset(upos, offset); + + // You can blend between the original and warped version if desired + let original_value = textureLoad(input_texture, upos); + + + textureStore(output_texture, upos, warped_value); +} \ No newline at end of file diff --git a/assets/shaders/generate_circle.wgsl b/src/shaders/generate_circle.wgsl similarity index 54% rename from assets/shaders/generate_circle.wgsl rename to src/shaders/generate_circle.wgsl index 23446f2..b871695 100644 --- a/assets/shaders/generate_circle.wgsl +++ b/src/shaders/generate_circle.wgsl @@ -1,52 +1,3 @@ -// #import compute::noise -// #import compute::utils -// // #import noise - -// struct Params { -// dimensions: u32, -// radius: f32, -// } -// @group(0) @binding(0) var params: Params; - - -// @group(0) @binding(1) var texture: texture_storage_2d; - -// @compute @workgroup_size(1) -// fn main(@builtin(global_invocation_id) global_id: vec3) { - -// let x = global_id.x; -// let y = global_id.y; -// let dim = params.dimensions; -// let pos = vec2( -// f32(x) / f32(dim), -// f32(y) / f32(dim) -// ); - -// let mult = 10.0; - -// // var seed = vec2( -// // pos.x *mult, -// // pos.y *mult -// // ); - -// let center = vec2(0.5, 0.5); -// let angle = atan2(pos.x - center.x, pos.y - center.y); // Get raw angle -// let seed = vec2f(cos(angle), sin(angle)); -// var n = noise::noise2(seed * mult); // mult to adjust noise frequency - -// n = utils::remap(n,-1.0,1.0,-0.01,0.01); - - - -// let r = params.radius * 2.0 + n; - -// let dist = distance(pos, center); -// let upos = vec2(i32(x), i32(y)); -// let v = select(0.0, 1.0, dist <= r); - -// textureStore(texture, upos, vec4(v , 0., 0., 1.)); -// } - #import compute::noise #import compute::utils @@ -56,6 +7,9 @@ struct Params { noise_seed: u32, noise_scale: f32, noise_amplitude: f32, + noise_offset: f32, + warp_amount: f32, // Controls the intensity of the warping + warp_scale: f32, // Controls the scale of the noise used for warping } // @group(0) @binding(0) var params: Params; // @group(0) @binding(1) var texture: texture_storage_2d; @@ -87,7 +41,7 @@ fn main(@builtin(global_invocation_id) global_id: vec3) { let angle = atan2(pos.x - center.x, pos.y - center.y); let seed = vec2f(cos(angle), sin(angle)); - var n = noise::noise2(seed * mult * params.noise_scale); + var n = noise::fbm((seed * mult * params.noise_scale) + params.noise_offset); n = utils::remap(n,-1.0,1.0,-0.01,0.01); n = n * params.noise_amplitude; diff --git a/assets/shaders/utils/fbm.wgsl b/src/shaders/utils/fbm.wgsl similarity index 100% rename from assets/shaders/utils/fbm.wgsl rename to src/shaders/utils/fbm.wgsl diff --git a/assets/shaders/utils/noise.wgsl b/src/shaders/utils/noise.wgsl similarity index 81% rename from assets/shaders/utils/noise.wgsl rename to src/shaders/utils/noise.wgsl index d6e4422..db0a07d 100644 --- a/assets/shaders/utils/noise.wgsl +++ b/src/shaders/utils/noise.wgsl @@ -1,6 +1,11 @@ #define_import_path compute::noise +// Noise functions from https://gist.github.com/munrocket/236ed5ba7e409b8bdf1ff6eca5dcdc39 + + + + // MIT License. © Ian McEwan, Stefan Gustavson, Munrocket, Johan Helsing // @@ -16,10 +21,6 @@ fn permute3(x: vec3f) -> vec3f { return mod289_3(((x * 34.) + 1.) * x); } -// fn noise2(v: vec2f) -> f32 { - -// return 1.0; -// } // MIT License. © Ian McEwan, Stefan Gustavson, Munrocket fn noise2(v: vec2f) -> f32 { @@ -66,4 +67,15 @@ fn noise2(v: vec2f) -> f32 { // Compute final noise value at P let g = vec3(a0.x * x0.x + h.x * x0.y, a0.yz * x12.xz + h.yz * x12.yw); return 130. * dot(m, g); +} + +fn fbm(p1: vec2f) -> f32 { + var m2: mat2x2f = mat2x2f(vec2f(0.8, 0.6), vec2f(-0.6, 0.8)); + var f: f32 = 0.; + var p = p1; + f = f + 0.5000 * noise2(p); p = m2 * p * 2.02; + f = f + 0.2500 * noise2(p); p = m2 * p * 2.03; + f = f + 0.1250 * noise2(p); p = m2 * p * 2.01; + f = f + 0.0625 * noise2(p); + return f / 0.9375; } \ No newline at end of file diff --git a/assets/shaders/utils/utils.wgsl b/src/shaders/utils/utils.wgsl similarity index 100% rename from assets/shaders/utils/utils.wgsl rename to src/shaders/utils/utils.wgsl