diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml new file mode 100644 index 0000000..5edb4ee --- /dev/null +++ b/.github/workflows/pages.yml @@ -0,0 +1,45 @@ +name: Github Pages + +# By default, runs if you push to master. keeps your deployed app in sync with master branch. +on: + push: + branches: + - master +# to only run when you do a new github release, comment out above part and uncomment the below trigger. +# on: +# release: +# types: +# - published + +permissions: + contents: write # for committing to gh-pages branch. + +jobs: + build-github-pages: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 # repo checkout + - uses: actions-rs/toolchain@v1 # get rust toolchain for wasm + with: + profile: minimal + toolchain: stable + target: wasm32-unknown-unknown + override: true + - name: Rust Cache # cache the rust build artefacts + uses: Swatinem/rust-cache@v1 + - name: Downlaod and Install Trunk binary + run: wget -qO- https://github.com/thedodd/trunk/releases/latest/download/trunk-x86_64-unknown-linux-gnu.tar.gz | tar -xzf- + - name: Build # build + # "${GITHUB_REPOSITORY#*/}" evaluates into the name of the repository + # using --public-url something will allow trunk to modify all the href paths like from favicon.ico to repo_name/favicon.ico . + # this is necessary for github pages where the site is deployed to username.github.io/repo_name and all files must be requested + # relatively as eframe_template/favicon.ico. if we skip public-url option, the href paths will instead request username.github.io/favicon.ico which + # will obviously return error 404 not found. + run: ./trunk build --release --public-url "${GITHUB_REPOSITORY#*/}" + - name: Deploy + uses: JamesIves/github-pages-deploy-action@v4 + with: + folder: dist + # this option will not maintain any history of your previous pages deployment + # set to false if you want all page build to be committed to your gh-pages branch history + single-commit: true diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 595b233..16547fa 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -33,8 +33,8 @@ jobs: with: profile: minimal toolchain: stable + target: wasm32-unknown-unknown override: true - - run: rustup target add wasm32-unknown-unknown - uses: actions-rs/cargo@v1 with: command: check @@ -66,7 +66,7 @@ jobs: profile: minimal toolchain: stable override: true - - run: rustup component add rustfmt + components: rustfmt - uses: actions-rs/cargo@v1 with: command: fmt @@ -82,14 +82,14 @@ jobs: profile: minimal toolchain: stable override: true - - run: rustup component add clippy + components: clippy - uses: actions-rs/cargo@v1 with: command: clippy args: -- -D warnings - wasm_bindgen: - name: wasm-bindgen + trunk: + name: trunk runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -97,7 +97,9 @@ jobs: with: profile: minimal toolchain: 1.61.0 + target: wasm32-unknown-unknown override: true - - run: rustup target add wasm32-unknown-unknown - - run: ./setup_web.sh - - run: ./wasm_bindgen_check.sh + - name: Downlaod and Install Trunk binary + run: wget -qO- https://github.com/thedodd/trunk/releases/latest/download/trunk-x86_64-unknown-linux-gnu.tar.gz | tar -xzf- + - name: Build + run: ./trunk build diff --git a/.gitignore b/.gitignore index ea8c4bf..a803f50 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /target +/dist \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index 5c7825a..00b392c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,5 @@ [package] name = "eframe_template" -default-run = "eframe_template_bin" version = "0.1.0" authors = ["Emil Ernerfeldt "] edition = "2021" @@ -8,13 +7,6 @@ rust-version = "1.60" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -[[bin]] -name = "eframe_template_bin" -path = "src/main.rs" - -[lib] -crate-type = ["cdylib", "rlib"] - [dependencies] egui = "0.18.0" diff --git a/README.md b/README.md index 8bc6647..2ec80cf 100644 --- a/README.md +++ b/README.md @@ -15,20 +15,15 @@ Start by clicking "Use this template" at https://github.com/emilk/eframe_templat Change the name of the crate: Chose a good name for your project, and change the name to it in: * `Cargo.toml` - * Change the `package.name` from `eframe_template` to `your_crate` + * Change the `package.name` from `eframe_template` to `your_crate`. * Change the `package.authors` - * Change the `package.default-run` from `eframe_template_bin` to `your_crate_bin` (note the `_bin`!) - * Change the `bin.name` from `eframe_template_bin` to `your_crate_bin` (note the `_bin`!) * `main.rs` * Change `eframe_template::TemplateApp` to `your_crate::TemplateApp` -* `docs/index.html` - * Change the `` - * Change the `<script src=…` line from `eframe_template.js` to `your_crate.js` - * Change the `wasm_bindgen(…` line from `eframe_template_bg.wasm` to `your_crate_bg.wasm` (note the `_bg`!) -* `docs/sw.js` - * Change the `'./eframe_template.js'` to `./your_crate.js` (in `filesToCache` array) - * Change the `'./eframe_template_bg.wasm'` to `./your_crate_bg.wasm` (in `filesToCache` array) -* Remove the web build of the old name: `rm docs/eframe_template*` +* `index.html` + * Chage the `<title>eframe template` to `your_crate`. optional. +* `assets/sw.js` + * Change the `'./eframe_template.js'` to `./your_crate.js` (in `filesToCache` array) + * Change the `'./eframe_template_bg.wasm'` to `./your_crate_bg.wasm` (in `filesToCache` array) ### Learning about egui @@ -50,38 +45,29 @@ On Fedora Rawhide you need to run: `dnf install clang clang-devel clang-tools-extra speech-dispatcher-devel libxkbcommon-devel pkg-config openssl-devel libxcb-devel` -For running the `build_web.sh` script you also need to install `jq` and `binaryen` with your packet manager of choice. +### Web Locally -### Compiling for the web +You can compile your app to [WASM](https://en.wikipedia.org/wiki/WebAssembly) and publish it as a web page. -Install [jq](https://stedolan.github.io/jq/download/). +We use [Trunk](https://trunkrs.dev/) to build for web target. +1. Install Trunk with `cargo install --locked trunk`. +2. run `trunk serve` to build and serve on `http://127.0.0.1:8080`. will rebuild automatically if you edit the project. +3. open `http://127.0.0.1:8080/index.html#dev` in a browser. see the warning below. -Make sure you are using the latest version of stable rust by running `rustup update`. +> `assets/sw.js` script will try to cache our app, and loads the cached version when it cannot connect to server allowing your app to work offline (like PWA). +> appending `#dev` to `index.html` will skip this caching, allowing us to load the latest builds during development. -You can compile your app to [WASM](https://en.wikipedia.org/wiki/WebAssembly) and publish it as a web page. For this you need to set up some tools. There are a few simple scripts that help you with this: - -```sh -./setup_web.sh -./start_server.sh -./build_web.sh --optimize --open -``` - -* `setup_web.sh` installs the tools required to build for web -* `start_server.sh` starts a local HTTP server so you can test before you publish -* `build_web.sh` compiles your code to WASM and puts it in the `docs/` folder (see below) and `--open` opens the result in your default browser. - -The finished web app is found in the `docs/` folder (this is so that you can easily share it with [GitHub Pages](https://docs.github.com/en/free-pro-team@latest/github/working-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site)). It consists of three files: - -* `index.html`: A few lines of HTML, CSS and JS that loads your app. **You need to edit this** (once) to replace `eframe_template` with the name of your crate! -* `your_crate_bg.wasm`: What the Rust code compiles to. -* `your_crate.js`: Auto-generated binding between Rust and JS. +### Web Deploy +1. Just run `trunk build --release`. +2. It will generate a `dist` directory as a "static html" website +3. Upload the `dist` directory to any of the numerous free hosting websites including [GitHub Pages](https://docs.github.com/en/free-pro-team@latest/github/working-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site). +4. we already provide a workflow that auto-deploys our app to github pages if you enable it. +> To enable Github Pages, you need to go to Respository -> Settings -> Pages -> Source -> set to `gh-pages` branch and `/` (root). +> +> If `gh-pages` is not availabe in `Source`, just create and push a branch called `gh-pages` and it should be available. You can test the template app at . -### Web testing/development - -Open `index.html#dev` to disable caching, which makes development easier. - ## Updating egui As of 2022, egui is in active development with frequent releases with breaking changes. [eframe_template](https://github.com/emilk/eframe_template/) will be updated in lock-step to always use the latest version of egui. diff --git a/Trunk.toml b/Trunk.toml new file mode 100644 index 0000000..bd6c484 --- /dev/null +++ b/Trunk.toml @@ -0,0 +1,2 @@ +[build] +filehash = false diff --git a/docs/favicon.ico b/assets/favicon.ico similarity index 100% rename from docs/favicon.ico rename to assets/favicon.ico diff --git a/docs/icon-1024.png b/assets/icon-1024.png similarity index 100% rename from docs/icon-1024.png rename to assets/icon-1024.png diff --git a/docs/icon-256.png b/assets/icon-256.png similarity index 100% rename from docs/icon-256.png rename to assets/icon-256.png diff --git a/docs/icon_ios_touch_192.png b/assets/icon_ios_touch_192.png similarity index 100% rename from docs/icon_ios_touch_192.png rename to assets/icon_ios_touch_192.png diff --git a/assets/manifest.json b/assets/manifest.json new file mode 100644 index 0000000..586cf91 --- /dev/null +++ b/assets/manifest.json @@ -0,0 +1,28 @@ +{ + "name": "Egui Template PWA", + "short_name": "egui-template-pwa", + "icons": [ + { + "src": "./icon-256.png", + "sizes": "256x256", + "type": "image/png" + }, + { + "src": "./maskable_icon_x512.png", + "sizes": "512x512", + "type": "image/png", + "purpose": "any maskable" + }, + { + "src": "./icon-1024.png", + "sizes": "1024x1024", + "type": "image/png" + } + ], + "lang": "en-US", + "id": "/index.html", + "start_url": "./index.html", + "display": "standalone", + "background_color": "white", + "theme_color": "white" +} \ No newline at end of file diff --git a/docs/maskable_icon_x512.png b/assets/maskable_icon_x512.png similarity index 100% rename from docs/maskable_icon_x512.png rename to assets/maskable_icon_x512.png diff --git a/docs/sw.js b/assets/sw.js similarity index 99% rename from docs/sw.js rename to assets/sw.js index 7ecd229..b2395f6 100644 --- a/docs/sw.js +++ b/assets/sw.js @@ -22,4 +22,4 @@ self.addEventListener('fetch', function (e) { return response || fetch(e.request); }) ); -}); +}); \ No newline at end of file diff --git a/build_web.bat b/build_web.bat deleted file mode 100644 index a3fcf93..0000000 --- a/build_web.bat +++ /dev/null @@ -1,78 +0,0 @@ -@echo off - -SET script_path=%~dp0 -cd %script_path% - -SET OPEN=0 -SET OPTIMIZE=0 - -:do_while - IF (%1) == () GOTO end_while - - IF %1 == -h GOTO print_help - IF %1 == --help GOTO print_help - - IF %1 == --optimize ( - SET OPTIMIZE=1 - SHIFT - GOTO do_while - ) - - IF %1 == --open ( - SET OPEN=1 - SHIFT - GOTO do_while - ) - - echo Unknown command "%1" -:end_while - -@REM call this first : `./setup_web.bat` - -for %%I in (.) do SET FOLDER_NAME=%%~nxI - -@REM assume crate name is the same as the folder name -SET CRATE_NAME=%FOLDER_NAME% - -@REM for those who name crates with-kebab-case -SET CRATE_NAME_SNAKE_CASE=%FOLDER_NAME:-=_% - -@REM This is required to enable the web_sys clipboard API which egui_web uses -@REM https://rustwasm.github.io/wasm-bindgen/api/web_sys/struct.Clipboard.html -@REM https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html -SET RUSTFLAGS=--cfg=web_sys_unstable_apis - -@REM Clear output from old stuff: -DEL /F docs\%CRATE_NAME_SNAKE_CASE%_bg.wasm - -echo Building rust... -SET BUILD=release -cargo build -p %CRATE_NAME% --release --lib --target wasm32-unknown-unknown - -@REM Get the output directory (in the workspace it is in another location) -FOR /F "delims=" %%i IN ('cargo metadata --format-version=1 ^| jq --raw-output .target_directory') DO SET TARGET=%%i - -echo Generating JS bindings for wasm... -SET TARGET_NAME=%CRATE_NAME_SNAKE_CASE%.wasm -wasm-bindgen "%TARGET%\wasm32-unknown-unknown\%BUILD%\%TARGET_NAME%" --out-dir "docs" --no-modules --no-typescript - -IF %OPTIMIZE% == 1 ( - echo Optimizing wasm... - @REM to get wasm-opt: apt/brew/dnf install binaryen - @REM add -g to get debug symbols : - wasm-opt "docs\%CRATE_NAME%_bg.wasm" -O2 --fast-math -o "docs\%CRATE_NAME%_bg.wasm" -) - -echo Finished: docs/%CRATE_NAME_SNAKE_CASE%.wasm" - -IF %OPEN% == 1 start http://localhost:8080/index.html - -GOTO end_program - -:print_help -echo build_web.sh [--optimize] [--open] -echo --optimize: optimize the generated WASM for performance -echo --open: open the result in a browser -GOTO end_program - -:end_program diff --git a/build_web.sh b/build_web.sh deleted file mode 100755 index 5a3a9ed..0000000 --- a/build_web.sh +++ /dev/null @@ -1,77 +0,0 @@ -#!/usr/bin/env bash -set -eu - -CRATE_NAME=${PWD##*/} # assume crate name is the same as the folder name - -script_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P ) -cd "$script_path" - -OPEN=false -OPTIMIZE=false - -while test $# -gt 0; do - case "$1" in - -h|--help) - echo "build_web.sh [--optimize] [--open]" - echo " --optimize: enable optimization step" - echo " --open: open the result in a browser" - exit 0 - ;; - -O|--optimize) - shift - OPTIMIZE=true - ;; - --open) - shift - OPEN=true - ;; - *) - break - ;; - esac -done - -./setup_web.sh - -CRATE_NAME_SNAKE_CASE="${CRATE_NAME//-/_}" # for those who name crates with-kebab-case - -# This is required to enable the web_sys clipboard API which egui_web uses -# https://rustwasm.github.io/wasm-bindgen/api/web_sys/struct.Clipboard.html -# https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html -export RUSTFLAGS=--cfg=web_sys_unstable_apis - -# Clear output from old stuff: -rm -f "docs/${CRATE_NAME_SNAKE_CASE}_bg.wasm" - -echo "Building rust…" -BUILD=release -cargo build -p "${CRATE_NAME}" --release --lib --target wasm32-unknown-unknown - -# Get the output directory (in the workspace it is in another location) -TARGET=$(cargo metadata --format-version=1 | jq --raw-output .target_directory) - -echo "Generating JS bindings for wasm…" -TARGET_NAME="${CRATE_NAME_SNAKE_CASE}.wasm" -WASM_PATH="${TARGET}/wasm32-unknown-unknown/${BUILD}/${TARGET_NAME}" -wasm-bindgen "${WASM_PATH}" --out-dir docs --no-modules --no-typescript - -if [[ "${OPTIMIZE}" == true ]]; then - echo "Optimizing wasm…" - # to get wasm-opt: apt/brew/dnf install binaryen - wasm-opt "docs/${CRATE_NAME}_bg.wasm" -O2 --fast-math -o "docs/${CRATE_NAME}_bg.wasm" # add -g to get debug symbols -fi - -echo "Finished: docs/${CRATE_NAME_SNAKE_CASE}.wasm" - -if [[ "${OPEN}" == true ]]; then - if [[ "$OSTYPE" == "linux-gnu"* ]]; then - # Linux, ex: Fedora - xdg-open http://localhost:8080/index.html#dev - elif [[ "$OSTYPE" == "msys" ]]; then - # Windows - start http://localhost:8080/index.html#dev - else - # Darwin/MacOS, or something else - open http://localhost:8080/index.html#dev - fi -fi diff --git a/docs/README.md b/docs/README.md deleted file mode 100644 index bf94f3e..0000000 --- a/docs/README.md +++ /dev/null @@ -1,3 +0,0 @@ -This folder contains the files required for the web app. - -The reason the folder is called "docs" is because that is the name that GitHub requires in order to host a web page from the `master` branch of a repository. You can test the `eframe_template` at . diff --git a/docs/eframe_template.js b/docs/eframe_template.js deleted file mode 100644 index 2ec1f68..0000000 --- a/docs/eframe_template.js +++ /dev/null @@ -1,1382 +0,0 @@ -let wasm_bindgen; -(function() { - const __exports = {}; - let wasm; - - const heap = new Array(32).fill(undefined); - - heap.push(undefined, null, true, false); - -function getObject(idx) { return heap[idx]; } - -let heap_next = heap.length; - -function dropObject(idx) { - if (idx < 36) return; - heap[idx] = heap_next; - heap_next = idx; -} - -function takeObject(idx) { - const ret = getObject(idx); - dropObject(idx); - return ret; -} - -function isLikeNone(x) { - return x === undefined || x === null; -} - -let cachegetFloat64Memory0 = null; -function getFloat64Memory0() { - if (cachegetFloat64Memory0 === null || cachegetFloat64Memory0.buffer !== wasm.memory.buffer) { - cachegetFloat64Memory0 = new Float64Array(wasm.memory.buffer); - } - return cachegetFloat64Memory0; -} - -let cachegetInt32Memory0 = null; -function getInt32Memory0() { - if (cachegetInt32Memory0 === null || cachegetInt32Memory0.buffer !== wasm.memory.buffer) { - cachegetInt32Memory0 = new Int32Array(wasm.memory.buffer); - } - return cachegetInt32Memory0; -} - -let WASM_VECTOR_LEN = 0; - -let cachegetUint8Memory0 = null; -function getUint8Memory0() { - if (cachegetUint8Memory0 === null || cachegetUint8Memory0.buffer !== wasm.memory.buffer) { - cachegetUint8Memory0 = new Uint8Array(wasm.memory.buffer); - } - return cachegetUint8Memory0; -} - -const cachedTextEncoder = new TextEncoder('utf-8'); - -const encodeString = (typeof cachedTextEncoder.encodeInto === 'function' - ? function (arg, view) { - return cachedTextEncoder.encodeInto(arg, view); -} - : function (arg, view) { - const buf = cachedTextEncoder.encode(arg); - view.set(buf); - return { - read: arg.length, - written: buf.length - }; -}); - -function passStringToWasm0(arg, malloc, realloc) { - - if (realloc === undefined) { - const buf = cachedTextEncoder.encode(arg); - const ptr = malloc(buf.length); - getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf); - WASM_VECTOR_LEN = buf.length; - return ptr; - } - - let len = arg.length; - let ptr = malloc(len); - - const mem = getUint8Memory0(); - - let offset = 0; - - for (; offset < len; offset++) { - const code = arg.charCodeAt(offset); - if (code > 0x7F) break; - mem[ptr + offset] = code; - } - - if (offset !== len) { - if (offset !== 0) { - arg = arg.slice(offset); - } - ptr = realloc(ptr, len, len = offset + arg.length * 3); - const view = getUint8Memory0().subarray(ptr + offset, ptr + len); - const ret = encodeString(arg, view); - - offset += ret.written; - } - - WASM_VECTOR_LEN = offset; - return ptr; -} - -const cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); - -cachedTextDecoder.decode(); - -function getStringFromWasm0(ptr, len) { - return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len)); -} - -function addHeapObject(obj) { - if (heap_next === heap.length) heap.push(heap.length + 1); - const idx = heap_next; - heap_next = heap[idx]; - - heap[idx] = obj; - return idx; -} - -function debugString(val) { - // primitive types - const type = typeof val; - if (type == 'number' || type == 'boolean' || val == null) { - return `${val}`; - } - if (type == 'string') { - return `"${val}"`; - } - if (type == 'symbol') { - const description = val.description; - if (description == null) { - return 'Symbol'; - } else { - return `Symbol(${description})`; - } - } - if (type == 'function') { - const name = val.name; - if (typeof name == 'string' && name.length > 0) { - return `Function(${name})`; - } else { - return 'Function'; - } - } - // objects - if (Array.isArray(val)) { - const length = val.length; - let debug = '['; - if (length > 0) { - debug += debugString(val[0]); - } - for(let i = 1; i < length; i++) { - debug += ', ' + debugString(val[i]); - } - debug += ']'; - return debug; - } - // Test for built-in - const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val)); - let className; - if (builtInMatches.length > 1) { - className = builtInMatches[1]; - } else { - // Failed to match the standard '[object ClassName]' - return toString.call(val); - } - if (className == 'Object') { - // we're a user defined class or Object - // JSON.stringify avoids problems with cycles, and is generally much - // easier than looping through ownProperties of `val`. - try { - return 'Object(' + JSON.stringify(val) + ')'; - } catch (_) { - return 'Object'; - } - } - // errors - if (val instanceof Error) { - return `${val.name}: ${val.message}\n${val.stack}`; - } - // TODO we could test for more things here, like `Set`s and `Map`s. - return className; -} - -function makeMutClosure(arg0, arg1, dtor, f) { - const state = { a: arg0, b: arg1, cnt: 1, dtor }; - const real = (...args) => { - // First up with a closure we increment the internal reference - // count. This ensures that the Rust closure environment won't - // be deallocated while we're invoking it. - state.cnt++; - const a = state.a; - state.a = 0; - try { - return f(a, state.b, ...args); - } finally { - if (--state.cnt === 0) { - wasm.__wbindgen_export_2.get(state.dtor)(a, state.b); - - } else { - state.a = a; - } - } - }; - real.original = state; - - return real; -} -function __wbg_adapter_24(arg0, arg1, arg2) { - wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h9760a9c9e2626dab(arg0, arg1, addHeapObject(arg2)); -} - -function __wbg_adapter_27(arg0, arg1) { - wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h4a1da0920468fcb4(arg0, arg1); -} - -function __wbg_adapter_30(arg0, arg1, arg2) { - wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h9760a9c9e2626dab(arg0, arg1, addHeapObject(arg2)); -} - -function __wbg_adapter_33(arg0, arg1) { - try { - const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); - wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hd62005321deefe7f(retptr, arg0, arg1); - var r0 = getInt32Memory0()[retptr / 4 + 0]; - var r1 = getInt32Memory0()[retptr / 4 + 1]; - if (r1) { - throw takeObject(r0); - } - } finally { - wasm.__wbindgen_add_to_stack_pointer(16); - } -} - -function __wbg_adapter_36(arg0, arg1, arg2) { - wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__ha2f39f81315ed630(arg0, arg1, addHeapObject(arg2)); -} - -/** -* This is the entry-point for all the web-assembly. -* This is called once from the HTML. -* It loads the app, installs some callbacks, then returns. -* You can add more callbacks like this if you want to call in to your code. -* @param {string} canvas_id -*/ -__exports.start = function(canvas_id) { - try { - const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); - const ptr0 = passStringToWasm0(canvas_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len0 = WASM_VECTOR_LEN; - wasm.start(retptr, ptr0, len0); - var r0 = getInt32Memory0()[retptr / 4 + 0]; - var r1 = getInt32Memory0()[retptr / 4 + 1]; - if (r1) { - throw takeObject(r0); - } - } finally { - wasm.__wbindgen_add_to_stack_pointer(16); - } -}; - -function handleError(f, args) { - try { - return f.apply(this, args); - } catch (e) { - wasm.__wbindgen_exn_store(addHeapObject(e)); - } -} - -async function load(module, imports) { - if (typeof Response === 'function' && module instanceof Response) { - if (typeof WebAssembly.instantiateStreaming === 'function') { - try { - return await WebAssembly.instantiateStreaming(module, imports); - - } catch (e) { - if (module.headers.get('Content-Type') != 'application/wasm') { - console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e); - - } else { - throw e; - } - } - } - - const bytes = await module.arrayBuffer(); - return await WebAssembly.instantiate(bytes, imports); - - } else { - const instance = await WebAssembly.instantiate(module, imports); - - if (instance instanceof WebAssembly.Instance) { - return { instance, module }; - - } else { - return instance; - } - } -} - -async function init(input) { - if (typeof input === 'undefined') { - let src; - if (typeof document === 'undefined') { - src = location.href; - } else { - src = document.currentScript.src; - } - input = src.replace(/\.js$/, '_bg.wasm'); - } - const imports = {}; - imports.wbg = {}; - imports.wbg.__wbg_log_02e20a3c32305fb7 = function(arg0, arg1) { - try { - console.log(getStringFromWasm0(arg0, arg1)); - } finally { - wasm.__wbindgen_free(arg0, arg1); - } - }; - imports.wbg.__wbg_log_5c7513aa8c164502 = function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) { - try { - console.log(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), getStringFromWasm0(arg4, arg5), getStringFromWasm0(arg6, arg7)); - } finally { - wasm.__wbindgen_free(arg0, arg1); - } - }; - imports.wbg.__wbg_mark_abc7631bdced64f0 = function(arg0, arg1) { - performance.mark(getStringFromWasm0(arg0, arg1)); - }; - imports.wbg.__wbindgen_object_drop_ref = function(arg0) { - takeObject(arg0); - }; - imports.wbg.__wbg_measure_c528ff64085b7146 = function() { return handleError(function (arg0, arg1, arg2, arg3) { - try { - performance.measure(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3)); - } finally { - wasm.__wbindgen_free(arg0, arg1); - wasm.__wbindgen_free(arg2, arg3); - } - }, arguments) }; - imports.wbg.__wbg_new_693216e109162396 = function() { - const ret = new Error(); - return addHeapObject(ret); - }; - imports.wbg.__wbg_stack_0ddaca5d1abfb52f = function(arg0, arg1) { - const ret = getObject(arg1).stack; - const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len0 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len0; - getInt32Memory0()[arg0 / 4 + 0] = ptr0; - }; - imports.wbg.__wbg_error_09919627ac0992f5 = function(arg0, arg1) { - try { - console.error(getStringFromWasm0(arg0, arg1)); - } finally { - wasm.__wbindgen_free(arg0, arg1); - } - }; - imports.wbg.__wbindgen_number_get = function(arg0, arg1) { - const obj = getObject(arg1); - const ret = typeof(obj) === 'number' ? obj : undefined; - getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret; - getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret); - }; - imports.wbg.__wbindgen_string_get = function(arg0, arg1) { - const obj = getObject(arg1); - const ret = typeof(obj) === 'string' ? obj : undefined; - var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len0; - getInt32Memory0()[arg0 / 4 + 0] = ptr0; - }; - imports.wbg.__wbindgen_cb_drop = function(arg0) { - const obj = takeObject(arg0).original; - if (obj.cnt-- == 1) { - obj.a = 0; - return true; - } - const ret = false; - return ret; - }; - imports.wbg.__wbindgen_string_new = function(arg0, arg1) { - const ret = getStringFromWasm0(arg0, arg1); - return addHeapObject(ret); - }; - imports.wbg.__wbindgen_boolean_get = function(arg0) { - const v = getObject(arg0); - const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2; - return ret; - }; - imports.wbg.__wbg_instanceof_WebGl2RenderingContext_e29e70ae6c00bfdd = function(arg0) { - const ret = getObject(arg0) instanceof WebGL2RenderingContext; - return ret; - }; - imports.wbg.__wbg_bindVertexArray_dfe63bf55a9f6e54 = function(arg0, arg1) { - getObject(arg0).bindVertexArray(getObject(arg1)); - }; - imports.wbg.__wbg_bufferData_8542921547008e80 = function(arg0, arg1, arg2, arg3) { - getObject(arg0).bufferData(arg1 >>> 0, getObject(arg2), arg3 >>> 0); - }; - imports.wbg.__wbg_createVertexArray_d502151c473563b2 = function(arg0) { - const ret = getObject(arg0).createVertexArray(); - return isLikeNone(ret) ? 0 : addHeapObject(ret); - }; - imports.wbg.__wbg_texImage2D_830d94fcfc70baf0 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) { - getObject(arg0).texImage2D(arg1 >>> 0, arg2, arg3, arg4, arg5, arg6, arg7 >>> 0, arg8 >>> 0, getObject(arg9)); - }, arguments) }; - imports.wbg.__wbg_texSubImage2D_f5b8e6e635a5736f = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) { - getObject(arg0).texSubImage2D(arg1 >>> 0, arg2, arg3, arg4, arg5, arg6, arg7 >>> 0, arg8 >>> 0, getObject(arg9)); - }, arguments) }; - imports.wbg.__wbg_texSubImage2D_b26e671fcb768c49 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) { - getObject(arg0).texSubImage2D(arg1 >>> 0, arg2, arg3, arg4, arg5, arg6, arg7 >>> 0, arg8 >>> 0, arg9); - }, arguments) }; - imports.wbg.__wbg_activeTexture_eec8b0e6c72c6814 = function(arg0, arg1) { - getObject(arg0).activeTexture(arg1 >>> 0); - }; - imports.wbg.__wbg_attachShader_0994bf956cb31b2b = function(arg0, arg1, arg2) { - getObject(arg0).attachShader(getObject(arg1), getObject(arg2)); - }; - imports.wbg.__wbg_bindBuffer_a5f37e5ebd81a1f6 = function(arg0, arg1, arg2) { - getObject(arg0).bindBuffer(arg1 >>> 0, getObject(arg2)); - }; - imports.wbg.__wbg_bindFramebuffer_6ef149f7d398d19f = function(arg0, arg1, arg2) { - getObject(arg0).bindFramebuffer(arg1 >>> 0, getObject(arg2)); - }; - imports.wbg.__wbg_bindRenderbuffer_1974e9f4fdd0b3af = function(arg0, arg1, arg2) { - getObject(arg0).bindRenderbuffer(arg1 >>> 0, getObject(arg2)); - }; - imports.wbg.__wbg_bindTexture_dbddb0b0c3efa1b9 = function(arg0, arg1, arg2) { - getObject(arg0).bindTexture(arg1 >>> 0, getObject(arg2)); - }; - imports.wbg.__wbg_blendEquationSeparate_ccdda0657b246bb0 = function(arg0, arg1, arg2) { - getObject(arg0).blendEquationSeparate(arg1 >>> 0, arg2 >>> 0); - }; - imports.wbg.__wbg_blendFuncSeparate_0aa8a7b4669fb810 = function(arg0, arg1, arg2, arg3, arg4) { - getObject(arg0).blendFuncSeparate(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0, arg4 >>> 0); - }; - imports.wbg.__wbg_clear_a9fbec6b33c4e095 = function(arg0, arg1) { - getObject(arg0).clear(arg1 >>> 0); - }; - imports.wbg.__wbg_clearColor_3973a216e3a63c8f = function(arg0, arg1, arg2, arg3, arg4) { - getObject(arg0).clearColor(arg1, arg2, arg3, arg4); - }; - imports.wbg.__wbg_colorMask_c92354ec3511685f = function(arg0, arg1, arg2, arg3, arg4) { - getObject(arg0).colorMask(arg1 !== 0, arg2 !== 0, arg3 !== 0, arg4 !== 0); - }; - imports.wbg.__wbg_compileShader_4940032085b41ed2 = function(arg0, arg1) { - getObject(arg0).compileShader(getObject(arg1)); - }; - imports.wbg.__wbg_createBuffer_b6dbd62c544371ed = function(arg0) { - const ret = getObject(arg0).createBuffer(); - return isLikeNone(ret) ? 0 : addHeapObject(ret); - }; - imports.wbg.__wbg_createFramebuffer_f656a97f24d2caf3 = function(arg0) { - const ret = getObject(arg0).createFramebuffer(); - return isLikeNone(ret) ? 0 : addHeapObject(ret); - }; - imports.wbg.__wbg_createProgram_6a25e4bb5cfaad4b = function(arg0) { - const ret = getObject(arg0).createProgram(); - return isLikeNone(ret) ? 0 : addHeapObject(ret); - }; - imports.wbg.__wbg_createRenderbuffer_e66ea157342e02e9 = function(arg0) { - const ret = getObject(arg0).createRenderbuffer(); - return isLikeNone(ret) ? 0 : addHeapObject(ret); - }; - imports.wbg.__wbg_createShader_c17c7cf4768e0737 = function(arg0, arg1) { - const ret = getObject(arg0).createShader(arg1 >>> 0); - return isLikeNone(ret) ? 0 : addHeapObject(ret); - }; - imports.wbg.__wbg_createTexture_0df375980a9c46c9 = function(arg0) { - const ret = getObject(arg0).createTexture(); - return isLikeNone(ret) ? 0 : addHeapObject(ret); - }; - imports.wbg.__wbg_deleteShader_b6480fae6d31ca67 = function(arg0, arg1) { - getObject(arg0).deleteShader(getObject(arg1)); - }; - imports.wbg.__wbg_deleteTexture_8c7434cb1b20f64f = function(arg0, arg1) { - getObject(arg0).deleteTexture(getObject(arg1)); - }; - imports.wbg.__wbg_detachShader_a3e090b94d09c8a2 = function(arg0, arg1, arg2) { - getObject(arg0).detachShader(getObject(arg1), getObject(arg2)); - }; - imports.wbg.__wbg_disable_ec8402e41edbe277 = function(arg0, arg1) { - getObject(arg0).disable(arg1 >>> 0); - }; - imports.wbg.__wbg_disableVertexAttribArray_8da45bfa7fa5a02d = function(arg0, arg1) { - getObject(arg0).disableVertexAttribArray(arg1 >>> 0); - }; - imports.wbg.__wbg_drawElements_a192faf49b4975d6 = function(arg0, arg1, arg2, arg3, arg4) { - getObject(arg0).drawElements(arg1 >>> 0, arg2, arg3 >>> 0, arg4); - }; - imports.wbg.__wbg_enable_51cc5ea7d16e475c = function(arg0, arg1) { - getObject(arg0).enable(arg1 >>> 0); - }; - imports.wbg.__wbg_enableVertexAttribArray_85c507778523db86 = function(arg0, arg1) { - getObject(arg0).enableVertexAttribArray(arg1 >>> 0); - }; - imports.wbg.__wbg_framebufferRenderbuffer_d73f3cb3e5a605a2 = function(arg0, arg1, arg2, arg3, arg4) { - getObject(arg0).framebufferRenderbuffer(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0, getObject(arg4)); - }; - imports.wbg.__wbg_framebufferTexture2D_e07b69d4972eccfd = function(arg0, arg1, arg2, arg3, arg4, arg5) { - getObject(arg0).framebufferTexture2D(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0, getObject(arg4), arg5); - }; - imports.wbg.__wbg_getAttribLocation_ae4109e1d8e7050f = function(arg0, arg1, arg2, arg3) { - const ret = getObject(arg0).getAttribLocation(getObject(arg1), getStringFromWasm0(arg2, arg3)); - return ret; - }; - imports.wbg.__wbg_getError_cc18cbef4864f62f = function(arg0) { - const ret = getObject(arg0).getError(); - return ret; - }; - imports.wbg.__wbg_getExtension_22c72750813222f6 = function() { return handleError(function (arg0, arg1, arg2) { - const ret = getObject(arg0).getExtension(getStringFromWasm0(arg1, arg2)); - return isLikeNone(ret) ? 0 : addHeapObject(ret); - }, arguments) }; - imports.wbg.__wbg_getParameter_00a3d89e6e005c2f = function() { return handleError(function (arg0, arg1) { - const ret = getObject(arg0).getParameter(arg1 >>> 0); - return addHeapObject(ret); - }, arguments) }; - imports.wbg.__wbg_getProgramInfoLog_234b1b9dbbc9282f = function(arg0, arg1, arg2) { - const ret = getObject(arg1).getProgramInfoLog(getObject(arg2)); - var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len0; - getInt32Memory0()[arg0 / 4 + 0] = ptr0; - }; - imports.wbg.__wbg_getProgramParameter_4100b1077a68e2ec = function(arg0, arg1, arg2) { - const ret = getObject(arg0).getProgramParameter(getObject(arg1), arg2 >>> 0); - return addHeapObject(ret); - }; - imports.wbg.__wbg_getShaderInfoLog_a680dbc6e8440e5b = function(arg0, arg1, arg2) { - const ret = getObject(arg1).getShaderInfoLog(getObject(arg2)); - var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len0; - getInt32Memory0()[arg0 / 4 + 0] = ptr0; - }; - imports.wbg.__wbg_getShaderParameter_87e97ffc5dc7fb05 = function(arg0, arg1, arg2) { - const ret = getObject(arg0).getShaderParameter(getObject(arg1), arg2 >>> 0); - return addHeapObject(ret); - }; - imports.wbg.__wbg_getSupportedExtensions_f7eec3b83ce8c78d = function(arg0) { - const ret = getObject(arg0).getSupportedExtensions(); - return isLikeNone(ret) ? 0 : addHeapObject(ret); - }; - imports.wbg.__wbg_getUniformLocation_201fd94276e7dc6f = function(arg0, arg1, arg2, arg3) { - const ret = getObject(arg0).getUniformLocation(getObject(arg1), getStringFromWasm0(arg2, arg3)); - return isLikeNone(ret) ? 0 : addHeapObject(ret); - }; - imports.wbg.__wbg_linkProgram_edd275997033948d = function(arg0, arg1) { - getObject(arg0).linkProgram(getObject(arg1)); - }; - imports.wbg.__wbg_pixelStorei_db7d39661916037c = function(arg0, arg1, arg2) { - getObject(arg0).pixelStorei(arg1 >>> 0, arg2); - }; - imports.wbg.__wbg_renderbufferStorage_6ded6b343c662a60 = function(arg0, arg1, arg2, arg3, arg4) { - getObject(arg0).renderbufferStorage(arg1 >>> 0, arg2 >>> 0, arg3, arg4); - }; - imports.wbg.__wbg_scissor_3ea2048f24928f06 = function(arg0, arg1, arg2, arg3, arg4) { - getObject(arg0).scissor(arg1, arg2, arg3, arg4); - }; - imports.wbg.__wbg_shaderSource_bbfeb057b5f88df5 = function(arg0, arg1, arg2, arg3) { - getObject(arg0).shaderSource(getObject(arg1), getStringFromWasm0(arg2, arg3)); - }; - imports.wbg.__wbg_texParameteri_7414cf15f83e1d52 = function(arg0, arg1, arg2, arg3) { - getObject(arg0).texParameteri(arg1 >>> 0, arg2 >>> 0, arg3); - }; - imports.wbg.__wbg_uniform1i_22f9e77ed65e1503 = function(arg0, arg1, arg2) { - getObject(arg0).uniform1i(getObject(arg1), arg2); - }; - imports.wbg.__wbg_uniform2f_fa5841b64e0ac5e9 = function(arg0, arg1, arg2, arg3) { - getObject(arg0).uniform2f(getObject(arg1), arg2, arg3); - }; - imports.wbg.__wbg_useProgram_039f85866d3a975b = function(arg0, arg1) { - getObject(arg0).useProgram(getObject(arg1)); - }; - imports.wbg.__wbg_vertexAttribPointer_4375ff065dcf90ed = function(arg0, arg1, arg2, arg3, arg4, arg5, arg6) { - getObject(arg0).vertexAttribPointer(arg1 >>> 0, arg2, arg3 >>> 0, arg4 !== 0, arg5, arg6); - }; - imports.wbg.__wbg_viewport_06c29be651af660a = function(arg0, arg1, arg2, arg3, arg4) { - getObject(arg0).viewport(arg1, arg2, arg3, arg4); - }; - imports.wbg.__wbg_instanceof_Window_0e6c0f1096d66c3c = function(arg0) { - const ret = getObject(arg0) instanceof Window; - return ret; - }; - imports.wbg.__wbg_document_99eddbbc11ec831e = function(arg0) { - const ret = getObject(arg0).document; - return isLikeNone(ret) ? 0 : addHeapObject(ret); - }; - imports.wbg.__wbg_location_fa9019d2eb2195e8 = function(arg0) { - const ret = getObject(arg0).location; - return addHeapObject(ret); - }; - imports.wbg.__wbg_navigator_1f72d7edb7b4c387 = function(arg0) { - const ret = getObject(arg0).navigator; - return addHeapObject(ret); - }; - imports.wbg.__wbg_innerWidth_aebdd1c86de7b6aa = function() { return handleError(function (arg0) { - const ret = getObject(arg0).innerWidth; - return addHeapObject(ret); - }, arguments) }; - imports.wbg.__wbg_innerHeight_67ea5ab43c3043ad = function() { return handleError(function (arg0) { - const ret = getObject(arg0).innerHeight; - return addHeapObject(ret); - }, arguments) }; - imports.wbg.__wbg_devicePixelRatio_cac0b66c0e1e056b = function(arg0) { - const ret = getObject(arg0).devicePixelRatio; - return ret; - }; - imports.wbg.__wbg_performance_71eb0d14ca622227 = function(arg0) { - const ret = getObject(arg0).performance; - return isLikeNone(ret) ? 0 : addHeapObject(ret); - }; - imports.wbg.__wbg_localStorage_6e9ba4e9a3771427 = function() { return handleError(function (arg0) { - const ret = getObject(arg0).localStorage; - return isLikeNone(ret) ? 0 : addHeapObject(ret); - }, arguments) }; - imports.wbg.__wbg_matchMedia_7a04497c9cd2fc1e = function() { return handleError(function (arg0, arg1, arg2) { - const ret = getObject(arg0).matchMedia(getStringFromWasm0(arg1, arg2)); - return isLikeNone(ret) ? 0 : addHeapObject(ret); - }, arguments) }; - imports.wbg.__wbg_open_fd57bd436de42549 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) { - const ret = getObject(arg0).open(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4)); - return isLikeNone(ret) ? 0 : addHeapObject(ret); - }, arguments) }; - imports.wbg.__wbg_requestAnimationFrame_8e3c7028c69ebaef = function() { return handleError(function (arg0, arg1) { - const ret = getObject(arg0).requestAnimationFrame(getObject(arg1)); - return ret; - }, arguments) }; - imports.wbg.__wbg_setInterval_00dcd6d9b783b38f = function() { return handleError(function (arg0, arg1, arg2) { - const ret = getObject(arg0).setInterval(getObject(arg1), arg2); - return ret; - }, arguments) }; - imports.wbg.__wbg_setTimeout_a100c5fd6f7b2032 = function() { return handleError(function (arg0, arg1, arg2) { - const ret = getObject(arg0).setTimeout(getObject(arg1), arg2); - return ret; - }, arguments) }; - imports.wbg.__wbg_writeText_df83b2c8a773a84a = function(arg0, arg1, arg2) { - const ret = getObject(arg0).writeText(getStringFromWasm0(arg1, arg2)); - return addHeapObject(ret); - }; - imports.wbg.__wbg_addEventListener_78d3aa7e06ee5b73 = function() { return handleError(function (arg0, arg1, arg2, arg3) { - getObject(arg0).addEventListener(getStringFromWasm0(arg1, arg2), getObject(arg3)); - }, arguments) }; - imports.wbg.__wbg_matches_7809d58d7a13e2eb = function(arg0) { - const ret = getObject(arg0).matches; - return ret; - }; - imports.wbg.__wbg_identifier_efb4abe3a00599c1 = function(arg0) { - const ret = getObject(arg0).identifier; - return ret; - }; - imports.wbg.__wbg_pageX_20e9ef69ae98e6ca = function(arg0) { - const ret = getObject(arg0).pageX; - return ret; - }; - imports.wbg.__wbg_pageY_8e273493fff14cd6 = function(arg0) { - const ret = getObject(arg0).pageY; - return ret; - }; - imports.wbg.__wbg_force_8c0adc9011c40238 = function(arg0) { - const ret = getObject(arg0).force; - return ret; - }; - imports.wbg.__wbg_instanceof_HtmlInputElement_750fccab172eab35 = function(arg0) { - const ret = getObject(arg0) instanceof HTMLInputElement; - return ret; - }; - imports.wbg.__wbg_setautofocus_ce657398d4bfbbb0 = function(arg0, arg1) { - getObject(arg0).autofocus = arg1 !== 0; - }; - imports.wbg.__wbg_setsize_1d5b32171e4916c6 = function(arg0, arg1) { - getObject(arg0).size = arg1 >>> 0; - }; - imports.wbg.__wbg_value_14b43f7df5bd6160 = function(arg0, arg1) { - const ret = getObject(arg1).value; - const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len0 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len0; - getInt32Memory0()[arg0 / 4 + 0] = ptr0; - }; - imports.wbg.__wbg_setvalue_649eb7de76d4a493 = function(arg0, arg1, arg2) { - getObject(arg0).value = getStringFromWasm0(arg1, arg2); - }; - imports.wbg.__wbindgen_object_clone_ref = function(arg0) { - const ret = getObject(arg0); - return addHeapObject(ret); - }; - imports.wbg.__wbg_items_ab2c5110450d2c6a = function(arg0) { - const ret = getObject(arg0).items; - return addHeapObject(ret); - }; - imports.wbg.__wbg_files_506106b5b79463d5 = function(arg0) { - const ret = getObject(arg0).files; - return isLikeNone(ret) ? 0 : addHeapObject(ret); - }; - imports.wbg.__wbg_getData_18bfc326d2fcc5fc = function() { return handleError(function (arg0, arg1, arg2, arg3) { - const ret = getObject(arg1).getData(getStringFromWasm0(arg2, arg3)); - const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len0 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len0; - getInt32Memory0()[arg0 / 4 + 0] = ptr0; - }, arguments) }; - imports.wbg.__wbg_length_37d5aa06d94e029d = function(arg0) { - const ret = getObject(arg0).length; - return ret; - }; - imports.wbg.__wbg_get_a2af1e42e8d6d040 = function(arg0, arg1) { - const ret = getObject(arg0)[arg1 >>> 0]; - return isLikeNone(ret) ? 0 : addHeapObject(ret); - }; - imports.wbg.__wbg_length_ced2607e299e48b0 = function(arg0) { - const ret = getObject(arg0).length; - return ret; - }; - imports.wbg.__wbg_get_bbde85c2e4ce9183 = function(arg0, arg1) { - const ret = getObject(arg0)[arg1 >>> 0]; - return isLikeNone(ret) ? 0 : addHeapObject(ret); - }; - imports.wbg.__wbg_now_20d2aadcf3cc17f7 = function(arg0) { - const ret = getObject(arg0).now(); - return ret; - }; - imports.wbg.__wbg_length_86a84abd1008e3f0 = function(arg0) { - const ret = getObject(arg0).length; - return ret; - }; - imports.wbg.__wbg_item_5cffd6d67fb3a3a3 = function(arg0, arg1) { - const ret = getObject(arg0).item(arg1 >>> 0); - return isLikeNone(ret) ? 0 : addHeapObject(ret); - }; - imports.wbg.__wbg_get_8a239117b507dd81 = function(arg0, arg1) { - const ret = getObject(arg0)[arg1 >>> 0]; - return isLikeNone(ret) ? 0 : addHeapObject(ret); - }; - imports.wbg.__wbg_preventDefault_747982fd5fe3b6d0 = function(arg0) { - getObject(arg0).preventDefault(); - }; - imports.wbg.__wbg_stopPropagation_63abc0c04280af82 = function(arg0) { - getObject(arg0).stopPropagation(); - }; - imports.wbg.__wbg_name_705e027681939ce2 = function(arg0, arg1) { - const ret = getObject(arg1).name; - const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len0 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len0; - getInt32Memory0()[arg0 / 4 + 0] = ptr0; - }; - imports.wbg.__wbg_lastModified_578207da4ec8a735 = function(arg0) { - const ret = getObject(arg0).lastModified; - return ret; - }; - imports.wbg.__wbg_keyCode_9bdbab45f06fb085 = function(arg0) { - const ret = getObject(arg0).keyCode; - return ret; - }; - imports.wbg.__wbg_altKey_4c4f9abf8a09e7c7 = function(arg0) { - const ret = getObject(arg0).altKey; - return ret; - }; - imports.wbg.__wbg_ctrlKey_37d7587cf9229e4c = function(arg0) { - const ret = getObject(arg0).ctrlKey; - return ret; - }; - imports.wbg.__wbg_shiftKey_94c9fa9845182d9e = function(arg0) { - const ret = getObject(arg0).shiftKey; - return ret; - }; - imports.wbg.__wbg_metaKey_ecd5174305b25455 = function(arg0) { - const ret = getObject(arg0).metaKey; - return ret; - }; - imports.wbg.__wbg_isComposing_fa3e456916264d71 = function(arg0) { - const ret = getObject(arg0).isComposing; - return ret; - }; - imports.wbg.__wbg_key_a8ae33ddc6ff786b = function(arg0, arg1) { - const ret = getObject(arg1).key; - const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len0 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len0; - getInt32Memory0()[arg0 / 4 + 0] = ptr0; - }; - imports.wbg.__wbg_clipboard_e99151dcef87806f = function(arg0) { - const ret = getObject(arg0).clipboard; - return isLikeNone(ret) ? 0 : addHeapObject(ret); - }; - imports.wbg.__wbg_userAgent_e5954dbb033ddef9 = function() { return handleError(function (arg0, arg1) { - const ret = getObject(arg1).userAgent; - const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len0 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len0; - getInt32Memory0()[arg0 / 4 + 0] = ptr0; - }, arguments) }; - imports.wbg.__wbg_clipboardData_a95ca12e53577c09 = function(arg0) { - const ret = getObject(arg0).clipboardData; - return isLikeNone(ret) ? 0 : addHeapObject(ret); - }; - imports.wbg.__wbg_width_a260098679e33e90 = function(arg0) { - const ret = getObject(arg0).width; - return ret; - }; - imports.wbg.__wbg_height_1f8574470ebe45c9 = function(arg0) { - const ret = getObject(arg0).height; - return ret; - }; - imports.wbg.__wbg_top_da39668ed41161c4 = function(arg0) { - const ret = getObject(arg0).top; - return ret; - }; - imports.wbg.__wbg_left_a1624a1a425102f3 = function(arg0) { - const ret = getObject(arg0).left; - return ret; - }; - imports.wbg.__wbg_instanceof_HtmlCanvasElement_b94545433bb4d2ef = function(arg0) { - const ret = getObject(arg0) instanceof HTMLCanvasElement; - return ret; - }; - imports.wbg.__wbg_width_20b7a9ebdd5f4232 = function(arg0) { - const ret = getObject(arg0).width; - return ret; - }; - imports.wbg.__wbg_setwidth_654d8adcd4979eed = function(arg0, arg1) { - getObject(arg0).width = arg1 >>> 0; - }; - imports.wbg.__wbg_height_57f43816c2227a89 = function(arg0) { - const ret = getObject(arg0).height; - return ret; - }; - imports.wbg.__wbg_setheight_2b662384bfacb65c = function(arg0, arg1) { - getObject(arg0).height = arg1 >>> 0; - }; - imports.wbg.__wbg_getContext_0c19ba5c037e057f = function() { return handleError(function (arg0, arg1, arg2) { - const ret = getObject(arg0).getContext(getStringFromWasm0(arg1, arg2)); - return isLikeNone(ret) ? 0 : addHeapObject(ret); - }, arguments) }; - imports.wbg.__wbg_touches_d4869a7500017809 = function(arg0) { - const ret = getObject(arg0).touches; - return addHeapObject(ret); - }; - imports.wbg.__wbg_changedTouches_21bd59fbbc482ad7 = function(arg0) { - const ret = getObject(arg0).changedTouches; - return addHeapObject(ret); - }; - imports.wbg.__wbg_body_2a1ff14b05042a51 = function(arg0) { - const ret = getObject(arg0).body; - return isLikeNone(ret) ? 0 : addHeapObject(ret); - }; - imports.wbg.__wbg_createElement_3c9b5f3aa42457a1 = function() { return handleError(function (arg0, arg1, arg2) { - const ret = getObject(arg0).createElement(getStringFromWasm0(arg1, arg2)); - return addHeapObject(ret); - }, arguments) }; - imports.wbg.__wbg_getElementById_f83c5de20dc455d6 = function(arg0, arg1, arg2) { - const ret = getObject(arg0).getElementById(getStringFromWasm0(arg1, arg2)); - return isLikeNone(ret) ? 0 : addHeapObject(ret); - }; - imports.wbg.__wbg_instanceof_WebGlRenderingContext_b0885da52b151d86 = function(arg0) { - const ret = getObject(arg0) instanceof WebGLRenderingContext; - return ret; - }; - imports.wbg.__wbg_bufferData_282e5d315f5503eb = function(arg0, arg1, arg2, arg3) { - getObject(arg0).bufferData(arg1 >>> 0, getObject(arg2), arg3 >>> 0); - }; - imports.wbg.__wbg_texImage2D_ca7055ca4feee279 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) { - getObject(arg0).texImage2D(arg1 >>> 0, arg2, arg3, arg4, arg5, arg6, arg7 >>> 0, arg8 >>> 0, getObject(arg9)); - }, arguments) }; - imports.wbg.__wbg_texSubImage2D_fe76e590b3e3fa85 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) { - getObject(arg0).texSubImage2D(arg1 >>> 0, arg2, arg3, arg4, arg5, arg6, arg7 >>> 0, arg8 >>> 0, getObject(arg9)); - }, arguments) }; - imports.wbg.__wbg_activeTexture_1ba5758f0a8358b6 = function(arg0, arg1) { - getObject(arg0).activeTexture(arg1 >>> 0); - }; - imports.wbg.__wbg_attachShader_0867104b37cae2d6 = function(arg0, arg1, arg2) { - getObject(arg0).attachShader(getObject(arg1), getObject(arg2)); - }; - imports.wbg.__wbg_bindBuffer_28e62f648e99e251 = function(arg0, arg1, arg2) { - getObject(arg0).bindBuffer(arg1 >>> 0, getObject(arg2)); - }; - imports.wbg.__wbg_bindFramebuffer_b7a06305d2823b34 = function(arg0, arg1, arg2) { - getObject(arg0).bindFramebuffer(arg1 >>> 0, getObject(arg2)); - }; - imports.wbg.__wbg_bindRenderbuffer_0fe389ab46c4d00d = function(arg0, arg1, arg2) { - getObject(arg0).bindRenderbuffer(arg1 >>> 0, getObject(arg2)); - }; - imports.wbg.__wbg_bindTexture_27a724e7303eec67 = function(arg0, arg1, arg2) { - getObject(arg0).bindTexture(arg1 >>> 0, getObject(arg2)); - }; - imports.wbg.__wbg_blendEquationSeparate_ffbed0120340f7d5 = function(arg0, arg1, arg2) { - getObject(arg0).blendEquationSeparate(arg1 >>> 0, arg2 >>> 0); - }; - imports.wbg.__wbg_blendFuncSeparate_c750720abdc9d54e = function(arg0, arg1, arg2, arg3, arg4) { - getObject(arg0).blendFuncSeparate(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0, arg4 >>> 0); - }; - imports.wbg.__wbg_clear_786a8deca6672a9d = function(arg0, arg1) { - getObject(arg0).clear(arg1 >>> 0); - }; - imports.wbg.__wbg_clearColor_2c1d714dee770474 = function(arg0, arg1, arg2, arg3, arg4) { - getObject(arg0).clearColor(arg1, arg2, arg3, arg4); - }; - imports.wbg.__wbg_colorMask_0cfe7588f073be4e = function(arg0, arg1, arg2, arg3, arg4) { - getObject(arg0).colorMask(arg1 !== 0, arg2 !== 0, arg3 !== 0, arg4 !== 0); - }; - imports.wbg.__wbg_compileShader_1b371763cfd802f7 = function(arg0, arg1) { - getObject(arg0).compileShader(getObject(arg1)); - }; - imports.wbg.__wbg_createBuffer_48c0376fc0746386 = function(arg0) { - const ret = getObject(arg0).createBuffer(); - return isLikeNone(ret) ? 0 : addHeapObject(ret); - }; - imports.wbg.__wbg_createFramebuffer_f6f4aff3c462de89 = function(arg0) { - const ret = getObject(arg0).createFramebuffer(); - return isLikeNone(ret) ? 0 : addHeapObject(ret); - }; - imports.wbg.__wbg_createProgram_c2675d2cc83435a6 = function(arg0) { - const ret = getObject(arg0).createProgram(); - return isLikeNone(ret) ? 0 : addHeapObject(ret); - }; - imports.wbg.__wbg_createRenderbuffer_5f8fcf55de2b35f5 = function(arg0) { - const ret = getObject(arg0).createRenderbuffer(); - return isLikeNone(ret) ? 0 : addHeapObject(ret); - }; - imports.wbg.__wbg_createShader_8d2a55e7777bbea7 = function(arg0, arg1) { - const ret = getObject(arg0).createShader(arg1 >>> 0); - return isLikeNone(ret) ? 0 : addHeapObject(ret); - }; - imports.wbg.__wbg_createTexture_23de5d8f7988e663 = function(arg0) { - const ret = getObject(arg0).createTexture(); - return isLikeNone(ret) ? 0 : addHeapObject(ret); - }; - imports.wbg.__wbg_deleteShader_d39446753b2fa1e7 = function(arg0, arg1) { - getObject(arg0).deleteShader(getObject(arg1)); - }; - imports.wbg.__wbg_deleteTexture_bf4ea3b750a15992 = function(arg0, arg1) { - getObject(arg0).deleteTexture(getObject(arg1)); - }; - imports.wbg.__wbg_detachShader_e2c6cb7c2c469a33 = function(arg0, arg1, arg2) { - getObject(arg0).detachShader(getObject(arg1), getObject(arg2)); - }; - imports.wbg.__wbg_disable_ada50e27543b1ebd = function(arg0, arg1) { - getObject(arg0).disable(arg1 >>> 0); - }; - imports.wbg.__wbg_disableVertexAttribArray_e1c513cfd55355c9 = function(arg0, arg1) { - getObject(arg0).disableVertexAttribArray(arg1 >>> 0); - }; - imports.wbg.__wbg_drawElements_efa6c15e2787a58c = function(arg0, arg1, arg2, arg3, arg4) { - getObject(arg0).drawElements(arg1 >>> 0, arg2, arg3 >>> 0, arg4); - }; - imports.wbg.__wbg_enable_981a414a11bbed87 = function(arg0, arg1) { - getObject(arg0).enable(arg1 >>> 0); - }; - imports.wbg.__wbg_enableVertexAttribArray_1d5f3ff6e7da7095 = function(arg0, arg1) { - getObject(arg0).enableVertexAttribArray(arg1 >>> 0); - }; - imports.wbg.__wbg_framebufferRenderbuffer_ed95c4854179b4ac = function(arg0, arg1, arg2, arg3, arg4) { - getObject(arg0).framebufferRenderbuffer(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0, getObject(arg4)); - }; - imports.wbg.__wbg_framebufferTexture2D_3bb72a24d7618de9 = function(arg0, arg1, arg2, arg3, arg4, arg5) { - getObject(arg0).framebufferTexture2D(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0, getObject(arg4), arg5); - }; - imports.wbg.__wbg_getAttribLocation_f875dcf14748b9d4 = function(arg0, arg1, arg2, arg3) { - const ret = getObject(arg0).getAttribLocation(getObject(arg1), getStringFromWasm0(arg2, arg3)); - return ret; - }; - imports.wbg.__wbg_getError_447f4b8abb16917e = function(arg0) { - const ret = getObject(arg0).getError(); - return ret; - }; - imports.wbg.__wbg_getExtension_bea19db80bdbefef = function() { return handleError(function (arg0, arg1, arg2) { - const ret = getObject(arg0).getExtension(getStringFromWasm0(arg1, arg2)); - return isLikeNone(ret) ? 0 : addHeapObject(ret); - }, arguments) }; - imports.wbg.__wbg_getParameter_f511b92ebf87c44e = function() { return handleError(function (arg0, arg1) { - const ret = getObject(arg0).getParameter(arg1 >>> 0); - return addHeapObject(ret); - }, arguments) }; - imports.wbg.__wbg_getProgramInfoLog_e70b0120bda14895 = function(arg0, arg1, arg2) { - const ret = getObject(arg1).getProgramInfoLog(getObject(arg2)); - var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len0; - getInt32Memory0()[arg0 / 4 + 0] = ptr0; - }; - imports.wbg.__wbg_getProgramParameter_e4fe54d806806081 = function(arg0, arg1, arg2) { - const ret = getObject(arg0).getProgramParameter(getObject(arg1), arg2 >>> 0); - return addHeapObject(ret); - }; - imports.wbg.__wbg_getShaderInfoLog_95d068aeccc5dbb3 = function(arg0, arg1, arg2) { - const ret = getObject(arg1).getShaderInfoLog(getObject(arg2)); - var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len0; - getInt32Memory0()[arg0 / 4 + 0] = ptr0; - }; - imports.wbg.__wbg_getShaderParameter_2972af1cb850aeb7 = function(arg0, arg1, arg2) { - const ret = getObject(arg0).getShaderParameter(getObject(arg1), arg2 >>> 0); - return addHeapObject(ret); - }; - imports.wbg.__wbg_getSupportedExtensions_0d5d24aad2788aec = function(arg0) { - const ret = getObject(arg0).getSupportedExtensions(); - return isLikeNone(ret) ? 0 : addHeapObject(ret); - }; - imports.wbg.__wbg_getUniformLocation_776a1f58e7904d81 = function(arg0, arg1, arg2, arg3) { - const ret = getObject(arg0).getUniformLocation(getObject(arg1), getStringFromWasm0(arg2, arg3)); - return isLikeNone(ret) ? 0 : addHeapObject(ret); - }; - imports.wbg.__wbg_linkProgram_b98c8967f45a44fd = function(arg0, arg1) { - getObject(arg0).linkProgram(getObject(arg1)); - }; - imports.wbg.__wbg_pixelStorei_707653d2f29a6c67 = function(arg0, arg1, arg2) { - getObject(arg0).pixelStorei(arg1 >>> 0, arg2); - }; - imports.wbg.__wbg_renderbufferStorage_56e5cf7c10bbc044 = function(arg0, arg1, arg2, arg3, arg4) { - getObject(arg0).renderbufferStorage(arg1 >>> 0, arg2 >>> 0, arg3, arg4); - }; - imports.wbg.__wbg_scissor_056d185c74d7c0ad = function(arg0, arg1, arg2, arg3, arg4) { - getObject(arg0).scissor(arg1, arg2, arg3, arg4); - }; - imports.wbg.__wbg_shaderSource_daca520f63ef8fca = function(arg0, arg1, arg2, arg3) { - getObject(arg0).shaderSource(getObject(arg1), getStringFromWasm0(arg2, arg3)); - }; - imports.wbg.__wbg_texParameteri_1298d8804b59bbc0 = function(arg0, arg1, arg2, arg3) { - getObject(arg0).texParameteri(arg1 >>> 0, arg2 >>> 0, arg3); - }; - imports.wbg.__wbg_uniform1i_42b99e992f794a51 = function(arg0, arg1, arg2) { - getObject(arg0).uniform1i(getObject(arg1), arg2); - }; - imports.wbg.__wbg_uniform2f_3a04be03a4c69f62 = function(arg0, arg1, arg2, arg3) { - getObject(arg0).uniform2f(getObject(arg1), arg2, arg3); - }; - imports.wbg.__wbg_useProgram_022d72a653706891 = function(arg0, arg1) { - getObject(arg0).useProgram(getObject(arg1)); - }; - imports.wbg.__wbg_vertexAttribPointer_a75ea424ba9fa4e8 = function(arg0, arg1, arg2, arg3, arg4, arg5, arg6) { - getObject(arg0).vertexAttribPointer(arg1 >>> 0, arg2, arg3 >>> 0, arg4 !== 0, arg5, arg6); - }; - imports.wbg.__wbg_viewport_6c864379ded67e8a = function(arg0, arg1, arg2, arg3, arg4) { - getObject(arg0).viewport(arg1, arg2, arg3, arg4); - }; - imports.wbg.__wbg_setid_ea9f00ecb5da9dde = function(arg0, arg1, arg2) { - getObject(arg0).id = getStringFromWasm0(arg1, arg2); - }; - imports.wbg.__wbg_scrollLeft_9aba28808f857e36 = function(arg0) { - const ret = getObject(arg0).scrollLeft; - return ret; - }; - imports.wbg.__wbg_clientWidth_11f72beceb108bff = function(arg0) { - const ret = getObject(arg0).clientWidth; - return ret; - }; - imports.wbg.__wbg_clientHeight_205d93d6eadff351 = function(arg0) { - const ret = getObject(arg0).clientHeight; - return ret; - }; - imports.wbg.__wbg_getBoundingClientRect_ab935d65fdd23c25 = function(arg0) { - const ret = getObject(arg0).getBoundingClientRect(); - return addHeapObject(ret); - }; - imports.wbg.__wbg_scrollTop_f1031b88f039d8df = function(arg0) { - const ret = getObject(arg0).scrollTop; - return ret; - }; - imports.wbg.__wbg_hidden_809625377ca6c4a3 = function(arg0) { - const ret = getObject(arg0).hidden; - return ret; - }; - imports.wbg.__wbg_sethidden_7a120b754b048503 = function(arg0, arg1) { - getObject(arg0).hidden = arg1 !== 0; - }; - imports.wbg.__wbg_style_dd3ba68ea919f1b0 = function(arg0) { - const ret = getObject(arg0).style; - return addHeapObject(ret); - }; - imports.wbg.__wbg_offsetTop_c8f74f82dc787ed0 = function(arg0) { - const ret = getObject(arg0).offsetTop; - return ret; - }; - imports.wbg.__wbg_offsetLeft_3b3b09bce24322ef = function(arg0) { - const ret = getObject(arg0).offsetLeft; - return ret; - }; - imports.wbg.__wbg_offsetWidth_3afb80444bdcabce = function(arg0) { - const ret = getObject(arg0).offsetWidth; - return ret; - }; - imports.wbg.__wbg_blur_685fb8c8baa471a1 = function() { return handleError(function (arg0) { - getObject(arg0).blur(); - }, arguments) }; - imports.wbg.__wbg_focus_42ad8e77a7a0b22a = function() { return handleError(function (arg0) { - getObject(arg0).focus(); - }, arguments) }; - imports.wbg.__wbg_size_e8d6777bbbbd2991 = function(arg0) { - const ret = getObject(arg0).size; - return ret; - }; - imports.wbg.__wbg_arrayBuffer_781cc81e507364b8 = function(arg0) { - const ret = getObject(arg0).arrayBuffer(); - return addHeapObject(ret); - }; - imports.wbg.__wbg_href_ee02b91ff794f1c0 = function() { return handleError(function (arg0, arg1) { - const ret = getObject(arg1).href; - const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len0 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len0; - getInt32Memory0()[arg0 / 4 + 0] = ptr0; - }, arguments) }; - imports.wbg.__wbg_origin_890e8002c9eeba35 = function() { return handleError(function (arg0, arg1) { - const ret = getObject(arg1).origin; - const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len0 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len0; - getInt32Memory0()[arg0 / 4 + 0] = ptr0; - }, arguments) }; - imports.wbg.__wbg_protocol_8a7c3a0ad0534fb9 = function() { return handleError(function (arg0, arg1) { - const ret = getObject(arg1).protocol; - const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len0 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len0; - getInt32Memory0()[arg0 / 4 + 0] = ptr0; - }, arguments) }; - imports.wbg.__wbg_host_5a60711dad652364 = function() { return handleError(function (arg0, arg1) { - const ret = getObject(arg1).host; - const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len0 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len0; - getInt32Memory0()[arg0 / 4 + 0] = ptr0; - }, arguments) }; - imports.wbg.__wbg_hostname_52b243e8e2ba0022 = function() { return handleError(function (arg0, arg1) { - const ret = getObject(arg1).hostname; - const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len0 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len0; - getInt32Memory0()[arg0 / 4 + 0] = ptr0; - }, arguments) }; - imports.wbg.__wbg_port_91ba722f8d346400 = function() { return handleError(function (arg0, arg1) { - const ret = getObject(arg1).port; - const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len0 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len0; - getInt32Memory0()[arg0 / 4 + 0] = ptr0; - }, arguments) }; - imports.wbg.__wbg_search_083c5449552cf16e = function() { return handleError(function (arg0, arg1) { - const ret = getObject(arg1).search; - const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len0 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len0; - getInt32Memory0()[arg0 / 4 + 0] = ptr0; - }, arguments) }; - imports.wbg.__wbg_hash_d124cf237fe7b7c1 = function() { return handleError(function (arg0, arg1) { - const ret = getObject(arg1).hash; - const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len0 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len0; - getInt32Memory0()[arg0 / 4 + 0] = ptr0; - }, arguments) }; - imports.wbg.__wbg_appendChild_a86c0da8d152eae4 = function() { return handleError(function (arg0, arg1) { - const ret = getObject(arg0).appendChild(getObject(arg1)); - return addHeapObject(ret); - }, arguments) }; - imports.wbg.__wbg_getItem_eb6e17b18b890a47 = function() { return handleError(function (arg0, arg1, arg2, arg3) { - const ret = getObject(arg1).getItem(getStringFromWasm0(arg2, arg3)); - var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len0; - getInt32Memory0()[arg0 / 4 + 0] = ptr0; - }, arguments) }; - imports.wbg.__wbg_setItem_ed2ea572329ab721 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) { - getObject(arg0).setItem(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4)); - }, arguments) }; - imports.wbg.__wbg_data_ccaf50f3288b08c5 = function(arg0, arg1) { - const ret = getObject(arg1).data; - var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len0; - getInt32Memory0()[arg0 / 4 + 0] = ptr0; - }; - imports.wbg.__wbg_setProperty_ae9adf5d00216c03 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) { - getObject(arg0).setProperty(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4)); - }, arguments) }; - imports.wbg.__wbg_type_d73ca5f20cbe175f = function(arg0, arg1) { - const ret = getObject(arg1).type; - const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len0 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len0; - getInt32Memory0()[arg0 / 4 + 0] = ptr0; - }; - imports.wbg.__wbg_clientX_83648828186ba19f = function(arg0) { - const ret = getObject(arg0).clientX; - return ret; - }; - imports.wbg.__wbg_clientY_ba9e5549993281e3 = function(arg0) { - const ret = getObject(arg0).clientY; - return ret; - }; - imports.wbg.__wbg_ctrlKey_e4aeb9366ca88d41 = function(arg0) { - const ret = getObject(arg0).ctrlKey; - return ret; - }; - imports.wbg.__wbg_shiftKey_42596574095ad5e2 = function(arg0) { - const ret = getObject(arg0).shiftKey; - return ret; - }; - imports.wbg.__wbg_metaKey_ad377163d8beff50 = function(arg0) { - const ret = getObject(arg0).metaKey; - return ret; - }; - imports.wbg.__wbg_button_78dae8616402469e = function(arg0) { - const ret = getObject(arg0).button; - return ret; - }; - imports.wbg.__wbg_dataTransfer_a9eebb31aa4055f2 = function(arg0) { - const ret = getObject(arg0).dataTransfer; - return isLikeNone(ret) ? 0 : addHeapObject(ret); - }; - imports.wbg.__wbg_bindVertexArrayOES_35d97084dfc5f6f4 = function(arg0, arg1) { - getObject(arg0).bindVertexArrayOES(getObject(arg1)); - }; - imports.wbg.__wbg_createVertexArrayOES_69c38b2b74e927fa = function(arg0) { - const ret = getObject(arg0).createVertexArrayOES(); - return isLikeNone(ret) ? 0 : addHeapObject(ret); - }; - imports.wbg.__wbg_deltaX_692299f5e35cfb0d = function(arg0) { - const ret = getObject(arg0).deltaX; - return ret; - }; - imports.wbg.__wbg_deltaY_f78bae9413139a24 = function(arg0) { - const ret = getObject(arg0).deltaY; - return ret; - }; - imports.wbg.__wbg_deltaMode_08c2fcea70146506 = function(arg0) { - const ret = getObject(arg0).deltaMode; - return ret; - }; - imports.wbg.__wbg_get_590a2cd912f2ae46 = function(arg0, arg1) { - const ret = getObject(arg0)[arg1 >>> 0]; - return addHeapObject(ret); - }; - imports.wbg.__wbg_length_2cd798326f2cc4c1 = function(arg0) { - const ret = getObject(arg0).length; - return ret; - }; - imports.wbg.__wbg_newnoargs_e23b458e372830de = function(arg0, arg1) { - const ret = new Function(getStringFromWasm0(arg0, arg1)); - return addHeapObject(ret); - }; - imports.wbg.__wbg_call_ae78342adc33730a = function() { return handleError(function (arg0, arg1) { - const ret = getObject(arg0).call(getObject(arg1)); - return addHeapObject(ret); - }, arguments) }; - imports.wbg.__wbg_resolve_a9a87bdd64e9e62c = function(arg0) { - const ret = Promise.resolve(getObject(arg0)); - return addHeapObject(ret); - }; - imports.wbg.__wbg_then_ce526c837d07b68f = function(arg0, arg1) { - const ret = getObject(arg0).then(getObject(arg1)); - return addHeapObject(ret); - }; - imports.wbg.__wbg_then_842e65b843962f56 = function(arg0, arg1, arg2) { - const ret = getObject(arg0).then(getObject(arg1), getObject(arg2)); - return addHeapObject(ret); - }; - imports.wbg.__wbg_self_99737b4dcdf6f0d8 = function() { return handleError(function () { - const ret = self.self; - return addHeapObject(ret); - }, arguments) }; - imports.wbg.__wbg_window_9b61fbbf3564c4fb = function() { return handleError(function () { - const ret = window.window; - return addHeapObject(ret); - }, arguments) }; - imports.wbg.__wbg_globalThis_8e275ef40caea3a3 = function() { return handleError(function () { - const ret = globalThis.globalThis; - return addHeapObject(ret); - }, arguments) }; - imports.wbg.__wbg_global_5de1e0f82bddcd27 = function() { return handleError(function () { - const ret = global.global; - return addHeapObject(ret); - }, arguments) }; - imports.wbg.__wbindgen_is_undefined = function(arg0) { - const ret = getObject(arg0) === undefined; - return ret; - }; - imports.wbg.__wbg_buffer_7af23f65f6c64548 = function(arg0) { - const ret = getObject(arg0).buffer; - return addHeapObject(ret); - }; - imports.wbg.__wbg_newwithbyteoffsetandlength_293152433089cf24 = function(arg0, arg1, arg2) { - const ret = new Int8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0); - return addHeapObject(ret); - }; - imports.wbg.__wbg_newwithbyteoffsetandlength_20bd70cc8d50ee94 = function(arg0, arg1, arg2) { - const ret = new Int16Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0); - return addHeapObject(ret); - }; - imports.wbg.__wbg_newwithbyteoffsetandlength_0d4e0750590b10dd = function(arg0, arg1, arg2) { - const ret = new Int32Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0); - return addHeapObject(ret); - }; - imports.wbg.__wbg_newwithbyteoffsetandlength_ce1e75f0ce5f7974 = function(arg0, arg1, arg2) { - const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0); - return addHeapObject(ret); - }; - imports.wbg.__wbg_new_cc9018bd6f283b6f = function(arg0) { - const ret = new Uint8Array(getObject(arg0)); - return addHeapObject(ret); - }; - imports.wbg.__wbg_set_f25e869e4565d2a2 = function(arg0, arg1, arg2) { - getObject(arg0).set(getObject(arg1), arg2 >>> 0); - }; - imports.wbg.__wbg_length_0acb1cf9bbaf8519 = function(arg0) { - const ret = getObject(arg0).length; - return ret; - }; - imports.wbg.__wbg_newwithbyteoffsetandlength_729246f395bbffc0 = function(arg0, arg1, arg2) { - const ret = new Uint16Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0); - return addHeapObject(ret); - }; - imports.wbg.__wbg_newwithbyteoffsetandlength_bbdb045c2c009495 = function(arg0, arg1, arg2) { - const ret = new Uint32Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0); - return addHeapObject(ret); - }; - imports.wbg.__wbg_newwithbyteoffsetandlength_3f554978d8793b14 = function(arg0, arg1, arg2) { - const ret = new Float32Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0); - return addHeapObject(ret); - }; - imports.wbg.__wbindgen_debug_string = function(arg0, arg1) { - const ret = debugString(getObject(arg1)); - const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len0 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len0; - getInt32Memory0()[arg0 / 4 + 0] = ptr0; - }; - imports.wbg.__wbindgen_throw = function(arg0, arg1) { - throw new Error(getStringFromWasm0(arg0, arg1)); - }; - imports.wbg.__wbindgen_memory = function() { - const ret = wasm.memory; - return addHeapObject(ret); - }; - imports.wbg.__wbindgen_closure_wrapper851 = function(arg0, arg1, arg2) { - const ret = makeMutClosure(arg0, arg1, 230, __wbg_adapter_24); - return addHeapObject(ret); - }; - imports.wbg.__wbindgen_closure_wrapper852 = function(arg0, arg1, arg2) { - const ret = makeMutClosure(arg0, arg1, 230, __wbg_adapter_27); - return addHeapObject(ret); - }; - imports.wbg.__wbindgen_closure_wrapper853 = function(arg0, arg1, arg2) { - const ret = makeMutClosure(arg0, arg1, 230, __wbg_adapter_30); - return addHeapObject(ret); - }; - imports.wbg.__wbindgen_closure_wrapper862 = function(arg0, arg1, arg2) { - const ret = makeMutClosure(arg0, arg1, 230, __wbg_adapter_33); - return addHeapObject(ret); - }; - imports.wbg.__wbindgen_closure_wrapper1062 = function(arg0, arg1, arg2) { - const ret = makeMutClosure(arg0, arg1, 346, __wbg_adapter_36); - return addHeapObject(ret); - }; - - if (typeof input === 'string' || (typeof Request === 'function' && input instanceof Request) || (typeof URL === 'function' && input instanceof URL)) { - input = fetch(input); - } - - - - const { instance, module } = await load(await input, imports); - - wasm = instance.exports; - init.__wbindgen_wasm_module = module; - - return wasm; -} - -wasm_bindgen = Object.assign(init, __exports); - -})(); diff --git a/docs/eframe_template_bg.wasm b/docs/eframe_template_bg.wasm deleted file mode 100644 index 8f99761..0000000 Binary files a/docs/eframe_template_bg.wasm and /dev/null differ diff --git a/docs/manifest.json b/docs/manifest.json deleted file mode 100644 index 0bb8b17..0000000 --- a/docs/manifest.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "Egui Template PWA", - "short_name": "egui-template-pwa", - "icons": [{ - "src": "./icon-256.png", - "sizes": "256x256", - "type": "image/png" - }, - { - "src": "./maskable_icon_x512.png", - "sizes": "512x512", - "type": "image/png", - "purpose": "any maskable" - }, - { - "src": "./icon-1024.png", - "sizes": "1024x1024", - "type": "image/png" - } - ], - "lang": "en-US", - "id": "/index.html", - "start_url": "./index.html", - "display": "standalone", - "background_color": "white", - "theme_color": "white" - } diff --git a/docs/index.html b/index.html similarity index 57% rename from docs/index.html rename to index.html index 38fa206..94b6ba8 100644 --- a/docs/index.html +++ b/index.html @@ -6,11 +6,29 @@ + eframe template + + + + + + + + + + + + + + + + + + -