diff --git a/.github/actions/npm-install-build-and-cache/action.yaml b/.github/actions/npm-install-build-and-cache/action.yaml index 1a8206b1..3b425fc9 100644 --- a/.github/actions/npm-install-build-and-cache/action.yaml +++ b/.github/actions/npm-install-build-and-cache/action.yaml @@ -47,4 +47,5 @@ runs: path: | packages/**/build/* e2e-tests/build/* + github-pages-publisher/build/* if-no-files-found: error diff --git a/.github/workflows/pr-close.yaml b/.github/workflows/pr-close.yaml new file mode 100644 index 00000000..7751efa2 --- /dev/null +++ b/.github/workflows/pr-close.yaml @@ -0,0 +1,37 @@ +name: delete preview on PR close + +# only trigger on pull request closed events +on: + pull_request: + types: [closed] + +permissions: + id-token: write + contents: write + pull-requests: write + checks: write + +jobs: + delete_preview: + runs-on: ubuntu-latest + env: + PR_PATH: pull/${{github.event.number}} + steps: + - name: make empty dir + run: mkdir empty-dir + + - name: delete folder + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./empty-dir + destination_dir: ${{ env.PR_PATH }} + + - name: Comment on PR + uses: hasura/comment-progress@v2.2.0 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + repository: ${{ github.repository }} + number: ${{ github.event.number }} + id: deploy-preview + message: "🪓 PR closed, deleted preview at https://github.com/${{ github.repository }}/tree/gh-pages/${{ env.PR_PATH }}/" \ No newline at end of file diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index ba73ed09..506d6b4f 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -110,6 +110,42 @@ jobs: name: images path: e2e-tests/test/__image_snapshots__/ + publish-gh-pages: + name: Publish GitHub Pages + needs: [ build ] + runs-on: ubuntu-latest + env: + PR_PATH: pull/${{github.event.number}} + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + lfs: true + persist-credentials: false + + - name: "Retrieve Dependencies and Build Artifacts" + id: retrieve-deps-and-build + uses: ./.github/actions/retrieve-deps-and-build + + - name: Set base URL for preview if PR + run: echo "BASE_URL=https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/${{ env.PR_PATH }}/" >> $GITHUB_ENV + + - name: Deploy to PR preview + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./github-pages-publisher/build + destination_dir: ${{ env.PR_PATH }} + + - name: Add PR Preview comment + uses: hasura/comment-progress@v2.2.0 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + repository: ${{ github.repository }} + number: ${{ github.event.number }} + id: deploy-preview + message: "A preview of this PR can be seen here:\n\n ✨ ${{ env.BASE_URL }} ✨\n\nChanges may take a few minutes to propagate. The source is here: https://github.com/${{ github.repository }}/tree/gh-pages/${{ env.PR_PATH }}/" + summary: name: Summary needs: [build, test, type-check, lint, e2e-test] diff --git a/README.md b/README.md index 10678d33..d8f6c932 100644 --- a/README.md +++ b/README.md @@ -58,32 +58,49 @@ The Networked DOM server and MML client can then be used to allow multiple users * **Portability**: MML documents can run in any modern web browser, making them easy to share and view. * **Composability**: MML documents can be composed of multiple documents running on different servers, making it possible to create complex virtual world objects without having to provide all the compute power and technical capability on a single server. -# High-Level Package Architecture +# Packages ## Language (MML) -MML is a set of HTML elements and attributes that can be used to describe 3D objects and experiences. +MML is a set of HTML elements and attributes that can be used to describe 3D objects and experiences. The schema for these elements and attributes is defined in XML Schema Definition Language (XSD). -These elements and attributes can be used without networking. However, when a HTML document including MML tags is run on a server and exposed via a websocket multiple users can interact with the same instance of the document at the same time. +* [./packages/schema](./packages/schema) - `@mml-io/schema` - MML Schema in XML Schema Definition Language (XSD) +* [./packages/schema-validator](./packages/schema-validator) - `@mml-io/schema-validator` - A package for validating MML document using the MML Schema +* [./packages/mml-react-types](./packages/mml-react-types) - `@mml-io/mml-react-types` - TypeScript types for using MML components in React -* [./packages/mml-web](./packages/mml-web) - Web THREE.js MML Library -* [./packages/mml-web-client](./packages/mml-web-client) - Web THREE.js MML Client -* [./packages/mml-web-runner](./packages/mml-web-runner) - Web Runner (for running MML documents in a web browser rather than a server) -* [./packages/schema](./packages/schema) - MML Schema in XML Schema Definition Language (XSD) -* [./packages/schema-validator](./packages/schema-validator) - A package for validating MML document using the MML Schema +## Web Packages +MML can be used in a web browser to create 3D web experiences. Networking is optional and different libraries can be used to provide the 3D graphics. + +* [./packages/mml-web](./packages/mml-web) - `@mml-io/mml-web` - MML Library that handles MML elements and attributes +* [./packages/mml-web-client](./packages/mml-web-client) - `@mml-io/mml-web-client` - Web MML Client (standalone script / example) +* [./packages/mml-web-threejs](./packages/mml-web-threejs) - `@mml-io/mml-web-threejs` - Graphics Adapter for MML to THREE.js +* [./packages/mml-web-threejs-standalone](./packages/mml-web-threejs-standalone) - `@mml-io/mml-web-threejs-standalone` - THREE.js app for viewing MML documents in a web browser +* [./packages/mml-web-playcanvas](./packages/mml-web-playcanvas) - `@mml-io/mml-web-playcanvas` - Graphics Adapter for MML to PlayCanvas +* [./packages/mml-web-playcanvas-standalone](./packages/mml-web-playcanvas-standalone) - `@mml-io/mml-web-playcanvas-standalone` - PlayCanvas app for viewing MML documents in a web browser ## Networking (Networked DOM) MML is based on a set of libraries (built expressly for MML) called "Networked DOM". +Networked DOM allows running a HTML document including script tags on a server and exposing it via a websocket which allows multiple users to interact with the same instance of the document at the same time. + The server and network components necessary to support the multi-user mode are independent of the MML additions to HTML (and can be used with regular 2D HTML). * Networked DOM - * [./packages/networked-dom-web](./packages/networked-dom-web) - Web Networked DOM Library - * [./packages/networked-dom-web-client](./packages/networked-dom-web-client) - Web Networked DOM Client - * [./packages/networked-dom-web-runner](./packages/networked-dom-web-runner) - Web Networked DOM Runner (for running Networked DOM documents in a web browser rather than a server) - * [./packages/networked-dom-protocol](./packages/networked-dom-protocol) - Networked DOM WebSocket Protocol TypeScript Definition - * [./packages/observable-dom-common](./packages/observable-dom-common) - Observable DOM Common - * [./packages/observable-dom](./packages/observable-dom) - Observable DOM (JSDOM Execution) Library - * [./packages/networked-dom-document](./packages/networked-dom-document) - Networked DOM Document Library + * [./packages/mml-web-runner](./packages/mml-web-runner) - `@mml-io/mml-web-runner` - Web Runner (for running MML documents in a web browser rather than a server) + * [./packages/networked-dom-server](./packages/networked-dom-server) - `@mml-io/networked-dom-server` - Networked DOM Library for running documents on a Node.JS server + * [./packages/networked-dom-web](./packages/networked-dom-web) - `@mml-io/networked-dom-web` - Web Networked DOM Library (WebSocket client for Networked DOM) + * [./packages/networked-dom-web-client](./packages/networked-dom-web-client) - `@mml-io/networked-dom-web-client` - Web Networked DOM Client (Standalone script / example) + * [./packages/networked-dom-web-runner](./packages/networked-dom-web-runner) - `@mml-io/networked-dom-web-runner` - Web Networked DOM Runner (for running Networked DOM documents in a web browser rather than a server) + * [./packages/networked-dom-protocol](./packages/networked-dom-protocol) - `@mml-io/networked-dom-protocol` - Networked DOM WebSocket Protocol TypeScript Definition + * [./packages/observable-dom-common](./packages/observable-dom-common) - `@mml-io/observable-dom-common` - Observable DOM Common + * [./packages/observable-dom](./packages/observable-dom) - `@mml-io/observable-dom` - Observable DOM (JSDOM Execution) Library + * [./packages/networked-dom-document](./packages/networked-dom-document) - `@mml-io/networked-dom-document` - Networked DOM Document Library + +## MML Viewer +MML Viewer is a standalone app that can be used to view MML documents in a web browser. + +It is available at [https://viewer.mml.io/main/v1/](https://viewer.mml.io/main/v1/). + +* [./packages/mml-viewer](./packages/mml-viewer) - `@mml-io/mml-viewer` - MML Viewer # Usage of this repo diff --git a/e2e-tests/package.json b/e2e-tests/package.json index d6ce34de..f3fe5b9c 100644 --- a/e2e-tests/package.json +++ b/e2e-tests/package.json @@ -19,7 +19,7 @@ "express": "4.21.0", "express-ws": "5.0.2", "jest-image-snapshot": "6.4.0", - "networked-dom-server": "^0.18.1", + "@mml-io/networked-dom-server": "^0.18.1", "puppeteer": "22.6.5", "wait-on": "8.0.1", "ws": "8.18.0" diff --git a/e2e-tests/setup.ts b/e2e-tests/setup.ts index 8f4ee502..737c3ea7 100644 --- a/e2e-tests/setup.ts +++ b/e2e-tests/setup.ts @@ -13,6 +13,7 @@ if (process.env.HEADLESS === "true") { module.exports = async function () { const browser = await puppeteer.launch({ + args: ["--no-sandbox"], headless: headless ? "shell" : false, }); // store the browser instance so we can teardown it later diff --git a/e2e-tests/src/click-position-test.html b/e2e-tests/src/click-position-test.html index 1d2cffe7..b610de83 100644 --- a/e2e-tests/src/click-position-test.html +++ b/e2e-tests/src/click-position-test.html @@ -9,6 +9,7 @@ myPlane.addEventListener("click", (e) => { toggle = !toggle; - myLabel.setAttribute("content", JSON.stringify(e.detail.position)); + const {x, y, z} = e.detail.position; + myLabel.setAttribute("content", JSON.stringify({x: x.toFixed(3),y: y.toFixed(3),z: z.toFixed(3)})); }); diff --git a/e2e-tests/src/index.ts b/e2e-tests/src/index.ts index 75d28e78..6d6f18d2 100644 --- a/e2e-tests/src/index.ts +++ b/e2e-tests/src/index.ts @@ -1,10 +1,11 @@ import { Stats } from "node:fs"; +import * as QueryString from "node:querystring"; +import { EditableNetworkedDOM, LocalObservableDOMFactory } from "@mml-io/networked-dom-server"; import * as chokidar from "chokidar"; import express, { Request, static as expressStatic } from "express"; import enableWs from "express-ws"; import * as fs from "fs"; -import { EditableNetworkedDOM, LocalObservableDOMFactory } from "networked-dom-server"; import * as path from "path"; import * as url from "url"; @@ -102,14 +103,14 @@ app.ws("/:pathName", (ws, req) => { app.get("/:documentPath/", (req, res) => { const html = ``; + )}/client/index.js?defineGlobals=true&url=${getWebsocketUrl(req)}">`; res.send(html); }); app.use( "/client/", - expressStatic(path.resolve(dirname, "../../node_modules/mml-web-client/build/")), + expressStatic(path.resolve(dirname, "../../node_modules/@mml-io/mml-web-client/build/")), ); app.get("/:documentPath/reset", (req, res) => { @@ -122,8 +123,10 @@ app.get("/:documentPath/reset", (req, res) => { return; } + const queryString = QueryString.encode(req.query as QueryString.ParsedUrlQueryInput); + currentDocument.reload(); - res.redirect("/" + documentPath); + res.redirect("/" + documentPath + "?" + queryString); }); console.log("Serving on port:", port); diff --git a/e2e-tests/src/m-frame-bounds-load-range-test.html b/e2e-tests/src/m-frame-bounds-load-range-test.html index f2f55b58..c346ea48 100644 --- a/e2e-tests/src/m-frame-bounds-load-range-test.html +++ b/e2e-tests/src/m-frame-bounds-load-range-test.html @@ -13,6 +13,7 @@ unload-range="2" y="1" src="/assets/static-mml.html" + debug="true" > diff --git a/e2e-tests/src/m-interaction-test.html b/e2e-tests/src/m-interaction-test.html index fd552c93..972350dd 100644 --- a/e2e-tests/src/m-interaction-test.html +++ b/e2e-tests/src/m-interaction-test.html @@ -41,6 +41,6 @@ let interactionToggle = false; myInteraction.addEventListener("interact", () => { interactionToggle = !interactionToggle; - myPlane.setAttribute("color", interactionToggle ? "orange" : originalColor); + myPlane.setAttribute("color", interactionToggle ? "blue" : originalColor); }); diff --git a/e2e-tests/src/m-label-emissive-test.html b/e2e-tests/src/m-label-emissive-test.html index c48e380e..f2010a8d 100644 --- a/e2e-tests/src/m-label-emissive-test.html +++ b/e2e-tests/src/m-label-emissive-test.html @@ -73,4 +73,4 @@ font-size="85" alignment="center" emissive="5" -> \ No newline at end of file +> diff --git a/e2e-tests/src/m-label-test.html b/e2e-tests/src/m-label-test.html index fdb76602..9b18f8e5 100644 --- a/e2e-tests/src/m-label-test.html +++ b/e2e-tests/src/m-label-test.html @@ -3,10 +3,11 @@ diff --git a/e2e-tests/src/m-model-socket-test.html b/e2e-tests/src/m-model-socket-test.html index 608993f9..8b9667e6 100644 --- a/e2e-tests/src/m-model-socket-test.html +++ b/e2e-tests/src/m-model-socket-test.html @@ -8,7 +8,7 @@ anim="/assets/idle.glb" src="/assets/Body.glb" anim-start-time="-2000" anim-pause-time="0" > - + `, - ); + res.send(``); }); console.log("Serving on port:", port); diff --git a/examples/mml-web-multi-renderer-example/build.ts b/examples/mml-web-multi-renderer-example/build.ts new file mode 100644 index 00000000..c5a0fe8e --- /dev/null +++ b/examples/mml-web-multi-renderer-example/build.ts @@ -0,0 +1,67 @@ +import * as process from "process"; + +import * as esbuild from "esbuild"; +import { copy } from "esbuild-plugin-copy"; + +const buildMode = "--build"; +const serveMode = "--serve"; + +const helpString = `Mode must be provided as one of ${buildMode} or ${serveMode}`; + +const args = process.argv.splice(2); +if (args.length !== 1) { + console.error(helpString); + process.exit(1); +} +const mode = args[0]; + +const buildOptions: esbuild.BuildOptions = { + entryPoints: { + index: "src/index.tsx", + }, + bundle: true, + external: ["node:crypto"], + write: true, + publicPath: "/", + sourcemap: true, + outdir: "./build/", + plugins: [ + copy({ + resolveFrom: "cwd", + assets: { + from: ["./src/static/**/*"], + to: ["./build/"], + }, + }), + ], +}; + +switch (mode) { + case buildMode: + esbuild.build(buildOptions).catch(() => process.exit(1)); + break; + case serveMode: + // eslint-disable-next-line no-case-declarations + const portArg = process.env.PORT; + if (!portArg) { + console.error("PORT environment variable is not set for server"); + process.exit(1); + } + esbuild + .context({ ...buildOptions }) + .then((context) => + context.serve({ + host: "127.0.0.1", + port: parseInt(portArg, 10), + servedir: "./build/", + }), + ) + .catch((e) => { + console.error(e); + process.exit(1); + }); + break; + default: + console.error(helpString); + process.exit(1); +} diff --git a/examples/mml-web-multi-renderer-example/package.json b/examples/mml-web-multi-renderer-example/package.json new file mode 100644 index 00000000..eebb2818 --- /dev/null +++ b/examples/mml-web-multi-renderer-example/package.json @@ -0,0 +1,23 @@ +{ + "name": "mml-web-multi-renderer-example", + "version": "0.18.1", + "private": true, + "scripts": { + "type-check": "tsc --noEmit", + "build": "tsx ./build.ts --build", + "iterate": "cross-env PORT=7075 tsx ./build.ts --serve", + "serve": "node --enable-source-maps ./build/index.js", + "lint": "eslint \"./{src,test}/**/*.{js,jsx,ts,tsx}\" --max-warnings 0", + "lint-fix": "eslint \"./{src,test}/**/*.{js,jsx,ts,tsx}\" --fix" + }, + "dependencies": { + "@mml-io/mml-web": "0.18.1", + "@mml-io/mml-web-runner": "0.18.1", + "@mml-io/mml-web-threejs-standalone": "0.18.1", + "@mml-io/mml-web-playcanvas-standalone": "0.18.1", + "three": "0.163.0", + "playcanvas": "1.73.5" + }, + "devDependencies": { + } +} diff --git a/examples/mml-web-multi-renderer-example/src/index.tsx b/examples/mml-web-multi-renderer-example/src/index.tsx new file mode 100644 index 00000000..bfcc3fea --- /dev/null +++ b/examples/mml-web-multi-renderer-example/src/index.tsx @@ -0,0 +1,168 @@ +import { + IframeWrapper, + MMLScene, + registerCustomElementsToWindow, + StandaloneGraphicsAdapter, + StandaloneTagDebugAdapter, +} from "@mml-io/mml-web"; +import { + StandalonePlayCanvasAdapter, + StandalonePlayCanvasAdapterControlsType, +} from "@mml-io/mml-web-playcanvas-standalone"; +import { + EditableNetworkedDOM, + IframeObservableDOMFactory, + MMLWebRunnerClient, + NetworkedDOM, +} from "@mml-io/mml-web-runner"; +import { + StandaloneThreeJSAdapter, + StandaloneThreeJSAdapterControlsType, +} from "@mml-io/mml-web-threejs-standalone"; + +const startingContent = ` + + + + + +`; + +function createCloseableClient( + clientsHolder: HTMLElement, + windowTarget: Window, + iframeBody: HTMLElement, + networkedDOMDocument: NetworkedDOM | EditableNetworkedDOM, + type: "three" | "playcanvas" | "tags" = "three", +) { + const wrapperElement = document.createElement("div"); + wrapperElement.style.position = "relative"; + wrapperElement.style.width = "400px"; + wrapperElement.style.height = "400px"; + wrapperElement.style.border = "1px solid black"; + wrapperElement.style.flexShrink = "0"; + wrapperElement.style.flexGrow = "0"; + + const mmlScene = new MMLScene(wrapperElement); + const client = new MMLWebRunnerClient(windowTarget, iframeBody, mmlScene); + const closeButton = document.createElement("button"); + closeButton.textContent = "Close"; + closeButton.style.position = "absolute"; + closeButton.style.bottom = "0"; + closeButton.style.right = "0"; + let graphicsAdapter: StandaloneGraphicsAdapter | null = null; + closeButton.addEventListener("click", () => { + client.dispose(); + mmlScene.dispose(); + closeButton.remove(); + wrapperElement.remove(); + if (graphicsAdapter) { + graphicsAdapter.dispose(); + } + }); + wrapperElement.append(closeButton); + clientsHolder.append(wrapperElement); + + let graphicsAdapterPromise; + if (type === "playcanvas") { + graphicsAdapterPromise = StandalonePlayCanvasAdapter.create(wrapperElement, { + controlsType: StandalonePlayCanvasAdapterControlsType.DragFly, + }); + } else if (type === "tags") { + graphicsAdapterPromise = StandaloneTagDebugAdapter.create(wrapperElement); + } else { + graphicsAdapterPromise = StandaloneThreeJSAdapter.create(wrapperElement, { + controlsType: StandaloneThreeJSAdapterControlsType.DragFly, + }); + } + graphicsAdapterPromise.then((createdGraphicsAdapter) => { + graphicsAdapter = createdGraphicsAdapter; + mmlScene.init(graphicsAdapter); + client.connect(networkedDOMDocument); + }); + return client; +} + +window.addEventListener("DOMContentLoaded", async () => { + const { iframeWindow, iframeBody } = await IframeWrapper.create(); + registerCustomElementsToWindow(iframeWindow); + + const networkedDOMDocument = new EditableNetworkedDOM( + "http://example.com/index.html", + IframeObservableDOMFactory, + true, + ); + + const title = document.createElement("h1"); + title.textContent = "MML Web Runner Example"; + document.body.append(title); + + const textArea = document.createElement("textarea"); + textArea.style.width = "500px"; + textArea.style.height = "500px"; + textArea.value = startingContent; + textArea.addEventListener("input", () => { + networkedDOMDocument.load(textArea.value); + }); + document.body.append(textArea); + const addThreeButton = document.createElement("button"); + addThreeButton.textContent = "Add THREE client"; + addThreeButton.addEventListener("click", () => { + createCloseableClient(clientsHolder, iframeWindow, iframeBody, networkedDOMDocument, "three"); + }); + document.body.append(addThreeButton); + + const addPlayCanvasButton = document.createElement("button"); + addPlayCanvasButton.textContent = "Add PlayCanvas client"; + addPlayCanvasButton.addEventListener("click", () => { + createCloseableClient( + clientsHolder, + iframeWindow, + iframeBody, + networkedDOMDocument, + "playcanvas", + ); + }); + document.body.append(addPlayCanvasButton); + + const addTagsButton = document.createElement("button"); + addTagsButton.textContent = "Add Tags client"; + addTagsButton.addEventListener("click", () => { + createCloseableClient(clientsHolder, iframeWindow, iframeBody, networkedDOMDocument, "tags"); + }); + document.body.append(addTagsButton); + + const clientsHolder = document.createElement("div"); + clientsHolder.style.display = "flex"; + document.body.append(clientsHolder); + + createCloseableClient(clientsHolder, iframeWindow, iframeBody, networkedDOMDocument, "three"); + createCloseableClient( + clientsHolder, + iframeWindow, + iframeBody, + networkedDOMDocument, + "playcanvas", + ); + createCloseableClient( + clientsHolder, + iframeWindow, + iframeBody, + networkedDOMDocument, + "playcanvas", + ); + networkedDOMDocument.load(textArea.value); +}); diff --git a/examples/mml-web-multi-renderer-example/src/static/index.html b/examples/mml-web-multi-renderer-example/src/static/index.html new file mode 100644 index 00000000..8050ba29 --- /dev/null +++ b/examples/mml-web-multi-renderer-example/src/static/index.html @@ -0,0 +1,9 @@ + + + + + +
+ + + diff --git a/examples/mml-web-multi-renderer-example/tsconfig.json b/examples/mml-web-multi-renderer-example/tsconfig.json new file mode 100644 index 00000000..3071be1b --- /dev/null +++ b/examples/mml-web-multi-renderer-example/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "noImplicitAny": true, + "module": "esnext", + "target": "ES6", + "jsx": "react", + "lib": ["es2020", "dom"], + "sourceMap": true, + "allowJs": true, + "types": ["node", "jest"], + "strictNullChecks": true, + "allowSyntheticDefaultImports": true, + "moduleResolution": "node", + "resolveJsonModule": true, + "downlevelIteration": true, + "outDir": "./build", + "incremental": true + }, + "include": ["src/**/*", "test/**/*", "./build.ts"], + "exclude": ["**/build/*", "types-src"], +} diff --git a/examples/mml-web-runner-example/package.json b/examples/mml-web-runner-example/package.json index 43fd93c9..8856b5ac 100644 --- a/examples/mml-web-runner-example/package.json +++ b/examples/mml-web-runner-example/package.json @@ -11,7 +11,8 @@ "lint-fix": "eslint \"./**/*.{js,jsx,ts,tsx}\" --fix" }, "dependencies": { - "mml-web": "^0.18.1", - "mml-web-runner": "^0.18.1" + "@mml-io/mml-web": "^0.18.1", + "@mml-io/mml-web-runner": "^0.18.1", + "@mml-io/mml-web-threejs-standalone": "0.18.1" } } diff --git a/examples/mml-web-runner-example/src/index.tsx b/examples/mml-web-runner-example/src/index.tsx index e7662c33..3003860b 100644 --- a/examples/mml-web-runner-example/src/index.tsx +++ b/examples/mml-web-runner-example/src/index.tsx @@ -1,10 +1,14 @@ -import { IframeWrapper, MMLScene, registerCustomElementsToWindow } from "mml-web"; +import { IframeWrapper, MMLScene, registerCustomElementsToWindow } from "@mml-io/mml-web"; import { EditableNetworkedDOM, IframeObservableDOMFactory, MMLWebRunnerClient, NetworkedDOM, -} from "mml-web-runner"; +} from "@mml-io/mml-web-runner"; +import { + StandaloneThreeJSAdapter, + StandaloneThreeJSAdapterControlsType, +} from "@mml-io/mml-web-threejs-standalone"; const startingContent = ` @@ -41,9 +45,9 @@ function createCloseableClient( wrapperElement.style.border = "1px solid black"; wrapperElement.style.flexShrink = "0"; wrapperElement.style.flexGrow = "0"; - const mmlScene = new MMLScene(); + + const mmlScene = new MMLScene(wrapperElement); const client = new MMLWebRunnerClient(windowTarget, iframeBody, mmlScene); - wrapperElement.append(mmlScene.element); const closeButton = document.createElement("button"); closeButton.textContent = "Close"; closeButton.style.position = "absolute"; @@ -56,8 +60,13 @@ function createCloseableClient( }); wrapperElement.append(closeButton); clientsHolder.append(wrapperElement); - client.connect(networkedDOMDocument); - mmlScene.fitContainer(); + + StandaloneThreeJSAdapter.create(wrapperElement, { + controlsType: StandaloneThreeJSAdapterControlsType.DragFly, + }).then((graphicsAdapter) => { + mmlScene.init(graphicsAdapter); + client.connect(networkedDOMDocument); + }); return client; } diff --git a/examples/networked-dom-web-client-example/package.json b/examples/networked-dom-web-client-example/package.json index 32ec6987..6488acc4 100644 --- a/examples/networked-dom-web-client-example/package.json +++ b/examples/networked-dom-web-client-example/package.json @@ -12,7 +12,7 @@ "chokidar": "4.0.1", "express": "4.21.0", "express-ws": "5.0.2", - "networked-dom-server": "^0.18.1", + "@mml-io/networked-dom-server": "^0.18.1", "ws": "8.18.0" }, "devDependencies": { diff --git a/examples/networked-dom-web-client-example/src/index.ts b/examples/networked-dom-web-client-example/src/index.ts index e3cce8d2..1e656750 100644 --- a/examples/networked-dom-web-client-example/src/index.ts +++ b/examples/networked-dom-web-client-example/src/index.ts @@ -6,7 +6,7 @@ import { NetworkedDOM } from "@mml-io/networked-dom-document"; import * as chokidar from "chokidar"; import express, { Request } from "express"; import enableWs from "express-ws"; -import { EditableNetworkedDOM, LocalObservableDOMFactory } from "networked-dom-server"; +import { EditableNetworkedDOM, LocalObservableDOMFactory } from "@mml-io/networked-dom-server"; import ws from "ws"; const dirname = url.fileURLToPath(new URL(".", import.meta.url)); @@ -60,7 +60,7 @@ app.ws("/networked-dom-websocket", (ws: ws.WebSocket) => { }); app.get("/websocket-example/", (req, res) => { res.send( - ``, ); diff --git a/github-pages-publisher/index.html b/github-pages-publisher/index.html new file mode 100644 index 00000000..e56e1ef7 --- /dev/null +++ b/github-pages-publisher/index.html @@ -0,0 +1 @@ + diff --git a/github-pages-publisher/package.json b/github-pages-publisher/package.json new file mode 100644 index 00000000..895332a6 --- /dev/null +++ b/github-pages-publisher/package.json @@ -0,0 +1,10 @@ +{ + "name": "github-pages-publisher", + "private": true, + "scripts": { + "build": "./publish.sh" + }, + "devDependencies": { + "@mml-io/mml-viewer": "file:../packages/mml-viewer" + } +} diff --git a/github-pages-publisher/publish.sh b/github-pages-publisher/publish.sh new file mode 100755 index 00000000..40e0dfcc --- /dev/null +++ b/github-pages-publisher/publish.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +# Exit on error and echo each command +set -ex + +# Set the working directory to the location of this script +cd "$(dirname "$0")" + +# Remove the build directory if it exists +rm -rf ./build + +# Create the build directory +mkdir -p ./build + +# Copy the index.html file that redirects into the build directory +cp ./index.html ./build/index.html + +# Copy the files for each app into the build directory +mkdir -p ./build/v1 +cp -r ../packages/mml-viewer/build/* ./build/v1/ diff --git a/integration-tests/networked-dom-integration-tests/test/TestCaseNetworkedDOMDocument.ts b/integration-tests/networked-dom-integration-tests/test/TestCaseNetworkedDOMDocument.ts index d5e2e3ab..58960367 100644 --- a/integration-tests/networked-dom-integration-tests/test/TestCaseNetworkedDOMDocument.ts +++ b/integration-tests/networked-dom-integration-tests/test/TestCaseNetworkedDOMDocument.ts @@ -1,5 +1,5 @@ import { EditableNetworkedDOM } from "@mml-io/networked-dom-document"; -import { LocalObservableDOMFactory } from "networked-dom-server"; +import { LocalObservableDOMFactory } from "@mml-io/networked-dom-server"; import { formatHTML, htmlStringWithFilters } from "./test-util"; import { TestCaseNetworkedDOMClient } from "./TestCaseNetworkedDOMClient"; diff --git a/package-lock.json b/package-lock.json index 1a9e19e8..3b805d4b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,8 @@ "packages/**/*", "examples/**/*", "e2e-tests", - "integration-tests/**/*" + "integration-tests/**/*", + "github-pages-publisher" ], "devDependencies": { "@babel/preset-typescript": "7.24.7", @@ -21,6 +22,7 @@ "@types/jest": "29.5.13", "@types/jju": "1.4.5", "@types/node": "22.7.0", + "@types/resolve": "1.20.6", "@types/tmp": "0.2.6", "concurrently": "9.0.1", "cross-env": "7.0.3", @@ -36,6 +38,7 @@ "lerna": "8.1.8", "prettier": "3.3.3", "publish-if-not-exists": "1.1.0", + "resolve": "1.22.8", "tmp": "0.2.3", "ts-jest": "29.2.5", "ts-node": "10.9.2", @@ -50,11 +53,11 @@ "e2e-tests": { "version": "0.18.1", "dependencies": { + "@mml-io/networked-dom-server": "^0.18.1", "chokidar": "4.0.1", "express": "4.21.0", "express-ws": "5.0.2", "jest-image-snapshot": "6.4.0", - "networked-dom-server": "^0.18.1", "puppeteer": "22.6.5", "wait-on": "8.0.1", "ws": "8.18.0" @@ -67,32 +70,6 @@ "@types/puppeteer": "7.0.4" } }, - "e2e-tests/node_modules/@puppeteer/browsers": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-2.2.2.tgz", - "integrity": "sha512-hZ/JhxPIceWaGSEzUZp83/8M49CoxlkuThfTR7t4AoCu5+ZvJ3vktLm60Otww2TXeROB5igiZ8D9oPQh6ckBVg==", - "dependencies": { - "debug": "4.3.4", - "extract-zip": "2.0.1", - "progress": "2.0.3", - "proxy-agent": "6.4.0", - "semver": "7.6.0", - "tar-fs": "3.0.5", - "unbzip2-stream": "1.4.3", - "yargs": "17.7.2" - }, - "bin": { - "browsers": "lib/cjs/main-cli.js" - }, - "engines": { - "node": ">=18" - } - }, - "e2e-tests/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" - }, "e2e-tests/node_modules/chokidar": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.1.tgz", @@ -107,203 +84,13 @@ "url": "https://paulmillr.com/funding/" } }, - "e2e-tests/node_modules/chromium-bidi": { - "version": "0.5.17", - "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.5.17.tgz", - "integrity": "sha512-BqOuIWUgTPj8ayuBFJUYCCuwIcwjBsb3/614P7tt1bEPJ4i1M0kCdIl0Wi9xhtswBXnfO2bTpTMkHD71H8rJMg==", - "dependencies": { - "mitt": "3.0.1", - "urlpattern-polyfill": "10.0.0", - "zod": "3.22.4" - }, - "peerDependencies": { - "devtools-protocol": "*" - } - }, - "e2e-tests/node_modules/cosmiconfig": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-9.0.0.tgz", - "integrity": "sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==", - "dependencies": { - "env-paths": "^2.2.1", - "import-fresh": "^3.3.0", - "js-yaml": "^4.1.0", - "parse-json": "^5.2.0" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/d-fischer" - }, - "peerDependencies": { - "typescript": ">=4.9.5" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "e2e-tests/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "e2e-tests/node_modules/devtools-protocol": { - "version": "0.0.1262051", - "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1262051.tgz", - "integrity": "sha512-YJe4CT5SA8on3Spa+UDtNhEqtuV6Epwz3OZ4HQVLhlRccpZ9/PAYk0/cy/oKxFKRrZPBUPyxympQci4yWNWZ9g==" - }, - "e2e-tests/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "e2e-tests/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "e2e-tests/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "e2e-tests/node_modules/puppeteer": { - "version": "22.6.5", - "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-22.6.5.tgz", - "integrity": "sha512-YuoRKGj3MxHhUwrey7vmNvU4odGdUdNsj1ee8pfcqQlLWIXfMOXZCAXh8xdzpZESHH3tCGWp2xmPZE8E6iUEWg==", - "deprecated": "< 22.8.2 is no longer supported", - "hasInstallScript": true, - "dependencies": { - "@puppeteer/browsers": "2.2.2", - "cosmiconfig": "9.0.0", - "devtools-protocol": "0.0.1262051", - "puppeteer-core": "22.6.5" - }, - "bin": { - "puppeteer": "lib/esm/puppeteer/node/cli.js" - }, - "engines": { - "node": ">=18" - } - }, - "e2e-tests/node_modules/puppeteer-core": { - "version": "22.6.5", - "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-22.6.5.tgz", - "integrity": "sha512-s0/5XkAWe0/dWISiljdrybjwDCHhgN31Nu/wznOZPKeikgcJtZtbvPKBz0t802XWqfSQnQDt3L6xiAE5JLlfuw==", - "dependencies": { - "@puppeteer/browsers": "2.2.2", - "chromium-bidi": "0.5.17", - "debug": "4.3.4", - "devtools-protocol": "0.0.1262051", - "ws": "8.16.0" - }, - "engines": { - "node": ">=18" - } - }, - "e2e-tests/node_modules/puppeteer-core/node_modules/ws": { - "version": "8.16.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz", - "integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==", - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": ">=5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, - "e2e-tests/node_modules/semver": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", - "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "e2e-tests/node_modules/tar-fs": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.5.tgz", - "integrity": "sha512-JOgGAmZyMgbqpLwct7ZV8VzkEB6pxXFBVErLtb+XCOqzc6w1xiWKI9GVd6bwk68EX7eJ4DWmfXVmq8K2ziZTGg==", - "dependencies": { - "pump": "^3.0.0", - "tar-stream": "^3.1.5" - }, - "optionalDependencies": { - "bare-fs": "^2.1.1", - "bare-path": "^2.1.0" - } - }, - "e2e-tests/node_modules/tar-stream": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.7.tgz", - "integrity": "sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==", - "dependencies": { - "b4a": "^1.6.4", - "fast-fifo": "^1.2.0", - "streamx": "^2.15.0" - } - }, - "e2e-tests/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - }, - "e2e-tests/node_modules/zod": { - "version": "3.22.4", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.22.4.tgz", - "integrity": "sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==", - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } - }, "examples/mml-web-client-example": { "version": "0.18.1", "dependencies": { + "@mml-io/networked-dom-server": "^0.18.1", "chokidar": "4.0.1", "express": "4.21.0", "express-ws": "5.0.2", - "networked-dom-server": "^0.18.1", "ws": "8.18.0" }, "devDependencies": { @@ -326,20 +113,33 @@ "url": "https://paulmillr.com/funding/" } }, + "examples/mml-web-multi-renderer-example": { + "version": "0.18.1", + "dependencies": { + "@mml-io/mml-web": "0.18.1", + "@mml-io/mml-web-playcanvas-standalone": "0.18.1", + "@mml-io/mml-web-runner": "0.18.1", + "@mml-io/mml-web-threejs-standalone": "0.18.1", + "playcanvas": "1.73.5", + "three": "0.163.0" + }, + "devDependencies": {} + }, "examples/mml-web-runner-example": { "version": "0.18.1", "dependencies": { - "mml-web": "^0.18.1", - "mml-web-runner": "^0.18.1" + "@mml-io/mml-web": "^0.18.1", + "@mml-io/mml-web-runner": "^0.18.1", + "@mml-io/mml-web-threejs-standalone": "0.18.1" } }, "examples/networked-dom-web-client-example": { "version": "0.18.1", "dependencies": { + "@mml-io/networked-dom-server": "^0.18.1", "chokidar": "4.0.1", "express": "4.21.0", "express-ws": "5.0.2", - "networked-dom-server": "^0.18.1", "ws": "8.18.0" }, "devDependencies": { @@ -385,6 +185,11 @@ "@mml-io/networked-dom-web-runner-relay": "^0.18.1" } }, + "github-pages-publisher": { + "devDependencies": { + "@mml-io/mml-viewer": "file:../packages/mml-viewer" + } + }, "integration-tests/networked-dom-integration-tests": { "version": "0.18.1", "devDependencies": { @@ -407,11 +212,12 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", - "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", + "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", "dependencies": { - "@babel/highlight": "^7.24.7", + "@babel/helper-validator-identifier": "^7.25.9", + "js-tokens": "^4.0.0", "picocolors": "^1.0.0" }, "engines": { @@ -419,30 +225,30 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.25.4", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.25.4.tgz", - "integrity": "sha512-+LGRog6RAsCJrrrg/IO6LGmpphNe5DiK30dGjCoxxeGv49B10/3XYGxPsAwrDlMFcFEvdAUavDT8r9k/hSyQqQ==", + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.26.2.tgz", + "integrity": "sha512-Z0WgzSEa+aUcdiJuCIqgujCshpMWgUpgOxXotrYPSA53hA3qopNaqcJpyr0hVb1FeWdnqFA35/fUtXgBK8srQg==", "devOptional": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.25.2", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.25.2.tgz", - "integrity": "sha512-BBt3opiCOxUr9euZ5/ro/Xv8/V7yJ5bjYMqG/C1YAo8MIKAnumZalCN+msbci3Pigy4lIQfPUpfMM27HMGaYEA==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.26.0.tgz", + "integrity": "sha512-i1SLeK+DzNnQ3LL/CswPCa/E5u4lh1k6IAEphON8F+cXt0t9euTshDru0q7/IqMa1PMPz5RnHuHscF8/ZJsStg==", "devOptional": true, "dependencies": { "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.24.7", - "@babel/generator": "^7.25.0", - "@babel/helper-compilation-targets": "^7.25.2", - "@babel/helper-module-transforms": "^7.25.2", - "@babel/helpers": "^7.25.0", - "@babel/parser": "^7.25.0", - "@babel/template": "^7.25.0", - "@babel/traverse": "^7.25.2", - "@babel/types": "^7.25.2", + "@babel/code-frame": "^7.26.0", + "@babel/generator": "^7.26.0", + "@babel/helper-compilation-targets": "^7.25.9", + "@babel/helper-module-transforms": "^7.26.0", + "@babel/helpers": "^7.26.0", + "@babel/parser": "^7.26.0", + "@babel/template": "^7.25.9", + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.26.0", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -458,41 +264,42 @@ } }, "node_modules/@babel/generator": { - "version": "7.25.6", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.25.6.tgz", - "integrity": "sha512-VPC82gr1seXOpkjAAKoLhP50vx4vGNlF4msF64dSFq1P8RfB+QAuJWGHPXXPc8QyfVWwwB/TNNU4+ayZmHNbZw==", + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.26.2.tgz", + "integrity": "sha512-zevQbhbau95nkoxSq3f/DC/SC+EEOUZd3DYqfSkMhY2/wfSeaHV1Ew4vk8e+x8lja31IbyuUa2uQ3JONqKbysw==", "devOptional": true, "dependencies": { - "@babel/types": "^7.25.6", + "@babel/parser": "^7.26.2", + "@babel/types": "^7.26.0", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", - "jsesc": "^2.5.1" + "jsesc": "^3.0.2" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-annotate-as-pure": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.24.7.tgz", - "integrity": "sha512-BaDeOonYvhdKw+JoMVkAixAAJzG2jVPIwWoKBPdYuY9b452e2rPuI9QPYh3KpofZ3pW2akOmwZLOiOsHMiqRAg==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.25.9.tgz", + "integrity": "sha512-gv7320KBUFJz1RnylIg5WWYPRXKZ884AGkYpgpWW02TH66Dl+HaC1t1CKd0z3R4b6hdYEcmrNZHUmfCP+1u3/g==", "dev": true, "dependencies": { - "@babel/types": "^7.24.7" + "@babel/types": "^7.25.9" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.25.2", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.2.tgz", - "integrity": "sha512-U2U5LsSaZ7TAt3cfaymQ8WHh0pxvdHoEk6HVpaexxixjyEquMh0L0YNJNM6CTGKMXV1iksi0iZkGw4AcFkPaaw==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.9.tgz", + "integrity": "sha512-j9Db8Suy6yV/VHa4qzrj9yZfZxhLWQdVnRlXxmKLYlhWUVB1sB2G5sxuWYXk/whHD9iW76PmNzxZ4UCnTQTVEQ==", "devOptional": true, "dependencies": { - "@babel/compat-data": "^7.25.2", - "@babel/helper-validator-option": "^7.24.8", - "browserslist": "^4.23.1", + "@babel/compat-data": "^7.25.9", + "@babel/helper-validator-option": "^7.25.9", + "browserslist": "^4.24.0", "lru-cache": "^5.1.1", "semver": "^6.3.1" }, @@ -501,17 +308,17 @@ } }, "node_modules/@babel/helper-create-class-features-plugin": { - "version": "7.25.4", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.25.4.tgz", - "integrity": "sha512-ro/bFs3/84MDgDmMwbcHgDa8/E6J3QKNTk4xJJnVeFtGE+tL0K26E3pNxhYz2b67fJpt7Aphw5XcploKXuCvCQ==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.25.9.tgz", + "integrity": "sha512-UTZQMvt0d/rSz6KI+qdu7GQze5TIajwTS++GUozlw8VBJDEOAqSXwm1WvmYEZwqdqSGQshRocPDqrt4HBZB3fQ==", "dev": true, "dependencies": { - "@babel/helper-annotate-as-pure": "^7.24.7", - "@babel/helper-member-expression-to-functions": "^7.24.8", - "@babel/helper-optimise-call-expression": "^7.24.7", - "@babel/helper-replace-supers": "^7.25.0", - "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7", - "@babel/traverse": "^7.25.4", + "@babel/helper-annotate-as-pure": "^7.25.9", + "@babel/helper-member-expression-to-functions": "^7.25.9", + "@babel/helper-optimise-call-expression": "^7.25.9", + "@babel/helper-replace-supers": "^7.25.9", + "@babel/helper-skip-transparent-expression-wrappers": "^7.25.9", + "@babel/traverse": "^7.25.9", "semver": "^6.3.1" }, "engines": { @@ -522,41 +329,40 @@ } }, "node_modules/@babel/helper-member-expression-to-functions": { - "version": "7.24.8", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.24.8.tgz", - "integrity": "sha512-LABppdt+Lp/RlBxqrh4qgf1oEH/WxdzQNDJIu5gC/W1GyvPVrOBiItmmM8wan2fm4oYqFuFfkXmlGpLQhPY8CA==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.25.9.tgz", + "integrity": "sha512-wbfdZ9w5vk0C0oyHqAJbc62+vet5prjj01jjJ8sKn3j9h3MQQlflEdXYvuqRWjHnM12coDEqiC1IRCi0U/EKwQ==", "dev": true, "dependencies": { - "@babel/traverse": "^7.24.8", - "@babel/types": "^7.24.8" + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.25.9" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-imports": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.7.tgz", - "integrity": "sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.25.9.tgz", + "integrity": "sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==", "devOptional": true, "dependencies": { - "@babel/traverse": "^7.24.7", - "@babel/types": "^7.24.7" + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.25.9" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.25.2", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.25.2.tgz", - "integrity": "sha512-BjyRAbix6j/wv83ftcVJmBt72QtHI56C7JXZoG2xATiLpmoC7dpd8WnkikExHDVPpi/3qCmO6WY1EaXOluiecQ==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.26.0.tgz", + "integrity": "sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw==", "devOptional": true, "dependencies": { - "@babel/helper-module-imports": "^7.24.7", - "@babel/helper-simple-access": "^7.24.7", - "@babel/helper-validator-identifier": "^7.24.7", - "@babel/traverse": "^7.25.2" + "@babel/helper-module-imports": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9", + "@babel/traverse": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -566,35 +372,35 @@ } }, "node_modules/@babel/helper-optimise-call-expression": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.24.7.tgz", - "integrity": "sha512-jKiTsW2xmWwxT1ixIdfXUZp+P5yURx2suzLZr5Hi64rURpDYdMW0pv+Uf17EYk2Rd428Lx4tLsnjGJzYKDM/6A==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.25.9.tgz", + "integrity": "sha512-FIpuNaz5ow8VyrYcnXQTDRGvV6tTjkNtCK/RYNDXGSLlUD6cBuQTSw43CShGxjvfBTfcUA/r6UhUCbtYqkhcuQ==", "dev": true, "dependencies": { - "@babel/types": "^7.24.7" + "@babel/types": "^7.25.9" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.24.8", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.8.tgz", - "integrity": "sha512-FFWx5142D8h2Mgr/iPVGH5G7w6jDn4jUSpZTyDnQO0Yn7Ks2Kuz6Pci8H6MPCoUJegd/UZQ3tAvfLCxQSnWWwg==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.25.9.tgz", + "integrity": "sha512-kSMlyUVdWe25rEsRGviIgOWnoT/nfABVWlqt9N19/dIPWViAOW2s9wznP5tURbs/IDuNk4gPy3YdYRgH3uxhBw==", "devOptional": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-replace-supers": { - "version": "7.25.0", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.25.0.tgz", - "integrity": "sha512-q688zIvQVYtZu+i2PsdIu/uWGRpfxzr5WESsfpShfZECkO+d2o+WROWezCi/Q6kJ0tfPa5+pUGUlfx2HhrA3Bg==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.25.9.tgz", + "integrity": "sha512-IiDqTOTBQy0sWyeXyGSC5TBJpGFXBkRynjBeXsvbhQFKj2viwJC76Epz35YLU1fpe/Am6Vppb7W7zM4fPQzLsQ==", "dev": true, "dependencies": { - "@babel/helper-member-expression-to-functions": "^7.24.8", - "@babel/helper-optimise-call-expression": "^7.24.7", - "@babel/traverse": "^7.25.0" + "@babel/helper-member-expression-to-functions": "^7.25.9", + "@babel/helper-optimise-call-expression": "^7.25.9", + "@babel/traverse": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -604,91 +410,77 @@ } }, "node_modules/@babel/helper-simple-access": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.24.7.tgz", - "integrity": "sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg==", - "devOptional": true, + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.25.9.tgz", + "integrity": "sha512-c6WHXuiaRsJTyHYLJV75t9IqsmTbItYfdj99PnzYGQZkYKvan5/2jKJ7gu31J3/BJ/A18grImSPModuyG/Eo0Q==", + "dev": true, "dependencies": { - "@babel/traverse": "^7.24.7", - "@babel/types": "^7.24.7" + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.25.9" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-skip-transparent-expression-wrappers": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.24.7.tgz", - "integrity": "sha512-IO+DLT3LQUElMbpzlatRASEyQtfhSE0+m465v++3jyyXeBTBUjtVZg28/gHeV5mrTJqvEKhKroBGAvhW+qPHiQ==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.25.9.tgz", + "integrity": "sha512-K4Du3BFa3gvyhzgPcntrkDgZzQaq6uozzcpGbOO1OEJaI+EJdqWIMTLgFgQf6lrfiDFo5FU+BxKepI9RmZqahA==", "dev": true, "dependencies": { - "@babel/traverse": "^7.24.7", - "@babel/types": "^7.24.7" + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.25.9" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-string-parser": { - "version": "7.24.8", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.8.tgz", - "integrity": "sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", + "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", "devOptional": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", - "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", + "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-option": { - "version": "7.24.8", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.24.8.tgz", - "integrity": "sha512-xb8t9tD1MHLungh/AIoWYN+gVHaB9kwlu8gffXGSt3FFEIT7RjS+xWbc2vUD1UTZdIpKj/ab3rdqJ7ufngyi2Q==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.25.9.tgz", + "integrity": "sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==", "devOptional": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helpers": { - "version": "7.25.6", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.25.6.tgz", - "integrity": "sha512-Xg0tn4HcfTijTwfDwYlvVCl43V6h4KyVVX2aEm4qdO/PC6L2YvzLHFdmxhoeSA3eslcE6+ZVXHgWwopXYLNq4Q==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.26.0.tgz", + "integrity": "sha512-tbhNuIxNcVb21pInl3ZSjksLCvgdZy9KwJ8brv993QtIVKJBBkYXz4q4ZbAv31GdnC+R90np23L5FbEBlthAEw==", "devOptional": true, "dependencies": { - "@babel/template": "^7.25.0", - "@babel/types": "^7.25.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz", - "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==", - "dependencies": { - "@babel/helper-validator-identifier": "^7.24.7", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" + "@babel/template": "^7.25.9", + "@babel/types": "^7.26.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/parser": { - "version": "7.25.6", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.25.6.tgz", - "integrity": "sha512-trGdfBdbD0l1ZPmcJ83eNxB9rbEax4ALFTF7fN386TMYbeCQbyme5cOEXQhbGXKebwGaB/J52w1mrklMcbgy6Q==", + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.2.tgz", + "integrity": "sha512-DWMCZH9WA4Maitz2q21SRKHo9QXZxkDsbNZoVD62gusNtNBBqDg9i7uOhASfTfIGNzW+O+r7+jAlM8dwphcJKQ==", "devOptional": true, "dependencies": { - "@babel/types": "^7.25.6" + "@babel/types": "^7.26.0" }, "bin": { "parser": "bin/babel-parser.js" @@ -749,12 +541,12 @@ } }, "node_modules/@babel/plugin-syntax-import-attributes": { - "version": "7.25.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.25.6.tgz", - "integrity": "sha512-sXaDXaJN9SNLymBdlWFA+bjzBhFD617ZaFiY13dGt7TVslVvVgA6fkZOP7Ki3IGElC45lwHdOTrCtKZGVAWeLQ==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.26.0.tgz", + "integrity": "sha512-e2dttdsJ1ZTpi3B9UYGLw41hifAubg19AtCu/2I/F1QNVclOBr1dYpTdmdyZ84Xiz43BS/tCUkMAZNLv12Pi+A==", "devOptional": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.8" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -788,12 +580,12 @@ } }, "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.24.7.tgz", - "integrity": "sha512-6ddciUPe/mpMnOKv/U+RSd2vvVy+Yw/JfBB0ZHYjEZt9NLHmCUylNYlsbqCCS1Bffjlb0fCwC9Vqz+sBz6PsiQ==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.25.9.tgz", + "integrity": "sha512-ld6oezHQMZsZfp6pWtbjaNDF2tiiCYYDqQszHt5VV437lewP9aSi2Of99CK0D0XB21k7FLgnLcmQKyKzynfeAA==", "devOptional": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -905,12 +697,12 @@ } }, "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.25.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.25.4.tgz", - "integrity": "sha512-uMOCoHVU52BsSWxPOMVv5qKRdeSlPuImUCB2dlPuBSU+W2/ROE7/Zg8F2Kepbk+8yBa68LlRKxO+xgEVWorsDg==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.25.9.tgz", + "integrity": "sha512-hjMgRy5hb8uJJjUcdWunWVcoi9bGpJp8p5Ol1229PoN6aytsLwNMgmdftO23wnCLMfVmTwZDWMPNq/D1SY60JQ==", "devOptional": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.8" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -920,14 +712,14 @@ } }, "node_modules/@babel/plugin-transform-modules-commonjs": { - "version": "7.24.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.24.8.tgz", - "integrity": "sha512-WHsk9H8XxRs3JXKWFiqtQebdh9b/pTk4EgueygFzYlTKAg0Ud985mSevdNjdXdFBATSKVJGQXP1tv6aGbssLKA==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.25.9.tgz", + "integrity": "sha512-dwh2Ol1jWwL2MgkCzUSOvfmKElqQcuswAZypBSUsScMXvgdT8Ekq5YA6TtqpTVWH+4903NmboMuH1o9i8Rxlyg==", "dev": true, "dependencies": { - "@babel/helper-module-transforms": "^7.24.8", - "@babel/helper-plugin-utils": "^7.24.8", - "@babel/helper-simple-access": "^7.24.7" + "@babel/helper-module-transforms": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/helper-simple-access": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -937,16 +729,16 @@ } }, "node_modules/@babel/plugin-transform-typescript": { - "version": "7.25.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.25.2.tgz", - "integrity": "sha512-lBwRvjSmqiMYe/pS0+1gggjJleUJi7NzjvQ1Fkqtt69hBa/0t1YuW/MLQMAPixfwaQOHUXsd6jeU3Z+vdGv3+A==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.25.9.tgz", + "integrity": "sha512-7PbZQZP50tzv2KGGnhh82GSyMB01yKY9scIjf1a+GfZCtInOWqUH5+1EBU4t9fyR5Oykkkc9vFTs4OHrhHXljQ==", "dev": true, "dependencies": { - "@babel/helper-annotate-as-pure": "^7.24.7", - "@babel/helper-create-class-features-plugin": "^7.25.0", - "@babel/helper-plugin-utils": "^7.24.8", - "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7", - "@babel/plugin-syntax-typescript": "^7.24.7" + "@babel/helper-annotate-as-pure": "^7.25.9", + "@babel/helper-create-class-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/helper-skip-transparent-expression-wrappers": "^7.25.9", + "@babel/plugin-syntax-typescript": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -975,30 +767,30 @@ } }, "node_modules/@babel/template": { - "version": "7.25.0", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.0.tgz", - "integrity": "sha512-aOOgh1/5XzKvg1jvVz7AVrx2piJ2XBi227DHmbY6y+bM9H2FlN+IfecYu4Xl0cNiiVejlsCri89LUsbj8vJD9Q==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.9.tgz", + "integrity": "sha512-9DGttpmPvIxBb/2uwpVo3dqJ+O6RooAFOS+lB+xDqoE2PVCE8nfoHMdZLpfCQRLwvohzXISPZcgxt80xLfsuwg==", "devOptional": true, "dependencies": { - "@babel/code-frame": "^7.24.7", - "@babel/parser": "^7.25.0", - "@babel/types": "^7.25.0" + "@babel/code-frame": "^7.25.9", + "@babel/parser": "^7.25.9", + "@babel/types": "^7.25.9" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.25.6", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.25.6.tgz", - "integrity": "sha512-9Vrcx5ZW6UwK5tvqsj0nGpp/XzqthkT0dqIc9g1AdtygFToNtTF67XzYS//dm+SAK9cp3B9R4ZO/46p63SCjlQ==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.25.9.tgz", + "integrity": "sha512-ZCuvfwOwlz/bawvAuvcj8rrithP2/N55Tzz342AkTvq4qaWbGfmCk/tKhNaV2cthijKrPAA8SRJV5WWe7IBMJw==", "devOptional": true, "dependencies": { - "@babel/code-frame": "^7.24.7", - "@babel/generator": "^7.25.6", - "@babel/parser": "^7.25.6", - "@babel/template": "^7.25.0", - "@babel/types": "^7.25.6", + "@babel/code-frame": "^7.25.9", + "@babel/generator": "^7.25.9", + "@babel/parser": "^7.25.9", + "@babel/template": "^7.25.9", + "@babel/types": "^7.25.9", "debug": "^4.3.1", "globals": "^11.1.0" }, @@ -1007,14 +799,13 @@ } }, "node_modules/@babel/types": { - "version": "7.25.6", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.6.tgz", - "integrity": "sha512-/l42B1qxpG6RdfYf343Uw1vmDjeNhneUXtzhojE7pDgfpEypmRhI6j1kr17XCVv4Cgl9HdAiQY2x0GwKm7rWCw==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.0.tgz", + "integrity": "sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA==", "devOptional": true, "dependencies": { - "@babel/helper-string-parser": "^7.24.8", - "@babel/helper-validator-identifier": "^7.24.7", - "to-fast-properties": "^2.0.0" + "@babel/helper-string-parser": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1065,9 +856,9 @@ } }, "node_modules/@emnapi/core": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.2.0.tgz", - "integrity": "sha512-E7Vgw78I93we4ZWdYCb4DGAwRROGkMIXk7/y87UmANR+J6qsWusmC3gLt0H+O0KOt5e6O38U8oJamgbudrES/w==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.3.1.tgz", + "integrity": "sha512-pVGjBIt1Y6gg3EJN8jTcfpP/+uuRksIo055oE/OBkDNcjZqVbfkWCksG1Jp4yZnj3iKWyWX8fdG/j6UDYPbFog==", "dev": true, "dependencies": { "@emnapi/wasi-threads": "1.0.1", @@ -1075,9 +866,9 @@ } }, "node_modules/@emnapi/runtime": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.2.0.tgz", - "integrity": "sha512-bV21/9LQmcQeCPEg3BDFtvwL6cwiTMksYNWQQ4KOxCZikEGalWtenoZ0wCiukJINlGCIi2KXx01g4FoH/LxpzQ==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.3.1.tgz", + "integrity": "sha512-kEBmG8KyqtxJZv+ygbEim+KCGtIq1fC22Ms3S4ziXmYKm8uyoLX0MHONVKwp+9opg390VaKRNt4a7A9NwmpNhw==", "dev": true, "dependencies": { "tslib": "^2.4.0" @@ -1477,16 +1268,19 @@ } }, "node_modules/@eslint-community/eslint-utils": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", - "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz", + "integrity": "sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==", "dev": true, "dependencies": { - "eslint-visitor-keys": "^3.3.0" + "eslint-visitor-keys": "^3.4.3" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, + "funding": { + "url": "https://opencollective.com/eslint" + }, "peerDependencies": { "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" } @@ -1504,9 +1298,9 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.11.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.1.tgz", - "integrity": "sha512-m4DVN9ZqskZoLU5GlWZadwDnYo3vAEydiUayB9widCl9ffWx2IvPnp6n3on5rJmziJSw9Bv+Z3ChDVdMwXCY8Q==", + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", + "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", "dev": true, "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" @@ -1536,9 +1330,9 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.1.0.tgz", - "integrity": "sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.2.0.tgz", + "integrity": "sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w==", "dev": true, "dependencies": { "ajv": "^6.12.4", @@ -1607,9 +1401,9 @@ } }, "node_modules/@eslint/plugin-kit": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.0.tgz", - "integrity": "sha512-vH9PiIMMwvhCx31Af3HiGzsVNULDbyVkHXwlemn/B0TFj/00ho3y55efXrUZTfQipxoHC5u4xq6zblww1zm1Ig==", + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.3.tgz", + "integrity": "sha512-2b/g5hRmpbb1o4GnTZax9N9m0FXzz9OV42ZzI4rDDMDuHUqigAiQCEWChBWCY4ztAGVRjoWT19v0yMmc5/L5kA==", "dev": true, "dependencies": { "levn": "^0.4.1" @@ -1645,9 +1439,9 @@ } }, "node_modules/@humanwhocodes/retry": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.0.tgz", - "integrity": "sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew==", + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", + "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", "dev": true, "engines": { "node": ">=18.18" @@ -1810,80 +1604,10 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/console/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "devOptional": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@jest/console/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "devOptional": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/@jest/console/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "devOptional": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/@jest/console/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "devOptional": true - }, - "node_modules/@jest/console/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "devOptional": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/console/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "devOptional": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/core": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz", - "integrity": "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==", + "node_modules/@jest/core": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz", + "integrity": "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==", "devOptional": true, "dependencies": { "@jest/console": "^29.7.0", @@ -1927,76 +1651,6 @@ } } }, - "node_modules/@jest/core/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "devOptional": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@jest/core/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "devOptional": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/@jest/core/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "devOptional": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/@jest/core/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "devOptional": true - }, - "node_modules/@jest/core/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "devOptional": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/core/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "devOptional": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/@jest/create-cache-key-function": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/@jest/create-cache-key-function/-/create-cache-key-function-29.7.0.tgz", @@ -2124,64 +1778,6 @@ } } }, - "node_modules/@jest/reporters/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "devOptional": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@jest/reporters/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "devOptional": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/@jest/reporters/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "devOptional": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/@jest/reporters/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "devOptional": true - }, - "node_modules/@jest/reporters/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "devOptional": true, - "engines": { - "node": ">=8" - } - }, "node_modules/@jest/reporters/node_modules/istanbul-lib-instrument": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz", @@ -2210,18 +1806,6 @@ "node": ">=10" } }, - "node_modules/@jest/reporters/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "devOptional": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/@jest/schemas": { "version": "29.6.3", "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", @@ -2304,193 +1888,53 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/transform/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "devOptional": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@jest/transform/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "node_modules/@jest/types": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", "devOptional": true, "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "@jest/schemas": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/transform/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", "devOptional": true, "dependencies": { - "color-name": "~1.1.4" + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" }, "engines": { - "node": ">=7.0.0" + "node": ">=6.0.0" } }, - "node_modules/@jest/transform/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "devOptional": true - }, - "node_modules/@jest/transform/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", "devOptional": true, "engines": { - "node": ">=8" + "node": ">=6.0.0" } }, - "node_modules/@jest/transform/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", "devOptional": true, - "dependencies": { - "has-flag": "^4.0.0" - }, "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/types": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", - "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", - "devOptional": true, - "dependencies": { - "@jest/schemas": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/types/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "devOptional": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@jest/types/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "devOptional": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/@jest/types/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "devOptional": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/@jest/types/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "devOptional": true - }, - "node_modules/@jest/types/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "devOptional": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/types/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "devOptional": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", - "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", - "devOptional": true, - "dependencies": { - "@jridgewell/set-array": "^1.2.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", - "devOptional": true, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/set-array": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", - "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", - "devOptional": true, - "engines": { - "node": ">=6.0.0" + "node": ">=6.0.0" } }, "node_modules/@jridgewell/sourcemap-codec": { @@ -2591,21 +2035,6 @@ "node": ">=18.0.0" } }, - "node_modules/@lerna/create/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/@lerna/create/node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -2628,24 +2057,6 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/@lerna/create/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/@lerna/create/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, "node_modules/@lerna/create/node_modules/execa": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/execa/-/execa-5.0.0.tgz", @@ -2749,15 +2160,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/@lerna/create/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/@lerna/create/node_modules/is-ci": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.1.tgz", @@ -2862,18 +2264,6 @@ "node": ">=10" } }, - "node_modules/@lerna/create/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/@lerna/create/node_modules/tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", @@ -2933,6 +2323,38 @@ "resolved": "packages/schema-validator", "link": true }, + "node_modules/@mml-io/mml-viewer": { + "resolved": "packages/mml-viewer", + "link": true + }, + "node_modules/@mml-io/mml-web": { + "resolved": "packages/mml-web", + "link": true + }, + "node_modules/@mml-io/mml-web-client": { + "resolved": "packages/mml-web-client", + "link": true + }, + "node_modules/@mml-io/mml-web-playcanvas": { + "resolved": "packages/mml-web-playcanvas", + "link": true + }, + "node_modules/@mml-io/mml-web-playcanvas-standalone": { + "resolved": "packages/mml-web-playcanvas-standalone", + "link": true + }, + "node_modules/@mml-io/mml-web-runner": { + "resolved": "packages/mml-web-runner", + "link": true + }, + "node_modules/@mml-io/mml-web-threejs": { + "resolved": "packages/mml-web-threejs", + "link": true + }, + "node_modules/@mml-io/mml-web-threejs-standalone": { + "resolved": "packages/mml-web-threejs-standalone", + "link": true + }, "node_modules/@mml-io/model-loader": { "resolved": "packages/model-loader", "link": true @@ -2945,6 +2367,10 @@ "resolved": "packages/networked-dom-protocol", "link": true }, + "node_modules/@mml-io/networked-dom-server": { + "resolved": "packages/networked-dom-server", + "link": true + }, "node_modules/@mml-io/networked-dom-web": { "resolved": "packages/networked-dom-web", "link": true @@ -2977,6 +2403,17 @@ "resolved": "packages/observable-dom-common", "link": true }, + "node_modules/@monogrid/gainmap-js": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/@monogrid/gainmap-js/-/gainmap-js-3.0.6.tgz", + "integrity": "sha512-ireqJg7cw0tUn/JePDG8rAL7RyXgUKSDbjYdiygkrnye1WuKGLAWDBwF/ICwCwJ9iZBAF5caU8gSu+c34HLGdQ==", + "dependencies": { + "promise-worker-transferable": "^1.0.4" + }, + "peerDependencies": { + "three": ">= 0.159.0" + } + }, "node_modules/@napi-rs/wasm-runtime": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-0.2.4.tgz", @@ -3563,12 +3000,12 @@ } }, "node_modules/@nrwl/devkit": { - "version": "19.8.2", - "resolved": "https://registry.npmjs.org/@nrwl/devkit/-/devkit-19.8.2.tgz", - "integrity": "sha512-2l3Jb7loE8BnTKn6bl4MK0fKIQLAkl+OMBwo/+GedaqfDfQev+UEgBio38eOEdDHYDHH0lwhGdVQI/DpV4qicA==", + "version": "19.8.11", + "resolved": "https://registry.npmjs.org/@nrwl/devkit/-/devkit-19.8.11.tgz", + "integrity": "sha512-99GAJ7XK3uS0YyOfK/W3kvXo7mauA7XPee54ZVY/nG/MtFrJKaUBDcyE2meZzyZT0tGQoyGwSMsktp22it35Tw==", "dev": true, "dependencies": { - "@nx/devkit": "19.8.2" + "@nx/devkit": "19.8.11" } }, "node_modules/@nrwl/nx-linux-x64-gnu": { @@ -3587,12 +3024,12 @@ } }, "node_modules/@nrwl/tao": { - "version": "19.8.2", - "resolved": "https://registry.npmjs.org/@nrwl/tao/-/tao-19.8.2.tgz", - "integrity": "sha512-WvGvFjCy/dSpviLJE8YKcSqpTVpX78UFUhYGgd0OxNlnz0I52HDsZekVWJnyCuU0NDGH6BNmS77R79zj+WzxvQ==", + "version": "19.8.11", + "resolved": "https://registry.npmjs.org/@nrwl/tao/-/tao-19.8.11.tgz", + "integrity": "sha512-obsiOnWfPGWO5WO3sfuOkRl3rtizZI9l2SiDEgjjL1s1ubMMv4fDNaF29CyswCtC0p+qv99fUnIeqhbO7ejiyw==", "dev": true, "dependencies": { - "nx": "19.8.2", + "nx": "19.8.11", "tslib": "^2.3.0" }, "bin": { @@ -3600,12 +3037,12 @@ } }, "node_modules/@nx/devkit": { - "version": "19.8.2", - "resolved": "https://registry.npmjs.org/@nx/devkit/-/devkit-19.8.2.tgz", - "integrity": "sha512-SoCPy24hkzyrANbZhc3/40uWXnOIISC0jk49BcapC9Zykv9/8lCxiaNtB68b00QKEFISkxOeA703D7GCC4sA0Q==", + "version": "19.8.11", + "resolved": "https://registry.npmjs.org/@nx/devkit/-/devkit-19.8.11.tgz", + "integrity": "sha512-9Ath0++R8lKeqSGmlZHNf99oa+7vKXWmjYnvDrhU7qq8RXpyccu6VhU11P69FH0oecg2lTNk6AGBXq12E8r2hQ==", "dev": true, "dependencies": { - "@nrwl/devkit": "19.8.2", + "@nrwl/devkit": "19.8.11", "ejs": "^3.1.7", "enquirer": "~2.3.6", "ignore": "^5.0.4", @@ -3616,7 +3053,7 @@ "yargs-parser": "21.1.1" }, "peerDependencies": { - "nx": ">= 17 <= 20" + "nx": ">= 19 <= 21" } }, "node_modules/@nx/devkit/node_modules/brace-expansion": { @@ -3656,9 +3093,9 @@ } }, "node_modules/@nx/nx-darwin-arm64": { - "version": "19.8.2", - "resolved": "https://registry.npmjs.org/@nx/nx-darwin-arm64/-/nx-darwin-arm64-19.8.2.tgz", - "integrity": "sha512-O06sOObpaF3UQrx6R5s0kFOrhrk/N20rKhOMaD5Qxw6lmVr6TGGH1epGpD8ES7ZPS+p7FUtU9/FPHwY02BZfBg==", + "version": "19.8.11", + "resolved": "https://registry.npmjs.org/@nx/nx-darwin-arm64/-/nx-darwin-arm64-19.8.11.tgz", + "integrity": "sha512-LaYC6yOnaaySWOct2b4KeGCJHk8TK23J1j3IXxIZpySBek/UPRSKzwEpD6hPk/6KQzU93Jvs91OOyVOfGtQVyA==", "cpu": [ "arm64" ], @@ -3672,9 +3109,9 @@ } }, "node_modules/@nx/nx-darwin-x64": { - "version": "19.8.2", - "resolved": "https://registry.npmjs.org/@nx/nx-darwin-x64/-/nx-darwin-x64-19.8.2.tgz", - "integrity": "sha512-hRFA7xpnIeMUF5FiDh681fxSx/EzkFYZ+UE/XBfzbc+T1neRy7NB2vMEa/WMsN0+Y5+NXtibx1akEDD6VOqeJA==", + "version": "19.8.11", + "resolved": "https://registry.npmjs.org/@nx/nx-darwin-x64/-/nx-darwin-x64-19.8.11.tgz", + "integrity": "sha512-7YS0cSymnZ5+YSQw+Lb4pLPpbpEu0ifWtxdrxyiI/FSdpNrIL2v/HNJCPiME4Iwxhyu24yHbYvVl+9bG4H2DUg==", "cpu": [ "x64" ], @@ -3688,9 +3125,9 @@ } }, "node_modules/@nx/nx-freebsd-x64": { - "version": "19.8.2", - "resolved": "https://registry.npmjs.org/@nx/nx-freebsd-x64/-/nx-freebsd-x64-19.8.2.tgz", - "integrity": "sha512-GwZUtUQJt2LrZFB9r29ZYQ9I2r76pg+Lwj7vgrFAq+UHcLejHYyLvhDPoRfKWdASdegI3M5jbh8Cvamd+sgbNA==", + "version": "19.8.11", + "resolved": "https://registry.npmjs.org/@nx/nx-freebsd-x64/-/nx-freebsd-x64-19.8.11.tgz", + "integrity": "sha512-Wd8DhDW6CKq/Szl/tzdnBZ1URg/ChY9RWyME1vnusocikuTq1F87IxCahb++4HTT+PTrfoKowbDT0BCz4Xze3Q==", "cpu": [ "x64" ], @@ -3704,9 +3141,9 @@ } }, "node_modules/@nx/nx-linux-arm-gnueabihf": { - "version": "19.8.2", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm-gnueabihf/-/nx-linux-arm-gnueabihf-19.8.2.tgz", - "integrity": "sha512-+OtoU5tXOLRv0ufy8ifD6EHn+VOjnC8mFIaaBO/cb/YEW1MTZq1RqKd4e1O9sjAloTe4X3mydw/Ue333+FqIww==", + "version": "19.8.11", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm-gnueabihf/-/nx-linux-arm-gnueabihf-19.8.11.tgz", + "integrity": "sha512-UcPGv1xGBLEXeDukV/akmmt3luseoT64MiMIn61YajWtpQgG09jgW4v1j2zVZFNMDu2rdy7eMoe96sVp1hwoQA==", "cpu": [ "arm" ], @@ -3720,9 +3157,9 @@ } }, "node_modules/@nx/nx-linux-arm64-gnu": { - "version": "19.8.2", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-gnu/-/nx-linux-arm64-gnu-19.8.2.tgz", - "integrity": "sha512-rH7WSvoh1nvYmQs3cd4nBDPilEYIGTUOZF2eXPBqSu1K6938tu1Uf1zXzqRK7o016GoVepiD0VRVYWD3R82nRQ==", + "version": "19.8.11", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-gnu/-/nx-linux-arm64-gnu-19.8.11.tgz", + "integrity": "sha512-h4saWb0mT1wQmhCE8KSNruc8+gjHphB3nGifdHzvMnAoEIlDPd4MyqM6RRehzR0NYE61GJyPNTOs9c9kLhPkow==", "cpu": [ "arm64" ], @@ -3736,9 +3173,9 @@ } }, "node_modules/@nx/nx-linux-arm64-musl": { - "version": "19.8.2", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-musl/-/nx-linux-arm64-musl-19.8.2.tgz", - "integrity": "sha512-a7vuWDOcqHL0S0gQYYz8DDRmNFs4NOd7A+BTgBRPX54r0pS82tKF2ZsP48TAr9WHyjsTPis5LlFw8VhLrjzdLA==", + "version": "19.8.11", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-musl/-/nx-linux-arm64-musl-19.8.11.tgz", + "integrity": "sha512-QEQ248nCXaRcgzWYzQxx/v+c/YqkAPPng1OypCVUkL3A00fFTPdwXJ0K4mqlikDb6lF/KaQKc7tc8xlj/bpuAg==", "cpu": [ "arm64" ], @@ -3752,9 +3189,9 @@ } }, "node_modules/@nx/nx-linux-x64-gnu": { - "version": "19.8.2", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-gnu/-/nx-linux-x64-gnu-19.8.2.tgz", - "integrity": "sha512-3h4dmIi5Muym18dsiiXQBygPlSAHZNe3PaYo8mLsUsvuAt2ye0XUDcAlHWXOt/FeuVDG1NEGI05vZJvbIIGikQ==", + "version": "19.8.11", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-gnu/-/nx-linux-x64-gnu-19.8.11.tgz", + "integrity": "sha512-UXrZbyKUSW3gr5pebKQLDVlBwgR82jZFtvDWIw1a2V7cutdBDf5Qb7pfLXWxkEWQXpijE6yBK2UtO36DVahDBg==", "cpu": [ "x64" ], @@ -3768,9 +3205,9 @@ } }, "node_modules/@nx/nx-linux-x64-musl": { - "version": "19.8.2", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-musl/-/nx-linux-x64-musl-19.8.2.tgz", - "integrity": "sha512-LbOC3rbnREh7DbFYdZDuAEDmJsdQDLEjUzacwXDHMb/XlTL3YpWoXohd+zSVHM4nvd8o7QFuZNC4a4zYXwA+wg==", + "version": "19.8.11", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-musl/-/nx-linux-x64-musl-19.8.11.tgz", + "integrity": "sha512-I6yawWQ/p483EC8Yrf3WjEUZjxd05cxR3bZYadcnbBfC6xVKckzKnw3d4xzrmK2ekQvcJjnpGesBrxNKoi/8YQ==", "cpu": [ "x64" ], @@ -3784,9 +3221,9 @@ } }, "node_modules/@nx/nx-win32-arm64-msvc": { - "version": "19.8.2", - "resolved": "https://registry.npmjs.org/@nx/nx-win32-arm64-msvc/-/nx-win32-arm64-msvc-19.8.2.tgz", - "integrity": "sha512-ZkSZBxGrGXDqwRxC4WyHR3sAUIH6akk1rTDvqTr1nKPribs53cqEms20i7qF1at3o99xL3YairOcnt7JxNWDWA==", + "version": "19.8.11", + "resolved": "https://registry.npmjs.org/@nx/nx-win32-arm64-msvc/-/nx-win32-arm64-msvc-19.8.11.tgz", + "integrity": "sha512-n0/Xrm9V0RrlABE5TUYaJH1iN3oJHrAPEvBTSr+rkXYdJus4iIZt1wfbZGfBatxmX31tF1xTWsYycsI+EHFUsQ==", "cpu": [ "arm64" ], @@ -3800,9 +3237,9 @@ } }, "node_modules/@nx/nx-win32-x64-msvc": { - "version": "19.8.2", - "resolved": "https://registry.npmjs.org/@nx/nx-win32-x64-msvc/-/nx-win32-x64-msvc-19.8.2.tgz", - "integrity": "sha512-rRt+XIZk+ctxhFORWvugqmS07xi52eRS4QpTq8b24ZJKk1Zw0L5opsXAdzughhBzfIpSx4rxnknFlI78DcRPxA==", + "version": "19.8.11", + "resolved": "https://registry.npmjs.org/@nx/nx-win32-x64-msvc/-/nx-win32-x64-msvc-19.8.11.tgz", + "integrity": "sha512-A8Xk8xlPm1VgHYwt3j6Tw5jv7bqRsop+u+pn3yCBw6Ztynf2fnhD+7ZGJDjtxiwivAXvW3fS0R/c6WYFGESAdQ==", "cpu": [ "x64" ], @@ -4057,19 +3494,18 @@ } }, "node_modules/@puppeteer/browsers": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-2.4.0.tgz", - "integrity": "sha512-x8J1csfIygOwf6D6qUAZ0ASk3z63zPb7wkNeHRerCMh82qWKUrOgkuP005AJC8lDL6/evtXETGEJVcwykKT4/g==", - "dev": true, + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-2.2.2.tgz", + "integrity": "sha512-hZ/JhxPIceWaGSEzUZp83/8M49CoxlkuThfTR7t4AoCu5+ZvJ3vktLm60Otww2TXeROB5igiZ8D9oPQh6ckBVg==", "dependencies": { - "debug": "^4.3.6", - "extract-zip": "^2.0.1", - "progress": "^2.0.3", - "proxy-agent": "^6.4.0", - "semver": "^7.6.3", - "tar-fs": "^3.0.6", - "unbzip2-stream": "^1.4.3", - "yargs": "^17.7.2" + "debug": "4.3.4", + "extract-zip": "2.0.1", + "progress": "2.0.3", + "proxy-agent": "6.4.0", + "semver": "7.6.0", + "tar-fs": "3.0.5", + "unbzip2-stream": "1.4.3", + "yargs": "17.7.2" }, "bin": { "browsers": "lib/cjs/main-cli.js" @@ -4078,11 +3514,45 @@ "node": ">=18" } }, + "node_modules/@puppeteer/browsers/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/@puppeteer/browsers/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@puppeteer/browsers/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, "node_modules/@puppeteer/browsers/node_modules/semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", - "dev": true, + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", + "dependencies": { + "lru-cache": "^6.0.0" + }, "bin": { "semver": "bin/semver.js" }, @@ -4090,51 +3560,56 @@ "node": ">=10" } }, + "node_modules/@puppeteer/browsers/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, "node_modules/@shikijs/core": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-1.19.0.tgz", - "integrity": "sha512-314J5MPdS1wzfjuD856MXvbAI2wN03ofMnUGkZ5ZDBOza/d38paLwd+YVyuKrrjxJ4hfPMjc4tRmPkXd6UDMPQ==", - "dependencies": { - "@shikijs/engine-javascript": "1.19.0", - "@shikijs/engine-oniguruma": "1.19.0", - "@shikijs/types": "1.19.0", - "@shikijs/vscode-textmate": "^9.2.2", + "version": "1.23.0", + "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-1.23.0.tgz", + "integrity": "sha512-J4Fo22oBlfRHAXec+1AEzcowv+Qdf4ZQkuP/X/UHYH9+KA9LvyFXSXyS+HxuBRFfon+u7bsmKdRBjoZlbDVRkQ==", + "dependencies": { + "@shikijs/engine-javascript": "1.23.0", + "@shikijs/engine-oniguruma": "1.23.0", + "@shikijs/types": "1.23.0", + "@shikijs/vscode-textmate": "^9.3.0", "@types/hast": "^3.0.4", "hast-util-to-html": "^9.0.3" } }, "node_modules/@shikijs/engine-javascript": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/@shikijs/engine-javascript/-/engine-javascript-1.19.0.tgz", - "integrity": "sha512-D1sioU61n7fLWfDzTC9JNS19zEYZMr7qxkSVzv6ziEWDxnwzy2PvYoKPedJV4qUf+2VnrYPSaArDz2W0XgGB7A==", + "version": "1.23.0", + "resolved": "https://registry.npmjs.org/@shikijs/engine-javascript/-/engine-javascript-1.23.0.tgz", + "integrity": "sha512-CcrppseWShG+8Efp1iil9divltuXVdCaU4iu+CKvzTGZO5RmXyAiSx668M7VbX8+s/vt1ZKu75Vn/jWi8O3G/Q==", "dependencies": { - "@shikijs/types": "1.19.0", - "@shikijs/vscode-textmate": "^9.2.2", - "oniguruma-to-js": "0.4.3" + "@shikijs/types": "1.23.0", + "@shikijs/vscode-textmate": "^9.3.0", + "oniguruma-to-es": "0.1.2" } }, "node_modules/@shikijs/engine-oniguruma": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-1.19.0.tgz", - "integrity": "sha512-/JxwIefNVLGB4EmpB8i6P4JB/oVYRuzSixbqvx7m6iPW0lQ1T97c/0wmA+JlKbngEiExckSuPwa48fajlShB7A==", + "version": "1.23.0", + "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-1.23.0.tgz", + "integrity": "sha512-gS8bZLqVvmZXX+E5JUMJICsBp+kx6gj79MH/UEpKHKIqnUzppgbmEn6zLa6mB5D+sHse2gFei3YYJxQe1EzZXQ==", "dependencies": { - "@shikijs/types": "1.19.0", - "@shikijs/vscode-textmate": "^9.2.2" + "@shikijs/types": "1.23.0", + "@shikijs/vscode-textmate": "^9.3.0" } }, "node_modules/@shikijs/types": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-1.19.0.tgz", - "integrity": "sha512-NZvVp3k1bP4MTRUbmnkGhYzPdoNMjNLSAwczMRUbtUl4oj2LlNRNbwERyeIyJt56Ac9fvPVZ2nn13OXk86E5UQ==", + "version": "1.23.0", + "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-1.23.0.tgz", + "integrity": "sha512-HiwzsihRao+IbPk7FER/EQT/D0dEEK3n5LAtHDzL5iRT+JMblA7y9uitUnjEnHeLkKigNM+ZplrP7MuEyyc5kA==", "dependencies": { - "@shikijs/vscode-textmate": "^9.2.2", + "@shikijs/vscode-textmate": "^9.3.0", "@types/hast": "^3.0.4" } }, "node_modules/@shikijs/vscode-textmate": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/@shikijs/vscode-textmate/-/vscode-textmate-9.2.2.tgz", - "integrity": "sha512-TMp15K+GGYrWlZM8+Lnj9EaHEFmOen0WJBrfa17hF7taDOYthuPPV0GWzfd/9iMij0akS/8Yw2ikquH7uVi/fg==" + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/@shikijs/vscode-textmate/-/vscode-textmate-9.3.0.tgz", + "integrity": "sha512-jn7/7ky30idSkd/O5yDBfAnVt+JJpepofP/POZ1iMOxK59cOfqIgg/Dj0eFsjOTMw+4ycJN0uhZH/Eb0bs/EUA==" }, "node_modules/@sideway/address": { "version": "4.1.5", @@ -4878,9 +4353,9 @@ } }, "node_modules/@types/qs": { - "version": "6.9.16", - "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.16.tgz", - "integrity": "sha512-7i+zxXdPD0T4cKDuxCUXJ4wHcsJLwENa6Z3dCu8cfCK743OGy5Nu1RmAGqDPsoTDINVEcdXKRvR/zre+P2Ku1A==", + "version": "6.9.17", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.17.tgz", + "integrity": "sha512-rX4/bPcfmvxHDv0XjfJELTTr+iB+tn032nPILqHm5wbthUUUuVtNGGqzhya9XUxjTP8Fpr0qYgSZZKxGY++svQ==", "dev": true }, "node_modules/@types/range-parser": { @@ -4890,15 +4365,21 @@ "dev": true }, "node_modules/@types/react": { - "version": "18.3.9", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.9.tgz", - "integrity": "sha512-+BpAVyTpJkNWWSSnaLBk6ePpHLOGJKnEQNbINNovPWzvEUyAe3e+/d494QdEh71RekM/qV7lw6jzf1HGrJyAtQ==", + "version": "18.3.12", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.12.tgz", + "integrity": "sha512-D2wOSq/d6Agt28q7rSI3jhU7G6aiuzljDGZ2hTZHIkrTLUI+AF3WMeKkEZ9nN2fkBAlcktT6vcZjDFiIhMYEQw==", "peer": true, "dependencies": { "@types/prop-types": "*", "csstype": "^3.0.2" } }, + "node_modules/@types/resolve": { + "version": "1.20.6", + "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.6.tgz", + "integrity": "sha512-A4STmOXPhMUtHH+S6ymgE2GiBSMqf4oTvcQZMcHzokuTLVYzXTB8ttjcgxOVaAp2lGwEdzZ0J+cRbbeevQj1UQ==", + "dev": true + }, "node_modules/@types/send": { "version": "0.17.4", "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.4.tgz", @@ -4965,13 +4446,12 @@ "node_modules/@types/webxr": { "version": "0.5.20", "resolved": "https://registry.npmjs.org/@types/webxr/-/webxr-0.5.20.tgz", - "integrity": "sha512-JGpU6qiIJQKUuVSKx1GtQnHJGxRjtfGIhzO2ilq43VZZS//f1h1Sgexbdk+Lq+7569a6EYhOWrUpIruR/1Enmg==", - "dev": true + "integrity": "sha512-JGpU6qiIJQKUuVSKx1GtQnHJGxRjtfGIhzO2ilq43VZZS//f1h1Sgexbdk+Lq+7569a6EYhOWrUpIruR/1Enmg==" }, "node_modules/@types/ws": { - "version": "8.5.12", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.12.tgz", - "integrity": "sha512-3tPRkv1EtkDpzlgyKyI8pGsGZAGPEaXeu0DOj5DI25Ja91bdAYddYHbADRYVrZMRbfW+1l5YwXVDKohDJNQxkQ==", + "version": "8.5.13", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.13.tgz", + "integrity": "sha512-osM/gWBTPKgHV8XkTunnegTRIsvF6owmf5w+JtAfOw472dptdm0dlGv4xCt6GwQRcC2XVOvvRE/0bAoQcL2QkA==", "dev": true, "dependencies": { "@types/node": "*" @@ -5236,6 +4716,11 @@ "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==" }, + "node_modules/@webgpu/types": { + "version": "0.1.51", + "resolved": "https://registry.npmjs.org/@webgpu/types/-/types-0.1.51.tgz", + "integrity": "sha512-ktR3u64NPjwIViNCck+z9QeyN0iPkQCUOQ07ZCV1RzlkfP+olLTeEZ95O1QHS+v4w9vJeY9xj/uJuSphsHy5rQ==" + }, "node_modules/@yarnpkg/lockfile": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz", @@ -5302,9 +4787,9 @@ } }, "node_modules/acorn": { - "version": "8.12.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", - "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", + "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -5424,14 +4909,17 @@ } }, "node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dependencies": { - "color-convert": "^1.9.0" + "color-convert": "^2.0.1" }, "engines": { - "node": ">=4" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, "node_modules/anymatch": { @@ -5647,76 +5135,6 @@ "@babel/core": "^7.8.0" } }, - "node_modules/babel-jest/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "devOptional": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/babel-jest/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "devOptional": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/babel-jest/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "devOptional": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/babel-jest/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "devOptional": true - }, - "node_modules/babel-jest/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "devOptional": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/babel-jest/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "devOptional": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/babel-plugin-istanbul": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", @@ -5828,12 +5246,11 @@ } }, "node_modules/bare-stream": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/bare-stream/-/bare-stream-2.3.0.tgz", - "integrity": "sha512-pVRWciewGUeCyKEuRxwv06M079r+fRjAQjBEK2P6OYGrO43O+Z0LrPZZEjlc4mB6C2RpZ9AxJ1s7NLEtOHO6eA==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/bare-stream/-/bare-stream-2.3.2.tgz", + "integrity": "sha512-EFZHSIBkDgSHIwj2l2QZfP4U5OcD4xFAOwhSb/vlr9PIqyGJGvB/nfClJbcnh3EY4jtPE4zsb5ztae96bVF79A==", "optional": true, "dependencies": { - "b4a": "^1.6.6", "streamx": "^2.20.0" } }, @@ -6021,9 +5438,9 @@ } }, "node_modules/browserslist": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.0.tgz", - "integrity": "sha512-Rmb62sR1Zpjql25eSanFGEhAxcFwfA1K0GuQcLoaJBAcENegrQut3hYdhXFF1obQfiDyqIW/cLM5HSJ/9k884A==", + "version": "4.24.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.2.tgz", + "integrity": "sha512-ZIc+Q62revdMcqC6aChtW4jz3My3klmCO1fEmINZY/8J3EpBg5/A/D0AKmBveUh6pgoeycoMkVMko84tuYS+Gg==", "devOptional": true, "funding": [ { @@ -6040,10 +5457,10 @@ } ], "dependencies": { - "caniuse-lite": "^1.0.30001663", - "electron-to-chromium": "^1.5.28", + "caniuse-lite": "^1.0.30001669", + "electron-to-chromium": "^1.5.41", "node-releases": "^2.0.18", - "update-browserslist-db": "^1.1.0" + "update-browserslist-db": "^1.1.1" }, "bin": { "browserslist": "cli.js" @@ -6273,9 +5690,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001664", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001664.tgz", - "integrity": "sha512-AmE7k4dXiNKQipgn7a2xg558IRqPN3jMQY/rOsbxDhrd0tyChwbITBfiwtnqz8bi2M5mIWbxAYBvk7W7QBUS2g==", + "version": "1.0.30001680", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001680.tgz", + "integrity": "sha512-rPQy70G6AGUMnbwS1z6Xg+RkHYPAi18ihs47GH0jcxIG7wArmPgY3XbS2sRdBbxJljp3thdT8BIqv9ccCypiPA==", "devOptional": true, "funding": [ { @@ -6314,16 +5731,18 @@ } }, "node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" }, "engines": { - "node": ">=4" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, "node_modules/char-regex": { @@ -6405,14 +5824,13 @@ } }, "node_modules/chromium-bidi": { - "version": "0.6.5", - "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.6.5.tgz", - "integrity": "sha512-RuLrmzYrxSb0s9SgpB+QN5jJucPduZQ/9SIe76MDxYJuecPW5mxMdacJ1f4EtgiV+R0p3sCkznTMvH0MPGFqjA==", - "dev": true, + "version": "0.5.17", + "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.5.17.tgz", + "integrity": "sha512-BqOuIWUgTPj8ayuBFJUYCCuwIcwjBsb3/614P7tt1bEPJ4i1M0kCdIl0Wi9xhtswBXnfO2bTpTMkHD71H8rJMg==", "dependencies": { "mitt": "3.0.1", "urlpattern-polyfill": "10.0.0", - "zod": "3.23.8" + "zod": "3.22.4" }, "peerDependencies": { "devtools-protocol": "*" @@ -6534,36 +5952,6 @@ "node": ">=12" } }, - "node_modules/cliui/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/cliui/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/cliui/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, "node_modules/cliui/node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", @@ -6654,17 +6042,20 @@ } }, "node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dependencies": { - "color-name": "1.1.3" + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" } }, "node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, "node_modules/color-support": { "version": "1.1.3", @@ -6778,76 +6169,6 @@ "url": "https://github.com/open-cli-tools/concurrently?sponsor=1" } }, - "node_modules/concurrently/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/concurrently/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/concurrently/node_modules/chalk/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/concurrently/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/concurrently/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/concurrently/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/concurrently/node_modules/supports-color": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", @@ -7172,76 +6493,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/create-jest/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "devOptional": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/create-jest/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "devOptional": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/create-jest/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "devOptional": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/create-jest/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "devOptional": true - }, - "node_modules/create-jest/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "devOptional": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/create-jest/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "devOptional": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/create-require": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", @@ -7318,9 +6569,9 @@ } }, "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.5.tgz", + "integrity": "sha512-ZVJrKKYunU38/76t0RMOulHOnUcbU9GbpWKAOZ0mhjr7CX6FVrH+4FrAapSOekrgFQ3f/8gwMEuIft0aKq6Hug==", "devOptional": true, "dependencies": { "path-key": "^3.1.0", @@ -7673,10 +6924,9 @@ } }, "node_modules/devtools-protocol": { - "version": "0.0.1342118", - "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1342118.tgz", - "integrity": "sha512-75fMas7PkYNDTmDyb6PRJCH7ILmHLp+BhrZGeMsa4bCh40DTxgCz2NRy5UDzII4C5KuD0oBMZ9vXKhEl6UD/3w==", - "dev": true + "version": "0.0.1262051", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1262051.tgz", + "integrity": "sha512-YJe4CT5SA8on3Spa+UDtNhEqtuV6Epwz3OZ4HQVLhlRccpZ9/PAYk0/cy/oKxFKRrZPBUPyxympQci4yWNWZ9g==" }, "node_modules/diff": { "version": "4.0.2", @@ -7746,12 +6996,12 @@ } }, "node_modules/dotenv-expand": { - "version": "11.0.6", - "resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-11.0.6.tgz", - "integrity": "sha512-8NHi73otpWsZGBSZwwknTXS5pqMOrk9+Ssrna8xCaxkzEpU9OTf9R5ArQGVw03//Zmk9MOwLPng9WwndvpAJ5g==", + "version": "11.0.7", + "resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-11.0.7.tgz", + "integrity": "sha512-zIHwmZPRshsCdpMDyVsqGmgyP0yT8GAgXUnkdAoJisxvf33k7yO6OuoKmcTGuXPWSsm8Oh88nZicRLA9Y0rUeA==", "dev": true, "dependencies": { - "dotenv": "^16.4.4" + "dotenv": "^16.4.5" }, "engines": { "node": ">=12" @@ -7797,9 +7047,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.5.29", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.29.tgz", - "integrity": "sha512-PF8n2AlIhCKXQ+gTpiJi0VhcHDb69kYX4MtCiivctc2QD3XuNZ/XIOlbGzt7WAjjEev0TtaH6Cu3arZExm5DOw==", + "version": "1.5.62", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.62.tgz", + "integrity": "sha512-t8c+zLmJHa9dJy96yBZRXGQYoiCEnHYgFwn1asvSPZSUdVxnB62A4RASd7k41ytG3ErFBA0TpHlKg9D9SQBmLg==", "devOptional": true }, "node_modules/emittery": { @@ -7819,7 +7069,12 @@ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" }, - "node_modules/encodeurl": { + "node_modules/emoji-regex-xs": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex-xs/-/emoji-regex-xs-1.0.0.tgz", + "integrity": "sha512-LRlerrMYoIDrT6jgpeZ2YYl/L8EulRTt5hQcYjy5AInh7HWXKimpqx68aknBFpGL2+/IcogTcaydJEgaTmOpDg==" + }, + "node_modules/encodeurl": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", @@ -8054,21 +7309,6 @@ "@types/yargs-parser": "*" } }, - "node_modules/esbuild-jest/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/esbuild-jest/node_modules/babel-jest": { "version": "26.6.3", "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-26.6.3.tgz", @@ -8122,55 +7362,12 @@ "@babel/core": "^7.0.0" } }, - "node_modules/esbuild-jest/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/esbuild-jest/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/esbuild-jest/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, "node_modules/esbuild-jest/node_modules/convert-source-map": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", "dev": true }, - "node_modules/esbuild-jest/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/esbuild-jest/node_modules/jest-haste-map": { "version": "26.6.2", "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-26.6.2.tgz", @@ -8238,18 +7435,6 @@ "node": ">= 10.13.0" } }, - "node_modules/esbuild-jest/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/esbuild-jest/node_modules/write-file-atomic": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", @@ -8277,76 +7462,6 @@ "esbuild": ">= 0.14.0" } }, - "node_modules/esbuild-plugin-copy/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/esbuild-plugin-copy/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/esbuild-plugin-copy/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/esbuild-plugin-copy/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/esbuild-plugin-copy/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/esbuild-plugin-copy/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/escalade": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", @@ -8361,11 +7476,15 @@ "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" }, "node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, "engines": { - "node": ">=0.8.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/escodegen": { @@ -8502,9 +7621,9 @@ } }, "node_modules/eslint-scope": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.0.2.tgz", - "integrity": "sha512-6E4xmrTw5wtxnLA5wYL3WDfhZ/1bUBGOXV0zQvVRDOtrR8D0p6W7fs3JweNYhwRYeGvd/1CKX2se0/2s7Q/nJA==", + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.2.0.tgz", + "integrity": "sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A==", "dev": true, "dependencies": { "esrecurse": "^4.3.0", @@ -8518,9 +7637,9 @@ } }, "node_modules/eslint-visitor-keys": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz", - "integrity": "sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", "dev": true, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -8529,67 +7648,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/eslint/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/eslint/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/eslint/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/eslint/node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/eslint/node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -8618,15 +7676,6 @@ "node": ">=10.13.0" } }, - "node_modules/eslint/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/eslint/node_modules/locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", @@ -8657,27 +7706,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/eslint/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/espree": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-10.1.0.tgz", - "integrity": "sha512-M1M6CpiE6ffoigIOWYO9UDP8TMUw9kqb21tf+08IgDYjCsOvCuDt4jQcZmoYxx+w7zlKw9/N0KXfto+I8/FrXA==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.3.0.tgz", + "integrity": "sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==", "dev": true, "dependencies": { - "acorn": "^8.12.0", + "acorn": "^8.14.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^4.0.0" + "eslint-visitor-keys": "^4.2.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -9217,6 +8254,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/figures/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, "node_modules/file-entry-cache": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", @@ -9407,9 +8453,9 @@ } }, "node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.1.tgz", + "integrity": "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", @@ -9588,21 +8634,6 @@ "node": ">=6.9.0" } }, - "node_modules/get-pkg-repo/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/get-pkg-repo/node_modules/cliui": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", @@ -9614,34 +8645,16 @@ "wrap-ansi": "^7.0.0" } }, - "node_modules/get-pkg-repo/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "node_modules/get-pkg-repo/node_modules/hosted-git-info": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", + "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==", "dev": true, "dependencies": { - "color-name": "~1.1.4" + "lru-cache": "^6.0.0" }, "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/get-pkg-repo/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/get-pkg-repo/node_modules/hosted-git-info": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", - "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "engines": { - "node": ">=10" + "node": ">=10" } }, "node_modules/get-pkg-repo/node_modules/lru-cache": { @@ -9889,6 +8902,10 @@ "ini": "^1.3.2" } }, + "node_modules/github-pages-publisher": { + "resolved": "github-pages-publisher", + "link": true + }, "node_modules/glob": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", @@ -10008,11 +9025,11 @@ } }, "node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "engines": { - "node": ">=4" + "node": ">=8" } }, "node_modules/has-property-descriptors": { @@ -10353,6 +9370,11 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/immediate": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", + "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==" + }, "node_modules/import-fresh": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", @@ -10490,76 +9512,6 @@ "node": ">=12.0.0" } }, - "node_modules/inquirer/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/inquirer/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/inquirer/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/inquirer/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/inquirer/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/inquirer/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/ip-address": { "version": "9.0.5", "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", @@ -10875,6 +9827,11 @@ "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==" }, + "node_modules/is-promise": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", + "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==" + }, "node_modules/is-ssh": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/is-ssh/-/is-ssh-1.4.0.tgz", @@ -11021,27 +9978,6 @@ "node": ">=10" } }, - "node_modules/istanbul-lib-report/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "devOptional": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-report/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "devOptional": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/istanbul-lib-source-maps": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", @@ -11102,76 +10038,6 @@ "node": ">=10" } }, - "node_modules/jake/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jake/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jake/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jake/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/jake/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/jake/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/jest": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", @@ -11253,76 +10119,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-circus/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "devOptional": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-circus/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "devOptional": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jest-circus/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "devOptional": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jest-circus/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "devOptional": true - }, - "node_modules/jest-circus/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "devOptional": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-circus/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "devOptional": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-cli": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz", @@ -11356,80 +10152,10 @@ } } }, - "node_modules/jest-cli/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "devOptional": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-cli/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "devOptional": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jest-cli/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "devOptional": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jest-cli/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "devOptional": true - }, - "node_modules/jest-cli/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "devOptional": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-cli/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "devOptional": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-config": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", - "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", + "node_modules/jest-config": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", + "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", "devOptional": true, "dependencies": { "@babel/core": "^7.11.6", @@ -11471,76 +10197,6 @@ } } }, - "node_modules/jest-config/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "devOptional": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-config/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "devOptional": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jest-config/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "devOptional": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jest-config/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "devOptional": true - }, - "node_modules/jest-config/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "devOptional": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-config/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "devOptional": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-diff": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", @@ -11556,76 +10212,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-diff/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "devOptional": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-diff/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "devOptional": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jest-diff/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "devOptional": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jest-diff/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "devOptional": true - }, - "node_modules/jest-diff/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "devOptional": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-diff/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "devOptional": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-docblock": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", @@ -11654,76 +10240,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-each/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "devOptional": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-each/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "devOptional": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jest-each/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "devOptional": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jest-each/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "devOptional": true - }, - "node_modules/jest-each/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "devOptional": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-each/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "devOptional": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-environment-jsdom": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-29.7.0.tgz", @@ -11844,81 +10360,17 @@ } } }, - "node_modules/jest-image-snapshot/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "node_modules/jest-leak-detector": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", + "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==", + "devOptional": true, "dependencies": { - "color-convert": "^2.0.1" + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" }, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-image-snapshot/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jest-image-snapshot/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jest-image-snapshot/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "node_modules/jest-image-snapshot/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-image-snapshot/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-leak-detector": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", - "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==", - "devOptional": true, - "dependencies": { - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-matcher-utils": { @@ -11936,76 +10388,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-matcher-utils/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "devOptional": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-matcher-utils/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "devOptional": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jest-matcher-utils/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "devOptional": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jest-matcher-utils/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "devOptional": true - }, - "node_modules/jest-matcher-utils/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "devOptional": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-matcher-utils/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "devOptional": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-message-util": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", @@ -12026,76 +10408,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-message-util/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "devOptional": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-message-util/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "devOptional": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jest-message-util/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "devOptional": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jest-message-util/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "devOptional": true - }, - "node_modules/jest-message-util/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "devOptional": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-message-util/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "devOptional": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-mock": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", @@ -12169,76 +10481,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-resolve/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "devOptional": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-resolve/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "devOptional": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jest-resolve/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "devOptional": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jest-resolve/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "devOptional": true - }, - "node_modules/jest-resolve/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "devOptional": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-resolve/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "devOptional": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-runner": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz", @@ -12271,76 +10513,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-runner/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "devOptional": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-runner/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "devOptional": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jest-runner/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "devOptional": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jest-runner/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "devOptional": true - }, - "node_modules/jest-runner/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "devOptional": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-runner/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "devOptional": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-runtime": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz", @@ -12374,76 +10546,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-runtime/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "devOptional": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-runtime/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "devOptional": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jest-runtime/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "devOptional": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jest-runtime/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "devOptional": true - }, - "node_modules/jest-runtime/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "devOptional": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-runtime/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "devOptional": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-serializer": { "version": "26.6.2", "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-26.6.2.tgz", @@ -12485,65 +10587,7 @@ "semver": "^7.5.3" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-snapshot/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "devOptional": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-snapshot/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "devOptional": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jest-snapshot/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "devOptional": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jest-snapshot/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "devOptional": true - }, - "node_modules/jest-snapshot/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "devOptional": true, - "engines": { - "node": ">=8" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-snapshot/node_modules/semver": { @@ -12558,18 +10602,6 @@ "node": ">=10" } }, - "node_modules/jest-snapshot/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "devOptional": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-util": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", @@ -12587,76 +10619,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-util/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "devOptional": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-util/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "devOptional": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jest-util/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "devOptional": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jest-util/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "devOptional": true - }, - "node_modules/jest-util/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "devOptional": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-util/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "devOptional": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-validate": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", @@ -12674,21 +10636,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-validate/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "devOptional": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/jest-validate/node_modules/camelcase": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", @@ -12701,61 +10648,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/jest-validate/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "devOptional": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jest-validate/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "devOptional": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jest-validate/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "devOptional": true - }, - "node_modules/jest-validate/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "devOptional": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-validate/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "devOptional": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-watcher": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz", @@ -12775,76 +10667,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-watcher/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "devOptional": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-watcher/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "devOptional": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jest-watcher/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "devOptional": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jest-watcher/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "devOptional": true - }, - "node_modules/jest-watcher/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "devOptional": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-watcher/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "devOptional": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-worker": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", @@ -12860,15 +10682,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-worker/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "devOptional": true, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-worker/node_modules/supports-color": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", @@ -12971,15 +10784,15 @@ } }, "node_modules/jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.0.2.tgz", + "integrity": "sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==", "devOptional": true, "bin": { "jsesc": "bin/jsesc" }, "engines": { - "node": ">=4" + "node": ">=6" } }, "node_modules/json-buffer": { @@ -13218,21 +11031,6 @@ "node": ">=18.0.0" } }, - "node_modules/lerna/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/lerna/node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -13242,37 +11040,19 @@ "node_modules/lerna/node_modules/chalk": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/lerna/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", "dev": true, "dependencies": { - "color-name": "~1.1.4" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" }, "engines": { - "node": ">=7.0.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/lerna/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, "node_modules/lerna/node_modules/execa": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/execa/-/execa-5.0.0.tgz", @@ -13376,15 +11156,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/lerna/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/lerna/node_modules/import-local": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", @@ -13508,18 +11279,6 @@ "node": ">=10" } }, - "node_modules/lerna/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/lerna/node_modules/tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", @@ -13622,9 +11381,9 @@ } }, "node_modules/libnpmpublish/node_modules/ci-info": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.0.0.tgz", - "integrity": "sha512-TdHqgGf9odd8SXNuxtUBVx8Nv+qZOejE6qyqiy5NtbYYQOeFa6zmHkxlPzmaLxWWHsU6nJmB7AETdVPi+2NBUg==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.1.0.tgz", + "integrity": "sha512-HutrvTNsF48wnxkzERIXOe5/mlcfFcbfCmwcg6CJnizbSue78AbDt+1cgl26zwn61WFxhcPykPfZrbqjGmBb4A==", "dev": true, "funding": [ { @@ -13656,10 +11415,18 @@ "node": ">=16" } }, + "node_modules/lie": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz", + "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==", + "dependencies": { + "immediate": "~3.0.5" + } + }, "node_modules/lightningcss": { - "version": "1.27.0", - "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.27.0.tgz", - "integrity": "sha512-8f7aNmS1+etYSLHht0fQApPc2kNO8qGRutifN5rVIc6Xo6ABsEbqOr758UwI7ALVbTt4x1fllKt0PYgzD9S3yQ==", + "version": "1.28.1", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.28.1.tgz", + "integrity": "sha512-KRDkHlLlNj3DWh79CDt93fPlRJh2W1AuHV0ZSZAMMuN7lqlsZTV5842idfS1urWG8q9tc17velp1gCXhY7sLnQ==", "dev": true, "dependencies": { "detect-libc": "^1.0.3" @@ -13672,22 +11439,22 @@ "url": "https://opencollective.com/parcel" }, "optionalDependencies": { - "lightningcss-darwin-arm64": "1.27.0", - "lightningcss-darwin-x64": "1.27.0", - "lightningcss-freebsd-x64": "1.27.0", - "lightningcss-linux-arm-gnueabihf": "1.27.0", - "lightningcss-linux-arm64-gnu": "1.27.0", - "lightningcss-linux-arm64-musl": "1.27.0", - "lightningcss-linux-x64-gnu": "1.27.0", - "lightningcss-linux-x64-musl": "1.27.0", - "lightningcss-win32-arm64-msvc": "1.27.0", - "lightningcss-win32-x64-msvc": "1.27.0" + "lightningcss-darwin-arm64": "1.28.1", + "lightningcss-darwin-x64": "1.28.1", + "lightningcss-freebsd-x64": "1.28.1", + "lightningcss-linux-arm-gnueabihf": "1.28.1", + "lightningcss-linux-arm64-gnu": "1.28.1", + "lightningcss-linux-arm64-musl": "1.28.1", + "lightningcss-linux-x64-gnu": "1.28.1", + "lightningcss-linux-x64-musl": "1.28.1", + "lightningcss-win32-arm64-msvc": "1.28.1", + "lightningcss-win32-x64-msvc": "1.28.1" } }, "node_modules/lightningcss-darwin-arm64": { - "version": "1.27.0", - "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.27.0.tgz", - "integrity": "sha512-Gl/lqIXY+d+ySmMbgDf0pgaWSqrWYxVHoc88q+Vhf2YNzZ8DwoRzGt5NZDVqqIW5ScpSnmmjcgXP87Dn2ylSSQ==", + "version": "1.28.1", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.28.1.tgz", + "integrity": "sha512-VG3vvzM0m/rguCdm76DdobNeNJnHK+jWcdkNLFWHLh9YCotRvbRIt45JxwcHlIF8TDqWStVLTdghq5NaigVCBQ==", "cpu": [ "arm64" ], @@ -13705,9 +11472,9 @@ } }, "node_modules/lightningcss-darwin-x64": { - "version": "1.27.0", - "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.27.0.tgz", - "integrity": "sha512-0+mZa54IlcNAoQS9E0+niovhyjjQWEMrwW0p2sSdLRhLDc8LMQ/b67z7+B5q4VmjYCMSfnFi3djAAQFIDuj/Tg==", + "version": "1.28.1", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.28.1.tgz", + "integrity": "sha512-O7ORdislvKfMohFl4Iq7fxKqdJOuuxArcglVI3amuFO5DJ0wfV3Gxgi1JRo49slfr7OVzJQEHLG4muTWYM5cTQ==", "cpu": [ "x64" ], @@ -13725,9 +11492,9 @@ } }, "node_modules/lightningcss-freebsd-x64": { - "version": "1.27.0", - "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.27.0.tgz", - "integrity": "sha512-n1sEf85fePoU2aDN2PzYjoI8gbBqnmLGEhKq7q0DKLj0UTVmOTwDC7PtLcy/zFxzASTSBlVQYJUhwIStQMIpRA==", + "version": "1.28.1", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.28.1.tgz", + "integrity": "sha512-b7sF89B31kYYijxVcFO7l5u6UNA862YstNu+3YbLl/IQKzveL4a5cwR5cdpG+OOhErg/c2u9WCmzZoX2I5GBvw==", "cpu": [ "x64" ], @@ -13745,9 +11512,9 @@ } }, "node_modules/lightningcss-linux-arm-gnueabihf": { - "version": "1.27.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.27.0.tgz", - "integrity": "sha512-MUMRmtdRkOkd5z3h986HOuNBD1c2lq2BSQA1Jg88d9I7bmPGx08bwGcnB75dvr17CwxjxD6XPi3Qh8ArmKFqCA==", + "version": "1.28.1", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.28.1.tgz", + "integrity": "sha512-p61kXwvhUDLLzkWHjzSFfUBW/F0iy3jr3CWi3k8SKULtJEsJXTI9DqRm9EixxMSe2AMBQBt4auTYiQL4B1N51A==", "cpu": [ "arm" ], @@ -13765,9 +11532,9 @@ } }, "node_modules/lightningcss-linux-arm64-gnu": { - "version": "1.27.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.27.0.tgz", - "integrity": "sha512-cPsxo1QEWq2sfKkSq2Bq5feQDHdUEwgtA9KaB27J5AX22+l4l0ptgjMZZtYtUnteBofjee+0oW1wQ1guv04a7A==", + "version": "1.28.1", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.28.1.tgz", + "integrity": "sha512-iO+fN9hOMmzfwqcG2/BgUtMKD48H2JO/SXU44fyIwpY2veb65QF5xiRrQ9l1FwIxbGK3231KBYCtAqv+xf+NsQ==", "cpu": [ "arm64" ], @@ -13785,9 +11552,9 @@ } }, "node_modules/lightningcss-linux-arm64-musl": { - "version": "1.27.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.27.0.tgz", - "integrity": "sha512-rCGBm2ax7kQ9pBSeITfCW9XSVF69VX+fm5DIpvDZQl4NnQoMQyRwhZQm9pd59m8leZ1IesRqWk2v/DntMo26lg==", + "version": "1.28.1", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.28.1.tgz", + "integrity": "sha512-dnMHeXEmCUzHHZjaDpQBYuBKcN9nPC3nPFKl70bcj5Bkn5EmkcgEqm5p035LKOgvAwk1XwLpQCML6pXmCwz0NQ==", "cpu": [ "arm64" ], @@ -13805,9 +11572,9 @@ } }, "node_modules/lightningcss-linux-x64-gnu": { - "version": "1.27.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.27.0.tgz", - "integrity": "sha512-Dk/jovSI7qqhJDiUibvaikNKI2x6kWPN79AQiD/E/KeQWMjdGe9kw51RAgoWFDi0coP4jinaH14Nrt/J8z3U4A==", + "version": "1.28.1", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.28.1.tgz", + "integrity": "sha512-7vWDISaMUn+oo2TwRdf2hl/BLdPxvywv9JKEqNZB/0K7bXwV4XE9wN/C2sAp1gGuh6QBA8lpjF4JIPt3HNlCHA==", "cpu": [ "x64" ], @@ -13825,9 +11592,9 @@ } }, "node_modules/lightningcss-linux-x64-musl": { - "version": "1.27.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.27.0.tgz", - "integrity": "sha512-QKjTxXm8A9s6v9Tg3Fk0gscCQA1t/HMoF7Woy1u68wCk5kS4fR+q3vXa1p3++REW784cRAtkYKrPy6JKibrEZA==", + "version": "1.28.1", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.28.1.tgz", + "integrity": "sha512-IHCu9tVGP+x5BCpA2rF3D04DBokcBza/a8AuHQU+1AiMKubuMegPwcL7RatBgK4ztFHeYnnD5NdhwhRfYMAtNA==", "cpu": [ "x64" ], @@ -13845,9 +11612,9 @@ } }, "node_modules/lightningcss-win32-arm64-msvc": { - "version": "1.27.0", - "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.27.0.tgz", - "integrity": "sha512-/wXegPS1hnhkeG4OXQKEMQeJd48RDC3qdh+OA8pCuOPCyvnm/yEayrJdJVqzBsqpy1aJklRCVxscpFur80o6iQ==", + "version": "1.28.1", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.28.1.tgz", + "integrity": "sha512-Erm72kHmMg/3h350PTseskz+eEGBM17Fuu79WW2Qqt0BfWSF1jHHc12lkJCWMYl5jcBHPs5yZdgNHtJ7IJS3Uw==", "cpu": [ "arm64" ], @@ -13865,9 +11632,9 @@ } }, "node_modules/lightningcss-win32-x64-msvc": { - "version": "1.27.0", - "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.27.0.tgz", - "integrity": "sha512-/OJLj94Zm/waZShL8nB5jsNj3CfNATLCTyFxZyouilfTmSoLDX7VlVAmhPHoZWVFp4vdmoiEbPEYC8HID3m6yw==", + "version": "1.28.1", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.28.1.tgz", + "integrity": "sha512-ZPQtvx+uQBzrSdHH8p4H3M9Alue+x369TPZAA3b4K3d92FPhpZCuBG04+HQzspam9sVeID9mI6f3VRAs2ezaEA==", "cpu": [ "x64" ], @@ -13982,76 +11749,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/log-symbols/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/log-symbols/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/log-symbols/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/log-symbols/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/log-symbols/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/log-symbols/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", @@ -14448,9 +12145,9 @@ } }, "node_modules/micromark-util-character": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.0.tgz", - "integrity": "sha512-KvOVV+X1yLBfs9dCBSopq/+G1PcgT3lAK07mC4BzXi5E7ahzMAF8oIupDDJ6mievI6F+lAATkbQQlQixJfT3aQ==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.1.tgz", + "integrity": "sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==", "funding": [ { "type": "GitHub Sponsors", @@ -14467,9 +12164,9 @@ } }, "node_modules/micromark-util-encode": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-encode/-/micromark-util-encode-2.0.0.tgz", - "integrity": "sha512-pS+ROfCXAGLWCOc8egcBvT0kf27GoWMqtdarNfDcjb6YLuV5cM3ioG45Ys2qOVqeqSbjaKg72vU+Wby3eddPsA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-encode/-/micromark-util-encode-2.0.1.tgz", + "integrity": "sha512-c3cVx2y4KqUnwopcO9b/SCdo2O67LwJJ/UyqGfbigahfegL9myoEFoDYZgkT7f36T0bLrM9hZTAaAyH+PCAXjw==", "funding": [ { "type": "GitHub Sponsors", @@ -14482,9 +12179,9 @@ ] }, "node_modules/micromark-util-sanitize-uri": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-2.0.0.tgz", - "integrity": "sha512-WhYv5UEcZrbAtlsnPuChHUAsu/iBPOVaEVsntLBIdpibO0ddy8OzavZz3iL2xVvBZOpolujSliP65Kq0/7KIYw==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-2.0.1.tgz", + "integrity": "sha512-9N9IomZ/YuGGZZmQec1MbgxtlgougxTodVwDzzEouPKo3qFWvymFHWcnDi2vzV1ff6kas9ucW+o3yzJK9YB1AQ==", "funding": [ { "type": "GitHub Sponsors", @@ -14502,9 +12199,9 @@ } }, "node_modules/micromark-util-symbol": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.0.tgz", - "integrity": "sha512-8JZt9ElZ5kyTnO94muPxIGS8oyElRJaiJO8EzV6ZSyGQ1Is8xwl4Q45qU5UOg+bGH4AikWziz0iN4sFLWs8PGw==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.1.tgz", + "integrity": "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==", "funding": [ { "type": "GitHub Sponsors", @@ -14517,9 +12214,9 @@ ] }, "node_modules/micromark-util-types": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.0.tgz", - "integrity": "sha512-oNh6S2WMHWRZrmutsRmDDfkzKtxF+bc2VxLC9dvtrDIRFln627VsFP6fLMgTryGDljgLPjkrzQSDcPrjPyDJ5w==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.1.tgz", + "integrity": "sha512-534m2WhVTddrcKVepwmVEVnUAmtrx9bfIjNoQHRqfnvdaHQiFytEhJoTgpWJvDEXCO5gLTQh3wYC1PgOJA4NSQ==", "funding": [ { "type": "GitHub Sponsors", @@ -14814,20 +12511,12 @@ "node": ">=10" } }, - "node_modules/mml-web": { - "resolved": "packages/mml-web", - "link": true - }, - "node_modules/mml-web-client": { - "resolved": "packages/mml-web-client", - "link": true - }, "node_modules/mml-web-client-example": { "resolved": "examples/mml-web-client-example", "link": true }, - "node_modules/mml-web-runner": { - "resolved": "packages/mml-web-runner", + "node_modules/mml-web-multi-renderer-example": { + "resolved": "examples/mml-web-multi-renderer-example", "link": true }, "node_modules/mml-web-runner-example": { @@ -14852,12 +12541,6 @@ "color-name": "^1.1.4" } }, - "node_modules/moo-color/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -14951,10 +12634,6 @@ "resolved": "integration-tests/networked-dom-integration-tests", "link": true }, - "node_modules/networked-dom-server": { - "resolved": "packages/networked-dom-server", - "link": true - }, "node_modules/networked-dom-web-client-example": { "resolved": "examples/networked-dom-web-client-example", "link": true @@ -15327,19 +13006,19 @@ } }, "node_modules/nwsapi": { - "version": "2.2.12", - "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.12.tgz", - "integrity": "sha512-qXDmcVlZV4XRtKFzddidpfVP4oMSGhga+xdMc25mv8kaLUHtgzCDhUxkrN8exkGdTlLNaXj7CV3GtON7zuGZ+w==" + "version": "2.2.13", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.13.tgz", + "integrity": "sha512-cTGB9ptp9dY9A5VbMSe7fQBcl/tt22Vcqdq8+eN93rblOuE0aCFu4aZ2vMwct/2t+lFnosm8RkQW1I0Omb1UtQ==" }, "node_modules/nx": { - "version": "19.8.2", - "resolved": "https://registry.npmjs.org/nx/-/nx-19.8.2.tgz", - "integrity": "sha512-NE88CbEZj8hCrUKiYzL1sB6O1tmgu/OjvTp3pJOoROMvo0kE7N4XT3TiKAge+E6wVRXf/zU55cH1G2u0djpZhA==", + "version": "19.8.11", + "resolved": "https://registry.npmjs.org/nx/-/nx-19.8.11.tgz", + "integrity": "sha512-NGKY3o+bm6SMVoP/VFh+rjjjoghLqy+MG/fldYBFiZ2oI30Nhisn19EypMomBrUlS8jhJR0PE9H8/c/yORr9PA==", "dev": true, "hasInstallScript": true, "dependencies": { "@napi-rs/wasm-runtime": "0.2.4", - "@nrwl/tao": "19.8.2", + "@nrwl/tao": "19.8.11", "@yarnpkg/lockfile": "^1.1.0", "@yarnpkg/parsers": "3.0.0-rc.46", "@zkochan/js-yaml": "0.0.7", @@ -15378,16 +13057,16 @@ "nx-cloud": "bin/nx-cloud.js" }, "optionalDependencies": { - "@nx/nx-darwin-arm64": "19.8.2", - "@nx/nx-darwin-x64": "19.8.2", - "@nx/nx-freebsd-x64": "19.8.2", - "@nx/nx-linux-arm-gnueabihf": "19.8.2", - "@nx/nx-linux-arm64-gnu": "19.8.2", - "@nx/nx-linux-arm64-musl": "19.8.2", - "@nx/nx-linux-x64-gnu": "19.8.2", - "@nx/nx-linux-x64-musl": "19.8.2", - "@nx/nx-win32-arm64-msvc": "19.8.2", - "@nx/nx-win32-x64-msvc": "19.8.2" + "@nx/nx-darwin-arm64": "19.8.11", + "@nx/nx-darwin-x64": "19.8.11", + "@nx/nx-freebsd-x64": "19.8.11", + "@nx/nx-linux-arm-gnueabihf": "19.8.11", + "@nx/nx-linux-arm64-gnu": "19.8.11", + "@nx/nx-linux-arm64-musl": "19.8.11", + "@nx/nx-linux-x64-gnu": "19.8.11", + "@nx/nx-linux-x64-musl": "19.8.11", + "@nx/nx-win32-arm64-msvc": "19.8.11", + "@nx/nx-win32-x64-msvc": "19.8.11" }, "peerDependencies": { "@swc-node/register": "^1.8.0", @@ -15402,21 +13081,6 @@ } } }, - "node_modules/nx/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/nx/node_modules/brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", @@ -15426,49 +13090,6 @@ "balanced-match": "^1.0.0" } }, - "node_modules/nx/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/nx/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/nx/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/nx/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/nx/node_modules/jsonc-parser": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", @@ -15524,18 +13145,6 @@ "node": ">=10" } }, - "node_modules/nx/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/object-copy": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", @@ -15588,9 +13197,9 @@ } }, "node_modules/object-inspect": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", - "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", + "version": "1.13.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.3.tgz", + "integrity": "sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA==", "engines": { "node": ">= 0.4" }, @@ -15696,15 +13305,14 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/oniguruma-to-js": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/oniguruma-to-js/-/oniguruma-to-js-0.4.3.tgz", - "integrity": "sha512-X0jWUcAlxORhOqqBREgPMgnshB7ZGYszBNspP+tS9hPD3l13CdaXcHbgImoHUHlrvGx/7AvFEkTRhAGYh+jzjQ==", + "node_modules/oniguruma-to-es": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/oniguruma-to-es/-/oniguruma-to-es-0.1.2.tgz", + "integrity": "sha512-sBYKVJlIMB0WPO+tSu/NNB1ytSFeHyyJZ3Ayxfx3f/QUuXu0lvZk0VB4K7npmdlHSC0ldqanzh/sUSlAbgCTfw==", "dependencies": { - "regex": "^4.3.2" - }, - "funding": { - "url": "https://github.com/sponsors/antfu" + "emoji-regex-xs": "^1.0.0", + "regex": "^4.4.0", + "regex-recursion": "^4.1.0" } }, "node_modules/open": { @@ -15760,78 +13368,8 @@ "engines": { "node": ">=10" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ora/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/ora/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/ora/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/ora/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/ora/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/ora/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/os-tmpdir": { @@ -16057,9 +13595,9 @@ } }, "node_modules/package-json-from-dist": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz", - "integrity": "sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", "dev": true }, "node_modules/pacote": { @@ -16164,11 +13702,11 @@ } }, "node_modules/parse5": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", - "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==", + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.2.1.tgz", + "integrity": "sha512-BuBYQYlv1ckiPdQi/ohiivi9Sagc9JG+Ozs0r7b/0iK3sKmrb0b9FdWdBbOdx6hBCM/F9Ir82ofnBhtZOjCRPQ==", "dependencies": { - "entities": "^4.4.0" + "entities": "^4.5.0" }, "funding": { "url": "https://github.com/inikulin/parse5?sponsor=1" @@ -16265,9 +13803,9 @@ "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==" }, "node_modules/picocolors": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz", - "integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==" + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==" }, "node_modules/picomatch": { "version": "2.3.1", @@ -16333,6 +13871,18 @@ "node": ">=8" } }, + "node_modules/playcanvas": { + "version": "1.73.5", + "resolved": "https://registry.npmjs.org/playcanvas/-/playcanvas-1.73.5.tgz", + "integrity": "sha512-dUXmlGygUNUicxBQNFvwudGqX90NiKhI9Jx+AhixzWrkuQDP02KP6JjZldNOVA1VfDS9DAQ8APZYJNDM6AnOEA==", + "dependencies": { + "@types/webxr": "^0.5.16", + "@webgpu/types": "^0.1.40" + }, + "engines": { + "node": ">=18.0.0" + } + }, "node_modules/pngjs": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-3.4.0.tgz", @@ -16508,6 +14058,15 @@ "node": ">=10" } }, + "node_modules/promise-worker-transferable": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/promise-worker-transferable/-/promise-worker-transferable-1.0.4.tgz", + "integrity": "sha512-bN+0ehEnrXfxV2ZQvU2PetO0n4gqBD4ulq3MI1WOPLgr7/Mg9yRQkX5+0v1vagr74ZTsl7XtzlaYDo2EuCeYJw==", + "dependencies": { + "is-promise": "^2.1.0", + "lie": "^3.0.2" + } + }, "node_modules/prompts": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", @@ -16627,10 +14186,13 @@ "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" }, "node_modules/psl": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", - "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", - "dev": true + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.10.0.tgz", + "integrity": "sha512-KSKHEbjAnpUuAUserOq0FxGXCUrzC3WniuSJhvdbs102rL55266ZcHBqLWOsG30spQMlPdpy7icATiAQehg/iA==", + "dev": true, + "dependencies": { + "punycode": "^2.3.1" + } }, "node_modules/publish-if-not-exists": { "version": "1.1.0", @@ -16667,54 +14229,89 @@ } }, "node_modules/puppeteer": { - "version": "23.4.1", - "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-23.4.1.tgz", - "integrity": "sha512-+wWfWTkQ8L9IB/3OVGSUp37c0eQ5za/85KdX+LAq2wTZkMdocgYGMCs+/91e2f/RXIYzve4x/uGxN8zG2sj8+w==", - "dev": true, + "version": "22.6.5", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-22.6.5.tgz", + "integrity": "sha512-YuoRKGj3MxHhUwrey7vmNvU4odGdUdNsj1ee8pfcqQlLWIXfMOXZCAXh8xdzpZESHH3tCGWp2xmPZE8E6iUEWg==", + "deprecated": "< 22.8.2 is no longer supported", "hasInstallScript": true, "dependencies": { - "@puppeteer/browsers": "2.4.0", - "chromium-bidi": "0.6.5", - "cosmiconfig": "^9.0.0", - "devtools-protocol": "0.0.1342118", - "puppeteer-core": "23.4.1", - "typed-query-selector": "^2.12.0" + "@puppeteer/browsers": "2.2.2", + "cosmiconfig": "9.0.0", + "devtools-protocol": "0.0.1262051", + "puppeteer-core": "22.6.5" }, "bin": { - "puppeteer": "lib/cjs/puppeteer/node/cli.js" + "puppeteer": "lib/esm/puppeteer/node/cli.js" }, "engines": { "node": ">=18" } }, "node_modules/puppeteer-core": { - "version": "23.4.1", - "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-23.4.1.tgz", - "integrity": "sha512-uCxGtn8VE9PlKhdFJX/zZySi9K3Ufr3qUZe28jxJoZUqiMJOi+SFh2zhiFDSjWqZIDkc0FtnaCC+rewW3MYXmg==", - "dev": true, + "version": "22.6.5", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-22.6.5.tgz", + "integrity": "sha512-s0/5XkAWe0/dWISiljdrybjwDCHhgN31Nu/wznOZPKeikgcJtZtbvPKBz0t802XWqfSQnQDt3L6xiAE5JLlfuw==", "dependencies": { - "@puppeteer/browsers": "2.4.0", - "chromium-bidi": "0.6.5", - "debug": "^4.3.7", - "devtools-protocol": "0.0.1342118", - "typed-query-selector": "^2.12.0", - "ws": "^8.18.0" + "@puppeteer/browsers": "2.2.2", + "chromium-bidi": "0.5.17", + "debug": "4.3.4", + "devtools-protocol": "0.0.1262051", + "ws": "8.16.0" }, "engines": { "node": ">=18" } }, + "node_modules/puppeteer-core/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/puppeteer-core/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/puppeteer-core/node_modules/ws": { + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz", + "integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, "node_modules/puppeteer/node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" }, "node_modules/puppeteer/node_modules/cosmiconfig": { "version": "9.0.0", "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-9.0.0.tgz", "integrity": "sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==", - "dev": true, "dependencies": { "env-paths": "^2.2.1", "import-fresh": "^3.3.0", @@ -16740,7 +14337,6 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, "dependencies": { "argparse": "^2.0.1" }, @@ -17095,9 +14691,9 @@ } }, "node_modules/readdirp": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.0.1.tgz", - "integrity": "sha512-GkMg9uOTpIWWKbSsgwb5fA4EavTR+SG/PMPoAY8hkhHfEEY0/vqljY+XHqtDf2cr2IJtoNRDbrrEpZUiZCkYRw==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.0.2.tgz", + "integrity": "sha512-yDMz9g+VaZkqBYS/ozoBJwaBhTbZo3UNYQHNRw1D3UFQB8oHB4uS/tAODO+ZLjGWmUbKnIlOWO+aaIiAxrUWHA==", "engines": { "node": ">= 14.16.0" }, @@ -17120,9 +14716,9 @@ } }, "node_modules/regex": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/regex/-/regex-4.3.2.tgz", - "integrity": "sha512-kK/AA3A9K6q2js89+VMymcboLOlF5lZRCYJv3gzszXFHBr6kO6qLGzbm+UIugBEV8SMMKCTR59txoY6ctRHYVw==" + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/regex/-/regex-4.4.0.tgz", + "integrity": "sha512-uCUSuobNVeqUupowbdZub6ggI5/JZkYyJdDogddJr60L764oxC2pMZov1fQ3wM9bdyzUILDG+Sqx6NAKAz9rKQ==" }, "node_modules/regex-not": { "version": "1.0.2", @@ -17137,6 +14733,19 @@ "node": ">=0.10.0" } }, + "node_modules/regex-recursion": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/regex-recursion/-/regex-recursion-4.2.1.tgz", + "integrity": "sha512-QHNZyZAeKdndD1G3bKAbBEKOSSK4KOHQrAJ01N1LJeb0SoH4DJIeFhp0uUpETgONifS4+P3sOgoA1dhzgrQvhA==", + "dependencies": { + "regex-utilities": "^2.3.0" + } + }, + "node_modules/regex-utilities": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/regex-utilities/-/regex-utilities-2.3.0.tgz", + "integrity": "sha512-8VhliFJAWRaUiVvREIiW2NXXTmHs4vMNnSzuJVhscgmGav3g9VDxLrQndI3dZZVVdp0ZO/5v0xmX516/7M9cng==" + }, "node_modules/remove-trailing-separator": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", @@ -17880,15 +15489,15 @@ } }, "node_modules/shiki": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/shiki/-/shiki-1.19.0.tgz", - "integrity": "sha512-Ng7Gd6XgWFLsv4Z3so65hOyXjV78qz1M117MuZHwdPQD6fgb5wR2IoLMvSlM/Ml14EXH7n+/YxIpTD74i7kDdw==", - "dependencies": { - "@shikijs/core": "1.19.0", - "@shikijs/engine-javascript": "1.19.0", - "@shikijs/engine-oniguruma": "1.19.0", - "@shikijs/types": "1.19.0", - "@shikijs/vscode-textmate": "^9.2.2", + "version": "1.23.0", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-1.23.0.tgz", + "integrity": "sha512-xfdu9DqPkIpExH29cmiTlgo0/jBki5la1Tkfhsv+Wu5TT3APLNHslR1acxuKJOCWqVdSc+pIbs/2ozjVRGppdg==", + "dependencies": { + "@shikijs/core": "1.23.0", + "@shikijs/engine-javascript": "1.23.0", + "@shikijs/engine-oniguruma": "1.23.0", + "@shikijs/types": "1.23.0", + "@shikijs/vscode-textmate": "^9.3.0", "@types/hast": "^3.0.4" } }, @@ -18349,9 +15958,9 @@ } }, "node_modules/streamx": { - "version": "2.20.1", - "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.20.1.tgz", - "integrity": "sha512-uTa0mU6WUC65iUvzKH4X9hEdvSW7rbPxPtwfWiLMSj3qTdQbAiUboZTxauKfpFuGIGa1C2BYijZ7wgdUXICJhA==", + "version": "2.20.2", + "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.20.2.tgz", + "integrity": "sha512-aDGDLU+j9tJcUdPGOaHmVF1u/hhI+CsGkT02V3OKlHDV7IukOI+nTWAGkiZEKCO35rWN1wIr4tS7YFr1f4qSvA==", "dependencies": { "fast-fifo": "^1.3.2", "queue-tick": "^1.0.1", @@ -18517,14 +16126,14 @@ } }, "node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dependencies": { - "has-flag": "^3.0.0" + "has-flag": "^4.0.0" }, "engines": { - "node": ">=4" + "node": ">=8" } }, "node_modules/supports-preserve-symlinks-flag": { @@ -18545,9 +16154,9 @@ "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==" }, "node_modules/synckit": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.9.1.tgz", - "integrity": "sha512-7gr8p9TQP6RAHusBOSLs46F4564ZrjV8xFmw5zCmgmhGUcw2hxsShhJ6CEiHQMgPDwAQ1fWHPM0ypc4RMAig4A==", + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.9.2.tgz", + "integrity": "sha512-vrozgXDQwYO72vHjUb/HnFbQx1exDjoKzqx23aXEg2a9VIg2TSFZ8FmeZpTjUCFMYw7mpX4BE2SFu8wI7asYsw==", "dev": true, "dependencies": { "@pkgr/core": "^0.1.0", @@ -18578,10 +16187,9 @@ } }, "node_modules/tar-fs": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.6.tgz", - "integrity": "sha512-iokBDQQkUyeXhgPYaZxmczGPhnhXZ0CmrqI+MOb/WFGS9DW5wnfrLgtjUJBvz50vQ3qfRwJ62QVoCFu8mPVu5w==", - "dev": true, + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.5.tgz", + "integrity": "sha512-JOgGAmZyMgbqpLwct7ZV8VzkEB6pxXFBVErLtb+XCOqzc6w1xiWKI9GVd6bwk68EX7eJ4DWmfXVmq8K2ziZTGg==", "dependencies": { "pump": "^3.0.0", "tar-stream": "^3.1.5" @@ -18595,7 +16203,6 @@ "version": "3.1.7", "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.7.tgz", "integrity": "sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==", - "dev": true, "dependencies": { "b4a": "^1.6.4", "fast-fifo": "^1.2.0", @@ -18681,12 +16288,9 @@ } }, "node_modules/text-decoder": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/text-decoder/-/text-decoder-1.2.0.tgz", - "integrity": "sha512-n1yg1mOj9DNpk3NeZOx7T6jchTbyJS3i3cucbNN6FcdPriMZx7NsgrGpWWdWZZGxD7ES1XB+3uoqHMgOKaN+fg==", - "dependencies": { - "b4a": "^1.6.4" - } + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/text-decoder/-/text-decoder-1.2.1.tgz", + "integrity": "sha512-x9v3H/lTKIJKQQe7RPQkLfKAnc9lUTkWDypIQgTzPJAq+5/GCDHonmshfvlsNSj58yyshbIJJDLmU15qNERrXQ==" }, "node_modules/text-extensions": { "version": "1.9.0", @@ -18754,20 +16358,20 @@ } }, "node_modules/tldts": { - "version": "6.1.47", - "resolved": "https://registry.npmjs.org/tldts/-/tldts-6.1.47.tgz", - "integrity": "sha512-R/K2tZ5MiY+mVrnSkNJkwqYT2vUv1lcT6wJvd2emGaMJ7PHUGRY4e3tUsdFCXgqxi2QgbHjL3yJgXCo40v9Hxw==", + "version": "6.1.61", + "resolved": "https://registry.npmjs.org/tldts/-/tldts-6.1.61.tgz", + "integrity": "sha512-rv8LUyez4Ygkopqn+M6OLItAOT9FF3REpPQDkdMx5ix8w4qkuE7Vo2o/vw1nxKQYmJDV8JpAMJQr1b+lTKf0FA==", "dependencies": { - "tldts-core": "^6.1.47" + "tldts-core": "^6.1.61" }, "bin": { "tldts": "bin/cli.js" } }, "node_modules/tldts-core": { - "version": "6.1.47", - "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-6.1.47.tgz", - "integrity": "sha512-6SWyFMnlst1fEt7GQVAAu16EGgFK0cLouH/2Mk6Ftlwhv3Ol40L0dlpGMcnnNiiOMyD2EV/aF3S+U2nKvvLvrA==" + "version": "6.1.61", + "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-6.1.61.tgz", + "integrity": "sha512-In7VffkDWUPgwa+c9picLUxvb0RltVwTkSgMNFgvlGSWveCzGBemBqTsgJCL4EDFWZ6WH0fKTsot6yNhzy3ZzQ==" }, "node_modules/tmp": { "version": "0.2.3", @@ -18784,15 +16388,6 @@ "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", "devOptional": true }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "devOptional": true, - "engines": { - "node": ">=4" - } - }, "node_modules/to-object-path": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", @@ -18925,9 +16520,9 @@ } }, "node_modules/ts-api-utils": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", - "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.0.tgz", + "integrity": "sha512-032cPxaEKwM+GT3vA5JXNzIaizx388rhsSW79vGRNGXfRRAdEAn2mvk36PvK5HnOchyWZ7afLEXqYCvPCrzuzQ==", "dev": true, "engines": { "node": ">=16" @@ -19063,9 +16658,9 @@ } }, "node_modules/tslib": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", - "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" }, "node_modules/tsx": { "version": "4.19.1", @@ -19568,12 +17163,6 @@ "node": ">= 0.6" } }, - "node_modules/typed-query-selector": { - "version": "2.12.0", - "resolved": "https://registry.npmjs.org/typed-query-selector/-/typed-query-selector-2.12.0.tgz", - "integrity": "sha512-SbklCd1F0EiZOyPiW192rrHZzZ5sBijB6xM+cpmrwDqObvdtunOHHIk9fCGsoK5JVIYXoyEp4iEdE3upFH3PAg==", - "dev": true - }, "node_modules/typedarray": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", @@ -19892,9 +17481,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.0.tgz", - "integrity": "sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz", + "integrity": "sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==", "devOptional": true, "funding": [ { @@ -19911,8 +17500,8 @@ } ], "dependencies": { - "escalade": "^3.1.2", - "picocolors": "^1.0.1" + "escalade": "^3.2.0", + "picocolors": "^1.1.0" }, "bin": { "update-browserslist-db": "cli.js" @@ -20278,72 +17867,6 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/wrap-ansi/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/wrap-ansi/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/wrap-ansi/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", @@ -20514,9 +18037,9 @@ "devOptional": true }, "node_modules/yaml": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.5.1.tgz", - "integrity": "sha512-bLQOjaX/ADgQ20isPJRvF0iRUHIxVhYvr53Of7wGcWlO2jvtUlH5m87DsmulFVxRpNLOnI4tB6p/oh8D7kpn9Q==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.6.0.tgz", + "integrity": "sha512-a6ae//JvKDEra2kdi1qzCyrJW/WZCgFi8ydDV+eXExl95t+5R+ijnqHJbz9tmMh8FUjx3iv2fCQ4dclAQlO2UQ==", "bin": { "yaml": "bin.mjs" }, @@ -20580,10 +18103,9 @@ } }, "node_modules/zod": { - "version": "3.23.8", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.23.8.tgz", - "integrity": "sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==", - "dev": true, + "version": "3.22.4", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.22.4.tgz", + "integrity": "sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==", "funding": { "url": "https://github.com/sponsors/colinhacks" } @@ -20608,36 +18130,88 @@ "react": "*" } }, + "packages/mml-viewer": { + "name": "@mml-io/mml-viewer", + "version": "0.18.1", + "dependencies": { + "@mml-io/mml-web": "^0.18.1", + "@mml-io/mml-web-playcanvas-standalone": "^0.18.1", + "@mml-io/mml-web-threejs-standalone": "^0.18.1", + "@monogrid/gainmap-js": "3.0.6", + "playcanvas": "1.73.5", + "three": "0.163.0" + }, + "devDependencies": { + "@types/three": "0.163.0" + } + }, "packages/mml-web": { + "name": "@mml-io/mml-web", "version": "0.18.1", "dependencies": { - "@mml-io/model-loader": "^0.18.1", "@mml-io/networked-dom-web": "^0.18.1" }, "devDependencies": { - "@types/three": "0.163.0", "jest-canvas-mock": "2.5.2", "jest-environment-jsdom": "29.7.0", "jest-expect-message": "1.1.3", "jest-fetch-mock": "3.0.3", - "resize-observer-polyfill": "1.5.1", - "three": "0.163.0" - }, - "peerDependencies": { - "three": "*" + "resize-observer-polyfill": "1.5.1" } }, "packages/mml-web-client": { + "name": "@mml-io/mml-web-client", "version": "0.18.1", "dependencies": { - "mml-web": "^0.18.1", + "@mml-io/mml-web": "^0.18.1", + "@mml-io/mml-web-playcanvas-standalone": "^0.18.1", + "@mml-io/mml-web-threejs-standalone": "^0.18.1", + "playcanvas": "1.73.5", "three": "0.163.0" }, "devDependencies": { "@types/three": "0.163.0" } }, + "packages/mml-web-playcanvas": { + "name": "@mml-io/mml-web-playcanvas", + "version": "0.18.1", + "dependencies": { + "@mml-io/mml-web": "^0.18.1" + }, + "devDependencies": { + "jest-canvas-mock": "2.5.2", + "jest-environment-jsdom": "29.7.0", + "jest-expect-message": "1.1.3", + "jest-fetch-mock": "3.0.3", + "playcanvas": "1.73.5", + "resize-observer-polyfill": "1.5.1" + }, + "peerDependencies": { + "playcanvas": "*" + } + }, + "packages/mml-web-playcanvas-standalone": { + "name": "@mml-io/mml-web-playcanvas-standalone", + "version": "0.18.1", + "dependencies": { + "@mml-io/mml-web": "^0.18.1", + "@mml-io/mml-web-playcanvas": "^0.18.1" + }, + "devDependencies": { + "jest-canvas-mock": "2.5.2", + "jest-environment-jsdom": "29.7.0", + "jest-expect-message": "1.1.3", + "jest-fetch-mock": "3.0.3", + "playcanvas": "1.73.5", + "resize-observer-polyfill": "1.5.1" + }, + "peerDependencies": { + "playcanvas": "*" + } + }, "packages/mml-web-runner": { + "name": "@mml-io/mml-web-runner", "version": "0.18.1", "dependencies": { "@mml-io/networked-dom-web-runner": "^0.18.1" @@ -20650,6 +18224,41 @@ "resize-observer-polyfill": "1.5.1" } }, + "packages/mml-web-threejs": { + "name": "@mml-io/mml-web-threejs", + "version": "0.18.1", + "dependencies": { + "@mml-io/mml-web": "^0.18.1", + "@mml-io/model-loader": "^0.18.1" + }, + "devDependencies": { + "@types/three": "0.163.0", + "three": "0.163.0" + }, + "peerDependencies": { + "three": "*" + } + }, + "packages/mml-web-threejs-standalone": { + "name": "@mml-io/mml-web-threejs-standalone", + "version": "0.18.1", + "dependencies": { + "@mml-io/mml-web": "^0.18.1", + "@mml-io/mml-web-threejs": "^0.18.1" + }, + "devDependencies": { + "@types/three": "0.163.0", + "jest-canvas-mock": "2.5.2", + "jest-environment-jsdom": "29.7.0", + "jest-expect-message": "1.1.3", + "jest-fetch-mock": "3.0.3", + "resize-observer-polyfill": "1.5.1", + "three": "0.163.0" + }, + "peerDependencies": { + "three": "*" + } + }, "packages/model-loader": { "name": "@mml-io/model-loader", "version": "0.18.1", @@ -20673,6 +18282,7 @@ "version": "0.18.1" }, "packages/networked-dom-server": { + "name": "@mml-io/networked-dom-server", "version": "0.18.1", "dependencies": { "@mml-io/networked-dom-document": "^0.18.1", diff --git a/package.json b/package.json index 7aa36e0f..c4f3a605 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,8 @@ "packages/**/*", "examples/**/*", "e2e-tests", - "integration-tests/**/*" + "integration-tests/**/*", + "github-pages-publisher" ], "devDependencies": { "@babel/preset-typescript": "7.24.7", @@ -35,6 +36,7 @@ "@types/jest": "29.5.13", "@types/jju": "1.4.5", "@types/node": "22.7.0", + "@types/resolve": "1.20.6", "@types/tmp": "0.2.6", "concurrently": "9.0.1", "cross-env": "7.0.3", @@ -48,6 +50,7 @@ "jest": "29.7.0", "jju": "1.4.0", "lerna": "8.1.8", + "resolve": "1.22.8", "prettier": "3.3.3", "publish-if-not-exists": "1.1.0", "tmp": "0.2.3", diff --git a/packages/mml-react-types/README.md b/packages/mml-react-types/README.md new file mode 100644 index 00000000..2860a866 --- /dev/null +++ b/packages/mml-react-types/README.md @@ -0,0 +1,40 @@ +# MML React Types +#### `@mml-io/mml-react-types` + +[![npm version](https://img.shields.io/npm/v/@mml-io/mml-react-types.svg?style=flat)](https://www.npmjs.com/package/@mml-io/mml-react-types) + +This package contains TypeScript types for MML React components to allow for type checking and suggestions of MML elements and attributes in TypeScript projects. + +## Usage + +### Installation + +```bash + npm install @mml-io/mml-react-types --save-dev +``` + +Add `"@mml-io/mml-react-types"` to the `types` field in the `compilerOptions` group of your `tsconfig.json` file: + +```json +{ + [...] + "compilerOptions": { + [...] + "types": ["react", "react-dom", "@mml-io/mml-react-types"] + } + +``` + +### Example + +```tsx +import React from 'react'; + +export function MyComponent() { + return ( + + + + ); +} +``` diff --git a/packages/mml-react-types/tsconfig.json b/packages/mml-react-types/tsconfig.json index 7dac1ffc..503a7f91 100644 --- a/packages/mml-react-types/tsconfig.json +++ b/packages/mml-react-types/tsconfig.json @@ -9,6 +9,7 @@ "allowJs": true, "types": ["node", "jest"], "strictNullChecks": true, + "skipLibCheck": true, "allowSyntheticDefaultImports": true, "moduleResolution": "node", "downlevelIteration": true, diff --git a/packages/mml-viewer/README.md b/packages/mml-viewer/README.md new file mode 100644 index 00000000..cf1f3b15 --- /dev/null +++ b/packages/mml-viewer/README.md @@ -0,0 +1,44 @@ +# MML Viewer (Alpha) + +This package contains the code for the standalone MML viewer that is available at [https://viewer.mml.io/main/v1/](https://viewer.mml.io/main/v1/). + +It is continuously deployed from the `main` branch of this repository. + +The viewer supports multiple rendering modes including: +* 3D rendering with THREE.js +* 3D rendering with PlayCanvas +* (HTML) Tag rendering + +## Usage + +The viewer is configured using URL parameters. The UI allows editing of these parameters and will update the URL as you change them. + +### Basic Parameters + +* `url` - The URL of the MML document to load + * can either be a `wss://` for a live document running on a server or a `https://` for a static MML document. +* `renderer` + * `threejs` - Use the THREE.js renderer + * `playcanvas` - Use the PlayCanvas renderer + * `tags` - Use the HTML tag renderer +* `backgroundColor` - The background color of the viewer. By default the viewer is transparent (white when loaded directly). + * Can be a color name (e.g. `red`), a hex code (e.g. `#ff0000`) or an RGBA value (e.g. `rgba(255,0,0, 0.5)`). +* `cameraMode` - The camera mode to use. This is renderer specific. + * `orbit` - Orbit camera + * `drag-fly` - Drag Fly camera - WASD, Shift & Space to move, drag mouse to look. + +More parameters are discoverable in the UI. + +### Embedding in an iframe + +The viewer can be embedded in an iframe to enable viewing an MML document on another webpage. + +You can include the `&noUI=true` parameter to hide the UI to remove the ability to change the parameters. + +E.g. to view an MML document at `https://public.mml.io/rgb-cubes.html` in the viewer: + +```html + +``` + +**Note** - Whilst the above example `src` does not do this for simplicity, it is recommended to encode the URL being viewed using `encodeURIComponent` to ensure the parameters of that URL are not interpreted as parameters of the viewer. diff --git a/packages/mml-viewer/build.ts b/packages/mml-viewer/build.ts new file mode 100644 index 00000000..7a0f0016 --- /dev/null +++ b/packages/mml-viewer/build.ts @@ -0,0 +1,80 @@ +import * as esbuild from "esbuild"; +import cssModulesPlugin from "esbuild-css-modules-plugin"; +import { copy } from "esbuild-plugin-copy"; +import * as process from "process"; + +const buildMode = "--build"; +const serveMode = "--serve"; + +const helpString = `Mode must be provided as one of ${buildMode} or ${serveMode}`; + +const args = process.argv.splice(2); +if (args.length !== 1) { + console.error(helpString); + process.exit(1); +} +const mode = args[0]; + +const buildOptions: esbuild.BuildOptions = { + entryPoints: { + index: "src/index.ts", + }, + bundle: true, + external: ["node:crypto"], + write: true, + metafile: true, + publicPath: "", + sourcemap: true, + assetNames: "[name]-[hash]", + preserveSymlinks: true, + outdir: "./build/", + splitting: true, + platform: "browser", + format: "esm", + loader: { + ".svg": "file", + ".png": "file", + ".jpg": "file", + ".css": "css", + }, + plugins: [ + cssModulesPlugin({}), + copy({ + resolveFrom: "cwd", + assets: { + from: ["./src/static/**/*"], + to: ["./build/"], + }, + }), + ], +}; + +switch (mode) { + case buildMode: + esbuild.build(buildOptions).catch(() => process.exit(1)); + break; + case serveMode: + // eslint-disable-next-line no-case-declarations + const portArg = process.env.PORT; + if (!portArg) { + console.error("PORT environment variable is not set for server"); + process.exit(1); + } + esbuild + .context({ ...buildOptions }) + .then((context) => + context.serve({ + host: "127.0.0.1", + port: parseInt(portArg, 10), + servedir: "./build/", + }), + ) + .catch((e) => { + console.error(e); + process.exit(1); + }); + break; + default: + console.error(helpString); + process.exit(1); +} diff --git a/packages/mml-viewer/jest.config.ts b/packages/mml-viewer/jest.config.ts new file mode 100644 index 00000000..f3df6ff9 --- /dev/null +++ b/packages/mml-viewer/jest.config.ts @@ -0,0 +1,25 @@ +import type { JestConfigWithTsJest } from "ts-jest"; + +const jestConfig: JestConfigWithTsJest = { + verbose: true, + collectCoverage: true, + testEnvironment: "jsdom", + coverageDirectory: "coverage", + coverageReporters: ["lcov", "text"], + extensionsToTreatAsEsm: [".ts"], + moduleNameMapper: { + "^(\\.{1,2}/.*)\\.js$": "$1", + }, + setupFiles: ["jest-canvas-mock"], + setupFilesAfterEnv: ["jest-expect-message", "../../test-utils/jest-browser-polyfills.ts"], + transform: { + "^.+\\.tsx?$": [ + "ts-jest", + { + useESM: true, + }, + ], + }, +}; + +export default jestConfig; diff --git a/packages/mml-viewer/package.json b/packages/mml-viewer/package.json new file mode 100644 index 00000000..8b10a055 --- /dev/null +++ b/packages/mml-viewer/package.json @@ -0,0 +1,33 @@ +{ + "name": "@mml-io/mml-viewer", + "version": "0.18.1", + "private": true, + "publishConfig": { + "access": "public" + }, + "files": [ + "/build" + ], + "type": "module", + "main": "build/index.js", + "scripts": { + "type-check": "tsc --noEmit", + "build": "tsx ./build.ts --build", + "iterate": "cross-env PORT=28893 tsx ./build.ts --serve", + "lint": "eslint \"./**/*.{js,jsx,ts,tsx}\" --max-warnings 0", + "lint-fix": "eslint \"./**/*.{js,jsx,ts,tsx}\" --fix", + "test": "cross-env NODE_OPTIONS=--experimental-vm-modules jest", + "test-iterate": "cross-env NODE_OPTIONS=--experimental-vm-modules jest --watch" + }, + "dependencies": { + "@mml-io/mml-web": "^0.18.1", + "three": "0.163.0", + "@monogrid/gainmap-js": "3.0.6", + "playcanvas": "1.73.5", + "@mml-io/mml-web-playcanvas-standalone": "^0.18.1", + "@mml-io/mml-web-threejs-standalone": "^0.18.1" + }, + "devDependencies": { + "@types/three": "0.163.0" + } +} diff --git a/packages/mml-viewer/src/FormIteration.ts b/packages/mml-viewer/src/FormIteration.ts new file mode 100644 index 00000000..723d2a42 --- /dev/null +++ b/packages/mml-viewer/src/FormIteration.ts @@ -0,0 +1,73 @@ +import { QueryParamState } from "./QueryParamState"; +import { FieldDefinition, GroupDefinition } from "./ui/FieldDefinition"; +import { UIField } from "./ui/UIField"; +import { UIGroup } from "./ui/UIGroup"; +import { ViewerUI } from "./ui/ViewerUI"; + +export class FormIteration { + private unmatchedFields = new Map(); + + private fields = new Map(); + private groups = new Map(); + + constructor( + private queryParamState: QueryParamState, + private viewerUI: ViewerUI, + previousFormIteration: FormIteration | null, + ) { + if (previousFormIteration) { + this.unmatchedFields = new Map(previousFormIteration.fields); + this.fields = new Map(previousFormIteration.fields); + } + } + + getFieldValue(fieldDefinition: FieldDefinition): string { + const unmatchedField = this.unmatchedFields.get(fieldDefinition); + if (unmatchedField) { + const uiGroup = unmatchedField.group; + this.groups.set(uiGroup.groupDefinition, uiGroup); + this.unmatchedFields // We've used this existing field. Mark it as matched. + .delete(fieldDefinition); + } + let field = this.fields.get(fieldDefinition); + if (!field) { + const groupDefinition = fieldDefinition.groupDefinition; + let uiGroup = this.groups.get(groupDefinition); + if (!uiGroup) { + uiGroup = new UIGroup(groupDefinition); + this.groups.set(groupDefinition, uiGroup); + this.viewerUI.addGroup(uiGroup); + } + field = new UIField(fieldDefinition, uiGroup); + uiGroup.addField(field); + this.fields.set(fieldDefinition, field); + } + + const readValue = this.queryParamState.read(fieldDefinition.name); + if (readValue !== null) { + field.setValue(readValue); + return readValue; + } + return fieldDefinition.defaultValue.toString(); + } + + private clearUnmatchedFields() { + for (const field of this.unmatchedFields.values()) { + const group = field.group; + group.removeField(field); + field.dispose(); + if (group.isEmpty()) { + group.dispose(); + this.viewerUI.removeGroup(group); + this.groups.delete(group.groupDefinition); + } + this.fields.delete(field.fieldDefinition); + } + this.unmatchedFields.clear(); + } + + completed() { + this.clearUnmatchedFields(); + this.viewerUI.showUnusedParams(Array.from(this.queryParamState.getUnusedParams())); + } +} diff --git a/packages/mml-viewer/src/GraphicsMode.ts b/packages/mml-viewer/src/GraphicsMode.ts new file mode 100644 index 00000000..3ea554c0 --- /dev/null +++ b/packages/mml-viewer/src/GraphicsMode.ts @@ -0,0 +1,7 @@ +import { FormIteration } from "./FormIteration"; + +export type GraphicsMode = { + type: string; + dispose: () => void; + update: (formIteration: FormIteration) => void; +}; diff --git a/packages/mml-viewer/src/MMLSourceDefinition.ts b/packages/mml-viewer/src/MMLSourceDefinition.ts new file mode 100644 index 00000000..9b62ab82 --- /dev/null +++ b/packages/mml-viewer/src/MMLSourceDefinition.ts @@ -0,0 +1,3 @@ +export type MMLSourceDefinition = { + url: string; +}; diff --git a/packages/mml-viewer/src/PlayCanvasMode.ts b/packages/mml-viewer/src/PlayCanvasMode.ts new file mode 100644 index 00000000..1ee37548 --- /dev/null +++ b/packages/mml-viewer/src/PlayCanvasMode.ts @@ -0,0 +1,50 @@ +import { FormIteration } from "./FormIteration"; +import { GraphicsMode } from "./GraphicsMode"; +import { MMLSourceDefinition } from "./MMLSourceDefinition"; + +export class PlayCanvasMode implements GraphicsMode { + private disposed = false; + private internalMode: GraphicsMode | null = null; + + public readonly type = "playcanvas"; + + constructor( + private windowTarget: Window, + private targetForWrappers: HTMLElement, + private mmlSource: MMLSourceDefinition, + private formIteration: FormIteration, + ) { + this.init(); + } + + private async init() { + this.internalMode = await (async () => { + const { PlayCanvasModeInternal } = await import("./PlayCanvasModeInternal"); + return new PlayCanvasModeInternal( + this.windowTarget, + this.targetForWrappers, + this.mmlSource, + this.formIteration, + ); + })(); + if (this.disposed) { + this.dispose(); + return; + } + } + + dispose() { + this.disposed = true; + if (this.internalMode) { + this.internalMode.dispose(); + } + } + + update(formIteration: FormIteration) { + this.formIteration = formIteration; + if (!this.internalMode) { + return; + } + this.internalMode.update(formIteration); + } +} diff --git a/packages/mml-viewer/src/PlayCanvasModeInternal.ts b/packages/mml-viewer/src/PlayCanvasModeInternal.ts new file mode 100644 index 00000000..08d89611 --- /dev/null +++ b/packages/mml-viewer/src/PlayCanvasModeInternal.ts @@ -0,0 +1,289 @@ +import { + FullScreenMMLScene, + MMLNetworkSource, + NetworkedDOMWebsocketStatus, + parseColorAttribute, +} from "@mml-io/mml-web"; +import { StatusUI } from "@mml-io/mml-web"; +import { + PlayCanvasDragFlyCameraControls, + PlayCanvasOrbitCameraControls, + StandalonePlayCanvasAdapter, + StandalonePlayCanvasAdapterControlsType, +} from "@mml-io/mml-web-playcanvas-standalone"; +import * as playcanvas from "playcanvas"; + +import { calculateContentBounds } from "./calculateContentBounds"; +import { envMaps } from "./env-maps"; +import { FormIteration } from "./FormIteration"; +import { MMLSourceDefinition } from "./MMLSourceDefinition"; +import { parseXYZ } from "./parseXYZ"; +import { setDebugGlobals } from "./setDebugGlobals"; +import { + ambientLightColorField, + ambientLightField, + backgroundColorField, + cameraFitContents, + cameraFovField, + cameraLookAtField, + cameraModeField, + cameraOrbitDistanceField, + cameraOrbitPitchField, + cameraOrbitSpeedField, + cameraPositionField, + environmentMapField, +} from "./ui/fields"; + +export class PlayCanvasModeInternal { + private disposed = false; + public readonly type = "playcanvas"; + private environmentMap: string | null = null; + + private loadedState: { + mmlNetworkSource: MMLNetworkSource; + graphicsAdapter: StandalonePlayCanvasAdapter; + fullScreenMMLScene: FullScreenMMLScene; + statusUI: StatusUI; + } | null = null; + + constructor( + private windowTarget: Window, + private targetForWrappers: HTMLElement, + private mmlSourceDefinition: MMLSourceDefinition, + private formIteration: FormIteration, + ) { + this.init(); + } + + private async init() { + const fullScreenMMLScene = new FullScreenMMLScene(); + document.body.append(fullScreenMMLScene.element); + const graphicsAdapter = await StandalonePlayCanvasAdapter.create(fullScreenMMLScene.element, { + controlsType: StandalonePlayCanvasAdapterControlsType.DragFly, + }); + + if (this.disposed) { + graphicsAdapter.dispose(); + return; + } + + fullScreenMMLScene.init(graphicsAdapter); + const statusUI = new StatusUI(); + const mmlNetworkSource = MMLNetworkSource.create({ + mmlScene: fullScreenMMLScene, + statusUpdated: (status: NetworkedDOMWebsocketStatus) => { + if (status === NetworkedDOMWebsocketStatus.Connected) { + statusUI.setNoStatus(); + } else { + statusUI.setStatus(NetworkedDOMWebsocketStatus[status]); + } + }, + url: this.mmlSourceDefinition.url, + windowTarget: this.windowTarget, + targetForWrappers: this.targetForWrappers, + }); + setDebugGlobals({ + mmlScene: fullScreenMMLScene, + remoteDocumentWrapper: mmlNetworkSource.remoteDocumentWrapper, + }); + const loadingCallback = () => { + const [, completedLoading] = fullScreenMMLScene.getLoadingProgressManager().toRatio(); + if (completedLoading) { + fullScreenMMLScene.getLoadingProgressManager().removeProgressCallback(loadingCallback); + + const fitContent = this.formIteration.getFieldValue(cameraFitContents); + if (fitContent === "true") { + graphicsAdapter.controls?.fitContent(calculateContentBounds(this.targetForWrappers)); + } + } + }; + fullScreenMMLScene.getLoadingProgressManager().addProgressCallback(loadingCallback); + this.loadedState = { + mmlNetworkSource, + graphicsAdapter, + fullScreenMMLScene, + statusUI, + }; + this.update(this.formIteration); + } + + update(formIteration: FormIteration) { + this.formIteration = formIteration; + if (!this.loadedState) { + return; + } + + const graphicsAdapter = this.loadedState.graphicsAdapter; + const playcanvasScene = graphicsAdapter.getPlayCanvasApp().scene; + const cameraEntity = graphicsAdapter.getCamera(); + const cameraComponent = cameraEntity.camera as playcanvas.CameraComponent; + this.setBackgroundColor(formIteration, cameraComponent); + this.setAmbientLight(formIteration, playcanvasScene); + this.setEnvironmentMap(formIteration, graphicsAdapter.getPlayCanvasApp(), playcanvasScene); + + this.setCameraMode(formIteration, graphicsAdapter); + + formIteration.completed(); + } + + private setEnvironmentMap( + formIteration: FormIteration, + playCanvasApp: playcanvas.AppBase, + playcanvasScene: playcanvas.Scene, + ) { + let environmentMap = formIteration.getFieldValue(environmentMapField); + const foundEnvMap = envMaps[environmentMap]; + if (foundEnvMap) { + environmentMap = foundEnvMap.url; + } + if (!environmentMap) { + // @ts-expect-error - PlayCanvas types don't accept null, but it works + playcanvasScene.envAtlas = null; + // @ts-expect-error - PlayCanvas types don't accept null, but it works + playcanvasScene.skybox = null; + this.environmentMap = null; + return; + } + if (environmentMap === this.environmentMap) { + return; + } + + const envMapAsset = new playcanvas.Asset("env-atlas", "texture", { url: environmentMap }); + playCanvasApp.assets.add(envMapAsset); + playCanvasApp.assets.load(envMapAsset); + + const onEnvMapAssetLoad = (texture: playcanvas.Texture) => { + const skybox = playcanvas.EnvLighting.generateSkyboxCubemap(texture); + const lighting = playcanvas.EnvLighting.generateLightingSource(texture); + const envAtlas = playcanvas.EnvLighting.generateAtlas(lighting, {}); + lighting.destroy(); + playcanvasScene.envAtlas = envAtlas; + playcanvasScene.skybox = skybox; + playcanvasScene.skyboxLuminance = 50000; + }; + + if (envMapAsset.loaded) { + onEnvMapAssetLoad(envMapAsset.resource); + } else { + envMapAsset.on("load", (envMapAsset: playcanvas.Asset) => { + onEnvMapAssetLoad(envMapAsset.resource); + }); + } + } + + private setAmbientLight(formIteration: FormIteration, playcanvasScene: playcanvas.Scene) { + const ambientLightIntensityString = formIteration.getFieldValue(ambientLightField) || "0"; + const ambientLightColorString = formIteration.getFieldValue(ambientLightColorField); + let ambientLightIntensity = parseFloat(ambientLightIntensityString); + if (isNaN(ambientLightIntensity)) { + ambientLightIntensity = 0; + } + if (ambientLightIntensity < 0) { + playcanvasScene.ambientLuminance = 0; + playcanvasScene.ambientLight = new playcanvas.Color(0, 0, 0); + } else { + const color = parseColorAttribute(ambientLightColorString, { + r: 1, + g: 1, + b: 1, + }); + playcanvasScene.ambientLuminance = ambientLightIntensity * 20; + playcanvasScene.ambientLight = new playcanvas.Color( + color.r * ambientLightIntensity * 20, + color.g * ambientLightIntensity * 20, + color.b * ambientLightIntensity * 20, + ); + } + } + + private setBackgroundColor( + formIteration: FormIteration, + cameraComponent: playcanvas.CameraComponent, + ) { + const backgroundColor = formIteration.getFieldValue(backgroundColorField); + if (!backgroundColor) { + cameraComponent.clearColor = new playcanvas.Color(0, 0, 0, 0); + return; + } + const color = parseColorAttribute(backgroundColor, { + r: 0, + g: 0, + b: 0, + a: 0, + }); + cameraComponent.clearColor = new playcanvas.Color(color.r, color.g, color.b, color.a); + } + + private setCameraMode( + formIteration: FormIteration, + graphicsAdapter: StandalonePlayCanvasAdapter, + ) { + let cameraFOV = parseFloat(formIteration.getFieldValue(cameraFovField)); + if (isNaN(cameraFOV)) { + cameraFOV = 75; + } + graphicsAdapter.setCameraFOV(cameraFOV); + + const cameraMode = formIteration.getFieldValue(cameraModeField); + if (cameraMode === "orbit") { + if (graphicsAdapter.controls?.type !== "orbit") { + graphicsAdapter.setControlsType(StandalonePlayCanvasAdapterControlsType.Orbit); + } + const controls = graphicsAdapter.controls as PlayCanvasOrbitCameraControls; + let orbitSpeed = parseFloat(formIteration.getFieldValue(cameraOrbitSpeedField)); + if (isNaN(orbitSpeed)) { + orbitSpeed = 0; + } + controls.setDegreesPerSecond(orbitSpeed); + let orbitPitch = parseFloat(formIteration.getFieldValue(cameraOrbitPitchField)); + + if (isNaN(orbitPitch)) { + orbitPitch = 0; + } + controls.setPitchDegrees(orbitPitch); + + const fitContent = formIteration.getFieldValue(cameraFitContents); + if (fitContent === "true") { + controls.fitContent(calculateContentBounds(this.targetForWrappers)); + } else { + const lookAt = parseXYZ(formIteration.getFieldValue(cameraLookAtField)); + controls.setLookAt(lookAt[0], lookAt[1], lookAt[2]); + + let orbitDistance = parseFloat(formIteration.getFieldValue(cameraOrbitDistanceField)); + if (isNaN(orbitDistance)) { + orbitDistance = 1; + } + controls.setDistance(orbitDistance); + } + } else if (cameraMode === "drag-fly") { + if (graphicsAdapter.controls?.type !== "drag-fly") { + graphicsAdapter.setControlsType(StandalonePlayCanvasAdapterControlsType.DragFly); + } + const controls = graphicsAdapter.controls as PlayCanvasDragFlyCameraControls; + + const cameraPosition = parseXYZ(formIteration.getFieldValue(cameraPositionField)); + controls.setCameraPosition(cameraPosition[0], cameraPosition[1], cameraPosition[2]); + + const lookAt = parseXYZ(formIteration.getFieldValue(cameraLookAtField)); + controls.setLookAt(lookAt[0], lookAt[1], lookAt[2]); + + const fitContent = formIteration.getFieldValue(cameraFitContents); + if (fitContent === "true") { + controls.fitContent(calculateContentBounds(this.targetForWrappers)); + } + } else if (cameraMode === "none" && graphicsAdapter.controls !== null) { + graphicsAdapter.setControlsType(StandalonePlayCanvasAdapterControlsType.None); + } + } + + public dispose() { + this.disposed = true; + if (this.loadedState) { + this.loadedState.mmlNetworkSource.dispose(); + this.loadedState.graphicsAdapter.dispose(); + this.loadedState.fullScreenMMLScene.dispose(); + this.loadedState.statusUI.dispose(); + this.loadedState = null; + } + } +} diff --git a/packages/mml-viewer/src/QueryParamState.test.ts b/packages/mml-viewer/src/QueryParamState.test.ts new file mode 100644 index 00000000..b257529e --- /dev/null +++ b/packages/mml-viewer/src/QueryParamState.test.ts @@ -0,0 +1,75 @@ +import { QueryParamState } from "./QueryParamState"; + +describe("QueryParamState", () => { + it("should parse query string into params", () => { + const queryParamState = new QueryParamState("foo=bar&baz=qux"); + expect(queryParamState.read("foo")).toBe("bar"); + expect(queryParamState.read("baz")).toBe("qux"); + }); + + it("should return null for non-existent param", () => { + const queryParamState = new QueryParamState("foo=bar"); + expect(queryParamState.read("baz")).toBeNull(); + }); + + it("should clone with additional params", () => { + const queryParamState = new QueryParamState("foo=bar"); + const newParams = new Map([["baz", "qux"]]); + const clonedState = queryParamState.cloneWithAdditionalParams(newParams); + expect(clonedState.read("foo")).toBe("bar"); + expect(clonedState.read("baz")).toBe("qux"); + }); + + it("should return unused params", () => { + const queryParamState = new QueryParamState("foo=bar&baz=qux"); + queryParamState.read("foo"); + const unusedParams = queryParamState.getUnusedParams(); + expect(unusedParams.has("baz")).toBe(true); + expect(unusedParams.has("foo")).toBe(false); + }); + + it("should convert params to string", () => { + const queryParamState = new QueryParamState("foo=bar&baz=qux"); + expect(queryParamState.toString()).toBe("foo=bar&baz=qux"); + }); + + it("should handle empty query string", () => { + const queryParamState = new QueryParamState(""); + expect(queryParamState.read("foo")).toBeNull(); + expect(queryParamState.getUnusedParams().size).toBe(0); + }); + + it("should handle Map input", () => { + const params = new Map([ + ["foo", "bar"], + ["baz", "qux"], + ]); + const queryParamState = new QueryParamState(params); + expect(queryParamState.read("foo")).toBe("bar"); + expect(queryParamState.read("baz")).toBe("qux"); + }); + + it("should handle keys and values with special characters", () => { + const queryParamState = new QueryParamState("foo%20bar=baz%20qux&key%3Dvalue=val%3Due"); + expect(queryParamState.read("foo bar")).toBe("baz qux"); + expect(queryParamState.read("key=value")).toBe("val=ue"); + }); + + it("should handle keys and values with encoded characters", () => { + const queryParamState = new QueryParamState("foo%26bar=baz%26qux&key%3Fvalue=val%3Fue"); + expect(queryParamState.read("foo&bar")).toBe("baz&qux"); + expect(queryParamState.read("key?value")).toBe("val?ue"); + }); + + it("should handle keys and values with spaces", () => { + const queryParamState = new QueryParamState("foo%20bar=baz%20qux&key%20value=val%20ue"); + expect(queryParamState.read("foo bar")).toBe("baz qux"); + expect(queryParamState.read("key value")).toBe("val ue"); + }); + + it("should handle keys and values with plus signs", () => { + const queryParamState = new QueryParamState("foo+bar=baz+qux&key+value=val+ue"); + expect(queryParamState.read("foo bar")).toBe("baz qux"); + expect(queryParamState.read("key value")).toBe("val ue"); + }); +}); diff --git a/packages/mml-viewer/src/QueryParamState.ts b/packages/mml-viewer/src/QueryParamState.ts new file mode 100644 index 00000000..4dd27341 --- /dev/null +++ b/packages/mml-viewer/src/QueryParamState.ts @@ -0,0 +1,41 @@ +export class QueryParamState { + private params: Map = new Map(); + private usedParams: Set = new Set(); + + constructor(arg: string | Map = new Map()) { + if (typeof arg === "string") { + this.params = new Map(new URLSearchParams(arg)); + } else { + this.params = new Map(arg); + } + } + + public cloneWithAdditionalParams(params: Map): QueryParamState { + const newParams = new Map(this.params); + params.forEach((value, key) => { + newParams.set(key, value); + }); + return new QueryParamState(newParams); + } + + public read(key: string): string | null { + this.usedParams.add(key); + return this.params.get(key) ?? null; + } + + public getUnusedParams(): Set { + const unusedParams = new Set(this.params.keys()); + this.usedParams.forEach((key) => { + unusedParams.delete(key); + }); + return unusedParams; + } + + public toString(): string { + const searchParams = new URLSearchParams(); + this.params.forEach((value, key) => { + searchParams.set(key, value); + }); + return searchParams.toString(); + } +} diff --git a/packages/mml-viewer/src/StandaloneViewer.ts b/packages/mml-viewer/src/StandaloneViewer.ts new file mode 100644 index 00000000..40292af7 --- /dev/null +++ b/packages/mml-viewer/src/StandaloneViewer.ts @@ -0,0 +1,95 @@ +import { parseBoolAttribute } from "@mml-io/mml-web"; + +import { FormIteration } from "./FormIteration"; +import { GraphicsMode } from "./GraphicsMode"; +import { MMLSourceDefinition } from "./MMLSourceDefinition"; +import { PlayCanvasMode } from "./PlayCanvasMode"; +import { QueryParamState } from "./QueryParamState"; +import { TagsMode } from "./TagsMode"; +import { ThreeJSMode } from "./ThreeJSMode"; +import { rendererField, urlField } from "./ui/fields"; +import { ViewerUI } from "./ui/ViewerUI"; + +export class StandaloneViewer { + private viewerUI = new ViewerUI(); + private graphicsMode: GraphicsMode | null = null; + private formIteration: FormIteration | null = null; + private source: MMLSourceDefinition | null = null; + + constructor( + private windowTarget: Window, + private targetForWrappers: HTMLElement, + ) { + window.addEventListener("popstate", () => { + this.handleParams(); + }); + this.handleParams(); + } + + private handleParams() { + const queryParamState = new QueryParamState(window.location.search); + const formIteration = new FormIteration(queryParamState, this.viewerUI, this.formIteration); + this.formIteration = formIteration; + + const url = formIteration.getFieldValue(urlField); + const renderer = formIteration.getFieldValue(rendererField); + const noUI = parseBoolAttribute(queryParamState.read("noUI"), false); + if (noUI) { + this.viewerUI.hide(); + } else { + this.viewerUI.show(); + } + + let source: MMLSourceDefinition; + if (url) { + source = { url }; + if (this.source && this.source.url !== url) { + if (this.graphicsMode) { + this.graphicsMode.dispose(); + this.graphicsMode = null; + } + } + this.source = source; + } else { + if (this.graphicsMode) { + this.graphicsMode.dispose(); + this.graphicsMode = null; + } + this.viewerUI.showAddressMenu(); + this.formIteration.completed(); + return; + } + this.viewerUI.hideAddressMenu(); + + if (this.graphicsMode && this.graphicsMode.type !== renderer) { + this.graphicsMode.dispose(); + this.graphicsMode = null; + } + if (!this.graphicsMode) { + if (renderer === "playcanvas") { + this.graphicsMode = new PlayCanvasMode( + this.windowTarget, + this.targetForWrappers, + source, + formIteration, + ); + } else if (renderer === "threejs") { + this.graphicsMode = new ThreeJSMode( + this.windowTarget, + this.targetForWrappers, + source, + formIteration, + ); + } else if (renderer === "tags") { + this.graphicsMode = new TagsMode( + this.windowTarget, + this.targetForWrappers, + source, + formIteration, + ); + } + } else { + this.graphicsMode.update(formIteration); + } + } +} diff --git a/packages/mml-viewer/src/TagsMode.ts b/packages/mml-viewer/src/TagsMode.ts new file mode 100644 index 00000000..e9880eee --- /dev/null +++ b/packages/mml-viewer/src/TagsMode.ts @@ -0,0 +1,86 @@ +import { + FullScreenMMLScene, + MMLNetworkSource, + NetworkedDOMWebsocketStatus, + StandaloneTagDebugAdapter, +} from "@mml-io/mml-web"; +import { StatusUI } from "@mml-io/mml-web"; + +import { FormIteration } from "./FormIteration"; +import { GraphicsMode } from "./GraphicsMode"; +import { MMLSourceDefinition } from "./MMLSourceDefinition"; +import { setDebugGlobals } from "./setDebugGlobals"; + +export class TagsMode implements GraphicsMode { + private disposed = false; + + private loadedState: { + mmlNetworkSource: MMLNetworkSource; + graphicsAdapter: StandaloneTagDebugAdapter; + fullScreenMMLScene: FullScreenMMLScene; + statusUI: StatusUI; + } | null = null; + + constructor( + private windowTarget: Window, + private targetForWrappers: HTMLElement, + private mmlSourceDefinition: MMLSourceDefinition, + private formIteration: FormIteration, + ) { + this.init(); + } + + public readonly type = "tags"; + + private async init() { + const fullScreenMMLScene = new FullScreenMMLScene(); + document.body.append(fullScreenMMLScene.element); + const graphicsAdapter = await StandaloneTagDebugAdapter.create(fullScreenMMLScene.element); + if (this.disposed) { + graphicsAdapter.dispose(); + return; + } + + fullScreenMMLScene.init(graphicsAdapter); + const statusUI = new StatusUI(); + const mmlNetworkSource = MMLNetworkSource.create({ + mmlScene: fullScreenMMLScene, + statusUpdated: (status: NetworkedDOMWebsocketStatus) => { + if (status === NetworkedDOMWebsocketStatus.Connected) { + statusUI.setNoStatus(); + } else { + statusUI.setStatus(NetworkedDOMWebsocketStatus[status]); + } + }, + url: this.mmlSourceDefinition.url, + windowTarget: this.windowTarget, + targetForWrappers: this.targetForWrappers, + }); + setDebugGlobals({ + mmlScene: fullScreenMMLScene, + remoteDocumentWrapper: mmlNetworkSource.remoteDocumentWrapper, + }); + this.loadedState = { + mmlNetworkSource, + graphicsAdapter, + fullScreenMMLScene, + statusUI, + }; + this.update(this.formIteration); + } + + public dispose() { + this.disposed = true; + if (this.loadedState) { + this.loadedState.mmlNetworkSource.dispose(); + this.loadedState.graphicsAdapter.dispose(); + this.loadedState.fullScreenMMLScene.dispose(); + this.loadedState.statusUI.dispose(); + this.loadedState = null; + } + } + + update(formIteration: FormIteration) { + formIteration.completed(); + } +} diff --git a/packages/mml-viewer/src/ThreeJSMode.ts b/packages/mml-viewer/src/ThreeJSMode.ts new file mode 100644 index 00000000..96f603cf --- /dev/null +++ b/packages/mml-viewer/src/ThreeJSMode.ts @@ -0,0 +1,50 @@ +import { FormIteration } from "./FormIteration"; +import { GraphicsMode } from "./GraphicsMode"; +import { MMLSourceDefinition } from "./MMLSourceDefinition"; + +export class ThreeJSMode implements GraphicsMode { + private disposed = false; + private internalMode: GraphicsMode | null = null; + + public readonly type = "threejs"; + + constructor( + private windowTarget: Window, + private targetForWrappers: HTMLElement, + private mmlSource: MMLSourceDefinition, + private formIteration: FormIteration, + ) { + this.init(); + } + + private async init() { + this.internalMode = await (async () => { + const { ThreeJSModeInternal } = await import("./ThreeJSModeInternal"); + return new ThreeJSModeInternal( + this.windowTarget, + this.targetForWrappers, + this.mmlSource, + this.formIteration, + ); + })(); + if (this.disposed) { + this.dispose(); + return; + } + } + + public dispose() { + this.disposed = true; + if (this.internalMode) { + this.internalMode.dispose(); + } + } + + update(formIteration: FormIteration) { + this.formIteration = formIteration; + if (!this.internalMode) { + return; + } + this.internalMode.update(formIteration); + } +} diff --git a/packages/mml-viewer/src/ThreeJSModeInternal.ts b/packages/mml-viewer/src/ThreeJSModeInternal.ts new file mode 100644 index 00000000..06b76331 --- /dev/null +++ b/packages/mml-viewer/src/ThreeJSModeInternal.ts @@ -0,0 +1,283 @@ +import { + FullScreenMMLScene, + MMLNetworkSource, + NetworkedDOMWebsocketStatus, + parseColorAttribute, +} from "@mml-io/mml-web"; +import { StatusUI } from "@mml-io/mml-web"; +import { + StandaloneThreeJSAdapter, + StandaloneThreeJSAdapterControlsType, + ThreeJSDragFlyCameraControls, + ThreeJSOrbitCameraControls, +} from "@mml-io/mml-web-threejs-standalone"; +import { HDRJPGLoader } from "@monogrid/gainmap-js"; +import * as THREE from "three"; + +import { calculateContentBounds } from "./calculateContentBounds"; +import { envMaps } from "./env-maps"; +import { FormIteration } from "./FormIteration"; +import { MMLSourceDefinition } from "./MMLSourceDefinition"; +import { parseXYZ } from "./parseXYZ"; +import { setDebugGlobals } from "./setDebugGlobals"; +import { + ambientLightColorField, + ambientLightField, + backgroundColorField, + cameraFitContents, + cameraFovField, + cameraLookAtField, + cameraModeField, + cameraOrbitDistanceField, + cameraOrbitPitchField, + cameraOrbitSpeedField, + cameraPositionField, + environmentMapField, +} from "./ui/fields"; + +export class ThreeJSModeInternal { + private disposed = false; + + private loadedState: { + mmlNetworkSource: MMLNetworkSource; + graphicsAdapter: StandaloneThreeJSAdapter; + fullScreenMMLScene: FullScreenMMLScene; + statusUI: StatusUI; + } | null = null; + + private ambientLight: THREE.AmbientLight | null = null; + + public readonly type = "three"; + private environmentMap: string | null = null; + + constructor( + private windowTarget: Window, + private targetForWrappers: HTMLElement, + private mmlSourceDefinition: MMLSourceDefinition, + private formIteration: FormIteration, + ) { + this.init(); + } + + private async init() { + const fullScreenMMLScene = new FullScreenMMLScene(); + document.body.append(fullScreenMMLScene.element); + const graphicsAdapter = await StandaloneThreeJSAdapter.create(fullScreenMMLScene.element, { + controlsType: StandaloneThreeJSAdapterControlsType.DragFly, + }); + if (this.disposed) { + graphicsAdapter.dispose(); + return; + } + + fullScreenMMLScene.init(graphicsAdapter); + const statusUI = new StatusUI(); + const mmlNetworkSource = MMLNetworkSource.create({ + mmlScene: fullScreenMMLScene, + statusUpdated: (status: NetworkedDOMWebsocketStatus) => { + if (status === NetworkedDOMWebsocketStatus.Connected) { + statusUI.setNoStatus(); + } else { + statusUI.setStatus(NetworkedDOMWebsocketStatus[status]); + } + }, + url: this.mmlSourceDefinition.url, + windowTarget: this.windowTarget, + targetForWrappers: this.targetForWrappers, + }); + setDebugGlobals({ + mmlScene: fullScreenMMLScene, + remoteDocumentWrapper: mmlNetworkSource.remoteDocumentWrapper, + }); + const loadingCallback = () => { + const [, completedLoading] = fullScreenMMLScene.getLoadingProgressManager().toRatio(); + if (completedLoading) { + fullScreenMMLScene.getLoadingProgressManager().removeProgressCallback(loadingCallback); + + const fitContent = this.formIteration.getFieldValue(cameraFitContents); + if (fitContent === "true") { + graphicsAdapter.controls?.fitContent(calculateContentBounds(this.targetForWrappers)); + } + } + }; + fullScreenMMLScene.getLoadingProgressManager().addProgressCallback(loadingCallback); + this.loadedState = { + mmlNetworkSource, + graphicsAdapter, + fullScreenMMLScene, + statusUI, + }; + this.update(this.formIteration); + } + + update(formIteration: FormIteration) { + this.formIteration = formIteration; + if (!this.loadedState) { + return; + } + + const graphicsAdapter = this.loadedState.graphicsAdapter; + const threeScene = graphicsAdapter.getThreeScene(); + const threeRenderer = graphicsAdapter.getRenderer(); + + this.setBackgroundColor(formIteration, threeRenderer); + this.setAmbientLight(formIteration, threeScene); + this.setAmbientLightColor(formIteration); + this.setEnvironmentMap(formIteration, threeRenderer, threeScene); + + this.setCameraMode(formIteration, graphicsAdapter); + + formIteration.completed(); + } + + private setEnvironmentMap( + formIteration: FormIteration, + threeRenderer: THREE.WebGLRenderer, + threeScene: THREE.Scene, + ) { + let environmentMap = formIteration.getFieldValue(environmentMapField); + const foundEnvMap = envMaps[environmentMap]; + if (foundEnvMap) { + environmentMap = foundEnvMap.url; + } + if (!environmentMap) { + threeScene.environment = null; + threeScene.background = null; + this.environmentMap = null; + return; + } + if (environmentMap === this.environmentMap) { + return; + } + + const pmremGenerator = new THREE.PMREMGenerator(threeRenderer); + const loader = new HDRJPGLoader(threeRenderer); + loader.loadAsync(environmentMap).then((result) => { + const hdrJpg = result.renderTarget.texture; + hdrJpg.mapping = THREE.EquirectangularReflectionMapping; + + const envMap = pmremGenerator.fromEquirectangular(hdrJpg).texture; + threeScene.backgroundIntensity = 1; + threeScene.backgroundBlurriness = 0; + threeScene.backgroundRotation = new THREE.Euler(0, -Math.PI / 2, 0); + threeScene.background = envMap; + threeScene.environment = envMap; + result.dispose(); + }); + } + + private setAmbientLightColor(formIteration: FormIteration) { + const ambientLightColorString = formIteration.getFieldValue(ambientLightColorField); + const color = parseColorAttribute(ambientLightColorString, { + r: 1, + g: 1, + b: 1, + }); + if (this.ambientLight) { + this.ambientLight.color.setRGB(color.r, color.g, color.b); + } + } + + private setAmbientLight(formIteration: FormIteration, threeScene: THREE.Scene) { + const ambientLightIntensityString = formIteration.getFieldValue(ambientLightField); + let ambientLightIntensity = parseFloat(ambientLightIntensityString); + if (isNaN(ambientLightIntensity)) { + ambientLightIntensity = 0; + } + if (ambientLightIntensity < 0) { + ambientLightIntensity = 0; + } + if (this.ambientLight && ambientLightIntensity <= 0) { + this.ambientLight.removeFromParent(); + this.ambientLight = null; + } + if (!this.ambientLight && ambientLightIntensity > 0) { + this.ambientLight = new THREE.AmbientLight(0xffffff, ambientLightIntensity); + threeScene.add(this.ambientLight); + } else if (this.ambientLight) { + this.ambientLight.intensity = ambientLightIntensity; + } + } + + private setBackgroundColor(formIteration: FormIteration, threeRenderer: THREE.WebGLRenderer) { + const backgroundColorString = formIteration.getFieldValue(backgroundColorField); + const color = parseColorAttribute(backgroundColorString, { + r: 1, + g: 1, + b: 1, + a: 0, + }); + threeRenderer.setClearColor(new THREE.Color(color.r, color.g, color.b), color.a); + } + + public dispose() { + this.disposed = true; + if (this.loadedState) { + this.loadedState.mmlNetworkSource.dispose(); + this.loadedState.graphicsAdapter.dispose(); + this.loadedState.fullScreenMMLScene.dispose(); + this.loadedState.statusUI.dispose(); + this.loadedState = null; + } + } + + private setCameraMode(formIteration: FormIteration, graphicsAdapter: StandaloneThreeJSAdapter) { + let cameraFOV = parseFloat(formIteration.getFieldValue(cameraFovField)); + if (isNaN(cameraFOV)) { + cameraFOV = 75; + } + graphicsAdapter.setCameraFOV(cameraFOV); + + const cameraMode = formIteration.getFieldValue(cameraModeField); + if (cameraMode === "orbit") { + if (graphicsAdapter.controls?.type !== "orbit") { + graphicsAdapter.setControlsType(StandaloneThreeJSAdapterControlsType.Orbit); + } + const controls = graphicsAdapter.controls as ThreeJSOrbitCameraControls; + let orbitSpeed = parseFloat(formIteration.getFieldValue(cameraOrbitSpeedField)); + if (isNaN(orbitSpeed)) { + orbitSpeed = 0; + } + controls.setDegreesPerSecond(orbitSpeed); + + let orbitPitch = parseFloat(formIteration.getFieldValue(cameraOrbitPitchField)); + + if (isNaN(orbitPitch)) { + orbitPitch = 0; + } + controls.setPitchDegrees(orbitPitch); + + const fitContent = formIteration.getFieldValue(cameraFitContents); + if (fitContent === "true") { + controls.fitContent(calculateContentBounds(this.targetForWrappers)); + } else { + const lookAt = parseXYZ(formIteration.getFieldValue(cameraLookAtField)); + controls.setLookAt(lookAt[0], lookAt[1], lookAt[2]); + + let orbitDistance = parseFloat(formIteration.getFieldValue(cameraOrbitDistanceField)); + if (isNaN(orbitDistance)) { + orbitDistance = 1; + } + controls.setDistance(orbitDistance); + } + } else if (cameraMode === "drag-fly") { + if (graphicsAdapter.controls?.type !== "drag-fly") { + graphicsAdapter.setControlsType(StandaloneThreeJSAdapterControlsType.DragFly); + } + const controls = graphicsAdapter.controls as ThreeJSDragFlyCameraControls; + + const cameraPosition = parseXYZ(formIteration.getFieldValue(cameraPositionField)); + controls.setCameraPosition(cameraPosition[0], cameraPosition[1], cameraPosition[2]); + + const lookAt = parseXYZ(formIteration.getFieldValue(cameraLookAtField)); + controls.setLookAt(lookAt[0], lookAt[1], lookAt[2]); + + const fitContent = formIteration.getFieldValue(cameraFitContents); + if (fitContent === "true") { + controls.fitContent(calculateContentBounds(this.targetForWrappers)); + } + } else if (cameraMode === "none" && graphicsAdapter.controls !== null) { + graphicsAdapter.setControlsType(StandaloneThreeJSAdapterControlsType.None); + } + } +} diff --git a/packages/mml-viewer/src/calculateContentBounds.ts b/packages/mml-viewer/src/calculateContentBounds.ts new file mode 100644 index 00000000..bf89f10f --- /dev/null +++ b/packages/mml-viewer/src/calculateContentBounds.ts @@ -0,0 +1,60 @@ +import { IVect3, TransformableElement } from "@mml-io/mml-web"; + +export function calculateContentBounds(rootElement: Element): { min: IVect3; max: IVect3 } { + let minX: number | null = null; + let minY: number | null = null; + let minZ: number | null = null; + let maxX: number | null = null; + let maxY: number | null = null; + let maxZ: number | null = null; + const traverse = (element: ChildNode) => { + if (element instanceof TransformableElement) { + const bounds = element.getContentBounds(); + if (bounds) { + bounds.getCorners().forEach((corner) => { + if (minX === null || corner.x < minX) { + minX = corner.x; + } + if (minY === null || corner.y < minY) { + minY = corner.y; + } + if (minZ === null || corner.z < minZ) { + minZ = corner.z; + } + if (maxX === null || corner.x > maxX) { + maxX = corner.x; + } + if (maxY === null || corner.y > maxY) { + maxY = corner.y; + } + if (maxZ === null || corner.z > maxZ) { + maxZ = corner.z; + } + }); + } + } + element.childNodes.forEach((child) => { + traverse(child); + }); + }; + traverse(rootElement); + if ( + minX === null || + minY === null || + minZ === null || + maxX === null || + maxY === null || + maxZ === null + ) { + // Return a default bounding box if no content was found + return { + min: { x: -0.5, y: -0.5, z: -0.5 }, + max: { x: 0.5, y: 0.5, z: 0.5 }, + }; + } + + return { + min: { x: minX, y: minY, z: minZ }, + max: { x: maxX, y: maxY, z: maxZ }, + }; +} diff --git a/packages/mml-viewer/src/declaration.d.ts b/packages/mml-viewer/src/declaration.d.ts new file mode 100644 index 00000000..d049c644 --- /dev/null +++ b/packages/mml-viewer/src/declaration.d.ts @@ -0,0 +1,20 @@ +// For CSS +declare module "*.css" { + const classes: { [key: string]: string }; + export default classes; +} + +declare module "*.jpg" { + const filePath: string; + export default filePath; +} + +declare module "*.hdr" { + const filePath: string; + export default filePath; +} + +declare module "*.svg" { + const filePath: string; + export default filePath; +} diff --git a/packages/mml-viewer/src/env-maps/cloudysky_2k.jpg b/packages/mml-viewer/src/env-maps/cloudysky_2k.jpg new file mode 100644 index 00000000..10f8a67c Binary files /dev/null and b/packages/mml-viewer/src/env-maps/cloudysky_2k.jpg differ diff --git a/packages/mml-viewer/src/env-maps/index.ts b/packages/mml-viewer/src/env-maps/index.ts new file mode 100644 index 00000000..521a16de --- /dev/null +++ b/packages/mml-viewer/src/env-maps/index.ts @@ -0,0 +1,15 @@ +type EnvMap = { + name: string; + url: string; +}; + +import cloudysky from "./cloudysky_2k.jpg"; + +export const envMaps: { + [key: string]: EnvMap; +} = { + cloudysky: { + name: "Cloudy Sky", + url: cloudysky, + }, +}; diff --git a/packages/mml-viewer/src/index.ts b/packages/mml-viewer/src/index.ts new file mode 100644 index 00000000..62e54f97 --- /dev/null +++ b/packages/mml-viewer/src/index.ts @@ -0,0 +1,37 @@ +import { IframeWrapper, registerCustomElementsToWindow } from "@mml-io/mml-web"; + +import { StandaloneViewer } from "./StandaloneViewer"; + +declare global { + interface Window { + "mml-viewer": StandaloneViewer; + } +} + +window.addEventListener("load", () => { + (async () => { + const { iframeWindow, iframeBody } = await IframeWrapper.create(); + const windowTarget = iframeWindow; + const targetForWrappers = iframeBody; + registerCustomElementsToWindow(windowTarget); + + /* + Add a transparent pixel with a backdrop filter to force the background to + be white in Chrome (and potentially other browsers). Without this the + background is grey unless the menu UI is opened. + */ + const transparentPixel = document.createElement("div"); + transparentPixel.style.width = "1px"; + transparentPixel.style.height = "1px"; + transparentPixel.style.position = "absolute"; + transparentPixel.style.top = "1px"; + transparentPixel.style.left = "1px"; + transparentPixel.style.userSelect = "none"; + transparentPixel.style.pointerEvents = "none"; + transparentPixel.style.backdropFilter = "blur(1px)"; + document.body.append(transparentPixel); + + const standaloneViewer = new StandaloneViewer(windowTarget, targetForWrappers); + window["mml-viewer"] = standaloneViewer; + })(); +}); diff --git a/packages/mml-viewer/src/parseXYZ.ts b/packages/mml-viewer/src/parseXYZ.ts new file mode 100644 index 00000000..5b7bb5ba --- /dev/null +++ b/packages/mml-viewer/src/parseXYZ.ts @@ -0,0 +1,8 @@ +export function parseXYZ(str: string): [number, number, number] { + const asNumbers = str + .split(",") + .slice(0, 3) + .map(parseFloat) + .map((v) => (isNaN(v) ? 0 : v)) as [number, number, number]; + return [asNumbers[0] || 0, asNumbers[1] || 0, asNumbers[2] || 0]; +} diff --git a/packages/mml-viewer/src/setDebugGlobals.ts b/packages/mml-viewer/src/setDebugGlobals.ts new file mode 100644 index 00000000..02231f74 --- /dev/null +++ b/packages/mml-viewer/src/setDebugGlobals.ts @@ -0,0 +1,28 @@ +import { + GraphicsAdapter, + MMLScene, + RemoteDocumentWrapper, + StandaloneGraphicsAdapter, +} from "@mml-io/mml-web"; + +declare global { + interface Window { + "mml-web-client": { + mmlScene: MMLScene; + remoteDocumentWrapper: RemoteDocumentWrapper; + }; + } +} + +export function setDebugGlobals({ + mmlScene, + remoteDocumentWrapper, +}: { + mmlScene: MMLScene; + remoteDocumentWrapper: RemoteDocumentWrapper; +}) { + window["mml-web-client"] = { + mmlScene, + remoteDocumentWrapper, + }; +} diff --git a/packages/mml-viewer/src/static/favicon.svg b/packages/mml-viewer/src/static/favicon.svg new file mode 100644 index 00000000..764c3f79 --- /dev/null +++ b/packages/mml-viewer/src/static/favicon.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/packages/mml-viewer/src/static/index.html b/packages/mml-viewer/src/static/index.html new file mode 100644 index 00000000..53ac154c --- /dev/null +++ b/packages/mml-viewer/src/static/index.html @@ -0,0 +1,10 @@ + + + + + MML Viewer + + + + + diff --git a/packages/mml-viewer/src/ui/FieldDefinition.ts b/packages/mml-viewer/src/ui/FieldDefinition.ts new file mode 100644 index 00000000..0c9730b9 --- /dev/null +++ b/packages/mml-viewer/src/ui/FieldDefinition.ts @@ -0,0 +1,14 @@ +export type FieldDefinition = { + readonly name: string; + readonly label: string; + readonly type: string; + readonly requireSubmission?: boolean; + readonly options?: string[]; + readonly defaultValue: string | number | boolean; + readonly groupDefinition: GroupDefinition; +}; + +export type GroupDefinition = { + readonly name: string; + readonly label: string; +}; diff --git a/packages/mml-viewer/src/ui/HideUISection.module.css b/packages/mml-viewer/src/ui/HideUISection.module.css new file mode 100644 index 00000000..a435bf43 --- /dev/null +++ b/packages/mml-viewer/src/ui/HideUISection.module.css @@ -0,0 +1,14 @@ +.hide-ui-section { + padding-left: 8px; + padding-right: 8px; +} + +.hide-ui-section-contents { + display: flex; + justify-content: space-between; + margin-bottom: 32px; +} + +.hidden { + display: none; +} diff --git a/packages/mml-viewer/src/ui/HideUISection.ts b/packages/mml-viewer/src/ui/HideUISection.ts new file mode 100644 index 00000000..7dcba156 --- /dev/null +++ b/packages/mml-viewer/src/ui/HideUISection.ts @@ -0,0 +1,55 @@ +import styles from "./HideUISection.module.css"; +import { setUrlParam } from "./setUrlParam"; +import sharedStyles from "./shared-styles.module.css"; +import tooltipStyles from "./tooltip.module.css"; + +export class HideUISection { + public readonly element: HTMLDivElement; + private hideUiButton: HTMLButtonElement; + private hideUiHeader: HTMLDivElement; + private hideUiSectionContents: HTMLDivElement; + + constructor() { + this.element = document.createElement("div"); + this.element.className = styles.hideUiSection; + + this.hideUiHeader = document.createElement("div"); + this.hideUiHeader.textContent = "Hide UI"; + this.hideUiHeader.className = sharedStyles.header; + this.element.append(this.hideUiHeader); + + this.hideUiSectionContents = document.createElement("div"); + this.hideUiSectionContents.className = styles.hideUiSectionContents; + this.element.append(this.hideUiSectionContents); + + this.hideUiButton = document.createElement("button"); + this.hideUiButton.className = sharedStyles.button; + this.hideUiButton.textContent = "Hide UI"; + this.hideUiButton.addEventListener("click", () => { + setUrlParam("noUI", "true"); + }); + this.hideUiSectionContents.append(this.hideUiButton); + + const warningIcon = document.createElement("span"); + warningIcon.className = tooltipStyles.tooltip; + warningIcon.setAttribute("data-direction", "left"); + const warningIconText = document.createElement("span"); + warningIconText.className = tooltipStyles.tooltipInitiator; + warningIconText.textContent = "⚠️"; + warningIcon.append(warningIconText); + const warningTooltip = document.createElement("span"); + warningTooltip.className = tooltipStyles.tooltipItem; + warningTooltip.textContent = + "If you hide the UI, it can only be shown again by removing the noUI parameter from the URL"; + warningIcon.append(warningTooltip); + this.hideUiSectionContents.append(warningIcon); + } + + show() { + this.element.classList.remove(styles.hidden); + } + + hide() { + this.element.classList.add(styles.hidden); + } +} diff --git a/packages/mml-viewer/src/ui/UIElement.ts b/packages/mml-viewer/src/ui/UIElement.ts new file mode 100644 index 00000000..07abdf55 --- /dev/null +++ b/packages/mml-viewer/src/ui/UIElement.ts @@ -0,0 +1,5 @@ +export class UIElement { + public readonly element = document.createElement("div"); + + dispose() {} +} diff --git a/packages/mml-viewer/src/ui/UIField.module.css b/packages/mml-viewer/src/ui/UIField.module.css new file mode 100644 index 00000000..d7e9393b --- /dev/null +++ b/packages/mml-viewer/src/ui/UIField.module.css @@ -0,0 +1,58 @@ +.ui-field { + flex: 1 1 0%; + display: flex; + background: rgb(85, 85, 85); + border-radius: 4px; + font-size: 14px; + box-sizing: border-box; + border: 1px solid transparent; + align-items: stretch; + position: relative; + padding: 16px 0px 3px; + margin-bottom: 5px; +} + +.label { + position: absolute; + top: 0; + left: 6px; + font-size: 11px; + display: block; + width: calc(100% - 16px); + cursor: text; + color: rgba(255, 255, 255, 0.5); + transition: 0.2s ease-in-out; + pointer-events: none; +} + +.label-focused { + color: rgba(255, 255, 255, 1); +} + +.text-input { + display: block; + width: 100%; + background: transparent; + padding: 0 6px; + border: none; + outline: none; + color: white; +} + +.select-input { + display: block; + width: 100%; + color: white; + text-align: left; + background: rgb(128, 128, 128); + border: none; + padding: 2px; + margin-left: 4px; + margin-right: 4px; + border-radius: 4px; +} + +.submit-button { + font-size: 11px; + margin-right: 2px; +} diff --git a/packages/mml-viewer/src/ui/UIField.ts b/packages/mml-viewer/src/ui/UIField.ts new file mode 100644 index 00000000..3754f70f --- /dev/null +++ b/packages/mml-viewer/src/ui/UIField.ts @@ -0,0 +1,129 @@ +import { FieldDefinition } from "./FieldDefinition"; +import { setUrlParam } from "./setUrlParam"; +import sharedStyles from "./shared-styles.module.css"; +import { UIElement } from "./UIElement"; +import styles from "./UIField.module.css"; +import { UIGroup } from "./UIGroup"; + +export class UIField extends UIElement { + private label: HTMLLabelElement; + private input?: HTMLInputElement; + + private selectElement?: HTMLSelectElement; + + private submitButton?: HTMLButtonElement; + + constructor( + public fieldDefinition: FieldDefinition, + public readonly group: UIGroup, + ) { + super(); + this.element.className = styles.uiField; + + this.label = document.createElement("label"); + this.label.className = styles.label; + this.label.textContent = fieldDefinition.label; + this.element.append(this.label); + + if (fieldDefinition.options) { + const selectElement = document.createElement("select"); + this.selectElement = selectElement; + this.selectElement.className = styles.selectInput; + + const unsetOption = document.createElement("option"); + unsetOption.textContent = "Unset (default: " + fieldDefinition.defaultValue + ")"; + unsetOption.value = ""; + this.selectElement.append(unsetOption); + this.element.append(this.selectElement); + + for (const option of fieldDefinition.options) { + const optionElement = document.createElement("option"); + optionElement.textContent = option; + this.selectElement.append(optionElement); + } + + if (fieldDefinition.requireSubmission) { + this.submitButton = document.createElement("button"); + this.submitButton.classList.add(sharedStyles.button, styles.submitButton); + this.submitButton.textContent = "Submit"; + this.submitButton.addEventListener("click", () => { + this.onChange(selectElement.value); + }); + this.element.append(this.submitButton); + } else { + this.selectElement.addEventListener("change", () => { + this.onChange(selectElement.value); + }); + } + } else { + const input = document.createElement("input"); + this.input = input; + this.input.className = styles.textInput; + this.input.placeholder = `Default: ${fieldDefinition.defaultValue.toString()}`; + this.input.addEventListener("focus", () => { + this.label.classList.add(styles.labelFocused); + }); + this.input.addEventListener("blur", () => { + this.label.classList.remove(styles.labelFocused); + }); + this.input.addEventListener("keydown", (event) => { + if (event.key === "Enter") { + this.onChange(input.value); + } + }); + if (fieldDefinition.type === "number") { + this.input.step = "0.01"; + this.input.type = "number"; + } else if (fieldDefinition.type === "color") { + this.input.type = "text"; + } else { + this.input.type = "text"; + } + this.element.append(this.input); + + if (fieldDefinition.requireSubmission) { + this.submitButton = document.createElement("button"); + this.submitButton.classList.add(sharedStyles.button, styles.submitButton); + this.submitButton.textContent = "Submit"; + this.submitButton.addEventListener("click", () => { + if (this.input) { + this.onChange(this.input.value); + } else if (this.selectElement) { + this.onChange(this.selectElement.value); + } + }); + this.element.append(this.submitButton); + } else { + if (this.input) { + const input = this.input; + this.input.addEventListener("input", () => { + this.onChange(input.value); + }); + } else if (this.selectElement) { + const selectElement = this.selectElement; + this.selectElement.addEventListener("change", () => { + this.onChange(selectElement.value); + }); + } + } + } + + const params = new URLSearchParams(window.location.search); + const value = params.get(fieldDefinition.name); + if (value) { + this.setValue(value); + } + } + + setValue(value: string) { + if (this.selectElement) { + this.selectElement.value = value; + } else if (this.input) { + this.input.value = value; + } + } + + onChange(value: string) { + setUrlParam(this.fieldDefinition.name, value); + } +} diff --git a/packages/mml-viewer/src/ui/UIGroup.module.css b/packages/mml-viewer/src/ui/UIGroup.module.css new file mode 100644 index 00000000..916de7d0 --- /dev/null +++ b/packages/mml-viewer/src/ui/UIGroup.module.css @@ -0,0 +1,5 @@ +.ui-group { + padding-left: 8px; + padding-right: 8px; +} + diff --git a/packages/mml-viewer/src/ui/UIGroup.ts b/packages/mml-viewer/src/ui/UIGroup.ts new file mode 100644 index 00000000..7f2cd574 --- /dev/null +++ b/packages/mml-viewer/src/ui/UIGroup.ts @@ -0,0 +1,60 @@ +import { GroupDefinition } from "./FieldDefinition"; +import { allFields } from "./fields"; +import sharedStyles from "./shared-styles.module.css"; +import { UIElement } from "./UIElement"; +import { UIField } from "./UIField"; +import styles from "./UIGroup.module.css"; + +export class UIGroup extends UIElement { + private header: HTMLDivElement; + private contents: HTMLDivElement; + + constructor(public readonly groupDefinition: GroupDefinition) { + super(); + this.element.className = styles.uiGroup; + this.header = document.createElement("div"); + this.header.className = sharedStyles.header; + this.header.textContent = groupDefinition.label; + this.element.append(this.header); + + this.contents = document.createElement("div"); + this.contents.className = styles.contents; + this.element.append(this.contents); + } + + private fields: Array = new Array(); + + addField(uiField: UIField) { + if (this.fields.includes(uiField)) { + return; + } + + this.fields.push(uiField); + this.fields.sort( + (a, b) => allFields.indexOf(a.fieldDefinition) - allFields.indexOf(b.fieldDefinition), + ); + const index = this.fields.indexOf(uiField); + if (index === this.fields.length - 1) { + this.contents.append(uiField.element); + } else { + const nextGroup = this.fields[index + 1]; + this.contents.insertBefore(uiField.element, nextGroup.element); + } + } + + removeField(uiField: UIField) { + this.fields = this.fields.filter((f) => f !== uiField); + this.contents.removeChild(uiField.element); + } + + dispose() { + for (const element of this.fields) { + element.dispose(); + } + this.fields = []; + } + + isEmpty() { + return this.fields.length === 0; + } +} diff --git a/packages/mml-viewer/src/ui/UnusedParameters.module.css b/packages/mml-viewer/src/ui/UnusedParameters.module.css new file mode 100644 index 00000000..9ff2d80c --- /dev/null +++ b/packages/mml-viewer/src/ui/UnusedParameters.module.css @@ -0,0 +1,22 @@ +.unused-parameters { + margin-top: 8px; + padding-left: 8px; + padding-right: 8px; +} + +.hidden { + display: none; +} + +.header { + font-size: 1.2em; + font-weight: bold; + margin-top: 1em; +} + +.param-list-item { + font-size: 14px; + display: flex; + justify-content: space-between; + margin-bottom: 8px; +} diff --git a/packages/mml-viewer/src/ui/UnusedParameters.ts b/packages/mml-viewer/src/ui/UnusedParameters.ts new file mode 100644 index 00000000..89a3b97a --- /dev/null +++ b/packages/mml-viewer/src/ui/UnusedParameters.ts @@ -0,0 +1,62 @@ +import { setUrlParam } from "./setUrlParam"; +import sharedStyles from "./shared-styles.module.css"; +import tooltipStyles from "./tooltip.module.css"; +import styles from "./UnusedParameters.module.css"; + +export class UnusedParameters { + public readonly element: HTMLDivElement; + private header: HTMLDivElement; + private paramsHolder: HTMLDivElement; + + constructor() { + this.element = document.createElement("div"); + this.element.classList.add(styles.unusedParameters, styles.hidden); + + this.header = document.createElement("div"); + this.header.textContent = "Unused Parameters"; + this.header.className = sharedStyles.header; + this.element.append(this.header); + + const warningIcon = document.createElement("span"); + warningIcon.className = tooltipStyles.tooltip; + warningIcon.setAttribute("data-direction", "left"); + const warningIconText = document.createElement("span"); + warningIconText.className = tooltipStyles.tooltipInitiator; + warningIconText.textContent = "⚠️"; + warningIcon.append(warningIconText); + const warningTooltip = document.createElement("span"); + warningTooltip.className = tooltipStyles.tooltipItem; + warningTooltip.textContent = "These parameters are not used by the viewer in the current mode"; + warningIcon.append(warningTooltip); + this.header.append(warningIcon); + + this.paramsHolder = document.createElement("div"); + this.element.append(this.paramsHolder); + } + + setParams(params: string[]) { + this.paramsHolder.innerHTML = ""; + if (params.length === 0) { + this.element.classList.add(styles.hidden); + return; + } + + this.element.classList.remove(styles.hidden); + + for (const param of params) { + const listItem = document.createElement("div"); + listItem.className = styles.paramListItem; + const paramName = document.createElement("div"); + paramName.textContent = param; + listItem.append(paramName); + const removeButton = document.createElement("button"); + removeButton.className = sharedStyles.button; + removeButton.textContent = "Remove"; + removeButton.addEventListener("click", () => { + setUrlParam(param, null); + }); + listItem.append(removeButton); + this.paramsHolder.append(listItem); + } + } +} diff --git a/packages/mml-viewer/src/ui/ViewerUI.module.css b/packages/mml-viewer/src/ui/ViewerUI.module.css new file mode 100644 index 00000000..479ff2d2 --- /dev/null +++ b/packages/mml-viewer/src/ui/ViewerUI.module.css @@ -0,0 +1,87 @@ +.viewer-ui { + z-index: 1000; +} + +.menu-button { + position: fixed; + z-index: 1000; + top: 0; + right: 0; + padding: 10px; + width: 40px; + height: 40px; + cursor: pointer; + color: white; + background-color: rgba(0, 0, 0, 0.5); + pointer-events: auto; + border: 0; + user-select: none; + border-bottom-left-radius: 4px; + + &:hover { + background-color: rgba(0, 0, 0, 0.8); + } +} + +.empty-state .menu-button { + display: none; +} + +.header { + padding: 8px 8px 4px; + display: flex; + align-items: center; + justify-content: space-between; +} + +.title { + font-size: 20px; + display: flex; + align-items: center; +} + +.logo { + height: 30px; + margin-right: 5px; +} + +.github-link { + font-size: 11px; + color: white; + flex-direction: column; + text-decoration: none; + display: flex; + align-items: center; + text-align: center; +} + +.github-logo { + height: 30px; + width: 30px; +} + +.contents { + position: fixed; + z-index: 1000; + font-family: Arial, sans-serif; + right: 0; + top: 0; + transform: translate(0, 0); + width: 300px; + max-height: 100%; + overflow: scroll; + + color: white; + background-color: rgba(18, 18, 18, 0.8); + backdrop-filter: blur(10px); + pointer-events: auto; + border-bottom-left-radius: 4px; +} + +.empty-state .contents { + right: 50%; + top: 50%; + max-width: 100%; + transform: translate(50%, -50%); + border-radius: 4px; +} diff --git a/packages/mml-viewer/src/ui/ViewerUI.ts b/packages/mml-viewer/src/ui/ViewerUI.ts new file mode 100644 index 00000000..a4e8b876 --- /dev/null +++ b/packages/mml-viewer/src/ui/ViewerUI.ts @@ -0,0 +1,125 @@ +import MMLLogoSVG from "../../../../branding/src/svg/logotype/mml-logotype-white.svg"; +import { allGroups } from "./fields"; +import GitHubLogoSVG from "./github-mark-white.svg"; +import { HideUISection } from "./HideUISection"; +import { UIGroup } from "./UIGroup"; +import { UnusedParameters } from "./UnusedParameters"; +import styles from "./ViewerUI.module.css"; + +export class ViewerUI { + private element: HTMLDivElement; + private contents: HTMLDivElement; + + private header: HTMLDivElement; + private groups: Array = []; + private groupHolder: HTMLDivElement; + + private unusedParameters: UnusedParameters; + private hideUISection: HideUISection; + + constructor() { + this.element = document.createElement("div"); + this.element.className = styles.viewerUi; + this.element.addEventListener("wheel", (e) => e.stopPropagation()); + document.body.append(this.element); + + this.contents = document.createElement("div"); + this.contents.className = styles.contents; + this.contents.style.display = "none"; + this.element.append(this.contents); + + this.header = document.createElement("div"); + this.header.className = styles.header; + + const title = document.createElement("div"); + title.className = styles.title; + const logoLink = document.createElement("a"); + logoLink.target = "_blank"; + logoLink.href = "https://mml.io"; + const logo = document.createElement("img"); + logo.classList.add(styles.logo); + logo.src = MMLLogoSVG; + logo.alt = "MML"; + logoLink.append(logo); + title.append(logoLink); + const span = document.createElement("span"); + span.textContent = " Viewer (Alpha)"; + title.append(span); + this.header.append(title); + + const githubLink = document.createElement("a"); + githubLink.target = "_blank"; + githubLink.className = styles.githubLink; + githubLink.href = "https://github.com/mml-io/mml/tree/main/packages/mml-viewer"; + const githubLogo = document.createElement("img"); + githubLogo.classList.add(styles.githubLogo); + githubLogo.src = GitHubLogoSVG; + githubLogo.alt = "GitHub"; + githubLink.append(githubLogo); + const githubSpan = document.createElement("span"); + githubSpan.textContent = "View Source"; + githubLink.append(githubSpan); + this.header.append(githubLink); + + this.contents.append(this.header); + + this.groupHolder = document.createElement("div"); + this.contents.append(this.groupHolder); + + this.unusedParameters = new UnusedParameters(); + this.contents.append(this.unusedParameters.element); + + this.hideUISection = new HideUISection(); + this.contents.append(this.hideUISection.element); + + const menuIcon = document.createElement("button"); + menuIcon.classList.add(styles.menuButton, "no-copy"); + menuIcon.textContent = "≡"; + menuIcon.addEventListener("click", () => { + this.contents.style.display = this.contents.style.display === "none" ? "block" : "none"; + }); + this.element.append(menuIcon); + } + + addGroup(uiGroup: UIGroup) { + this.groups.push(uiGroup); + this.groups.sort( + (a, b) => allGroups.indexOf(a.groupDefinition) - allGroups.indexOf(b.groupDefinition), + ); + const index = this.groups.indexOf(uiGroup); + if (index === this.groups.length - 1) { + this.groupHolder.append(uiGroup.element); + } else { + const nextGroup = this.groups[index + 1]; + this.groupHolder.insertBefore(uiGroup.element, nextGroup.element); + } + } + + showUnusedParams(params: string[]) { + this.unusedParameters.setParams(params); + } + + showAddressMenu() { + this.element.classList.add(styles.emptyState); + this.contents.style.display = "block"; + this.hideUISection.hide(); + } + + hideAddressMenu() { + this.element.classList.remove(styles.emptyState); + this.hideUISection.show(); + } + + removeGroup(group: UIGroup) { + this.groupHolder.removeChild(group.element); + this.groups = this.groups.filter((g) => g !== group); + } + + show() { + this.element.style.display = "block"; + } + + hide() { + this.element.style.display = "none"; + } +} diff --git a/packages/mml-viewer/src/ui/fields.ts b/packages/mml-viewer/src/ui/fields.ts new file mode 100644 index 00000000..37c63c90 --- /dev/null +++ b/packages/mml-viewer/src/ui/fields.ts @@ -0,0 +1,162 @@ +import { FieldDefinition, GroupDefinition } from "./FieldDefinition"; + +export const sourceGroup: GroupDefinition = { + name: "source", + label: "Source", +}; + +export const rendererGroup: GroupDefinition = { + name: "renderer", + label: "Renderer", +}; + +export const environmentGroup: GroupDefinition = { + name: "environment", + label: "Environment", +}; + +export const cameraGroup: GroupDefinition = { + name: "camera", + label: "Camera", +}; + +export const lightGroup: GroupDefinition = { + name: "light", + label: "Light", +}; + +export const allGroups = [sourceGroup, rendererGroup, cameraGroup, lightGroup, environmentGroup]; + +export const cameraModeField: FieldDefinition = { + name: "cameraMode", + label: "Camera Mode", + type: "string", + options: ["orbit", "drag-fly", "none"], + defaultValue: "drag-fly", + groupDefinition: cameraGroup, +}; + +export const cameraOrbitSpeedField: FieldDefinition = { + name: "cameraOrbitSpeed", + label: "Camera Orbit Speed (degrees per second)", + type: "number", + defaultValue: 10, + groupDefinition: cameraGroup, +}; + +export const cameraOrbitDistanceField: FieldDefinition = { + name: "cameraOrbitDistance", + label: "Camera Orbit Distance", + type: "number", + defaultValue: 10, + groupDefinition: cameraGroup, +}; + +export const cameraOrbitPitchField: FieldDefinition = { + name: "cameraOrbitPitch", + label: "Camera Orbit Pitch", + type: "number", + defaultValue: 60, + groupDefinition: cameraGroup, +}; + +export const cameraFitContents: FieldDefinition = { + name: "cameraFitContents", + label: "Camera Fit Contents", + type: "string", + options: ["true", "false"], + defaultValue: "false", + groupDefinition: cameraGroup, +}; + +export const cameraLookAtField: FieldDefinition = { + name: "cameraLookAt", + label: "Camera Look At", + type: "x,y,z", + defaultValue: "0,0,0", + groupDefinition: cameraGroup, +}; + +export const cameraPositionField: FieldDefinition = { + name: "cameraPosition", + label: "Camera Position", + type: "x,y,z", + defaultValue: "0,5,10", + groupDefinition: cameraGroup, +}; + +export const cameraFovField: FieldDefinition = { + name: "cameraFov", + label: "Camera FOV", + type: "number", + defaultValue: 75, + groupDefinition: cameraGroup, +}; + +export const urlField: FieldDefinition = { + name: "url", + label: "URL", + type: "string", + defaultValue: "", + requireSubmission: true, + groupDefinition: sourceGroup, +}; + +export const rendererField: FieldDefinition = { + name: "renderer", + label: "Renderer", + type: "string", + options: ["threejs", "playcanvas", "tags"], + defaultValue: "threejs", + groupDefinition: rendererGroup, +}; + +export const backgroundColorField: FieldDefinition = { + name: "backgroundColor", + label: "Background Color", + type: "color", + defaultValue: "rgba(255, 255, 255, 0)", + groupDefinition: rendererGroup, +}; + +export const environmentMapField: FieldDefinition = { + name: "environmentMap", + label: "Environment Map", + type: "string", + defaultValue: "", + requireSubmission: true, + groupDefinition: environmentGroup, +}; + +export const ambientLightField: FieldDefinition = { + name: "ambientLight", + label: "Ambient Light", + type: "number", + defaultValue: 0, + groupDefinition: lightGroup, +}; + +export const ambientLightColorField: FieldDefinition = { + name: "ambientLightColor", + label: "Ambient Light Color", + type: "color", + defaultValue: "white", + groupDefinition: lightGroup, +}; + +export const allFields = [ + cameraModeField, + cameraFitContents, + cameraLookAtField, + cameraOrbitDistanceField, + cameraOrbitPitchField, + cameraOrbitSpeedField, + cameraPositionField, + cameraFovField, + environmentMapField, + urlField, + rendererField, + backgroundColorField, + ambientLightField, + ambientLightColorField, +]; diff --git a/packages/mml-viewer/src/ui/github-mark-white.svg b/packages/mml-viewer/src/ui/github-mark-white.svg new file mode 100644 index 00000000..a6bd6516 --- /dev/null +++ b/packages/mml-viewer/src/ui/github-mark-white.svg @@ -0,0 +1 @@ + diff --git a/packages/mml-viewer/src/ui/setUrlParam.ts b/packages/mml-viewer/src/ui/setUrlParam.ts new file mode 100644 index 00000000..8b0509cb --- /dev/null +++ b/packages/mml-viewer/src/ui/setUrlParam.ts @@ -0,0 +1,10 @@ +export function setUrlParam(name: string, value: string | null) { + const params = new URLSearchParams(window.location.search); + if (value === "" || value === null) { + params.delete(name); + } else { + params.set(name, value); + } + window.history.replaceState({}, "", `${window.location.pathname}?${params}`); + window.dispatchEvent(new PopStateEvent("popstate")); +} diff --git a/packages/mml-viewer/src/ui/shared-styles.module.css b/packages/mml-viewer/src/ui/shared-styles.module.css new file mode 100644 index 00000000..459828a9 --- /dev/null +++ b/packages/mml-viewer/src/ui/shared-styles.module.css @@ -0,0 +1,60 @@ +.header { + color: rgb(128, 128, 128); + margin-bottom: 8px; + font-size: 14px; + display: flex; + justify-content: space-between; +} + +.contents { + +} + +.button { + appearance: none; + background-color: #FAFBFC; + border: 1px solid rgba(27, 31, 35, 0.15); + border-radius: 4px; + box-shadow: rgba(27, 31, 35, 0.04) 0 1px 0, rgba(255, 255, 255, 0.25) 0 1px 0 inset; + box-sizing: border-box; + color: #24292E; + cursor: pointer; + display: inline-block; + font-family: -apple-system, system-ui, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; + font-size: 11px; + font-weight: 500; + line-height: 20px; + list-style: none; + padding: 3px 8px; + position: relative; + user-select: none; + touch-action: manipulation; + vertical-align: middle; + white-space: nowrap; + word-wrap: break-word; + + &:hover { + background-color: #e4e4e4; + text-decoration: none; + transition-duration: 0.1s; + } + + &:disabled { + background-color: #FAFBFC; + border-color: rgba(27, 31, 35, 0.15); + color: #3c3d42; + cursor: default; + } + + &:active { + background-color: #ffffff; + box-shadow: rgba(243, 243, 243, 0.2) 0 1px 0 inset; + transition: none 0s; + } + + &:focus { + outline: 1px transparent; + } +} + + diff --git a/packages/mml-viewer/src/ui/tooltip.module.css b/packages/mml-viewer/src/ui/tooltip.module.css new file mode 100644 index 00000000..40f6b60a --- /dev/null +++ b/packages/mml-viewer/src/ui/tooltip.module.css @@ -0,0 +1,83 @@ +.tooltip { + position: relative; + + .tooltip-item { + position: absolute; + min-width: 200px; + padding: 10px; + font-size: 14px; + visibility: hidden; + opacity: 0; + background: white; + transition: all .250s cubic-bezier(0, 0, 0.2, 1); + color: #484848; + border: 1px solid #cecece; + border-radius: 3px; + font-weight: 500; + box-shadow: 0 2px 1px #bcbcbc; + z-index: 4; + &:after { + content: ""; + display: block; + position: absolute; + width: 0; + height: 0; + border-style: solid; + } + } + + .tooltip-initiator { + cursor: pointer; + z-index: 5; + } + + &[data-direction="left"] { + + .tooltip-initiator:hover ~ .tooltip-item { + transform: translate3d(0, -50%, 0); + visibility: visible; + opacity: 1; + } + + .tooltip-item { + top: 50%; + right: calc(100% + 1em); + transform: translate3d(15px, -50%, 0); + + &:after { + top: 50%; + right: -0.5em; + transform: translate3d(0, -50%, 0); + border-width: 0.5em 0 0.5em 0.5em; + border-color: transparent transparent transparent white; + -webkit-filter: drop-shadow(1px 2px 1px #bcbcbc); + filter: drop-shadow(1px 2px 1px #bcbcbc); + } + } + } + + &[data-direction="bottom"] { + + .tooltip-initiator:hover ~ .tooltip-item { + transform: translate3d(-50%, 0, 0); + visibility: visible; + opacity: 1; + } + + .tooltip-item { + top: calc(100% + 1em); + left: 50%; + transform: translate3d(-50%, -15px, 0); + + &:after { + top: -0.5em; + left: 50%; + transform: translate3d(-50%, 0, 0); + border-width: 0 0.5em 0.5em 0.5em; + border-color: transparent transparent white transparent; + -webkit-filter: drop-shadow(1px 2px 1px #bcbcbc); + filter: drop-shadow(1px -1px 1px #bcbcbc); + } + } + } +} diff --git a/packages/mml-viewer/test/no-op.test.ts b/packages/mml-viewer/test/no-op.test.ts new file mode 100644 index 00000000..5a760382 --- /dev/null +++ b/packages/mml-viewer/test/no-op.test.ts @@ -0,0 +1,5 @@ +describe("no-op", () => { + test("no-op", () => { + expect(true).toBe(true); + }); +}); diff --git a/packages/mml-viewer/tsconfig.json b/packages/mml-viewer/tsconfig.json new file mode 100644 index 00000000..fd167428 --- /dev/null +++ b/packages/mml-viewer/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "noImplicitAny": true, + "module": "esnext", + "target": "ES6", + "jsx": "react", + "lib": ["es2020", "dom"], + "sourceMap": true, + "allowJs": true, + "types": ["node", "jest"], + "strictNullChecks": true, + "skipLibCheck": true, + "allowSyntheticDefaultImports": true, + "moduleResolution": "node", + "resolveJsonModule": true, + "downlevelIteration": true, + "esModuleInterop": true, + "outDir": "./build", + "incremental": true + }, + "include": ["src/**/*", "test/**/*", "./build.ts", "./jest.config.ts"], + "exclude": ["**/build/*", "types-src"], + "files": ["../../node_modules/jest-expect-message/types/index.d.ts"] +} diff --git a/packages/mml-web-client/README.md b/packages/mml-web-client/README.md new file mode 100644 index 00000000..16a16469 --- /dev/null +++ b/packages/mml-web-client/README.md @@ -0,0 +1,30 @@ +# MML Web Client + +This package contains a basic standalone client as a single JavaScript bundle that can be included in the source of a webpage to render MML documents. + +### Note +This bundle is currently quite heavy as it includes both the THREE.js and PlayCanvas renderers. + + +# Usage + +The query parameters of the ` +``` + +## Example Usage for Inline Content + +```html + + + + + + +``` + diff --git a/packages/mml-web-client/package.json b/packages/mml-web-client/package.json index 7fb859f3..01e09531 100644 --- a/packages/mml-web-client/package.json +++ b/packages/mml-web-client/package.json @@ -1,5 +1,5 @@ { - "name": "mml-web-client", + "name": "@mml-io/mml-web-client", "version": "0.18.1", "publishConfig": { "access": "public" @@ -14,11 +14,16 @@ "build": "tsx ./build.ts --build", "iterate": "cross-env PORT=28891 tsx ./build.ts --serve", "lint": "eslint \"./**/*.{js,jsx,ts,tsx}\" --max-warnings 0", - "lint-fix": "eslint \"./**/*.{js,jsx,ts,tsx}\" --fix" + "lint-fix": "eslint \"./**/*.{js,jsx,ts,tsx}\" --fix", + "test": "cross-env NODE_OPTIONS=--experimental-vm-modules jest", + "test-iterate": "cross-env NODE_OPTIONS=--experimental-vm-modules jest --watch" }, "dependencies": { - "mml-web": "^0.18.1", - "three": "0.163.0" + "@mml-io/mml-web": "^0.18.1", + "three": "0.163.0", + "playcanvas": "1.73.5", + "@mml-io/mml-web-playcanvas-standalone": "^0.18.1", + "@mml-io/mml-web-threejs-standalone": "^0.18.1" }, "devDependencies": { "@types/three": "0.163.0" diff --git a/packages/mml-web-client/src/index.ts b/packages/mml-web-client/src/index.ts index 76b71fb7..a12390dd 100644 --- a/packages/mml-web-client/src/index.ts +++ b/packages/mml-web-client/src/index.ts @@ -1,13 +1,25 @@ -import { NetworkedDOMWebsocketStatus } from "@mml-io/networked-dom-web"; import { configureWindowForMML, FullScreenMMLScene, + GraphicsAdapter, IframeWrapper, + MMLNetworkSource, MMLScene, - NetworkedDOMWebsocket, + NetworkedDOMWebsocketStatus, registerCustomElementsToWindow, RemoteDocumentWrapper, -} from "mml-web"; + StandaloneGraphicsAdapter, + StandaloneTagDebugAdapter, + StatusUI, +} from "@mml-io/mml-web"; +import { + StandalonePlayCanvasAdapter, + StandalonePlayCanvasAdapterControlsType, +} from "@mml-io/mml-web-playcanvas-standalone"; +import { + StandaloneThreeJSAdapter, + StandaloneThreeJSAdapterControlsType, +} from "@mml-io/mml-web-threejs-standalone"; const thisScript = document.currentScript as HTMLScriptElement; const scriptUrl = new URL(thisScript.src); @@ -15,46 +27,44 @@ const scriptUrl = new URL(thisScript.src); declare global { interface Window { "mml-web-client": { - mmlScene: MMLScene; - remoteDocuments: RemoteDocumentWrapper[]; + mmlScene: MMLScene; + remoteDocumentWrapper: RemoteDocumentWrapper; }; } } -function createStatusElement() { - const statusElement = document.createElement("div"); - statusElement.style.position = "fixed"; - statusElement.style.top = "50%"; - statusElement.style.left = "50%"; - statusElement.style.transform = "translate(-50%, -50%)"; - statusElement.style.zIndex = "1000"; - statusElement.style.backgroundColor = "rgba(0, 0, 0, 0.5)"; - statusElement.style.color = "white"; - statusElement.style.padding = "1em"; - statusElement.style.fontFamily = "sans-serif"; - statusElement.style.fontSize = "1.5em"; - statusElement.style.fontWeight = "bold"; - statusElement.style.pointerEvents = "none"; - statusElement.style.display = "none"; - document.body.append(statusElement); - return statusElement; -} - (function () { - const websocketUrl = scriptUrl.searchParams.get("websocketUrl"); - if (!websocketUrl) { + function getGraphicsAdapter(element: HTMLElement): Promise { + if (window.location.search.includes("playcanvas")) { + return StandalonePlayCanvasAdapter.create(element, { + controlsType: StandalonePlayCanvasAdapterControlsType.DragFly, + }); + } else if (window.location.search.includes("tags")) { + return StandaloneTagDebugAdapter.create(element); + } else { + return StandaloneThreeJSAdapter.create(element, { + controlsType: StandaloneThreeJSAdapterControlsType.DragFly, + }); + } + } + + const url = scriptUrl.searchParams.get("url"); + if (!url) { // The custom elements are assumed to already be on the page after this script - register the custom elements // handler before the page loads. If any elements are already present then undefined behaviour may occur. - configureWindowForMML(window); + configureWindowForMML(window, getGraphicsAdapter); return; } window.addEventListener("load", async () => { - // Make a fixed-position centered status element const fullScreenMMLScene = new FullScreenMMLScene(); + document.body.append(fullScreenMMLScene.element); + + const graphicsAdapter = await getGraphicsAdapter(fullScreenMMLScene.element); + + fullScreenMMLScene.init(graphicsAdapter); const useIframe = new URL(window.location.href).searchParams.get("iframe") === "true"; - const documentWebsocketUrls = websocketUrl.split(","); let targetForWrappers: HTMLElement; let windowTarget: Window; @@ -69,55 +79,30 @@ function createStatusElement() { } registerCustomElementsToWindow(windowTarget); - const remoteDocuments: RemoteDocumentWrapper[] = []; - for (const documentWebsocketUrl of documentWebsocketUrls) { - let overriddenHandler: ((element: HTMLElement, event: CustomEvent) => void) | null = null; - const eventHandler = (element: HTMLElement, event: CustomEvent) => { - if (!overriddenHandler) { - throw new Error("overriddenHandler not set"); + const statusUI = new StatusUI(); + + const mmlNetworkSource = MMLNetworkSource.create({ + url, + mmlScene: fullScreenMMLScene, + statusUpdated: (status: NetworkedDOMWebsocketStatus) => { + if (status === NetworkedDOMWebsocketStatus.Connected) { + statusUI.setNoStatus(); + fullScreenMMLScene.getLoadingProgressManager().setInitialLoad(true); + } else { + statusUI.setStatus(NetworkedDOMWebsocketStatus[status]); } - overriddenHandler(element, event); - }; - const statusElement = createStatusElement(); - const remoteDocumentWrapper = new RemoteDocumentWrapper( - window.location.href, - windowTarget, - fullScreenMMLScene, - eventHandler, - ); - remoteDocuments.push(remoteDocumentWrapper); - targetForWrappers.append(remoteDocumentWrapper.remoteDocument); - const websocket = new NetworkedDOMWebsocket( - documentWebsocketUrl, - NetworkedDOMWebsocket.createWebSocket, - remoteDocumentWrapper.remoteDocument, - (time: number) => { - remoteDocumentWrapper.setDocumentTime(time); - }, - (status: NetworkedDOMWebsocketStatus) => { - if (status === NetworkedDOMWebsocketStatus.Connected) { - statusElement.style.display = "none"; - fullScreenMMLScene.getLoadingProgressManager().setInitialLoad(true); - } else { - statusElement.style.display = "block"; - statusElement.textContent = NetworkedDOMWebsocketStatus[status]; - } - }, - ); - overriddenHandler = (element: HTMLElement, event: CustomEvent) => { - websocket.handleEvent(element, event); - }; - } + }, + windowTarget, + targetForWrappers, + }); const defineGlobals = scriptUrl.searchParams.get("defineGlobals") === "true"; if (defineGlobals) { // Define the global mml-web-client object on the window for testing purposes window["mml-web-client"] = { mmlScene: fullScreenMMLScene, - remoteDocuments, + remoteDocumentWrapper: mmlNetworkSource.remoteDocumentWrapper, }; } - - document.body.append(fullScreenMMLScene.element); }); })(); diff --git a/packages/mml-web-client/test/no-op.test.ts b/packages/mml-web-client/test/no-op.test.ts new file mode 100644 index 00000000..5a760382 --- /dev/null +++ b/packages/mml-web-client/test/no-op.test.ts @@ -0,0 +1,5 @@ +describe("no-op", () => { + test("no-op", () => { + expect(true).toBe(true); + }); +}); diff --git a/packages/mml-web-client/tsconfig.json b/packages/mml-web-client/tsconfig.json index e33ffa8f..7a23dcef 100644 --- a/packages/mml-web-client/tsconfig.json +++ b/packages/mml-web-client/tsconfig.json @@ -7,14 +7,18 @@ "lib": ["es2020", "dom"], "sourceMap": true, "allowJs": true, - "types": ["node"], + "types": ["node", "jest"], "strictNullChecks": true, + "skipLibCheck": true, "allowSyntheticDefaultImports": true, "moduleResolution": "node", + "resolveJsonModule": true, "downlevelIteration": true, + "esModuleInterop": true, "outDir": "./build", "incremental": true }, "include": ["src/**/*", "test/**/*", "./build.ts", "./jest.config.ts"], - "exclude": ["**/build/*", "types-src"] + "exclude": ["**/build/*", "types-src"], + "files": ["../../node_modules/jest-expect-message/types/index.d.ts"] } diff --git a/packages/mml-web-playcanvas-standalone/README.md b/packages/mml-web-playcanvas-standalone/README.md new file mode 100644 index 00000000..1fe12a26 --- /dev/null +++ b/packages/mml-web-playcanvas-standalone/README.md @@ -0,0 +1,39 @@ +# MML Web PlayCanvas Standalone +#### `@mml-io/mml-web-playcanvas-standalone` + +[![npm version](https://img.shields.io/npm/v/@mml-io/mml-web-playcanvas-standalone.svg?style=flat)](https://www.npmjs.com/package/@mml-io/mml-web-playcanvas-standalone) + +This package contains a class, `StandalonePlayCanvasAdapter`, that is a PlayCanvas-backed Graphics Adapter implementation for `@mml-io/mml-web` that creates: +* A PlayCanvas App instance + * with embedded DRACO, Ammo, glglang, and twgsl WASM bundles as base64 encoded strings (to avoid external dependencies at runtime) +* Orbit and drag-fly controls +* A factory for MML element graphics instances from the `@mml-io/mml-web-playcanvas` package. + +It is intended to be used with the following packages: +* `@mml-io/mml-web` + * provides the MML element handling and parsing and can use this package as a Graphics Adapter. + + +## Example Usage + +```typescript +import { FullScreenMMLScene } from "@mml-io/mml-web"; +import { + StandalonePlayCanvasAdapter, StandalonePlayCanvasAdapterControlsType, +} from "@mml-io/mml-web-playcanvas-standalone"; + +// ** This code is not a complete example. See @mml-io/mml-web for more info on how to use an MMLScene ** + +// Create an MML Scene that will act as the container for MML content +const fullScreenMMLScene = new FullScreenMMLScene(); +// Append the element of the MML scene to the page +document.body.append(fullScreenMMLScene.element); + +// Provide the element for the renderer to the adapter to attach controls to +const graphicsAdapter = await StandalonePlayCanvasAdapter.create(fullScreenMMLScene.element, { + controlsType: StandalonePlayCanvasAdapterControlsType.DragFly, +}); + +// Provide the Graphics Adapter to the MML Scene to use to render elements +fullScreenMMLScene.init(graphicsAdapter); +``` diff --git a/packages/mml-web-playcanvas-standalone/build.ts b/packages/mml-web-playcanvas-standalone/build.ts new file mode 100644 index 00000000..76a418fb --- /dev/null +++ b/packages/mml-web-playcanvas-standalone/build.ts @@ -0,0 +1,19 @@ +import fs from "fs"; + +import { base64Plugin } from "../../utils/base64plugin"; +import { handleLibraryBuild } from "../../utils/build-library"; + +const glslangWasmContents = fs.readFileSync("./src/wasm/glslang.wasm"); +const glslangWasmContentsBase64 = glslangWasmContents.toString("base64"); + +const twgslWasmContents = fs.readFileSync("./src/wasm/twgsl.wasm"); +const twgslWasmContentsBase64 = twgslWasmContents.toString("base64"); + +handleLibraryBuild([ + base64Plugin({ + replacements: { + '= "glslang.wasm";': `= "data:application/octet-stream;base64,${glslangWasmContentsBase64}";`, + '= "twgsl.wasm";': `= "data:application/octet-stream;base64,${twgslWasmContentsBase64}";`, + }, + }), +]); diff --git a/packages/mml-web-playcanvas-standalone/jest.config.ts b/packages/mml-web-playcanvas-standalone/jest.config.ts new file mode 100644 index 00000000..f3df6ff9 --- /dev/null +++ b/packages/mml-web-playcanvas-standalone/jest.config.ts @@ -0,0 +1,25 @@ +import type { JestConfigWithTsJest } from "ts-jest"; + +const jestConfig: JestConfigWithTsJest = { + verbose: true, + collectCoverage: true, + testEnvironment: "jsdom", + coverageDirectory: "coverage", + coverageReporters: ["lcov", "text"], + extensionsToTreatAsEsm: [".ts"], + moduleNameMapper: { + "^(\\.{1,2}/.*)\\.js$": "$1", + }, + setupFiles: ["jest-canvas-mock"], + setupFilesAfterEnv: ["jest-expect-message", "../../test-utils/jest-browser-polyfills.ts"], + transform: { + "^.+\\.tsx?$": [ + "ts-jest", + { + useESM: true, + }, + ], + }, +}; + +export default jestConfig; diff --git a/packages/mml-web-playcanvas-standalone/package.json b/packages/mml-web-playcanvas-standalone/package.json new file mode 100644 index 00000000..0ae30067 --- /dev/null +++ b/packages/mml-web-playcanvas-standalone/package.json @@ -0,0 +1,42 @@ +{ + "name": "@mml-io/mml-web-playcanvas-standalone", + "version": "0.18.1", + "publishConfig": { + "access": "public" + }, + "main": "./build/index.js", + "types": "./build/index.d.ts", + "type": "module", + "files": [ + "/build" + ], + "scripts": { + "type-check": "tsc --noEmit", + "build": "tsx ./build.ts --build", + "iterate": "tsx ./build.ts --watch", + "lint": "eslint \"./**/*.{js,jsx,ts,tsx}\" --max-warnings 0", + "lint-fix": "eslint \"./**/*.{js,jsx,ts,tsx}\" --fix", + "test": "cross-env NODE_OPTIONS=--experimental-vm-modules jest", + "test-iterate": "cross-env NODE_OPTIONS=--experimental-vm-modules jest --watch" + }, + "dependencies": { + "@mml-io/mml-web": "^0.18.1", + "@mml-io/mml-web-playcanvas": "^0.18.1" + }, + "peerDependencies": { + "playcanvas": "*" + }, + "devDependencies": { + "jest-canvas-mock": "2.5.2", + "jest-environment-jsdom": "29.7.0", + "jest-expect-message": "1.1.3", + "jest-fetch-mock": "3.0.3", + "resize-observer-polyfill": "1.5.1", + "playcanvas": "1.73.5" + }, + "babel": { + "presets": [ + "@babel/preset-typescript" + ] + } +} diff --git a/packages/mml-web-playcanvas-standalone/src/StandalonePlayCanvasAdapter.ts b/packages/mml-web-playcanvas-standalone/src/StandalonePlayCanvasAdapter.ts new file mode 100644 index 00000000..91ecbe18 --- /dev/null +++ b/packages/mml-web-playcanvas-standalone/src/StandalonePlayCanvasAdapter.ts @@ -0,0 +1,291 @@ +import { + Interaction, + Matr4, + MMLGraphicsInterface, + TransformableElement, + Vect3, +} from "@mml-io/mml-web"; +import { + PlayCanvasClickTrigger, + PlayCanvasGraphicsAdapter, + PlayCanvasGraphicsInterface, + PlayCanvasInteractionAdapter, +} from "@mml-io/mml-web-playcanvas"; +import ammoWasmJs from "base64:./wasm/ammo.wasm.js"; +import ammoWasmWasm from "base64:./wasm/ammo.wasm.wasm"; +import dracoWasmJs from "base64:./wasm/draco.wasm.js"; +import dracoWasmWasm from "base64:./wasm/draco.wasm.wasm"; +import glslangWasmJs from "base64:./wasm/glslang.js"; +import twgslWasmJs from "base64:./wasm/twgsl.js"; +import * as playcanvas from "playcanvas"; + +import { PlayCanvasOrbitCameraControls } from "./controls"; +import { PlayCanvasControls } from "./controls/PlayCanvasControls"; +import { PlayCanvasDragFlyCameraControls } from "./controls/PlayCanvasDragFlyCameraControls"; + +export enum StandalonePlayCanvasAdapterControlsType { + None, + DragFly, + Orbit, +} + +export type StandalonePlayCanvasAdapterOptions = { + controlsType?: StandalonePlayCanvasAdapterControlsType; +}; + +export class StandalonePlayCanvasAdapter implements PlayCanvasGraphicsAdapter { + containerType: playcanvas.Entity; + collisionType: playcanvas.Entity; + + private playcanvasApp: playcanvas.AppBase; + + public controls: PlayCanvasControls | null = null; + private camera: playcanvas.Entity; + private canvas: HTMLCanvasElement | null = null; + + private clickTrigger: PlayCanvasClickTrigger; + + private constructor( + private element: HTMLElement, + private options: StandalonePlayCanvasAdapterOptions, + ) {} + + getPlayCanvasApp(): playcanvas.AppBase { + return this.playcanvasApp; + } + + getCamera(): playcanvas.Entity { + return this.camera; + } + + public getGraphicsAdapterFactory(): MMLGraphicsInterface { + return PlayCanvasGraphicsInterface as MMLGraphicsInterface; + } + + public static async create( + element: HTMLElement, + options: StandalonePlayCanvasAdapterOptions, + ): Promise { + const adapter = new StandalonePlayCanvasAdapter(element, options); + await adapter.init(); + return adapter; + } + + public interactionShouldShowDistance(interaction: Interaction): number | null { + const cameraComponent = this.camera.camera; + if (!cameraComponent) { + console.error("Camera component not found"); + return null; + } + return PlayCanvasInteractionAdapter.interactionShouldShowDistance( + interaction, + this.camera, + cameraComponent, + this.playcanvasApp, + ); + } + + async init() { + playcanvas.WasmModule.setConfig("Ammo", { + glueUrl: "data:text/javascript;base64," + ammoWasmJs, + wasmUrl: "data:application/octet-stream;base64," + ammoWasmWasm, + }); + await new Promise((resolve) => { + playcanvas.WasmModule.getInstance("Ammo", () => resolve()); + }); + + playcanvas.WasmModule.setConfig("DracoDecoderModule", { + glueUrl: "data:text/javascript;base64," + dracoWasmJs, + wasmUrl: "data:application/wasm;base64," + dracoWasmWasm, + }); + + this.canvas = document.createElement("canvas"); + this.canvas.style.pointerEvents = "none"; + this.element.appendChild(this.canvas); + + this.playcanvasApp = new playcanvas.AppBase(this.canvas); + + const gfxOptions = { + deviceTypes: ["webgpu", "webgl2"], + glslangUrl: "data:text/javascript;base64," + glslangWasmJs, + twgslUrl: "data:text/javascript;base64," + twgslWasmJs, + }; + + const soundManager = new playcanvas.SoundManager(); + const device = await playcanvas.createGraphicsDevice(this.canvas, gfxOptions); + device.maxPixelRatio = window.devicePixelRatio; + const createOptions = new playcanvas.AppOptions(); + createOptions.soundManager = soundManager; + createOptions.graphicsDevice = device; + createOptions.componentSystems = [ + playcanvas.RenderComponentSystem, + playcanvas.CollisionComponentSystem, + playcanvas.RigidBodyComponentSystem, + playcanvas.CameraComponentSystem, + playcanvas.LightComponentSystem, + playcanvas.ModelComponentSystem, + playcanvas.AnimComponentSystem, + playcanvas.SoundComponentSystem, + playcanvas.AudioListenerComponentSystem, + ]; + createOptions.resourceHandlers = [ + playcanvas.AudioHandler, + playcanvas.TextureHandler, + playcanvas.ContainerHandler, + playcanvas.ModelHandler, + playcanvas.AnimationHandler, + ]; + this.playcanvasApp.init(createOptions); + this.playcanvasApp.scene.physicalUnits = true; + this.playcanvasApp.setCanvasFillMode(playcanvas.FILLMODE_NONE); + this.playcanvasApp.setCanvasResolution(playcanvas.RESOLUTION_FIXED); + + // Set the canvas size to non-zero to avoid errors on startup + device.resizeCanvas(128, 128); + + this.camera = new playcanvas.Entity("camera", this.playcanvasApp); + this.camera.addComponent("audiolistener"); + this.camera.addComponent("camera", { + fov: 75, + clearColor: new playcanvas.Color(1, 1, 1, 1), + } as playcanvas.CameraComponent); + this.camera.setPosition(0, 5, 10); + this.playcanvasApp.root.addChild(this.camera); + + this.setControlsType(this.options.controlsType); + + this.clickTrigger = PlayCanvasClickTrigger.init(this.playcanvasApp, this.element, this.camera); + + this.playcanvasApp.on("update", (delta) => { + if (this.controls) { + this.controls.update(delta); + } + }); + + this.playcanvasApp.start(); + } + + public setControlsType(type?: StandalonePlayCanvasAdapterControlsType) { + if (this.controls) { + this.controls.dispose(); + this.controls = null; + } + switch (type) { + case StandalonePlayCanvasAdapterControlsType.None: + break; + case StandalonePlayCanvasAdapterControlsType.Orbit: + this.controls = new PlayCanvasOrbitCameraControls(this.camera, this.element); + break; + case StandalonePlayCanvasAdapterControlsType.DragFly: + default: + this.controls = new PlayCanvasDragFlyCameraControls(this.camera, this.element); + break; + } + if (this.controls) { + this.controls.enable(); + } + } + + public setCameraFOV(fov: number) { + const cameraComponent = this.camera.camera; + if (!cameraComponent) { + console.error("Camera component not found"); + return null; + } + cameraComponent.fov = fov; + } + + start() {} + + getUserPositionAndRotation() { + const position = this.camera.getPosition(); + const rotation = this.camera.getEulerAngles(); + return { + position: { + x: position.x, + y: position.y, + z: position.z, + }, + rotation: { + x: rotation.x, + y: rotation.y, + z: rotation.z, + }, + }; + } + + resize(width: number, height: number) { + this.playcanvasApp.resizeCanvas(width, height); + this.playcanvasApp.graphicsDevice.resizeCanvas(width, height); + } + + dispose() { + this.playcanvasApp.destroy(); + if (this.canvas) { + this.canvas.remove(); + this.canvas = null; + } + if (this.controls) { + this.controls.dispose(); + } + this.clickTrigger.dispose(); + } + + getRootContainer() { + return this.playcanvasApp.root; + } + + public getBoundingBoxForElement(element: HTMLElement): { + x: number; + y: number; + width: number; + height: number; + } | null { + if (!(element instanceof TransformableElement)) { + return null; + } + + const bounds = element.getContentBounds(); + if (!bounds) { + return null; + } + + const camera = this.camera; + const cameraComponent = camera.camera; + if (!cameraComponent) { + throw new Error("Camera component not found"); + } + + const renderer = this.playcanvasApp.graphicsDevice; + const clientWidth = renderer.canvas.clientWidth; + const clientHeight = renderer.canvas.clientHeight; + + // Custom function to convert 3D Vector3 to 2D canvas coordinates + const toCanvasCoords = (point: Vect3) => { + const vec = point + .clone() + .applyMatrix4(new Matr4(camera.getWorldTransform().clone().invert().data)) + .applyMatrix4(new Matr4(cameraComponent.projectionMatrix.data)); + vec.x = ((vec.x + 1) / 2) * clientWidth; + vec.y = ((1 - vec.y) / 2) * clientHeight; + return vec; + }; + + // Project the 3D bounding box corners into 2D canvas coordinates + const corners3D = bounds.getCorners(); + const corners2D = corners3D.map(toCanvasCoords); + + // Calculate the 2D bounding box from the projected canvas coordinates + const minX = Math.min(...corners2D.map((corner) => corner.x)); + const maxX = Math.max(...corners2D.map((corner) => corner.x)); + const minY = Math.min(...corners2D.map((corner) => corner.y)); + const maxY = Math.max(...corners2D.map((corner) => corner.y)); + + return { + x: minX, + y: minY, + width: maxX - minX, + height: maxY - minY, + }; + } +} diff --git a/packages/mml-web-playcanvas-standalone/src/base64.d.ts b/packages/mml-web-playcanvas-standalone/src/base64.d.ts new file mode 100644 index 00000000..2f7fad47 --- /dev/null +++ b/packages/mml-web-playcanvas-standalone/src/base64.d.ts @@ -0,0 +1,4 @@ +declare module "base64:*" { + const content: string; + export default content; +} diff --git a/packages/mml-web-playcanvas-standalone/src/controls/PlayCanvasControls.ts b/packages/mml-web-playcanvas-standalone/src/controls/PlayCanvasControls.ts new file mode 100644 index 00000000..65e35eb6 --- /dev/null +++ b/packages/mml-web-playcanvas-standalone/src/controls/PlayCanvasControls.ts @@ -0,0 +1,10 @@ +import { IVect3 } from "@mml-io/mml-web"; + +export interface PlayCanvasControls { + type: string; + enable: () => void; + disable: () => void; + fitContent: (boundingBox: { min: IVect3; max: IVect3 }) => void; + update: (dt: number) => void; + dispose: () => void; +} diff --git a/packages/mml-web/src/camera/DragFlyCameraControls.ts b/packages/mml-web-playcanvas-standalone/src/controls/PlayCanvasDragFlyCameraControls.ts similarity index 52% rename from packages/mml-web/src/camera/DragFlyCameraControls.ts rename to packages/mml-web-playcanvas-standalone/src/controls/PlayCanvasDragFlyCameraControls.ts index 304497ef..38434a2f 100644 --- a/packages/mml-web/src/camera/DragFlyCameraControls.ts +++ b/packages/mml-web-playcanvas-standalone/src/controls/PlayCanvasDragFlyCameraControls.ts @@ -1,23 +1,25 @@ -import { Camera, Euler, Vector3 } from "three"; +import { EventHandlerCollection, IVect3, Matr4, Quat } from "@mml-io/mml-web"; +import * as playcanvas from "playcanvas"; -import { EventHandlerCollection } from "../utils/events/EventHandlerCollection"; - -const WorldUp = new Vector3(0, 1, 0); +const up = { x: 0, y: 1, z: 0 }; +const right = { x: 1, y: 0, z: 0 }; +const quaternion = new Quat(); +const qPitch = new Quat(); +const qYaw = new Quat(); // Creates a set of 5DOF flight controls that requires dragging the mouse to move the rotation and position of the camera -export class DragFlyCameraControls { +export class PlayCanvasDragFlyCameraControls { + public readonly type = "drag-fly"; + private enabled = false; - private camera: Camera; + private camera: playcanvas.Entity; private domElement: HTMLElement; private speed: number; - private vForward = new Vector3(); - private vUp = new Vector3(); - private vRight = new Vector3(); - private vMovement = new Vector3(); + private yaw = 0; + private pitch = 0; - //private locked = false; private forward = false; private backward = false; private left = false; @@ -26,24 +28,45 @@ export class DragFlyCameraControls { private down = false; // Set to constrain the pitch of the camera - // Range is 0 to Math.PI radians - private minPolarAngle = 0; // radians - private maxPolarAngle = Math.PI; // radians + private minPolarAngle = 0 * (Math.PI / 180); + private maxPolarAngle = 180 * (Math.PI / 180); - // This is an addition to the original PointerLockControls class private invertedMouseY = false; - private tempEuler = new Euler(0, 0, 0, "YXZ"); - private eventHandlerCollection: EventHandlerCollection = new EventHandlerCollection(); private mouseDown = false; - constructor(camera: Camera, domElement: HTMLElement, speed = 15.0) { + constructor(camera: playcanvas.Entity, domElement: HTMLElement, speed = 15.0) { this.camera = camera; this.domElement = domElement; + this.domElement.style.userSelect = "none"; this.speed = speed; } + public fitContent(boundingBox: { min: IVect3; max: IVect3 }) { + const center = { + x: (boundingBox.min.x + boundingBox.max.x) / 2, + y: (boundingBox.min.y + boundingBox.max.y) / 2, + z: (boundingBox.min.z + boundingBox.max.z) / 2, + }; + const size = { + x: boundingBox.max.x - boundingBox.min.x, + y: boundingBox.max.y - boundingBox.min.y, + z: boundingBox.max.z - boundingBox.min.z, + }; + const fov = this.camera?.camera?.fov || 1; + const maximumDimension = Math.max(size.x, size.y, size.z); + const distance = Math.abs(maximumDimension / 4 / Math.tan(fov / 2)); + const currentCameraRay = this.camera.forward.clone().normalize(); + currentCameraRay.mulScalar(-distance); + this.camera.setLocalPosition( + center.x + currentCameraRay.x, + center.y + currentCameraRay.y, + center.z + currentCameraRay.z, + ); + this.setLookAt(center.x, center.y, center.z); + } + public enable() { if (this.enabled) { return; @@ -66,7 +89,6 @@ export class DragFlyCameraControls { this.enabled = false; } - // This is an addition to the original PointerLockControls class public setInvert(invert: boolean) { this.invertedMouseY = invert; } @@ -75,24 +97,28 @@ export class DragFlyCameraControls { this.disable(); } + public setCameraPosition(x: number, y: number, z: number) { + this.camera.setLocalPosition(x, y, z); + } + + public setLookAt(x: number, y: number, z: number) { + this.camera.lookAt(x, y, z); + const { yaw, pitch } = getYawPitchFromQuaternion(this.camera.getRotation()); + this.yaw = yaw; + this.pitch = pitch; + this.updateCameraFromYawAndPitch(); + } + public update(dt: number) { if (!this.mouseDown) { return; } - this.camera.getWorldDirection(this.vForward); - this.vRight.crossVectors(this.vForward, WorldUp); - this.vRight.normalize(); - this.vUp.crossVectors(this.vRight, this.vForward); - this.vUp.normalize(); - - this.vMovement.set(0, 0, 0); - this.vMovement.addScaledVector(this.vForward, Number(this.forward) - Number(this.backward)); - this.vMovement.addScaledVector(this.vUp, Number(this.up) - Number(this.down)); - this.vMovement.addScaledVector(this.vRight, Number(this.right) - Number(this.left)); - this.vMovement.normalize(); - this.vMovement.multiplyScalar(this.speed * dt); - this.camera.position.add(this.vMovement); + this.camera.translateLocal( + (Number(this.right) - Number(this.left)) * dt * 30, + (Number(this.up) - Number(this.down)) * dt * 30, + (Number(this.backward) - Number(this.forward)) * dt * 30, + ); } private onKeyDown(event: KeyboardEvent) { @@ -163,9 +189,8 @@ export class DragFlyCameraControls { this.down = false; } - private onMouseDown(event: MouseEvent) { + private onMouseDown() { this.mouseDown = true; - event.preventDefault(); } private onMouseMove(event: MouseEvent) { @@ -175,23 +200,33 @@ export class DragFlyCameraControls { const movementX = event.movementX; let movementY = event.movementY; - // This is an addition to the original PointerLockControls class if (this.invertedMouseY) { movementY *= -1; } - this.tempEuler.setFromQuaternion(this.camera.quaternion); - - this.tempEuler.y -= movementX * 0.002; - this.tempEuler.x -= movementY * 0.002; + this.yaw += movementX * -0.002; + this.pitch += movementY * -0.002; + this.updateCameraFromYawAndPitch(); + } - this.tempEuler.x = Math.max( + private updateCameraFromYawAndPitch() { + this.yaw = this.yaw % (Math.PI * 2); + this.pitch = this.pitch % (Math.PI * 2); + this.pitch = Math.max( Math.PI / 2 - this.maxPolarAngle, - Math.min(Math.PI / 2 - this.minPolarAngle, this.tempEuler.x), + Math.min(Math.PI / 2 - this.minPolarAngle, this.pitch), ); - this.camera.quaternion.setFromEuler(this.tempEuler); + qPitch.setFromAxisAngle(right, this.pitch); + qYaw.setFromAxisAngle(up, this.yaw); + + quaternion.set(0, 0, 0, 1); + quaternion.multiply(qYaw); + quaternion.multiply(qPitch); + + this.camera.setLocalRotation(quaternion.x, quaternion.y, quaternion.z, quaternion.w); } + private onMouseUp() { this.mouseDown = false; } @@ -206,3 +241,23 @@ export class DragFlyCameraControls { this.speed = Math.max(5, Math.min(this.speed, 1000)); } } + +function clamp(value: number, min: number, max: number) { + return Math.max(min, Math.min(max, value)); +} + +function getYawPitchFromQuaternion(quaternion: { x: number; y: number; z: number; w: number }) { + const matr4 = new Matr4(); + matr4.setRotationFromQuaternion(quaternion); + + const d = matr4.data; + const m11 = d[0]; + const m13 = d[8]; + const m23 = d[9]; + const m31 = d[2]; + const m33 = d[10]; + + const yaw = Math.abs(m23) < 0.9999999 ? Math.atan2(m13, m33) : Math.atan2(-m31, m11); + const pitch = Math.asin(-clamp(m23, -1, 1)); + return { yaw, pitch }; +} diff --git a/packages/mml-web-playcanvas-standalone/src/controls/PlayCanvasOrbitCameraControls.ts b/packages/mml-web-playcanvas-standalone/src/controls/PlayCanvasOrbitCameraControls.ts new file mode 100644 index 00000000..d63282fd --- /dev/null +++ b/packages/mml-web-playcanvas-standalone/src/controls/PlayCanvasOrbitCameraControls.ts @@ -0,0 +1,150 @@ +import { EventHandlerCollection, IVect3, Vect3 } from "@mml-io/mml-web"; +import * as playcanvas from "playcanvas"; + +import { PlayCanvasControls } from "./PlayCanvasControls"; + +export class PlayCanvasOrbitCameraControls implements PlayCanvasControls { + public readonly type = "orbit"; + + private enabled = false; + + private degreesPerSecond = 10; + private yaw = 0; + private pitch = Math.PI * 0.4; + + // Set to constrain the pitch of the camera + private minPolarAngle = -89.9999 * (Math.PI / 180); + private maxPolarAngle = 89.9999 * (Math.PI / 180); + + private invertedMouseY = false; + + private eventHandlerCollection: EventHandlerCollection = new EventHandlerCollection(); + private mouseDown = false; + private cameraLookAt: Vect3 = new Vect3(); + + constructor( + private camera: playcanvas.Entity, + private domElement: HTMLElement, + private distance = 15.0, + ) { + this.domElement.style.userSelect = "none"; + } + + public fitContent(boundingBox: { min: IVect3; max: IVect3 }) { + const center = { + x: (boundingBox.min.x + boundingBox.max.x) / 2, + y: (boundingBox.min.y + boundingBox.max.y) / 2, + z: (boundingBox.min.z + boundingBox.max.z) / 2, + }; + const size = { + x: boundingBox.max.x - boundingBox.min.x, + y: boundingBox.max.y - boundingBox.min.y, + z: boundingBox.max.z - boundingBox.min.z, + }; + const fov = this.camera?.camera?.fov || 1; + const maximumDimension = Math.max(size.x, size.y, size.z); + this.distance = Math.abs(maximumDimension / 4 / Math.tan(fov / 2)); + this.setLookAt(center.x, center.y, center.z); + this.update(); + } + + public enable() { + if (this.enabled) { + return; + } + this.enabled = true; + this.eventHandlerCollection.add(window, "blur", this.onBlur.bind(this)); + this.eventHandlerCollection.add(document, "mousemove", this.onMouseMove.bind(this)); + this.eventHandlerCollection.add(this.domElement, "mousedown", this.onMouseDown.bind(this)); + this.eventHandlerCollection.add(document, "mouseup", this.onMouseUp.bind(this)); + this.eventHandlerCollection.add(document, "wheel", this.onMouseWheel.bind(this)); + } + + public disable() { + if (!this.enabled) { + return; + } + this.eventHandlerCollection.clear(); + this.enabled = false; + } + + public setInvert(invert: boolean) { + this.invertedMouseY = invert; + } + + public dispose() { + this.disable(); + } + + private getBaseYaw(): number { + return (-((Date.now() / 1000) * this.degreesPerSecond) % 360) * (Math.PI / 180); + } + + public update() { + const baseYaw = this.getBaseYaw(); + const yaw = baseYaw + this.yaw; + const sinPhiRadius = Math.sin(this.pitch) * this.distance; + const x = sinPhiRadius * Math.sin(yaw); + const y = Math.cos(this.pitch) * this.distance; + const z = sinPhiRadius * Math.cos(yaw); + + this.camera.setPosition(x, y, z); + this.camera.translate(this.cameraLookAt.x, this.cameraLookAt.y, this.cameraLookAt.z); + + this.camera.lookAt(this.cameraLookAt.x, this.cameraLookAt.y, this.cameraLookAt.z); + } + + private onBlur() { + this.mouseDown = false; + } + + private onMouseDown() { + this.mouseDown = true; + } + + public setDegreesPerSecond(degreesPerSecond: number) { + this.degreesPerSecond = degreesPerSecond; + } + + public setLookAt(x: number, y: number, z: number) { + this.cameraLookAt.set(x, y, z); + } + + public setDistance(distance: number) { + this.distance = distance; + } + + public setPitchDegrees(pitch: number) { + this.pitch = pitch * (Math.PI / 180); + this.pitch = this.pitch % (Math.PI * 2); + } + + private onMouseMove(event: MouseEvent) { + if (!this.mouseDown) { + return; + } + const movementX = event.movementX; + let movementY = event.movementY; + + if (this.invertedMouseY) { + movementY *= -1; + } + + this.yaw += movementX * -0.002; + this.pitch += movementY * -0.002; + this.yaw = this.yaw % (Math.PI * 2); + this.pitch = this.pitch % (Math.PI * 2); + this.pitch = Math.max( + Math.PI / 2 - this.maxPolarAngle, + Math.min(Math.PI / 2 - this.minPolarAngle, this.pitch), + ); + } + private onMouseUp() { + this.mouseDown = false; + } + + private onMouseWheel(event: WheelEvent) { + this.distance += event.deltaY * 0.1; + this.distance = Math.max(0.01, Math.min(this.distance, 1000)); + } +} diff --git a/packages/mml-web-playcanvas-standalone/src/controls/index.ts b/packages/mml-web-playcanvas-standalone/src/controls/index.ts new file mode 100644 index 00000000..8f9011d2 --- /dev/null +++ b/packages/mml-web-playcanvas-standalone/src/controls/index.ts @@ -0,0 +1,3 @@ +export * from "./PlayCanvasControls"; +export * from "./PlayCanvasDragFlyCameraControls"; +export * from "./PlayCanvasOrbitCameraControls"; diff --git a/packages/mml-web-playcanvas-standalone/src/index.ts b/packages/mml-web-playcanvas-standalone/src/index.ts new file mode 100644 index 00000000..802c5667 --- /dev/null +++ b/packages/mml-web-playcanvas-standalone/src/index.ts @@ -0,0 +1,2 @@ +export * from "./controls/"; +export * from "./StandalonePlayCanvasAdapter"; diff --git a/packages/mml-web-playcanvas-standalone/src/wasm/ammo.wasm.js b/packages/mml-web-playcanvas-standalone/src/wasm/ammo.wasm.js new file mode 100644 index 00000000..6c9e2b25 --- /dev/null +++ b/packages/mml-web-playcanvas-standalone/src/wasm/ammo.wasm.js @@ -0,0 +1,12884 @@ +// This is ammo.js, a port of Bullet Physics to JavaScript. zlib licensed. + +var Ammo = (function() { + var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined; + if (typeof __filename !== 'undefined') + _scriptDir = _scriptDir || __filename; + return (function(Ammo) { + Ammo = Ammo || {}; + + var b; + b || (b = typeof Ammo !== 'undefined' ? Ammo : {}); + var aa = {}, ba; + for (ba in b) + b.hasOwnProperty(ba) && (aa[ba] = b[ba]); + var ca = !1 + , da = !1 + , ea = !1 + , fa = !1; + ca = "object" === typeof window; + da = "function" === typeof importScripts; + ea = "object" === typeof process && "object" === typeof process.versions && "string" === typeof process.versions.node; + fa = !ca && !ea && !da; + var ha = "", ja, ka, la, ma; + if (ea) + ha = da ? require("path").dirname(ha) + "/" : __dirname + "/", + ja = function(a, c) { + la || (la = require("fs")); + ma || (ma = require("path")); + a = ma.normalize(a); + return la.readFileSync(a, c ? null : "utf8") + } + , + ka = function(a) { + a = ja(a, !0); + a.buffer || (a = new Uint8Array(a)); + assert(a.buffer); + return a + } + , + 1 < process.argv.length && process.argv[1].replace(/\\/g, "/"), + process.argv.slice(2), + process.on("uncaughtException", function(a) { + throw a; + }), + process.on("unhandledRejection", na), + b.inspect = function() { + return "[Emscripten Module object]" + } + ; + else if (fa) + "undefined" != typeof read && (ja = function(a) { + return read(a) + } + ), + ka = function(a) { + if ("function" === typeof readbuffer) + return new Uint8Array(readbuffer(a)); + a = read(a, "binary"); + assert("object" === typeof a); + return a + } + , + "undefined" !== typeof print && ("undefined" === typeof console && (console = {}), + console.log = print, + console.warn = console.error = "undefined" !== typeof printErr ? printErr : print); + else if (ca || da) + da ? ha = self.location.href : document.currentScript && (ha = document.currentScript.src), + _scriptDir && (ha = _scriptDir), + ha = 0 !== ha.indexOf("blob:") ? ha.substr(0, ha.lastIndexOf("/") + 1) : "", + ja = function(a) { + var c = new XMLHttpRequest; + c.open("GET", a, !1); + c.send(null); + return c.responseText + } + , + da && (ka = function(a) { + var c = new XMLHttpRequest; + c.open("GET", a, !1); + c.responseType = "arraybuffer"; + c.send(null); + return new Uint8Array(c.response) + } + ); + var oa = b.print || console.log.bind(console) + , pa = b.printErr || console.warn.bind(console); + for (ba in aa) + aa.hasOwnProperty(ba) && (b[ba] = aa[ba]); + aa = null; + var qa = [], ra, sa; + b.wasmBinary && (sa = b.wasmBinary); + var noExitRuntime; + b.noExitRuntime && (noExitRuntime = b.noExitRuntime); + "object" !== typeof WebAssembly && pa("no native wasm support detected"); + var ta, ua = new WebAssembly.Table({ + initial: 935, + maximum: 955, + element: "anyfunc" + }), va = !1; + function assert(a, c) { + a || na("Assertion failed: " + c) + } + var wa = "undefined" !== typeof TextDecoder ? new TextDecoder("utf8") : void 0; + function xa(a, c, d) { + var e = c + d; + for (d = c; a[d] && !(d >= e); ) + ++d; + if (16 < d - c && a.subarray && wa) + return wa.decode(a.subarray(c, d)); + for (e = ""; c < d; ) { + var f = a[c++]; + if (f & 128) { + var m = a[c++] & 63; + if (192 == (f & 224)) + e += String.fromCharCode((f & 31) << 6 | m); + else { + var C = a[c++] & 63; + f = 224 == (f & 240) ? (f & 15) << 12 | m << 6 | C : (f & 7) << 18 | m << 12 | C << 6 | a[c++] & 63; + 65536 > f ? e += String.fromCharCode(f) : (f -= 65536, + e += String.fromCharCode(55296 | f >> 10, 56320 | f & 1023)) + } + } else + e += String.fromCharCode(f) + } + return e + } + "undefined" !== typeof TextDecoder && new TextDecoder("utf-16le"); + var ya, za, Aa, Ba, Ca, Da, Ea = b.INITIAL_MEMORY || 67108864; + if (ta = b.wasmMemory ? b.wasmMemory : new WebAssembly.Memory({ + initial: Ea / 65536, + maximum: Ea / 65536 + })) + ya = ta.buffer; + Ea = ya.byteLength; + var Fa = ya; + ya = Fa; + b.HEAP8 = za = new Int8Array(Fa); + b.HEAP16 = new Int16Array(Fa); + b.HEAP32 = Ba = new Int32Array(Fa); + b.HEAPU8 = Aa = new Uint8Array(Fa); + b.HEAPU16 = new Uint16Array(Fa); + b.HEAPU32 = new Uint32Array(Fa); + b.HEAPF32 = Ca = new Float32Array(Fa); + b.HEAPF64 = Da = new Float64Array(Fa); + Ba[8080] = 5275360; + function Ga(a) { + for (; 0 < a.length; ) { + var c = a.shift(); + if ("function" == typeof c) + c(b); + else { + var d = c.Ky; + "number" === typeof d ? void 0 === c.vy ? b.dynCall_v(d) : b.dynCall_vi(d, c.vy) : d(void 0 === c.vy ? null : c.vy) + } + } + } + var Ha = [] + , Ia = [] + , Ja = [] + , Ka = [] + , La = !1; + function Ma() { + var a = b.preRun.shift(); + Ha.unshift(a) + } + var Na = 0 + , Oa = null + , Pa = null; + b.preloadedImages = {}; + b.preloadedAudios = {}; + function na(a) { + if (b.onAbort) + b.onAbort(a); + a += ""; + oa(a); + pa(a); + va = !0; + throw new WebAssembly.RuntimeError("abort(" + a + "). Build with -s ASSERTIONS=1 for more info."); + } + function Qa() { + var a = Ra; + return String.prototype.startsWith ? a.startsWith("data:application/octet-stream;base64,") : 0 === a.indexOf("data:application/octet-stream;base64,") + } + var Ra = "ammo.wasm.wasm"; + if (!Qa()) { + var Sa = Ra; + Ra = b.locateFile ? b.locateFile(Sa, ha) : ha + Sa + } + function Ta() { + try { + if (sa) + return new Uint8Array(sa); + if (ka) + return ka(Ra); + throw "both async and sync fetching of the wasm failed"; + } catch (a) { + na(a) + } + } + function Ua() { + return sa || !ca && !da || "function" !== typeof fetch ? new Promise(function(a) { + a(Ta()) + } + ) : fetch(Ra, { + credentials: "same-origin" + }).then(function(a) { + if (!a.ok) + throw "failed to load wasm binary file at '" + Ra + "'"; + return a.arrayBuffer() + }).catch(function() { + return Ta() + }) + } + var Va = { + 1864: function(a, c, d, e, f, m, C, P) { + a = b.getCache(b.ConcreteContactResultCallback)[a]; + if (!a.hasOwnProperty("addSingleResult")) + throw "a JSImplementation must implement all functions, you forgot ConcreteContactResultCallback::addSingleResult."; + return a.addSingleResult(c, d, e, f, m, C, P) + }, + 2424: function(a, c, d, e) { + a = b.getCache(b.DebugDrawer)[a]; + if (!a.hasOwnProperty("drawLine")) + throw "a JSImplementation must implement all functions, you forgot DebugDrawer::drawLine."; + a.drawLine(c, d, e) + }, + 2649: function(a, c, d, e, f, m) { + a = b.getCache(b.DebugDrawer)[a]; + if (!a.hasOwnProperty("drawContactPoint")) + throw "a JSImplementation must implement all functions, you forgot DebugDrawer::drawContactPoint."; + a.drawContactPoint(c, d, e, f, m) + }, + 2906: function(a, c) { + a = b.getCache(b.DebugDrawer)[a]; + if (!a.hasOwnProperty("reportErrorWarning")) + throw "a JSImplementation must implement all functions, you forgot DebugDrawer::reportErrorWarning."; + a.reportErrorWarning(c) + }, + 3153: function(a, c, d) { + a = b.getCache(b.DebugDrawer)[a]; + if (!a.hasOwnProperty("draw3dText")) + throw "a JSImplementation must implement all functions, you forgot DebugDrawer::draw3dText."; + a.draw3dText(c, d) + }, + 3380: function(a, c) { + a = b.getCache(b.DebugDrawer)[a]; + if (!a.hasOwnProperty("setDebugMode")) + throw "a JSImplementation must implement all functions, you forgot DebugDrawer::setDebugMode."; + a.setDebugMode(c) + }, + 3606: function(a) { + a = b.getCache(b.DebugDrawer)[a]; + if (!a.hasOwnProperty("getDebugMode")) + throw "a JSImplementation must implement all functions, you forgot DebugDrawer::getDebugMode."; + return a.getDebugMode() + } + }; + Ia.push({ + Ky: function() { + Wa() + } + }); + var Xa = [null, [], []]; + function Ya(a, c) { + Za || (Za = []); + var d = Za; + d.length = 0; + for (var e; e = Aa[a++]; ) + 100 === e || 102 === e ? (c = c + 7 & -8, + d.push(Da[c >> 3]), + c += 8) : (c = c + 3 & -4, + d.push(Ba[c >> 2]), + c += 4); + return d + } + var Za, $a = { + i: function() { + na() + }, + d: function(a, c, d) { + c = Ya(c, d); + return Va[a].apply(null, c) + }, + a: function(a, c, d) { + c = Ya(c, d); + return Va[a].apply(null, c) + }, + f: function(a, c, d) { + Aa.copyWithin(a, c, c + d) + }, + g: function() { + na("OOM") + }, + h: function() { + return 0 + }, + e: function() {}, + c: function(a, c, d, e) { + for (var f = 0, m = 0; m < d; m++) { + for (var C = Ba[c + 8 * m >> 2], P = Ba[c + (8 * m + 4) >> 2], ia = 0; ia < P; ia++) { + var nb = Aa[C + ia] + , Wb = Xa[a]; + 0 === nb || 10 === nb ? ((1 === a ? oa : pa)(xa(Wb, 0)), + Wb.length = 0) : Wb.push(nb) + } + f += P + } + Ba[e >> 2] = f; + return 0 + }, + b: function(a) { + var c = Date.now(); + Ba[a >> 2] = c / 1E3 | 0; + Ba[a + 4 >> 2] = c % 1E3 * 1E3 | 0; + return 0 + }, + memory: ta, + table: ua + }, ab = function() { + function a(f) { + b.asm = f.exports; + Na--; + b.monitorRunDependencies && b.monitorRunDependencies(Na); + 0 == Na && (null !== Oa && (clearInterval(Oa), + Oa = null), + Pa && (f = Pa, + Pa = null, + f())) + } + function c(f) { + a(f.instance) + } + function d(f) { + return Ua().then(function(m) { + return WebAssembly.instantiate(m, e) + }).then(f, function(m) { + pa("failed to asynchronously prepare wasm: " + m); + na(m) + }) + } + var e = { + a: $a + }; + Na++; + b.monitorRunDependencies && b.monitorRunDependencies(Na); + if (b.instantiateWasm) + try { + return b.instantiateWasm(e, a) + } catch (f) { + return pa("Module.instantiateWasm callback failed with error: " + f), + !1 + } + (function() { + if (sa || "function" !== typeof WebAssembly.instantiateStreaming || Qa() || "function" !== typeof fetch) + return d(c); + fetch(Ra, { + credentials: "same-origin" + }).then(function(f) { + return WebAssembly.instantiateStreaming(f, e).then(c, function(m) { + pa("wasm streaming compile failed: " + m); + pa("falling back to ArrayBuffer instantiation"); + d(c) + }) + }) + } + )(); + return {} + }(); + b.asm = ab; + var Wa = b.___wasm_call_ctors = function() { + return (Wa = b.___wasm_call_ctors = b.asm.j).apply(null, arguments) + } + , bb = b._emscripten_bind_btCollisionWorld_getDispatcher_0 = function() { + return (bb = b._emscripten_bind_btCollisionWorld_getDispatcher_0 = b.asm.k).apply(null, arguments) + } + , cb = b._emscripten_bind_btCollisionWorld_rayTest_3 = function() { + return (cb = b._emscripten_bind_btCollisionWorld_rayTest_3 = b.asm.l).apply(null, arguments) + } + , db = b._emscripten_bind_btCollisionWorld_getPairCache_0 = function() { + return (db = b._emscripten_bind_btCollisionWorld_getPairCache_0 = b.asm.m).apply(null, arguments) + } + , eb = b._emscripten_bind_btCollisionWorld_getDispatchInfo_0 = function() { + return (eb = b._emscripten_bind_btCollisionWorld_getDispatchInfo_0 = b.asm.n).apply(null, arguments) + } + , fb = b._emscripten_bind_btCollisionWorld_addCollisionObject_1 = function() { + return (fb = b._emscripten_bind_btCollisionWorld_addCollisionObject_1 = b.asm.o).apply(null, arguments) + } + , gb = b._emscripten_bind_btCollisionWorld_addCollisionObject_2 = function() { + return (gb = b._emscripten_bind_btCollisionWorld_addCollisionObject_2 = b.asm.p).apply(null, arguments) + } + , hb = b._emscripten_bind_btCollisionWorld_addCollisionObject_3 = function() { + return (hb = b._emscripten_bind_btCollisionWorld_addCollisionObject_3 = b.asm.q).apply(null, arguments) + } + , ib = b._emscripten_bind_btCollisionWorld_removeCollisionObject_1 = function() { + return (ib = b._emscripten_bind_btCollisionWorld_removeCollisionObject_1 = b.asm.r).apply(null, arguments) + } + , jb = b._emscripten_bind_btCollisionWorld_getBroadphase_0 = function() { + return (jb = b._emscripten_bind_btCollisionWorld_getBroadphase_0 = b.asm.s).apply(null, arguments) + } + , kb = b._emscripten_bind_btCollisionWorld_convexSweepTest_5 = function() { + return (kb = b._emscripten_bind_btCollisionWorld_convexSweepTest_5 = b.asm.t).apply(null, arguments) + } + , lb = b._emscripten_bind_btCollisionWorld_contactPairTest_3 = function() { + return (lb = b._emscripten_bind_btCollisionWorld_contactPairTest_3 = b.asm.u).apply(null, arguments) + } + , mb = b._emscripten_bind_btCollisionWorld_contactTest_2 = function() { + return (mb = b._emscripten_bind_btCollisionWorld_contactTest_2 = b.asm.v).apply(null, arguments) + } + , ob = b._emscripten_bind_btCollisionWorld_updateSingleAabb_1 = function() { + return (ob = b._emscripten_bind_btCollisionWorld_updateSingleAabb_1 = b.asm.w).apply(null, arguments) + } + , pb = b._emscripten_bind_btCollisionWorld_setDebugDrawer_1 = function() { + return (pb = b._emscripten_bind_btCollisionWorld_setDebugDrawer_1 = b.asm.x).apply(null, arguments) + } + , qb = b._emscripten_bind_btCollisionWorld_getDebugDrawer_0 = function() { + return (qb = b._emscripten_bind_btCollisionWorld_getDebugDrawer_0 = b.asm.y).apply(null, arguments) + } + , rb = b._emscripten_bind_btCollisionWorld_debugDrawWorld_0 = function() { + return (rb = b._emscripten_bind_btCollisionWorld_debugDrawWorld_0 = b.asm.z).apply(null, arguments) + } + , sb = b._emscripten_bind_btCollisionWorld_debugDrawObject_3 = function() { + return (sb = b._emscripten_bind_btCollisionWorld_debugDrawObject_3 = b.asm.A).apply(null, arguments) + } + , tb = b._emscripten_bind_btCollisionWorld___destroy___0 = function() { + return (tb = b._emscripten_bind_btCollisionWorld___destroy___0 = b.asm.B).apply(null, arguments) + } + , ub = b._emscripten_bind_btCollisionShape_setLocalScaling_1 = function() { + return (ub = b._emscripten_bind_btCollisionShape_setLocalScaling_1 = b.asm.C).apply(null, arguments) + } + , vb = b._emscripten_bind_btCollisionShape_getLocalScaling_0 = function() { + return (vb = b._emscripten_bind_btCollisionShape_getLocalScaling_0 = b.asm.D).apply(null, arguments) + } + , wb = b._emscripten_bind_btCollisionShape_calculateLocalInertia_2 = function() { + return (wb = b._emscripten_bind_btCollisionShape_calculateLocalInertia_2 = b.asm.E).apply(null, arguments) + } + , xb = b._emscripten_bind_btCollisionShape_setMargin_1 = function() { + return (xb = b._emscripten_bind_btCollisionShape_setMargin_1 = b.asm.F).apply(null, arguments) + } + , yb = b._emscripten_bind_btCollisionShape_getMargin_0 = function() { + return (yb = b._emscripten_bind_btCollisionShape_getMargin_0 = b.asm.G).apply(null, arguments) + } + , zb = b._emscripten_bind_btCollisionShape___destroy___0 = function() { + return (zb = b._emscripten_bind_btCollisionShape___destroy___0 = b.asm.H).apply(null, arguments) + } + , Ab = b._emscripten_bind_btCollisionObject_setAnisotropicFriction_2 = function() { + return (Ab = b._emscripten_bind_btCollisionObject_setAnisotropicFriction_2 = b.asm.I).apply(null, arguments) + } + , Bb = b._emscripten_bind_btCollisionObject_getCollisionShape_0 = function() { + return (Bb = b._emscripten_bind_btCollisionObject_getCollisionShape_0 = b.asm.J).apply(null, arguments) + } + , Cb = b._emscripten_bind_btCollisionObject_setContactProcessingThreshold_1 = function() { + return (Cb = b._emscripten_bind_btCollisionObject_setContactProcessingThreshold_1 = b.asm.K).apply(null, arguments) + } + , Db = b._emscripten_bind_btCollisionObject_setActivationState_1 = function() { + return (Db = b._emscripten_bind_btCollisionObject_setActivationState_1 = b.asm.L).apply(null, arguments) + } + , Eb = b._emscripten_bind_btCollisionObject_forceActivationState_1 = function() { + return (Eb = b._emscripten_bind_btCollisionObject_forceActivationState_1 = b.asm.M).apply(null, arguments) + } + , Fb = b._emscripten_bind_btCollisionObject_activate_0 = function() { + return (Fb = b._emscripten_bind_btCollisionObject_activate_0 = b.asm.N).apply(null, arguments) + } + , Gb = b._emscripten_bind_btCollisionObject_activate_1 = function() { + return (Gb = b._emscripten_bind_btCollisionObject_activate_1 = b.asm.O).apply(null, arguments) + } + , Hb = b._emscripten_bind_btCollisionObject_isActive_0 = function() { + return (Hb = b._emscripten_bind_btCollisionObject_isActive_0 = b.asm.P).apply(null, arguments) + } + , Ib = b._emscripten_bind_btCollisionObject_isKinematicObject_0 = function() { + return (Ib = b._emscripten_bind_btCollisionObject_isKinematicObject_0 = b.asm.Q).apply(null, arguments) + } + , Jb = b._emscripten_bind_btCollisionObject_isStaticObject_0 = function() { + return (Jb = b._emscripten_bind_btCollisionObject_isStaticObject_0 = b.asm.R).apply(null, arguments) + } + , Kb = b._emscripten_bind_btCollisionObject_isStaticOrKinematicObject_0 = function() { + return (Kb = b._emscripten_bind_btCollisionObject_isStaticOrKinematicObject_0 = b.asm.S).apply(null, arguments) + } + , Lb = b._emscripten_bind_btCollisionObject_getRestitution_0 = function() { + return (Lb = b._emscripten_bind_btCollisionObject_getRestitution_0 = b.asm.T).apply(null, arguments) + } + , Mb = b._emscripten_bind_btCollisionObject_getFriction_0 = function() { + return (Mb = b._emscripten_bind_btCollisionObject_getFriction_0 = b.asm.U).apply(null, arguments) + } + , Nb = b._emscripten_bind_btCollisionObject_getRollingFriction_0 = function() { + return (Nb = b._emscripten_bind_btCollisionObject_getRollingFriction_0 = b.asm.V).apply(null, arguments) + } + , Ob = b._emscripten_bind_btCollisionObject_setRestitution_1 = function() { + return (Ob = b._emscripten_bind_btCollisionObject_setRestitution_1 = b.asm.W).apply(null, arguments) + } + , Pb = b._emscripten_bind_btCollisionObject_setFriction_1 = function() { + return (Pb = b._emscripten_bind_btCollisionObject_setFriction_1 = b.asm.X).apply(null, arguments) + } + , Qb = b._emscripten_bind_btCollisionObject_setRollingFriction_1 = function() { + return (Qb = b._emscripten_bind_btCollisionObject_setRollingFriction_1 = b.asm.Y).apply(null, arguments) + } + , Rb = b._emscripten_bind_btCollisionObject_getWorldTransform_0 = function() { + return (Rb = b._emscripten_bind_btCollisionObject_getWorldTransform_0 = b.asm.Z).apply(null, arguments) + } + , Sb = b._emscripten_bind_btCollisionObject_getCollisionFlags_0 = function() { + return (Sb = b._emscripten_bind_btCollisionObject_getCollisionFlags_0 = b.asm._).apply(null, arguments) + } + , Tb = b._emscripten_bind_btCollisionObject_setCollisionFlags_1 = function() { + return (Tb = b._emscripten_bind_btCollisionObject_setCollisionFlags_1 = b.asm.$).apply(null, arguments) + } + , Ub = b._emscripten_bind_btCollisionObject_setWorldTransform_1 = function() { + return (Ub = b._emscripten_bind_btCollisionObject_setWorldTransform_1 = b.asm.aa).apply(null, arguments) + } + , Vb = b._emscripten_bind_btCollisionObject_setCollisionShape_1 = function() { + return (Vb = b._emscripten_bind_btCollisionObject_setCollisionShape_1 = b.asm.ba).apply(null, arguments) + } + , Xb = b._emscripten_bind_btCollisionObject_setCcdMotionThreshold_1 = function() { + return (Xb = b._emscripten_bind_btCollisionObject_setCcdMotionThreshold_1 = b.asm.ca).apply(null, arguments) + } + , Yb = b._emscripten_bind_btCollisionObject_setCcdSweptSphereRadius_1 = function() { + return (Yb = b._emscripten_bind_btCollisionObject_setCcdSweptSphereRadius_1 = b.asm.da).apply(null, arguments) + } + , Zb = b._emscripten_bind_btCollisionObject_getUserIndex_0 = function() { + return (Zb = b._emscripten_bind_btCollisionObject_getUserIndex_0 = b.asm.ea).apply(null, arguments) + } + , $b = b._emscripten_bind_btCollisionObject_setUserIndex_1 = function() { + return ($b = b._emscripten_bind_btCollisionObject_setUserIndex_1 = b.asm.fa).apply(null, arguments) + } + , ac = b._emscripten_bind_btCollisionObject_getUserPointer_0 = function() { + return (ac = b._emscripten_bind_btCollisionObject_getUserPointer_0 = b.asm.ga).apply(null, arguments) + } + , bc = b._emscripten_bind_btCollisionObject_setUserPointer_1 = function() { + return (bc = b._emscripten_bind_btCollisionObject_setUserPointer_1 = b.asm.ha).apply(null, arguments) + } + , cc = b._emscripten_bind_btCollisionObject_getBroadphaseHandle_0 = function() { + return (cc = b._emscripten_bind_btCollisionObject_getBroadphaseHandle_0 = b.asm.ia).apply(null, arguments) + } + , dc = b._emscripten_bind_btCollisionObject___destroy___0 = function() { + return (dc = b._emscripten_bind_btCollisionObject___destroy___0 = b.asm.ja).apply(null, arguments) + } + , ec = b._emscripten_bind_btDynamicsWorld_addAction_1 = function() { + return (ec = b._emscripten_bind_btDynamicsWorld_addAction_1 = b.asm.ka).apply(null, arguments) + } + , fc = b._emscripten_bind_btDynamicsWorld_removeAction_1 = function() { + return (fc = b._emscripten_bind_btDynamicsWorld_removeAction_1 = b.asm.la).apply(null, arguments) + } + , hc = b._emscripten_bind_btDynamicsWorld_getSolverInfo_0 = function() { + return (hc = b._emscripten_bind_btDynamicsWorld_getSolverInfo_0 = b.asm.ma).apply(null, arguments) + } + , ic = b._emscripten_bind_btDynamicsWorld_setInternalTickCallback_1 = function() { + return (ic = b._emscripten_bind_btDynamicsWorld_setInternalTickCallback_1 = b.asm.na).apply(null, arguments) + } + , jc = b._emscripten_bind_btDynamicsWorld_setInternalTickCallback_2 = function() { + return (jc = b._emscripten_bind_btDynamicsWorld_setInternalTickCallback_2 = b.asm.oa).apply(null, arguments) + } + , kc = b._emscripten_bind_btDynamicsWorld_setInternalTickCallback_3 = function() { + return (kc = b._emscripten_bind_btDynamicsWorld_setInternalTickCallback_3 = b.asm.pa).apply(null, arguments) + } + , lc = b._emscripten_bind_btDynamicsWorld_getDispatcher_0 = function() { + return (lc = b._emscripten_bind_btDynamicsWorld_getDispatcher_0 = b.asm.qa).apply(null, arguments) + } + , mc = b._emscripten_bind_btDynamicsWorld_rayTest_3 = function() { + return (mc = b._emscripten_bind_btDynamicsWorld_rayTest_3 = b.asm.ra).apply(null, arguments) + } + , nc = b._emscripten_bind_btDynamicsWorld_getPairCache_0 = function() { + return (nc = b._emscripten_bind_btDynamicsWorld_getPairCache_0 = b.asm.sa).apply(null, arguments) + } + , oc = b._emscripten_bind_btDynamicsWorld_getDispatchInfo_0 = function() { + return (oc = b._emscripten_bind_btDynamicsWorld_getDispatchInfo_0 = b.asm.ta).apply(null, arguments) + } + , pc = b._emscripten_bind_btDynamicsWorld_addCollisionObject_1 = function() { + return (pc = b._emscripten_bind_btDynamicsWorld_addCollisionObject_1 = b.asm.ua).apply(null, arguments) + } + , qc = b._emscripten_bind_btDynamicsWorld_addCollisionObject_2 = function() { + return (qc = b._emscripten_bind_btDynamicsWorld_addCollisionObject_2 = b.asm.va).apply(null, arguments) + } + , rc = b._emscripten_bind_btDynamicsWorld_addCollisionObject_3 = function() { + return (rc = b._emscripten_bind_btDynamicsWorld_addCollisionObject_3 = b.asm.wa).apply(null, arguments) + } + , sc = b._emscripten_bind_btDynamicsWorld_removeCollisionObject_1 = function() { + return (sc = b._emscripten_bind_btDynamicsWorld_removeCollisionObject_1 = b.asm.xa).apply(null, arguments) + } + , tc = b._emscripten_bind_btDynamicsWorld_getBroadphase_0 = function() { + return (tc = b._emscripten_bind_btDynamicsWorld_getBroadphase_0 = b.asm.ya).apply(null, arguments) + } + , uc = b._emscripten_bind_btDynamicsWorld_convexSweepTest_5 = function() { + return (uc = b._emscripten_bind_btDynamicsWorld_convexSweepTest_5 = b.asm.za).apply(null, arguments) + } + , vc = b._emscripten_bind_btDynamicsWorld_contactPairTest_3 = function() { + return (vc = b._emscripten_bind_btDynamicsWorld_contactPairTest_3 = b.asm.Aa).apply(null, arguments) + } + , wc = b._emscripten_bind_btDynamicsWorld_contactTest_2 = function() { + return (wc = b._emscripten_bind_btDynamicsWorld_contactTest_2 = b.asm.Ba).apply(null, arguments) + } + , xc = b._emscripten_bind_btDynamicsWorld_updateSingleAabb_1 = function() { + return (xc = b._emscripten_bind_btDynamicsWorld_updateSingleAabb_1 = b.asm.Ca).apply(null, arguments) + } + , yc = b._emscripten_bind_btDynamicsWorld_setDebugDrawer_1 = function() { + return (yc = b._emscripten_bind_btDynamicsWorld_setDebugDrawer_1 = b.asm.Da).apply(null, arguments) + } + , zc = b._emscripten_bind_btDynamicsWorld_getDebugDrawer_0 = function() { + return (zc = b._emscripten_bind_btDynamicsWorld_getDebugDrawer_0 = b.asm.Ea).apply(null, arguments) + } + , Ac = b._emscripten_bind_btDynamicsWorld_debugDrawWorld_0 = function() { + return (Ac = b._emscripten_bind_btDynamicsWorld_debugDrawWorld_0 = b.asm.Fa).apply(null, arguments) + } + , Bc = b._emscripten_bind_btDynamicsWorld_debugDrawObject_3 = function() { + return (Bc = b._emscripten_bind_btDynamicsWorld_debugDrawObject_3 = b.asm.Ga).apply(null, arguments) + } + , Cc = b._emscripten_bind_btDynamicsWorld___destroy___0 = function() { + return (Cc = b._emscripten_bind_btDynamicsWorld___destroy___0 = b.asm.Ha).apply(null, arguments) + } + , Dc = b._emscripten_bind_btTypedConstraint_enableFeedback_1 = function() { + return (Dc = b._emscripten_bind_btTypedConstraint_enableFeedback_1 = b.asm.Ia).apply(null, arguments) + } + , Ec = b._emscripten_bind_btTypedConstraint_getBreakingImpulseThreshold_0 = function() { + return (Ec = b._emscripten_bind_btTypedConstraint_getBreakingImpulseThreshold_0 = b.asm.Ja).apply(null, arguments) + } + , Fc = b._emscripten_bind_btTypedConstraint_setBreakingImpulseThreshold_1 = function() { + return (Fc = b._emscripten_bind_btTypedConstraint_setBreakingImpulseThreshold_1 = b.asm.Ka).apply(null, arguments) + } + , Gc = b._emscripten_bind_btTypedConstraint_getParam_2 = function() { + return (Gc = b._emscripten_bind_btTypedConstraint_getParam_2 = b.asm.La).apply(null, arguments) + } + , Hc = b._emscripten_bind_btTypedConstraint_setParam_3 = function() { + return (Hc = b._emscripten_bind_btTypedConstraint_setParam_3 = b.asm.Ma).apply(null, arguments) + } + , Ic = b._emscripten_bind_btTypedConstraint___destroy___0 = function() { + return (Ic = b._emscripten_bind_btTypedConstraint___destroy___0 = b.asm.Na).apply(null, arguments) + } + , Jc = b._emscripten_bind_btConcaveShape_setLocalScaling_1 = function() { + return (Jc = b._emscripten_bind_btConcaveShape_setLocalScaling_1 = b.asm.Oa).apply(null, arguments) + } + , Kc = b._emscripten_bind_btConcaveShape_getLocalScaling_0 = function() { + return (Kc = b._emscripten_bind_btConcaveShape_getLocalScaling_0 = b.asm.Pa).apply(null, arguments) + } + , Lc = b._emscripten_bind_btConcaveShape_calculateLocalInertia_2 = function() { + return (Lc = b._emscripten_bind_btConcaveShape_calculateLocalInertia_2 = b.asm.Qa).apply(null, arguments) + } + , Mc = b._emscripten_bind_btConcaveShape___destroy___0 = function() { + return (Mc = b._emscripten_bind_btConcaveShape___destroy___0 = b.asm.Ra).apply(null, arguments) + } + , Nc = b._emscripten_bind_btCapsuleShape_btCapsuleShape_2 = function() { + return (Nc = b._emscripten_bind_btCapsuleShape_btCapsuleShape_2 = b.asm.Sa).apply(null, arguments) + } + , Oc = b._emscripten_bind_btCapsuleShape_setMargin_1 = function() { + return (Oc = b._emscripten_bind_btCapsuleShape_setMargin_1 = b.asm.Ta).apply(null, arguments) + } + , Pc = b._emscripten_bind_btCapsuleShape_getMargin_0 = function() { + return (Pc = b._emscripten_bind_btCapsuleShape_getMargin_0 = b.asm.Ua).apply(null, arguments) + } + , Qc = b._emscripten_bind_btCapsuleShape_getUpAxis_0 = function() { + return (Qc = b._emscripten_bind_btCapsuleShape_getUpAxis_0 = b.asm.Va).apply(null, arguments) + } + , Rc = b._emscripten_bind_btCapsuleShape_getRadius_0 = function() { + return (Rc = b._emscripten_bind_btCapsuleShape_getRadius_0 = b.asm.Wa).apply(null, arguments) + } + , Sc = b._emscripten_bind_btCapsuleShape_getHalfHeight_0 = function() { + return (Sc = b._emscripten_bind_btCapsuleShape_getHalfHeight_0 = b.asm.Xa).apply(null, arguments) + } + , Tc = b._emscripten_bind_btCapsuleShape_setLocalScaling_1 = function() { + return (Tc = b._emscripten_bind_btCapsuleShape_setLocalScaling_1 = b.asm.Ya).apply(null, arguments) + } + , Uc = b._emscripten_bind_btCapsuleShape_getLocalScaling_0 = function() { + return (Uc = b._emscripten_bind_btCapsuleShape_getLocalScaling_0 = b.asm.Za).apply(null, arguments) + } + , Vc = b._emscripten_bind_btCapsuleShape_calculateLocalInertia_2 = function() { + return (Vc = b._emscripten_bind_btCapsuleShape_calculateLocalInertia_2 = b.asm._a).apply(null, arguments) + } + , Wc = b._emscripten_bind_btCapsuleShape___destroy___0 = function() { + return (Wc = b._emscripten_bind_btCapsuleShape___destroy___0 = b.asm.$a).apply(null, arguments) + } + , Xc = b._emscripten_bind_btIDebugDraw_drawLine_3 = function() { + return (Xc = b._emscripten_bind_btIDebugDraw_drawLine_3 = b.asm.ab).apply(null, arguments) + } + , Yc = b._emscripten_bind_btIDebugDraw_drawContactPoint_5 = function() { + return (Yc = b._emscripten_bind_btIDebugDraw_drawContactPoint_5 = b.asm.bb).apply(null, arguments) + } + , Zc = b._emscripten_bind_btIDebugDraw_reportErrorWarning_1 = function() { + return (Zc = b._emscripten_bind_btIDebugDraw_reportErrorWarning_1 = b.asm.cb).apply(null, arguments) + } + , $c = b._emscripten_bind_btIDebugDraw_draw3dText_2 = function() { + return ($c = b._emscripten_bind_btIDebugDraw_draw3dText_2 = b.asm.db).apply(null, arguments) + } + , ad = b._emscripten_bind_btIDebugDraw_setDebugMode_1 = function() { + return (ad = b._emscripten_bind_btIDebugDraw_setDebugMode_1 = b.asm.eb).apply(null, arguments) + } + , bd = b._emscripten_bind_btIDebugDraw_getDebugMode_0 = function() { + return (bd = b._emscripten_bind_btIDebugDraw_getDebugMode_0 = b.asm.fb).apply(null, arguments) + } + , cd = b._emscripten_bind_btIDebugDraw___destroy___0 = function() { + return (cd = b._emscripten_bind_btIDebugDraw___destroy___0 = b.asm.gb).apply(null, arguments) + } + , dd = b._emscripten_bind_btDefaultCollisionConfiguration_btDefaultCollisionConfiguration_0 = function() { + return (dd = b._emscripten_bind_btDefaultCollisionConfiguration_btDefaultCollisionConfiguration_0 = b.asm.hb).apply(null, arguments) + } + , ed = b._emscripten_bind_btDefaultCollisionConfiguration_btDefaultCollisionConfiguration_1 = function() { + return (ed = b._emscripten_bind_btDefaultCollisionConfiguration_btDefaultCollisionConfiguration_1 = b.asm.ib).apply(null, arguments) + } + , fd = b._emscripten_bind_btDefaultCollisionConfiguration___destroy___0 = function() { + return (fd = b._emscripten_bind_btDefaultCollisionConfiguration___destroy___0 = b.asm.jb).apply(null, arguments) + } + , gd = b._emscripten_bind_btTriangleMeshShape_setLocalScaling_1 = function() { + return (gd = b._emscripten_bind_btTriangleMeshShape_setLocalScaling_1 = b.asm.kb).apply(null, arguments) + } + , hd = b._emscripten_bind_btTriangleMeshShape_getLocalScaling_0 = function() { + return (hd = b._emscripten_bind_btTriangleMeshShape_getLocalScaling_0 = b.asm.lb).apply(null, arguments) + } + , id = b._emscripten_bind_btTriangleMeshShape_calculateLocalInertia_2 = function() { + return (id = b._emscripten_bind_btTriangleMeshShape_calculateLocalInertia_2 = b.asm.mb).apply(null, arguments) + } + , jd = b._emscripten_bind_btTriangleMeshShape___destroy___0 = function() { + return (jd = b._emscripten_bind_btTriangleMeshShape___destroy___0 = b.asm.nb).apply(null, arguments) + } + , kd = b._emscripten_bind_btGhostObject_btGhostObject_0 = function() { + return (kd = b._emscripten_bind_btGhostObject_btGhostObject_0 = b.asm.ob).apply(null, arguments) + } + , ld = b._emscripten_bind_btGhostObject_getNumOverlappingObjects_0 = function() { + return (ld = b._emscripten_bind_btGhostObject_getNumOverlappingObjects_0 = b.asm.pb).apply(null, arguments) + } + , md = b._emscripten_bind_btGhostObject_getOverlappingObject_1 = function() { + return (md = b._emscripten_bind_btGhostObject_getOverlappingObject_1 = b.asm.qb).apply(null, arguments) + } + , nd = b._emscripten_bind_btGhostObject_setAnisotropicFriction_2 = function() { + return (nd = b._emscripten_bind_btGhostObject_setAnisotropicFriction_2 = b.asm.rb).apply(null, arguments) + } + , od = b._emscripten_bind_btGhostObject_getCollisionShape_0 = function() { + return (od = b._emscripten_bind_btGhostObject_getCollisionShape_0 = b.asm.sb).apply(null, arguments) + } + , pd = b._emscripten_bind_btGhostObject_setContactProcessingThreshold_1 = function() { + return (pd = b._emscripten_bind_btGhostObject_setContactProcessingThreshold_1 = b.asm.tb).apply(null, arguments) + } + , qd = b._emscripten_bind_btGhostObject_setActivationState_1 = function() { + return (qd = b._emscripten_bind_btGhostObject_setActivationState_1 = b.asm.ub).apply(null, arguments) + } + , rd = b._emscripten_bind_btGhostObject_forceActivationState_1 = function() { + return (rd = b._emscripten_bind_btGhostObject_forceActivationState_1 = b.asm.vb).apply(null, arguments) + } + , sd = b._emscripten_bind_btGhostObject_activate_0 = function() { + return (sd = b._emscripten_bind_btGhostObject_activate_0 = b.asm.wb).apply(null, arguments) + } + , td = b._emscripten_bind_btGhostObject_activate_1 = function() { + return (td = b._emscripten_bind_btGhostObject_activate_1 = b.asm.xb).apply(null, arguments) + } + , ud = b._emscripten_bind_btGhostObject_isActive_0 = function() { + return (ud = b._emscripten_bind_btGhostObject_isActive_0 = b.asm.yb).apply(null, arguments) + } + , vd = b._emscripten_bind_btGhostObject_isKinematicObject_0 = function() { + return (vd = b._emscripten_bind_btGhostObject_isKinematicObject_0 = b.asm.zb).apply(null, arguments) + } + , wd = b._emscripten_bind_btGhostObject_isStaticObject_0 = function() { + return (wd = b._emscripten_bind_btGhostObject_isStaticObject_0 = b.asm.Ab).apply(null, arguments) + } + , xd = b._emscripten_bind_btGhostObject_isStaticOrKinematicObject_0 = function() { + return (xd = b._emscripten_bind_btGhostObject_isStaticOrKinematicObject_0 = b.asm.Bb).apply(null, arguments) + } + , yd = b._emscripten_bind_btGhostObject_getRestitution_0 = function() { + return (yd = b._emscripten_bind_btGhostObject_getRestitution_0 = b.asm.Cb).apply(null, arguments) + } + , zd = b._emscripten_bind_btGhostObject_getFriction_0 = function() { + return (zd = b._emscripten_bind_btGhostObject_getFriction_0 = b.asm.Db).apply(null, arguments) + } + , Ad = b._emscripten_bind_btGhostObject_getRollingFriction_0 = function() { + return (Ad = b._emscripten_bind_btGhostObject_getRollingFriction_0 = b.asm.Eb).apply(null, arguments) + } + , Bd = b._emscripten_bind_btGhostObject_setRestitution_1 = function() { + return (Bd = b._emscripten_bind_btGhostObject_setRestitution_1 = b.asm.Fb).apply(null, arguments) + } + , Cd = b._emscripten_bind_btGhostObject_setFriction_1 = function() { + return (Cd = b._emscripten_bind_btGhostObject_setFriction_1 = b.asm.Gb).apply(null, arguments) + } + , Dd = b._emscripten_bind_btGhostObject_setRollingFriction_1 = function() { + return (Dd = b._emscripten_bind_btGhostObject_setRollingFriction_1 = b.asm.Hb).apply(null, arguments) + } + , Ed = b._emscripten_bind_btGhostObject_getWorldTransform_0 = function() { + return (Ed = b._emscripten_bind_btGhostObject_getWorldTransform_0 = b.asm.Ib).apply(null, arguments) + } + , Fd = b._emscripten_bind_btGhostObject_getCollisionFlags_0 = function() { + return (Fd = b._emscripten_bind_btGhostObject_getCollisionFlags_0 = b.asm.Jb).apply(null, arguments) + } + , Gd = b._emscripten_bind_btGhostObject_setCollisionFlags_1 = function() { + return (Gd = b._emscripten_bind_btGhostObject_setCollisionFlags_1 = b.asm.Kb).apply(null, arguments) + } + , Hd = b._emscripten_bind_btGhostObject_setWorldTransform_1 = function() { + return (Hd = b._emscripten_bind_btGhostObject_setWorldTransform_1 = b.asm.Lb).apply(null, arguments) + } + , Id = b._emscripten_bind_btGhostObject_setCollisionShape_1 = function() { + return (Id = b._emscripten_bind_btGhostObject_setCollisionShape_1 = b.asm.Mb).apply(null, arguments) + } + , Jd = b._emscripten_bind_btGhostObject_setCcdMotionThreshold_1 = function() { + return (Jd = b._emscripten_bind_btGhostObject_setCcdMotionThreshold_1 = b.asm.Nb).apply(null, arguments) + } + , Kd = b._emscripten_bind_btGhostObject_setCcdSweptSphereRadius_1 = function() { + return (Kd = b._emscripten_bind_btGhostObject_setCcdSweptSphereRadius_1 = b.asm.Ob).apply(null, arguments) + } + , Ld = b._emscripten_bind_btGhostObject_getUserIndex_0 = function() { + return (Ld = b._emscripten_bind_btGhostObject_getUserIndex_0 = b.asm.Pb).apply(null, arguments) + } + , Md = b._emscripten_bind_btGhostObject_setUserIndex_1 = function() { + return (Md = b._emscripten_bind_btGhostObject_setUserIndex_1 = b.asm.Qb).apply(null, arguments) + } + , Nd = b._emscripten_bind_btGhostObject_getUserPointer_0 = function() { + return (Nd = b._emscripten_bind_btGhostObject_getUserPointer_0 = b.asm.Rb).apply(null, arguments) + } + , Od = b._emscripten_bind_btGhostObject_setUserPointer_1 = function() { + return (Od = b._emscripten_bind_btGhostObject_setUserPointer_1 = b.asm.Sb).apply(null, arguments) + } + , Pd = b._emscripten_bind_btGhostObject_getBroadphaseHandle_0 = function() { + return (Pd = b._emscripten_bind_btGhostObject_getBroadphaseHandle_0 = b.asm.Tb).apply(null, arguments) + } + , Qd = b._emscripten_bind_btGhostObject___destroy___0 = function() { + return (Qd = b._emscripten_bind_btGhostObject___destroy___0 = b.asm.Ub).apply(null, arguments) + } + , Rd = b._emscripten_bind_btConeShape_btConeShape_2 = function() { + return (Rd = b._emscripten_bind_btConeShape_btConeShape_2 = b.asm.Vb).apply(null, arguments) + } + , Sd = b._emscripten_bind_btConeShape_setLocalScaling_1 = function() { + return (Sd = b._emscripten_bind_btConeShape_setLocalScaling_1 = b.asm.Wb).apply(null, arguments) + } + , Td = b._emscripten_bind_btConeShape_getLocalScaling_0 = function() { + return (Td = b._emscripten_bind_btConeShape_getLocalScaling_0 = b.asm.Xb).apply(null, arguments) + } + , Ud = b._emscripten_bind_btConeShape_calculateLocalInertia_2 = function() { + return (Ud = b._emscripten_bind_btConeShape_calculateLocalInertia_2 = b.asm.Yb).apply(null, arguments) + } + , Vd = b._emscripten_bind_btConeShape___destroy___0 = function() { + return (Vd = b._emscripten_bind_btConeShape___destroy___0 = b.asm.Zb).apply(null, arguments) + } + , Wd = b._emscripten_bind_btActionInterface_updateAction_2 = function() { + return (Wd = b._emscripten_bind_btActionInterface_updateAction_2 = b.asm._b).apply(null, arguments) + } + , Xd = b._emscripten_bind_btActionInterface___destroy___0 = function() { + return (Xd = b._emscripten_bind_btActionInterface___destroy___0 = b.asm.$b).apply(null, arguments) + } + , Yd = b._emscripten_bind_btVector3_btVector3_0 = function() { + return (Yd = b._emscripten_bind_btVector3_btVector3_0 = b.asm.ac).apply(null, arguments) + } + , Zd = b._emscripten_bind_btVector3_btVector3_3 = function() { + return (Zd = b._emscripten_bind_btVector3_btVector3_3 = b.asm.bc).apply(null, arguments) + } + , $d = b._emscripten_bind_btVector3_length_0 = function() { + return ($d = b._emscripten_bind_btVector3_length_0 = b.asm.cc).apply(null, arguments) + } + , ae = b._emscripten_bind_btVector3_x_0 = function() { + return (ae = b._emscripten_bind_btVector3_x_0 = b.asm.dc).apply(null, arguments) + } + , be = b._emscripten_bind_btVector3_y_0 = function() { + return (be = b._emscripten_bind_btVector3_y_0 = b.asm.ec).apply(null, arguments) + } + , ce = b._emscripten_bind_btVector3_z_0 = function() { + return (ce = b._emscripten_bind_btVector3_z_0 = b.asm.fc).apply(null, arguments) + } + , de = b._emscripten_bind_btVector3_setX_1 = function() { + return (de = b._emscripten_bind_btVector3_setX_1 = b.asm.gc).apply(null, arguments) + } + , ee = b._emscripten_bind_btVector3_setY_1 = function() { + return (ee = b._emscripten_bind_btVector3_setY_1 = b.asm.hc).apply(null, arguments) + } + , fe = b._emscripten_bind_btVector3_setZ_1 = function() { + return (fe = b._emscripten_bind_btVector3_setZ_1 = b.asm.ic).apply(null, arguments) + } + , ge = b._emscripten_bind_btVector3_setValue_3 = function() { + return (ge = b._emscripten_bind_btVector3_setValue_3 = b.asm.jc).apply(null, arguments) + } + , he = b._emscripten_bind_btVector3_normalize_0 = function() { + return (he = b._emscripten_bind_btVector3_normalize_0 = b.asm.kc).apply(null, arguments) + } + , ie = b._emscripten_bind_btVector3_rotate_2 = function() { + return (ie = b._emscripten_bind_btVector3_rotate_2 = b.asm.lc).apply(null, arguments) + } + , je = b._emscripten_bind_btVector3_dot_1 = function() { + return (je = b._emscripten_bind_btVector3_dot_1 = b.asm.mc).apply(null, arguments) + } + , ke = b._emscripten_bind_btVector3_op_mul_1 = function() { + return (ke = b._emscripten_bind_btVector3_op_mul_1 = b.asm.nc).apply(null, arguments) + } + , le = b._emscripten_bind_btVector3_op_add_1 = function() { + return (le = b._emscripten_bind_btVector3_op_add_1 = b.asm.oc).apply(null, arguments) + } + , me = b._emscripten_bind_btVector3_op_sub_1 = function() { + return (me = b._emscripten_bind_btVector3_op_sub_1 = b.asm.pc).apply(null, arguments) + } + , ne = b._emscripten_bind_btVector3___destroy___0 = function() { + return (ne = b._emscripten_bind_btVector3___destroy___0 = b.asm.qc).apply(null, arguments) + } + , oe = b._emscripten_bind_btVehicleRaycaster_castRay_3 = function() { + return (oe = b._emscripten_bind_btVehicleRaycaster_castRay_3 = b.asm.rc).apply(null, arguments) + } + , pe = b._emscripten_bind_btVehicleRaycaster___destroy___0 = function() { + return (pe = b._emscripten_bind_btVehicleRaycaster___destroy___0 = b.asm.sc).apply(null, arguments) + } + , qe = b._emscripten_bind_btQuadWord_x_0 = function() { + return (qe = b._emscripten_bind_btQuadWord_x_0 = b.asm.tc).apply(null, arguments) + } + , re = b._emscripten_bind_btQuadWord_y_0 = function() { + return (re = b._emscripten_bind_btQuadWord_y_0 = b.asm.uc).apply(null, arguments) + } + , se = b._emscripten_bind_btQuadWord_z_0 = function() { + return (se = b._emscripten_bind_btQuadWord_z_0 = b.asm.vc).apply(null, arguments) + } + , te = b._emscripten_bind_btQuadWord_w_0 = function() { + return (te = b._emscripten_bind_btQuadWord_w_0 = b.asm.wc).apply(null, arguments) + } + , ue = b._emscripten_bind_btQuadWord_setX_1 = function() { + return (ue = b._emscripten_bind_btQuadWord_setX_1 = b.asm.xc).apply(null, arguments) + } + , ve = b._emscripten_bind_btQuadWord_setY_1 = function() { + return (ve = b._emscripten_bind_btQuadWord_setY_1 = b.asm.yc).apply(null, arguments) + } + , we = b._emscripten_bind_btQuadWord_setZ_1 = function() { + return (we = b._emscripten_bind_btQuadWord_setZ_1 = b.asm.zc).apply(null, arguments) + } + , xe = b._emscripten_bind_btQuadWord_setW_1 = function() { + return (xe = b._emscripten_bind_btQuadWord_setW_1 = b.asm.Ac).apply(null, arguments) + } + , ye = b._emscripten_bind_btQuadWord___destroy___0 = function() { + return (ye = b._emscripten_bind_btQuadWord___destroy___0 = b.asm.Bc).apply(null, arguments) + } + , ze = b._emscripten_bind_btCylinderShape_btCylinderShape_1 = function() { + return (ze = b._emscripten_bind_btCylinderShape_btCylinderShape_1 = b.asm.Cc).apply(null, arguments) + } + , Ae = b._emscripten_bind_btCylinderShape_setMargin_1 = function() { + return (Ae = b._emscripten_bind_btCylinderShape_setMargin_1 = b.asm.Dc).apply(null, arguments) + } + , Be = b._emscripten_bind_btCylinderShape_getMargin_0 = function() { + return (Be = b._emscripten_bind_btCylinderShape_getMargin_0 = b.asm.Ec).apply(null, arguments) + } + , Ce = b._emscripten_bind_btCylinderShape_setLocalScaling_1 = function() { + return (Ce = b._emscripten_bind_btCylinderShape_setLocalScaling_1 = b.asm.Fc).apply(null, arguments) + } + , De = b._emscripten_bind_btCylinderShape_getLocalScaling_0 = function() { + return (De = b._emscripten_bind_btCylinderShape_getLocalScaling_0 = b.asm.Gc).apply(null, arguments) + } + , Ee = b._emscripten_bind_btCylinderShape_calculateLocalInertia_2 = function() { + return (Ee = b._emscripten_bind_btCylinderShape_calculateLocalInertia_2 = b.asm.Hc).apply(null, arguments) + } + , Fe = b._emscripten_bind_btCylinderShape___destroy___0 = function() { + return (Fe = b._emscripten_bind_btCylinderShape___destroy___0 = b.asm.Ic).apply(null, arguments) + } + , Ge = b._emscripten_bind_btDiscreteDynamicsWorld_btDiscreteDynamicsWorld_4 = function() { + return (Ge = b._emscripten_bind_btDiscreteDynamicsWorld_btDiscreteDynamicsWorld_4 = b.asm.Jc).apply(null, arguments) + } + , He = b._emscripten_bind_btDiscreteDynamicsWorld_setGravity_1 = function() { + return (He = b._emscripten_bind_btDiscreteDynamicsWorld_setGravity_1 = b.asm.Kc).apply(null, arguments) + } + , Ie = b._emscripten_bind_btDiscreteDynamicsWorld_getGravity_0 = function() { + return (Ie = b._emscripten_bind_btDiscreteDynamicsWorld_getGravity_0 = b.asm.Lc).apply(null, arguments) + } + , Je = b._emscripten_bind_btDiscreteDynamicsWorld_addRigidBody_1 = function() { + return (Je = b._emscripten_bind_btDiscreteDynamicsWorld_addRigidBody_1 = b.asm.Mc).apply(null, arguments) + } + , Ke = b._emscripten_bind_btDiscreteDynamicsWorld_addRigidBody_3 = function() { + return (Ke = b._emscripten_bind_btDiscreteDynamicsWorld_addRigidBody_3 = b.asm.Nc).apply(null, arguments) + } + , Le = b._emscripten_bind_btDiscreteDynamicsWorld_removeRigidBody_1 = function() { + return (Le = b._emscripten_bind_btDiscreteDynamicsWorld_removeRigidBody_1 = b.asm.Oc).apply(null, arguments) + } + , Me = b._emscripten_bind_btDiscreteDynamicsWorld_addConstraint_1 = function() { + return (Me = b._emscripten_bind_btDiscreteDynamicsWorld_addConstraint_1 = b.asm.Pc).apply(null, arguments) + } + , Ne = b._emscripten_bind_btDiscreteDynamicsWorld_addConstraint_2 = function() { + return (Ne = b._emscripten_bind_btDiscreteDynamicsWorld_addConstraint_2 = b.asm.Qc).apply(null, arguments) + } + , Oe = b._emscripten_bind_btDiscreteDynamicsWorld_removeConstraint_1 = function() { + return (Oe = b._emscripten_bind_btDiscreteDynamicsWorld_removeConstraint_1 = b.asm.Rc).apply(null, arguments) + } + , Pe = b._emscripten_bind_btDiscreteDynamicsWorld_stepSimulation_1 = function() { + return (Pe = b._emscripten_bind_btDiscreteDynamicsWorld_stepSimulation_1 = b.asm.Sc).apply(null, arguments) + } + , Qe = b._emscripten_bind_btDiscreteDynamicsWorld_stepSimulation_2 = function() { + return (Qe = b._emscripten_bind_btDiscreteDynamicsWorld_stepSimulation_2 = b.asm.Tc).apply(null, arguments) + } + , Re = b._emscripten_bind_btDiscreteDynamicsWorld_stepSimulation_3 = function() { + return (Re = b._emscripten_bind_btDiscreteDynamicsWorld_stepSimulation_3 = b.asm.Uc).apply(null, arguments) + } + , Se = b._emscripten_bind_btDiscreteDynamicsWorld_setContactAddedCallback_1 = function() { + return (Se = b._emscripten_bind_btDiscreteDynamicsWorld_setContactAddedCallback_1 = b.asm.Vc).apply(null, arguments) + } + , Te = b._emscripten_bind_btDiscreteDynamicsWorld_setContactProcessedCallback_1 = function() { + return (Te = b._emscripten_bind_btDiscreteDynamicsWorld_setContactProcessedCallback_1 = b.asm.Wc).apply(null, arguments) + } + , Ue = b._emscripten_bind_btDiscreteDynamicsWorld_setContactDestroyedCallback_1 = function() { + return (Ue = b._emscripten_bind_btDiscreteDynamicsWorld_setContactDestroyedCallback_1 = b.asm.Xc).apply(null, arguments) + } + , Ve = b._emscripten_bind_btDiscreteDynamicsWorld_getDispatcher_0 = function() { + return (Ve = b._emscripten_bind_btDiscreteDynamicsWorld_getDispatcher_0 = b.asm.Yc).apply(null, arguments) + } + , We = b._emscripten_bind_btDiscreteDynamicsWorld_rayTest_3 = function() { + return (We = b._emscripten_bind_btDiscreteDynamicsWorld_rayTest_3 = b.asm.Zc).apply(null, arguments) + } + , Xe = b._emscripten_bind_btDiscreteDynamicsWorld_getPairCache_0 = function() { + return (Xe = b._emscripten_bind_btDiscreteDynamicsWorld_getPairCache_0 = b.asm._c).apply(null, arguments) + } + , Ye = b._emscripten_bind_btDiscreteDynamicsWorld_getDispatchInfo_0 = function() { + return (Ye = b._emscripten_bind_btDiscreteDynamicsWorld_getDispatchInfo_0 = b.asm.$c).apply(null, arguments) + } + , Ze = b._emscripten_bind_btDiscreteDynamicsWorld_addCollisionObject_1 = function() { + return (Ze = b._emscripten_bind_btDiscreteDynamicsWorld_addCollisionObject_1 = b.asm.ad).apply(null, arguments) + } + , $e = b._emscripten_bind_btDiscreteDynamicsWorld_addCollisionObject_2 = function() { + return ($e = b._emscripten_bind_btDiscreteDynamicsWorld_addCollisionObject_2 = b.asm.bd).apply(null, arguments) + } + , af = b._emscripten_bind_btDiscreteDynamicsWorld_addCollisionObject_3 = function() { + return (af = b._emscripten_bind_btDiscreteDynamicsWorld_addCollisionObject_3 = b.asm.cd).apply(null, arguments) + } + , bf = b._emscripten_bind_btDiscreteDynamicsWorld_removeCollisionObject_1 = function() { + return (bf = b._emscripten_bind_btDiscreteDynamicsWorld_removeCollisionObject_1 = b.asm.dd).apply(null, arguments) + } + , cf = b._emscripten_bind_btDiscreteDynamicsWorld_getBroadphase_0 = function() { + return (cf = b._emscripten_bind_btDiscreteDynamicsWorld_getBroadphase_0 = b.asm.ed).apply(null, arguments) + } + , df = b._emscripten_bind_btDiscreteDynamicsWorld_convexSweepTest_5 = function() { + return (df = b._emscripten_bind_btDiscreteDynamicsWorld_convexSweepTest_5 = b.asm.fd).apply(null, arguments) + } + , ef = b._emscripten_bind_btDiscreteDynamicsWorld_contactPairTest_3 = function() { + return (ef = b._emscripten_bind_btDiscreteDynamicsWorld_contactPairTest_3 = b.asm.gd).apply(null, arguments) + } + , ff = b._emscripten_bind_btDiscreteDynamicsWorld_contactTest_2 = function() { + return (ff = b._emscripten_bind_btDiscreteDynamicsWorld_contactTest_2 = b.asm.hd).apply(null, arguments) + } + , gf = b._emscripten_bind_btDiscreteDynamicsWorld_updateSingleAabb_1 = function() { + return (gf = b._emscripten_bind_btDiscreteDynamicsWorld_updateSingleAabb_1 = b.asm.id).apply(null, arguments) + } + , hf = b._emscripten_bind_btDiscreteDynamicsWorld_setDebugDrawer_1 = function() { + return (hf = b._emscripten_bind_btDiscreteDynamicsWorld_setDebugDrawer_1 = b.asm.jd).apply(null, arguments) + } + , jf = b._emscripten_bind_btDiscreteDynamicsWorld_getDebugDrawer_0 = function() { + return (jf = b._emscripten_bind_btDiscreteDynamicsWorld_getDebugDrawer_0 = b.asm.kd).apply(null, arguments) + } + , kf = b._emscripten_bind_btDiscreteDynamicsWorld_debugDrawWorld_0 = function() { + return (kf = b._emscripten_bind_btDiscreteDynamicsWorld_debugDrawWorld_0 = b.asm.ld).apply(null, arguments) + } + , lf = b._emscripten_bind_btDiscreteDynamicsWorld_debugDrawObject_3 = function() { + return (lf = b._emscripten_bind_btDiscreteDynamicsWorld_debugDrawObject_3 = b.asm.md).apply(null, arguments) + } + , mf = b._emscripten_bind_btDiscreteDynamicsWorld_addAction_1 = function() { + return (mf = b._emscripten_bind_btDiscreteDynamicsWorld_addAction_1 = b.asm.nd).apply(null, arguments) + } + , nf = b._emscripten_bind_btDiscreteDynamicsWorld_removeAction_1 = function() { + return (nf = b._emscripten_bind_btDiscreteDynamicsWorld_removeAction_1 = b.asm.od).apply(null, arguments) + } + , of = b._emscripten_bind_btDiscreteDynamicsWorld_getSolverInfo_0 = function() { + return (of = b._emscripten_bind_btDiscreteDynamicsWorld_getSolverInfo_0 = b.asm.pd).apply(null, arguments) + } + , pf = b._emscripten_bind_btDiscreteDynamicsWorld_setInternalTickCallback_1 = function() { + return (pf = b._emscripten_bind_btDiscreteDynamicsWorld_setInternalTickCallback_1 = b.asm.qd).apply(null, arguments) + } + , qf = b._emscripten_bind_btDiscreteDynamicsWorld_setInternalTickCallback_2 = function() { + return (qf = b._emscripten_bind_btDiscreteDynamicsWorld_setInternalTickCallback_2 = b.asm.rd).apply(null, arguments) + } + , rf = b._emscripten_bind_btDiscreteDynamicsWorld_setInternalTickCallback_3 = function() { + return (rf = b._emscripten_bind_btDiscreteDynamicsWorld_setInternalTickCallback_3 = b.asm.sd).apply(null, arguments) + } + , sf = b._emscripten_bind_btDiscreteDynamicsWorld___destroy___0 = function() { + return (sf = b._emscripten_bind_btDiscreteDynamicsWorld___destroy___0 = b.asm.td).apply(null, arguments) + } + , tf = b._emscripten_bind_btConvexShape_setLocalScaling_1 = function() { + return (tf = b._emscripten_bind_btConvexShape_setLocalScaling_1 = b.asm.ud).apply(null, arguments) + } + , uf = b._emscripten_bind_btConvexShape_getLocalScaling_0 = function() { + return (uf = b._emscripten_bind_btConvexShape_getLocalScaling_0 = b.asm.vd).apply(null, arguments) + } + , vf = b._emscripten_bind_btConvexShape_calculateLocalInertia_2 = function() { + return (vf = b._emscripten_bind_btConvexShape_calculateLocalInertia_2 = b.asm.wd).apply(null, arguments) + } + , wf = b._emscripten_bind_btConvexShape_setMargin_1 = function() { + return (wf = b._emscripten_bind_btConvexShape_setMargin_1 = b.asm.xd).apply(null, arguments) + } + , xf = b._emscripten_bind_btConvexShape_getMargin_0 = function() { + return (xf = b._emscripten_bind_btConvexShape_getMargin_0 = b.asm.yd).apply(null, arguments) + } + , yf = b._emscripten_bind_btConvexShape___destroy___0 = function() { + return (yf = b._emscripten_bind_btConvexShape___destroy___0 = b.asm.zd).apply(null, arguments) + } + , zf = b._emscripten_bind_btDispatcher_getNumManifolds_0 = function() { + return (zf = b._emscripten_bind_btDispatcher_getNumManifolds_0 = b.asm.Ad).apply(null, arguments) + } + , Af = b._emscripten_bind_btDispatcher_getManifoldByIndexInternal_1 = function() { + return (Af = b._emscripten_bind_btDispatcher_getManifoldByIndexInternal_1 = b.asm.Bd).apply(null, arguments) + } + , Bf = b._emscripten_bind_btDispatcher___destroy___0 = function() { + return (Bf = b._emscripten_bind_btDispatcher___destroy___0 = b.asm.Cd).apply(null, arguments) + } + , Cf = b._emscripten_bind_btGeneric6DofConstraint_btGeneric6DofConstraint_3 = function() { + return (Cf = b._emscripten_bind_btGeneric6DofConstraint_btGeneric6DofConstraint_3 = b.asm.Dd).apply(null, arguments) + } + , Df = b._emscripten_bind_btGeneric6DofConstraint_btGeneric6DofConstraint_5 = function() { + return (Df = b._emscripten_bind_btGeneric6DofConstraint_btGeneric6DofConstraint_5 = b.asm.Ed).apply(null, arguments) + } + , Ef = b._emscripten_bind_btGeneric6DofConstraint_setLinearLowerLimit_1 = function() { + return (Ef = b._emscripten_bind_btGeneric6DofConstraint_setLinearLowerLimit_1 = b.asm.Fd).apply(null, arguments) + } + , Ff = b._emscripten_bind_btGeneric6DofConstraint_setLinearUpperLimit_1 = function() { + return (Ff = b._emscripten_bind_btGeneric6DofConstraint_setLinearUpperLimit_1 = b.asm.Gd).apply(null, arguments) + } + , Gf = b._emscripten_bind_btGeneric6DofConstraint_setAngularLowerLimit_1 = function() { + return (Gf = b._emscripten_bind_btGeneric6DofConstraint_setAngularLowerLimit_1 = b.asm.Hd).apply(null, arguments) + } + , Hf = b._emscripten_bind_btGeneric6DofConstraint_setAngularUpperLimit_1 = function() { + return (Hf = b._emscripten_bind_btGeneric6DofConstraint_setAngularUpperLimit_1 = b.asm.Id).apply(null, arguments) + } + , If = b._emscripten_bind_btGeneric6DofConstraint_getFrameOffsetA_0 = function() { + return (If = b._emscripten_bind_btGeneric6DofConstraint_getFrameOffsetA_0 = b.asm.Jd).apply(null, arguments) + } + , Jf = b._emscripten_bind_btGeneric6DofConstraint_enableFeedback_1 = function() { + return (Jf = b._emscripten_bind_btGeneric6DofConstraint_enableFeedback_1 = b.asm.Kd).apply(null, arguments) + } + , Kf = b._emscripten_bind_btGeneric6DofConstraint_getBreakingImpulseThreshold_0 = function() { + return (Kf = b._emscripten_bind_btGeneric6DofConstraint_getBreakingImpulseThreshold_0 = b.asm.Ld).apply(null, arguments) + } + , Lf = b._emscripten_bind_btGeneric6DofConstraint_setBreakingImpulseThreshold_1 = function() { + return (Lf = b._emscripten_bind_btGeneric6DofConstraint_setBreakingImpulseThreshold_1 = b.asm.Md).apply(null, arguments) + } + , Mf = b._emscripten_bind_btGeneric6DofConstraint_getParam_2 = function() { + return (Mf = b._emscripten_bind_btGeneric6DofConstraint_getParam_2 = b.asm.Nd).apply(null, arguments) + } + , Nf = b._emscripten_bind_btGeneric6DofConstraint_setParam_3 = function() { + return (Nf = b._emscripten_bind_btGeneric6DofConstraint_setParam_3 = b.asm.Od).apply(null, arguments) + } + , Of = b._emscripten_bind_btGeneric6DofConstraint___destroy___0 = function() { + return (Of = b._emscripten_bind_btGeneric6DofConstraint___destroy___0 = b.asm.Pd).apply(null, arguments) + } + , Pf = b._emscripten_bind_btStridingMeshInterface_setScaling_1 = function() { + return (Pf = b._emscripten_bind_btStridingMeshInterface_setScaling_1 = b.asm.Qd).apply(null, arguments) + } + , Qf = b._emscripten_bind_btStridingMeshInterface___destroy___0 = function() { + return (Qf = b._emscripten_bind_btStridingMeshInterface___destroy___0 = b.asm.Rd).apply(null, arguments) + } + , Rf = b._emscripten_bind_btMotionState_getWorldTransform_1 = function() { + return (Rf = b._emscripten_bind_btMotionState_getWorldTransform_1 = b.asm.Sd).apply(null, arguments) + } + , Sf = b._emscripten_bind_btMotionState_setWorldTransform_1 = function() { + return (Sf = b._emscripten_bind_btMotionState_setWorldTransform_1 = b.asm.Td).apply(null, arguments) + } + , Tf = b._emscripten_bind_btMotionState___destroy___0 = function() { + return (Tf = b._emscripten_bind_btMotionState___destroy___0 = b.asm.Ud).apply(null, arguments) + } + , Uf = b._emscripten_bind_ConvexResultCallback_hasHit_0 = function() { + return (Uf = b._emscripten_bind_ConvexResultCallback_hasHit_0 = b.asm.Vd).apply(null, arguments) + } + , Vf = b._emscripten_bind_ConvexResultCallback_get_m_collisionFilterGroup_0 = function() { + return (Vf = b._emscripten_bind_ConvexResultCallback_get_m_collisionFilterGroup_0 = b.asm.Wd).apply(null, arguments) + } + , Wf = b._emscripten_bind_ConvexResultCallback_set_m_collisionFilterGroup_1 = function() { + return (Wf = b._emscripten_bind_ConvexResultCallback_set_m_collisionFilterGroup_1 = b.asm.Xd).apply(null, arguments) + } + , Xf = b._emscripten_bind_ConvexResultCallback_get_m_collisionFilterMask_0 = function() { + return (Xf = b._emscripten_bind_ConvexResultCallback_get_m_collisionFilterMask_0 = b.asm.Yd).apply(null, arguments) + } + , Yf = b._emscripten_bind_ConvexResultCallback_set_m_collisionFilterMask_1 = function() { + return (Yf = b._emscripten_bind_ConvexResultCallback_set_m_collisionFilterMask_1 = b.asm.Zd).apply(null, arguments) + } + , Zf = b._emscripten_bind_ConvexResultCallback_get_m_closestHitFraction_0 = function() { + return (Zf = b._emscripten_bind_ConvexResultCallback_get_m_closestHitFraction_0 = b.asm._d).apply(null, arguments) + } + , $f = b._emscripten_bind_ConvexResultCallback_set_m_closestHitFraction_1 = function() { + return ($f = b._emscripten_bind_ConvexResultCallback_set_m_closestHitFraction_1 = b.asm.$d).apply(null, arguments) + } + , ag = b._emscripten_bind_ConvexResultCallback___destroy___0 = function() { + return (ag = b._emscripten_bind_ConvexResultCallback___destroy___0 = b.asm.ae).apply(null, arguments) + } + , bg = b._emscripten_bind_ContactResultCallback_addSingleResult_7 = function() { + return (bg = b._emscripten_bind_ContactResultCallback_addSingleResult_7 = b.asm.be).apply(null, arguments) + } + , cg = b._emscripten_bind_ContactResultCallback___destroy___0 = function() { + return (cg = b._emscripten_bind_ContactResultCallback___destroy___0 = b.asm.ce).apply(null, arguments) + } + , dg = b._emscripten_bind_btSoftBodySolver___destroy___0 = function() { + return (dg = b._emscripten_bind_btSoftBodySolver___destroy___0 = b.asm.de).apply(null, arguments) + } + , eg = b._emscripten_bind_RayResultCallback_hasHit_0 = function() { + return (eg = b._emscripten_bind_RayResultCallback_hasHit_0 = b.asm.ee).apply(null, arguments) + } + , fg = b._emscripten_bind_RayResultCallback_get_m_collisionFilterGroup_0 = function() { + return (fg = b._emscripten_bind_RayResultCallback_get_m_collisionFilterGroup_0 = b.asm.fe).apply(null, arguments) + } + , gg = b._emscripten_bind_RayResultCallback_set_m_collisionFilterGroup_1 = function() { + return (gg = b._emscripten_bind_RayResultCallback_set_m_collisionFilterGroup_1 = b.asm.ge).apply(null, arguments) + } + , hg = b._emscripten_bind_RayResultCallback_get_m_collisionFilterMask_0 = function() { + return (hg = b._emscripten_bind_RayResultCallback_get_m_collisionFilterMask_0 = b.asm.he).apply(null, arguments) + } + , ig = b._emscripten_bind_RayResultCallback_set_m_collisionFilterMask_1 = function() { + return (ig = b._emscripten_bind_RayResultCallback_set_m_collisionFilterMask_1 = b.asm.ie).apply(null, arguments) + } + , jg = b._emscripten_bind_RayResultCallback_get_m_closestHitFraction_0 = function() { + return (jg = b._emscripten_bind_RayResultCallback_get_m_closestHitFraction_0 = b.asm.je).apply(null, arguments) + } + , kg = b._emscripten_bind_RayResultCallback_set_m_closestHitFraction_1 = function() { + return (kg = b._emscripten_bind_RayResultCallback_set_m_closestHitFraction_1 = b.asm.ke).apply(null, arguments) + } + , lg = b._emscripten_bind_RayResultCallback_get_m_collisionObject_0 = function() { + return (lg = b._emscripten_bind_RayResultCallback_get_m_collisionObject_0 = b.asm.le).apply(null, arguments) + } + , mg = b._emscripten_bind_RayResultCallback_set_m_collisionObject_1 = function() { + return (mg = b._emscripten_bind_RayResultCallback_set_m_collisionObject_1 = b.asm.me).apply(null, arguments) + } + , ng = b._emscripten_bind_RayResultCallback___destroy___0 = function() { + return (ng = b._emscripten_bind_RayResultCallback___destroy___0 = b.asm.ne).apply(null, arguments) + } + , og = b._emscripten_bind_btMatrix3x3_setEulerZYX_3 = function() { + return (og = b._emscripten_bind_btMatrix3x3_setEulerZYX_3 = b.asm.oe).apply(null, arguments) + } + , pg = b._emscripten_bind_btMatrix3x3_getRotation_1 = function() { + return (pg = b._emscripten_bind_btMatrix3x3_getRotation_1 = b.asm.pe).apply(null, arguments) + } + , qg = b._emscripten_bind_btMatrix3x3_getRow_1 = function() { + return (qg = b._emscripten_bind_btMatrix3x3_getRow_1 = b.asm.qe).apply(null, arguments) + } + , rg = b._emscripten_bind_btMatrix3x3___destroy___0 = function() { + return (rg = b._emscripten_bind_btMatrix3x3___destroy___0 = b.asm.re).apply(null, arguments) + } + , sg = b._emscripten_bind_btScalarArray_size_0 = function() { + return (sg = b._emscripten_bind_btScalarArray_size_0 = b.asm.se).apply(null, arguments) + } + , tg = b._emscripten_bind_btScalarArray_at_1 = function() { + return (tg = b._emscripten_bind_btScalarArray_at_1 = b.asm.te).apply(null, arguments) + } + , ug = b._emscripten_bind_btScalarArray___destroy___0 = function() { + return (ug = b._emscripten_bind_btScalarArray___destroy___0 = b.asm.ue).apply(null, arguments) + } + , vg = b._emscripten_bind_Material_get_m_kLST_0 = function() { + return (vg = b._emscripten_bind_Material_get_m_kLST_0 = b.asm.ve).apply(null, arguments) + } + , wg = b._emscripten_bind_Material_set_m_kLST_1 = function() { + return (wg = b._emscripten_bind_Material_set_m_kLST_1 = b.asm.we).apply(null, arguments) + } + , xg = b._emscripten_bind_Material_get_m_kAST_0 = function() { + return (xg = b._emscripten_bind_Material_get_m_kAST_0 = b.asm.xe).apply(null, arguments) + } + , yg = b._emscripten_bind_Material_set_m_kAST_1 = function() { + return (yg = b._emscripten_bind_Material_set_m_kAST_1 = b.asm.ye).apply(null, arguments) + } + , zg = b._emscripten_bind_Material_get_m_kVST_0 = function() { + return (zg = b._emscripten_bind_Material_get_m_kVST_0 = b.asm.ze).apply(null, arguments) + } + , Ag = b._emscripten_bind_Material_set_m_kVST_1 = function() { + return (Ag = b._emscripten_bind_Material_set_m_kVST_1 = b.asm.Ae).apply(null, arguments) + } + , Bg = b._emscripten_bind_Material_get_m_flags_0 = function() { + return (Bg = b._emscripten_bind_Material_get_m_flags_0 = b.asm.Be).apply(null, arguments) + } + , Cg = b._emscripten_bind_Material_set_m_flags_1 = function() { + return (Cg = b._emscripten_bind_Material_set_m_flags_1 = b.asm.Ce).apply(null, arguments) + } + , Dg = b._emscripten_bind_Material___destroy___0 = function() { + return (Dg = b._emscripten_bind_Material___destroy___0 = b.asm.De).apply(null, arguments) + } + , Eg = b._emscripten_bind_btDispatcherInfo_get_m_timeStep_0 = function() { + return (Eg = b._emscripten_bind_btDispatcherInfo_get_m_timeStep_0 = b.asm.Ee).apply(null, arguments) + } + , Fg = b._emscripten_bind_btDispatcherInfo_set_m_timeStep_1 = function() { + return (Fg = b._emscripten_bind_btDispatcherInfo_set_m_timeStep_1 = b.asm.Fe).apply(null, arguments) + } + , Gg = b._emscripten_bind_btDispatcherInfo_get_m_stepCount_0 = function() { + return (Gg = b._emscripten_bind_btDispatcherInfo_get_m_stepCount_0 = b.asm.Ge).apply(null, arguments) + } + , Hg = b._emscripten_bind_btDispatcherInfo_set_m_stepCount_1 = function() { + return (Hg = b._emscripten_bind_btDispatcherInfo_set_m_stepCount_1 = b.asm.He).apply(null, arguments) + } + , Ig = b._emscripten_bind_btDispatcherInfo_get_m_dispatchFunc_0 = function() { + return (Ig = b._emscripten_bind_btDispatcherInfo_get_m_dispatchFunc_0 = b.asm.Ie).apply(null, arguments) + } + , Jg = b._emscripten_bind_btDispatcherInfo_set_m_dispatchFunc_1 = function() { + return (Jg = b._emscripten_bind_btDispatcherInfo_set_m_dispatchFunc_1 = b.asm.Je).apply(null, arguments) + } + , Kg = b._emscripten_bind_btDispatcherInfo_get_m_timeOfImpact_0 = function() { + return (Kg = b._emscripten_bind_btDispatcherInfo_get_m_timeOfImpact_0 = b.asm.Ke).apply(null, arguments) + } + , Lg = b._emscripten_bind_btDispatcherInfo_set_m_timeOfImpact_1 = function() { + return (Lg = b._emscripten_bind_btDispatcherInfo_set_m_timeOfImpact_1 = b.asm.Le).apply(null, arguments) + } + , Mg = b._emscripten_bind_btDispatcherInfo_get_m_useContinuous_0 = function() { + return (Mg = b._emscripten_bind_btDispatcherInfo_get_m_useContinuous_0 = b.asm.Me).apply(null, arguments) + } + , Ng = b._emscripten_bind_btDispatcherInfo_set_m_useContinuous_1 = function() { + return (Ng = b._emscripten_bind_btDispatcherInfo_set_m_useContinuous_1 = b.asm.Ne).apply(null, arguments) + } + , Og = b._emscripten_bind_btDispatcherInfo_get_m_enableSatConvex_0 = function() { + return (Og = b._emscripten_bind_btDispatcherInfo_get_m_enableSatConvex_0 = b.asm.Oe).apply(null, arguments) + } + , Pg = b._emscripten_bind_btDispatcherInfo_set_m_enableSatConvex_1 = function() { + return (Pg = b._emscripten_bind_btDispatcherInfo_set_m_enableSatConvex_1 = b.asm.Pe).apply(null, arguments) + } + , Qg = b._emscripten_bind_btDispatcherInfo_get_m_enableSPU_0 = function() { + return (Qg = b._emscripten_bind_btDispatcherInfo_get_m_enableSPU_0 = b.asm.Qe).apply(null, arguments) + } + , Rg = b._emscripten_bind_btDispatcherInfo_set_m_enableSPU_1 = function() { + return (Rg = b._emscripten_bind_btDispatcherInfo_set_m_enableSPU_1 = b.asm.Re).apply(null, arguments) + } + , Sg = b._emscripten_bind_btDispatcherInfo_get_m_useEpa_0 = function() { + return (Sg = b._emscripten_bind_btDispatcherInfo_get_m_useEpa_0 = b.asm.Se).apply(null, arguments) + } + , Tg = b._emscripten_bind_btDispatcherInfo_set_m_useEpa_1 = function() { + return (Tg = b._emscripten_bind_btDispatcherInfo_set_m_useEpa_1 = b.asm.Te).apply(null, arguments) + } + , Ug = b._emscripten_bind_btDispatcherInfo_get_m_allowedCcdPenetration_0 = function() { + return (Ug = b._emscripten_bind_btDispatcherInfo_get_m_allowedCcdPenetration_0 = b.asm.Ue).apply(null, arguments) + } + , Vg = b._emscripten_bind_btDispatcherInfo_set_m_allowedCcdPenetration_1 = function() { + return (Vg = b._emscripten_bind_btDispatcherInfo_set_m_allowedCcdPenetration_1 = b.asm.Ve).apply(null, arguments) + } + , Wg = b._emscripten_bind_btDispatcherInfo_get_m_useConvexConservativeDistanceUtil_0 = function() { + return (Wg = b._emscripten_bind_btDispatcherInfo_get_m_useConvexConservativeDistanceUtil_0 = b.asm.We).apply(null, arguments) + } + , Xg = b._emscripten_bind_btDispatcherInfo_set_m_useConvexConservativeDistanceUtil_1 = function() { + return (Xg = b._emscripten_bind_btDispatcherInfo_set_m_useConvexConservativeDistanceUtil_1 = b.asm.Xe).apply(null, arguments) + } + , Yg = b._emscripten_bind_btDispatcherInfo_get_m_convexConservativeDistanceThreshold_0 = function() { + return (Yg = b._emscripten_bind_btDispatcherInfo_get_m_convexConservativeDistanceThreshold_0 = b.asm.Ye).apply(null, arguments) + } + , Zg = b._emscripten_bind_btDispatcherInfo_set_m_convexConservativeDistanceThreshold_1 = function() { + return (Zg = b._emscripten_bind_btDispatcherInfo_set_m_convexConservativeDistanceThreshold_1 = b.asm.Ze).apply(null, arguments) + } + , $g = b._emscripten_bind_btDispatcherInfo___destroy___0 = function() { + return ($g = b._emscripten_bind_btDispatcherInfo___destroy___0 = b.asm._e).apply(null, arguments) + } + , ah = b._emscripten_bind_btWheelInfoConstructionInfo_get_m_chassisConnectionCS_0 = function() { + return (ah = b._emscripten_bind_btWheelInfoConstructionInfo_get_m_chassisConnectionCS_0 = b.asm.$e).apply(null, arguments) + } + , bh = b._emscripten_bind_btWheelInfoConstructionInfo_set_m_chassisConnectionCS_1 = function() { + return (bh = b._emscripten_bind_btWheelInfoConstructionInfo_set_m_chassisConnectionCS_1 = b.asm.af).apply(null, arguments) + } + , ch = b._emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelDirectionCS_0 = function() { + return (ch = b._emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelDirectionCS_0 = b.asm.bf).apply(null, arguments) + } + , dh = b._emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelDirectionCS_1 = function() { + return (dh = b._emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelDirectionCS_1 = b.asm.cf).apply(null, arguments) + } + , eh = b._emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelAxleCS_0 = function() { + return (eh = b._emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelAxleCS_0 = b.asm.df).apply(null, arguments) + } + , fh = b._emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelAxleCS_1 = function() { + return (fh = b._emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelAxleCS_1 = b.asm.ef).apply(null, arguments) + } + , gh = b._emscripten_bind_btWheelInfoConstructionInfo_get_m_suspensionRestLength_0 = function() { + return (gh = b._emscripten_bind_btWheelInfoConstructionInfo_get_m_suspensionRestLength_0 = b.asm.ff).apply(null, arguments) + } + , hh = b._emscripten_bind_btWheelInfoConstructionInfo_set_m_suspensionRestLength_1 = function() { + return (hh = b._emscripten_bind_btWheelInfoConstructionInfo_set_m_suspensionRestLength_1 = b.asm.gf).apply(null, arguments) + } + , ih = b._emscripten_bind_btWheelInfoConstructionInfo_get_m_maxSuspensionTravelCm_0 = function() { + return (ih = b._emscripten_bind_btWheelInfoConstructionInfo_get_m_maxSuspensionTravelCm_0 = b.asm.hf).apply(null, arguments) + } + , jh = b._emscripten_bind_btWheelInfoConstructionInfo_set_m_maxSuspensionTravelCm_1 = function() { + return (jh = b._emscripten_bind_btWheelInfoConstructionInfo_set_m_maxSuspensionTravelCm_1 = b.asm.jf).apply(null, arguments) + } + , kh = b._emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelRadius_0 = function() { + return (kh = b._emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelRadius_0 = b.asm.kf).apply(null, arguments) + } + , lh = b._emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelRadius_1 = function() { + return (lh = b._emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelRadius_1 = b.asm.lf).apply(null, arguments) + } + , mh = b._emscripten_bind_btWheelInfoConstructionInfo_get_m_suspensionStiffness_0 = function() { + return (mh = b._emscripten_bind_btWheelInfoConstructionInfo_get_m_suspensionStiffness_0 = b.asm.mf).apply(null, arguments) + } + , nh = b._emscripten_bind_btWheelInfoConstructionInfo_set_m_suspensionStiffness_1 = function() { + return (nh = b._emscripten_bind_btWheelInfoConstructionInfo_set_m_suspensionStiffness_1 = b.asm.nf).apply(null, arguments) + } + , oh = b._emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelsDampingCompression_0 = function() { + return (oh = b._emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelsDampingCompression_0 = b.asm.of).apply(null, arguments) + } + , ph = b._emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelsDampingCompression_1 = function() { + return (ph = b._emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelsDampingCompression_1 = b.asm.pf).apply(null, arguments) + } + , qh = b._emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelsDampingRelaxation_0 = function() { + return (qh = b._emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelsDampingRelaxation_0 = b.asm.qf).apply(null, arguments) + } + , rh = b._emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelsDampingRelaxation_1 = function() { + return (rh = b._emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelsDampingRelaxation_1 = b.asm.rf).apply(null, arguments) + } + , sh = b._emscripten_bind_btWheelInfoConstructionInfo_get_m_frictionSlip_0 = function() { + return (sh = b._emscripten_bind_btWheelInfoConstructionInfo_get_m_frictionSlip_0 = b.asm.sf).apply(null, arguments) + } + , th = b._emscripten_bind_btWheelInfoConstructionInfo_set_m_frictionSlip_1 = function() { + return (th = b._emscripten_bind_btWheelInfoConstructionInfo_set_m_frictionSlip_1 = b.asm.tf).apply(null, arguments) + } + , uh = b._emscripten_bind_btWheelInfoConstructionInfo_get_m_maxSuspensionForce_0 = function() { + return (uh = b._emscripten_bind_btWheelInfoConstructionInfo_get_m_maxSuspensionForce_0 = b.asm.uf).apply(null, arguments) + } + , vh = b._emscripten_bind_btWheelInfoConstructionInfo_set_m_maxSuspensionForce_1 = function() { + return (vh = b._emscripten_bind_btWheelInfoConstructionInfo_set_m_maxSuspensionForce_1 = b.asm.vf).apply(null, arguments) + } + , wh = b._emscripten_bind_btWheelInfoConstructionInfo_get_m_bIsFrontWheel_0 = function() { + return (wh = b._emscripten_bind_btWheelInfoConstructionInfo_get_m_bIsFrontWheel_0 = b.asm.wf).apply(null, arguments) + } + , xh = b._emscripten_bind_btWheelInfoConstructionInfo_set_m_bIsFrontWheel_1 = function() { + return (xh = b._emscripten_bind_btWheelInfoConstructionInfo_set_m_bIsFrontWheel_1 = b.asm.xf).apply(null, arguments) + } + , yh = b._emscripten_bind_btWheelInfoConstructionInfo___destroy___0 = function() { + return (yh = b._emscripten_bind_btWheelInfoConstructionInfo___destroy___0 = b.asm.yf).apply(null, arguments) + } + , zh = b._emscripten_bind_btConvexTriangleMeshShape_btConvexTriangleMeshShape_1 = function() { + return (zh = b._emscripten_bind_btConvexTriangleMeshShape_btConvexTriangleMeshShape_1 = b.asm.zf).apply(null, arguments) + } + , Ah = b._emscripten_bind_btConvexTriangleMeshShape_btConvexTriangleMeshShape_2 = function() { + return (Ah = b._emscripten_bind_btConvexTriangleMeshShape_btConvexTriangleMeshShape_2 = b.asm.Af).apply(null, arguments) + } + , Bh = b._emscripten_bind_btConvexTriangleMeshShape_setLocalScaling_1 = function() { + return (Bh = b._emscripten_bind_btConvexTriangleMeshShape_setLocalScaling_1 = b.asm.Bf).apply(null, arguments) + } + , Ch = b._emscripten_bind_btConvexTriangleMeshShape_getLocalScaling_0 = function() { + return (Ch = b._emscripten_bind_btConvexTriangleMeshShape_getLocalScaling_0 = b.asm.Cf).apply(null, arguments) + } + , Dh = b._emscripten_bind_btConvexTriangleMeshShape_calculateLocalInertia_2 = function() { + return (Dh = b._emscripten_bind_btConvexTriangleMeshShape_calculateLocalInertia_2 = b.asm.Df).apply(null, arguments) + } + , Eh = b._emscripten_bind_btConvexTriangleMeshShape_setMargin_1 = function() { + return (Eh = b._emscripten_bind_btConvexTriangleMeshShape_setMargin_1 = b.asm.Ef).apply(null, arguments) + } + , Fh = b._emscripten_bind_btConvexTriangleMeshShape_getMargin_0 = function() { + return (Fh = b._emscripten_bind_btConvexTriangleMeshShape_getMargin_0 = b.asm.Ff).apply(null, arguments) + } + , Gh = b._emscripten_bind_btConvexTriangleMeshShape___destroy___0 = function() { + return (Gh = b._emscripten_bind_btConvexTriangleMeshShape___destroy___0 = b.asm.Gf).apply(null, arguments) + } + , Hh = b._emscripten_bind_btBroadphaseInterface_getOverlappingPairCache_0 = function() { + return (Hh = b._emscripten_bind_btBroadphaseInterface_getOverlappingPairCache_0 = b.asm.Hf).apply(null, arguments) + } + , Ih = b._emscripten_bind_btBroadphaseInterface___destroy___0 = function() { + return (Ih = b._emscripten_bind_btBroadphaseInterface___destroy___0 = b.asm.If).apply(null, arguments) + } + , Jh = b._emscripten_bind_btRigidBodyConstructionInfo_btRigidBodyConstructionInfo_3 = function() { + return (Jh = b._emscripten_bind_btRigidBodyConstructionInfo_btRigidBodyConstructionInfo_3 = b.asm.Jf).apply(null, arguments) + } + , Kh = b._emscripten_bind_btRigidBodyConstructionInfo_btRigidBodyConstructionInfo_4 = function() { + return (Kh = b._emscripten_bind_btRigidBodyConstructionInfo_btRigidBodyConstructionInfo_4 = b.asm.Kf).apply(null, arguments) + } + , Lh = b._emscripten_bind_btRigidBodyConstructionInfo_get_m_linearDamping_0 = function() { + return (Lh = b._emscripten_bind_btRigidBodyConstructionInfo_get_m_linearDamping_0 = b.asm.Lf).apply(null, arguments) + } + , Mh = b._emscripten_bind_btRigidBodyConstructionInfo_set_m_linearDamping_1 = function() { + return (Mh = b._emscripten_bind_btRigidBodyConstructionInfo_set_m_linearDamping_1 = b.asm.Mf).apply(null, arguments) + } + , Nh = b._emscripten_bind_btRigidBodyConstructionInfo_get_m_angularDamping_0 = function() { + return (Nh = b._emscripten_bind_btRigidBodyConstructionInfo_get_m_angularDamping_0 = b.asm.Nf).apply(null, arguments) + } + , Oh = b._emscripten_bind_btRigidBodyConstructionInfo_set_m_angularDamping_1 = function() { + return (Oh = b._emscripten_bind_btRigidBodyConstructionInfo_set_m_angularDamping_1 = b.asm.Of).apply(null, arguments) + } + , Ph = b._emscripten_bind_btRigidBodyConstructionInfo_get_m_friction_0 = function() { + return (Ph = b._emscripten_bind_btRigidBodyConstructionInfo_get_m_friction_0 = b.asm.Pf).apply(null, arguments) + } + , Qh = b._emscripten_bind_btRigidBodyConstructionInfo_set_m_friction_1 = function() { + return (Qh = b._emscripten_bind_btRigidBodyConstructionInfo_set_m_friction_1 = b.asm.Qf).apply(null, arguments) + } + , Rh = b._emscripten_bind_btRigidBodyConstructionInfo_get_m_rollingFriction_0 = function() { + return (Rh = b._emscripten_bind_btRigidBodyConstructionInfo_get_m_rollingFriction_0 = b.asm.Rf).apply(null, arguments) + } + , Sh = b._emscripten_bind_btRigidBodyConstructionInfo_set_m_rollingFriction_1 = function() { + return (Sh = b._emscripten_bind_btRigidBodyConstructionInfo_set_m_rollingFriction_1 = b.asm.Sf).apply(null, arguments) + } + , Th = b._emscripten_bind_btRigidBodyConstructionInfo_get_m_restitution_0 = function() { + return (Th = b._emscripten_bind_btRigidBodyConstructionInfo_get_m_restitution_0 = b.asm.Tf).apply(null, arguments) + } + , Uh = b._emscripten_bind_btRigidBodyConstructionInfo_set_m_restitution_1 = function() { + return (Uh = b._emscripten_bind_btRigidBodyConstructionInfo_set_m_restitution_1 = b.asm.Uf).apply(null, arguments) + } + , Vh = b._emscripten_bind_btRigidBodyConstructionInfo_get_m_linearSleepingThreshold_0 = function() { + return (Vh = b._emscripten_bind_btRigidBodyConstructionInfo_get_m_linearSleepingThreshold_0 = b.asm.Vf).apply(null, arguments) + } + , Wh = b._emscripten_bind_btRigidBodyConstructionInfo_set_m_linearSleepingThreshold_1 = function() { + return (Wh = b._emscripten_bind_btRigidBodyConstructionInfo_set_m_linearSleepingThreshold_1 = b.asm.Wf).apply(null, arguments) + } + , Xh = b._emscripten_bind_btRigidBodyConstructionInfo_get_m_angularSleepingThreshold_0 = function() { + return (Xh = b._emscripten_bind_btRigidBodyConstructionInfo_get_m_angularSleepingThreshold_0 = b.asm.Xf).apply(null, arguments) + } + , Yh = b._emscripten_bind_btRigidBodyConstructionInfo_set_m_angularSleepingThreshold_1 = function() { + return (Yh = b._emscripten_bind_btRigidBodyConstructionInfo_set_m_angularSleepingThreshold_1 = b.asm.Yf).apply(null, arguments) + } + , Zh = b._emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalDamping_0 = function() { + return (Zh = b._emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalDamping_0 = b.asm.Zf).apply(null, arguments) + } + , $h = b._emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalDamping_1 = function() { + return ($h = b._emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalDamping_1 = b.asm._f).apply(null, arguments) + } + , ai = b._emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalDampingFactor_0 = function() { + return (ai = b._emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalDampingFactor_0 = b.asm.$f).apply(null, arguments) + } + , bi = b._emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalDampingFactor_1 = function() { + return (bi = b._emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalDampingFactor_1 = b.asm.ag).apply(null, arguments) + } + , ci = b._emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalLinearDampingThresholdSqr_0 = function() { + return (ci = b._emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalLinearDampingThresholdSqr_0 = b.asm.bg).apply(null, arguments) + } + , di = b._emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalLinearDampingThresholdSqr_1 = function() { + return (di = b._emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalLinearDampingThresholdSqr_1 = b.asm.cg).apply(null, arguments) + } + , ei = b._emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalAngularDampingThresholdSqr_0 = function() { + return (ei = b._emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalAngularDampingThresholdSqr_0 = b.asm.dg).apply(null, arguments) + } + , fi = b._emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalAngularDampingThresholdSqr_1 = function() { + return (fi = b._emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalAngularDampingThresholdSqr_1 = b.asm.eg).apply(null, arguments) + } + , gi = b._emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalAngularDampingFactor_0 = function() { + return (gi = b._emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalAngularDampingFactor_0 = b.asm.fg).apply(null, arguments) + } + , hi = b._emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalAngularDampingFactor_1 = function() { + return (hi = b._emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalAngularDampingFactor_1 = b.asm.gg).apply(null, arguments) + } + , ii = b._emscripten_bind_btRigidBodyConstructionInfo___destroy___0 = function() { + return (ii = b._emscripten_bind_btRigidBodyConstructionInfo___destroy___0 = b.asm.hg).apply(null, arguments) + } + , ji = b._emscripten_bind_btCollisionConfiguration___destroy___0 = function() { + return (ji = b._emscripten_bind_btCollisionConfiguration___destroy___0 = b.asm.ig).apply(null, arguments) + } + , ki = b._emscripten_bind_btPersistentManifold_btPersistentManifold_0 = function() { + return (ki = b._emscripten_bind_btPersistentManifold_btPersistentManifold_0 = b.asm.jg).apply(null, arguments) + } + , li = b._emscripten_bind_btPersistentManifold_getBody0_0 = function() { + return (li = b._emscripten_bind_btPersistentManifold_getBody0_0 = b.asm.kg).apply(null, arguments) + } + , mi = b._emscripten_bind_btPersistentManifold_getBody1_0 = function() { + return (mi = b._emscripten_bind_btPersistentManifold_getBody1_0 = b.asm.lg).apply(null, arguments) + } + , ni = b._emscripten_bind_btPersistentManifold_getNumContacts_0 = function() { + return (ni = b._emscripten_bind_btPersistentManifold_getNumContacts_0 = b.asm.mg).apply(null, arguments) + } + , oi = b._emscripten_bind_btPersistentManifold_getContactPoint_1 = function() { + return (oi = b._emscripten_bind_btPersistentManifold_getContactPoint_1 = b.asm.ng).apply(null, arguments) + } + , pi = b._emscripten_bind_btPersistentManifold___destroy___0 = function() { + return (pi = b._emscripten_bind_btPersistentManifold___destroy___0 = b.asm.og).apply(null, arguments) + } + , qi = b._emscripten_bind_btCompoundShape_btCompoundShape_0 = function() { + return (qi = b._emscripten_bind_btCompoundShape_btCompoundShape_0 = b.asm.pg).apply(null, arguments) + } + , ri = b._emscripten_bind_btCompoundShape_btCompoundShape_1 = function() { + return (ri = b._emscripten_bind_btCompoundShape_btCompoundShape_1 = b.asm.qg).apply(null, arguments) + } + , si = b._emscripten_bind_btCompoundShape_addChildShape_2 = function() { + return (si = b._emscripten_bind_btCompoundShape_addChildShape_2 = b.asm.rg).apply(null, arguments) + } + , ti = b._emscripten_bind_btCompoundShape_removeChildShape_1 = function() { + return (ti = b._emscripten_bind_btCompoundShape_removeChildShape_1 = b.asm.sg).apply(null, arguments) + } + , ui = b._emscripten_bind_btCompoundShape_removeChildShapeByIndex_1 = function() { + return (ui = b._emscripten_bind_btCompoundShape_removeChildShapeByIndex_1 = b.asm.tg).apply(null, arguments) + } + , vi = b._emscripten_bind_btCompoundShape_getNumChildShapes_0 = function() { + return (vi = b._emscripten_bind_btCompoundShape_getNumChildShapes_0 = b.asm.ug).apply(null, arguments) + } + , wi = b._emscripten_bind_btCompoundShape_getChildShape_1 = function() { + return (wi = b._emscripten_bind_btCompoundShape_getChildShape_1 = b.asm.vg).apply(null, arguments) + } + , xi = b._emscripten_bind_btCompoundShape_updateChildTransform_2 = function() { + return (xi = b._emscripten_bind_btCompoundShape_updateChildTransform_2 = b.asm.wg).apply(null, arguments) + } + , yi = b._emscripten_bind_btCompoundShape_updateChildTransform_3 = function() { + return (yi = b._emscripten_bind_btCompoundShape_updateChildTransform_3 = b.asm.xg).apply(null, arguments) + } + , zi = b._emscripten_bind_btCompoundShape_setMargin_1 = function() { + return (zi = b._emscripten_bind_btCompoundShape_setMargin_1 = b.asm.yg).apply(null, arguments) + } + , Ai = b._emscripten_bind_btCompoundShape_getMargin_0 = function() { + return (Ai = b._emscripten_bind_btCompoundShape_getMargin_0 = b.asm.zg).apply(null, arguments) + } + , Bi = b._emscripten_bind_btCompoundShape_setLocalScaling_1 = function() { + return (Bi = b._emscripten_bind_btCompoundShape_setLocalScaling_1 = b.asm.Ag).apply(null, arguments) + } + , Ci = b._emscripten_bind_btCompoundShape_getLocalScaling_0 = function() { + return (Ci = b._emscripten_bind_btCompoundShape_getLocalScaling_0 = b.asm.Bg).apply(null, arguments) + } + , Di = b._emscripten_bind_btCompoundShape_calculateLocalInertia_2 = function() { + return (Di = b._emscripten_bind_btCompoundShape_calculateLocalInertia_2 = b.asm.Cg).apply(null, arguments) + } + , Ei = b._emscripten_bind_btCompoundShape___destroy___0 = function() { + return (Ei = b._emscripten_bind_btCompoundShape___destroy___0 = b.asm.Dg).apply(null, arguments) + } + , Fi = b._emscripten_bind_ClosestConvexResultCallback_ClosestConvexResultCallback_2 = function() { + return (Fi = b._emscripten_bind_ClosestConvexResultCallback_ClosestConvexResultCallback_2 = b.asm.Eg).apply(null, arguments) + } + , Gi = b._emscripten_bind_ClosestConvexResultCallback_hasHit_0 = function() { + return (Gi = b._emscripten_bind_ClosestConvexResultCallback_hasHit_0 = b.asm.Fg).apply(null, arguments) + } + , Hi = b._emscripten_bind_ClosestConvexResultCallback_get_m_convexFromWorld_0 = function() { + return (Hi = b._emscripten_bind_ClosestConvexResultCallback_get_m_convexFromWorld_0 = b.asm.Gg).apply(null, arguments) + } + , Ii = b._emscripten_bind_ClosestConvexResultCallback_set_m_convexFromWorld_1 = function() { + return (Ii = b._emscripten_bind_ClosestConvexResultCallback_set_m_convexFromWorld_1 = b.asm.Hg).apply(null, arguments) + } + , Ji = b._emscripten_bind_ClosestConvexResultCallback_get_m_convexToWorld_0 = function() { + return (Ji = b._emscripten_bind_ClosestConvexResultCallback_get_m_convexToWorld_0 = b.asm.Ig).apply(null, arguments) + } + , Ki = b._emscripten_bind_ClosestConvexResultCallback_set_m_convexToWorld_1 = function() { + return (Ki = b._emscripten_bind_ClosestConvexResultCallback_set_m_convexToWorld_1 = b.asm.Jg).apply(null, arguments) + } + , Li = b._emscripten_bind_ClosestConvexResultCallback_get_m_hitNormalWorld_0 = function() { + return (Li = b._emscripten_bind_ClosestConvexResultCallback_get_m_hitNormalWorld_0 = b.asm.Kg).apply(null, arguments) + } + , Mi = b._emscripten_bind_ClosestConvexResultCallback_set_m_hitNormalWorld_1 = function() { + return (Mi = b._emscripten_bind_ClosestConvexResultCallback_set_m_hitNormalWorld_1 = b.asm.Lg).apply(null, arguments) + } + , Ni = b._emscripten_bind_ClosestConvexResultCallback_get_m_hitPointWorld_0 = function() { + return (Ni = b._emscripten_bind_ClosestConvexResultCallback_get_m_hitPointWorld_0 = b.asm.Mg).apply(null, arguments) + } + , Oi = b._emscripten_bind_ClosestConvexResultCallback_set_m_hitPointWorld_1 = function() { + return (Oi = b._emscripten_bind_ClosestConvexResultCallback_set_m_hitPointWorld_1 = b.asm.Ng).apply(null, arguments) + } + , Pi = b._emscripten_bind_ClosestConvexResultCallback_get_m_collisionFilterGroup_0 = function() { + return (Pi = b._emscripten_bind_ClosestConvexResultCallback_get_m_collisionFilterGroup_0 = b.asm.Og).apply(null, arguments) + } + , Qi = b._emscripten_bind_ClosestConvexResultCallback_set_m_collisionFilterGroup_1 = function() { + return (Qi = b._emscripten_bind_ClosestConvexResultCallback_set_m_collisionFilterGroup_1 = b.asm.Pg).apply(null, arguments) + } + , Ri = b._emscripten_bind_ClosestConvexResultCallback_get_m_collisionFilterMask_0 = function() { + return (Ri = b._emscripten_bind_ClosestConvexResultCallback_get_m_collisionFilterMask_0 = b.asm.Qg).apply(null, arguments) + } + , Si = b._emscripten_bind_ClosestConvexResultCallback_set_m_collisionFilterMask_1 = function() { + return (Si = b._emscripten_bind_ClosestConvexResultCallback_set_m_collisionFilterMask_1 = b.asm.Rg).apply(null, arguments) + } + , Ti = b._emscripten_bind_ClosestConvexResultCallback_get_m_closestHitFraction_0 = function() { + return (Ti = b._emscripten_bind_ClosestConvexResultCallback_get_m_closestHitFraction_0 = b.asm.Sg).apply(null, arguments) + } + , Ui = b._emscripten_bind_ClosestConvexResultCallback_set_m_closestHitFraction_1 = function() { + return (Ui = b._emscripten_bind_ClosestConvexResultCallback_set_m_closestHitFraction_1 = b.asm.Tg).apply(null, arguments) + } + , Vi = b._emscripten_bind_ClosestConvexResultCallback___destroy___0 = function() { + return (Vi = b._emscripten_bind_ClosestConvexResultCallback___destroy___0 = b.asm.Ug).apply(null, arguments) + } + , Wi = b._emscripten_bind_AllHitsRayResultCallback_AllHitsRayResultCallback_2 = function() { + return (Wi = b._emscripten_bind_AllHitsRayResultCallback_AllHitsRayResultCallback_2 = b.asm.Vg).apply(null, arguments) + } + , Xi = b._emscripten_bind_AllHitsRayResultCallback_hasHit_0 = function() { + return (Xi = b._emscripten_bind_AllHitsRayResultCallback_hasHit_0 = b.asm.Wg).apply(null, arguments) + } + , Yi = b._emscripten_bind_AllHitsRayResultCallback_get_m_collisionObjects_0 = function() { + return (Yi = b._emscripten_bind_AllHitsRayResultCallback_get_m_collisionObjects_0 = b.asm.Xg).apply(null, arguments) + } + , Zi = b._emscripten_bind_AllHitsRayResultCallback_set_m_collisionObjects_1 = function() { + return (Zi = b._emscripten_bind_AllHitsRayResultCallback_set_m_collisionObjects_1 = b.asm.Yg).apply(null, arguments) + } + , $i = b._emscripten_bind_AllHitsRayResultCallback_get_m_rayFromWorld_0 = function() { + return ($i = b._emscripten_bind_AllHitsRayResultCallback_get_m_rayFromWorld_0 = b.asm.Zg).apply(null, arguments) + } + , aj = b._emscripten_bind_AllHitsRayResultCallback_set_m_rayFromWorld_1 = function() { + return (aj = b._emscripten_bind_AllHitsRayResultCallback_set_m_rayFromWorld_1 = b.asm._g).apply(null, arguments) + } + , bj = b._emscripten_bind_AllHitsRayResultCallback_get_m_rayToWorld_0 = function() { + return (bj = b._emscripten_bind_AllHitsRayResultCallback_get_m_rayToWorld_0 = b.asm.$g).apply(null, arguments) + } + , cj = b._emscripten_bind_AllHitsRayResultCallback_set_m_rayToWorld_1 = function() { + return (cj = b._emscripten_bind_AllHitsRayResultCallback_set_m_rayToWorld_1 = b.asm.ah).apply(null, arguments) + } + , dj = b._emscripten_bind_AllHitsRayResultCallback_get_m_hitNormalWorld_0 = function() { + return (dj = b._emscripten_bind_AllHitsRayResultCallback_get_m_hitNormalWorld_0 = b.asm.bh).apply(null, arguments) + } + , ej = b._emscripten_bind_AllHitsRayResultCallback_set_m_hitNormalWorld_1 = function() { + return (ej = b._emscripten_bind_AllHitsRayResultCallback_set_m_hitNormalWorld_1 = b.asm.ch).apply(null, arguments) + } + , fj = b._emscripten_bind_AllHitsRayResultCallback_get_m_hitPointWorld_0 = function() { + return (fj = b._emscripten_bind_AllHitsRayResultCallback_get_m_hitPointWorld_0 = b.asm.dh).apply(null, arguments) + } + , gj = b._emscripten_bind_AllHitsRayResultCallback_set_m_hitPointWorld_1 = function() { + return (gj = b._emscripten_bind_AllHitsRayResultCallback_set_m_hitPointWorld_1 = b.asm.eh).apply(null, arguments) + } + , hj = b._emscripten_bind_AllHitsRayResultCallback_get_m_hitFractions_0 = function() { + return (hj = b._emscripten_bind_AllHitsRayResultCallback_get_m_hitFractions_0 = b.asm.fh).apply(null, arguments) + } + , ij = b._emscripten_bind_AllHitsRayResultCallback_set_m_hitFractions_1 = function() { + return (ij = b._emscripten_bind_AllHitsRayResultCallback_set_m_hitFractions_1 = b.asm.gh).apply(null, arguments) + } + , jj = b._emscripten_bind_AllHitsRayResultCallback_get_m_collisionFilterGroup_0 = function() { + return (jj = b._emscripten_bind_AllHitsRayResultCallback_get_m_collisionFilterGroup_0 = b.asm.hh).apply(null, arguments) + } + , kj = b._emscripten_bind_AllHitsRayResultCallback_set_m_collisionFilterGroup_1 = function() { + return (kj = b._emscripten_bind_AllHitsRayResultCallback_set_m_collisionFilterGroup_1 = b.asm.ih).apply(null, arguments) + } + , lj = b._emscripten_bind_AllHitsRayResultCallback_get_m_collisionFilterMask_0 = function() { + return (lj = b._emscripten_bind_AllHitsRayResultCallback_get_m_collisionFilterMask_0 = b.asm.jh).apply(null, arguments) + } + , mj = b._emscripten_bind_AllHitsRayResultCallback_set_m_collisionFilterMask_1 = function() { + return (mj = b._emscripten_bind_AllHitsRayResultCallback_set_m_collisionFilterMask_1 = b.asm.kh).apply(null, arguments) + } + , nj = b._emscripten_bind_AllHitsRayResultCallback_get_m_closestHitFraction_0 = function() { + return (nj = b._emscripten_bind_AllHitsRayResultCallback_get_m_closestHitFraction_0 = b.asm.lh).apply(null, arguments) + } + , oj = b._emscripten_bind_AllHitsRayResultCallback_set_m_closestHitFraction_1 = function() { + return (oj = b._emscripten_bind_AllHitsRayResultCallback_set_m_closestHitFraction_1 = b.asm.mh).apply(null, arguments) + } + , pj = b._emscripten_bind_AllHitsRayResultCallback_get_m_collisionObject_0 = function() { + return (pj = b._emscripten_bind_AllHitsRayResultCallback_get_m_collisionObject_0 = b.asm.nh).apply(null, arguments) + } + , qj = b._emscripten_bind_AllHitsRayResultCallback_set_m_collisionObject_1 = function() { + return (qj = b._emscripten_bind_AllHitsRayResultCallback_set_m_collisionObject_1 = b.asm.oh).apply(null, arguments) + } + , rj = b._emscripten_bind_AllHitsRayResultCallback___destroy___0 = function() { + return (rj = b._emscripten_bind_AllHitsRayResultCallback___destroy___0 = b.asm.ph).apply(null, arguments) + } + , sj = b._emscripten_bind_tMaterialArray_size_0 = function() { + return (sj = b._emscripten_bind_tMaterialArray_size_0 = b.asm.qh).apply(null, arguments) + } + , tj = b._emscripten_bind_tMaterialArray_at_1 = function() { + return (tj = b._emscripten_bind_tMaterialArray_at_1 = b.asm.rh).apply(null, arguments) + } + , uj = b._emscripten_bind_tMaterialArray___destroy___0 = function() { + return (uj = b._emscripten_bind_tMaterialArray___destroy___0 = b.asm.sh).apply(null, arguments) + } + , vj = b._emscripten_bind_btDefaultVehicleRaycaster_btDefaultVehicleRaycaster_1 = function() { + return (vj = b._emscripten_bind_btDefaultVehicleRaycaster_btDefaultVehicleRaycaster_1 = b.asm.th).apply(null, arguments) + } + , wj = b._emscripten_bind_btDefaultVehicleRaycaster_castRay_3 = function() { + return (wj = b._emscripten_bind_btDefaultVehicleRaycaster_castRay_3 = b.asm.uh).apply(null, arguments) + } + , xj = b._emscripten_bind_btDefaultVehicleRaycaster___destroy___0 = function() { + return (xj = b._emscripten_bind_btDefaultVehicleRaycaster___destroy___0 = b.asm.vh).apply(null, arguments) + } + , yj = b._emscripten_bind_btEmptyShape_btEmptyShape_0 = function() { + return (yj = b._emscripten_bind_btEmptyShape_btEmptyShape_0 = b.asm.wh).apply(null, arguments) + } + , zj = b._emscripten_bind_btEmptyShape_setLocalScaling_1 = function() { + return (zj = b._emscripten_bind_btEmptyShape_setLocalScaling_1 = b.asm.xh).apply(null, arguments) + } + , Aj = b._emscripten_bind_btEmptyShape_getLocalScaling_0 = function() { + return (Aj = b._emscripten_bind_btEmptyShape_getLocalScaling_0 = b.asm.yh).apply(null, arguments) + } + , Bj = b._emscripten_bind_btEmptyShape_calculateLocalInertia_2 = function() { + return (Bj = b._emscripten_bind_btEmptyShape_calculateLocalInertia_2 = b.asm.zh).apply(null, arguments) + } + , Cj = b._emscripten_bind_btEmptyShape___destroy___0 = function() { + return (Cj = b._emscripten_bind_btEmptyShape___destroy___0 = b.asm.Ah).apply(null, arguments) + } + , Dj = b._emscripten_bind_btConstraintSetting_btConstraintSetting_0 = function() { + return (Dj = b._emscripten_bind_btConstraintSetting_btConstraintSetting_0 = b.asm.Bh).apply(null, arguments) + } + , Ej = b._emscripten_bind_btConstraintSetting_get_m_tau_0 = function() { + return (Ej = b._emscripten_bind_btConstraintSetting_get_m_tau_0 = b.asm.Ch).apply(null, arguments) + } + , Fj = b._emscripten_bind_btConstraintSetting_set_m_tau_1 = function() { + return (Fj = b._emscripten_bind_btConstraintSetting_set_m_tau_1 = b.asm.Dh).apply(null, arguments) + } + , Gj = b._emscripten_bind_btConstraintSetting_get_m_damping_0 = function() { + return (Gj = b._emscripten_bind_btConstraintSetting_get_m_damping_0 = b.asm.Eh).apply(null, arguments) + } + , Hj = b._emscripten_bind_btConstraintSetting_set_m_damping_1 = function() { + return (Hj = b._emscripten_bind_btConstraintSetting_set_m_damping_1 = b.asm.Fh).apply(null, arguments) + } + , Ij = b._emscripten_bind_btConstraintSetting_get_m_impulseClamp_0 = function() { + return (Ij = b._emscripten_bind_btConstraintSetting_get_m_impulseClamp_0 = b.asm.Gh).apply(null, arguments) + } + , Jj = b._emscripten_bind_btConstraintSetting_set_m_impulseClamp_1 = function() { + return (Jj = b._emscripten_bind_btConstraintSetting_set_m_impulseClamp_1 = b.asm.Hh).apply(null, arguments) + } + , Kj = b._emscripten_bind_btConstraintSetting___destroy___0 = function() { + return (Kj = b._emscripten_bind_btConstraintSetting___destroy___0 = b.asm.Ih).apply(null, arguments) + } + , Lj = b._emscripten_bind_LocalShapeInfo_get_m_shapePart_0 = function() { + return (Lj = b._emscripten_bind_LocalShapeInfo_get_m_shapePart_0 = b.asm.Jh).apply(null, arguments) + } + , Mj = b._emscripten_bind_LocalShapeInfo_set_m_shapePart_1 = function() { + return (Mj = b._emscripten_bind_LocalShapeInfo_set_m_shapePart_1 = b.asm.Kh).apply(null, arguments) + } + , Nj = b._emscripten_bind_LocalShapeInfo_get_m_triangleIndex_0 = function() { + return (Nj = b._emscripten_bind_LocalShapeInfo_get_m_triangleIndex_0 = b.asm.Lh).apply(null, arguments) + } + , Oj = b._emscripten_bind_LocalShapeInfo_set_m_triangleIndex_1 = function() { + return (Oj = b._emscripten_bind_LocalShapeInfo_set_m_triangleIndex_1 = b.asm.Mh).apply(null, arguments) + } + , Pj = b._emscripten_bind_LocalShapeInfo___destroy___0 = function() { + return (Pj = b._emscripten_bind_LocalShapeInfo___destroy___0 = b.asm.Nh).apply(null, arguments) + } + , Qj = b._emscripten_bind_btRigidBody_btRigidBody_1 = function() { + return (Qj = b._emscripten_bind_btRigidBody_btRigidBody_1 = b.asm.Oh).apply(null, arguments) + } + , Rj = b._emscripten_bind_btRigidBody_getCenterOfMassTransform_0 = function() { + return (Rj = b._emscripten_bind_btRigidBody_getCenterOfMassTransform_0 = b.asm.Ph).apply(null, arguments) + } + , Sj = b._emscripten_bind_btRigidBody_setCenterOfMassTransform_1 = function() { + return (Sj = b._emscripten_bind_btRigidBody_setCenterOfMassTransform_1 = b.asm.Qh).apply(null, arguments) + } + , Tj = b._emscripten_bind_btRigidBody_setSleepingThresholds_2 = function() { + return (Tj = b._emscripten_bind_btRigidBody_setSleepingThresholds_2 = b.asm.Rh).apply(null, arguments) + } + , Uj = b._emscripten_bind_btRigidBody_getLinearDamping_0 = function() { + return (Uj = b._emscripten_bind_btRigidBody_getLinearDamping_0 = b.asm.Sh).apply(null, arguments) + } + , Vj = b._emscripten_bind_btRigidBody_getAngularDamping_0 = function() { + return (Vj = b._emscripten_bind_btRigidBody_getAngularDamping_0 = b.asm.Th).apply(null, arguments) + } + , Wj = b._emscripten_bind_btRigidBody_setDamping_2 = function() { + return (Wj = b._emscripten_bind_btRigidBody_setDamping_2 = b.asm.Uh).apply(null, arguments) + } + , Xj = b._emscripten_bind_btRigidBody_setMassProps_2 = function() { + return (Xj = b._emscripten_bind_btRigidBody_setMassProps_2 = b.asm.Vh).apply(null, arguments) + } + , Yj = b._emscripten_bind_btRigidBody_getLinearFactor_0 = function() { + return (Yj = b._emscripten_bind_btRigidBody_getLinearFactor_0 = b.asm.Wh).apply(null, arguments) + } + , Zj = b._emscripten_bind_btRigidBody_setLinearFactor_1 = function() { + return (Zj = b._emscripten_bind_btRigidBody_setLinearFactor_1 = b.asm.Xh).apply(null, arguments) + } + , ak = b._emscripten_bind_btRigidBody_applyTorque_1 = function() { + return (ak = b._emscripten_bind_btRigidBody_applyTorque_1 = b.asm.Yh).apply(null, arguments) + } + , bk = b._emscripten_bind_btRigidBody_applyLocalTorque_1 = function() { + return (bk = b._emscripten_bind_btRigidBody_applyLocalTorque_1 = b.asm.Zh).apply(null, arguments) + } + , ck = b._emscripten_bind_btRigidBody_applyForce_2 = function() { + return (ck = b._emscripten_bind_btRigidBody_applyForce_2 = b.asm._h).apply(null, arguments) + } + , dk = b._emscripten_bind_btRigidBody_applyCentralForce_1 = function() { + return (dk = b._emscripten_bind_btRigidBody_applyCentralForce_1 = b.asm.$h).apply(null, arguments) + } + , ek = b._emscripten_bind_btRigidBody_applyCentralLocalForce_1 = function() { + return (ek = b._emscripten_bind_btRigidBody_applyCentralLocalForce_1 = b.asm.ai).apply(null, arguments) + } + , fk = b._emscripten_bind_btRigidBody_applyTorqueImpulse_1 = function() { + return (fk = b._emscripten_bind_btRigidBody_applyTorqueImpulse_1 = b.asm.bi).apply(null, arguments) + } + , gk = b._emscripten_bind_btRigidBody_applyImpulse_2 = function() { + return (gk = b._emscripten_bind_btRigidBody_applyImpulse_2 = b.asm.ci).apply(null, arguments) + } + , hk = b._emscripten_bind_btRigidBody_applyCentralImpulse_1 = function() { + return (hk = b._emscripten_bind_btRigidBody_applyCentralImpulse_1 = b.asm.di).apply(null, arguments) + } + , ik = b._emscripten_bind_btRigidBody_updateInertiaTensor_0 = function() { + return (ik = b._emscripten_bind_btRigidBody_updateInertiaTensor_0 = b.asm.ei).apply(null, arguments) + } + , jk = b._emscripten_bind_btRigidBody_getLinearVelocity_0 = function() { + return (jk = b._emscripten_bind_btRigidBody_getLinearVelocity_0 = b.asm.fi).apply(null, arguments) + } + , kk = b._emscripten_bind_btRigidBody_getAngularVelocity_0 = function() { + return (kk = b._emscripten_bind_btRigidBody_getAngularVelocity_0 = b.asm.gi).apply(null, arguments) + } + , lk = b._emscripten_bind_btRigidBody_setLinearVelocity_1 = function() { + return (lk = b._emscripten_bind_btRigidBody_setLinearVelocity_1 = b.asm.hi).apply(null, arguments) + } + , mk = b._emscripten_bind_btRigidBody_setAngularVelocity_1 = function() { + return (mk = b._emscripten_bind_btRigidBody_setAngularVelocity_1 = b.asm.ii).apply(null, arguments) + } + , nk = b._emscripten_bind_btRigidBody_getMotionState_0 = function() { + return (nk = b._emscripten_bind_btRigidBody_getMotionState_0 = b.asm.ji).apply(null, arguments) + } + , ok = b._emscripten_bind_btRigidBody_setMotionState_1 = function() { + return (ok = b._emscripten_bind_btRigidBody_setMotionState_1 = b.asm.ki).apply(null, arguments) + } + , pk = b._emscripten_bind_btRigidBody_getAngularFactor_0 = function() { + return (pk = b._emscripten_bind_btRigidBody_getAngularFactor_0 = b.asm.li).apply(null, arguments) + } + , qk = b._emscripten_bind_btRigidBody_setAngularFactor_1 = function() { + return (qk = b._emscripten_bind_btRigidBody_setAngularFactor_1 = b.asm.mi).apply(null, arguments) + } + , rk = b._emscripten_bind_btRigidBody_upcast_1 = function() { + return (rk = b._emscripten_bind_btRigidBody_upcast_1 = b.asm.ni).apply(null, arguments) + } + , sk = b._emscripten_bind_btRigidBody_getAabb_2 = function() { + return (sk = b._emscripten_bind_btRigidBody_getAabb_2 = b.asm.oi).apply(null, arguments) + } + , tk = b._emscripten_bind_btRigidBody_applyGravity_0 = function() { + return (tk = b._emscripten_bind_btRigidBody_applyGravity_0 = b.asm.pi).apply(null, arguments) + } + , uk = b._emscripten_bind_btRigidBody_getGravity_0 = function() { + return (uk = b._emscripten_bind_btRigidBody_getGravity_0 = b.asm.qi).apply(null, arguments) + } + , vk = b._emscripten_bind_btRigidBody_setGravity_1 = function() { + return (vk = b._emscripten_bind_btRigidBody_setGravity_1 = b.asm.ri).apply(null, arguments) + } + , wk = b._emscripten_bind_btRigidBody_getBroadphaseProxy_0 = function() { + return (wk = b._emscripten_bind_btRigidBody_getBroadphaseProxy_0 = b.asm.si).apply(null, arguments) + } + , xk = b._emscripten_bind_btRigidBody_clearForces_0 = function() { + return (xk = b._emscripten_bind_btRigidBody_clearForces_0 = b.asm.ti).apply(null, arguments) + } + , yk = b._emscripten_bind_btRigidBody_setAnisotropicFriction_2 = function() { + return (yk = b._emscripten_bind_btRigidBody_setAnisotropicFriction_2 = b.asm.ui).apply(null, arguments) + } + , zk = b._emscripten_bind_btRigidBody_getCollisionShape_0 = function() { + return (zk = b._emscripten_bind_btRigidBody_getCollisionShape_0 = b.asm.vi).apply(null, arguments) + } + , Ak = b._emscripten_bind_btRigidBody_setContactProcessingThreshold_1 = function() { + return (Ak = b._emscripten_bind_btRigidBody_setContactProcessingThreshold_1 = b.asm.wi).apply(null, arguments) + } + , Bk = b._emscripten_bind_btRigidBody_setActivationState_1 = function() { + return (Bk = b._emscripten_bind_btRigidBody_setActivationState_1 = b.asm.xi).apply(null, arguments) + } + , Ck = b._emscripten_bind_btRigidBody_forceActivationState_1 = function() { + return (Ck = b._emscripten_bind_btRigidBody_forceActivationState_1 = b.asm.yi).apply(null, arguments) + } + , Dk = b._emscripten_bind_btRigidBody_activate_0 = function() { + return (Dk = b._emscripten_bind_btRigidBody_activate_0 = b.asm.zi).apply(null, arguments) + } + , Ek = b._emscripten_bind_btRigidBody_activate_1 = function() { + return (Ek = b._emscripten_bind_btRigidBody_activate_1 = b.asm.Ai).apply(null, arguments) + } + , Fk = b._emscripten_bind_btRigidBody_isActive_0 = function() { + return (Fk = b._emscripten_bind_btRigidBody_isActive_0 = b.asm.Bi).apply(null, arguments) + } + , Gk = b._emscripten_bind_btRigidBody_isKinematicObject_0 = function() { + return (Gk = b._emscripten_bind_btRigidBody_isKinematicObject_0 = b.asm.Ci).apply(null, arguments) + } + , Hk = b._emscripten_bind_btRigidBody_isStaticObject_0 = function() { + return (Hk = b._emscripten_bind_btRigidBody_isStaticObject_0 = b.asm.Di).apply(null, arguments) + } + , Ik = b._emscripten_bind_btRigidBody_isStaticOrKinematicObject_0 = function() { + return (Ik = b._emscripten_bind_btRigidBody_isStaticOrKinematicObject_0 = b.asm.Ei).apply(null, arguments) + } + , Jk = b._emscripten_bind_btRigidBody_getRestitution_0 = function() { + return (Jk = b._emscripten_bind_btRigidBody_getRestitution_0 = b.asm.Fi).apply(null, arguments) + } + , Kk = b._emscripten_bind_btRigidBody_getFriction_0 = function() { + return (Kk = b._emscripten_bind_btRigidBody_getFriction_0 = b.asm.Gi).apply(null, arguments) + } + , Lk = b._emscripten_bind_btRigidBody_getRollingFriction_0 = function() { + return (Lk = b._emscripten_bind_btRigidBody_getRollingFriction_0 = b.asm.Hi).apply(null, arguments) + } + , Mk = b._emscripten_bind_btRigidBody_setRestitution_1 = function() { + return (Mk = b._emscripten_bind_btRigidBody_setRestitution_1 = b.asm.Ii).apply(null, arguments) + } + , Nk = b._emscripten_bind_btRigidBody_setFriction_1 = function() { + return (Nk = b._emscripten_bind_btRigidBody_setFriction_1 = b.asm.Ji).apply(null, arguments) + } + , Ok = b._emscripten_bind_btRigidBody_setRollingFriction_1 = function() { + return (Ok = b._emscripten_bind_btRigidBody_setRollingFriction_1 = b.asm.Ki).apply(null, arguments) + } + , Pk = b._emscripten_bind_btRigidBody_getWorldTransform_0 = function() { + return (Pk = b._emscripten_bind_btRigidBody_getWorldTransform_0 = b.asm.Li).apply(null, arguments) + } + , Qk = b._emscripten_bind_btRigidBody_getCollisionFlags_0 = function() { + return (Qk = b._emscripten_bind_btRigidBody_getCollisionFlags_0 = b.asm.Mi).apply(null, arguments) + } + , Rk = b._emscripten_bind_btRigidBody_setCollisionFlags_1 = function() { + return (Rk = b._emscripten_bind_btRigidBody_setCollisionFlags_1 = b.asm.Ni).apply(null, arguments) + } + , Sk = b._emscripten_bind_btRigidBody_setWorldTransform_1 = function() { + return (Sk = b._emscripten_bind_btRigidBody_setWorldTransform_1 = b.asm.Oi).apply(null, arguments) + } + , Tk = b._emscripten_bind_btRigidBody_setCollisionShape_1 = function() { + return (Tk = b._emscripten_bind_btRigidBody_setCollisionShape_1 = b.asm.Pi).apply(null, arguments) + } + , Uk = b._emscripten_bind_btRigidBody_setCcdMotionThreshold_1 = function() { + return (Uk = b._emscripten_bind_btRigidBody_setCcdMotionThreshold_1 = b.asm.Qi).apply(null, arguments) + } + , Vk = b._emscripten_bind_btRigidBody_setCcdSweptSphereRadius_1 = function() { + return (Vk = b._emscripten_bind_btRigidBody_setCcdSweptSphereRadius_1 = b.asm.Ri).apply(null, arguments) + } + , Wk = b._emscripten_bind_btRigidBody_getUserIndex_0 = function() { + return (Wk = b._emscripten_bind_btRigidBody_getUserIndex_0 = b.asm.Si).apply(null, arguments) + } + , Xk = b._emscripten_bind_btRigidBody_setUserIndex_1 = function() { + return (Xk = b._emscripten_bind_btRigidBody_setUserIndex_1 = b.asm.Ti).apply(null, arguments) + } + , Yk = b._emscripten_bind_btRigidBody_getUserPointer_0 = function() { + return (Yk = b._emscripten_bind_btRigidBody_getUserPointer_0 = b.asm.Ui).apply(null, arguments) + } + , Zk = b._emscripten_bind_btRigidBody_setUserPointer_1 = function() { + return (Zk = b._emscripten_bind_btRigidBody_setUserPointer_1 = b.asm.Vi).apply(null, arguments) + } + , $k = b._emscripten_bind_btRigidBody_getBroadphaseHandle_0 = function() { + return ($k = b._emscripten_bind_btRigidBody_getBroadphaseHandle_0 = b.asm.Wi).apply(null, arguments) + } + , al = b._emscripten_bind_btRigidBody___destroy___0 = function() { + return (al = b._emscripten_bind_btRigidBody___destroy___0 = b.asm.Xi).apply(null, arguments) + } + , bl = b._emscripten_bind_btIndexedMeshArray_size_0 = function() { + return (bl = b._emscripten_bind_btIndexedMeshArray_size_0 = b.asm.Yi).apply(null, arguments) + } + , cl = b._emscripten_bind_btIndexedMeshArray_at_1 = function() { + return (cl = b._emscripten_bind_btIndexedMeshArray_at_1 = b.asm.Zi).apply(null, arguments) + } + , dl = b._emscripten_bind_btIndexedMeshArray___destroy___0 = function() { + return (dl = b._emscripten_bind_btIndexedMeshArray___destroy___0 = b.asm._i).apply(null, arguments) + } + , el = b._emscripten_bind_btDbvtBroadphase_btDbvtBroadphase_0 = function() { + return (el = b._emscripten_bind_btDbvtBroadphase_btDbvtBroadphase_0 = b.asm.$i).apply(null, arguments) + } + , fl = b._emscripten_bind_btDbvtBroadphase___destroy___0 = function() { + return (fl = b._emscripten_bind_btDbvtBroadphase___destroy___0 = b.asm.aj).apply(null, arguments) + } + , gl = b._emscripten_bind_btHeightfieldTerrainShape_btHeightfieldTerrainShape_9 = function() { + return (gl = b._emscripten_bind_btHeightfieldTerrainShape_btHeightfieldTerrainShape_9 = b.asm.bj).apply(null, arguments) + } + , hl = b._emscripten_bind_btHeightfieldTerrainShape_setMargin_1 = function() { + return (hl = b._emscripten_bind_btHeightfieldTerrainShape_setMargin_1 = b.asm.cj).apply(null, arguments) + } + , il = b._emscripten_bind_btHeightfieldTerrainShape_getMargin_0 = function() { + return (il = b._emscripten_bind_btHeightfieldTerrainShape_getMargin_0 = b.asm.dj).apply(null, arguments) + } + , jl = b._emscripten_bind_btHeightfieldTerrainShape_setLocalScaling_1 = function() { + return (jl = b._emscripten_bind_btHeightfieldTerrainShape_setLocalScaling_1 = b.asm.ej).apply(null, arguments) + } + , kl = b._emscripten_bind_btHeightfieldTerrainShape_getLocalScaling_0 = function() { + return (kl = b._emscripten_bind_btHeightfieldTerrainShape_getLocalScaling_0 = b.asm.fj).apply(null, arguments) + } + , ll = b._emscripten_bind_btHeightfieldTerrainShape_calculateLocalInertia_2 = function() { + return (ll = b._emscripten_bind_btHeightfieldTerrainShape_calculateLocalInertia_2 = b.asm.gj).apply(null, arguments) + } + , ml = b._emscripten_bind_btHeightfieldTerrainShape___destroy___0 = function() { + return (ml = b._emscripten_bind_btHeightfieldTerrainShape___destroy___0 = b.asm.hj).apply(null, arguments) + } + , nl = b._emscripten_bind_btDefaultSoftBodySolver_btDefaultSoftBodySolver_0 = function() { + return (nl = b._emscripten_bind_btDefaultSoftBodySolver_btDefaultSoftBodySolver_0 = b.asm.ij).apply(null, arguments) + } + , ol = b._emscripten_bind_btDefaultSoftBodySolver___destroy___0 = function() { + return (ol = b._emscripten_bind_btDefaultSoftBodySolver___destroy___0 = b.asm.jj).apply(null, arguments) + } + , pl = b._emscripten_bind_btCollisionDispatcher_btCollisionDispatcher_1 = function() { + return (pl = b._emscripten_bind_btCollisionDispatcher_btCollisionDispatcher_1 = b.asm.kj).apply(null, arguments) + } + , ql = b._emscripten_bind_btCollisionDispatcher_getNumManifolds_0 = function() { + return (ql = b._emscripten_bind_btCollisionDispatcher_getNumManifolds_0 = b.asm.lj).apply(null, arguments) + } + , rl = b._emscripten_bind_btCollisionDispatcher_getManifoldByIndexInternal_1 = function() { + return (rl = b._emscripten_bind_btCollisionDispatcher_getManifoldByIndexInternal_1 = b.asm.mj).apply(null, arguments) + } + , sl = b._emscripten_bind_btCollisionDispatcher___destroy___0 = function() { + return (sl = b._emscripten_bind_btCollisionDispatcher___destroy___0 = b.asm.nj).apply(null, arguments) + } + , tl = b._emscripten_bind_btAxisSweep3_btAxisSweep3_2 = function() { + return (tl = b._emscripten_bind_btAxisSweep3_btAxisSweep3_2 = b.asm.oj).apply(null, arguments) + } + , ul = b._emscripten_bind_btAxisSweep3_btAxisSweep3_3 = function() { + return (ul = b._emscripten_bind_btAxisSweep3_btAxisSweep3_3 = b.asm.pj).apply(null, arguments) + } + , vl = b._emscripten_bind_btAxisSweep3_btAxisSweep3_4 = function() { + return (vl = b._emscripten_bind_btAxisSweep3_btAxisSweep3_4 = b.asm.qj).apply(null, arguments) + } + , wl = b._emscripten_bind_btAxisSweep3_btAxisSweep3_5 = function() { + return (wl = b._emscripten_bind_btAxisSweep3_btAxisSweep3_5 = b.asm.rj).apply(null, arguments) + } + , xl = b._emscripten_bind_btAxisSweep3___destroy___0 = function() { + return (xl = b._emscripten_bind_btAxisSweep3___destroy___0 = b.asm.sj).apply(null, arguments) + } + , yl = b._emscripten_bind_VoidPtr___destroy___0 = function() { + return (yl = b._emscripten_bind_VoidPtr___destroy___0 = b.asm.tj).apply(null, arguments) + } + , zl = b._emscripten_bind_btSoftBodyWorldInfo_btSoftBodyWorldInfo_0 = function() { + return (zl = b._emscripten_bind_btSoftBodyWorldInfo_btSoftBodyWorldInfo_0 = b.asm.uj).apply(null, arguments) + } + , Al = b._emscripten_bind_btSoftBodyWorldInfo_get_air_density_0 = function() { + return (Al = b._emscripten_bind_btSoftBodyWorldInfo_get_air_density_0 = b.asm.vj).apply(null, arguments) + } + , Bl = b._emscripten_bind_btSoftBodyWorldInfo_set_air_density_1 = function() { + return (Bl = b._emscripten_bind_btSoftBodyWorldInfo_set_air_density_1 = b.asm.wj).apply(null, arguments) + } + , Cl = b._emscripten_bind_btSoftBodyWorldInfo_get_water_density_0 = function() { + return (Cl = b._emscripten_bind_btSoftBodyWorldInfo_get_water_density_0 = b.asm.xj).apply(null, arguments) + } + , Dl = b._emscripten_bind_btSoftBodyWorldInfo_set_water_density_1 = function() { + return (Dl = b._emscripten_bind_btSoftBodyWorldInfo_set_water_density_1 = b.asm.yj).apply(null, arguments) + } + , El = b._emscripten_bind_btSoftBodyWorldInfo_get_water_offset_0 = function() { + return (El = b._emscripten_bind_btSoftBodyWorldInfo_get_water_offset_0 = b.asm.zj).apply(null, arguments) + } + , Fl = b._emscripten_bind_btSoftBodyWorldInfo_set_water_offset_1 = function() { + return (Fl = b._emscripten_bind_btSoftBodyWorldInfo_set_water_offset_1 = b.asm.Aj).apply(null, arguments) + } + , Gl = b._emscripten_bind_btSoftBodyWorldInfo_get_m_maxDisplacement_0 = function() { + return (Gl = b._emscripten_bind_btSoftBodyWorldInfo_get_m_maxDisplacement_0 = b.asm.Bj).apply(null, arguments) + } + , Hl = b._emscripten_bind_btSoftBodyWorldInfo_set_m_maxDisplacement_1 = function() { + return (Hl = b._emscripten_bind_btSoftBodyWorldInfo_set_m_maxDisplacement_1 = b.asm.Cj).apply(null, arguments) + } + , Il = b._emscripten_bind_btSoftBodyWorldInfo_get_water_normal_0 = function() { + return (Il = b._emscripten_bind_btSoftBodyWorldInfo_get_water_normal_0 = b.asm.Dj).apply(null, arguments) + } + , Jl = b._emscripten_bind_btSoftBodyWorldInfo_set_water_normal_1 = function() { + return (Jl = b._emscripten_bind_btSoftBodyWorldInfo_set_water_normal_1 = b.asm.Ej).apply(null, arguments) + } + , Kl = b._emscripten_bind_btSoftBodyWorldInfo_get_m_broadphase_0 = function() { + return (Kl = b._emscripten_bind_btSoftBodyWorldInfo_get_m_broadphase_0 = b.asm.Fj).apply(null, arguments) + } + , Ll = b._emscripten_bind_btSoftBodyWorldInfo_set_m_broadphase_1 = function() { + return (Ll = b._emscripten_bind_btSoftBodyWorldInfo_set_m_broadphase_1 = b.asm.Gj).apply(null, arguments) + } + , Ml = b._emscripten_bind_btSoftBodyWorldInfo_get_m_dispatcher_0 = function() { + return (Ml = b._emscripten_bind_btSoftBodyWorldInfo_get_m_dispatcher_0 = b.asm.Hj).apply(null, arguments) + } + , Nl = b._emscripten_bind_btSoftBodyWorldInfo_set_m_dispatcher_1 = function() { + return (Nl = b._emscripten_bind_btSoftBodyWorldInfo_set_m_dispatcher_1 = b.asm.Ij).apply(null, arguments) + } + , Ol = b._emscripten_bind_btSoftBodyWorldInfo_get_m_gravity_0 = function() { + return (Ol = b._emscripten_bind_btSoftBodyWorldInfo_get_m_gravity_0 = b.asm.Jj).apply(null, arguments) + } + , Pl = b._emscripten_bind_btSoftBodyWorldInfo_set_m_gravity_1 = function() { + return (Pl = b._emscripten_bind_btSoftBodyWorldInfo_set_m_gravity_1 = b.asm.Kj).apply(null, arguments) + } + , Ql = b._emscripten_bind_btSoftBodyWorldInfo___destroy___0 = function() { + return (Ql = b._emscripten_bind_btSoftBodyWorldInfo___destroy___0 = b.asm.Lj).apply(null, arguments) + } + , Rl = b._emscripten_bind_btConeTwistConstraint_btConeTwistConstraint_2 = function() { + return (Rl = b._emscripten_bind_btConeTwistConstraint_btConeTwistConstraint_2 = b.asm.Mj).apply(null, arguments) + } + , Sl = b._emscripten_bind_btConeTwistConstraint_btConeTwistConstraint_4 = function() { + return (Sl = b._emscripten_bind_btConeTwistConstraint_btConeTwistConstraint_4 = b.asm.Nj).apply(null, arguments) + } + , Tl = b._emscripten_bind_btConeTwistConstraint_setLimit_2 = function() { + return (Tl = b._emscripten_bind_btConeTwistConstraint_setLimit_2 = b.asm.Oj).apply(null, arguments) + } + , Ul = b._emscripten_bind_btConeTwistConstraint_setAngularOnly_1 = function() { + return (Ul = b._emscripten_bind_btConeTwistConstraint_setAngularOnly_1 = b.asm.Pj).apply(null, arguments) + } + , Vl = b._emscripten_bind_btConeTwistConstraint_setDamping_1 = function() { + return (Vl = b._emscripten_bind_btConeTwistConstraint_setDamping_1 = b.asm.Qj).apply(null, arguments) + } + , Wl = b._emscripten_bind_btConeTwistConstraint_enableMotor_1 = function() { + return (Wl = b._emscripten_bind_btConeTwistConstraint_enableMotor_1 = b.asm.Rj).apply(null, arguments) + } + , Xl = b._emscripten_bind_btConeTwistConstraint_setMaxMotorImpulse_1 = function() { + return (Xl = b._emscripten_bind_btConeTwistConstraint_setMaxMotorImpulse_1 = b.asm.Sj).apply(null, arguments) + } + , Yl = b._emscripten_bind_btConeTwistConstraint_setMaxMotorImpulseNormalized_1 = function() { + return (Yl = b._emscripten_bind_btConeTwistConstraint_setMaxMotorImpulseNormalized_1 = b.asm.Tj).apply(null, arguments) + } + , Zl = b._emscripten_bind_btConeTwistConstraint_setMotorTarget_1 = function() { + return (Zl = b._emscripten_bind_btConeTwistConstraint_setMotorTarget_1 = b.asm.Uj).apply(null, arguments) + } + , $l = b._emscripten_bind_btConeTwistConstraint_setMotorTargetInConstraintSpace_1 = function() { + return ($l = b._emscripten_bind_btConeTwistConstraint_setMotorTargetInConstraintSpace_1 = b.asm.Vj).apply(null, arguments) + } + , am = b._emscripten_bind_btConeTwistConstraint_enableFeedback_1 = function() { + return (am = b._emscripten_bind_btConeTwistConstraint_enableFeedback_1 = b.asm.Wj).apply(null, arguments) + } + , bm = b._emscripten_bind_btConeTwistConstraint_getBreakingImpulseThreshold_0 = function() { + return (bm = b._emscripten_bind_btConeTwistConstraint_getBreakingImpulseThreshold_0 = b.asm.Xj).apply(null, arguments) + } + , cm = b._emscripten_bind_btConeTwistConstraint_setBreakingImpulseThreshold_1 = function() { + return (cm = b._emscripten_bind_btConeTwistConstraint_setBreakingImpulseThreshold_1 = b.asm.Yj).apply(null, arguments) + } + , dm = b._emscripten_bind_btConeTwistConstraint_getParam_2 = function() { + return (dm = b._emscripten_bind_btConeTwistConstraint_getParam_2 = b.asm.Zj).apply(null, arguments) + } + , em = b._emscripten_bind_btConeTwistConstraint_setParam_3 = function() { + return (em = b._emscripten_bind_btConeTwistConstraint_setParam_3 = b.asm._j).apply(null, arguments) + } + , fm = b._emscripten_bind_btConeTwistConstraint___destroy___0 = function() { + return (fm = b._emscripten_bind_btConeTwistConstraint___destroy___0 = b.asm.$j).apply(null, arguments) + } + , gm = b._emscripten_bind_btHingeConstraint_btHingeConstraint_2 = function() { + return (gm = b._emscripten_bind_btHingeConstraint_btHingeConstraint_2 = b.asm.ak).apply(null, arguments) + } + , hm = b._emscripten_bind_btHingeConstraint_btHingeConstraint_3 = function() { + return (hm = b._emscripten_bind_btHingeConstraint_btHingeConstraint_3 = b.asm.bk).apply(null, arguments) + } + , im = b._emscripten_bind_btHingeConstraint_btHingeConstraint_4 = function() { + return (im = b._emscripten_bind_btHingeConstraint_btHingeConstraint_4 = b.asm.ck).apply(null, arguments) + } + , jm = b._emscripten_bind_btHingeConstraint_btHingeConstraint_5 = function() { + return (jm = b._emscripten_bind_btHingeConstraint_btHingeConstraint_5 = b.asm.dk).apply(null, arguments) + } + , km = b._emscripten_bind_btHingeConstraint_btHingeConstraint_6 = function() { + return (km = b._emscripten_bind_btHingeConstraint_btHingeConstraint_6 = b.asm.ek).apply(null, arguments) + } + , lm = b._emscripten_bind_btHingeConstraint_btHingeConstraint_7 = function() { + return (lm = b._emscripten_bind_btHingeConstraint_btHingeConstraint_7 = b.asm.fk).apply(null, arguments) + } + , mm = b._emscripten_bind_btHingeConstraint_setLimit_4 = function() { + return (mm = b._emscripten_bind_btHingeConstraint_setLimit_4 = b.asm.gk).apply(null, arguments) + } + , nm = b._emscripten_bind_btHingeConstraint_setLimit_5 = function() { + return (nm = b._emscripten_bind_btHingeConstraint_setLimit_5 = b.asm.hk).apply(null, arguments) + } + , om = b._emscripten_bind_btHingeConstraint_enableAngularMotor_3 = function() { + return (om = b._emscripten_bind_btHingeConstraint_enableAngularMotor_3 = b.asm.ik).apply(null, arguments) + } + , pm = b._emscripten_bind_btHingeConstraint_setAngularOnly_1 = function() { + return (pm = b._emscripten_bind_btHingeConstraint_setAngularOnly_1 = b.asm.jk).apply(null, arguments) + } + , qm = b._emscripten_bind_btHingeConstraint_enableMotor_1 = function() { + return (qm = b._emscripten_bind_btHingeConstraint_enableMotor_1 = b.asm.kk).apply(null, arguments) + } + , rm = b._emscripten_bind_btHingeConstraint_setMaxMotorImpulse_1 = function() { + return (rm = b._emscripten_bind_btHingeConstraint_setMaxMotorImpulse_1 = b.asm.lk).apply(null, arguments) + } + , sm = b._emscripten_bind_btHingeConstraint_setMotorTarget_2 = function() { + return (sm = b._emscripten_bind_btHingeConstraint_setMotorTarget_2 = b.asm.mk).apply(null, arguments) + } + , tm = b._emscripten_bind_btHingeConstraint_enableFeedback_1 = function() { + return (tm = b._emscripten_bind_btHingeConstraint_enableFeedback_1 = b.asm.nk).apply(null, arguments) + } + , um = b._emscripten_bind_btHingeConstraint_getBreakingImpulseThreshold_0 = function() { + return (um = b._emscripten_bind_btHingeConstraint_getBreakingImpulseThreshold_0 = b.asm.ok).apply(null, arguments) + } + , wm = b._emscripten_bind_btHingeConstraint_setBreakingImpulseThreshold_1 = function() { + return (wm = b._emscripten_bind_btHingeConstraint_setBreakingImpulseThreshold_1 = b.asm.pk).apply(null, arguments) + } + , xm = b._emscripten_bind_btHingeConstraint_getParam_2 = function() { + return (xm = b._emscripten_bind_btHingeConstraint_getParam_2 = b.asm.qk).apply(null, arguments) + } + , ym = b._emscripten_bind_btHingeConstraint_setParam_3 = function() { + return (ym = b._emscripten_bind_btHingeConstraint_setParam_3 = b.asm.rk).apply(null, arguments) + } + , zm = b._emscripten_bind_btHingeConstraint___destroy___0 = function() { + return (zm = b._emscripten_bind_btHingeConstraint___destroy___0 = b.asm.sk).apply(null, arguments) + } + , Am = b._emscripten_bind_btConeShapeZ_btConeShapeZ_2 = function() { + return (Am = b._emscripten_bind_btConeShapeZ_btConeShapeZ_2 = b.asm.tk).apply(null, arguments) + } + , Bm = b._emscripten_bind_btConeShapeZ_setLocalScaling_1 = function() { + return (Bm = b._emscripten_bind_btConeShapeZ_setLocalScaling_1 = b.asm.uk).apply(null, arguments) + } + , Cm = b._emscripten_bind_btConeShapeZ_getLocalScaling_0 = function() { + return (Cm = b._emscripten_bind_btConeShapeZ_getLocalScaling_0 = b.asm.vk).apply(null, arguments) + } + , Dm = b._emscripten_bind_btConeShapeZ_calculateLocalInertia_2 = function() { + return (Dm = b._emscripten_bind_btConeShapeZ_calculateLocalInertia_2 = b.asm.wk).apply(null, arguments) + } + , Em = b._emscripten_bind_btConeShapeZ___destroy___0 = function() { + return (Em = b._emscripten_bind_btConeShapeZ___destroy___0 = b.asm.xk).apply(null, arguments) + } + , Fm = b._emscripten_bind_btConeShapeX_btConeShapeX_2 = function() { + return (Fm = b._emscripten_bind_btConeShapeX_btConeShapeX_2 = b.asm.yk).apply(null, arguments) + } + , Gm = b._emscripten_bind_btConeShapeX_setLocalScaling_1 = function() { + return (Gm = b._emscripten_bind_btConeShapeX_setLocalScaling_1 = b.asm.zk).apply(null, arguments) + } + , Hm = b._emscripten_bind_btConeShapeX_getLocalScaling_0 = function() { + return (Hm = b._emscripten_bind_btConeShapeX_getLocalScaling_0 = b.asm.Ak).apply(null, arguments) + } + , Im = b._emscripten_bind_btConeShapeX_calculateLocalInertia_2 = function() { + return (Im = b._emscripten_bind_btConeShapeX_calculateLocalInertia_2 = b.asm.Bk).apply(null, arguments) + } + , Jm = b._emscripten_bind_btConeShapeX___destroy___0 = function() { + return (Jm = b._emscripten_bind_btConeShapeX___destroy___0 = b.asm.Ck).apply(null, arguments) + } + , Km = b._emscripten_bind_btTriangleMesh_btTriangleMesh_0 = function() { + return (Km = b._emscripten_bind_btTriangleMesh_btTriangleMesh_0 = b.asm.Dk).apply(null, arguments) + } + , Lm = b._emscripten_bind_btTriangleMesh_btTriangleMesh_1 = function() { + return (Lm = b._emscripten_bind_btTriangleMesh_btTriangleMesh_1 = b.asm.Ek).apply(null, arguments) + } + , Mm = b._emscripten_bind_btTriangleMesh_btTriangleMesh_2 = function() { + return (Mm = b._emscripten_bind_btTriangleMesh_btTriangleMesh_2 = b.asm.Fk).apply(null, arguments) + } + , Nm = b._emscripten_bind_btTriangleMesh_addTriangle_3 = function() { + return (Nm = b._emscripten_bind_btTriangleMesh_addTriangle_3 = b.asm.Gk).apply(null, arguments) + } + , Om = b._emscripten_bind_btTriangleMesh_addTriangle_4 = function() { + return (Om = b._emscripten_bind_btTriangleMesh_addTriangle_4 = b.asm.Hk).apply(null, arguments) + } + , Pm = b._emscripten_bind_btTriangleMesh_findOrAddVertex_2 = function() { + return (Pm = b._emscripten_bind_btTriangleMesh_findOrAddVertex_2 = b.asm.Ik).apply(null, arguments) + } + , Qm = b._emscripten_bind_btTriangleMesh_addIndex_1 = function() { + return (Qm = b._emscripten_bind_btTriangleMesh_addIndex_1 = b.asm.Jk).apply(null, arguments) + } + , Rm = b._emscripten_bind_btTriangleMesh_getIndexedMeshArray_0 = function() { + return (Rm = b._emscripten_bind_btTriangleMesh_getIndexedMeshArray_0 = b.asm.Kk).apply(null, arguments) + } + , Sm = b._emscripten_bind_btTriangleMesh_setScaling_1 = function() { + return (Sm = b._emscripten_bind_btTriangleMesh_setScaling_1 = b.asm.Lk).apply(null, arguments) + } + , Tm = b._emscripten_bind_btTriangleMesh___destroy___0 = function() { + return (Tm = b._emscripten_bind_btTriangleMesh___destroy___0 = b.asm.Mk).apply(null, arguments) + } + , Um = b._emscripten_bind_btConvexHullShape_btConvexHullShape_0 = function() { + return (Um = b._emscripten_bind_btConvexHullShape_btConvexHullShape_0 = b.asm.Nk).apply(null, arguments) + } + , Vm = b._emscripten_bind_btConvexHullShape_btConvexHullShape_1 = function() { + return (Vm = b._emscripten_bind_btConvexHullShape_btConvexHullShape_1 = b.asm.Ok).apply(null, arguments) + } + , Wm = b._emscripten_bind_btConvexHullShape_btConvexHullShape_2 = function() { + return (Wm = b._emscripten_bind_btConvexHullShape_btConvexHullShape_2 = b.asm.Pk).apply(null, arguments) + } + , Xm = b._emscripten_bind_btConvexHullShape_addPoint_1 = function() { + return (Xm = b._emscripten_bind_btConvexHullShape_addPoint_1 = b.asm.Qk).apply(null, arguments) + } + , Ym = b._emscripten_bind_btConvexHullShape_addPoint_2 = function() { + return (Ym = b._emscripten_bind_btConvexHullShape_addPoint_2 = b.asm.Rk).apply(null, arguments) + } + , Zm = b._emscripten_bind_btConvexHullShape_setMargin_1 = function() { + return (Zm = b._emscripten_bind_btConvexHullShape_setMargin_1 = b.asm.Sk).apply(null, arguments) + } + , $m = b._emscripten_bind_btConvexHullShape_getMargin_0 = function() { + return ($m = b._emscripten_bind_btConvexHullShape_getMargin_0 = b.asm.Tk).apply(null, arguments) + } + , an = b._emscripten_bind_btConvexHullShape_getNumVertices_0 = function() { + return (an = b._emscripten_bind_btConvexHullShape_getNumVertices_0 = b.asm.Uk).apply(null, arguments) + } + , bn = b._emscripten_bind_btConvexHullShape_initializePolyhedralFeatures_1 = function() { + return (bn = b._emscripten_bind_btConvexHullShape_initializePolyhedralFeatures_1 = b.asm.Vk).apply(null, arguments) + } + , cn = b._emscripten_bind_btConvexHullShape_recalcLocalAabb_0 = function() { + return (cn = b._emscripten_bind_btConvexHullShape_recalcLocalAabb_0 = b.asm.Wk).apply(null, arguments) + } + , dn = b._emscripten_bind_btConvexHullShape_getConvexPolyhedron_0 = function() { + return (dn = b._emscripten_bind_btConvexHullShape_getConvexPolyhedron_0 = b.asm.Xk).apply(null, arguments) + } + , en = b._emscripten_bind_btConvexHullShape_setLocalScaling_1 = function() { + return (en = b._emscripten_bind_btConvexHullShape_setLocalScaling_1 = b.asm.Yk).apply(null, arguments) + } + , fn = b._emscripten_bind_btConvexHullShape_getLocalScaling_0 = function() { + return (fn = b._emscripten_bind_btConvexHullShape_getLocalScaling_0 = b.asm.Zk).apply(null, arguments) + } + , gn = b._emscripten_bind_btConvexHullShape_calculateLocalInertia_2 = function() { + return (gn = b._emscripten_bind_btConvexHullShape_calculateLocalInertia_2 = b.asm._k).apply(null, arguments) + } + , hn = b._emscripten_bind_btConvexHullShape___destroy___0 = function() { + return (hn = b._emscripten_bind_btConvexHullShape___destroy___0 = b.asm.$k).apply(null, arguments) + } + , jn = b._emscripten_bind_btVehicleTuning_btVehicleTuning_0 = function() { + return (jn = b._emscripten_bind_btVehicleTuning_btVehicleTuning_0 = b.asm.al).apply(null, arguments) + } + , kn = b._emscripten_bind_btVehicleTuning_get_m_suspensionStiffness_0 = function() { + return (kn = b._emscripten_bind_btVehicleTuning_get_m_suspensionStiffness_0 = b.asm.bl).apply(null, arguments) + } + , ln = b._emscripten_bind_btVehicleTuning_set_m_suspensionStiffness_1 = function() { + return (ln = b._emscripten_bind_btVehicleTuning_set_m_suspensionStiffness_1 = b.asm.cl).apply(null, arguments) + } + , mn = b._emscripten_bind_btVehicleTuning_get_m_suspensionCompression_0 = function() { + return (mn = b._emscripten_bind_btVehicleTuning_get_m_suspensionCompression_0 = b.asm.dl).apply(null, arguments) + } + , nn = b._emscripten_bind_btVehicleTuning_set_m_suspensionCompression_1 = function() { + return (nn = b._emscripten_bind_btVehicleTuning_set_m_suspensionCompression_1 = b.asm.el).apply(null, arguments) + } + , on = b._emscripten_bind_btVehicleTuning_get_m_suspensionDamping_0 = function() { + return (on = b._emscripten_bind_btVehicleTuning_get_m_suspensionDamping_0 = b.asm.fl).apply(null, arguments) + } + , pn = b._emscripten_bind_btVehicleTuning_set_m_suspensionDamping_1 = function() { + return (pn = b._emscripten_bind_btVehicleTuning_set_m_suspensionDamping_1 = b.asm.gl).apply(null, arguments) + } + , qn = b._emscripten_bind_btVehicleTuning_get_m_maxSuspensionTravelCm_0 = function() { + return (qn = b._emscripten_bind_btVehicleTuning_get_m_maxSuspensionTravelCm_0 = b.asm.hl).apply(null, arguments) + } + , rn = b._emscripten_bind_btVehicleTuning_set_m_maxSuspensionTravelCm_1 = function() { + return (rn = b._emscripten_bind_btVehicleTuning_set_m_maxSuspensionTravelCm_1 = b.asm.il).apply(null, arguments) + } + , sn = b._emscripten_bind_btVehicleTuning_get_m_frictionSlip_0 = function() { + return (sn = b._emscripten_bind_btVehicleTuning_get_m_frictionSlip_0 = b.asm.jl).apply(null, arguments) + } + , tn = b._emscripten_bind_btVehicleTuning_set_m_frictionSlip_1 = function() { + return (tn = b._emscripten_bind_btVehicleTuning_set_m_frictionSlip_1 = b.asm.kl).apply(null, arguments) + } + , un = b._emscripten_bind_btVehicleTuning_get_m_maxSuspensionForce_0 = function() { + return (un = b._emscripten_bind_btVehicleTuning_get_m_maxSuspensionForce_0 = b.asm.ll).apply(null, arguments) + } + , vn = b._emscripten_bind_btVehicleTuning_set_m_maxSuspensionForce_1 = function() { + return (vn = b._emscripten_bind_btVehicleTuning_set_m_maxSuspensionForce_1 = b.asm.ml).apply(null, arguments) + } + , wn = b._emscripten_bind_btCollisionObjectWrapper_getWorldTransform_0 = function() { + return (wn = b._emscripten_bind_btCollisionObjectWrapper_getWorldTransform_0 = b.asm.nl).apply(null, arguments) + } + , xn = b._emscripten_bind_btCollisionObjectWrapper_getCollisionObject_0 = function() { + return (xn = b._emscripten_bind_btCollisionObjectWrapper_getCollisionObject_0 = b.asm.ol).apply(null, arguments) + } + , yn = b._emscripten_bind_btCollisionObjectWrapper_getCollisionShape_0 = function() { + return (yn = b._emscripten_bind_btCollisionObjectWrapper_getCollisionShape_0 = b.asm.pl).apply(null, arguments) + } + , zn = b._emscripten_bind_btShapeHull_btShapeHull_1 = function() { + return (zn = b._emscripten_bind_btShapeHull_btShapeHull_1 = b.asm.ql).apply(null, arguments) + } + , An = b._emscripten_bind_btShapeHull_buildHull_1 = function() { + return (An = b._emscripten_bind_btShapeHull_buildHull_1 = b.asm.rl).apply(null, arguments) + } + , Bn = b._emscripten_bind_btShapeHull_numVertices_0 = function() { + return (Bn = b._emscripten_bind_btShapeHull_numVertices_0 = b.asm.sl).apply(null, arguments) + } + , Cn = b._emscripten_bind_btShapeHull_getVertexPointer_0 = function() { + return (Cn = b._emscripten_bind_btShapeHull_getVertexPointer_0 = b.asm.tl).apply(null, arguments) + } + , Dn = b._emscripten_bind_btShapeHull___destroy___0 = function() { + return (Dn = b._emscripten_bind_btShapeHull___destroy___0 = b.asm.ul).apply(null, arguments) + } + , En = b._emscripten_bind_btDefaultMotionState_btDefaultMotionState_0 = function() { + return (En = b._emscripten_bind_btDefaultMotionState_btDefaultMotionState_0 = b.asm.vl).apply(null, arguments) + } + , Fn = b._emscripten_bind_btDefaultMotionState_btDefaultMotionState_1 = function() { + return (Fn = b._emscripten_bind_btDefaultMotionState_btDefaultMotionState_1 = b.asm.wl).apply(null, arguments) + } + , Gn = b._emscripten_bind_btDefaultMotionState_btDefaultMotionState_2 = function() { + return (Gn = b._emscripten_bind_btDefaultMotionState_btDefaultMotionState_2 = b.asm.xl).apply(null, arguments) + } + , Hn = b._emscripten_bind_btDefaultMotionState_getWorldTransform_1 = function() { + return (Hn = b._emscripten_bind_btDefaultMotionState_getWorldTransform_1 = b.asm.yl).apply(null, arguments) + } + , In = b._emscripten_bind_btDefaultMotionState_setWorldTransform_1 = function() { + return (In = b._emscripten_bind_btDefaultMotionState_setWorldTransform_1 = b.asm.zl).apply(null, arguments) + } + , Jn = b._emscripten_bind_btDefaultMotionState_get_m_graphicsWorldTrans_0 = function() { + return (Jn = b._emscripten_bind_btDefaultMotionState_get_m_graphicsWorldTrans_0 = b.asm.Al).apply(null, arguments) + } + , Kn = b._emscripten_bind_btDefaultMotionState_set_m_graphicsWorldTrans_1 = function() { + return (Kn = b._emscripten_bind_btDefaultMotionState_set_m_graphicsWorldTrans_1 = b.asm.Bl).apply(null, arguments) + } + , Ln = b._emscripten_bind_btDefaultMotionState___destroy___0 = function() { + return (Ln = b._emscripten_bind_btDefaultMotionState___destroy___0 = b.asm.Cl).apply(null, arguments) + } + , Mn = b._emscripten_bind_btWheelInfo_btWheelInfo_1 = function() { + return (Mn = b._emscripten_bind_btWheelInfo_btWheelInfo_1 = b.asm.Dl).apply(null, arguments) + } + , Nn = b._emscripten_bind_btWheelInfo_getSuspensionRestLength_0 = function() { + return (Nn = b._emscripten_bind_btWheelInfo_getSuspensionRestLength_0 = b.asm.El).apply(null, arguments) + } + , On = b._emscripten_bind_btWheelInfo_updateWheel_2 = function() { + return (On = b._emscripten_bind_btWheelInfo_updateWheel_2 = b.asm.Fl).apply(null, arguments) + } + , Pn = b._emscripten_bind_btWheelInfo_get_m_suspensionStiffness_0 = function() { + return (Pn = b._emscripten_bind_btWheelInfo_get_m_suspensionStiffness_0 = b.asm.Gl).apply(null, arguments) + } + , Qn = b._emscripten_bind_btWheelInfo_set_m_suspensionStiffness_1 = function() { + return (Qn = b._emscripten_bind_btWheelInfo_set_m_suspensionStiffness_1 = b.asm.Hl).apply(null, arguments) + } + , Rn = b._emscripten_bind_btWheelInfo_get_m_frictionSlip_0 = function() { + return (Rn = b._emscripten_bind_btWheelInfo_get_m_frictionSlip_0 = b.asm.Il).apply(null, arguments) + } + , Sn = b._emscripten_bind_btWheelInfo_set_m_frictionSlip_1 = function() { + return (Sn = b._emscripten_bind_btWheelInfo_set_m_frictionSlip_1 = b.asm.Jl).apply(null, arguments) + } + , Tn = b._emscripten_bind_btWheelInfo_get_m_engineForce_0 = function() { + return (Tn = b._emscripten_bind_btWheelInfo_get_m_engineForce_0 = b.asm.Kl).apply(null, arguments) + } + , Un = b._emscripten_bind_btWheelInfo_set_m_engineForce_1 = function() { + return (Un = b._emscripten_bind_btWheelInfo_set_m_engineForce_1 = b.asm.Ll).apply(null, arguments) + } + , Vn = b._emscripten_bind_btWheelInfo_get_m_rollInfluence_0 = function() { + return (Vn = b._emscripten_bind_btWheelInfo_get_m_rollInfluence_0 = b.asm.Ml).apply(null, arguments) + } + , Wn = b._emscripten_bind_btWheelInfo_set_m_rollInfluence_1 = function() { + return (Wn = b._emscripten_bind_btWheelInfo_set_m_rollInfluence_1 = b.asm.Nl).apply(null, arguments) + } + , Xn = b._emscripten_bind_btWheelInfo_get_m_suspensionRestLength1_0 = function() { + return (Xn = b._emscripten_bind_btWheelInfo_get_m_suspensionRestLength1_0 = b.asm.Ol).apply(null, arguments) + } + , Yn = b._emscripten_bind_btWheelInfo_set_m_suspensionRestLength1_1 = function() { + return (Yn = b._emscripten_bind_btWheelInfo_set_m_suspensionRestLength1_1 = b.asm.Pl).apply(null, arguments) + } + , Zn = b._emscripten_bind_btWheelInfo_get_m_wheelsRadius_0 = function() { + return (Zn = b._emscripten_bind_btWheelInfo_get_m_wheelsRadius_0 = b.asm.Ql).apply(null, arguments) + } + , $n = b._emscripten_bind_btWheelInfo_set_m_wheelsRadius_1 = function() { + return ($n = b._emscripten_bind_btWheelInfo_set_m_wheelsRadius_1 = b.asm.Rl).apply(null, arguments) + } + , ao = b._emscripten_bind_btWheelInfo_get_m_wheelsDampingCompression_0 = function() { + return (ao = b._emscripten_bind_btWheelInfo_get_m_wheelsDampingCompression_0 = b.asm.Sl).apply(null, arguments) + } + , bo = b._emscripten_bind_btWheelInfo_set_m_wheelsDampingCompression_1 = function() { + return (bo = b._emscripten_bind_btWheelInfo_set_m_wheelsDampingCompression_1 = b.asm.Tl).apply(null, arguments) + } + , co = b._emscripten_bind_btWheelInfo_get_m_wheelsDampingRelaxation_0 = function() { + return (co = b._emscripten_bind_btWheelInfo_get_m_wheelsDampingRelaxation_0 = b.asm.Ul).apply(null, arguments) + } + , eo = b._emscripten_bind_btWheelInfo_set_m_wheelsDampingRelaxation_1 = function() { + return (eo = b._emscripten_bind_btWheelInfo_set_m_wheelsDampingRelaxation_1 = b.asm.Vl).apply(null, arguments) + } + , fo = b._emscripten_bind_btWheelInfo_get_m_steering_0 = function() { + return (fo = b._emscripten_bind_btWheelInfo_get_m_steering_0 = b.asm.Wl).apply(null, arguments) + } + , go = b._emscripten_bind_btWheelInfo_set_m_steering_1 = function() { + return (go = b._emscripten_bind_btWheelInfo_set_m_steering_1 = b.asm.Xl).apply(null, arguments) + } + , ho = b._emscripten_bind_btWheelInfo_get_m_maxSuspensionForce_0 = function() { + return (ho = b._emscripten_bind_btWheelInfo_get_m_maxSuspensionForce_0 = b.asm.Yl).apply(null, arguments) + } + , io = b._emscripten_bind_btWheelInfo_set_m_maxSuspensionForce_1 = function() { + return (io = b._emscripten_bind_btWheelInfo_set_m_maxSuspensionForce_1 = b.asm.Zl).apply(null, arguments) + } + , jo = b._emscripten_bind_btWheelInfo_get_m_maxSuspensionTravelCm_0 = function() { + return (jo = b._emscripten_bind_btWheelInfo_get_m_maxSuspensionTravelCm_0 = b.asm._l).apply(null, arguments) + } + , ko = b._emscripten_bind_btWheelInfo_set_m_maxSuspensionTravelCm_1 = function() { + return (ko = b._emscripten_bind_btWheelInfo_set_m_maxSuspensionTravelCm_1 = b.asm.$l).apply(null, arguments) + } + , lo = b._emscripten_bind_btWheelInfo_get_m_wheelsSuspensionForce_0 = function() { + return (lo = b._emscripten_bind_btWheelInfo_get_m_wheelsSuspensionForce_0 = b.asm.am).apply(null, arguments) + } + , mo = b._emscripten_bind_btWheelInfo_set_m_wheelsSuspensionForce_1 = function() { + return (mo = b._emscripten_bind_btWheelInfo_set_m_wheelsSuspensionForce_1 = b.asm.bm).apply(null, arguments) + } + , no = b._emscripten_bind_btWheelInfo_get_m_bIsFrontWheel_0 = function() { + return (no = b._emscripten_bind_btWheelInfo_get_m_bIsFrontWheel_0 = b.asm.cm).apply(null, arguments) + } + , oo = b._emscripten_bind_btWheelInfo_set_m_bIsFrontWheel_1 = function() { + return (oo = b._emscripten_bind_btWheelInfo_set_m_bIsFrontWheel_1 = b.asm.dm).apply(null, arguments) + } + , po = b._emscripten_bind_btWheelInfo_get_m_raycastInfo_0 = function() { + return (po = b._emscripten_bind_btWheelInfo_get_m_raycastInfo_0 = b.asm.em).apply(null, arguments) + } + , qo = b._emscripten_bind_btWheelInfo_set_m_raycastInfo_1 = function() { + return (qo = b._emscripten_bind_btWheelInfo_set_m_raycastInfo_1 = b.asm.fm).apply(null, arguments) + } + , ro = b._emscripten_bind_btWheelInfo_get_m_chassisConnectionPointCS_0 = function() { + return (ro = b._emscripten_bind_btWheelInfo_get_m_chassisConnectionPointCS_0 = b.asm.gm).apply(null, arguments) + } + , so = b._emscripten_bind_btWheelInfo_set_m_chassisConnectionPointCS_1 = function() { + return (so = b._emscripten_bind_btWheelInfo_set_m_chassisConnectionPointCS_1 = b.asm.hm).apply(null, arguments) + } + , to = b._emscripten_bind_btWheelInfo_get_m_worldTransform_0 = function() { + return (to = b._emscripten_bind_btWheelInfo_get_m_worldTransform_0 = b.asm.im).apply(null, arguments) + } + , uo = b._emscripten_bind_btWheelInfo_set_m_worldTransform_1 = function() { + return (uo = b._emscripten_bind_btWheelInfo_set_m_worldTransform_1 = b.asm.jm).apply(null, arguments) + } + , vo = b._emscripten_bind_btWheelInfo_get_m_wheelDirectionCS_0 = function() { + return (vo = b._emscripten_bind_btWheelInfo_get_m_wheelDirectionCS_0 = b.asm.km).apply(null, arguments) + } + , wo = b._emscripten_bind_btWheelInfo_set_m_wheelDirectionCS_1 = function() { + return (wo = b._emscripten_bind_btWheelInfo_set_m_wheelDirectionCS_1 = b.asm.lm).apply(null, arguments) + } + , xo = b._emscripten_bind_btWheelInfo_get_m_wheelAxleCS_0 = function() { + return (xo = b._emscripten_bind_btWheelInfo_get_m_wheelAxleCS_0 = b.asm.mm).apply(null, arguments) + } + , yo = b._emscripten_bind_btWheelInfo_set_m_wheelAxleCS_1 = function() { + return (yo = b._emscripten_bind_btWheelInfo_set_m_wheelAxleCS_1 = b.asm.nm).apply(null, arguments) + } + , zo = b._emscripten_bind_btWheelInfo_get_m_rotation_0 = function() { + return (zo = b._emscripten_bind_btWheelInfo_get_m_rotation_0 = b.asm.om).apply(null, arguments) + } + , Ao = b._emscripten_bind_btWheelInfo_set_m_rotation_1 = function() { + return (Ao = b._emscripten_bind_btWheelInfo_set_m_rotation_1 = b.asm.pm).apply(null, arguments) + } + , Bo = b._emscripten_bind_btWheelInfo_get_m_deltaRotation_0 = function() { + return (Bo = b._emscripten_bind_btWheelInfo_get_m_deltaRotation_0 = b.asm.qm).apply(null, arguments) + } + , Co = b._emscripten_bind_btWheelInfo_set_m_deltaRotation_1 = function() { + return (Co = b._emscripten_bind_btWheelInfo_set_m_deltaRotation_1 = b.asm.rm).apply(null, arguments) + } + , Do = b._emscripten_bind_btWheelInfo_get_m_brake_0 = function() { + return (Do = b._emscripten_bind_btWheelInfo_get_m_brake_0 = b.asm.sm).apply(null, arguments) + } + , Eo = b._emscripten_bind_btWheelInfo_set_m_brake_1 = function() { + return (Eo = b._emscripten_bind_btWheelInfo_set_m_brake_1 = b.asm.tm).apply(null, arguments) + } + , Fo = b._emscripten_bind_btWheelInfo_get_m_clippedInvContactDotSuspension_0 = function() { + return (Fo = b._emscripten_bind_btWheelInfo_get_m_clippedInvContactDotSuspension_0 = b.asm.um).apply(null, arguments) + } + , Go = b._emscripten_bind_btWheelInfo_set_m_clippedInvContactDotSuspension_1 = function() { + return (Go = b._emscripten_bind_btWheelInfo_set_m_clippedInvContactDotSuspension_1 = b.asm.vm).apply(null, arguments) + } + , Ho = b._emscripten_bind_btWheelInfo_get_m_suspensionRelativeVelocity_0 = function() { + return (Ho = b._emscripten_bind_btWheelInfo_get_m_suspensionRelativeVelocity_0 = b.asm.wm).apply(null, arguments) + } + , Io = b._emscripten_bind_btWheelInfo_set_m_suspensionRelativeVelocity_1 = function() { + return (Io = b._emscripten_bind_btWheelInfo_set_m_suspensionRelativeVelocity_1 = b.asm.xm).apply(null, arguments) + } + , Jo = b._emscripten_bind_btWheelInfo_get_m_skidInfo_0 = function() { + return (Jo = b._emscripten_bind_btWheelInfo_get_m_skidInfo_0 = b.asm.ym).apply(null, arguments) + } + , Ko = b._emscripten_bind_btWheelInfo_set_m_skidInfo_1 = function() { + return (Ko = b._emscripten_bind_btWheelInfo_set_m_skidInfo_1 = b.asm.zm).apply(null, arguments) + } + , Lo = b._emscripten_bind_btWheelInfo___destroy___0 = function() { + return (Lo = b._emscripten_bind_btWheelInfo___destroy___0 = b.asm.Am).apply(null, arguments) + } + , Mo = b._emscripten_bind_btVector4_btVector4_0 = function() { + return (Mo = b._emscripten_bind_btVector4_btVector4_0 = b.asm.Bm).apply(null, arguments) + } + , No = b._emscripten_bind_btVector4_btVector4_4 = function() { + return (No = b._emscripten_bind_btVector4_btVector4_4 = b.asm.Cm).apply(null, arguments) + } + , Oo = b._emscripten_bind_btVector4_w_0 = function() { + return (Oo = b._emscripten_bind_btVector4_w_0 = b.asm.Dm).apply(null, arguments) + } + , Po = b._emscripten_bind_btVector4_setValue_4 = function() { + return (Po = b._emscripten_bind_btVector4_setValue_4 = b.asm.Em).apply(null, arguments) + } + , Qo = b._emscripten_bind_btVector4_length_0 = function() { + return (Qo = b._emscripten_bind_btVector4_length_0 = b.asm.Fm).apply(null, arguments) + } + , Ro = b._emscripten_bind_btVector4_x_0 = function() { + return (Ro = b._emscripten_bind_btVector4_x_0 = b.asm.Gm).apply(null, arguments) + } + , So = b._emscripten_bind_btVector4_y_0 = function() { + return (So = b._emscripten_bind_btVector4_y_0 = b.asm.Hm).apply(null, arguments) + } + , To = b._emscripten_bind_btVector4_z_0 = function() { + return (To = b._emscripten_bind_btVector4_z_0 = b.asm.Im).apply(null, arguments) + } + , Uo = b._emscripten_bind_btVector4_setX_1 = function() { + return (Uo = b._emscripten_bind_btVector4_setX_1 = b.asm.Jm).apply(null, arguments) + } + , Vo = b._emscripten_bind_btVector4_setY_1 = function() { + return (Vo = b._emscripten_bind_btVector4_setY_1 = b.asm.Km).apply(null, arguments) + } + , Wo = b._emscripten_bind_btVector4_setZ_1 = function() { + return (Wo = b._emscripten_bind_btVector4_setZ_1 = b.asm.Lm).apply(null, arguments) + } + , Xo = b._emscripten_bind_btVector4_normalize_0 = function() { + return (Xo = b._emscripten_bind_btVector4_normalize_0 = b.asm.Mm).apply(null, arguments) + } + , Yo = b._emscripten_bind_btVector4_rotate_2 = function() { + return (Yo = b._emscripten_bind_btVector4_rotate_2 = b.asm.Nm).apply(null, arguments) + } + , Zo = b._emscripten_bind_btVector4_dot_1 = function() { + return (Zo = b._emscripten_bind_btVector4_dot_1 = b.asm.Om).apply(null, arguments) + } + , $o = b._emscripten_bind_btVector4_op_mul_1 = function() { + return ($o = b._emscripten_bind_btVector4_op_mul_1 = b.asm.Pm).apply(null, arguments) + } + , ap = b._emscripten_bind_btVector4_op_add_1 = function() { + return (ap = b._emscripten_bind_btVector4_op_add_1 = b.asm.Qm).apply(null, arguments) + } + , bp = b._emscripten_bind_btVector4_op_sub_1 = function() { + return (bp = b._emscripten_bind_btVector4_op_sub_1 = b.asm.Rm).apply(null, arguments) + } + , cp = b._emscripten_bind_btVector4___destroy___0 = function() { + return (cp = b._emscripten_bind_btVector4___destroy___0 = b.asm.Sm).apply(null, arguments) + } + , dp = b._emscripten_bind_btDefaultCollisionConstructionInfo_btDefaultCollisionConstructionInfo_0 = function() { + return (dp = b._emscripten_bind_btDefaultCollisionConstructionInfo_btDefaultCollisionConstructionInfo_0 = b.asm.Tm).apply(null, arguments) + } + , ep = b._emscripten_bind_btDefaultCollisionConstructionInfo___destroy___0 = function() { + return (ep = b._emscripten_bind_btDefaultCollisionConstructionInfo___destroy___0 = b.asm.Um).apply(null, arguments) + } + , fp = b._emscripten_bind_Anchor_get_m_node_0 = function() { + return (fp = b._emscripten_bind_Anchor_get_m_node_0 = b.asm.Vm).apply(null, arguments) + } + , gp = b._emscripten_bind_Anchor_set_m_node_1 = function() { + return (gp = b._emscripten_bind_Anchor_set_m_node_1 = b.asm.Wm).apply(null, arguments) + } + , hp = b._emscripten_bind_Anchor_get_m_local_0 = function() { + return (hp = b._emscripten_bind_Anchor_get_m_local_0 = b.asm.Xm).apply(null, arguments) + } + , ip = b._emscripten_bind_Anchor_set_m_local_1 = function() { + return (ip = b._emscripten_bind_Anchor_set_m_local_1 = b.asm.Ym).apply(null, arguments) + } + , jp = b._emscripten_bind_Anchor_get_m_body_0 = function() { + return (jp = b._emscripten_bind_Anchor_get_m_body_0 = b.asm.Zm).apply(null, arguments) + } + , kp = b._emscripten_bind_Anchor_set_m_body_1 = function() { + return (kp = b._emscripten_bind_Anchor_set_m_body_1 = b.asm._m).apply(null, arguments) + } + , lp = b._emscripten_bind_Anchor_get_m_influence_0 = function() { + return (lp = b._emscripten_bind_Anchor_get_m_influence_0 = b.asm.$m).apply(null, arguments) + } + , mp = b._emscripten_bind_Anchor_set_m_influence_1 = function() { + return (mp = b._emscripten_bind_Anchor_set_m_influence_1 = b.asm.an).apply(null, arguments) + } + , np = b._emscripten_bind_Anchor_get_m_c0_0 = function() { + return (np = b._emscripten_bind_Anchor_get_m_c0_0 = b.asm.bn).apply(null, arguments) + } + , op = b._emscripten_bind_Anchor_set_m_c0_1 = function() { + return (op = b._emscripten_bind_Anchor_set_m_c0_1 = b.asm.cn).apply(null, arguments) + } + , pp = b._emscripten_bind_Anchor_get_m_c1_0 = function() { + return (pp = b._emscripten_bind_Anchor_get_m_c1_0 = b.asm.dn).apply(null, arguments) + } + , qp = b._emscripten_bind_Anchor_set_m_c1_1 = function() { + return (qp = b._emscripten_bind_Anchor_set_m_c1_1 = b.asm.en).apply(null, arguments) + } + , rp = b._emscripten_bind_Anchor_get_m_c2_0 = function() { + return (rp = b._emscripten_bind_Anchor_get_m_c2_0 = b.asm.fn).apply(null, arguments) + } + , sp = b._emscripten_bind_Anchor_set_m_c2_1 = function() { + return (sp = b._emscripten_bind_Anchor_set_m_c2_1 = b.asm.gn).apply(null, arguments) + } + , tp = b._emscripten_bind_Anchor___destroy___0 = function() { + return (tp = b._emscripten_bind_Anchor___destroy___0 = b.asm.hn).apply(null, arguments) + } + , up = b._emscripten_bind_btVehicleRaycasterResult_get_m_hitPointInWorld_0 = function() { + return (up = b._emscripten_bind_btVehicleRaycasterResult_get_m_hitPointInWorld_0 = b.asm.jn).apply(null, arguments) + } + , vp = b._emscripten_bind_btVehicleRaycasterResult_set_m_hitPointInWorld_1 = function() { + return (vp = b._emscripten_bind_btVehicleRaycasterResult_set_m_hitPointInWorld_1 = b.asm.kn).apply(null, arguments) + } + , wp = b._emscripten_bind_btVehicleRaycasterResult_get_m_hitNormalInWorld_0 = function() { + return (wp = b._emscripten_bind_btVehicleRaycasterResult_get_m_hitNormalInWorld_0 = b.asm.ln).apply(null, arguments) + } + , xp = b._emscripten_bind_btVehicleRaycasterResult_set_m_hitNormalInWorld_1 = function() { + return (xp = b._emscripten_bind_btVehicleRaycasterResult_set_m_hitNormalInWorld_1 = b.asm.mn).apply(null, arguments) + } + , yp = b._emscripten_bind_btVehicleRaycasterResult_get_m_distFraction_0 = function() { + return (yp = b._emscripten_bind_btVehicleRaycasterResult_get_m_distFraction_0 = b.asm.nn).apply(null, arguments) + } + , zp = b._emscripten_bind_btVehicleRaycasterResult_set_m_distFraction_1 = function() { + return (zp = b._emscripten_bind_btVehicleRaycasterResult_set_m_distFraction_1 = b.asm.on).apply(null, arguments) + } + , Ap = b._emscripten_bind_btVehicleRaycasterResult___destroy___0 = function() { + return (Ap = b._emscripten_bind_btVehicleRaycasterResult___destroy___0 = b.asm.pn).apply(null, arguments) + } + , Bp = b._emscripten_bind_btVector3Array_size_0 = function() { + return (Bp = b._emscripten_bind_btVector3Array_size_0 = b.asm.qn).apply(null, arguments) + } + , Cp = b._emscripten_bind_btVector3Array_at_1 = function() { + return (Cp = b._emscripten_bind_btVector3Array_at_1 = b.asm.rn).apply(null, arguments) + } + , Dp = b._emscripten_bind_btVector3Array___destroy___0 = function() { + return (Dp = b._emscripten_bind_btVector3Array___destroy___0 = b.asm.sn).apply(null, arguments) + } + , Ep = b._emscripten_bind_btConstraintSolver___destroy___0 = function() { + return (Ep = b._emscripten_bind_btConstraintSolver___destroy___0 = b.asm.tn).apply(null, arguments) + } + , Fp = b._emscripten_bind_btRaycastVehicle_btRaycastVehicle_3 = function() { + return (Fp = b._emscripten_bind_btRaycastVehicle_btRaycastVehicle_3 = b.asm.un).apply(null, arguments) + } + , Gp = b._emscripten_bind_btRaycastVehicle_applyEngineForce_2 = function() { + return (Gp = b._emscripten_bind_btRaycastVehicle_applyEngineForce_2 = b.asm.vn).apply(null, arguments) + } + , Hp = b._emscripten_bind_btRaycastVehicle_setSteeringValue_2 = function() { + return (Hp = b._emscripten_bind_btRaycastVehicle_setSteeringValue_2 = b.asm.wn).apply(null, arguments) + } + , Ip = b._emscripten_bind_btRaycastVehicle_getWheelTransformWS_1 = function() { + return (Ip = b._emscripten_bind_btRaycastVehicle_getWheelTransformWS_1 = b.asm.xn).apply(null, arguments) + } + , Jp = b._emscripten_bind_btRaycastVehicle_updateWheelTransform_2 = function() { + return (Jp = b._emscripten_bind_btRaycastVehicle_updateWheelTransform_2 = b.asm.yn).apply(null, arguments) + } + , Kp = b._emscripten_bind_btRaycastVehicle_addWheel_7 = function() { + return (Kp = b._emscripten_bind_btRaycastVehicle_addWheel_7 = b.asm.zn).apply(null, arguments) + } + , Lp = b._emscripten_bind_btRaycastVehicle_getNumWheels_0 = function() { + return (Lp = b._emscripten_bind_btRaycastVehicle_getNumWheels_0 = b.asm.An).apply(null, arguments) + } + , Mp = b._emscripten_bind_btRaycastVehicle_getRigidBody_0 = function() { + return (Mp = b._emscripten_bind_btRaycastVehicle_getRigidBody_0 = b.asm.Bn).apply(null, arguments) + } + , Np = b._emscripten_bind_btRaycastVehicle_getWheelInfo_1 = function() { + return (Np = b._emscripten_bind_btRaycastVehicle_getWheelInfo_1 = b.asm.Cn).apply(null, arguments) + } + , Op = b._emscripten_bind_btRaycastVehicle_setBrake_2 = function() { + return (Op = b._emscripten_bind_btRaycastVehicle_setBrake_2 = b.asm.Dn).apply(null, arguments) + } + , Pp = b._emscripten_bind_btRaycastVehicle_setCoordinateSystem_3 = function() { + return (Pp = b._emscripten_bind_btRaycastVehicle_setCoordinateSystem_3 = b.asm.En).apply(null, arguments) + } + , Qp = b._emscripten_bind_btRaycastVehicle_getCurrentSpeedKmHour_0 = function() { + return (Qp = b._emscripten_bind_btRaycastVehicle_getCurrentSpeedKmHour_0 = b.asm.Fn).apply(null, arguments) + } + , Rp = b._emscripten_bind_btRaycastVehicle_getChassisWorldTransform_0 = function() { + return (Rp = b._emscripten_bind_btRaycastVehicle_getChassisWorldTransform_0 = b.asm.Gn).apply(null, arguments) + } + , Sp = b._emscripten_bind_btRaycastVehicle_rayCast_1 = function() { + return (Sp = b._emscripten_bind_btRaycastVehicle_rayCast_1 = b.asm.Hn).apply(null, arguments) + } + , Tp = b._emscripten_bind_btRaycastVehicle_updateVehicle_1 = function() { + return (Tp = b._emscripten_bind_btRaycastVehicle_updateVehicle_1 = b.asm.In).apply(null, arguments) + } + , Up = b._emscripten_bind_btRaycastVehicle_resetSuspension_0 = function() { + return (Up = b._emscripten_bind_btRaycastVehicle_resetSuspension_0 = b.asm.Jn).apply(null, arguments) + } + , Vp = b._emscripten_bind_btRaycastVehicle_getSteeringValue_1 = function() { + return (Vp = b._emscripten_bind_btRaycastVehicle_getSteeringValue_1 = b.asm.Kn).apply(null, arguments) + } + , Wp = b._emscripten_bind_btRaycastVehicle_updateWheelTransformsWS_1 = function() { + return (Wp = b._emscripten_bind_btRaycastVehicle_updateWheelTransformsWS_1 = b.asm.Ln).apply(null, arguments) + } + , Xp = b._emscripten_bind_btRaycastVehicle_updateWheelTransformsWS_2 = function() { + return (Xp = b._emscripten_bind_btRaycastVehicle_updateWheelTransformsWS_2 = b.asm.Mn).apply(null, arguments) + } + , Yp = b._emscripten_bind_btRaycastVehicle_setPitchControl_1 = function() { + return (Yp = b._emscripten_bind_btRaycastVehicle_setPitchControl_1 = b.asm.Nn).apply(null, arguments) + } + , Zp = b._emscripten_bind_btRaycastVehicle_updateSuspension_1 = function() { + return (Zp = b._emscripten_bind_btRaycastVehicle_updateSuspension_1 = b.asm.On).apply(null, arguments) + } + , $p = b._emscripten_bind_btRaycastVehicle_updateFriction_1 = function() { + return ($p = b._emscripten_bind_btRaycastVehicle_updateFriction_1 = b.asm.Pn).apply(null, arguments) + } + , aq = b._emscripten_bind_btRaycastVehicle_getRightAxis_0 = function() { + return (aq = b._emscripten_bind_btRaycastVehicle_getRightAxis_0 = b.asm.Qn).apply(null, arguments) + } + , bq = b._emscripten_bind_btRaycastVehicle_getUpAxis_0 = function() { + return (bq = b._emscripten_bind_btRaycastVehicle_getUpAxis_0 = b.asm.Rn).apply(null, arguments) + } + , cq = b._emscripten_bind_btRaycastVehicle_getForwardAxis_0 = function() { + return (cq = b._emscripten_bind_btRaycastVehicle_getForwardAxis_0 = b.asm.Sn).apply(null, arguments) + } + , dq = b._emscripten_bind_btRaycastVehicle_getForwardVector_0 = function() { + return (dq = b._emscripten_bind_btRaycastVehicle_getForwardVector_0 = b.asm.Tn).apply(null, arguments) + } + , eq = b._emscripten_bind_btRaycastVehicle_getUserConstraintType_0 = function() { + return (eq = b._emscripten_bind_btRaycastVehicle_getUserConstraintType_0 = b.asm.Un).apply(null, arguments) + } + , fq = b._emscripten_bind_btRaycastVehicle_setUserConstraintType_1 = function() { + return (fq = b._emscripten_bind_btRaycastVehicle_setUserConstraintType_1 = b.asm.Vn).apply(null, arguments) + } + , gq = b._emscripten_bind_btRaycastVehicle_setUserConstraintId_1 = function() { + return (gq = b._emscripten_bind_btRaycastVehicle_setUserConstraintId_1 = b.asm.Wn).apply(null, arguments) + } + , hq = b._emscripten_bind_btRaycastVehicle_getUserConstraintId_0 = function() { + return (hq = b._emscripten_bind_btRaycastVehicle_getUserConstraintId_0 = b.asm.Xn).apply(null, arguments) + } + , iq = b._emscripten_bind_btRaycastVehicle_updateAction_2 = function() { + return (iq = b._emscripten_bind_btRaycastVehicle_updateAction_2 = b.asm.Yn).apply(null, arguments) + } + , jq = b._emscripten_bind_btRaycastVehicle___destroy___0 = function() { + return (jq = b._emscripten_bind_btRaycastVehicle___destroy___0 = b.asm.Zn).apply(null, arguments) + } + , kq = b._emscripten_bind_btCylinderShapeX_btCylinderShapeX_1 = function() { + return (kq = b._emscripten_bind_btCylinderShapeX_btCylinderShapeX_1 = b.asm._n).apply(null, arguments) + } + , lq = b._emscripten_bind_btCylinderShapeX_setMargin_1 = function() { + return (lq = b._emscripten_bind_btCylinderShapeX_setMargin_1 = b.asm.$n).apply(null, arguments) + } + , mq = b._emscripten_bind_btCylinderShapeX_getMargin_0 = function() { + return (mq = b._emscripten_bind_btCylinderShapeX_getMargin_0 = b.asm.ao).apply(null, arguments) + } + , nq = b._emscripten_bind_btCylinderShapeX_setLocalScaling_1 = function() { + return (nq = b._emscripten_bind_btCylinderShapeX_setLocalScaling_1 = b.asm.bo).apply(null, arguments) + } + , oq = b._emscripten_bind_btCylinderShapeX_getLocalScaling_0 = function() { + return (oq = b._emscripten_bind_btCylinderShapeX_getLocalScaling_0 = b.asm.co).apply(null, arguments) + } + , pq = b._emscripten_bind_btCylinderShapeX_calculateLocalInertia_2 = function() { + return (pq = b._emscripten_bind_btCylinderShapeX_calculateLocalInertia_2 = b.asm.eo).apply(null, arguments) + } + , qq = b._emscripten_bind_btCylinderShapeX___destroy___0 = function() { + return (qq = b._emscripten_bind_btCylinderShapeX___destroy___0 = b.asm.fo).apply(null, arguments) + } + , rq = b._emscripten_bind_btCylinderShapeZ_btCylinderShapeZ_1 = function() { + return (rq = b._emscripten_bind_btCylinderShapeZ_btCylinderShapeZ_1 = b.asm.go).apply(null, arguments) + } + , sq = b._emscripten_bind_btCylinderShapeZ_setMargin_1 = function() { + return (sq = b._emscripten_bind_btCylinderShapeZ_setMargin_1 = b.asm.ho).apply(null, arguments) + } + , tq = b._emscripten_bind_btCylinderShapeZ_getMargin_0 = function() { + return (tq = b._emscripten_bind_btCylinderShapeZ_getMargin_0 = b.asm.io).apply(null, arguments) + } + , uq = b._emscripten_bind_btCylinderShapeZ_setLocalScaling_1 = function() { + return (uq = b._emscripten_bind_btCylinderShapeZ_setLocalScaling_1 = b.asm.jo).apply(null, arguments) + } + , vq = b._emscripten_bind_btCylinderShapeZ_getLocalScaling_0 = function() { + return (vq = b._emscripten_bind_btCylinderShapeZ_getLocalScaling_0 = b.asm.ko).apply(null, arguments) + } + , wq = b._emscripten_bind_btCylinderShapeZ_calculateLocalInertia_2 = function() { + return (wq = b._emscripten_bind_btCylinderShapeZ_calculateLocalInertia_2 = b.asm.lo).apply(null, arguments) + } + , xq = b._emscripten_bind_btCylinderShapeZ___destroy___0 = function() { + return (xq = b._emscripten_bind_btCylinderShapeZ___destroy___0 = b.asm.mo).apply(null, arguments) + } + , yq = b._emscripten_bind_btConvexPolyhedron_get_m_vertices_0 = function() { + return (yq = b._emscripten_bind_btConvexPolyhedron_get_m_vertices_0 = b.asm.no).apply(null, arguments) + } + , zq = b._emscripten_bind_btConvexPolyhedron_set_m_vertices_1 = function() { + return (zq = b._emscripten_bind_btConvexPolyhedron_set_m_vertices_1 = b.asm.oo).apply(null, arguments) + } + , Aq = b._emscripten_bind_btConvexPolyhedron_get_m_faces_0 = function() { + return (Aq = b._emscripten_bind_btConvexPolyhedron_get_m_faces_0 = b.asm.po).apply(null, arguments) + } + , Bq = b._emscripten_bind_btConvexPolyhedron_set_m_faces_1 = function() { + return (Bq = b._emscripten_bind_btConvexPolyhedron_set_m_faces_1 = b.asm.qo).apply(null, arguments) + } + , Cq = b._emscripten_bind_btConvexPolyhedron___destroy___0 = function() { + return (Cq = b._emscripten_bind_btConvexPolyhedron___destroy___0 = b.asm.ro).apply(null, arguments) + } + , Dq = b._emscripten_bind_btSequentialImpulseConstraintSolver_btSequentialImpulseConstraintSolver_0 = function() { + return (Dq = b._emscripten_bind_btSequentialImpulseConstraintSolver_btSequentialImpulseConstraintSolver_0 = b.asm.so).apply(null, arguments) + } + , Eq = b._emscripten_bind_btSequentialImpulseConstraintSolver___destroy___0 = function() { + return (Eq = b._emscripten_bind_btSequentialImpulseConstraintSolver___destroy___0 = b.asm.to).apply(null, arguments) + } + , Fq = b._emscripten_bind_tAnchorArray_size_0 = function() { + return (Fq = b._emscripten_bind_tAnchorArray_size_0 = b.asm.uo).apply(null, arguments) + } + , Gq = b._emscripten_bind_tAnchorArray_at_1 = function() { + return (Gq = b._emscripten_bind_tAnchorArray_at_1 = b.asm.vo).apply(null, arguments) + } + , Hq = b._emscripten_bind_tAnchorArray_clear_0 = function() { + return (Hq = b._emscripten_bind_tAnchorArray_clear_0 = b.asm.wo).apply(null, arguments) + } + , Iq = b._emscripten_bind_tAnchorArray_push_back_1 = function() { + return (Iq = b._emscripten_bind_tAnchorArray_push_back_1 = b.asm.xo).apply(null, arguments) + } + , Jq = b._emscripten_bind_tAnchorArray_pop_back_0 = function() { + return (Jq = b._emscripten_bind_tAnchorArray_pop_back_0 = b.asm.yo).apply(null, arguments) + } + , Kq = b._emscripten_bind_tAnchorArray___destroy___0 = function() { + return (Kq = b._emscripten_bind_tAnchorArray___destroy___0 = b.asm.zo).apply(null, arguments) + } + , Lq = b._emscripten_bind_RaycastInfo_get_m_contactNormalWS_0 = function() { + return (Lq = b._emscripten_bind_RaycastInfo_get_m_contactNormalWS_0 = b.asm.Ao).apply(null, arguments) + } + , Mq = b._emscripten_bind_RaycastInfo_set_m_contactNormalWS_1 = function() { + return (Mq = b._emscripten_bind_RaycastInfo_set_m_contactNormalWS_1 = b.asm.Bo).apply(null, arguments) + } + , Nq = b._emscripten_bind_RaycastInfo_get_m_contactPointWS_0 = function() { + return (Nq = b._emscripten_bind_RaycastInfo_get_m_contactPointWS_0 = b.asm.Co).apply(null, arguments) + } + , Oq = b._emscripten_bind_RaycastInfo_set_m_contactPointWS_1 = function() { + return (Oq = b._emscripten_bind_RaycastInfo_set_m_contactPointWS_1 = b.asm.Do).apply(null, arguments) + } + , Pq = b._emscripten_bind_RaycastInfo_get_m_suspensionLength_0 = function() { + return (Pq = b._emscripten_bind_RaycastInfo_get_m_suspensionLength_0 = b.asm.Eo).apply(null, arguments) + } + , Qq = b._emscripten_bind_RaycastInfo_set_m_suspensionLength_1 = function() { + return (Qq = b._emscripten_bind_RaycastInfo_set_m_suspensionLength_1 = b.asm.Fo).apply(null, arguments) + } + , Rq = b._emscripten_bind_RaycastInfo_get_m_hardPointWS_0 = function() { + return (Rq = b._emscripten_bind_RaycastInfo_get_m_hardPointWS_0 = b.asm.Go).apply(null, arguments) + } + , Sq = b._emscripten_bind_RaycastInfo_set_m_hardPointWS_1 = function() { + return (Sq = b._emscripten_bind_RaycastInfo_set_m_hardPointWS_1 = b.asm.Ho).apply(null, arguments) + } + , Tq = b._emscripten_bind_RaycastInfo_get_m_wheelDirectionWS_0 = function() { + return (Tq = b._emscripten_bind_RaycastInfo_get_m_wheelDirectionWS_0 = b.asm.Io).apply(null, arguments) + } + , Uq = b._emscripten_bind_RaycastInfo_set_m_wheelDirectionWS_1 = function() { + return (Uq = b._emscripten_bind_RaycastInfo_set_m_wheelDirectionWS_1 = b.asm.Jo).apply(null, arguments) + } + , Vq = b._emscripten_bind_RaycastInfo_get_m_wheelAxleWS_0 = function() { + return (Vq = b._emscripten_bind_RaycastInfo_get_m_wheelAxleWS_0 = b.asm.Ko).apply(null, arguments) + } + , Wq = b._emscripten_bind_RaycastInfo_set_m_wheelAxleWS_1 = function() { + return (Wq = b._emscripten_bind_RaycastInfo_set_m_wheelAxleWS_1 = b.asm.Lo).apply(null, arguments) + } + , Xq = b._emscripten_bind_RaycastInfo_get_m_isInContact_0 = function() { + return (Xq = b._emscripten_bind_RaycastInfo_get_m_isInContact_0 = b.asm.Mo).apply(null, arguments) + } + , Yq = b._emscripten_bind_RaycastInfo_set_m_isInContact_1 = function() { + return (Yq = b._emscripten_bind_RaycastInfo_set_m_isInContact_1 = b.asm.No).apply(null, arguments) + } + , Zq = b._emscripten_bind_RaycastInfo_get_m_groundObject_0 = function() { + return (Zq = b._emscripten_bind_RaycastInfo_get_m_groundObject_0 = b.asm.Oo).apply(null, arguments) + } + , $q = b._emscripten_bind_RaycastInfo_set_m_groundObject_1 = function() { + return ($q = b._emscripten_bind_RaycastInfo_set_m_groundObject_1 = b.asm.Po).apply(null, arguments) + } + , ar = b._emscripten_bind_RaycastInfo___destroy___0 = function() { + return (ar = b._emscripten_bind_RaycastInfo___destroy___0 = b.asm.Qo).apply(null, arguments) + } + , br = b._emscripten_bind_btMultiSphereShape_btMultiSphereShape_3 = function() { + return (br = b._emscripten_bind_btMultiSphereShape_btMultiSphereShape_3 = b.asm.Ro).apply(null, arguments) + } + , cr = b._emscripten_bind_btMultiSphereShape_setLocalScaling_1 = function() { + return (cr = b._emscripten_bind_btMultiSphereShape_setLocalScaling_1 = b.asm.So).apply(null, arguments) + } + , dr = b._emscripten_bind_btMultiSphereShape_getLocalScaling_0 = function() { + return (dr = b._emscripten_bind_btMultiSphereShape_getLocalScaling_0 = b.asm.To).apply(null, arguments) + } + , er = b._emscripten_bind_btMultiSphereShape_calculateLocalInertia_2 = function() { + return (er = b._emscripten_bind_btMultiSphereShape_calculateLocalInertia_2 = b.asm.Uo).apply(null, arguments) + } + , fr = b._emscripten_bind_btMultiSphereShape___destroy___0 = function() { + return (fr = b._emscripten_bind_btMultiSphereShape___destroy___0 = b.asm.Vo).apply(null, arguments) + } + , gr = b._emscripten_bind_btSoftBody_btSoftBody_4 = function() { + return (gr = b._emscripten_bind_btSoftBody_btSoftBody_4 = b.asm.Wo).apply(null, arguments) + } + , hr = b._emscripten_bind_btSoftBody_checkLink_2 = function() { + return (hr = b._emscripten_bind_btSoftBody_checkLink_2 = b.asm.Xo).apply(null, arguments) + } + , ir = b._emscripten_bind_btSoftBody_checkFace_3 = function() { + return (ir = b._emscripten_bind_btSoftBody_checkFace_3 = b.asm.Yo).apply(null, arguments) + } + , jr = b._emscripten_bind_btSoftBody_appendMaterial_0 = function() { + return (jr = b._emscripten_bind_btSoftBody_appendMaterial_0 = b.asm.Zo).apply(null, arguments) + } + , kr = b._emscripten_bind_btSoftBody_appendNode_2 = function() { + return (kr = b._emscripten_bind_btSoftBody_appendNode_2 = b.asm._o).apply(null, arguments) + } + , lr = b._emscripten_bind_btSoftBody_appendLink_4 = function() { + return (lr = b._emscripten_bind_btSoftBody_appendLink_4 = b.asm.$o).apply(null, arguments) + } + , mr = b._emscripten_bind_btSoftBody_appendFace_4 = function() { + return (mr = b._emscripten_bind_btSoftBody_appendFace_4 = b.asm.ap).apply(null, arguments) + } + , nr = b._emscripten_bind_btSoftBody_appendTetra_5 = function() { + return (nr = b._emscripten_bind_btSoftBody_appendTetra_5 = b.asm.bp).apply(null, arguments) + } + , or = b._emscripten_bind_btSoftBody_appendAnchor_4 = function() { + return (or = b._emscripten_bind_btSoftBody_appendAnchor_4 = b.asm.cp).apply(null, arguments) + } + , pr = b._emscripten_bind_btSoftBody_addForce_1 = function() { + return (pr = b._emscripten_bind_btSoftBody_addForce_1 = b.asm.dp).apply(null, arguments) + } + , qr = b._emscripten_bind_btSoftBody_addForce_2 = function() { + return (qr = b._emscripten_bind_btSoftBody_addForce_2 = b.asm.ep).apply(null, arguments) + } + , rr = b._emscripten_bind_btSoftBody_addAeroForceToNode_2 = function() { + return (rr = b._emscripten_bind_btSoftBody_addAeroForceToNode_2 = b.asm.fp).apply(null, arguments) + } + , sr = b._emscripten_bind_btSoftBody_getTotalMass_0 = function() { + return (sr = b._emscripten_bind_btSoftBody_getTotalMass_0 = b.asm.gp).apply(null, arguments) + } + , tr = b._emscripten_bind_btSoftBody_setTotalMass_2 = function() { + return (tr = b._emscripten_bind_btSoftBody_setTotalMass_2 = b.asm.hp).apply(null, arguments) + } + , ur = b._emscripten_bind_btSoftBody_setMass_2 = function() { + return (ur = b._emscripten_bind_btSoftBody_setMass_2 = b.asm.ip).apply(null, arguments) + } + , vr = b._emscripten_bind_btSoftBody_transform_1 = function() { + return (vr = b._emscripten_bind_btSoftBody_transform_1 = b.asm.jp).apply(null, arguments) + } + , wr = b._emscripten_bind_btSoftBody_translate_1 = function() { + return (wr = b._emscripten_bind_btSoftBody_translate_1 = b.asm.kp).apply(null, arguments) + } + , xr = b._emscripten_bind_btSoftBody_rotate_1 = function() { + return (xr = b._emscripten_bind_btSoftBody_rotate_1 = b.asm.lp).apply(null, arguments) + } + , yr = b._emscripten_bind_btSoftBody_scale_1 = function() { + return (yr = b._emscripten_bind_btSoftBody_scale_1 = b.asm.mp).apply(null, arguments) + } + , zr = b._emscripten_bind_btSoftBody_generateClusters_1 = function() { + return (zr = b._emscripten_bind_btSoftBody_generateClusters_1 = b.asm.np).apply(null, arguments) + } + , Ar = b._emscripten_bind_btSoftBody_generateClusters_2 = function() { + return (Ar = b._emscripten_bind_btSoftBody_generateClusters_2 = b.asm.op).apply(null, arguments) + } + , Br = b._emscripten_bind_btSoftBody_generateBendingConstraints_2 = function() { + return (Br = b._emscripten_bind_btSoftBody_generateBendingConstraints_2 = b.asm.pp).apply(null, arguments) + } + , Cr = b._emscripten_bind_btSoftBody_upcast_1 = function() { + return (Cr = b._emscripten_bind_btSoftBody_upcast_1 = b.asm.qp).apply(null, arguments) + } + , Dr = b._emscripten_bind_btSoftBody_setAnisotropicFriction_2 = function() { + return (Dr = b._emscripten_bind_btSoftBody_setAnisotropicFriction_2 = b.asm.rp).apply(null, arguments) + } + , Er = b._emscripten_bind_btSoftBody_getCollisionShape_0 = function() { + return (Er = b._emscripten_bind_btSoftBody_getCollisionShape_0 = b.asm.sp).apply(null, arguments) + } + , Fr = b._emscripten_bind_btSoftBody_setContactProcessingThreshold_1 = function() { + return (Fr = b._emscripten_bind_btSoftBody_setContactProcessingThreshold_1 = b.asm.tp).apply(null, arguments) + } + , Gr = b._emscripten_bind_btSoftBody_setActivationState_1 = function() { + return (Gr = b._emscripten_bind_btSoftBody_setActivationState_1 = b.asm.up).apply(null, arguments) + } + , Hr = b._emscripten_bind_btSoftBody_forceActivationState_1 = function() { + return (Hr = b._emscripten_bind_btSoftBody_forceActivationState_1 = b.asm.vp).apply(null, arguments) + } + , Ir = b._emscripten_bind_btSoftBody_activate_0 = function() { + return (Ir = b._emscripten_bind_btSoftBody_activate_0 = b.asm.wp).apply(null, arguments) + } + , Jr = b._emscripten_bind_btSoftBody_activate_1 = function() { + return (Jr = b._emscripten_bind_btSoftBody_activate_1 = b.asm.xp).apply(null, arguments) + } + , Kr = b._emscripten_bind_btSoftBody_isActive_0 = function() { + return (Kr = b._emscripten_bind_btSoftBody_isActive_0 = b.asm.yp).apply(null, arguments) + } + , Lr = b._emscripten_bind_btSoftBody_isKinematicObject_0 = function() { + return (Lr = b._emscripten_bind_btSoftBody_isKinematicObject_0 = b.asm.zp).apply(null, arguments) + } + , Mr = b._emscripten_bind_btSoftBody_isStaticObject_0 = function() { + return (Mr = b._emscripten_bind_btSoftBody_isStaticObject_0 = b.asm.Ap).apply(null, arguments) + } + , Nr = b._emscripten_bind_btSoftBody_isStaticOrKinematicObject_0 = function() { + return (Nr = b._emscripten_bind_btSoftBody_isStaticOrKinematicObject_0 = b.asm.Bp).apply(null, arguments) + } + , Or = b._emscripten_bind_btSoftBody_getRestitution_0 = function() { + return (Or = b._emscripten_bind_btSoftBody_getRestitution_0 = b.asm.Cp).apply(null, arguments) + } + , Pr = b._emscripten_bind_btSoftBody_getFriction_0 = function() { + return (Pr = b._emscripten_bind_btSoftBody_getFriction_0 = b.asm.Dp).apply(null, arguments) + } + , Qr = b._emscripten_bind_btSoftBody_getRollingFriction_0 = function() { + return (Qr = b._emscripten_bind_btSoftBody_getRollingFriction_0 = b.asm.Ep).apply(null, arguments) + } + , Rr = b._emscripten_bind_btSoftBody_setRestitution_1 = function() { + return (Rr = b._emscripten_bind_btSoftBody_setRestitution_1 = b.asm.Fp).apply(null, arguments) + } + , Sr = b._emscripten_bind_btSoftBody_setFriction_1 = function() { + return (Sr = b._emscripten_bind_btSoftBody_setFriction_1 = b.asm.Gp).apply(null, arguments) + } + , Tr = b._emscripten_bind_btSoftBody_setRollingFriction_1 = function() { + return (Tr = b._emscripten_bind_btSoftBody_setRollingFriction_1 = b.asm.Hp).apply(null, arguments) + } + , Ur = b._emscripten_bind_btSoftBody_getWorldTransform_0 = function() { + return (Ur = b._emscripten_bind_btSoftBody_getWorldTransform_0 = b.asm.Ip).apply(null, arguments) + } + , Vr = b._emscripten_bind_btSoftBody_getCollisionFlags_0 = function() { + return (Vr = b._emscripten_bind_btSoftBody_getCollisionFlags_0 = b.asm.Jp).apply(null, arguments) + } + , Wr = b._emscripten_bind_btSoftBody_setCollisionFlags_1 = function() { + return (Wr = b._emscripten_bind_btSoftBody_setCollisionFlags_1 = b.asm.Kp).apply(null, arguments) + } + , Xr = b._emscripten_bind_btSoftBody_setWorldTransform_1 = function() { + return (Xr = b._emscripten_bind_btSoftBody_setWorldTransform_1 = b.asm.Lp).apply(null, arguments) + } + , Yr = b._emscripten_bind_btSoftBody_setCollisionShape_1 = function() { + return (Yr = b._emscripten_bind_btSoftBody_setCollisionShape_1 = b.asm.Mp).apply(null, arguments) + } + , Zr = b._emscripten_bind_btSoftBody_setCcdMotionThreshold_1 = function() { + return (Zr = b._emscripten_bind_btSoftBody_setCcdMotionThreshold_1 = b.asm.Np).apply(null, arguments) + } + , $r = b._emscripten_bind_btSoftBody_setCcdSweptSphereRadius_1 = function() { + return ($r = b._emscripten_bind_btSoftBody_setCcdSweptSphereRadius_1 = b.asm.Op).apply(null, arguments) + } + , as = b._emscripten_bind_btSoftBody_getUserIndex_0 = function() { + return (as = b._emscripten_bind_btSoftBody_getUserIndex_0 = b.asm.Pp).apply(null, arguments) + } + , bs = b._emscripten_bind_btSoftBody_setUserIndex_1 = function() { + return (bs = b._emscripten_bind_btSoftBody_setUserIndex_1 = b.asm.Qp).apply(null, arguments) + } + , cs = b._emscripten_bind_btSoftBody_getUserPointer_0 = function() { + return (cs = b._emscripten_bind_btSoftBody_getUserPointer_0 = b.asm.Rp).apply(null, arguments) + } + , ds = b._emscripten_bind_btSoftBody_setUserPointer_1 = function() { + return (ds = b._emscripten_bind_btSoftBody_setUserPointer_1 = b.asm.Sp).apply(null, arguments) + } + , es = b._emscripten_bind_btSoftBody_getBroadphaseHandle_0 = function() { + return (es = b._emscripten_bind_btSoftBody_getBroadphaseHandle_0 = b.asm.Tp).apply(null, arguments) + } + , gs = b._emscripten_bind_btSoftBody_get_m_cfg_0 = function() { + return (gs = b._emscripten_bind_btSoftBody_get_m_cfg_0 = b.asm.Up).apply(null, arguments) + } + , hs = b._emscripten_bind_btSoftBody_set_m_cfg_1 = function() { + return (hs = b._emscripten_bind_btSoftBody_set_m_cfg_1 = b.asm.Vp).apply(null, arguments) + } + , is = b._emscripten_bind_btSoftBody_get_m_nodes_0 = function() { + return (is = b._emscripten_bind_btSoftBody_get_m_nodes_0 = b.asm.Wp).apply(null, arguments) + } + , js = b._emscripten_bind_btSoftBody_set_m_nodes_1 = function() { + return (js = b._emscripten_bind_btSoftBody_set_m_nodes_1 = b.asm.Xp).apply(null, arguments) + } + , ks = b._emscripten_bind_btSoftBody_get_m_materials_0 = function() { + return (ks = b._emscripten_bind_btSoftBody_get_m_materials_0 = b.asm.Yp).apply(null, arguments) + } + , ls = b._emscripten_bind_btSoftBody_set_m_materials_1 = function() { + return (ls = b._emscripten_bind_btSoftBody_set_m_materials_1 = b.asm.Zp).apply(null, arguments) + } + , ms = b._emscripten_bind_btSoftBody_get_m_anchors_0 = function() { + return (ms = b._emscripten_bind_btSoftBody_get_m_anchors_0 = b.asm._p).apply(null, arguments) + } + , ns = b._emscripten_bind_btSoftBody_set_m_anchors_1 = function() { + return (ns = b._emscripten_bind_btSoftBody_set_m_anchors_1 = b.asm.$p).apply(null, arguments) + } + , ps = b._emscripten_bind_btSoftBody___destroy___0 = function() { + return (ps = b._emscripten_bind_btSoftBody___destroy___0 = b.asm.aq).apply(null, arguments) + } + , qs = b._emscripten_bind_btIntArray_size_0 = function() { + return (qs = b._emscripten_bind_btIntArray_size_0 = b.asm.bq).apply(null, arguments) + } + , rs = b._emscripten_bind_btIntArray_at_1 = function() { + return (rs = b._emscripten_bind_btIntArray_at_1 = b.asm.cq).apply(null, arguments) + } + , ss = b._emscripten_bind_btIntArray___destroy___0 = function() { + return (ss = b._emscripten_bind_btIntArray___destroy___0 = b.asm.dq).apply(null, arguments) + } + , ts = b._emscripten_bind_Config_get_kVCF_0 = function() { + return (ts = b._emscripten_bind_Config_get_kVCF_0 = b.asm.eq).apply(null, arguments) + } + , us = b._emscripten_bind_Config_set_kVCF_1 = function() { + return (us = b._emscripten_bind_Config_set_kVCF_1 = b.asm.fq).apply(null, arguments) + } + , vs = b._emscripten_bind_Config_get_kDP_0 = function() { + return (vs = b._emscripten_bind_Config_get_kDP_0 = b.asm.gq).apply(null, arguments) + } + , xs = b._emscripten_bind_Config_set_kDP_1 = function() { + return (xs = b._emscripten_bind_Config_set_kDP_1 = b.asm.hq).apply(null, arguments) + } + , ys = b._emscripten_bind_Config_get_kDG_0 = function() { + return (ys = b._emscripten_bind_Config_get_kDG_0 = b.asm.iq).apply(null, arguments) + } + , zs = b._emscripten_bind_Config_set_kDG_1 = function() { + return (zs = b._emscripten_bind_Config_set_kDG_1 = b.asm.jq).apply(null, arguments) + } + , As = b._emscripten_bind_Config_get_kLF_0 = function() { + return (As = b._emscripten_bind_Config_get_kLF_0 = b.asm.kq).apply(null, arguments) + } + , Bs = b._emscripten_bind_Config_set_kLF_1 = function() { + return (Bs = b._emscripten_bind_Config_set_kLF_1 = b.asm.lq).apply(null, arguments) + } + , Cs = b._emscripten_bind_Config_get_kPR_0 = function() { + return (Cs = b._emscripten_bind_Config_get_kPR_0 = b.asm.mq).apply(null, arguments) + } + , Ds = b._emscripten_bind_Config_set_kPR_1 = function() { + return (Ds = b._emscripten_bind_Config_set_kPR_1 = b.asm.nq).apply(null, arguments) + } + , Es = b._emscripten_bind_Config_get_kVC_0 = function() { + return (Es = b._emscripten_bind_Config_get_kVC_0 = b.asm.oq).apply(null, arguments) + } + , Fs = b._emscripten_bind_Config_set_kVC_1 = function() { + return (Fs = b._emscripten_bind_Config_set_kVC_1 = b.asm.pq).apply(null, arguments) + } + , Gs = b._emscripten_bind_Config_get_kDF_0 = function() { + return (Gs = b._emscripten_bind_Config_get_kDF_0 = b.asm.qq).apply(null, arguments) + } + , Hs = b._emscripten_bind_Config_set_kDF_1 = function() { + return (Hs = b._emscripten_bind_Config_set_kDF_1 = b.asm.rq).apply(null, arguments) + } + , Is = b._emscripten_bind_Config_get_kMT_0 = function() { + return (Is = b._emscripten_bind_Config_get_kMT_0 = b.asm.sq).apply(null, arguments) + } + , Js = b._emscripten_bind_Config_set_kMT_1 = function() { + return (Js = b._emscripten_bind_Config_set_kMT_1 = b.asm.tq).apply(null, arguments) + } + , Ks = b._emscripten_bind_Config_get_kCHR_0 = function() { + return (Ks = b._emscripten_bind_Config_get_kCHR_0 = b.asm.uq).apply(null, arguments) + } + , Ls = b._emscripten_bind_Config_set_kCHR_1 = function() { + return (Ls = b._emscripten_bind_Config_set_kCHR_1 = b.asm.vq).apply(null, arguments) + } + , Ms = b._emscripten_bind_Config_get_kKHR_0 = function() { + return (Ms = b._emscripten_bind_Config_get_kKHR_0 = b.asm.wq).apply(null, arguments) + } + , Ns = b._emscripten_bind_Config_set_kKHR_1 = function() { + return (Ns = b._emscripten_bind_Config_set_kKHR_1 = b.asm.xq).apply(null, arguments) + } + , Os = b._emscripten_bind_Config_get_kSHR_0 = function() { + return (Os = b._emscripten_bind_Config_get_kSHR_0 = b.asm.yq).apply(null, arguments) + } + , Ps = b._emscripten_bind_Config_set_kSHR_1 = function() { + return (Ps = b._emscripten_bind_Config_set_kSHR_1 = b.asm.zq).apply(null, arguments) + } + , Qs = b._emscripten_bind_Config_get_kAHR_0 = function() { + return (Qs = b._emscripten_bind_Config_get_kAHR_0 = b.asm.Aq).apply(null, arguments) + } + , Rs = b._emscripten_bind_Config_set_kAHR_1 = function() { + return (Rs = b._emscripten_bind_Config_set_kAHR_1 = b.asm.Bq).apply(null, arguments) + } + , Ss = b._emscripten_bind_Config_get_kSRHR_CL_0 = function() { + return (Ss = b._emscripten_bind_Config_get_kSRHR_CL_0 = b.asm.Cq).apply(null, arguments) + } + , Ts = b._emscripten_bind_Config_set_kSRHR_CL_1 = function() { + return (Ts = b._emscripten_bind_Config_set_kSRHR_CL_1 = b.asm.Dq).apply(null, arguments) + } + , Us = b._emscripten_bind_Config_get_kSKHR_CL_0 = function() { + return (Us = b._emscripten_bind_Config_get_kSKHR_CL_0 = b.asm.Eq).apply(null, arguments) + } + , Vs = b._emscripten_bind_Config_set_kSKHR_CL_1 = function() { + return (Vs = b._emscripten_bind_Config_set_kSKHR_CL_1 = b.asm.Fq).apply(null, arguments) + } + , Ws = b._emscripten_bind_Config_get_kSSHR_CL_0 = function() { + return (Ws = b._emscripten_bind_Config_get_kSSHR_CL_0 = b.asm.Gq).apply(null, arguments) + } + , Xs = b._emscripten_bind_Config_set_kSSHR_CL_1 = function() { + return (Xs = b._emscripten_bind_Config_set_kSSHR_CL_1 = b.asm.Hq).apply(null, arguments) + } + , Ys = b._emscripten_bind_Config_get_kSR_SPLT_CL_0 = function() { + return (Ys = b._emscripten_bind_Config_get_kSR_SPLT_CL_0 = b.asm.Iq).apply(null, arguments) + } + , Zs = b._emscripten_bind_Config_set_kSR_SPLT_CL_1 = function() { + return (Zs = b._emscripten_bind_Config_set_kSR_SPLT_CL_1 = b.asm.Jq).apply(null, arguments) + } + , $s = b._emscripten_bind_Config_get_kSK_SPLT_CL_0 = function() { + return ($s = b._emscripten_bind_Config_get_kSK_SPLT_CL_0 = b.asm.Kq).apply(null, arguments) + } + , at = b._emscripten_bind_Config_set_kSK_SPLT_CL_1 = function() { + return (at = b._emscripten_bind_Config_set_kSK_SPLT_CL_1 = b.asm.Lq).apply(null, arguments) + } + , bt = b._emscripten_bind_Config_get_kSS_SPLT_CL_0 = function() { + return (bt = b._emscripten_bind_Config_get_kSS_SPLT_CL_0 = b.asm.Mq).apply(null, arguments) + } + , ct = b._emscripten_bind_Config_set_kSS_SPLT_CL_1 = function() { + return (ct = b._emscripten_bind_Config_set_kSS_SPLT_CL_1 = b.asm.Nq).apply(null, arguments) + } + , dt = b._emscripten_bind_Config_get_maxvolume_0 = function() { + return (dt = b._emscripten_bind_Config_get_maxvolume_0 = b.asm.Oq).apply(null, arguments) + } + , et = b._emscripten_bind_Config_set_maxvolume_1 = function() { + return (et = b._emscripten_bind_Config_set_maxvolume_1 = b.asm.Pq).apply(null, arguments) + } + , ft = b._emscripten_bind_Config_get_timescale_0 = function() { + return (ft = b._emscripten_bind_Config_get_timescale_0 = b.asm.Qq).apply(null, arguments) + } + , gt = b._emscripten_bind_Config_set_timescale_1 = function() { + return (gt = b._emscripten_bind_Config_set_timescale_1 = b.asm.Rq).apply(null, arguments) + } + , ht = b._emscripten_bind_Config_get_viterations_0 = function() { + return (ht = b._emscripten_bind_Config_get_viterations_0 = b.asm.Sq).apply(null, arguments) + } + , it = b._emscripten_bind_Config_set_viterations_1 = function() { + return (it = b._emscripten_bind_Config_set_viterations_1 = b.asm.Tq).apply(null, arguments) + } + , jt = b._emscripten_bind_Config_get_piterations_0 = function() { + return (jt = b._emscripten_bind_Config_get_piterations_0 = b.asm.Uq).apply(null, arguments) + } + , kt = b._emscripten_bind_Config_set_piterations_1 = function() { + return (kt = b._emscripten_bind_Config_set_piterations_1 = b.asm.Vq).apply(null, arguments) + } + , lt = b._emscripten_bind_Config_get_diterations_0 = function() { + return (lt = b._emscripten_bind_Config_get_diterations_0 = b.asm.Wq).apply(null, arguments) + } + , mt = b._emscripten_bind_Config_set_diterations_1 = function() { + return (mt = b._emscripten_bind_Config_set_diterations_1 = b.asm.Xq).apply(null, arguments) + } + , nt = b._emscripten_bind_Config_get_citerations_0 = function() { + return (nt = b._emscripten_bind_Config_get_citerations_0 = b.asm.Yq).apply(null, arguments) + } + , ot = b._emscripten_bind_Config_set_citerations_1 = function() { + return (ot = b._emscripten_bind_Config_set_citerations_1 = b.asm.Zq).apply(null, arguments) + } + , pt = b._emscripten_bind_Config_get_collisions_0 = function() { + return (pt = b._emscripten_bind_Config_get_collisions_0 = b.asm._q).apply(null, arguments) + } + , qt = b._emscripten_bind_Config_set_collisions_1 = function() { + return (qt = b._emscripten_bind_Config_set_collisions_1 = b.asm.$q).apply(null, arguments) + } + , rt = b._emscripten_bind_Config___destroy___0 = function() { + return (rt = b._emscripten_bind_Config___destroy___0 = b.asm.ar).apply(null, arguments) + } + , st = b._emscripten_bind_Node_get_m_x_0 = function() { + return (st = b._emscripten_bind_Node_get_m_x_0 = b.asm.br).apply(null, arguments) + } + , tt = b._emscripten_bind_Node_set_m_x_1 = function() { + return (tt = b._emscripten_bind_Node_set_m_x_1 = b.asm.cr).apply(null, arguments) + } + , ut = b._emscripten_bind_Node_get_m_q_0 = function() { + return (ut = b._emscripten_bind_Node_get_m_q_0 = b.asm.dr).apply(null, arguments) + } + , vt = b._emscripten_bind_Node_set_m_q_1 = function() { + return (vt = b._emscripten_bind_Node_set_m_q_1 = b.asm.er).apply(null, arguments) + } + , wt = b._emscripten_bind_Node_get_m_v_0 = function() { + return (wt = b._emscripten_bind_Node_get_m_v_0 = b.asm.fr).apply(null, arguments) + } + , xt = b._emscripten_bind_Node_set_m_v_1 = function() { + return (xt = b._emscripten_bind_Node_set_m_v_1 = b.asm.gr).apply(null, arguments) + } + , yt = b._emscripten_bind_Node_get_m_f_0 = function() { + return (yt = b._emscripten_bind_Node_get_m_f_0 = b.asm.hr).apply(null, arguments) + } + , zt = b._emscripten_bind_Node_set_m_f_1 = function() { + return (zt = b._emscripten_bind_Node_set_m_f_1 = b.asm.ir).apply(null, arguments) + } + , At = b._emscripten_bind_Node_get_m_n_0 = function() { + return (At = b._emscripten_bind_Node_get_m_n_0 = b.asm.jr).apply(null, arguments) + } + , Bt = b._emscripten_bind_Node_set_m_n_1 = function() { + return (Bt = b._emscripten_bind_Node_set_m_n_1 = b.asm.kr).apply(null, arguments) + } + , Ct = b._emscripten_bind_Node_get_m_im_0 = function() { + return (Ct = b._emscripten_bind_Node_get_m_im_0 = b.asm.lr).apply(null, arguments) + } + , Dt = b._emscripten_bind_Node_set_m_im_1 = function() { + return (Dt = b._emscripten_bind_Node_set_m_im_1 = b.asm.mr).apply(null, arguments) + } + , Et = b._emscripten_bind_Node_get_m_area_0 = function() { + return (Et = b._emscripten_bind_Node_get_m_area_0 = b.asm.nr).apply(null, arguments) + } + , Ft = b._emscripten_bind_Node_set_m_area_1 = function() { + return (Ft = b._emscripten_bind_Node_set_m_area_1 = b.asm.or).apply(null, arguments) + } + , Gt = b._emscripten_bind_Node___destroy___0 = function() { + return (Gt = b._emscripten_bind_Node___destroy___0 = b.asm.pr).apply(null, arguments) + } + , Ht = b._emscripten_bind_btGhostPairCallback_btGhostPairCallback_0 = function() { + return (Ht = b._emscripten_bind_btGhostPairCallback_btGhostPairCallback_0 = b.asm.qr).apply(null, arguments) + } + , It = b._emscripten_bind_btGhostPairCallback___destroy___0 = function() { + return (It = b._emscripten_bind_btGhostPairCallback___destroy___0 = b.asm.rr).apply(null, arguments) + } + , Jt = b._emscripten_bind_btOverlappingPairCallback___destroy___0 = function() { + return (Jt = b._emscripten_bind_btOverlappingPairCallback___destroy___0 = b.asm.sr).apply(null, arguments) + } + , Kt = b._emscripten_bind_btKinematicCharacterController_btKinematicCharacterController_3 = function() { + return (Kt = b._emscripten_bind_btKinematicCharacterController_btKinematicCharacterController_3 = b.asm.tr).apply(null, arguments) + } + , Lt = b._emscripten_bind_btKinematicCharacterController_btKinematicCharacterController_4 = function() { + return (Lt = b._emscripten_bind_btKinematicCharacterController_btKinematicCharacterController_4 = b.asm.ur).apply(null, arguments) + } + , Mt = b._emscripten_bind_btKinematicCharacterController_setUpAxis_1 = function() { + return (Mt = b._emscripten_bind_btKinematicCharacterController_setUpAxis_1 = b.asm.vr).apply(null, arguments) + } + , Nt = b._emscripten_bind_btKinematicCharacterController_setWalkDirection_1 = function() { + return (Nt = b._emscripten_bind_btKinematicCharacterController_setWalkDirection_1 = b.asm.wr).apply(null, arguments) + } + , Ot = b._emscripten_bind_btKinematicCharacterController_setVelocityForTimeInterval_2 = function() { + return (Ot = b._emscripten_bind_btKinematicCharacterController_setVelocityForTimeInterval_2 = b.asm.xr).apply(null, arguments) + } + , Pt = b._emscripten_bind_btKinematicCharacterController_warp_1 = function() { + return (Pt = b._emscripten_bind_btKinematicCharacterController_warp_1 = b.asm.yr).apply(null, arguments) + } + , Qt = b._emscripten_bind_btKinematicCharacterController_preStep_1 = function() { + return (Qt = b._emscripten_bind_btKinematicCharacterController_preStep_1 = b.asm.zr).apply(null, arguments) + } + , Rt = b._emscripten_bind_btKinematicCharacterController_playerStep_2 = function() { + return (Rt = b._emscripten_bind_btKinematicCharacterController_playerStep_2 = b.asm.Ar).apply(null, arguments) + } + , St = b._emscripten_bind_btKinematicCharacterController_setFallSpeed_1 = function() { + return (St = b._emscripten_bind_btKinematicCharacterController_setFallSpeed_1 = b.asm.Br).apply(null, arguments) + } + , Tt = b._emscripten_bind_btKinematicCharacterController_setJumpSpeed_1 = function() { + return (Tt = b._emscripten_bind_btKinematicCharacterController_setJumpSpeed_1 = b.asm.Cr).apply(null, arguments) + } + , Ut = b._emscripten_bind_btKinematicCharacterController_setMaxJumpHeight_1 = function() { + return (Ut = b._emscripten_bind_btKinematicCharacterController_setMaxJumpHeight_1 = b.asm.Dr).apply(null, arguments) + } + , Vt = b._emscripten_bind_btKinematicCharacterController_canJump_0 = function() { + return (Vt = b._emscripten_bind_btKinematicCharacterController_canJump_0 = b.asm.Er).apply(null, arguments) + } + , Wt = b._emscripten_bind_btKinematicCharacterController_jump_0 = function() { + return (Wt = b._emscripten_bind_btKinematicCharacterController_jump_0 = b.asm.Fr).apply(null, arguments) + } + , Xt = b._emscripten_bind_btKinematicCharacterController_setGravity_1 = function() { + return (Xt = b._emscripten_bind_btKinematicCharacterController_setGravity_1 = b.asm.Gr).apply(null, arguments) + } + , Yt = b._emscripten_bind_btKinematicCharacterController_getGravity_0 = function() { + return (Yt = b._emscripten_bind_btKinematicCharacterController_getGravity_0 = b.asm.Hr).apply(null, arguments) + } + , Zt = b._emscripten_bind_btKinematicCharacterController_setMaxSlope_1 = function() { + return (Zt = b._emscripten_bind_btKinematicCharacterController_setMaxSlope_1 = b.asm.Ir).apply(null, arguments) + } + , $t = b._emscripten_bind_btKinematicCharacterController_getMaxSlope_0 = function() { + return ($t = b._emscripten_bind_btKinematicCharacterController_getMaxSlope_0 = b.asm.Jr).apply(null, arguments) + } + , au = b._emscripten_bind_btKinematicCharacterController_getGhostObject_0 = function() { + return (au = b._emscripten_bind_btKinematicCharacterController_getGhostObject_0 = b.asm.Kr).apply(null, arguments) + } + , bu = b._emscripten_bind_btKinematicCharacterController_setUseGhostSweepTest_1 = function() { + return (bu = b._emscripten_bind_btKinematicCharacterController_setUseGhostSweepTest_1 = b.asm.Lr).apply(null, arguments) + } + , cu = b._emscripten_bind_btKinematicCharacterController_onGround_0 = function() { + return (cu = b._emscripten_bind_btKinematicCharacterController_onGround_0 = b.asm.Mr).apply(null, arguments) + } + , du = b._emscripten_bind_btKinematicCharacterController_setUpInterpolate_1 = function() { + return (du = b._emscripten_bind_btKinematicCharacterController_setUpInterpolate_1 = b.asm.Nr).apply(null, arguments) + } + , eu = b._emscripten_bind_btKinematicCharacterController_updateAction_2 = function() { + return (eu = b._emscripten_bind_btKinematicCharacterController_updateAction_2 = b.asm.Or).apply(null, arguments) + } + , fu = b._emscripten_bind_btKinematicCharacterController___destroy___0 = function() { + return (fu = b._emscripten_bind_btKinematicCharacterController___destroy___0 = b.asm.Pr).apply(null, arguments) + } + , gu = b._emscripten_bind_btSoftBodyArray_size_0 = function() { + return (gu = b._emscripten_bind_btSoftBodyArray_size_0 = b.asm.Qr).apply(null, arguments) + } + , hu = b._emscripten_bind_btSoftBodyArray_at_1 = function() { + return (hu = b._emscripten_bind_btSoftBodyArray_at_1 = b.asm.Rr).apply(null, arguments) + } + , iu = b._emscripten_bind_btSoftBodyArray___destroy___0 = function() { + return (iu = b._emscripten_bind_btSoftBodyArray___destroy___0 = b.asm.Sr).apply(null, arguments) + } + , ju = b._emscripten_bind_btFaceArray_size_0 = function() { + return (ju = b._emscripten_bind_btFaceArray_size_0 = b.asm.Tr).apply(null, arguments) + } + , ku = b._emscripten_bind_btFaceArray_at_1 = function() { + return (ku = b._emscripten_bind_btFaceArray_at_1 = b.asm.Ur).apply(null, arguments) + } + , lu = b._emscripten_bind_btFaceArray___destroy___0 = function() { + return (lu = b._emscripten_bind_btFaceArray___destroy___0 = b.asm.Vr).apply(null, arguments) + } + , mu = b._emscripten_bind_btStaticPlaneShape_btStaticPlaneShape_2 = function() { + return (mu = b._emscripten_bind_btStaticPlaneShape_btStaticPlaneShape_2 = b.asm.Wr).apply(null, arguments) + } + , nu = b._emscripten_bind_btStaticPlaneShape_setLocalScaling_1 = function() { + return (nu = b._emscripten_bind_btStaticPlaneShape_setLocalScaling_1 = b.asm.Xr).apply(null, arguments) + } + , ou = b._emscripten_bind_btStaticPlaneShape_getLocalScaling_0 = function() { + return (ou = b._emscripten_bind_btStaticPlaneShape_getLocalScaling_0 = b.asm.Yr).apply(null, arguments) + } + , pu = b._emscripten_bind_btStaticPlaneShape_calculateLocalInertia_2 = function() { + return (pu = b._emscripten_bind_btStaticPlaneShape_calculateLocalInertia_2 = b.asm.Zr).apply(null, arguments) + } + , qu = b._emscripten_bind_btStaticPlaneShape___destroy___0 = function() { + return (qu = b._emscripten_bind_btStaticPlaneShape___destroy___0 = b.asm._r).apply(null, arguments) + } + , ru = b._emscripten_bind_btOverlappingPairCache_setInternalGhostPairCallback_1 = function() { + return (ru = b._emscripten_bind_btOverlappingPairCache_setInternalGhostPairCallback_1 = b.asm.$r).apply(null, arguments) + } + , su = b._emscripten_bind_btOverlappingPairCache_getNumOverlappingPairs_0 = function() { + return (su = b._emscripten_bind_btOverlappingPairCache_getNumOverlappingPairs_0 = b.asm.as).apply(null, arguments) + } + , tu = b._emscripten_bind_btOverlappingPairCache___destroy___0 = function() { + return (tu = b._emscripten_bind_btOverlappingPairCache___destroy___0 = b.asm.bs).apply(null, arguments) + } + , uu = b._emscripten_bind_btIndexedMesh_get_m_numTriangles_0 = function() { + return (uu = b._emscripten_bind_btIndexedMesh_get_m_numTriangles_0 = b.asm.cs).apply(null, arguments) + } + , vu = b._emscripten_bind_btIndexedMesh_set_m_numTriangles_1 = function() { + return (vu = b._emscripten_bind_btIndexedMesh_set_m_numTriangles_1 = b.asm.ds).apply(null, arguments) + } + , wu = b._emscripten_bind_btIndexedMesh___destroy___0 = function() { + return (wu = b._emscripten_bind_btIndexedMesh___destroy___0 = b.asm.es).apply(null, arguments) + } + , xu = b._emscripten_bind_btSoftRigidDynamicsWorld_btSoftRigidDynamicsWorld_5 = function() { + return (xu = b._emscripten_bind_btSoftRigidDynamicsWorld_btSoftRigidDynamicsWorld_5 = b.asm.fs).apply(null, arguments) + } + , yu = b._emscripten_bind_btSoftRigidDynamicsWorld_addSoftBody_3 = function() { + return (yu = b._emscripten_bind_btSoftRigidDynamicsWorld_addSoftBody_3 = b.asm.gs).apply(null, arguments) + } + , zu = b._emscripten_bind_btSoftRigidDynamicsWorld_removeSoftBody_1 = function() { + return (zu = b._emscripten_bind_btSoftRigidDynamicsWorld_removeSoftBody_1 = b.asm.hs).apply(null, arguments) + } + , Au = b._emscripten_bind_btSoftRigidDynamicsWorld_removeCollisionObject_1 = function() { + return (Au = b._emscripten_bind_btSoftRigidDynamicsWorld_removeCollisionObject_1 = b.asm.is).apply(null, arguments) + } + , Bu = b._emscripten_bind_btSoftRigidDynamicsWorld_getWorldInfo_0 = function() { + return (Bu = b._emscripten_bind_btSoftRigidDynamicsWorld_getWorldInfo_0 = b.asm.js).apply(null, arguments) + } + , Cu = b._emscripten_bind_btSoftRigidDynamicsWorld_getSoftBodyArray_0 = function() { + return (Cu = b._emscripten_bind_btSoftRigidDynamicsWorld_getSoftBodyArray_0 = b.asm.ks).apply(null, arguments) + } + , Du = b._emscripten_bind_btSoftRigidDynamicsWorld_getDispatcher_0 = function() { + return (Du = b._emscripten_bind_btSoftRigidDynamicsWorld_getDispatcher_0 = b.asm.ls).apply(null, arguments) + } + , Eu = b._emscripten_bind_btSoftRigidDynamicsWorld_rayTest_3 = function() { + return (Eu = b._emscripten_bind_btSoftRigidDynamicsWorld_rayTest_3 = b.asm.ms).apply(null, arguments) + } + , Fu = b._emscripten_bind_btSoftRigidDynamicsWorld_getPairCache_0 = function() { + return (Fu = b._emscripten_bind_btSoftRigidDynamicsWorld_getPairCache_0 = b.asm.ns).apply(null, arguments) + } + , Gu = b._emscripten_bind_btSoftRigidDynamicsWorld_getDispatchInfo_0 = function() { + return (Gu = b._emscripten_bind_btSoftRigidDynamicsWorld_getDispatchInfo_0 = b.asm.os).apply(null, arguments) + } + , Hu = b._emscripten_bind_btSoftRigidDynamicsWorld_addCollisionObject_1 = function() { + return (Hu = b._emscripten_bind_btSoftRigidDynamicsWorld_addCollisionObject_1 = b.asm.ps).apply(null, arguments) + } + , Iu = b._emscripten_bind_btSoftRigidDynamicsWorld_addCollisionObject_2 = function() { + return (Iu = b._emscripten_bind_btSoftRigidDynamicsWorld_addCollisionObject_2 = b.asm.qs).apply(null, arguments) + } + , Ju = b._emscripten_bind_btSoftRigidDynamicsWorld_addCollisionObject_3 = function() { + return (Ju = b._emscripten_bind_btSoftRigidDynamicsWorld_addCollisionObject_3 = b.asm.rs).apply(null, arguments) + } + , Ku = b._emscripten_bind_btSoftRigidDynamicsWorld_getBroadphase_0 = function() { + return (Ku = b._emscripten_bind_btSoftRigidDynamicsWorld_getBroadphase_0 = b.asm.ss).apply(null, arguments) + } + , Lu = b._emscripten_bind_btSoftRigidDynamicsWorld_convexSweepTest_5 = function() { + return (Lu = b._emscripten_bind_btSoftRigidDynamicsWorld_convexSweepTest_5 = b.asm.ts).apply(null, arguments) + } + , Mu = b._emscripten_bind_btSoftRigidDynamicsWorld_contactPairTest_3 = function() { + return (Mu = b._emscripten_bind_btSoftRigidDynamicsWorld_contactPairTest_3 = b.asm.us).apply(null, arguments) + } + , Nu = b._emscripten_bind_btSoftRigidDynamicsWorld_contactTest_2 = function() { + return (Nu = b._emscripten_bind_btSoftRigidDynamicsWorld_contactTest_2 = b.asm.vs).apply(null, arguments) + } + , Ou = b._emscripten_bind_btSoftRigidDynamicsWorld_updateSingleAabb_1 = function() { + return (Ou = b._emscripten_bind_btSoftRigidDynamicsWorld_updateSingleAabb_1 = b.asm.ws).apply(null, arguments) + } + , Pu = b._emscripten_bind_btSoftRigidDynamicsWorld_setDebugDrawer_1 = function() { + return (Pu = b._emscripten_bind_btSoftRigidDynamicsWorld_setDebugDrawer_1 = b.asm.xs).apply(null, arguments) + } + , Qu = b._emscripten_bind_btSoftRigidDynamicsWorld_getDebugDrawer_0 = function() { + return (Qu = b._emscripten_bind_btSoftRigidDynamicsWorld_getDebugDrawer_0 = b.asm.ys).apply(null, arguments) + } + , Ru = b._emscripten_bind_btSoftRigidDynamicsWorld_debugDrawWorld_0 = function() { + return (Ru = b._emscripten_bind_btSoftRigidDynamicsWorld_debugDrawWorld_0 = b.asm.zs).apply(null, arguments) + } + , Su = b._emscripten_bind_btSoftRigidDynamicsWorld_debugDrawObject_3 = function() { + return (Su = b._emscripten_bind_btSoftRigidDynamicsWorld_debugDrawObject_3 = b.asm.As).apply(null, arguments) + } + , Tu = b._emscripten_bind_btSoftRigidDynamicsWorld_setGravity_1 = function() { + return (Tu = b._emscripten_bind_btSoftRigidDynamicsWorld_setGravity_1 = b.asm.Bs).apply(null, arguments) + } + , Uu = b._emscripten_bind_btSoftRigidDynamicsWorld_getGravity_0 = function() { + return (Uu = b._emscripten_bind_btSoftRigidDynamicsWorld_getGravity_0 = b.asm.Cs).apply(null, arguments) + } + , Vu = b._emscripten_bind_btSoftRigidDynamicsWorld_addRigidBody_1 = function() { + return (Vu = b._emscripten_bind_btSoftRigidDynamicsWorld_addRigidBody_1 = b.asm.Ds).apply(null, arguments) + } + , Wu = b._emscripten_bind_btSoftRigidDynamicsWorld_addRigidBody_3 = function() { + return (Wu = b._emscripten_bind_btSoftRigidDynamicsWorld_addRigidBody_3 = b.asm.Es).apply(null, arguments) + } + , Xu = b._emscripten_bind_btSoftRigidDynamicsWorld_removeRigidBody_1 = function() { + return (Xu = b._emscripten_bind_btSoftRigidDynamicsWorld_removeRigidBody_1 = b.asm.Fs).apply(null, arguments) + } + , Yu = b._emscripten_bind_btSoftRigidDynamicsWorld_addConstraint_1 = function() { + return (Yu = b._emscripten_bind_btSoftRigidDynamicsWorld_addConstraint_1 = b.asm.Gs).apply(null, arguments) + } + , Zu = b._emscripten_bind_btSoftRigidDynamicsWorld_addConstraint_2 = function() { + return (Zu = b._emscripten_bind_btSoftRigidDynamicsWorld_addConstraint_2 = b.asm.Hs).apply(null, arguments) + } + , $u = b._emscripten_bind_btSoftRigidDynamicsWorld_removeConstraint_1 = function() { + return ($u = b._emscripten_bind_btSoftRigidDynamicsWorld_removeConstraint_1 = b.asm.Is).apply(null, arguments) + } + , av = b._emscripten_bind_btSoftRigidDynamicsWorld_stepSimulation_1 = function() { + return (av = b._emscripten_bind_btSoftRigidDynamicsWorld_stepSimulation_1 = b.asm.Js).apply(null, arguments) + } + , bv = b._emscripten_bind_btSoftRigidDynamicsWorld_stepSimulation_2 = function() { + return (bv = b._emscripten_bind_btSoftRigidDynamicsWorld_stepSimulation_2 = b.asm.Ks).apply(null, arguments) + } + , cv = b._emscripten_bind_btSoftRigidDynamicsWorld_stepSimulation_3 = function() { + return (cv = b._emscripten_bind_btSoftRigidDynamicsWorld_stepSimulation_3 = b.asm.Ls).apply(null, arguments) + } + , dv = b._emscripten_bind_btSoftRigidDynamicsWorld_setContactAddedCallback_1 = function() { + return (dv = b._emscripten_bind_btSoftRigidDynamicsWorld_setContactAddedCallback_1 = b.asm.Ms).apply(null, arguments) + } + , ev = b._emscripten_bind_btSoftRigidDynamicsWorld_setContactProcessedCallback_1 = function() { + return (ev = b._emscripten_bind_btSoftRigidDynamicsWorld_setContactProcessedCallback_1 = b.asm.Ns).apply(null, arguments) + } + , fv = b._emscripten_bind_btSoftRigidDynamicsWorld_setContactDestroyedCallback_1 = function() { + return (fv = b._emscripten_bind_btSoftRigidDynamicsWorld_setContactDestroyedCallback_1 = b.asm.Os).apply(null, arguments) + } + , gv = b._emscripten_bind_btSoftRigidDynamicsWorld_addAction_1 = function() { + return (gv = b._emscripten_bind_btSoftRigidDynamicsWorld_addAction_1 = b.asm.Ps).apply(null, arguments) + } + , hv = b._emscripten_bind_btSoftRigidDynamicsWorld_removeAction_1 = function() { + return (hv = b._emscripten_bind_btSoftRigidDynamicsWorld_removeAction_1 = b.asm.Qs).apply(null, arguments) + } + , iv = b._emscripten_bind_btSoftRigidDynamicsWorld_getSolverInfo_0 = function() { + return (iv = b._emscripten_bind_btSoftRigidDynamicsWorld_getSolverInfo_0 = b.asm.Rs).apply(null, arguments) + } + , jv = b._emscripten_bind_btSoftRigidDynamicsWorld_setInternalTickCallback_1 = function() { + return (jv = b._emscripten_bind_btSoftRigidDynamicsWorld_setInternalTickCallback_1 = b.asm.Ss).apply(null, arguments) + } + , kv = b._emscripten_bind_btSoftRigidDynamicsWorld_setInternalTickCallback_2 = function() { + return (kv = b._emscripten_bind_btSoftRigidDynamicsWorld_setInternalTickCallback_2 = b.asm.Ts).apply(null, arguments) + } + , lv = b._emscripten_bind_btSoftRigidDynamicsWorld_setInternalTickCallback_3 = function() { + return (lv = b._emscripten_bind_btSoftRigidDynamicsWorld_setInternalTickCallback_3 = b.asm.Us).apply(null, arguments) + } + , mv = b._emscripten_bind_btSoftRigidDynamicsWorld___destroy___0 = function() { + return (mv = b._emscripten_bind_btSoftRigidDynamicsWorld___destroy___0 = b.asm.Vs).apply(null, arguments) + } + , nv = b._emscripten_bind_btFixedConstraint_btFixedConstraint_4 = function() { + return (nv = b._emscripten_bind_btFixedConstraint_btFixedConstraint_4 = b.asm.Ws).apply(null, arguments) + } + , ov = b._emscripten_bind_btFixedConstraint_enableFeedback_1 = function() { + return (ov = b._emscripten_bind_btFixedConstraint_enableFeedback_1 = b.asm.Xs).apply(null, arguments) + } + , pv = b._emscripten_bind_btFixedConstraint_getBreakingImpulseThreshold_0 = function() { + return (pv = b._emscripten_bind_btFixedConstraint_getBreakingImpulseThreshold_0 = b.asm.Ys).apply(null, arguments) + } + , qv = b._emscripten_bind_btFixedConstraint_setBreakingImpulseThreshold_1 = function() { + return (qv = b._emscripten_bind_btFixedConstraint_setBreakingImpulseThreshold_1 = b.asm.Zs).apply(null, arguments) + } + , rv = b._emscripten_bind_btFixedConstraint_getParam_2 = function() { + return (rv = b._emscripten_bind_btFixedConstraint_getParam_2 = b.asm._s).apply(null, arguments) + } + , sv = b._emscripten_bind_btFixedConstraint_setParam_3 = function() { + return (sv = b._emscripten_bind_btFixedConstraint_setParam_3 = b.asm.$s).apply(null, arguments) + } + , tv = b._emscripten_bind_btFixedConstraint___destroy___0 = function() { + return (tv = b._emscripten_bind_btFixedConstraint___destroy___0 = b.asm.at).apply(null, arguments) + } + , uv = b._emscripten_bind_btTransform_btTransform_0 = function() { + return (uv = b._emscripten_bind_btTransform_btTransform_0 = b.asm.bt).apply(null, arguments) + } + , vv = b._emscripten_bind_btTransform_btTransform_2 = function() { + return (vv = b._emscripten_bind_btTransform_btTransform_2 = b.asm.ct).apply(null, arguments) + } + , wv = b._emscripten_bind_btTransform_setIdentity_0 = function() { + return (wv = b._emscripten_bind_btTransform_setIdentity_0 = b.asm.dt).apply(null, arguments) + } + , xv = b._emscripten_bind_btTransform_setOrigin_1 = function() { + return (xv = b._emscripten_bind_btTransform_setOrigin_1 = b.asm.et).apply(null, arguments) + } + , yv = b._emscripten_bind_btTransform_setRotation_1 = function() { + return (yv = b._emscripten_bind_btTransform_setRotation_1 = b.asm.ft).apply(null, arguments) + } + , zv = b._emscripten_bind_btTransform_getOrigin_0 = function() { + return (zv = b._emscripten_bind_btTransform_getOrigin_0 = b.asm.gt).apply(null, arguments) + } + , Av = b._emscripten_bind_btTransform_getRotation_0 = function() { + return (Av = b._emscripten_bind_btTransform_getRotation_0 = b.asm.ht).apply(null, arguments) + } + , Bv = b._emscripten_bind_btTransform_getBasis_0 = function() { + return (Bv = b._emscripten_bind_btTransform_getBasis_0 = b.asm.it).apply(null, arguments) + } + , Cv = b._emscripten_bind_btTransform_setFromOpenGLMatrix_1 = function() { + return (Cv = b._emscripten_bind_btTransform_setFromOpenGLMatrix_1 = b.asm.jt).apply(null, arguments) + } + , Dv = b._emscripten_bind_btTransform_inverse_0 = function() { + return (Dv = b._emscripten_bind_btTransform_inverse_0 = b.asm.kt).apply(null, arguments) + } + , Ev = b._emscripten_bind_btTransform_op_mul_1 = function() { + return (Ev = b._emscripten_bind_btTransform_op_mul_1 = b.asm.lt).apply(null, arguments) + } + , Fv = b._emscripten_bind_btTransform___destroy___0 = function() { + return (Fv = b._emscripten_bind_btTransform___destroy___0 = b.asm.mt).apply(null, arguments) + } + , Gv = b._emscripten_bind_ClosestRayResultCallback_ClosestRayResultCallback_2 = function() { + return (Gv = b._emscripten_bind_ClosestRayResultCallback_ClosestRayResultCallback_2 = b.asm.nt).apply(null, arguments) + } + , Hv = b._emscripten_bind_ClosestRayResultCallback_hasHit_0 = function() { + return (Hv = b._emscripten_bind_ClosestRayResultCallback_hasHit_0 = b.asm.ot).apply(null, arguments) + } + , Iv = b._emscripten_bind_ClosestRayResultCallback_get_m_rayFromWorld_0 = function() { + return (Iv = b._emscripten_bind_ClosestRayResultCallback_get_m_rayFromWorld_0 = b.asm.pt).apply(null, arguments) + } + , Jv = b._emscripten_bind_ClosestRayResultCallback_set_m_rayFromWorld_1 = function() { + return (Jv = b._emscripten_bind_ClosestRayResultCallback_set_m_rayFromWorld_1 = b.asm.qt).apply(null, arguments) + } + , Kv = b._emscripten_bind_ClosestRayResultCallback_get_m_rayToWorld_0 = function() { + return (Kv = b._emscripten_bind_ClosestRayResultCallback_get_m_rayToWorld_0 = b.asm.rt).apply(null, arguments) + } + , Lv = b._emscripten_bind_ClosestRayResultCallback_set_m_rayToWorld_1 = function() { + return (Lv = b._emscripten_bind_ClosestRayResultCallback_set_m_rayToWorld_1 = b.asm.st).apply(null, arguments) + } + , Mv = b._emscripten_bind_ClosestRayResultCallback_get_m_hitNormalWorld_0 = function() { + return (Mv = b._emscripten_bind_ClosestRayResultCallback_get_m_hitNormalWorld_0 = b.asm.tt).apply(null, arguments) + } + , Nv = b._emscripten_bind_ClosestRayResultCallback_set_m_hitNormalWorld_1 = function() { + return (Nv = b._emscripten_bind_ClosestRayResultCallback_set_m_hitNormalWorld_1 = b.asm.ut).apply(null, arguments) + } + , Ov = b._emscripten_bind_ClosestRayResultCallback_get_m_hitPointWorld_0 = function() { + return (Ov = b._emscripten_bind_ClosestRayResultCallback_get_m_hitPointWorld_0 = b.asm.vt).apply(null, arguments) + } + , Pv = b._emscripten_bind_ClosestRayResultCallback_set_m_hitPointWorld_1 = function() { + return (Pv = b._emscripten_bind_ClosestRayResultCallback_set_m_hitPointWorld_1 = b.asm.wt).apply(null, arguments) + } + , Qv = b._emscripten_bind_ClosestRayResultCallback_get_m_collisionFilterGroup_0 = function() { + return (Qv = b._emscripten_bind_ClosestRayResultCallback_get_m_collisionFilterGroup_0 = b.asm.xt).apply(null, arguments) + } + , Rv = b._emscripten_bind_ClosestRayResultCallback_set_m_collisionFilterGroup_1 = function() { + return (Rv = b._emscripten_bind_ClosestRayResultCallback_set_m_collisionFilterGroup_1 = b.asm.yt).apply(null, arguments) + } + , Sv = b._emscripten_bind_ClosestRayResultCallback_get_m_collisionFilterMask_0 = function() { + return (Sv = b._emscripten_bind_ClosestRayResultCallback_get_m_collisionFilterMask_0 = b.asm.zt).apply(null, arguments) + } + , Tv = b._emscripten_bind_ClosestRayResultCallback_set_m_collisionFilterMask_1 = function() { + return (Tv = b._emscripten_bind_ClosestRayResultCallback_set_m_collisionFilterMask_1 = b.asm.At).apply(null, arguments) + } + , Uv = b._emscripten_bind_ClosestRayResultCallback_get_m_closestHitFraction_0 = function() { + return (Uv = b._emscripten_bind_ClosestRayResultCallback_get_m_closestHitFraction_0 = b.asm.Bt).apply(null, arguments) + } + , Vv = b._emscripten_bind_ClosestRayResultCallback_set_m_closestHitFraction_1 = function() { + return (Vv = b._emscripten_bind_ClosestRayResultCallback_set_m_closestHitFraction_1 = b.asm.Ct).apply(null, arguments) + } + , Wv = b._emscripten_bind_ClosestRayResultCallback_get_m_collisionObject_0 = function() { + return (Wv = b._emscripten_bind_ClosestRayResultCallback_get_m_collisionObject_0 = b.asm.Dt).apply(null, arguments) + } + , Xv = b._emscripten_bind_ClosestRayResultCallback_set_m_collisionObject_1 = function() { + return (Xv = b._emscripten_bind_ClosestRayResultCallback_set_m_collisionObject_1 = b.asm.Et).apply(null, arguments) + } + , Yv = b._emscripten_bind_ClosestRayResultCallback___destroy___0 = function() { + return (Yv = b._emscripten_bind_ClosestRayResultCallback___destroy___0 = b.asm.Ft).apply(null, arguments) + } + , Zv = b._emscripten_bind_btSoftBodyRigidBodyCollisionConfiguration_btSoftBodyRigidBodyCollisionConfiguration_0 = function() { + return (Zv = b._emscripten_bind_btSoftBodyRigidBodyCollisionConfiguration_btSoftBodyRigidBodyCollisionConfiguration_0 = b.asm.Gt).apply(null, arguments) + } + , $v = b._emscripten_bind_btSoftBodyRigidBodyCollisionConfiguration_btSoftBodyRigidBodyCollisionConfiguration_1 = function() { + return ($v = b._emscripten_bind_btSoftBodyRigidBodyCollisionConfiguration_btSoftBodyRigidBodyCollisionConfiguration_1 = b.asm.Ht).apply(null, arguments) + } + , aw = b._emscripten_bind_btSoftBodyRigidBodyCollisionConfiguration___destroy___0 = function() { + return (aw = b._emscripten_bind_btSoftBodyRigidBodyCollisionConfiguration___destroy___0 = b.asm.It).apply(null, arguments) + } + , bw = b._emscripten_bind_ConcreteContactResultCallback_ConcreteContactResultCallback_0 = function() { + return (bw = b._emscripten_bind_ConcreteContactResultCallback_ConcreteContactResultCallback_0 = b.asm.Jt).apply(null, arguments) + } + , cw = b._emscripten_bind_ConcreteContactResultCallback_addSingleResult_7 = function() { + return (cw = b._emscripten_bind_ConcreteContactResultCallback_addSingleResult_7 = b.asm.Kt).apply(null, arguments) + } + , dw = b._emscripten_bind_ConcreteContactResultCallback___destroy___0 = function() { + return (dw = b._emscripten_bind_ConcreteContactResultCallback___destroy___0 = b.asm.Lt).apply(null, arguments) + } + , ew = b._emscripten_bind_btBvhTriangleMeshShape_btBvhTriangleMeshShape_2 = function() { + return (ew = b._emscripten_bind_btBvhTriangleMeshShape_btBvhTriangleMeshShape_2 = b.asm.Mt).apply(null, arguments) + } + , fw = b._emscripten_bind_btBvhTriangleMeshShape_btBvhTriangleMeshShape_3 = function() { + return (fw = b._emscripten_bind_btBvhTriangleMeshShape_btBvhTriangleMeshShape_3 = b.asm.Nt).apply(null, arguments) + } + , gw = b._emscripten_bind_btBvhTriangleMeshShape_setLocalScaling_1 = function() { + return (gw = b._emscripten_bind_btBvhTriangleMeshShape_setLocalScaling_1 = b.asm.Ot).apply(null, arguments) + } + , hw = b._emscripten_bind_btBvhTriangleMeshShape_getLocalScaling_0 = function() { + return (hw = b._emscripten_bind_btBvhTriangleMeshShape_getLocalScaling_0 = b.asm.Pt).apply(null, arguments) + } + , iw = b._emscripten_bind_btBvhTriangleMeshShape_calculateLocalInertia_2 = function() { + return (iw = b._emscripten_bind_btBvhTriangleMeshShape_calculateLocalInertia_2 = b.asm.Qt).apply(null, arguments) + } + , jw = b._emscripten_bind_btBvhTriangleMeshShape___destroy___0 = function() { + return (jw = b._emscripten_bind_btBvhTriangleMeshShape___destroy___0 = b.asm.Rt).apply(null, arguments) + } + , kw = b._emscripten_bind_btConstCollisionObjectArray_size_0 = function() { + return (kw = b._emscripten_bind_btConstCollisionObjectArray_size_0 = b.asm.St).apply(null, arguments) + } + , lw = b._emscripten_bind_btConstCollisionObjectArray_at_1 = function() { + return (lw = b._emscripten_bind_btConstCollisionObjectArray_at_1 = b.asm.Tt).apply(null, arguments) + } + , mw = b._emscripten_bind_btConstCollisionObjectArray___destroy___0 = function() { + return (mw = b._emscripten_bind_btConstCollisionObjectArray___destroy___0 = b.asm.Ut).apply(null, arguments) + } + , nw = b._emscripten_bind_btSliderConstraint_btSliderConstraint_3 = function() { + return (nw = b._emscripten_bind_btSliderConstraint_btSliderConstraint_3 = b.asm.Vt).apply(null, arguments) + } + , ow = b._emscripten_bind_btSliderConstraint_btSliderConstraint_5 = function() { + return (ow = b._emscripten_bind_btSliderConstraint_btSliderConstraint_5 = b.asm.Wt).apply(null, arguments) + } + , pw = b._emscripten_bind_btSliderConstraint_setLowerLinLimit_1 = function() { + return (pw = b._emscripten_bind_btSliderConstraint_setLowerLinLimit_1 = b.asm.Xt).apply(null, arguments) + } + , qw = b._emscripten_bind_btSliderConstraint_setUpperLinLimit_1 = function() { + return (qw = b._emscripten_bind_btSliderConstraint_setUpperLinLimit_1 = b.asm.Yt).apply(null, arguments) + } + , rw = b._emscripten_bind_btSliderConstraint_setLowerAngLimit_1 = function() { + return (rw = b._emscripten_bind_btSliderConstraint_setLowerAngLimit_1 = b.asm.Zt).apply(null, arguments) + } + , sw = b._emscripten_bind_btSliderConstraint_setUpperAngLimit_1 = function() { + return (sw = b._emscripten_bind_btSliderConstraint_setUpperAngLimit_1 = b.asm._t).apply(null, arguments) + } + , tw = b._emscripten_bind_btSliderConstraint_enableFeedback_1 = function() { + return (tw = b._emscripten_bind_btSliderConstraint_enableFeedback_1 = b.asm.$t).apply(null, arguments) + } + , uw = b._emscripten_bind_btSliderConstraint_getBreakingImpulseThreshold_0 = function() { + return (uw = b._emscripten_bind_btSliderConstraint_getBreakingImpulseThreshold_0 = b.asm.au).apply(null, arguments) + } + , vw = b._emscripten_bind_btSliderConstraint_setBreakingImpulseThreshold_1 = function() { + return (vw = b._emscripten_bind_btSliderConstraint_setBreakingImpulseThreshold_1 = b.asm.bu).apply(null, arguments) + } + , ww = b._emscripten_bind_btSliderConstraint_getParam_2 = function() { + return (ww = b._emscripten_bind_btSliderConstraint_getParam_2 = b.asm.cu).apply(null, arguments) + } + , xw = b._emscripten_bind_btSliderConstraint_setParam_3 = function() { + return (xw = b._emscripten_bind_btSliderConstraint_setParam_3 = b.asm.du).apply(null, arguments) + } + , yw = b._emscripten_bind_btSliderConstraint___destroy___0 = function() { + return (yw = b._emscripten_bind_btSliderConstraint___destroy___0 = b.asm.eu).apply(null, arguments) + } + , zw = b._emscripten_bind_btPairCachingGhostObject_btPairCachingGhostObject_0 = function() { + return (zw = b._emscripten_bind_btPairCachingGhostObject_btPairCachingGhostObject_0 = b.asm.fu).apply(null, arguments) + } + , Aw = b._emscripten_bind_btPairCachingGhostObject_setAnisotropicFriction_2 = function() { + return (Aw = b._emscripten_bind_btPairCachingGhostObject_setAnisotropicFriction_2 = b.asm.gu).apply(null, arguments) + } + , Bw = b._emscripten_bind_btPairCachingGhostObject_getCollisionShape_0 = function() { + return (Bw = b._emscripten_bind_btPairCachingGhostObject_getCollisionShape_0 = b.asm.hu).apply(null, arguments) + } + , Cw = b._emscripten_bind_btPairCachingGhostObject_setContactProcessingThreshold_1 = function() { + return (Cw = b._emscripten_bind_btPairCachingGhostObject_setContactProcessingThreshold_1 = b.asm.iu).apply(null, arguments) + } + , Dw = b._emscripten_bind_btPairCachingGhostObject_setActivationState_1 = function() { + return (Dw = b._emscripten_bind_btPairCachingGhostObject_setActivationState_1 = b.asm.ju).apply(null, arguments) + } + , Ew = b._emscripten_bind_btPairCachingGhostObject_forceActivationState_1 = function() { + return (Ew = b._emscripten_bind_btPairCachingGhostObject_forceActivationState_1 = b.asm.ku).apply(null, arguments) + } + , Fw = b._emscripten_bind_btPairCachingGhostObject_activate_0 = function() { + return (Fw = b._emscripten_bind_btPairCachingGhostObject_activate_0 = b.asm.lu).apply(null, arguments) + } + , Gw = b._emscripten_bind_btPairCachingGhostObject_activate_1 = function() { + return (Gw = b._emscripten_bind_btPairCachingGhostObject_activate_1 = b.asm.mu).apply(null, arguments) + } + , Hw = b._emscripten_bind_btPairCachingGhostObject_isActive_0 = function() { + return (Hw = b._emscripten_bind_btPairCachingGhostObject_isActive_0 = b.asm.nu).apply(null, arguments) + } + , Iw = b._emscripten_bind_btPairCachingGhostObject_isKinematicObject_0 = function() { + return (Iw = b._emscripten_bind_btPairCachingGhostObject_isKinematicObject_0 = b.asm.ou).apply(null, arguments) + } + , Jw = b._emscripten_bind_btPairCachingGhostObject_isStaticObject_0 = function() { + return (Jw = b._emscripten_bind_btPairCachingGhostObject_isStaticObject_0 = b.asm.pu).apply(null, arguments) + } + , Kw = b._emscripten_bind_btPairCachingGhostObject_isStaticOrKinematicObject_0 = function() { + return (Kw = b._emscripten_bind_btPairCachingGhostObject_isStaticOrKinematicObject_0 = b.asm.qu).apply(null, arguments) + } + , Lw = b._emscripten_bind_btPairCachingGhostObject_getRestitution_0 = function() { + return (Lw = b._emscripten_bind_btPairCachingGhostObject_getRestitution_0 = b.asm.ru).apply(null, arguments) + } + , Mw = b._emscripten_bind_btPairCachingGhostObject_getFriction_0 = function() { + return (Mw = b._emscripten_bind_btPairCachingGhostObject_getFriction_0 = b.asm.su).apply(null, arguments) + } + , Nw = b._emscripten_bind_btPairCachingGhostObject_getRollingFriction_0 = function() { + return (Nw = b._emscripten_bind_btPairCachingGhostObject_getRollingFriction_0 = b.asm.tu).apply(null, arguments) + } + , Ow = b._emscripten_bind_btPairCachingGhostObject_setRestitution_1 = function() { + return (Ow = b._emscripten_bind_btPairCachingGhostObject_setRestitution_1 = b.asm.uu).apply(null, arguments) + } + , Pw = b._emscripten_bind_btPairCachingGhostObject_setFriction_1 = function() { + return (Pw = b._emscripten_bind_btPairCachingGhostObject_setFriction_1 = b.asm.vu).apply(null, arguments) + } + , Qw = b._emscripten_bind_btPairCachingGhostObject_setRollingFriction_1 = function() { + return (Qw = b._emscripten_bind_btPairCachingGhostObject_setRollingFriction_1 = b.asm.wu).apply(null, arguments) + } + , Rw = b._emscripten_bind_btPairCachingGhostObject_getWorldTransform_0 = function() { + return (Rw = b._emscripten_bind_btPairCachingGhostObject_getWorldTransform_0 = b.asm.xu).apply(null, arguments) + } + , Sw = b._emscripten_bind_btPairCachingGhostObject_getCollisionFlags_0 = function() { + return (Sw = b._emscripten_bind_btPairCachingGhostObject_getCollisionFlags_0 = b.asm.yu).apply(null, arguments) + } + , Tw = b._emscripten_bind_btPairCachingGhostObject_setCollisionFlags_1 = function() { + return (Tw = b._emscripten_bind_btPairCachingGhostObject_setCollisionFlags_1 = b.asm.zu).apply(null, arguments) + } + , Uw = b._emscripten_bind_btPairCachingGhostObject_setWorldTransform_1 = function() { + return (Uw = b._emscripten_bind_btPairCachingGhostObject_setWorldTransform_1 = b.asm.Au).apply(null, arguments) + } + , Vw = b._emscripten_bind_btPairCachingGhostObject_setCollisionShape_1 = function() { + return (Vw = b._emscripten_bind_btPairCachingGhostObject_setCollisionShape_1 = b.asm.Bu).apply(null, arguments) + } + , Ww = b._emscripten_bind_btPairCachingGhostObject_setCcdMotionThreshold_1 = function() { + return (Ww = b._emscripten_bind_btPairCachingGhostObject_setCcdMotionThreshold_1 = b.asm.Cu).apply(null, arguments) + } + , Xw = b._emscripten_bind_btPairCachingGhostObject_setCcdSweptSphereRadius_1 = function() { + return (Xw = b._emscripten_bind_btPairCachingGhostObject_setCcdSweptSphereRadius_1 = b.asm.Du).apply(null, arguments) + } + , Yw = b._emscripten_bind_btPairCachingGhostObject_getUserIndex_0 = function() { + return (Yw = b._emscripten_bind_btPairCachingGhostObject_getUserIndex_0 = b.asm.Eu).apply(null, arguments) + } + , Zw = b._emscripten_bind_btPairCachingGhostObject_setUserIndex_1 = function() { + return (Zw = b._emscripten_bind_btPairCachingGhostObject_setUserIndex_1 = b.asm.Fu).apply(null, arguments) + } + , $w = b._emscripten_bind_btPairCachingGhostObject_getUserPointer_0 = function() { + return ($w = b._emscripten_bind_btPairCachingGhostObject_getUserPointer_0 = b.asm.Gu).apply(null, arguments) + } + , ax = b._emscripten_bind_btPairCachingGhostObject_setUserPointer_1 = function() { + return (ax = b._emscripten_bind_btPairCachingGhostObject_setUserPointer_1 = b.asm.Hu).apply(null, arguments) + } + , bx = b._emscripten_bind_btPairCachingGhostObject_getBroadphaseHandle_0 = function() { + return (bx = b._emscripten_bind_btPairCachingGhostObject_getBroadphaseHandle_0 = b.asm.Iu).apply(null, arguments) + } + , cx = b._emscripten_bind_btPairCachingGhostObject_getNumOverlappingObjects_0 = function() { + return (cx = b._emscripten_bind_btPairCachingGhostObject_getNumOverlappingObjects_0 = b.asm.Ju).apply(null, arguments) + } + , dx = b._emscripten_bind_btPairCachingGhostObject_getOverlappingObject_1 = function() { + return (dx = b._emscripten_bind_btPairCachingGhostObject_getOverlappingObject_1 = b.asm.Ku).apply(null, arguments) + } + , ex = b._emscripten_bind_btPairCachingGhostObject___destroy___0 = function() { + return (ex = b._emscripten_bind_btPairCachingGhostObject___destroy___0 = b.asm.Lu).apply(null, arguments) + } + , fx = b._emscripten_bind_btManifoldPoint_getPositionWorldOnA_0 = function() { + return (fx = b._emscripten_bind_btManifoldPoint_getPositionWorldOnA_0 = b.asm.Mu).apply(null, arguments) + } + , gx = b._emscripten_bind_btManifoldPoint_getPositionWorldOnB_0 = function() { + return (gx = b._emscripten_bind_btManifoldPoint_getPositionWorldOnB_0 = b.asm.Nu).apply(null, arguments) + } + , hx = b._emscripten_bind_btManifoldPoint_getAppliedImpulse_0 = function() { + return (hx = b._emscripten_bind_btManifoldPoint_getAppliedImpulse_0 = b.asm.Ou).apply(null, arguments) + } + , ix = b._emscripten_bind_btManifoldPoint_getDistance_0 = function() { + return (ix = b._emscripten_bind_btManifoldPoint_getDistance_0 = b.asm.Pu).apply(null, arguments) + } + , jx = b._emscripten_bind_btManifoldPoint_get_m_localPointA_0 = function() { + return (jx = b._emscripten_bind_btManifoldPoint_get_m_localPointA_0 = b.asm.Qu).apply(null, arguments) + } + , kx = b._emscripten_bind_btManifoldPoint_set_m_localPointA_1 = function() { + return (kx = b._emscripten_bind_btManifoldPoint_set_m_localPointA_1 = b.asm.Ru).apply(null, arguments) + } + , lx = b._emscripten_bind_btManifoldPoint_get_m_localPointB_0 = function() { + return (lx = b._emscripten_bind_btManifoldPoint_get_m_localPointB_0 = b.asm.Su).apply(null, arguments) + } + , mx = b._emscripten_bind_btManifoldPoint_set_m_localPointB_1 = function() { + return (mx = b._emscripten_bind_btManifoldPoint_set_m_localPointB_1 = b.asm.Tu).apply(null, arguments) + } + , nx = b._emscripten_bind_btManifoldPoint_get_m_positionWorldOnB_0 = function() { + return (nx = b._emscripten_bind_btManifoldPoint_get_m_positionWorldOnB_0 = b.asm.Uu).apply(null, arguments) + } + , ox = b._emscripten_bind_btManifoldPoint_set_m_positionWorldOnB_1 = function() { + return (ox = b._emscripten_bind_btManifoldPoint_set_m_positionWorldOnB_1 = b.asm.Vu).apply(null, arguments) + } + , px = b._emscripten_bind_btManifoldPoint_get_m_positionWorldOnA_0 = function() { + return (px = b._emscripten_bind_btManifoldPoint_get_m_positionWorldOnA_0 = b.asm.Wu).apply(null, arguments) + } + , qx = b._emscripten_bind_btManifoldPoint_set_m_positionWorldOnA_1 = function() { + return (qx = b._emscripten_bind_btManifoldPoint_set_m_positionWorldOnA_1 = b.asm.Xu).apply(null, arguments) + } + , rx = b._emscripten_bind_btManifoldPoint_get_m_normalWorldOnB_0 = function() { + return (rx = b._emscripten_bind_btManifoldPoint_get_m_normalWorldOnB_0 = b.asm.Yu).apply(null, arguments) + } + , sx = b._emscripten_bind_btManifoldPoint_set_m_normalWorldOnB_1 = function() { + return (sx = b._emscripten_bind_btManifoldPoint_set_m_normalWorldOnB_1 = b.asm.Zu).apply(null, arguments) + } + , tx = b._emscripten_bind_btManifoldPoint_get_m_userPersistentData_0 = function() { + return (tx = b._emscripten_bind_btManifoldPoint_get_m_userPersistentData_0 = b.asm._u).apply(null, arguments) + } + , ux = b._emscripten_bind_btManifoldPoint_set_m_userPersistentData_1 = function() { + return (ux = b._emscripten_bind_btManifoldPoint_set_m_userPersistentData_1 = b.asm.$u).apply(null, arguments) + } + , vx = b._emscripten_bind_btManifoldPoint___destroy___0 = function() { + return (vx = b._emscripten_bind_btManifoldPoint___destroy___0 = b.asm.av).apply(null, arguments) + } + , wx = b._emscripten_bind_btPoint2PointConstraint_btPoint2PointConstraint_2 = function() { + return (wx = b._emscripten_bind_btPoint2PointConstraint_btPoint2PointConstraint_2 = b.asm.bv).apply(null, arguments) + } + , xx = b._emscripten_bind_btPoint2PointConstraint_btPoint2PointConstraint_4 = function() { + return (xx = b._emscripten_bind_btPoint2PointConstraint_btPoint2PointConstraint_4 = b.asm.cv).apply(null, arguments) + } + , yx = b._emscripten_bind_btPoint2PointConstraint_setPivotA_1 = function() { + return (yx = b._emscripten_bind_btPoint2PointConstraint_setPivotA_1 = b.asm.dv).apply(null, arguments) + } + , zx = b._emscripten_bind_btPoint2PointConstraint_setPivotB_1 = function() { + return (zx = b._emscripten_bind_btPoint2PointConstraint_setPivotB_1 = b.asm.ev).apply(null, arguments) + } + , Ax = b._emscripten_bind_btPoint2PointConstraint_getPivotInA_0 = function() { + return (Ax = b._emscripten_bind_btPoint2PointConstraint_getPivotInA_0 = b.asm.fv).apply(null, arguments) + } + , Bx = b._emscripten_bind_btPoint2PointConstraint_getPivotInB_0 = function() { + return (Bx = b._emscripten_bind_btPoint2PointConstraint_getPivotInB_0 = b.asm.gv).apply(null, arguments) + } + , Cx = b._emscripten_bind_btPoint2PointConstraint_enableFeedback_1 = function() { + return (Cx = b._emscripten_bind_btPoint2PointConstraint_enableFeedback_1 = b.asm.hv).apply(null, arguments) + } + , Dx = b._emscripten_bind_btPoint2PointConstraint_getBreakingImpulseThreshold_0 = function() { + return (Dx = b._emscripten_bind_btPoint2PointConstraint_getBreakingImpulseThreshold_0 = b.asm.iv).apply(null, arguments) + } + , Ex = b._emscripten_bind_btPoint2PointConstraint_setBreakingImpulseThreshold_1 = function() { + return (Ex = b._emscripten_bind_btPoint2PointConstraint_setBreakingImpulseThreshold_1 = b.asm.jv).apply(null, arguments) + } + , Fx = b._emscripten_bind_btPoint2PointConstraint_getParam_2 = function() { + return (Fx = b._emscripten_bind_btPoint2PointConstraint_getParam_2 = b.asm.kv).apply(null, arguments) + } + , Gx = b._emscripten_bind_btPoint2PointConstraint_setParam_3 = function() { + return (Gx = b._emscripten_bind_btPoint2PointConstraint_setParam_3 = b.asm.lv).apply(null, arguments) + } + , Hx = b._emscripten_bind_btPoint2PointConstraint_get_m_setting_0 = function() { + return (Hx = b._emscripten_bind_btPoint2PointConstraint_get_m_setting_0 = b.asm.mv).apply(null, arguments) + } + , Ix = b._emscripten_bind_btPoint2PointConstraint_set_m_setting_1 = function() { + return (Ix = b._emscripten_bind_btPoint2PointConstraint_set_m_setting_1 = b.asm.nv).apply(null, arguments) + } + , Jx = b._emscripten_bind_btPoint2PointConstraint___destroy___0 = function() { + return (Jx = b._emscripten_bind_btPoint2PointConstraint___destroy___0 = b.asm.ov).apply(null, arguments) + } + , Kx = b._emscripten_bind_btSoftBodyHelpers_btSoftBodyHelpers_0 = function() { + return (Kx = b._emscripten_bind_btSoftBodyHelpers_btSoftBodyHelpers_0 = b.asm.pv).apply(null, arguments) + } + , Lx = b._emscripten_bind_btSoftBodyHelpers_CreateRope_5 = function() { + return (Lx = b._emscripten_bind_btSoftBodyHelpers_CreateRope_5 = b.asm.qv).apply(null, arguments) + } + , Mx = b._emscripten_bind_btSoftBodyHelpers_CreatePatch_9 = function() { + return (Mx = b._emscripten_bind_btSoftBodyHelpers_CreatePatch_9 = b.asm.rv).apply(null, arguments) + } + , Nx = b._emscripten_bind_btSoftBodyHelpers_CreatePatchUV_10 = function() { + return (Nx = b._emscripten_bind_btSoftBodyHelpers_CreatePatchUV_10 = b.asm.sv).apply(null, arguments) + } + , Ox = b._emscripten_bind_btSoftBodyHelpers_CreateEllipsoid_4 = function() { + return (Ox = b._emscripten_bind_btSoftBodyHelpers_CreateEllipsoid_4 = b.asm.tv).apply(null, arguments) + } + , Px = b._emscripten_bind_btSoftBodyHelpers_CreateFromTriMesh_5 = function() { + return (Px = b._emscripten_bind_btSoftBodyHelpers_CreateFromTriMesh_5 = b.asm.uv).apply(null, arguments) + } + , Qx = b._emscripten_bind_btSoftBodyHelpers_CreateFromConvexHull_4 = function() { + return (Qx = b._emscripten_bind_btSoftBodyHelpers_CreateFromConvexHull_4 = b.asm.vv).apply(null, arguments) + } + , Rx = b._emscripten_bind_btSoftBodyHelpers___destroy___0 = function() { + return (Rx = b._emscripten_bind_btSoftBodyHelpers___destroy___0 = b.asm.wv).apply(null, arguments) + } + , Sx = b._emscripten_bind_btBroadphaseProxy_get_m_collisionFilterGroup_0 = function() { + return (Sx = b._emscripten_bind_btBroadphaseProxy_get_m_collisionFilterGroup_0 = b.asm.xv).apply(null, arguments) + } + , Tx = b._emscripten_bind_btBroadphaseProxy_set_m_collisionFilterGroup_1 = function() { + return (Tx = b._emscripten_bind_btBroadphaseProxy_set_m_collisionFilterGroup_1 = b.asm.yv).apply(null, arguments) + } + , Ux = b._emscripten_bind_btBroadphaseProxy_get_m_collisionFilterMask_0 = function() { + return (Ux = b._emscripten_bind_btBroadphaseProxy_get_m_collisionFilterMask_0 = b.asm.zv).apply(null, arguments) + } + , Vx = b._emscripten_bind_btBroadphaseProxy_set_m_collisionFilterMask_1 = function() { + return (Vx = b._emscripten_bind_btBroadphaseProxy_set_m_collisionFilterMask_1 = b.asm.Av).apply(null, arguments) + } + , Wx = b._emscripten_bind_btBroadphaseProxy___destroy___0 = function() { + return (Wx = b._emscripten_bind_btBroadphaseProxy___destroy___0 = b.asm.Bv).apply(null, arguments) + } + , Xx = b._emscripten_bind_tNodeArray_size_0 = function() { + return (Xx = b._emscripten_bind_tNodeArray_size_0 = b.asm.Cv).apply(null, arguments) + } + , Yx = b._emscripten_bind_tNodeArray_at_1 = function() { + return (Yx = b._emscripten_bind_tNodeArray_at_1 = b.asm.Dv).apply(null, arguments) + } + , Zx = b._emscripten_bind_tNodeArray___destroy___0 = function() { + return (Zx = b._emscripten_bind_tNodeArray___destroy___0 = b.asm.Ev).apply(null, arguments) + } + , $x = b._emscripten_bind_btBoxShape_btBoxShape_1 = function() { + return ($x = b._emscripten_bind_btBoxShape_btBoxShape_1 = b.asm.Fv).apply(null, arguments) + } + , ay = b._emscripten_bind_btBoxShape_setMargin_1 = function() { + return (ay = b._emscripten_bind_btBoxShape_setMargin_1 = b.asm.Gv).apply(null, arguments) + } + , by = b._emscripten_bind_btBoxShape_getMargin_0 = function() { + return (by = b._emscripten_bind_btBoxShape_getMargin_0 = b.asm.Hv).apply(null, arguments) + } + , cy = b._emscripten_bind_btBoxShape_setLocalScaling_1 = function() { + return (cy = b._emscripten_bind_btBoxShape_setLocalScaling_1 = b.asm.Iv).apply(null, arguments) + } + , dy = b._emscripten_bind_btBoxShape_getLocalScaling_0 = function() { + return (dy = b._emscripten_bind_btBoxShape_getLocalScaling_0 = b.asm.Jv).apply(null, arguments) + } + , ey = b._emscripten_bind_btBoxShape_calculateLocalInertia_2 = function() { + return (ey = b._emscripten_bind_btBoxShape_calculateLocalInertia_2 = b.asm.Kv).apply(null, arguments) + } + , fy = b._emscripten_bind_btBoxShape___destroy___0 = function() { + return (fy = b._emscripten_bind_btBoxShape___destroy___0 = b.asm.Lv).apply(null, arguments) + } + , gy = b._emscripten_bind_btFace_get_m_indices_0 = function() { + return (gy = b._emscripten_bind_btFace_get_m_indices_0 = b.asm.Mv).apply(null, arguments) + } + , hy = b._emscripten_bind_btFace_set_m_indices_1 = function() { + return (hy = b._emscripten_bind_btFace_set_m_indices_1 = b.asm.Nv).apply(null, arguments) + } + , iy = b._emscripten_bind_btFace_get_m_plane_1 = function() { + return (iy = b._emscripten_bind_btFace_get_m_plane_1 = b.asm.Ov).apply(null, arguments) + } + , jy = b._emscripten_bind_btFace_set_m_plane_2 = function() { + return (jy = b._emscripten_bind_btFace_set_m_plane_2 = b.asm.Pv).apply(null, arguments) + } + , ky = b._emscripten_bind_btFace___destroy___0 = function() { + return (ky = b._emscripten_bind_btFace___destroy___0 = b.asm.Qv).apply(null, arguments) + } + , ly = b._emscripten_bind_DebugDrawer_DebugDrawer_0 = function() { + return (ly = b._emscripten_bind_DebugDrawer_DebugDrawer_0 = b.asm.Rv).apply(null, arguments) + } + , my = b._emscripten_bind_DebugDrawer_drawLine_3 = function() { + return (my = b._emscripten_bind_DebugDrawer_drawLine_3 = b.asm.Sv).apply(null, arguments) + } + , ny = b._emscripten_bind_DebugDrawer_drawContactPoint_5 = function() { + return (ny = b._emscripten_bind_DebugDrawer_drawContactPoint_5 = b.asm.Tv).apply(null, arguments) + } + , oy = b._emscripten_bind_DebugDrawer_reportErrorWarning_1 = function() { + return (oy = b._emscripten_bind_DebugDrawer_reportErrorWarning_1 = b.asm.Uv).apply(null, arguments) + } + , py = b._emscripten_bind_DebugDrawer_draw3dText_2 = function() { + return (py = b._emscripten_bind_DebugDrawer_draw3dText_2 = b.asm.Vv).apply(null, arguments) + } + , qy = b._emscripten_bind_DebugDrawer_setDebugMode_1 = function() { + return (qy = b._emscripten_bind_DebugDrawer_setDebugMode_1 = b.asm.Wv).apply(null, arguments) + } + , ry = b._emscripten_bind_DebugDrawer_getDebugMode_0 = function() { + return (ry = b._emscripten_bind_DebugDrawer_getDebugMode_0 = b.asm.Xv).apply(null, arguments) + } + , sy = b._emscripten_bind_DebugDrawer___destroy___0 = function() { + return (sy = b._emscripten_bind_DebugDrawer___destroy___0 = b.asm.Yv).apply(null, arguments) + } + , ty = b._emscripten_bind_btCapsuleShapeX_btCapsuleShapeX_2 = function() { + return (ty = b._emscripten_bind_btCapsuleShapeX_btCapsuleShapeX_2 = b.asm.Zv).apply(null, arguments) + } + , uy = b._emscripten_bind_btCapsuleShapeX_setMargin_1 = function() { + return (uy = b._emscripten_bind_btCapsuleShapeX_setMargin_1 = b.asm._v).apply(null, arguments) + } + , vy = b._emscripten_bind_btCapsuleShapeX_getMargin_0 = function() { + return (vy = b._emscripten_bind_btCapsuleShapeX_getMargin_0 = b.asm.$v).apply(null, arguments) + } + , wy = b._emscripten_bind_btCapsuleShapeX_getUpAxis_0 = function() { + return (wy = b._emscripten_bind_btCapsuleShapeX_getUpAxis_0 = b.asm.aw).apply(null, arguments) + } + , xy = b._emscripten_bind_btCapsuleShapeX_getRadius_0 = function() { + return (xy = b._emscripten_bind_btCapsuleShapeX_getRadius_0 = b.asm.bw).apply(null, arguments) + } + , yy = b._emscripten_bind_btCapsuleShapeX_getHalfHeight_0 = function() { + return (yy = b._emscripten_bind_btCapsuleShapeX_getHalfHeight_0 = b.asm.cw).apply(null, arguments) + } + , zy = b._emscripten_bind_btCapsuleShapeX_setLocalScaling_1 = function() { + return (zy = b._emscripten_bind_btCapsuleShapeX_setLocalScaling_1 = b.asm.dw).apply(null, arguments) + } + , Ay = b._emscripten_bind_btCapsuleShapeX_getLocalScaling_0 = function() { + return (Ay = b._emscripten_bind_btCapsuleShapeX_getLocalScaling_0 = b.asm.ew).apply(null, arguments) + } + , By = b._emscripten_bind_btCapsuleShapeX_calculateLocalInertia_2 = function() { + return (By = b._emscripten_bind_btCapsuleShapeX_calculateLocalInertia_2 = b.asm.fw).apply(null, arguments) + } + , Cy = b._emscripten_bind_btCapsuleShapeX___destroy___0 = function() { + return (Cy = b._emscripten_bind_btCapsuleShapeX___destroy___0 = b.asm.gw).apply(null, arguments) + } + , Dy = b._emscripten_bind_btQuaternion_btQuaternion_4 = function() { + return (Dy = b._emscripten_bind_btQuaternion_btQuaternion_4 = b.asm.hw).apply(null, arguments) + } + , Ey = b._emscripten_bind_btQuaternion_setValue_4 = function() { + return (Ey = b._emscripten_bind_btQuaternion_setValue_4 = b.asm.iw).apply(null, arguments) + } + , Fy = b._emscripten_bind_btQuaternion_setEulerZYX_3 = function() { + return (Fy = b._emscripten_bind_btQuaternion_setEulerZYX_3 = b.asm.jw).apply(null, arguments) + } + , Gy = b._emscripten_bind_btQuaternion_setRotation_2 = function() { + return (Gy = b._emscripten_bind_btQuaternion_setRotation_2 = b.asm.kw).apply(null, arguments) + } + , Hy = b._emscripten_bind_btQuaternion_normalize_0 = function() { + return (Hy = b._emscripten_bind_btQuaternion_normalize_0 = b.asm.lw).apply(null, arguments) + } + , Iy = b._emscripten_bind_btQuaternion_length2_0 = function() { + return (Iy = b._emscripten_bind_btQuaternion_length2_0 = b.asm.mw).apply(null, arguments) + } + , Jy = b._emscripten_bind_btQuaternion_length_0 = function() { + return (Jy = b._emscripten_bind_btQuaternion_length_0 = b.asm.nw).apply(null, arguments) + } + , Ky = b._emscripten_bind_btQuaternion_dot_1 = function() { + return (Ky = b._emscripten_bind_btQuaternion_dot_1 = b.asm.ow).apply(null, arguments) + } + , Ly = b._emscripten_bind_btQuaternion_normalized_0 = function() { + return (Ly = b._emscripten_bind_btQuaternion_normalized_0 = b.asm.pw).apply(null, arguments) + } + , My = b._emscripten_bind_btQuaternion_getAxis_0 = function() { + return (My = b._emscripten_bind_btQuaternion_getAxis_0 = b.asm.qw).apply(null, arguments) + } + , Ny = b._emscripten_bind_btQuaternion_inverse_0 = function() { + return (Ny = b._emscripten_bind_btQuaternion_inverse_0 = b.asm.rw).apply(null, arguments) + } + , Oy = b._emscripten_bind_btQuaternion_getAngle_0 = function() { + return (Oy = b._emscripten_bind_btQuaternion_getAngle_0 = b.asm.sw).apply(null, arguments) + } + , Py = b._emscripten_bind_btQuaternion_getAngleShortestPath_0 = function() { + return (Py = b._emscripten_bind_btQuaternion_getAngleShortestPath_0 = b.asm.tw).apply(null, arguments) + } + , Qy = b._emscripten_bind_btQuaternion_angle_1 = function() { + return (Qy = b._emscripten_bind_btQuaternion_angle_1 = b.asm.uw).apply(null, arguments) + } + , Ry = b._emscripten_bind_btQuaternion_angleShortestPath_1 = function() { + return (Ry = b._emscripten_bind_btQuaternion_angleShortestPath_1 = b.asm.vw).apply(null, arguments) + } + , Sy = b._emscripten_bind_btQuaternion_op_add_1 = function() { + return (Sy = b._emscripten_bind_btQuaternion_op_add_1 = b.asm.ww).apply(null, arguments) + } + , Ty = b._emscripten_bind_btQuaternion_op_sub_1 = function() { + return (Ty = b._emscripten_bind_btQuaternion_op_sub_1 = b.asm.xw).apply(null, arguments) + } + , Uy = b._emscripten_bind_btQuaternion_op_mul_1 = function() { + return (Uy = b._emscripten_bind_btQuaternion_op_mul_1 = b.asm.yw).apply(null, arguments) + } + , Vy = b._emscripten_bind_btQuaternion_op_mulq_1 = function() { + return (Vy = b._emscripten_bind_btQuaternion_op_mulq_1 = b.asm.zw).apply(null, arguments) + } + , Wy = b._emscripten_bind_btQuaternion_op_div_1 = function() { + return (Wy = b._emscripten_bind_btQuaternion_op_div_1 = b.asm.Aw).apply(null, arguments) + } + , Xy = b._emscripten_bind_btQuaternion_x_0 = function() { + return (Xy = b._emscripten_bind_btQuaternion_x_0 = b.asm.Bw).apply(null, arguments) + } + , Yy = b._emscripten_bind_btQuaternion_y_0 = function() { + return (Yy = b._emscripten_bind_btQuaternion_y_0 = b.asm.Cw).apply(null, arguments) + } + , Zy = b._emscripten_bind_btQuaternion_z_0 = function() { + return (Zy = b._emscripten_bind_btQuaternion_z_0 = b.asm.Dw).apply(null, arguments) + } + , $y = b._emscripten_bind_btQuaternion_w_0 = function() { + return ($y = b._emscripten_bind_btQuaternion_w_0 = b.asm.Ew).apply(null, arguments) + } + , az = b._emscripten_bind_btQuaternion_setX_1 = function() { + return (az = b._emscripten_bind_btQuaternion_setX_1 = b.asm.Fw).apply(null, arguments) + } + , bz = b._emscripten_bind_btQuaternion_setY_1 = function() { + return (bz = b._emscripten_bind_btQuaternion_setY_1 = b.asm.Gw).apply(null, arguments) + } + , cz = b._emscripten_bind_btQuaternion_setZ_1 = function() { + return (cz = b._emscripten_bind_btQuaternion_setZ_1 = b.asm.Hw).apply(null, arguments) + } + , dz = b._emscripten_bind_btQuaternion_setW_1 = function() { + return (dz = b._emscripten_bind_btQuaternion_setW_1 = b.asm.Iw).apply(null, arguments) + } + , ez = b._emscripten_bind_btQuaternion___destroy___0 = function() { + return (ez = b._emscripten_bind_btQuaternion___destroy___0 = b.asm.Jw).apply(null, arguments) + } + , fz = b._emscripten_bind_btCapsuleShapeZ_btCapsuleShapeZ_2 = function() { + return (fz = b._emscripten_bind_btCapsuleShapeZ_btCapsuleShapeZ_2 = b.asm.Kw).apply(null, arguments) + } + , gz = b._emscripten_bind_btCapsuleShapeZ_setMargin_1 = function() { + return (gz = b._emscripten_bind_btCapsuleShapeZ_setMargin_1 = b.asm.Lw).apply(null, arguments) + } + , hz = b._emscripten_bind_btCapsuleShapeZ_getMargin_0 = function() { + return (hz = b._emscripten_bind_btCapsuleShapeZ_getMargin_0 = b.asm.Mw).apply(null, arguments) + } + , iz = b._emscripten_bind_btCapsuleShapeZ_getUpAxis_0 = function() { + return (iz = b._emscripten_bind_btCapsuleShapeZ_getUpAxis_0 = b.asm.Nw).apply(null, arguments) + } + , jz = b._emscripten_bind_btCapsuleShapeZ_getRadius_0 = function() { + return (jz = b._emscripten_bind_btCapsuleShapeZ_getRadius_0 = b.asm.Ow).apply(null, arguments) + } + , kz = b._emscripten_bind_btCapsuleShapeZ_getHalfHeight_0 = function() { + return (kz = b._emscripten_bind_btCapsuleShapeZ_getHalfHeight_0 = b.asm.Pw).apply(null, arguments) + } + , lz = b._emscripten_bind_btCapsuleShapeZ_setLocalScaling_1 = function() { + return (lz = b._emscripten_bind_btCapsuleShapeZ_setLocalScaling_1 = b.asm.Qw).apply(null, arguments) + } + , mz = b._emscripten_bind_btCapsuleShapeZ_getLocalScaling_0 = function() { + return (mz = b._emscripten_bind_btCapsuleShapeZ_getLocalScaling_0 = b.asm.Rw).apply(null, arguments) + } + , nz = b._emscripten_bind_btCapsuleShapeZ_calculateLocalInertia_2 = function() { + return (nz = b._emscripten_bind_btCapsuleShapeZ_calculateLocalInertia_2 = b.asm.Sw).apply(null, arguments) + } + , oz = b._emscripten_bind_btCapsuleShapeZ___destroy___0 = function() { + return (oz = b._emscripten_bind_btCapsuleShapeZ___destroy___0 = b.asm.Tw).apply(null, arguments) + } + , pz = b._emscripten_bind_btContactSolverInfo_get_m_splitImpulse_0 = function() { + return (pz = b._emscripten_bind_btContactSolverInfo_get_m_splitImpulse_0 = b.asm.Uw).apply(null, arguments) + } + , qz = b._emscripten_bind_btContactSolverInfo_set_m_splitImpulse_1 = function() { + return (qz = b._emscripten_bind_btContactSolverInfo_set_m_splitImpulse_1 = b.asm.Vw).apply(null, arguments) + } + , rz = b._emscripten_bind_btContactSolverInfo_get_m_splitImpulsePenetrationThreshold_0 = function() { + return (rz = b._emscripten_bind_btContactSolverInfo_get_m_splitImpulsePenetrationThreshold_0 = b.asm.Ww).apply(null, arguments) + } + , sz = b._emscripten_bind_btContactSolverInfo_set_m_splitImpulsePenetrationThreshold_1 = function() { + return (sz = b._emscripten_bind_btContactSolverInfo_set_m_splitImpulsePenetrationThreshold_1 = b.asm.Xw).apply(null, arguments) + } + , tz = b._emscripten_bind_btContactSolverInfo_get_m_numIterations_0 = function() { + return (tz = b._emscripten_bind_btContactSolverInfo_get_m_numIterations_0 = b.asm.Yw).apply(null, arguments) + } + , uz = b._emscripten_bind_btContactSolverInfo_set_m_numIterations_1 = function() { + return (uz = b._emscripten_bind_btContactSolverInfo_set_m_numIterations_1 = b.asm.Zw).apply(null, arguments) + } + , vz = b._emscripten_bind_btContactSolverInfo___destroy___0 = function() { + return (vz = b._emscripten_bind_btContactSolverInfo___destroy___0 = b.asm._w).apply(null, arguments) + } + , wz = b._emscripten_bind_btGeneric6DofSpringConstraint_btGeneric6DofSpringConstraint_3 = function() { + return (wz = b._emscripten_bind_btGeneric6DofSpringConstraint_btGeneric6DofSpringConstraint_3 = b.asm.$w).apply(null, arguments) + } + , xz = b._emscripten_bind_btGeneric6DofSpringConstraint_btGeneric6DofSpringConstraint_5 = function() { + return (xz = b._emscripten_bind_btGeneric6DofSpringConstraint_btGeneric6DofSpringConstraint_5 = b.asm.ax).apply(null, arguments) + } + , yz = b._emscripten_bind_btGeneric6DofSpringConstraint_enableSpring_2 = function() { + return (yz = b._emscripten_bind_btGeneric6DofSpringConstraint_enableSpring_2 = b.asm.bx).apply(null, arguments) + } + , zz = b._emscripten_bind_btGeneric6DofSpringConstraint_setStiffness_2 = function() { + return (zz = b._emscripten_bind_btGeneric6DofSpringConstraint_setStiffness_2 = b.asm.cx).apply(null, arguments) + } + , Az = b._emscripten_bind_btGeneric6DofSpringConstraint_setDamping_2 = function() { + return (Az = b._emscripten_bind_btGeneric6DofSpringConstraint_setDamping_2 = b.asm.dx).apply(null, arguments) + } + , Bz = b._emscripten_bind_btGeneric6DofSpringConstraint_setEquilibriumPoint_0 = function() { + return (Bz = b._emscripten_bind_btGeneric6DofSpringConstraint_setEquilibriumPoint_0 = b.asm.ex).apply(null, arguments) + } + , Cz = b._emscripten_bind_btGeneric6DofSpringConstraint_setEquilibriumPoint_1 = function() { + return (Cz = b._emscripten_bind_btGeneric6DofSpringConstraint_setEquilibriumPoint_1 = b.asm.fx).apply(null, arguments) + } + , Dz = b._emscripten_bind_btGeneric6DofSpringConstraint_setEquilibriumPoint_2 = function() { + return (Dz = b._emscripten_bind_btGeneric6DofSpringConstraint_setEquilibriumPoint_2 = b.asm.gx).apply(null, arguments) + } + , Ez = b._emscripten_bind_btGeneric6DofSpringConstraint_setLinearLowerLimit_1 = function() { + return (Ez = b._emscripten_bind_btGeneric6DofSpringConstraint_setLinearLowerLimit_1 = b.asm.hx).apply(null, arguments) + } + , Fz = b._emscripten_bind_btGeneric6DofSpringConstraint_setLinearUpperLimit_1 = function() { + return (Fz = b._emscripten_bind_btGeneric6DofSpringConstraint_setLinearUpperLimit_1 = b.asm.ix).apply(null, arguments) + } + , Gz = b._emscripten_bind_btGeneric6DofSpringConstraint_setAngularLowerLimit_1 = function() { + return (Gz = b._emscripten_bind_btGeneric6DofSpringConstraint_setAngularLowerLimit_1 = b.asm.jx).apply(null, arguments) + } + , Hz = b._emscripten_bind_btGeneric6DofSpringConstraint_setAngularUpperLimit_1 = function() { + return (Hz = b._emscripten_bind_btGeneric6DofSpringConstraint_setAngularUpperLimit_1 = b.asm.kx).apply(null, arguments) + } + , Iz = b._emscripten_bind_btGeneric6DofSpringConstraint_getFrameOffsetA_0 = function() { + return (Iz = b._emscripten_bind_btGeneric6DofSpringConstraint_getFrameOffsetA_0 = b.asm.lx).apply(null, arguments) + } + , Jz = b._emscripten_bind_btGeneric6DofSpringConstraint_enableFeedback_1 = function() { + return (Jz = b._emscripten_bind_btGeneric6DofSpringConstraint_enableFeedback_1 = b.asm.mx).apply(null, arguments) + } + , Kz = b._emscripten_bind_btGeneric6DofSpringConstraint_getBreakingImpulseThreshold_0 = function() { + return (Kz = b._emscripten_bind_btGeneric6DofSpringConstraint_getBreakingImpulseThreshold_0 = b.asm.nx).apply(null, arguments) + } + , Lz = b._emscripten_bind_btGeneric6DofSpringConstraint_setBreakingImpulseThreshold_1 = function() { + return (Lz = b._emscripten_bind_btGeneric6DofSpringConstraint_setBreakingImpulseThreshold_1 = b.asm.ox).apply(null, arguments) + } + , Mz = b._emscripten_bind_btGeneric6DofSpringConstraint_getParam_2 = function() { + return (Mz = b._emscripten_bind_btGeneric6DofSpringConstraint_getParam_2 = b.asm.px).apply(null, arguments) + } + , Nz = b._emscripten_bind_btGeneric6DofSpringConstraint_setParam_3 = function() { + return (Nz = b._emscripten_bind_btGeneric6DofSpringConstraint_setParam_3 = b.asm.qx).apply(null, arguments) + } + , Oz = b._emscripten_bind_btGeneric6DofSpringConstraint___destroy___0 = function() { + return (Oz = b._emscripten_bind_btGeneric6DofSpringConstraint___destroy___0 = b.asm.rx).apply(null, arguments) + } + , Pz = b._emscripten_bind_btSphereShape_btSphereShape_1 = function() { + return (Pz = b._emscripten_bind_btSphereShape_btSphereShape_1 = b.asm.sx).apply(null, arguments) + } + , Qz = b._emscripten_bind_btSphereShape_setMargin_1 = function() { + return (Qz = b._emscripten_bind_btSphereShape_setMargin_1 = b.asm.tx).apply(null, arguments) + } + , Rz = b._emscripten_bind_btSphereShape_getMargin_0 = function() { + return (Rz = b._emscripten_bind_btSphereShape_getMargin_0 = b.asm.ux).apply(null, arguments) + } + , Sz = b._emscripten_bind_btSphereShape_setLocalScaling_1 = function() { + return (Sz = b._emscripten_bind_btSphereShape_setLocalScaling_1 = b.asm.vx).apply(null, arguments) + } + , Tz = b._emscripten_bind_btSphereShape_getLocalScaling_0 = function() { + return (Tz = b._emscripten_bind_btSphereShape_getLocalScaling_0 = b.asm.wx).apply(null, arguments) + } + , Uz = b._emscripten_bind_btSphereShape_calculateLocalInertia_2 = function() { + return (Uz = b._emscripten_bind_btSphereShape_calculateLocalInertia_2 = b.asm.xx).apply(null, arguments) + } + , Vz = b._emscripten_bind_btSphereShape___destroy___0 = function() { + return (Vz = b._emscripten_bind_btSphereShape___destroy___0 = b.asm.yx).apply(null, arguments) + } + , Wz = b._emscripten_bind_LocalConvexResult_LocalConvexResult_5 = function() { + return (Wz = b._emscripten_bind_LocalConvexResult_LocalConvexResult_5 = b.asm.zx).apply(null, arguments) + } + , Xz = b._emscripten_bind_LocalConvexResult_get_m_hitCollisionObject_0 = function() { + return (Xz = b._emscripten_bind_LocalConvexResult_get_m_hitCollisionObject_0 = b.asm.Ax).apply(null, arguments) + } + , Yz = b._emscripten_bind_LocalConvexResult_set_m_hitCollisionObject_1 = function() { + return (Yz = b._emscripten_bind_LocalConvexResult_set_m_hitCollisionObject_1 = b.asm.Bx).apply(null, arguments) + } + , Zz = b._emscripten_bind_LocalConvexResult_get_m_localShapeInfo_0 = function() { + return (Zz = b._emscripten_bind_LocalConvexResult_get_m_localShapeInfo_0 = b.asm.Cx).apply(null, arguments) + } + , $z = b._emscripten_bind_LocalConvexResult_set_m_localShapeInfo_1 = function() { + return ($z = b._emscripten_bind_LocalConvexResult_set_m_localShapeInfo_1 = b.asm.Dx).apply(null, arguments) + } + , aA = b._emscripten_bind_LocalConvexResult_get_m_hitNormalLocal_0 = function() { + return (aA = b._emscripten_bind_LocalConvexResult_get_m_hitNormalLocal_0 = b.asm.Ex).apply(null, arguments) + } + , bA = b._emscripten_bind_LocalConvexResult_set_m_hitNormalLocal_1 = function() { + return (bA = b._emscripten_bind_LocalConvexResult_set_m_hitNormalLocal_1 = b.asm.Fx).apply(null, arguments) + } + , cA = b._emscripten_bind_LocalConvexResult_get_m_hitPointLocal_0 = function() { + return (cA = b._emscripten_bind_LocalConvexResult_get_m_hitPointLocal_0 = b.asm.Gx).apply(null, arguments) + } + , dA = b._emscripten_bind_LocalConvexResult_set_m_hitPointLocal_1 = function() { + return (dA = b._emscripten_bind_LocalConvexResult_set_m_hitPointLocal_1 = b.asm.Hx).apply(null, arguments) + } + , eA = b._emscripten_bind_LocalConvexResult_get_m_hitFraction_0 = function() { + return (eA = b._emscripten_bind_LocalConvexResult_get_m_hitFraction_0 = b.asm.Ix).apply(null, arguments) + } + , fA = b._emscripten_bind_LocalConvexResult_set_m_hitFraction_1 = function() { + return (fA = b._emscripten_bind_LocalConvexResult_set_m_hitFraction_1 = b.asm.Jx).apply(null, arguments) + } + , gA = b._emscripten_bind_LocalConvexResult___destroy___0 = function() { + return (gA = b._emscripten_bind_LocalConvexResult___destroy___0 = b.asm.Kx).apply(null, arguments) + } + , hA = b._emscripten_enum_btConstraintParams_BT_CONSTRAINT_ERP = function() { + return (hA = b._emscripten_enum_btConstraintParams_BT_CONSTRAINT_ERP = b.asm.Lx).apply(null, arguments) + } + , iA = b._emscripten_enum_btConstraintParams_BT_CONSTRAINT_STOP_ERP = function() { + return (iA = b._emscripten_enum_btConstraintParams_BT_CONSTRAINT_STOP_ERP = b.asm.Mx).apply(null, arguments) + } + , jA = b._emscripten_enum_btConstraintParams_BT_CONSTRAINT_CFM = function() { + return (jA = b._emscripten_enum_btConstraintParams_BT_CONSTRAINT_CFM = b.asm.Nx).apply(null, arguments) + } + , kA = b._emscripten_enum_btConstraintParams_BT_CONSTRAINT_STOP_CFM = function() { + return (kA = b._emscripten_enum_btConstraintParams_BT_CONSTRAINT_STOP_CFM = b.asm.Ox).apply(null, arguments) + } + , lA = b._emscripten_enum_PHY_ScalarType_PHY_FLOAT = function() { + return (lA = b._emscripten_enum_PHY_ScalarType_PHY_FLOAT = b.asm.Px).apply(null, arguments) + } + , mA = b._emscripten_enum_PHY_ScalarType_PHY_DOUBLE = function() { + return (mA = b._emscripten_enum_PHY_ScalarType_PHY_DOUBLE = b.asm.Qx).apply(null, arguments) + } + , nA = b._emscripten_enum_PHY_ScalarType_PHY_INTEGER = function() { + return (nA = b._emscripten_enum_PHY_ScalarType_PHY_INTEGER = b.asm.Rx).apply(null, arguments) + } + , oA = b._emscripten_enum_PHY_ScalarType_PHY_SHORT = function() { + return (oA = b._emscripten_enum_PHY_ScalarType_PHY_SHORT = b.asm.Sx).apply(null, arguments) + } + , pA = b._emscripten_enum_PHY_ScalarType_PHY_FIXEDPOINT88 = function() { + return (pA = b._emscripten_enum_PHY_ScalarType_PHY_FIXEDPOINT88 = b.asm.Tx).apply(null, arguments) + } + , qA = b._emscripten_enum_PHY_ScalarType_PHY_UCHAR = function() { + return (qA = b._emscripten_enum_PHY_ScalarType_PHY_UCHAR = b.asm.Ux).apply(null, arguments) + } + ; + b._malloc = function() { + return (b._malloc = b.asm.Vx).apply(null, arguments) + } + ; + b._free = function() { + return (b._free = b.asm.Wx).apply(null, arguments) + } + ; + b.dynCall_vi = function() { + return (b.dynCall_vi = b.asm.Xx).apply(null, arguments) + } + ; + b.dynCall_v = function() { + return (b.dynCall_v = b.asm.Yx).apply(null, arguments) + } + ; + b.asm = ab; + b.UTF8ToString = function(a, c) { + return a ? xa(Aa, a, c) : "" + } + ; + b.addFunction = function(a, c) { + if (!ra) { + ra = new WeakMap; + for (var d = 0; d < ua.length; d++) { + var e = ua.get(d); + e && ra.set(e, d) + } + } + if (ra.has(a)) + a = ra.get(a); + else { + if (qa.length) + d = qa.pop(); + else { + d = ua.length; + try { + ua.grow(1) + } catch (P) { + if (!(P instanceof RangeError)) + throw P; + throw "Unable to grow wasm table. Set ALLOW_TABLE_GROWTH."; + } + } + try { + ua.set(d, a) + } catch (P) { + if (!(P instanceof TypeError)) + throw P; + assert("undefined" !== typeof c, "Missing signature argument to addFunction"); + if ("function" === typeof WebAssembly.Function) { + var f = { + i: "i32", + j: "i64", + f: "f32", + d: "f64" + } + , m = { + parameters: [], + results: "v" == c[0] ? [] : [f[c[0]]] + }; + for (e = 1; e < c.length; ++e) + m.parameters.push(f[c[e]]); + c = new WebAssembly.Function(m,a) + } else { + f = [1, 0, 1, 96]; + m = c.slice(0, 1); + c = c.slice(1); + var C = { + i: 127, + j: 126, + f: 125, + d: 124 + }; + f.push(c.length); + for (e = 0; e < c.length; ++e) + f.push(C[c[e]]); + "v" == m ? f.push(0) : f = f.concat([1, C[m]]); + f[1] = f.length - 2; + c = new Uint8Array([0, 97, 115, 109, 1, 0, 0, 0].concat(f, [2, 7, 1, 1, 101, 1, 102, 0, 0, 7, 5, 1, 1, 102, 0, 0])); + c = new WebAssembly.Module(c); + c = (new WebAssembly.Instance(c,{ + e: { + f: a + } + })).exports.f + } + ua.set(d, c) + } + a = ra[a] = d + } + return a + } + ; + var rA; + b.then = function(a) { + if (rA) + a(b); + else { + var c = b.onRuntimeInitialized; + b.onRuntimeInitialized = function() { + c && c(); + a(b) + } + } + return b + } + ; + Pa = function sA() { + rA || tA(); + rA || (Pa = sA) + } + ; + function tA() { + function a() { + if (!rA && (rA = !0, + b.calledRun = !0, + !va)) { + La = !0; + Ga(Ia); + Ga(Ja); + if (b.onRuntimeInitialized) + b.onRuntimeInitialized(); + if (b.postRun) + for ("function" == typeof b.postRun && (b.postRun = [b.postRun]); b.postRun.length; ) { + var c = b.postRun.shift(); + Ka.unshift(c) + } + Ga(Ka) + } + } + if (!(0 < Na)) { + if (b.preRun) + for ("function" == typeof b.preRun && (b.preRun = [b.preRun]); b.preRun.length; ) + Ma(); + Ga(Ha); + 0 < Na || (b.setStatus ? (b.setStatus("Running..."), + setTimeout(function() { + setTimeout(function() { + b.setStatus("") + }, 1); + a() + }, 1)) : a()) + } + } + b.run = tA; + if (b.preInit) + for ("function" == typeof b.preInit && (b.preInit = [b.preInit]); 0 < b.preInit.length; ) + b.preInit.pop()(); + noExitRuntime = !0; + tA(); + function g() {} + g.prototype = Object.create(g.prototype); + g.prototype.constructor = g; + g.prototype.$x = g; + g.ay = {}; + b.WrapperObject = g; + function h(a) { + return (a || g).ay + } + b.getCache = h; + function k(a, c) { + var d = h(c) + , e = d[a]; + if (e) + return e; + e = Object.create((c || g).prototype); + e.Zx = a; + return d[a] = e + } + b.wrapPointer = k; + b.castObject = function(a, c) { + return k(a.Zx, c) + } + ; + b.NULL = k(0); + b.destroy = function(a) { + if (!a.__destroy__) + throw "Error: Cannot destroy object. (Did you create it yourself?)"; + a.__destroy__(); + delete h(a.$x)[a.Zx] + } + ; + b.compare = function(a, c) { + return a.Zx === c.Zx + } + ; + b.getPointer = function(a) { + return a.Zx + } + ; + b.getClass = function(a) { + return a.$x + } + ; + var uA = 0 + , vA = 0 + , wA = 0 + , xA = [] + , yA = 0; + function zA() { + if (yA) { + for (var a = 0; a < xA.length; a++) + b._free(xA[a]); + xA.length = 0; + b._free(uA); + uA = 0; + vA += yA; + yA = 0 + } + uA || (vA += 128, + uA = b._malloc(vA), + assert(uA)); + wA = 0 + } + function AA(a, c) { + assert(uA); + a = a.length * c.BYTES_PER_ELEMENT; + a = a + 7 & -8; + wA + a >= vA ? (assert(0 < a), + yA += a, + c = b._malloc(a), + xA.push(c)) : (c = uA + wA, + wA += a); + return c + } + function BA(a, c, d) { + d >>>= 0; + switch (c.BYTES_PER_ELEMENT) { + case 2: + d >>>= 1; + break; + case 4: + d >>>= 2; + break; + case 8: + d >>>= 3 + } + for (var e = 0; e < a.length; e++) + c[d + e] = a[e] + } + function CA(a) { + if ("string" === typeof a) { + for (var c = 0, d = 0; d < a.length; ++d) { + var e = a.charCodeAt(d); + 55296 <= e && 57343 >= e && (e = 65536 + ((e & 1023) << 10) | a.charCodeAt(++d) & 1023); + 127 >= e ? ++c : c = 2047 >= e ? c + 2 : 65535 >= e ? c + 3 : c + 4 + } + c = Array(c + 1); + e = c.length; + d = 0; + if (0 < e) { + e = d + e - 1; + for (var f = 0; f < a.length; ++f) { + var m = a.charCodeAt(f); + if (55296 <= m && 57343 >= m) { + var C = a.charCodeAt(++f); + m = 65536 + ((m & 1023) << 10) | C & 1023 + } + if (127 >= m) { + if (d >= e) + break; + c[d++] = m + } else { + if (2047 >= m) { + if (d + 1 >= e) + break; + c[d++] = 192 | m >> 6 + } else { + if (65535 >= m) { + if (d + 2 >= e) + break; + c[d++] = 224 | m >> 12 + } else { + if (d + 3 >= e) + break; + c[d++] = 240 | m >> 18; + c[d++] = 128 | m >> 12 & 63 + } + c[d++] = 128 | m >> 6 & 63 + } + c[d++] = 128 | m & 63 + } + } + c[d] = 0 + } + a = AA(c, za); + BA(c, za, a) + } + return a + } + function DA(a) { + if ("object" === typeof a) { + var c = AA(a, Ca); + BA(a, Ca, c); + return c + } + return a + } + function EA() { + throw "cannot construct a btCollisionWorld, no constructor in IDL"; + } + EA.prototype = Object.create(g.prototype); + EA.prototype.constructor = EA; + EA.prototype.$x = EA; + EA.ay = {}; + b.btCollisionWorld = EA; + EA.prototype.getDispatcher = function() { + return k(bb(this.Zx), FA) + } + ; + EA.prototype.rayTest = function(a, c, d) { + var e = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + cb(e, a, c, d) + } + ; + EA.prototype.getPairCache = function() { + return k(db(this.Zx), GA) + } + ; + EA.prototype.getDispatchInfo = function() { + return k(eb(this.Zx), l) + } + ; + EA.prototype.addCollisionObject = function(a, c, d) { + var e = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + void 0 === c ? fb(e, a) : void 0 === d ? gb(e, a, c) : hb(e, a, c, d) + } + ; + EA.prototype.removeCollisionObject = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + ib(c, a) + } + ; + EA.prototype.getBroadphase = function() { + return k(jb(this.Zx), HA) + } + ; + EA.prototype.convexSweepTest = function(a, c, d, e, f) { + var m = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + e && "object" === typeof e && (e = e.Zx); + f && "object" === typeof f && (f = f.Zx); + kb(m, a, c, d, e, f) + } + ; + EA.prototype.contactPairTest = function(a, c, d) { + var e = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + lb(e, a, c, d) + } + ; + EA.prototype.contactTest = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + mb(d, a, c) + } + ; + EA.prototype.updateSingleAabb = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + ob(c, a) + } + ; + EA.prototype.setDebugDrawer = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + pb(c, a) + } + ; + EA.prototype.getDebugDrawer = function() { + return k(qb(this.Zx), IA) + } + ; + EA.prototype.debugDrawWorld = function() { + rb(this.Zx) + } + ; + EA.prototype.debugDrawObject = function(a, c, d) { + var e = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + sb(e, a, c, d) + } + ; + EA.prototype.__destroy__ = function() { + tb(this.Zx) + } + ; + function n() { + throw "cannot construct a btCollisionShape, no constructor in IDL"; + } + n.prototype = Object.create(g.prototype); + n.prototype.constructor = n; + n.prototype.$x = n; + n.ay = {}; + b.btCollisionShape = n; + n.prototype.setLocalScaling = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + ub(c, a) + } + ; + n.prototype.getLocalScaling = function() { + return k(vb(this.Zx), p) + } + ; + n.prototype.calculateLocalInertia = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + wb(d, a, c) + } + ; + n.prototype.setMargin = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + xb(c, a) + } + ; + n.prototype.getMargin = function() { + return yb(this.Zx) + } + ; + n.prototype.__destroy__ = function() { + zb(this.Zx) + } + ; + function q() { + throw "cannot construct a btCollisionObject, no constructor in IDL"; + } + q.prototype = Object.create(g.prototype); + q.prototype.constructor = q; + q.prototype.$x = q; + q.ay = {}; + b.btCollisionObject = q; + q.prototype.setAnisotropicFriction = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + Ab(d, a, c) + } + ; + q.prototype.getCollisionShape = function() { + return k(Bb(this.Zx), n) + } + ; + q.prototype.setContactProcessingThreshold = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Cb(c, a) + } + ; + q.prototype.setActivationState = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Db(c, a) + } + ; + q.prototype.forceActivationState = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Eb(c, a) + } + ; + q.prototype.activate = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + void 0 === a ? Fb(c) : Gb(c, a) + } + ; + q.prototype.isActive = function() { + return !!Hb(this.Zx) + } + ; + q.prototype.isKinematicObject = function() { + return !!Ib(this.Zx) + } + ; + q.prototype.isStaticObject = function() { + return !!Jb(this.Zx) + } + ; + q.prototype.isStaticOrKinematicObject = function() { + return !!Kb(this.Zx) + } + ; + q.prototype.getRestitution = function() { + return Lb(this.Zx) + } + ; + q.prototype.getFriction = function() { + return Mb(this.Zx) + } + ; + q.prototype.getRollingFriction = function() { + return Nb(this.Zx) + } + ; + q.prototype.setRestitution = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Ob(c, a) + } + ; + q.prototype.setFriction = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Pb(c, a) + } + ; + q.prototype.setRollingFriction = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Qb(c, a) + } + ; + q.prototype.getWorldTransform = function() { + return k(Rb(this.Zx), r) + } + ; + q.prototype.getCollisionFlags = function() { + return Sb(this.Zx) + } + ; + q.prototype.setCollisionFlags = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Tb(c, a) + } + ; + q.prototype.setWorldTransform = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Ub(c, a) + } + ; + q.prototype.setCollisionShape = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Vb(c, a) + } + ; + q.prototype.setCcdMotionThreshold = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Xb(c, a) + } + ; + q.prototype.setCcdSweptSphereRadius = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Yb(c, a) + } + ; + q.prototype.getUserIndex = function() { + return Zb(this.Zx) + } + ; + q.prototype.setUserIndex = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + $b(c, a) + } + ; + q.prototype.getUserPointer = function() { + return k(ac(this.Zx), JA) + } + ; + q.prototype.setUserPointer = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + bc(c, a) + } + ; + q.prototype.getBroadphaseHandle = function() { + return k(cc(this.Zx), t) + } + ; + q.prototype.__destroy__ = function() { + dc(this.Zx) + } + ; + function u() { + throw "cannot construct a btDynamicsWorld, no constructor in IDL"; + } + u.prototype = Object.create(EA.prototype); + u.prototype.constructor = u; + u.prototype.$x = u; + u.ay = {}; + b.btDynamicsWorld = u; + u.prototype.addAction = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + ec(c, a) + } + ; + u.prototype.removeAction = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + fc(c, a) + } + ; + u.prototype.getSolverInfo = function() { + return k(hc(this.Zx), v) + } + ; + u.prototype.setInternalTickCallback = function(a, c, d) { + var e = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + void 0 === c ? ic(e, a) : void 0 === d ? jc(e, a, c) : kc(e, a, c, d) + } + ; + u.prototype.getDispatcher = function() { + return k(lc(this.Zx), FA) + } + ; + u.prototype.rayTest = function(a, c, d) { + var e = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + mc(e, a, c, d) + } + ; + u.prototype.getPairCache = function() { + return k(nc(this.Zx), GA) + } + ; + u.prototype.getDispatchInfo = function() { + return k(oc(this.Zx), l) + } + ; + u.prototype.addCollisionObject = function(a, c, d) { + var e = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + void 0 === c ? pc(e, a) : void 0 === d ? qc(e, a, c) : rc(e, a, c, d) + } + ; + u.prototype.removeCollisionObject = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + sc(c, a) + } + ; + u.prototype.getBroadphase = function() { + return k(tc(this.Zx), HA) + } + ; + u.prototype.convexSweepTest = function(a, c, d, e, f) { + var m = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + e && "object" === typeof e && (e = e.Zx); + f && "object" === typeof f && (f = f.Zx); + uc(m, a, c, d, e, f) + } + ; + u.prototype.contactPairTest = function(a, c, d) { + var e = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + vc(e, a, c, d) + } + ; + u.prototype.contactTest = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + wc(d, a, c) + } + ; + u.prototype.updateSingleAabb = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + xc(c, a) + } + ; + u.prototype.setDebugDrawer = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + yc(c, a) + } + ; + u.prototype.getDebugDrawer = function() { + return k(zc(this.Zx), IA) + } + ; + u.prototype.debugDrawWorld = function() { + Ac(this.Zx) + } + ; + u.prototype.debugDrawObject = function(a, c, d) { + var e = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + Bc(e, a, c, d) + } + ; + u.prototype.__destroy__ = function() { + Cc(this.Zx) + } + ; + function KA() { + throw "cannot construct a btTypedConstraint, no constructor in IDL"; + } + KA.prototype = Object.create(g.prototype); + KA.prototype.constructor = KA; + KA.prototype.$x = KA; + KA.ay = {}; + b.btTypedConstraint = KA; + KA.prototype.enableFeedback = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Dc(c, a) + } + ; + KA.prototype.getBreakingImpulseThreshold = function() { + return Ec(this.Zx) + } + ; + KA.prototype.setBreakingImpulseThreshold = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Fc(c, a) + } + ; + KA.prototype.getParam = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + return Gc(d, a, c) + } + ; + KA.prototype.setParam = function(a, c, d) { + var e = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + Hc(e, a, c, d) + } + ; + KA.prototype.__destroy__ = function() { + Ic(this.Zx) + } + ; + function LA() { + throw "cannot construct a btConcaveShape, no constructor in IDL"; + } + LA.prototype = Object.create(n.prototype); + LA.prototype.constructor = LA; + LA.prototype.$x = LA; + LA.ay = {}; + b.btConcaveShape = LA; + LA.prototype.setLocalScaling = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Jc(c, a) + } + ; + LA.prototype.getLocalScaling = function() { + return k(Kc(this.Zx), p) + } + ; + LA.prototype.calculateLocalInertia = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + Lc(d, a, c) + } + ; + LA.prototype.__destroy__ = function() { + Mc(this.Zx) + } + ; + function MA(a, c) { + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + this.Zx = Nc(a, c); + h(MA)[this.Zx] = this + } + MA.prototype = Object.create(n.prototype); + MA.prototype.constructor = MA; + MA.prototype.$x = MA; + MA.ay = {}; + b.btCapsuleShape = MA; + MA.prototype.setMargin = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Oc(c, a) + } + ; + MA.prototype.getMargin = function() { + return Pc(this.Zx) + } + ; + MA.prototype.getUpAxis = function() { + return Qc(this.Zx) + } + ; + MA.prototype.getRadius = function() { + return Rc(this.Zx) + } + ; + MA.prototype.getHalfHeight = function() { + return Sc(this.Zx) + } + ; + MA.prototype.setLocalScaling = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Tc(c, a) + } + ; + MA.prototype.getLocalScaling = function() { + return k(Uc(this.Zx), p) + } + ; + MA.prototype.calculateLocalInertia = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + Vc(d, a, c) + } + ; + MA.prototype.__destroy__ = function() { + Wc(this.Zx) + } + ; + function IA() { + throw "cannot construct a btIDebugDraw, no constructor in IDL"; + } + IA.prototype = Object.create(g.prototype); + IA.prototype.constructor = IA; + IA.prototype.$x = IA; + IA.ay = {}; + b.btIDebugDraw = IA; + IA.prototype.drawLine = function(a, c, d) { + var e = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + Xc(e, a, c, d) + } + ; + IA.prototype.drawContactPoint = function(a, c, d, e, f) { + var m = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + e && "object" === typeof e && (e = e.Zx); + f && "object" === typeof f && (f = f.Zx); + Yc(m, a, c, d, e, f) + } + ; + IA.prototype.reportErrorWarning = function(a) { + var c = this.Zx; + zA(); + a = a && "object" === typeof a ? a.Zx : CA(a); + Zc(c, a) + } + ; + IA.prototype.draw3dText = function(a, c) { + var d = this.Zx; + zA(); + a && "object" === typeof a && (a = a.Zx); + c = c && "object" === typeof c ? c.Zx : CA(c); + $c(d, a, c) + } + ; + IA.prototype.setDebugMode = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + ad(c, a) + } + ; + IA.prototype.getDebugMode = function() { + return bd(this.Zx) + } + ; + IA.prototype.__destroy__ = function() { + cd(this.Zx) + } + ; + function NA(a) { + a && "object" === typeof a && (a = a.Zx); + this.Zx = void 0 === a ? dd() : ed(a); + h(NA)[this.Zx] = this + } + NA.prototype = Object.create(g.prototype); + NA.prototype.constructor = NA; + NA.prototype.$x = NA; + NA.ay = {}; + b.btDefaultCollisionConfiguration = NA; + NA.prototype.__destroy__ = function() { + fd(this.Zx) + } + ; + function OA() { + throw "cannot construct a btTriangleMeshShape, no constructor in IDL"; + } + OA.prototype = Object.create(LA.prototype); + OA.prototype.constructor = OA; + OA.prototype.$x = OA; + OA.ay = {}; + b.btTriangleMeshShape = OA; + OA.prototype.setLocalScaling = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + gd(c, a) + } + ; + OA.prototype.getLocalScaling = function() { + return k(hd(this.Zx), p) + } + ; + OA.prototype.calculateLocalInertia = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + id(d, a, c) + } + ; + OA.prototype.__destroy__ = function() { + jd(this.Zx) + } + ; + function w() { + this.Zx = kd(); + h(w)[this.Zx] = this + } + w.prototype = Object.create(q.prototype); + w.prototype.constructor = w; + w.prototype.$x = w; + w.ay = {}; + b.btGhostObject = w; + w.prototype.getNumOverlappingObjects = function() { + return ld(this.Zx) + } + ; + w.prototype.getOverlappingObject = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + return k(md(c, a), q) + } + ; + w.prototype.setAnisotropicFriction = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + nd(d, a, c) + } + ; + w.prototype.getCollisionShape = function() { + return k(od(this.Zx), n) + } + ; + w.prototype.setContactProcessingThreshold = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + pd(c, a) + } + ; + w.prototype.setActivationState = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + qd(c, a) + } + ; + w.prototype.forceActivationState = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + rd(c, a) + } + ; + w.prototype.activate = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + void 0 === a ? sd(c) : td(c, a) + } + ; + w.prototype.isActive = function() { + return !!ud(this.Zx) + } + ; + w.prototype.isKinematicObject = function() { + return !!vd(this.Zx) + } + ; + w.prototype.isStaticObject = function() { + return !!wd(this.Zx) + } + ; + w.prototype.isStaticOrKinematicObject = function() { + return !!xd(this.Zx) + } + ; + w.prototype.getRestitution = function() { + return yd(this.Zx) + } + ; + w.prototype.getFriction = function() { + return zd(this.Zx) + } + ; + w.prototype.getRollingFriction = function() { + return Ad(this.Zx) + } + ; + w.prototype.setRestitution = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Bd(c, a) + } + ; + w.prototype.setFriction = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Cd(c, a) + } + ; + w.prototype.setRollingFriction = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Dd(c, a) + } + ; + w.prototype.getWorldTransform = function() { + return k(Ed(this.Zx), r) + } + ; + w.prototype.getCollisionFlags = function() { + return Fd(this.Zx) + } + ; + w.prototype.setCollisionFlags = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Gd(c, a) + } + ; + w.prototype.setWorldTransform = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Hd(c, a) + } + ; + w.prototype.setCollisionShape = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Id(c, a) + } + ; + w.prototype.setCcdMotionThreshold = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Jd(c, a) + } + ; + w.prototype.setCcdSweptSphereRadius = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Kd(c, a) + } + ; + w.prototype.getUserIndex = function() { + return Ld(this.Zx) + } + ; + w.prototype.setUserIndex = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Md(c, a) + } + ; + w.prototype.getUserPointer = function() { + return k(Nd(this.Zx), JA) + } + ; + w.prototype.setUserPointer = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Od(c, a) + } + ; + w.prototype.getBroadphaseHandle = function() { + return k(Pd(this.Zx), t) + } + ; + w.prototype.__destroy__ = function() { + Qd(this.Zx) + } + ; + function PA(a, c) { + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + this.Zx = Rd(a, c); + h(PA)[this.Zx] = this + } + PA.prototype = Object.create(n.prototype); + PA.prototype.constructor = PA; + PA.prototype.$x = PA; + PA.ay = {}; + b.btConeShape = PA; + PA.prototype.setLocalScaling = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Sd(c, a) + } + ; + PA.prototype.getLocalScaling = function() { + return k(Td(this.Zx), p) + } + ; + PA.prototype.calculateLocalInertia = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + Ud(d, a, c) + } + ; + PA.prototype.__destroy__ = function() { + Vd(this.Zx) + } + ; + function QA() { + throw "cannot construct a btActionInterface, no constructor in IDL"; + } + QA.prototype = Object.create(g.prototype); + QA.prototype.constructor = QA; + QA.prototype.$x = QA; + QA.ay = {}; + b.btActionInterface = QA; + QA.prototype.updateAction = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + Wd(d, a, c) + } + ; + QA.prototype.__destroy__ = function() { + Xd(this.Zx) + } + ; + function p(a, c, d) { + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + this.Zx = void 0 === a ? Yd() : void 0 === c ? _emscripten_bind_btVector3_btVector3_1(a) : void 0 === d ? _emscripten_bind_btVector3_btVector3_2(a, c) : Zd(a, c, d); + h(p)[this.Zx] = this + } + p.prototype = Object.create(g.prototype); + p.prototype.constructor = p; + p.prototype.$x = p; + p.ay = {}; + b.btVector3 = p; + p.prototype.length = p.prototype.length = function() { + return $d(this.Zx) + } + ; + p.prototype.x = p.prototype.x = function() { + return ae(this.Zx) + } + ; + p.prototype.y = p.prototype.y = function() { + return be(this.Zx) + } + ; + p.prototype.z = p.prototype.z = function() { + return ce(this.Zx) + } + ; + p.prototype.setX = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + de(c, a) + } + ; + p.prototype.setY = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + ee(c, a) + } + ; + p.prototype.setZ = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + fe(c, a) + } + ; + p.prototype.setValue = function(a, c, d) { + var e = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + ge(e, a, c, d) + } + ; + p.prototype.normalize = p.prototype.normalize = function() { + he(this.Zx) + } + ; + p.prototype.rotate = p.prototype.rotate = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + return k(ie(d, a, c), p) + } + ; + p.prototype.dot = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + return je(c, a) + } + ; + p.prototype.op_mul = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + return k(ke(c, a), p) + } + ; + p.prototype.op_add = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + return k(le(c, a), p) + } + ; + p.prototype.op_sub = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + return k(me(c, a), p) + } + ; + p.prototype.__destroy__ = function() { + ne(this.Zx) + } + ; + function RA() { + throw "cannot construct a btVehicleRaycaster, no constructor in IDL"; + } + RA.prototype = Object.create(g.prototype); + RA.prototype.constructor = RA; + RA.prototype.$x = RA; + RA.ay = {}; + b.btVehicleRaycaster = RA; + RA.prototype.castRay = function(a, c, d) { + var e = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + oe(e, a, c, d) + } + ; + RA.prototype.__destroy__ = function() { + pe(this.Zx) + } + ; + function SA() { + throw "cannot construct a btQuadWord, no constructor in IDL"; + } + SA.prototype = Object.create(g.prototype); + SA.prototype.constructor = SA; + SA.prototype.$x = SA; + SA.ay = {}; + b.btQuadWord = SA; + SA.prototype.x = SA.prototype.x = function() { + return qe(this.Zx) + } + ; + SA.prototype.y = SA.prototype.y = function() { + return re(this.Zx) + } + ; + SA.prototype.z = SA.prototype.z = function() { + return se(this.Zx) + } + ; + SA.prototype.w = function() { + return te(this.Zx) + } + ; + SA.prototype.setX = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + ue(c, a) + } + ; + SA.prototype.setY = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + ve(c, a) + } + ; + SA.prototype.setZ = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + we(c, a) + } + ; + SA.prototype.setW = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + xe(c, a) + } + ; + SA.prototype.__destroy__ = function() { + ye(this.Zx) + } + ; + function TA(a) { + a && "object" === typeof a && (a = a.Zx); + this.Zx = ze(a); + h(TA)[this.Zx] = this + } + TA.prototype = Object.create(n.prototype); + TA.prototype.constructor = TA; + TA.prototype.$x = TA; + TA.ay = {}; + b.btCylinderShape = TA; + TA.prototype.setMargin = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Ae(c, a) + } + ; + TA.prototype.getMargin = function() { + return Be(this.Zx) + } + ; + TA.prototype.setLocalScaling = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Ce(c, a) + } + ; + TA.prototype.getLocalScaling = function() { + return k(De(this.Zx), p) + } + ; + TA.prototype.calculateLocalInertia = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + Ee(d, a, c) + } + ; + TA.prototype.__destroy__ = function() { + Fe(this.Zx) + } + ; + function x(a, c, d, e) { + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + e && "object" === typeof e && (e = e.Zx); + this.Zx = Ge(a, c, d, e); + h(x)[this.Zx] = this + } + x.prototype = Object.create(u.prototype); + x.prototype.constructor = x; + x.prototype.$x = x; + x.ay = {}; + b.btDiscreteDynamicsWorld = x; + x.prototype.setGravity = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + He(c, a) + } + ; + x.prototype.getGravity = function() { + return k(Ie(this.Zx), p) + } + ; + x.prototype.addRigidBody = function(a, c, d) { + var e = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + void 0 === c ? Je(e, a) : void 0 === d ? _emscripten_bind_btDiscreteDynamicsWorld_addRigidBody_2(e, a, c) : Ke(e, a, c, d) + } + ; + x.prototype.removeRigidBody = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Le(c, a) + } + ; + x.prototype.addConstraint = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + void 0 === c ? Me(d, a) : Ne(d, a, c) + } + ; + x.prototype.removeConstraint = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Oe(c, a) + } + ; + x.prototype.stepSimulation = function(a, c, d) { + var e = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + return void 0 === c ? Pe(e, a) : void 0 === d ? Qe(e, a, c) : Re(e, a, c, d) + } + ; + x.prototype.setContactAddedCallback = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Se(c, a) + } + ; + x.prototype.setContactProcessedCallback = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Te(c, a) + } + ; + x.prototype.setContactDestroyedCallback = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Ue(c, a) + } + ; + x.prototype.getDispatcher = function() { + return k(Ve(this.Zx), FA) + } + ; + x.prototype.rayTest = function(a, c, d) { + var e = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + We(e, a, c, d) + } + ; + x.prototype.getPairCache = function() { + return k(Xe(this.Zx), GA) + } + ; + x.prototype.getDispatchInfo = function() { + return k(Ye(this.Zx), l) + } + ; + x.prototype.addCollisionObject = function(a, c, d) { + var e = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + void 0 === c ? Ze(e, a) : void 0 === d ? $e(e, a, c) : af(e, a, c, d) + } + ; + x.prototype.removeCollisionObject = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + bf(c, a) + } + ; + x.prototype.getBroadphase = function() { + return k(cf(this.Zx), HA) + } + ; + x.prototype.convexSweepTest = function(a, c, d, e, f) { + var m = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + e && "object" === typeof e && (e = e.Zx); + f && "object" === typeof f && (f = f.Zx); + df(m, a, c, d, e, f) + } + ; + x.prototype.contactPairTest = function(a, c, d) { + var e = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + ef(e, a, c, d) + } + ; + x.prototype.contactTest = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + ff(d, a, c) + } + ; + x.prototype.updateSingleAabb = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + gf(c, a) + } + ; + x.prototype.setDebugDrawer = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + hf(c, a) + } + ; + x.prototype.getDebugDrawer = function() { + return k(jf(this.Zx), IA) + } + ; + x.prototype.debugDrawWorld = function() { + kf(this.Zx) + } + ; + x.prototype.debugDrawObject = function(a, c, d) { + var e = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + lf(e, a, c, d) + } + ; + x.prototype.addAction = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + mf(c, a) + } + ; + x.prototype.removeAction = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + nf(c, a) + } + ; + x.prototype.getSolverInfo = function() { + return k(of(this.Zx), v) + } + ; + x.prototype.setInternalTickCallback = function(a, c, d) { + var e = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + void 0 === c ? pf(e, a) : void 0 === d ? qf(e, a, c) : rf(e, a, c, d) + } + ; + x.prototype.__destroy__ = function() { + sf(this.Zx) + } + ; + function UA() { + throw "cannot construct a btConvexShape, no constructor in IDL"; + } + UA.prototype = Object.create(n.prototype); + UA.prototype.constructor = UA; + UA.prototype.$x = UA; + UA.ay = {}; + b.btConvexShape = UA; + UA.prototype.setLocalScaling = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + tf(c, a) + } + ; + UA.prototype.getLocalScaling = function() { + return k(uf(this.Zx), p) + } + ; + UA.prototype.calculateLocalInertia = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + vf(d, a, c) + } + ; + UA.prototype.setMargin = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + wf(c, a) + } + ; + UA.prototype.getMargin = function() { + return xf(this.Zx) + } + ; + UA.prototype.__destroy__ = function() { + yf(this.Zx) + } + ; + function FA() { + throw "cannot construct a btDispatcher, no constructor in IDL"; + } + FA.prototype = Object.create(g.prototype); + FA.prototype.constructor = FA; + FA.prototype.$x = FA; + FA.ay = {}; + b.btDispatcher = FA; + FA.prototype.getNumManifolds = function() { + return zf(this.Zx) + } + ; + FA.prototype.getManifoldByIndexInternal = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + return k(Af(c, a), VA) + } + ; + FA.prototype.__destroy__ = function() { + Bf(this.Zx) + } + ; + function WA(a, c, d, e, f) { + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + e && "object" === typeof e && (e = e.Zx); + f && "object" === typeof f && (f = f.Zx); + this.Zx = void 0 === e ? Cf(a, c, d) : void 0 === f ? _emscripten_bind_btGeneric6DofConstraint_btGeneric6DofConstraint_4(a, c, d, e) : Df(a, c, d, e, f); + h(WA)[this.Zx] = this + } + WA.prototype = Object.create(KA.prototype); + WA.prototype.constructor = WA; + WA.prototype.$x = WA; + WA.ay = {}; + b.btGeneric6DofConstraint = WA; + WA.prototype.setLinearLowerLimit = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Ef(c, a) + } + ; + WA.prototype.setLinearUpperLimit = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Ff(c, a) + } + ; + WA.prototype.setAngularLowerLimit = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Gf(c, a) + } + ; + WA.prototype.setAngularUpperLimit = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Hf(c, a) + } + ; + WA.prototype.getFrameOffsetA = function() { + return k(If(this.Zx), r) + } + ; + WA.prototype.enableFeedback = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Jf(c, a) + } + ; + WA.prototype.getBreakingImpulseThreshold = function() { + return Kf(this.Zx) + } + ; + WA.prototype.setBreakingImpulseThreshold = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Lf(c, a) + } + ; + WA.prototype.getParam = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + return Mf(d, a, c) + } + ; + WA.prototype.setParam = function(a, c, d) { + var e = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + Nf(e, a, c, d) + } + ; + WA.prototype.__destroy__ = function() { + Of(this.Zx) + } + ; + function XA() { + throw "cannot construct a btStridingMeshInterface, no constructor in IDL"; + } + XA.prototype = Object.create(g.prototype); + XA.prototype.constructor = XA; + XA.prototype.$x = XA; + XA.ay = {}; + b.btStridingMeshInterface = XA; + XA.prototype.setScaling = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Pf(c, a) + } + ; + XA.prototype.__destroy__ = function() { + Qf(this.Zx) + } + ; + function YA() { + throw "cannot construct a btMotionState, no constructor in IDL"; + } + YA.prototype = Object.create(g.prototype); + YA.prototype.constructor = YA; + YA.prototype.$x = YA; + YA.ay = {}; + b.btMotionState = YA; + YA.prototype.getWorldTransform = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Rf(c, a) + } + ; + YA.prototype.setWorldTransform = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Sf(c, a) + } + ; + YA.prototype.__destroy__ = function() { + Tf(this.Zx) + } + ; + function y() { + throw "cannot construct a ConvexResultCallback, no constructor in IDL"; + } + y.prototype = Object.create(g.prototype); + y.prototype.constructor = y; + y.prototype.$x = y; + y.ay = {}; + b.ConvexResultCallback = y; + y.prototype.hasHit = function() { + return !!Uf(this.Zx) + } + ; + y.prototype.get_m_collisionFilterGroup = y.prototype.by = function() { + return Vf(this.Zx) + } + ; + y.prototype.set_m_collisionFilterGroup = y.prototype.dy = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Wf(c, a) + } + ; + Object.defineProperty(y.prototype, "m_collisionFilterGroup", { + get: y.prototype.by, + set: y.prototype.dy + }); + y.prototype.get_m_collisionFilterMask = y.prototype.cy = function() { + return Xf(this.Zx) + } + ; + y.prototype.set_m_collisionFilterMask = y.prototype.ey = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Yf(c, a) + } + ; + Object.defineProperty(y.prototype, "m_collisionFilterMask", { + get: y.prototype.cy, + set: y.prototype.ey + }); + y.prototype.get_m_closestHitFraction = y.prototype.fy = function() { + return Zf(this.Zx) + } + ; + y.prototype.set_m_closestHitFraction = y.prototype.gy = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + $f(c, a) + } + ; + Object.defineProperty(y.prototype, "m_closestHitFraction", { + get: y.prototype.fy, + set: y.prototype.gy + }); + y.prototype.__destroy__ = function() { + ag(this.Zx) + } + ; + function ZA() { + throw "cannot construct a ContactResultCallback, no constructor in IDL"; + } + ZA.prototype = Object.create(g.prototype); + ZA.prototype.constructor = ZA; + ZA.prototype.$x = ZA; + ZA.ay = {}; + b.ContactResultCallback = ZA; + ZA.prototype.addSingleResult = function(a, c, d, e, f, m, C) { + var P = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + e && "object" === typeof e && (e = e.Zx); + f && "object" === typeof f && (f = f.Zx); + m && "object" === typeof m && (m = m.Zx); + C && "object" === typeof C && (C = C.Zx); + return bg(P, a, c, d, e, f, m, C) + } + ; + ZA.prototype.__destroy__ = function() { + cg(this.Zx) + } + ; + function $A() { + throw "cannot construct a btSoftBodySolver, no constructor in IDL"; + } + $A.prototype = Object.create(g.prototype); + $A.prototype.constructor = $A; + $A.prototype.$x = $A; + $A.ay = {}; + b.btSoftBodySolver = $A; + $A.prototype.__destroy__ = function() { + dg(this.Zx) + } + ; + function z() { + throw "cannot construct a RayResultCallback, no constructor in IDL"; + } + z.prototype = Object.create(g.prototype); + z.prototype.constructor = z; + z.prototype.$x = z; + z.ay = {}; + b.RayResultCallback = z; + z.prototype.hasHit = function() { + return !!eg(this.Zx) + } + ; + z.prototype.get_m_collisionFilterGroup = z.prototype.by = function() { + return fg(this.Zx) + } + ; + z.prototype.set_m_collisionFilterGroup = z.prototype.dy = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + gg(c, a) + } + ; + Object.defineProperty(z.prototype, "m_collisionFilterGroup", { + get: z.prototype.by, + set: z.prototype.dy + }); + z.prototype.get_m_collisionFilterMask = z.prototype.cy = function() { + return hg(this.Zx) + } + ; + z.prototype.set_m_collisionFilterMask = z.prototype.ey = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + ig(c, a) + } + ; + Object.defineProperty(z.prototype, "m_collisionFilterMask", { + get: z.prototype.cy, + set: z.prototype.ey + }); + z.prototype.get_m_closestHitFraction = z.prototype.fy = function() { + return jg(this.Zx) + } + ; + z.prototype.set_m_closestHitFraction = z.prototype.gy = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + kg(c, a) + } + ; + Object.defineProperty(z.prototype, "m_closestHitFraction", { + get: z.prototype.fy, + set: z.prototype.gy + }); + z.prototype.get_m_collisionObject = z.prototype.hy = function() { + return k(lg(this.Zx), q) + } + ; + z.prototype.set_m_collisionObject = z.prototype.oy = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + mg(c, a) + } + ; + Object.defineProperty(z.prototype, "m_collisionObject", { + get: z.prototype.hy, + set: z.prototype.oy + }); + z.prototype.__destroy__ = function() { + ng(this.Zx) + } + ; + function aB() { + throw "cannot construct a btMatrix3x3, no constructor in IDL"; + } + aB.prototype = Object.create(g.prototype); + aB.prototype.constructor = aB; + aB.prototype.$x = aB; + aB.ay = {}; + b.btMatrix3x3 = aB; + aB.prototype.setEulerZYX = function(a, c, d) { + var e = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + og(e, a, c, d) + } + ; + aB.prototype.getRotation = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + pg(c, a) + } + ; + aB.prototype.getRow = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + return k(qg(c, a), p) + } + ; + aB.prototype.__destroy__ = function() { + rg(this.Zx) + } + ; + function bB() { + throw "cannot construct a btScalarArray, no constructor in IDL"; + } + bB.prototype = Object.create(g.prototype); + bB.prototype.constructor = bB; + bB.prototype.$x = bB; + bB.ay = {}; + b.btScalarArray = bB; + bB.prototype.size = bB.prototype.size = function() { + return sg(this.Zx) + } + ; + bB.prototype.at = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + return tg(c, a) + } + ; + bB.prototype.__destroy__ = function() { + ug(this.Zx) + } + ; + function A() { + throw "cannot construct a Material, no constructor in IDL"; + } + A.prototype = Object.create(g.prototype); + A.prototype.constructor = A; + A.prototype.$x = A; + A.ay = {}; + b.Material = A; + A.prototype.get_m_kLST = A.prototype.jA = function() { + return vg(this.Zx) + } + ; + A.prototype.set_m_kLST = A.prototype.QC = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + wg(c, a) + } + ; + Object.defineProperty(A.prototype, "m_kLST", { + get: A.prototype.jA, + set: A.prototype.QC + }); + A.prototype.get_m_kAST = A.prototype.iA = function() { + return xg(this.Zx) + } + ; + A.prototype.set_m_kAST = A.prototype.PC = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + yg(c, a) + } + ; + Object.defineProperty(A.prototype, "m_kAST", { + get: A.prototype.iA, + set: A.prototype.PC + }); + A.prototype.get_m_kVST = A.prototype.kA = function() { + return zg(this.Zx) + } + ; + A.prototype.set_m_kVST = A.prototype.RC = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Ag(c, a) + } + ; + Object.defineProperty(A.prototype, "m_kVST", { + get: A.prototype.kA, + set: A.prototype.RC + }); + A.prototype.get_m_flags = A.prototype.Rz = function() { + return Bg(this.Zx) + } + ; + A.prototype.set_m_flags = A.prototype.xC = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Cg(c, a) + } + ; + Object.defineProperty(A.prototype, "m_flags", { + get: A.prototype.Rz, + set: A.prototype.xC + }); + A.prototype.__destroy__ = function() { + Dg(this.Zx) + } + ; + function l() { + throw "cannot construct a btDispatcherInfo, no constructor in IDL"; + } + l.prototype = Object.create(g.prototype); + l.prototype.constructor = l; + l.prototype.$x = l; + l.ay = {}; + b.btDispatcherInfo = l; + l.prototype.get_m_timeStep = l.prototype.XA = function() { + return Eg(this.Zx) + } + ; + l.prototype.set_m_timeStep = l.prototype.DD = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Fg(c, a) + } + ; + Object.defineProperty(l.prototype, "m_timeStep", { + get: l.prototype.XA, + set: l.prototype.DD + }); + l.prototype.get_m_stepCount = l.prototype.OA = function() { + return Gg(this.Zx) + } + ; + l.prototype.set_m_stepCount = l.prototype.uD = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Hg(c, a) + } + ; + Object.defineProperty(l.prototype, "m_stepCount", { + get: l.prototype.OA, + set: l.prototype.uD + }); + l.prototype.get_m_dispatchFunc = l.prototype.Jz = function() { + return Ig(this.Zx) + } + ; + l.prototype.set_m_dispatchFunc = l.prototype.pC = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Jg(c, a) + } + ; + Object.defineProperty(l.prototype, "m_dispatchFunc", { + get: l.prototype.Jz, + set: l.prototype.pC + }); + l.prototype.get_m_timeOfImpact = l.prototype.WA = function() { + return Kg(this.Zx) + } + ; + l.prototype.set_m_timeOfImpact = l.prototype.CD = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Lg(c, a) + } + ; + Object.defineProperty(l.prototype, "m_timeOfImpact", { + get: l.prototype.WA, + set: l.prototype.CD + }); + l.prototype.get_m_useContinuous = l.prototype.ZA = function() { + return !!Mg(this.Zx) + } + ; + l.prototype.set_m_useContinuous = l.prototype.FD = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Ng(c, a) + } + ; + Object.defineProperty(l.prototype, "m_useContinuous", { + get: l.prototype.ZA, + set: l.prototype.FD + }); + l.prototype.get_m_enableSatConvex = l.prototype.Nz = function() { + return !!Og(this.Zx) + } + ; + l.prototype.set_m_enableSatConvex = l.prototype.tC = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Pg(c, a) + } + ; + Object.defineProperty(l.prototype, "m_enableSatConvex", { + get: l.prototype.Nz, + set: l.prototype.tC + }); + l.prototype.get_m_enableSPU = l.prototype.Mz = function() { + return !!Qg(this.Zx) + } + ; + l.prototype.set_m_enableSPU = l.prototype.sC = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Rg(c, a) + } + ; + Object.defineProperty(l.prototype, "m_enableSPU", { + get: l.prototype.Mz, + set: l.prototype.sC + }); + l.prototype.get_m_useEpa = l.prototype.aB = function() { + return !!Sg(this.Zx) + } + ; + l.prototype.set_m_useEpa = l.prototype.HD = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Tg(c, a) + } + ; + Object.defineProperty(l.prototype, "m_useEpa", { + get: l.prototype.aB, + set: l.prototype.HD + }); + l.prototype.get_m_allowedCcdPenetration = l.prototype.lz = function() { + return Ug(this.Zx) + } + ; + l.prototype.set_m_allowedCcdPenetration = l.prototype.TB = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Vg(c, a) + } + ; + Object.defineProperty(l.prototype, "m_allowedCcdPenetration", { + get: l.prototype.lz, + set: l.prototype.TB + }); + l.prototype.get_m_useConvexConservativeDistanceUtil = l.prototype.$A = function() { + return !!Wg(this.Zx) + } + ; + l.prototype.set_m_useConvexConservativeDistanceUtil = l.prototype.GD = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Xg(c, a) + } + ; + Object.defineProperty(l.prototype, "m_useConvexConservativeDistanceUtil", { + get: l.prototype.$A, + set: l.prototype.GD + }); + l.prototype.get_m_convexConservativeDistanceThreshold = l.prototype.Ez = function() { + return Yg(this.Zx) + } + ; + l.prototype.set_m_convexConservativeDistanceThreshold = l.prototype.kC = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Zg(c, a) + } + ; + Object.defineProperty(l.prototype, "m_convexConservativeDistanceThreshold", { + get: l.prototype.Ez, + set: l.prototype.kC + }); + l.prototype.__destroy__ = function() { + $g(this.Zx) + } + ; + function B() { + throw "cannot construct a btWheelInfoConstructionInfo, no constructor in IDL"; + } + B.prototype = Object.create(g.prototype); + B.prototype.constructor = B; + B.prototype.$x = B; + B.ay = {}; + b.btWheelInfoConstructionInfo = B; + B.prototype.get_m_chassisConnectionCS = B.prototype.yz = function() { + return k(ah(this.Zx), p) + } + ; + B.prototype.set_m_chassisConnectionCS = B.prototype.eC = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + bh(c, a) + } + ; + Object.defineProperty(B.prototype, "m_chassisConnectionCS", { + get: B.prototype.yz, + set: B.prototype.eC + }); + B.prototype.get_m_wheelDirectionCS = B.prototype.Ay = function() { + return k(ch(this.Zx), p) + } + ; + B.prototype.set_m_wheelDirectionCS = B.prototype.Hy = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + dh(c, a) + } + ; + Object.defineProperty(B.prototype, "m_wheelDirectionCS", { + get: B.prototype.Ay, + set: B.prototype.Hy + }); + B.prototype.get_m_wheelAxleCS = B.prototype.zy = function() { + return k(eh(this.Zx), p) + } + ; + B.prototype.set_m_wheelAxleCS = B.prototype.Gy = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + fh(c, a) + } + ; + Object.defineProperty(B.prototype, "m_wheelAxleCS", { + get: B.prototype.zy, + set: B.prototype.Gy + }); + B.prototype.get_m_suspensionRestLength = B.prototype.TA = function() { + return gh(this.Zx) + } + ; + B.prototype.set_m_suspensionRestLength = B.prototype.zD = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + hh(c, a) + } + ; + Object.defineProperty(B.prototype, "m_suspensionRestLength", { + get: B.prototype.TA, + set: B.prototype.zD + }); + B.prototype.get_m_maxSuspensionTravelCm = B.prototype.my = function() { + return ih(this.Zx) + } + ; + B.prototype.set_m_maxSuspensionTravelCm = B.prototype.ty = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + jh(c, a) + } + ; + Object.defineProperty(B.prototype, "m_maxSuspensionTravelCm", { + get: B.prototype.my, + set: B.prototype.ty + }); + B.prototype.get_m_wheelRadius = B.prototype.gB = function() { + return kh(this.Zx) + } + ; + B.prototype.set_m_wheelRadius = B.prototype.ND = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + lh(c, a) + } + ; + Object.defineProperty(B.prototype, "m_wheelRadius", { + get: B.prototype.gB, + set: B.prototype.ND + }); + B.prototype.get_m_suspensionStiffness = B.prototype.ny = function() { + return mh(this.Zx) + } + ; + B.prototype.set_m_suspensionStiffness = B.prototype.uy = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + nh(c, a) + } + ; + Object.defineProperty(B.prototype, "m_suspensionStiffness", { + get: B.prototype.ny, + set: B.prototype.uy + }); + B.prototype.get_m_wheelsDampingCompression = B.prototype.By = function() { + return oh(this.Zx) + } + ; + B.prototype.set_m_wheelsDampingCompression = B.prototype.Iy = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + ph(c, a) + } + ; + Object.defineProperty(B.prototype, "m_wheelsDampingCompression", { + get: B.prototype.By, + set: B.prototype.Iy + }); + B.prototype.get_m_wheelsDampingRelaxation = B.prototype.Cy = function() { + return qh(this.Zx) + } + ; + B.prototype.set_m_wheelsDampingRelaxation = B.prototype.Jy = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + rh(c, a) + } + ; + Object.defineProperty(B.prototype, "m_wheelsDampingRelaxation", { + get: B.prototype.Cy, + set: B.prototype.Jy + }); + B.prototype.get_m_frictionSlip = B.prototype.iy = function() { + return sh(this.Zx) + } + ; + B.prototype.set_m_frictionSlip = B.prototype.py = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + th(c, a) + } + ; + Object.defineProperty(B.prototype, "m_frictionSlip", { + get: B.prototype.iy, + set: B.prototype.py + }); + B.prototype.get_m_maxSuspensionForce = B.prototype.ly = function() { + return uh(this.Zx) + } + ; + B.prototype.set_m_maxSuspensionForce = B.prototype.sy = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + vh(c, a) + } + ; + Object.defineProperty(B.prototype, "m_maxSuspensionForce", { + get: B.prototype.ly, + set: B.prototype.sy + }); + B.prototype.get_m_bIsFrontWheel = B.prototype.wy = function() { + return !!wh(this.Zx) + } + ; + B.prototype.set_m_bIsFrontWheel = B.prototype.Dy = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + xh(c, a) + } + ; + Object.defineProperty(B.prototype, "m_bIsFrontWheel", { + get: B.prototype.wy, + set: B.prototype.Dy + }); + B.prototype.__destroy__ = function() { + yh(this.Zx) + } + ; + function cB(a, c) { + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + this.Zx = void 0 === c ? zh(a) : Ah(a, c); + h(cB)[this.Zx] = this + } + cB.prototype = Object.create(UA.prototype); + cB.prototype.constructor = cB; + cB.prototype.$x = cB; + cB.ay = {}; + b.btConvexTriangleMeshShape = cB; + cB.prototype.setLocalScaling = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Bh(c, a) + } + ; + cB.prototype.getLocalScaling = function() { + return k(Ch(this.Zx), p) + } + ; + cB.prototype.calculateLocalInertia = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + Dh(d, a, c) + } + ; + cB.prototype.setMargin = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Eh(c, a) + } + ; + cB.prototype.getMargin = function() { + return Fh(this.Zx) + } + ; + cB.prototype.__destroy__ = function() { + Gh(this.Zx) + } + ; + function HA() { + throw "cannot construct a btBroadphaseInterface, no constructor in IDL"; + } + HA.prototype = Object.create(g.prototype); + HA.prototype.constructor = HA; + HA.prototype.$x = HA; + HA.ay = {}; + b.btBroadphaseInterface = HA; + HA.prototype.getOverlappingPairCache = function() { + return k(Hh(this.Zx), GA) + } + ; + HA.prototype.__destroy__ = function() { + Ih(this.Zx) + } + ; + function D(a, c, d, e) { + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + e && "object" === typeof e && (e = e.Zx); + this.Zx = void 0 === e ? Jh(a, c, d) : Kh(a, c, d, e); + h(D)[this.Zx] = this + } + D.prototype = Object.create(g.prototype); + D.prototype.constructor = D; + D.prototype.$x = D; + D.ay = {}; + b.btRigidBodyConstructionInfo = D; + D.prototype.get_m_linearDamping = D.prototype.lA = function() { + return Lh(this.Zx) + } + ; + D.prototype.set_m_linearDamping = D.prototype.SC = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Mh(c, a) + } + ; + Object.defineProperty(D.prototype, "m_linearDamping", { + get: D.prototype.lA, + set: D.prototype.SC + }); + D.prototype.get_m_angularDamping = D.prototype.nz = function() { + return Nh(this.Zx) + } + ; + D.prototype.set_m_angularDamping = D.prototype.VB = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Oh(c, a) + } + ; + Object.defineProperty(D.prototype, "m_angularDamping", { + get: D.prototype.nz, + set: D.prototype.VB + }); + D.prototype.get_m_friction = D.prototype.Sz = function() { + return Ph(this.Zx) + } + ; + D.prototype.set_m_friction = D.prototype.yC = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Qh(c, a) + } + ; + Object.defineProperty(D.prototype, "m_friction", { + get: D.prototype.Sz, + set: D.prototype.yC + }); + D.prototype.get_m_rollingFriction = D.prototype.GA = function() { + return Rh(this.Zx) + } + ; + D.prototype.set_m_rollingFriction = D.prototype.mD = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Sh(c, a) + } + ; + Object.defineProperty(D.prototype, "m_rollingFriction", { + get: D.prototype.GA, + set: D.prototype.mD + }); + D.prototype.get_m_restitution = D.prototype.EA = function() { + return Th(this.Zx) + } + ; + D.prototype.set_m_restitution = D.prototype.kD = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Uh(c, a) + } + ; + Object.defineProperty(D.prototype, "m_restitution", { + get: D.prototype.EA, + set: D.prototype.kD + }); + D.prototype.get_m_linearSleepingThreshold = D.prototype.mA = function() { + return Vh(this.Zx) + } + ; + D.prototype.set_m_linearSleepingThreshold = D.prototype.TC = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Wh(c, a) + } + ; + Object.defineProperty(D.prototype, "m_linearSleepingThreshold", { + get: D.prototype.mA, + set: D.prototype.TC + }); + D.prototype.get_m_angularSleepingThreshold = D.prototype.oz = function() { + return Xh(this.Zx) + } + ; + D.prototype.set_m_angularSleepingThreshold = D.prototype.WB = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Yh(c, a) + } + ; + Object.defineProperty(D.prototype, "m_angularSleepingThreshold", { + get: D.prototype.oz, + set: D.prototype.WB + }); + D.prototype.get_m_additionalDamping = D.prototype.iz = function() { + return !!Zh(this.Zx) + } + ; + D.prototype.set_m_additionalDamping = D.prototype.QB = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + $h(c, a) + } + ; + Object.defineProperty(D.prototype, "m_additionalDamping", { + get: D.prototype.iz, + set: D.prototype.QB + }); + D.prototype.get_m_additionalDampingFactor = D.prototype.jz = function() { + return ai(this.Zx) + } + ; + D.prototype.set_m_additionalDampingFactor = D.prototype.RB = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + bi(c, a) + } + ; + Object.defineProperty(D.prototype, "m_additionalDampingFactor", { + get: D.prototype.jz, + set: D.prototype.RB + }); + D.prototype.get_m_additionalLinearDampingThresholdSqr = D.prototype.kz = function() { + return ci(this.Zx) + } + ; + D.prototype.set_m_additionalLinearDampingThresholdSqr = D.prototype.SB = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + di(c, a) + } + ; + Object.defineProperty(D.prototype, "m_additionalLinearDampingThresholdSqr", { + get: D.prototype.kz, + set: D.prototype.SB + }); + D.prototype.get_m_additionalAngularDampingThresholdSqr = D.prototype.hz = function() { + return ei(this.Zx) + } + ; + D.prototype.set_m_additionalAngularDampingThresholdSqr = D.prototype.PB = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + fi(c, a) + } + ; + Object.defineProperty(D.prototype, "m_additionalAngularDampingThresholdSqr", { + get: D.prototype.hz, + set: D.prototype.PB + }); + D.prototype.get_m_additionalAngularDampingFactor = D.prototype.gz = function() { + return gi(this.Zx) + } + ; + D.prototype.set_m_additionalAngularDampingFactor = D.prototype.OB = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + hi(c, a) + } + ; + Object.defineProperty(D.prototype, "m_additionalAngularDampingFactor", { + get: D.prototype.gz, + set: D.prototype.OB + }); + D.prototype.__destroy__ = function() { + ii(this.Zx) + } + ; + function dB() { + throw "cannot construct a btCollisionConfiguration, no constructor in IDL"; + } + dB.prototype = Object.create(g.prototype); + dB.prototype.constructor = dB; + dB.prototype.$x = dB; + dB.ay = {}; + b.btCollisionConfiguration = dB; + dB.prototype.__destroy__ = function() { + ji(this.Zx) + } + ; + function VA() { + this.Zx = ki(); + h(VA)[this.Zx] = this + } + VA.prototype = Object.create(g.prototype); + VA.prototype.constructor = VA; + VA.prototype.$x = VA; + VA.ay = {}; + b.btPersistentManifold = VA; + VA.prototype.getBody0 = function() { + return k(li(this.Zx), q) + } + ; + VA.prototype.getBody1 = function() { + return k(mi(this.Zx), q) + } + ; + VA.prototype.getNumContacts = function() { + return ni(this.Zx) + } + ; + VA.prototype.getContactPoint = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + return k(oi(c, a), E) + } + ; + VA.prototype.__destroy__ = function() { + pi(this.Zx) + } + ; + function eB(a) { + a && "object" === typeof a && (a = a.Zx); + this.Zx = void 0 === a ? qi() : ri(a); + h(eB)[this.Zx] = this + } + eB.prototype = Object.create(n.prototype); + eB.prototype.constructor = eB; + eB.prototype.$x = eB; + eB.ay = {}; + b.btCompoundShape = eB; + eB.prototype.addChildShape = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + si(d, a, c) + } + ; + eB.prototype.removeChildShape = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + ti(c, a) + } + ; + eB.prototype.removeChildShapeByIndex = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + ui(c, a) + } + ; + eB.prototype.getNumChildShapes = function() { + return vi(this.Zx) + } + ; + eB.prototype.getChildShape = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + return k(wi(c, a), n) + } + ; + eB.prototype.updateChildTransform = function(a, c, d) { + var e = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + void 0 === d ? xi(e, a, c) : yi(e, a, c, d) + } + ; + eB.prototype.setMargin = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + zi(c, a) + } + ; + eB.prototype.getMargin = function() { + return Ai(this.Zx) + } + ; + eB.prototype.setLocalScaling = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Bi(c, a) + } + ; + eB.prototype.getLocalScaling = function() { + return k(Ci(this.Zx), p) + } + ; + eB.prototype.calculateLocalInertia = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + Di(d, a, c) + } + ; + eB.prototype.__destroy__ = function() { + Ei(this.Zx) + } + ; + function F(a, c) { + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + this.Zx = Fi(a, c); + h(F)[this.Zx] = this + } + F.prototype = Object.create(y.prototype); + F.prototype.constructor = F; + F.prototype.$x = F; + F.ay = {}; + b.ClosestConvexResultCallback = F; + F.prototype.hasHit = function() { + return !!Gi(this.Zx) + } + ; + F.prototype.get_m_convexFromWorld = F.prototype.Fz = function() { + return k(Hi(this.Zx), p) + } + ; + F.prototype.set_m_convexFromWorld = F.prototype.lC = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Ii(c, a) + } + ; + Object.defineProperty(F.prototype, "m_convexFromWorld", { + get: F.prototype.Fz, + set: F.prototype.lC + }); + F.prototype.get_m_convexToWorld = F.prototype.Gz = function() { + return k(Ji(this.Zx), p) + } + ; + F.prototype.set_m_convexToWorld = F.prototype.mC = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Ki(c, a) + } + ; + Object.defineProperty(F.prototype, "m_convexToWorld", { + get: F.prototype.Gz, + set: F.prototype.mC + }); + F.prototype.get_m_hitNormalWorld = F.prototype.jy = function() { + return k(Li(this.Zx), p) + } + ; + F.prototype.set_m_hitNormalWorld = F.prototype.qy = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Mi(c, a) + } + ; + Object.defineProperty(F.prototype, "m_hitNormalWorld", { + get: F.prototype.jy, + set: F.prototype.qy + }); + F.prototype.get_m_hitPointWorld = F.prototype.ky = function() { + return k(Ni(this.Zx), p) + } + ; + F.prototype.set_m_hitPointWorld = F.prototype.ry = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Oi(c, a) + } + ; + Object.defineProperty(F.prototype, "m_hitPointWorld", { + get: F.prototype.ky, + set: F.prototype.ry + }); + F.prototype.get_m_collisionFilterGroup = F.prototype.by = function() { + return Pi(this.Zx) + } + ; + F.prototype.set_m_collisionFilterGroup = F.prototype.dy = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Qi(c, a) + } + ; + Object.defineProperty(F.prototype, "m_collisionFilterGroup", { + get: F.prototype.by, + set: F.prototype.dy + }); + F.prototype.get_m_collisionFilterMask = F.prototype.cy = function() { + return Ri(this.Zx) + } + ; + F.prototype.set_m_collisionFilterMask = F.prototype.ey = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Si(c, a) + } + ; + Object.defineProperty(F.prototype, "m_collisionFilterMask", { + get: F.prototype.cy, + set: F.prototype.ey + }); + F.prototype.get_m_closestHitFraction = F.prototype.fy = function() { + return Ti(this.Zx) + } + ; + F.prototype.set_m_closestHitFraction = F.prototype.gy = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Ui(c, a) + } + ; + Object.defineProperty(F.prototype, "m_closestHitFraction", { + get: F.prototype.fy, + set: F.prototype.gy + }); + F.prototype.__destroy__ = function() { + Vi(this.Zx) + } + ; + function G(a, c) { + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + this.Zx = Wi(a, c); + h(G)[this.Zx] = this + } + G.prototype = Object.create(z.prototype); + G.prototype.constructor = G; + G.prototype.$x = G; + G.ay = {}; + b.AllHitsRayResultCallback = G; + G.prototype.hasHit = function() { + return !!Xi(this.Zx) + } + ; + G.prototype.get_m_collisionObjects = G.prototype.Bz = function() { + return k(Yi(this.Zx), fB) + } + ; + G.prototype.set_m_collisionObjects = G.prototype.hC = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Zi(c, a) + } + ; + Object.defineProperty(G.prototype, "m_collisionObjects", { + get: G.prototype.Bz, + set: G.prototype.hC + }); + G.prototype.get_m_rayFromWorld = G.prototype.xy = function() { + return k($i(this.Zx), p) + } + ; + G.prototype.set_m_rayFromWorld = G.prototype.Ey = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + aj(c, a) + } + ; + Object.defineProperty(G.prototype, "m_rayFromWorld", { + get: G.prototype.xy, + set: G.prototype.Ey + }); + G.prototype.get_m_rayToWorld = G.prototype.yy = function() { + return k(bj(this.Zx), p) + } + ; + G.prototype.set_m_rayToWorld = G.prototype.Fy = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + cj(c, a) + } + ; + Object.defineProperty(G.prototype, "m_rayToWorld", { + get: G.prototype.yy, + set: G.prototype.Fy + }); + G.prototype.get_m_hitNormalWorld = G.prototype.jy = function() { + return k(dj(this.Zx), gB) + } + ; + G.prototype.set_m_hitNormalWorld = G.prototype.qy = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + ej(c, a) + } + ; + Object.defineProperty(G.prototype, "m_hitNormalWorld", { + get: G.prototype.jy, + set: G.prototype.qy + }); + G.prototype.get_m_hitPointWorld = G.prototype.ky = function() { + return k(fj(this.Zx), gB) + } + ; + G.prototype.set_m_hitPointWorld = G.prototype.ry = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + gj(c, a) + } + ; + Object.defineProperty(G.prototype, "m_hitPointWorld", { + get: G.prototype.ky, + set: G.prototype.ry + }); + G.prototype.get_m_hitFractions = G.prototype.Zz = function() { + return k(hj(this.Zx), bB) + } + ; + G.prototype.set_m_hitFractions = G.prototype.FC = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + ij(c, a) + } + ; + Object.defineProperty(G.prototype, "m_hitFractions", { + get: G.prototype.Zz, + set: G.prototype.FC + }); + G.prototype.get_m_collisionFilterGroup = G.prototype.by = function() { + return jj(this.Zx) + } + ; + G.prototype.set_m_collisionFilterGroup = G.prototype.dy = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + kj(c, a) + } + ; + Object.defineProperty(G.prototype, "m_collisionFilterGroup", { + get: G.prototype.by, + set: G.prototype.dy + }); + G.prototype.get_m_collisionFilterMask = G.prototype.cy = function() { + return lj(this.Zx) + } + ; + G.prototype.set_m_collisionFilterMask = G.prototype.ey = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + mj(c, a) + } + ; + Object.defineProperty(G.prototype, "m_collisionFilterMask", { + get: G.prototype.cy, + set: G.prototype.ey + }); + G.prototype.get_m_closestHitFraction = G.prototype.fy = function() { + return nj(this.Zx) + } + ; + G.prototype.set_m_closestHitFraction = G.prototype.gy = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + oj(c, a) + } + ; + Object.defineProperty(G.prototype, "m_closestHitFraction", { + get: G.prototype.fy, + set: G.prototype.gy + }); + G.prototype.get_m_collisionObject = G.prototype.hy = function() { + return k(pj(this.Zx), q) + } + ; + G.prototype.set_m_collisionObject = G.prototype.oy = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + qj(c, a) + } + ; + Object.defineProperty(G.prototype, "m_collisionObject", { + get: G.prototype.hy, + set: G.prototype.oy + }); + G.prototype.__destroy__ = function() { + rj(this.Zx) + } + ; + function hB() { + throw "cannot construct a tMaterialArray, no constructor in IDL"; + } + hB.prototype = Object.create(g.prototype); + hB.prototype.constructor = hB; + hB.prototype.$x = hB; + hB.ay = {}; + b.tMaterialArray = hB; + hB.prototype.size = hB.prototype.size = function() { + return sj(this.Zx) + } + ; + hB.prototype.at = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + return k(tj(c, a), A) + } + ; + hB.prototype.__destroy__ = function() { + uj(this.Zx) + } + ; + function iB(a) { + a && "object" === typeof a && (a = a.Zx); + this.Zx = vj(a); + h(iB)[this.Zx] = this + } + iB.prototype = Object.create(RA.prototype); + iB.prototype.constructor = iB; + iB.prototype.$x = iB; + iB.ay = {}; + b.btDefaultVehicleRaycaster = iB; + iB.prototype.castRay = function(a, c, d) { + var e = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + wj(e, a, c, d) + } + ; + iB.prototype.__destroy__ = function() { + xj(this.Zx) + } + ; + function jB() { + this.Zx = yj(); + h(jB)[this.Zx] = this + } + jB.prototype = Object.create(LA.prototype); + jB.prototype.constructor = jB; + jB.prototype.$x = jB; + jB.ay = {}; + b.btEmptyShape = jB; + jB.prototype.setLocalScaling = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + zj(c, a) + } + ; + jB.prototype.getLocalScaling = function() { + return k(Aj(this.Zx), p) + } + ; + jB.prototype.calculateLocalInertia = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + Bj(d, a, c) + } + ; + jB.prototype.__destroy__ = function() { + Cj(this.Zx) + } + ; + function H() { + this.Zx = Dj(); + h(H)[this.Zx] = this + } + H.prototype = Object.create(g.prototype); + H.prototype.constructor = H; + H.prototype.$x = H; + H.ay = {}; + b.btConstraintSetting = H; + H.prototype.get_m_tau = H.prototype.VA = function() { + return Ej(this.Zx) + } + ; + H.prototype.set_m_tau = H.prototype.BD = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Fj(c, a) + } + ; + Object.defineProperty(H.prototype, "m_tau", { + get: H.prototype.VA, + set: H.prototype.BD + }); + H.prototype.get_m_damping = H.prototype.Hz = function() { + return Gj(this.Zx) + } + ; + H.prototype.set_m_damping = H.prototype.nC = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Hj(c, a) + } + ; + Object.defineProperty(H.prototype, "m_damping", { + get: H.prototype.Hz, + set: H.prototype.nC + }); + H.prototype.get_m_impulseClamp = H.prototype.eA = function() { + return Ij(this.Zx) + } + ; + H.prototype.set_m_impulseClamp = H.prototype.LC = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Jj(c, a) + } + ; + Object.defineProperty(H.prototype, "m_impulseClamp", { + get: H.prototype.eA, + set: H.prototype.LC + }); + H.prototype.__destroy__ = function() { + Kj(this.Zx) + } + ; + function kB() { + throw "cannot construct a LocalShapeInfo, no constructor in IDL"; + } + kB.prototype = Object.create(g.prototype); + kB.prototype.constructor = kB; + kB.prototype.$x = kB; + kB.ay = {}; + b.LocalShapeInfo = kB; + kB.prototype.get_m_shapePart = kB.prototype.JA = function() { + return Lj(this.Zx) + } + ; + kB.prototype.set_m_shapePart = kB.prototype.pD = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Mj(c, a) + } + ; + Object.defineProperty(kB.prototype, "m_shapePart", { + get: kB.prototype.JA, + set: kB.prototype.pD + }); + kB.prototype.get_m_triangleIndex = kB.prototype.YA = function() { + return Nj(this.Zx) + } + ; + kB.prototype.set_m_triangleIndex = kB.prototype.ED = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Oj(c, a) + } + ; + Object.defineProperty(kB.prototype, "m_triangleIndex", { + get: kB.prototype.YA, + set: kB.prototype.ED + }); + kB.prototype.__destroy__ = function() { + Pj(this.Zx) + } + ; + function I(a) { + a && "object" === typeof a && (a = a.Zx); + this.Zx = Qj(a); + h(I)[this.Zx] = this + } + I.prototype = Object.create(q.prototype); + I.prototype.constructor = I; + I.prototype.$x = I; + I.ay = {}; + b.btRigidBody = I; + I.prototype.getCenterOfMassTransform = function() { + return k(Rj(this.Zx), r) + } + ; + I.prototype.setCenterOfMassTransform = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Sj(c, a) + } + ; + I.prototype.setSleepingThresholds = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + Tj(d, a, c) + } + ; + I.prototype.getLinearDamping = function() { + return Uj(this.Zx) + } + ; + I.prototype.getAngularDamping = function() { + return Vj(this.Zx) + } + ; + I.prototype.setDamping = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + Wj(d, a, c) + } + ; + I.prototype.setMassProps = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + Xj(d, a, c) + } + ; + I.prototype.getLinearFactor = function() { + return k(Yj(this.Zx), p) + } + ; + I.prototype.setLinearFactor = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Zj(c, a) + } + ; + I.prototype.applyTorque = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + ak(c, a) + } + ; + I.prototype.applyLocalTorque = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + bk(c, a) + } + ; + I.prototype.applyForce = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + ck(d, a, c) + } + ; + I.prototype.applyCentralForce = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + dk(c, a) + } + ; + I.prototype.applyCentralLocalForce = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + ek(c, a) + } + ; + I.prototype.applyTorqueImpulse = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + fk(c, a) + } + ; + I.prototype.applyImpulse = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + gk(d, a, c) + } + ; + I.prototype.applyCentralImpulse = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + hk(c, a) + } + ; + I.prototype.updateInertiaTensor = function() { + ik(this.Zx) + } + ; + I.prototype.getLinearVelocity = function() { + return k(jk(this.Zx), p) + } + ; + I.prototype.getAngularVelocity = function() { + return k(kk(this.Zx), p) + } + ; + I.prototype.setLinearVelocity = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + lk(c, a) + } + ; + I.prototype.setAngularVelocity = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + mk(c, a) + } + ; + I.prototype.getMotionState = function() { + return k(nk(this.Zx), YA) + } + ; + I.prototype.setMotionState = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + ok(c, a) + } + ; + I.prototype.getAngularFactor = function() { + return k(pk(this.Zx), p) + } + ; + I.prototype.setAngularFactor = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + qk(c, a) + } + ; + I.prototype.upcast = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + return k(rk(c, a), I) + } + ; + I.prototype.getAabb = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + sk(d, a, c) + } + ; + I.prototype.applyGravity = function() { + tk(this.Zx) + } + ; + I.prototype.getGravity = function() { + return k(uk(this.Zx), p) + } + ; + I.prototype.setGravity = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + vk(c, a) + } + ; + I.prototype.getBroadphaseProxy = function() { + return k(wk(this.Zx), t) + } + ; + I.prototype.clearForces = function() { + xk(this.Zx) + } + ; + I.prototype.setAnisotropicFriction = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + yk(d, a, c) + } + ; + I.prototype.getCollisionShape = function() { + return k(zk(this.Zx), n) + } + ; + I.prototype.setContactProcessingThreshold = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Ak(c, a) + } + ; + I.prototype.setActivationState = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Bk(c, a) + } + ; + I.prototype.forceActivationState = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Ck(c, a) + } + ; + I.prototype.activate = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + void 0 === a ? Dk(c) : Ek(c, a) + } + ; + I.prototype.isActive = function() { + return !!Fk(this.Zx) + } + ; + I.prototype.isKinematicObject = function() { + return !!Gk(this.Zx) + } + ; + I.prototype.isStaticObject = function() { + return !!Hk(this.Zx) + } + ; + I.prototype.isStaticOrKinematicObject = function() { + return !!Ik(this.Zx) + } + ; + I.prototype.getRestitution = function() { + return Jk(this.Zx) + } + ; + I.prototype.getFriction = function() { + return Kk(this.Zx) + } + ; + I.prototype.getRollingFriction = function() { + return Lk(this.Zx) + } + ; + I.prototype.setRestitution = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Mk(c, a) + } + ; + I.prototype.setFriction = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Nk(c, a) + } + ; + I.prototype.setRollingFriction = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Ok(c, a) + } + ; + I.prototype.getWorldTransform = function() { + return k(Pk(this.Zx), r) + } + ; + I.prototype.getCollisionFlags = function() { + return Qk(this.Zx) + } + ; + I.prototype.setCollisionFlags = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Rk(c, a) + } + ; + I.prototype.setWorldTransform = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Sk(c, a) + } + ; + I.prototype.setCollisionShape = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Tk(c, a) + } + ; + I.prototype.setCcdMotionThreshold = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Uk(c, a) + } + ; + I.prototype.setCcdSweptSphereRadius = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Vk(c, a) + } + ; + I.prototype.getUserIndex = function() { + return Wk(this.Zx) + } + ; + I.prototype.setUserIndex = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Xk(c, a) + } + ; + I.prototype.getUserPointer = function() { + return k(Yk(this.Zx), JA) + } + ; + I.prototype.setUserPointer = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Zk(c, a) + } + ; + I.prototype.getBroadphaseHandle = function() { + return k($k(this.Zx), t) + } + ; + I.prototype.__destroy__ = function() { + al(this.Zx) + } + ; + function lB() { + throw "cannot construct a btIndexedMeshArray, no constructor in IDL"; + } + lB.prototype = Object.create(g.prototype); + lB.prototype.constructor = lB; + lB.prototype.$x = lB; + lB.ay = {}; + b.btIndexedMeshArray = lB; + lB.prototype.size = lB.prototype.size = function() { + return bl(this.Zx) + } + ; + lB.prototype.at = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + return k(cl(c, a), mB) + } + ; + lB.prototype.__destroy__ = function() { + dl(this.Zx) + } + ; + function nB() { + this.Zx = el(); + h(nB)[this.Zx] = this + } + nB.prototype = Object.create(g.prototype); + nB.prototype.constructor = nB; + nB.prototype.$x = nB; + nB.ay = {}; + b.btDbvtBroadphase = nB; + nB.prototype.__destroy__ = function() { + fl(this.Zx) + } + ; + function oB(a, c, d, e, f, m, C, P, ia) { + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + e && "object" === typeof e && (e = e.Zx); + f && "object" === typeof f && (f = f.Zx); + m && "object" === typeof m && (m = m.Zx); + C && "object" === typeof C && (C = C.Zx); + P && "object" === typeof P && (P = P.Zx); + ia && "object" === typeof ia && (ia = ia.Zx); + this.Zx = gl(a, c, d, e, f, m, C, P, ia); + h(oB)[this.Zx] = this + } + oB.prototype = Object.create(LA.prototype); + oB.prototype.constructor = oB; + oB.prototype.$x = oB; + oB.ay = {}; + b.btHeightfieldTerrainShape = oB; + oB.prototype.setMargin = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + hl(c, a) + } + ; + oB.prototype.getMargin = function() { + return il(this.Zx) + } + ; + oB.prototype.setLocalScaling = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + jl(c, a) + } + ; + oB.prototype.getLocalScaling = function() { + return k(kl(this.Zx), p) + } + ; + oB.prototype.calculateLocalInertia = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + ll(d, a, c) + } + ; + oB.prototype.__destroy__ = function() { + ml(this.Zx) + } + ; + function pB() { + this.Zx = nl(); + h(pB)[this.Zx] = this + } + pB.prototype = Object.create($A.prototype); + pB.prototype.constructor = pB; + pB.prototype.$x = pB; + pB.ay = {}; + b.btDefaultSoftBodySolver = pB; + pB.prototype.__destroy__ = function() { + ol(this.Zx) + } + ; + function qB(a) { + a && "object" === typeof a && (a = a.Zx); + this.Zx = pl(a); + h(qB)[this.Zx] = this + } + qB.prototype = Object.create(FA.prototype); + qB.prototype.constructor = qB; + qB.prototype.$x = qB; + qB.ay = {}; + b.btCollisionDispatcher = qB; + qB.prototype.getNumManifolds = function() { + return ql(this.Zx) + } + ; + qB.prototype.getManifoldByIndexInternal = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + return k(rl(c, a), VA) + } + ; + qB.prototype.__destroy__ = function() { + sl(this.Zx) + } + ; + function rB(a, c, d, e, f) { + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + e && "object" === typeof e && (e = e.Zx); + f && "object" === typeof f && (f = f.Zx); + this.Zx = void 0 === d ? tl(a, c) : void 0 === e ? ul(a, c, d) : void 0 === f ? vl(a, c, d, e) : wl(a, c, d, e, f); + h(rB)[this.Zx] = this + } + rB.prototype = Object.create(g.prototype); + rB.prototype.constructor = rB; + rB.prototype.$x = rB; + rB.ay = {}; + b.btAxisSweep3 = rB; + rB.prototype.__destroy__ = function() { + xl(this.Zx) + } + ; + function JA() { + throw "cannot construct a VoidPtr, no constructor in IDL"; + } + JA.prototype = Object.create(g.prototype); + JA.prototype.constructor = JA; + JA.prototype.$x = JA; + JA.ay = {}; + b.VoidPtr = JA; + JA.prototype.__destroy__ = function() { + yl(this.Zx) + } + ; + function J() { + this.Zx = zl(); + h(J)[this.Zx] = this + } + J.prototype = Object.create(g.prototype); + J.prototype.constructor = J; + J.prototype.$x = J; + J.ay = {}; + b.btSoftBodyWorldInfo = J; + J.prototype.get_air_density = J.prototype.Ly = function() { + return Al(this.Zx) + } + ; + J.prototype.set_air_density = J.prototype.sB = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Bl(c, a) + } + ; + Object.defineProperty(J.prototype, "air_density", { + get: J.prototype.Ly, + set: J.prototype.sB + }); + J.prototype.get_water_density = J.prototype.pB = function() { + return Cl(this.Zx) + } + ; + J.prototype.set_water_density = J.prototype.WD = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Dl(c, a) + } + ; + Object.defineProperty(J.prototype, "water_density", { + get: J.prototype.pB, + set: J.prototype.WD + }); + J.prototype.get_water_offset = J.prototype.rB = function() { + return El(this.Zx) + } + ; + J.prototype.set_water_offset = J.prototype.YD = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Fl(c, a) + } + ; + Object.defineProperty(J.prototype, "water_offset", { + get: J.prototype.rB, + set: J.prototype.YD + }); + J.prototype.get_m_maxDisplacement = J.prototype.sA = function() { + return Gl(this.Zx) + } + ; + J.prototype.set_m_maxDisplacement = J.prototype.ZC = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Hl(c, a) + } + ; + Object.defineProperty(J.prototype, "m_maxDisplacement", { + get: J.prototype.sA, + set: J.prototype.ZC + }); + J.prototype.get_water_normal = J.prototype.qB = function() { + return k(Il(this.Zx), p) + } + ; + J.prototype.set_water_normal = J.prototype.XD = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Jl(c, a) + } + ; + Object.defineProperty(J.prototype, "water_normal", { + get: J.prototype.qB, + set: J.prototype.XD + }); + J.prototype.get_m_broadphase = J.prototype.sz = function() { + return k(Kl(this.Zx), HA) + } + ; + J.prototype.set_m_broadphase = J.prototype.$B = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Ll(c, a) + } + ; + Object.defineProperty(J.prototype, "m_broadphase", { + get: J.prototype.sz, + set: J.prototype.$B + }); + J.prototype.get_m_dispatcher = J.prototype.Kz = function() { + return k(Ml(this.Zx), FA) + } + ; + J.prototype.set_m_dispatcher = J.prototype.qC = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Nl(c, a) + } + ; + Object.defineProperty(J.prototype, "m_dispatcher", { + get: J.prototype.Kz, + set: J.prototype.qC + }); + J.prototype.get_m_gravity = J.prototype.Uz = function() { + return k(Ol(this.Zx), p) + } + ; + J.prototype.set_m_gravity = J.prototype.AC = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Pl(c, a) + } + ; + Object.defineProperty(J.prototype, "m_gravity", { + get: J.prototype.Uz, + set: J.prototype.AC + }); + J.prototype.__destroy__ = function() { + Ql(this.Zx) + } + ; + function sB(a, c, d, e) { + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + e && "object" === typeof e && (e = e.Zx); + this.Zx = void 0 === d ? Rl(a, c) : void 0 === e ? _emscripten_bind_btConeTwistConstraint_btConeTwistConstraint_3(a, c, d) : Sl(a, c, d, e); + h(sB)[this.Zx] = this + } + sB.prototype = Object.create(KA.prototype); + sB.prototype.constructor = sB; + sB.prototype.$x = sB; + sB.ay = {}; + b.btConeTwistConstraint = sB; + sB.prototype.setLimit = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + Tl(d, a, c) + } + ; + sB.prototype.setAngularOnly = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Ul(c, a) + } + ; + sB.prototype.setDamping = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Vl(c, a) + } + ; + sB.prototype.enableMotor = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Wl(c, a) + } + ; + sB.prototype.setMaxMotorImpulse = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Xl(c, a) + } + ; + sB.prototype.setMaxMotorImpulseNormalized = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Yl(c, a) + } + ; + sB.prototype.setMotorTarget = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Zl(c, a) + } + ; + sB.prototype.setMotorTargetInConstraintSpace = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + $l(c, a) + } + ; + sB.prototype.enableFeedback = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + am(c, a) + } + ; + sB.prototype.getBreakingImpulseThreshold = function() { + return bm(this.Zx) + } + ; + sB.prototype.setBreakingImpulseThreshold = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + cm(c, a) + } + ; + sB.prototype.getParam = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + return dm(d, a, c) + } + ; + sB.prototype.setParam = function(a, c, d) { + var e = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + em(e, a, c, d) + } + ; + sB.prototype.__destroy__ = function() { + fm(this.Zx) + } + ; + function tB(a, c, d, e, f, m, C) { + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + e && "object" === typeof e && (e = e.Zx); + f && "object" === typeof f && (f = f.Zx); + m && "object" === typeof m && (m = m.Zx); + C && "object" === typeof C && (C = C.Zx); + this.Zx = void 0 === d ? gm(a, c) : void 0 === e ? hm(a, c, d) : void 0 === f ? im(a, c, d, e) : void 0 === m ? jm(a, c, d, e, f) : void 0 === C ? km(a, c, d, e, f, m) : lm(a, c, d, e, f, m, C); + h(tB)[this.Zx] = this + } + tB.prototype = Object.create(KA.prototype); + tB.prototype.constructor = tB; + tB.prototype.$x = tB; + tB.ay = {}; + b.btHingeConstraint = tB; + tB.prototype.setLimit = function(a, c, d, e, f) { + var m = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + e && "object" === typeof e && (e = e.Zx); + f && "object" === typeof f && (f = f.Zx); + void 0 === f ? mm(m, a, c, d, e) : nm(m, a, c, d, e, f) + } + ; + tB.prototype.enableAngularMotor = function(a, c, d) { + var e = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + om(e, a, c, d) + } + ; + tB.prototype.setAngularOnly = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + pm(c, a) + } + ; + tB.prototype.enableMotor = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + qm(c, a) + } + ; + tB.prototype.setMaxMotorImpulse = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + rm(c, a) + } + ; + tB.prototype.setMotorTarget = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + sm(d, a, c) + } + ; + tB.prototype.enableFeedback = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + tm(c, a) + } + ; + tB.prototype.getBreakingImpulseThreshold = function() { + return um(this.Zx) + } + ; + tB.prototype.setBreakingImpulseThreshold = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + wm(c, a) + } + ; + tB.prototype.getParam = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + return xm(d, a, c) + } + ; + tB.prototype.setParam = function(a, c, d) { + var e = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + ym(e, a, c, d) + } + ; + tB.prototype.__destroy__ = function() { + zm(this.Zx) + } + ; + function uB(a, c) { + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + this.Zx = Am(a, c); + h(uB)[this.Zx] = this + } + uB.prototype = Object.create(PA.prototype); + uB.prototype.constructor = uB; + uB.prototype.$x = uB; + uB.ay = {}; + b.btConeShapeZ = uB; + uB.prototype.setLocalScaling = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Bm(c, a) + } + ; + uB.prototype.getLocalScaling = function() { + return k(Cm(this.Zx), p) + } + ; + uB.prototype.calculateLocalInertia = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + Dm(d, a, c) + } + ; + uB.prototype.__destroy__ = function() { + Em(this.Zx) + } + ; + function vB(a, c) { + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + this.Zx = Fm(a, c); + h(vB)[this.Zx] = this + } + vB.prototype = Object.create(PA.prototype); + vB.prototype.constructor = vB; + vB.prototype.$x = vB; + vB.ay = {}; + b.btConeShapeX = vB; + vB.prototype.setLocalScaling = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Gm(c, a) + } + ; + vB.prototype.getLocalScaling = function() { + return k(Hm(this.Zx), p) + } + ; + vB.prototype.calculateLocalInertia = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + Im(d, a, c) + } + ; + vB.prototype.__destroy__ = function() { + Jm(this.Zx) + } + ; + function wB(a, c) { + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + this.Zx = void 0 === a ? Km() : void 0 === c ? Lm(a) : Mm(a, c); + h(wB)[this.Zx] = this + } + wB.prototype = Object.create(XA.prototype); + wB.prototype.constructor = wB; + wB.prototype.$x = wB; + wB.ay = {}; + b.btTriangleMesh = wB; + wB.prototype.addTriangle = function(a, c, d, e) { + var f = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + e && "object" === typeof e && (e = e.Zx); + void 0 === e ? Nm(f, a, c, d) : Om(f, a, c, d, e) + } + ; + wB.prototype.findOrAddVertex = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + return Pm(d, a, c) + } + ; + wB.prototype.addIndex = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Qm(c, a) + } + ; + wB.prototype.getIndexedMeshArray = function() { + return k(Rm(this.Zx), lB) + } + ; + wB.prototype.setScaling = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Sm(c, a) + } + ; + wB.prototype.__destroy__ = function() { + Tm(this.Zx) + } + ; + function xB(a, c) { + zA(); + "object" == typeof a && (a = DA(a)); + c && "object" === typeof c && (c = c.Zx); + this.Zx = void 0 === a ? Um() : void 0 === c ? Vm(a) : Wm(a, c); + h(xB)[this.Zx] = this + } + xB.prototype = Object.create(n.prototype); + xB.prototype.constructor = xB; + xB.prototype.$x = xB; + xB.ay = {}; + b.btConvexHullShape = xB; + xB.prototype.addPoint = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + void 0 === c ? Xm(d, a) : Ym(d, a, c) + } + ; + xB.prototype.setMargin = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Zm(c, a) + } + ; + xB.prototype.getMargin = function() { + return $m(this.Zx) + } + ; + xB.prototype.getNumVertices = function() { + return an(this.Zx) + } + ; + xB.prototype.initializePolyhedralFeatures = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + return !!bn(c, a) + } + ; + xB.prototype.recalcLocalAabb = function() { + cn(this.Zx) + } + ; + xB.prototype.getConvexPolyhedron = function() { + return k(dn(this.Zx), yB) + } + ; + xB.prototype.setLocalScaling = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + en(c, a) + } + ; + xB.prototype.getLocalScaling = function() { + return k(fn(this.Zx), p) + } + ; + xB.prototype.calculateLocalInertia = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + gn(d, a, c) + } + ; + xB.prototype.__destroy__ = function() { + hn(this.Zx) + } + ; + function K() { + this.Zx = jn(); + h(K)[this.Zx] = this + } + K.prototype = Object.create(g.prototype); + K.prototype.constructor = K; + K.prototype.$x = K; + K.ay = {}; + b.btVehicleTuning = K; + K.prototype.get_m_suspensionStiffness = K.prototype.ny = function() { + return kn(this.Zx) + } + ; + K.prototype.set_m_suspensionStiffness = K.prototype.uy = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + ln(c, a) + } + ; + Object.defineProperty(K.prototype, "m_suspensionStiffness", { + get: K.prototype.ny, + set: K.prototype.uy + }); + K.prototype.get_m_suspensionCompression = K.prototype.PA = function() { + return mn(this.Zx) + } + ; + K.prototype.set_m_suspensionCompression = K.prototype.vD = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + nn(c, a) + } + ; + Object.defineProperty(K.prototype, "m_suspensionCompression", { + get: K.prototype.PA, + set: K.prototype.vD + }); + K.prototype.get_m_suspensionDamping = K.prototype.QA = function() { + return on(this.Zx) + } + ; + K.prototype.set_m_suspensionDamping = K.prototype.wD = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + pn(c, a) + } + ; + Object.defineProperty(K.prototype, "m_suspensionDamping", { + get: K.prototype.QA, + set: K.prototype.wD + }); + K.prototype.get_m_maxSuspensionTravelCm = K.prototype.my = function() { + return qn(this.Zx) + } + ; + K.prototype.set_m_maxSuspensionTravelCm = K.prototype.ty = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + rn(c, a) + } + ; + Object.defineProperty(K.prototype, "m_maxSuspensionTravelCm", { + get: K.prototype.my, + set: K.prototype.ty + }); + K.prototype.get_m_frictionSlip = K.prototype.iy = function() { + return sn(this.Zx) + } + ; + K.prototype.set_m_frictionSlip = K.prototype.py = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + tn(c, a) + } + ; + Object.defineProperty(K.prototype, "m_frictionSlip", { + get: K.prototype.iy, + set: K.prototype.py + }); + K.prototype.get_m_maxSuspensionForce = K.prototype.ly = function() { + return un(this.Zx) + } + ; + K.prototype.set_m_maxSuspensionForce = K.prototype.sy = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + vn(c, a) + } + ; + Object.defineProperty(K.prototype, "m_maxSuspensionForce", { + get: K.prototype.ly, + set: K.prototype.sy + }); + function zB() { + throw "cannot construct a btCollisionObjectWrapper, no constructor in IDL"; + } + zB.prototype = Object.create(g.prototype); + zB.prototype.constructor = zB; + zB.prototype.$x = zB; + zB.ay = {}; + b.btCollisionObjectWrapper = zB; + zB.prototype.getWorldTransform = function() { + return k(wn(this.Zx), r) + } + ; + zB.prototype.getCollisionObject = function() { + return k(xn(this.Zx), q) + } + ; + zB.prototype.getCollisionShape = function() { + return k(yn(this.Zx), n) + } + ; + function AB(a) { + a && "object" === typeof a && (a = a.Zx); + this.Zx = zn(a); + h(AB)[this.Zx] = this + } + AB.prototype = Object.create(g.prototype); + AB.prototype.constructor = AB; + AB.prototype.$x = AB; + AB.ay = {}; + b.btShapeHull = AB; + AB.prototype.buildHull = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + return !!An(c, a) + } + ; + AB.prototype.numVertices = function() { + return Bn(this.Zx) + } + ; + AB.prototype.getVertexPointer = function() { + return k(Cn(this.Zx), p) + } + ; + AB.prototype.__destroy__ = function() { + Dn(this.Zx) + } + ; + function BB(a, c) { + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + this.Zx = void 0 === a ? En() : void 0 === c ? Fn(a) : Gn(a, c); + h(BB)[this.Zx] = this + } + BB.prototype = Object.create(YA.prototype); + BB.prototype.constructor = BB; + BB.prototype.$x = BB; + BB.ay = {}; + b.btDefaultMotionState = BB; + BB.prototype.getWorldTransform = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Hn(c, a) + } + ; + BB.prototype.setWorldTransform = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + In(c, a) + } + ; + BB.prototype.get_m_graphicsWorldTrans = BB.prototype.Tz = function() { + return k(Jn(this.Zx), r) + } + ; + BB.prototype.set_m_graphicsWorldTrans = BB.prototype.zC = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Kn(c, a) + } + ; + Object.defineProperty(BB.prototype, "m_graphicsWorldTrans", { + get: BB.prototype.Tz, + set: BB.prototype.zC + }); + BB.prototype.__destroy__ = function() { + Ln(this.Zx) + } + ; + function L(a) { + a && "object" === typeof a && (a = a.Zx); + this.Zx = Mn(a); + h(L)[this.Zx] = this + } + L.prototype = Object.create(g.prototype); + L.prototype.constructor = L; + L.prototype.$x = L; + L.ay = {}; + b.btWheelInfo = L; + L.prototype.getSuspensionRestLength = function() { + return Nn(this.Zx) + } + ; + L.prototype.updateWheel = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + On(d, a, c) + } + ; + L.prototype.get_m_suspensionStiffness = L.prototype.ny = function() { + return Pn(this.Zx) + } + ; + L.prototype.set_m_suspensionStiffness = L.prototype.uy = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Qn(c, a) + } + ; + Object.defineProperty(L.prototype, "m_suspensionStiffness", { + get: L.prototype.ny, + set: L.prototype.uy + }); + L.prototype.get_m_frictionSlip = L.prototype.iy = function() { + return Rn(this.Zx) + } + ; + L.prototype.set_m_frictionSlip = L.prototype.py = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Sn(c, a) + } + ; + Object.defineProperty(L.prototype, "m_frictionSlip", { + get: L.prototype.iy, + set: L.prototype.py + }); + L.prototype.get_m_engineForce = L.prototype.Oz = function() { + return Tn(this.Zx) + } + ; + L.prototype.set_m_engineForce = L.prototype.uC = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Un(c, a) + } + ; + Object.defineProperty(L.prototype, "m_engineForce", { + get: L.prototype.Oz, + set: L.prototype.uC + }); + L.prototype.get_m_rollInfluence = L.prototype.FA = function() { + return Vn(this.Zx) + } + ; + L.prototype.set_m_rollInfluence = L.prototype.lD = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Wn(c, a) + } + ; + Object.defineProperty(L.prototype, "m_rollInfluence", { + get: L.prototype.FA, + set: L.prototype.lD + }); + L.prototype.get_m_suspensionRestLength1 = L.prototype.UA = function() { + return Xn(this.Zx) + } + ; + L.prototype.set_m_suspensionRestLength1 = L.prototype.AD = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Yn(c, a) + } + ; + Object.defineProperty(L.prototype, "m_suspensionRestLength1", { + get: L.prototype.UA, + set: L.prototype.AD + }); + L.prototype.get_m_wheelsRadius = L.prototype.hB = function() { + return Zn(this.Zx) + } + ; + L.prototype.set_m_wheelsRadius = L.prototype.OD = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + $n(c, a) + } + ; + Object.defineProperty(L.prototype, "m_wheelsRadius", { + get: L.prototype.hB, + set: L.prototype.OD + }); + L.prototype.get_m_wheelsDampingCompression = L.prototype.By = function() { + return ao(this.Zx) + } + ; + L.prototype.set_m_wheelsDampingCompression = L.prototype.Iy = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + bo(c, a) + } + ; + Object.defineProperty(L.prototype, "m_wheelsDampingCompression", { + get: L.prototype.By, + set: L.prototype.Iy + }); + L.prototype.get_m_wheelsDampingRelaxation = L.prototype.Cy = function() { + return co(this.Zx) + } + ; + L.prototype.set_m_wheelsDampingRelaxation = L.prototype.Jy = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + eo(c, a) + } + ; + Object.defineProperty(L.prototype, "m_wheelsDampingRelaxation", { + get: L.prototype.Cy, + set: L.prototype.Jy + }); + L.prototype.get_m_steering = L.prototype.NA = function() { + return fo(this.Zx) + } + ; + L.prototype.set_m_steering = L.prototype.tD = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + go(c, a) + } + ; + Object.defineProperty(L.prototype, "m_steering", { + get: L.prototype.NA, + set: L.prototype.tD + }); + L.prototype.get_m_maxSuspensionForce = L.prototype.ly = function() { + return ho(this.Zx) + } + ; + L.prototype.set_m_maxSuspensionForce = L.prototype.sy = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + io(c, a) + } + ; + Object.defineProperty(L.prototype, "m_maxSuspensionForce", { + get: L.prototype.ly, + set: L.prototype.sy + }); + L.prototype.get_m_maxSuspensionTravelCm = L.prototype.my = function() { + return jo(this.Zx) + } + ; + L.prototype.set_m_maxSuspensionTravelCm = L.prototype.ty = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + ko(c, a) + } + ; + Object.defineProperty(L.prototype, "m_maxSuspensionTravelCm", { + get: L.prototype.my, + set: L.prototype.ty + }); + L.prototype.get_m_wheelsSuspensionForce = L.prototype.iB = function() { + return lo(this.Zx) + } + ; + L.prototype.set_m_wheelsSuspensionForce = L.prototype.PD = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + mo(c, a) + } + ; + Object.defineProperty(L.prototype, "m_wheelsSuspensionForce", { + get: L.prototype.iB, + set: L.prototype.PD + }); + L.prototype.get_m_bIsFrontWheel = L.prototype.wy = function() { + return !!no(this.Zx) + } + ; + L.prototype.set_m_bIsFrontWheel = L.prototype.Dy = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + oo(c, a) + } + ; + Object.defineProperty(L.prototype, "m_bIsFrontWheel", { + get: L.prototype.wy, + set: L.prototype.Dy + }); + L.prototype.get_m_raycastInfo = L.prototype.DA = function() { + return k(po(this.Zx), M) + } + ; + L.prototype.set_m_raycastInfo = L.prototype.jD = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + qo(c, a) + } + ; + Object.defineProperty(L.prototype, "m_raycastInfo", { + get: L.prototype.DA, + set: L.prototype.jD + }); + L.prototype.get_m_chassisConnectionPointCS = L.prototype.zz = function() { + return k(ro(this.Zx), p) + } + ; + L.prototype.set_m_chassisConnectionPointCS = L.prototype.fC = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + so(c, a) + } + ; + Object.defineProperty(L.prototype, "m_chassisConnectionPointCS", { + get: L.prototype.zz, + set: L.prototype.fC + }); + L.prototype.get_m_worldTransform = L.prototype.jB = function() { + return k(to(this.Zx), r) + } + ; + L.prototype.set_m_worldTransform = L.prototype.QD = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + uo(c, a) + } + ; + Object.defineProperty(L.prototype, "m_worldTransform", { + get: L.prototype.jB, + set: L.prototype.QD + }); + L.prototype.get_m_wheelDirectionCS = L.prototype.Ay = function() { + return k(vo(this.Zx), p) + } + ; + L.prototype.set_m_wheelDirectionCS = L.prototype.Hy = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + wo(c, a) + } + ; + Object.defineProperty(L.prototype, "m_wheelDirectionCS", { + get: L.prototype.Ay, + set: L.prototype.Hy + }); + L.prototype.get_m_wheelAxleCS = L.prototype.zy = function() { + return k(xo(this.Zx), p) + } + ; + L.prototype.set_m_wheelAxleCS = L.prototype.Gy = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + yo(c, a) + } + ; + Object.defineProperty(L.prototype, "m_wheelAxleCS", { + get: L.prototype.zy, + set: L.prototype.Gy + }); + L.prototype.get_m_rotation = L.prototype.HA = function() { + return zo(this.Zx) + } + ; + L.prototype.set_m_rotation = L.prototype.nD = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Ao(c, a) + } + ; + Object.defineProperty(L.prototype, "m_rotation", { + get: L.prototype.HA, + set: L.prototype.nD + }); + L.prototype.get_m_deltaRotation = L.prototype.Iz = function() { + return Bo(this.Zx) + } + ; + L.prototype.set_m_deltaRotation = L.prototype.oC = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Co(c, a) + } + ; + Object.defineProperty(L.prototype, "m_deltaRotation", { + get: L.prototype.Iz, + set: L.prototype.oC + }); + L.prototype.get_m_brake = L.prototype.rz = function() { + return Do(this.Zx) + } + ; + L.prototype.set_m_brake = L.prototype.ZB = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Eo(c, a) + } + ; + Object.defineProperty(L.prototype, "m_brake", { + get: L.prototype.rz, + set: L.prototype.ZB + }); + L.prototype.get_m_clippedInvContactDotSuspension = L.prototype.Az = function() { + return Fo(this.Zx) + } + ; + L.prototype.set_m_clippedInvContactDotSuspension = L.prototype.gC = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Go(c, a) + } + ; + Object.defineProperty(L.prototype, "m_clippedInvContactDotSuspension", { + get: L.prototype.Az, + set: L.prototype.gC + }); + L.prototype.get_m_suspensionRelativeVelocity = L.prototype.SA = function() { + return Ho(this.Zx) + } + ; + L.prototype.set_m_suspensionRelativeVelocity = L.prototype.yD = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Io(c, a) + } + ; + Object.defineProperty(L.prototype, "m_suspensionRelativeVelocity", { + get: L.prototype.SA, + set: L.prototype.yD + }); + L.prototype.get_m_skidInfo = L.prototype.KA = function() { + return Jo(this.Zx) + } + ; + L.prototype.set_m_skidInfo = L.prototype.qD = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Ko(c, a) + } + ; + Object.defineProperty(L.prototype, "m_skidInfo", { + get: L.prototype.KA, + set: L.prototype.qD + }); + L.prototype.__destroy__ = function() { + Lo(this.Zx) + } + ; + function N(a, c, d, e) { + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + e && "object" === typeof e && (e = e.Zx); + this.Zx = void 0 === a ? Mo() : void 0 === c ? _emscripten_bind_btVector4_btVector4_1(a) : void 0 === d ? _emscripten_bind_btVector4_btVector4_2(a, c) : void 0 === e ? _emscripten_bind_btVector4_btVector4_3(a, c, d) : No(a, c, d, e); + h(N)[this.Zx] = this + } + N.prototype = Object.create(p.prototype); + N.prototype.constructor = N; + N.prototype.$x = N; + N.ay = {}; + b.btVector4 = N; + N.prototype.w = function() { + return Oo(this.Zx) + } + ; + N.prototype.setValue = function(a, c, d, e) { + var f = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + e && "object" === typeof e && (e = e.Zx); + Po(f, a, c, d, e) + } + ; + N.prototype.length = N.prototype.length = function() { + return Qo(this.Zx) + } + ; + N.prototype.x = N.prototype.x = function() { + return Ro(this.Zx) + } + ; + N.prototype.y = N.prototype.y = function() { + return So(this.Zx) + } + ; + N.prototype.z = N.prototype.z = function() { + return To(this.Zx) + } + ; + N.prototype.setX = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Uo(c, a) + } + ; + N.prototype.setY = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Vo(c, a) + } + ; + N.prototype.setZ = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Wo(c, a) + } + ; + N.prototype.normalize = N.prototype.normalize = function() { + Xo(this.Zx) + } + ; + N.prototype.rotate = N.prototype.rotate = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + return k(Yo(d, a, c), p) + } + ; + N.prototype.dot = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + return Zo(c, a) + } + ; + N.prototype.op_mul = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + return k($o(c, a), p) + } + ; + N.prototype.op_add = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + return k(ap(c, a), p) + } + ; + N.prototype.op_sub = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + return k(bp(c, a), p) + } + ; + N.prototype.__destroy__ = function() { + cp(this.Zx) + } + ; + function CB() { + this.Zx = dp(); + h(CB)[this.Zx] = this + } + CB.prototype = Object.create(g.prototype); + CB.prototype.constructor = CB; + CB.prototype.$x = CB; + CB.ay = {}; + b.btDefaultCollisionConstructionInfo = CB; + CB.prototype.__destroy__ = function() { + ep(this.Zx) + } + ; + function O() { + throw "cannot construct a Anchor, no constructor in IDL"; + } + O.prototype = Object.create(g.prototype); + O.prototype.constructor = O; + O.prototype.$x = O; + O.ay = {}; + b.Anchor = O; + O.prototype.get_m_node = O.prototype.uA = function() { + return k(fp(this.Zx), Node) + } + ; + O.prototype.set_m_node = O.prototype.aD = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + gp(c, a) + } + ; + Object.defineProperty(O.prototype, "m_node", { + get: O.prototype.uA, + set: O.prototype.aD + }); + O.prototype.get_m_local = O.prototype.nA = function() { + return k(hp(this.Zx), p) + } + ; + O.prototype.set_m_local = O.prototype.UC = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + ip(c, a) + } + ; + Object.defineProperty(O.prototype, "m_local", { + get: O.prototype.nA, + set: O.prototype.UC + }); + O.prototype.get_m_body = O.prototype.qz = function() { + return k(jp(this.Zx), I) + } + ; + O.prototype.set_m_body = O.prototype.YB = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + kp(c, a) + } + ; + Object.defineProperty(O.prototype, "m_body", { + get: O.prototype.qz, + set: O.prototype.YB + }); + O.prototype.get_m_influence = O.prototype.gA = function() { + return lp(this.Zx) + } + ; + O.prototype.set_m_influence = O.prototype.NC = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + mp(c, a) + } + ; + Object.defineProperty(O.prototype, "m_influence", { + get: O.prototype.gA, + set: O.prototype.NC + }); + O.prototype.get_m_c0 = O.prototype.uz = function() { + return k(np(this.Zx), aB) + } + ; + O.prototype.set_m_c0 = O.prototype.aC = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + op(c, a) + } + ; + Object.defineProperty(O.prototype, "m_c0", { + get: O.prototype.uz, + set: O.prototype.aC + }); + O.prototype.get_m_c1 = O.prototype.vz = function() { + return k(pp(this.Zx), p) + } + ; + O.prototype.set_m_c1 = O.prototype.bC = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + qp(c, a) + } + ; + Object.defineProperty(O.prototype, "m_c1", { + get: O.prototype.vz, + set: O.prototype.bC + }); + O.prototype.get_m_c2 = O.prototype.wz = function() { + return rp(this.Zx) + } + ; + O.prototype.set_m_c2 = O.prototype.cC = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + sp(c, a) + } + ; + Object.defineProperty(O.prototype, "m_c2", { + get: O.prototype.wz, + set: O.prototype.cC + }); + O.prototype.__destroy__ = function() { + tp(this.Zx) + } + ; + function Q() { + throw "cannot construct a btVehicleRaycasterResult, no constructor in IDL"; + } + Q.prototype = Object.create(g.prototype); + Q.prototype.constructor = Q; + Q.prototype.$x = Q; + Q.ay = {}; + b.btVehicleRaycasterResult = Q; + Q.prototype.get_m_hitPointInWorld = Q.prototype.bA = function() { + return k(up(this.Zx), p) + } + ; + Q.prototype.set_m_hitPointInWorld = Q.prototype.IC = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + vp(c, a) + } + ; + Object.defineProperty(Q.prototype, "m_hitPointInWorld", { + get: Q.prototype.bA, + set: Q.prototype.IC + }); + Q.prototype.get_m_hitNormalInWorld = Q.prototype.$z = function() { + return k(wp(this.Zx), p) + } + ; + Q.prototype.set_m_hitNormalInWorld = Q.prototype.GC = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + xp(c, a) + } + ; + Object.defineProperty(Q.prototype, "m_hitNormalInWorld", { + get: Q.prototype.$z, + set: Q.prototype.GC + }); + Q.prototype.get_m_distFraction = Q.prototype.Lz = function() { + return yp(this.Zx) + } + ; + Q.prototype.set_m_distFraction = Q.prototype.rC = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + zp(c, a) + } + ; + Object.defineProperty(Q.prototype, "m_distFraction", { + get: Q.prototype.Lz, + set: Q.prototype.rC + }); + Q.prototype.__destroy__ = function() { + Ap(this.Zx) + } + ; + function gB() { + throw "cannot construct a btVector3Array, no constructor in IDL"; + } + gB.prototype = Object.create(g.prototype); + gB.prototype.constructor = gB; + gB.prototype.$x = gB; + gB.ay = {}; + b.btVector3Array = gB; + gB.prototype.size = gB.prototype.size = function() { + return Bp(this.Zx) + } + ; + gB.prototype.at = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + return k(Cp(c, a), p) + } + ; + gB.prototype.__destroy__ = function() { + Dp(this.Zx) + } + ; + function DB() { + throw "cannot construct a btConstraintSolver, no constructor in IDL"; + } + DB.prototype = Object.create(g.prototype); + DB.prototype.constructor = DB; + DB.prototype.$x = DB; + DB.ay = {}; + b.btConstraintSolver = DB; + DB.prototype.__destroy__ = function() { + Ep(this.Zx) + } + ; + function R(a, c, d) { + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + this.Zx = Fp(a, c, d); + h(R)[this.Zx] = this + } + R.prototype = Object.create(QA.prototype); + R.prototype.constructor = R; + R.prototype.$x = R; + R.ay = {}; + b.btRaycastVehicle = R; + R.prototype.applyEngineForce = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + Gp(d, a, c) + } + ; + R.prototype.setSteeringValue = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + Hp(d, a, c) + } + ; + R.prototype.getWheelTransformWS = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + return k(Ip(c, a), r) + } + ; + R.prototype.updateWheelTransform = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + Jp(d, a, c) + } + ; + R.prototype.addWheel = function(a, c, d, e, f, m, C) { + var P = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + e && "object" === typeof e && (e = e.Zx); + f && "object" === typeof f && (f = f.Zx); + m && "object" === typeof m && (m = m.Zx); + C && "object" === typeof C && (C = C.Zx); + return k(Kp(P, a, c, d, e, f, m, C), L) + } + ; + R.prototype.getNumWheels = function() { + return Lp(this.Zx) + } + ; + R.prototype.getRigidBody = function() { + return k(Mp(this.Zx), I) + } + ; + R.prototype.getWheelInfo = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + return k(Np(c, a), L) + } + ; + R.prototype.setBrake = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + Op(d, a, c) + } + ; + R.prototype.setCoordinateSystem = function(a, c, d) { + var e = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + Pp(e, a, c, d) + } + ; + R.prototype.getCurrentSpeedKmHour = function() { + return Qp(this.Zx) + } + ; + R.prototype.getChassisWorldTransform = function() { + return k(Rp(this.Zx), r) + } + ; + R.prototype.rayCast = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + return Sp(c, a) + } + ; + R.prototype.updateVehicle = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Tp(c, a) + } + ; + R.prototype.resetSuspension = function() { + Up(this.Zx) + } + ; + R.prototype.getSteeringValue = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + return Vp(c, a) + } + ; + R.prototype.updateWheelTransformsWS = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + void 0 === c ? Wp(d, a) : Xp(d, a, c) + } + ; + R.prototype.setPitchControl = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Yp(c, a) + } + ; + R.prototype.updateSuspension = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Zp(c, a) + } + ; + R.prototype.updateFriction = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + $p(c, a) + } + ; + R.prototype.getRightAxis = function() { + return aq(this.Zx) + } + ; + R.prototype.getUpAxis = function() { + return bq(this.Zx) + } + ; + R.prototype.getForwardAxis = function() { + return cq(this.Zx) + } + ; + R.prototype.getForwardVector = function() { + return k(dq(this.Zx), p) + } + ; + R.prototype.getUserConstraintType = function() { + return eq(this.Zx) + } + ; + R.prototype.setUserConstraintType = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + fq(c, a) + } + ; + R.prototype.setUserConstraintId = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + gq(c, a) + } + ; + R.prototype.getUserConstraintId = function() { + return hq(this.Zx) + } + ; + R.prototype.updateAction = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + iq(d, a, c) + } + ; + R.prototype.__destroy__ = function() { + jq(this.Zx) + } + ; + function EB(a) { + a && "object" === typeof a && (a = a.Zx); + this.Zx = kq(a); + h(EB)[this.Zx] = this + } + EB.prototype = Object.create(TA.prototype); + EB.prototype.constructor = EB; + EB.prototype.$x = EB; + EB.ay = {}; + b.btCylinderShapeX = EB; + EB.prototype.setMargin = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + lq(c, a) + } + ; + EB.prototype.getMargin = function() { + return mq(this.Zx) + } + ; + EB.prototype.setLocalScaling = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + nq(c, a) + } + ; + EB.prototype.getLocalScaling = function() { + return k(oq(this.Zx), p) + } + ; + EB.prototype.calculateLocalInertia = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + pq(d, a, c) + } + ; + EB.prototype.__destroy__ = function() { + qq(this.Zx) + } + ; + function FB(a) { + a && "object" === typeof a && (a = a.Zx); + this.Zx = rq(a); + h(FB)[this.Zx] = this + } + FB.prototype = Object.create(TA.prototype); + FB.prototype.constructor = FB; + FB.prototype.$x = FB; + FB.ay = {}; + b.btCylinderShapeZ = FB; + FB.prototype.setMargin = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + sq(c, a) + } + ; + FB.prototype.getMargin = function() { + return tq(this.Zx) + } + ; + FB.prototype.setLocalScaling = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + uq(c, a) + } + ; + FB.prototype.getLocalScaling = function() { + return k(vq(this.Zx), p) + } + ; + FB.prototype.calculateLocalInertia = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + wq(d, a, c) + } + ; + FB.prototype.__destroy__ = function() { + xq(this.Zx) + } + ; + function yB() { + throw "cannot construct a btConvexPolyhedron, no constructor in IDL"; + } + yB.prototype = Object.create(g.prototype); + yB.prototype.constructor = yB; + yB.prototype.$x = yB; + yB.ay = {}; + b.btConvexPolyhedron = yB; + yB.prototype.get_m_vertices = yB.prototype.dB = function() { + return k(yq(this.Zx), gB) + } + ; + yB.prototype.set_m_vertices = yB.prototype.KD = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + zq(c, a) + } + ; + Object.defineProperty(yB.prototype, "m_vertices", { + get: yB.prototype.dB, + set: yB.prototype.KD + }); + yB.prototype.get_m_faces = yB.prototype.Qz = function() { + return k(Aq(this.Zx), GB) + } + ; + yB.prototype.set_m_faces = yB.prototype.wC = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Bq(c, a) + } + ; + Object.defineProperty(yB.prototype, "m_faces", { + get: yB.prototype.Qz, + set: yB.prototype.wC + }); + yB.prototype.__destroy__ = function() { + Cq(this.Zx) + } + ; + function HB() { + this.Zx = Dq(); + h(HB)[this.Zx] = this + } + HB.prototype = Object.create(g.prototype); + HB.prototype.constructor = HB; + HB.prototype.$x = HB; + HB.ay = {}; + b.btSequentialImpulseConstraintSolver = HB; + HB.prototype.__destroy__ = function() { + Eq(this.Zx) + } + ; + function IB() { + throw "cannot construct a tAnchorArray, no constructor in IDL"; + } + IB.prototype = Object.create(g.prototype); + IB.prototype.constructor = IB; + IB.prototype.$x = IB; + IB.ay = {}; + b.tAnchorArray = IB; + IB.prototype.size = IB.prototype.size = function() { + return Fq(this.Zx) + } + ; + IB.prototype.at = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + return k(Gq(c, a), O) + } + ; + IB.prototype.clear = IB.prototype.clear = function() { + Hq(this.Zx) + } + ; + IB.prototype.push_back = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Iq(c, a) + } + ; + IB.prototype.pop_back = function() { + Jq(this.Zx) + } + ; + IB.prototype.__destroy__ = function() { + Kq(this.Zx) + } + ; + function M() { + throw "cannot construct a RaycastInfo, no constructor in IDL"; + } + M.prototype = Object.create(g.prototype); + M.prototype.constructor = M; + M.prototype.$x = M; + M.ay = {}; + b.RaycastInfo = M; + M.prototype.get_m_contactNormalWS = M.prototype.Cz = function() { + return k(Lq(this.Zx), p) + } + ; + M.prototype.set_m_contactNormalWS = M.prototype.iC = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Mq(c, a) + } + ; + Object.defineProperty(M.prototype, "m_contactNormalWS", { + get: M.prototype.Cz, + set: M.prototype.iC + }); + M.prototype.get_m_contactPointWS = M.prototype.Dz = function() { + return k(Nq(this.Zx), p) + } + ; + M.prototype.set_m_contactPointWS = M.prototype.jC = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Oq(c, a) + } + ; + Object.defineProperty(M.prototype, "m_contactPointWS", { + get: M.prototype.Dz, + set: M.prototype.jC + }); + M.prototype.get_m_suspensionLength = M.prototype.RA = function() { + return Pq(this.Zx) + } + ; + M.prototype.set_m_suspensionLength = M.prototype.xD = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Qq(c, a) + } + ; + Object.defineProperty(M.prototype, "m_suspensionLength", { + get: M.prototype.RA, + set: M.prototype.xD + }); + M.prototype.get_m_hardPointWS = M.prototype.Wz = function() { + return k(Rq(this.Zx), p) + } + ; + M.prototype.set_m_hardPointWS = M.prototype.CC = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Sq(c, a) + } + ; + Object.defineProperty(M.prototype, "m_hardPointWS", { + get: M.prototype.Wz, + set: M.prototype.CC + }); + M.prototype.get_m_wheelDirectionWS = M.prototype.fB = function() { + return k(Tq(this.Zx), p) + } + ; + M.prototype.set_m_wheelDirectionWS = M.prototype.MD = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Uq(c, a) + } + ; + Object.defineProperty(M.prototype, "m_wheelDirectionWS", { + get: M.prototype.fB, + set: M.prototype.MD + }); + M.prototype.get_m_wheelAxleWS = M.prototype.eB = function() { + return k(Vq(this.Zx), p) + } + ; + M.prototype.set_m_wheelAxleWS = M.prototype.LD = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Wq(c, a) + } + ; + Object.defineProperty(M.prototype, "m_wheelAxleWS", { + get: M.prototype.eB, + set: M.prototype.LD + }); + M.prototype.get_m_isInContact = M.prototype.hA = function() { + return !!Xq(this.Zx) + } + ; + M.prototype.set_m_isInContact = M.prototype.OC = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Yq(c, a) + } + ; + Object.defineProperty(M.prototype, "m_isInContact", { + get: M.prototype.hA, + set: M.prototype.OC + }); + M.prototype.get_m_groundObject = M.prototype.Vz = function() { + return Zq(this.Zx) + } + ; + M.prototype.set_m_groundObject = M.prototype.BC = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + $q(c, a) + } + ; + Object.defineProperty(M.prototype, "m_groundObject", { + get: M.prototype.Vz, + set: M.prototype.BC + }); + M.prototype.__destroy__ = function() { + ar(this.Zx) + } + ; + function JB(a, c, d) { + zA(); + a && "object" === typeof a && (a = a.Zx); + "object" == typeof c && (c = DA(c)); + d && "object" === typeof d && (d = d.Zx); + this.Zx = br(a, c, d); + h(JB)[this.Zx] = this + } + JB.prototype = Object.create(n.prototype); + JB.prototype.constructor = JB; + JB.prototype.$x = JB; + JB.ay = {}; + b.btMultiSphereShape = JB; + JB.prototype.setLocalScaling = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + cr(c, a) + } + ; + JB.prototype.getLocalScaling = function() { + return k(dr(this.Zx), p) + } + ; + JB.prototype.calculateLocalInertia = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + er(d, a, c) + } + ; + JB.prototype.__destroy__ = function() { + fr(this.Zx) + } + ; + function S(a, c, d, e) { + zA(); + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + "object" == typeof e && (e = DA(e)); + this.Zx = gr(a, c, d, e); + h(S)[this.Zx] = this + } + S.prototype = Object.create(q.prototype); + S.prototype.constructor = S; + S.prototype.$x = S; + S.ay = {}; + b.btSoftBody = S; + S.prototype.checkLink = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + return !!hr(d, a, c) + } + ; + S.prototype.checkFace = function(a, c, d) { + var e = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + return !!ir(e, a, c, d) + } + ; + S.prototype.appendMaterial = function() { + return k(jr(this.Zx), A) + } + ; + S.prototype.appendNode = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + kr(d, a, c) + } + ; + S.prototype.appendLink = function(a, c, d, e) { + var f = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + e && "object" === typeof e && (e = e.Zx); + lr(f, a, c, d, e) + } + ; + S.prototype.appendFace = function(a, c, d, e) { + var f = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + e && "object" === typeof e && (e = e.Zx); + mr(f, a, c, d, e) + } + ; + S.prototype.appendTetra = function(a, c, d, e, f) { + var m = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + e && "object" === typeof e && (e = e.Zx); + f && "object" === typeof f && (f = f.Zx); + nr(m, a, c, d, e, f) + } + ; + S.prototype.appendAnchor = function(a, c, d, e) { + var f = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + e && "object" === typeof e && (e = e.Zx); + or(f, a, c, d, e) + } + ; + S.prototype.addForce = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + void 0 === c ? pr(d, a) : qr(d, a, c) + } + ; + S.prototype.addAeroForceToNode = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + rr(d, a, c) + } + ; + S.prototype.getTotalMass = function() { + return sr(this.Zx) + } + ; + S.prototype.setTotalMass = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + tr(d, a, c) + } + ; + S.prototype.setMass = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + ur(d, a, c) + } + ; + S.prototype.transform = S.prototype.transform = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + vr(c, a) + } + ; + S.prototype.translate = S.prototype.translate = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + wr(c, a) + } + ; + S.prototype.rotate = S.prototype.rotate = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + xr(c, a) + } + ; + S.prototype.scale = S.prototype.scale = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + yr(c, a) + } + ; + S.prototype.generateClusters = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + return void 0 === c ? zr(d, a) : Ar(d, a, c) + } + ; + S.prototype.generateBendingConstraints = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + return Br(d, a, c) + } + ; + S.prototype.upcast = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + return k(Cr(c, a), S) + } + ; + S.prototype.setAnisotropicFriction = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + Dr(d, a, c) + } + ; + S.prototype.getCollisionShape = function() { + return k(Er(this.Zx), n) + } + ; + S.prototype.setContactProcessingThreshold = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Fr(c, a) + } + ; + S.prototype.setActivationState = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Gr(c, a) + } + ; + S.prototype.forceActivationState = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Hr(c, a) + } + ; + S.prototype.activate = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + void 0 === a ? Ir(c) : Jr(c, a) + } + ; + S.prototype.isActive = function() { + return !!Kr(this.Zx) + } + ; + S.prototype.isKinematicObject = function() { + return !!Lr(this.Zx) + } + ; + S.prototype.isStaticObject = function() { + return !!Mr(this.Zx) + } + ; + S.prototype.isStaticOrKinematicObject = function() { + return !!Nr(this.Zx) + } + ; + S.prototype.getRestitution = function() { + return Or(this.Zx) + } + ; + S.prototype.getFriction = function() { + return Pr(this.Zx) + } + ; + S.prototype.getRollingFriction = function() { + return Qr(this.Zx) + } + ; + S.prototype.setRestitution = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Rr(c, a) + } + ; + S.prototype.setFriction = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Sr(c, a) + } + ; + S.prototype.setRollingFriction = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Tr(c, a) + } + ; + S.prototype.getWorldTransform = function() { + return k(Ur(this.Zx), r) + } + ; + S.prototype.getCollisionFlags = function() { + return Vr(this.Zx) + } + ; + S.prototype.setCollisionFlags = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Wr(c, a) + } + ; + S.prototype.setWorldTransform = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Xr(c, a) + } + ; + S.prototype.setCollisionShape = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Yr(c, a) + } + ; + S.prototype.setCcdMotionThreshold = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Zr(c, a) + } + ; + S.prototype.setCcdSweptSphereRadius = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + $r(c, a) + } + ; + S.prototype.getUserIndex = function() { + return as(this.Zx) + } + ; + S.prototype.setUserIndex = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + bs(c, a) + } + ; + S.prototype.getUserPointer = function() { + return k(cs(this.Zx), JA) + } + ; + S.prototype.setUserPointer = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + ds(c, a) + } + ; + S.prototype.getBroadphaseHandle = function() { + return k(es(this.Zx), t) + } + ; + S.prototype.get_m_cfg = S.prototype.xz = function() { + return k(gs(this.Zx), T) + } + ; + S.prototype.set_m_cfg = S.prototype.dC = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + hs(c, a) + } + ; + Object.defineProperty(S.prototype, "m_cfg", { + get: S.prototype.xz, + set: S.prototype.dC + }); + S.prototype.get_m_nodes = S.prototype.vA = function() { + return k(is(this.Zx), KB) + } + ; + S.prototype.set_m_nodes = S.prototype.bD = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + js(c, a) + } + ; + Object.defineProperty(S.prototype, "m_nodes", { + get: S.prototype.vA, + set: S.prototype.bD + }); + S.prototype.get_m_materials = S.prototype.rA = function() { + return k(ks(this.Zx), hB) + } + ; + S.prototype.set_m_materials = S.prototype.YC = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + ls(c, a) + } + ; + Object.defineProperty(S.prototype, "m_materials", { + get: S.prototype.rA, + set: S.prototype.YC + }); + S.prototype.get_m_anchors = S.prototype.mz = function() { + return k(ms(this.Zx), IB) + } + ; + S.prototype.set_m_anchors = S.prototype.UB = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + ns(c, a) + } + ; + Object.defineProperty(S.prototype, "m_anchors", { + get: S.prototype.mz, + set: S.prototype.UB + }); + S.prototype.__destroy__ = function() { + ps(this.Zx) + } + ; + function LB() { + throw "cannot construct a btIntArray, no constructor in IDL"; + } + LB.prototype = Object.create(g.prototype); + LB.prototype.constructor = LB; + LB.prototype.$x = LB; + LB.ay = {}; + b.btIntArray = LB; + LB.prototype.size = LB.prototype.size = function() { + return qs(this.Zx) + } + ; + LB.prototype.at = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + return rs(c, a) + } + ; + LB.prototype.__destroy__ = function() { + ss(this.Zx) + } + ; + function T() { + throw "cannot construct a Config, no constructor in IDL"; + } + T.prototype = Object.create(g.prototype); + T.prototype.constructor = T; + T.prototype.$x = T; + T.ay = {}; + b.Config = T; + T.prototype.get_kVCF = T.prototype.fz = function() { + return ts(this.Zx) + } + ; + T.prototype.set_kVCF = T.prototype.NB = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + us(c, a) + } + ; + Object.defineProperty(T.prototype, "kVCF", { + get: T.prototype.fz, + set: T.prototype.NB + }); + T.prototype.get_kDP = T.prototype.Ty = function() { + return vs(this.Zx) + } + ; + T.prototype.set_kDP = T.prototype.AB = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + xs(c, a) + } + ; + Object.defineProperty(T.prototype, "kDP", { + get: T.prototype.Ty, + set: T.prototype.AB + }); + T.prototype.get_kDG = T.prototype.Sy = function() { + return ys(this.Zx) + } + ; + T.prototype.set_kDG = T.prototype.zB = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + zs(c, a) + } + ; + Object.defineProperty(T.prototype, "kDG", { + get: T.prototype.Sy, + set: T.prototype.zB + }); + T.prototype.get_kLF = T.prototype.Vy = function() { + return As(this.Zx) + } + ; + T.prototype.set_kLF = T.prototype.CB = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Bs(c, a) + } + ; + Object.defineProperty(T.prototype, "kLF", { + get: T.prototype.Vy, + set: T.prototype.CB + }); + T.prototype.get_kPR = T.prototype.Xy = function() { + return Cs(this.Zx) + } + ; + T.prototype.set_kPR = T.prototype.EB = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Ds(c, a) + } + ; + Object.defineProperty(T.prototype, "kPR", { + get: T.prototype.Xy, + set: T.prototype.EB + }); + T.prototype.get_kVC = T.prototype.ez = function() { + return Es(this.Zx) + } + ; + T.prototype.set_kVC = T.prototype.MB = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Fs(c, a) + } + ; + Object.defineProperty(T.prototype, "kVC", { + get: T.prototype.ez, + set: T.prototype.MB + }); + T.prototype.get_kDF = T.prototype.Ry = function() { + return Gs(this.Zx) + } + ; + T.prototype.set_kDF = T.prototype.yB = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Hs(c, a) + } + ; + Object.defineProperty(T.prototype, "kDF", { + get: T.prototype.Ry, + set: T.prototype.yB + }); + T.prototype.get_kMT = T.prototype.Wy = function() { + return Is(this.Zx) + } + ; + T.prototype.set_kMT = T.prototype.DB = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Js(c, a) + } + ; + Object.defineProperty(T.prototype, "kMT", { + get: T.prototype.Wy, + set: T.prototype.DB + }); + T.prototype.get_kCHR = T.prototype.Qy = function() { + return Ks(this.Zx) + } + ; + T.prototype.set_kCHR = T.prototype.xB = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Ls(c, a) + } + ; + Object.defineProperty(T.prototype, "kCHR", { + get: T.prototype.Qy, + set: T.prototype.xB + }); + T.prototype.get_kKHR = T.prototype.Uy = function() { + return Ms(this.Zx) + } + ; + T.prototype.set_kKHR = T.prototype.BB = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Ns(c, a) + } + ; + Object.defineProperty(T.prototype, "kKHR", { + get: T.prototype.Uy, + set: T.prototype.BB + }); + T.prototype.get_kSHR = T.prototype.Yy = function() { + return Os(this.Zx) + } + ; + T.prototype.set_kSHR = T.prototype.FB = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Ps(c, a) + } + ; + Object.defineProperty(T.prototype, "kSHR", { + get: T.prototype.Yy, + set: T.prototype.FB + }); + T.prototype.get_kAHR = T.prototype.Py = function() { + return Qs(this.Zx) + } + ; + T.prototype.set_kAHR = T.prototype.wB = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Rs(c, a) + } + ; + Object.defineProperty(T.prototype, "kAHR", { + get: T.prototype.Py, + set: T.prototype.wB + }); + T.prototype.get_kSRHR_CL = T.prototype.az = function() { + return Ss(this.Zx) + } + ; + T.prototype.set_kSRHR_CL = T.prototype.IB = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Ts(c, a) + } + ; + Object.defineProperty(T.prototype, "kSRHR_CL", { + get: T.prototype.az, + set: T.prototype.IB + }); + T.prototype.get_kSKHR_CL = T.prototype.Zy = function() { + return Us(this.Zx) + } + ; + T.prototype.set_kSKHR_CL = T.prototype.GB = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Vs(c, a) + } + ; + Object.defineProperty(T.prototype, "kSKHR_CL", { + get: T.prototype.Zy, + set: T.prototype.GB + }); + T.prototype.get_kSSHR_CL = T.prototype.cz = function() { + return Ws(this.Zx) + } + ; + T.prototype.set_kSSHR_CL = T.prototype.KB = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Xs(c, a) + } + ; + Object.defineProperty(T.prototype, "kSSHR_CL", { + get: T.prototype.cz, + set: T.prototype.KB + }); + T.prototype.get_kSR_SPLT_CL = T.prototype.bz = function() { + return Ys(this.Zx) + } + ; + T.prototype.set_kSR_SPLT_CL = T.prototype.JB = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Zs(c, a) + } + ; + Object.defineProperty(T.prototype, "kSR_SPLT_CL", { + get: T.prototype.bz, + set: T.prototype.JB + }); + T.prototype.get_kSK_SPLT_CL = T.prototype.$y = function() { + return $s(this.Zx) + } + ; + T.prototype.set_kSK_SPLT_CL = T.prototype.HB = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + at(c, a) + } + ; + Object.defineProperty(T.prototype, "kSK_SPLT_CL", { + get: T.prototype.$y, + set: T.prototype.HB + }); + T.prototype.get_kSS_SPLT_CL = T.prototype.dz = function() { + return bt(this.Zx) + } + ; + T.prototype.set_kSS_SPLT_CL = T.prototype.LB = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + ct(c, a) + } + ; + Object.defineProperty(T.prototype, "kSS_SPLT_CL", { + get: T.prototype.dz, + set: T.prototype.LB + }); + T.prototype.get_maxvolume = T.prototype.lB = function() { + return dt(this.Zx) + } + ; + T.prototype.set_maxvolume = T.prototype.SD = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + et(c, a) + } + ; + Object.defineProperty(T.prototype, "maxvolume", { + get: T.prototype.lB, + set: T.prototype.SD + }); + T.prototype.get_timescale = T.prototype.nB = function() { + return ft(this.Zx) + } + ; + T.prototype.set_timescale = T.prototype.UD = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + gt(c, a) + } + ; + Object.defineProperty(T.prototype, "timescale", { + get: T.prototype.nB, + set: T.prototype.UD + }); + T.prototype.get_viterations = T.prototype.oB = function() { + return ht(this.Zx) + } + ; + T.prototype.set_viterations = T.prototype.VD = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + it(c, a) + } + ; + Object.defineProperty(T.prototype, "viterations", { + get: T.prototype.oB, + set: T.prototype.VD + }); + T.prototype.get_piterations = T.prototype.mB = function() { + return jt(this.Zx) + } + ; + T.prototype.set_piterations = T.prototype.TD = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + kt(c, a) + } + ; + Object.defineProperty(T.prototype, "piterations", { + get: T.prototype.mB, + set: T.prototype.TD + }); + T.prototype.get_diterations = T.prototype.Oy = function() { + return lt(this.Zx) + } + ; + T.prototype.set_diterations = T.prototype.vB = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + mt(c, a) + } + ; + Object.defineProperty(T.prototype, "diterations", { + get: T.prototype.Oy, + set: T.prototype.vB + }); + T.prototype.get_citerations = T.prototype.My = function() { + return nt(this.Zx) + } + ; + T.prototype.set_citerations = T.prototype.tB = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + ot(c, a) + } + ; + Object.defineProperty(T.prototype, "citerations", { + get: T.prototype.My, + set: T.prototype.tB + }); + T.prototype.get_collisions = T.prototype.Ny = function() { + return pt(this.Zx) + } + ; + T.prototype.set_collisions = T.prototype.uB = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + qt(c, a) + } + ; + Object.defineProperty(T.prototype, "collisions", { + get: T.prototype.Ny, + set: T.prototype.uB + }); + T.prototype.__destroy__ = function() { + rt(this.Zx) + } + ; + function Node() { + throw "cannot construct a Node, no constructor in IDL"; + } + Node.prototype = Object.create(g.prototype); + Node.prototype.constructor = Node; + Node.prototype.$x = Node; + Node.ay = {}; + b.Node = Node; + Node.prototype.get_m_x = Node.prototype.kB = function() { + return k(st(this.Zx), p) + } + ; + Node.prototype.set_m_x = Node.prototype.RD = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + tt(c, a) + } + ; + Object.defineProperty(Node.prototype, "m_x", { + get: Node.prototype.kB, + set: Node.prototype.RD + }); + Node.prototype.get_m_q = Node.prototype.CA = function() { + return k(ut(this.Zx), p) + } + ; + Node.prototype.set_m_q = Node.prototype.iD = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + vt(c, a) + } + ; + Object.defineProperty(Node.prototype, "m_q", { + get: Node.prototype.CA, + set: Node.prototype.iD + }); + Node.prototype.get_m_v = Node.prototype.cB = function() { + return k(wt(this.Zx), p) + } + ; + Node.prototype.set_m_v = Node.prototype.JD = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + xt(c, a) + } + ; + Object.defineProperty(Node.prototype, "m_v", { + get: Node.prototype.cB, + set: Node.prototype.JD + }); + Node.prototype.get_m_f = Node.prototype.Pz = function() { + return k(yt(this.Zx), p) + } + ; + Node.prototype.set_m_f = Node.prototype.vC = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + zt(c, a) + } + ; + Object.defineProperty(Node.prototype, "m_f", { + get: Node.prototype.Pz, + set: Node.prototype.vC + }); + Node.prototype.get_m_n = Node.prototype.tA = function() { + return k(At(this.Zx), p) + } + ; + Node.prototype.set_m_n = Node.prototype.$C = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Bt(c, a) + } + ; + Object.defineProperty(Node.prototype, "m_n", { + get: Node.prototype.tA, + set: Node.prototype.$C + }); + Node.prototype.get_m_im = Node.prototype.dA = function() { + return Ct(this.Zx) + } + ; + Node.prototype.set_m_im = Node.prototype.KC = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Dt(c, a) + } + ; + Object.defineProperty(Node.prototype, "m_im", { + get: Node.prototype.dA, + set: Node.prototype.KC + }); + Node.prototype.get_m_area = Node.prototype.pz = function() { + return Et(this.Zx) + } + ; + Node.prototype.set_m_area = Node.prototype.XB = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Ft(c, a) + } + ; + Object.defineProperty(Node.prototype, "m_area", { + get: Node.prototype.pz, + set: Node.prototype.XB + }); + Node.prototype.__destroy__ = function() { + Gt(this.Zx) + } + ; + function MB() { + this.Zx = Ht(); + h(MB)[this.Zx] = this + } + MB.prototype = Object.create(g.prototype); + MB.prototype.constructor = MB; + MB.prototype.$x = MB; + MB.ay = {}; + b.btGhostPairCallback = MB; + MB.prototype.__destroy__ = function() { + It(this.Zx) + } + ; + function NB() { + throw "cannot construct a btOverlappingPairCallback, no constructor in IDL"; + } + NB.prototype = Object.create(g.prototype); + NB.prototype.constructor = NB; + NB.prototype.$x = NB; + NB.ay = {}; + b.btOverlappingPairCallback = NB; + NB.prototype.__destroy__ = function() { + Jt(this.Zx) + } + ; + function U(a, c, d, e) { + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + e && "object" === typeof e && (e = e.Zx); + this.Zx = void 0 === e ? Kt(a, c, d) : Lt(a, c, d, e); + h(U)[this.Zx] = this + } + U.prototype = Object.create(QA.prototype); + U.prototype.constructor = U; + U.prototype.$x = U; + U.ay = {}; + b.btKinematicCharacterController = U; + U.prototype.setUpAxis = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Mt(c, a) + } + ; + U.prototype.setWalkDirection = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Nt(c, a) + } + ; + U.prototype.setVelocityForTimeInterval = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + Ot(d, a, c) + } + ; + U.prototype.warp = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Pt(c, a) + } + ; + U.prototype.preStep = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Qt(c, a) + } + ; + U.prototype.playerStep = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + Rt(d, a, c) + } + ; + U.prototype.setFallSpeed = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + St(c, a) + } + ; + U.prototype.setJumpSpeed = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Tt(c, a) + } + ; + U.prototype.setMaxJumpHeight = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Ut(c, a) + } + ; + U.prototype.canJump = function() { + return !!Vt(this.Zx) + } + ; + U.prototype.jump = function() { + Wt(this.Zx) + } + ; + U.prototype.setGravity = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Xt(c, a) + } + ; + U.prototype.getGravity = function() { + return Yt(this.Zx) + } + ; + U.prototype.setMaxSlope = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Zt(c, a) + } + ; + U.prototype.getMaxSlope = function() { + return $t(this.Zx) + } + ; + U.prototype.getGhostObject = function() { + return k(au(this.Zx), V) + } + ; + U.prototype.setUseGhostSweepTest = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + bu(c, a) + } + ; + U.prototype.onGround = function() { + return !!cu(this.Zx) + } + ; + U.prototype.setUpInterpolate = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + du(c, a) + } + ; + U.prototype.updateAction = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + eu(d, a, c) + } + ; + U.prototype.__destroy__ = function() { + fu(this.Zx) + } + ; + function OB() { + throw "cannot construct a btSoftBodyArray, no constructor in IDL"; + } + OB.prototype = Object.create(g.prototype); + OB.prototype.constructor = OB; + OB.prototype.$x = OB; + OB.ay = {}; + b.btSoftBodyArray = OB; + OB.prototype.size = OB.prototype.size = function() { + return gu(this.Zx) + } + ; + OB.prototype.at = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + return k(hu(c, a), S) + } + ; + OB.prototype.__destroy__ = function() { + iu(this.Zx) + } + ; + function GB() { + throw "cannot construct a btFaceArray, no constructor in IDL"; + } + GB.prototype = Object.create(g.prototype); + GB.prototype.constructor = GB; + GB.prototype.$x = GB; + GB.ay = {}; + b.btFaceArray = GB; + GB.prototype.size = GB.prototype.size = function() { + return ju(this.Zx) + } + ; + GB.prototype.at = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + return k(ku(c, a), PB) + } + ; + GB.prototype.__destroy__ = function() { + lu(this.Zx) + } + ; + function QB(a, c) { + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + this.Zx = mu(a, c); + h(QB)[this.Zx] = this + } + QB.prototype = Object.create(LA.prototype); + QB.prototype.constructor = QB; + QB.prototype.$x = QB; + QB.ay = {}; + b.btStaticPlaneShape = QB; + QB.prototype.setLocalScaling = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + nu(c, a) + } + ; + QB.prototype.getLocalScaling = function() { + return k(ou(this.Zx), p) + } + ; + QB.prototype.calculateLocalInertia = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + pu(d, a, c) + } + ; + QB.prototype.__destroy__ = function() { + qu(this.Zx) + } + ; + function GA() { + throw "cannot construct a btOverlappingPairCache, no constructor in IDL"; + } + GA.prototype = Object.create(g.prototype); + GA.prototype.constructor = GA; + GA.prototype.$x = GA; + GA.ay = {}; + b.btOverlappingPairCache = GA; + GA.prototype.setInternalGhostPairCallback = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + ru(c, a) + } + ; + GA.prototype.getNumOverlappingPairs = function() { + return su(this.Zx) + } + ; + GA.prototype.__destroy__ = function() { + tu(this.Zx) + } + ; + function mB() { + throw "cannot construct a btIndexedMesh, no constructor in IDL"; + } + mB.prototype = Object.create(g.prototype); + mB.prototype.constructor = mB; + mB.prototype.$x = mB; + mB.ay = {}; + b.btIndexedMesh = mB; + mB.prototype.get_m_numTriangles = mB.prototype.yA = function() { + return uu(this.Zx) + } + ; + mB.prototype.set_m_numTriangles = mB.prototype.eD = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + vu(c, a) + } + ; + Object.defineProperty(mB.prototype, "m_numTriangles", { + get: mB.prototype.yA, + set: mB.prototype.eD + }); + mB.prototype.__destroy__ = function() { + wu(this.Zx) + } + ; + function W(a, c, d, e, f) { + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + e && "object" === typeof e && (e = e.Zx); + f && "object" === typeof f && (f = f.Zx); + this.Zx = xu(a, c, d, e, f); + h(W)[this.Zx] = this + } + W.prototype = Object.create(x.prototype); + W.prototype.constructor = W; + W.prototype.$x = W; + W.ay = {}; + b.btSoftRigidDynamicsWorld = W; + W.prototype.addSoftBody = function(a, c, d) { + var e = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + yu(e, a, c, d) + } + ; + W.prototype.removeSoftBody = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + zu(c, a) + } + ; + W.prototype.removeCollisionObject = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Au(c, a) + } + ; + W.prototype.getWorldInfo = function() { + return k(Bu(this.Zx), J) + } + ; + W.prototype.getSoftBodyArray = function() { + return k(Cu(this.Zx), OB) + } + ; + W.prototype.getDispatcher = function() { + return k(Du(this.Zx), FA) + } + ; + W.prototype.rayTest = function(a, c, d) { + var e = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + Eu(e, a, c, d) + } + ; + W.prototype.getPairCache = function() { + return k(Fu(this.Zx), GA) + } + ; + W.prototype.getDispatchInfo = function() { + return k(Gu(this.Zx), l) + } + ; + W.prototype.addCollisionObject = function(a, c, d) { + var e = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + void 0 === c ? Hu(e, a) : void 0 === d ? Iu(e, a, c) : Ju(e, a, c, d) + } + ; + W.prototype.getBroadphase = function() { + return k(Ku(this.Zx), HA) + } + ; + W.prototype.convexSweepTest = function(a, c, d, e, f) { + var m = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + e && "object" === typeof e && (e = e.Zx); + f && "object" === typeof f && (f = f.Zx); + Lu(m, a, c, d, e, f) + } + ; + W.prototype.contactPairTest = function(a, c, d) { + var e = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + Mu(e, a, c, d) + } + ; + W.prototype.contactTest = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + Nu(d, a, c) + } + ; + W.prototype.updateSingleAabb = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Ou(c, a) + } + ; + W.prototype.setDebugDrawer = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Pu(c, a) + } + ; + W.prototype.getDebugDrawer = function() { + return k(Qu(this.Zx), IA) + } + ; + W.prototype.debugDrawWorld = function() { + Ru(this.Zx) + } + ; + W.prototype.debugDrawObject = function(a, c, d) { + var e = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + Su(e, a, c, d) + } + ; + W.prototype.setGravity = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Tu(c, a) + } + ; + W.prototype.getGravity = function() { + return k(Uu(this.Zx), p) + } + ; + W.prototype.addRigidBody = function(a, c, d) { + var e = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + void 0 === c ? Vu(e, a) : void 0 === d ? _emscripten_bind_btSoftRigidDynamicsWorld_addRigidBody_2(e, a, c) : Wu(e, a, c, d) + } + ; + W.prototype.removeRigidBody = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Xu(c, a) + } + ; + W.prototype.addConstraint = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + void 0 === c ? Yu(d, a) : Zu(d, a, c) + } + ; + W.prototype.removeConstraint = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + $u(c, a) + } + ; + W.prototype.stepSimulation = function(a, c, d) { + var e = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + return void 0 === c ? av(e, a) : void 0 === d ? bv(e, a, c) : cv(e, a, c, d) + } + ; + W.prototype.setContactAddedCallback = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + dv(c, a) + } + ; + W.prototype.setContactProcessedCallback = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + ev(c, a) + } + ; + W.prototype.setContactDestroyedCallback = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + fv(c, a) + } + ; + W.prototype.addAction = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + gv(c, a) + } + ; + W.prototype.removeAction = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + hv(c, a) + } + ; + W.prototype.getSolverInfo = function() { + return k(iv(this.Zx), v) + } + ; + W.prototype.setInternalTickCallback = function(a, c, d) { + var e = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + void 0 === c ? jv(e, a) : void 0 === d ? kv(e, a, c) : lv(e, a, c, d) + } + ; + W.prototype.__destroy__ = function() { + mv(this.Zx) + } + ; + function RB(a, c, d, e) { + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + e && "object" === typeof e && (e = e.Zx); + this.Zx = nv(a, c, d, e); + h(RB)[this.Zx] = this + } + RB.prototype = Object.create(KA.prototype); + RB.prototype.constructor = RB; + RB.prototype.$x = RB; + RB.ay = {}; + b.btFixedConstraint = RB; + RB.prototype.enableFeedback = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + ov(c, a) + } + ; + RB.prototype.getBreakingImpulseThreshold = function() { + return pv(this.Zx) + } + ; + RB.prototype.setBreakingImpulseThreshold = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + qv(c, a) + } + ; + RB.prototype.getParam = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + return rv(d, a, c) + } + ; + RB.prototype.setParam = function(a, c, d) { + var e = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + sv(e, a, c, d) + } + ; + RB.prototype.__destroy__ = function() { + tv(this.Zx) + } + ; + function r(a, c) { + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + this.Zx = void 0 === a ? uv() : void 0 === c ? _emscripten_bind_btTransform_btTransform_1(a) : vv(a, c); + h(r)[this.Zx] = this + } + r.prototype = Object.create(g.prototype); + r.prototype.constructor = r; + r.prototype.$x = r; + r.ay = {}; + b.btTransform = r; + r.prototype.setIdentity = function() { + wv(this.Zx) + } + ; + r.prototype.setOrigin = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + xv(c, a) + } + ; + r.prototype.setRotation = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + yv(c, a) + } + ; + r.prototype.getOrigin = function() { + return k(zv(this.Zx), p) + } + ; + r.prototype.getRotation = function() { + return k(Av(this.Zx), X) + } + ; + r.prototype.getBasis = function() { + return k(Bv(this.Zx), aB) + } + ; + r.prototype.setFromOpenGLMatrix = function(a) { + var c = this.Zx; + zA(); + "object" == typeof a && (a = DA(a)); + Cv(c, a) + } + ; + r.prototype.inverse = r.prototype.inverse = function() { + return k(Dv(this.Zx), r) + } + ; + r.prototype.op_mul = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + return k(Ev(c, a), r) + } + ; + r.prototype.__destroy__ = function() { + Fv(this.Zx) + } + ; + function Y(a, c) { + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + this.Zx = Gv(a, c); + h(Y)[this.Zx] = this + } + Y.prototype = Object.create(z.prototype); + Y.prototype.constructor = Y; + Y.prototype.$x = Y; + Y.ay = {}; + b.ClosestRayResultCallback = Y; + Y.prototype.hasHit = function() { + return !!Hv(this.Zx) + } + ; + Y.prototype.get_m_rayFromWorld = Y.prototype.xy = function() { + return k(Iv(this.Zx), p) + } + ; + Y.prototype.set_m_rayFromWorld = Y.prototype.Ey = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Jv(c, a) + } + ; + Object.defineProperty(Y.prototype, "m_rayFromWorld", { + get: Y.prototype.xy, + set: Y.prototype.Ey + }); + Y.prototype.get_m_rayToWorld = Y.prototype.yy = function() { + return k(Kv(this.Zx), p) + } + ; + Y.prototype.set_m_rayToWorld = Y.prototype.Fy = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Lv(c, a) + } + ; + Object.defineProperty(Y.prototype, "m_rayToWorld", { + get: Y.prototype.yy, + set: Y.prototype.Fy + }); + Y.prototype.get_m_hitNormalWorld = Y.prototype.jy = function() { + return k(Mv(this.Zx), p) + } + ; + Y.prototype.set_m_hitNormalWorld = Y.prototype.qy = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Nv(c, a) + } + ; + Object.defineProperty(Y.prototype, "m_hitNormalWorld", { + get: Y.prototype.jy, + set: Y.prototype.qy + }); + Y.prototype.get_m_hitPointWorld = Y.prototype.ky = function() { + return k(Ov(this.Zx), p) + } + ; + Y.prototype.set_m_hitPointWorld = Y.prototype.ry = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Pv(c, a) + } + ; + Object.defineProperty(Y.prototype, "m_hitPointWorld", { + get: Y.prototype.ky, + set: Y.prototype.ry + }); + Y.prototype.get_m_collisionFilterGroup = Y.prototype.by = function() { + return Qv(this.Zx) + } + ; + Y.prototype.set_m_collisionFilterGroup = Y.prototype.dy = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Rv(c, a) + } + ; + Object.defineProperty(Y.prototype, "m_collisionFilterGroup", { + get: Y.prototype.by, + set: Y.prototype.dy + }); + Y.prototype.get_m_collisionFilterMask = Y.prototype.cy = function() { + return Sv(this.Zx) + } + ; + Y.prototype.set_m_collisionFilterMask = Y.prototype.ey = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Tv(c, a) + } + ; + Object.defineProperty(Y.prototype, "m_collisionFilterMask", { + get: Y.prototype.cy, + set: Y.prototype.ey + }); + Y.prototype.get_m_closestHitFraction = Y.prototype.fy = function() { + return Uv(this.Zx) + } + ; + Y.prototype.set_m_closestHitFraction = Y.prototype.gy = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Vv(c, a) + } + ; + Object.defineProperty(Y.prototype, "m_closestHitFraction", { + get: Y.prototype.fy, + set: Y.prototype.gy + }); + Y.prototype.get_m_collisionObject = Y.prototype.hy = function() { + return k(Wv(this.Zx), q) + } + ; + Y.prototype.set_m_collisionObject = Y.prototype.oy = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Xv(c, a) + } + ; + Object.defineProperty(Y.prototype, "m_collisionObject", { + get: Y.prototype.hy, + set: Y.prototype.oy + }); + Y.prototype.__destroy__ = function() { + Yv(this.Zx) + } + ; + function SB(a) { + a && "object" === typeof a && (a = a.Zx); + this.Zx = void 0 === a ? Zv() : $v(a); + h(SB)[this.Zx] = this + } + SB.prototype = Object.create(NA.prototype); + SB.prototype.constructor = SB; + SB.prototype.$x = SB; + SB.ay = {}; + b.btSoftBodyRigidBodyCollisionConfiguration = SB; + SB.prototype.__destroy__ = function() { + aw(this.Zx) + } + ; + function TB() { + this.Zx = bw(); + h(TB)[this.Zx] = this + } + TB.prototype = Object.create(ZA.prototype); + TB.prototype.constructor = TB; + TB.prototype.$x = TB; + TB.ay = {}; + b.ConcreteContactResultCallback = TB; + TB.prototype.addSingleResult = function(a, c, d, e, f, m, C) { + var P = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + e && "object" === typeof e && (e = e.Zx); + f && "object" === typeof f && (f = f.Zx); + m && "object" === typeof m && (m = m.Zx); + C && "object" === typeof C && (C = C.Zx); + return cw(P, a, c, d, e, f, m, C) + } + ; + TB.prototype.__destroy__ = function() { + dw(this.Zx) + } + ; + function UB(a, c, d) { + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + this.Zx = void 0 === d ? ew(a, c) : fw(a, c, d); + h(UB)[this.Zx] = this + } + UB.prototype = Object.create(OA.prototype); + UB.prototype.constructor = UB; + UB.prototype.$x = UB; + UB.ay = {}; + b.btBvhTriangleMeshShape = UB; + UB.prototype.setLocalScaling = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + gw(c, a) + } + ; + UB.prototype.getLocalScaling = function() { + return k(hw(this.Zx), p) + } + ; + UB.prototype.calculateLocalInertia = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + iw(d, a, c) + } + ; + UB.prototype.__destroy__ = function() { + jw(this.Zx) + } + ; + function fB() { + throw "cannot construct a btConstCollisionObjectArray, no constructor in IDL"; + } + fB.prototype = Object.create(g.prototype); + fB.prototype.constructor = fB; + fB.prototype.$x = fB; + fB.ay = {}; + b.btConstCollisionObjectArray = fB; + fB.prototype.size = fB.prototype.size = function() { + return kw(this.Zx) + } + ; + fB.prototype.at = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + return k(lw(c, a), q) + } + ; + fB.prototype.__destroy__ = function() { + mw(this.Zx) + } + ; + function VB(a, c, d, e, f) { + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + e && "object" === typeof e && (e = e.Zx); + f && "object" === typeof f && (f = f.Zx); + this.Zx = void 0 === e ? nw(a, c, d) : void 0 === f ? _emscripten_bind_btSliderConstraint_btSliderConstraint_4(a, c, d, e) : ow(a, c, d, e, f); + h(VB)[this.Zx] = this + } + VB.prototype = Object.create(KA.prototype); + VB.prototype.constructor = VB; + VB.prototype.$x = VB; + VB.ay = {}; + b.btSliderConstraint = VB; + VB.prototype.setLowerLinLimit = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + pw(c, a) + } + ; + VB.prototype.setUpperLinLimit = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + qw(c, a) + } + ; + VB.prototype.setLowerAngLimit = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + rw(c, a) + } + ; + VB.prototype.setUpperAngLimit = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + sw(c, a) + } + ; + VB.prototype.enableFeedback = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + tw(c, a) + } + ; + VB.prototype.getBreakingImpulseThreshold = function() { + return uw(this.Zx) + } + ; + VB.prototype.setBreakingImpulseThreshold = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + vw(c, a) + } + ; + VB.prototype.getParam = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + return ww(d, a, c) + } + ; + VB.prototype.setParam = function(a, c, d) { + var e = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + xw(e, a, c, d) + } + ; + VB.prototype.__destroy__ = function() { + yw(this.Zx) + } + ; + function V() { + this.Zx = zw(); + h(V)[this.Zx] = this + } + V.prototype = Object.create(w.prototype); + V.prototype.constructor = V; + V.prototype.$x = V; + V.ay = {}; + b.btPairCachingGhostObject = V; + V.prototype.setAnisotropicFriction = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + Aw(d, a, c) + } + ; + V.prototype.getCollisionShape = function() { + return k(Bw(this.Zx), n) + } + ; + V.prototype.setContactProcessingThreshold = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Cw(c, a) + } + ; + V.prototype.setActivationState = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Dw(c, a) + } + ; + V.prototype.forceActivationState = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Ew(c, a) + } + ; + V.prototype.activate = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + void 0 === a ? Fw(c) : Gw(c, a) + } + ; + V.prototype.isActive = function() { + return !!Hw(this.Zx) + } + ; + V.prototype.isKinematicObject = function() { + return !!Iw(this.Zx) + } + ; + V.prototype.isStaticObject = function() { + return !!Jw(this.Zx) + } + ; + V.prototype.isStaticOrKinematicObject = function() { + return !!Kw(this.Zx) + } + ; + V.prototype.getRestitution = function() { + return Lw(this.Zx) + } + ; + V.prototype.getFriction = function() { + return Mw(this.Zx) + } + ; + V.prototype.getRollingFriction = function() { + return Nw(this.Zx) + } + ; + V.prototype.setRestitution = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Ow(c, a) + } + ; + V.prototype.setFriction = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Pw(c, a) + } + ; + V.prototype.setRollingFriction = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Qw(c, a) + } + ; + V.prototype.getWorldTransform = function() { + return k(Rw(this.Zx), r) + } + ; + V.prototype.getCollisionFlags = function() { + return Sw(this.Zx) + } + ; + V.prototype.setCollisionFlags = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Tw(c, a) + } + ; + V.prototype.setWorldTransform = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Uw(c, a) + } + ; + V.prototype.setCollisionShape = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Vw(c, a) + } + ; + V.prototype.setCcdMotionThreshold = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Ww(c, a) + } + ; + V.prototype.setCcdSweptSphereRadius = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Xw(c, a) + } + ; + V.prototype.getUserIndex = function() { + return Yw(this.Zx) + } + ; + V.prototype.setUserIndex = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Zw(c, a) + } + ; + V.prototype.getUserPointer = function() { + return k($w(this.Zx), JA) + } + ; + V.prototype.setUserPointer = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + ax(c, a) + } + ; + V.prototype.getBroadphaseHandle = function() { + return k(bx(this.Zx), t) + } + ; + V.prototype.getNumOverlappingObjects = function() { + return cx(this.Zx) + } + ; + V.prototype.getOverlappingObject = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + return k(dx(c, a), q) + } + ; + V.prototype.__destroy__ = function() { + ex(this.Zx) + } + ; + function E() { + throw "cannot construct a btManifoldPoint, no constructor in IDL"; + } + E.prototype = Object.create(g.prototype); + E.prototype.constructor = E; + E.prototype.$x = E; + E.ay = {}; + b.btManifoldPoint = E; + E.prototype.getPositionWorldOnA = function() { + return k(fx(this.Zx), p) + } + ; + E.prototype.getPositionWorldOnB = function() { + return k(gx(this.Zx), p) + } + ; + E.prototype.getAppliedImpulse = function() { + return hx(this.Zx) + } + ; + E.prototype.getDistance = function() { + return ix(this.Zx) + } + ; + E.prototype.get_m_localPointA = E.prototype.oA = function() { + return k(jx(this.Zx), p) + } + ; + E.prototype.set_m_localPointA = E.prototype.VC = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + kx(c, a) + } + ; + Object.defineProperty(E.prototype, "m_localPointA", { + get: E.prototype.oA, + set: E.prototype.VC + }); + E.prototype.get_m_localPointB = E.prototype.pA = function() { + return k(lx(this.Zx), p) + } + ; + E.prototype.set_m_localPointB = E.prototype.WC = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + mx(c, a) + } + ; + Object.defineProperty(E.prototype, "m_localPointB", { + get: E.prototype.pA, + set: E.prototype.WC + }); + E.prototype.get_m_positionWorldOnB = E.prototype.BA = function() { + return k(nx(this.Zx), p) + } + ; + E.prototype.set_m_positionWorldOnB = E.prototype.hD = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + ox(c, a) + } + ; + Object.defineProperty(E.prototype, "m_positionWorldOnB", { + get: E.prototype.BA, + set: E.prototype.hD + }); + E.prototype.get_m_positionWorldOnA = E.prototype.AA = function() { + return k(px(this.Zx), p) + } + ; + E.prototype.set_m_positionWorldOnA = E.prototype.gD = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + qx(c, a) + } + ; + Object.defineProperty(E.prototype, "m_positionWorldOnA", { + get: E.prototype.AA, + set: E.prototype.gD + }); + E.prototype.get_m_normalWorldOnB = E.prototype.wA = function() { + return k(rx(this.Zx), p) + } + ; + E.prototype.set_m_normalWorldOnB = E.prototype.cD = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + sx(c, a) + } + ; + Object.defineProperty(E.prototype, "m_normalWorldOnB", { + get: E.prototype.wA, + set: E.prototype.cD + }); + E.prototype.get_m_userPersistentData = E.prototype.bB = function() { + return tx(this.Zx) + } + ; + E.prototype.set_m_userPersistentData = E.prototype.ID = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + ux(c, a) + } + ; + Object.defineProperty(E.prototype, "m_userPersistentData", { + get: E.prototype.bB, + set: E.prototype.ID + }); + E.prototype.__destroy__ = function() { + vx(this.Zx) + } + ; + function WB(a, c, d, e) { + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + e && "object" === typeof e && (e = e.Zx); + this.Zx = void 0 === d ? wx(a, c) : void 0 === e ? _emscripten_bind_btPoint2PointConstraint_btPoint2PointConstraint_3(a, c, d) : xx(a, c, d, e); + h(WB)[this.Zx] = this + } + WB.prototype = Object.create(KA.prototype); + WB.prototype.constructor = WB; + WB.prototype.$x = WB; + WB.ay = {}; + b.btPoint2PointConstraint = WB; + WB.prototype.setPivotA = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + yx(c, a) + } + ; + WB.prototype.setPivotB = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + zx(c, a) + } + ; + WB.prototype.getPivotInA = function() { + return k(Ax(this.Zx), p) + } + ; + WB.prototype.getPivotInB = function() { + return k(Bx(this.Zx), p) + } + ; + WB.prototype.enableFeedback = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Cx(c, a) + } + ; + WB.prototype.getBreakingImpulseThreshold = function() { + return Dx(this.Zx) + } + ; + WB.prototype.setBreakingImpulseThreshold = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Ex(c, a) + } + ; + WB.prototype.getParam = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + return Fx(d, a, c) + } + ; + WB.prototype.setParam = function(a, c, d) { + var e = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + Gx(e, a, c, d) + } + ; + WB.prototype.get_m_setting = WB.prototype.IA = function() { + return k(Hx(this.Zx), H) + } + ; + WB.prototype.set_m_setting = WB.prototype.oD = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Ix(c, a) + } + ; + Object.defineProperty(WB.prototype, "m_setting", { + get: WB.prototype.IA, + set: WB.prototype.oD + }); + WB.prototype.__destroy__ = function() { + Jx(this.Zx) + } + ; + function XB() { + this.Zx = Kx(); + h(XB)[this.Zx] = this + } + XB.prototype = Object.create(g.prototype); + XB.prototype.constructor = XB; + XB.prototype.$x = XB; + XB.ay = {}; + b.btSoftBodyHelpers = XB; + XB.prototype.CreateRope = function(a, c, d, e, f) { + var m = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + e && "object" === typeof e && (e = e.Zx); + f && "object" === typeof f && (f = f.Zx); + return k(Lx(m, a, c, d, e, f), S) + } + ; + XB.prototype.CreatePatch = function(a, c, d, e, f, m, C, P, ia) { + var nb = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + e && "object" === typeof e && (e = e.Zx); + f && "object" === typeof f && (f = f.Zx); + m && "object" === typeof m && (m = m.Zx); + C && "object" === typeof C && (C = C.Zx); + P && "object" === typeof P && (P = P.Zx); + ia && "object" === typeof ia && (ia = ia.Zx); + return k(Mx(nb, a, c, d, e, f, m, C, P, ia), S) + } + ; + XB.prototype.CreatePatchUV = function(a, c, d, e, f, m, C, P, ia, nb) { + var Wb = this.Zx; + zA(); + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + e && "object" === typeof e && (e = e.Zx); + f && "object" === typeof f && (f = f.Zx); + m && "object" === typeof m && (m = m.Zx); + C && "object" === typeof C && (C = C.Zx); + P && "object" === typeof P && (P = P.Zx); + ia && "object" === typeof ia && (ia = ia.Zx); + "object" == typeof nb && (nb = DA(nb)); + return k(Nx(Wb, a, c, d, e, f, m, C, P, ia, nb), S) + } + ; + XB.prototype.CreateEllipsoid = function(a, c, d, e) { + var f = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + e && "object" === typeof e && (e = e.Zx); + return k(Ox(f, a, c, d, e), S) + } + ; + XB.prototype.CreateFromTriMesh = function(a, c, d, e, f) { + var m = this.Zx; + zA(); + a && "object" === typeof a && (a = a.Zx); + "object" == typeof c && (c = DA(c)); + if ("object" == typeof d && "object" === typeof d) { + var C = AA(d, Ba); + BA(d, Ba, C); + d = C + } + e && "object" === typeof e && (e = e.Zx); + f && "object" === typeof f && (f = f.Zx); + return k(Px(m, a, c, d, e, f), S) + } + ; + XB.prototype.CreateFromConvexHull = function(a, c, d, e) { + var f = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + e && "object" === typeof e && (e = e.Zx); + return k(Qx(f, a, c, d, e), S) + } + ; + XB.prototype.__destroy__ = function() { + Rx(this.Zx) + } + ; + function t() { + throw "cannot construct a btBroadphaseProxy, no constructor in IDL"; + } + t.prototype = Object.create(g.prototype); + t.prototype.constructor = t; + t.prototype.$x = t; + t.ay = {}; + b.btBroadphaseProxy = t; + t.prototype.get_m_collisionFilterGroup = t.prototype.by = function() { + return Sx(this.Zx) + } + ; + t.prototype.set_m_collisionFilterGroup = t.prototype.dy = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Tx(c, a) + } + ; + Object.defineProperty(t.prototype, "m_collisionFilterGroup", { + get: t.prototype.by, + set: t.prototype.dy + }); + t.prototype.get_m_collisionFilterMask = t.prototype.cy = function() { + return Ux(this.Zx) + } + ; + t.prototype.set_m_collisionFilterMask = t.prototype.ey = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Vx(c, a) + } + ; + Object.defineProperty(t.prototype, "m_collisionFilterMask", { + get: t.prototype.cy, + set: t.prototype.ey + }); + t.prototype.__destroy__ = function() { + Wx(this.Zx) + } + ; + function KB() { + throw "cannot construct a tNodeArray, no constructor in IDL"; + } + KB.prototype = Object.create(g.prototype); + KB.prototype.constructor = KB; + KB.prototype.$x = KB; + KB.ay = {}; + b.tNodeArray = KB; + KB.prototype.size = KB.prototype.size = function() { + return Xx(this.Zx) + } + ; + KB.prototype.at = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + return k(Yx(c, a), Node) + } + ; + KB.prototype.__destroy__ = function() { + Zx(this.Zx) + } + ; + function YB(a) { + a && "object" === typeof a && (a = a.Zx); + this.Zx = $x(a); + h(YB)[this.Zx] = this + } + YB.prototype = Object.create(n.prototype); + YB.prototype.constructor = YB; + YB.prototype.$x = YB; + YB.ay = {}; + b.btBoxShape = YB; + YB.prototype.setMargin = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + ay(c, a) + } + ; + YB.prototype.getMargin = function() { + return by(this.Zx) + } + ; + YB.prototype.setLocalScaling = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + cy(c, a) + } + ; + YB.prototype.getLocalScaling = function() { + return k(dy(this.Zx), p) + } + ; + YB.prototype.calculateLocalInertia = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + ey(d, a, c) + } + ; + YB.prototype.__destroy__ = function() { + fy(this.Zx) + } + ; + function PB() { + throw "cannot construct a btFace, no constructor in IDL"; + } + PB.prototype = Object.create(g.prototype); + PB.prototype.constructor = PB; + PB.prototype.$x = PB; + PB.ay = {}; + b.btFace = PB; + PB.prototype.get_m_indices = PB.prototype.fA = function() { + return k(gy(this.Zx), LB) + } + ; + PB.prototype.set_m_indices = PB.prototype.MC = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + hy(c, a) + } + ; + Object.defineProperty(PB.prototype, "m_indices", { + get: PB.prototype.fA, + set: PB.prototype.MC + }); + PB.prototype.get_m_plane = PB.prototype.zA = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + return iy(c, a) + } + ; + PB.prototype.set_m_plane = PB.prototype.fD = function(a, c) { + var d = this.Zx; + zA(); + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + jy(d, a, c) + } + ; + Object.defineProperty(PB.prototype, "m_plane", { + get: PB.prototype.zA, + set: PB.prototype.fD + }); + PB.prototype.__destroy__ = function() { + ky(this.Zx) + } + ; + function ZB() { + this.Zx = ly(); + h(ZB)[this.Zx] = this + } + ZB.prototype = Object.create(IA.prototype); + ZB.prototype.constructor = ZB; + ZB.prototype.$x = ZB; + ZB.ay = {}; + b.DebugDrawer = ZB; + ZB.prototype.drawLine = function(a, c, d) { + var e = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + my(e, a, c, d) + } + ; + ZB.prototype.drawContactPoint = function(a, c, d, e, f) { + var m = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + e && "object" === typeof e && (e = e.Zx); + f && "object" === typeof f && (f = f.Zx); + ny(m, a, c, d, e, f) + } + ; + ZB.prototype.reportErrorWarning = function(a) { + var c = this.Zx; + zA(); + a = a && "object" === typeof a ? a.Zx : CA(a); + oy(c, a) + } + ; + ZB.prototype.draw3dText = function(a, c) { + var d = this.Zx; + zA(); + a && "object" === typeof a && (a = a.Zx); + c = c && "object" === typeof c ? c.Zx : CA(c); + py(d, a, c) + } + ; + ZB.prototype.setDebugMode = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + qy(c, a) + } + ; + ZB.prototype.getDebugMode = function() { + return ry(this.Zx) + } + ; + ZB.prototype.__destroy__ = function() { + sy(this.Zx) + } + ; + function $B(a, c) { + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + this.Zx = ty(a, c); + h($B)[this.Zx] = this + } + $B.prototype = Object.create(MA.prototype); + $B.prototype.constructor = $B; + $B.prototype.$x = $B; + $B.ay = {}; + b.btCapsuleShapeX = $B; + $B.prototype.setMargin = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + uy(c, a) + } + ; + $B.prototype.getMargin = function() { + return vy(this.Zx) + } + ; + $B.prototype.getUpAxis = function() { + return wy(this.Zx) + } + ; + $B.prototype.getRadius = function() { + return xy(this.Zx) + } + ; + $B.prototype.getHalfHeight = function() { + return yy(this.Zx) + } + ; + $B.prototype.setLocalScaling = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + zy(c, a) + } + ; + $B.prototype.getLocalScaling = function() { + return k(Ay(this.Zx), p) + } + ; + $B.prototype.calculateLocalInertia = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + By(d, a, c) + } + ; + $B.prototype.__destroy__ = function() { + Cy(this.Zx) + } + ; + function X(a, c, d, e) { + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + e && "object" === typeof e && (e = e.Zx); + this.Zx = Dy(a, c, d, e); + h(X)[this.Zx] = this + } + X.prototype = Object.create(SA.prototype); + X.prototype.constructor = X; + X.prototype.$x = X; + X.ay = {}; + b.btQuaternion = X; + X.prototype.setValue = function(a, c, d, e) { + var f = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + e && "object" === typeof e && (e = e.Zx); + Ey(f, a, c, d, e) + } + ; + X.prototype.setEulerZYX = function(a, c, d) { + var e = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + Fy(e, a, c, d) + } + ; + X.prototype.setRotation = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + Gy(d, a, c) + } + ; + X.prototype.normalize = X.prototype.normalize = function() { + Hy(this.Zx) + } + ; + X.prototype.length2 = function() { + return Iy(this.Zx) + } + ; + X.prototype.length = X.prototype.length = function() { + return Jy(this.Zx) + } + ; + X.prototype.dot = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + return Ky(c, a) + } + ; + X.prototype.normalized = function() { + return k(Ly(this.Zx), X) + } + ; + X.prototype.getAxis = function() { + return k(My(this.Zx), p) + } + ; + X.prototype.inverse = X.prototype.inverse = function() { + return k(Ny(this.Zx), X) + } + ; + X.prototype.getAngle = function() { + return Oy(this.Zx) + } + ; + X.prototype.getAngleShortestPath = function() { + return Py(this.Zx) + } + ; + X.prototype.angle = X.prototype.angle = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + return Qy(c, a) + } + ; + X.prototype.angleShortestPath = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + return Ry(c, a) + } + ; + X.prototype.op_add = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + return k(Sy(c, a), X) + } + ; + X.prototype.op_sub = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + return k(Ty(c, a), X) + } + ; + X.prototype.op_mul = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + return k(Uy(c, a), X) + } + ; + X.prototype.op_mulq = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + return k(Vy(c, a), X) + } + ; + X.prototype.op_div = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + return k(Wy(c, a), X) + } + ; + X.prototype.x = X.prototype.x = function() { + return Xy(this.Zx) + } + ; + X.prototype.y = X.prototype.y = function() { + return Yy(this.Zx) + } + ; + X.prototype.z = X.prototype.z = function() { + return Zy(this.Zx) + } + ; + X.prototype.w = function() { + return $y(this.Zx) + } + ; + X.prototype.setX = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + az(c, a) + } + ; + X.prototype.setY = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + bz(c, a) + } + ; + X.prototype.setZ = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + cz(c, a) + } + ; + X.prototype.setW = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + dz(c, a) + } + ; + X.prototype.__destroy__ = function() { + ez(this.Zx) + } + ; + function aC(a, c) { + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + this.Zx = fz(a, c); + h(aC)[this.Zx] = this + } + aC.prototype = Object.create(MA.prototype); + aC.prototype.constructor = aC; + aC.prototype.$x = aC; + aC.ay = {}; + b.btCapsuleShapeZ = aC; + aC.prototype.setMargin = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + gz(c, a) + } + ; + aC.prototype.getMargin = function() { + return hz(this.Zx) + } + ; + aC.prototype.getUpAxis = function() { + return iz(this.Zx) + } + ; + aC.prototype.getRadius = function() { + return jz(this.Zx) + } + ; + aC.prototype.getHalfHeight = function() { + return kz(this.Zx) + } + ; + aC.prototype.setLocalScaling = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + lz(c, a) + } + ; + aC.prototype.getLocalScaling = function() { + return k(mz(this.Zx), p) + } + ; + aC.prototype.calculateLocalInertia = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + nz(d, a, c) + } + ; + aC.prototype.__destroy__ = function() { + oz(this.Zx) + } + ; + function v() { + throw "cannot construct a btContactSolverInfo, no constructor in IDL"; + } + v.prototype = Object.create(g.prototype); + v.prototype.constructor = v; + v.prototype.$x = v; + v.ay = {}; + b.btContactSolverInfo = v; + v.prototype.get_m_splitImpulse = v.prototype.LA = function() { + return !!pz(this.Zx) + } + ; + v.prototype.set_m_splitImpulse = v.prototype.rD = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + qz(c, a) + } + ; + Object.defineProperty(v.prototype, "m_splitImpulse", { + get: v.prototype.LA, + set: v.prototype.rD + }); + v.prototype.get_m_splitImpulsePenetrationThreshold = v.prototype.MA = function() { + return rz(this.Zx) + } + ; + v.prototype.set_m_splitImpulsePenetrationThreshold = v.prototype.sD = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + sz(c, a) + } + ; + Object.defineProperty(v.prototype, "m_splitImpulsePenetrationThreshold", { + get: v.prototype.MA, + set: v.prototype.sD + }); + v.prototype.get_m_numIterations = v.prototype.xA = function() { + return tz(this.Zx) + } + ; + v.prototype.set_m_numIterations = v.prototype.dD = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + uz(c, a) + } + ; + Object.defineProperty(v.prototype, "m_numIterations", { + get: v.prototype.xA, + set: v.prototype.dD + }); + v.prototype.__destroy__ = function() { + vz(this.Zx) + } + ; + function bC(a, c, d, e, f) { + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + e && "object" === typeof e && (e = e.Zx); + f && "object" === typeof f && (f = f.Zx); + this.Zx = void 0 === e ? wz(a, c, d) : void 0 === f ? _emscripten_bind_btGeneric6DofSpringConstraint_btGeneric6DofSpringConstraint_4(a, c, d, e) : xz(a, c, d, e, f); + h(bC)[this.Zx] = this + } + bC.prototype = Object.create(WA.prototype); + bC.prototype.constructor = bC; + bC.prototype.$x = bC; + bC.ay = {}; + b.btGeneric6DofSpringConstraint = bC; + bC.prototype.enableSpring = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + yz(d, a, c) + } + ; + bC.prototype.setStiffness = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + zz(d, a, c) + } + ; + bC.prototype.setDamping = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + Az(d, a, c) + } + ; + bC.prototype.setEquilibriumPoint = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + void 0 === a ? Bz(d) : void 0 === c ? Cz(d, a) : Dz(d, a, c) + } + ; + bC.prototype.setLinearLowerLimit = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Ez(c, a) + } + ; + bC.prototype.setLinearUpperLimit = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Fz(c, a) + } + ; + bC.prototype.setAngularLowerLimit = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Gz(c, a) + } + ; + bC.prototype.setAngularUpperLimit = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Hz(c, a) + } + ; + bC.prototype.getFrameOffsetA = function() { + return k(Iz(this.Zx), r) + } + ; + bC.prototype.enableFeedback = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Jz(c, a) + } + ; + bC.prototype.getBreakingImpulseThreshold = function() { + return Kz(this.Zx) + } + ; + bC.prototype.setBreakingImpulseThreshold = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Lz(c, a) + } + ; + bC.prototype.getParam = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + return Mz(d, a, c) + } + ; + bC.prototype.setParam = function(a, c, d) { + var e = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + Nz(e, a, c, d) + } + ; + bC.prototype.__destroy__ = function() { + Oz(this.Zx) + } + ; + function cC(a) { + a && "object" === typeof a && (a = a.Zx); + this.Zx = Pz(a); + h(cC)[this.Zx] = this + } + cC.prototype = Object.create(n.prototype); + cC.prototype.constructor = cC; + cC.prototype.$x = cC; + cC.ay = {}; + b.btSphereShape = cC; + cC.prototype.setMargin = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Qz(c, a) + } + ; + cC.prototype.getMargin = function() { + return Rz(this.Zx) + } + ; + cC.prototype.setLocalScaling = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Sz(c, a) + } + ; + cC.prototype.getLocalScaling = function() { + return k(Tz(this.Zx), p) + } + ; + cC.prototype.calculateLocalInertia = function(a, c) { + var d = this.Zx; + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + Uz(d, a, c) + } + ; + cC.prototype.__destroy__ = function() { + Vz(this.Zx) + } + ; + function Z(a, c, d, e, f) { + a && "object" === typeof a && (a = a.Zx); + c && "object" === typeof c && (c = c.Zx); + d && "object" === typeof d && (d = d.Zx); + e && "object" === typeof e && (e = e.Zx); + f && "object" === typeof f && (f = f.Zx); + this.Zx = Wz(a, c, d, e, f); + h(Z)[this.Zx] = this + } + Z.prototype = Object.create(g.prototype); + Z.prototype.constructor = Z; + Z.prototype.$x = Z; + Z.ay = {}; + b.LocalConvexResult = Z; + Z.prototype.get_m_hitCollisionObject = Z.prototype.Xz = function() { + return k(Xz(this.Zx), q) + } + ; + Z.prototype.set_m_hitCollisionObject = Z.prototype.DC = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + Yz(c, a) + } + ; + Object.defineProperty(Z.prototype, "m_hitCollisionObject", { + get: Z.prototype.Xz, + set: Z.prototype.DC + }); + Z.prototype.get_m_localShapeInfo = Z.prototype.qA = function() { + return k(Zz(this.Zx), kB) + } + ; + Z.prototype.set_m_localShapeInfo = Z.prototype.XC = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + $z(c, a) + } + ; + Object.defineProperty(Z.prototype, "m_localShapeInfo", { + get: Z.prototype.qA, + set: Z.prototype.XC + }); + Z.prototype.get_m_hitNormalLocal = Z.prototype.aA = function() { + return k(aA(this.Zx), p) + } + ; + Z.prototype.set_m_hitNormalLocal = Z.prototype.HC = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + bA(c, a) + } + ; + Object.defineProperty(Z.prototype, "m_hitNormalLocal", { + get: Z.prototype.aA, + set: Z.prototype.HC + }); + Z.prototype.get_m_hitPointLocal = Z.prototype.cA = function() { + return k(cA(this.Zx), p) + } + ; + Z.prototype.set_m_hitPointLocal = Z.prototype.JC = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + dA(c, a) + } + ; + Object.defineProperty(Z.prototype, "m_hitPointLocal", { + get: Z.prototype.cA, + set: Z.prototype.JC + }); + Z.prototype.get_m_hitFraction = Z.prototype.Yz = function() { + return eA(this.Zx) + } + ; + Z.prototype.set_m_hitFraction = Z.prototype.EC = function(a) { + var c = this.Zx; + a && "object" === typeof a && (a = a.Zx); + fA(c, a) + } + ; + Object.defineProperty(Z.prototype, "m_hitFraction", { + get: Z.prototype.Yz, + set: Z.prototype.EC + }); + Z.prototype.__destroy__ = function() { + gA(this.Zx) + } + ; + (function() { + function a() { + b.BT_CONSTRAINT_ERP = hA(); + b.BT_CONSTRAINT_STOP_ERP = iA(); + b.BT_CONSTRAINT_CFM = jA(); + b.BT_CONSTRAINT_STOP_CFM = kA(); + b.PHY_FLOAT = lA(); + b.PHY_DOUBLE = mA(); + b.PHY_INTEGER = nA(); + b.PHY_SHORT = oA(); + b.PHY_FIXEDPOINT88 = pA(); + b.PHY_UCHAR = qA() + } + La ? a() : Ja.unshift(a) + } + )(); + this.Ammo = b; + + return Ammo + } + ); + } +)(); +if (typeof exports === 'object' && typeof module === 'object') + module.exports = Ammo; +else if (typeof define === 'function' && define['amd']) + define([], function() { + return Ammo; + }); +else if (typeof exports === 'object') + exports["Ammo"] = Ammo; diff --git a/packages/mml-web-playcanvas-standalone/src/wasm/ammo.wasm.wasm b/packages/mml-web-playcanvas-standalone/src/wasm/ammo.wasm.wasm new file mode 100644 index 00000000..d4b49168 Binary files /dev/null and b/packages/mml-web-playcanvas-standalone/src/wasm/ammo.wasm.wasm differ diff --git a/packages/mml-web-playcanvas-standalone/src/wasm/draco.wasm.js b/packages/mml-web-playcanvas-standalone/src/wasm/draco.wasm.js new file mode 100644 index 00000000..bb5b1224 --- /dev/null +++ b/packages/mml-web-playcanvas-standalone/src/wasm/draco.wasm.js @@ -0,0 +1,117 @@ +var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(k){var n=0;return function(){return n>>0,$jscomp.propertyToPolyfillSymbol[h]=$jscomp.IS_SYMBOL_NATIVE? +$jscomp.global.Symbol(h):$jscomp.POLYFILL_PREFIX+l+"$"+h),$jscomp.defineProperty(p,$jscomp.propertyToPolyfillSymbol[h],{configurable:!0,writable:!0,value:n})))}; +$jscomp.polyfill("Promise",function(k){function n(){this.batch_=null}function l(f){return f instanceof h?f:new h(function(q,v){q(f)})}if(k&&(!($jscomp.FORCE_POLYFILL_PROMISE||$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION&&"undefined"===typeof $jscomp.global.PromiseRejectionEvent)||!$jscomp.global.Promise||-1===$jscomp.global.Promise.toString().indexOf("[native code]")))return k;n.prototype.asyncExecute=function(f){if(null==this.batch_){this.batch_=[];var q=this;this.asyncExecuteFunction(function(){q.executeBatch_()})}this.batch_.push(f)}; +var p=$jscomp.global.setTimeout;n.prototype.asyncExecuteFunction=function(f){p(f,0)};n.prototype.executeBatch_=function(){for(;this.batch_&&this.batch_.length;){var f=this.batch_;this.batch_=[];for(var q=0;q=A}},"es6","es3"); +$jscomp.polyfill("Array.prototype.copyWithin",function(k){function n(l){l=Number(l);return Infinity===l||-Infinity===l?l:l|0}return k?k:function(l,p,h){var A=this.length;l=n(l);p=n(p);h=void 0===h?A:n(h);l=0>l?Math.max(A+l,0):Math.min(l,A);p=0>p?Math.max(A+p,0):Math.min(p,A);h=0>h?Math.max(A+h,0):Math.min(h,A);if(lp;)--h in this?this[--l]=this[h]:delete this[--l];return this}},"es6","es3"); +$jscomp.typedArrayCopyWithin=function(k){return k?k:Array.prototype.copyWithin};$jscomp.polyfill("Int8Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Uint8Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Uint8ClampedArray.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Int16Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5"); +$jscomp.polyfill("Uint16Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Int32Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Uint32Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Float32Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Float64Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5"); +var DracoDecoderModule=function(){var k="undefined"!==typeof document&&document.currentScript?document.currentScript.src:void 0;"undefined"!==typeof __filename&&(k=k||__filename);return function(n){function l(e){return a.locateFile?a.locateFile(e,U):U+e}function p(e,b,c){var d=b+c;for(c=b;e[c]&&!(c>=d);)++c;if(16g?d+=String.fromCharCode(g):(g-=65536,d+=String.fromCharCode(55296|g>>10,56320|g&1023))}}else d+=String.fromCharCode(g)}return d}function h(e,b){return e?p(ea,e,b):""}function A(){var e=ja.buffer;a.HEAP8=Y=new Int8Array(e);a.HEAP16=new Int16Array(e);a.HEAP32=ca=new Int32Array(e);a.HEAPU8=ea=new Uint8Array(e);a.HEAPU16=new Uint16Array(e);a.HEAPU32=V=new Uint32Array(e);a.HEAPF32=new Float32Array(e);a.HEAPF64=new Float64Array(e)}function f(e){if(a.onAbort)a.onAbort(e); +e="Aborted("+e+")";da(e);wa=!0;e=new WebAssembly.RuntimeError(e+". Build with -sASSERTIONS for more info.");ka(e);throw e;}function q(e){try{if(e==P&&fa)return new Uint8Array(fa);if(ma)return ma(e);throw"both async and sync fetching of the wasm failed";}catch(b){f(b)}}function v(){if(!fa&&(xa||ha)){if("function"==typeof fetch&&!P.startsWith("file://"))return fetch(P,{credentials:"same-origin"}).then(function(e){if(!e.ok)throw"failed to load wasm binary file at '"+P+"'";return e.arrayBuffer()}).catch(function(){return q(P)}); +if(na)return new Promise(function(e,b){na(P,function(c){e(new Uint8Array(c))},b)})}return Promise.resolve().then(function(){return q(P)})}function z(e){for(;0>2]=b};this.get_type=function(){return V[this.ptr+4>>2]};this.set_destructor=function(b){V[this.ptr+8>>2]=b};this.get_destructor=function(){return V[this.ptr+8>>2]};this.set_refcount=function(b){ca[this.ptr>>2]=b};this.set_caught=function(b){Y[this.ptr+ +12>>0]=b?1:0};this.get_caught=function(){return 0!=Y[this.ptr+12>>0]};this.set_rethrown=function(b){Y[this.ptr+13>>0]=b?1:0};this.get_rethrown=function(){return 0!=Y[this.ptr+13>>0]};this.init=function(b,c){this.set_adjusted_ptr(0);this.set_type(b);this.set_destructor(c);this.set_refcount(0);this.set_caught(!1);this.set_rethrown(!1)};this.add_ref=function(){ca[this.ptr>>2]+=1};this.release_ref=function(){var b=ca[this.ptr>>2];ca[this.ptr>>2]=b-1;return 1===b};this.set_adjusted_ptr=function(b){V[this.ptr+ +16>>2]=b};this.get_adjusted_ptr=function(){return V[this.ptr+16>>2]};this.get_exception_ptr=function(){if(ya(this.get_type()))return V[this.excPtr>>2];var b=this.get_adjusted_ptr();return 0!==b?b:this.excPtr}}function ba(){function e(){if(!la&&(la=!0,a.calledRun=!0,!wa)){za=!0;z(oa);Aa(a);if(a.onRuntimeInitialized)a.onRuntimeInitialized();if(a.postRun)for("function"==typeof a.postRun&&(a.postRun=[a.postRun]);a.postRun.length;)Ba.unshift(a.postRun.shift());z(Ba)}}if(!(0=d?b++:2047>=d?b+=2:55296<=d&&57343>= +d?(b+=4,++c):b+=3}b=Array(b+1);c=0;d=b.length;if(0=u){var X=e.charCodeAt(++g);u=65536+((u&1023)<<10)|X&1023}if(127>=u){if(c>=d)break;b[c++]=u}else{if(2047>=u){if(c+1>=d)break;b[c++]=192|u>>6}else{if(65535>=u){if(c+2>=d)break;b[c++]=224|u>>12}else{if(c+3>=d)break;b[c++]=240|u>>18;b[c++]=128|u>>12&63}b[c++]=128|u>>6&63}b[c++]=128|u&63}}b[c]=0}e=r.alloc(b,Y);r.copy(b,Y,e);return e}return e}function pa(e){if("object"===typeof e){var b= +r.alloc(e,Y);r.copy(e,Y,b);return b}return e}function Z(){throw"cannot construct a VoidPtr, no constructor in IDL";}function S(){this.ptr=Da();x(S)[this.ptr]=this}function Q(){this.ptr=Ea();x(Q)[this.ptr]=this}function W(){this.ptr=Fa();x(W)[this.ptr]=this}function w(){this.ptr=Ga();x(w)[this.ptr]=this}function C(){this.ptr=Ha();x(C)[this.ptr]=this}function F(){this.ptr=Ia();x(F)[this.ptr]=this}function G(){this.ptr=Ja();x(G)[this.ptr]=this}function E(){this.ptr=Ka();x(E)[this.ptr]=this}function T(){this.ptr= +La();x(T)[this.ptr]=this}function B(){throw"cannot construct a Status, no constructor in IDL";}function H(){this.ptr=Ma();x(H)[this.ptr]=this}function I(){this.ptr=Na();x(I)[this.ptr]=this}function J(){this.ptr=Oa();x(J)[this.ptr]=this}function K(){this.ptr=Pa();x(K)[this.ptr]=this}function L(){this.ptr=Qa();x(L)[this.ptr]=this}function M(){this.ptr=Ra();x(M)[this.ptr]=this}function N(){this.ptr=Sa();x(N)[this.ptr]=this}function y(){this.ptr=Ta();x(y)[this.ptr]=this}function m(){this.ptr=Ua();x(m)[this.ptr]= +this}n=void 0===n?{}:n;var a="undefined"!=typeof n?n:{},Aa,ka;a.ready=new Promise(function(e,b){Aa=e;ka=b});var Va=!1,Wa=!1;a.onRuntimeInitialized=function(){Va=!0;if(Wa&&"function"===typeof a.onModuleLoaded)a.onModuleLoaded(a)};a.onModuleParsed=function(){Wa=!0;if(Va&&"function"===typeof a.onModuleLoaded)a.onModuleLoaded(a)};a.isVersionSupported=function(e){if("string"!==typeof e)return!1;e=e.split(".");return 2>e.length||3=e[1]?!0:0!=e[0]||10>>=0;if(2147483648=c;c*=2){var d=b*(1+.2/c);d=Math.min(d,e+100663296);var g=Math;d=Math.max(e,d);g=g.min.call(g,2147483648,d+(65536-d%65536)%65536);a:{d=ja.buffer;try{ja.grow(g-d.byteLength+65535>>>16);A();var u=1;break a}catch(X){}u=void 0}if(u)return!0}return!1},f:function(e){return 52},d:function(e,b,c,d,g){return 70},c:function(e,b,c,d){for(var g=0,u=0;u>2],ab=V[b+4>>2];b+=8;for(var sa=0;sa>2]=g;return 0}};(function(){function e(g,u){a.asm=g.exports;ja=a.asm.h;A();oa.unshift(a.asm.i);aa--;a.monitorRunDependencies&&a.monitorRunDependencies(aa);0==aa&&(null!==ra&&(clearInterval(ra),ra=null),ia&&(g=ia,ia=null,g()))}function b(g){e(g.instance)}function c(g){return v().then(function(u){return WebAssembly.instantiate(u,d)}).then(function(u){return u}).then(g,function(u){da("failed to asynchronously prepare wasm: "+u);f(u)})}var d={a:xd};aa++;a.monitorRunDependencies&&a.monitorRunDependencies(aa); +if(a.instantiateWasm)try{return a.instantiateWasm(d,e)}catch(g){da("Module.instantiateWasm callback failed with error: "+g),ka(g)}(function(){return fa||"function"!=typeof WebAssembly.instantiateStreaming||P.startsWith("data:application/octet-stream;base64,")||P.startsWith("file://")||Ya||"function"!=typeof fetch?c(b):fetch(P,{credentials:"same-origin"}).then(function(g){return WebAssembly.instantiateStreaming(g,d).then(b,function(u){da("wasm streaming compile failed: "+u);da("falling back to ArrayBuffer instantiation"); +return c(b)})})})().catch(ka);return{}})();var bb=a._emscripten_bind_VoidPtr___destroy___0=function(){return(bb=a._emscripten_bind_VoidPtr___destroy___0=a.asm.k).apply(null,arguments)},Da=a._emscripten_bind_DecoderBuffer_DecoderBuffer_0=function(){return(Da=a._emscripten_bind_DecoderBuffer_DecoderBuffer_0=a.asm.l).apply(null,arguments)},cb=a._emscripten_bind_DecoderBuffer_Init_2=function(){return(cb=a._emscripten_bind_DecoderBuffer_Init_2=a.asm.m).apply(null,arguments)},db=a._emscripten_bind_DecoderBuffer___destroy___0= +function(){return(db=a._emscripten_bind_DecoderBuffer___destroy___0=a.asm.n).apply(null,arguments)},Ea=a._emscripten_bind_AttributeTransformData_AttributeTransformData_0=function(){return(Ea=a._emscripten_bind_AttributeTransformData_AttributeTransformData_0=a.asm.o).apply(null,arguments)},eb=a._emscripten_bind_AttributeTransformData_transform_type_0=function(){return(eb=a._emscripten_bind_AttributeTransformData_transform_type_0=a.asm.p).apply(null,arguments)},fb=a._emscripten_bind_AttributeTransformData___destroy___0= +function(){return(fb=a._emscripten_bind_AttributeTransformData___destroy___0=a.asm.q).apply(null,arguments)},Fa=a._emscripten_bind_GeometryAttribute_GeometryAttribute_0=function(){return(Fa=a._emscripten_bind_GeometryAttribute_GeometryAttribute_0=a.asm.r).apply(null,arguments)},gb=a._emscripten_bind_GeometryAttribute___destroy___0=function(){return(gb=a._emscripten_bind_GeometryAttribute___destroy___0=a.asm.s).apply(null,arguments)},Ga=a._emscripten_bind_PointAttribute_PointAttribute_0=function(){return(Ga= +a._emscripten_bind_PointAttribute_PointAttribute_0=a.asm.t).apply(null,arguments)},hb=a._emscripten_bind_PointAttribute_size_0=function(){return(hb=a._emscripten_bind_PointAttribute_size_0=a.asm.u).apply(null,arguments)},ib=a._emscripten_bind_PointAttribute_GetAttributeTransformData_0=function(){return(ib=a._emscripten_bind_PointAttribute_GetAttributeTransformData_0=a.asm.v).apply(null,arguments)},jb=a._emscripten_bind_PointAttribute_attribute_type_0=function(){return(jb=a._emscripten_bind_PointAttribute_attribute_type_0= +a.asm.w).apply(null,arguments)},kb=a._emscripten_bind_PointAttribute_data_type_0=function(){return(kb=a._emscripten_bind_PointAttribute_data_type_0=a.asm.x).apply(null,arguments)},lb=a._emscripten_bind_PointAttribute_num_components_0=function(){return(lb=a._emscripten_bind_PointAttribute_num_components_0=a.asm.y).apply(null,arguments)},mb=a._emscripten_bind_PointAttribute_normalized_0=function(){return(mb=a._emscripten_bind_PointAttribute_normalized_0=a.asm.z).apply(null,arguments)},nb=a._emscripten_bind_PointAttribute_byte_stride_0= +function(){return(nb=a._emscripten_bind_PointAttribute_byte_stride_0=a.asm.A).apply(null,arguments)},ob=a._emscripten_bind_PointAttribute_byte_offset_0=function(){return(ob=a._emscripten_bind_PointAttribute_byte_offset_0=a.asm.B).apply(null,arguments)},pb=a._emscripten_bind_PointAttribute_unique_id_0=function(){return(pb=a._emscripten_bind_PointAttribute_unique_id_0=a.asm.C).apply(null,arguments)},qb=a._emscripten_bind_PointAttribute___destroy___0=function(){return(qb=a._emscripten_bind_PointAttribute___destroy___0= +a.asm.D).apply(null,arguments)},Ha=a._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0=function(){return(Ha=a._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0=a.asm.E).apply(null,arguments)},rb=a._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1=function(){return(rb=a._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1=a.asm.F).apply(null,arguments)},sb=a._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0= +function(){return(sb=a._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0=a.asm.G).apply(null,arguments)},tb=a._emscripten_bind_AttributeQuantizationTransform_min_value_1=function(){return(tb=a._emscripten_bind_AttributeQuantizationTransform_min_value_1=a.asm.H).apply(null,arguments)},ub=a._emscripten_bind_AttributeQuantizationTransform_range_0=function(){return(ub=a._emscripten_bind_AttributeQuantizationTransform_range_0=a.asm.I).apply(null,arguments)},vb=a._emscripten_bind_AttributeQuantizationTransform___destroy___0= +function(){return(vb=a._emscripten_bind_AttributeQuantizationTransform___destroy___0=a.asm.J).apply(null,arguments)},Ia=a._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0=function(){return(Ia=a._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0=a.asm.K).apply(null,arguments)},wb=a._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1=function(){return(wb=a._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1=a.asm.L).apply(null, +arguments)},xb=a._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0=function(){return(xb=a._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0=a.asm.M).apply(null,arguments)},yb=a._emscripten_bind_AttributeOctahedronTransform___destroy___0=function(){return(yb=a._emscripten_bind_AttributeOctahedronTransform___destroy___0=a.asm.N).apply(null,arguments)},Ja=a._emscripten_bind_PointCloud_PointCloud_0=function(){return(Ja=a._emscripten_bind_PointCloud_PointCloud_0=a.asm.O).apply(null, +arguments)},zb=a._emscripten_bind_PointCloud_num_attributes_0=function(){return(zb=a._emscripten_bind_PointCloud_num_attributes_0=a.asm.P).apply(null,arguments)},Ab=a._emscripten_bind_PointCloud_num_points_0=function(){return(Ab=a._emscripten_bind_PointCloud_num_points_0=a.asm.Q).apply(null,arguments)},Bb=a._emscripten_bind_PointCloud___destroy___0=function(){return(Bb=a._emscripten_bind_PointCloud___destroy___0=a.asm.R).apply(null,arguments)},Ka=a._emscripten_bind_Mesh_Mesh_0=function(){return(Ka= +a._emscripten_bind_Mesh_Mesh_0=a.asm.S).apply(null,arguments)},Cb=a._emscripten_bind_Mesh_num_faces_0=function(){return(Cb=a._emscripten_bind_Mesh_num_faces_0=a.asm.T).apply(null,arguments)},Db=a._emscripten_bind_Mesh_num_attributes_0=function(){return(Db=a._emscripten_bind_Mesh_num_attributes_0=a.asm.U).apply(null,arguments)},Eb=a._emscripten_bind_Mesh_num_points_0=function(){return(Eb=a._emscripten_bind_Mesh_num_points_0=a.asm.V).apply(null,arguments)},Fb=a._emscripten_bind_Mesh___destroy___0=function(){return(Fb= +a._emscripten_bind_Mesh___destroy___0=a.asm.W).apply(null,arguments)},La=a._emscripten_bind_Metadata_Metadata_0=function(){return(La=a._emscripten_bind_Metadata_Metadata_0=a.asm.X).apply(null,arguments)},Gb=a._emscripten_bind_Metadata___destroy___0=function(){return(Gb=a._emscripten_bind_Metadata___destroy___0=a.asm.Y).apply(null,arguments)},Hb=a._emscripten_bind_Status_code_0=function(){return(Hb=a._emscripten_bind_Status_code_0=a.asm.Z).apply(null,arguments)},Ib=a._emscripten_bind_Status_ok_0=function(){return(Ib= +a._emscripten_bind_Status_ok_0=a.asm._).apply(null,arguments)},Jb=a._emscripten_bind_Status_error_msg_0=function(){return(Jb=a._emscripten_bind_Status_error_msg_0=a.asm.$).apply(null,arguments)},Kb=a._emscripten_bind_Status___destroy___0=function(){return(Kb=a._emscripten_bind_Status___destroy___0=a.asm.aa).apply(null,arguments)},Ma=a._emscripten_bind_DracoFloat32Array_DracoFloat32Array_0=function(){return(Ma=a._emscripten_bind_DracoFloat32Array_DracoFloat32Array_0=a.asm.ba).apply(null,arguments)}, +Lb=a._emscripten_bind_DracoFloat32Array_GetValue_1=function(){return(Lb=a._emscripten_bind_DracoFloat32Array_GetValue_1=a.asm.ca).apply(null,arguments)},Mb=a._emscripten_bind_DracoFloat32Array_size_0=function(){return(Mb=a._emscripten_bind_DracoFloat32Array_size_0=a.asm.da).apply(null,arguments)},Nb=a._emscripten_bind_DracoFloat32Array___destroy___0=function(){return(Nb=a._emscripten_bind_DracoFloat32Array___destroy___0=a.asm.ea).apply(null,arguments)},Na=a._emscripten_bind_DracoInt8Array_DracoInt8Array_0= +function(){return(Na=a._emscripten_bind_DracoInt8Array_DracoInt8Array_0=a.asm.fa).apply(null,arguments)},Ob=a._emscripten_bind_DracoInt8Array_GetValue_1=function(){return(Ob=a._emscripten_bind_DracoInt8Array_GetValue_1=a.asm.ga).apply(null,arguments)},Pb=a._emscripten_bind_DracoInt8Array_size_0=function(){return(Pb=a._emscripten_bind_DracoInt8Array_size_0=a.asm.ha).apply(null,arguments)},Qb=a._emscripten_bind_DracoInt8Array___destroy___0=function(){return(Qb=a._emscripten_bind_DracoInt8Array___destroy___0= +a.asm.ia).apply(null,arguments)},Oa=a._emscripten_bind_DracoUInt8Array_DracoUInt8Array_0=function(){return(Oa=a._emscripten_bind_DracoUInt8Array_DracoUInt8Array_0=a.asm.ja).apply(null,arguments)},Rb=a._emscripten_bind_DracoUInt8Array_GetValue_1=function(){return(Rb=a._emscripten_bind_DracoUInt8Array_GetValue_1=a.asm.ka).apply(null,arguments)},Sb=a._emscripten_bind_DracoUInt8Array_size_0=function(){return(Sb=a._emscripten_bind_DracoUInt8Array_size_0=a.asm.la).apply(null,arguments)},Tb=a._emscripten_bind_DracoUInt8Array___destroy___0= +function(){return(Tb=a._emscripten_bind_DracoUInt8Array___destroy___0=a.asm.ma).apply(null,arguments)},Pa=a._emscripten_bind_DracoInt16Array_DracoInt16Array_0=function(){return(Pa=a._emscripten_bind_DracoInt16Array_DracoInt16Array_0=a.asm.na).apply(null,arguments)},Ub=a._emscripten_bind_DracoInt16Array_GetValue_1=function(){return(Ub=a._emscripten_bind_DracoInt16Array_GetValue_1=a.asm.oa).apply(null,arguments)},Vb=a._emscripten_bind_DracoInt16Array_size_0=function(){return(Vb=a._emscripten_bind_DracoInt16Array_size_0= +a.asm.pa).apply(null,arguments)},Wb=a._emscripten_bind_DracoInt16Array___destroy___0=function(){return(Wb=a._emscripten_bind_DracoInt16Array___destroy___0=a.asm.qa).apply(null,arguments)},Qa=a._emscripten_bind_DracoUInt16Array_DracoUInt16Array_0=function(){return(Qa=a._emscripten_bind_DracoUInt16Array_DracoUInt16Array_0=a.asm.ra).apply(null,arguments)},Xb=a._emscripten_bind_DracoUInt16Array_GetValue_1=function(){return(Xb=a._emscripten_bind_DracoUInt16Array_GetValue_1=a.asm.sa).apply(null,arguments)}, +Yb=a._emscripten_bind_DracoUInt16Array_size_0=function(){return(Yb=a._emscripten_bind_DracoUInt16Array_size_0=a.asm.ta).apply(null,arguments)},Zb=a._emscripten_bind_DracoUInt16Array___destroy___0=function(){return(Zb=a._emscripten_bind_DracoUInt16Array___destroy___0=a.asm.ua).apply(null,arguments)},Ra=a._emscripten_bind_DracoInt32Array_DracoInt32Array_0=function(){return(Ra=a._emscripten_bind_DracoInt32Array_DracoInt32Array_0=a.asm.va).apply(null,arguments)},$b=a._emscripten_bind_DracoInt32Array_GetValue_1= +function(){return($b=a._emscripten_bind_DracoInt32Array_GetValue_1=a.asm.wa).apply(null,arguments)},ac=a._emscripten_bind_DracoInt32Array_size_0=function(){return(ac=a._emscripten_bind_DracoInt32Array_size_0=a.asm.xa).apply(null,arguments)},bc=a._emscripten_bind_DracoInt32Array___destroy___0=function(){return(bc=a._emscripten_bind_DracoInt32Array___destroy___0=a.asm.ya).apply(null,arguments)},Sa=a._emscripten_bind_DracoUInt32Array_DracoUInt32Array_0=function(){return(Sa=a._emscripten_bind_DracoUInt32Array_DracoUInt32Array_0= +a.asm.za).apply(null,arguments)},cc=a._emscripten_bind_DracoUInt32Array_GetValue_1=function(){return(cc=a._emscripten_bind_DracoUInt32Array_GetValue_1=a.asm.Aa).apply(null,arguments)},dc=a._emscripten_bind_DracoUInt32Array_size_0=function(){return(dc=a._emscripten_bind_DracoUInt32Array_size_0=a.asm.Ba).apply(null,arguments)},ec=a._emscripten_bind_DracoUInt32Array___destroy___0=function(){return(ec=a._emscripten_bind_DracoUInt32Array___destroy___0=a.asm.Ca).apply(null,arguments)},Ta=a._emscripten_bind_MetadataQuerier_MetadataQuerier_0= +function(){return(Ta=a._emscripten_bind_MetadataQuerier_MetadataQuerier_0=a.asm.Da).apply(null,arguments)},fc=a._emscripten_bind_MetadataQuerier_HasEntry_2=function(){return(fc=a._emscripten_bind_MetadataQuerier_HasEntry_2=a.asm.Ea).apply(null,arguments)},gc=a._emscripten_bind_MetadataQuerier_GetIntEntry_2=function(){return(gc=a._emscripten_bind_MetadataQuerier_GetIntEntry_2=a.asm.Fa).apply(null,arguments)},hc=a._emscripten_bind_MetadataQuerier_GetIntEntryArray_3=function(){return(hc=a._emscripten_bind_MetadataQuerier_GetIntEntryArray_3= +a.asm.Ga).apply(null,arguments)},ic=a._emscripten_bind_MetadataQuerier_GetDoubleEntry_2=function(){return(ic=a._emscripten_bind_MetadataQuerier_GetDoubleEntry_2=a.asm.Ha).apply(null,arguments)},jc=a._emscripten_bind_MetadataQuerier_GetStringEntry_2=function(){return(jc=a._emscripten_bind_MetadataQuerier_GetStringEntry_2=a.asm.Ia).apply(null,arguments)},kc=a._emscripten_bind_MetadataQuerier_NumEntries_1=function(){return(kc=a._emscripten_bind_MetadataQuerier_NumEntries_1=a.asm.Ja).apply(null,arguments)}, +lc=a._emscripten_bind_MetadataQuerier_GetEntryName_2=function(){return(lc=a._emscripten_bind_MetadataQuerier_GetEntryName_2=a.asm.Ka).apply(null,arguments)},mc=a._emscripten_bind_MetadataQuerier___destroy___0=function(){return(mc=a._emscripten_bind_MetadataQuerier___destroy___0=a.asm.La).apply(null,arguments)},Ua=a._emscripten_bind_Decoder_Decoder_0=function(){return(Ua=a._emscripten_bind_Decoder_Decoder_0=a.asm.Ma).apply(null,arguments)},nc=a._emscripten_bind_Decoder_DecodeArrayToPointCloud_3=function(){return(nc= +a._emscripten_bind_Decoder_DecodeArrayToPointCloud_3=a.asm.Na).apply(null,arguments)},oc=a._emscripten_bind_Decoder_DecodeArrayToMesh_3=function(){return(oc=a._emscripten_bind_Decoder_DecodeArrayToMesh_3=a.asm.Oa).apply(null,arguments)},pc=a._emscripten_bind_Decoder_GetAttributeId_2=function(){return(pc=a._emscripten_bind_Decoder_GetAttributeId_2=a.asm.Pa).apply(null,arguments)},qc=a._emscripten_bind_Decoder_GetAttributeIdByName_2=function(){return(qc=a._emscripten_bind_Decoder_GetAttributeIdByName_2= +a.asm.Qa).apply(null,arguments)},rc=a._emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3=function(){return(rc=a._emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3=a.asm.Ra).apply(null,arguments)},sc=a._emscripten_bind_Decoder_GetAttribute_2=function(){return(sc=a._emscripten_bind_Decoder_GetAttribute_2=a.asm.Sa).apply(null,arguments)},tc=a._emscripten_bind_Decoder_GetAttributeByUniqueId_2=function(){return(tc=a._emscripten_bind_Decoder_GetAttributeByUniqueId_2=a.asm.Ta).apply(null,arguments)}, +uc=a._emscripten_bind_Decoder_GetMetadata_1=function(){return(uc=a._emscripten_bind_Decoder_GetMetadata_1=a.asm.Ua).apply(null,arguments)},vc=a._emscripten_bind_Decoder_GetAttributeMetadata_2=function(){return(vc=a._emscripten_bind_Decoder_GetAttributeMetadata_2=a.asm.Va).apply(null,arguments)},wc=a._emscripten_bind_Decoder_GetFaceFromMesh_3=function(){return(wc=a._emscripten_bind_Decoder_GetFaceFromMesh_3=a.asm.Wa).apply(null,arguments)},xc=a._emscripten_bind_Decoder_GetTriangleStripsFromMesh_2= +function(){return(xc=a._emscripten_bind_Decoder_GetTriangleStripsFromMesh_2=a.asm.Xa).apply(null,arguments)},yc=a._emscripten_bind_Decoder_GetTrianglesUInt16Array_3=function(){return(yc=a._emscripten_bind_Decoder_GetTrianglesUInt16Array_3=a.asm.Ya).apply(null,arguments)},zc=a._emscripten_bind_Decoder_GetTrianglesUInt32Array_3=function(){return(zc=a._emscripten_bind_Decoder_GetTrianglesUInt32Array_3=a.asm.Za).apply(null,arguments)},Ac=a._emscripten_bind_Decoder_GetAttributeFloat_3=function(){return(Ac= +a._emscripten_bind_Decoder_GetAttributeFloat_3=a.asm._a).apply(null,arguments)},Bc=a._emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3=function(){return(Bc=a._emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3=a.asm.$a).apply(null,arguments)},Cc=a._emscripten_bind_Decoder_GetAttributeIntForAllPoints_3=function(){return(Cc=a._emscripten_bind_Decoder_GetAttributeIntForAllPoints_3=a.asm.ab).apply(null,arguments)},Dc=a._emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3=function(){return(Dc= +a._emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3=a.asm.bb).apply(null,arguments)},Ec=a._emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3=function(){return(Ec=a._emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3=a.asm.cb).apply(null,arguments)},Fc=a._emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3=function(){return(Fc=a._emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3=a.asm.db).apply(null,arguments)},Gc=a._emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3= +function(){return(Gc=a._emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3=a.asm.eb).apply(null,arguments)},Hc=a._emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3=function(){return(Hc=a._emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3=a.asm.fb).apply(null,arguments)},Ic=a._emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3=function(){return(Ic=a._emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3=a.asm.gb).apply(null,arguments)},Jc=a._emscripten_bind_Decoder_GetAttributeDataArrayForAllPoints_5= +function(){return(Jc=a._emscripten_bind_Decoder_GetAttributeDataArrayForAllPoints_5=a.asm.hb).apply(null,arguments)},Kc=a._emscripten_bind_Decoder_SkipAttributeTransform_1=function(){return(Kc=a._emscripten_bind_Decoder_SkipAttributeTransform_1=a.asm.ib).apply(null,arguments)},Lc=a._emscripten_bind_Decoder_GetEncodedGeometryType_Deprecated_1=function(){return(Lc=a._emscripten_bind_Decoder_GetEncodedGeometryType_Deprecated_1=a.asm.jb).apply(null,arguments)},Mc=a._emscripten_bind_Decoder_DecodeBufferToPointCloud_2= +function(){return(Mc=a._emscripten_bind_Decoder_DecodeBufferToPointCloud_2=a.asm.kb).apply(null,arguments)},Nc=a._emscripten_bind_Decoder_DecodeBufferToMesh_2=function(){return(Nc=a._emscripten_bind_Decoder_DecodeBufferToMesh_2=a.asm.lb).apply(null,arguments)},Oc=a._emscripten_bind_Decoder___destroy___0=function(){return(Oc=a._emscripten_bind_Decoder___destroy___0=a.asm.mb).apply(null,arguments)},Pc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM=function(){return(Pc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM= +a.asm.nb).apply(null,arguments)},Qc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM=function(){return(Qc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM=a.asm.ob).apply(null,arguments)},Rc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM=function(){return(Rc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM=a.asm.pb).apply(null,arguments)},Sc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM= +function(){return(Sc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM=a.asm.qb).apply(null,arguments)},Tc=a._emscripten_enum_draco_GeometryAttribute_Type_INVALID=function(){return(Tc=a._emscripten_enum_draco_GeometryAttribute_Type_INVALID=a.asm.rb).apply(null,arguments)},Uc=a._emscripten_enum_draco_GeometryAttribute_Type_POSITION=function(){return(Uc=a._emscripten_enum_draco_GeometryAttribute_Type_POSITION=a.asm.sb).apply(null,arguments)},Vc=a._emscripten_enum_draco_GeometryAttribute_Type_NORMAL= +function(){return(Vc=a._emscripten_enum_draco_GeometryAttribute_Type_NORMAL=a.asm.tb).apply(null,arguments)},Wc=a._emscripten_enum_draco_GeometryAttribute_Type_COLOR=function(){return(Wc=a._emscripten_enum_draco_GeometryAttribute_Type_COLOR=a.asm.ub).apply(null,arguments)},Xc=a._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD=function(){return(Xc=a._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD=a.asm.vb).apply(null,arguments)},Yc=a._emscripten_enum_draco_GeometryAttribute_Type_GENERIC= +function(){return(Yc=a._emscripten_enum_draco_GeometryAttribute_Type_GENERIC=a.asm.wb).apply(null,arguments)},Zc=a._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=function(){return(Zc=a._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=a.asm.xb).apply(null,arguments)},$c=a._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=function(){return($c=a._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=a.asm.yb).apply(null,arguments)},ad=a._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH= +function(){return(ad=a._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=a.asm.zb).apply(null,arguments)},bd=a._emscripten_enum_draco_DataType_DT_INVALID=function(){return(bd=a._emscripten_enum_draco_DataType_DT_INVALID=a.asm.Ab).apply(null,arguments)},cd=a._emscripten_enum_draco_DataType_DT_INT8=function(){return(cd=a._emscripten_enum_draco_DataType_DT_INT8=a.asm.Bb).apply(null,arguments)},dd=a._emscripten_enum_draco_DataType_DT_UINT8=function(){return(dd=a._emscripten_enum_draco_DataType_DT_UINT8= +a.asm.Cb).apply(null,arguments)},ed=a._emscripten_enum_draco_DataType_DT_INT16=function(){return(ed=a._emscripten_enum_draco_DataType_DT_INT16=a.asm.Db).apply(null,arguments)},fd=a._emscripten_enum_draco_DataType_DT_UINT16=function(){return(fd=a._emscripten_enum_draco_DataType_DT_UINT16=a.asm.Eb).apply(null,arguments)},gd=a._emscripten_enum_draco_DataType_DT_INT32=function(){return(gd=a._emscripten_enum_draco_DataType_DT_INT32=a.asm.Fb).apply(null,arguments)},hd=a._emscripten_enum_draco_DataType_DT_UINT32= +function(){return(hd=a._emscripten_enum_draco_DataType_DT_UINT32=a.asm.Gb).apply(null,arguments)},id=a._emscripten_enum_draco_DataType_DT_INT64=function(){return(id=a._emscripten_enum_draco_DataType_DT_INT64=a.asm.Hb).apply(null,arguments)},jd=a._emscripten_enum_draco_DataType_DT_UINT64=function(){return(jd=a._emscripten_enum_draco_DataType_DT_UINT64=a.asm.Ib).apply(null,arguments)},kd=a._emscripten_enum_draco_DataType_DT_FLOAT32=function(){return(kd=a._emscripten_enum_draco_DataType_DT_FLOAT32=a.asm.Jb).apply(null, +arguments)},ld=a._emscripten_enum_draco_DataType_DT_FLOAT64=function(){return(ld=a._emscripten_enum_draco_DataType_DT_FLOAT64=a.asm.Kb).apply(null,arguments)},md=a._emscripten_enum_draco_DataType_DT_BOOL=function(){return(md=a._emscripten_enum_draco_DataType_DT_BOOL=a.asm.Lb).apply(null,arguments)},nd=a._emscripten_enum_draco_DataType_DT_TYPES_COUNT=function(){return(nd=a._emscripten_enum_draco_DataType_DT_TYPES_COUNT=a.asm.Mb).apply(null,arguments)},od=a._emscripten_enum_draco_StatusCode_OK=function(){return(od= +a._emscripten_enum_draco_StatusCode_OK=a.asm.Nb).apply(null,arguments)},pd=a._emscripten_enum_draco_StatusCode_DRACO_ERROR=function(){return(pd=a._emscripten_enum_draco_StatusCode_DRACO_ERROR=a.asm.Ob).apply(null,arguments)},qd=a._emscripten_enum_draco_StatusCode_IO_ERROR=function(){return(qd=a._emscripten_enum_draco_StatusCode_IO_ERROR=a.asm.Pb).apply(null,arguments)},rd=a._emscripten_enum_draco_StatusCode_INVALID_PARAMETER=function(){return(rd=a._emscripten_enum_draco_StatusCode_INVALID_PARAMETER= +a.asm.Qb).apply(null,arguments)},sd=a._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION=function(){return(sd=a._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION=a.asm.Rb).apply(null,arguments)},td=a._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION=function(){return(td=a._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION=a.asm.Sb).apply(null,arguments)};a._malloc=function(){return(a._malloc=a.asm.Tb).apply(null,arguments)};a._free=function(){return(a._free=a.asm.Ub).apply(null,arguments)}; +var ya=function(){return(ya=a.asm.Vb).apply(null,arguments)};a.___start_em_js=15856;a.___stop_em_js=15954;var la;ia=function b(){la||ba();la||(ia=b)};if(a.preInit)for("function"==typeof a.preInit&&(a.preInit=[a.preInit]);0=r.size?(0>>=0;switch(c.BYTES_PER_ELEMENT){case 2:d>>>=1;break;case 4:d>>>=2;break;case 8:d>>>=3}for(var g=0;gb.byteLength)return a.INVALID_GEOMETRY_TYPE;switch(b[7]){case 0:return a.POINT_CLOUD;case 1:return a.TRIANGULAR_MESH;default:return a.INVALID_GEOMETRY_TYPE}};return n.ready}}(); +"object"===typeof exports&&"object"===typeof module?module.exports=DracoDecoderModule:"function"===typeof define&&define.amd?define([],function(){return DracoDecoderModule}):"object"===typeof exports&&(exports.DracoDecoderModule=DracoDecoderModule); diff --git a/packages/mml-web-playcanvas-standalone/src/wasm/draco.wasm.wasm b/packages/mml-web-playcanvas-standalone/src/wasm/draco.wasm.wasm new file mode 100644 index 00000000..e5a5e06e Binary files /dev/null and b/packages/mml-web-playcanvas-standalone/src/wasm/draco.wasm.wasm differ diff --git a/packages/mml-web-playcanvas-standalone/src/wasm/glslang.js b/packages/mml-web-playcanvas-standalone/src/wasm/glslang.js new file mode 100644 index 00000000..4cf8962e --- /dev/null +++ b/packages/mml-web-playcanvas-standalone/src/wasm/glslang.js @@ -0,0 +1,893 @@ +let Module = (function () { + let _scriptDir = + typeof document !== "undefined" && document.currentScript + ? document.currentScript.src + : undefined; + + return function (Module) { + Module = Module || {}; + + let c; + c || (c = typeof Module !== "undefined" ? Module : {}); + c.compileGLSLZeroCopy = function (a, b, d, e) { + d = !!d; + switch (b) { + case "vertex": + var g = 0; + break; + case "fragment": + g = 4; + break; + case "compute": + g = 5; + break; + default: + throw Error("shader_stage must be 'vertex', 'fragment', or 'compute'."); + } + switch (e || "1.0") { + case "1.0": + var f = 65536; + break; + case "1.1": + f = 65792; + break; + case "1.2": + f = 66048; + break; + case "1.3": + f = 66304; + break; + case "1.4": + f = 66560; + break; + case "1.5": + f = 66816; + break; + default: + throw Error("spirv_version must be '1.0' ~ '1.5'."); + } + e = c._malloc(4); + b = c._malloc(4); + let h = aa([a, g, d, f, e, b]); + d = k(e); + a = k(b); + c._free(e); + c._free(b); + if (0 === h) throw Error("GLSL compilation failed"); + e = {}; + d /= 4; + e.data = c.HEAPU32.subarray(d, d + a); + e.free = function () { + c._destroy_output_buffer(h); + }; + return e; + }; + c.compileGLSL = function (a, b, d, e) { + a = c.compileGLSLZeroCopy(a, b, d, e); + b = a.data.slice(); + a.free(); + return b; + }; + let p = {}, + q; + for (q in c) c.hasOwnProperty(q) && (p[q] = c[q]); + let r = "./this.program", + t = !1, + u = !1; + t = "object" === typeof window; + u = "function" === typeof importScripts; + let v = "", + w; + if (t || u) + u ? (v = self.location.href) : document.currentScript && (v = document.currentScript.src), + _scriptDir && (v = _scriptDir), + 0 !== v.indexOf("blob:") ? (v = v.substr(0, v.lastIndexOf("/") + 1)) : (v = ""), + u && + (w = function (a) { + let b = new XMLHttpRequest(); + b.open("GET", a, !1); + b.responseType = "arraybuffer"; + b.send(null); + return new Uint8Array(b.response); + }); + let x = c.print || console.log.bind(console), + y = c.printErr || console.warn.bind(console); + for (q in p) p.hasOwnProperty(q) && (c[q] = p[q]); + p = null; + c.thisProgram && (r = c.thisProgram); + let A; + c.wasmBinary && (A = c.wasmBinary); + "object" !== typeof WebAssembly && y("no native wasm support detected"); + function k(a) { + let b = "i32"; + "*" === b.charAt(b.length - 1) && (b = "i32"); + switch (b) { + case "i1": + return B[a >> 0]; + case "i8": + return B[a >> 0]; + case "i16": + return ba[a >> 1]; + case "i32": + return C[a >> 2]; + case "i64": + return C[a >> 2]; + case "float": + return ca[a >> 2]; + case "double": + return da[a >> 3]; + default: + D("invalid type for getValue: " + b); + } + return null; + } + let E, + ea = new WebAssembly.Table({ initial: 859, maximum: 859, element: "anyfunc" }), + fa = !1; + function ha() { + let a = c._convert_glsl_to_spirv; + a || + D( + "Assertion failed: Cannot call unknown function convert_glsl_to_spirv, make sure it is exported", + ); + return a; + } + function aa(a) { + let b = "string number boolean number number number".split(" "), + d = { + string(a) { + let b = 0; + if (null !== a && void 0 !== a && 0 !== a) { + let d = (a.length << 2) + 1; + b = G(d); + ia(a, H, b, d); + } + return b; + }, + array(a) { + let b = G(a.length); + B.set(a, b); + return b; + }, + }, + e = ha(), + g = [], + f = 0; + if (a) + for (let h = 0; h < a.length; h++) { + let n = d[b[h]]; + n ? (0 === f && (f = ja()), (g[h] = n(a[h]))) : (g[h] = a[h]); + } + a = e.apply(null, g); + 0 !== f && ka(f); + return a; + } + let la = "undefined" !== typeof TextDecoder ? new TextDecoder("utf8") : void 0; + function I(a, b, d) { + let e = b + d; + for (d = b; a[d] && !(d >= e); ) ++d; + if (16 < d - b && a.subarray && la) return la.decode(a.subarray(b, d)); + for (e = ""; b < d; ) { + let g = a[b++]; + if (g & 128) { + let f = a[b++] & 63; + if (192 == (g & 224)) e += String.fromCharCode(((g & 31) << 6) | f); + else { + let h = a[b++] & 63; + g = + 224 == (g & 240) + ? ((g & 15) << 12) | (f << 6) | h + : ((g & 7) << 18) | (f << 12) | (h << 6) | (a[b++] & 63); + 65536 > g + ? (e += String.fromCharCode(g)) + : ((g -= 65536), (e += String.fromCharCode(55296 | (g >> 10), 56320 | (g & 1023)))); + } + } else e += String.fromCharCode(g); + } + return e; + } + function ia(a, b, d, e) { + if (0 < e) { + e = d + e - 1; + for (let g = 0; g < a.length; ++g) { + let f = a.charCodeAt(g); + if (55296 <= f && 57343 >= f) { + let h = a.charCodeAt(++g); + f = (65536 + ((f & 1023) << 10)) | (h & 1023); + } + if (127 >= f) { + if (d >= e) break; + b[d++] = f; + } else { + if (2047 >= f) { + if (d + 1 >= e) break; + b[d++] = 192 | (f >> 6); + } else { + if (65535 >= f) { + if (d + 2 >= e) break; + b[d++] = 224 | (f >> 12); + } else { + if (d + 3 >= e) break; + b[d++] = 240 | (f >> 18); + b[d++] = 128 | ((f >> 12) & 63); + } + b[d++] = 128 | ((f >> 6) & 63); + } + b[d++] = 128 | (f & 63); + } + } + b[d] = 0; + } + } + "undefined" !== typeof TextDecoder && new TextDecoder("utf-16le"); + let J, B, H, ba, C, ca, da; + function ma(a) { + J = a; + c.HEAP8 = B = new Int8Array(a); + c.HEAP16 = ba = new Int16Array(a); + c.HEAP32 = C = new Int32Array(a); + c.HEAPU8 = H = new Uint8Array(a); + c.HEAPU16 = new Uint16Array(a); + c.HEAPU32 = new Uint32Array(a); + c.HEAPF32 = ca = new Float32Array(a); + c.HEAPF64 = da = new Float64Array(a); + } + let na = c.TOTAL_MEMORY || 16777216; + c.wasmMemory ? (E = c.wasmMemory) : (E = new WebAssembly.Memory({ initial: na / 65536 })); + E && (J = E.buffer); + na = J.byteLength; + ma(J); + C[84916] = 5582704; + function K(a) { + for (; 0 < a.length; ) { + let b = a.shift(); + if ("function" === typeof b) b(); + else { + let d = b.J; + "number" === typeof d + ? void 0 === b.H + ? c.dynCall_v(d) + : c.dynCall_vi(d, b.H) + : d(void 0 === b.H ? null : b.H); + } + } + } + let oa = [], + pa = [], + qa = [], + ra = []; + function sa() { + let a = c.preRun.shift(); + oa.unshift(a); + } + let L = 0, + M = null, + N = null; + c.preloadedImages = {}; + c.preloadedAudios = {}; + function D(a) { + if (c.onAbort) c.onAbort(a); + x(a); + y(a); + fa = !0; + throw new WebAssembly.RuntimeError( + "abort(" + a + "). Build with -s ASSERTIONS=1 for more info.", + ); + } + function ta() { + let a = O; + return String.prototype.startsWith + ? a.startsWith("data:application/octet-stream;base64,") + : 0 === a.indexOf("data:application/octet-stream;base64,"); + } + var O = "glslang.wasm"; + if (!ta()) { + let ua = O; + O = c.locateFile ? c.locateFile(ua, v) : v + ua; + } + function wa() { + try { + if (A) return new Uint8Array(A); + if (w) return w(O); + throw "both async and sync fetching of the wasm failed"; + } catch (a) { + D(a); + } + } + function xa() { + return A || (!t && !u) || "function" !== typeof fetch + ? new Promise(function (a) { + a(wa()); + }) + : fetch(O, { credentials: "same-origin" }) + .then(function (a) { + if (!a.ok) throw "failed to load wasm binary file at '" + O + "'"; + return a.arrayBuffer(); + }) + .catch(function () { + return wa(); + }); + } + pa.push({ + J() { + ya(); + }, + }); + let za = [null, [], []], + P = 0; + function Aa() { + P += 4; + return C[(P - 4) >> 2]; + } + let Q = {}, + Ba = {}; + function Ca() { + if (!R) { + let a = { + USER: "web_user", + LOGNAME: "web_user", + PATH: "/", + PWD: "/", + HOME: "/home/web_user", + LANG: + ( + ("object" === typeof navigator && navigator.languages && navigator.languages[0]) || + "C" + ).replace("-", "_") + ".UTF-8", + _: r, + }, + b; + for (b in Ba) a[b] = Ba[b]; + let d = []; + for (b in a) d.push(b + "=" + a[b]); + R = d; + } + return R; + } + let R; + function S(a) { + return 0 === a % 4 && (0 !== a % 100 || 0 === a % 400); + } + function T(a, b) { + for (var d = 0, e = 0; e <= b; d += a[e++]); + return d; + } + let U = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], + W = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; + function X(a, b) { + for (a = new Date(a.getTime()); 0 < b; ) { + let d = a.getMonth(), + e = (S(a.getFullYear()) ? U : W)[d]; + if (b > e - a.getDate()) + (b -= e - a.getDate() + 1), + a.setDate(1), + 11 > d ? a.setMonth(d + 1) : (a.setMonth(0), a.setFullYear(a.getFullYear() + 1)); + else { + a.setDate(a.getDate() + b); + break; + } + } + return a; + } + function Da(a, b, d, e) { + function g(a, b, d) { + for (a = "number" === typeof a ? a.toString() : a || ""; a.length < b; ) a = d[0] + a; + return a; + } + function f(a, b) { + return g(a, b, "0"); + } + function h(a, b) { + function V(a) { + return 0 > a ? -1 : 0 < a ? 1 : 0; + } + let d; + 0 === (d = V(a.getFullYear() - b.getFullYear())) && + 0 === (d = V(a.getMonth() - b.getMonth())) && + (d = V(a.getDate() - b.getDate())); + return d; + } + function n(a) { + switch (a.getDay()) { + case 0: + return new Date(a.getFullYear() - 1, 11, 29); + case 1: + return a; + case 2: + return new Date(a.getFullYear(), 0, 3); + case 3: + return new Date(a.getFullYear(), 0, 2); + case 4: + return new Date(a.getFullYear(), 0, 1); + case 5: + return new Date(a.getFullYear() - 1, 11, 31); + case 6: + return new Date(a.getFullYear() - 1, 11, 30); + } + } + function z(a) { + a = X(new Date(a.A + 1900, 0, 1), a.G); + let b = n(new Date(a.getFullYear() + 1, 0, 4)); + return 0 >= h(n(new Date(a.getFullYear(), 0, 4)), a) + ? 0 >= h(b, a) + ? a.getFullYear() + 1 + : a.getFullYear() + : a.getFullYear() - 1; + } + let m = C[(e + 40) >> 2]; + e = { + N: C[e >> 2], + M: C[(e + 4) >> 2], + D: C[(e + 8) >> 2], + C: C[(e + 12) >> 2], + B: C[(e + 16) >> 2], + A: C[(e + 20) >> 2], + F: C[(e + 24) >> 2], + G: C[(e + 28) >> 2], + X: C[(e + 32) >> 2], + L: C[(e + 36) >> 2], + O: m ? (m ? I(H, m, void 0) : "") : "", + }; + d = d ? I(H, d, void 0) : ""; + m = { + "%c": "%a %b %d %H:%M:%S %Y", + "%D": "%m/%d/%y", + "%F": "%Y-%m-%d", + "%h": "%b", + "%r": "%I:%M:%S %p", + "%R": "%H:%M", + "%T": "%H:%M:%S", + "%x": "%m/%d/%y", + "%X": "%H:%M:%S", + "%Ec": "%c", + "%EC": "%C", + "%Ex": "%m/%d/%y", + "%EX": "%H:%M:%S", + "%Ey": "%y", + "%EY": "%Y", + "%Od": "%d", + "%Oe": "%e", + "%OH": "%H", + "%OI": "%I", + "%Om": "%m", + "%OM": "%M", + "%OS": "%S", + "%Ou": "%u", + "%OU": "%U", + "%OV": "%V", + "%Ow": "%w", + "%OW": "%W", + "%Oy": "%y", + }; + for (var l in m) d = d.replace(new RegExp(l, "g"), m[l]); + let F = "Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "), + va = + "January February March April May June July August September October November December".split( + " ", + ); + m = { + "%a"(a) { + return F[a.F].substring(0, 3); + }, + "%A"(a) { + return F[a.F]; + }, + "%b"(a) { + return va[a.B].substring(0, 3); + }, + "%B"(a) { + return va[a.B]; + }, + "%C"(a) { + return f(((a.A + 1900) / 100) | 0, 2); + }, + "%d"(a) { + return f(a.C, 2); + }, + "%e"(a) { + return g(a.C, 2, " "); + }, + "%g"(a) { + return z(a).toString().substring(2); + }, + "%G"(a) { + return z(a); + }, + "%H"(a) { + return f(a.D, 2); + }, + "%I"(a) { + a = a.D; + 0 == a ? (a = 12) : 12 < a && (a -= 12); + return f(a, 2); + }, + "%j"(a) { + return f(a.C + T(S(a.A + 1900) ? U : W, a.B - 1), 3); + }, + "%m"(a) { + return f(a.B + 1, 2); + }, + "%M"(a) { + return f(a.M, 2); + }, + "%n"() { + return "\n"; + }, + "%p"(a) { + return 0 <= a.D && 12 > a.D ? "AM" : "PM"; + }, + "%S"(a) { + return f(a.N, 2); + }, + "%t"() { + return "\t"; + }, + "%u"(a) { + return a.F || 7; + }, + "%U"(a) { + let b = new Date(a.A + 1900, 0, 1), + d = 0 === b.getDay() ? b : X(b, 7 - b.getDay()); + a = new Date(a.A + 1900, a.B, a.C); + return 0 > h(d, a) + ? f( + Math.ceil( + (31 - + d.getDate() + + (T(S(a.getFullYear()) ? U : W, a.getMonth() - 1) - 31) + + a.getDate()) / + 7, + ), + 2, + ) + : 0 === h(d, b) + ? "01" + : "00"; + }, + "%V"(a) { + let b = n(new Date(a.A + 1900, 0, 4)), + d = n(new Date(a.A + 1901, 0, 4)), + e = X(new Date(a.A + 1900, 0, 1), a.G); + return 0 > h(e, b) + ? "53" + : 0 >= h(d, e) + ? "01" + : f( + Math.ceil( + (b.getFullYear() < a.A + 1900 + ? a.G + 32 - b.getDate() + : a.G + 1 - b.getDate()) / 7, + ), + 2, + ); + }, + "%w"(a) { + return a.F; + }, + "%W"(a) { + let b = new Date(a.A, 0, 1), + d = 1 === b.getDay() ? b : X(b, 0 === b.getDay() ? 1 : 7 - b.getDay() + 1); + a = new Date(a.A + 1900, a.B, a.C); + return 0 > h(d, a) + ? f( + Math.ceil( + (31 - + d.getDate() + + (T(S(a.getFullYear()) ? U : W, a.getMonth() - 1) - 31) + + a.getDate()) / + 7, + ), + 2, + ) + : 0 === h(d, b) + ? "01" + : "00"; + }, + "%y"(a) { + return (a.A + 1900).toString().substring(2); + }, + "%Y"(a) { + return a.A + 1900; + }, + "%z"(a) { + a = a.L; + let b = 0 <= a; + a = Math.abs(a) / 60; + return (b ? "+" : "-") + String("0000" + ((a / 60) * 100 + (a % 60))).slice(-4); + }, + "%Z"(a) { + return a.O; + }, + "%%"() { + return "%"; + }, + }; + for (l in m) 0 <= d.indexOf(l) && (d = d.replace(new RegExp(l, "g"), m[l](e))); + l = Ea(d); + if (l.length > b) return 0; + B.set(l, a); + return l.length - 1; + } + function Ea(a) { + for (var b = 0, d = 0; d < a.length; ++d) { + let e = a.charCodeAt(d); + 55296 <= e && 57343 >= e && (e = (65536 + ((e & 1023) << 10)) | (a.charCodeAt(++d) & 1023)); + 127 >= e ? ++b : (b = 2047 >= e ? b + 2 : 65535 >= e ? b + 3 : b + 4); + } + b = Array(b + 1); + ia(a, b, 0, b.length); + return b; + } + let Ga = { + f() {}, + c() { + c.___errno_location && (C[c.___errno_location() >> 2] = 63); + return -1; + }, + n(a, b) { + P = b; + try { + let d = Aa(); + let e = Aa(); + if (-1 === d || 0 === e) var g = -28; + else { + let f = Q.K[d]; + if (f && e === f.U) { + let h = (void 0).T(f.S); + Q.R(d, h, e, f.flags, f.offset); + (void 0).W(h); + Q.K[d] = null; + f.P && Fa(f.V); + } + g = 0; + } + return g; + } catch (n) { + return D(n), -n.I; + } + }, + a() {}, + b() { + D(); + }, + k(a, b, d) { + H.set(H.subarray(b, b + d), a); + }, + l(a) { + let b = B.length; + if (2147418112 < a) return !1; + for (let d = 1; 4 >= d; d *= 2) { + let e = b * (1 + 0.2 / d); + e = Math.min(e, a + 100663296); + e = Math.max(16777216, a, e); + 0 < e % 65536 && (e += 65536 - (e % 65536)); + a: { + try { + E.grow((Math.min(2147418112, e) - J.byteLength + 65535) >> 16); + ma(E.buffer); + var g = 1; + break a; + } catch (f) {} + g = void 0; + } + if (g) return !0; + } + return !1; + }, + d(a, b) { + let d = 0; + Ca().forEach(function (e, g) { + let f = b + d; + g = C[(a + 4 * g) >> 2] = f; + for (f = 0; f < e.length; ++f) B[g++ >> 0] = e.charCodeAt(f); + B[g >> 0] = 0; + d += e.length + 1; + }); + return 0; + }, + e(a, b) { + let d = Ca(); + C[a >> 2] = d.length; + let e = 0; + d.forEach(function (a) { + e += a.length + 1; + }); + C[b >> 2] = e; + return 0; + }, + h() { + return 0; + }, + j() { + return 0; + }, + g(a, b, d, e) { + try { + for (var g = 0, f = 0; f < d; f++) { + for (var h = C[(b + 8 * f) >> 2], n = C[(b + (8 * f + 4)) >> 2], z = 0; z < n; z++) { + let m = H[h + z], + l = za[a]; + 0 === m || 10 === m ? ((1 === a ? x : y)(I(l, 0)), (l.length = 0)) : l.push(m); + } + g += n; + } + C[e >> 2] = g; + return 0; + } catch (F) { + return D(F), F.I; + } + }, + memory: E, + o() {}, + i() {}, + m(a, b, d, e) { + return Da(a, b, d, e); + }, + table: ea, + }, + Ha = (function () { + function a(a) { + c.asm = a.exports; + L--; + c.monitorRunDependencies && c.monitorRunDependencies(L); + 0 == L && (null !== M && (clearInterval(M), (M = null)), N && ((a = N), (N = null), a())); + } + function b(b) { + a(b.instance); + } + function d(a) { + return xa() + .then(function (a) { + return WebAssembly.instantiate(a, e); + }) + .then(a, function (a) { + y("failed to asynchronously prepare wasm: " + a); + D(a); + }); + } + var e = { env: Ga, wasi_snapshot_preview1: Ga }; + L++; + c.monitorRunDependencies && c.monitorRunDependencies(L); + if (c.instantiateWasm) + try { + return c.instantiateWasm(e, a); + } catch (g) { + return y("Module.instantiateWasm callback failed with error: " + g), !1; + } + (function () { + if ( + A || + "function" !== typeof WebAssembly.instantiateStreaming || + ta() || + "function" !== typeof fetch + ) + return d(b); + fetch(O, { credentials: "same-origin" }).then(function (a) { + return WebAssembly.instantiateStreaming(a, e).then(b, function (a) { + y("wasm streaming compile failed: " + a); + y("falling back to ArrayBuffer instantiation"); + d(b); + }); + }); + })(); + return {}; + })(); + c.asm = Ha; + var ya = (c.___wasm_call_ctors = function () { + return (ya = c.___wasm_call_ctors = c.asm.p).apply(null, arguments); + }); + c._convert_glsl_to_spirv = function () { + return (c._convert_glsl_to_spirv = c.asm.q).apply(null, arguments); + }; + c._destroy_output_buffer = function () { + return (c._destroy_output_buffer = c.asm.r).apply(null, arguments); + }; + c._malloc = function () { + return (c._malloc = c.asm.s).apply(null, arguments); + }; + var Fa = (c._free = function () { + return (Fa = c._free = c.asm.t).apply(null, arguments); + }), + ja = (c.stackSave = function () { + return (ja = c.stackSave = c.asm.u).apply(null, arguments); + }), + G = (c.stackAlloc = function () { + return (G = c.stackAlloc = c.asm.v).apply(null, arguments); + }), + ka = (c.stackRestore = function () { + return (ka = c.stackRestore = c.asm.w).apply(null, arguments); + }); + c.dynCall_vi = function () { + return (c.dynCall_vi = c.asm.x).apply(null, arguments); + }; + c.dynCall_v = function () { + return (c.dynCall_v = c.asm.y).apply(null, arguments); + }; + c.asm = Ha; + let Y; + c.then = function (a) { + if (Y) a(c); + else { + let b = c.onRuntimeInitialized; + c.onRuntimeInitialized = function () { + b && b(); + a(c); + }; + } + return c; + }; + N = function Ia() { + Y || Z(); + Y || (N = Ia); + }; + function Z() { + function a() { + if (!Y && ((Y = !0), !fa)) { + K(pa); + K(qa); + if (c.onRuntimeInitialized) c.onRuntimeInitialized(); + if (c.postRun) + for ("function" === typeof c.postRun && (c.postRun = [c.postRun]); c.postRun.length; ) { + let a = c.postRun.shift(); + ra.unshift(a); + } + K(ra); + } + } + if (!(0 < L)) { + if (c.preRun) + for ("function" === typeof c.preRun && (c.preRun = [c.preRun]); c.preRun.length; ) sa(); + K(oa); + 0 < L || + (c.setStatus + ? (c.setStatus("Running..."), + setTimeout(function () { + setTimeout(function () { + c.setStatus(""); + }, 1); + a(); + }, 1)) + : a()); + } + } + c.run = Z; + if (c.preInit) + for ("function" === typeof c.preInit && (c.preInit = [c.preInit]); 0 < c.preInit.length; ) + c.preInit.pop()(); + Z(); + + return Module; + }; +})(); +if (typeof exports === "object" && typeof module === "object") module.exports = Module; +else if (typeof define === "function" && define["amd"]) + define([], function () { + return Module; + }); +else if (typeof exports === "object") exports["Module"] = Module; +export default (() => { + const initialize = () => { + return new Promise((resolve) => { + Module({ + locateFile() { + const i = import.meta.url.lastIndexOf("/"); + return import.meta.url.substring(0, i) + "/glslang.wasm"; + }, + onRuntimeInitialized() { + resolve({ + compileGLSLZeroCopy: this.compileGLSLZeroCopy, + compileGLSL: this.compileGLSL, + }); + }, + }); + }); + }; + + let instance; + return () => { + if (!instance) { + instance = initialize(); + } + return instance; + }; +})(); diff --git a/packages/mml-web-playcanvas-standalone/src/wasm/glslang.wasm b/packages/mml-web-playcanvas-standalone/src/wasm/glslang.wasm new file mode 100644 index 00000000..d951d65e Binary files /dev/null and b/packages/mml-web-playcanvas-standalone/src/wasm/glslang.wasm differ diff --git a/packages/mml-web-playcanvas-standalone/src/wasm/twgsl.js b/packages/mml-web-playcanvas-standalone/src/wasm/twgsl.js new file mode 100644 index 00000000..38efc425 --- /dev/null +++ b/packages/mml-web-playcanvas-standalone/src/wasm/twgsl.js @@ -0,0 +1,3454 @@ +let Module = function (Module) { + Module = Module || {}; + var Module = typeof Module !== "undefined" ? Module : {}; + let moduleOverrides = Object.assign({}, Module); + let arguments_ = []; + let thisProgram = "./this.program"; + let quit_ = (status, toThrow) => { + throw toThrow; + }; + let ENVIRONMENT_IS_WEB = typeof window === "object"; + let ENVIRONMENT_IS_WORKER = typeof importScripts === "function"; + let ENVIRONMENT_IS_NODE = + typeof process === "object" && + typeof process.versions === "object" && + typeof process.versions.node === "string"; + let scriptDirectory = ""; + function locateFile(path) { + if (Module["locateFile"]) { + return Module["locateFile"](path, scriptDirectory); + } + return scriptDirectory + path; + } + let read_, readAsync, readBinary, setWindowTitle; + function logExceptionOnExit(e) { + if (e instanceof ExitStatus) return; + let toLog = e; + err("exiting due to exception: " + toLog); + } + if (ENVIRONMENT_IS_NODE) { + if (ENVIRONMENT_IS_WORKER) { + scriptDirectory = require("path").dirname(scriptDirectory) + "/"; + } else { + scriptDirectory = __dirname + "/"; + } + var fs, nodePath; + if (typeof require === "function") { + fs = require("fs"); + nodePath = require("path"); + } + read_ = (filename, binary) => { + filename = nodePath["normalize"](filename); + return fs.readFileSync(filename, binary ? undefined : "utf8"); + }; + readBinary = (filename) => { + let ret = read_(filename, true); + if (!ret.buffer) { + ret = new Uint8Array(ret); + } + return ret; + }; + readAsync = (filename, onload, onerror) => { + filename = nodePath["normalize"](filename); + fs.readFile(filename, function (err, data) { + if (err) onerror(err); + else onload(data.buffer); + }); + }; + if (process["argv"].length > 1) { + thisProgram = process["argv"][1].replace(/\\/g, "/"); + } + arguments_ = process["argv"].slice(2); + if (typeof module !== "undefined") { + module["exports"] = Module; + } + process["on"]("uncaughtException", function (ex) { + if (!(ex instanceof ExitStatus)) { + throw ex; + } + }); + process["on"]("unhandledRejection", function (reason) { + throw reason; + }); + quit_ = (status, toThrow) => { + if (keepRuntimeAlive()) { + process["exitCode"] = status; + throw toThrow; + } + logExceptionOnExit(toThrow); + process["exit"](status); + }; + Module["inspect"] = function () { + return "[Emscripten Module object]"; + }; + } else if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) { + if (ENVIRONMENT_IS_WORKER) { + scriptDirectory = self.location.href; + } else if (typeof document !== "undefined" && document.currentScript) { + scriptDirectory = document.currentScript.src; + } + if (scriptDirectory.indexOf("blob:") !== 0) { + scriptDirectory = scriptDirectory.substr( + 0, + scriptDirectory.replace(/[?#].*/, "").lastIndexOf("/") + 1, + ); + } else { + scriptDirectory = ""; + } + { + read_ = (url) => { + let xhr = new XMLHttpRequest(); + xhr.open("GET", url, false); + xhr.send(null); + return xhr.responseText; + }; + if (ENVIRONMENT_IS_WORKER) { + readBinary = (url) => { + let xhr = new XMLHttpRequest(); + xhr.open("GET", url, false); + xhr.responseType = "arraybuffer"; + xhr.send(null); + return new Uint8Array(xhr.response); + }; + } + readAsync = (url, onload, onerror) => { + let xhr = new XMLHttpRequest(); + xhr.open("GET", url, true); + xhr.responseType = "arraybuffer"; + xhr.onload = () => { + if (xhr.status == 200 || (xhr.status == 0 && xhr.response)) { + onload(xhr.response); + return; + } + onerror(); + }; + xhr.onerror = onerror; + xhr.send(null); + }; + } + setWindowTitle = (title) => (document.title = title); + } else { + } + let out = Module["print"] || console.log.bind(console); + var err = Module["printErr"] || console.warn.bind(console); + Object.assign(Module, moduleOverrides); + moduleOverrides = null; + if (Module["arguments"]) arguments_ = Module["arguments"]; + if (Module["thisProgram"]) thisProgram = Module["thisProgram"]; + if (Module["quit"]) quit_ = Module["quit"]; + let wasmBinary; + if (Module["wasmBinary"]) wasmBinary = Module["wasmBinary"]; + let noExitRuntime = Module["noExitRuntime"] || true; + if (typeof WebAssembly !== "object") { + abort("no native wasm support detected"); + } + let wasmMemory; + let ABORT = false; + let EXITSTATUS; + function assert(condition, text) { + if (!condition) { + abort(text); + } + } + let UTF8Decoder = typeof TextDecoder !== "undefined" ? new TextDecoder("utf8") : undefined; + function UTF8ArrayToString(heapOrArray, idx, maxBytesToRead) { + let endIdx = idx + maxBytesToRead; + let endPtr = idx; + while (heapOrArray[endPtr] && !(endPtr >= endIdx)) ++endPtr; + if (endPtr - idx > 16 && heapOrArray.buffer && UTF8Decoder) { + return UTF8Decoder.decode(heapOrArray.subarray(idx, endPtr)); + } + let str = ""; + while (idx < endPtr) { + let u0 = heapOrArray[idx++]; + if (!(u0 & 128)) { + str += String.fromCharCode(u0); + continue; + } + let u1 = heapOrArray[idx++] & 63; + if ((u0 & 224) == 192) { + str += String.fromCharCode(((u0 & 31) << 6) | u1); + continue; + } + let u2 = heapOrArray[idx++] & 63; + if ((u0 & 240) == 224) { + u0 = ((u0 & 15) << 12) | (u1 << 6) | u2; + } else { + u0 = ((u0 & 7) << 18) | (u1 << 12) | (u2 << 6) | (heapOrArray[idx++] & 63); + } + if (u0 < 65536) { + str += String.fromCharCode(u0); + } else { + let ch = u0 - 65536; + str += String.fromCharCode(55296 | (ch >> 10), 56320 | (ch & 1023)); + } + } + return str; + } + function UTF8ToString(ptr, maxBytesToRead) { + return ptr ? UTF8ArrayToString(HEAPU8, ptr, maxBytesToRead) : ""; + } + function stringToUTF8Array(str, heap, outIdx, maxBytesToWrite) { + if (!(maxBytesToWrite > 0)) return 0; + let startIdx = outIdx; + let endIdx = outIdx + maxBytesToWrite - 1; + for (let i = 0; i < str.length; ++i) { + let u = str.charCodeAt(i); + if (u >= 55296 && u <= 57343) { + let u1 = str.charCodeAt(++i); + u = (65536 + ((u & 1023) << 10)) | (u1 & 1023); + } + if (u <= 127) { + if (outIdx >= endIdx) break; + heap[outIdx++] = u; + } else if (u <= 2047) { + if (outIdx + 1 >= endIdx) break; + heap[outIdx++] = 192 | (u >> 6); + heap[outIdx++] = 128 | (u & 63); + } else if (u <= 65535) { + if (outIdx + 2 >= endIdx) break; + heap[outIdx++] = 224 | (u >> 12); + heap[outIdx++] = 128 | ((u >> 6) & 63); + heap[outIdx++] = 128 | (u & 63); + } else { + if (outIdx + 3 >= endIdx) break; + heap[outIdx++] = 240 | (u >> 18); + heap[outIdx++] = 128 | ((u >> 12) & 63); + heap[outIdx++] = 128 | ((u >> 6) & 63); + heap[outIdx++] = 128 | (u & 63); + } + } + heap[outIdx] = 0; + return outIdx - startIdx; + } + function lengthBytesUTF8(str) { + let len = 0; + for (let i = 0; i < str.length; ++i) { + let c = str.charCodeAt(i); + if (c <= 127) { + len++; + } else if (c <= 2047) { + len += 2; + } else if (c >= 55296 && c <= 57343) { + len += 4; + ++i; + } else { + len += 3; + } + } + return len; + } + let buffer, HEAP8, HEAPU8, HEAP16, HEAPU16, HEAP32, HEAPU32, HEAPF32, HEAPF64; + function updateGlobalBufferAndViews(buf) { + buffer = buf; + Module["HEAP8"] = HEAP8 = new Int8Array(buf); + Module["HEAP16"] = HEAP16 = new Int16Array(buf); + Module["HEAP32"] = HEAP32 = new Int32Array(buf); + Module["HEAPU8"] = HEAPU8 = new Uint8Array(buf); + Module["HEAPU16"] = HEAPU16 = new Uint16Array(buf); + Module["HEAPU32"] = HEAPU32 = new Uint32Array(buf); + Module["HEAPF32"] = HEAPF32 = new Float32Array(buf); + Module["HEAPF64"] = HEAPF64 = new Float64Array(buf); + } + let INITIAL_MEMORY = Module["INITIAL_MEMORY"] || 16777216; + let wasmTable; + let __ATPRERUN__ = []; + let __ATINIT__ = []; + let __ATPOSTRUN__ = []; + let runtimeInitialized = false; + function keepRuntimeAlive() { + return noExitRuntime; + } + function preRun() { + if (Module["preRun"]) { + if (typeof Module["preRun"] === "function") Module["preRun"] = [Module["preRun"]]; + while (Module["preRun"].length) { + addOnPreRun(Module["preRun"].shift()); + } + } + callRuntimeCallbacks(__ATPRERUN__); + } + function initRuntime() { + runtimeInitialized = true; + if (!Module["noFSInit"] && !FS.init.initialized) FS.init(); + FS.ignorePermissions = false; + TTY.init(); + callRuntimeCallbacks(__ATINIT__); + } + function postRun() { + if (Module["postRun"]) { + if (typeof Module["postRun"] === "function") Module["postRun"] = [Module["postRun"]]; + while (Module["postRun"].length) { + addOnPostRun(Module["postRun"].shift()); + } + } + callRuntimeCallbacks(__ATPOSTRUN__); + } + function addOnPreRun(cb) { + __ATPRERUN__.unshift(cb); + } + function addOnInit(cb) { + __ATINIT__.unshift(cb); + } + function addOnPostRun(cb) { + __ATPOSTRUN__.unshift(cb); + } + let runDependencies = 0; + let runDependencyWatcher = null; + let dependenciesFulfilled = null; + function getUniqueRunDependency(id) { + return id; + } + function addRunDependency(id) { + runDependencies++; + if (Module["monitorRunDependencies"]) { + Module["monitorRunDependencies"](runDependencies); + } + } + function removeRunDependency(id) { + runDependencies--; + if (Module["monitorRunDependencies"]) { + Module["monitorRunDependencies"](runDependencies); + } + if (runDependencies == 0) { + if (runDependencyWatcher !== null) { + clearInterval(runDependencyWatcher); + runDependencyWatcher = null; + } + if (dependenciesFulfilled) { + let callback = dependenciesFulfilled; + dependenciesFulfilled = null; + callback(); + } + } + } + function abort(what) { + { + if (Module["onAbort"]) { + Module["onAbort"](what); + } + } + what = "Aborted(" + what + ")"; + err(what); + ABORT = true; + EXITSTATUS = 1; + what += ". Build with -sASSERTIONS for more info."; + let e = new WebAssembly.RuntimeError(what); + throw e; + } + let dataURIPrefix = "data:application/octet-stream;base64,"; + function isDataURI(filename) { + return filename.startsWith(dataURIPrefix); + } + function isFileURI(filename) { + return filename.startsWith("file://"); + } + let wasmBinaryFile; + wasmBinaryFile = "twgsl.wasm"; + if (!isDataURI(wasmBinaryFile)) { + wasmBinaryFile = locateFile(wasmBinaryFile); + } + function getBinary(file) { + try { + if (file == wasmBinaryFile && wasmBinary) { + return new Uint8Array(wasmBinary); + } + if (readBinary) { + return readBinary(file); + } + throw "both async and sync fetching of the wasm failed"; + } catch (err) { + abort(err); + } + } + function getBinaryPromise() { + if (!wasmBinary && (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER)) { + if (typeof fetch === "function" && !isFileURI(wasmBinaryFile)) { + return fetch(wasmBinaryFile, { credentials: "same-origin" }) + .then(function (response) { + if (!response["ok"]) { + throw "failed to load wasm binary file at '" + wasmBinaryFile + "'"; + } + return response["arrayBuffer"](); + }) + .catch(function () { + return getBinary(wasmBinaryFile); + }); + } else { + if (readAsync) { + return new Promise(function (resolve, reject) { + readAsync( + wasmBinaryFile, + function (response) { + resolve(new Uint8Array(response)); + }, + reject, + ); + }); + } + } + } + return Promise.resolve().then(function () { + return getBinary(wasmBinaryFile); + }); + } + function createWasm() { + let info = { a: asmLibraryArg }; + function receiveInstance(instance, module) { + let exports = instance.exports; + Module["asm"] = exports; + wasmMemory = Module["asm"]["o"]; + updateGlobalBufferAndViews(wasmMemory.buffer); + wasmTable = Module["asm"]["s"]; + addOnInit(Module["asm"]["p"]); + removeRunDependency("wasm-instantiate"); + } + addRunDependency("wasm-instantiate"); + function receiveInstantiationResult(result) { + receiveInstance(result["instance"]); + } + function instantiateArrayBuffer(receiver) { + return getBinaryPromise() + .then(function (binary) { + return WebAssembly.instantiate(binary, info); + }) + .then(function (instance) { + return instance; + }) + .then(receiver, function (reason) { + err("failed to asynchronously prepare wasm: " + reason); + abort(reason); + }); + } + function instantiateAsync() { + if ( + !wasmBinary && + typeof WebAssembly.instantiateStreaming === "function" && + !isDataURI(wasmBinaryFile) && + !isFileURI(wasmBinaryFile) && + !ENVIRONMENT_IS_NODE && + typeof fetch === "function" + ) { + return fetch(wasmBinaryFile, { credentials: "same-origin" }).then(function (response) { + let result = WebAssembly.instantiateStreaming(response, info); + return result.then(receiveInstantiationResult, function (reason) { + err("wasm streaming compile failed: " + reason); + err("falling back to ArrayBuffer instantiation"); + return instantiateArrayBuffer(receiveInstantiationResult); + }); + }); + } else { + return instantiateArrayBuffer(receiveInstantiationResult); + } + } + if (Module["instantiateWasm"]) { + try { + let exports = Module["instantiateWasm"](info, receiveInstance); + return exports; + } catch (e) { + err("Module.instantiateWasm callback failed with error: " + e); + return false; + } + } + instantiateAsync(); + return {}; + } + let tempDouble; + let tempI64; + function ExitStatus(status) { + this.name = "ExitStatus"; + this.message = "Program terminated with exit(" + status + ")"; + this.status = status; + } + function callRuntimeCallbacks(callbacks) { + while (callbacks.length > 0) { + callbacks.shift()(Module); + } + } + function ___assert_fail(condition, filename, line, func) { + abort( + "Assertion failed: " + + UTF8ToString(condition) + + ", at: " + + [ + filename ? UTF8ToString(filename) : "unknown filename", + line, + func ? UTF8ToString(func) : "unknown function", + ], + ); + } + function ___cxa_allocate_exception(size) { + return _malloc(size + 24) + 24; + } + function ExceptionInfo(excPtr) { + this.excPtr = excPtr; + this.ptr = excPtr - 24; + this.set_type = function (type) { + HEAPU32[(this.ptr + 4) >> 2] = type; + }; + this.get_type = function () { + return HEAPU32[(this.ptr + 4) >> 2]; + }; + this.set_destructor = function (destructor) { + HEAPU32[(this.ptr + 8) >> 2] = destructor; + }; + this.get_destructor = function () { + return HEAPU32[(this.ptr + 8) >> 2]; + }; + this.set_refcount = function (refcount) { + HEAP32[this.ptr >> 2] = refcount; + }; + this.set_caught = function (caught) { + caught = caught ? 1 : 0; + HEAP8[(this.ptr + 12) >> 0] = caught; + }; + this.get_caught = function () { + return HEAP8[(this.ptr + 12) >> 0] != 0; + }; + this.set_rethrown = function (rethrown) { + rethrown = rethrown ? 1 : 0; + HEAP8[(this.ptr + 13) >> 0] = rethrown; + }; + this.get_rethrown = function () { + return HEAP8[(this.ptr + 13) >> 0] != 0; + }; + this.init = function (type, destructor) { + this.set_adjusted_ptr(0); + this.set_type(type); + this.set_destructor(destructor); + this.set_refcount(0); + this.set_caught(false); + this.set_rethrown(false); + }; + this.add_ref = function () { + let value = HEAP32[this.ptr >> 2]; + HEAP32[this.ptr >> 2] = value + 1; + }; + this.release_ref = function () { + let prev = HEAP32[this.ptr >> 2]; + HEAP32[this.ptr >> 2] = prev - 1; + return prev === 1; + }; + this.set_adjusted_ptr = function (adjustedPtr) { + HEAPU32[(this.ptr + 16) >> 2] = adjustedPtr; + }; + this.get_adjusted_ptr = function () { + return HEAPU32[(this.ptr + 16) >> 2]; + }; + this.get_exception_ptr = function () { + let isPointer = ___cxa_is_pointer_type(this.get_type()); + if (isPointer) { + return HEAPU32[this.excPtr >> 2]; + } + let adjusted = this.get_adjusted_ptr(); + if (adjusted !== 0) return adjusted; + return this.excPtr; + }; + } + let exceptionLast = 0; + let uncaughtExceptionCount = 0; + function ___cxa_throw(ptr, type, destructor) { + let info = new ExceptionInfo(ptr); + info.init(type, destructor); + exceptionLast = ptr; + uncaughtExceptionCount++; + throw ptr; + } + function _abort() { + abort(""); + } + function getHeapMax() { + return 2147483648; + } + function emscripten_realloc_buffer(size) { + try { + wasmMemory.grow((size - buffer.byteLength + 65535) >>> 16); + updateGlobalBufferAndViews(wasmMemory.buffer); + return 1; + } catch (e) {} + } + function _emscripten_resize_heap(requestedSize) { + let oldSize = HEAPU8.length; + requestedSize = requestedSize >>> 0; + let maxHeapSize = getHeapMax(); + if (requestedSize > maxHeapSize) { + return false; + } + let alignUp = (x, multiple) => x + ((multiple - (x % multiple)) % multiple); + for (let cutDown = 1; cutDown <= 4; cutDown *= 2) { + let overGrownHeapSize = oldSize * (1 + 0.2 / cutDown); + overGrownHeapSize = Math.min(overGrownHeapSize, requestedSize + 100663296); + let newSize = Math.min( + maxHeapSize, + alignUp(Math.max(requestedSize, overGrownHeapSize), 65536), + ); + let replacement = emscripten_realloc_buffer(newSize); + if (replacement) { + return true; + } + } + return false; + } + let ENV = {}; + function getExecutableName() { + return thisProgram || "./this.program"; + } + function getEnvStrings() { + if (!getEnvStrings.strings) { + let lang = + ( + (typeof navigator === "object" && navigator.languages && navigator.languages[0]) || + "C" + ).replace("-", "_") + ".UTF-8"; + let env = { + USER: "web_user", + LOGNAME: "web_user", + PATH: "/", + PWD: "/", + HOME: "/home/web_user", + LANG: lang, + _: getExecutableName(), + }; + for (var x in ENV) { + if (ENV[x] === undefined) delete env[x]; + else env[x] = ENV[x]; + } + let strings = []; + for (var x in env) { + strings.push(x + "=" + env[x]); + } + getEnvStrings.strings = strings; + } + return getEnvStrings.strings; + } + function writeAsciiToMemory(str, buffer, dontAddNull) { + for (let i = 0; i < str.length; ++i) { + HEAP8[buffer++ >> 0] = str.charCodeAt(i); + } + if (!dontAddNull) HEAP8[buffer >> 0] = 0; + } + var PATH = { + isAbs: (path) => path.charAt(0) === "/", + splitPath: (filename) => { + let splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; + return splitPathRe.exec(filename).slice(1); + }, + normalizeArray: (parts, allowAboveRoot) => { + let up = 0; + for (let i = parts.length - 1; i >= 0; i--) { + let last = parts[i]; + if (last === ".") { + parts.splice(i, 1); + } else if (last === "..") { + parts.splice(i, 1); + up++; + } else if (up) { + parts.splice(i, 1); + up--; + } + } + if (allowAboveRoot) { + for (; up; up--) { + parts.unshift(".."); + } + } + return parts; + }, + normalize: (path) => { + let isAbsolute = PATH.isAbs(path), + trailingSlash = path.substr(-1) === "/"; + path = PATH.normalizeArray( + path.split("/").filter((p) => !!p), + !isAbsolute, + ).join("/"); + if (!path && !isAbsolute) { + path = "."; + } + if (path && trailingSlash) { + path += "/"; + } + return (isAbsolute ? "/" : "") + path; + }, + dirname: (path) => { + let result = PATH.splitPath(path), + root = result[0], + dir = result[1]; + if (!root && !dir) { + return "."; + } + if (dir) { + dir = dir.substr(0, dir.length - 1); + } + return root + dir; + }, + basename: (path) => { + if (path === "/") return "/"; + path = PATH.normalize(path); + path = path.replace(/\/$/, ""); + let lastSlash = path.lastIndexOf("/"); + if (lastSlash === -1) return path; + return path.substr(lastSlash + 1); + }, + join() { + let paths = Array.prototype.slice.call(arguments); + return PATH.normalize(paths.join("/")); + }, + join2: (l, r) => { + return PATH.normalize(l + "/" + r); + }, + }; + function getRandomDevice() { + if (typeof crypto === "object" && typeof crypto["getRandomValues"] === "function") { + let randomBuffer = new Uint8Array(1); + return () => { + crypto.getRandomValues(randomBuffer); + return randomBuffer[0]; + }; + } else if (ENVIRONMENT_IS_NODE) { + try { + let crypto_module = require("crypto"); + return () => crypto_module["randomBytes"](1)[0]; + } catch (e) {} + } + return () => abort("randomDevice"); + } + var PATH_FS = { + resolve() { + let resolvedPath = "", + resolvedAbsolute = false; + for (let i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { + let path = i >= 0 ? arguments[i] : FS.cwd(); + if (typeof path !== "string") { + throw new TypeError("Arguments to path.resolve must be strings"); + } else if (!path) { + return ""; + } + resolvedPath = path + "/" + resolvedPath; + resolvedAbsolute = PATH.isAbs(path); + } + resolvedPath = PATH.normalizeArray( + resolvedPath.split("/").filter((p) => !!p), + !resolvedAbsolute, + ).join("/"); + return (resolvedAbsolute ? "/" : "") + resolvedPath || "."; + }, + relative: (from, to) => { + from = PATH_FS.resolve(from).substr(1); + to = PATH_FS.resolve(to).substr(1); + function trim(arr) { + let start = 0; + for (; start < arr.length; start++) { + if (arr[start] !== "") break; + } + let end = arr.length - 1; + for (; end >= 0; end--) { + if (arr[end] !== "") break; + } + if (start > end) return []; + return arr.slice(start, end - start + 1); + } + let fromParts = trim(from.split("/")); + let toParts = trim(to.split("/")); + let length = Math.min(fromParts.length, toParts.length); + let samePartsLength = length; + for (var i = 0; i < length; i++) { + if (fromParts[i] !== toParts[i]) { + samePartsLength = i; + break; + } + } + let outputParts = []; + for (var i = samePartsLength; i < fromParts.length; i++) { + outputParts.push(".."); + } + outputParts = outputParts.concat(toParts.slice(samePartsLength)); + return outputParts.join("/"); + }, + }; + function intArrayFromString(stringy, dontAddNull, length) { + let len = length > 0 ? length : lengthBytesUTF8(stringy) + 1; + let u8array = new Array(len); + let numBytesWritten = stringToUTF8Array(stringy, u8array, 0, u8array.length); + if (dontAddNull) u8array.length = numBytesWritten; + return u8array; + } + var TTY = { + ttys: [], + init() {}, + shutdown() {}, + register(dev, ops) { + TTY.ttys[dev] = { input: [], output: [], ops }; + FS.registerDevice(dev, TTY.stream_ops); + }, + stream_ops: { + open(stream) { + let tty = TTY.ttys[stream.node.rdev]; + if (!tty) { + throw new FS.ErrnoError(43); + } + stream.tty = tty; + stream.seekable = false; + }, + close(stream) { + stream.tty.ops.fsync(stream.tty); + }, + fsync(stream) { + stream.tty.ops.fsync(stream.tty); + }, + read(stream, buffer, offset, length, pos) { + if (!stream.tty || !stream.tty.ops.get_char) { + throw new FS.ErrnoError(60); + } + let bytesRead = 0; + for (let i = 0; i < length; i++) { + var result; + try { + result = stream.tty.ops.get_char(stream.tty); + } catch (e) { + throw new FS.ErrnoError(29); + } + if (result === undefined && bytesRead === 0) { + throw new FS.ErrnoError(6); + } + if (result === null || result === undefined) break; + bytesRead++; + buffer[offset + i] = result; + } + if (bytesRead) { + stream.node.timestamp = Date.now(); + } + return bytesRead; + }, + write(stream, buffer, offset, length, pos) { + if (!stream.tty || !stream.tty.ops.put_char) { + throw new FS.ErrnoError(60); + } + try { + for (var i = 0; i < length; i++) { + stream.tty.ops.put_char(stream.tty, buffer[offset + i]); + } + } catch (e) { + throw new FS.ErrnoError(29); + } + if (length) { + stream.node.timestamp = Date.now(); + } + return i; + }, + }, + default_tty_ops: { + get_char(tty) { + if (!tty.input.length) { + let result = null; + if (ENVIRONMENT_IS_NODE) { + let BUFSIZE = 256; + let buf = Buffer.alloc(BUFSIZE); + let bytesRead = 0; + try { + bytesRead = fs.readSync(process.stdin.fd, buf, 0, BUFSIZE, -1); + } catch (e) { + if (e.toString().includes("EOF")) bytesRead = 0; + else throw e; + } + if (bytesRead > 0) { + result = buf.slice(0, bytesRead).toString("utf-8"); + } else { + result = null; + } + } else if (typeof window !== "undefined" && typeof window.prompt === "function") { + result = window.prompt("Input: "); + if (result !== null) { + result += "\n"; + } + } else if (typeof readline === "function") { + result = readline(); + if (result !== null) { + result += "\n"; + } + } + if (!result) { + return null; + } + tty.input = intArrayFromString(result, true); + } + return tty.input.shift(); + }, + put_char(tty, val) { + if (val === null || val === 10) { + out(UTF8ArrayToString(tty.output, 0)); + tty.output = []; + } else { + if (val != 0) tty.output.push(val); + } + }, + fsync(tty) { + if (tty.output && tty.output.length > 0) { + out(UTF8ArrayToString(tty.output, 0)); + tty.output = []; + } + }, + }, + default_tty1_ops: { + put_char(tty, val) { + if (val === null || val === 10) { + err(UTF8ArrayToString(tty.output, 0)); + tty.output = []; + } else { + if (val != 0) tty.output.push(val); + } + }, + fsync(tty) { + if (tty.output && tty.output.length > 0) { + err(UTF8ArrayToString(tty.output, 0)); + tty.output = []; + } + }, + }, + }; + function mmapAlloc(size) { + abort(); + } + var MEMFS = { + ops_table: null, + mount(mount) { + return MEMFS.createNode(null, "/", 16384 | 511, 0); + }, + createNode(parent, name, mode, dev) { + if (FS.isBlkdev(mode) || FS.isFIFO(mode)) { + throw new FS.ErrnoError(63); + } + if (!MEMFS.ops_table) { + MEMFS.ops_table = { + dir: { + node: { + getattr: MEMFS.node_ops.getattr, + setattr: MEMFS.node_ops.setattr, + lookup: MEMFS.node_ops.lookup, + mknod: MEMFS.node_ops.mknod, + rename: MEMFS.node_ops.rename, + unlink: MEMFS.node_ops.unlink, + rmdir: MEMFS.node_ops.rmdir, + readdir: MEMFS.node_ops.readdir, + symlink: MEMFS.node_ops.symlink, + }, + stream: { llseek: MEMFS.stream_ops.llseek }, + }, + file: { + node: { getattr: MEMFS.node_ops.getattr, setattr: MEMFS.node_ops.setattr }, + stream: { + llseek: MEMFS.stream_ops.llseek, + read: MEMFS.stream_ops.read, + write: MEMFS.stream_ops.write, + allocate: MEMFS.stream_ops.allocate, + mmap: MEMFS.stream_ops.mmap, + msync: MEMFS.stream_ops.msync, + }, + }, + link: { + node: { + getattr: MEMFS.node_ops.getattr, + setattr: MEMFS.node_ops.setattr, + readlink: MEMFS.node_ops.readlink, + }, + stream: {}, + }, + chrdev: { + node: { getattr: MEMFS.node_ops.getattr, setattr: MEMFS.node_ops.setattr }, + stream: FS.chrdev_stream_ops, + }, + }; + } + let node = FS.createNode(parent, name, mode, dev); + if (FS.isDir(node.mode)) { + node.node_ops = MEMFS.ops_table.dir.node; + node.stream_ops = MEMFS.ops_table.dir.stream; + node.contents = {}; + } else if (FS.isFile(node.mode)) { + node.node_ops = MEMFS.ops_table.file.node; + node.stream_ops = MEMFS.ops_table.file.stream; + node.usedBytes = 0; + node.contents = null; + } else if (FS.isLink(node.mode)) { + node.node_ops = MEMFS.ops_table.link.node; + node.stream_ops = MEMFS.ops_table.link.stream; + } else if (FS.isChrdev(node.mode)) { + node.node_ops = MEMFS.ops_table.chrdev.node; + node.stream_ops = MEMFS.ops_table.chrdev.stream; + } + node.timestamp = Date.now(); + if (parent) { + parent.contents[name] = node; + parent.timestamp = node.timestamp; + } + return node; + }, + getFileDataAsTypedArray(node) { + if (!node.contents) return new Uint8Array(0); + if (node.contents.subarray) return node.contents.subarray(0, node.usedBytes); + return new Uint8Array(node.contents); + }, + expandFileStorage(node, newCapacity) { + let prevCapacity = node.contents ? node.contents.length : 0; + if (prevCapacity >= newCapacity) return; + let CAPACITY_DOUBLING_MAX = 1024 * 1024; + newCapacity = Math.max( + newCapacity, + (prevCapacity * (prevCapacity < CAPACITY_DOUBLING_MAX ? 2 : 1.125)) >>> 0, + ); + if (prevCapacity != 0) newCapacity = Math.max(newCapacity, 256); + let oldContents = node.contents; + node.contents = new Uint8Array(newCapacity); + if (node.usedBytes > 0) node.contents.set(oldContents.subarray(0, node.usedBytes), 0); + }, + resizeFileStorage(node, newSize) { + if (node.usedBytes == newSize) return; + if (newSize == 0) { + node.contents = null; + node.usedBytes = 0; + } else { + let oldContents = node.contents; + node.contents = new Uint8Array(newSize); + if (oldContents) { + node.contents.set(oldContents.subarray(0, Math.min(newSize, node.usedBytes))); + } + node.usedBytes = newSize; + } + }, + node_ops: { + getattr(node) { + let attr = {}; + attr.dev = FS.isChrdev(node.mode) ? node.id : 1; + attr.ino = node.id; + attr.mode = node.mode; + attr.nlink = 1; + attr.uid = 0; + attr.gid = 0; + attr.rdev = node.rdev; + if (FS.isDir(node.mode)) { + attr.size = 4096; + } else if (FS.isFile(node.mode)) { + attr.size = node.usedBytes; + } else if (FS.isLink(node.mode)) { + attr.size = node.link.length; + } else { + attr.size = 0; + } + attr.atime = new Date(node.timestamp); + attr.mtime = new Date(node.timestamp); + attr.ctime = new Date(node.timestamp); + attr.blksize = 4096; + attr.blocks = Math.ceil(attr.size / attr.blksize); + return attr; + }, + setattr(node, attr) { + if (attr.mode !== undefined) { + node.mode = attr.mode; + } + if (attr.timestamp !== undefined) { + node.timestamp = attr.timestamp; + } + if (attr.size !== undefined) { + MEMFS.resizeFileStorage(node, attr.size); + } + }, + lookup(parent, name) { + throw FS.genericErrors[44]; + }, + mknod(parent, name, mode, dev) { + return MEMFS.createNode(parent, name, mode, dev); + }, + rename(old_node, new_dir, new_name) { + if (FS.isDir(old_node.mode)) { + let new_node; + try { + new_node = FS.lookupNode(new_dir, new_name); + } catch (e) {} + if (new_node) { + for (let i in new_node.contents) { + throw new FS.ErrnoError(55); + } + } + } + delete old_node.parent.contents[old_node.name]; + old_node.parent.timestamp = Date.now(); + old_node.name = new_name; + new_dir.contents[new_name] = old_node; + new_dir.timestamp = old_node.parent.timestamp; + old_node.parent = new_dir; + }, + unlink(parent, name) { + delete parent.contents[name]; + parent.timestamp = Date.now(); + }, + rmdir(parent, name) { + let node = FS.lookupNode(parent, name); + for (let i in node.contents) { + throw new FS.ErrnoError(55); + } + delete parent.contents[name]; + parent.timestamp = Date.now(); + }, + readdir(node) { + let entries = [".", ".."]; + for (let key in node.contents) { + if (!node.contents.hasOwnProperty(key)) { + continue; + } + entries.push(key); + } + return entries; + }, + symlink(parent, newname, oldpath) { + let node = MEMFS.createNode(parent, newname, 511 | 40960, 0); + node.link = oldpath; + return node; + }, + readlink(node) { + if (!FS.isLink(node.mode)) { + throw new FS.ErrnoError(28); + } + return node.link; + }, + }, + stream_ops: { + read(stream, buffer, offset, length, position) { + let contents = stream.node.contents; + if (position >= stream.node.usedBytes) return 0; + let size = Math.min(stream.node.usedBytes - position, length); + if (size > 8 && contents.subarray) { + buffer.set(contents.subarray(position, position + size), offset); + } else { + for (let i = 0; i < size; i++) buffer[offset + i] = contents[position + i]; + } + return size; + }, + write(stream, buffer, offset, length, position, canOwn) { + if (buffer.buffer === HEAP8.buffer) { + canOwn = false; + } + if (!length) return 0; + let node = stream.node; + node.timestamp = Date.now(); + if (buffer.subarray && (!node.contents || node.contents.subarray)) { + if (canOwn) { + node.contents = buffer.subarray(offset, offset + length); + node.usedBytes = length; + return length; + } else if (node.usedBytes === 0 && position === 0) { + node.contents = buffer.slice(offset, offset + length); + node.usedBytes = length; + return length; + } else if (position + length <= node.usedBytes) { + node.contents.set(buffer.subarray(offset, offset + length), position); + return length; + } + } + MEMFS.expandFileStorage(node, position + length); + if (node.contents.subarray && buffer.subarray) { + node.contents.set(buffer.subarray(offset, offset + length), position); + } else { + for (let i = 0; i < length; i++) { + node.contents[position + i] = buffer[offset + i]; + } + } + node.usedBytes = Math.max(node.usedBytes, position + length); + return length; + }, + llseek(stream, offset, whence) { + let position = offset; + if (whence === 1) { + position += stream.position; + } else if (whence === 2) { + if (FS.isFile(stream.node.mode)) { + position += stream.node.usedBytes; + } + } + if (position < 0) { + throw new FS.ErrnoError(28); + } + return position; + }, + allocate(stream, offset, length) { + MEMFS.expandFileStorage(stream.node, offset + length); + stream.node.usedBytes = Math.max(stream.node.usedBytes, offset + length); + }, + mmap(stream, length, position, prot, flags) { + if (!FS.isFile(stream.node.mode)) { + throw new FS.ErrnoError(43); + } + let ptr; + let allocated; + let contents = stream.node.contents; + if (!(flags & 2) && contents.buffer === buffer) { + allocated = false; + ptr = contents.byteOffset; + } else { + if (position > 0 || position + length < contents.length) { + if (contents.subarray) { + contents = contents.subarray(position, position + length); + } else { + contents = Array.prototype.slice.call(contents, position, position + length); + } + } + allocated = true; + ptr = mmapAlloc(length); + if (!ptr) { + throw new FS.ErrnoError(48); + } + HEAP8.set(contents, ptr); + } + return { ptr, allocated }; + }, + msync(stream, buffer, offset, length, mmapFlags) { + MEMFS.stream_ops.write(stream, buffer, 0, length, offset, false); + return 0; + }, + }, + }; + function asyncLoad(url, onload, onerror, noRunDep) { + let dep = !noRunDep ? getUniqueRunDependency("al " + url) : ""; + readAsync( + url, + (arrayBuffer) => { + assert(arrayBuffer, 'Loading data file "' + url + '" failed (no arrayBuffer).'); + onload(new Uint8Array(arrayBuffer)); + if (dep) removeRunDependency(dep); + }, + (event) => { + if (onerror) { + onerror(); + } else { + throw 'Loading data file "' + url + '" failed.'; + } + }, + ); + if (dep) addRunDependency(dep); + } + var FS = { + root: null, + mounts: [], + devices: {}, + streams: [], + nextInode: 1, + nameTable: null, + currentPath: "/", + initialized: false, + ignorePermissions: true, + ErrnoError: null, + genericErrors: {}, + filesystems: null, + syncFSRequests: 0, + lookupPath: (path, opts = {}) => { + path = PATH_FS.resolve(FS.cwd(), path); + if (!path) return { path: "", node: null }; + let defaults = { follow_mount: true, recurse_count: 0 }; + opts = Object.assign(defaults, opts); + if (opts.recurse_count > 8) { + throw new FS.ErrnoError(32); + } + let parts = PATH.normalizeArray( + path.split("/").filter((p) => !!p), + false, + ); + let current = FS.root; + let current_path = "/"; + for (let i = 0; i < parts.length; i++) { + let islast = i === parts.length - 1; + if (islast && opts.parent) { + break; + } + current = FS.lookupNode(current, parts[i]); + current_path = PATH.join2(current_path, parts[i]); + if (FS.isMountpoint(current)) { + if (!islast || (islast && opts.follow_mount)) { + current = current.mounted.root; + } + } + if (!islast || opts.follow) { + let count = 0; + while (FS.isLink(current.mode)) { + let link = FS.readlink(current_path); + current_path = PATH_FS.resolve(PATH.dirname(current_path), link); + let lookup = FS.lookupPath(current_path, { recurse_count: opts.recurse_count + 1 }); + current = lookup.node; + if (count++ > 40) { + throw new FS.ErrnoError(32); + } + } + } + } + return { path: current_path, node: current }; + }, + getPath: (node) => { + let path; + while (true) { + if (FS.isRoot(node)) { + let mount = node.mount.mountpoint; + if (!path) return mount; + return mount[mount.length - 1] !== "/" ? mount + "/" + path : mount + path; + } + path = path ? node.name + "/" + path : node.name; + node = node.parent; + } + }, + hashName: (parentid, name) => { + let hash = 0; + for (let i = 0; i < name.length; i++) { + hash = ((hash << 5) - hash + name.charCodeAt(i)) | 0; + } + return ((parentid + hash) >>> 0) % FS.nameTable.length; + }, + hashAddNode: (node) => { + let hash = FS.hashName(node.parent.id, node.name); + node.name_next = FS.nameTable[hash]; + FS.nameTable[hash] = node; + }, + hashRemoveNode: (node) => { + let hash = FS.hashName(node.parent.id, node.name); + if (FS.nameTable[hash] === node) { + FS.nameTable[hash] = node.name_next; + } else { + let current = FS.nameTable[hash]; + while (current) { + if (current.name_next === node) { + current.name_next = node.name_next; + break; + } + current = current.name_next; + } + } + }, + lookupNode: (parent, name) => { + let errCode = FS.mayLookup(parent); + if (errCode) { + throw new FS.ErrnoError(errCode, parent); + } + let hash = FS.hashName(parent.id, name); + for (let node = FS.nameTable[hash]; node; node = node.name_next) { + let nodeName = node.name; + if (node.parent.id === parent.id && nodeName === name) { + return node; + } + } + return FS.lookup(parent, name); + }, + createNode: (parent, name, mode, rdev) => { + let node = new FS.FSNode(parent, name, mode, rdev); + FS.hashAddNode(node); + return node; + }, + destroyNode: (node) => { + FS.hashRemoveNode(node); + }, + isRoot: (node) => { + return node === node.parent; + }, + isMountpoint: (node) => { + return !!node.mounted; + }, + isFile: (mode) => { + return (mode & 61440) === 32768; + }, + isDir: (mode) => { + return (mode & 61440) === 16384; + }, + isLink: (mode) => { + return (mode & 61440) === 40960; + }, + isChrdev: (mode) => { + return (mode & 61440) === 8192; + }, + isBlkdev: (mode) => { + return (mode & 61440) === 24576; + }, + isFIFO: (mode) => { + return (mode & 61440) === 4096; + }, + isSocket: (mode) => { + return (mode & 49152) === 49152; + }, + flagModes: { r: 0, "r+": 2, w: 577, "w+": 578, a: 1089, "a+": 1090 }, + modeStringToFlags: (str) => { + let flags = FS.flagModes[str]; + if (typeof flags === "undefined") { + throw new Error("Unknown file open mode: " + str); + } + return flags; + }, + flagsToPermissionString: (flag) => { + let perms = ["r", "w", "rw"][flag & 3]; + if (flag & 512) { + perms += "w"; + } + return perms; + }, + nodePermissions: (node, perms) => { + if (FS.ignorePermissions) { + return 0; + } + if (perms.includes("r") && !(node.mode & 292)) { + return 2; + } else if (perms.includes("w") && !(node.mode & 146)) { + return 2; + } else if (perms.includes("x") && !(node.mode & 73)) { + return 2; + } + return 0; + }, + mayLookup: (dir) => { + let errCode = FS.nodePermissions(dir, "x"); + if (errCode) return errCode; + if (!dir.node_ops.lookup) return 2; + return 0; + }, + mayCreate: (dir, name) => { + try { + let node = FS.lookupNode(dir, name); + return 20; + } catch (e) {} + return FS.nodePermissions(dir, "wx"); + }, + mayDelete: (dir, name, isdir) => { + let node; + try { + node = FS.lookupNode(dir, name); + } catch (e) { + return e.errno; + } + let errCode = FS.nodePermissions(dir, "wx"); + if (errCode) { + return errCode; + } + if (isdir) { + if (!FS.isDir(node.mode)) { + return 54; + } + if (FS.isRoot(node) || FS.getPath(node) === FS.cwd()) { + return 10; + } + } else { + if (FS.isDir(node.mode)) { + return 31; + } + } + return 0; + }, + mayOpen: (node, flags) => { + if (!node) { + return 44; + } + if (FS.isLink(node.mode)) { + return 32; + } else if (FS.isDir(node.mode)) { + if (FS.flagsToPermissionString(flags) !== "r" || flags & 512) { + return 31; + } + } + return FS.nodePermissions(node, FS.flagsToPermissionString(flags)); + }, + MAX_OPEN_FDS: 4096, + nextfd: (fd_start = 0, fd_end = FS.MAX_OPEN_FDS) => { + for (let fd = fd_start; fd <= fd_end; fd++) { + if (!FS.streams[fd]) { + return fd; + } + } + throw new FS.ErrnoError(33); + }, + getStream: (fd) => FS.streams[fd], + createStream: (stream, fd_start, fd_end) => { + if (!FS.FSStream) { + FS.FSStream = function () { + this.shared = {}; + }; + FS.FSStream.prototype = {}; + Object.defineProperties(FS.FSStream.prototype, { + object: { + get() { + return this.node; + }, + set(val) { + this.node = val; + }, + }, + isRead: { + get() { + return (this.flags & 2097155) !== 1; + }, + }, + isWrite: { + get() { + return (this.flags & 2097155) !== 0; + }, + }, + isAppend: { + get() { + return this.flags & 1024; + }, + }, + flags: { + get() { + return this.shared.flags; + }, + set(val) { + this.shared.flags = val; + }, + }, + position: { + get() { + return this.shared.position; + }, + set(val) { + this.shared.position = val; + }, + }, + }); + } + stream = Object.assign(new FS.FSStream(), stream); + let fd = FS.nextfd(fd_start, fd_end); + stream.fd = fd; + FS.streams[fd] = stream; + return stream; + }, + closeStream: (fd) => { + FS.streams[fd] = null; + }, + chrdev_stream_ops: { + open: (stream) => { + let device = FS.getDevice(stream.node.rdev); + stream.stream_ops = device.stream_ops; + if (stream.stream_ops.open) { + stream.stream_ops.open(stream); + } + }, + llseek: () => { + throw new FS.ErrnoError(70); + }, + }, + major: (dev) => dev >> 8, + minor: (dev) => dev & 255, + makedev: (ma, mi) => (ma << 8) | mi, + registerDevice: (dev, ops) => { + FS.devices[dev] = { stream_ops: ops }; + }, + getDevice: (dev) => FS.devices[dev], + getMounts: (mount) => { + let mounts = []; + let check = [mount]; + while (check.length) { + let m = check.pop(); + mounts.push(m); + check.push.apply(check, m.mounts); + } + return mounts; + }, + syncfs: (populate, callback) => { + if (typeof populate === "function") { + callback = populate; + populate = false; + } + FS.syncFSRequests++; + if (FS.syncFSRequests > 1) { + err( + "warning: " + + FS.syncFSRequests + + " FS.syncfs operations in flight at once, probably just doing extra work", + ); + } + let mounts = FS.getMounts(FS.root.mount); + let completed = 0; + function doCallback(errCode) { + FS.syncFSRequests--; + return callback(errCode); + } + function done(errCode) { + if (errCode) { + if (!done.errored) { + done.errored = true; + return doCallback(errCode); + } + return; + } + if (++completed >= mounts.length) { + doCallback(null); + } + } + mounts.forEach((mount) => { + if (!mount.type.syncfs) { + return done(null); + } + mount.type.syncfs(mount, populate, done); + }); + }, + mount: (type, opts, mountpoint) => { + let root = mountpoint === "/"; + let pseudo = !mountpoint; + let node; + if (root && FS.root) { + throw new FS.ErrnoError(10); + } else if (!root && !pseudo) { + let lookup = FS.lookupPath(mountpoint, { follow_mount: false }); + mountpoint = lookup.path; + node = lookup.node; + if (FS.isMountpoint(node)) { + throw new FS.ErrnoError(10); + } + if (!FS.isDir(node.mode)) { + throw new FS.ErrnoError(54); + } + } + let mount = { type, opts, mountpoint, mounts: [] }; + let mountRoot = type.mount(mount); + mountRoot.mount = mount; + mount.root = mountRoot; + if (root) { + FS.root = mountRoot; + } else if (node) { + node.mounted = mount; + if (node.mount) { + node.mount.mounts.push(mount); + } + } + return mountRoot; + }, + unmount: (mountpoint) => { + let lookup = FS.lookupPath(mountpoint, { follow_mount: false }); + if (!FS.isMountpoint(lookup.node)) { + throw new FS.ErrnoError(28); + } + let node = lookup.node; + let mount = node.mounted; + let mounts = FS.getMounts(mount); + Object.keys(FS.nameTable).forEach((hash) => { + let current = FS.nameTable[hash]; + while (current) { + let next = current.name_next; + if (mounts.includes(current.mount)) { + FS.destroyNode(current); + } + current = next; + } + }); + node.mounted = null; + let idx = node.mount.mounts.indexOf(mount); + node.mount.mounts.splice(idx, 1); + }, + lookup: (parent, name) => { + return parent.node_ops.lookup(parent, name); + }, + mknod: (path, mode, dev) => { + let lookup = FS.lookupPath(path, { parent: true }); + let parent = lookup.node; + let name = PATH.basename(path); + if (!name || name === "." || name === "..") { + throw new FS.ErrnoError(28); + } + let errCode = FS.mayCreate(parent, name); + if (errCode) { + throw new FS.ErrnoError(errCode); + } + if (!parent.node_ops.mknod) { + throw new FS.ErrnoError(63); + } + return parent.node_ops.mknod(parent, name, mode, dev); + }, + create: (path, mode) => { + mode = mode !== undefined ? mode : 438; + mode &= 4095; + mode |= 32768; + return FS.mknod(path, mode, 0); + }, + mkdir: (path, mode) => { + mode = mode !== undefined ? mode : 511; + mode &= 511 | 512; + mode |= 16384; + return FS.mknod(path, mode, 0); + }, + mkdirTree: (path, mode) => { + let dirs = path.split("/"); + let d = ""; + for (let i = 0; i < dirs.length; ++i) { + if (!dirs[i]) continue; + d += "/" + dirs[i]; + try { + FS.mkdir(d, mode); + } catch (e) { + if (e.errno != 20) throw e; + } + } + }, + mkdev: (path, mode, dev) => { + if (typeof dev === "undefined") { + dev = mode; + mode = 438; + } + mode |= 8192; + return FS.mknod(path, mode, dev); + }, + symlink: (oldpath, newpath) => { + if (!PATH_FS.resolve(oldpath)) { + throw new FS.ErrnoError(44); + } + let lookup = FS.lookupPath(newpath, { parent: true }); + let parent = lookup.node; + if (!parent) { + throw new FS.ErrnoError(44); + } + let newname = PATH.basename(newpath); + let errCode = FS.mayCreate(parent, newname); + if (errCode) { + throw new FS.ErrnoError(errCode); + } + if (!parent.node_ops.symlink) { + throw new FS.ErrnoError(63); + } + return parent.node_ops.symlink(parent, newname, oldpath); + }, + rename: (old_path, new_path) => { + let old_dirname = PATH.dirname(old_path); + let new_dirname = PATH.dirname(new_path); + let old_name = PATH.basename(old_path); + let new_name = PATH.basename(new_path); + let lookup, old_dir, new_dir; + lookup = FS.lookupPath(old_path, { parent: true }); + old_dir = lookup.node; + lookup = FS.lookupPath(new_path, { parent: true }); + new_dir = lookup.node; + if (!old_dir || !new_dir) throw new FS.ErrnoError(44); + if (old_dir.mount !== new_dir.mount) { + throw new FS.ErrnoError(75); + } + let old_node = FS.lookupNode(old_dir, old_name); + let relative = PATH_FS.relative(old_path, new_dirname); + if (relative.charAt(0) !== ".") { + throw new FS.ErrnoError(28); + } + relative = PATH_FS.relative(new_path, old_dirname); + if (relative.charAt(0) !== ".") { + throw new FS.ErrnoError(55); + } + let new_node; + try { + new_node = FS.lookupNode(new_dir, new_name); + } catch (e) {} + if (old_node === new_node) { + return; + } + let isdir = FS.isDir(old_node.mode); + let errCode = FS.mayDelete(old_dir, old_name, isdir); + if (errCode) { + throw new FS.ErrnoError(errCode); + } + errCode = new_node ? FS.mayDelete(new_dir, new_name, isdir) : FS.mayCreate(new_dir, new_name); + if (errCode) { + throw new FS.ErrnoError(errCode); + } + if (!old_dir.node_ops.rename) { + throw new FS.ErrnoError(63); + } + if (FS.isMountpoint(old_node) || (new_node && FS.isMountpoint(new_node))) { + throw new FS.ErrnoError(10); + } + if (new_dir !== old_dir) { + errCode = FS.nodePermissions(old_dir, "w"); + if (errCode) { + throw new FS.ErrnoError(errCode); + } + } + FS.hashRemoveNode(old_node); + try { + old_dir.node_ops.rename(old_node, new_dir, new_name); + } catch (e) { + throw e; + } finally { + FS.hashAddNode(old_node); + } + }, + rmdir: (path) => { + let lookup = FS.lookupPath(path, { parent: true }); + let parent = lookup.node; + let name = PATH.basename(path); + let node = FS.lookupNode(parent, name); + let errCode = FS.mayDelete(parent, name, true); + if (errCode) { + throw new FS.ErrnoError(errCode); + } + if (!parent.node_ops.rmdir) { + throw new FS.ErrnoError(63); + } + if (FS.isMountpoint(node)) { + throw new FS.ErrnoError(10); + } + parent.node_ops.rmdir(parent, name); + FS.destroyNode(node); + }, + readdir: (path) => { + let lookup = FS.lookupPath(path, { follow: true }); + let node = lookup.node; + if (!node.node_ops.readdir) { + throw new FS.ErrnoError(54); + } + return node.node_ops.readdir(node); + }, + unlink: (path) => { + let lookup = FS.lookupPath(path, { parent: true }); + let parent = lookup.node; + if (!parent) { + throw new FS.ErrnoError(44); + } + let name = PATH.basename(path); + let node = FS.lookupNode(parent, name); + let errCode = FS.mayDelete(parent, name, false); + if (errCode) { + throw new FS.ErrnoError(errCode); + } + if (!parent.node_ops.unlink) { + throw new FS.ErrnoError(63); + } + if (FS.isMountpoint(node)) { + throw new FS.ErrnoError(10); + } + parent.node_ops.unlink(parent, name); + FS.destroyNode(node); + }, + readlink: (path) => { + let lookup = FS.lookupPath(path); + let link = lookup.node; + if (!link) { + throw new FS.ErrnoError(44); + } + if (!link.node_ops.readlink) { + throw new FS.ErrnoError(28); + } + return PATH_FS.resolve(FS.getPath(link.parent), link.node_ops.readlink(link)); + }, + stat: (path, dontFollow) => { + let lookup = FS.lookupPath(path, { follow: !dontFollow }); + let node = lookup.node; + if (!node) { + throw new FS.ErrnoError(44); + } + if (!node.node_ops.getattr) { + throw new FS.ErrnoError(63); + } + return node.node_ops.getattr(node); + }, + lstat: (path) => { + return FS.stat(path, true); + }, + chmod: (path, mode, dontFollow) => { + let node; + if (typeof path === "string") { + let lookup = FS.lookupPath(path, { follow: !dontFollow }); + node = lookup.node; + } else { + node = path; + } + if (!node.node_ops.setattr) { + throw new FS.ErrnoError(63); + } + node.node_ops.setattr(node, { + mode: (mode & 4095) | (node.mode & ~4095), + timestamp: Date.now(), + }); + }, + lchmod: (path, mode) => { + FS.chmod(path, mode, true); + }, + fchmod: (fd, mode) => { + let stream = FS.getStream(fd); + if (!stream) { + throw new FS.ErrnoError(8); + } + FS.chmod(stream.node, mode); + }, + chown: (path, uid, gid, dontFollow) => { + let node; + if (typeof path === "string") { + let lookup = FS.lookupPath(path, { follow: !dontFollow }); + node = lookup.node; + } else { + node = path; + } + if (!node.node_ops.setattr) { + throw new FS.ErrnoError(63); + } + node.node_ops.setattr(node, { timestamp: Date.now() }); + }, + lchown: (path, uid, gid) => { + FS.chown(path, uid, gid, true); + }, + fchown: (fd, uid, gid) => { + let stream = FS.getStream(fd); + if (!stream) { + throw new FS.ErrnoError(8); + } + FS.chown(stream.node, uid, gid); + }, + truncate: (path, len) => { + if (len < 0) { + throw new FS.ErrnoError(28); + } + let node; + if (typeof path === "string") { + let lookup = FS.lookupPath(path, { follow: true }); + node = lookup.node; + } else { + node = path; + } + if (!node.node_ops.setattr) { + throw new FS.ErrnoError(63); + } + if (FS.isDir(node.mode)) { + throw new FS.ErrnoError(31); + } + if (!FS.isFile(node.mode)) { + throw new FS.ErrnoError(28); + } + let errCode = FS.nodePermissions(node, "w"); + if (errCode) { + throw new FS.ErrnoError(errCode); + } + node.node_ops.setattr(node, { size: len, timestamp: Date.now() }); + }, + ftruncate: (fd, len) => { + let stream = FS.getStream(fd); + if (!stream) { + throw new FS.ErrnoError(8); + } + if ((stream.flags & 2097155) === 0) { + throw new FS.ErrnoError(28); + } + FS.truncate(stream.node, len); + }, + utime: (path, atime, mtime) => { + let lookup = FS.lookupPath(path, { follow: true }); + let node = lookup.node; + node.node_ops.setattr(node, { timestamp: Math.max(atime, mtime) }); + }, + open: (path, flags, mode) => { + if (path === "") { + throw new FS.ErrnoError(44); + } + flags = typeof flags === "string" ? FS.modeStringToFlags(flags) : flags; + mode = typeof mode === "undefined" ? 438 : mode; + if (flags & 64) { + mode = (mode & 4095) | 32768; + } else { + mode = 0; + } + let node; + if (typeof path === "object") { + node = path; + } else { + path = PATH.normalize(path); + try { + let lookup = FS.lookupPath(path, { follow: !(flags & 131072) }); + node = lookup.node; + } catch (e) {} + } + let created = false; + if (flags & 64) { + if (node) { + if (flags & 128) { + throw new FS.ErrnoError(20); + } + } else { + node = FS.mknod(path, mode, 0); + created = true; + } + } + if (!node) { + throw new FS.ErrnoError(44); + } + if (FS.isChrdev(node.mode)) { + flags &= ~512; + } + if (flags & 65536 && !FS.isDir(node.mode)) { + throw new FS.ErrnoError(54); + } + if (!created) { + let errCode = FS.mayOpen(node, flags); + if (errCode) { + throw new FS.ErrnoError(errCode); + } + } + if (flags & 512 && !created) { + FS.truncate(node, 0); + } + flags &= ~(128 | 512 | 131072); + let stream = FS.createStream({ + node, + path: FS.getPath(node), + flags, + seekable: true, + position: 0, + stream_ops: node.stream_ops, + ungotten: [], + error: false, + }); + if (stream.stream_ops.open) { + stream.stream_ops.open(stream); + } + if (Module["logReadFiles"] && !(flags & 1)) { + if (!FS.readFiles) FS.readFiles = {}; + if (!(path in FS.readFiles)) { + FS.readFiles[path] = 1; + } + } + return stream; + }, + close: (stream) => { + if (FS.isClosed(stream)) { + throw new FS.ErrnoError(8); + } + if (stream.getdents) stream.getdents = null; + try { + if (stream.stream_ops.close) { + stream.stream_ops.close(stream); + } + } catch (e) { + throw e; + } finally { + FS.closeStream(stream.fd); + } + stream.fd = null; + }, + isClosed: (stream) => { + return stream.fd === null; + }, + llseek: (stream, offset, whence) => { + if (FS.isClosed(stream)) { + throw new FS.ErrnoError(8); + } + if (!stream.seekable || !stream.stream_ops.llseek) { + throw new FS.ErrnoError(70); + } + if (whence != 0 && whence != 1 && whence != 2) { + throw new FS.ErrnoError(28); + } + stream.position = stream.stream_ops.llseek(stream, offset, whence); + stream.ungotten = []; + return stream.position; + }, + read: (stream, buffer, offset, length, position) => { + if (length < 0 || position < 0) { + throw new FS.ErrnoError(28); + } + if (FS.isClosed(stream)) { + throw new FS.ErrnoError(8); + } + if ((stream.flags & 2097155) === 1) { + throw new FS.ErrnoError(8); + } + if (FS.isDir(stream.node.mode)) { + throw new FS.ErrnoError(31); + } + if (!stream.stream_ops.read) { + throw new FS.ErrnoError(28); + } + let seeking = typeof position !== "undefined"; + if (!seeking) { + position = stream.position; + } else if (!stream.seekable) { + throw new FS.ErrnoError(70); + } + let bytesRead = stream.stream_ops.read(stream, buffer, offset, length, position); + if (!seeking) stream.position += bytesRead; + return bytesRead; + }, + write: (stream, buffer, offset, length, position, canOwn) => { + if (length < 0 || position < 0) { + throw new FS.ErrnoError(28); + } + if (FS.isClosed(stream)) { + throw new FS.ErrnoError(8); + } + if ((stream.flags & 2097155) === 0) { + throw new FS.ErrnoError(8); + } + if (FS.isDir(stream.node.mode)) { + throw new FS.ErrnoError(31); + } + if (!stream.stream_ops.write) { + throw new FS.ErrnoError(28); + } + if (stream.seekable && stream.flags & 1024) { + FS.llseek(stream, 0, 2); + } + let seeking = typeof position !== "undefined"; + if (!seeking) { + position = stream.position; + } else if (!stream.seekable) { + throw new FS.ErrnoError(70); + } + let bytesWritten = stream.stream_ops.write(stream, buffer, offset, length, position, canOwn); + if (!seeking) stream.position += bytesWritten; + return bytesWritten; + }, + allocate: (stream, offset, length) => { + if (FS.isClosed(stream)) { + throw new FS.ErrnoError(8); + } + if (offset < 0 || length <= 0) { + throw new FS.ErrnoError(28); + } + if ((stream.flags & 2097155) === 0) { + throw new FS.ErrnoError(8); + } + if (!FS.isFile(stream.node.mode) && !FS.isDir(stream.node.mode)) { + throw new FS.ErrnoError(43); + } + if (!stream.stream_ops.allocate) { + throw new FS.ErrnoError(138); + } + stream.stream_ops.allocate(stream, offset, length); + }, + mmap: (stream, length, position, prot, flags) => { + if ((prot & 2) !== 0 && (flags & 2) === 0 && (stream.flags & 2097155) !== 2) { + throw new FS.ErrnoError(2); + } + if ((stream.flags & 2097155) === 1) { + throw new FS.ErrnoError(2); + } + if (!stream.stream_ops.mmap) { + throw new FS.ErrnoError(43); + } + return stream.stream_ops.mmap(stream, length, position, prot, flags); + }, + msync: (stream, buffer, offset, length, mmapFlags) => { + if (!stream.stream_ops.msync) { + return 0; + } + return stream.stream_ops.msync(stream, buffer, offset, length, mmapFlags); + }, + munmap: (stream) => 0, + ioctl: (stream, cmd, arg) => { + if (!stream.stream_ops.ioctl) { + throw new FS.ErrnoError(59); + } + return stream.stream_ops.ioctl(stream, cmd, arg); + }, + readFile: (path, opts = {}) => { + opts.flags = opts.flags || 0; + opts.encoding = opts.encoding || "binary"; + if (opts.encoding !== "utf8" && opts.encoding !== "binary") { + throw new Error('Invalid encoding type "' + opts.encoding + '"'); + } + let ret; + let stream = FS.open(path, opts.flags); + let stat = FS.stat(path); + let length = stat.size; + let buf = new Uint8Array(length); + FS.read(stream, buf, 0, length, 0); + if (opts.encoding === "utf8") { + ret = UTF8ArrayToString(buf, 0); + } else if (opts.encoding === "binary") { + ret = buf; + } + FS.close(stream); + return ret; + }, + writeFile: (path, data, opts = {}) => { + opts.flags = opts.flags || 577; + let stream = FS.open(path, opts.flags, opts.mode); + if (typeof data === "string") { + let buf = new Uint8Array(lengthBytesUTF8(data) + 1); + let actualNumBytes = stringToUTF8Array(data, buf, 0, buf.length); + FS.write(stream, buf, 0, actualNumBytes, undefined, opts.canOwn); + } else if (ArrayBuffer.isView(data)) { + FS.write(stream, data, 0, data.byteLength, undefined, opts.canOwn); + } else { + throw new Error("Unsupported data type"); + } + FS.close(stream); + }, + cwd: () => FS.currentPath, + chdir: (path) => { + let lookup = FS.lookupPath(path, { follow: true }); + if (lookup.node === null) { + throw new FS.ErrnoError(44); + } + if (!FS.isDir(lookup.node.mode)) { + throw new FS.ErrnoError(54); + } + let errCode = FS.nodePermissions(lookup.node, "x"); + if (errCode) { + throw new FS.ErrnoError(errCode); + } + FS.currentPath = lookup.path; + }, + createDefaultDirectories: () => { + FS.mkdir("/tmp"); + FS.mkdir("/home"); + FS.mkdir("/home/web_user"); + }, + createDefaultDevices: () => { + FS.mkdir("/dev"); + FS.registerDevice(FS.makedev(1, 3), { + read: () => 0, + write: (stream, buffer, offset, length, pos) => length, + }); + FS.mkdev("/dev/null", FS.makedev(1, 3)); + TTY.register(FS.makedev(5, 0), TTY.default_tty_ops); + TTY.register(FS.makedev(6, 0), TTY.default_tty1_ops); + FS.mkdev("/dev/tty", FS.makedev(5, 0)); + FS.mkdev("/dev/tty1", FS.makedev(6, 0)); + let random_device = getRandomDevice(); + FS.createDevice("/dev", "random", random_device); + FS.createDevice("/dev", "urandom", random_device); + FS.mkdir("/dev/shm"); + FS.mkdir("/dev/shm/tmp"); + }, + createSpecialDirectories: () => { + FS.mkdir("/proc"); + let proc_self = FS.mkdir("/proc/self"); + FS.mkdir("/proc/self/fd"); + FS.mount( + { + mount: () => { + let node = FS.createNode(proc_self, "fd", 16384 | 511, 73); + node.node_ops = { + lookup: (parent, name) => { + let fd = +name; + let stream = FS.getStream(fd); + if (!stream) throw new FS.ErrnoError(8); + let ret = { + parent: null, + mount: { mountpoint: "fake" }, + node_ops: { readlink: () => stream.path }, + }; + ret.parent = ret; + return ret; + }, + }; + return node; + }, + }, + {}, + "/proc/self/fd", + ); + }, + createStandardStreams: () => { + if (Module["stdin"]) { + FS.createDevice("/dev", "stdin", Module["stdin"]); + } else { + FS.symlink("/dev/tty", "/dev/stdin"); + } + if (Module["stdout"]) { + FS.createDevice("/dev", "stdout", null, Module["stdout"]); + } else { + FS.symlink("/dev/tty", "/dev/stdout"); + } + if (Module["stderr"]) { + FS.createDevice("/dev", "stderr", null, Module["stderr"]); + } else { + FS.symlink("/dev/tty1", "/dev/stderr"); + } + let stdin = FS.open("/dev/stdin", 0); + let stdout = FS.open("/dev/stdout", 1); + let stderr = FS.open("/dev/stderr", 1); + }, + ensureErrnoError: () => { + if (FS.ErrnoError) return; + FS.ErrnoError = function ErrnoError(errno, node) { + this.node = node; + this.setErrno = function (errno) { + this.errno = errno; + }; + this.setErrno(errno); + this.message = "FS error"; + }; + FS.ErrnoError.prototype = new Error(); + FS.ErrnoError.prototype.constructor = FS.ErrnoError; + [44].forEach((code) => { + FS.genericErrors[code] = new FS.ErrnoError(code); + FS.genericErrors[code].stack = ""; + }); + }, + staticInit: () => { + FS.ensureErrnoError(); + FS.nameTable = new Array(4096); + FS.mount(MEMFS, {}, "/"); + FS.createDefaultDirectories(); + FS.createDefaultDevices(); + FS.createSpecialDirectories(); + FS.filesystems = { MEMFS }; + }, + init: (input, output, error) => { + FS.init.initialized = true; + FS.ensureErrnoError(); + Module["stdin"] = input || Module["stdin"]; + Module["stdout"] = output || Module["stdout"]; + Module["stderr"] = error || Module["stderr"]; + FS.createStandardStreams(); + }, + quit: () => { + FS.init.initialized = false; + for (let i = 0; i < FS.streams.length; i++) { + let stream = FS.streams[i]; + if (!stream) { + continue; + } + FS.close(stream); + } + }, + getMode: (canRead, canWrite) => { + let mode = 0; + if (canRead) mode |= 292 | 73; + if (canWrite) mode |= 146; + return mode; + }, + findObject: (path, dontResolveLastLink) => { + let ret = FS.analyzePath(path, dontResolveLastLink); + if (!ret.exists) { + return null; + } + return ret.object; + }, + analyzePath: (path, dontResolveLastLink) => { + try { + var lookup = FS.lookupPath(path, { follow: !dontResolveLastLink }); + path = lookup.path; + } catch (e) {} + let ret = { + isRoot: false, + exists: false, + error: 0, + name: null, + path: null, + object: null, + parentExists: false, + parentPath: null, + parentObject: null, + }; + try { + var lookup = FS.lookupPath(path, { parent: true }); + ret.parentExists = true; + ret.parentPath = lookup.path; + ret.parentObject = lookup.node; + ret.name = PATH.basename(path); + lookup = FS.lookupPath(path, { follow: !dontResolveLastLink }); + ret.exists = true; + ret.path = lookup.path; + ret.object = lookup.node; + ret.name = lookup.node.name; + ret.isRoot = lookup.path === "/"; + } catch (e) { + ret.error = e.errno; + } + return ret; + }, + createPath: (parent, path, canRead, canWrite) => { + parent = typeof parent === "string" ? parent : FS.getPath(parent); + let parts = path.split("/").reverse(); + while (parts.length) { + let part = parts.pop(); + if (!part) continue; + var current = PATH.join2(parent, part); + try { + FS.mkdir(current); + } catch (e) {} + parent = current; + } + return current; + }, + createFile: (parent, name, properties, canRead, canWrite) => { + let path = PATH.join2(typeof parent === "string" ? parent : FS.getPath(parent), name); + let mode = FS.getMode(canRead, canWrite); + return FS.create(path, mode); + }, + createDataFile: (parent, name, data, canRead, canWrite, canOwn) => { + let path = name; + if (parent) { + parent = typeof parent === "string" ? parent : FS.getPath(parent); + path = name ? PATH.join2(parent, name) : parent; + } + let mode = FS.getMode(canRead, canWrite); + let node = FS.create(path, mode); + if (data) { + if (typeof data === "string") { + let arr = new Array(data.length); + for (let i = 0, len = data.length; i < len; ++i) arr[i] = data.charCodeAt(i); + data = arr; + } + FS.chmod(node, mode | 146); + let stream = FS.open(node, 577); + FS.write(stream, data, 0, data.length, 0, canOwn); + FS.close(stream); + FS.chmod(node, mode); + } + return node; + }, + createDevice: (parent, name, input, output) => { + let path = PATH.join2(typeof parent === "string" ? parent : FS.getPath(parent), name); + let mode = FS.getMode(!!input, !!output); + if (!FS.createDevice.major) FS.createDevice.major = 64; + let dev = FS.makedev(FS.createDevice.major++, 0); + FS.registerDevice(dev, { + open: (stream) => { + stream.seekable = false; + }, + close: (stream) => { + if (output && output.buffer && output.buffer.length) { + output(10); + } + }, + read: (stream, buffer, offset, length, pos) => { + let bytesRead = 0; + for (let i = 0; i < length; i++) { + var result; + try { + result = input(); + } catch (e) { + throw new FS.ErrnoError(29); + } + if (result === undefined && bytesRead === 0) { + throw new FS.ErrnoError(6); + } + if (result === null || result === undefined) break; + bytesRead++; + buffer[offset + i] = result; + } + if (bytesRead) { + stream.node.timestamp = Date.now(); + } + return bytesRead; + }, + write: (stream, buffer, offset, length, pos) => { + for (var i = 0; i < length; i++) { + try { + output(buffer[offset + i]); + } catch (e) { + throw new FS.ErrnoError(29); + } + } + if (length) { + stream.node.timestamp = Date.now(); + } + return i; + }, + }); + return FS.mkdev(path, mode, dev); + }, + forceLoadFile: (obj) => { + if (obj.isDevice || obj.isFolder || obj.link || obj.contents) return true; + if (typeof XMLHttpRequest !== "undefined") { + throw new Error( + "Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.", + ); + } else if (read_) { + try { + obj.contents = intArrayFromString(read_(obj.url), true); + obj.usedBytes = obj.contents.length; + } catch (e) { + throw new FS.ErrnoError(29); + } + } else { + throw new Error("Cannot load without read() or XMLHttpRequest."); + } + }, + createLazyFile: (parent, name, url, canRead, canWrite) => { + function LazyUint8Array() { + this.lengthKnown = false; + this.chunks = []; + } + LazyUint8Array.prototype.get = function LazyUint8Array_get(idx) { + if (idx > this.length - 1 || idx < 0) { + return undefined; + } + let chunkOffset = idx % this.chunkSize; + let chunkNum = (idx / this.chunkSize) | 0; + return this.getter(chunkNum)[chunkOffset]; + }; + LazyUint8Array.prototype.setDataGetter = function LazyUint8Array_setDataGetter(getter) { + this.getter = getter; + }; + LazyUint8Array.prototype.cacheLength = function LazyUint8Array_cacheLength() { + let xhr = new XMLHttpRequest(); + xhr.open("HEAD", url, false); + xhr.send(null); + if (!((xhr.status >= 200 && xhr.status < 300) || xhr.status === 304)) + throw new Error("Couldn't load " + url + ". Status: " + xhr.status); + let datalength = Number(xhr.getResponseHeader("Content-length")); + let header; + let hasByteServing = + (header = xhr.getResponseHeader("Accept-Ranges")) && header === "bytes"; + let usesGzip = (header = xhr.getResponseHeader("Content-Encoding")) && header === "gzip"; + let chunkSize = 1024 * 1024; + if (!hasByteServing) chunkSize = datalength; + let doXHR = (from, to) => { + if (from > to) + throw new Error("invalid range (" + from + ", " + to + ") or no bytes requested!"); + if (to > datalength - 1) + throw new Error("only " + datalength + " bytes available! programmer error!"); + let xhr = new XMLHttpRequest(); + xhr.open("GET", url, false); + if (datalength !== chunkSize) xhr.setRequestHeader("Range", "bytes=" + from + "-" + to); + xhr.responseType = "arraybuffer"; + if (xhr.overrideMimeType) { + xhr.overrideMimeType("text/plain; charset=x-user-defined"); + } + xhr.send(null); + if (!((xhr.status >= 200 && xhr.status < 300) || xhr.status === 304)) + throw new Error("Couldn't load " + url + ". Status: " + xhr.status); + if (xhr.response !== undefined) { + return new Uint8Array(xhr.response || []); + } + return intArrayFromString(xhr.responseText || "", true); + }; + let lazyArray = this; + lazyArray.setDataGetter((chunkNum) => { + let start = chunkNum * chunkSize; + let end = (chunkNum + 1) * chunkSize - 1; + end = Math.min(end, datalength - 1); + if (typeof lazyArray.chunks[chunkNum] === "undefined") { + lazyArray.chunks[chunkNum] = doXHR(start, end); + } + if (typeof lazyArray.chunks[chunkNum] === "undefined") throw new Error("doXHR failed!"); + return lazyArray.chunks[chunkNum]; + }); + if (usesGzip || !datalength) { + chunkSize = datalength = 1; + datalength = this.getter(0).length; + chunkSize = datalength; + out("LazyFiles on gzip forces download of the whole file when length is accessed"); + } + this._length = datalength; + this._chunkSize = chunkSize; + this.lengthKnown = true; + }; + if (typeof XMLHttpRequest !== "undefined") { + if (!ENVIRONMENT_IS_WORKER) + throw "Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc"; + let lazyArray = new LazyUint8Array(); + Object.defineProperties(lazyArray, { + length: { + get() { + if (!this.lengthKnown) { + this.cacheLength(); + } + return this._length; + }, + }, + chunkSize: { + get() { + if (!this.lengthKnown) { + this.cacheLength(); + } + return this._chunkSize; + }, + }, + }); + var properties = { isDevice: false, contents: lazyArray }; + } else { + var properties = { isDevice: false, url }; + } + let node = FS.createFile(parent, name, properties, canRead, canWrite); + if (properties.contents) { + node.contents = properties.contents; + } else if (properties.url) { + node.contents = null; + node.url = properties.url; + } + Object.defineProperties(node, { + usedBytes: { + get() { + return this.contents.length; + }, + }, + }); + let stream_ops = {}; + let keys = Object.keys(node.stream_ops); + keys.forEach((key) => { + let fn = node.stream_ops[key]; + stream_ops[key] = function forceLoadLazyFile() { + FS.forceLoadFile(node); + return fn.apply(null, arguments); + }; + }); + function writeChunks(stream, buffer, offset, length, position) { + let contents = stream.node.contents; + if (position >= contents.length) return 0; + let size = Math.min(contents.length - position, length); + if (contents.slice) { + for (var i = 0; i < size; i++) { + buffer[offset + i] = contents[position + i]; + } + } else { + for (var i = 0; i < size; i++) { + buffer[offset + i] = contents.get(position + i); + } + } + return size; + } + stream_ops.read = (stream, buffer, offset, length, position) => { + FS.forceLoadFile(node); + return writeChunks(stream, buffer, offset, length, position); + }; + stream_ops.mmap = (stream, length, position, prot, flags) => { + FS.forceLoadFile(node); + let ptr = mmapAlloc(length); + if (!ptr) { + throw new FS.ErrnoError(48); + } + writeChunks(stream, HEAP8, ptr, length, position); + return { ptr, allocated: true }; + }; + node.stream_ops = stream_ops; + return node; + }, + createPreloadedFile: ( + parent, + name, + url, + canRead, + canWrite, + onload, + onerror, + dontCreateFile, + canOwn, + preFinish, + ) => { + let fullname = name ? PATH_FS.resolve(PATH.join2(parent, name)) : parent; + let dep = getUniqueRunDependency("cp " + fullname); + function processData(byteArray) { + function finish(byteArray) { + if (preFinish) preFinish(); + if (!dontCreateFile) { + FS.createDataFile(parent, name, byteArray, canRead, canWrite, canOwn); + } + if (onload) onload(); + removeRunDependency(dep); + } + if ( + Browser.handledByPreloadPlugin(byteArray, fullname, finish, () => { + if (onerror) onerror(); + removeRunDependency(dep); + }) + ) { + return; + } + finish(byteArray); + } + addRunDependency(dep); + if (typeof url === "string") { + asyncLoad(url, (byteArray) => processData(byteArray), onerror); + } else { + processData(url); + } + }, + indexedDB: () => { + return ( + window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB + ); + }, + DB_NAME: () => { + return "EM_FS_" + window.location.pathname; + }, + DB_VERSION: 20, + DB_STORE_NAME: "FILE_DATA", + saveFilesToDB: (paths, onload, onerror) => { + onload = onload || (() => {}); + onerror = onerror || (() => {}); + let indexedDB = FS.indexedDB(); + try { + var openRequest = indexedDB.open(FS.DB_NAME(), FS.DB_VERSION); + } catch (e) { + return onerror(e); + } + openRequest.onupgradeneeded = () => { + out("creating db"); + let db = openRequest.result; + db.createObjectStore(FS.DB_STORE_NAME); + }; + openRequest.onsuccess = () => { + let db = openRequest.result; + let transaction = db.transaction([FS.DB_STORE_NAME], "readwrite"); + let files = transaction.objectStore(FS.DB_STORE_NAME); + let ok = 0, + fail = 0, + total = paths.length; + function finish() { + if (fail == 0) onload(); + else onerror(); + } + paths.forEach((path) => { + let putRequest = files.put(FS.analyzePath(path).object.contents, path); + putRequest.onsuccess = () => { + ok++; + if (ok + fail == total) finish(); + }; + putRequest.onerror = () => { + fail++; + if (ok + fail == total) finish(); + }; + }); + transaction.onerror = onerror; + }; + openRequest.onerror = onerror; + }, + loadFilesFromDB: (paths, onload, onerror) => { + onload = onload || (() => {}); + onerror = onerror || (() => {}); + let indexedDB = FS.indexedDB(); + try { + var openRequest = indexedDB.open(FS.DB_NAME(), FS.DB_VERSION); + } catch (e) { + return onerror(e); + } + openRequest.onupgradeneeded = onerror; + openRequest.onsuccess = () => { + let db = openRequest.result; + try { + var transaction = db.transaction([FS.DB_STORE_NAME], "readonly"); + } catch (e) { + onerror(e); + return; + } + let files = transaction.objectStore(FS.DB_STORE_NAME); + let ok = 0, + fail = 0, + total = paths.length; + function finish() { + if (fail == 0) onload(); + else onerror(); + } + paths.forEach((path) => { + let getRequest = files.get(path); + getRequest.onsuccess = () => { + if (FS.analyzePath(path).exists) { + FS.unlink(path); + } + FS.createDataFile( + PATH.dirname(path), + PATH.basename(path), + getRequest.result, + true, + true, + true, + ); + ok++; + if (ok + fail == total) finish(); + }; + getRequest.onerror = () => { + fail++; + if (ok + fail == total) finish(); + }; + }); + transaction.onerror = onerror; + }; + openRequest.onerror = onerror; + }, + }; + var SYSCALLS = { + DEFAULT_POLLMASK: 5, + calculateAt(dirfd, path, allowEmpty) { + if (PATH.isAbs(path)) { + return path; + } + let dir; + if (dirfd === -100) { + dir = FS.cwd(); + } else { + let dirstream = SYSCALLS.getStreamFromFD(dirfd); + dir = dirstream.path; + } + if (path.length == 0) { + if (!allowEmpty) { + throw new FS.ErrnoError(44); + } + return dir; + } + return PATH.join2(dir, path); + }, + doStat(func, path, buf) { + try { + var stat = func(path); + } catch (e) { + if (e && e.node && PATH.normalize(path) !== PATH.normalize(FS.getPath(e.node))) { + return -54; + } + throw e; + } + HEAP32[buf >> 2] = stat.dev; + HEAP32[(buf + 8) >> 2] = stat.ino; + HEAP32[(buf + 12) >> 2] = stat.mode; + HEAPU32[(buf + 16) >> 2] = stat.nlink; + HEAP32[(buf + 20) >> 2] = stat.uid; + HEAP32[(buf + 24) >> 2] = stat.gid; + HEAP32[(buf + 28) >> 2] = stat.rdev; + (tempI64 = [ + stat.size >>> 0, + ((tempDouble = stat.size), + +Math.abs(tempDouble) >= 1 + ? tempDouble > 0 + ? (Math.min(+Math.floor(tempDouble / 4294967296), 4294967295) | 0) >>> 0 + : ~~+Math.ceil((tempDouble - +(~~tempDouble >>> 0)) / 4294967296) >>> 0 + : 0), + ]), + (HEAP32[(buf + 40) >> 2] = tempI64[0]), + (HEAP32[(buf + 44) >> 2] = tempI64[1]); + HEAP32[(buf + 48) >> 2] = 4096; + HEAP32[(buf + 52) >> 2] = stat.blocks; + (tempI64 = [ + Math.floor(stat.atime.getTime() / 1e3) >>> 0, + ((tempDouble = Math.floor(stat.atime.getTime() / 1e3)), + +Math.abs(tempDouble) >= 1 + ? tempDouble > 0 + ? (Math.min(+Math.floor(tempDouble / 4294967296), 4294967295) | 0) >>> 0 + : ~~+Math.ceil((tempDouble - +(~~tempDouble >>> 0)) / 4294967296) >>> 0 + : 0), + ]), + (HEAP32[(buf + 56) >> 2] = tempI64[0]), + (HEAP32[(buf + 60) >> 2] = tempI64[1]); + HEAPU32[(buf + 64) >> 2] = 0; + (tempI64 = [ + Math.floor(stat.mtime.getTime() / 1e3) >>> 0, + ((tempDouble = Math.floor(stat.mtime.getTime() / 1e3)), + +Math.abs(tempDouble) >= 1 + ? tempDouble > 0 + ? (Math.min(+Math.floor(tempDouble / 4294967296), 4294967295) | 0) >>> 0 + : ~~+Math.ceil((tempDouble - +(~~tempDouble >>> 0)) / 4294967296) >>> 0 + : 0), + ]), + (HEAP32[(buf + 72) >> 2] = tempI64[0]), + (HEAP32[(buf + 76) >> 2] = tempI64[1]); + HEAPU32[(buf + 80) >> 2] = 0; + (tempI64 = [ + Math.floor(stat.ctime.getTime() / 1e3) >>> 0, + ((tempDouble = Math.floor(stat.ctime.getTime() / 1e3)), + +Math.abs(tempDouble) >= 1 + ? tempDouble > 0 + ? (Math.min(+Math.floor(tempDouble / 4294967296), 4294967295) | 0) >>> 0 + : ~~+Math.ceil((tempDouble - +(~~tempDouble >>> 0)) / 4294967296) >>> 0 + : 0), + ]), + (HEAP32[(buf + 88) >> 2] = tempI64[0]), + (HEAP32[(buf + 92) >> 2] = tempI64[1]); + HEAPU32[(buf + 96) >> 2] = 0; + (tempI64 = [ + stat.ino >>> 0, + ((tempDouble = stat.ino), + +Math.abs(tempDouble) >= 1 + ? tempDouble > 0 + ? (Math.min(+Math.floor(tempDouble / 4294967296), 4294967295) | 0) >>> 0 + : ~~+Math.ceil((tempDouble - +(~~tempDouble >>> 0)) / 4294967296) >>> 0 + : 0), + ]), + (HEAP32[(buf + 104) >> 2] = tempI64[0]), + (HEAP32[(buf + 108) >> 2] = tempI64[1]); + return 0; + }, + doMsync(addr, stream, len, flags, offset) { + if (!FS.isFile(stream.node.mode)) { + throw new FS.ErrnoError(43); + } + if (flags & 2) { + return 0; + } + let buffer = HEAPU8.slice(addr, addr + len); + FS.msync(stream, buffer, offset, len, flags); + }, + varargs: undefined, + get() { + SYSCALLS.varargs += 4; + let ret = HEAP32[(SYSCALLS.varargs - 4) >> 2]; + return ret; + }, + getStr(ptr) { + let ret = UTF8ToString(ptr); + return ret; + }, + getStreamFromFD(fd) { + let stream = FS.getStream(fd); + if (!stream) throw new FS.ErrnoError(8); + return stream; + }, + }; + function _environ_get(__environ, environ_buf) { + let bufSize = 0; + getEnvStrings().forEach(function (string, i) { + let ptr = environ_buf + bufSize; + HEAPU32[(__environ + i * 4) >> 2] = ptr; + writeAsciiToMemory(string, ptr); + bufSize += string.length + 1; + }); + return 0; + } + function _environ_sizes_get(penviron_count, penviron_buf_size) { + let strings = getEnvStrings(); + HEAPU32[penviron_count >> 2] = strings.length; + let bufSize = 0; + strings.forEach(function (string) { + bufSize += string.length + 1; + }); + HEAPU32[penviron_buf_size >> 2] = bufSize; + return 0; + } + function _proc_exit(code) { + EXITSTATUS = code; + if (!keepRuntimeAlive()) { + if (Module["onExit"]) Module["onExit"](code); + ABORT = true; + } + quit_(code, new ExitStatus(code)); + } + function exitJS(status, implicit) { + EXITSTATUS = status; + _proc_exit(status); + } + let _exit = exitJS; + function _fd_close(fd) { + try { + let stream = SYSCALLS.getStreamFromFD(fd); + FS.close(stream); + return 0; + } catch (e) { + if (typeof FS === "undefined" || !(e instanceof FS.ErrnoError)) throw e; + return e.errno; + } + } + function doReadv(stream, iov, iovcnt, offset) { + let ret = 0; + for (let i = 0; i < iovcnt; i++) { + let ptr = HEAPU32[iov >> 2]; + let len = HEAPU32[(iov + 4) >> 2]; + iov += 8; + let curr = FS.read(stream, HEAP8, ptr, len, offset); + if (curr < 0) return -1; + ret += curr; + if (curr < len) break; + } + return ret; + } + function _fd_read(fd, iov, iovcnt, pnum) { + try { + let stream = SYSCALLS.getStreamFromFD(fd); + let num = doReadv(stream, iov, iovcnt); + HEAPU32[pnum >> 2] = num; + return 0; + } catch (e) { + if (typeof FS === "undefined" || !(e instanceof FS.ErrnoError)) throw e; + return e.errno; + } + } + function convertI32PairToI53Checked(lo, hi) { + return (hi + 2097152) >>> 0 < 4194305 - !!lo ? (lo >>> 0) + hi * 4294967296 : NaN; + } + function _fd_seek(fd, offset_low, offset_high, whence, newOffset) { + try { + let offset = convertI32PairToI53Checked(offset_low, offset_high); + if (isNaN(offset)) return 61; + let stream = SYSCALLS.getStreamFromFD(fd); + FS.llseek(stream, offset, whence); + (tempI64 = [ + stream.position >>> 0, + ((tempDouble = stream.position), + +Math.abs(tempDouble) >= 1 + ? tempDouble > 0 + ? (Math.min(+Math.floor(tempDouble / 4294967296), 4294967295) | 0) >>> 0 + : ~~+Math.ceil((tempDouble - +(~~tempDouble >>> 0)) / 4294967296) >>> 0 + : 0), + ]), + (HEAP32[newOffset >> 2] = tempI64[0]), + (HEAP32[(newOffset + 4) >> 2] = tempI64[1]); + if (stream.getdents && offset === 0 && whence === 0) stream.getdents = null; + return 0; + } catch (e) { + if (typeof FS === "undefined" || !(e instanceof FS.ErrnoError)) throw e; + return e.errno; + } + } + function doWritev(stream, iov, iovcnt, offset) { + let ret = 0; + for (let i = 0; i < iovcnt; i++) { + let ptr = HEAPU32[iov >> 2]; + let len = HEAPU32[(iov + 4) >> 2]; + iov += 8; + let curr = FS.write(stream, HEAP8, ptr, len, offset); + if (curr < 0) return -1; + ret += curr; + } + return ret; + } + function _fd_write(fd, iov, iovcnt, pnum) { + try { + let stream = SYSCALLS.getStreamFromFD(fd); + let num = doWritev(stream, iov, iovcnt); + HEAPU32[pnum >> 2] = num; + return 0; + } catch (e) { + if (typeof FS === "undefined" || !(e instanceof FS.ErrnoError)) throw e; + return e.errno; + } + } + function _return_string(data, length) { + Module._return_string_callback(data, length); + } + function __isLeapYear(year) { + return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); + } + function __arraySum(array, index) { + let sum = 0; + for (let i = 0; i <= index; sum += array[i++]) {} + return sum; + } + let __MONTH_DAYS_LEAP = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; + let __MONTH_DAYS_REGULAR = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; + function __addDays(date, days) { + let newDate = new Date(date.getTime()); + while (days > 0) { + let leap = __isLeapYear(newDate.getFullYear()); + let currentMonth = newDate.getMonth(); + let daysInCurrentMonth = (leap ? __MONTH_DAYS_LEAP : __MONTH_DAYS_REGULAR)[currentMonth]; + if (days > daysInCurrentMonth - newDate.getDate()) { + days -= daysInCurrentMonth - newDate.getDate() + 1; + newDate.setDate(1); + if (currentMonth < 11) { + newDate.setMonth(currentMonth + 1); + } else { + newDate.setMonth(0); + newDate.setFullYear(newDate.getFullYear() + 1); + } + } else { + newDate.setDate(newDate.getDate() + days); + return newDate; + } + } + return newDate; + } + function writeArrayToMemory(array, buffer) { + HEAP8.set(array, buffer); + } + function _strftime(s, maxsize, format, tm) { + let tm_zone = HEAP32[(tm + 40) >> 2]; + let date = { + tm_sec: HEAP32[tm >> 2], + tm_min: HEAP32[(tm + 4) >> 2], + tm_hour: HEAP32[(tm + 8) >> 2], + tm_mday: HEAP32[(tm + 12) >> 2], + tm_mon: HEAP32[(tm + 16) >> 2], + tm_year: HEAP32[(tm + 20) >> 2], + tm_wday: HEAP32[(tm + 24) >> 2], + tm_yday: HEAP32[(tm + 28) >> 2], + tm_isdst: HEAP32[(tm + 32) >> 2], + tm_gmtoff: HEAP32[(tm + 36) >> 2], + tm_zone: tm_zone ? UTF8ToString(tm_zone) : "", + }; + let pattern = UTF8ToString(format); + let EXPANSION_RULES_1 = { + "%c": "%a %b %d %H:%M:%S %Y", + "%D": "%m/%d/%y", + "%F": "%Y-%m-%d", + "%h": "%b", + "%r": "%I:%M:%S %p", + "%R": "%H:%M", + "%T": "%H:%M:%S", + "%x": "%m/%d/%y", + "%X": "%H:%M:%S", + "%Ec": "%c", + "%EC": "%C", + "%Ex": "%m/%d/%y", + "%EX": "%H:%M:%S", + "%Ey": "%y", + "%EY": "%Y", + "%Od": "%d", + "%Oe": "%e", + "%OH": "%H", + "%OI": "%I", + "%Om": "%m", + "%OM": "%M", + "%OS": "%S", + "%Ou": "%u", + "%OU": "%U", + "%OV": "%V", + "%Ow": "%w", + "%OW": "%W", + "%Oy": "%y", + }; + for (var rule in EXPANSION_RULES_1) { + pattern = pattern.replace(new RegExp(rule, "g"), EXPANSION_RULES_1[rule]); + } + let WEEKDAYS = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]; + let MONTHS = [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December", + ]; + function leadingSomething(value, digits, character) { + let str = typeof value === "number" ? value.toString() : value || ""; + while (str.length < digits) { + str = character[0] + str; + } + return str; + } + function leadingNulls(value, digits) { + return leadingSomething(value, digits, "0"); + } + function compareByDay(date1, date2) { + function sgn(value) { + return value < 0 ? -1 : value > 0 ? 1 : 0; + } + let compare; + if ((compare = sgn(date1.getFullYear() - date2.getFullYear())) === 0) { + if ((compare = sgn(date1.getMonth() - date2.getMonth())) === 0) { + compare = sgn(date1.getDate() - date2.getDate()); + } + } + return compare; + } + function getFirstWeekStartDate(janFourth) { + switch (janFourth.getDay()) { + case 0: + return new Date(janFourth.getFullYear() - 1, 11, 29); + case 1: + return janFourth; + case 2: + return new Date(janFourth.getFullYear(), 0, 3); + case 3: + return new Date(janFourth.getFullYear(), 0, 2); + case 4: + return new Date(janFourth.getFullYear(), 0, 1); + case 5: + return new Date(janFourth.getFullYear() - 1, 11, 31); + case 6: + return new Date(janFourth.getFullYear() - 1, 11, 30); + } + } + function getWeekBasedYear(date) { + let thisDate = __addDays(new Date(date.tm_year + 1900, 0, 1), date.tm_yday); + let janFourthThisYear = new Date(thisDate.getFullYear(), 0, 4); + let janFourthNextYear = new Date(thisDate.getFullYear() + 1, 0, 4); + let firstWeekStartThisYear = getFirstWeekStartDate(janFourthThisYear); + let firstWeekStartNextYear = getFirstWeekStartDate(janFourthNextYear); + if (compareByDay(firstWeekStartThisYear, thisDate) <= 0) { + if (compareByDay(firstWeekStartNextYear, thisDate) <= 0) { + return thisDate.getFullYear() + 1; + } + return thisDate.getFullYear(); + } + return thisDate.getFullYear() - 1; + } + let EXPANSION_RULES_2 = { + "%a"(date) { + return WEEKDAYS[date.tm_wday].substring(0, 3); + }, + "%A"(date) { + return WEEKDAYS[date.tm_wday]; + }, + "%b"(date) { + return MONTHS[date.tm_mon].substring(0, 3); + }, + "%B"(date) { + return MONTHS[date.tm_mon]; + }, + "%C"(date) { + let year = date.tm_year + 1900; + return leadingNulls((year / 100) | 0, 2); + }, + "%d"(date) { + return leadingNulls(date.tm_mday, 2); + }, + "%e"(date) { + return leadingSomething(date.tm_mday, 2, " "); + }, + "%g"(date) { + return getWeekBasedYear(date).toString().substring(2); + }, + "%G"(date) { + return getWeekBasedYear(date); + }, + "%H"(date) { + return leadingNulls(date.tm_hour, 2); + }, + "%I"(date) { + let twelveHour = date.tm_hour; + if (twelveHour == 0) twelveHour = 12; + else if (twelveHour > 12) twelveHour -= 12; + return leadingNulls(twelveHour, 2); + }, + "%j"(date) { + return leadingNulls( + date.tm_mday + + __arraySum( + __isLeapYear(date.tm_year + 1900) ? __MONTH_DAYS_LEAP : __MONTH_DAYS_REGULAR, + date.tm_mon - 1, + ), + 3, + ); + }, + "%m"(date) { + return leadingNulls(date.tm_mon + 1, 2); + }, + "%M"(date) { + return leadingNulls(date.tm_min, 2); + }, + "%n"() { + return "\n"; + }, + "%p"(date) { + if (date.tm_hour >= 0 && date.tm_hour < 12) { + return "AM"; + } + return "PM"; + }, + "%S"(date) { + return leadingNulls(date.tm_sec, 2); + }, + "%t"() { + return "\t"; + }, + "%u"(date) { + return date.tm_wday || 7; + }, + "%U"(date) { + let days = date.tm_yday + 7 - date.tm_wday; + return leadingNulls(Math.floor(days / 7), 2); + }, + "%V"(date) { + let val = Math.floor((date.tm_yday + 7 - ((date.tm_wday + 6) % 7)) / 7); + if ((date.tm_wday + 371 - date.tm_yday - 2) % 7 <= 2) { + val++; + } + if (!val) { + val = 52; + let dec31 = (date.tm_wday + 7 - date.tm_yday - 1) % 7; + if (dec31 == 4 || (dec31 == 5 && __isLeapYear((date.tm_year % 400) - 1))) { + val++; + } + } else if (val == 53) { + let jan1 = (date.tm_wday + 371 - date.tm_yday) % 7; + if (jan1 != 4 && (jan1 != 3 || !__isLeapYear(date.tm_year))) val = 1; + } + return leadingNulls(val, 2); + }, + "%w"(date) { + return date.tm_wday; + }, + "%W"(date) { + let days = date.tm_yday + 7 - ((date.tm_wday + 6) % 7); + return leadingNulls(Math.floor(days / 7), 2); + }, + "%y"(date) { + return (date.tm_year + 1900).toString().substring(2); + }, + "%Y"(date) { + return date.tm_year + 1900; + }, + "%z"(date) { + let off = date.tm_gmtoff; + let ahead = off >= 0; + off = Math.abs(off) / 60; + off = (off / 60) * 100 + (off % 60); + return (ahead ? "+" : "-") + String("0000" + off).slice(-4); + }, + "%Z"(date) { + return date.tm_zone; + }, + "%%"() { + return "%"; + }, + }; + pattern = pattern.replace(/%%/g, "\0\0"); + for (var rule in EXPANSION_RULES_2) { + if (pattern.includes(rule)) { + pattern = pattern.replace(new RegExp(rule, "g"), EXPANSION_RULES_2[rule](date)); + } + } + pattern = pattern.replace(/\0\0/g, "%"); + let bytes = intArrayFromString(pattern, false); + if (bytes.length > maxsize) { + return 0; + } + writeArrayToMemory(bytes, s); + return bytes.length - 1; + } + function _strftime_l(s, maxsize, format, tm, loc) { + return _strftime(s, maxsize, format, tm); + } + let FSNode = function (parent, name, mode, rdev) { + if (!parent) { + parent = this; + } + this.parent = parent; + this.mount = parent.mount; + this.mounted = null; + this.id = FS.nextInode++; + this.name = name; + this.mode = mode; + this.node_ops = {}; + this.stream_ops = {}; + this.rdev = rdev; + }; + let readMode = 292 | 73; + let writeMode = 146; + Object.defineProperties(FSNode.prototype, { + read: { + get() { + return (this.mode & readMode) === readMode; + }, + set(val) { + val ? (this.mode |= readMode) : (this.mode &= ~readMode); + }, + }, + write: { + get() { + return (this.mode & writeMode) === writeMode; + }, + set(val) { + val ? (this.mode |= writeMode) : (this.mode &= ~writeMode); + }, + }, + isFolder: { + get() { + return FS.isDir(this.mode); + }, + }, + isDevice: { + get() { + return FS.isChrdev(this.mode); + }, + }, + }); + FS.FSNode = FSNode; + FS.staticInit(); + var asmLibraryArg = { + a: ___assert_fail, + f: ___cxa_allocate_exception, + e: ___cxa_throw, + b: _abort, + i: _emscripten_resize_heap, + l: _environ_get, + m: _environ_sizes_get, + d: _exit, + g: _fd_close, + h: _fd_read, + k: _fd_seek, + j: _fd_write, + n: _return_string, + c: _strftime_l, + }; + let asm = createWasm(); + var ___wasm_call_ctors = (Module["___wasm_call_ctors"] = function () { + return (___wasm_call_ctors = Module["___wasm_call_ctors"] = Module["asm"]["p"]).apply( + null, + arguments, + ); + }); + var _test = (Module["_test"] = function () { + return (_test = Module["_test"] = Module["asm"]["q"]).apply(null, arguments); + }); + var _spirv_to_wgsl = (Module["_spirv_to_wgsl"] = function () { + return (_spirv_to_wgsl = Module["_spirv_to_wgsl"] = Module["asm"]["r"]).apply(null, arguments); + }); + var _malloc = (Module["_malloc"] = function () { + return (_malloc = Module["_malloc"] = Module["asm"]["t"]).apply(null, arguments); + }); + var _free = (Module["_free"] = function () { + return (_free = Module["_free"] = Module["asm"]["u"]).apply(null, arguments); + }); + var ___cxa_is_pointer_type = (Module["___cxa_is_pointer_type"] = function () { + return (___cxa_is_pointer_type = Module["___cxa_is_pointer_type"] = Module["asm"]["v"]).apply( + null, + arguments, + ); + }); + let calledRun; + dependenciesFulfilled = function runCaller() { + if (!calledRun) run(); + if (!calledRun) dependenciesFulfilled = runCaller; + }; + function run(args) { + args = args || arguments_; + if (runDependencies > 0) { + return; + } + preRun(); + if (runDependencies > 0) { + return; + } + function doRun() { + if (calledRun) return; + calledRun = true; + Module["calledRun"] = true; + if (ABORT) return; + initRuntime(); + if (Module["onRuntimeInitialized"]) Module["onRuntimeInitialized"](); + postRun(); + } + if (Module["setStatus"]) { + Module["setStatus"]("Running..."); + setTimeout(function () { + setTimeout(function () { + Module["setStatus"](""); + }, 1); + doRun(); + }, 1); + } else { + doRun(); + } + } + if (Module["preInit"]) { + if (typeof Module["preInit"] === "function") Module["preInit"] = [Module["preInit"]]; + while (Module["preInit"].length > 0) { + Module["preInit"].pop()(); + } + } + run(); + return Module; +}; +(function tryToExport(root, factory) { + if (typeof exports === "object" && typeof module === "object") module.exports = factory(); + else if (typeof define === "function" && define.amd) define("twgsl", [], factory); + else if (typeof exports === "object") exports["twgsl"] = factory(); + else root["twgsl"] = factory(); +})(typeof self !== "undefined" ? self : typeof global !== "undefined" ? global : this, () => { + const initialize = (wasmPath) => { + wasmPath = wasmPath || "twgsl.wasm"; + return new Promise((resolve) => { + Module({ + locateFile() { + return wasmPath; + }, + onRuntimeInitialized() { + let twgsl = this; + let wgsl = ""; + let textDecoder = new TextDecoder(); + let convertSpirV2WGSL = (code) => { + if (!twgsl._return_string_callback) { + twgsl._return_string_callback = (data, length) => { + const bytes = new Uint8ClampedArray(twgsl.HEAPU8.subarray(data, data + length)); + wgsl = textDecoder.decode(bytes); + }; + } + let addr = twgsl._malloc(code.byteLength); + twgsl.HEAPU32.set(code, addr / 4); + twgsl._spirv_to_wgsl(addr, code.byteLength); + twgsl._free(addr); + return wgsl; + }; + resolve({ + convertSpirV2WGSL, + }); + }, + }); + }); + }; + let instance; + return (wasmPath) => { + if (!instance) { + instance = initialize(wasmPath); + } + return instance; + }; +}); diff --git a/packages/mml-web-playcanvas-standalone/src/wasm/twgsl.wasm b/packages/mml-web-playcanvas-standalone/src/wasm/twgsl.wasm new file mode 100644 index 00000000..03e28fc3 Binary files /dev/null and b/packages/mml-web-playcanvas-standalone/src/wasm/twgsl.wasm differ diff --git a/packages/mml-web-playcanvas-standalone/test/no-op.test.ts b/packages/mml-web-playcanvas-standalone/test/no-op.test.ts new file mode 100644 index 00000000..5a760382 --- /dev/null +++ b/packages/mml-web-playcanvas-standalone/test/no-op.test.ts @@ -0,0 +1,5 @@ +describe("no-op", () => { + test("no-op", () => { + expect(true).toBe(true); + }); +}); diff --git a/packages/mml-web-playcanvas-standalone/tsconfig.json b/packages/mml-web-playcanvas-standalone/tsconfig.json new file mode 100644 index 00000000..fd167428 --- /dev/null +++ b/packages/mml-web-playcanvas-standalone/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "noImplicitAny": true, + "module": "esnext", + "target": "ES6", + "jsx": "react", + "lib": ["es2020", "dom"], + "sourceMap": true, + "allowJs": true, + "types": ["node", "jest"], + "strictNullChecks": true, + "skipLibCheck": true, + "allowSyntheticDefaultImports": true, + "moduleResolution": "node", + "resolveJsonModule": true, + "downlevelIteration": true, + "esModuleInterop": true, + "outDir": "./build", + "incremental": true + }, + "include": ["src/**/*", "test/**/*", "./build.ts", "./jest.config.ts"], + "exclude": ["**/build/*", "types-src"], + "files": ["../../node_modules/jest-expect-message/types/index.d.ts"] +} diff --git a/packages/mml-web-playcanvas/README.md b/packages/mml-web-playcanvas/README.md new file mode 100644 index 00000000..a69bbff4 --- /dev/null +++ b/packages/mml-web-playcanvas/README.md @@ -0,0 +1,16 @@ +# MML Web PlayCanvas +#### `@mml-io/mml-web-playcanvas` + +[![npm version](https://img.shields.io/npm/v/@mml-io/mml-web-playcanvas.svg?style=flat)](https://www.npmjs.com/package/@mml-io/mml-web-playcanvas) + +This package contains a library of graphics implementations for connecting MML elements to a PlayCanvas app. + +It is intended to be used with the following packages: +* `@mml-io/mml-web` + * provides the MML element handling and parsing +* `@mml-io/mml-web-playcanvas-standalone` + * creates a standalone PlayCanvas client for rendering MML elements on a webpage + +## Known Issues / Limitations +* [ ] `m-audio` directional audio +* [ ] `m-audio` `loop-duration` attribute diff --git a/packages/mml-web-playcanvas/build.ts b/packages/mml-web-playcanvas/build.ts new file mode 100644 index 00000000..120c09e4 --- /dev/null +++ b/packages/mml-web-playcanvas/build.ts @@ -0,0 +1,3 @@ +import { handleLibraryBuild } from "../../utils/build-library"; + +handleLibraryBuild(); diff --git a/packages/mml-web-playcanvas/jest.config.ts b/packages/mml-web-playcanvas/jest.config.ts new file mode 100644 index 00000000..f3df6ff9 --- /dev/null +++ b/packages/mml-web-playcanvas/jest.config.ts @@ -0,0 +1,25 @@ +import type { JestConfigWithTsJest } from "ts-jest"; + +const jestConfig: JestConfigWithTsJest = { + verbose: true, + collectCoverage: true, + testEnvironment: "jsdom", + coverageDirectory: "coverage", + coverageReporters: ["lcov", "text"], + extensionsToTreatAsEsm: [".ts"], + moduleNameMapper: { + "^(\\.{1,2}/.*)\\.js$": "$1", + }, + setupFiles: ["jest-canvas-mock"], + setupFilesAfterEnv: ["jest-expect-message", "../../test-utils/jest-browser-polyfills.ts"], + transform: { + "^.+\\.tsx?$": [ + "ts-jest", + { + useESM: true, + }, + ], + }, +}; + +export default jestConfig; diff --git a/packages/mml-web-playcanvas/package.json b/packages/mml-web-playcanvas/package.json new file mode 100644 index 00000000..a72f5007 --- /dev/null +++ b/packages/mml-web-playcanvas/package.json @@ -0,0 +1,41 @@ +{ + "name": "@mml-io/mml-web-playcanvas", + "version": "0.18.1", + "publishConfig": { + "access": "public" + }, + "main": "./build/index.js", + "types": "./build/index.d.ts", + "type": "module", + "files": [ + "/build" + ], + "scripts": { + "type-check": "tsc --noEmit", + "build": "tsx ./build.ts --build", + "iterate": "tsx ./build.ts --watch", + "lint": "eslint \"./**/*.{js,jsx,ts,tsx}\" --max-warnings 0", + "lint-fix": "eslint \"./**/*.{js,jsx,ts,tsx}\" --fix", + "test": "cross-env NODE_OPTIONS=--experimental-vm-modules jest", + "test-iterate": "cross-env NODE_OPTIONS=--experimental-vm-modules jest --watch" + }, + "dependencies": { + "@mml-io/mml-web": "^0.18.1" + }, + "peerDependencies": { + "playcanvas": "*" + }, + "devDependencies": { + "jest-canvas-mock": "2.5.2", + "jest-environment-jsdom": "29.7.0", + "jest-expect-message": "1.1.3", + "jest-fetch-mock": "3.0.3", + "resize-observer-polyfill": "1.5.1", + "playcanvas": "1.73.5" + }, + "babel": { + "presets": [ + "@babel/preset-typescript" + ] + } +} diff --git a/packages/mml-web-playcanvas/src/PlayCanvasClickTrigger.ts b/packages/mml-web-playcanvas/src/PlayCanvasClickTrigger.ts new file mode 100644 index 00000000..79a8a70e --- /dev/null +++ b/packages/mml-web-playcanvas/src/PlayCanvasClickTrigger.ts @@ -0,0 +1,138 @@ +import { + EventHandlerCollection, + getRelativePositionAndRotationRelativeToObject, + MElement, + TransformableElement, +} from "@mml-io/mml-web"; +import * as playcanvas from "playcanvas"; + +const mouseMovePixelsThreshold = 10; +const mouseMoveTimeThresholdMilliseconds = 500; + +/** + * The PlayCanvasClickTrigger class is responsible for handling click events on the MML scene and raycasts into the scene to + * determine which object was clicked and then dispatches events to those elements. + */ +export class PlayCanvasClickTrigger { + private eventHandlerCollection: EventHandlerCollection = new EventHandlerCollection(); + private mouseDownTime: number | null = null; + private mouseMoveDelta = 0; + + static init( + playcanvasApp: playcanvas.AppBase, + clickTarget: Document | HTMLElement, + camera: playcanvas.Entity, + ): PlayCanvasClickTrigger { + return new PlayCanvasClickTrigger(playcanvasApp, clickTarget, camera); + } + + private constructor( + private playcanvasApp: playcanvas.AppBase, + private clickTarget: Document | HTMLElement, + private camera: playcanvas.Entity, + ) { + this.eventHandlerCollection.add(clickTarget, "mousedown", this.handleMouseDown.bind(this)); + this.eventHandlerCollection.add(clickTarget, "mouseup", this.handleMouseUp.bind(this)); + this.eventHandlerCollection.add(clickTarget, "mousemove", this.handleMouseMove.bind(this)); + } + + private handleMouseDown() { + this.mouseDownTime = Date.now(); + this.mouseMoveDelta = 0; + } + + private handleMouseUp(event: MouseEvent) { + if (!this.mouseDownTime) { + return; + } + const duration = Date.now() - this.mouseDownTime; + this.mouseDownTime = null; + if ( + this.mouseMoveDelta < mouseMovePixelsThreshold && + duration < mouseMoveTimeThresholdMilliseconds + ) { + this.handleClick(event); + } + } + + private handleMouseMove(event: MouseEvent) { + if (this.mouseDownTime) { + this.mouseMoveDelta += Math.abs(event.movementX) + Math.abs(event.movementY); + } + } + + private handleClick(event: MouseEvent) { + if ((event.detail as any).element) { + // Avoid infinite loop of handling click events that originated from this trigger + return; + } + let x = 0; + let y = 0; + if (!document.pointerLockElement) { + x = event.offsetX; + y = event.offsetY; + } + + const cameraEntity = this.camera; + const from = cameraEntity.getPosition(); + const cameraComponent = cameraEntity.camera; + if (!cameraComponent) { + console.warn("No camera component found on the camera entity. Cannot raycast."); + return; + } + + // The pc.Vec3 to raycast to (the click position projected onto the camera's far clip plane) + const to = cameraComponent.screenToWorld(x, y, cameraComponent.farClip); + + // Raycast between the two points and return the closest hit result + const rigidbodySystem = this.playcanvasApp.systems.rigidbody; + if (!rigidbodySystem) { + console.warn("No rigidbody system found in the PlayCanvas app. Cannot raycast."); + return; + } + const result = rigidbodySystem.raycastFirst(from, to); + + // If there was a hit, store the entity + if (result) { + const hitEntity = result.entity; + let mElement; + for (let entity: playcanvas.GraphNode = hitEntity; entity; entity = entity.parent) { + mElement = MElement.getMElementFromObject(entity); + if (mElement) { + break; + } + } + if (mElement && mElement instanceof TransformableElement && mElement.isClickable()) { + // let's get the intersection point relative to the element origin + + const elementRelative = getRelativePositionAndRotationRelativeToObject( + { + position: result.point, + rotation: { + x: 0, + y: 0, + z: 0, + }, + }, + mElement, + ); + + mElement.dispatchEvent( + new CustomEvent("click", { + bubbles: true, + detail: { + position: { + ...elementRelative.position, + }, + }, + }), + ); + return; + } + } + } + + dispose() { + this.eventHandlerCollection.clear(); + } +} diff --git a/packages/mml-web-playcanvas/src/PlayCanvasGraphicsAdapter.ts b/packages/mml-web-playcanvas/src/PlayCanvasGraphicsAdapter.ts new file mode 100644 index 00000000..161acf00 --- /dev/null +++ b/packages/mml-web-playcanvas/src/PlayCanvasGraphicsAdapter.ts @@ -0,0 +1,11 @@ +import { GraphicsAdapter } from "@mml-io/mml-web"; +import * as playcanvas from "playcanvas"; + +export type PlayCanvasGraphicsAdapter = GraphicsAdapter< + playcanvas.Entity, + playcanvas.Entity, + playcanvas.Entity +> & { + getPlayCanvasApp(): playcanvas.AppBase; + getCamera(): playcanvas.Entity; +}; diff --git a/packages/mml-web-playcanvas/src/PlayCanvasGraphicsInterface.ts b/packages/mml-web-playcanvas/src/PlayCanvasGraphicsInterface.ts new file mode 100644 index 00000000..679b0331 --- /dev/null +++ b/packages/mml-web-playcanvas/src/PlayCanvasGraphicsInterface.ts @@ -0,0 +1,35 @@ +import { MMLGraphicsInterface } from "@mml-io/mml-web"; + +import * as PlayCanvasElements from "./elements"; +import { PlayCanvasGraphicsAdapter } from "./PlayCanvasGraphicsAdapter"; + +export const PlayCanvasGraphicsInterface: MMLGraphicsInterface = { + MElementGraphicsInterface: (element) => new PlayCanvasElements.PlayCanvasMElement(element), + MMLDebugHelperGraphicsInterface: (debugHelper) => + new PlayCanvasElements.PlayCanvasDebugHelper(debugHelper), + MMLAudioGraphicsInterface: (element) => new PlayCanvasElements.PlayCanvasAudio(element), + MMLChatProbeGraphicsInterface: (element) => new PlayCanvasElements.PlayCanvasChatProbe(element), + MMLCubeGraphicsInterface: (element) => new PlayCanvasElements.PlayCanvasCube(element), + MMLCylinderGraphicsInterface: (element) => new PlayCanvasElements.PlayCanvasCylinder(element), + MMLFrameGraphicsInterface: (element) => new PlayCanvasElements.PlayCanvasFrame(element), + MMLImageGraphicsInterface: (element, updateMeshCallback: () => void) => + new PlayCanvasElements.PlayCanvasImage(element, updateMeshCallback), + MMLInteractionGraphicsInterface: (element) => + new PlayCanvasElements.PlayCanvasInteraction(element), + MMLLabelGraphicsInterface: (element) => new PlayCanvasElements.PlayCanvasLabel(element), + MMLLightGraphicsInterface: (element) => new PlayCanvasElements.PlayCanvasLight(element), + MMLLinkGraphicsInterface: (element) => new PlayCanvasElements.PlayCanvasLink(element), + MMLModelGraphicsInterface: (element, updateMeshCallback: () => void) => + new PlayCanvasElements.PlayCanvasModel(element, updateMeshCallback), + MMLPlaneGraphicsInterface: (element) => new PlayCanvasElements.PlayCanvasPlane(element), + MMLPositionProbeGraphicsInterface: (element) => + new PlayCanvasElements.PlayCanvasPositionProbe(element), + MMLPromptGraphicsInterface: (element) => new PlayCanvasElements.PlayCanvasPrompt(element), + MMLSphereGraphicsInterface: (element) => new PlayCanvasElements.PlayCanvasSphere(element), + MMLTransformableGraphicsInterface: (element) => + new PlayCanvasElements.PlayCanvasTransformable(element), + MMLVideoGraphicsInterface: (element, updateMeshCallback: () => void) => + new PlayCanvasElements.PlayCanvasVideo(element, updateMeshCallback), + RemoteDocumentGraphicsInterface: (element) => + new PlayCanvasElements.PlayCanvasRemoteDocument(element), +}; diff --git a/packages/mml-web-playcanvas/src/PlayCanvasInteractionAdapter.ts b/packages/mml-web-playcanvas/src/PlayCanvasInteractionAdapter.ts new file mode 100644 index 00000000..df031863 --- /dev/null +++ b/packages/mml-web-playcanvas/src/PlayCanvasInteractionAdapter.ts @@ -0,0 +1,58 @@ +import { Interaction } from "@mml-io/mml-web"; +import * as playcanvas from "playcanvas"; + +import { PlayCanvasGraphicsAdapter } from "./PlayCanvasGraphicsAdapter"; + +export class PlayCanvasInteractionAdapter { + static interactionShouldShowDistance( + interaction: Interaction, + cameraEntity: playcanvas.Entity, + cameraComponent: playcanvas.CameraComponent, + app: playcanvas.AppBase, + ): number | null { + const worldPos = interaction.getContainer().getPosition(); + + const cameraPos = cameraEntity.getPosition(); + const distance = cameraPos.distance(worldPos); + if (distance > interaction.props.range) { + return null; + } + + if (interaction.props.inFocus) { + if (!cameraComponent.frustum.containsPoint(worldPos)) { + return null; + } + } + + if (interaction.props.lineOfSight) { + const rigidbodySystem = app.systems.rigidbody; + if (!rigidbodySystem) { + console.warn("Rigidbody system not found. Line of sight check will not work."); + } else { + const raycastResults = rigidbodySystem.raycastAll(cameraPos, worldPos); + if (raycastResults.length > 0) { + for (const result of raycastResults) { + if ( + !PlayCanvasInteractionAdapter.hasAncestor(result.entity, interaction.getContainer()) + ) { + return null; + } + } + } + } + } + + return distance; + } + + static hasAncestor(object: playcanvas.Entity, ancestor: playcanvas.Entity): boolean { + let parent = object.parent; + while (parent !== null) { + if (parent === ancestor) { + return true; + } + parent = parent.parent; + } + return false; + } +} diff --git a/packages/mml-web-playcanvas/src/PlayCanvasReconnectingStatus.ts b/packages/mml-web-playcanvas/src/PlayCanvasReconnectingStatus.ts new file mode 100644 index 00000000..7c057ed5 --- /dev/null +++ b/packages/mml-web-playcanvas/src/PlayCanvasReconnectingStatus.ts @@ -0,0 +1,58 @@ +import { CanvasText } from "@mml-io/mml-web"; +import * as playcanvas from "playcanvas"; + +function createReconnectingStatus(playCanvasApp: playcanvas.AppBase): PlayCanvasReconnectingStatus { + const canvas = new CanvasText().renderText("Reconnecting", { + bold: true, + fontSize: 32, + paddingPx: 10, + textColorRGB255A1: { + r: 255, + g: 0, + b: 0, + a: 1.0, + }, + backgroundColorRGB255A1: { + r: 255, + g: 255, + b: 255, + a: 1.0, + }, + alignment: "center", + }); + + const texture = new playcanvas.Texture(playCanvasApp.graphicsDevice, { + width: canvas.width, + height: canvas.height, + }); + texture.setSource(canvas); + + const material = new playcanvas.StandardMaterial(); + material.useLighting = false; + material.emissiveMap = texture; + material.update(); + + texture.destroy(); + + const width = canvas.width; + const height = canvas.height; + + return { material, width: width / 100, height: height / 100 }; +} + +export type PlayCanvasReconnectingStatus = { + material: playcanvas.StandardMaterial; + width: number; + height: number; +}; + +let reconnectingStatus: PlayCanvasReconnectingStatus | null = null; + +export function getPlayCanvasReconnectingStatus( + playCanvasApp: playcanvas.AppBase, +): PlayCanvasReconnectingStatus { + if (!reconnectingStatus) { + reconnectingStatus = createReconnectingStatus(playCanvasApp); + } + return reconnectingStatus; +} diff --git a/packages/mml-web-playcanvas/src/debug-bounding-box/PlayCanvasDebugBoundingBox.ts b/packages/mml-web-playcanvas/src/debug-bounding-box/PlayCanvasDebugBoundingBox.ts new file mode 100644 index 00000000..fd385d48 --- /dev/null +++ b/packages/mml-web-playcanvas/src/debug-bounding-box/PlayCanvasDebugBoundingBox.ts @@ -0,0 +1,19 @@ +import * as playcanvas from "playcanvas"; + +import { PlayCanvasGraphicsAdapter } from "../PlayCanvasGraphicsAdapter"; + +export function createPlayCanvasDebugBoundingBox( + graphicsAdapter: PlayCanvasGraphicsAdapter, + material: playcanvas.Material, +): playcanvas.Entity { + const entity = new playcanvas.Entity("bounding-box", graphicsAdapter.getPlayCanvasApp()); + entity.addComponent("model", { + type: "box", + material, + }); + entity.model?.model.meshInstances.forEach((mi) => { + mi.renderStyle = playcanvas.RENDERSTYLE_WIREFRAME; + mi.castShadow = false; + }); + return entity; +} diff --git a/packages/mml-web-playcanvas/src/elements/PlayCanvasAudio.ts b/packages/mml-web-playcanvas/src/elements/PlayCanvasAudio.ts new file mode 100644 index 00000000..0e30a914 --- /dev/null +++ b/packages/mml-web-playcanvas/src/elements/PlayCanvasAudio.ts @@ -0,0 +1,361 @@ +import { Audio, AudioGraphics, LoadingInstanceManager } from "@mml-io/mml-web"; +import * as playcanvas from "playcanvas"; + +import { PlayCanvasGraphicsAdapter } from "../PlayCanvasGraphicsAdapter"; + +type AudioLoadedState = { + asset: playcanvas.Asset; +}; + +export class PlayCanvasAudio extends AudioGraphics { + private soundComponent: playcanvas.SoundComponent; + private srcLoadingInstanceManager = new LoadingInstanceManager(`${Audio.tagName}.src`); + private latestSrcAudioPromise: Promise | null = null; + protected loadedState: AudioLoadedState | null = null; + private delayedStartTimer: NodeJS.Timeout | null = null; + private delayedPauseTimer: NodeJS.Timeout | null = null; + private static dataAudioFileCount: number = 0; + + constructor(private audio: Audio) { + super(audio); + const audioEntity = this.audio.getContainer() as playcanvas.Entity; + this.soundComponent = audioEntity.addComponent("sound", { + positional: true, + distanceModel: "inverse", + volume: audio.props.volume, + } as playcanvas.SoundComponent) as playcanvas.SoundComponent; + } + + private getPlayCanvasApp(): playcanvas.AppBase { + return this.audio.getScene().getGraphicsAdapter().getPlayCanvasApp(); + } + + setSrc(src: string | null): void { + if (this.loadedState !== null) { + this.soundComponent.removeSlot("slot"); + this.loadedState.asset.unload(); + this.loadedState = null; + } + if (!src) { + this.srcLoadingInstanceManager.abortIfLoading(); + return; + } + + const contentSrc = this.audio.contentSrcToContentAddress(src); + const srcAudioPromise = this.asyncLoadSourceAsset( + contentSrc, + this.getAudioContext(), + (loaded, total) => { + this.srcLoadingInstanceManager.setProgress(loaded / total); + }, + ); + this.srcLoadingInstanceManager.start(this.audio.getLoadingProgressManager(), contentSrc); + this.latestSrcAudioPromise = srcAudioPromise; + srcAudioPromise + .then((asset) => { + if (this.latestSrcAudioPromise !== srcAudioPromise || !this.audio.isConnected) { + // TODO - dispose? + // If we've loaded a different audio since, or we're no longer connected, dispose of this one + return; + } + this.latestSrcAudioPromise = null; + this.loadedState = { + asset, + }; + + const sound = asset; + this.soundComponent.addSlot("slot", { + volume: 1, + pitch: 1, + asset: sound.id, + loop: true, + overlap: false, + autoPlay: false, + }); + + const slot = this.soundComponent.slot("slot"); + if (slot) { + slot.stop(); + slot.overlap = false; + this.syncAudioTime(); + } + + this.srcLoadingInstanceManager.finish(); + }) + .catch((err) => { + console.error("Error loading m-audio.src", err); + this.srcLoadingInstanceManager.error(err); + }); + } + + public setStartTime(): void { + this.syncAudioTime(); + } + + public setPauseTime(): void { + this.syncAudioTime(); + } + + public setLoopDuration(): void { + this.syncAudioTime(); + } + + public syncAudioTime(): void { + if (this.delayedStartTimer) { + clearTimeout(this.delayedStartTimer); + this.delayedStartTimer = null; + } + if (this.delayedPauseTimer !== null) { + clearTimeout(this.delayedPauseTimer); + this.delayedPauseTimer = null; + } + + if (!this.audio.props.src) { + return; + } + + const slot = this.soundComponent.slot("slot"); + if (slot) { + if (!this.audio.props.enabled || this.audio.isDisabled()) { + slot.stop(); + return; + } + + if (slot.loop !== this.audio.props.loop) { + slot.loop = this.audio.props.loop; + } + + const documentTime = this.audio.getDocumentTime(); + + if (this.audio.props.pauseTime !== null) { + if (documentTime !== null && this.audio.props.pauseTime > documentTime) { + // The pause time is in the future + const delayedPauseTimer = setTimeout(() => { + if (this.delayedPauseTimer === delayedPauseTimer) { + this.delayedPauseTimer = null; + } + this.syncAudioTime(); + }, this.audio.props.pauseTime - documentTime); + this.delayedPauseTimer = delayedPauseTimer; + } else { + slot.pause(); + return; + } + } + + let currentTime: number; + if (documentTime) { + currentTime = (documentTime - this.audio.props.startTime) / 1000; + } else { + currentTime = (this.audio.props.startTime ? this.audio.props.startTime : 0) / 1000; + } + + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + const asset = slot._assets.get(slot.asset)!; + const assetDuration: number | null = asset?.resource.duration || null; + let targetDuration: number | null = assetDuration; + if (this.audio.props.loopDuration !== null && this.audio.props.loop) { + const loopDuration = this.audio.props.loopDuration / 1000; + if (assetDuration !== null && loopDuration > assetDuration) { + asset.resource.buffer = extendAudioToDuration( + this.getAudioContext(), + asset.resource.buffer, + loopDuration, + ); + slot.pause(); + slot.duration = loopDuration; + } + targetDuration = loopDuration; + } + if (targetDuration !== null && slot.duration !== targetDuration) { + slot.pause(); + slot.duration = targetDuration; + } + + let desiredAudioTime; + if (currentTime < 0) { + // The audio should not start yet + slot.pause(); + const delayedStartTimer = setTimeout(() => { + if (this.delayedStartTimer === delayedStartTimer) { + this.delayedStartTimer = null; + } + this.syncAudioTime(); + }, -currentTime * 1000); + this.delayedStartTimer = delayedStartTimer; + return; + } else if (this.audio.props.loop) { + const slotDuration = slot.duration; + desiredAudioTime = currentTime % slotDuration; + } else { + desiredAudioTime = currentTime; + } + + if (desiredAudioTime >= slot.duration) { + slot.pause(); + return; + } else { + // playing + } + + if (slot.isLoaded && (slot.isPaused || slot.isStopped)) { + slot.play(); + } + + const soundInstance = slot.instances[0]; + let delta = desiredAudioTime - soundInstance.currentTime; + if (this.audio.props.loop) { + // Check if the delta wrapping around is smaller (i.e. the desired and current are closer together if we wrap around) + const loopedDelta = delta - slot.duration; + if (Math.abs(delta) > Math.abs(loopedDelta)) { + delta = loopedDelta; + } + } + + if (Math.abs(delta) < 0.1) { + // Do nothing - this is close enough - set the playback rate to 1 + slot.pitch = 1; + } else if (Math.abs(delta) > 0.5) { + slot.pitch = 1; + slot.pause(); + soundInstance.currentTime = desiredAudioTime; + slot.resume(); + return; + } else { + if (delta > 0) { + slot.pitch = 1.02; + } else { + slot.pitch = 0.98; + } + } + } + } + + private getAudioContext(): AudioContext { + const playcanvasApp = this.getPlayCanvasApp(); + const soundSystem = playcanvasApp.systems.sound; + if (!soundSystem) { + throw new Error("Playcanvas sound system not enabled"); + } + return soundSystem.context; + } + + enable(): void { + // TODO + } + disable(): void { + // TODO + } + setLoop(): void { + this.syncAudioTime(); + } + setEnabled(): void { + // TODO + } + setVolume(): void { + this.soundComponent.volume = this.audio.props.volume; + } + setConeAngle(): void { + // TODO + } + setConeFalloffAngle(): void { + // TODO + } + setDebug(): void { + // TODO + } + + private async asyncLoadSourceAsset( + url: string, + audioContext: AudioContext, + // TODO - report progress + // eslint-disable-next-line @typescript-eslint/no-unused-vars + onProgress: (loaded: number, total: number) => void, + ): Promise { + return new Promise((resolve, reject) => { + if (url.startsWith("data:")) { + // Construct an AudioBuffer from the data URL + const base64 = url.split(",", 2)[1]; + if (!base64) { + reject(new Error("Invalid data URL")); + return; + } + let arrayBuffer; + + try { + const binary = atob(base64); + const uint8Array = new Uint8Array(binary.length); + for (let i = 0; i < binary.length; i++) { + uint8Array[i] = binary.charCodeAt(i); + } + arrayBuffer = uint8Array.buffer; + } catch (e) { + console.error("Failed to decode base64 data URL", e); + return; + } + audioContext + .decodeAudioData(arrayBuffer) + .then((audioBuffer) => { + const soundComp = new playcanvas.Sound(audioBuffer); + const asset = new playcanvas.Asset( + "dataAudioFile-" + PlayCanvasAudio.dataAudioFileCount++, + "audio", + { url }, + base64, + ); + asset.resource = soundComp; + asset.loaded = true; + this.getPlayCanvasApp().assets.add(asset); + resolve(asset); + }) + .catch((e) => { + console.error("Failed to decode data URI audio data", e); + }); + return; + } + + const asset = new playcanvas.Asset(url, "audio", { url }); + this.getPlayCanvasApp().assets.add(asset); + this.getPlayCanvasApp().assets.load(asset); + asset.ready((asset) => { + resolve(asset); + }); + // Listen for errors + asset.on("error", (err) => { + console.error("Error loading audio asset", err); + reject(err); + }); + }); + } + + dispose() { + if (this.delayedPauseTimer) { + clearTimeout(this.delayedPauseTimer); + this.delayedPauseTimer = null; + } + if (this.delayedStartTimer) { + clearTimeout(this.delayedStartTimer); + this.delayedStartTimer = null; + } + const audioEntity = this.audio.getContainer() as playcanvas.Entity; + audioEntity.removeComponent("sound"); + } +} + +function extendAudioToDuration( + context: AudioContext, + buffer: AudioBuffer, + seconds: number, +): AudioBuffer { + const updatedBuffer = context.createBuffer( + buffer.numberOfChannels, + Math.ceil(seconds * buffer.sampleRate), + buffer.sampleRate, + ); + for (let channelNumber = 0; channelNumber < buffer.numberOfChannels; channelNumber++) { + const channelData = buffer.getChannelData(channelNumber); + const updatedChannelData = updatedBuffer.getChannelData(channelNumber); + updatedChannelData.set(channelData, 0); + } + return updatedBuffer; +} diff --git a/packages/mml-web-playcanvas/src/elements/PlayCanvasChatProbe.ts b/packages/mml-web-playcanvas/src/elements/PlayCanvasChatProbe.ts new file mode 100644 index 00000000..f5faf924 --- /dev/null +++ b/packages/mml-web-playcanvas/src/elements/PlayCanvasChatProbe.ts @@ -0,0 +1,76 @@ +import { ChatProbe, ChatProbeGraphics } from "@mml-io/mml-web"; +import * as playcanvas from "playcanvas"; + +import { PlayCanvasGraphicsAdapter } from "../PlayCanvasGraphicsAdapter"; + +export class PlayCanvasChatProbe extends ChatProbeGraphics { + private entity: playcanvas.Entity | null = null; + private debugMaterial: playcanvas.BasicMaterial | null = null; + + constructor(private chatProbe: ChatProbe) { + super(chatProbe); + this.updateDebugVisualisation(); + } + + public disable(): void {} + + public enable(): void {} + + public setRange(): void { + this.updateDebugVisualisation(); + } + + public setDebug() { + this.updateDebugVisualisation(); + } + + private clearDebugVisualisation() { + if (this.entity) { + this.entity.destroy(); + this.entity = null; + } + if (this.debugMaterial) { + this.debugMaterial.destroy(); + this.debugMaterial = null; + } + } + + private updateDebugVisualisation() { + if (!this.chatProbe.props.debug) { + this.clearDebugVisualisation(); + } else { + if (this.chatProbe.isConnected && !this.entity) { + this.entity = new playcanvas.Entity( + "chat-probe-internal", + this.chatProbe.getScene().getGraphicsAdapter().getPlayCanvasApp(), + ); + if (!this.debugMaterial) { + this.debugMaterial = new playcanvas.BasicMaterial(); + this.debugMaterial.color = new playcanvas.Color(1, 1, 0); + } + this.entity.addComponent("model", { + type: "sphere", + material: this.debugMaterial, + }); + this.entity.model?.model.meshInstances.forEach((mi) => { + mi.renderStyle = playcanvas.RENDERSTYLE_WIREFRAME; + mi.castShadow = false; + }); + + this.chatProbe.getContainer().addChild(this.entity); + } + + if (this.entity) { + this.entity.setLocalScale( + this.chatProbe.props.range * 2, + this.chatProbe.props.range * 2, + this.chatProbe.props.range * 2, + ); + } + } + } + + public dispose() { + this.clearDebugVisualisation(); + } +} diff --git a/packages/mml-web-playcanvas/src/elements/PlayCanvasCube.ts b/packages/mml-web-playcanvas/src/elements/PlayCanvasCube.ts new file mode 100644 index 00000000..0282d593 --- /dev/null +++ b/packages/mml-web-playcanvas/src/elements/PlayCanvasCube.ts @@ -0,0 +1,93 @@ +import { Cube, MCubeProps, MELEMENT_PROPERTY_NAME } from "@mml-io/mml-web"; +import { CubeGraphics } from "@mml-io/mml-web"; +import { MMLColor } from "@mml-io/mml-web"; +import * as playcanvas from "playcanvas"; + +import { PlayCanvasGraphicsAdapter } from "../PlayCanvasGraphicsAdapter"; + +export class PlayCanvasCube extends CubeGraphics { + private entity: playcanvas.Entity; + private renderComponent: playcanvas.RenderComponent; + private material: playcanvas.StandardMaterial = new playcanvas.StandardMaterial(); + + constructor(private cube: Cube) { + super(cube); + + /* + The primitive must be in an internal entity to allow using setLocalScale + without affecting children. + */ + this.entity = new playcanvas.Entity( + "cube-internal", + cube.getScene().getGraphicsAdapter().getPlayCanvasApp(), + ); + (this.entity as any)[MELEMENT_PROPERTY_NAME] = cube; + this.renderComponent = this.entity.addComponent("render", { + type: "box", + material: this.material, + }) as playcanvas.RenderComponent; + this.entity.addComponent("collision", { + type: "box", + halfExtents: new playcanvas.Vec3(0.5, 0.5, 0.5), + }); + cube.getContainer().addChild(this.entity); + } + + disable(): void {} + + enable(): void {} + + getCollisionElement(): playcanvas.Entity { + return this.entity; + } + + setColor(color: MMLColor): void { + this.material.diffuse.set(color.r, color.g, color.b); + this.material.metalness = 0; + this.material.useMetalness = true; + this.material.update(); + } + + private updateSize(mCubeProps: MCubeProps): void { + this.entity.setLocalScale(mCubeProps.width, mCubeProps.height, mCubeProps.depth); + if (this.entity.collision) { + this.entity.collision.halfExtents.set( + mCubeProps.width / 2, + mCubeProps.height / 2, + mCubeProps.depth / 2, + ); + // @ts-expect-error - accessing onSetHalfExtents private method + this.entity.collision.onSetHalfExtents(); + } + } + + setWidth(width: number, mCubeProps: MCubeProps): void { + this.updateSize(mCubeProps); + } + + setHeight(height: number, mCubeProps: MCubeProps): void { + this.updateSize(mCubeProps); + } + + setDepth(depth: number, mCubeProps: MCubeProps): void { + this.updateSize(mCubeProps); + } + + setCastShadows(castShadows: boolean): void { + this.renderComponent.castShadows = castShadows; + } + + setOpacity(opacity: number): void { + if (opacity === 1) { + this.material.blendType = playcanvas.BLEND_NONE; + } else { + this.material.blendType = playcanvas.BLEND_NORMAL; + } + this.material.opacity = opacity; + this.material.update(); + } + + dispose() { + this.entity.destroy(); + } +} diff --git a/packages/mml-web-playcanvas/src/elements/PlayCanvasCylinder.ts b/packages/mml-web-playcanvas/src/elements/PlayCanvasCylinder.ts new file mode 100644 index 00000000..02c6939a --- /dev/null +++ b/packages/mml-web-playcanvas/src/elements/PlayCanvasCylinder.ts @@ -0,0 +1,91 @@ +import { Cylinder, MCylinderProps, MELEMENT_PROPERTY_NAME } from "@mml-io/mml-web"; +import { CylinderGraphics } from "@mml-io/mml-web"; +import { MMLColor } from "@mml-io/mml-web"; +import * as playcanvas from "playcanvas"; + +import { PlayCanvasGraphicsAdapter } from "../PlayCanvasGraphicsAdapter"; + +export class PlayCanvasCylinder extends CylinderGraphics { + private entity: playcanvas.Entity; + private renderComponent: playcanvas.RenderComponent; + private material: playcanvas.StandardMaterial = new playcanvas.StandardMaterial(); + + constructor(private cylinder: Cylinder) { + super(cylinder); + + /* + The primitive must be in an internal entity to allow using setLocalScale + without affecting children. + */ + this.entity = new playcanvas.Entity( + "cylinder-internal", + cylinder.getScene().getGraphicsAdapter().getPlayCanvasApp(), + ); + (this.entity as any)[MELEMENT_PROPERTY_NAME] = cylinder; + this.renderComponent = this.entity.addComponent("render", { + type: "cylinder", + material: this.material, + }) as playcanvas.RenderComponent; + const collisionComponent = this.entity.addComponent("collision", { + type: "cylinder", + }) as playcanvas.CollisionComponent; + collisionComponent.radius = 0.5; + collisionComponent.height = 1; + cylinder.getContainer().addChild(this.entity); + } + + disable(): void {} + + enable(): void {} + + getCollisionElement(): playcanvas.Entity { + return this.entity; + } + + setColor(color: MMLColor): void { + this.material.diffuse.set(color.r, color.g, color.b); + this.material.metalness = 0; + this.material.useMetalness = true; + this.material.update(); + } + + private updateSize(mCylinderProps: MCylinderProps): void { + this.entity.setLocalScale( + mCylinderProps.radius * 2, + mCylinderProps.height, + mCylinderProps.radius * 2, + ); + if (this.entity.collision) { + this.entity.collision.radius = mCylinderProps.radius; + this.entity.collision.height = mCylinderProps.height; + // @ts-expect-error - accessing onSetHalfExtents private method + this.entity.collision.onSetHalfExtents(); + } + } + + setRadius(radius: number, mCylinderProps: MCylinderProps): void { + this.updateSize(mCylinderProps); + } + + setHeight(height: number, mCylinderProps: MCylinderProps): void { + this.updateSize(mCylinderProps); + } + + setCastShadows(castShadows: boolean): void { + this.renderComponent.castShadows = castShadows; + } + + setOpacity(opacity: number): void { + if (opacity === 1) { + this.material.blendType = playcanvas.BLEND_NONE; + } else { + this.material.blendType = playcanvas.BLEND_NORMAL; + } + this.material.opacity = opacity; + this.material.update(); + } + + dispose() { + this.entity.destroy(); + } +} diff --git a/packages/mml-web-playcanvas/src/elements/PlayCanvasDebugHelper.ts b/packages/mml-web-playcanvas/src/elements/PlayCanvasDebugHelper.ts new file mode 100644 index 00000000..5c033942 --- /dev/null +++ b/packages/mml-web-playcanvas/src/elements/PlayCanvasDebugHelper.ts @@ -0,0 +1,50 @@ +import { DebugHelper, DebugHelperGraphics } from "@mml-io/mml-web"; +import * as playcanvas from "playcanvas"; + +import { createPlayCanvasDebugBoundingBox } from "../debug-bounding-box/PlayCanvasDebugBoundingBox"; +import { PlayCanvasGraphicsAdapter } from "../PlayCanvasGraphicsAdapter"; + +export class PlayCanvasDebugHelper extends DebugHelperGraphics { + private debugAxes: playcanvas.Entity | null = null; + + constructor(private debugHelper: DebugHelper) { + super(debugHelper); + + const graphicsAdapter = this.debugHelper.element.getScene().getGraphicsAdapter(); + + const playcanvasApp = graphicsAdapter.getPlayCanvasApp(); + + const playcanvasEntity: playcanvas.Entity = this.debugHelper.getContainer(); + this.debugAxes = new playcanvas.Entity("axes", playcanvasApp); + playcanvasEntity.addChild(this.debugAxes); + + const xMaterial = new playcanvas.BasicMaterial(); + xMaterial.color = new playcanvas.Color(1, 0, 0); + const xAxis = createPlayCanvasDebugBoundingBox(graphicsAdapter, xMaterial); + xAxis.setLocalScale(0.5, 0, 0); + xAxis.setLocalPosition(0.25, 0, 0); + this.debugAxes.addChild(xAxis); + + const yMaterial = new playcanvas.BasicMaterial(); + yMaterial.color = new playcanvas.Color(0, 1, 0); + const yAxis = createPlayCanvasDebugBoundingBox(graphicsAdapter, yMaterial); + yAxis.setLocalScale(0, 0.5, 0); + yAxis.setLocalPosition(0, 0.25, 0); + this.debugAxes.addChild(yAxis); + + const zMaterial = new playcanvas.BasicMaterial(); + zMaterial.color = new playcanvas.Color(0, 0, 1); + const zAxis = createPlayCanvasDebugBoundingBox(graphicsAdapter, zMaterial); + zAxis.setLocalScale(0, 0, 0.5); + zAxis.setLocalPosition(0, 0, 0.25); + this.debugAxes.addChild(zAxis); + } + + dispose() { + if (this.debugAxes) { + this.debugHelper.getContainer().removeChild(this.debugAxes); + this.debugAxes.destroy(); + } + this.debugAxes = null; + } +} diff --git a/packages/mml-web-playcanvas/src/elements/PlayCanvasFrame.ts b/packages/mml-web-playcanvas/src/elements/PlayCanvasFrame.ts new file mode 100644 index 00000000..1c316ebe --- /dev/null +++ b/packages/mml-web-playcanvas/src/elements/PlayCanvasFrame.ts @@ -0,0 +1,184 @@ +import { Frame, FrameGraphics } from "@mml-io/mml-web"; +import * as playcanvas from "playcanvas"; + +import { createPlayCanvasDebugBoundingBox } from "../debug-bounding-box/PlayCanvasDebugBoundingBox"; +import { PlayCanvasGraphicsAdapter } from "../PlayCanvasGraphicsAdapter"; + +function setEntityToBoundingBox( + debugBoxConstraintMesh: playcanvas.Entity, + minX: number, + maxX: number, + minY: number, + maxY: number, + minZ: number, + maxZ: number, +) { + debugBoxConstraintMesh.setLocalPosition((maxX + minX) / 2, (maxY + minY) / 2, (maxZ + minZ) / 2); + debugBoxConstraintMesh.setLocalScale(-(maxX - minX), maxY - minY, maxZ - minZ); +} + +export class PlayCanvasFrame extends FrameGraphics { + private debugMaterial: playcanvas.BasicMaterial | null = null; + private loadRangeMaterial: playcanvas.BasicMaterial | null = null; + private unloadRangeMaterial: playcanvas.BasicMaterial | null = null; + + private debugMeshes: { + debugBoxConstraintMesh: playcanvas.Entity; + debugBoxLoadRangeMesh: playcanvas.Entity; + debugBoxUnloadRangeMesh: playcanvas.Entity; + } | null = null; + + constructor(private frame: Frame) { + super(frame); + this.updateDebugVisualisation(); + } + + setSrc(): void { + // no-op + } + + public setDebug(): void { + this.updateDebugVisualisation(); + } + public setLoadRange(): void { + this.updateDebugVisualisation(); + } + public setUnloadRange(): void { + this.updateDebugVisualisation(); + } + public setMinX(): void { + this.updateDebugVisualisation(); + } + public setMaxX(): void { + this.updateDebugVisualisation(); + } + public setMinY(): void { + this.updateDebugVisualisation(); + } + public setMaxY(): void { + this.updateDebugVisualisation(); + } + public setMinZ(): void { + this.updateDebugVisualisation(); + } + public setMaxZ(): void { + this.updateDebugVisualisation(); + } + + disable(): void {} + + enable(): void {} + + dispose() { + this.clearDebugVisualisation(); + } + + private clearDebugVisualisation() { + if (this.debugMeshes) { + this.debugMeshes.debugBoxConstraintMesh.destroy(); + this.debugMeshes.debugBoxLoadRangeMesh.destroy(); + this.debugMeshes.debugBoxUnloadRangeMesh.destroy(); + this.debugMeshes = null; + } + if (this.debugMaterial) { + this.debugMaterial.destroy(); + this.debugMaterial = null; + } + if (this.loadRangeMaterial) { + this.loadRangeMaterial.destroy(); + this.loadRangeMaterial = null; + } + if (this.unloadRangeMaterial) { + this.unloadRangeMaterial.destroy(); + this.unloadRangeMaterial = null; + } + } + + private updateDebugVisualisation() { + if (!this.frame.props.debug) { + this.clearDebugVisualisation(); + } else { + if (!this.frame.isConnected) { + return; + } + if (!this.debugMeshes) { + if (!this.debugMaterial) { + this.debugMaterial = new playcanvas.BasicMaterial(); + this.debugMaterial.color = new playcanvas.Color(1, 0, 0); + } + if (!this.loadRangeMaterial) { + this.loadRangeMaterial = new playcanvas.BasicMaterial(); + this.loadRangeMaterial.color = new playcanvas.Color(0, 1, 0); + } + if (!this.unloadRangeMaterial) { + this.unloadRangeMaterial = new playcanvas.BasicMaterial(); + this.unloadRangeMaterial.color = new playcanvas.Color(0, 0, 1); + } + const graphicsAdapter = this.frame.getScene().getGraphicsAdapter(); + this.debugMeshes = { + debugBoxConstraintMesh: createPlayCanvasDebugBoundingBox( + graphicsAdapter, + this.debugMaterial, + ), + debugBoxLoadRangeMesh: createPlayCanvasDebugBoundingBox( + graphicsAdapter, + this.loadRangeMaterial, + ), + debugBoxUnloadRangeMesh: createPlayCanvasDebugBoundingBox( + graphicsAdapter, + this.unloadRangeMaterial, + ), + }; + this.frame.getContainer().addChild(this.debugMeshes.debugBoxConstraintMesh); + this.frame.getContainer().addChild(this.debugMeshes.debugBoxLoadRangeMesh); + this.frame.getContainer().addChild(this.debugMeshes.debugBoxUnloadRangeMesh); + } + + let boxBounds = this.frame.getDefinedBoxBounds(); + if (!boxBounds) { + boxBounds = [0, 0, 0, 0, 0, 0]; + } + + const [minX, maxX, minY, maxY, minZ, maxZ] = boxBounds; + this.debugMeshes.debugBoxConstraintMesh.enabled = true; + + setEntityToBoundingBox( + this.debugMeshes.debugBoxConstraintMesh, + minX, + maxX, + minY, + maxY, + minZ, + maxZ, + ); + + if (this.frame.props.loadRange === null) { + this.debugMeshes.debugBoxLoadRangeMesh.enabled = false; + this.debugMeshes.debugBoxUnloadRangeMesh.enabled = false; + } else { + this.debugMeshes.debugBoxLoadRangeMesh.enabled = true; + this.debugMeshes.debugBoxUnloadRangeMesh.enabled = true; + + setEntityToBoundingBox( + this.debugMeshes.debugBoxLoadRangeMesh, + minX - this.frame.props.loadRange, + maxX + this.frame.props.loadRange, + minY - this.frame.props.loadRange, + maxY + this.frame.props.loadRange, + minZ - this.frame.props.loadRange, + maxZ + this.frame.props.loadRange, + ); + + setEntityToBoundingBox( + this.debugMeshes.debugBoxUnloadRangeMesh, + minX - this.frame.props.loadRange - this.frame.props.unloadRange, + maxX + this.frame.props.loadRange + this.frame.props.unloadRange, + minY - this.frame.props.loadRange - this.frame.props.unloadRange, + maxY + this.frame.props.loadRange + this.frame.props.unloadRange, + minZ - this.frame.props.loadRange - this.frame.props.unloadRange, + maxZ + this.frame.props.loadRange + this.frame.props.unloadRange, + ); + } + } + } +} diff --git a/packages/mml-web-playcanvas/src/elements/PlayCanvasImage.ts b/packages/mml-web-playcanvas/src/elements/PlayCanvasImage.ts new file mode 100644 index 00000000..d99ca4e0 --- /dev/null +++ b/packages/mml-web-playcanvas/src/elements/PlayCanvasImage.ts @@ -0,0 +1,219 @@ +import { + calculateContentSize, + Image, + ImageGraphics, + LoadingInstanceManager, + MELEMENT_PROPERTY_NAME, +} from "@mml-io/mml-web"; +import * as playcanvas from "playcanvas"; + +import { createPlaneModel } from "../plane/plane"; +import { PlayCanvasGraphicsAdapter } from "../PlayCanvasGraphicsAdapter"; + +type ImageLoadedState = { + asset: playcanvas.Asset; +}; + +export class PlayCanvasImage extends ImageGraphics { + private srcLoadingInstanceManager = new LoadingInstanceManager(`${Image.tagName}.src`); + private latestSrcImagePromise: Promise | null = null; + private entity: playcanvas.Entity; + + private internalEntity: playcanvas.Entity; + private modelComponent: playcanvas.ModelComponent; + private material: playcanvas.StandardMaterial = new playcanvas.StandardMaterial(); + protected loadedState: ImageLoadedState | null = null; + constructor( + private image: Image, + private updateMeshCallback: () => void, + ) { + super(image, updateMeshCallback); + + this.entity = image.getContainer() as playcanvas.Entity; + + /* + The primitive must be in an internal entity to allow using setLocalScale + without affecting children. + */ + this.internalEntity = new playcanvas.Entity( + "image-internal", + image.getScene().getGraphicsAdapter().getPlayCanvasApp(), + ); + (this.internalEntity as any)[MELEMENT_PROPERTY_NAME] = image; + + const { model } = createPlaneModel(this.getPlayCanvasApp(), this.material); + this.modelComponent = this.internalEntity.addComponent( + "model", + {}, + ) as playcanvas.ModelComponent; + this.modelComponent.model = model; + + // Use the collision component of the element's entity + this.entity.addComponent("collision", { + type: "box", + halfExtents: new playcanvas.Vec3(0.5, 0, 0.5), + }); + this.entity.addChild(this.internalEntity); + } + + disable(): void {} + + enable(): void {} + + getWidthAndHeight(): { width: number; height: number } { + return { + width: this.internalEntity.getLocalScale().x, + height: this.internalEntity.getLocalScale().y, + }; + } + + getCollisionElement(): playcanvas.Entity { + return this.entity; + } + + private getPlayCanvasApp(): playcanvas.AppBase { + return this.image.getScene().getGraphicsAdapter().getPlayCanvasApp(); + } + + private updateWidthAndHeight() { + const loadedImage = this.loadedState?.asset.resource; + + const { width, height } = calculateContentSize({ + content: loadedImage ? { width: loadedImage.width, height: loadedImage.height } : undefined, + width: this.image.props.width, + height: this.image.props.height, + }); + + // Update the size of the visual representation + this.internalEntity.setLocalScale(width, height, 1); + + // Update the collision shape + if (this.entity.collision) { + this.entity.collision.halfExtents.set(width / 2, height / 2, 0); + // @ts-expect-error - accessing onSetHalfExtents private method + this.entity.collision.onSetHalfExtents(); + } + + this.updateMeshCallback(); + } + + setWidth(): void { + this.updateWidthAndHeight(); + } + + setHeight(): void { + this.updateWidthAndHeight(); + } + + private clearImage() { + if (this.material) { + this.material.diffuseMap = null; + this.material.opacityMap = null; + this.material.emissiveMap = null; + this.material.update(); + } + this.updateWidthAndHeight(); + } + + public setSrc(src: string | null): void { + if (this.loadedState !== null) { + this.loadedState.asset.unload(); + this.loadedState = null; + } + if (!src) { + this.clearImage(); + this.srcLoadingInstanceManager.abortIfLoading(); + return; + } + + const contentSrc = this.image.contentSrcToContentAddress(src); + const srcImagePromise = this.asyncLoadSourceAsset(contentSrc, (loaded, total) => { + this.srcLoadingInstanceManager.setProgress(loaded / total); + }); + this.srcLoadingInstanceManager.start(this.image.getLoadingProgressManager(), contentSrc); + this.latestSrcImagePromise = srcImagePromise; + srcImagePromise + .then((asset) => { + if (this.latestSrcImagePromise !== srcImagePromise || !this.image.isConnected) { + // TODO + // If we've loaded a different image since, or we're no longer connected, dispose of this one + return; + } + this.latestSrcImagePromise = null; + this.loadedState = { + asset, + }; + + const texture = asset.resource; + texture.premultiplyAlpha = true; + this.material.diffuseMap = texture; + this.material.blendType = playcanvas.BLEND_NORMAL; + this.material.opacityMap = texture; + this.material.update(); + this.updateWidthAndHeight(); + this.updateMaterialEmissiveIntensity(); + this.srcLoadingInstanceManager.finish(); + }) + .catch((err) => { + console.error("Error loading m-image.src", err); + this.clearImage(); + this.srcLoadingInstanceManager.error(err); + }); + } + + setCastShadows(castShadows: boolean): void { + this.modelComponent.castShadows = castShadows; + } + + setOpacity(opacity: number): void { + if (opacity === 1) { + this.material.blendType = playcanvas.BLEND_NONE; + } else { + this.material.blendType = playcanvas.BLEND_NORMAL; + } + this.material.opacity = opacity; + this.material.update(); + } + + setEmissive(): void { + this.updateMaterialEmissiveIntensity(); + } + + private updateMaterialEmissiveIntensity() { + if (this.image.props.emissive) { + this.material.emissiveMap = this.material.diffuseMap; + this.material.emissiveIntensity = this.image.props.emissive; + } else { + this.material.emissiveMap = null; + this.material.emissiveIntensity = 0; + } + this.material.update(); + } + + private async asyncLoadSourceAsset( + url: string, + // TODO - report progress + // eslint-disable-next-line @typescript-eslint/no-unused-vars + onProgress: (loaded: number, total: number) => void, + ): Promise { + return new Promise((resolve, reject) => { + const asset = new playcanvas.Asset(url, "texture", { url }); + this.getPlayCanvasApp().assets.add(asset); + this.getPlayCanvasApp().assets.load(asset); + asset.ready((asset) => { + resolve(asset); + }); + asset.on("error", (err) => { + reject(err); + }); + }); + } + + dispose() { + if (this.loadedState) { + this.loadedState.asset.unload(); + this.loadedState = null; + } + this.internalEntity.destroy(); + } +} diff --git a/packages/mml-web-playcanvas/src/elements/PlayCanvasInteraction.ts b/packages/mml-web-playcanvas/src/elements/PlayCanvasInteraction.ts new file mode 100644 index 00000000..3c6dc92f --- /dev/null +++ b/packages/mml-web-playcanvas/src/elements/PlayCanvasInteraction.ts @@ -0,0 +1,93 @@ +import { Interaction } from "@mml-io/mml-web"; +import { InteractionGraphics } from "@mml-io/mml-web"; +import * as playcanvas from "playcanvas"; + +import { PlayCanvasGraphicsAdapter } from "../PlayCanvasGraphicsAdapter"; + +export class PlayCanvasInteraction extends InteractionGraphics { + private entity: playcanvas.Entity | null = null; + private debugMaterial: playcanvas.BasicMaterial | null = null; + + constructor(private positionProbe: Interaction) { + super(positionProbe); + this.updateDebugVisualisation(); + } + + disable(): void {} + + enable(): void {} + + public setRange(): void { + this.updateDebugVisualisation(); + } + + public setInFocus(): void { + // no-op + } + + public setLineOfSight(): void { + // no-op + } + + public setPriority(): void { + // no-op + } + + public setPrompt(): void { + // no-op + } + + public setDebug() { + this.updateDebugVisualisation(); + } + + private clearDebugVisualisation() { + if (this.entity) { + this.entity.destroy(); + this.entity = null; + } + if (this.debugMaterial) { + this.debugMaterial.destroy(); + this.debugMaterial = null; + } + } + + private updateDebugVisualisation() { + if (!this.positionProbe.props.debug) { + this.clearDebugVisualisation(); + } else { + if (this.positionProbe.isConnected && !this.entity) { + this.entity = new playcanvas.Entity( + "interaction-internal", + this.positionProbe.getScene().getGraphicsAdapter().getPlayCanvasApp(), + ); + if (!this.debugMaterial) { + this.debugMaterial = new playcanvas.BasicMaterial(); + this.debugMaterial.color = new playcanvas.Color(0, 1, 0); + } + this.entity.addComponent("model", { + type: "sphere", + material: this.debugMaterial, + }); + this.entity.model?.model.meshInstances.forEach((mi) => { + mi.renderStyle = playcanvas.RENDERSTYLE_WIREFRAME; + mi.castShadow = false; + }); + + this.positionProbe.getContainer().addChild(this.entity); + } + + if (this.entity) { + this.entity.setLocalScale( + this.positionProbe.props.range * 2, + this.positionProbe.props.range * 2, + this.positionProbe.props.range * 2, + ); + } + } + } + + dispose() { + this.clearDebugVisualisation(); + } +} diff --git a/packages/mml-web-playcanvas/src/elements/PlayCanvasLabel.ts b/packages/mml-web-playcanvas/src/elements/PlayCanvasLabel.ts new file mode 100644 index 00000000..432b2af9 --- /dev/null +++ b/packages/mml-web-playcanvas/src/elements/PlayCanvasLabel.ts @@ -0,0 +1,158 @@ +import { + CanvasText, + Label, + LabelGraphics, + MELEMENT_PROPERTY_NAME, + MLabelProps, +} from "@mml-io/mml-web"; +import * as playcanvas from "playcanvas"; + +import { PlayCanvasGraphicsAdapter } from "../PlayCanvasGraphicsAdapter"; + +export class PlayCanvasLabel extends LabelGraphics { + private entity: playcanvas.Entity; + private renderComponent: playcanvas.RenderComponent; + private material: playcanvas.StandardMaterial = new playcanvas.StandardMaterial(); + private canvasText: CanvasText = new CanvasText(); + + constructor(private label: Label) { + super(label); + + /* + The primitive must be in an internal entity to allow using setLocalScale + without affecting children. + */ + this.entity = new playcanvas.Entity( + "label-internal", + label.getScene().getGraphicsAdapter().getPlayCanvasApp(), + ); + (this.entity as any)[MELEMENT_PROPERTY_NAME] = label; + this.renderComponent = this.entity.addComponent("render", { + type: "plane", + material: this.material, + castShadows: this.label.props.castShadows, + }) as playcanvas.RenderComponent; + this.entity.rotate(90, 0, 0); + this.entity.addComponent("collision", { + type: "box", + halfExtents: new playcanvas.Vec3(0.5, 0, 0.5), + }); + label.getContainer().addChild(this.entity); + } + + disable(): void {} + + enable(): void {} + + getCollisionElement(): playcanvas.Entity { + return this.entity; + } + + private updateSize(mLabelProps: MLabelProps): void { + this.entity.setLocalScale(mLabelProps.width, 1, mLabelProps.height); + if (this.entity.collision) { + this.entity.collision.halfExtents.set(mLabelProps.width / 2, 0, mLabelProps.height / 2); + // @ts-expect-error - accessing onSetHalfExtents private method + this.entity.collision.onSetHalfExtents(); + } + } + + public setWidth(width: number, mLabelProps: MLabelProps): void { + this.updateSize(mLabelProps); + this.redrawText(); + } + + public setHeight(height: number, mLabelProps: MLabelProps): void { + this.updateSize(mLabelProps); + this.redrawText(); + } + public setContent(): void { + this.redrawText(); + } + public setAlignment(): void { + this.redrawText(); + } + public setFontSize(): void { + this.redrawText(); + } + public setPadding(): void { + this.redrawText(); + } + public setColor(): void { + this.redrawText(); + } + public setFontColor(): void { + this.redrawText(); + } + + public setEmissive(): void { + this.updateMaterialEmissiveIntensity(); + } + + private updateMaterialEmissiveIntensity() { + if (this.label.props.emissive) { + this.material.emissiveMap = this.material.diffuseMap; + this.material.emissiveIntensity = this.label.props.emissive; + } else { + this.material.emissiveMap = null; + this.material.emissiveIntensity = 0; + } + this.material.update(); + } + + private redrawText() { + if (!this.material) { + return; + } + const canvas = this.canvasText.renderText(this.label.props.content, { + bold: true, + fontSize: this.label.props.fontSize * 2, + paddingPx: this.label.props.padding, + textColorRGB255A1: { + r: this.label.props.fontColor.r * 255, + g: this.label.props.fontColor.g * 255, + b: this.label.props.fontColor.b * 255, + a: this.label.props.fontColor.a ?? 1, + }, + backgroundColorRGB255A1: { + r: this.label.props.color.r * 255, + g: this.label.props.color.g * 255, + b: this.label.props.color.b * 255, + a: this.label.props.color.a ?? 1, + }, + dimensions: { + width: this.label.props.width * 200, + height: this.label.props.height * 200, + }, + alignment: this.label.props.alignment, + }); + + const texture = new playcanvas.Texture( + this.label.getScene().getGraphicsAdapter().getPlayCanvasApp().graphicsDevice, + { + width: canvas.width, + height: canvas.height, + }, + ); + texture.setSource(canvas); + this.material.diffuseMap = texture; + if ((this.label.props.color.a ?? 1) < 1) { + this.material.blendType = playcanvas.BLEND_NORMAL; + this.material.opacityMap = texture; + } else { + this.material.blendType = playcanvas.BLEND_NONE; + this.material.opacityMap = null; + } + this.material.update(); + this.updateMaterialEmissiveIntensity(); + texture.destroy(); + } + + setCastShadows(castShadows: boolean): void { + this.renderComponent.castShadows = castShadows; + } + + dispose() { + this.entity.destroy(); + } +} diff --git a/packages/mml-web-playcanvas/src/elements/PlayCanvasLight.ts b/packages/mml-web-playcanvas/src/elements/PlayCanvasLight.ts new file mode 100644 index 00000000..bebabab8 --- /dev/null +++ b/packages/mml-web-playcanvas/src/elements/PlayCanvasLight.ts @@ -0,0 +1,109 @@ +import { Light } from "@mml-io/mml-web"; +import { LightGraphics } from "@mml-io/mml-web"; +import { MMLColor } from "@mml-io/mml-web"; +import * as playcanvas from "playcanvas"; + +import { PlayCanvasGraphicsAdapter } from "../PlayCanvasGraphicsAdapter"; + +const lightIntensityFactor = 1 / 100; +const lightLuminanceFactor = 4000; + +export class PlayCanvasLight extends LightGraphics { + private lightComponent: playcanvas.LightComponent; + + constructor(private light: Light) { + super(light); + this.createLight(); + } + + private createLight() { + const lightEntity = this.light.getContainer() as playcanvas.Entity; + if (this.lightComponent) { + lightEntity.removeComponent("light"); + } + + const { r, g, b } = this.light.props.color; + + if (this.light.props.type === "spotlight") { + this.lightComponent = lightEntity.addComponent("light", { + type: "spot", + luminance: this.light.props.intensity * lightLuminanceFactor, + intensity: this.light.props.intensity * lightIntensityFactor, + castShadows: this.light.props.castShadows, + color: new playcanvas.Color(r, g, b), + shadowBias: 0.001, + normalOffsetBias: 0.001, + shape: playcanvas.LIGHTSHAPE_DISK, + innerConeAngle: this.light.props.angleDeg, + outerConeAngle: this.light.props.angleDeg, + range: this.light.props.distance ?? 100, + falloffMode: playcanvas.LIGHTFALLOFF_INVERSESQUARED, + enabled: this.light.props.enabled, + } as playcanvas.LightComponent) as playcanvas.LightComponent; + } else { + this.lightComponent = lightEntity.addComponent("light", { + type: "point", + luminance: this.light.props.intensity * lightLuminanceFactor, + intensity: this.light.props.intensity * lightIntensityFactor, + castShadows: this.light.props.castShadows, + color: new playcanvas.Color(r, g, b), + shadowBias: 0.001, + normalOffsetBias: 0.001, + range: this.light.props.distance ?? 100, + falloffMode: playcanvas.LIGHTFALLOFF_INVERSESQUARED, + enabled: this.light.props.enabled, + } as playcanvas.LightComponent) as playcanvas.LightComponent; + } + } + + disable(): void {} + + enable(): void {} + + setEnabled(enabled: boolean): void { + this.lightComponent.enabled = enabled; + } + + setCastShadows(castShadows: boolean) { + this.lightComponent.castShadows = castShadows; + this.lightComponent.refreshProperties(); + } + + setAngle(angle: number) { + if (this.lightComponent.type !== "spot") { + return; + } + this.lightComponent.innerConeAngle = angle; + this.lightComponent.outerConeAngle = angle; + this.lightComponent.refreshProperties(); + } + + setIntensity(intensity: number) { + this.lightComponent.luminance = intensity * lightLuminanceFactor; + this.lightComponent.intensity = intensity * lightIntensityFactor; + this.lightComponent.refreshProperties(); + } + + setDistance(distance: number | null) { + this.lightComponent.range = distance ?? 100; + this.lightComponent.refreshProperties(); + } + + setType(): void { + this.createLight(); + } + + setDebug(): void { + // TODO + } + + setColor(color: MMLColor): void { + this.lightComponent.color.set(color.r, color.g, color.b); + this.lightComponent.refreshProperties(); + } + + dispose() { + const lightEntity = this.light.getContainer() as playcanvas.Entity; + lightEntity.removeComponent("light"); + } +} diff --git a/packages/mml-web-playcanvas/src/elements/PlayCanvasLink.ts b/packages/mml-web-playcanvas/src/elements/PlayCanvasLink.ts new file mode 100644 index 00000000..c7daed79 --- /dev/null +++ b/packages/mml-web-playcanvas/src/elements/PlayCanvasLink.ts @@ -0,0 +1,24 @@ +import { Link } from "@mml-io/mml-web"; +import { LinkGraphics } from "@mml-io/mml-web"; + +import { PlayCanvasGraphicsAdapter } from "../PlayCanvasGraphicsAdapter"; + +export class PlayCanvasLink extends LinkGraphics { + constructor(private link: Link) { + super(link); + } + + disable(): void {} + + enable(): void {} + + setHref(): void { + // no-op + } + + setTarget(): void { + // no-op + } + + dispose() {} +} diff --git a/packages/mml-web-playcanvas/src/elements/PlayCanvasMElement.ts b/packages/mml-web-playcanvas/src/elements/PlayCanvasMElement.ts new file mode 100644 index 00000000..bf9906f9 --- /dev/null +++ b/packages/mml-web-playcanvas/src/elements/PlayCanvasMElement.ts @@ -0,0 +1,51 @@ +import { MElement, MELEMENT_PROPERTY_NAME } from "@mml-io/mml-web"; +import { MElementGraphics } from "@mml-io/mml-web"; +import * as playcanvas from "playcanvas"; + +import { PlayCanvasGraphicsAdapter } from "../PlayCanvasGraphicsAdapter"; + +export class PlayCanvasMElement extends MElementGraphics { + protected container: playcanvas.Entity; + private currentParentContainer: playcanvas.Entity | null = null; + + constructor(private element: MElement) { + super(element); + this.container = new playcanvas.Entity( + element.constructor.name, + element.getScene().getGraphicsAdapter().getPlayCanvasApp(), + ); + (this.container as any)[MELEMENT_PROPERTY_NAME] = element; + + if (this.currentParentContainer !== null) { + throw new Error("Already connected to a parent"); + } + + const mElementParent = this.element.getMElementParent(); + if (mElementParent) { + this.currentParentContainer = mElementParent.getContainer(); + this.currentParentContainer.addChild(this.container); + return; + } + + // If none of the ancestors are MElements then this element may be directly connected to the body (without a wrapper). + // Attempt to use a global scene that has been configured to attach this element to. + const scene = this.element.getScene(); + this.currentParentContainer = scene.getRootContainer(); + this.currentParentContainer.addChild(this.container); + } + + public getContainer(): playcanvas.Entity { + return this.container; + } + + public dispose() { + if (this.currentParentContainer === null) { + throw new Error("Was not connected to a parent"); + } + + this.currentParentContainer.removeChild(this.container); + this.currentParentContainer = null; + + this.container.destroy(); + } +} diff --git a/packages/mml-web-playcanvas/src/elements/PlayCanvasModel.ts b/packages/mml-web-playcanvas/src/elements/PlayCanvasModel.ts new file mode 100644 index 00000000..817cb536 --- /dev/null +++ b/packages/mml-web-playcanvas/src/elements/PlayCanvasModel.ts @@ -0,0 +1,566 @@ +import { + IVect3, + LoadingInstanceManager, + MElement, + Model, + ModelGraphics, + TransformableElement, +} from "@mml-io/mml-web"; +import * as playcanvas from "playcanvas"; + +import { createPlayCanvasDebugBoundingBox } from "../debug-bounding-box/PlayCanvasDebugBoundingBox"; +import { PlayCanvasGraphicsAdapter } from "../PlayCanvasGraphicsAdapter"; + +type PlayCanvasModelLoadState = { + renderEntity: playcanvas.Entity; + boundingBox: playcanvas.BoundingBox; + collisionWorldScale: IVect3; + bones: Map; +}; + +type PlayCanvasAnimLoadState = { + animAsset: playcanvas.Asset; + animComponent: playcanvas.AnimComponent | null; +}; + +export class PlayCanvasModel extends ModelGraphics { + private srcLoadingInstanceManager = new LoadingInstanceManager(`${Model.tagName}.src`); + private animLoadingInstanceManager = new LoadingInstanceManager(`${Model.tagName}.anim`); + private latestSrcModelPromise: Promise | null = null; + + private debugMaterial: playcanvas.BasicMaterial | null = null; + + private latestAnimPromise: Promise | null = null; + private documentTimeTickListener: null | { remove: () => void } = null; + + private attachments = new Map< + Model, + { + animComponent: playcanvas.AnimComponent; + } | null + >(); + private registeredParentAttachment: Model | null = null; + + private socketChildrenByBone = new Map>>(); + + private debugBoundingBox: playcanvas.Entity | null = null; + + protected loadedState: PlayCanvasModelLoadState | null = null; + protected animState: PlayCanvasAnimLoadState | null = null; + + constructor( + private model: Model, + private updateMeshCallback: () => void, + ) { + super(model, updateMeshCallback); + } + + private getPlayCanvasApp(): playcanvas.AppBase { + return this.model.getScene().getGraphicsAdapter().getPlayCanvasApp(); + } + + hasLoadedModel(): boolean { + return !!this.loadedState?.renderEntity; + } + + hasLoadedAnimation(): boolean { + return !!this.animState?.animAsset; + } + + disable(): void {} + + enable(): void {} + + getCollisionElement(): playcanvas.Entity { + return this.model.getContainer(); + } + + setDebug(): void { + this.updateDebugVisualisation(); + } + + setCastShadows(): void { + // TODO + } + + public registerAttachment(attachment: Model) { + let animState = null; + if (this.animState) { + const attachmentLoadedState = (attachment.modelGraphics as PlayCanvasModel).loadedState; + if (!attachmentLoadedState) { + throw new Error("Attachment must be loaded before registering"); + } + const playcanvasEntity = attachmentLoadedState.renderEntity; + const animComponent = playcanvasEntity.addComponent("anim", {}) as playcanvas.AnimComponent; + animComponent.assignAnimation("SingleAnimation", this.animState.animAsset.resource); + animState = { + animComponent, + }; + } + this.attachments.set(attachment, animState); + } + + public unregisterAttachment(attachment: Model) { + const animState = this.attachments.get(attachment); + if (animState) { + animState.animComponent.reset(); + animState.animComponent.unbind(); + animState.animComponent.entity.removeComponent("anim"); + } + this.attachments.delete(attachment); + } + + getBoundingBox(): { centerOffset: IVect3; size: IVect3 } | null { + if (this.loadedState) { + return { + centerOffset: this.loadedState.boundingBox.center, + size: this.loadedState.boundingBox.halfExtents, + }; + } + return null; + } + + setAnim(anim: string): void { + if (this.animState) { + if (this.animState.animComponent) { + this.animState.animComponent.reset(); + this.animState.animComponent.unbind(); + this.animState.animComponent.entity.removeComponent("anim"); + } + this.animState = null; + // TODO - clear up the asset? + for (const [attachment, animState] of this.attachments) { + if (animState) { + animState.animComponent.reset(); + animState.animComponent.unbind(); + animState.animComponent.entity.removeComponent("anim"); + } + this.attachments.set(attachment, null); + } + } + if (!anim) { + this.latestAnimPromise = null; + // If the animation is removed then the model can be added to the parent attachment if the model is loaded + if (this.loadedState && !this.registeredParentAttachment) { + const parent = this.model.parentElement; + if (parent instanceof Model) { + this.registeredParentAttachment = parent; + (parent.modelGraphics as PlayCanvasModel).registerAttachment(this.model); + } + } + return; + } + const animSrc = this.model.contentSrcToContentAddress(anim); + const animPromise = this.asyncLoadAnimAsset(animSrc, (loaded, total) => { + this.animLoadingInstanceManager.setProgress(loaded / total); + }); + this.animLoadingInstanceManager.start(this.model.getLoadingProgressManager(), anim); + this.latestAnimPromise = animPromise; + animPromise + .then((asset) => { + if (this.latestAnimPromise !== animPromise || !this.model.isConnected) { + // TODO + // If we've loaded a different model since, or we're no longer connected, dispose of this one + // PlayCanvasModel.disposeOfGroup(result.group); + return; + } + this.latestAnimPromise = null; + this.animState = { + animAsset: asset, + animComponent: null, + }; + // Play the animation + this.connectAnimationToModel(); + + for (const [attachment] of this.attachments) { + const playcanvasEntity = attachment.getContainer() as playcanvas.Entity; + const animComponent = playcanvasEntity.addComponent( + "anim", + {}, + ) as playcanvas.AnimComponent; + animComponent.assignAnimation("SingleAnimation", this.animState.animAsset.resource); + const animState = { + animComponent, + }; + this.attachments.set(attachment, animState); + } + + if (!this.documentTimeTickListener) { + this.documentTimeTickListener = this.model.addDocumentTimeTickListener( + (documentTime: number) => { + this.updateAnimation(documentTime); + }, + ); + } + this.animLoadingInstanceManager.finish(); + }) + .catch((err) => { + console.error("Error loading m-model.anim", err); + this.animLoadingInstanceManager.error(err); + }); + } + + private connectAnimationToModel() { + if (this.animState && this.loadedState) { + const playcanvasEntity = this.loadedState.renderEntity; + const animComponent = playcanvasEntity.addComponent("anim", {}) as playcanvas.AnimComponent; + animComponent.assignAnimation("SingleAnimation", this.animState.animAsset.resource); + this.animState.animComponent = animComponent; + } + } + + public registerSocketChild( + child: TransformableElement, + socketName: string, + ): void { + let children = this.socketChildrenByBone.get(socketName); + if (!children) { + children = new Set>(); + this.socketChildrenByBone.set(socketName, children); + } + children.add(child); + + if (this.loadedState) { + const bone = this.loadedState.bones.get(socketName); + if (bone) { + bone.addChild(child.getContainer()); + } else { + this.model.getContainer().addChild(child.getContainer()); + } + } + } + + public unregisterSocketChild( + child: TransformableElement, + socketName: string, + addToRoot: boolean = true, + ): void { + const socketChildren = this.socketChildrenByBone.get(socketName); + if (socketChildren) { + socketChildren.delete(child); + if (addToRoot) { + this.model.getContainer().addChild(child.getContainer()); + } + if (socketChildren.size === 0) { + this.socketChildrenByBone.delete(socketName); + } + } + } + + public setAnimEnabled(): void { + // no-op + } + + public setAnimLoop(): void { + // no-op + } + + public setAnimStartTime(): void { + // no-op + } + + public setAnimPauseTime(): void { + // no-op + } + + public transformed(): void { + /* + TODO - this hack is necessary to allow scaling of collision models in + playcanvas. The meshes are cached by id (and potentially shared between + entities). The scale changing does not cause a cache miss, so the cached + mesh is used with the wrong scale. This is a workaround to clear the cache. + */ + const scale = this.loadedState?.renderEntity.getWorldTransform().getScale(); + if (scale && this.loadedState) { + if ( + Math.abs(this.loadedState.collisionWorldScale.x - scale.x) > 0.001 || + Math.abs(this.loadedState.collisionWorldScale.y - scale.y) > 0.001 || + Math.abs(this.loadedState.collisionWorldScale.z - scale.z) > 0.001 + ) { + this.loadedState.collisionWorldScale = { x: scale.x, y: scale.y, z: scale.z }; + + const collisionComponent = this.loadedState.renderEntity.collision; + if (collisionComponent) { + for (const mesh of collisionComponent.data.render.meshes) { + // @ts-expect-error - accessing _triMeshCache private property + const triMesh = collisionComponent.system._triMeshCache[mesh.id]; + if (triMesh) { + // @ts-expect-error - accessing untyped Ammo global + window.Ammo.destroy(triMesh); + // @ts-expect-error - accessing _triMeshCache private property + delete collisionComponent.system._triMeshCache[mesh.id]; + } + } + // @ts-expect-error - accessing onSetModel private method + collisionComponent.onSetModel(); + } + } + } + } + + setSrc(src: string): void { + const playcanvasEntity = this.model.getContainer() as playcanvas.Entity; + if (this.loadedState !== null) { + this.loadedState.renderEntity.remove(); + this.loadedState = null; + if (this.animState) { + this.animState.animComponent = null; + } + if (this.registeredParentAttachment) { + (this.registeredParentAttachment.modelGraphics as PlayCanvasModel).unregisterAttachment( + this.model, + ); + this.registeredParentAttachment = null; + } + this.updateMeshCallback(); + this.updateDebugVisualisation(); + } + if (!src) { + this.srcLoadingInstanceManager.abortIfLoading(); + this.socketChildrenByBone.forEach((children) => { + children.forEach((child) => { + this.model.getContainer().addChild(child.getContainer()); + }); + }); + this.updateMeshCallback(); + this.updateDebugVisualisation(); + return; + } + + const contentSrc = this.model.contentSrcToContentAddress(src); + const srcModelPromise = this.asyncLoadSourceAsset(contentSrc, (loaded, total) => { + this.srcLoadingInstanceManager.setProgress(loaded / total); + }); + this.srcLoadingInstanceManager.start(this.model.getLoadingProgressManager(), contentSrc); + this.latestSrcModelPromise = srcModelPromise; + srcModelPromise + .then((asset) => { + if (this.latestSrcModelPromise !== srcModelPromise || !this.model.isConnected) { + // If we've loaded a different model since, or we're no longer connected, dispose of this one + // PlayCanvasModel.disposeOfGroup(result.group); + return; + } + this.latestSrcModelPromise = null; + const renderEntity: playcanvas.Entity = asset.resource.instantiateRenderEntity(); + + let boundingBox: playcanvas.BoundingBox | null = null; + const renders = renderEntity.findComponents("render") as Array; + for (const render of renders) { + for (const meshInstance of render.meshInstances) { + if (boundingBox) { + boundingBox.add(meshInstance.aabb); + } else { + boundingBox = meshInstance.aabb.clone(); + } + } + render.entity.addComponent("collision", { + type: "mesh", + renderAsset: render.asset, + }); + } + if (!boundingBox) { + boundingBox = new playcanvas.BoundingBox( + new playcanvas.Vec3(0, 0, 0), + new playcanvas.Vec3(0, 0, 0), + ); + } + boundingBox.halfExtents.mulScalar(2); + + const bones = new Map(); + renderEntity.forEach((node) => { + bones.set(node.name, node); + }); + + this.loadedState = { + renderEntity, + boundingBox, + collisionWorldScale: { x: 1, y: 1, z: 1 }, + bones, + }; + + playcanvasEntity.addChild(renderEntity); + + this.transformed(); + + for (const [boneName, children] of this.socketChildrenByBone) { + const bone = bones.get(boneName); + if (bone) { + children.forEach((child) => { + bone.addChild(child.getContainer()); + }); + } + } + + this.connectAnimationToModel(); + this.updateMeshCallback(); + + const parent = this.model.parentElement; + if (parent instanceof Model) { + if (!this.latestAnimPromise && !this.animState) { + this.registeredParentAttachment = parent; + (parent.modelGraphics as PlayCanvasModel).registerAttachment(this.model); + } + } + + this.srcLoadingInstanceManager.finish(); + + this.updateDebugVisualisation(); + }) + .catch((err) => { + console.error("Error loading m-model.src", err); + this.srcLoadingInstanceManager.error(err); + }); + } + + private updateDebugVisualisation() { + if (!this.model.props.debug) { + this.clearDebugVisualisation(); + } else { + if (!this.debugBoundingBox) { + const graphicsAdapter = this.model.getScene().getGraphicsAdapter(); + if (!this.debugMaterial) { + this.debugMaterial = new playcanvas.BasicMaterial(); + this.debugMaterial.color = new playcanvas.Color(1, 0, 0); + } + this.debugBoundingBox = createPlayCanvasDebugBoundingBox( + graphicsAdapter, + this.debugMaterial, + ); + this.model.getContainer().addChild(this.debugBoundingBox); + } + if (this.loadedState) { + const boundingBox = this.loadedState.boundingBox; + this.debugBoundingBox.setLocalPosition(boundingBox.center); + this.debugBoundingBox.setLocalScale(boundingBox.halfExtents); + } else { + this.debugBoundingBox.setLocalScale(0, 0, 0); + } + } + } + + private clearDebugVisualisation() { + if (this.debugBoundingBox) { + this.debugBoundingBox.remove(); + this.debugBoundingBox = null; + } + if (this.debugMaterial) { + this.debugMaterial.destroy(); + this.debugMaterial = null; + } + } + + async asyncLoadSourceAsset( + url: string, + // TODO - report progress + // eslint-disable-next-line @typescript-eslint/no-unused-vars + onProgress: (loaded: number, total: number) => void, + ): Promise { + return new Promise((resolve, reject) => { + /* + Rewriting the url with an unused-for-networking fragment here causes the + asset to be loaded uniquely across elements which allows the meshes to + be independent and avoid a reuse of a (mis-)scaled mesh for collisions. + */ + const rewrittenUrl = new URL(url); + rewrittenUrl.hash = Math.random().toString(10); + const asset = new playcanvas.Asset(url, "container", { url: rewrittenUrl.toString() }); + this.getPlayCanvasApp().assets.add(asset); + this.getPlayCanvasApp().assets.load(asset); + asset.ready((asset) => { + resolve(asset); + }); + asset.on("error", (err) => { + reject(err); + }); + }); + } + + async asyncLoadAnimAsset( + url: string, + // TODO - report progress + // eslint-disable-next-line @typescript-eslint/no-unused-vars + onProgress: (loaded: number, total: number) => void, + ): Promise { + return new Promise((resolve, reject) => { + const asset = new playcanvas.Asset(url, "animation", { url }); + this.getPlayCanvasApp().assets.add(asset); + this.getPlayCanvasApp().assets.load(asset); + asset.ready((asset) => { + resolve(asset); + }); + asset.on("error", (err) => { + reject(err); + }); + }); + } + + dispose() { + if (this.documentTimeTickListener) { + this.documentTimeTickListener.remove(); + this.documentTimeTickListener = null; + } + if (this.registeredParentAttachment) { + (this.registeredParentAttachment?.modelGraphics as PlayCanvasModel)?.unregisterAttachment( + this.model, + ); + this.registeredParentAttachment = null; + } + if (this.loadedState) { + this.loadedState.renderEntity.destroy(); + this.loadedState = null; + } + this.clearDebugVisualisation(); + this.animLoadingInstanceManager.dispose(); + this.srcLoadingInstanceManager.dispose(); + } + + private triggerSocketedChildrenTransformed() { + // Socketed children need to be updated when the animation is updated as their position may have updated + this.socketChildrenByBone.forEach((children) => { + children.forEach((child) => { + if (child instanceof TransformableElement) { + child.didUpdateTransformation(); + } + }); + }); + } + + private updateAnimation(docTimeMs: number) { + let animationTimeMs = docTimeMs - this.model.props.animStartTime; + if (docTimeMs < this.model.props.animStartTime) { + animationTimeMs = 0; + } else if (this.model.props.animPauseTime !== null) { + if (docTimeMs > this.model.props.animPauseTime) { + animationTimeMs = this.model.props.animPauseTime - this.model.props.animStartTime; + } + } + + const animComponent = this.animState?.animComponent; + if (animComponent) { + if (!this.model.props.animEnabled) { + animComponent.playing = false; + this.triggerSocketedChildrenTransformed(); + } else { + animComponent.playing = true; + // @ts-expect-error - accessing _controller private property + const clip = animComponent.baseLayer._controller._animEvaluator.clips[0]; + if (clip) { + clip.time = animationTimeMs / 1000; + } + } + } + + for (const [model, animState] of this.attachments) { + if (animState) { + animState.animComponent.playing = this.model.props.animEnabled; + // @ts-expect-error - accessing _controller private property + const clip = animState.animComponent.baseLayer._controller._animEvaluator.clips[0]; + if (clip) { + clip.time = animationTimeMs / 1000; + (model.modelGraphics as PlayCanvasModel).triggerSocketedChildrenTransformed(); + } + } + } + this.triggerSocketedChildrenTransformed(); + } +} diff --git a/packages/mml-web-playcanvas/src/elements/PlayCanvasPlane.ts b/packages/mml-web-playcanvas/src/elements/PlayCanvasPlane.ts new file mode 100644 index 00000000..03f80150 --- /dev/null +++ b/packages/mml-web-playcanvas/src/elements/PlayCanvasPlane.ts @@ -0,0 +1,85 @@ +import { MELEMENT_PROPERTY_NAME, MPlaneProps, Plane } from "@mml-io/mml-web"; +import { MMLColor } from "@mml-io/mml-web"; +import { PlaneGraphics } from "@mml-io/mml-web"; +import * as playcanvas from "playcanvas"; + +import { PlayCanvasGraphicsAdapter } from "../PlayCanvasGraphicsAdapter"; + +export class PlayCanvasPlane extends PlaneGraphics { + private entity: playcanvas.Entity; + private renderComponent: playcanvas.RenderComponent; + private material: playcanvas.StandardMaterial = new playcanvas.StandardMaterial(); + + constructor(private plane: Plane) { + super(plane); + + /* + The primitive must be in an internal entity to allow using setLocalScale + without affecting children. + */ + this.entity = new playcanvas.Entity( + "plane-internal", + plane.getScene().getGraphicsAdapter().getPlayCanvasApp(), + ); + (this.entity as any)[MELEMENT_PROPERTY_NAME] = plane; + this.renderComponent = this.entity.addComponent("render", { + type: "plane", + material: this.material, + }) as playcanvas.RenderComponent; + this.entity.rotate(90, 0, 0); + this.entity.addComponent("collision", { + type: "box", + halfExtents: new playcanvas.Vec3(0.5, 0, 0.5), + }); + plane.getContainer().addChild(this.entity); + } + + disable(): void {} + + enable(): void {} + + getCollisionElement(): playcanvas.Entity { + return this.entity; + } + + setColor(color: MMLColor): void { + this.material.diffuse.set(color.r, color.g, color.b); + this.material.update(); + } + + private updateSize(mPlaneProps: MPlaneProps): void { + this.entity.setLocalScale(mPlaneProps.width, 1, mPlaneProps.height); + if (this.entity.collision) { + this.entity.collision.halfExtents.set(mPlaneProps.width / 2, 0, mPlaneProps.height / 2); + // @ts-expect-error - accessing onSetHalfExtents private method + this.entity.collision.onSetHalfExtents(); + } + } + + setWidth(width: number, mPlaneProps: MPlaneProps): void { + this.updateSize(mPlaneProps); + } + + setHeight(height: number, mPlaneProps: MPlaneProps): void { + this.updateSize(mPlaneProps); + } + + setCastShadows(castShadows: boolean): void { + // TODO - not casting shadows? + this.renderComponent.castShadows = castShadows; + } + + setOpacity(opacity: number): void { + if (opacity === 1) { + this.material.blendType = playcanvas.BLEND_NONE; + } else { + this.material.blendType = playcanvas.BLEND_NORMAL; + } + this.material.opacity = opacity; + this.material.update(); + } + + dispose() { + this.entity.destroy(); + } +} diff --git a/packages/mml-web-playcanvas/src/elements/PlayCanvasPositionProbe.ts b/packages/mml-web-playcanvas/src/elements/PlayCanvasPositionProbe.ts new file mode 100644 index 00000000..12b02a26 --- /dev/null +++ b/packages/mml-web-playcanvas/src/elements/PlayCanvasPositionProbe.ts @@ -0,0 +1,77 @@ +import { PositionProbe } from "@mml-io/mml-web"; +import { PositionProbeGraphics } from "@mml-io/mml-web"; +import * as playcanvas from "playcanvas"; + +import { PlayCanvasGraphicsAdapter } from "../PlayCanvasGraphicsAdapter"; + +export class PlayCanvasPositionProbe extends PositionProbeGraphics { + private entity: playcanvas.Entity | null = null; + private debugMaterial: playcanvas.BasicMaterial | null = null; + + constructor(private positionProbe: PositionProbe) { + super(positionProbe); + this.updateDebugVisualisation(); + } + + disable(): void {} + + enable(): void {} + + setRange(): void { + this.updateDebugVisualisation(); + } + + setDebug() { + this.updateDebugVisualisation(); + } + + private clearDebugVisualisation() { + if (this.entity) { + this.entity.destroy(); + this.entity = null; + } + if (this.debugMaterial) { + this.debugMaterial.destroy(); + this.debugMaterial = null; + } + } + + private updateDebugVisualisation() { + if (!this.positionProbe.props.debug) { + this.clearDebugVisualisation(); + } else { + if (this.positionProbe.isConnected && !this.entity) { + this.entity = new playcanvas.Entity( + "position-probe-internal", + this.positionProbe.getScene().getGraphicsAdapter().getPlayCanvasApp(), + ); + if (!this.debugMaterial) { + this.debugMaterial = new playcanvas.BasicMaterial(); + this.debugMaterial.color = new playcanvas.Color(0, 1, 0); + } + this.entity.addComponent("model", { + type: "sphere", + material: this.debugMaterial, + }); + this.entity.model?.model.meshInstances.forEach((mi) => { + mi.renderStyle = playcanvas.RENDERSTYLE_WIREFRAME; + mi.castShadow = false; + }); + + this.positionProbe.getContainer().addChild(this.entity); + } + + if (this.entity) { + this.entity.setLocalScale( + this.positionProbe.props.range * 2, + this.positionProbe.props.range * 2, + this.positionProbe.props.range * 2, + ); + } + } + } + + dispose() { + this.clearDebugVisualisation(); + } +} diff --git a/packages/mml-web-playcanvas/src/elements/PlayCanvasPrompt.ts b/packages/mml-web-playcanvas/src/elements/PlayCanvasPrompt.ts new file mode 100644 index 00000000..a4612384 --- /dev/null +++ b/packages/mml-web-playcanvas/src/elements/PlayCanvasPrompt.ts @@ -0,0 +1,32 @@ +import { Prompt } from "@mml-io/mml-web"; +import { PromptGraphics } from "@mml-io/mml-web"; + +import { PlayCanvasGraphicsAdapter } from "../PlayCanvasGraphicsAdapter"; + +export class PlayCanvasPrompt extends PromptGraphics { + constructor(private prompt: Prompt) { + super(prompt); + } + + disable(): void {} + + enable(): void {} + + setMessage(): void { + // no-op + } + + setPlaceholder(): void { + // no-op + } + + setPrefill(): void { + // no-op + } + + setDebug(): void { + // no-op + } + + dispose() {} +} diff --git a/packages/mml-web-playcanvas/src/elements/PlayCanvasRemoteDocument.ts b/packages/mml-web-playcanvas/src/elements/PlayCanvasRemoteDocument.ts new file mode 100644 index 00000000..0084d689 --- /dev/null +++ b/packages/mml-web-playcanvas/src/elements/PlayCanvasRemoteDocument.ts @@ -0,0 +1,42 @@ +import { RemoteDocument, RemoteDocumentGraphics } from "@mml-io/mml-web"; +import * as playcanvas from "playcanvas"; + +import { PlayCanvasGraphicsAdapter } from "../PlayCanvasGraphicsAdapter"; +import { getPlayCanvasReconnectingStatus } from "../PlayCanvasReconnectingStatus"; + +export class PlayCanvasRemoteDocument extends RemoteDocumentGraphics { + private statusUI: playcanvas.Entity | null = null; + + constructor(private element: RemoteDocument) { + super(element); + } + + public showError(showError: boolean): void { + if (!showError) { + if (this.statusUI !== null) { + this.element.getContainer().removeChild(this.statusUI); + this.statusUI = null; + } + } else { + if (this.statusUI === null) { + const playCanvasApp = this.element.getScene().getGraphicsAdapter().getPlayCanvasApp(); + this.statusUI = new playcanvas.Entity("label-internal", playCanvasApp); + this.statusUI.rotate(90, 0, 0); + + const { material, width, height } = getPlayCanvasReconnectingStatus(playCanvasApp); + + this.statusUI.addComponent("render", { + type: "plane", + material, + }) as playcanvas.RenderComponent; + + this.statusUI.setLocalScale(width, 1, height); + + this.statusUI.setPosition(0, height / 2, 0); + this.element.getContainer().addChild(this.statusUI); + } + } + } + + public dispose() {} +} diff --git a/packages/mml-web-playcanvas/src/elements/PlayCanvasSphere.ts b/packages/mml-web-playcanvas/src/elements/PlayCanvasSphere.ts new file mode 100644 index 00000000..fe3fd30e --- /dev/null +++ b/packages/mml-web-playcanvas/src/elements/PlayCanvasSphere.ts @@ -0,0 +1,87 @@ +import { MELEMENT_PROPERTY_NAME, MSphereProps, Sphere } from "@mml-io/mml-web"; +import { MMLColor } from "@mml-io/mml-web"; +import { SphereGraphics } from "@mml-io/mml-web"; +import * as playcanvas from "playcanvas"; + +import { PlayCanvasGraphicsAdapter } from "../PlayCanvasGraphicsAdapter"; + +export class PlayCanvasSphere extends SphereGraphics { + private entity: playcanvas.Entity; + private renderComponent: playcanvas.RenderComponent; + private material: playcanvas.StandardMaterial = new playcanvas.StandardMaterial(); + + constructor(private sphere: Sphere) { + super(sphere); + + /* + The primitive must be in an internal entity to allow using setLocalScale + without affecting children. + */ + this.entity = new playcanvas.Entity( + "sphere-internal", + sphere.getScene().getGraphicsAdapter().getPlayCanvasApp(), + ); + (this.entity as any)[MELEMENT_PROPERTY_NAME] = sphere; + this.renderComponent = this.entity.addComponent("render", { + type: "sphere", + material: this.material, + }) as playcanvas.RenderComponent; + this.entity.addComponent("collision", { + type: "sphere", + }); + if (this.entity.collision) { + this.entity.collision.radius = 1; + } + sphere.getContainer().addChild(this.entity); + } + + disable(): void {} + + enable(): void {} + + getCollisionElement(): playcanvas.Entity { + return this.entity; + } + + setColor(color: MMLColor): void { + this.material.diffuse.set(color.r, color.g, color.b); + this.material.metalness = 0; + this.material.useMetalness = true; + this.material.update(); + } + + private updateSize(mSphereProps: MSphereProps): void { + this.entity.setLocalScale( + mSphereProps.radius * 2, + mSphereProps.radius * 2, + mSphereProps.radius * 2, + ); + if (this.entity.collision) { + this.entity.collision.radius = mSphereProps.radius; + // @ts-expect-error - accessing onSetRadius private method + this.entity.collision.onSetRadius(); + } + } + + setRadius(radius: number, mSphereProps: MSphereProps): void { + this.updateSize(mSphereProps); + } + + setCastShadows(castShadows: boolean): void { + this.renderComponent.castShadows = castShadows; + } + + setOpacity(opacity: number): void { + if (opacity === 1) { + this.material.blendType = playcanvas.BLEND_NONE; + } else { + this.material.blendType = playcanvas.BLEND_NORMAL; + } + this.material.opacity = opacity; + this.material.update(); + } + + dispose() { + this.entity.destroy(); + } +} diff --git a/packages/mml-web-playcanvas/src/elements/PlayCanvasTransformable.ts b/packages/mml-web-playcanvas/src/elements/PlayCanvasTransformable.ts new file mode 100644 index 00000000..c322c6b5 --- /dev/null +++ b/packages/mml-web-playcanvas/src/elements/PlayCanvasTransformable.ts @@ -0,0 +1,178 @@ +import { + Matr4, + Model, + TransformableElement, + TransformableElementProps, + TransformableGraphics, +} from "@mml-io/mml-web"; +import * as playcanvas from "playcanvas"; + +import { PlayCanvasGraphicsAdapter } from "../PlayCanvasGraphicsAdapter"; +import { PlayCanvasModel } from "./PlayCanvasModel"; + +const halfToRad = 0.5 * playcanvas.math.DEG_TO_RAD; + +// An implementation of XYZ ordered Euler angles in degrees to quaternion +function xyzDegreesToQuaternion(x: number, y: number, z: number): [number, number, number, number] { + x *= halfToRad; + y *= halfToRad; + z *= halfToRad; + const cx = Math.cos(x); + const cy = Math.cos(y); + const cz = Math.cos(z); + + const sx = Math.sin(x); + const sy = Math.sin(y); + const sz = Math.sin(z); + + return [ + sx * cy * cz + cx * sy * sz, // x + cx * sy * cz - sx * cy * sz, // y + cx * cy * sz + sx * sy * cz, // z + cx * cy * cz - sx * sy * sz, // w + ]; +} + +export class PlayCanvasTransformable extends TransformableGraphics { + private socketName: string | null = null; + private registeredSocketParent: PlayCanvasModel | null = null; + + constructor(private transformableElement: TransformableElement) { + super(transformableElement); + } + + getWorldMatrix(): Matr4 { + return new Matr4(this.getPlayCanvasEntity().getWorldTransform().data); + } + + setSocket(socketName: string | null): void { + if (this.socketName !== socketName) { + if (this.socketName !== null && this.registeredSocketParent) { + this.registeredSocketParent.unregisterSocketChild( + this.transformableElement, + this.socketName, + ); + } + this.socketName = socketName; + if (socketName !== null) { + this.registerWithParentModel(socketName); + } + } else { + this.socketName = socketName; + } + } + + private registerWithParentModel(socketName: string): void { + if ( + (this.transformableElement.parentElement as Model | undefined) + ?.isModel + ) { + const parentModel = this.transformableElement + .parentElement as Model; + this.registeredSocketParent = parentModel.modelGraphics as PlayCanvasModel; + this.registeredSocketParent.registerSocketChild(this.transformableElement, socketName); + } + } + + setVisible(visible: boolean): void { + this.getPlayCanvasEntity().enabled = visible; + } + + private updatePosition(x: number, y: number, z: number): void { + this.getPlayCanvasEntity().setLocalPosition(x, y, z); + } + + setX(x: number, transformableElementProps: TransformableElementProps): void { + this.updatePosition( + transformableElementProps.x, + transformableElementProps.y, + transformableElementProps.z, + ); + } + + setY(y: number, transformableElementProps: TransformableElementProps): void { + this.updatePosition( + transformableElementProps.x, + transformableElementProps.y, + transformableElementProps.z, + ); + } + + setZ(z: number, transformableElementProps: TransformableElementProps): void { + this.updatePosition( + transformableElementProps.x, + transformableElementProps.y, + transformableElementProps.z, + ); + } + + private getPlayCanvasEntity(): playcanvas.Entity { + return this.transformableElement.getContainer() as playcanvas.Entity; + } + + private updateRotation(rx: number, ry: number, rz: number): void { + this.getPlayCanvasEntity().setLocalRotation(...xyzDegreesToQuaternion(rx, ry, rz)); + } + + setRotationX(rotationX: number, transformableElementProps: TransformableElementProps): void { + this.updateRotation( + transformableElementProps.rx, + transformableElementProps.ry, + transformableElementProps.rz, + ); + } + + setRotationY(rotationY: number, transformableElementProps: TransformableElementProps): void { + this.updateRotation( + transformableElementProps.rx, + transformableElementProps.ry, + transformableElementProps.rz, + ); + } + + setRotationZ(rotationZ: number, transformableElementProps: TransformableElementProps): void { + this.updateRotation( + transformableElementProps.rx, + transformableElementProps.ry, + transformableElementProps.rz, + ); + } + + private updateScale(sx: number, sy: number, sz: number): void { + this.getPlayCanvasEntity().setLocalScale(sx, sy, sz); + } + + setScaleX(scaleX: number, transformableElementProps: TransformableElementProps): void { + this.updateScale( + transformableElementProps.sx, + transformableElementProps.sy, + transformableElementProps.sz, + ); + } + + setScaleY(scaleY: number, transformableElementProps: TransformableElementProps): void { + this.updateScale( + transformableElementProps.sx, + transformableElementProps.sy, + transformableElementProps.sz, + ); + } + + setScaleZ(scaleZ: number, transformableElementProps: TransformableElementProps): void { + this.updateScale( + transformableElementProps.sx, + transformableElementProps.sy, + transformableElementProps.sz, + ); + } + + dispose() { + if (this.socketName && this.registeredSocketParent !== null) { + this.registeredSocketParent.unregisterSocketChild( + this.transformableElement, + this.socketName, + false, + ); + } + } +} diff --git a/packages/mml-web-playcanvas/src/elements/PlayCanvasVideo.ts b/packages/mml-web-playcanvas/src/elements/PlayCanvasVideo.ts new file mode 100644 index 00000000..7ed2925e --- /dev/null +++ b/packages/mml-web-playcanvas/src/elements/PlayCanvasVideo.ts @@ -0,0 +1,365 @@ +import { + calculateContentSize, + EventHandlerCollection, + MELEMENT_PROPERTY_NAME, + StaticFileVideoSource, + Video, + VideoGraphics, + VideoSource, + WHEPVideoSource, +} from "@mml-io/mml-web"; +import * as playcanvas from "playcanvas"; + +import { createPlaneModel } from "../plane/plane"; +import { PlayCanvasGraphicsAdapter } from "../PlayCanvasGraphicsAdapter"; + +const audioRefDistance = 1; +const audioRolloffFactor = 1; + +export class PlayCanvasVideo extends VideoGraphics { + private videoSource: VideoSource | null = null; + private videoMaterial: playcanvas.StandardMaterial = new playcanvas.StandardMaterial(); + private disabledVideoMaterial = new playcanvas.StandardMaterial(); + + private entity: playcanvas.Entity; + private modelComponent: playcanvas.ModelComponent; + private meshInstance: playcanvas.MeshInstance; + + private loadedVideoState: { + video: HTMLVideoElement; + videoLoadEventCollection: EventHandlerCollection; + videoTexture: playcanvas.Texture | null; + audio: { + audioNode: AudioNode; + panner: PannerNode; + } | null; + } | null = null; + private documentTimeTickListener: { remove: () => void }; + + private eventCollection = new EventHandlerCollection(); + + constructor( + private video: Video, + private updateMeshCallback: () => void, + ) { + super(video, updateMeshCallback); + this.disabledVideoMaterial.diffuse = new playcanvas.Color(0, 0, 0); + + this.documentTimeTickListener = this.video.addDocumentTimeTickListener(() => { + this.tick(); + }); + + this.eventCollection.add(this.getAudioContext(), "statechange", () => { + this.syncVideoTime(); + }); + + /* + The primitive must be in an internal entity to allow using setLocalScale + without affecting children. + */ + this.entity = new playcanvas.Entity( + "video-internal", + video.getScene().getGraphicsAdapter().getPlayCanvasApp(), + ); + (this.entity as any)[MELEMENT_PROPERTY_NAME] = video; + + const { model, meshInstance } = createPlaneModel( + this.video.getScene().getGraphicsAdapter().getPlayCanvasApp(), + this.disabledVideoMaterial, + ); + this.modelComponent = this.entity.addComponent("model", {}) as playcanvas.ModelComponent; + this.modelComponent.model = model; + this.meshInstance = meshInstance; + + this.entity.addComponent("collision", { + type: "box", + halfExtents: new playcanvas.Vec3(0.5, 0, 0.5), + }); + video.getContainer().addChild(this.entity); + } + + private getPlayCanvasApp(): playcanvas.AppBase { + return this.video.getScene().getGraphicsAdapter().getPlayCanvasApp(); + } + + getWidthAndHeight(): { width: number; height: number } { + return { + width: this.entity.getLocalScale().x, + height: this.entity.getLocalScale().y, + }; + } + + private getAudioContext(): AudioContext { + const playcanvasApp = this.getPlayCanvasApp(); + const soundSystem = playcanvasApp.systems.sound; + if (!soundSystem) { + throw new Error("Playcanvas sound system not enabled"); + } + return soundSystem.context; + } + + public syncVideoTime() { + if (this.loadedVideoState) { + const videoTag = this.loadedVideoState.video; + if (videoTag.readyState === 0) { + return; + } + + const audioContext = this.getAudioContext(); + if (audioContext.state === "running") { + videoTag.muted = false; + } + + if (this.video.isDisabled()) { + videoTag.muted = true; + } + + if (this.videoSource) { + this.videoSource.syncVideoSource(this.video.props); + } + } + } + + public enable(): void { + this.updateVideo(); + } + + public disable(): void { + this.updateVideo(); + } + + public setSrc(): void { + this.updateVideo(); + } + + public setWidth(): void { + this.updateWidthAndHeight(); + } + + public setHeight(): void { + this.updateWidthAndHeight(); + } + + public setEnabled(): void { + this.updateVideo(); + } + + public setCastShadows(): void { + this.updateVideo(); + } + + public setLoop(): void { + this.updateVideo(); + } + + public setVolume(): void { + this.updateVideo(); + } + + public setEmissive(): void { + this.updateMaterialEmissiveIntensity(); + } + + public setStartTime(): void { + this.updateVideo(); + } + + public setPauseTime(): void { + this.updateVideo(); + } + + private updateVideo() { + if (!this.video.isConnected) { + return; + } + + if (!this.video.props.enabled) { + this.clearSource(); + return; + } + + if (!this.video.props.src) { + this.clearSource(); + } else { + const contentAddress = this.video.contentSrcToContentAddress(this.video.props.src); + if (this.videoSource === null || this.videoSource.getContentAddress() !== contentAddress) { + this.clearSource(); + + const video = document.createElement("video"); + video.playsInline = true; + // Muted allows autoplay immediately without the user needing to interact with the document + // Video will be unmuted when the audiocontext is available + video.muted = true; + video.autoplay = true; + video.crossOrigin = "anonymous"; + const videoLoadEventCollection = new EventHandlerCollection(); + this.loadedVideoState = { + video, + videoLoadEventCollection, + videoTexture: null, + audio: null, + }; + video.loop = this.video.props.loop; + + const url = new URL(contentAddress); + if (WHEPVideoSource.isWHEPURL(url)) { + this.videoSource = new WHEPVideoSource(url, video); + } else { + this.videoSource = new StaticFileVideoSource(url, video, this.video.props, () => { + return this.video.getDocumentTime(); + }); + } + + videoLoadEventCollection.add(video, "loadeddata", () => { + if (!this.loadedVideoState || this.loadedVideoState.video !== video) { + // Video was changed before it loaded + return; + } + + // Create a texture to hold the video frame data + this.loadedVideoState.videoTexture = new playcanvas.Texture( + this.getPlayCanvasApp().graphicsDevice, + { + format: playcanvas.PIXELFORMAT_R8_G8_B8, + mipmaps: false, + width: video.videoWidth, + height: video.videoHeight, + }, + ); + this.loadedVideoState.videoTexture.setSource(this.loadedVideoState.video); + this.videoMaterial.diffuseMap = this.loadedVideoState.videoTexture; + this.videoMaterial.update(); + this.meshInstance.material = this.videoMaterial; + this.syncVideoTime(); + this.updateWidthAndHeight(); + this.updateMaterialEmissiveIntensity(); + + // playcanvas doesn't support positional audio for video elements so use the audio context directly + const audioContext = this.getAudioContext(); + + const pos = this.entity.getPosition(); + // TODO - initial orientation + const orientationX = 1.0; + const orientationY = 0.0; + const orientationZ = 0.0; + + const panner = new PannerNode(audioContext, { + panningModel: "HRTF", + distanceModel: "inverse", + positionX: pos.x, + positionY: pos.y, + positionZ: pos.z, + orientationX, + orientationY, + orientationZ, + refDistance: audioRefDistance, + rolloffFactor: audioRolloffFactor, + }); + + const gainNode = audioContext.createGain(); + const stereoPanner = new StereoPannerNode(audioContext, { pan: 0 }); + const audioNode = audioContext.createMediaElementSource(video); + audioNode + .connect(gainNode) + .connect(stereoPanner) + .connect(panner) + .connect(audioContext.destination); + this.loadedVideoState.audio = { audioNode, panner }; + }); + } + } + + if (this.videoSource) { + this.syncVideoTime(); + } + } + + private tick() { + const videoTexture = this.loadedVideoState?.videoTexture; + if (videoTexture) { + videoTexture.upload(); + } + const audio = this.loadedVideoState?.audio; + if (audio) { + /// Update the position + const pos = this.entity.getPosition(); + const rotation = this.entity.getEulerAngles(); + audio.panner.positionX.value = pos.x; + audio.panner.positionY.value = pos.y; + audio.panner.positionZ.value = pos.z; + audio.panner.orientationX.value = Math.cos(rotation.y); + audio.panner.orientationY.value = 0; + audio.panner.orientationZ.value = Math.sin(rotation.y); + } + } + + private clearSource() { + if (this.videoSource) { + this.videoSource.dispose(); + this.videoSource = null; + } + if (this.loadedVideoState) { + const tag = this.loadedVideoState.video; + // There is an existing src - stop playing to allow changing it + tag.pause(); + tag.src = ""; + tag.load(); + if (this.loadedVideoState.audio) { + this.loadedVideoState.audio.audioNode.disconnect(); + this.loadedVideoState.audio = null; + } + if (this.loadedVideoState.videoTexture) { + this.loadedVideoState.videoTexture.destroy(); + this.loadedVideoState.videoTexture = null; + } + this.loadedVideoState.videoLoadEventCollection.clear(); + this.loadedVideoState = null; + this.meshInstance.material = this.disabledVideoMaterial; + this.updateWidthAndHeight(); + } + } + + private updateMaterialEmissiveIntensity() { + if (this.loadedVideoState?.videoTexture && this.video.props.emissive) { + this.videoMaterial.emissiveMap = this.loadedVideoState.videoTexture; + this.videoMaterial.emissiveIntensity = this.video.props.emissive; + } else { + this.videoMaterial.emissiveMap = null; + this.videoMaterial.emissiveIntensity = 0; + } + this.videoMaterial.update(); + } + + dispose() { + this.clearSource(); + this.documentTimeTickListener.remove(); + this.eventCollection.clear(); + this.entity.destroy(); + } + + getCollisionElement(): playcanvas.Entity { + return this.entity; + } + + private updateWidthAndHeight() { + const { width, height } = calculateContentSize({ + content: this.loadedVideoState + ? { + width: this.loadedVideoState.video.videoWidth, + height: this.loadedVideoState.video.videoHeight, + } + : undefined, + width: this.video.props.width, + height: this.video.props.height, + }); + + this.entity.setLocalScale(width, height, 1); + if (this.entity.collision) { + this.entity.collision.halfExtents.set(width / 2, height / 2, 0); + // @ts-expect-error - accessing onSetHalfExtents private method + this.entity.collision.onSetHalfExtents(); + } + + this.updateMeshCallback(); + } +} diff --git a/packages/mml-web-playcanvas/src/elements/index.ts b/packages/mml-web-playcanvas/src/elements/index.ts new file mode 100644 index 00000000..b9ea70b3 --- /dev/null +++ b/packages/mml-web-playcanvas/src/elements/index.ts @@ -0,0 +1,20 @@ +export * from "./PlayCanvasAudio"; +export * from "./PlayCanvasChatProbe"; +export * from "./PlayCanvasCube"; +export * from "./PlayCanvasCylinder"; +export * from "./PlayCanvasDebugHelper"; +export * from "./PlayCanvasFrame"; +export * from "./PlayCanvasImage"; +export * from "./PlayCanvasInteraction"; +export * from "./PlayCanvasLabel"; +export * from "./PlayCanvasLight"; +export * from "./PlayCanvasLink"; +export * from "./PlayCanvasMElement"; +export * from "./PlayCanvasModel"; +export * from "./PlayCanvasPlane"; +export * from "./PlayCanvasPositionProbe"; +export * from "./PlayCanvasPrompt"; +export * from "./PlayCanvasRemoteDocument"; +export * from "./PlayCanvasSphere"; +export * from "./PlayCanvasTransformable"; +export * from "./PlayCanvasVideo"; diff --git a/packages/mml-web-playcanvas/src/index.ts b/packages/mml-web-playcanvas/src/index.ts new file mode 100644 index 00000000..c83541d8 --- /dev/null +++ b/packages/mml-web-playcanvas/src/index.ts @@ -0,0 +1,4 @@ +export * from "./PlayCanvasClickTrigger"; +export * from "./PlayCanvasGraphicsAdapter"; +export * from "./PlayCanvasGraphicsInterface"; +export * from "./PlayCanvasInteractionAdapter"; diff --git a/packages/mml-web-playcanvas/src/plane/plane.ts b/packages/mml-web-playcanvas/src/plane/plane.ts new file mode 100644 index 00000000..e292e62a --- /dev/null +++ b/packages/mml-web-playcanvas/src/plane/plane.ts @@ -0,0 +1,93 @@ +import * as playcanvas from "playcanvas"; + +export function createPlaneMesh(app: playcanvas.AppBase): playcanvas.Mesh { + const vertices = [ + // First triangle + // bottom left + -0.5, -0.5, 0, + // bottom right + 0.5, -0.5, 0, + // top left + -0.5, 0.5, 0, + + // Second triangle + // bottom right + 0.5, -0.5, 0, + // top right + 0.5, 0.5, 0, + // top left + -0.5, 0.5, 0, + + // First triangle + // top left + -0.5, 0.5, 0, + // bottom right + 0.5, -0.5, 0, + // bottom left + -0.5, -0.5, 0, + + // Second triangle + // top left + -0.5, 0.5, 0, + // top right + 0.5, 0.5, 0, + // bottom right + 0.5, -0.5, 0, + ]; + + const uvs = [ + // First triangle + // bottom left + 0, 1, + // bottom right + 1, 1, + // top left + 0, 0, + + // Second triangle + // bottom right + 1, 1, + // top right + 1, 0, + // top left + 0, 0, + + // First triangle + // top left + 0, 0, + // bottom right + 1, 1, + // bottom left + 0, 1, + + // Second triangle + // top left + 0, 0, + // top right + 1, 0, + // bottom right + 1, 1, + ]; + + const normals = Array.from({ length: vertices.length / 3 }).flatMap((value, index) => { + return index < 6 ? [0, 0, 1] : [0, 0, -1]; + }); + + const mesh = new playcanvas.Mesh(app.graphicsDevice); + mesh.setPositions(vertices); + mesh.setUvs(0, uvs); + mesh.setNormals(normals); + mesh.update(); + return mesh; +} + +export function createPlaneModel(app: playcanvas.AppBase, material: playcanvas.StandardMaterial) { + const mesh = createPlaneMesh(app); + const rootNode = new playcanvas.GraphNode(); + const meshInstance = new playcanvas.MeshInstance(mesh, material, rootNode); + meshInstance.renderStyle = playcanvas.RENDERSTYLE_SOLID; + const model = new playcanvas.Model(); + model.graph = rootNode; + model.meshInstances.push(meshInstance); + return { model, meshInstance }; +} diff --git a/packages/mml-web-playcanvas/test/no-op.test.ts b/packages/mml-web-playcanvas/test/no-op.test.ts new file mode 100644 index 00000000..5a760382 --- /dev/null +++ b/packages/mml-web-playcanvas/test/no-op.test.ts @@ -0,0 +1,5 @@ +describe("no-op", () => { + test("no-op", () => { + expect(true).toBe(true); + }); +}); diff --git a/packages/mml-web-playcanvas/tsconfig.json b/packages/mml-web-playcanvas/tsconfig.json new file mode 100644 index 00000000..fd167428 --- /dev/null +++ b/packages/mml-web-playcanvas/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "noImplicitAny": true, + "module": "esnext", + "target": "ES6", + "jsx": "react", + "lib": ["es2020", "dom"], + "sourceMap": true, + "allowJs": true, + "types": ["node", "jest"], + "strictNullChecks": true, + "skipLibCheck": true, + "allowSyntheticDefaultImports": true, + "moduleResolution": "node", + "resolveJsonModule": true, + "downlevelIteration": true, + "esModuleInterop": true, + "outDir": "./build", + "incremental": true + }, + "include": ["src/**/*", "test/**/*", "./build.ts", "./jest.config.ts"], + "exclude": ["**/build/*", "types-src"], + "files": ["../../node_modules/jest-expect-message/types/index.d.ts"] +} diff --git a/packages/mml-web-runner/README.md b/packages/mml-web-runner/README.md new file mode 100644 index 00000000..41d838d5 --- /dev/null +++ b/packages/mml-web-runner/README.md @@ -0,0 +1,76 @@ +# MML Web Runner +#### `@mml-io/mml-web-runner` + +[![npm version](https://img.shields.io/npm/v/@mml-io/mml-web-runner.svg?style=flat)](https://www.npmjs.com/package/@mml-io/mml-web-runner) + +This package contains classes that provide a simple way to run a `NetworkedDOM | EditableNetworkedDOM` instance in a browser and connect it directly to an `MMLScene`. + +This functionality allows running MML content directly in a browser as if it were on a server from the local client's perspective. + +You can connect multiple `MMLWebRunnerClient`s to the same `NetworkedDOM | EditableNetworkedDOM` instance and they will all see the same content. + +It directly exports the exports of the `@mml-io/networked-dom-web-runner` package to simplify the MML-based usage of what is otherwise NetworkedDOM functionality. + +## Example Usage + +```typescript +import { IframeWrapper, MMLScene, registerCustomElementsToWindow } from "@mml-io/mml-web"; +import { + EditableNetworkedDOM, + IframeObservableDOMFactory, + MMLWebRunnerClient, +} from "@mml-io/mml-web-runner"; +import { + StandaloneThreeJSAdapter, + StandaloneThreeJSAdapterControlsType, +} from "@mml-io/mml-web-threejs-standalone"; + +window.addEventListener("DOMContentLoaded", async () => { + // Create an iframe to isolate the MML content from the rest of the page + const { iframeWindow, iframeBody } = await IframeWrapper.create(); + + // Register the MML custom elements to the iframe window + registerCustomElementsToWindow(iframeWindow); + + // Create a networked DOM document which acts as the "server" for the MML content + const networkedDOMDocument = new EditableNetworkedDOM( + "http://example.com/index.html", + IframeObservableDOMFactory, + true, + ); + /* + Load MML content. It can run ` +``` diff --git a/packages/networked-dom-web-client/src/index.ts b/packages/networked-dom-web-client/src/index.ts index faa43942..8e923f7b 100644 --- a/packages/networked-dom-web-client/src/index.ts +++ b/packages/networked-dom-web-client/src/index.ts @@ -4,38 +4,34 @@ const thisScript = document.currentScript as HTMLScriptElement; const scriptUrl = new URL(thisScript.src); (function () { - const websocketUrl = scriptUrl.searchParams.get("websocketUrl"); - if (!websocketUrl) { - console.error("websocketUrl not set"); + const url = scriptUrl.searchParams.get("url"); + if (!url) { + console.error("url not set"); return; } window.addEventListener("load", () => { - const documentWebsocketUrls = websocketUrl.split(","); + let overriddenHandler: ((element: HTMLElement, event: CustomEvent) => void) | null = null; + const eventHandler = (element: HTMLElement, event: CustomEvent) => { + if (!overriddenHandler) { + throw new Error("overriddenHandler not set"); + } + overriddenHandler(element, event); + }; + const remoteDocumentHolder = document.createElement("div"); + document.body.append(remoteDocumentHolder); - for (const documentWebsocketUrl of documentWebsocketUrls) { - let overriddenHandler: ((element: HTMLElement, event: CustomEvent) => void) | null = null; - const eventHandler = (element: HTMLElement, event: CustomEvent) => { - if (!overriddenHandler) { - throw new Error("overriddenHandler not set"); - } - overriddenHandler(element, event); - }; - const remoteDocumentHolder = document.createElement("div"); - document.body.append(remoteDocumentHolder); + remoteDocumentHolder.addEventListener("click", (event: Event) => { + eventHandler(event.target as HTMLElement, event as CustomEvent); + return false; + }); - remoteDocumentHolder.addEventListener("click", (event: Event) => { - eventHandler(event.target as HTMLElement, event as CustomEvent); - return false; - }); - - const websocket = new NetworkedDOMWebsocket( - documentWebsocketUrl, - NetworkedDOMWebsocket.createWebSocket, - remoteDocumentHolder, - ); - overriddenHandler = (element: HTMLElement, event: CustomEvent) => { - websocket.handleEvent(element, event); - }; - } + const websocket = new NetworkedDOMWebsocket( + url, + NetworkedDOMWebsocket.createWebSocket, + remoteDocumentHolder, + ); + overriddenHandler = (element: HTMLElement, event: CustomEvent) => { + websocket.handleEvent(element, event); + }; }); })(); diff --git a/packages/networked-dom-web-runner-broadcast/README.md b/packages/networked-dom-web-runner-broadcast/README.md new file mode 100644 index 00000000..44a49640 --- /dev/null +++ b/packages/networked-dom-web-runner-broadcast/README.md @@ -0,0 +1,18 @@ +# Networked DOM Web Runner Broadcast +#### `@mml-io/networked-dom-web-runner-broadcast` + +[![npm version](https://img.shields.io/npm/v/@mml-io/networked-dom-web-runner-broadcast.svg?style=flat)](https://www.npmjs.com/package/@mml-io/networked-dom-web-runner-broadcast) + +This package contains classes that provide a way to cleanly separate the execution of an `ObservableDOM` instance from the client-serving `EditableNetworkedDOM` instance with message-passing between them. + +This allows for the `ObservableDOM` to be run in a separate process or on a separate server from the `EditableNetworkedDOM` instance. + +## Classes + +* `NetworkedDOMBroadcastRunner` + * A class that can run `ObservableDOM` instances and be reloaded with contents. + * Emits messages from the execution of the `ObservableDOM` to a provided callback (expected to be sent to a `NetworkedDOMBroadcastReceiver`). + * Accepts messages from a `NetworkedDOMBroadcastReceiver` and applies them to the `ObservableDOM` instance. +* `NetworkedDOMBroadcastReceiver` + * A class that handles the messages emit from a `NetworkedDOMBroadcastRunner` and applies them to an `EditableNetworkedDOM` instance (that can accept WebSockets from clients). + * Emits messages from the handling of the `EditableNetworkedDOM` to a provided callback (expected to be sent to a `NetworkedDOMBroadcastRunner`). diff --git a/packages/networked-dom-web-runner-relay/README.md b/packages/networked-dom-web-runner-relay/README.md new file mode 100644 index 00000000..0d1bf052 --- /dev/null +++ b/packages/networked-dom-web-runner-relay/README.md @@ -0,0 +1,16 @@ +# Networked DOM Web Runner Relay +#### `@mml-io/networked-dom-web-runner-relay` + +[![npm version](https://img.shields.io/npm/v/@mml-io/networked-dom-web-runner-relay.svg?style=flat)](https://www.npmjs.com/package/@mml-io/networked-dom-web-runner-relay) + +This package contains classes that provide a way to create an `ObservableDOMFactory` that is run by message-passing. + +## Classes + +* `RemoteNetworkedDOMInstanceClient` + * A class that has an `ObservableDOMFactory`-compliant interface (can create `ObservableDOM` instances). + * Emits messages for the management and interactions with the `ObservableDOM` instances to a provided callback (expected to be sent to a `RemoteNetworkedDOMInstanceServer`). + * Accepts messages from a `RemoteNetworkedDOMInstanceServer` and applies them to the relevant `ObservableDOM` instance. +* `RemoteNetworkedDOMInstanceServer` + * A class that handles the messages emit from a `RemoteNetworkedDOMInstanceClient` and can run multiple `ObservableDOM` instances. + * Emits messages from execution of the `ObservableDOM` instances to a provided callback (expected to be sent to a `RemoteNetworkedDOMInstanceClient`). diff --git a/packages/networked-dom-web-runner/README.md b/packages/networked-dom-web-runner/README.md new file mode 100644 index 00000000..e0e9a4f5 --- /dev/null +++ b/packages/networked-dom-web-runner/README.md @@ -0,0 +1,57 @@ +# Networked DOM Web Runner +#### `@mml-io/networked-dom-web-runner` + +[![npm version](https://img.shields.io/npm/v/@mml-io/networked-dom-web-runner.svg?style=flat)](https://www.npmjs.com/package/@mml-io/networked-dom-web-runner) + +This package contains classes that provide a simple way to run a `NetworkedDOM | EditableNetworkedDOM` instance in a browser and synchronise it to one or more local client holder elements. + +This functionality allows running NetworkedDOM directly in a browser as if it were on a server from the local client's perspective. + +You can connect multiple `NetworkedDOMWebRunnerClient`s to the same `NetworkedDOM | EditableNetworkedDOM` instance and they will all see the same content. + +## Example Usage + +```typescript +import { + EditableNetworkedDOM, + IframeObservableDOMFactory, + NetworkedDOMWebRunnerClient, +} from "@mml-io/networked-dom-web-runner"; + +window.addEventListener("DOMContentLoaded", () => { + const networkedDOMDocument = new EditableNetworkedDOM( + "http://example.com/index.html", + IframeObservableDOMFactory, + false, + ); + + const clientElement = document.createElement("div"); + clientElement.style.position = "relative"; + clientElement.style.width = "400px"; + clientElement.style.height = "400px"; + clientElement.style.backgroundColor = "gray"; + const client = new NetworkedDOMWebRunnerClient(); + document.body.append(client.element); + client.connect(networkedDOMDocument); + + networkedDOMDocument.load(` +
Init
+ +`); +}); +``` diff --git a/packages/networked-dom-web-runner/networked-dom-web-runner-iframe/src/WebBrowserDOMRunner.ts b/packages/networked-dom-web-runner/networked-dom-web-runner-iframe/src/WebBrowserDOMRunner.ts index 11837f5c..1130b8ad 100644 --- a/packages/networked-dom-web-runner/networked-dom-web-runner-iframe/src/WebBrowserDOMRunner.ts +++ b/packages/networked-dom-web-runner/networked-dom-web-runner-iframe/src/WebBrowserDOMRunner.ts @@ -134,7 +134,6 @@ export class WebBrowserDOMRunner implements DOMRunnerInterface { dispose(): void { // TODO - handle dispose - console.log("WebBrowserDOMRunner.dispose"); } getDocument(): Document { diff --git a/packages/networked-dom-web-runner/src/RunnerIframe.ts b/packages/networked-dom-web-runner/src/RunnerIframe.ts index 465f1e8e..090eed27 100644 --- a/packages/networked-dom-web-runner/src/RunnerIframe.ts +++ b/packages/networked-dom-web-runner/src/RunnerIframe.ts @@ -26,6 +26,7 @@ export class RunnerIframe { this.iframe.style.width = "0"; this.iframe.style.height = "0"; this.iframe.style.border = "none"; + this.iframe.style.visibility = "hidden"; const paramsMinusCode: Partial = { ...this.observableDOMParameters, diff --git a/packages/networked-dom-web/README.md b/packages/networked-dom-web/README.md new file mode 100644 index 00000000..c4f014cd --- /dev/null +++ b/packages/networked-dom-web/README.md @@ -0,0 +1,34 @@ +# Networked DOM Web +#### `@mml-io/networked-dom-web` + +[![npm version](https://img.shields.io/npm/v/@mml-io/networked-dom-web.svg?style=flat)](https://www.npmjs.com/package/@mml-io/networked-dom-web) + +This package contains the `NetworkedDOMWebsocket` class which can connect to a WebSocket server using the `networked-dom-v0.1` protocol and interact with a `NetworkedDOM` document. + +## Example Usage + +```typescript +// Create an element to contain the remote document's elements +const targetElement = document.createElement("div"); + +const networkedDOMWebsocket = new NetworkedDOMWebsocket( + "wss://example.com/some-networked-dom-websocket", + NetworkedDOMWebsocket.createWebSocket, // Use the default websocket creator function + targetElement, + (time: number) => { + // The time of the remote document has updated + }, + (status: NetworkedDOMWebsocketStatus) => { + // Handle status changes + }, + { // Optional configuration + tagPrefix: "m-",// Limit which elements can be created + replacementTagPrefix: "mml-", // If elements do not have the tagPrefix, prepend this prefix + }, +); + +// Events for elements from the remote document can be sent to the remote document +function sendEventToRemoteDocument(element: HTMLElement, event: CustomEvent<{ element: HTMLElement }>) { + networkedDOMWebsocket.handleEvent(element, event); +} +``` diff --git a/packages/networked-dom-web/src/DOMSanitizer.ts b/packages/networked-dom-web/src/DOMSanitizer.ts index 1c5a4862..1e83aabe 100644 --- a/packages/networked-dom-web/src/DOMSanitizer.ts +++ b/packages/networked-dom-web/src/DOMSanitizer.ts @@ -1,5 +1,10 @@ +export type DOMSanitizerOptions = { + tagPrefix?: string; // e.g. "m-" to restrict to only custom elements with a tag name starting with "m-" + replacementTagPrefix?: string; // e.g. "x-" to replace non-prefixed tags with a new prefix (e.g. "div" -> "x-div") +}; + export class DOMSanitizer { - static sanitise(node: HTMLElement) { + static sanitise(node: HTMLElement, options: DOMSanitizerOptions = {}) { if (node.getAttributeNames) { for (const attr of node.getAttributeNames()) { if (!DOMSanitizer.IsValidAttributeName(attr)) { @@ -7,6 +12,19 @@ export class DOMSanitizer { } } } + + if (node instanceof HTMLElement) { + if (options.tagPrefix) { + const tag = node.nodeName.toLowerCase(); + if (!tag.startsWith(options.tagPrefix.toLowerCase())) { + node = DOMSanitizer.replaceNodeTagName( + node, + options.replacementTagPrefix ? options.replacementTagPrefix + tag : `x-${tag}`, + ); + } + } + } + if (node.nodeName === "SCRIPT" || node.nodeName === "OBJECT" || node.nodeName === "IFRAME") { // set contents to empty string node.innerHTML = ""; @@ -20,9 +38,23 @@ export class DOMSanitizer { } } for (let i = 0; i < node.childNodes.length; i++) { - DOMSanitizer.sanitise(node.childNodes[i] as HTMLElement); + DOMSanitizer.sanitise(node.childNodes[i] as HTMLElement, options); } } + return node; + } + + static replaceNodeTagName(node: HTMLElement, newTagName: string) { + const replacementNode = document.createElement(newTagName); + let index; + while (node.firstChild) { + replacementNode.appendChild(node.firstChild); + } + for (index = node.attributes.length - 1; index >= 0; --index) { + replacementNode.setAttribute(node.attributes[index].name, node.attributes[index].value); + } + node.parentNode?.replaceChild(replacementNode, node); + return replacementNode; } static stripAllAttributes(node: HTMLElement) { diff --git a/packages/networked-dom-web/src/NetworkedDOMWebsocket.ts b/packages/networked-dom-web/src/NetworkedDOMWebsocket.ts index 176b824f..54276987 100644 --- a/packages/networked-dom-web/src/NetworkedDOMWebsocket.ts +++ b/packages/networked-dom-web/src/NetworkedDOMWebsocket.ts @@ -26,6 +26,11 @@ export enum NetworkedDOMWebsocketStatus { Disconnected, } +export type NetworkedDOMWebsocketOptions = { + tagPrefix?: string; // e.g. "m-" to restrict to only custom elements with a tag name starting with "m-" + replacementTagPrefix?: string; // e.g. "x-" to replace non-prefixed tags with a new prefix (e.g. "div" -> "x-div") +}; + /** * NetworkedDOMWebsocket is a client for a NetworkedDOMServer. It connects to a server on the provided url and receives * updates to the DOM. It also sends events to the server for interactions with the DOM. @@ -38,11 +43,6 @@ export class NetworkedDOMWebsocket { private websocket: WebSocket | null = null; private currentRoot: HTMLElement | null = null; - private url: string; - private websocketFactory: NetworkedDOMWebsocketFactory; - private parentElement: HTMLElement; - private timeCallback: (time: number) => void; - private statusUpdateCallback: (status: NetworkedDOMWebsocketStatus) => void; private stopped = false; private backoffTime = startingBackoffTimeMilliseconds; private status: NetworkedDOMWebsocketStatus | null = null; @@ -52,25 +52,13 @@ export class NetworkedDOMWebsocket { } constructor( - url: string, - websocketFactory: NetworkedDOMWebsocketFactory, - parentElement: HTMLElement, - timeCallback?: (time: number) => void, - statusUpdateCallback?: (status: NetworkedDOMWebsocketStatus) => void, + private url: string, + private websocketFactory: NetworkedDOMWebsocketFactory, + private parentElement: HTMLElement, + private timeCallback?: (time: number) => void, + private statusUpdateCallback?: (status: NetworkedDOMWebsocketStatus) => void, + private options: NetworkedDOMWebsocketOptions = {}, ) { - this.url = url; - this.websocketFactory = websocketFactory; - this.parentElement = parentElement; - this.timeCallback = - timeCallback || - (() => { - // no-op - }); - this.statusUpdateCallback = - statusUpdateCallback || - (() => { - // no-op - }); this.setStatus(NetworkedDOMWebsocketStatus.Connecting); this.startWebSocketConnectionAttempt(); } @@ -78,7 +66,9 @@ export class NetworkedDOMWebsocket { private setStatus(status: NetworkedDOMWebsocketStatus) { if (this.status !== status) { this.status = status; - this.statusUpdateCallback(status); + if (this.statusUpdateCallback) { + this.statusUpdateCallback(status); + } } } @@ -139,12 +129,11 @@ export class NetworkedDOMWebsocket { this.startWebSocketConnectionAttempt(); }; - websocket.addEventListener("close", (e) => { + websocket.addEventListener("close", () => { if (websocket !== this.websocket) { console.warn("Ignoring websocket close event because it is no longer current"); return; } - console.log("NetworkedDOMWebsocket close", e); onWebsocketClose(); }); websocket.addEventListener("error", (e) => { @@ -253,10 +242,6 @@ export class NetworkedDOMWebsocket { throw new Error("Element not found"); } - console.log( - `Sending event to websocket: "${event.type}" on node: ${nodeId} type: ${element.tagName}`, - ); - const detailWithoutElement: Partial = { ...event.detail, }; @@ -457,10 +442,18 @@ export class NetworkedDOMWebsocket { let element; try { - element = document.createElement(tag); + let filteredTag = tag; + if (this.options.tagPrefix) { + if (!tag.toLowerCase().startsWith(this.options.tagPrefix.toLowerCase())) { + filteredTag = this.options.replacementTagPrefix + ? this.options.replacementTagPrefix + tag + : `x-${tag}`; + } + } + element = document.createElement(filteredTag); } catch (e) { console.error(`Error creating element: (${tag})`, e); - element = document.createElement("div"); + element = document.createElement("x-div"); } this.idToElement.set(nodeId, element); this.elementToId.set(element, nodeId); diff --git a/packages/networked-dom-web/test/index.test.ts b/packages/networked-dom-web/test/index.test.ts index 67181a93..53ec9870 100644 --- a/packages/networked-dom-web/test/index.test.ts +++ b/packages/networked-dom-web/test/index.test.ts @@ -5,16 +5,16 @@ describe("DOMSanitizer", () => { const el = document.createElement("div"); el.innerHTML = ``; expect(el.innerHTML).toEqual(``); - DOMSanitizer.sanitise(el); - expect(el.innerHTML).toEqual(``); + const sanitised = DOMSanitizer.sanitise(el); + expect(sanitised.innerHTML).toEqual(``); }); test("should sanitise obfuscated 'on' attribute names", () => { const el = document.createElement("div"); el.innerHTML = ``; expect(el.innerHTML).toEqual(``); - DOMSanitizer.sanitise(el); - expect(el.innerHTML).toEqual(``); + const sanitised = DOMSanitizer.sanitise(el); + expect(sanitised.innerHTML).toEqual(``); }); test("should sanitise scripts", () => { @@ -23,8 +23,8 @@ describe("DOMSanitizer", () => { expect(el.innerHTML).toEqual( `
Foo
Baz`, ); - DOMSanitizer.sanitise(el); - expect(el.innerHTML).toEqual(`
Foo
Baz`); + const sanitised = DOMSanitizer.sanitise(el); + expect(sanitised.innerHTML).toEqual(`
Foo
Baz`); }); test("should sanitise iframes", () => { @@ -33,8 +33,8 @@ describe("DOMSanitizer", () => { expect(el.innerHTML).toEqual( `
Foo
Baz`, ); - DOMSanitizer.sanitise(el); - expect(el.innerHTML).toEqual(`
Foo
Baz`); + const sanitised = DOMSanitizer.sanitise(el); + expect(sanitised.innerHTML).toEqual(`
Foo
Baz`); }); test("should sanitise objects", () => { @@ -43,31 +43,46 @@ describe("DOMSanitizer", () => { expect(el.innerHTML).toEqual( `
Foo
Baz`, ); - DOMSanitizer.sanitise(el); - expect(el.innerHTML).toEqual(`
Foo
Baz`); + const sanitised = DOMSanitizer.sanitise(el); + expect(sanitised.innerHTML).toEqual(`
Foo
Baz`); }); test("should sanitise objects", () => { const el = document.createElement("div"); el.innerHTML = `
Foo
Baz`; expect(el.innerHTML).toEqual(`
Foo
Baz`); - DOMSanitizer.sanitise(el); - expect(el.innerHTML).toEqual(`
Foo
Baz`); + const sanitised = DOMSanitizer.sanitise(el); + expect(sanitised.innerHTML).toEqual(`
Foo
Baz`); }); test("should sanitise applets", () => { const el = document.createElement("div"); el.innerHTML = `
Foo
Baz`; expect(el.innerHTML).toEqual(`
Foo
Baz`); - DOMSanitizer.sanitise(el); - expect(el.innerHTML).toEqual(`
Foo
Baz`); + const sanitised = DOMSanitizer.sanitise(el); + expect(sanitised.innerHTML).toEqual(`
Foo
Baz`); }); test("should strip invalid attribute names", () => { const el = document.createElement("div"); el.innerHTML = `
`; expect(el.innerHTML).toEqual(`
`); - DOMSanitizer.sanitise(el); - expect(el.innerHTML).toEqual(`
`); + const sanitised = DOMSanitizer.sanitise(el); + expect(sanitised.innerHTML).toEqual(`
`); + }); + + test("should replace tags if a prefix is provided", () => { + const el = document.createElement("div"); + el.innerHTML = `
`; + expect(el.innerHTML).toEqual( + `
`, + ); + const sanitised = DOMSanitizer.sanitise(el, { + tagPrefix: "m-", + replacementTagPrefix: "x-", + }); + expect(sanitised.innerHTML).toEqual( + ``, + ); }); }); diff --git a/packages/observable-dom-common/README.md b/packages/observable-dom-common/README.md new file mode 100644 index 00000000..330a16b6 --- /dev/null +++ b/packages/observable-dom-common/README.md @@ -0,0 +1,17 @@ +# Observable DOM Common +#### `@mml-io/observable-dom-common` + +[![npm version](https://img.shields.io/npm/v/@mml-io/observable-dom-common.svg?style=flat)](https://www.npmjs.com/package/@mml-io/observable-dom-common) + +This package contains the interface types and messages used by the Observable DOM system and some helper functions for bridging messages and interfaces. + +## Classes + +* `ObservableDOMInterface` + * The interface of an `ObservableDOM`. +* `observableDOMInterfaceToMessageSender` + * A function that returns an object that matches the `ObservableDOMInterface`, but sends messages corresponding to interactions with the interface to a provided callback. +* `applyMessageToObservableDOMInstance` + * A function that applies a message (from `observableDOMInterfaceToMessageSender`) to an `ObservableDOM` instance. +* `ToObservableDOMInstanceMessage` and `FromObservableDOMInstanceMessage` + * Messages that can describe the emissions and interactions with an ObservableDOM instance. diff --git a/packages/observable-dom/README.md b/packages/observable-dom/README.md new file mode 100644 index 00000000..c2f676ac --- /dev/null +++ b/packages/observable-dom/README.md @@ -0,0 +1,18 @@ +# Observable DOM +#### `@mml-io/observable-dom` + +[![npm version](https://img.shields.io/npm/v/@mml-io/observable-dom.svg?style=flat)](https://www.npmjs.com/package/@mml-io/observable-dom) + +This package is the core of the NetworkedDOM system. It provides classes that can execute HTML documents (including JavaScript) and emit messages that describe the changes to the DOM. + +It is designed to be used in a message-passing system, where the messages are sent to a remote client that can apply the changes to a local DOM to keep it in sync with the remote DOM. + +It is also capable of diffing the changes between the last state of a DOM and a current/new state of a DOM, and describing only necessary changes to make to reach the new state. + +## Classes + +* `ObservableDOM` + * A class that can execute HTML documents using a provided `DOMRunnerInterface` / `DOMRunnerFactory` and emit messages that describe the changes to the DOM. + * Can apply events to the DOM. +* `JSDOMRunner` / `JSDOMRunnerFactory` + * A class that implements the `DOMRunnerInterface` / `DOMRunnerFactory` and uses `jsdom` to execute HTML documents. diff --git a/packages/schema-validator/README.md b/packages/schema-validator/README.md index 4fb5fbaa..bb87b84a 100644 --- a/packages/schema-validator/README.md +++ b/packages/schema-validator/README.md @@ -1,4 +1,7 @@ # MML Schema Validator +#### `@mml-io/schema-validator` + +[![npm version](https://img.shields.io/npm/v/@mml-io/schema-validator)](https://www.npmjs.com/package/@mml-io/schema-validator) This package contains: * [`src/validate.ts`](./src/validate.ts) - A function that validates an MML document against the schema. diff --git a/packages/schema-validator/tsconfig.json b/packages/schema-validator/tsconfig.json index 7cf8e1d0..88bce14b 100644 --- a/packages/schema-validator/tsconfig.json +++ b/packages/schema-validator/tsconfig.json @@ -9,6 +9,7 @@ "allowJs": true, "types": ["node", "jest"], "strictNullChecks": true, + "skipLibCheck": true, "allowSyntheticDefaultImports": true, "moduleResolution": "node", "esModuleInterop": true, diff --git a/packages/schema/README.md b/packages/schema/README.md index 36f2b6bf..7beded14 100644 --- a/packages/schema/README.md +++ b/packages/schema/README.md @@ -1,4 +1,7 @@ # MML Schema Definition +#### `@mml-io/schema` + +[![npm version](https://img.shields.io/npm/v/@mml-io/schema.svg?style=flat)](https://www.npmjs.com/package/@mml-io/schema) This directory contains the schema definition for the MML format. The schema for element definitions is written in [XML Schema Definition Language (XSD)](https://www.w3.org/TR/xmlschema11-1/) as this enables validation of the source XHTML format of MML Documents. diff --git a/packages/schema/events-tsconfig.json b/packages/schema/events-tsconfig.json index e7d4e4d0..7f1e470e 100644 --- a/packages/schema/events-tsconfig.json +++ b/packages/schema/events-tsconfig.json @@ -7,6 +7,7 @@ "lib": ["es2020", "dom"], "sourceMap": true, "allowJs": true, + "skipLibCheck": true, "types": ["node", "jest"], "strictNullChecks": true, "allowSyntheticDefaultImports": true, diff --git a/packages/schema/tsconfig.json b/packages/schema/tsconfig.json index 825e45b7..5343f071 100644 --- a/packages/schema/tsconfig.json +++ b/packages/schema/tsconfig.json @@ -9,6 +9,7 @@ "allowJs": true, "types": ["node", "jest"], "strictNullChecks": true, + "skipLibCheck": true, "allowSyntheticDefaultImports": true, "moduleResolution": "node", "downlevelIteration": true, diff --git a/test-utils/jest-browser-polyfills.ts b/test-utils/jest-browser-polyfills.ts index 85b0fb80..b10055bd 100644 --- a/test-utils/jest-browser-polyfills.ts +++ b/test-utils/jest-browser-polyfills.ts @@ -1,8 +1,7 @@ -import { TextDecoder, TextEncoder } from "util"; - import { jest } from "@jest/globals"; import jestFetchMock from "jest-fetch-mock"; import ResizeObserverPolyfill from "resize-observer-polyfill"; +import { TextDecoder, TextEncoder } from "util"; import { MockAudioContext } from "./mocks/MockAudioContext"; diff --git a/test-utils/mocks/MockAudioContext.ts b/test-utils/mocks/MockAudioContext.ts index 25aad00f..a867bbff 100644 --- a/test-utils/mocks/MockAudioContext.ts +++ b/test-utils/mocks/MockAudioContext.ts @@ -2,20 +2,21 @@ export class MockAudioContext { addEventListener() { return; } + removeEventListener() { return; } + decodeAudioData(buffer: ArrayBuffer): Promise { + return Promise.resolve({} as AudioBuffer); + } + createGain(): GainNode { return { // eslint-disable-next-line @typescript-eslint/no-unused-vars connect(destinationNode: AudioNode, output?: number, input?: number): AudioNode { return {} as AudioNode; }, - // eslint-disable-next-line @typescript-eslint/no-unused-vars - disconnect(destinationParam: AudioParam, output?: number): void { - return; - }, gain: { value: 1, // eslint-disable-next-line @typescript-eslint/no-unused-vars @@ -32,8 +33,7 @@ export class MockAudioContext { connect(destinationNode: AudioNode, output?: number, input?: number): AudioNode { return {} as AudioNode; }, - // eslint-disable-next-line @typescript-eslint/no-unused-vars - disconnect(destinationParam: AudioParam, output?: number): void { + disconnect() { return; }, } as PannerNode; @@ -46,10 +46,6 @@ export class MockAudioContext { connect(destinationNode: AudioNode, output?: number, input?: number): AudioNode { return {} as AudioNode; }, - // eslint-disable-next-line @typescript-eslint/no-unused-vars - disconnect(destinationParam: AudioParam, output?: number): void { - return; - }, } as MediaElementAudioSourceNode; } } diff --git a/packages/mml-web/test/mocks/MockMediaStream.ts b/test-utils/mocks/MockMediaStream.ts similarity index 100% rename from packages/mml-web/test/mocks/MockMediaStream.ts rename to test-utils/mocks/MockMediaStream.ts diff --git a/packages/mml-web/test/mocks/MockPeerConnection.ts b/test-utils/mocks/MockPeerConnection.ts similarity index 100% rename from packages/mml-web/test/mocks/MockPeerConnection.ts rename to test-utils/mocks/MockPeerConnection.ts diff --git a/packages/mml-web/test/mocks/MockVideoElement.ts b/test-utils/mocks/MockVideoElement.ts similarity index 98% rename from packages/mml-web/test/mocks/MockVideoElement.ts rename to test-utils/mocks/MockVideoElement.ts index 4f1cda1c..b29acdd6 100644 --- a/packages/mml-web/test/mocks/MockVideoElement.ts +++ b/test-utils/mocks/MockVideoElement.ts @@ -18,6 +18,7 @@ export function createMockVideoElement(): Writeable> & mockVideoElement.paused = false; return Promise.resolve(); }) as () => Promise, + load: jest.fn(), pause: jest.fn().mockImplementation(() => { mockVideoElement.paused = true; return Promise.resolve(); diff --git a/packages/mml-web/test/mocks/types.ts b/test-utils/mocks/types.ts similarity index 100% rename from packages/mml-web/test/mocks/types.ts rename to test-utils/mocks/types.ts diff --git a/utils/base64plugin.ts b/utils/base64plugin.ts new file mode 100644 index 00000000..c905eb55 --- /dev/null +++ b/utils/base64plugin.ts @@ -0,0 +1,63 @@ +import { OnLoadArgs, OnResolveArgs, Plugin } from "esbuild"; +import fs from "fs"; +import path from "path"; +import resolve from "resolve"; + +export type Base64PluginOptions = { + replacements?: Record; +}; + +export function base64Plugin(options: Base64PluginOptions = {}) { + return { + name: "base64", + + setup(build) { + // Intercept imports starting with "base64:" + build.onResolve({ filter: /^base64:/ }, (args: OnResolveArgs) => { + const importPath = args.path.substring(7); // Remove the "base64:" prefix + + // Attempt to resolve as a module in node_modules + try { + const modulePath = resolve.sync(importPath, { + basedir: args.resolveDir, + extensions: [".js", ".jsx", ".ts", ".tsx"], + }); + return { path: modulePath, namespace: "base64" }; + } catch { + // If not found in node_modules, fallback to resolve as a regular file path + const filePath = path.isAbsolute(importPath) + ? importPath + : path.join(args.resolveDir, importPath); + + return { path: filePath, namespace: "base64" }; + } + }); + + // Load the file and encode it in Base64 + build.onLoad({ filter: /.*/, namespace: "base64" }, async (args: OnLoadArgs) => { + // Read the file content + let contentsBuffer = await fs.promises.readFile(args.path); + + if (options.replacements) { + // Apply replacements (assumes the content is text and can be converted to a string and back) + for (const [searchValue, replaceValue] of Object.entries(options.replacements)) { + let contents = contentsBuffer.toString(); + contents = contents.replace(searchValue, replaceValue); + if (contents !== contentsBuffer.toString()) { + contentsBuffer = Buffer.from(contents); + } + } + } + + // Convert content to Base64 + const base64Content = Buffer.from(contentsBuffer).toString("base64"); + + // Return as text + return { + contents: base64Content, + loader: "text", + }; + }); + }, + } as Plugin; +} diff --git a/utils/dtsPlugin.ts b/utils/dtsPlugin.ts index 369edc40..ee80ffae 100644 --- a/utils/dtsPlugin.ts +++ b/utils/dtsPlugin.ts @@ -1,10 +1,9 @@ // Originally from Floffah https://github.com/Floffah/esbuild-plugin-d.ts/blob/master/LICENSE +import { LogLevel, OnLoadArgs, Plugin } from "esbuild"; import { existsSync, lstatSync, readFileSync } from "fs"; -import { basename, dirname, resolve } from "path"; - -import { LogLevel, Plugin } from "esbuild"; import jju from "jju"; +import { basename, dirname, resolve } from "path"; import tmp from "tmp"; import ts from "typescript"; @@ -109,7 +108,7 @@ export const dtsPlugin = (opts: DTSPluginOpts = {}) => const files: string[] = []; // get all ts files - build.onLoad({ filter: /(\.tsx|\.ts)$/ }, (args) => { + build.onLoad({ filter: /(\.tsx|\.ts)$/ }, (args: OnLoadArgs) => { files.push(args.path); host.getSourceFile( @@ -126,10 +125,10 @@ export const dtsPlugin = (opts: DTSPluginOpts = {}) => build.onEnd(() => { const finalprogram = copts.incremental ? ts.createIncrementalProgram({ - options: copts, - host, - rootNames: files, - }) + options: copts, + host, + rootNames: files, + }) : ts.createProgram(files, copts, host); const start = Date.now();