From 65f351354c029a1148274668d2074b01286c3d7c Mon Sep 17 00:00:00 2001 From: Huguenin-Elie Steve Date: Fri, 26 Mar 2021 03:33:53 +0100 Subject: [PATCH 01/32] configuring env for working with assemblyscript --- asconfig.json | 20 +++++++++++++++++++ assembly/tsconfig.json | 6 ++++++ build/.gitignore | 3 +++ build/optimized.wat | 44 ++++++++++++++++++++++++++++++++++++++++++ index.js | 5 +++++ package.json | 7 ++++++- tests/index.js | 4 ++++ 7 files changed, 88 insertions(+), 1 deletion(-) create mode 100644 asconfig.json create mode 100644 assembly/tsconfig.json create mode 100644 build/.gitignore create mode 100644 build/optimized.wat create mode 100644 index.js create mode 100644 tests/index.js diff --git a/asconfig.json b/asconfig.json new file mode 100644 index 00000000..64054051 --- /dev/null +++ b/asconfig.json @@ -0,0 +1,20 @@ +{ + "targets": { + "debug": { + "binaryFile": "build/untouched.wasm", + "textFile": "build/untouched.wat", + "sourceMap": true, + "debug": true + }, + "release": { + "binaryFile": "build/optimized.wasm", + "textFile": "build/optimized.wat", + "sourceMap": true, + "optimizeLevel": 3, + "shrinkLevel": 1, + "converge": false, + "noAssert": false + } + }, + "options": {} +} \ No newline at end of file diff --git a/assembly/tsconfig.json b/assembly/tsconfig.json new file mode 100644 index 00000000..e28fcf25 --- /dev/null +++ b/assembly/tsconfig.json @@ -0,0 +1,6 @@ +{ + "extends": "assemblyscript/std/assembly.json", + "include": [ + "./**/*.ts" + ] +} \ No newline at end of file diff --git a/build/.gitignore b/build/.gitignore new file mode 100644 index 00000000..22b2ed20 --- /dev/null +++ b/build/.gitignore @@ -0,0 +1,3 @@ +*.wasm +*.wasm.map +*.asm.js diff --git a/build/optimized.wat b/build/optimized.wat new file mode 100644 index 00000000..4bebbc1d --- /dev/null +++ b/build/optimized.wat @@ -0,0 +1,44 @@ +(module + (type $f64_f64_=>_i32 (func (param f64 f64) (result i32))) + (type $f64_=>_f64 (func (param f64) (result f64))) + (type $f64_f64_f64_=>_f64 (func (param f64 f64 f64) (result f64))) + (import "Math" "max" (func $src/as/imports/MathUtil.max3 (param f64 f64 f64) (result f64))) + (memory $0 1) + (data (i32.const 1036) ",") + (data (i32.const 1048) "\01\00\00\00\18\00\00\00~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s") + (data (i32.const 1084) "\1c") + (data (i32.const 1096) "\03\00\00\00\08\00\00\00\01") + (data (i32.const 1116) "\1c") + (data (i32.const 1128) "\01\00\00\00\06\00\00\00z\00y\00x") + (data (i32.const 1148) "\1c") + (data (i32.const 1160) "\04\00\00\00\08\00\00\00\02") + (global $src/as/common/EPSILON f64 (f64.const 1e-06)) + (global $src/as/common/RANDOM i32 (i32.const 1104)) + (global $src/as/common/ANGLE_ORDER i32 (i32.const 1136)) + (export "EPSILON" (global $src/as/common/EPSILON)) + (export "RANDOM" (global $src/as/common/RANDOM)) + (export "ANGLE_ORDER" (global $src/as/common/ANGLE_ORDER)) + (export "toRadian" (func $src/as/common/toRadian)) + (export "equals" (func $src/as/common/equals)) + (export "memory" (memory $0)) + (func $src/as/common/toRadian (param $0 f64) (result f64) + local.get $0 + f64.const 0.017453292519943295 + f64.mul + ) + (func $src/as/common/equals (param $0 f64) (param $1 f64) (result i32) + local.get $0 + local.get $1 + f64.sub + f64.abs + f64.const 1 + local.get $0 + f64.abs + local.get $1 + f64.abs + call $src/as/imports/MathUtil.max3 + f64.const 1e-06 + f64.mul + f64.le + ) +) diff --git a/index.js b/index.js new file mode 100644 index 00000000..04bc3465 --- /dev/null +++ b/index.js @@ -0,0 +1,5 @@ +const fs = require("fs"); +const loader = require("@assemblyscript/loader"); +const imports = { /* imports go here */ }; +const wasmModule = loader.instantiateSync(fs.readFileSync(__dirname + "/build/optimized.wasm"), imports); +module.exports = wasmModule.exports; diff --git a/package.json b/package.json index 5bd1b7a6..f88f053a 100644 --- a/package.json +++ b/package.json @@ -35,13 +35,18 @@ "build-cjs": "babel src -d dist/cjs", "build-dts": "tsc --allowJs --declaration --emitDeclarationOnly --module amd --outFile ./dist/index.d.ts ./src/index.js ./src/types.d.ts && node ./utils/bundle-dts.js && tsc --noEmit ./dist/index.d.ts", "build": "del dist && npm run update-license-version && npm run build-umd && npm run build-esm && npm run build-cjs && npm run build-dts && node ./utils/build.js", - "prepare": "npm run build" + "prepare": "npm run build", + "asbuild:untouched": "asc assembly/index.ts --target debug", + "asbuild:optimized": "asc assembly/index.ts --target release", + "asbuild": "npm run asbuild:untouched && npm run asbuild:optimized" }, "devDependencies": { + "@assemblyscript/loader": "^0.18.17", "@babel/cli": "^7.8.4", "@babel/core": "^7.9.0", "@babel/preset-env": "^7.9.0", "@babel/register": "^7.9.0", + "assemblyscript": "^0.18.16", "cross-env": "^7.0.2", "del-cli": "^3.0.0", "jsdoc": "^3.6.3", diff --git a/tests/index.js b/tests/index.js new file mode 100644 index 00000000..df97f5cf --- /dev/null +++ b/tests/index.js @@ -0,0 +1,4 @@ +const assert = require("assert"); +const myModule = require(".."); +assert.equal(myModule.add(1, 2), 3); +console.log("ok"); From 600fc7d6721ecf61d320a2de06d74d421e004235 Mon Sep 17 00:00:00 2001 From: Huguenin-Elie Steve Date: Fri, 26 Mar 2021 03:34:41 +0100 Subject: [PATCH 02/32] porting js into as --- assembly/common.ts | 45 + assembly/imports.ts | 13 + assembly/index.ts | 18 + assembly/mat2.ts | 450 ++++++++ assembly/mat2d.ts | 524 ++++++++++ assembly/mat3.ts | 874 ++++++++++++++++ assembly/mat4.ts | 2201 ++++++++++++++++++++++++++++++++++++++++ assembly/quat.ts | 790 ++++++++++++++ assembly/quat2.ts | 926 +++++++++++++++++ assembly/tsconfig.json | 3 + assembly/types.d.ts | 94 ++ assembly/vec2.ts | 635 ++++++++++++ assembly/vec3.ts | 836 +++++++++++++++ assembly/vec4.ts | 677 ++++++++++++ 14 files changed, 8086 insertions(+) create mode 100644 assembly/common.ts create mode 100644 assembly/imports.ts create mode 100644 assembly/index.ts create mode 100644 assembly/mat2.ts create mode 100644 assembly/mat2d.ts create mode 100644 assembly/mat3.ts create mode 100644 assembly/mat4.ts create mode 100644 assembly/quat.ts create mode 100644 assembly/quat2.ts create mode 100644 assembly/types.d.ts create mode 100644 assembly/vec2.ts create mode 100644 assembly/vec3.ts create mode 100644 assembly/vec4.ts diff --git a/assembly/common.ts b/assembly/common.ts new file mode 100644 index 00000000..67bc9df8 --- /dev/null +++ b/assembly/common.ts @@ -0,0 +1,45 @@ +/** + * Common utilities + * @module glMatrix + */ + +import { MathUtil } from "./imports" + +// Configuration Constants +export const EPSILON = 0.000001; +// export let ARRAY_TYPE = f64 +export let RANDOM = Math.random; +export let ANGLE_ORDER = "zyx"; + +/** + * Sets the type of array used when creating new vectors and matrices + * + * @param {Array} type Array type, such as Float32Array or Array + */ +export function setMatrixArrayType(v: Array): Array { + return changetype>(v); +} + +const degree: f64 = Math.PI / 180; + +/** + * Convert Degree To Radian + * + * @param {Number} a Angle in Degrees + */ +export function toRadian(a: f64): f64 { + return a * degree; +} + +/** + * Tests whether or not the arguments have approximately the same value, within an absolute + * or relative tolerance of glMatrix.EPSILON (an absolute tolerance is used for values less + * than or equal to 1.0, and a relative tolerance is used for larger values) + * + * @param {Number} a The first number to test. + * @param {Number} b The second number to test. + * @returns {Boolean} True if the numbers are approximately equal, false otherwise. + */ +export function equals(a: f64, b: f64): bool { + return Math.abs(a - b) <= EPSILON * MathUtil.max(1.0, Math.abs(a), Math.abs(b)); +} diff --git a/assembly/imports.ts b/assembly/imports.ts new file mode 100644 index 00000000..fb2728b4 --- /dev/null +++ b/assembly/imports.ts @@ -0,0 +1,13 @@ +// this file import things passed in from JS, and exports them for use by other +// AS modules. + +// @ts-ignore +// prettier-ignore + +export declare namespace MathUtil { + @external("Math", "max") + function max(a: f64, b: f64, c?: f64): f64; + + @external("Math", "hypot") + function hypot(a: f64, b: f64, c?: f64, d?: f64, e?: f64, f?: f64, g?: f64, h?: f64, i?: f64, j?: f64, k?: f64, l?: f64, m?: f64, n?: f64, o?: f64, p?: f64): f64; +} diff --git a/assembly/index.ts b/assembly/index.ts new file mode 100644 index 00000000..d6600f30 --- /dev/null +++ b/assembly/index.ts @@ -0,0 +1,18 @@ +import "assemblyscript/std/assembly"; +import * as glMatrix from "./common"; +import * as mat2 from "./mat2"; +import * as mat2d from "./mat2d"; +import * as mat3 from "./mat3"; +import * as mat4 from "./mat4"; +import * as quat from "./quat"; +import * as quat2 from "./quat2"; +import * as vec2 from "./vec2"; +import * as vec3 from "./vec3"; +import * as vec4 from "./vec4"; + +export { + glMatrix, + mat2, mat2d, mat3, mat4, + quat, quat2, + vec2, vec3, vec4, +}; diff --git a/assembly/mat2.ts b/assembly/mat2.ts new file mode 100644 index 00000000..438ad709 --- /dev/null +++ b/assembly/mat2.ts @@ -0,0 +1,450 @@ +import * as glMatrix from "./common"; +import { MathUtil } from "./imports"; +import { ReadonlyVec2 } from "./vec2"; + +export class mat2 extends Float64Array {} + +export class ReadonlyMat2 extends mat2 {} + +/** + * 2x2 Matrix + * @module mat2 + */ + +/** + * Creates a new identity mat2 + * + * @returns {mat2} a new 2x2 matrix + */ +export function create(): mat2 { + let out: mat2 = new mat2(4); + //if (glMatrix.ARRAY_TYPE != Float32Array) { + out[1] = 0; + out[2] = 0; + //} + out[0] = 1; + out[3] = 1; + return out; +} + +/** + * Creates a new mat2 initialized with values from an existing matrix + * + * @param {ReadonlyMat2} a matrix to clone + * @returns {mat2} a new 2x2 matrix + */ +export function clone(a: ReadonlyMat2): mat2 { + let out: mat2 = new mat2(4); + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[3]; + return out; +} + +/** + * Copy the values from one mat2 to another + * + * @param {mat2} out the receiving matrix + * @param {ReadonlyMat2} a the source matrix + * @returns {mat2} out + */ +export function copy(out: mat2, a: ReadonlyMat2): mat2 { + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[3]; + return out; +} + +/** + * Set a mat2 to the identity matrix + * + * @param {mat2} out the receiving matrix + * @returns {mat2} out + */ +export function identity(out: mat2): mat2 { + out[0] = 1; + out[1] = 0; + out[2] = 0; + out[3] = 1; + return out; +} + +/** + * Create a new mat2 with the given values + * + * @param {Number} m00 Component in column 0, row 0 position (index 0) + * @param {Number} m01 Component in column 0, row 1 position (index 1) + * @param {Number} m10 Component in column 1, row 0 position (index 2) + * @param {Number} m11 Component in column 1, row 1 position (index 3) + * @returns {mat2} out A new 2x2 matrix + */ +export function fromValues(m00: f64, m01: f64, m10: f64, m11: f64): mat2 { + let out: mat2 = new mat2(4); + out[0] = m00; + out[1] = m01; + out[2] = m10; + out[3] = m11; + return out; +} + +/** + * Set the components of a mat2 to the given values + * + * @param {mat2} out the receiving matrix + * @param {Number} m00 Component in column 0, row 0 position (index 0) + * @param {Number} m01 Component in column 0, row 1 position (index 1) + * @param {Number} m10 Component in column 1, row 0 position (index 2) + * @param {Number} m11 Component in column 1, row 1 position (index 3) + * @returns {mat2} out + */ +export function set(out: mat2, m00: f64, m01: f64, m10: f64, m11: f64): mat2 { + out[0] = m00; + out[1] = m01; + out[2] = m10; + out[3] = m11; + return out; +} + +/** + * Transpose the values of a mat2 + * + * @param {mat2} out the receiving matrix + * @param {ReadonlyMat2} a the source matrix + * @returns {mat2} out + */ +export function transpose(out: mat2, a: ReadonlyMat2): mat2 { + // If we are transposing ourselves we can skip a few steps but have to cache + // some values + if (out === a) { + let a1 = a[1]; + out[1] = a[2]; + out[2] = a1; + } else { + out[0] = a[0]; + out[1] = a[2]; + out[2] = a[1]; + out[3] = a[3]; + } + + return out; +} + +/** + * Inverts a mat2 + * + * @param {mat2} out the receiving matrix + * @param {ReadonlyMat2} a the source matrix + * @returns {mat2} out + */ +export function invert(out: mat2, a: ReadonlyMat2): mat2 | null { + let a0 = a[0], + a1 = a[1], + a2 = a[2], + a3 = a[3]; + + // Calculate the determinant + let det = a0 * a3 - a2 * a1; + + if (!det) { + return null; + } + det = 1.0 / det; + + out[0] = a3 * det; + out[1] = -a1 * det; + out[2] = -a2 * det; + out[3] = a0 * det; + + return out; +} + +/** + * Calculates the adjugate of a mat2 + * + * @param {mat2} out the receiving matrix + * @param {ReadonlyMat2} a the source matrix + * @returns {mat2} out + */ +export function adjoint(out: mat2, a: ReadonlyMat2): mat2 { + // Caching this value is necessary if out == a + let a0 = a[0]; + out[0] = a[3]; + out[1] = -a[1]; + out[2] = -a[2]; + out[3] = a0; + + return out; +} + +/** + * Calculates the determinant of a mat2 + * + * @param {ReadonlyMat2} a the source matrix + * @returns {Number} determinant of a + */ +export function determinant(a: ReadonlyMat2): f64 { + return a[0] * a[3] - a[2] * a[1]; +} + +/** + * Multiplies two mat2's + * + * @param {mat2} out the receiving matrix + * @param {ReadonlyMat2} a the first operand + * @param {ReadonlyMat2} b the second operand + * @returns {mat2} out + */ +export function multiply(out: mat2, a: ReadonlyMat2, b: ReadonlyMat2): mat2 { + let a0 = a[0], + a1 = a[1], + a2 = a[2], + a3 = a[3]; + let b0 = b[0], + b1 = b[1], + b2 = b[2], + b3 = b[3]; + out[0] = a0 * b0 + a2 * b1; + out[1] = a1 * b0 + a3 * b1; + out[2] = a0 * b2 + a2 * b3; + out[3] = a1 * b2 + a3 * b3; + return out; +} + +/** + * Rotates a mat2 by the given angle + * + * @param {mat2} out the receiving matrix + * @param {ReadonlyMat2} a the matrix to rotate + * @param {Number} rad the angle to rotate the matrix by + * @returns {mat2} out + */ +export function rotate(out: mat2, a: ReadonlyMat2, rad: f64): mat2 { + let a0 = a[0], + a1 = a[1], + a2 = a[2], + a3 = a[3]; + let s = Math.sin(rad); + let c = Math.cos(rad); + out[0] = a0 * c + a2 * s; + out[1] = a1 * c + a3 * s; + out[2] = a0 * -s + a2 * c; + out[3] = a1 * -s + a3 * c; + return out; +} + +/** + * Scales the mat2 by the dimensions in the given vec2 + * + * @param {mat2} out the receiving matrix + * @param {ReadonlyMat2} a the matrix to rotate + * @param {ReadonlyVec2} v the vec2 to scale the matrix by + * @returns {mat2} out + **/ +export function scale(out: mat2, a: ReadonlyMat2, v: ReadonlyVec2): mat2 { + let a0 = a[0], + a1 = a[1], + a2 = a[2], + a3 = a[3]; + let v0 = v[0], + v1 = v[1]; + out[0] = a0 * v0; + out[1] = a1 * v0; + out[2] = a2 * v1; + out[3] = a3 * v1; + return out; +} + +/** + * Creates a matrix from a given angle + * This is equivalent to (but much faster than): + * + * mat2.identity(dest); + * mat2.rotate(dest, dest, rad); + * + * @param {mat2} out mat2 receiving operation result + * @param {Number} rad the angle to rotate the matrix by + * @returns {mat2} out + */ +export function fromRotation(out: mat2, rad: f64): mat2 { + let s = Math.sin(rad); + let c = Math.cos(rad); + out[0] = c; + out[1] = s; + out[2] = -s; + out[3] = c; + return out; +} + +/** + * Creates a matrix from a vector scaling + * This is equivalent to (but much faster than): + * + * mat2.identity(dest); + * mat2.scale(dest, dest, vec); + * + * @param {mat2} out mat2 receiving operation result + * @param {ReadonlyVec2} v Scaling vector + * @returns {mat2} out + */ +export function fromScaling(out: mat2, v: ReadonlyVec2): mat2 { + out[0] = v[0]; + out[1] = 0; + out[2] = 0; + out[3] = v[1]; + return out; +} + +/** + * Returns a string representation of a mat2 + * + * @param {ReadonlyMat2} a matrix to represent as a string + * @returns {String} string representation of the matrix + */ +export function str(a: ReadonlyMat2): string { + return "mat2(" + a[0].toString() + ", " + a[1].toString() + ", " + a[2].toString() + ", " + a[3].toString() + ")"; +} + +/** + * Returns Frobenius norm of a mat2 + * + * @param {ReadonlyMat2} a the matrix to calculate Frobenius norm of + * @returns {Number} Frobenius norm + */ +export function frob(a: ReadonlyMat2): f64 { + return MathUtil.hypot(a[0], a[1], a[2], a[3]); +} + +/** + * Returns L, D and U matrices (Lower triangular, Diagonal and Upper triangular) by factorizing the input matrix + * @param {ReadonlyMat2} L the lower triangular matrix + * @param {ReadonlyMat2} D the diagonal matrix + * @param {ReadonlyMat2} U the upper triangular matrix + * @param {ReadonlyMat2} a the input matrix to factorize + * @returns {Array} LDU + */ + +export function LDU(L: ReadonlyMat2, D: ReadonlyMat2, U: ReadonlyMat2, a: ReadonlyMat2): Array { + L[2] = a[2] / a[0]; + U[0] = a[0]; + U[1] = a[1]; + U[3] = a[3] - L[2] * U[1]; + return [L, D, U]; +} + +/** + * Adds two mat2's + * + * @param {mat2} out the receiving matrix + * @param {ReadonlyMat2} a the first operand + * @param {ReadonlyMat2} b the second operand + * @returns {mat2} out + */ +export function add(out: mat2, a: ReadonlyMat2, b: ReadonlyMat2): mat2 { + out[0] = a[0] + b[0]; + out[1] = a[1] + b[1]; + out[2] = a[2] + b[2]; + out[3] = a[3] + b[3]; + return out; +} + +/** + * Subtracts matrix b from matrix a + * + * @param {mat2} out the receiving matrix + * @param {ReadonlyMat2} a the first operand + * @param {ReadonlyMat2} b the second operand + * @returns {mat2} out + */ +export function subtract(out: mat2, a: ReadonlyMat2, b: ReadonlyMat2): mat2 { + out[0] = a[0] - b[0]; + out[1] = a[1] - b[1]; + out[2] = a[2] - b[2]; + out[3] = a[3] - b[3]; + return out; +} + +/** + * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===) + * + * @param {ReadonlyMat2} a The first matrix. + * @param {ReadonlyMat2} b The second matrix. + * @returns {Boolean} True if the matrices are equal, false otherwise. + */ +export function exactEquals(a: ReadonlyMat2, b: ReadonlyMat2): bool { + return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3]; +} + +/** + * Returns whether or not the matrices have approximately the same elements in the same position. + * + * @param {ReadonlyMat2} a The first matrix. + * @param {ReadonlyMat2} b The second matrix. + * @returns {Boolean} True if the matrices are equal, false otherwise. + */ +export function equals(a: ReadonlyMat2, b: ReadonlyMat2): bool { + let a0 = a[0], + a1 = a[1], + a2 = a[2], + a3 = a[3]; + let b0 = b[0], + b1 = b[1], + b2 = b[2], + b3 = b[3]; + return ( + Math.abs(a0 - b0) <= + glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a0), Math.abs(b0)) && + Math.abs(a1 - b1) <= + glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a1), Math.abs(b1)) && + Math.abs(a2 - b2) <= + glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a2), Math.abs(b2)) && + Math.abs(a3 - b3) <= + glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a3), Math.abs(b3)) + ); +} + +/** + * Multiply each element of the matrix by a scalar. + * + * @param {mat2} out the receiving matrix + * @param {ReadonlyMat2} a the matrix to scale + * @param {Number} b amount to scale the matrix's elements by + * @returns {mat2} out + */ +export function multiplyScalar(out: mat2, a: ReadonlyMat2, b: f64): mat2 { + out[0] = a[0] * b; + out[1] = a[1] * b; + out[2] = a[2] * b; + out[3] = a[3] * b; + return out; +} + +/** + * Adds two mat2's after multiplying each element of the second operand by a scalar value. + * + * @param {mat2} out the receiving vector + * @param {ReadonlyMat2} a the first operand + * @param {ReadonlyMat2} b the second operand + * @param {Number} scale the amount to scale b's elements by before adding + * @returns {mat2} out + */ +export function multiplyScalarAndAdd(out: mat2, a: ReadonlyMat2, b: ReadonlyMat2, scale: f64): mat2 { + out[0] = a[0] + b[0] * scale; + out[1] = a[1] + b[1] * scale; + out[2] = a[2] + b[2] * scale; + out[3] = a[3] + b[3] * scale; + return out; +} + +/** + * Alias for {@link mat2.multiply} + * @function + */ +export const mul = multiply; + +/** + * Alias for {@link mat2.subtract} + * @function + */ +export const sub = subtract; diff --git a/assembly/mat2d.ts b/assembly/mat2d.ts new file mode 100644 index 00000000..e1bb1598 --- /dev/null +++ b/assembly/mat2d.ts @@ -0,0 +1,524 @@ +import * as glMatrix from "./common"; +import { MathUtil } from "./imports"; +import { ReadonlyVec2 } from "./vec2"; + +export class mat2d extends Float64Array {} + +export class ReadonlyMat2d extends mat2d {} + +/** + * 2x3 Matrix + * @module mat2d + * @description + * A mat2d contains six elements defined as: + *
+ * [a, b,
+ *  c, d,
+ *  tx, ty]
+ * 
+ * This is a short form for the 3x3 matrix: + *
+ * [a, b, 0,
+ *  c, d, 0,
+ *  tx, ty, 1]
+ * 
+ * The last column is ignored so the array is shorter and operations are faster. + */ + +/** + * Creates a new identity mat2d + * + * @returns {mat2d} a new 2x3 matrix + */ +export function create(): mat2d { + let out: mat2d = new mat2d(6); + //if (mat2d != Float32Array) { + out[1] = 0; + out[2] = 0; + out[4] = 0; + out[5] = 0; + //} + out[0] = 1; + out[3] = 1; + return out; +} + +/** + * Creates a new mat2d initialized with values from an existing matrix + * + * @param {ReadonlyMat2d} a matrix to clone + * @returns {mat2d} a new 2x3 matrix + */ +export function clone(a: ReadonlyMat2d): mat2d { + let out: mat2d = new mat2d(6); + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[3]; + out[4] = a[4]; + out[5] = a[5]; + return out; +} + +/** + * Copy the values from one mat2d to another + * + * @param {mat2d} out the receiving matrix + * @param {ReadonlyMat2d} a the source matrix + * @returns {mat2d} out + */ +export function copy(out: mat2d, a: ReadonlyMat2d): mat2d { + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[3]; + out[4] = a[4]; + out[5] = a[5]; + return out; +} + +/** + * Set a mat2d to the identity matrix + * + * @param {mat2d} out the receiving matrix + * @returns {mat2d} out + */ +export function identity(out: mat2d): mat2d { + out[0] = 1; + out[1] = 0; + out[2] = 0; + out[3] = 1; + out[4] = 0; + out[5] = 0; + return out; +} + +/** + * Create a new mat2d with the given values + * + * @param {Number} a Component A (index 0) + * @param {Number} b Component B (index 1) + * @param {Number} c Component C (index 2) + * @param {Number} d Component D (index 3) + * @param {Number} tx Component TX (index 4) + * @param {Number} ty Component TY (index 5) + * @returns {mat2d} A new mat2d + */ +export function fromValues(a: f64, b: f64, c: f64, d: f64, tx: f64, ty: f64): mat2d { + let out: mat2d = new mat2d(6); + out[0] = a; + out[1] = b; + out[2] = c; + out[3] = d; + out[4] = tx; + out[5] = ty; + return out; +} + +/** + * Set the components of a mat2d to the given values + * + * @param {mat2d} out the receiving matrix + * @param {Number} a Component A (index 0) + * @param {Number} b Component B (index 1) + * @param {Number} c Component C (index 2) + * @param {Number} d Component D (index 3) + * @param {Number} tx Component TX (index 4) + * @param {Number} ty Component TY (index 5) + * @returns {mat2d} out + */ +export function set(out: mat2d, a: f64, b: f64, c: f64, d: f64, tx: f64, ty: f64): mat2d { + out[0] = a; + out[1] = b; + out[2] = c; + out[3] = d; + out[4] = tx; + out[5] = ty; + return out; +} + +/** + * Inverts a mat2d + * + * @param {mat2d} out the receiving matrix + * @param {ReadonlyMat2d} a the source matrix + * @returns {mat2d} out + */ +export function invert(out: mat2d, a: ReadonlyMat2d): mat2d | null { + let aa = a[0], + ab = a[1], + ac = a[2], + ad = a[3]; + let atx = a[4], + aty = a[5]; + + let det = aa * ad - ab * ac; + if (!det) { + return null; + } + det = 1.0 / det; + + out[0] = ad * det; + out[1] = -ab * det; + out[2] = -ac * det; + out[3] = aa * det; + out[4] = (ac * aty - ad * atx) * det; + out[5] = (ab * atx - aa * aty) * det; + return out; +} + +/** + * Calculates the determinant of a mat2d + * + * @param {ReadonlyMat2d} a the source matrix + * @returns {Number} determinant of a + */ +export function determinant(a: ReadonlyMat2d): f64 { + return a[0] * a[3] - a[1] * a[2]; +} + +/** + * Multiplies two mat2d's + * + * @param {mat2d} out the receiving matrix + * @param {ReadonlyMat2d} a the first operand + * @param {ReadonlyMat2d} b the second operand + * @returns {mat2d} out + */ +export function multiply(out: mat2d, a: ReadonlyMat2d, b: ReadonlyMat2d): mat2d { + let a0 = a[0], + a1 = a[1], + a2 = a[2], + a3 = a[3], + a4 = a[4], + a5 = a[5]; + let b0 = b[0], + b1 = b[1], + b2 = b[2], + b3 = b[3], + b4 = b[4], + b5 = b[5]; + out[0] = a0 * b0 + a2 * b1; + out[1] = a1 * b0 + a3 * b1; + out[2] = a0 * b2 + a2 * b3; + out[3] = a1 * b2 + a3 * b3; + out[4] = a0 * b4 + a2 * b5 + a4; + out[5] = a1 * b4 + a3 * b5 + a5; + return out; +} + +/** + * Rotates a mat2d by the given angle + * + * @param {mat2d} out the receiving matrix + * @param {ReadonlyMat2d} a the matrix to rotate + * @param {Number} rad the angle to rotate the matrix by + * @returns {mat2d} out + */ +export function rotate(out: mat2d, a: ReadonlyMat2d, rad: f64): mat2d { + let a0 = a[0], + a1 = a[1], + a2 = a[2], + a3 = a[3], + a4 = a[4], + a5 = a[5]; + let s = Math.sin(rad); + let c = Math.cos(rad); + out[0] = a0 * c + a2 * s; + out[1] = a1 * c + a3 * s; + out[2] = a0 * -s + a2 * c; + out[3] = a1 * -s + a3 * c; + out[4] = a4; + out[5] = a5; + return out; +} + +/** + * Scales the mat2d by the dimensions in the given vec2 + * + * @param {mat2d} out the receiving matrix + * @param {ReadonlyMat2d} a the matrix to translate + * @param {ReadonlyVec2} v the vec2 to scale the matrix by + * @returns {mat2d} out + **/ +export function scale(out: mat2d, a: ReadonlyMat2d, v: ReadonlyVec2): mat2d { + let a0 = a[0], + a1 = a[1], + a2 = a[2], + a3 = a[3], + a4 = a[4], + a5 = a[5]; + let v0 = v[0], + v1 = v[1]; + out[0] = a0 * v0; + out[1] = a1 * v0; + out[2] = a2 * v1; + out[3] = a3 * v1; + out[4] = a4; + out[5] = a5; + return out; +} + +/** + * Translates the mat2d by the dimensions in the given vec2 + * + * @param {mat2d} out the receiving matrix + * @param {ReadonlyMat2d} a the matrix to translate + * @param {ReadonlyVec2} v the vec2 to translate the matrix by + * @returns {mat2d} out + **/ +export function translate(out: mat2d, a: ReadonlyMat2d, v: ReadonlyVec2): mat2d { + let a0 = a[0], + a1 = a[1], + a2 = a[2], + a3 = a[3], + a4 = a[4], + a5 = a[5]; + let v0 = v[0], + v1 = v[1]; + out[0] = a0; + out[1] = a1; + out[2] = a2; + out[3] = a3; + out[4] = a0 * v0 + a2 * v1 + a4; + out[5] = a1 * v0 + a3 * v1 + a5; + return out; +} + +/** + * Creates a matrix from a given angle + * This is equivalent to (but much faster than): + * + * mat2d.identity(dest); + * mat2d.rotate(dest, dest, rad); + * + * @param {mat2d} out mat2d receiving operation result + * @param {Number} rad the angle to rotate the matrix by + * @returns {mat2d} out + */ +export function fromRotation(out: mat2d, rad: f64): mat2d { + let s = Math.sin(rad), + c = Math.cos(rad); + out[0] = c; + out[1] = s; + out[2] = -s; + out[3] = c; + out[4] = 0; + out[5] = 0; + return out; +} + +/** + * Creates a matrix from a vector scaling + * This is equivalent to (but much faster than): + * + * mat2d.identity(dest); + * mat2d.scale(dest, dest, vec); + * + * @param {mat2d} out mat2d receiving operation result + * @param {ReadonlyVec2} v Scaling vector + * @returns {mat2d} out + */ +export function fromScaling(out: mat2d, v: ReadonlyVec2): mat2d { + out[0] = v[0]; + out[1] = 0; + out[2] = 0; + out[3] = v[1]; + out[4] = 0; + out[5] = 0; + return out; +} + +/** + * Creates a matrix from a vector translation + * This is equivalent to (but much faster than): + * + * mat2d.identity(dest); + * mat2d.translate(dest, dest, vec); + * + * @param {mat2d} out mat2d receiving operation result + * @param {ReadonlyVec2} v Translation vector + * @returns {mat2d} out + */ +export function fromTranslation(out: mat2d, v: ReadonlyVec2): mat2d { + out[0] = 1; + out[1] = 0; + out[2] = 0; + out[3] = 1; + out[4] = v[0]; + out[5] = v[1]; + return out; +} + +/** + * Returns a string representation of a mat2d + * + * @param {ReadonlyMat2d} a matrix to represent as a string + * @returns {String} string representation of the matrix + */ +export function str(a: ReadonlyMat2d): string { + return ( + "mat2d(" + + a[0].toString() + + ", " + + a[1].toString() + + ", " + + a[2].toString() + + ", " + + a[3].toString() + + ", " + + a[4].toString() + + ", " + + a[5].toString() + + ")" + ); +} + +/** + * Returns Frobenius norm of a mat2d + * + * @param {ReadonlyMat2d} a the matrix to calculate Frobenius norm of + * @returns {Number} Frobenius norm + */ +export function frob(a: ReadonlyMat2d): f64 { + return MathUtil.hypot(a[0], a[1], a[2], a[3], a[4], a[5], 1); +} + +/** + * Adds two mat2d's + * + * @param {mat2d} out the receiving matrix + * @param {ReadonlyMat2d} a the first operand + * @param {ReadonlyMat2d} b the second operand + * @returns {mat2d} out + */ +export function add(out: mat2d, a: ReadonlyMat2d, b: ReadonlyMat2d): mat2d { + out[0] = a[0] + b[0]; + out[1] = a[1] + b[1]; + out[2] = a[2] + b[2]; + out[3] = a[3] + b[3]; + out[4] = a[4] + b[4]; + out[5] = a[5] + b[5]; + return out; +} + +/** + * Subtracts matrix b from matrix a + * + * @param {mat2d} out the receiving matrix + * @param {ReadonlyMat2d} a the first operand + * @param {ReadonlyMat2d} b the second operand + * @returns {mat2d} out + */ +export function subtract(out: mat2d, a: ReadonlyMat2d, b: ReadonlyMat2d): mat2d { + out[0] = a[0] - b[0]; + out[1] = a[1] - b[1]; + out[2] = a[2] - b[2]; + out[3] = a[3] - b[3]; + out[4] = a[4] - b[4]; + out[5] = a[5] - b[5]; + return out; +} + +/** + * Multiply each element of the matrix by a scalar. + * + * @param {mat2d} out the receiving matrix + * @param {ReadonlyMat2d} a the matrix to scale + * @param {Number} b amount to scale the matrix's elements by + * @returns {mat2d} out + */ +export function multiplyScalar(out: mat2d, a: ReadonlyMat2d, b: f64): mat2d { + out[0] = a[0] * b; + out[1] = a[1] * b; + out[2] = a[2] * b; + out[3] = a[3] * b; + out[4] = a[4] * b; + out[5] = a[5] * b; + return out; +} + +/** + * Adds two mat2d's after multiplying each element of the second operand by a scalar value. + * + * @param {mat2d} out the receiving vector + * @param {ReadonlyMat2d} a the first operand + * @param {ReadonlyMat2d} b the second operand + * @param {Number} scale the amount to scale b's elements by before adding + * @returns {mat2d} out + */ +export function multiplyScalarAndAdd(out: mat2d, a: ReadonlyMat2d, b: ReadonlyMat2d, scale: f64): mat2d { + out[0] = a[0] + b[0] * scale; + out[1] = a[1] + b[1] * scale; + out[2] = a[2] + b[2] * scale; + out[3] = a[3] + b[3] * scale; + out[4] = a[4] + b[4] * scale; + out[5] = a[5] + b[5] * scale; + return out; +} + +/** + * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===) + * + * @param {ReadonlyMat2d} a The first matrix. + * @param {ReadonlyMat2d} b The second matrix. + * @returns {Boolean} True if the matrices are equal, false otherwise. + */ +export function exactEquals(a: ReadonlyMat2d, b: ReadonlyMat2d): bool { + return ( + a[0] === b[0] && + a[1] === b[1] && + a[2] === b[2] && + a[3] === b[3] && + a[4] === b[4] && + a[5] === b[5] + ); +} + +/** + * Returns whether or not the matrices have approximately the same elements in the same position. + * + * @param {ReadonlyMat2d} a The first matrix. + * @param {ReadonlyMat2d} b The second matrix. + * @returns {Boolean} True if the matrices are equal, false otherwise. + */ +export function equals(a: ReadonlyMat2d, b: ReadonlyMat2d): bool { + let a0 = a[0], + a1 = a[1], + a2 = a[2], + a3 = a[3], + a4 = a[4], + a5 = a[5]; + let b0 = b[0], + b1 = b[1], + b2 = b[2], + b3 = b[3], + b4 = b[4], + b5 = b[5]; + return ( + Math.abs(a0 - b0) <= + glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a0), Math.abs(b0)) && + Math.abs(a1 - b1) <= + glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a1), Math.abs(b1)) && + Math.abs(a2 - b2) <= + glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a2), Math.abs(b2)) && + Math.abs(a3 - b3) <= + glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a3), Math.abs(b3)) && + Math.abs(a4 - b4) <= + glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a4), Math.abs(b4)) && + Math.abs(a5 - b5) <= + glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a5), Math.abs(b5)) + ); +} + +/** + * Alias for {@link mat2d.multiply} + * @function + */ +export const mul = multiply; + +/** + * Alias for {@link mat2d.subtract} + * @function + */ +export const sub = subtract; diff --git a/assembly/mat3.ts b/assembly/mat3.ts new file mode 100644 index 00000000..23b4776a --- /dev/null +++ b/assembly/mat3.ts @@ -0,0 +1,874 @@ +import * as glMatrix from "./common"; +import { MathUtil } from "./imports"; +import { ReadonlyMat2 } from "./mat2"; +import { ReadonlyMat4 } from "./mat4"; +import { ReadonlyVec2 } from "./vec2"; + +export class ReadonlyQuat extends Float64Array {} + +export class mat3 extends Float64Array {} + +export class ReadonlyMat3 extends mat3 {} + +/** + * 3x3 Matrix + * @module mat3 + */ + +/** + * Creates a new identity mat3 + * + * @returns {mat3} a new 3x3 matrix + */ +export function create(): mat3 { + let out = new mat3(9); + //if (glMatrix.ARRAY_TYPE != Float32Array): mat3 { + out[1] = 0; + out[2] = 0; + out[3] = 0; + out[5] = 0; + out[6] = 0; + out[7] = 0; + //} + out[0] = 1; + out[4] = 1; + out[8] = 1; + return out; +} + +/** + * Copies the upper-left 3x3 values into the given mat3. + * + * @param {mat3} out the receiving 3x3 matrix + * @param {ReadonlyMat4} a the source 4x4 matrix + * @returns {mat3} out + */ +export function fromMat4(out: mat3, a: ReadonlyMat4): mat3 { + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[4]; + out[4] = a[5]; + out[5] = a[6]; + out[6] = a[8]; + out[7] = a[9]; + out[8] = a[10]; + return out; +} + +/** + * Creates a new mat3 initialized with values from an existing matrix + * + * @param {ReadonlyMat3} a matrix to clone + * @returns {mat3} a new 3x3 matrix + */ +export function clone(a: ReadonlyMat3): mat3 { + let out = new mat3(9); + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[3]; + out[4] = a[4]; + out[5] = a[5]; + out[6] = a[6]; + out[7] = a[7]; + out[8] = a[8]; + return out; +} + +/** + * Copy the values from one mat3 to another + * + * @param {mat3} out the receiving matrix + * @param {ReadonlyMat3} a the source matrix + * @returns {mat3} out + */ +export function copy(out: mat3, a: ReadonlyMat3): mat3 { + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[3]; + out[4] = a[4]; + out[5] = a[5]; + out[6] = a[6]; + out[7] = a[7]; + out[8] = a[8]; + return out; +} + +/** + * Create a new mat3 with the given values + * + * @param {Number} m00 Component in column 0, row 0 position (index 0) + * @param {Number} m01 Component in column 0, row 1 position (index 1) + * @param {Number} m02 Component in column 0, row 2 position (index 2) + * @param {Number} m10 Component in column 1, row 0 position (index 3) + * @param {Number} m11 Component in column 1, row 1 position (index 4) + * @param {Number} m12 Component in column 1, row 2 position (index 5) + * @param {Number} m20 Component in column 2, row 0 position (index 6) + * @param {Number} m21 Component in column 2, row 1 position (index 7) + * @param {Number} m22 Component in column 2, row 2 position (index 8) + * @returns {mat3} A new mat3 + */ +export function fromValues(m00: f64, m01: f64, m02: f64, m10: f64, m11: f64, m12: f64, m20: f64, m21: f64, m22: f64): mat3 { + let out = new mat3(9); + out[0] = m00; + out[1] = m01; + out[2] = m02; + out[3] = m10; + out[4] = m11; + out[5] = m12; + out[6] = m20; + out[7] = m21; + out[8] = m22; + return out; +} + +/** + * Set the components of a mat3 to the given values + * + * @param {mat3} out the receiving matrix + * @param {Number} m00 Component in column 0, row 0 position (index 0) + * @param {Number} m01 Component in column 0, row 1 position (index 1) + * @param {Number} m02 Component in column 0, row 2 position (index 2) + * @param {Number} m10 Component in column 1, row 0 position (index 3) + * @param {Number} m11 Component in column 1, row 1 position (index 4) + * @param {Number} m12 Component in column 1, row 2 position (index 5) + * @param {Number} m20 Component in column 2, row 0 position (index 6) + * @param {Number} m21 Component in column 2, row 1 position (index 7) + * @param {Number} m22 Component in column 2, row 2 position (index 8) + * @returns {mat3} out + */ +export function set(out: mat3, m00: f64, m01: f64, m02: f64, m10: f64, m11: f64, m12: f64, m20: f64, m21: f64, m22: f64): mat3 { + out[0] = m00; + out[1] = m01; + out[2] = m02; + out[3] = m10; + out[4] = m11; + out[5] = m12; + out[6] = m20; + out[7] = m21; + out[8] = m22; + return out; +} + +/** + * Set a mat3 to the identity matrix + * + * @param {mat3} out the receiving matrix + * @returns {mat3} out + */ +export function identity(out: mat3): mat3 { + out[0] = 1; + out[1] = 0; + out[2] = 0; + out[3] = 0; + out[4] = 1; + out[5] = 0; + out[6] = 0; + out[7] = 0; + out[8] = 1; + return out; +} + +/** + * Transpose the values of a mat3 + * + * @param {mat3} out the receiving matrix + * @param {ReadonlyMat3} a the source matrix + * @returns {mat3} out + */ +export function transpose(out: mat3, a: ReadonlyMat3): mat3 { + // If we are transposing ourselves we can skip a few steps but have to cache some values + if (out === a) { + let a01 = a[1], + a02 = a[2], + a12 = a[5]; + out[1] = a[3]; + out[2] = a[6]; + out[3] = a01; + out[5] = a[7]; + out[6] = a02; + out[7] = a12; + } else { + out[0] = a[0]; + out[1] = a[3]; + out[2] = a[6]; + out[3] = a[1]; + out[4] = a[4]; + out[5] = a[7]; + out[6] = a[2]; + out[7] = a[5]; + out[8] = a[8]; + } + + return out; +} + +/** + * Inverts a mat3 + * + * @param {mat3} out the receiving matrix + * @param {ReadonlyMat3} a the source matrix + * @returns {mat3} out + */ +export function invert(out: mat3, a: ReadonlyMat3): mat3 | null { + let a00 = a[0], + a01 = a[1], + a02 = a[2]; + let a10 = a[3], + a11 = a[4], + a12 = a[5]; + let a20 = a[6], + a21 = a[7], + a22 = a[8]; + + let b01 = a22 * a11 - a12 * a21; + let b11 = -a22 * a10 + a12 * a20; + let b21 = a21 * a10 - a11 * a20; + + // Calculate the determinant + let det = a00 * b01 + a01 * b11 + a02 * b21; + + if (!det) { + return null; + } + det = 1.0 / det; + + out[0] = b01 * det; + out[1] = (-a22 * a01 + a02 * a21) * det; + out[2] = (a12 * a01 - a02 * a11) * det; + out[3] = b11 * det; + out[4] = (a22 * a00 - a02 * a20) * det; + out[5] = (-a12 * a00 + a02 * a10) * det; + out[6] = b21 * det; + out[7] = (-a21 * a00 + a01 * a20) * det; + out[8] = (a11 * a00 - a01 * a10) * det; + return out; +} + +/** + * Calculates the adjugate of a mat3 + * + * @param {mat3} out the receiving matrix + * @param {ReadonlyMat3} a the source matrix + * @returns {mat3} out + */ +export function adjoint(out: mat3, a: ReadonlyMat3): mat3 { + let a00 = a[0], + a01 = a[1], + a02 = a[2]; + let a10 = a[3], + a11 = a[4], + a12 = a[5]; + let a20 = a[6], + a21 = a[7], + a22 = a[8]; + + out[0] = a11 * a22 - a12 * a21; + out[1] = a02 * a21 - a01 * a22; + out[2] = a01 * a12 - a02 * a11; + out[3] = a12 * a20 - a10 * a22; + out[4] = a00 * a22 - a02 * a20; + out[5] = a02 * a10 - a00 * a12; + out[6] = a10 * a21 - a11 * a20; + out[7] = a01 * a20 - a00 * a21; + out[8] = a00 * a11 - a01 * a10; + return out; +} + +/** + * Calculates the determinant of a mat3 + * + * @param {ReadonlyMat3} a the source matrix + * @returns {Number} determinant of a + */ +export function determinant(a: ReadonlyMat3): f64 { + let a00 = a[0], + a01 = a[1], + a02 = a[2]; + let a10 = a[3], + a11 = a[4], + a12 = a[5]; + let a20 = a[6], + a21 = a[7], + a22 = a[8]; + + return ( + a00 * (a22 * a11 - a12 * a21) + + a01 * (-a22 * a10 + a12 * a20) + + a02 * (a21 * a10 - a11 * a20) + ); +} + +/** + * Multiplies two mat3's + * + * @param {mat3} out the receiving matrix + * @param {ReadonlyMat3} a the first operand + * @param {ReadonlyMat3} b the second operand + * @returns {mat3} out + */ +export function multiply(out: mat3, a: ReadonlyMat3, b: ReadonlyMat3): mat3 { + let a00 = a[0], + a01 = a[1], + a02 = a[2]; + let a10 = a[3], + a11 = a[4], + a12 = a[5]; + let a20 = a[6], + a21 = a[7], + a22 = a[8]; + + let b00 = b[0], + b01 = b[1], + b02 = b[2]; + let b10 = b[3], + b11 = b[4], + b12 = b[5]; + let b20 = b[6], + b21 = b[7], + b22 = b[8]; + + out[0] = b00 * a00 + b01 * a10 + b02 * a20; + out[1] = b00 * a01 + b01 * a11 + b02 * a21; + out[2] = b00 * a02 + b01 * a12 + b02 * a22; + + out[3] = b10 * a00 + b11 * a10 + b12 * a20; + out[4] = b10 * a01 + b11 * a11 + b12 * a21; + out[5] = b10 * a02 + b11 * a12 + b12 * a22; + + out[6] = b20 * a00 + b21 * a10 + b22 * a20; + out[7] = b20 * a01 + b21 * a11 + b22 * a21; + out[8] = b20 * a02 + b21 * a12 + b22 * a22; + return out; +} + +/** + * Translate a mat3 by the given vector + * + * @param {mat3} out the receiving matrix + * @param {ReadonlyMat3} a the matrix to translate + * @param {ReadonlyVec2} v vector to translate by + * @returns {mat3} out + */ +export function translate(out: mat3, a: ReadonlyMat3, v: ReadonlyVec2): mat3 { + let a00 = a[0], + a01 = a[1], + a02 = a[2], + a10 = a[3], + a11 = a[4], + a12 = a[5], + a20 = a[6], + a21 = a[7], + a22 = a[8], + x = v[0], + y = v[1]; + + out[0] = a00; + out[1] = a01; + out[2] = a02; + + out[3] = a10; + out[4] = a11; + out[5] = a12; + + out[6] = x * a00 + y * a10 + a20; + out[7] = x * a01 + y * a11 + a21; + out[8] = x * a02 + y * a12 + a22; + return out; +} + +/** + * Rotates a mat3 by the given angle + * + * @param {mat3} out the receiving matrix + * @param {ReadonlyMat3} a the matrix to rotate + * @param {Number} rad the angle to rotate the matrix by + * @returns {mat3} out + */ +export function rotate(out: mat3, a: ReadonlyMat3, rad: f64): mat3 { + let a00 = a[0], + a01 = a[1], + a02 = a[2], + a10 = a[3], + a11 = a[4], + a12 = a[5], + a20 = a[6], + a21 = a[7], + a22 = a[8], + s = Math.sin(rad), + c = Math.cos(rad); + + out[0] = c * a00 + s * a10; + out[1] = c * a01 + s * a11; + out[2] = c * a02 + s * a12; + + out[3] = c * a10 - s * a00; + out[4] = c * a11 - s * a01; + out[5] = c * a12 - s * a02; + + out[6] = a20; + out[7] = a21; + out[8] = a22; + return out; +} + +/** + * Scales the mat3 by the dimensions in the given vec2 + * + * @param {mat3} out the receiving matrix + * @param {ReadonlyMat3} a the matrix to rotate + * @param {ReadonlyVec2} v the vec2 to scale the matrix by + * @returns {mat3} out + **/ +export function scale(out: mat3, a: ReadonlyMat3, v: ReadonlyVec2): mat3 { + let x = v[0], + y = v[1]; + + out[0] = x * a[0]; + out[1] = x * a[1]; + out[2] = x * a[2]; + + out[3] = y * a[3]; + out[4] = y * a[4]; + out[5] = y * a[5]; + + out[6] = a[6]; + out[7] = a[7]; + out[8] = a[8]; + return out; +} + +/** + * Creates a matrix from a vector translation + * This is equivalent to (but much faster than): + * + * mat3.identity(dest); + * mat3.translate(dest, dest, vec); + * + * @param {mat3} out mat3 receiving operation result + * @param {ReadonlyVec2} v Translation vector + * @returns {mat3} out + */ +export function fromTranslation(out: mat3, v: ReadonlyVec2): mat3 { + out[0] = 1; + out[1] = 0; + out[2] = 0; + out[3] = 0; + out[4] = 1; + out[5] = 0; + out[6] = v[0]; + out[7] = v[1]; + out[8] = 1; + return out; +} + +/** + * Creates a matrix from a given angle + * This is equivalent to (but much faster than): + * + * mat3.identity(dest); + * mat3.rotate(dest, dest, rad); + * + * @param {mat3} out mat3 receiving operation result + * @param {Number} rad the angle to rotate the matrix by + * @returns {mat3} out + */ +export function fromRotation(out: mat3, rad: f64): mat3 { + let s = Math.sin(rad), + c = Math.cos(rad); + + out[0] = c; + out[1] = s; + out[2] = 0; + + out[3] = -s; + out[4] = c; + out[5] = 0; + + out[6] = 0; + out[7] = 0; + out[8] = 1; + return out; +} + +/** + * Creates a matrix from a vector scaling + * This is equivalent to (but much faster than): + * + * mat3.identity(dest); + * mat3.scale(dest, dest, vec); + * + * @param {mat3} out mat3 receiving operation result + * @param {ReadonlyVec2} v Scaling vector + * @returns {mat3} out + */ +export function fromScaling(out: mat3, v: ReadonlyMat3): mat3 { + out[0] = v[0]; + out[1] = 0; + out[2] = 0; + + out[3] = 0; + out[4] = v[1]; + out[5] = 0; + + out[6] = 0; + out[7] = 0; + out[8] = 1; + return out; +} + +/** + * Copies the values from a mat2d into a mat3 + * + * @param {mat3} out the receiving matrix + * @param {ReadonlyMat2d} a the matrix to copy + * @returns {mat3} out + **/ +export function fromMat2d(out: mat3, a: ReadonlyMat2): mat3 { + out[0] = a[0]; + out[1] = a[1]; + out[2] = 0; + + out[3] = a[2]; + out[4] = a[3]; + out[5] = 0; + + out[6] = a[4]; + out[7] = a[5]; + out[8] = 1; + return out; +} + +/** + * Calculates a 3x3 matrix from the given quaternion + * + * @param {mat3} out mat3 receiving operation result + * @param {ReadonlyQuat} q Quaternion to create matrix from + * + * @returns {mat3} out + */ +export function fromQuat(out: mat3, q: ReadonlyQuat): mat3 { + let x = q[0], + y = q[1], + z = q[2], + w = q[3]; + let x2 = x + x; + let y2 = y + y; + let z2 = z + z; + + let xx = x * x2; + let yx = y * x2; + let yy = y * y2; + let zx = z * x2; + let zy = z * y2; + let zz = z * z2; + let wx = w * x2; + let wy = w * y2; + let wz = w * z2; + + out[0] = 1 - yy - zz; + out[3] = yx - wz; + out[6] = zx + wy; + + out[1] = yx + wz; + out[4] = 1 - xx - zz; + out[7] = zy - wx; + + out[2] = zx - wy; + out[5] = zy + wx; + out[8] = 1 - xx - yy; + + return out; +} + +/** + * Calculates a 3x3 normal matrix (transpose inverse) from the 4x4 matrix + * + * @param {mat3} out mat3 receiving operation result + * @param {ReadonlyMat4} a Mat4 to derive the normal matrix from + * + * @returns {mat3} out + */ +export function normalFromMat4(out: mat3, a: ReadonlyMat4): mat3 | null { + let a00 = a[0], + a01 = a[1], + a02 = a[2], + a03 = a[3]; + let a10 = a[4], + a11 = a[5], + a12 = a[6], + a13 = a[7]; + let a20 = a[8], + a21 = a[9], + a22 = a[10], + a23 = a[11]; + let a30 = a[12], + a31 = a[13], + a32 = a[14], + a33 = a[15]; + + let b00 = a00 * a11 - a01 * a10; + let b01 = a00 * a12 - a02 * a10; + let b02 = a00 * a13 - a03 * a10; + let b03 = a01 * a12 - a02 * a11; + let b04 = a01 * a13 - a03 * a11; + let b05 = a02 * a13 - a03 * a12; + let b06 = a20 * a31 - a21 * a30; + let b07 = a20 * a32 - a22 * a30; + let b08 = a20 * a33 - a23 * a30; + let b09 = a21 * a32 - a22 * a31; + let b10 = a21 * a33 - a23 * a31; + let b11 = a22 * a33 - a23 * a32; + + // Calculate the determinant + let det = + b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06; + + if (!det) { + return null; + } + det = 1.0 / det; + + out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det; + out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det; + out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det; + + out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det; + out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det; + out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det; + + out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det; + out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det; + out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det; + + return out; +} + +/** + * Generates a 2D projection matrix with the given bounds + * + * @param {mat3} out mat3 frustum matrix will be written into + * @param {number} width Width of your gl context + * @param {number} height Height of gl context + * @returns {mat3} out + */ +export function projection(out: mat3, width: f64, height: f64): mat3 { + out[0] = 2 / width; + out[1] = 0; + out[2] = 0; + out[3] = 0; + out[4] = -2 / height; + out[5] = 0; + out[6] = -1; + out[7] = 1; + out[8] = 1; + return out; +} + +/** + * Returns a string representation of a mat3 + * + * @param {ReadonlyMat3} a matrix to represent as a string + * @returns {String} string representation of the matrix + */ +export function str(a: ReadonlyMat3): string { + return ( + "mat3(" + + a[0].toString() + + ", " + + a[1].toString() + + ", " + + a[2].toString() + + ", " + + a[3].toString() + + ", " + + a[4].toString() + + ", " + + a[5].toString() + + ", " + + a[6].toString() + + ", " + + a[7].toString() + + ", " + + a[8].toString() + + ")" + ); +} + +/** + * Returns Frobenius norm of a mat3 + * + * @param {ReadonlyMat3} a the matrix to calculate Frobenius norm of + * @returns {Number} Frobenius norm + */ +export function frob(a: ReadonlyMat3): f64 { + return MathUtil.hypot(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8]); +} + +/** + * Adds two mat3's + * + * @param {mat3} out the receiving matrix + * @param {ReadonlyMat3} a the first operand + * @param {ReadonlyMat3} b the second operand + * @returns {mat3} out + */ +export function add(out: mat3, a: ReadonlyMat3, b: ReadonlyMat3): mat3 { + out[0] = a[0] + b[0]; + out[1] = a[1] + b[1]; + out[2] = a[2] + b[2]; + out[3] = a[3] + b[3]; + out[4] = a[4] + b[4]; + out[5] = a[5] + b[5]; + out[6] = a[6] + b[6]; + out[7] = a[7] + b[7]; + out[8] = a[8] + b[8]; + return out; +} + +/** + * Subtracts matrix b from matrix a + * + * @param {mat3} out the receiving matrix + * @param {ReadonlyMat3} a the first operand + * @param {ReadonlyMat3} b the second operand + * @returns {mat3} out + */ +export function subtract(out: mat3, a: ReadonlyMat3, b: ReadonlyMat3): mat3 { + out[0] = a[0] - b[0]; + out[1] = a[1] - b[1]; + out[2] = a[2] - b[2]; + out[3] = a[3] - b[3]; + out[4] = a[4] - b[4]; + out[5] = a[5] - b[5]; + out[6] = a[6] - b[6]; + out[7] = a[7] - b[7]; + out[8] = a[8] - b[8]; + return out; +} + +/** + * Multiply each element of the matrix by a scalar. + * + * @param {mat3} out the receiving matrix + * @param {ReadonlyMat3} a the matrix to scale + * @param {Number} b amount to scale the matrix's elements by + * @returns {mat3} out + */ +export function multiplyScalar(out: mat3, a: ReadonlyMat3, b: f64): mat3 { + out[0] = a[0] * b; + out[1] = a[1] * b; + out[2] = a[2] * b; + out[3] = a[3] * b; + out[4] = a[4] * b; + out[5] = a[5] * b; + out[6] = a[6] * b; + out[7] = a[7] * b; + out[8] = a[8] * b; + return out; +} + +/** + * Adds two mat3's after multiplying each element of the second operand by a scalar value. + * + * @param {mat3} out the receiving vector + * @param {ReadonlyMat3} a the first operand + * @param {ReadonlyMat3} b the second operand + * @param {Number} scale the amount to scale b's elements by before adding + * @returns {mat3} out + */ +export function multiplyScalarAndAdd(out: mat3, a: ReadonlyMat3, b: ReadonlyMat3, scale: f64): mat3 { + out[0] = a[0] + b[0] * scale; + out[1] = a[1] + b[1] * scale; + out[2] = a[2] + b[2] * scale; + out[3] = a[3] + b[3] * scale; + out[4] = a[4] + b[4] * scale; + out[5] = a[5] + b[5] * scale; + out[6] = a[6] + b[6] * scale; + out[7] = a[7] + b[7] * scale; + out[8] = a[8] + b[8] * scale; + return out; +} + +/** + * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===) + * + * @param {ReadonlyMat3} a The first matrix. + * @param {ReadonlyMat3} b The second matrix. + * @returns {Boolean} True if the matrices are equal, false otherwise. + */ +export function exactEquals(a: ReadonlyMat3, b: ReadonlyMat3): bool { + return ( + a[0] === b[0] && + a[1] === b[1] && + a[2] === b[2] && + a[3] === b[3] && + a[4] === b[4] && + a[5] === b[5] && + a[6] === b[6] && + a[7] === b[7] && + a[8] === b[8] + ); +} + +/** + * Returns whether or not the matrices have approximately the same elements in the same position. + * + * @param {ReadonlyMat3} a The first matrix. + * @param {ReadonlyMat3} b The second matrix. + * @returns {Boolean} True if the matrices are equal, false otherwise. + */ +export function equals(a: ReadonlyMat3, b: ReadonlyMat3): bool { + let a0 = a[0], + a1 = a[1], + a2 = a[2], + a3 = a[3], + a4 = a[4], + a5 = a[5], + a6 = a[6], + a7 = a[7], + a8 = a[8]; + let b0 = b[0], + b1 = b[1], + b2 = b[2], + b3 = b[3], + b4 = b[4], + b5 = b[5], + b6 = b[6], + b7 = b[7], + b8 = b[8]; + return ( + Math.abs(a0 - b0) <= + glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a0), Math.abs(b0)) && + Math.abs(a1 - b1) <= + glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a1), Math.abs(b1)) && + Math.abs(a2 - b2) <= + glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a2), Math.abs(b2)) && + Math.abs(a3 - b3) <= + glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a3), Math.abs(b3)) && + Math.abs(a4 - b4) <= + glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a4), Math.abs(b4)) && + Math.abs(a5 - b5) <= + glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a5), Math.abs(b5)) && + Math.abs(a6 - b6) <= + glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a6), Math.abs(b6)) && + Math.abs(a7 - b7) <= + glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a7), Math.abs(b7)) && + Math.abs(a8 - b8) <= + glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a8), Math.abs(b8)) + ); +} + +/** + * Alias for {@link mat3.multiply} + * @function + */ +export const mul = multiply; + +/** + * Alias for {@link mat3.subtract} + * @function + */ +export const sub = subtract; diff --git a/assembly/mat4.ts b/assembly/mat4.ts new file mode 100644 index 00000000..18a6fa82 --- /dev/null +++ b/assembly/mat4.ts @@ -0,0 +1,2201 @@ +import * as glMatrix from "./common"; +import { MathUtil } from "./imports"; +import * as quat from "./quat"; +import { ReadonlyQuat2 } from "./quat2"; +import * as vec3 from "./vec3"; + +export class quat4 extends quat.quat {} + +export class mat4 extends Float64Array {} + +export class ReadonlyMat4 extends mat4 {} + +/** + * Object containing the following values: upDegrees, downDegrees, leftDegrees, rightDegrees + */ +export class Fov { + upDegrees: f64; + downDegrees: f64; + leftDegrees: f64; + rightDegrees: f64; + [key: string]: f64; +} + +/** + * 4x4 Matrix
Format: column-major, when typed out it looks like row-major
The matrices are being post multiplied. + * @module mat4 + */ + +/** + * Creates a new identity mat4 + * + * @returns {mat4} a new 4x4 matrix + */ +export function create(): mat4 { + let out = new mat4(16); + //if (glMatrix.ARRAY_TYPE != Float32Array) { + out[1] = 0; + out[2] = 0; + out[3] = 0; + out[4] = 0; + out[6] = 0; + out[7] = 0; + out[8] = 0; + out[9] = 0; + out[11] = 0; + out[12] = 0; + out[13] = 0; + out[14] = 0; + //} + out[0] = 1; + out[5] = 1; + out[10] = 1; + out[15] = 1; + return out; +} + +/** + * Creates a new mat4 initialized with values from an existing matrix + * + * @param {ReadonlyMat4} a matrix to clone + * @returns {mat4} a new 4x4 matrix + */ +export function clone(a: ReadonlyMat4): mat4 { + let out = new mat4(16); + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[3]; + out[4] = a[4]; + out[5] = a[5]; + out[6] = a[6]; + out[7] = a[7]; + out[8] = a[8]; + out[9] = a[9]; + out[10] = a[10]; + out[11] = a[11]; + out[12] = a[12]; + out[13] = a[13]; + out[14] = a[14]; + out[15] = a[15]; + return out; +} + +/** + * Copy the values from one mat4 to another + * + * @param {mat4} out the receiving matrix + * @param {ReadonlyMat4} a the source matrix + * @returns {mat4} out + */ +export function copy(out: mat4, a: ReadonlyMat4): mat4 { + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[3]; + out[4] = a[4]; + out[5] = a[5]; + out[6] = a[6]; + out[7] = a[7]; + out[8] = a[8]; + out[9] = a[9]; + out[10] = a[10]; + out[11] = a[11]; + out[12] = a[12]; + out[13] = a[13]; + out[14] = a[14]; + out[15] = a[15]; + return out; +} + +/** + * Create a new mat4 with the given values + * + * @param {Number} m00 Component in column 0, row 0 position (index 0) + * @param {Number} m01 Component in column 0, row 1 position (index 1) + * @param {Number} m02 Component in column 0, row 2 position (index 2) + * @param {Number} m03 Component in column 0, row 3 position (index 3) + * @param {Number} m10 Component in column 1, row 0 position (index 4) + * @param {Number} m11 Component in column 1, row 1 position (index 5) + * @param {Number} m12 Component in column 1, row 2 position (index 6) + * @param {Number} m13 Component in column 1, row 3 position (index 7) + * @param {Number} m20 Component in column 2, row 0 position (index 8) + * @param {Number} m21 Component in column 2, row 1 position (index 9) + * @param {Number} m22 Component in column 2, row 2 position (index 10) + * @param {Number} m23 Component in column 2, row 3 position (index 11) + * @param {Number} m30 Component in column 3, row 0 position (index 12) + * @param {Number} m31 Component in column 3, row 1 position (index 13) + * @param {Number} m32 Component in column 3, row 2 position (index 14) + * @param {Number} m33 Component in column 3, row 3 position (index 15) + * @returns {mat4} A new mat4 + */ +export function fromValues( + m00: f64, + m01: f64, + m02: f64, + m03: f64, + m10: f64, + m11: f64, + m12: f64, + m13: f64, + m20: f64, + m21: f64, + m22: f64, + m23: f64, + m30: f64, + m31: f64, + m32: f64, + m33: f64 +): mat4 { + let out = new mat4(16); + out[0] = m00; + out[1] = m01; + out[2] = m02; + out[3] = m03; + out[4] = m10; + out[5] = m11; + out[6] = m12; + out[7] = m13; + out[8] = m20; + out[9] = m21; + out[10] = m22; + out[11] = m23; + out[12] = m30; + out[13] = m31; + out[14] = m32; + out[15] = m33; + return out; +} + +/** + * Set the components of a mat4 to the given values + * + * @param {mat4} out the receiving matrix + * @param {Number} m00 Component in column 0, row 0 position (index 0) + * @param {Number} m01 Component in column 0, row 1 position (index 1) + * @param {Number} m02 Component in column 0, row 2 position (index 2) + * @param {Number} m03 Component in column 0, row 3 position (index 3) + * @param {Number} m10 Component in column 1, row 0 position (index 4) + * @param {Number} m11 Component in column 1, row 1 position (index 5) + * @param {Number} m12 Component in column 1, row 2 position (index 6) + * @param {Number} m13 Component in column 1, row 3 position (index 7) + * @param {Number} m20 Component in column 2, row 0 position (index 8) + * @param {Number} m21 Component in column 2, row 1 position (index 9) + * @param {Number} m22 Component in column 2, row 2 position (index 10) + * @param {Number} m23 Component in column 2, row 3 position (index 11) + * @param {Number} m30 Component in column 3, row 0 position (index 12) + * @param {Number} m31 Component in column 3, row 1 position (index 13) + * @param {Number} m32 Component in column 3, row 2 position (index 14) + * @param {Number} m33 Component in column 3, row 3 position (index 15) + * @returns {mat4} out + */ +export function set( + out: mat4, + m00: f64, + m01: f64, + m02: f64, + m03: f64, + m10: f64, + m11: f64, + m12: f64, + m13: f64, + m20: f64, + m21: f64, + m22: f64, + m23: f64, + m30: f64, + m31: f64, + m32: f64, + m33: f64 +): mat4 { + out[0] = m00; + out[1] = m01; + out[2] = m02; + out[3] = m03; + out[4] = m10; + out[5] = m11; + out[6] = m12; + out[7] = m13; + out[8] = m20; + out[9] = m21; + out[10] = m22; + out[11] = m23; + out[12] = m30; + out[13] = m31; + out[14] = m32; + out[15] = m33; + return out; +} + +/** + * Set a mat4 to the identity matrix + * + * @param {mat4} out the receiving matrix + * @returns {mat4} out + */ +export function identity(out: mat4): mat4 { + out[0] = 1; + out[1] = 0; + out[2] = 0; + out[3] = 0; + out[4] = 0; + out[5] = 1; + out[6] = 0; + out[7] = 0; + out[8] = 0; + out[9] = 0; + out[10] = 1; + out[11] = 0; + out[12] = 0; + out[13] = 0; + out[14] = 0; + out[15] = 1; + return out; +} + +/** + * Transpose the values of a mat4 + * + * @param {mat4} out the receiving matrix + * @param {ReadonlyMat4} a the source matrix + * @returns {mat4} out + */ +export function transpose(out: mat4, a: ReadonlyMat4): mat4 { + // If we are transposing ourselves we can skip a few steps but have to cache some values + if (out === a) { + let a01 = a[1], + a02 = a[2], + a03 = a[3]; + let a12 = a[6], + a13 = a[7]; + let a23 = a[11]; + + out[1] = a[4]; + out[2] = a[8]; + out[3] = a[12]; + out[4] = a01; + out[6] = a[9]; + out[7] = a[13]; + out[8] = a02; + out[9] = a12; + out[11] = a[14]; + out[12] = a03; + out[13] = a13; + out[14] = a23; + } else { + out[0] = a[0]; + out[1] = a[4]; + out[2] = a[8]; + out[3] = a[12]; + out[4] = a[1]; + out[5] = a[5]; + out[6] = a[9]; + out[7] = a[13]; + out[8] = a[2]; + out[9] = a[6]; + out[10] = a[10]; + out[11] = a[14]; + out[12] = a[3]; + out[13] = a[7]; + out[14] = a[11]; + out[15] = a[15]; + } + + return out; +} + +/** + * Inverts a mat4 + * + * @param {mat4} out the receiving matrix + * @param {ReadonlyMat4} a the source matrix + * @returns {mat4} out + */ +export function invert(out: mat4, a: ReadonlyMat4): mat4 | null { + let a00 = a[0], + a01 = a[1], + a02 = a[2], + a03 = a[3]; + let a10 = a[4], + a11 = a[5], + a12 = a[6], + a13 = a[7]; + let a20 = a[8], + a21 = a[9], + a22 = a[10], + a23 = a[11]; + let a30 = a[12], + a31 = a[13], + a32 = a[14], + a33 = a[15]; + + let b00 = a00 * a11 - a01 * a10; + let b01 = a00 * a12 - a02 * a10; + let b02 = a00 * a13 - a03 * a10; + let b03 = a01 * a12 - a02 * a11; + let b04 = a01 * a13 - a03 * a11; + let b05 = a02 * a13 - a03 * a12; + let b06 = a20 * a31 - a21 * a30; + let b07 = a20 * a32 - a22 * a30; + let b08 = a20 * a33 - a23 * a30; + let b09 = a21 * a32 - a22 * a31; + let b10 = a21 * a33 - a23 * a31; + let b11 = a22 * a33 - a23 * a32; + + // Calculate the determinant + let det = + b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06; + + if (!det) { + return null; + } + det = 1.0 / det; + + out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det; + out[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det; + out[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det; + out[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det; + out[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det; + out[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det; + out[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det; + out[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det; + out[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det; + out[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det; + out[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det; + out[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det; + out[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det; + out[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det; + out[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det; + out[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det; + + return out; +} + +/** + * Calculates the adjugate of a mat4 + * + * @param {mat4} out the receiving matrix + * @param {ReadonlyMat4} a the source matrix + * @returns {mat4} out + */ +export function adjoint(out: mat4, a: ReadonlyMat4): mat4 { + let a00 = a[0], + a01 = a[1], + a02 = a[2], + a03 = a[3]; + let a10 = a[4], + a11 = a[5], + a12 = a[6], + a13 = a[7]; + let a20 = a[8], + a21 = a[9], + a22 = a[10], + a23 = a[11]; + let a30 = a[12], + a31 = a[13], + a32 = a[14], + a33 = a[15]; + + let b00 = a00 * a11 - a01 * a10; + let b01 = a00 * a12 - a02 * a10; + let b02 = a00 * a13 - a03 * a10; + let b03 = a01 * a12 - a02 * a11; + let b04 = a01 * a13 - a03 * a11; + let b05 = a02 * a13 - a03 * a12; + let b06 = a20 * a31 - a21 * a30; + let b07 = a20 * a32 - a22 * a30; + let b08 = a20 * a33 - a23 * a30; + let b09 = a21 * a32 - a22 * a31; + let b10 = a21 * a33 - a23 * a31; + let b11 = a22 * a33 - a23 * a32; + + out[0] = a11 * b11 - a12 * b10 + a13 * b09; + out[1] = a02 * b10 - a01 * b11 - a03 * b09; + out[2] = a31 * b05 - a32 * b04 + a33 * b03; + out[3] = a22 * b04 - a21 * b05 - a23 * b03; + out[4] = a12 * b08 - a10 * b11 - a13 * b07; + out[5] = a00 * b11 - a02 * b08 + a03 * b07; + out[6] = a32 * b02 - a30 * b05 - a33 * b01; + out[7] = a20 * b05 - a22 * b02 + a23 * b01; + out[8] = a10 * b10 - a11 * b08 + a13 * b06; + out[9] = a01 * b08 - a00 * b10 - a03 * b06; + out[10] = a30 * b04 - a31 * b02 + a33 * b00; + out[11] = a21 * b02 - a20 * b04 - a23 * b00; + out[12] = a11 * b07 - a10 * b09 - a12 * b06; + out[13] = a00 * b09 - a01 * b07 + a02 * b06; + out[14] = a31 * b01 - a30 * b03 - a32 * b00; + out[15] = a20 * b03 - a21 * b01 + a22 * b00; + return out; +} + +/** + * Calculates the determinant of a mat4 + * + * @param {ReadonlyMat4} a the source matrix + * @returns {Number} determinant of a + */ +export function determinant(a: ReadonlyMat4): f64 { + let a00 = a[0], + a01 = a[1], + a02 = a[2], + a03 = a[3]; + let a10 = a[4], + a11 = a[5], + a12 = a[6], + a13 = a[7]; + let a20 = a[8], + a21 = a[9], + a22 = a[10], + a23 = a[11]; + let a30 = a[12], + a31 = a[13], + a32 = a[14], + a33 = a[15]; + + let b0 = a00 * a11 - a01 * a10; + let b1 = a00 * a12 - a02 * a10; + let b2 = a01 * a12 - a02 * a11; + let b3 = a20 * a31 - a21 * a30; + let b4 = a20 * a32 - a22 * a30; + let b5 = a21 * a32 - a22 * a31; + let b6 = a00 * b5 - a01 * b4 + a02 * b3; + let b7 = a10 * b5 - a11 * b4 + a12 * b3; + let b8 = a20 * b2 - a21 * b1 + a22 * b0; + let b9 = a30 * b2 - a31 * b1 + a32 * b0; + + // Calculate the determinant + return a13 * b6 - a03 * b7 + a33 * b8 - a23 * b9; +} + +/** + * Multiplies two mat4s + * + * @param {mat4} out the receiving matrix + * @param {ReadonlyMat4} a the first operand + * @param {ReadonlyMat4} b the second operand + * @returns {mat4} out + */ +export function multiply(out: mat4, a: ReadonlyMat4, b: ReadonlyMat4): mat4 { + let a00 = a[0], + a01 = a[1], + a02 = a[2], + a03 = a[3]; + let a10 = a[4], + a11 = a[5], + a12 = a[6], + a13 = a[7]; + let a20 = a[8], + a21 = a[9], + a22 = a[10], + a23 = a[11]; + let a30 = a[12], + a31 = a[13], + a32 = a[14], + a33 = a[15]; + + // Cache only the current line of the second matrix + let b0 = b[0], + b1 = b[1], + b2 = b[2], + b3 = b[3]; + out[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; + out[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; + out[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; + out[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; + + b0 = b[4]; + b1 = b[5]; + b2 = b[6]; + b3 = b[7]; + out[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; + out[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; + out[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; + out[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; + + b0 = b[8]; + b1 = b[9]; + b2 = b[10]; + b3 = b[11]; + out[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; + out[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; + out[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; + out[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; + + b0 = b[12]; + b1 = b[13]; + b2 = b[14]; + b3 = b[15]; + out[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; + out[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; + out[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; + out[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; + return out; +} + +/** + * Translate a mat4 by the given vector + * + * @param {mat4} out the receiving matrix + * @param {ReadonlyMat4} a the matrix to translate + * @param {ReadonlyVec3} v vector to translate by + * @returns {mat4} out + */ +export function translate(out: mat4, a: ReadonlyMat4, v: vec3.ReadonlyVec3): mat4 { + let x = v[0], + y = v[1], + z = v[2]; + let a00: f64, a01: f64, a02: f64, a03: f64; + let a10: f64, a11: f64, a12: f64, a13: f64; + let a20: f64, a21: f64, a22: f64, a23: f64; + + if (a === out) { + out[12] = a[0] * x + a[4] * y + a[8] * z + a[12]; + out[13] = a[1] * x + a[5] * y + a[9] * z + a[13]; + out[14] = a[2] * x + a[6] * y + a[10] * z + a[14]; + out[15] = a[3] * x + a[7] * y + a[11] * z + a[15]; + } else { + a00 = a[0]; + a01 = a[1]; + a02 = a[2]; + a03 = a[3]; + a10 = a[4]; + a11 = a[5]; + a12 = a[6]; + a13 = a[7]; + a20 = a[8]; + a21 = a[9]; + a22 = a[10]; + a23 = a[11]; + + out[0] = a00; + out[1] = a01; + out[2] = a02; + out[3] = a03; + out[4] = a10; + out[5] = a11; + out[6] = a12; + out[7] = a13; + out[8] = a20; + out[9] = a21; + out[10] = a22; + out[11] = a23; + + out[12] = a00 * x + a10 * y + a20 * z + a[12]; + out[13] = a01 * x + a11 * y + a21 * z + a[13]; + out[14] = a02 * x + a12 * y + a22 * z + a[14]; + out[15] = a03 * x + a13 * y + a23 * z + a[15]; + } + + return out; +} + +/** + * Scales the mat4 by the dimensions in the given vec3 not using vectorization + * + * @param {mat4} out the receiving matrix + * @param {ReadonlyMat4} a the matrix to scale + * @param {ReadonlyVec3} v the vec3 to scale the matrix by + * @returns {mat4} out + **/ +export function scale(out: mat4, a: ReadonlyMat4, v: vec3.ReadonlyVec3): mat4 { + let x = v[0], + y = v[1], + z = v[2]; + + out[0] = a[0] * x; + out[1] = a[1] * x; + out[2] = a[2] * x; + out[3] = a[3] * x; + out[4] = a[4] * y; + out[5] = a[5] * y; + out[6] = a[6] * y; + out[7] = a[7] * y; + out[8] = a[8] * z; + out[9] = a[9] * z; + out[10] = a[10] * z; + out[11] = a[11] * z; + out[12] = a[12]; + out[13] = a[13]; + out[14] = a[14]; + out[15] = a[15]; + return out; +} + +/** + * Rotates a mat4 by the given angle around the given axis + * + * @param {mat4} out the receiving matrix + * @param {ReadonlyMat4} a the matrix to rotate + * @param {Number} rad the angle to rotate the matrix by + * @param {ReadonlyVec3} axis the axis to rotate around + * @returns {mat4} out + */ +export function rotate(out: mat4, a: ReadonlyMat4, rad: f64, axis: vec3.ReadonlyVec3): mat4 | null { + let x = axis[0], + y = axis[1], + z = axis[2]; + let len = MathUtil.hypot(x, y, z); + let s: f64, c: f64, t: f64; + let a00: f64, a01: f64, a02: f64, a03: f64; + let a10: f64, a11: f64, a12: f64, a13: f64; + let a20: f64, a21: f64, a22: f64, a23: f64; + let b00: f64, b01: f64, b02: f64; + let b10: f64, b11: f64, b12: f64; + let b20: f64, b21: f64, b22: f64; + + if (len < glMatrix.EPSILON) { + return null; + } + + len = 1 / len; + x *= len; + y *= len; + z *= len; + + s = Math.sin(rad); + c = Math.cos(rad); + t = 1 - c; + + a00 = a[0]; + a01 = a[1]; + a02 = a[2]; + a03 = a[3]; + a10 = a[4]; + a11 = a[5]; + a12 = a[6]; + a13 = a[7]; + a20 = a[8]; + a21 = a[9]; + a22 = a[10]; + a23 = a[11]; + + // Construct the elements of the rotation matrix + b00 = x * x * t + c; + b01 = y * x * t + z * s; + b02 = z * x * t - y * s; + b10 = x * y * t - z * s; + b11 = y * y * t + c; + b12 = z * y * t + x * s; + b20 = x * z * t + y * s; + b21 = y * z * t - x * s; + b22 = z * z * t + c; + + // Perform rotation-specific matrix multiplication + out[0] = a00 * b00 + a10 * b01 + a20 * b02; + out[1] = a01 * b00 + a11 * b01 + a21 * b02; + out[2] = a02 * b00 + a12 * b01 + a22 * b02; + out[3] = a03 * b00 + a13 * b01 + a23 * b02; + out[4] = a00 * b10 + a10 * b11 + a20 * b12; + out[5] = a01 * b10 + a11 * b11 + a21 * b12; + out[6] = a02 * b10 + a12 * b11 + a22 * b12; + out[7] = a03 * b10 + a13 * b11 + a23 * b12; + out[8] = a00 * b20 + a10 * b21 + a20 * b22; + out[9] = a01 * b20 + a11 * b21 + a21 * b22; + out[10] = a02 * b20 + a12 * b21 + a22 * b22; + out[11] = a03 * b20 + a13 * b21 + a23 * b22; + + if (a !== out) { + // If the source and destination differ, copy the unchanged last row + out[12] = a[12]; + out[13] = a[13]; + out[14] = a[14]; + out[15] = a[15]; + } + return out; +} + +/** + * Rotates a matrix by the given angle around the X axis + * + * @param {mat4} out the receiving matrix + * @param {ReadonlyMat4} a the matrix to rotate + * @param {Number} rad the angle to rotate the matrix by + * @returns {mat4} out + */ +export function rotateX(out: mat4, a: ReadonlyMat4, rad: f64): mat4 { + let s = Math.sin(rad); + let c = Math.cos(rad); + let a10 = a[4]; + let a11 = a[5]; + let a12 = a[6]; + let a13 = a[7]; + let a20 = a[8]; + let a21 = a[9]; + let a22 = a[10]; + let a23 = a[11]; + + if (a !== out) { + // If the source and destination differ, copy the unchanged rows + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[3]; + out[12] = a[12]; + out[13] = a[13]; + out[14] = a[14]; + out[15] = a[15]; + } + + // Perform axis-specific matrix multiplication + out[4] = a10 * c + a20 * s; + out[5] = a11 * c + a21 * s; + out[6] = a12 * c + a22 * s; + out[7] = a13 * c + a23 * s; + out[8] = a20 * c - a10 * s; + out[9] = a21 * c - a11 * s; + out[10] = a22 * c - a12 * s; + out[11] = a23 * c - a13 * s; + return out; +} + +/** + * Rotates a matrix by the given angle around the Y axis + * + * @param {mat4} out the receiving matrix + * @param {ReadonlyMat4} a the matrix to rotate + * @param {Number} rad the angle to rotate the matrix by + * @returns {mat4} out + */ +export function rotateY(out: mat4, a: ReadonlyMat4, rad: f64): mat4 { + let s = Math.sin(rad); + let c = Math.cos(rad); + let a00 = a[0]; + let a01 = a[1]; + let a02 = a[2]; + let a03 = a[3]; + let a20 = a[8]; + let a21 = a[9]; + let a22 = a[10]; + let a23 = a[11]; + + if (a !== out) { + // If the source and destination differ, copy the unchanged rows + out[4] = a[4]; + out[5] = a[5]; + out[6] = a[6]; + out[7] = a[7]; + out[12] = a[12]; + out[13] = a[13]; + out[14] = a[14]; + out[15] = a[15]; + } + + // Perform axis-specific matrix multiplication + out[0] = a00 * c - a20 * s; + out[1] = a01 * c - a21 * s; + out[2] = a02 * c - a22 * s; + out[3] = a03 * c - a23 * s; + out[8] = a00 * s + a20 * c; + out[9] = a01 * s + a21 * c; + out[10] = a02 * s + a22 * c; + out[11] = a03 * s + a23 * c; + return out; +} + +/** + * Rotates a matrix by the given angle around the Z axis + * + * @param {mat4} out the receiving matrix + * @param {ReadonlyMat4} a the matrix to rotate + * @param {Number} rad the angle to rotate the matrix by + * @returns {mat4} out + */ +export function rotateZ(out: mat4, a: ReadonlyMat4, rad: f64): mat4 { + let s = Math.sin(rad); + let c = Math.cos(rad); + let a00 = a[0]; + let a01 = a[1]; + let a02 = a[2]; + let a03 = a[3]; + let a10 = a[4]; + let a11 = a[5]; + let a12 = a[6]; + let a13 = a[7]; + + if (a !== out) { + // If the source and destination differ, copy the unchanged last row + out[8] = a[8]; + out[9] = a[9]; + out[10] = a[10]; + out[11] = a[11]; + out[12] = a[12]; + out[13] = a[13]; + out[14] = a[14]; + out[15] = a[15]; + } + + // Perform axis-specific matrix multiplication + out[0] = a00 * c + a10 * s; + out[1] = a01 * c + a11 * s; + out[2] = a02 * c + a12 * s; + out[3] = a03 * c + a13 * s; + out[4] = a10 * c - a00 * s; + out[5] = a11 * c - a01 * s; + out[6] = a12 * c - a02 * s; + out[7] = a13 * c - a03 * s; + return out; +} + +/** + * Creates a matrix from a vector translation + * This is equivalent to (but much faster than): + * + * mat4.identity(dest); + * mat4.translate(dest, dest, vec); + * + * @param {mat4} out mat4 receiving operation result + * @param {ReadonlyVec3} v Translation vector + * @returns {mat4} out + */ +export function fromTranslation(out: mat4, v: vec3.ReadonlyVec3): mat4 { + out[0] = 1; + out[1] = 0; + out[2] = 0; + out[3] = 0; + out[4] = 0; + out[5] = 1; + out[6] = 0; + out[7] = 0; + out[8] = 0; + out[9] = 0; + out[10] = 1; + out[11] = 0; + out[12] = v[0]; + out[13] = v[1]; + out[14] = v[2]; + out[15] = 1; + return out; +} + +/** + * Creates a matrix from a vector scaling + * This is equivalent to (but much faster than): + * + * mat4.identity(dest); + * mat4.scale(dest, dest, vec); + * + * @param {mat4} out mat4 receiving operation result + * @param {ReadonlyVec3} v Scaling vector + * @returns {mat4} out + */ +export function fromScaling(out: mat4, v: vec3.ReadonlyVec3): mat4 { + out[0] = v[0]; + out[1] = 0; + out[2] = 0; + out[3] = 0; + out[4] = 0; + out[5] = v[1]; + out[6] = 0; + out[7] = 0; + out[8] = 0; + out[9] = 0; + out[10] = v[2]; + out[11] = 0; + out[12] = 0; + out[13] = 0; + out[14] = 0; + out[15] = 1; + return out; +} + +/** + * Creates a matrix from a given angle around a given axis + * This is equivalent to (but much faster than): + * + * mat4.identity(dest); + * mat4.rotate(dest, dest, rad: f64, axis: vec3.ReadonlyVec3); + * + * @param {mat4} out mat4 receiving operation result + * @param {Number} rad the angle to rotate the matrix by + * @param {ReadonlyVec3} axis the axis to rotate around + * @returns {mat4} out + */ +export function fromRotation(out: mat4, rad: f64, axis: vec3.ReadonlyVec3): mat4 | null { + let x = axis[0], + y = axis[1], + z = axis[2]; + let len = MathUtil.hypot(x, y, z); + let s: f64, c: f64, t: f64; + + if (len < glMatrix.EPSILON) { + return null; + } + + len = 1 / len; + x *= len; + y *= len; + z *= len; + + s = Math.sin(rad); + c = Math.cos(rad); + t = 1 - c; + + // Perform rotation-specific matrix multiplication + out[0] = x * x * t + c; + out[1] = y * x * t + z * s; + out[2] = z * x * t - y * s; + out[3] = 0; + out[4] = x * y * t - z * s; + out[5] = y * y * t + c; + out[6] = z * y * t + x * s; + out[7] = 0; + out[8] = x * z * t + y * s; + out[9] = y * z * t - x * s; + out[10] = z * z * t + c; + out[11] = 0; + out[12] = 0; + out[13] = 0; + out[14] = 0; + out[15] = 1; + return out; +} + +/** + * Creates a matrix from the given angle around the X axis + * This is equivalent to (but much faster than): + * + * mat4.identity(dest); + * mat4.rotateX(dest, dest, rad); + * + * @param {mat4} out mat4 receiving operation result + * @param {Number} rad the angle to rotate the matrix by + * @returns {mat4} out + */ +export function fromXRotation(out: mat4, rad: f64): mat4 { + let s = Math.sin(rad); + let c = Math.cos(rad); + + // Perform axis-specific matrix multiplication + out[0] = 1; + out[1] = 0; + out[2] = 0; + out[3] = 0; + out[4] = 0; + out[5] = c; + out[6] = s; + out[7] = 0; + out[8] = 0; + out[9] = -s; + out[10] = c; + out[11] = 0; + out[12] = 0; + out[13] = 0; + out[14] = 0; + out[15] = 1; + return out; +} + +/** + * Creates a matrix from the given angle around the Y axis + * This is equivalent to (but much faster than): + * + * mat4.identity(dest); + * mat4.rotateY(dest, dest, rad); + * + * @param {mat4} out mat4 receiving operation result + * @param {Number} rad the angle to rotate the matrix by + * @returns {mat4} out + */ +export function fromYRotation(out: mat4, rad: f64): mat4 { + let s = Math.sin(rad); + let c = Math.cos(rad); + + // Perform axis-specific matrix multiplication + out[0] = c; + out[1] = 0; + out[2] = -s; + out[3] = 0; + out[4] = 0; + out[5] = 1; + out[6] = 0; + out[7] = 0; + out[8] = s; + out[9] = 0; + out[10] = c; + out[11] = 0; + out[12] = 0; + out[13] = 0; + out[14] = 0; + out[15] = 1; + return out; +} + +/** + * Creates a matrix from the given angle around the Z axis + * This is equivalent to (but much faster than): + * + * mat4.identity(dest); + * mat4.rotateZ(dest, dest, rad); + * + * @param {mat4} out mat4 receiving operation result + * @param {Number} rad the angle to rotate the matrix by + * @returns {mat4} out + */ +export function fromZRotation(out: mat4, rad: f64): mat4 { + let s = Math.sin(rad); + let c = Math.cos(rad); + + // Perform axis-specific matrix multiplication + out[0] = c; + out[1] = s; + out[2] = 0; + out[3] = 0; + out[4] = -s; + out[5] = c; + out[6] = 0; + out[7] = 0; + out[8] = 0; + out[9] = 0; + out[10] = 1; + out[11] = 0; + out[12] = 0; + out[13] = 0; + out[14] = 0; + out[15] = 1; + return out; +} + +/** + * Creates a matrix from a quaternion rotation and vector translation + * This is equivalent to (but much faster than): + * + * mat4.identity(dest); + * mat4.translate(dest, vec); + * let quatMat = mat4.create(); + * quat4.toMat4(quat, quatMat); + * mat4.multiply(dest, quatMat); + * + * @param {mat4} out mat4 receiving operation result + * @param {quat4} q Rotation quaternion + * @param {ReadonlyVec3} v Translation vector + * @returns {mat4} out + */ +export function fromRotationTranslation(out: mat4, q: quat4, v: vec3.ReadonlyVec3): mat4 { + // Quaternion math + let x = q[0], + y = q[1], + z = q[2], + w = q[3]; + let x2 = x + x; + let y2 = y + y; + let z2 = z + z; + + let xx = x * x2; + let xy = x * y2; + let xz = x * z2; + let yy = y * y2; + let yz = y * z2; + let zz = z * z2; + let wx = w * x2; + let wy = w * y2; + let wz = w * z2; + + out[0] = 1 - (yy + zz); + out[1] = xy + wz; + out[2] = xz - wy; + out[3] = 0; + out[4] = xy - wz; + out[5] = 1 - (xx + zz); + out[6] = yz + wx; + out[7] = 0; + out[8] = xz + wy; + out[9] = yz - wx; + out[10] = 1 - (xx + yy); + out[11] = 0; + out[12] = v[0]; + out[13] = v[1]; + out[14] = v[2]; + out[15] = 1; + + return out; +} + +/** + * Creates a new mat4 from a dual quat. + * + * @param {mat4} out Matrix + * @param {ReadonlyQuat2} a Dual Quaternion + * @returns {mat4} mat4 receiving operation result + */ +export function fromQuat2(out: mat4, a: ReadonlyQuat2): mat4 { + let translation = new vec3.ReadonlyVec3(3); + let bx = -a[0], + by = -a[1], + bz = -a[2], + bw = a[3], + ax = a[4], + ay = a[5], + az = a[6], + aw = a[7]; + + let magnitude = bx * bx + by * by + bz * bz + bw * bw; + //Only scale if it makes sense + if (magnitude > 0) { + translation[0] = ((ax * bw + aw * bx + ay * bz - az * by) * 2) / magnitude; + translation[1] = ((ay * bw + aw * by + az * bx - ax * bz) * 2) / magnitude; + translation[2] = ((az * bw + aw * bz + ax * by - ay * bx) * 2) / magnitude; + } else { + translation[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2; + translation[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2; + translation[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2; + } + fromRotationTranslation(out, a, translation); + return out; +} + +/** + * Returns the translation vector component of a transformation + * matrix. If a matrix is built with fromRotationTranslation, + * the returned vector will be the same as the translation vector + * originally supplied. + * @param {vec3} out Vector to receive translation component + * @param {ReadonlyMat4} mat Matrix to be decomposed (input) + * @return {vec3} out + */ +export function getTranslation(out: vec3.vec3, mat: ReadonlyMat4): vec3.vec3 { + out[0] = mat[12]; + out[1] = mat[13]; + out[2] = mat[14]; + + return out; +} + +/** + * Returns the scaling factor component of a transformation + * matrix. If a matrix is built with fromRotationTranslationScale + * with a normalized Quaternion paramter, the returned vector will be + * the same as the scaling vector + * originally supplied. + * @param {vec3} out Vector to receive scaling factor component + * @param {ReadonlyMat4} mat Matrix to be decomposed (input) + * @return {vec3} out + */ +export function getScaling(out: mat4, mat: ReadonlyMat4): mat4 { + let m11 = mat[0]; + let m12 = mat[1]; + let m13 = mat[2]; + let m21 = mat[4]; + let m22 = mat[5]; + let m23 = mat[6]; + let m31 = mat[8]; + let m32 = mat[9]; + let m33 = mat[10]; + + out[0] = MathUtil.hypot(m11, m12, m13); + out[1] = MathUtil.hypot(m21, m22, m23); + out[2] = MathUtil.hypot(m31, m32, m33); + + return out; +} + +/** + * Returns a quaternion representing the rotational component + * of a transformation matrix. If a matrix is built with + * fromRotationTranslation, the returned quaternion will be the + * same as the quaternion originally supplied. + * @param {quat} out Quaternion to receive the rotation component + * @param {ReadonlyMat4} mat Matrix to be decomposed (input) + * @return {quat} out + */ +export function getRotation(out: mat4, mat: ReadonlyMat4): mat4 { + let scaling = new mat4(3); + getScaling(scaling, mat); + + let is1 = 1 / scaling[0]; + let is2 = 1 / scaling[1]; + let is3 = 1 / scaling[2]; + + let sm11 = mat[0] * is1; + let sm12 = mat[1] * is2; + let sm13 = mat[2] * is3; + let sm21 = mat[4] * is1; + let sm22 = mat[5] * is2; + let sm23 = mat[6] * is3; + let sm31 = mat[8] * is1; + let sm32 = mat[9] * is2; + let sm33 = mat[10] * is3; + + let trace = sm11 + sm22 + sm33; + let S: f64 = 0; + + if (trace > 0) { + S = Math.sqrt(trace + 1.0) * 2; + out[3] = 0.25 * S; + out[0] = (sm23 - sm32) / S; + out[1] = (sm31 - sm13) / S; + out[2] = (sm12 - sm21) / S; + } else if (sm11 > sm22 && sm11 > sm33) { + S = Math.sqrt(1.0 + sm11 - sm22 - sm33) * 2; + out[3] = (sm23 - sm32) / S; + out[0] = 0.25 * S; + out[1] = (sm12 + sm21) / S; + out[2] = (sm31 + sm13) / S; + } else if (sm22 > sm33) { + S = Math.sqrt(1.0 + sm22 - sm11 - sm33) * 2; + out[3] = (sm31 - sm13) / S; + out[0] = (sm12 + sm21) / S; + out[1] = 0.25 * S; + out[2] = (sm23 + sm32) / S; + } else { + S = Math.sqrt(1.0 + sm33 - sm11 - sm22) * 2; + out[3] = (sm12 - sm21) / S; + out[0] = (sm31 + sm13) / S; + out[1] = (sm23 + sm32) / S; + out[2] = 0.25 * S; + } + + return out; +} + +/** + * Decomposes a transformation matrix into its rotation, translation + * and scale components. Returns only the rotation component + * @param {quat} out_r Quaternion to receive the rotation component + * @param {vec3} out_t Vector to receive the translation vector + * @param {vec3} out_s Vector to receive the scaling factor + * @param {ReadonlyMat4} mat Matrix to be decomposed (input) + * @returns {quat} out_r + */ +export function decompose(out_r: quat.quat, out_t: vec3.vec3, out_s: vec3.vec3, mat: ReadonlyMat4): quat.quat { + out_t[0] = mat[12]; + out_t[1] = mat[13]; + out_t[2] = mat[14]; + + let m11 = mat[0]; + let m12 = mat[1]; + let m13 = mat[2]; + let m21 = mat[4]; + let m22 = mat[5]; + let m23 = mat[6]; + let m31 = mat[8]; + let m32 = mat[9]; + let m33 = mat[10]; + + out_s[0] = MathUtil.hypot(m11, m12, m13); + out_s[1] = MathUtil.hypot(m21, m22, m23); + out_s[2] = MathUtil.hypot(m31, m32, m33); + + let is1 = 1 / out_s[0]; + let is2 = 1 / out_s[1]; + let is3 = 1 / out_s[2]; + + let sm11 = m11 * is1; + let sm12 = m12 * is2; + let sm13 = m13 * is3; + let sm21 = m21 * is1; + let sm22 = m22 * is2; + let sm23 = m23 * is3; + let sm31 = m31 * is1; + let sm32 = m32 * is2; + let sm33 = m33 * is3; + + let trace = sm11 + sm22 + sm33; + let S: f64 = 0; + + if (trace > 0) { + S = Math.sqrt(trace + 1.0) * 2; + out_r[3] = 0.25 * S; + out_r[0] = (sm23 - sm32) / S; + out_r[1] = (sm31 - sm13) / S; + out_r[2] = (sm12 - sm21) / S; + } else if (sm11 > sm22 && sm11 > sm33) { + S = Math.sqrt(1.0 + sm11 - sm22 - sm33) * 2; + out_r[3] = (sm23 - sm32) / S; + out_r[0] = 0.25 * S; + out_r[1] = (sm12 + sm21) / S; + out_r[2] = (sm31 + sm13) / S; + } else if (sm22 > sm33) { + S = Math.sqrt(1.0 + sm22 - sm11 - sm33) * 2; + out_r[3] = (sm31 - sm13) / S; + out_r[0] = (sm12 + sm21) / S; + out_r[1] = 0.25 * S; + out_r[2] = (sm23 + sm32) / S; + } else { + S = Math.sqrt(1.0 + sm33 - sm11 - sm22) * 2; + out_r[3] = (sm12 - sm21) / S; + out_r[0] = (sm31 + sm13) / S; + out_r[1] = (sm23 + sm32) / S; + out_r[2] = 0.25 * S; + } + + return out_r; +} + +/** + * Creates a matrix from a quaternion rotation, vector translation and vector scale + * This is equivalent to (but much faster than): + * + * mat4.identity(dest); + * mat4.translate(dest, vec); + * let quatMat = mat4.create(); + * quat4.toMat4(quat, quatMat); + * mat4.multiply(dest, quatMat); + * mat4.scale(dest, scale) + * + * @param {mat4} out mat4 receiving operation result + * @param {quat4} q Rotation quaternion + * @param {ReadonlyVec3} v Translation vector + * @param {ReadonlyVec3} s Scaling vector + * @returns {mat4} out + */ +export function fromRotationTranslationScale(out: mat4, q: quat4, v: vec3.ReadonlyVec3, s: vec3.ReadonlyVec3): mat4 { + // Quaternion math + let x = q[0], + y = q[1], + z = q[2], + w = q[3]; + let x2 = x + x; + let y2 = y + y; + let z2 = z + z; + + let xx = x * x2; + let xy = x * y2; + let xz = x * z2; + let yy = y * y2; + let yz = y * z2; + let zz = z * z2; + let wx = w * x2; + let wy = w * y2; + let wz = w * z2; + let sx = s[0]; + let sy = s[1]; + let sz = s[2]; + + out[0] = (1 - (yy + zz)) * sx; + out[1] = (xy + wz) * sx; + out[2] = (xz - wy) * sx; + out[3] = 0; + out[4] = (xy - wz) * sy; + out[5] = (1 - (xx + zz)) * sy; + out[6] = (yz + wx) * sy; + out[7] = 0; + out[8] = (xz + wy) * sz; + out[9] = (yz - wx) * sz; + out[10] = (1 - (xx + yy)) * sz; + out[11] = 0; + out[12] = v[0]; + out[13] = v[1]; + out[14] = v[2]; + out[15] = 1; + + return out; +} + +/** + * Creates a matrix from a quaternion rotation, vector translation and vector scale, rotating and scaling around the given origin + * This is equivalent to (but much faster than): + * + * mat4.identity(dest); + * mat4.translate(dest, vec); + * mat4.translate(dest, origin); + * let quatMat = mat4.create(); + * quat4.toMat4(quat, quatMat); + * mat4.multiply(dest, quatMat); + * mat4.scale(dest, scale) + * mat4.translate(dest, negativeOrigin); + * + * @param {mat4} out mat4 receiving operation result + * @param {quat4} q Rotation quaternion + * @param {ReadonlyVec3} v Translation vector + * @param {ReadonlyVec3} s Scaling vector + * @param {ReadonlyVec3} o The origin vector around which to scale and rotate + * @returns {mat4} out + */ +export function fromRotationTranslationScaleOrigin(out: mat4, q: quat4, v: vec3.ReadonlyVec3, s: vec3.ReadonlyVec3, o: vec3.ReadonlyVec3): mat4 { + // Quaternion math + let x = q[0], + y = q[1], + z = q[2], + w = q[3]; + let x2 = x + x; + let y2 = y + y; + let z2 = z + z; + + let xx = x * x2; + let xy = x * y2; + let xz = x * z2; + let yy = y * y2; + let yz = y * z2; + let zz = z * z2; + let wx = w * x2; + let wy = w * y2; + let wz = w * z2; + + let sx = s[0]; + let sy = s[1]; + let sz = s[2]; + + let ox = o[0]; + let oy = o[1]; + let oz = o[2]; + + let out0 = (1 - (yy + zz)) * sx; + let out1 = (xy + wz) * sx; + let out2 = (xz - wy) * sx; + let out4 = (xy - wz) * sy; + let out5 = (1 - (xx + zz)) * sy; + let out6 = (yz + wx) * sy; + let out8 = (xz + wy) * sz; + let out9 = (yz - wx) * sz; + let out10 = (1 - (xx + yy)) * sz; + + out[0] = out0; + out[1] = out1; + out[2] = out2; + out[3] = 0; + out[4] = out4; + out[5] = out5; + out[6] = out6; + out[7] = 0; + out[8] = out8; + out[9] = out9; + out[10] = out10; + out[11] = 0; + out[12] = v[0] + ox - (out0 * ox + out4 * oy + out8 * oz); + out[13] = v[1] + oy - (out1 * ox + out5 * oy + out9 * oz); + out[14] = v[2] + oz - (out2 * ox + out6 * oy + out10 * oz); + out[15] = 1; + + return out; +} + +/** + * Calculates a 4x4 matrix from the given quaternion + * + * @param {mat4} out mat4 receiving operation result + * @param {ReadonlyQuat} q Quaternion to create matrix from + * + * @returns {mat4} out + */ +export function fromQuat(out: mat4, q: quat.ReadonlyQuat): mat4 { + let x = q[0], + y = q[1], + z = q[2], + w = q[3]; + let x2 = x + x; + let y2 = y + y; + let z2 = z + z; + + let xx = x * x2; + let yx = y * x2; + let yy = y * y2; + let zx = z * x2; + let zy = z * y2; + let zz = z * z2; + let wx = w * x2; + let wy = w * y2; + let wz = w * z2; + + out[0] = 1 - yy - zz; + out[1] = yx + wz; + out[2] = zx - wy; + out[3] = 0; + + out[4] = yx - wz; + out[5] = 1 - xx - zz; + out[6] = zy + wx; + out[7] = 0; + + out[8] = zx + wy; + out[9] = zy - wx; + out[10] = 1 - xx - yy; + out[11] = 0; + + out[12] = 0; + out[13] = 0; + out[14] = 0; + out[15] = 1; + + return out; +} + +/** + * Generates a frustum matrix with the given bounds + * + * @param {mat4} out mat4 frustum matrix will be written into + * @param {Number} left Left bound of the frustum + * @param {Number} right Right bound of the frustum + * @param {Number} bottom Bottom bound of the frustum + * @param {Number} top Top bound of the frustum + * @param {Number} near Near bound of the frustum + * @param {Number} far Far bound of the frustum + * @returns {mat4} out + */ +export function frustum(out: mat4, left: f64, right: f64, bottom: f64, top: f64, near: f64, far: f64): mat4 { + let rl = 1 / (right - left); + let tb = 1 / (top - bottom); + let nf = 1 / (near - far); + out[0] = near * 2 * rl; + out[1] = 0; + out[2] = 0; + out[3] = 0; + out[4] = 0; + out[5] = near * 2 * tb; + out[6] = 0; + out[7] = 0; + out[8] = (right + left) * rl; + out[9] = (top + bottom) * tb; + out[10] = (far + near) * nf; + out[11] = -1; + out[12] = 0; + out[13] = 0; + out[14] = far * near * 2 * nf; + out[15] = 0; + return out; +} + +/** + * Generates a perspective projection matrix with the given bounds. + * The near/far clip planes correspond to a normalized device coordinate Z range of [-1, 1], + * which matches WebGL/OpenGL's clip volume. + * Passing null/undefined/no value for far will generate infinite projection matrix. + * + * @param {mat4} out mat4 frustum matrix will be written into + * @param {number} fovy Vertical field of view in radians + * @param {number} aspect Aspect ratio. typically viewport width/height + * @param {number} near Near bound of the frustum + * @param {number} far Far bound of the frustum, can be null or Infinity + * @returns {mat4} out + */ +export function perspectiveNO(out: mat4, fovy: f64, aspect: f64, near: f64, far: f64): mat4 { + const f = 1.0 / Math.tan(fovy / 2); + out[0] = f / aspect; + out[1] = 0; + out[2] = 0; + out[3] = 0; + out[4] = 0; + out[5] = f; + out[6] = 0; + out[7] = 0; + out[8] = 0; + out[9] = 0; + out[11] = -1; + out[12] = 0; + out[13] = 0; + out[15] = 0; + if (far != null && far !== Infinity) { + const nf = 1 / (near - far); + out[10] = (far + near) * nf; + out[14] = 2 * far * near * nf; + } else { + out[10] = -1; + out[14] = -2 * near; + } + return out; +} + +/** + * Alias for {@link mat4.perspectiveNO} + * @function + */ +export const perspective = perspectiveNO; + +/** + * Generates a perspective projection matrix suitable for WebGPU with the given bounds. + * The near/far clip planes correspond to a normalized device coordinate Z range of [0, 1], + * which matches WebGPU/Vulkan/DirectX/Metal's clip volume. + * Passing null/undefined/no value for far will generate infinite projection matrix. + * + * @param {mat4} out mat4 frustum matrix will be written into + * @param {number} fovy Vertical field of view in radians + * @param {number} aspect Aspect ratio. typically viewport width/height + * @param {number} near Near bound of the frustum + * @param {number} far Far bound of the frustum, can be null or Infinity + * @returns {mat4} out + */ +export function perspectiveZO(out: mat4, fovy: f64, aspect: f64, near: f64, far: f64): mat4 { + const f = 1.0 / Math.tan(fovy / 2); + out[0] = f / aspect; + out[1] = 0; + out[2] = 0; + out[3] = 0; + out[4] = 0; + out[5] = f; + out[6] = 0; + out[7] = 0; + out[8] = 0; + out[9] = 0; + out[11] = -1; + out[12] = 0; + out[13] = 0; + out[15] = 0; + if (far != null && far !== Infinity) { + const nf = 1 / (near - far); + out[10] = far * nf; + out[14] = far * near * nf; + } else { + out[10] = -1; + out[14] = -near; + } + return out; +} + +/** + * Generates a perspective projection matrix with the given field of view. + * This is primarily useful for generating projection matrices to be used + * with the still experiemental WebVR API. + * + * @param {mat4} out mat4 frustum matrix will be written into + * @param {Fov} fov Object containing the following values: upDegrees, downDegrees, leftDegrees, rightDegrees + * @param {number} near Near bound of the frustum + * @param {number} far Far bound of the frustum + * @returns {mat4} out + */ +export function perspectiveFromFieldOfView(out: mat4, fov: Fov, near: f64, far: f64): mat4 { + let upTan = Math.tan((fov.upDegrees * Math.PI) / 180.0); + let downTan = Math.tan((fov.downDegrees * Math.PI) / 180.0); + let leftTan = Math.tan((fov.leftDegrees * Math.PI) / 180.0); + let rightTan = Math.tan((fov.rightDegrees * Math.PI) / 180.0); + let xScale = 2.0 / (leftTan + rightTan); + let yScale = 2.0 / (upTan + downTan); + + out[0] = xScale; + out[1] = 0.0; + out[2] = 0.0; + out[3] = 0.0; + out[4] = 0.0; + out[5] = yScale; + out[6] = 0.0; + out[7] = 0.0; + out[8] = -((leftTan - rightTan) * xScale * 0.5); + out[9] = (upTan - downTan) * yScale * 0.5; + out[10] = far / (near - far); + out[11] = -1.0; + out[12] = 0.0; + out[13] = 0.0; + out[14] = (far * near) / (near - far); + out[15] = 0.0; + return out; +} + +/** + * Generates a orthogonal projection matrix with the given bounds. + * The near/far clip planes correspond to a normalized device coordinate Z range of [-1, 1], + * which matches WebGL/OpenGL's clip volume. + * + * @param {mat4} out mat4 frustum matrix will be written into + * @param {number} left Left bound of the frustum + * @param {number} right Right bound of the frustum + * @param {number} bottom Bottom bound of the frustum + * @param {number} top Top bound of the frustum + * @param {number} near Near bound of the frustum + * @param {number} far Far bound of the frustum + * @returns {mat4} out + */ +export function orthoNO(out: mat4, left: f64, right: f64, bottom: f64, top: f64, near: f64, far: f64): mat4 { + const lr = 1 / (left - right); + const bt = 1 / (bottom - top); + const nf = 1 / (near - far); + out[0] = -2 * lr; + out[1] = 0; + out[2] = 0; + out[3] = 0; + out[4] = 0; + out[5] = -2 * bt; + out[6] = 0; + out[7] = 0; + out[8] = 0; + out[9] = 0; + out[10] = 2 * nf; + out[11] = 0; + out[12] = (left + right) * lr; + out[13] = (top + bottom) * bt; + out[14] = (far + near) * nf; + out[15] = 1; + return out; +} + +/** + * Alias for {@link mat4.orthoNO} + * @function + */ +export const ortho = orthoNO; + +/** + * Generates a orthogonal projection matrix with the given bounds. + * The near/far clip planes correspond to a normalized device coordinate Z range of [0, 1], + * which matches WebGPU/Vulkan/DirectX/Metal's clip volume. + * + * @param {mat4} out mat4 frustum matrix will be written into + * @param {number} left Left bound of the frustum + * @param {number} right Right bound of the frustum + * @param {number} bottom Bottom bound of the frustum + * @param {number} top Top bound of the frustum + * @param {number} near Near bound of the frustum + * @param {number} far Far bound of the frustum + * @returns {mat4} out + */ +export function orthoZO(out: mat4, left: f64, right: f64, bottom: f64, top: f64, near: f64, far: f64): mat4 { + const lr = 1 / (left - right); + const bt = 1 / (bottom - top); + const nf = 1 / (near - far); + out[0] = -2 * lr; + out[1] = 0; + out[2] = 0; + out[3] = 0; + out[4] = 0; + out[5] = -2 * bt; + out[6] = 0; + out[7] = 0; + out[8] = 0; + out[9] = 0; + out[10] = nf; + out[11] = 0; + out[12] = (left + right) * lr; + out[13] = (top + bottom) * bt; + out[14] = near * nf; + out[15] = 1; + return out; +} + +/** + * Generates a look-at matrix with the given eye position, focal point, and up axis. + * If you want a matrix that actually makes an object look at another object, you should use targetTo instead. + * + * @param {mat4} out mat4 frustum matrix will be written into + * @param {ReadonlyVec3} eye Position of the viewer + * @param {ReadonlyVec3} center Point the viewer is looking at + * @param {ReadonlyVec3} up vec3 pointing up + * @returns {mat4} out + */ +export function lookAt(out: mat4, eye: vec3.ReadonlyVec3, center: vec3.ReadonlyVec3, up: vec3.ReadonlyVec3): mat4 { + let x0: f64, x1: f64, x2: f64, y0: f64, y1: f64, y2: f64, z0: f64, z1: f64, z2: f64, len: f64; + let eyex = eye[0]; + let eyey = eye[1]; + let eyez = eye[2]; + let upx = up[0]; + let upy = up[1]; + let upz = up[2]; + let centerx = center[0]; + let centery = center[1]; + let centerz = center[2]; + + if ( + Math.abs(eyex - centerx) < glMatrix.EPSILON && + Math.abs(eyey - centery) < glMatrix.EPSILON && + Math.abs(eyez - centerz) < glMatrix.EPSILON + ) { + return identity(out); + } + + z0 = eyex - centerx; + z1 = eyey - centery; + z2 = eyez - centerz; + + len = 1 / MathUtil.hypot(z0, z1, z2); + z0 *= len; + z1 *= len; + z2 *= len; + + x0 = upy * z2 - upz * z1; + x1 = upz * z0 - upx * z2; + x2 = upx * z1 - upy * z0; + len = MathUtil.hypot(x0, x1, x2); + if (!len) { + x0 = 0; + x1 = 0; + x2 = 0; + } else { + len = 1 / len; + x0 *= len; + x1 *= len; + x2 *= len; + } + + y0 = z1 * x2 - z2 * x1; + y1 = z2 * x0 - z0 * x2; + y2 = z0 * x1 - z1 * x0; + + len = MathUtil.hypot(y0, y1, y2); + if (!len) { + y0 = 0; + y1 = 0; + y2 = 0; + } else { + len = 1 / len; + y0 *= len; + y1 *= len; + y2 *= len; + } + + out[0] = x0; + out[1] = y0; + out[2] = z0; + out[3] = 0; + out[4] = x1; + out[5] = y1; + out[6] = z1; + out[7] = 0; + out[8] = x2; + out[9] = y2; + out[10] = z2; + out[11] = 0; + out[12] = -(x0 * eyex + x1 * eyey + x2 * eyez); + out[13] = -(y0 * eyex + y1 * eyey + y2 * eyez); + out[14] = -(z0 * eyex + z1 * eyey + z2 * eyez); + out[15] = 1; + + return out; +} + +/** + * Generates a matrix that makes something look at something else. + * + * @param {mat4} out mat4 frustum matrix will be written into + * @param {ReadonlyVec3} eye Position of the viewer + * @param {ReadonlyVec3} center Point the viewer is looking at + * @param {ReadonlyVec3} up vec3 pointing up + * @returns {mat4} out + */ +export function targetTo(out: mat4, eye: vec3.ReadonlyVec3, target: vec3.ReadonlyVec3, up: vec3.ReadonlyVec3): mat4 { + let eyex = eye[0], + eyey = eye[1], + eyez = eye[2], + upx = up[0], + upy = up[1], + upz = up[2]; + + let z0 = eyex - target[0], + z1 = eyey - target[1], + z2 = eyez - target[2]; + + let len = z0 * z0 + z1 * z1 + z2 * z2; + if (len > 0) { + len = 1 / Math.sqrt(len); + z0 *= len; + z1 *= len; + z2 *= len; + } + + let x0 = upy * z2 - upz * z1, + x1 = upz * z0 - upx * z2, + x2 = upx * z1 - upy * z0; + + len = x0 * x0 + x1 * x1 + x2 * x2; + if (len > 0) { + len = 1 / Math.sqrt(len); + x0 *= len; + x1 *= len; + x2 *= len; + } + + out[0] = x0; + out[1] = x1; + out[2] = x2; + out[3] = 0; + out[4] = z1 * x2 - z2 * x1; + out[5] = z2 * x0 - z0 * x2; + out[6] = z0 * x1 - z1 * x0; + out[7] = 0; + out[8] = z0; + out[9] = z1; + out[10] = z2; + out[11] = 0; + out[12] = eyex; + out[13] = eyey; + out[14] = eyez; + out[15] = 1; + return out; +} + +/** + * Returns a string representation of a mat4 + * + * @param {ReadonlyMat4} a matrix to represent as a string + * @returns {String} string representation of the matrix + */ +export function str(a: ReadonlyMat4): string { + return ( + "mat4(" + + a[0].toString() + + ", " + + a[1].toString() + + ", " + + a[2].toString() + + ", " + + a[3].toString() + + ", " + + a[4].toString() + + ", " + + a[5].toString() + + ", " + + a[6].toString() + + ", " + + a[7].toString() + + ", " + + a[8].toString() + + ", " + + a[9].toString() + + ", " + + a[10].toString() + + ", " + + a[11].toString() + + ", " + + a[12].toString() + + ", " + + a[13].toString() + + ", " + + a[14].toString() + + ", " + + a[15].toString() + + ")" + ); +} + +/** + * Returns Frobenius norm of a mat4 + * + * @param {ReadonlyMat4} a the matrix to calculate Frobenius norm of + * @returns {Number} Frobenius norm + */ +export function frob(a: ReadonlyMat4): f64 { + return MathUtil.hypot( + a[0], + a[1], + a[2], + a[3], + a[4], + a[5], + a[6], + a[7], + a[8], + a[9], + a[10], + a[11], + a[12], + a[13], + a[14], + a[15] + ); +} + +/** + * Adds two mat4's + * + * @param {mat4} out the receiving matrix + * @param {ReadonlyMat4} a the first operand + * @param {ReadonlyMat4} b the second operand + * @returns {mat4} out + */ +export function add(out: mat4, a: ReadonlyMat4, b: ReadonlyMat4): mat4 { + out[0] = a[0] + b[0]; + out[1] = a[1] + b[1]; + out[2] = a[2] + b[2]; + out[3] = a[3] + b[3]; + out[4] = a[4] + b[4]; + out[5] = a[5] + b[5]; + out[6] = a[6] + b[6]; + out[7] = a[7] + b[7]; + out[8] = a[8] + b[8]; + out[9] = a[9] + b[9]; + out[10] = a[10] + b[10]; + out[11] = a[11] + b[11]; + out[12] = a[12] + b[12]; + out[13] = a[13] + b[13]; + out[14] = a[14] + b[14]; + out[15] = a[15] + b[15]; + return out; +} + +/** + * Subtracts matrix b from matrix a + * + * @param {mat4} out the receiving matrix + * @param {ReadonlyMat4} a the first operand + * @param {ReadonlyMat4} b the second operand + * @returns {mat4} out + */ +export function subtract(out: mat4, a: ReadonlyMat4, b: ReadonlyMat4): mat4 { + out[0] = a[0] - b[0]; + out[1] = a[1] - b[1]; + out[2] = a[2] - b[2]; + out[3] = a[3] - b[3]; + out[4] = a[4] - b[4]; + out[5] = a[5] - b[5]; + out[6] = a[6] - b[6]; + out[7] = a[7] - b[7]; + out[8] = a[8] - b[8]; + out[9] = a[9] - b[9]; + out[10] = a[10] - b[10]; + out[11] = a[11] - b[11]; + out[12] = a[12] - b[12]; + out[13] = a[13] - b[13]; + out[14] = a[14] - b[14]; + out[15] = a[15] - b[15]; + return out; +} + +/** + * Multiply each element of the matrix by a scalar. + * + * @param {mat4} out the receiving matrix + * @param {ReadonlyMat4} a the matrix to scale + * @param {Number} b amount to scale the matrix's elements by + * @returns {mat4} out + */ +export function multiplyScalar(out: mat4, a: ReadonlyMat4, b: f64): mat4 { + out[0] = a[0] * b; + out[1] = a[1] * b; + out[2] = a[2] * b; + out[3] = a[3] * b; + out[4] = a[4] * b; + out[5] = a[5] * b; + out[6] = a[6] * b; + out[7] = a[7] * b; + out[8] = a[8] * b; + out[9] = a[9] * b; + out[10] = a[10] * b; + out[11] = a[11] * b; + out[12] = a[12] * b; + out[13] = a[13] * b; + out[14] = a[14] * b; + out[15] = a[15] * b; + return out; +} + +/** + * Adds two mat4's after multiplying each element of the second operand by a scalar value. + * + * @param {mat4} out the receiving vector + * @param {ReadonlyMat4} a the first operand + * @param {ReadonlyMat4} b the second operand + * @param {Number} scale the amount to scale b's elements by before adding + * @returns {mat4} out + */ +export function multiplyScalarAndAdd(out: mat4, a: ReadonlyMat4, b: ReadonlyMat4, scale: f64): mat4 { + out[0] = a[0] + b[0] * scale; + out[1] = a[1] + b[1] * scale; + out[2] = a[2] + b[2] * scale; + out[3] = a[3] + b[3] * scale; + out[4] = a[4] + b[4] * scale; + out[5] = a[5] + b[5] * scale; + out[6] = a[6] + b[6] * scale; + out[7] = a[7] + b[7] * scale; + out[8] = a[8] + b[8] * scale; + out[9] = a[9] + b[9] * scale; + out[10] = a[10] + b[10] * scale; + out[11] = a[11] + b[11] * scale; + out[12] = a[12] + b[12] * scale; + out[13] = a[13] + b[13] * scale; + out[14] = a[14] + b[14] * scale; + out[15] = a[15] + b[15] * scale; + return out; +} + +/** + * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===) + * + * @param {ReadonlyMat4} a The first matrix. + * @param {ReadonlyMat4} b The second matrix. + * @returns {Boolean} True if the matrices are equal, false otherwise. + */ +export function exactEquals(a: ReadonlyMat4, b: ReadonlyMat4): bool { + return ( + a[0] === b[0] && + a[1] === b[1] && + a[2] === b[2] && + a[3] === b[3] && + a[4] === b[4] && + a[5] === b[5] && + a[6] === b[6] && + a[7] === b[7] && + a[8] === b[8] && + a[9] === b[9] && + a[10] === b[10] && + a[11] === b[11] && + a[12] === b[12] && + a[13] === b[13] && + a[14] === b[14] && + a[15] === b[15] + ); +} + +/** + * Returns whether or not the matrices have approximately the same elements in the same position. + * + * @param {ReadonlyMat4} a The first matrix. + * @param {ReadonlyMat4} b The second matrix. + * @returns {Boolean} True if the matrices are equal, false otherwise. + */ +export function equals(a: ReadonlyMat4, b: ReadonlyMat4): bool { + let a0 = a[0], + a1 = a[1], + a2 = a[2], + a3 = a[3]; + let a4 = a[4], + a5 = a[5], + a6 = a[6], + a7 = a[7]; + let a8 = a[8], + a9 = a[9], + a10 = a[10], + a11 = a[11]; + let a12 = a[12], + a13 = a[13], + a14 = a[14], + a15 = a[15]; + + let b0 = b[0], + b1 = b[1], + b2 = b[2], + b3 = b[3]; + let b4 = b[4], + b5 = b[5], + b6 = b[6], + b7 = b[7]; + let b8 = b[8], + b9 = b[9], + b10 = b[10], + b11 = b[11]; + let b12 = b[12], + b13 = b[13], + b14 = b[14], + b15 = b[15]; + + return ( + Math.abs(a0 - b0) <= + glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a0), Math.abs(b0)) && + Math.abs(a1 - b1) <= + glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a1), Math.abs(b1)) && + Math.abs(a2 - b2) <= + glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a2), Math.abs(b2)) && + Math.abs(a3 - b3) <= + glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a3), Math.abs(b3)) && + Math.abs(a4 - b4) <= + glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a4), Math.abs(b4)) && + Math.abs(a5 - b5) <= + glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a5), Math.abs(b5)) && + Math.abs(a6 - b6) <= + glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a6), Math.abs(b6)) && + Math.abs(a7 - b7) <= + glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a7), Math.abs(b7)) && + Math.abs(a8 - b8) <= + glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a8), Math.abs(b8)) && + Math.abs(a9 - b9) <= + glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a9), Math.abs(b9)) && + Math.abs(a10 - b10) <= + glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a10), Math.abs(b10)) && + Math.abs(a11 - b11) <= + glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a11), Math.abs(b11)) && + Math.abs(a12 - b12) <= + glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a12), Math.abs(b12)) && + Math.abs(a13 - b13) <= + glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a13), Math.abs(b13)) && + Math.abs(a14 - b14) <= + glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a14), Math.abs(b14)) && + Math.abs(a15 - b15) <= + glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a15), Math.abs(b15)) + ); +} + +/** + * Alias for {@link mat4.multiply} + * @function + */ +export const mul = multiply; + +/** + * Alias for {@link mat4.subtract} + * @function + */ +export const sub = subtract; diff --git a/assembly/quat.ts b/assembly/quat.ts new file mode 100644 index 00000000..447bb962 --- /dev/null +++ b/assembly/quat.ts @@ -0,0 +1,790 @@ +import * as glMatrix from "./common"; +import * as mat3 from "./mat3"; +import * as vec3 from "./vec3"; +import * as vec4 from "./vec4"; + +export class quat extends Float64Array {} + +export class ReadonlyQuat extends quat {} + +/** + * Quaternion in the format XYZW + * @module quat + */ + +/** + * Creates a new identity quat + * + * @returns {quat} a new quaternion + */ +export function create(): quat { + let out = new quat(4); + //if (glMatrix.ARRAY_TYPE != Float32Array) { + out[0] = 0; + out[1] = 0; + out[2] = 0; + //} + out[3] = 1; + return out; +} + +/** + * Set a quat to the identity quaternion + * + * @param {quat} out the receiving quaternion + * @returns {quat} out + */ +export function identity(out: quat): quat { + out[0] = 0; + out[1] = 0; + out[2] = 0; + out[3] = 1; + return out; +} + +/** + * Sets a quat from the given angle and rotation axis, + * then returns it. + * + * @param {quat} out the receiving quaternion + * @param {ReadonlyVec3} axis the axis around which to rotate + * @param {Number} rad the angle in radians + * @returns {quat} out + **/ +export function setAxisAngle(out: quat, axis: vec3.ReadonlyVec3, rad: f64): quat { + rad = rad * 0.5; + let s = Math.sin(rad); + out[0] = s * axis[0]; + out[1] = s * axis[1]; + out[2] = s * axis[2]; + out[3] = Math.cos(rad); + return out; +} + +/** + * Gets the rotation axis and angle for a given + * quaternion. If a quaternion is created with + * setAxisAngle, this method will return the same + * values as providied in the original parameter list + * OR functionally equivalent values. + * Example: The quaternion formed by axis [0, 0, 1] and + * angle -90 is the same as the quaternion formed by + * [0, 0, 1] and 270. This method favors the latter. + * @param {vec3} out_axis Vector receiving the axis of rotation + * @param {ReadonlyQuat} q Quaternion to be decomposed + * @return {Number} Angle, in radians, of the rotation + */ +export function getAxisAngle(out_axis: vec3.vec3, q: ReadonlyQuat): f64 { + let rad = Math.acos(q[3]) * 2.0; + let s = Math.sin(rad / 2.0); + if (s > glMatrix.EPSILON) { + out_axis[0] = q[0] / s; + out_axis[1] = q[1] / s; + out_axis[2] = q[2] / s; + } else { + // If s is zero, return any axis (no rotation - axis does not matter) + out_axis[0] = 1; + out_axis[1] = 0; + out_axis[2] = 0; + } + return rad; +} + +/** + * Gets the angular distance between two unit quaternions + * + * @param {ReadonlyQuat} a Origin unit quaternion + * @param {ReadonlyQuat} b Destination unit quaternion + * @return {Number} Angle, in radians, between the two quaternions + */ +export function getAngle(a: ReadonlyQuat, b: ReadonlyQuat): f64 { + let dotproduct = dot(a, b); + + return Math.acos(2 * dotproduct * dotproduct - 1); +} + +/** + * Multiplies two quat's + * + * @param {quat} out the receiving quaternion + * @param {ReadonlyQuat} a the first operand + * @param {ReadonlyQuat} b the second operand + * @returns {quat} out + */ +export function multiply(out: quat, a: ReadonlyQuat, b: ReadonlyQuat): quat { + let ax = a[0], + ay = a[1], + az = a[2], + aw = a[3]; + let bx = b[0], + by = b[1], + bz = b[2], + bw = b[3]; + + out[0] = ax * bw + aw * bx + ay * bz - az * by; + out[1] = ay * bw + aw * by + az * bx - ax * bz; + out[2] = az * bw + aw * bz + ax * by - ay * bx; + out[3] = aw * bw - ax * bx - ay * by - az * bz; + return out; +} + +/** + * Rotates a quaternion by the given angle about the X axis + * + * @param {quat} out quat receiving operation result + * @param {ReadonlyQuat} a quat to rotate + * @param {number} rad angle (in radians) to rotate + * @returns {quat} out + */ +export function rotateX(out: quat, a: ReadonlyQuat, rad: f64): quat { + rad *= 0.5; + + let ax = a[0], + ay = a[1], + az = a[2], + aw = a[3]; + let bx = Math.sin(rad), + bw = Math.cos(rad); + + out[0] = ax * bw + aw * bx; + out[1] = ay * bw + az * bx; + out[2] = az * bw - ay * bx; + out[3] = aw * bw - ax * bx; + return out; +} + +/** + * Rotates a quaternion by the given angle about the Y axis + * + * @param {quat} out quat receiving operation result + * @param {ReadonlyQuat} a quat to rotate + * @param {number} rad angle (in radians) to rotate + * @returns {quat} out + */ +export function rotateY(out: quat, a: ReadonlyQuat, rad: f64): quat { + rad *= 0.5; + + let ax = a[0], + ay = a[1], + az = a[2], + aw = a[3]; + let by = Math.sin(rad), + bw = Math.cos(rad); + + out[0] = ax * bw - az * by; + out[1] = ay * bw + aw * by; + out[2] = az * bw + ax * by; + out[3] = aw * bw - ay * by; + return out; +} + +/** + * Rotates a quaternion by the given angle about the Z axis + * + * @param {quat} out quat receiving operation result + * @param {ReadonlyQuat} a quat to rotate + * @param {number} rad angle (in radians) to rotate + * @returns {quat} out + */ +export function rotateZ(out: quat, a: ReadonlyQuat, rad: f64): quat { + rad *= 0.5; + + let ax = a[0], + ay = a[1], + az = a[2], + aw = a[3]; + let bz = Math.sin(rad), + bw = Math.cos(rad); + + out[0] = ax * bw + ay * bz; + out[1] = ay * bw - ax * bz; + out[2] = az * bw + aw * bz; + out[3] = aw * bw - az * bz; + return out; +} + +/** + * Calculates the W component of a quat from the X, Y, and Z components. + * Assumes that quaternion is 1 unit in length. + * Any existing W component will be ignored. + * + * @param {quat} out the receiving quaternion + * @param {ReadonlyQuat} a quat to calculate W component of + * @returns {quat} out + */ +export function calculateW(out: quat, a: ReadonlyQuat): quat { + let x = a[0], + y = a[1], + z = a[2]; + + out[0] = x; + out[1] = y; + out[2] = z; + out[3] = Math.sqrt(Math.abs(1.0 - x * x - y * y - z * z)); + return out; +} + +/** + * Calculate the exponential of a unit quaternion. + * + * @param {quat} out the receiving quaternion + * @param {ReadonlyQuat} a quat to calculate the exponential of + * @returns {quat} out + */ +export function exp(out: quat, a: ReadonlyQuat): quat { + let x = a[0], + y = a[1], + z = a[2], + w = a[3]; + + let r = Math.sqrt(x * x + y * y + z * z); + let et = Math.exp(w); + let s = r > 0 ? (et * Math.sin(r)) / r : 0; + + out[0] = x * s; + out[1] = y * s; + out[2] = z * s; + out[3] = et * Math.cos(r); + + return out; +} + +/** + * Calculate the natural logarithm of a unit quaternion. + * + * @param {quat} out the receiving quaternion + * @param {ReadonlyQuat} a quat to calculate the exponential of + * @returns {quat} out + */ +export function ln(out: quat, a: ReadonlyQuat): quat { + let x = a[0], + y = a[1], + z = a[2], + w = a[3]; + + let r = Math.sqrt(x * x + y * y + z * z); + let t = r > 0 ? Math.atan2(r, w) / r : 0; + + out[0] = x * t; + out[1] = y * t; + out[2] = z * t; + out[3] = 0.5 * Math.log(x * x + y * y + z * z + w * w); + + return out; +} + +/** + * Calculate the scalar power of a unit quaternion. + * + * @param {quat} out the receiving quaternion + * @param {ReadonlyQuat} a quat to calculate the exponential of + * @param {Number} b amount to scale the quaternion by + * @returns {quat} out + */ +export function pow(out: quat, a: ReadonlyQuat, b: f64): quat { + ln(out, a); + scale(out, out, b); + exp(out, out); + return out; +} + +/** + * Performs a spherical linear interpolation between two quat + * + * @param {quat} out the receiving quaternion + * @param {ReadonlyQuat} a the first operand + * @param {ReadonlyQuat} b the second operand + * @param {Number} t interpolation amount, in the range [0-1], between the two inputs + * @returns {quat} out + */ +export function slerp(out: quat, a: ReadonlyQuat, b: ReadonlyQuat, t: f64): quat { + // benchmarks: + // http://jsperf.com/quaternion-slerp-implementations + let ax = a[0], + ay = a[1], + az = a[2], + aw = a[3]; + let bx = b[0], + by = b[1], + bz = b[2], + bw = b[3]; + + let omega: f64, cosom: f64, sinom: f64, scale0: f64, scale1: f64; + + // calc cosine + cosom = ax * bx + ay * by + az * bz + aw * bw; + // adjust signs (if necessary) + if (cosom < 0.0) { + cosom = -cosom; + bx = -bx; + by = -by; + bz = -bz; + bw = -bw; + } + // calculate coefficients + if (1.0 - cosom > glMatrix.EPSILON) { + // standard case (slerp) + omega = Math.acos(cosom); + sinom = Math.sin(omega); + scale0 = Math.sin((1.0 - t) * omega) / sinom; + scale1 = Math.sin(t * omega) / sinom; + } else { + // "from" and "to" quaternions are very close + // ... so we can do a linear interpolation + scale0 = 1.0 - t; + scale1 = t; + } + // calculate final values + out[0] = scale0 * ax + scale1 * bx; + out[1] = scale0 * ay + scale1 * by; + out[2] = scale0 * az + scale1 * bz; + out[3] = scale0 * aw + scale1 * bw; + + return out; +} + +/** + * Generates a random unit quaternion + * + * @param {quat} out the receiving quaternion + * @returns {quat} out + */ +export function random(out: quat): quat { + // Implementation of http://planning.cs.uiuc.edu/node198.html + // TODO: Calling random 3 times is probably not the fastest solution + let u1 = glMatrix.RANDOM(); + let u2 = glMatrix.RANDOM(); + let u3 = glMatrix.RANDOM(); + + let sqrt1MinusU1 = Math.sqrt(1 - u1); + let sqrtU1 = Math.sqrt(u1); + + out[0] = sqrt1MinusU1 * Math.sin(2.0 * Math.PI * u2); + out[1] = sqrt1MinusU1 * Math.cos(2.0 * Math.PI * u2); + out[2] = sqrtU1 * Math.sin(2.0 * Math.PI * u3); + out[3] = sqrtU1 * Math.cos(2.0 * Math.PI * u3); + return out; +} + +/** + * Calculates the inverse of a quat + * + * @param {quat} out the receiving quaternion + * @param {ReadonlyQuat} a quat to calculate inverse of + * @returns {quat} out + */ +export function invert(out: quat, a: ReadonlyQuat): quat { + let a0 = a[0], + a1 = a[1], + a2 = a[2], + a3 = a[3]; + let dot = a0 * a0 + a1 * a1 + a2 * a2 + a3 * a3; + let invDot = dot ? 1.0 / dot : 0; + + // TODO: Would be faster to return [0,0,0,0] immediately if dot == 0 + + out[0] = -a0 * invDot; + out[1] = -a1 * invDot; + out[2] = -a2 * invDot; + out[3] = a3 * invDot; + return out; +} + +/** + * Calculates the conjugate of a quat + * If the quaternion is normalized, this function is faster than quat.inverse and produces the same result. + * + * @param {quat} out the receiving quaternion + * @param {ReadonlyQuat} a quat to calculate conjugate of + * @returns {quat} out + */ +export function conjugate(out: quat, a: ReadonlyQuat): quat { + out[0] = -a[0]; + out[1] = -a[1]; + out[2] = -a[2]; + out[3] = a[3]; + return out; +} + +/** + * Creates a quaternion from the given 3x3 rotation matrix. + * + * NOTE: The resultant quaternion is not normalized, so you should be sure + * to renormalize the quaternion yourself where necessary. + * + * @param {quat} out the receiving quaternion + * @param {ReadonlyMat3} m rotation matrix + * @returns {quat} out + * @function + */ +export function fromMat3(out: quat, m: mat3.ReadonlyMat3): quat { + // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes + // article "Quaternion Calculus and Fast Animation". + let fTrace = m[0] + m[4] + m[8]; + let fRoot: f64; + + if (fTrace > 0.0) { + // |w| > 1/2, may as well choose w > 1/2 + fRoot = Math.sqrt(fTrace + 1.0); // 2w + out[3] = 0.5 * fRoot; + fRoot = 0.5 / fRoot; // 1/(4w) + out[0] = (m[5] - m[7]) * fRoot; + out[1] = (m[6] - m[2]) * fRoot; + out[2] = (m[1] - m[3]) * fRoot; + } else { + // |w| <= 1/2 + let i = 0; + if (m[4] > m[0]) i = 1; + if (m[8] > m[i * 3 + i]) i = 2; + let j = (i + 1) % 3; + let k = (i + 2) % 3; + + fRoot = Math.sqrt(m[i * 3 + i] - m[j * 3 + j] - m[k * 3 + k] + 1.0); + out[i] = 0.5 * fRoot; + fRoot = 0.5 / fRoot; + out[3] = (m[j * 3 + k] - m[k * 3 + j]) * fRoot; + out[j] = (m[j * 3 + i] + m[i * 3 + j]) * fRoot; + out[k] = (m[k * 3 + i] + m[i * 3 + k]) * fRoot; + } + + return out; +} + +type x = f64; +type y = f64; +type z = f64; + +/** + * Creates a quaternion from the given euler angle x, y, z using the provided intrinsic order for the conversion. + * + * @param {quat} out the receiving quaternion + * @param {x} x Angle to rotate around X axis in degrees. + * @param {y} y Angle to rotate around Y axis in degrees. + * @param {z} z Angle to rotate around Z axis in degrees. + * @param {'zyx'|'xyz'|'yxz'|'yzx'|'zxy'|'zyx'} order Intrinsic order for conversion, default is zyx. + * @returns {quat} out + * @function + */ +export function fromEuler(out: quat, x: x, y: y, z: z, order: string = glMatrix.ANGLE_ORDER): quat { + let halfToRad = Math.PI / 360; + x *= halfToRad; + z *= halfToRad; + y *= halfToRad; + + let sx = Math.sin(x); + let cx = Math.cos(x); + let sy = Math.sin(y); + let cy = Math.cos(y); + let sz = Math.sin(z); + let cz = Math.cos(z); + + switch (order) { + case "xyz": + out[0] = sx * cy * cz + cx * sy * sz; + out[1] = cx * sy * cz - sx * cy * sz; + out[2] = cx * cy * sz + sx * sy * cz; + out[3] = cx * cy * cz - sx * sy * sz; + break; + + case "xzy": + out[0] = sx * cy * cz - cx * sy * sz; + out[1] = cx * sy * cz - sx * cy * sz; + out[2] = cx * cy * sz + sx * sy * cz; + out[3] = cx * cy * cz + sx * sy * sz; + break; + + case "yxz": + out[0] = sx * cy * cz + cx * sy * sz; + out[1] = cx * sy * cz - sx * cy * sz; + out[2] = cx * cy * sz - sx * sy * cz; + out[3] = cx * cy * cz + sx * sy * sz; + break; + + case "yzx": + out[0] = sx * cy * cz + cx * sy * sz; + out[1] = cx * sy * cz + sx * cy * sz; + out[2] = cx * cy * sz - sx * sy * cz; + out[3] = cx * cy * cz - sx * sy * sz; + break; + + case "zxy": + out[0] = sx * cy * cz - cx * sy * sz; + out[1] = cx * sy * cz + sx * cy * sz; + out[2] = cx * cy * sz + sx * sy * cz; + out[3] = cx * cy * cz - sx * sy * sz; + break; + + case "zyx": + out[0] = sx * cy * cz - cx * sy * sz; + out[1] = cx * sy * cz + sx * cy * sz; + out[2] = cx * cy * sz - sx * sy * cz; + out[3] = cx * cy * cz + sx * sy * sz; + break; + + default: + throw new Error('Unknown angle order ' + order); + } + + return out; +} + +/** + * Returns a string representation of a quaternion + * + * @param {ReadonlyQuat} a vector to represent as a string + * @returns {String} string representation of the vector + */ +export function str(a: ReadonlyQuat): string { + return "quat(" + a[0].toString() + ", " + a[1].toString() + ", " + a[2].toString() + ", " + a[3].toString() + ")"; +} + +/** + * Creates a new quat initialized with values from an existing quaternion + * + * @param {ReadonlyQuat} a quaternion to clone + * @returns {quat} a new quaternion + * @function + */ +export const clone = vec4.clone; + +/** + * Creates a new quat initialized with the given values + * + * @param {Number} x X component + * @param {Number} y Y component + * @param {Number} z Z component + * @param {Number} w W component + * @returns {quat} a new quaternion + * @function + */ +export const fromValues = vec4.fromValues; + +/** + * Copy the values from one quat to another + * + * @param {quat} out the receiving quaternion + * @param {ReadonlyQuat} a the source quaternion + * @returns {quat} out + * @function + */ +export const copy = vec4.copy; + +/** + * Set the components of a quat to the given values + * + * @param {quat} out the receiving quaternion + * @param {Number} x X component + * @param {Number} y Y component + * @param {Number} z Z component + * @param {Number} w W component + * @returns {quat} out + * @function + */ +export const set = vec4.set; + +/** + * Adds two quat's + * + * @param {quat} out the receiving quaternion + * @param {ReadonlyQuat} a the first operand + * @param {ReadonlyQuat} b the second operand + * @returns {quat} out + * @function + */ +export const add = vec4.add; + +/** + * Alias for {@link quat.multiply} + * @function + */ +export const mul = multiply; + +/** + * Scales a quat by a scalar number + * + * @param {quat} out the receiving vector + * @param {ReadonlyQuat} a the vector to scale + * @param {Number} b amount to scale the vector by + * @returns {quat} out + * @function + */ +export const scale = vec4.scale; + +/** + * Calculates the dot product of two quat's + * + * @param {ReadonlyQuat} a the first operand + * @param {ReadonlyQuat} b the second operand + * @returns {Number} dot product of a and b + * @function + */ +export const dot = vec4.dot; + +/** + * Performs a linear interpolation between two quat's + * + * @param {quat} out the receiving quaternion + * @param {ReadonlyQuat} a the first operand + * @param {ReadonlyQuat} b the second operand + * @param {Number} t interpolation amount, in the range [0-1], between the two inputs + * @returns {quat} out + * @function + */ +export const lerp = vec4.lerp; + +/** + * Calculates the length of a quat + * + * @param {ReadonlyQuat} a vector to calculate length of + * @returns {Number} length of a + */ +export const length = vec4.length; + +/** + * Alias for {@link quat.length} + * @function + */ +export const len = length; + +/** + * Calculates the squared length of a quat + * + * @param {ReadonlyQuat} a vector to calculate squared length of + * @returns {Number} squared length of a + * @function + */ +export const squaredLength = vec4.squaredLength; + +/** + * Alias for {@link quat.squaredLength} + * @function + */ +export const sqrLen = squaredLength; + +/** + * Normalize a quat + * + * @param {quat} out the receiving quaternion + * @param {ReadonlyQuat} a quaternion to normalize + * @returns {quat} out + * @function + */ +export const normalize = vec4.normalize; + +/** + * Returns whether or not the quaternions have exactly the same elements in the same position (when compared with ===) + * + * @param {ReadonlyQuat} a The first quaternion. + * @param {ReadonlyQuat} b The second quaternion. + * @returns {Boolean} True if the vectors are equal, false otherwise. + */ +export const exactEquals = vec4.exactEquals; + +/** + * Returns whether or not the quaternions point approximately to the same direction. + * + * Both quaternions are assumed to be unit length. + * + * @param {ReadonlyQuat} a The first unit quaternion. + * @param {ReadonlyQuat} b The second unit quaternion. + * @returns {Boolean} True if the quaternions are equal, false otherwise. + */ +export function equals(a: ReadonlyQuat, b: ReadonlyQuat): bool { + return Math.abs(vec4.dot(a, b)) >= 1 - glMatrix.EPSILON; +} + +/** + * Sets a quaternion to represent the shortest rotation from one + * vector to another. + * + * Both vectors are assumed to be unit length. + * + * @param {quat} out the receiving quaternion. + * @param {ReadonlyVec3} a the initial vector + * @param {ReadonlyVec3} b the destination vector + * @returns {quat} out + */ +export const rotationTo: () => (out: quat, a: ReadonlyQuat, b: ReadonlyQuat) => quat = (() => { + let tmpvec3 = vec3.create(); + let xUnitVec3 = vec3.fromValues(1, 0, 0); + let yUnitVec3 = vec3.fromValues(0, 1, 0); + + return function (out: quat, a: ReadonlyQuat, b: ReadonlyQuat) { + let dot = vec3.dot(a, b); + if (dot < -0.999999) { + vec3.cross(tmpvec3, xUnitVec3, a); + if (vec3.len(tmpvec3) < 0.000001) vec3.cross(tmpvec3, yUnitVec3, a); + vec3.normalize(tmpvec3, tmpvec3); + setAxisAngle(out, tmpvec3, Math.PI); + return out; + } else if (dot > 0.999999) { + out[0] = 0; + out[1] = 0; + out[2] = 0; + out[3] = 1; + return out; + } else { + vec3.cross(tmpvec3, a, b); + out[0] = tmpvec3[0]; + out[1] = tmpvec3[1]; + out[2] = tmpvec3[2]; + out[3] = 1 + dot; + return normalize(out, out); + } + }; +})(); + +/** + * Performs a spherical linear interpolation with two control points + * + * @param {quat} out the receiving quaternion + * @param {ReadonlyQuat} a the first operand + * @param {ReadonlyQuat} b the second operand + * @param {ReadonlyQuat} c the third operand + * @param {ReadonlyQuat} d the fourth operand + * @param {Number} t interpolation amount, in the range [0-1], between the two inputs + * @returns {quat} out + */ +export const sqlerp: () => (out: quat, a: ReadonlyQuat, b: ReadonlyQuat, c: ReadonlyQuat, d: ReadonlyQuat, t: f64) => quat = (() => { + let temp1 = create(); + let temp2 = create(); + + return function (out: quat, a: ReadonlyQuat, b: ReadonlyQuat, c: ReadonlyQuat, d: ReadonlyQuat, t: f64) { + slerp(temp1, a, d, t); + slerp(temp2, b, c, t); + slerp(out, temp1, temp2, 2 * t * (1 - t)); + + return out; + }; +})(); + +/** + * Sets the specified quaternion with values corresponding to the given + * axes. Each axis is a vec3 and is expected to be unit length and + * perpendicular to all other specified axes. + * + * @param {quat} out the receiving quaternion + * @param {ReadonlyVec3} view the vector representing the viewing direction + * @param {ReadonlyVec3} right the vector representing the local "right" direction + * @param {ReadonlyVec3} up the vector representing the local "up" direction + * @returns {quat} out + */ +export const setAxes: () => (out: quat, view: vec3.ReadonlyVec3, right: vec3.ReadonlyVec3, up: vec3.ReadonlyVec3) => quat = (() => { + let matr = mat3.create(); + + return function (out: quat, view: vec3.ReadonlyVec3, right: vec3.ReadonlyVec3, up: vec3.ReadonlyVec3) { + matr[0] = right[0]; + matr[3] = right[1]; + matr[6] = right[2]; + + matr[1] = up[0]; + matr[4] = up[1]; + matr[7] = up[2]; + + matr[2] = -view[0]; + matr[5] = -view[1]; + matr[8] = -view[2]; + + return normalize(out, fromMat3(out, matr)); + }; +})(); diff --git a/assembly/quat2.ts b/assembly/quat2.ts new file mode 100644 index 00000000..53a0b51b --- /dev/null +++ b/assembly/quat2.ts @@ -0,0 +1,926 @@ +import * as glMatrix from "./common"; +import { MathUtil } from "./imports"; +import * as mat4 from "./mat4"; +import * as quat from "./quat"; +import * as vec3 from "./vec3"; + +export default class quat2 extends Float64Array {} + +export class ReadonlyQuat2 extends quat2 {} + +/** + * Dual Quaternion
+ * Format: [real, dual]
+ * Quaternion format: XYZW
+ * Make sure to have normalized dual quaternions, otherwise the functions may not work as intended.
+ * @module quat2 + */ + +/** + * Creates a new identity dual quat + * + * @returns {quat2} a new dual quaternion [real -> rotation, dual -> translation] + */ +export function create(): quat2 { + let dq = new quat2(8); + //if (glMatrix.ARRAY_TYPE != Float32Array) { + dq[0] = 0; + dq[1] = 0; + dq[2] = 0; + dq[4] = 0; + dq[5] = 0; + dq[6] = 0; + dq[7] = 0; + //} + dq[3] = 1; + return dq; +} + +/** + * Creates a new quat initialized with values from an existing quaternion + * + * @param {ReadonlyQuat2} a dual quaternion to clone + * @returns {quat2} new dual quaternion + * @function + */ +export function clone(a: ReadonlyQuat2): quat2 { + let dq = new quat2(8); + dq[0] = a[0]; + dq[1] = a[1]; + dq[2] = a[2]; + dq[3] = a[3]; + dq[4] = a[4]; + dq[5] = a[5]; + dq[6] = a[6]; + dq[7] = a[7]; + return dq; +} + +/** + * Creates a new dual quat initialized with the given values + * + * @param {Number} x1 X component + * @param {Number} y1 Y component + * @param {Number} z1 Z component + * @param {Number} w1 W component + * @param {Number} x2 X component + * @param {Number} y2 Y component + * @param {Number} z2 Z component + * @param {Number} w2 W component + * @returns {quat2} new dual quaternion + * @function + */ +export function fromValues(x1: f64, y1: f64, z1: f64, w1: f64, x2: f64, y2: f64, z2: f64, w2: f64): quat2 { + let dq = new quat2(8); + dq[0] = x1; + dq[1] = y1; + dq[2] = z1; + dq[3] = w1; + dq[4] = x2; + dq[5] = y2; + dq[6] = z2; + dq[7] = w2; + return dq; +} + +/** + * Creates a new dual quat from the given values (quat and translation) + * + * @param {Number} x1 X component + * @param {Number} y1 Y component + * @param {Number} z1 Z component + * @param {Number} w1 W component + * @param {Number} x2 X component (translation) + * @param {Number} y2 Y component (translation) + * @param {Number} z2 Z component (translation) + * @returns {quat2} new dual quaternion + * @function + */ +export function fromRotationTranslationValues(x1: f64, y1: f64, z1: f64, w1: f64, x2: f64, y2: f64, z2: f64): quat2 { + let dq = new quat2(8); + dq[0] = x1; + dq[1] = y1; + dq[2] = z1; + dq[3] = w1; + let ax = x2 * 0.5, + ay = y2 * 0.5, + az = z2 * 0.5; + dq[4] = ax * w1 + ay * z1 - az * y1; + dq[5] = ay * w1 + az * x1 - ax * z1; + dq[6] = az * w1 + ax * y1 - ay * x1; + dq[7] = -ax * x1 - ay * y1 - az * z1; + return dq; +} + +/** + * Creates a dual quat from a quaternion and a translation + * + * @param {quat2} out quaternion receiving operation result + * @param {ReadonlyQuat} q a normalized quaternion + * @param {ReadonlyVec3} t translation vector + * @returns {quat2} dual quaternion receiving operation result + * @function + */ +export function fromRotationTranslation(out: quat2, q: quat.ReadonlyQuat, t: vec3.ReadonlyVec3): quat2 { + let ax = t[0] * 0.5, + ay = t[1] * 0.5, + az = t[2] * 0.5, + bx = q[0], + by = q[1], + bz = q[2], + bw = q[3]; + out[0] = bx; + out[1] = by; + out[2] = bz; + out[3] = bw; + out[4] = ax * bw + ay * bz - az * by; + out[5] = ay * bw + az * bx - ax * bz; + out[6] = az * bw + ax * by - ay * bx; + out[7] = -ax * bx - ay * by - az * bz; + return out; +} + +/** + * Creates a dual quat from a translation + * + * @param {quat2} out quaternion receiving operation result + * @param {ReadonlyVec3} t translation vector + * @returns {quat2} out quaternion receiving operation result + * @function + */ +export function fromTranslation(out: quat2, t: vec3.ReadonlyVec3): quat2 { + out[0] = 0; + out[1] = 0; + out[2] = 0; + out[3] = 1; + out[4] = t[0] * 0.5; + out[5] = t[1] * 0.5; + out[6] = t[2] * 0.5; + out[7] = 0; + return out; +} + +/** + * Creates a dual quat from a quaternion + * + * @param {quat2} out quaternion receiving operation result + * @param {ReadonlyQuat} q the quaternion + * @returns {quat2} out quaternion receiving operation result + * @function + */ +export function fromRotation(out: quat2, q: quat.ReadonlyQuat): quat2 { + out[0] = q[0]; + out[1] = q[1]; + out[2] = q[2]; + out[3] = q[3]; + out[4] = 0; + out[5] = 0; + out[6] = 0; + out[7] = 0; + return out; +} + +/** + * Creates a new dual quat from a matrix (4x4) + * + * @param {quat2} out the dual quaternion + * @param {ReadonlyMat4} a the matrix + * @returns {quat2} dual quat receiving operation result + * @function + */ +export function fromMat4(out: quat2, a: mat4.ReadonlyMat4): quat2 { + //TODO Optimize this + let outer = quat.create(); + mat4.getRotation(outer, a); + let t = new vec3.vec3(3); + mat4.getTranslation(t, a); + fromRotationTranslation(out, outer, t); + return out; +} + +/** + * Copy the values from one dual quat to another + * + * @param {quat2} out the receiving dual quaternion + * @param {ReadonlyQuat2} a the source dual quaternion + * @returns {quat2} out + * @function + */ +export function copy(out: quat2, a: ReadonlyQuat2): quat2 { + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[3]; + out[4] = a[4]; + out[5] = a[5]; + out[6] = a[6]; + out[7] = a[7]; + return out; +} + +/** + * Set a dual quat to the identity dual quaternion + * + * @param {quat2} out the receiving quaternion + * @returns {quat2} out + */ +export function identity(out: quat2): quat2 { + out[0] = 0; + out[1] = 0; + out[2] = 0; + out[3] = 1; + out[4] = 0; + out[5] = 0; + out[6] = 0; + out[7] = 0; + return out; +} + +/** + * Set the components of a dual quat to the given values + * + * @param {quat2} out the receiving quaternion + * @param {Number} x1 X component + * @param {Number} y1 Y component + * @param {Number} z1 Z component + * @param {Number} w1 W component + * @param {Number} x2 X component + * @param {Number} y2 Y component + * @param {Number} z2 Z component + * @param {Number} w2 W component + * @returns {quat2} out + * @function + */ +export function set(out: quat2, x1: f64, y1: f64, z1: f64, w1: f64, x2: f64, y2: f64, z2: f64, w2: f64): quat2 { + out[0] = x1; + out[1] = y1; + out[2] = z1; + out[3] = w1; + + out[4] = x2; + out[5] = y2; + out[6] = z2; + out[7] = w2; + return out; +} + +/** + * Gets the real part of a dual quat + * @param {quat} out real part + * @param {ReadonlyQuat2} a Dual Quaternion + * @return {quat} real part + */ +export const getReal = quat.copy; + +/** + * Gets the dual part of a dual quat + * @param {quat} out dual part + * @param {ReadonlyQuat2} a Dual Quaternion + * @return {quat} dual part + */ +export function getDual(out: quat.quat, a: ReadonlyQuat2): quat.quat { + out[0] = a[4]; + out[1] = a[5]; + out[2] = a[6]; + out[3] = a[7]; + return out; +} + +/** + * Set the real component of a dual quat to the given quaternion + * + * @param {quat2} out the receiving quaternion + * @param {ReadonlyQuat} q a quaternion representing the real part + * @returns {quat2} out + * @function + */ +export const setReal = quat.copy; + +/** + * Set the dual component of a dual quat to the given quaternion + * + * @param {quat2} out the receiving quaternion + * @param {ReadonlyQuat} q a quaternion representing the dual part + * @returns {quat2} out + * @function + */ +export function setDual(out: quat2, q: quat.ReadonlyQuat): quat2 { + out[4] = q[0]; + out[5] = q[1]; + out[6] = q[2]; + out[7] = q[3]; + return out; +} + +/** + * Gets the translation of a normalized dual quat + * @param {vec3} out translation + * @param {ReadonlyQuat2} a Dual Quaternion to be decomposed + * @return {vec3} translation + */ +export function getTranslation(out: vec3.vec3, a: ReadonlyQuat2): vec3.vec3 { + let ax = a[4], + ay = a[5], + az = a[6], + aw = a[7], + bx = -a[0], + by = -a[1], + bz = -a[2], + bw = a[3]; + out[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2; + out[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2; + out[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2; + return out; +} + +/** + * Translates a dual quat by the given vector + * + * @param {quat2} out the receiving dual quaternion + * @param {ReadonlyQuat2} a the dual quaternion to translate + * @param {ReadonlyVec3} v vector to translate by + * @returns {quat2} out + */ +export function translate(out: quat2, a: ReadonlyQuat2, v: vec3.ReadonlyVec3): quat2 { + let ax1 = a[0], + ay1 = a[1], + az1 = a[2], + aw1 = a[3], + bx1 = v[0] * 0.5, + by1 = v[1] * 0.5, + bz1 = v[2] * 0.5, + ax2 = a[4], + ay2 = a[5], + az2 = a[6], + aw2 = a[7]; + out[0] = ax1; + out[1] = ay1; + out[2] = az1; + out[3] = aw1; + out[4] = aw1 * bx1 + ay1 * bz1 - az1 * by1 + ax2; + out[5] = aw1 * by1 + az1 * bx1 - ax1 * bz1 + ay2; + out[6] = aw1 * bz1 + ax1 * by1 - ay1 * bx1 + az2; + out[7] = -ax1 * bx1 - ay1 * by1 - az1 * bz1 + aw2; + return out; +} + +/** + * Rotates a dual quat around the X axis + * + * @param {quat2} out the receiving dual quaternion + * @param {ReadonlyQuat2} a the dual quaternion to rotate + * @param {number} rad how far should the rotation be + * @returns {quat2} out + */ +export function rotateX(out: quat2, a: ReadonlyQuat2, rad: f64): quat2 { + let bx = -a[0], + by = -a[1], + bz = -a[2], + bw = a[3], + ax = a[4], + ay = a[5], + az = a[6], + aw = a[7], + ax1 = ax * bw + aw * bx + ay * bz - az * by, + ay1 = ay * bw + aw * by + az * bx - ax * bz, + az1 = az * bw + aw * bz + ax * by - ay * bx, + aw1 = aw * bw - ax * bx - ay * by - az * bz; + quat.rotateX(out, a, rad); + bx = out[0]; + by = out[1]; + bz = out[2]; + bw = out[3]; + out[4] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by; + out[5] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz; + out[6] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx; + out[7] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz; + return out; +} + +/** + * Rotates a dual quat around the Y axis + * + * @param {quat2} out the receiving dual quaternion + * @param {ReadonlyQuat2} a the dual quaternion to rotate + * @param {number} rad how far should the rotation be + * @returns {quat2} out + */ +export function rotateY(out: quat2, a: ReadonlyQuat2, rad: f64): quat2 { + let bx = -a[0], + by = -a[1], + bz = -a[2], + bw = a[3], + ax = a[4], + ay = a[5], + az = a[6], + aw = a[7], + ax1 = ax * bw + aw * bx + ay * bz - az * by, + ay1 = ay * bw + aw * by + az * bx - ax * bz, + az1 = az * bw + aw * bz + ax * by - ay * bx, + aw1 = aw * bw - ax * bx - ay * by - az * bz; + quat.rotateY(out, a, rad); + bx = out[0]; + by = out[1]; + bz = out[2]; + bw = out[3]; + out[4] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by; + out[5] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz; + out[6] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx; + out[7] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz; + return out; +} + +/** + * Rotates a dual quat around the Z axis + * + * @param {quat2} out the receiving dual quaternion + * @param {ReadonlyQuat2} a the dual quaternion to rotate + * @param {number} rad how far should the rotation be + * @returns {quat2} out + */ +export function rotateZ(out: quat2, a: ReadonlyQuat2, rad: f64): quat2 { + let bx = -a[0], + by = -a[1], + bz = -a[2], + bw = a[3], + ax = a[4], + ay = a[5], + az = a[6], + aw = a[7], + ax1 = ax * bw + aw * bx + ay * bz - az * by, + ay1 = ay * bw + aw * by + az * bx - ax * bz, + az1 = az * bw + aw * bz + ax * by - ay * bx, + aw1 = aw * bw - ax * bx - ay * by - az * bz; + quat.rotateZ(out, a, rad); + bx = out[0]; + by = out[1]; + bz = out[2]; + bw = out[3]; + out[4] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by; + out[5] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz; + out[6] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx; + out[7] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz; + return out; +} + +/** + * Rotates a dual quat by a given quaternion (a * q) + * + * @param {quat2} out the receiving dual quaternion + * @param {ReadonlyQuat2} a the dual quaternion to rotate + * @param {ReadonlyQuat} q quaternion to rotate by + * @returns {quat2} out + */ +export function rotateByQuatAppend(out: quat2, a: ReadonlyQuat2, q: quat.ReadonlyQuat): quat2 { + let qx = q[0], + qy = q[1], + qz = q[2], + qw = q[3], + ax = a[0], + ay = a[1], + az = a[2], + aw = a[3]; + + out[0] = ax * qw + aw * qx + ay * qz - az * qy; + out[1] = ay * qw + aw * qy + az * qx - ax * qz; + out[2] = az * qw + aw * qz + ax * qy - ay * qx; + out[3] = aw * qw - ax * qx - ay * qy - az * qz; + ax = a[4]; + ay = a[5]; + az = a[6]; + aw = a[7]; + out[4] = ax * qw + aw * qx + ay * qz - az * qy; + out[5] = ay * qw + aw * qy + az * qx - ax * qz; + out[6] = az * qw + aw * qz + ax * qy - ay * qx; + out[7] = aw * qw - ax * qx - ay * qy - az * qz; + return out; +} + +/** + * Rotates a dual quat by a given quaternion (q * a) + * + * @param {quat2} out the receiving dual quaternion + * @param {ReadonlyQuat} q quaternion to rotate by + * @param {ReadonlyQuat2} a the dual quaternion to rotate + * @returns {quat2} out + */ +export function rotateByQuatPrepend(out: quat2, q: quat.ReadonlyQuat, a: ReadonlyQuat2): quat2 { + let qx = q[0], + qy = q[1], + qz = q[2], + qw = q[3], + bx = a[0], + by = a[1], + bz = a[2], + bw = a[3]; + + out[0] = qx * bw + qw * bx + qy * bz - qz * by; + out[1] = qy * bw + qw * by + qz * bx - qx * bz; + out[2] = qz * bw + qw * bz + qx * by - qy * bx; + out[3] = qw * bw - qx * bx - qy * by - qz * bz; + bx = a[4]; + by = a[5]; + bz = a[6]; + bw = a[7]; + out[4] = qx * bw + qw * bx + qy * bz - qz * by; + out[5] = qy * bw + qw * by + qz * bx - qx * bz; + out[6] = qz * bw + qw * bz + qx * by - qy * bx; + out[7] = qw * bw - qx * bx - qy * by - qz * bz; + return out; +} + +/** + * Rotates a dual quat around a given axis. Does the normalisation automatically + * + * @param {quat2} out the receiving dual quaternion + * @param {ReadonlyQuat2} a the dual quaternion to rotate + * @param {ReadonlyVec3} axis the axis to rotate around + * @param {Number} rad how far the rotation should be + * @returns {quat2} out + */ +export function rotateAroundAxis(out: quat2, a: ReadonlyQuat2, axis: vec3.ReadonlyVec3, rad: f64): quat2 { + //Special case for rad = 0 + if (Math.abs(rad) < glMatrix.EPSILON) { + return copy(out, a); + } + let axisLength = MathUtil.hypot(axis[0], axis[1], axis[2]); + + rad = rad * 0.5; + let s = Math.sin(rad); + let bx = (s * axis[0]) / axisLength; + let by = (s * axis[1]) / axisLength; + let bz = (s * axis[2]) / axisLength; + let bw = Math.cos(rad); + + let ax1 = a[0], + ay1 = a[1], + az1 = a[2], + aw1 = a[3]; + out[0] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by; + out[1] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz; + out[2] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx; + out[3] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz; + + let ax = a[4], + ay = a[5], + az = a[6], + aw = a[7]; + out[4] = ax * bw + aw * bx + ay * bz - az * by; + out[5] = ay * bw + aw * by + az * bx - ax * bz; + out[6] = az * bw + aw * bz + ax * by - ay * bx; + out[7] = aw * bw - ax * bx - ay * by - az * bz; + + return out; +} + +/** + * Adds two dual quat's + * + * @param {quat2} out the receiving dual quaternion + * @param {ReadonlyQuat2} a the first operand + * @param {ReadonlyQuat2} b the second operand + * @returns {quat2} out + * @function + */ +export function add(out: quat2, a: ReadonlyQuat2, b: ReadonlyQuat2): quat2 { + out[0] = a[0] + b[0]; + out[1] = a[1] + b[1]; + out[2] = a[2] + b[2]; + out[3] = a[3] + b[3]; + out[4] = a[4] + b[4]; + out[5] = a[5] + b[5]; + out[6] = a[6] + b[6]; + out[7] = a[7] + b[7]; + return out; +} + +/** + * Multiplies two dual quat's + * + * @param {quat2} out the receiving dual quaternion + * @param {ReadonlyQuat2} a the first operand + * @param {ReadonlyQuat2} b the second operand + * @returns {quat2} out + */ +export function multiply(out: quat2, a: ReadonlyQuat2, b: ReadonlyQuat2): quat2 { + let ax0 = a[0], + ay0 = a[1], + az0 = a[2], + aw0 = a[3], + bx1 = b[4], + by1 = b[5], + bz1 = b[6], + bw1 = b[7], + ax1 = a[4], + ay1 = a[5], + az1 = a[6], + aw1 = a[7], + bx0 = b[0], + by0 = b[1], + bz0 = b[2], + bw0 = b[3]; + out[0] = ax0 * bw0 + aw0 * bx0 + ay0 * bz0 - az0 * by0; + out[1] = ay0 * bw0 + aw0 * by0 + az0 * bx0 - ax0 * bz0; + out[2] = az0 * bw0 + aw0 * bz0 + ax0 * by0 - ay0 * bx0; + out[3] = aw0 * bw0 - ax0 * bx0 - ay0 * by0 - az0 * bz0; + out[4] = + ax0 * bw1 + + aw0 * bx1 + + ay0 * bz1 - + az0 * by1 + + ax1 * bw0 + + aw1 * bx0 + + ay1 * bz0 - + az1 * by0; + out[5] = + ay0 * bw1 + + aw0 * by1 + + az0 * bx1 - + ax0 * bz1 + + ay1 * bw0 + + aw1 * by0 + + az1 * bx0 - + ax1 * bz0; + out[6] = + az0 * bw1 + + aw0 * bz1 + + ax0 * by1 - + ay0 * bx1 + + az1 * bw0 + + aw1 * bz0 + + ax1 * by0 - + ay1 * bx0; + out[7] = + aw0 * bw1 - + ax0 * bx1 - + ay0 * by1 - + az0 * bz1 + + aw1 * bw0 - + ax1 * bx0 - + ay1 * by0 - + az1 * bz0; + return out; +} + +/** + * Alias for {@link quat2.multiply} + * @function + */ +export const mul = multiply; + +/** + * Scales a dual quat by a scalar number + * + * @param {quat2} out the receiving dual quat + * @param {ReadonlyQuat2} a the dual quat to scale + * @param {Number} b amount to scale the dual quat by + * @returns {quat2} out + * @function + */ +export function scale(out: quat2, a: ReadonlyQuat2, b: f64): quat2 { + out[0] = a[0] * b; + out[1] = a[1] * b; + out[2] = a[2] * b; + out[3] = a[3] * b; + out[4] = a[4] * b; + out[5] = a[5] * b; + out[6] = a[6] * b; + out[7] = a[7] * b; + return out; +} + +/** + * Calculates the dot product of two dual quat's (The dot product of the real parts) + * + * @param {ReadonlyQuat2} a the first operand + * @param {ReadonlyQuat2} b the second operand + * @returns {Number} dot product of a and b + * @function + */ +export const dot = quat.dot; + +/** + * Performs a linear interpolation between two dual quats's + * NOTE: The resulting dual quaternions won't always be normalized (The error is most noticeable when t = 0.5) + * + * @param {quat2} out the receiving dual quat + * @param {ReadonlyQuat2} a the first operand + * @param {ReadonlyQuat2} b the second operand + * @param {Number} t interpolation amount, in the range [0-1], between the two inputs + * @returns {quat2} out + */ +export function lerp(out: quat2, a: ReadonlyQuat2, b: ReadonlyQuat2, t: f64): quat2 { + let mt = 1 - t; + if (dot(a, b) < 0) t = -t; + + out[0] = a[0] * mt + b[0] * t; + out[1] = a[1] * mt + b[1] * t; + out[2] = a[2] * mt + b[2] * t; + out[3] = a[3] * mt + b[3] * t; + out[4] = a[4] * mt + b[4] * t; + out[5] = a[5] * mt + b[5] * t; + out[6] = a[6] * mt + b[6] * t; + out[7] = a[7] * mt + b[7] * t; + + return out; +} + +/** + * Calculates the inverse of a dual quat. If they are normalized, conjugate is cheaper + * + * @param {quat2} out the receiving dual quaternion + * @param {ReadonlyQuat2} a dual quat to calculate inverse of + * @returns {quat2} out + */ +export function invert(out: quat2, a: ReadonlyQuat2): quat2 { + let sqlen = squaredLength(a); + out[0] = -a[0] / sqlen; + out[1] = -a[1] / sqlen; + out[2] = -a[2] / sqlen; + out[3] = a[3] / sqlen; + out[4] = -a[4] / sqlen; + out[5] = -a[5] / sqlen; + out[6] = -a[6] / sqlen; + out[7] = a[7] / sqlen; + return out; +} + +/** + * Calculates the conjugate of a dual quat + * If the dual quaternion is normalized, this function is faster than quat2.inverse and produces the same result. + * + * @param {quat2} out the receiving quaternion + * @param {ReadonlyQuat2} a quat to calculate conjugate of + * @returns {quat2} out + */ +export function conjugate(out: quat2, a: ReadonlyQuat2): quat2 { + out[0] = -a[0]; + out[1] = -a[1]; + out[2] = -a[2]; + out[3] = a[3]; + out[4] = -a[4]; + out[5] = -a[5]; + out[6] = -a[6]; + out[7] = a[7]; + return out; +} + +/** + * Calculates the length of a dual quat + * + * @param {ReadonlyQuat2} a dual quat to calculate length of + * @returns {Number} length of a + * @function + */ +export const length = quat.length; + +/** + * Alias for {@link quat2.length} + * @function + */ +export const len = length; + +/** + * Calculates the squared length of a dual quat + * + * @param {ReadonlyQuat2} a dual quat to calculate squared length of + * @returns {Number} squared length of a + * @function + */ +export const squaredLength = quat.squaredLength; + +/** + * Alias for {@link quat2.squaredLength} + * @function + */ +export const sqrLen = squaredLength; + +/** + * Normalize a dual quat + * + * @param {quat2} out the receiving dual quaternion + * @param {ReadonlyQuat2} a dual quaternion to normalize + * @returns {quat2} out + * @function + */ +export function normalize(out: quat2, a: ReadonlyQuat2): quat2 { + let magnitude = squaredLength(a); + if (magnitude > 0) { + magnitude = Math.sqrt(magnitude); + + let a0 = a[0] / magnitude; + let a1 = a[1] / magnitude; + let a2 = a[2] / magnitude; + let a3 = a[3] / magnitude; + + let b0 = a[4]; + let b1 = a[5]; + let b2 = a[6]; + let b3 = a[7]; + + let a_dot_b = a0 * b0 + a1 * b1 + a2 * b2 + a3 * b3; + + out[0] = a0; + out[1] = a1; + out[2] = a2; + out[3] = a3; + + out[4] = (b0 - a0 * a_dot_b) / magnitude; + out[5] = (b1 - a1 * a_dot_b) / magnitude; + out[6] = (b2 - a2 * a_dot_b) / magnitude; + out[7] = (b3 - a3 * a_dot_b) / magnitude; + } + return out; +} + +/** + * Returns a string representation of a dual quaternion + * + * @param {ReadonlyQuat2} a dual quaternion to represent as a string + * @returns {String} string representation of the dual quat + */ +export function str(a: ReadonlyQuat2): string { + return ( + "quat2(" + + a[0].toString() + + ", " + + a[1].toString() + + ", " + + a[2].toString() + + ", " + + a[3].toString() + + ", " + + a[4].toString() + + ", " + + a[5].toString() + + ", " + + a[6].toString() + + ", " + + a[7].toString() + + ")" + ); +} + +/** + * Returns whether or not the dual quaternions have exactly the same elements in the same position (when compared with ===) + * + * @param {ReadonlyQuat2} a the first dual quaternion. + * @param {ReadonlyQuat2} b the second dual quaternion. + * @returns {Boolean} true if the dual quaternions are equal, false otherwise. + */ +export function exactEquals(a: ReadonlyQuat2, b: ReadonlyQuat2): bool { + return ( + a[0] === b[0] && + a[1] === b[1] && + a[2] === b[2] && + a[3] === b[3] && + a[4] === b[4] && + a[5] === b[5] && + a[6] === b[6] && + a[7] === b[7] + ); +} + +/** + * Returns whether or not the dual quaternions have approximately the same elements in the same position. + * + * @param {ReadonlyQuat2} a the first dual quat. + * @param {ReadonlyQuat2} b the second dual quat. + * @returns {Boolean} true if the dual quats are equal, false otherwise. + */ +export function equals(a: ReadonlyQuat2, b: ReadonlyQuat2): bool { + let a0 = a[0], + a1 = a[1], + a2 = a[2], + a3 = a[3], + a4 = a[4], + a5 = a[5], + a6 = a[6], + a7 = a[7]; + let b0 = b[0], + b1 = b[1], + b2 = b[2], + b3 = b[3], + b4 = b[4], + b5 = b[5], + b6 = b[6], + b7 = b[7]; + return ( + Math.abs(a0 - b0) <= + glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a0), Math.abs(b0)) && + Math.abs(a1 - b1) <= + glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a1), Math.abs(b1)) && + Math.abs(a2 - b2) <= + glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a2), Math.abs(b2)) && + Math.abs(a3 - b3) <= + glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a3), Math.abs(b3)) && + Math.abs(a4 - b4) <= + glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a4), Math.abs(b4)) && + Math.abs(a5 - b5) <= + glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a5), Math.abs(b5)) && + Math.abs(a6 - b6) <= + glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a6), Math.abs(b6)) && + Math.abs(a7 - b7) <= + glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a7), Math.abs(b7)) + ); +} diff --git a/assembly/tsconfig.json b/assembly/tsconfig.json index e28fcf25..4fd23dca 100644 --- a/assembly/tsconfig.json +++ b/assembly/tsconfig.json @@ -1,5 +1,8 @@ { "extends": "assemblyscript/std/assembly.json", + "compilerOptions": { + "types": ["./assembly/types.d.ts"] + }, "include": [ "./**/*.ts" ] diff --git a/assembly/types.d.ts b/assembly/types.d.ts new file mode 100644 index 00000000..03e5ff22 --- /dev/null +++ b/assembly/types.d.ts @@ -0,0 +1,94 @@ +interface IndexedCollection extends Iterable { + readonly length: f64; + [key: f64]: f64; +} + +// prettier-ignore +declare type mat2 = + | [f64, f64, + f64, f64] + | IndexedCollection; + +// prettier-ignore +declare type mat2d = + | [f64, f64, + f64, f64, + f64, f64] + | IndexedCollection; + +// prettier-ignore +declare type mat3 = + | [f64, f64, f64, + f64, f64, f64, + f64, f64, f64] + | IndexedCollection; + +// prettier-ignore +declare type mat4 = + | [f64, f64, f64, f64, + f64, f64, f64, f64, + f64, f64, f64, f64, + f64, f64, f64, f64] + | IndexedCollection; + +declare type quat = [f64, f64, f64, f64] | IndexedCollection; + +// prettier-ignore +declare type quat2 = + | [f64, f64, f64, f64, + f64, f64, f64, f64] + | IndexedCollection; + +declare type vec2 = [f64, f64] | IndexedCollection; +declare type vec3 = [f64, f64, f64] | IndexedCollection; +declare type vec4 = [f64, f64, f64, f64] | IndexedCollection; + +// prettier-ignore +declare type ReadonlyMat2 = + | readonly [ + f64, f64, + f64, f64 + ] + | IndexedCollection; + +// prettier-ignore +declare type ReadonlyMat2d = + | readonly [ + f64, f64, + f64, f64, + f64, f64 + ] + | IndexedCollection; + +// prettier-ignore +declare type ReadonlyMat3 = + | readonly [ + f64, f64, f64, + f64, f64, f64, + f64, f64, f64 + ] + | IndexedCollection; + +// prettier-ignore +declare type ReadonlyMat4 = + | readonly [ + f64, f64, f64, f64, + f64, f64, f64, f64, + f64, f64, f64, f64, + f64, f64, f64, f64 + ] + | IndexedCollection; + +declare type ReadonlyQuat = + | readonly [f64, f64, f64, f64] + | IndexedCollection; + +declare type ReadonlyQuat2 = + | readonly [f64, f64, f64, f64, f64, f64, f64, f64] + | IndexedCollection; + +declare type ReadonlyVec2 = readonly [f64, f64] | IndexedCollection; +declare type ReadonlyVec3 = readonly [f64, f64, f64] | IndexedCollection; +declare type ReadonlyVec4 = + | readonly [f64, f64, f64, f64] + | IndexedCollection; diff --git a/assembly/vec2.ts b/assembly/vec2.ts new file mode 100644 index 00000000..16e4506c --- /dev/null +++ b/assembly/vec2.ts @@ -0,0 +1,635 @@ +import * as glMatrix from "./common"; +import { MathUtil } from "./imports"; +import { ReadonlyMat2 } from "./mat2"; +import { ReadonlyMat2d } from "./mat2d"; +import { ReadonlyMat3 } from "./mat3"; +import { ReadonlyMat4 } from "./mat4"; + +export class vec2 extends Float64Array {} + +export class ReadonlyVec2 extends vec2 {} + +/** + * 2 Dimensional Vector + * @module vec2 + */ + +/** + * Creates a new, empty vec2 + * + * @returns {vec2} a new 2D vector + */ +export function create(): vec2 { + let out = new vec2(2); + //if (glMatrix.ARRAY_TYPE != Float32Array) { + out[0] = 0; + out[1] = 0; + //} + return out; +} + +/** + * Creates a new vec2 initialized with values from an existing vector + * + * @param {ReadonlyVec2} a vector to clone + * @returns {vec2} a new 2D vector + */ +export function clone(a: ReadonlyVec2): vec2 { + let out = new vec2(2); + out[0] = a[0]; + out[1] = a[1]; + return out; +} + +/** + * Creates a new vec2 initialized with the given values + * + * @param {Number} x X component + * @param {Number} y Y component + * @returns {vec2} a new 2D vector + */ +export function fromValues(x: f64, y: f64): vec2 { + let out = new vec2(2); + out[0] = x; + out[1] = y; + return out; +} + +/** + * Copy the values from one vec2 to another + * + * @param {vec2} out the receiving vector + * @param {ReadonlyVec2} a the source vector + * @returns {vec2} out + */ +export function copy(out: vec2, a: ReadonlyVec2): vec2 { + out[0] = a[0]; + out[1] = a[1]; + return out; +} + +/** + * Set the components of a vec2 to the given values + * + * @param {vec2} out the receiving vector + * @param {Number} x X component + * @param {Number} y Y component + * @returns {vec2} out + */ +export function set(out: vec2, x: f64, y: f64): vec2 { + out[0] = x; + out[1] = y; + return out; +} + +/** + * Adds two vec2's + * + * @param {vec2} out the receiving vector + * @param {ReadonlyVec2} a the first operand + * @param {ReadonlyVec2} b the second operand + * @returns {vec2} out + */ +export function add(out: vec2, a: ReadonlyVec2, b: ReadonlyVec2): vec2 { + out[0] = a[0] + b[0]; + out[1] = a[1] + b[1]; + return out; +} + +/** + * Subtracts vector b from vector a + * + * @param {vec2} out the receiving vector + * @param {ReadonlyVec2} a the first operand + * @param {ReadonlyVec2} b the second operand + * @returns {vec2} out + */ +export function subtract(out: vec2, a: ReadonlyVec2, b: ReadonlyVec2): vec2 { + out[0] = a[0] - b[0]; + out[1] = a[1] - b[1]; + return out; +} + +/** + * Multiplies two vec2's + * + * @param {vec2} out the receiving vector + * @param {ReadonlyVec2} a the first operand + * @param {ReadonlyVec2} b the second operand + * @returns {vec2} out + */ +export function multiply(out: vec2, a: ReadonlyVec2, b: ReadonlyVec2): vec2 { + out[0] = a[0] * b[0]; + out[1] = a[1] * b[1]; + return out; +} + +/** + * Divides two vec2's + * + * @param {vec2} out the receiving vector + * @param {ReadonlyVec2} a the first operand + * @param {ReadonlyVec2} b the second operand + * @returns {vec2} out + */ +export function divide(out: vec2, a: ReadonlyVec2, b: ReadonlyVec2): vec2 { + out[0] = a[0] / b[0]; + out[1] = a[1] / b[1]; + return out; +} + +/** + * Math.ceil the components of a vec2 + * + * @param {vec2} out the receiving vector + * @param {ReadonlyVec2} a vector to ceil + * @returns {vec2} out + */ +export function ceil(out: vec2, a: ReadonlyVec2): vec2 { + out[0] = Math.ceil(a[0]); + out[1] = Math.ceil(a[1]); + return out; +} + +/** + * Math.floor the components of a vec2 + * + * @param {vec2} out the receiving vector + * @param {ReadonlyVec2} a vector to floor + * @returns {vec2} out + */ +export function floor(out: vec2, a: ReadonlyVec2): vec2 { + out[0] = Math.floor(a[0]); + out[1] = Math.floor(a[1]); + return out; +} + +/** + * Returns the minimum of two vec2's + * + * @param {vec2} out the receiving vector + * @param {ReadonlyVec2} a the first operand + * @param {ReadonlyVec2} b the second operand + * @returns {vec2} out + */ +export function min(out: vec2, a: ReadonlyVec2, b: ReadonlyVec2): vec2 { + out[0] = Math.min(a[0], b[0]); + out[1] = Math.min(a[1], b[1]); + return out; +} + +/** + * Returns the maximum of two vec2's + * + * @param {vec2} out the receiving vector + * @param {ReadonlyVec2} a the first operand + * @param {ReadonlyVec2} b the second operand + * @returns {vec2} out + */ +export function max(out: vec2, a: ReadonlyVec2, b: ReadonlyVec2): vec2 { + out[0] = Math.max(a[0], b[0]); + out[1] = Math.max(a[1], b[1]); + return out; +} + +/** + * Math.round the components of a vec2 + * + * @param {vec2} out the receiving vector + * @param {ReadonlyVec2} a vector to round + * @returns {vec2} out + */ +export function round(out: vec2, a: ReadonlyVec2): vec2 { + out[0] = Math.round(a[0]); + out[1] = Math.round(a[1]); + return out; +} + +/** + * Scales a vec2 by a scalar number + * + * @param {vec2} out the receiving vector + * @param {ReadonlyVec2} a the vector to scale + * @param {Number} b amount to scale the vector by + * @returns {vec2} out + */ +export function scale(out: vec2, a: ReadonlyVec2, b: f64): vec2 { + out[0] = a[0] * b; + out[1] = a[1] * b; + return out; +} + +/** + * Adds two vec2's after scaling the second operand by a scalar value + * + * @param {vec2} out the receiving vector + * @param {ReadonlyVec2} a the first operand + * @param {ReadonlyVec2} b the second operand + * @param {Number} scale the amount to scale b by before adding + * @returns {vec2} out + */ +export function scaleAndAdd(out: vec2, a: ReadonlyVec2, b: ReadonlyVec2, scale: f64): vec2 { + out[0] = a[0] + b[0] * scale; + out[1] = a[1] + b[1] * scale; + return out; +} + +/** + * Calculates the euclidian distance between two vec2's + * + * @param {ReadonlyVec2} a the first operand + * @param {ReadonlyVec2} b the second operand + * @returns {Number} distance between a and b + */ +export function distance(a: ReadonlyVec2, b: ReadonlyVec2): f64 { + var x = b[0] - a[0], + y = b[1] - a[1]; + return MathUtil.hypot(x, y); +} + +/** + * Calculates the squared euclidian distance between two vec2's + * + * @param {ReadonlyVec2} a the first operand + * @param {ReadonlyVec2} b the second operand + * @returns {Number} squared distance between a and b + */ +export function squaredDistance(a: ReadonlyVec2, b: ReadonlyVec2): f64 { + var x = b[0] - a[0], + y = b[1] - a[1]; + return x * x + y * y; +} + +/** + * Calculates the length of a vec2 + * + * @param {ReadonlyVec2} a vector to calculate length of + * @returns {Number} length of a + */ +export function length(a: ReadonlyVec2): f64 { + var x = a[0], + y = a[1]; + return Math.hypot(x, y); +} + +/** + * Calculates the squared length of a vec2 + * + * @param {ReadonlyVec2} a vector to calculate squared length of + * @returns {Number} squared length of a + */ +export function squaredLength(a: ReadonlyVec2): f64 { + var x = a[0], + y = a[1]; + return x * x + y * y; +} + +/** + * Negates the components of a vec2 + * + * @param {vec2} out the receiving vector + * @param {ReadonlyVec2} a vector to negate + * @returns {vec2} out + */ +export function negate(out: vec2, a: ReadonlyVec2): vec2 { + out[0] = -a[0]; + out[1] = -a[1]; + return out; +} + +/** + * Returns the inverse of the components of a vec2 + * + * @param {vec2} out the receiving vector + * @param {ReadonlyVec2} a vector to invert + * @returns {vec2} out + */ +export function inverse(out: vec2, a: ReadonlyVec2): vec2 { + out[0] = 1.0 / a[0]; + out[1] = 1.0 / a[1]; + return out; +} + +/** + * Normalize a vec2 + * + * @param {vec2} out the receiving vector + * @param {ReadonlyVec2} a vector to normalize + * @returns {vec2} out + */ +export function normalize(out: vec2, a: ReadonlyVec2): vec2 { + var x = a[0], + y = a[1]; + var len = x * x + y * y; + if (len > 0) { + //TODO: evaluate use of glm_invsqrt here? + len = 1 / Math.sqrt(len); + } + out[0] = a[0] * len; + out[1] = a[1] * len; + return out; +} + +/** + * Calculates the dot product of two vec2's + * + * @param {ReadonlyVec2} a the first operand + * @param {ReadonlyVec2} b the second operand + * @returns {Number} dot product of a and b + */ +export function dot(a: ReadonlyVec2, b: ReadonlyVec2): f64 { + return a[0] * b[0] + a[1] * b[1]; +} + +/** + * Computes the cross product of two vec2's + * Note that the cross product must by definition produce a 3D vector + * + * @param {vec3} out the receiving vector + * @param {ReadonlyVec2} a the first operand + * @param {ReadonlyVec2} b the second operand + * @returns {vec3} out + */ +export function cross(out: vec2, a: ReadonlyVec2, b: ReadonlyVec2): vec2 { + var z = a[0] * b[1] - a[1] * b[0]; + out[0] = out[1] = 0; + out[2] = z; + return out; +} + +/** + * Performs a linear interpolation between two vec2's + * + * @param {vec2} out the receiving vector + * @param {ReadonlyVec2} a the first operand + * @param {ReadonlyVec2} b the second operand + * @param {Number} t interpolation amount, in the range [0-1], between the two inputs + * @returns {vec2} out + */ +export function lerp(out: vec2, a: ReadonlyVec2, b: ReadonlyVec2, t: f64): vec2 { + var ax = a[0], + ay = a[1]; + out[0] = ax + t * (b[0] - ax); + out[1] = ay + t * (b[1] - ay); + return out; +} + +/** + * Generates a random vector with the given scale + * + * @param {vec2} out the receiving vector + * @param {Number} [scale] Length of the resulting vector. If omitted, a unit vector will be returned + * @returns {vec2} out + */ +export function random(out: vec2, scale: f64): vec2 { + scale = scale || 1.0; + var r = glMatrix.RANDOM() * 2.0 * Math.PI; + out[0] = Math.cos(r) * scale; + out[1] = Math.sin(r) * scale; + return out; +} + +/** + * Transforms the vec2 with a mat2 + * + * @param {vec2} out the receiving vector + * @param {ReadonlyVec2} a the vector to transform + * @param {ReadonlyMat2} m matrix to transform with + * @returns {vec2} out + */ +export function transformMat2(out: vec2, a: ReadonlyVec2, m: ReadonlyMat2): vec2 { + var x = a[0], + y = a[1]; + out[0] = m[0] * x + m[2] * y; + out[1] = m[1] * x + m[3] * y; + return out; +} + +/** + * Transforms the vec2 with a mat2d + * + * @param {vec2} out the receiving vector + * @param {ReadonlyVec2} a the vector to transform + * @param {ReadonlyMat2d} m matrix to transform with + * @returns {vec2} out + */ +export function transformMat2d(out: vec2, a: ReadonlyVec2, m: ReadonlyMat2d): vec2 { + var x = a[0], + y = a[1]; + out[0] = m[0] * x + m[2] * y + m[4]; + out[1] = m[1] * x + m[3] * y + m[5]; + return out; +} + +/** + * Transforms the vec2 with a mat3 + * 3rd vector component is implicitly '1' + * + * @param {vec2} out the receiving vector + * @param {ReadonlyVec2} a the vector to transform + * @param {ReadonlyMat3} m matrix to transform with + * @returns {vec2} out + */ +export function transformMat3(out: vec2, a: ReadonlyVec2, m: ReadonlyMat3): vec2 { + var x = a[0], + y = a[1]; + out[0] = m[0] * x + m[3] * y + m[6]; + out[1] = m[1] * x + m[4] * y + m[7]; + return out; +} + +/** + * Transforms the vec2 with a mat4 + * 3rd vector component is implicitly '0' + * 4th vector component is implicitly '1' + * + * @param {vec2} out the receiving vector + * @param {ReadonlyVec2} a the vector to transform + * @param {ReadonlyMat4} m matrix to transform with + * @returns {vec2} out + */ +export function transformMat4(out: vec2, a: ReadonlyVec2, m: ReadonlyMat4): vec2 { + let x = a[0]; + let y = a[1]; + out[0] = m[0] * x + m[4] * y + m[12]; + out[1] = m[1] * x + m[5] * y + m[13]; + return out; +} + +/** + * Rotate a 2D vector + * @param {vec2} out The receiving vec2 + * @param {ReadonlyVec2} a The vec2 point to rotate + * @param {ReadonlyVec2} b The origin of the rotation + * @param {Number} rad The angle of rotation in radians + * @returns {vec2} out + */ +export function rotate(out: vec2, a: ReadonlyVec2, b: ReadonlyVec2, rad: f64): vec2 { + //Translate point to the origin + let p0 = a[0] - b[0], + p1 = a[1] - b[1], + sinC = Math.sin(rad), + cosC = Math.cos(rad); + + //perform rotation and translate to correct position + out[0] = p0 * cosC - p1 * sinC + b[0]; + out[1] = p0 * sinC + p1 * cosC + b[1]; + + return out; +} + +/** + * Get the angle between two 2D vectors + * @param {ReadonlyVec2} a The first operand + * @param {ReadonlyVec2} b The second operand + * @returns {Number} The angle in radians + */ +export function angle(a: ReadonlyVec2, b: ReadonlyVec2): f64 { + let x1 = a[0], + y1 = a[1], + x2 = b[0], + y2 = b[1], + // mag is the product of the magnitudes of a and b + mag = Math.sqrt(x1 * x1 + y1 * y1) * Math.sqrt(x2 * x2 + y2 * y2), + // mag &&.. short circuits if mag == 0 + cosine = mag && (x1 * x2 + y1 * y2) / mag; + // Math.min(Math.max(cosine, -1), 1) clamps the cosine between -1 and 1 + return Math.acos(Math.min(Math.max(cosine, -1), 1)); +} + +/** + * Set the components of a vec2 to zero + * + * @param {vec2} out the receiving vector + * @returns {vec2} out + */ +export function zero(out: vec2): vec2 { + out[0] = 0.0; + out[1] = 0.0; + return out; +} + +/** + * Returns a string representation of a vector + * + * @param {ReadonlyVec2} a vector to represent as a string + * @returns {String} string representation of the vector + */ +export function str(a: ReadonlyVec2): string { + return "vec2(" + a[0].toString() + ", " + a[1].toString() + ")"; +} + +/** + * Returns whether or not the vectors exactly have the same elements in the same position (when compared with ===) + * + * @param {ReadonlyVec2} a The first vector. + * @param {ReadonlyVec2} b The second vector. + * @returns {Boolean} True if the vectors are equal, false otherwise. + */ +export function exactEquals(a: ReadonlyVec2, b: ReadonlyVec2): bool { + return a[0] === b[0] && a[1] === b[1]; +} + +/** + * Returns whether or not the vectors have approximately the same elements in the same position. + * + * @param {ReadonlyVec2} a The first vector. + * @param {ReadonlyVec2} b The second vector. + * @returns {Boolean} True if the vectors are equal, false otherwise. + */ +export function equals(a: ReadonlyVec2, b: ReadonlyVec2): bool { + let a0 = a[0], + a1 = a[1]; + let b0 = b[0], + b1 = b[1]; + return ( + Math.abs(a0 - b0) <= + glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a0), Math.abs(b0)) && + Math.abs(a1 - b1) <= + glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a1), Math.abs(b1)) + ); +} + +/** + * Alias for {@link vec2.length} + * @function + */ +export const len = length; + +/** + * Alias for {@link vec2.subtract} + * @function + */ +export const sub = subtract; + +/** + * Alias for {@link vec2.multiply} + * @function + */ +export const mul = multiply; + +/** + * Alias for {@link vec2.divide} + * @function + */ +export const div = divide; + +/** + * Alias for {@link vec2.distance} + * @function + */ +export const dist = distance; + +/** + * Alias for {@link vec2.squaredDistance} + * @function + */ +export const sqrDist = squaredDistance; + +/** + * Alias for {@link vec2.squaredLength} + * @function + */ +export const sqrLen = squaredLength; + +/** + * Perform some operation over an array of vec2s. + * + * @param {Array} a the array of vectors to iterate over + * @param {Number} stride Number of elements between the start of each vec2. If 0 assumes tightly packed + * @param {Number} offset Number of elements to skip at the beginning of the array + * @param {Number} count Number of vec2s to iterate over. If 0 iterates over entire array + * @param {Function} fn Function to call for each vector in the array + * @param {Object} [arg] additional argument to pass to fn + * @returns {Array} a + * @function + */ +export const forEach: () => (a: vec2, stride: u16, offset: u16, count: u16, fn: (a: vec2, b: vec2, arg: IArguments) => void, arg: IArguments) => vec2 = (() => { + let vec = create(); + return function(a: vec2, stride: u16, offset: u16, count: u16, fn: (a: vec2, b: vec2, arg: IArguments) => void, arg: IArguments) { + let i: u16, l: u16; + if (!stride) { + stride = 2; + } + + if (!offset) { + offset = 0; + } + + if (count) { + l = Math.min(count * stride + offset, a.length); + } else { + l = a.length; + } + + for (i = offset; i < l; i += stride) { + vec[0] = a[i]; + vec[1] = a[i + 1]; + fn(vec, vec, arg); + a[i] = vec[0]; + a[i + 1] = vec[1]; + } + + return a; + } + })(); diff --git a/assembly/vec3.ts b/assembly/vec3.ts new file mode 100644 index 00000000..ab85af7e --- /dev/null +++ b/assembly/vec3.ts @@ -0,0 +1,836 @@ +import * as glMatrix from "./common"; +import { MathUtil } from "./imports"; +import { ReadonlyMat3 } from "./mat3"; +import { ReadonlyMat4 } from "./mat4"; +import { ReadonlyQuat } from "./quat"; + +export class vec3 extends Float64Array {} + +export class ReadonlyVec3 extends Float64Array {} + +/** + * 3 Dimensional Vector + * @module vec3 + */ + +/** + * Creates a new, empty vec3 + * + * @returns {vec3} a new 3D vector + */ +export function create(): vec3 { + let out = new vec3(3); + //if (glMatrix.ARRAY_TYPE != Float32Array) { + out[0] = 0; + out[1] = 0; + out[2] = 0; + //} + return out; +} + +/** + * Creates a new vec3 initialized with values from an existing vector + * + * @param {ReadonlyVec3} a vector to clone + * @returns {vec3} a new 3D vector + */ +export function clone(a: ReadonlyVec3): vec3 { + var out = new vec3(3); + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + return out; +} + +/** + * Calculates the length of a vec3 + * + * @param {ReadonlyVec3} a vector to calculate length of + * @returns {Number} length of a + */ +export function length(a: ReadonlyVec3): f64 { + let x = a[0]; + let y = a[1]; + let z = a[2]; + return MathUtil.hypot(x, y, z); +} + +/** + * Creates a new vec3 initialized with the given values + * + * @param {Number} x X component + * @param {Number} y Y component + * @param {Number} z Z component + * @returns {vec3} a new 3D vector + */ +export function fromValues(x: f64, y: f64, z: f64): vec3 { + let out = new vec3(3); + out[0] = x; + out[1] = y; + out[2] = z; + return out; +} + +/** + * Copy the values from one vec3 to another + * + * @param {vec3} out the receiving vector + * @param {ReadonlyVec3} a the source vector + * @returns {vec3} out + */ +export function copy(out: vec3, a: ReadonlyVec3): vec3 { + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + return out; +} + +/** + * Set the components of a vec3 to the given values + * + * @param {vec3} out the receiving vector + * @param {Number} x X component + * @param {Number} y Y component + * @param {Number} z Z component + * @returns {vec3} out + */ +export function set(out: vec3, x: f64, y: f64, z: f64): vec3 { + out[0] = x; + out[1] = y; + out[2] = z; + return out; +} + +/** + * Adds two vec3's + * + * @param {vec3} out the receiving vector + * @param {ReadonlyVec3} a the first operand + * @param {ReadonlyVec3} b the second operand + * @returns {vec3} out + */ +export function add(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3): vec3 { + out[0] = a[0] + b[0]; + out[1] = a[1] + b[1]; + out[2] = a[2] + b[2]; + return out; +} + +/** + * Subtracts vector b from vector a + * + * @param {vec3} out the receiving vector + * @param {ReadonlyVec3} a the first operand + * @param {ReadonlyVec3} b the second operand + * @returns {vec3} out + */ +export function subtract(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3): vec3 { + out[0] = a[0] - b[0]; + out[1] = a[1] - b[1]; + out[2] = a[2] - b[2]; + return out; +} + +/** + * Multiplies two vec3's + * + * @param {vec3} out the receiving vector + * @param {ReadonlyVec3} a the first operand + * @param {ReadonlyVec3} b the second operand + * @returns {vec3} out + */ +export function multiply(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3): vec3 { + out[0] = a[0] * b[0]; + out[1] = a[1] * b[1]; + out[2] = a[2] * b[2]; + return out; +} + +/** + * Divides two vec3's + * + * @param {vec3} out the receiving vector + * @param {ReadonlyVec3} a the first operand + * @param {ReadonlyVec3} b the second operand + * @returns {vec3} out + */ +export function divide(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3): vec3 { + out[0] = a[0] / b[0]; + out[1] = a[1] / b[1]; + out[2] = a[2] / b[2]; + return out; +} + +/** + * Math.ceil the components of a vec3 + * + * @param {vec3} out the receiving vector + * @param {ReadonlyVec3} a vector to ceil + * @returns {vec3} out + */ +export function ceil(out: vec3, a: ReadonlyVec3): vec3 { + out[0] = Math.ceil(a[0]); + out[1] = Math.ceil(a[1]); + out[2] = Math.ceil(a[2]); + return out; +} + +/** + * Math.floor the components of a vec3 + * + * @param {vec3} out the receiving vector + * @param {ReadonlyVec3} a vector to floor + * @returns {vec3} out + */ +export function floor(out: vec3, a: ReadonlyVec3): vec3 { + out[0] = Math.floor(a[0]); + out[1] = Math.floor(a[1]); + out[2] = Math.floor(a[2]); + return out; +} + +/** + * Returns the minimum of two vec3's + * + * @param {vec3} out the receiving vector + * @param {ReadonlyVec3} a the first operand + * @param {ReadonlyVec3} b the second operand + * @returns {vec3} out + */ +export function min(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3): vec3 { + out[0] = Math.min(a[0], b[0]); + out[1] = Math.min(a[1], b[1]); + out[2] = Math.min(a[2], b[2]); + return out; +} + +/** + * Returns the maximum of two vec3's + * + * @param {vec3} out the receiving vector + * @param {ReadonlyVec3} a the first operand + * @param {ReadonlyVec3} b the second operand + * @returns {vec3} out + */ +export function max(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3): vec3 { + out[0] = Math.max(a[0], b[0]); + out[1] = Math.max(a[1], b[1]); + out[2] = Math.max(a[2], b[2]); + return out; +} + +/** + * Math.round the components of a vec3 + * + * @param {vec3} out the receiving vector + * @param {ReadonlyVec3} a vector to round + * @returns {vec3} out + */ +export function round(out: vec3, a: ReadonlyVec3): vec3 { + out[0] = Math.round(a[0]); + out[1] = Math.round(a[1]); + out[2] = Math.round(a[2]); + return out; +} + +/** + * Scales a vec3 by a scalar number + * + * @param {vec3} out the receiving vector + * @param {ReadonlyVec3} a the vector to scale + * @param {Number} b amount to scale the vector by + * @returns {vec3} out + */ +export function scale(out: vec3, a: ReadonlyVec3, b: f64): vec3 { + out[0] = a[0] * b; + out[1] = a[1] * b; + out[2] = a[2] * b; + return out; +} + +/** + * Adds two vec3's after scaling the second operand by a scalar value + * + * @param {vec3} out the receiving vector + * @param {ReadonlyVec3} a the first operand + * @param {ReadonlyVec3} b the second operand + * @param {Number} scale the amount to scale b by before adding + * @returns {vec3} out + */ +export function scaleAndAdd(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3, scale: f64): vec3 { + out[0] = a[0] + b[0] * scale; + out[1] = a[1] + b[1] * scale; + out[2] = a[2] + b[2] * scale; + return out; +} + +/** + * Calculates the euclidian distance between two vec3's + * + * @param {ReadonlyVec3} a the first operand + * @param {ReadonlyVec3} b the second operand + * @returns {Number} distance between a and b + */ +export function distance(a: ReadonlyVec3, b: ReadonlyVec3): f64 { + let x = b[0] - a[0]; + let y = b[1] - a[1]; + let z = b[2] - a[2]; + return MathUtil.hypot(x, y, z); +} + +/** + * Calculates the squared euclidian distance between two vec3's + * + * @param {ReadonlyVec3} a the first operand + * @param {ReadonlyVec3} b the second operand + * @returns {Number} squared distance between a and b + */ +export function squaredDistance(a: ReadonlyVec3, b: ReadonlyVec3): f64 { + let x = b[0] - a[0]; + let y = b[1] - a[1]; + let z = b[2] - a[2]; + return x * x + y * y + z * z; +} + +/** + * Calculates the squared length of a vec3 + * + * @param {ReadonlyVec3} a vector to calculate squared length of + * @returns {Number} squared length of a + */ +export function squaredLength(a: ReadonlyVec3): f64 { + let x = a[0]; + let y = a[1]; + let z = a[2]; + return x * x + y * y + z * z; +} + +/** + * Negates the components of a vec3 + * + * @param {vec3} out the receiving vector + * @param {ReadonlyVec3} a vector to negate + * @returns {vec3} out + */ +export function negate(out: vec3, a: ReadonlyVec3): vec3 { + out[0] = -a[0]; + out[1] = -a[1]; + out[2] = -a[2]; + return out; +} + +/** + * Returns the inverse of the components of a vec3 + * + * @param {vec3} out the receiving vector + * @param {ReadonlyVec3} a vector to invert + * @returns {vec3} out + */ +export function inverse(out: vec3, a: ReadonlyVec3): vec3 { + out[0] = 1.0 / a[0]; + out[1] = 1.0 / a[1]; + out[2] = 1.0 / a[2]; + return out; +} + +/** + * Normalize a vec3 + * + * @param {vec3} out the receiving vector + * @param {ReadonlyVec3} a vector to normalize + * @returns {vec3} out + */ +export function normalize(out: vec3, a: ReadonlyVec3): vec3 { + let x = a[0]; + let y = a[1]; + let z = a[2]; + let len = x * x + y * y + z * z; + if (len > 0) { + //TODO: evaluate use of glm_invsqrt here? + len = 1 / Math.sqrt(len); + } + out[0] = a[0] * len; + out[1] = a[1] * len; + out[2] = a[2] * len; + return out; +} + +/** + * Calculates the dot product of two vec3's + * + * @param {ReadonlyVec3} a the first operand + * @param {ReadonlyVec3} b the second operand + * @returns {Number} dot product of a and b + */ +export function dot(a: ReadonlyVec3, b: ReadonlyVec3): f64 { + return a[0] * b[0] + a[1] * b[1] + a[2] * b[2]; +} + +/** + * Computes the cross product of two vec3's + * + * @param {vec3} out the receiving vector + * @param {ReadonlyVec3} a the first operand + * @param {ReadonlyVec3} b the second operand + * @returns {vec3} out + */ +export function cross(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3): vec3 { + let ax = a[0], + ay = a[1], + az = a[2]; + let bx = b[0], + by = b[1], + bz = b[2]; + + out[0] = ay * bz - az * by; + out[1] = az * bx - ax * bz; + out[2] = ax * by - ay * bx; + return out; +} + +/** + * Performs a linear interpolation between two vec3's + * + * @param {vec3} out the receiving vector + * @param {ReadonlyVec3} a the first operand + * @param {ReadonlyVec3} b the second operand + * @param {Number} t interpolation amount, in the range [0-1], between the two inputs + * @returns {vec3} out + */ +export function lerp(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3, t: f64): vec3 { + let ax = a[0]; + let ay = a[1]; + let az = a[2]; + out[0] = ax + t * (b[0] - ax); + out[1] = ay + t * (b[1] - ay); + out[2] = az + t * (b[2] - az); + return out; +} + +/** + * Performs a spherical linear interpolation between two vec3's + * + * @param {vec3} out the receiving vector + * @param {ReadonlyVec3} a the first operand + * @param {ReadonlyVec3} b the second operand + * @param {Number} t interpolation amount, in the range [0-1], between the two inputs + * @returns {vec3} out + */ +export function slerp(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3, t: f64): vec3 { + let angle = Math.acos(Math.min(Math.max(dot(a, b), -1), 1)); + let sinTotal = Math.sin(angle); + + let ratioA = Math.sin((1 - t) * angle) / sinTotal; + let ratioB = Math.sin(t * angle) / sinTotal; + out[0] = ratioA * a[0] + ratioB * b[0]; + out[1] = ratioA * a[1] + ratioB * b[1]; + out[2] = ratioA * a[2] + ratioB * b[2]; + + return out; +} + +/** + * Performs a hermite interpolation with two control points + * + * @param {vec3} out the receiving vector + * @param {ReadonlyVec3} a the first operand + * @param {ReadonlyVec3} b the second operand + * @param {ReadonlyVec3} c the third operand + * @param {ReadonlyVec3} d the fourth operand + * @param {Number} t interpolation amount, in the range [0-1], between the two inputs + * @returns {vec3} out + */ +export function hermite(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3, c: ReadonlyVec3, d: ReadonlyVec3, t: f64): vec3 { + let factorTimes2 = t * t; + let factor1 = factorTimes2 * (2 * t - 3) + 1; + let factor2 = factorTimes2 * (t - 2) + t; + let factor3 = factorTimes2 * (t - 1); + let factor4 = factorTimes2 * (3 - 2 * t); + + out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4; + out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4; + out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4; + + return out; +} + +/** + * Performs a bezier interpolation with two control points + * + * @param {vec3} out the receiving vector + * @param {ReadonlyVec3} a the first operand + * @param {ReadonlyVec3} b the second operand + * @param {ReadonlyVec3} c the third operand + * @param {ReadonlyVec3} d the fourth operand + * @param {Number} t interpolation amount, in the range [0-1], between the two inputs + * @returns {vec3} out + */ +export function bezier(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3, c: ReadonlyVec3, d: ReadonlyVec3, t: f64): vec3 { + let inverseFactor = 1 - t; + let inverseFactorTimesTwo = inverseFactor * inverseFactor; + let factorTimes2 = t * t; + let factor1 = inverseFactorTimesTwo * inverseFactor; + let factor2 = 3 * t * inverseFactorTimesTwo; + let factor3 = 3 * factorTimes2 * inverseFactor; + let factor4 = factorTimes2 * t; + + out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4; + out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4; + out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4; + + return out; +} + +/** + * Generates a random vector with the given scale + * + * @param {vec3} out the receiving vector + * @param {Number} [scale] Length of the resulting vector. If omitted, a unit vector will be returned + * @returns {vec3} out + */ +export function random(out: vec3, scale: f64): vec3 { + scale = scale || 1.0; + + let r = glMatrix.RANDOM() * 2.0 * Math.PI; + let z = glMatrix.RANDOM() * 2.0 - 1.0; + let zScale = Math.sqrt(1.0 - z * z) * scale; + + out[0] = Math.cos(r) * zScale; + out[1] = Math.sin(r) * zScale; + out[2] = z * scale; + return out; +} + +/** + * Transforms the vec3 with a mat4. + * 4th vector component is implicitly '1' + * + * @param {vec3} out the receiving vector + * @param {ReadonlyVec3} a the vector to transform + * @param {ReadonlyMat4} m matrix to transform with + * @returns {vec3} out + */ +export function transformMat4(out: vec3, a: ReadonlyVec3, m: ReadonlyMat4): vec3 { + let x = a[0], + y = a[1], + z = a[2]; + let w = m[3] * x + m[7] * y + m[11] * z + m[15]; + w = w || 1.0; + out[0] = (m[0] * x + m[4] * y + m[8] * z + m[12]) / w; + out[1] = (m[1] * x + m[5] * y + m[9] * z + m[13]) / w; + out[2] = (m[2] * x + m[6] * y + m[10] * z + m[14]) / w; + return out; +} + +/** + * Transforms the vec3 with a mat3. + * + * @param {vec3} out the receiving vector + * @param {ReadonlyVec3} a the vector to transform + * @param {ReadonlyMat3} m the 3x3 matrix to transform with + * @returns {vec3} out + */ +export function transformMat3(out: vec3, a: ReadonlyVec3, m: ReadonlyMat3): vec3 { + let x = a[0], + y = a[1], + z = a[2]; + out[0] = x * m[0] + y * m[3] + z * m[6]; + out[1] = x * m[1] + y * m[4] + z * m[7]; + out[2] = x * m[2] + y * m[5] + z * m[8]; + return out; +} + +/** + * Transforms the vec3 with a quat + * Can also be used for dual quaternions. (Multiply it with the real part) + * + * @param {vec3} out the receiving vector + * @param {ReadonlyVec3} a the vector to transform + * @param {ReadonlyQuat} q quaternion to transform with + * @returns {vec3} out + */ +export function transformQuat(out: vec3, a: ReadonlyVec3, q: ReadonlyQuat): vec3 { + // benchmarks: https://jsperf.com/quaternion-transform-vec3-implementations-fixed + let qx = q[0], + qy = q[1], + qz = q[2], + qw = q[3]; + let x = a[0], + y = a[1], + z = a[2]; + // var qvec = [qx, qy, qz]; + // var uv = vec3.cross([], qvec, a); + let uvx = qy * z - qz * y, + uvy = qz * x - qx * z, + uvz = qx * y - qy * x; + // var uuv = vec3.cross([], qvec, uv); + let uuvx = qy * uvz - qz * uvy, + uuvy = qz * uvx - qx * uvz, + uuvz = qx * uvy - qy * uvx; + // vec3.scale(uv, uv, 2 * w); + let w2 = qw * 2; + uvx *= w2; + uvy *= w2; + uvz *= w2; + // vec3.scale(uuv, uuv, 2); + uuvx *= 2; + uuvy *= 2; + uuvz *= 2; + // return vec3.add(out, a, vec3.add(out, uv, uuv)); + out[0] = x + uvx + uuvx; + out[1] = y + uvy + uuvy; + out[2] = z + uvz + uuvz; + return out; +} + +/** + * Rotate a 3D vector around the x-axis + * @param {vec3} out The receiving vec3 + * @param {ReadonlyVec3} a The vec3 point to rotate + * @param {ReadonlyVec3} b The origin of the rotation + * @param {Number} rad The angle of rotation in radians + * @returns {vec3} out + */ +export function rotateX(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3, rad: f64): vec3 { + let p: f64[] = [], + r: f64[] = []; + //Translate point to the origin + p[0] = a[0] - b[0]; + p[1] = a[1] - b[1]; + p[2] = a[2] - b[2]; + + //perform rotation + r[0] = p[0]; + r[1] = p[1] * Math.cos(rad) - p[2] * Math.sin(rad); + r[2] = p[1] * Math.sin(rad) + p[2] * Math.cos(rad); + + //translate to correct position + out[0] = r[0] + b[0]; + out[1] = r[1] + b[1]; + out[2] = r[2] + b[2]; + + return out; +} + +/** + * Rotate a 3D vector around the y-axis + * @param {vec3} out The receiving vec3 + * @param {ReadonlyVec3} a The vec3 point to rotate + * @param {ReadonlyVec3} b The origin of the rotation + * @param {Number} rad The angle of rotation in radians + * @returns {vec3} out + */ +export function rotateY(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3, rad: f64): vec3 { + let p: f64[] = [], + r: f64[] = []; + //Translate point to the origin + p[0] = a[0] - b[0]; + p[1] = a[1] - b[1]; + p[2] = a[2] - b[2]; + + //perform rotation + r[0] = p[2] * Math.sin(rad) + p[0] * Math.cos(rad); + r[1] = p[1]; + r[2] = p[2] * Math.cos(rad) - p[0] * Math.sin(rad); + + //translate to correct position + out[0] = r[0] + b[0]; + out[1] = r[1] + b[1]; + out[2] = r[2] + b[2]; + + return out; +} + +/** + * Rotate a 3D vector around the z-axis + * @param {vec3} out The receiving vec3 + * @param {ReadonlyVec3} a The vec3 point to rotate + * @param {ReadonlyVec3} b The origin of the rotation + * @param {Number} rad The angle of rotation in radians + * @returns {vec3} out + */ +export function rotateZ(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3, rad: f64): vec3 { + let p: f64[] = [], + r: f64[] = []; + //Translate point to the origin + p[0] = a[0] - b[0]; + p[1] = a[1] - b[1]; + p[2] = a[2] - b[2]; + + //perform rotation + r[0] = p[0] * Math.cos(rad) - p[1] * Math.sin(rad); + r[1] = p[0] * Math.sin(rad) + p[1] * Math.cos(rad); + r[2] = p[2]; + + //translate to correct position + out[0] = r[0] + b[0]; + out[1] = r[1] + b[1]; + out[2] = r[2] + b[2]; + + return out; +} + +/** + * Get the angle between two 3D vectors + * @param {ReadonlyVec3} a The first operand + * @param {ReadonlyVec3} b The second operand + * @returns {Number} The angle in radians + */ +export function angle(a: ReadonlyVec3, b: ReadonlyVec3): f64 { + let ax = a[0], + ay = a[1], + az = a[2], + bx = b[0], + by = b[1], + bz = b[2], + mag1 = Math.sqrt(ax * ax + ay * ay + az * az), + mag2 = Math.sqrt(bx * bx + by * by + bz * bz), + mag = mag1 * mag2, + cosine = mag && dot(a, b) / mag; + return Math.acos(Math.min(Math.max(cosine, -1), 1)); +} + +/** + * Set the components of a vec3 to zero + * + * @param {vec3} out the receiving vector + * @returns {vec3} out + */ +export function zero(out: vec3): vec3 { + out[0] = 0.0; + out[1] = 0.0; + out[2] = 0.0; + return out; +} + +/** + * Returns a string representation of a vector + * + * @param {ReadonlyVec3} a vector to represent as a string + * @returns {String} string representation of the vector + */ +export function str(a: ReadonlyVec3): string { + return "vec3(" + a[0] + ", " + a[1] + ", " + a[2] + ")"; +} + +/** + * Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===) + * + * @param {ReadonlyVec3} a The first vector. + * @param {ReadonlyVec3} b The second vector. + * @returns {Boolean} True if the vectors are equal, false otherwise. + */ +export function exactEquals(a: ReadonlyVec3, b: ReadonlyVec3): bool { + return a[0] === b[0] && a[1] === b[1] && a[2] === b[2]; +} + +/** + * Returns whether or not the vectors have approximately the same elements in the same position. + * + * @param {ReadonlyVec3} a The first vector. + * @param {ReadonlyVec3} b The second vector. + * @returns {Boolean} True if the vectors are equal, false otherwise. + */ +export function equals(a: ReadonlyVec3, b: ReadonlyVec3): bool { + let a0 = a[0], + a1 = a[1], + a2 = a[2]; + let b0 = b[0], + b1 = b[1], + b2 = b[2]; + return ( + Math.abs(a0 - b0) <= + glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a0), Math.abs(b0)) && + Math.abs(a1 - b1) <= + glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a1), Math.abs(b1)) && + Math.abs(a2 - b2) <= + glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a2), Math.abs(b2)) + ); +} + +/** + * Alias for {@link vec3.subtract} + * @function + */ +export const sub = subtract; + +/** + * Alias for {@link vec3.multiply} + * @function + */ +export const mul = multiply; + +/** + * Alias for {@link vec3.divide} + * @function + */ +export const div = divide; + +/** + * Alias for {@link vec3.distance} + * @function + */ +export const dist = distance; + +/** + * Alias for {@link vec3.squaredDistance} + * @function + */ +export const sqrDist = squaredDistance; + +/** + * Alias for {@link vec3.length} + * @function + */ +export const len = length; + +/** + * Alias for {@link vec3.squaredLength} + * @function + */ +export const sqrLen = squaredLength; + +/** + * Perform some operation over an array of vec3s. + * + * @param {Array} a the array of vectors to iterate over + * @param {Number} stride Number of elements between the start of each vec3. If 0 assumes tightly packed + * @param {Number} offset Number of elements to skip at the beginning of the array + * @param {Number} count Number of vec3s to iterate over. If 0 iterates over entire array + * @param {Function} fn Function to call for each vector in the array + * @param {Object} [arg] additional argument to pass to fn + * @returns {Array} a + * @function + */ +export const forEach: () => (a: vec3, stride: u16, offset: u16, count: u16, fn: (a: vec3, b: vec3, arg: IArguments) => void, arg: IArguments) => vec3 = (() => { + let vec = create(); + + return function(a: vec3, stride: u16, offset: u16, count: u16, fn: (a: vec3, b: vec3, arg: IArguments) => void, arg: IArguments) { + let i: u16, l: u16; + if (!stride) { + stride = 3; + } + + if (!offset) { + offset = 0; + } + + if (count) { + l = Math.min(count * stride + offset, a.length); + } else { + l = a.length; + } + + for (i = offset; i < l; i += stride) { + vec[0] = a[i]; + vec[1] = a[i + 1]; + vec[2] = a[i + 2]; + fn(vec, vec, arg); + a[i] = vec[0]; + a[i + 1] = vec[1]; + a[i + 2] = vec[2]; + } + + return a; + }; +})(); diff --git a/assembly/vec4.ts b/assembly/vec4.ts new file mode 100644 index 00000000..0360a782 --- /dev/null +++ b/assembly/vec4.ts @@ -0,0 +1,677 @@ +import * as glMatrix from "./common"; +import { MathUtil } from "./imports"; +import { ReadonlyQuat } from "./quat"; + +export class vec4 extends Float64Array {} + +export class ReadonlyVec4 extends vec4 {} + +/** + * 4 Dimensional Vector + * @module vec4 + */ + +/** + * Creates a new, empty vec4 + * + * @returns {vec4} a new 4D vector + */ +export function create(): vec4 { + let out = new vec4(4); + //if (glMatrix.ARRAY_TYPE != Float32Array) { + out[0] = 0; + out[1] = 0; + out[2] = 0; + out[3] = 0; + //} + return out; +} + +/** + * Creates a new vec4 initialized with values from an existing vector + * + * @param {ReadonlyVec4} a vector to clone + * @returns {vec4} a new 4D vector + */ +export function clone(a: ReadonlyVec4): vec4 { + let out = new vec4(4); + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[3]; + return out; +} + +/** + * Creates a new vec4 initialized with the given values + * + * @param {Number} x X component + * @param {Number} y Y component + * @param {Number} z Z component + * @param {Number} w W component + * @returns {vec4} a new 4D vector + */ +export function fromValues(x: f64, y: f64, z: f64, w: f64): vec4 { + let out = new vec4(4); + out[0] = x; + out[1] = y; + out[2] = z; + out[3] = w; + return out; +} + +/** + * Copy the values from one vec4 to another + * + * @param {vec4} out the receiving vector + * @param {ReadonlyVec4} a the source vector + * @returns {vec4} out + */ +export function copy(out: vec4, a: ReadonlyVec4): vec4 { + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[3]; + return out; +} + +/** + * Set the components of a vec4 to the given values + * + * @param {vec4} out the receiving vector + * @param {Number} x X component + * @param {Number} y Y component + * @param {Number} z Z component + * @param {Number} w W component + * @returns {vec4} out + */ +export function set(out: vec4, x: f64, y: f64, z: f64, w: f64): vec4 { + out[0] = x; + out[1] = y; + out[2] = z; + out[3] = w; + return out; +} + +/** + * Adds two vec4's + * + * @param {vec4} out the receiving vector + * @param {ReadonlyVec4} a the first operand + * @param {ReadonlyVec4} b the second operand + * @returns {vec4} out + */ +export function add(out: vec4, a: ReadonlyVec4, b: ReadonlyVec4): vec4 { + out[0] = a[0] + b[0]; + out[1] = a[1] + b[1]; + out[2] = a[2] + b[2]; + out[3] = a[3] + b[3]; + return out; +} + +/** + * Subtracts vector b from vector a + * + * @param {vec4} out the receiving vector + * @param {ReadonlyVec4} a the first operand + * @param {ReadonlyVec4} b the second operand + * @returns {vec4} out + */ +export function subtract(out: vec4, a: ReadonlyVec4, b: ReadonlyVec4): vec4 { + out[0] = a[0] - b[0]; + out[1] = a[1] - b[1]; + out[2] = a[2] - b[2]; + out[3] = a[3] - b[3]; + return out; +} + +/** + * Multiplies two vec4's + * + * @param {vec4} out the receiving vector + * @param {ReadonlyVec4} a the first operand + * @param {ReadonlyVec4} b the second operand + * @returns {vec4} out + */ +export function multiply(out: vec4, a: ReadonlyVec4, b: ReadonlyVec4): vec4 { + out[0] = a[0] * b[0]; + out[1] = a[1] * b[1]; + out[2] = a[2] * b[2]; + out[3] = a[3] * b[3]; + return out; +} + +/** + * Divides two vec4's + * + * @param {vec4} out the receiving vector + * @param {ReadonlyVec4} a the first operand + * @param {ReadonlyVec4} b the second operand + * @returns {vec4} out + */ +export function divide(out: vec4, a: ReadonlyVec4, b: ReadonlyVec4): vec4 { + out[0] = a[0] / b[0]; + out[1] = a[1] / b[1]; + out[2] = a[2] / b[2]; + out[3] = a[3] / b[3]; + return out; +} + +/** + * Math.ceil the components of a vec4 + * + * @param {vec4} out the receiving vector + * @param {ReadonlyVec4} a vector to ceil + * @returns {vec4} out + */ +export function ceil(out: vec4, a: ReadonlyVec4): vec4 { + out[0] = Math.ceil(a[0]); + out[1] = Math.ceil(a[1]); + out[2] = Math.ceil(a[2]); + out[3] = Math.ceil(a[3]); + return out; +} + +/** + * Math.floor the components of a vec4 + * + * @param {vec4} out the receiving vector + * @param {ReadonlyVec4} a vector to floor + * @returns {vec4} out + */ +export function floor(out: vec4, a: ReadonlyVec4): vec4 { + out[0] = Math.floor(a[0]); + out[1] = Math.floor(a[1]); + out[2] = Math.floor(a[2]); + out[3] = Math.floor(a[3]); + return out; +} + +/** + * Returns the minimum of two vec4's + * + * @param {vec4} out the receiving vector + * @param {ReadonlyVec4} a the first operand + * @param {ReadonlyVec4} b the second operand + * @returns {vec4} out + */ +export function min(out: vec4, a: ReadonlyVec4, b: ReadonlyVec4): vec4 { + out[0] = Math.min(a[0], b[0]); + out[1] = Math.min(a[1], b[1]); + out[2] = Math.min(a[2], b[2]); + out[3] = Math.min(a[3], b[3]); + return out; +} + +/** + * Returns the maximum of two vec4's + * + * @param {vec4} out the receiving vector + * @param {ReadonlyVec4} a the first operand + * @param {ReadonlyVec4} b the second operand + * @returns {vec4} out + */ +export function max(out: vec4, a: ReadonlyVec4, b: ReadonlyVec4): vec4 { + out[0] = Math.max(a[0], b[0]); + out[1] = Math.max(a[1], b[1]); + out[2] = Math.max(a[2], b[2]); + out[3] = Math.max(a[3], b[3]); + return out; +} + +/** + * Math.round the components of a vec4 + * + * @param {vec4} out the receiving vector + * @param {ReadonlyVec4} a vector to round + * @returns {vec4} out + */ +export function round(out: vec4, a: ReadonlyVec4): vec4 { + out[0] = Math.round(a[0]); + out[1] = Math.round(a[1]); + out[2] = Math.round(a[2]); + out[3] = Math.round(a[3]); + return out; +} + +/** + * Scales a vec4 by a scalar number + * + * @param {vec4} out the receiving vector + * @param {ReadonlyVec4} a the vector to scale + * @param {Number} b amount to scale the vector by + * @returns {vec4} out + */ +export function scale(out: vec4, a: ReadonlyVec4, b: f64): vec4 { + out[0] = a[0] * b; + out[1] = a[1] * b; + out[2] = a[2] * b; + out[3] = a[3] * b; + return out; +} + +/** + * Adds two vec4's after scaling the second operand by a scalar value + * + * @param {vec4} out the receiving vector + * @param {ReadonlyVec4} a the first operand + * @param {ReadonlyVec4} b the second operand + * @param {Number} scale the amount to scale b by before adding + * @returns {vec4} out + */ +export function scaleAndAdd(out: vec4, a: ReadonlyVec4, b: ReadonlyVec4, scale: f64): vec4 { + out[0] = a[0] + b[0] * scale; + out[1] = a[1] + b[1] * scale; + out[2] = a[2] + b[2] * scale; + out[3] = a[3] + b[3] * scale; + return out; +} + +/** + * Calculates the euclidian distance between two vec4's + * + * @param {ReadonlyVec4} a the first operand + * @param {ReadonlyVec4} b the second operand + * @returns {Number} distance between a and b + */ +export function distance(a: ReadonlyVec4, b: ReadonlyVec4): f64 { + let x = b[0] - a[0]; + let y = b[1] - a[1]; + let z = b[2] - a[2]; + let w = b[3] - a[3]; + return MathUtil.hypot(x, y, z, w); +} + +/** + * Calculates the squared euclidian distance between two vec4's + * + * @param {ReadonlyVec4} a the first operand + * @param {ReadonlyVec4} b the second operand + * @returns {Number} squared distance between a and b + */ +export function squaredDistance(a: ReadonlyVec4, b: ReadonlyVec4): f64 { + let x = b[0] - a[0]; + let y = b[1] - a[1]; + let z = b[2] - a[2]; + let w = b[3] - a[3]; + return x * x + y * y + z * z + w * w; +} + +/** + * Calculates the length of a vec4 + * + * @param {ReadonlyVec4} a vector to calculate length of + * @returns {Number} length of a + */ +export function length(a: ReadonlyVec4): f64 { + let x = a[0]; + let y = a[1]; + let z = a[2]; + let w = a[3]; + return MathUtil.hypot(x, y, z, w); +} + +/** + * Calculates the squared length of a vec4 + * + * @param {ReadonlyVec4} a vector to calculate squared length of + * @returns {Number} squared length of a + */ +export function squaredLength(a: ReadonlyVec4): f64 { + let x = a[0]; + let y = a[1]; + let z = a[2]; + let w = a[3]; + return x * x + y * y + z * z + w * w; +} + +/** + * Negates the components of a vec4 + * + * @param {vec4} out the receiving vector + * @param {ReadonlyVec4} a vector to negate + * @returns {vec4} out + */ +export function negate(out: vec4, a: ReadonlyVec4): vec4 { + out[0] = -a[0]; + out[1] = -a[1]; + out[2] = -a[2]; + out[3] = -a[3]; + return out; +} + +/** + * Returns the inverse of the components of a vec4 + * + * @param {vec4} out the receiving vector + * @param {ReadonlyVec4} a vector to invert + * @returns {vec4} out + */ +export function inverse(out: vec4, a: ReadonlyVec4): vec4 { + out[0] = 1.0 / a[0]; + out[1] = 1.0 / a[1]; + out[2] = 1.0 / a[2]; + out[3] = 1.0 / a[3]; + return out; +} + +/** + * Normalize a vec4 + * + * @param {vec4} out the receiving vector + * @param {ReadonlyVec4} a vector to normalize + * @returns {vec4} out + */ +export function normalize(out: vec4, a: ReadonlyVec4): vec4 { + let x = a[0]; + let y = a[1]; + let z = a[2]; + let w = a[3]; + let len = x * x + y * y + z * z + w * w; + if (len > 0) { + len = 1 / Math.sqrt(len); + } + out[0] = x * len; + out[1] = y * len; + out[2] = z * len; + out[3] = w * len; + return out; +} + +/** + * Calculates the dot product of two vec4's + * + * @param {ReadonlyVec4} a the first operand + * @param {ReadonlyVec4} b the second operand + * @returns {Number} dot product of a and b + */ +export function dot(a: ReadonlyVec4, b: ReadonlyVec4): f64 { + return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3]; +} + +/** + * Returns the cross-product of three vectors in a 4-dimensional space + * + * @param {vec4} out the receiving vector + * @param {ReadonlyVec4} u the first vector + * @param {ReadonlyVec4} v the second vector + * @param {ReadonlyVec4} w the third vector + * @returns {vec4} out + */ +export function cross(out: vec4, u: ReadonlyVec4, v: ReadonlyVec4, w: ReadonlyVec4): vec4 { + let A = v[0] * w[1] - v[1] * w[0], + B = v[0] * w[2] - v[2] * w[0], + C = v[0] * w[3] - v[3] * w[0], + D = v[1] * w[2] - v[2] * w[1], + E = v[1] * w[3] - v[3] * w[1], + F = v[2] * w[3] - v[3] * w[2]; + let G = u[0]; + let H = u[1]; + let I = u[2]; + let J = u[3]; + + out[0] = H * F - I * E + J * D; + out[1] = -(G * F) + I * C - J * B; + out[2] = G * E - H * C + J * A; + out[3] = -(G * D) + H * B - I * A; + + return out; +} + +/** + * Performs a linear interpolation between two vec4's + * + * @param {vec4} out the receiving vector + * @param {ReadonlyVec4} a the first operand + * @param {ReadonlyVec4} b the second operand + * @param {Number} t interpolation amount, in the range [0-1], between the two inputs + * @returns {vec4} out + */ +export function lerp(out: vec4, a: ReadonlyVec4, b: ReadonlyVec4, t: f64): vec4 { + let ax = a[0]; + let ay = a[1]; + let az = a[2]; + let aw = a[3]; + out[0] = ax + t * (b[0] - ax); + out[1] = ay + t * (b[1] - ay); + out[2] = az + t * (b[2] - az); + out[3] = aw + t * (b[3] - aw); + return out; +} + +/** + * Generates a random vector with the given scale + * + * @param {vec4} out the receiving vector + * @param {Number} [scale] Length of the resulting vector. If omitted, a unit vector will be returned + * @returns {vec4} out + */ +export function random(out: vec4, scale: f64): vec4 { + scale = scale || 1.0; + + // Marsaglia, George. Choosing a Point from the Surface of a + // Sphere. Ann. Math. Statist. 43 (1972), no. 2, 645--646. + // http://projecteuclid.org/euclid.aoms/1177692644; + var v1: f64, v2: f64, v3: f64, v4: f64; + var s1: f64, s2: f64; + do { + v1 = glMatrix.RANDOM() * 2 - 1; + v2 = glMatrix.RANDOM() * 2 - 1; + s1 = v1 * v1 + v2 * v2; + } while (s1 >= 1); + do { + v3 = glMatrix.RANDOM() * 2 - 1; + v4 = glMatrix.RANDOM() * 2 - 1; + s2 = v3 * v3 + v4 * v4; + } while (s2 >= 1); + + var d = Math.sqrt((1 - s1) / s2); + out[0] = scale * v1; + out[1] = scale * v2; + out[2] = scale * v3 * d; + out[3] = scale * v4 * d; + return out; +} + +/** + * Transforms the vec4 with a mat4. + * + * @param {vec4} out the receiving vector + * @param {ReadonlyVec4} a the vector to transform + * @param {ReadonlyMat4} m matrix to transform with + * @returns {vec4} out + */ +export function transformMat4(out: vec4, a: ReadonlyVec4, m: ReadonlyVec4): vec4 { + let x = a[0], + y = a[1], + z = a[2], + w = a[3]; + out[0] = m[0] * x + m[4] * y + m[8] * z + m[12] * w; + out[1] = m[1] * x + m[5] * y + m[9] * z + m[13] * w; + out[2] = m[2] * x + m[6] * y + m[10] * z + m[14] * w; + out[3] = m[3] * x + m[7] * y + m[11] * z + m[15] * w; + return out; +} + +/** + * Transforms the vec4 with a quat + * + * @param {vec4} out the receiving vector + * @param {ReadonlyVec4} a the vector to transform + * @param {ReadonlyQuat} q quaternion to transform with + * @returns {vec4} out + */ +export function transformQuat(out: vec4, a: ReadonlyVec4, q: ReadonlyQuat):vec4 { + let x = a[0], + y = a[1], + z = a[2]; + let qx = q[0], + qy = q[1], + qz = q[2], + qw = q[3]; + + // calculate quat * vec + let ix = qw * x + qy * z - qz * y; + let iy = qw * y + qz * x - qx * z; + let iz = qw * z + qx * y - qy * x; + let iw = -qx * x - qy * y - qz * z; + + // calculate result * inverse quat + out[0] = ix * qw + iw * -qx + iy * -qz - iz * -qy; + out[1] = iy * qw + iw * -qy + iz * -qx - ix * -qz; + out[2] = iz * qw + iw * -qz + ix * -qy - iy * -qx; + out[3] = a[3]; + return out; +} + +/** + * Set the components of a vec4 to zero + * + * @param {vec4} out the receiving vector + * @returns {vec4} out + */ +export function zero(out: vec4): vec4 { + out[0] = 0.0; + out[1] = 0.0; + out[2] = 0.0; + out[3] = 0.0; + return out; +} + +/** + * Returns a string representation of a vector + * + * @param {ReadonlyVec4} a vector to represent as a string + * @returns {String} string representation of the vector + */ +export function str(a: ReadonlyVec4): string { + return "vec4(" + a[0].toString() + ", " + a[1].toString() + ", " + a[2].toString() + ", " + a[3].toString() + ")"; +} + +/** + * Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===) + * + * @param {ReadonlyVec4} a The first vector. + * @param {ReadonlyVec4} b The second vector. + * @returns {Boolean} True if the vectors are equal, false otherwise. + */ +export function exactEquals(a: ReadonlyVec4, b: ReadonlyVec4): bool { + return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3]; +} + +/** + * Returns whether or not the vectors have approximately the same elements in the same position. + * + * @param {ReadonlyVec4} a The first vector. + * @param {ReadonlyVec4} b The second vector. + * @returns {Boolean} True if the vectors are equal, false otherwise. + */ +export function equals(a: ReadonlyVec4, b: ReadonlyVec4): bool { + let a0 = a[0], + a1 = a[1], + a2 = a[2], + a3 = a[3]; + let b0 = b[0], + b1 = b[1], + b2 = b[2], + b3 = b[3]; + return ( + Math.abs(a0 - b0) <= + glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a0), Math.abs(b0)) && + Math.abs(a1 - b1) <= + glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a1), Math.abs(b1)) && + Math.abs(a2 - b2) <= + glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a2), Math.abs(b2)) && + Math.abs(a3 - b3) <= + glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a3), Math.abs(b3)) + ); +} + +/** + * Alias for {@link vec4.subtract} + * @function + */ +export const sub = subtract; + +/** + * Alias for {@link vec4.multiply} + * @function + */ +export const mul = multiply; + +/** + * Alias for {@link vec4.divide} + * @function + */ +export const div = divide; + +/** + * Alias for {@link vec4.distance} + * @function + */ +export const dist = distance; + +/** + * Alias for {@link vec4.squaredDistance} + * @function + */ +export const sqrDist = squaredDistance; + +/** + * Alias for {@link vec4.length} + * @function + */ +export const len = length; + +/** + * Alias for {@link vec4.squaredLength} + * @function + */ +export const sqrLen = squaredLength; + +/** + * Perform some operation over an array of vec4s. + * + * @param {Array} a the array of vectors to iterate over + * @param {Number} stride Number of elements between the start of each vec4. If 0 assumes tightly packed + * @param {Number} offset Number of elements to skip at the beginning of the array + * @param {Number} count Number of vec4s to iterate over. If 0 iterates over entire array + * @param {Function} fn Function to call for each vector in the array + * @param {Object} [arg] additional argument to pass to fn + * @returns {Array} a + * @function + */ +export const forEach: () => (a: vec4, stride: u16, offset: u16, count: u16, fn: (a: vec4, b: vec4, arg: IArguments) => void, arg: IArguments) => vec4 = (() => { + let vec = create(); + + return function(a: vec4, stride: u16, offset: u16, count: u16, fn: (a: vec4, b: vec4, arg: IArguments) => void, arg: IArguments) { + let i: u16, l: u16; + if (!stride) { + stride = 4; + } + + if (!offset) { + offset = 0; + } + + if (count) { + l = Math.min(count * stride + offset, a.length); + } else { + l = a.length; + } + + for (i = offset; i < l; i += stride) { + vec[0] = a[i]; + vec[1] = a[i + 1]; + vec[2] = a[i + 2]; + vec[3] = a[i + 3]; + fn(vec, vec, arg); + a[i] = vec[0]; + a[i + 1] = vec[1]; + a[i + 2] = vec[2]; + a[i + 3] = vec[3]; + } + + return a; + }; +})(); From 68c0b012692566f6cdf1cf8e0bc4045e10b411e6 Mon Sep 17 00:00:00 2001 From: Huguenin-Elie Steve Date: Sat, 27 Mar 2021 08:06:59 +0100 Subject: [PATCH 03/32] set assemblyscript portability for AS/TS --- LICENSE.md | 2 +- assembly/imports.ts | 2 + assembly/index.as.ts | 17 + assembly/index.ts | 18 +- assembly/quat.ts | 3 + assembly/tsconfig.json | 2 +- assembly/vec2.ts | 1 + assembly/vec3.ts | 1 + assembly/vec4.ts | 1 + build/optimized.wat | 8702 +++++++++++++++++++++++++++++++++++++++- package.json | 4 +- 11 files changed, 8717 insertions(+), 36 deletions(-) create mode 100644 assembly/index.as.ts diff --git a/LICENSE.md b/LICENSE.md index f697b383..3a96fca4 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,4 +1,4 @@ -Copyright (c) 2015-2020, Brandon Jones, Colin MacKenzie IV. +Copyright (c) 2015-2021, Brandon Jones, Colin MacKenzie IV. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/assembly/imports.ts b/assembly/imports.ts index fb2728b4..5ef7dc91 100644 --- a/assembly/imports.ts +++ b/assembly/imports.ts @@ -5,9 +5,11 @@ // prettier-ignore export declare namespace MathUtil { + // @ts-ignore decorator @external("Math", "max") function max(a: f64, b: f64, c?: f64): f64; + // @ts-ignore decorator @external("Math", "hypot") function hypot(a: f64, b: f64, c?: f64, d?: f64, e?: f64, f?: f64, g?: f64, h?: f64, i?: f64, j?: f64, k?: f64, l?: f64, m?: f64, n?: f64, o?: f64, p?: f64): f64; } diff --git a/assembly/index.as.ts b/assembly/index.as.ts new file mode 100644 index 00000000..d2423c1e --- /dev/null +++ b/assembly/index.as.ts @@ -0,0 +1,17 @@ +import * as glMatrix from "./common"; +import * as mat2 from "./mat2"; +import * as mat2d from "./mat2d"; +import * as mat3 from "./mat3"; +import * as mat4 from "./mat4"; +import * as quat from "./quat"; +import * as quat2 from "./quat2"; +import * as vec2 from "./vec2"; +import * as vec3 from "./vec3"; +import * as vec4 from "./vec4"; + +export { + glMatrix, + mat2, mat2d, mat3, mat4, + quat, quat2, + vec2, vec3, vec4, +}; diff --git a/assembly/index.ts b/assembly/index.ts index d6600f30..25733b3a 100644 --- a/assembly/index.ts +++ b/assembly/index.ts @@ -1,14 +1,10 @@ -import "assemblyscript/std/assembly"; -import * as glMatrix from "./common"; -import * as mat2 from "./mat2"; -import * as mat2d from "./mat2d"; -import * as mat3 from "./mat3"; -import * as mat4 from "./mat4"; -import * as quat from "./quat"; -import * as quat2 from "./quat2"; -import * as vec2 from "./vec2"; -import * as vec3 from "./vec3"; -import * as vec4 from "./vec4"; +import "assemblyscript/std/portable"; +import { + glMatrix, + mat2, mat2d, mat3, mat4, + quat, quat2, + vec2, vec3, vec4, +} from "./index.as"; export { glMatrix, diff --git a/assembly/quat.ts b/assembly/quat.ts index 447bb962..e7b49ec5 100644 --- a/assembly/quat.ts +++ b/assembly/quat.ts @@ -704,6 +704,7 @@ export function equals(a: ReadonlyQuat, b: ReadonlyQuat): bool { * @param {ReadonlyVec3} b the destination vector * @returns {quat} out */ +// @ts-ignore export const rotationTo: () => (out: quat, a: ReadonlyQuat, b: ReadonlyQuat) => quat = (() => { let tmpvec3 = vec3.create(); let xUnitVec3 = vec3.fromValues(1, 0, 0); @@ -745,6 +746,7 @@ export const rotationTo: () => (out: quat, a: ReadonlyQuat, b: ReadonlyQuat) => * @param {Number} t interpolation amount, in the range [0-1], between the two inputs * @returns {quat} out */ +// @ts-ignore export const sqlerp: () => (out: quat, a: ReadonlyQuat, b: ReadonlyQuat, c: ReadonlyQuat, d: ReadonlyQuat, t: f64) => quat = (() => { let temp1 = create(); let temp2 = create(); @@ -769,6 +771,7 @@ export const sqlerp: () => (out: quat, a: ReadonlyQuat, b: ReadonlyQuat, c: Read * @param {ReadonlyVec3} up the vector representing the local "up" direction * @returns {quat} out */ +// @ts-ignore export const setAxes: () => (out: quat, view: vec3.ReadonlyVec3, right: vec3.ReadonlyVec3, up: vec3.ReadonlyVec3) => quat = (() => { let matr = mat3.create(); diff --git a/assembly/tsconfig.json b/assembly/tsconfig.json index 4fd23dca..91421cd7 100644 --- a/assembly/tsconfig.json +++ b/assembly/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "assemblyscript/std/assembly.json", + "extends": "assemblyscript/std/portable.json", "compilerOptions": { "types": ["./assembly/types.d.ts"] }, diff --git a/assembly/vec2.ts b/assembly/vec2.ts index 16e4506c..70493318 100644 --- a/assembly/vec2.ts +++ b/assembly/vec2.ts @@ -604,6 +604,7 @@ export const sqrLen = squaredLength; * @returns {Array} a * @function */ +// @ts-ignore export const forEach: () => (a: vec2, stride: u16, offset: u16, count: u16, fn: (a: vec2, b: vec2, arg: IArguments) => void, arg: IArguments) => vec2 = (() => { let vec = create(); return function(a: vec2, stride: u16, offset: u16, count: u16, fn: (a: vec2, b: vec2, arg: IArguments) => void, arg: IArguments) { diff --git a/assembly/vec3.ts b/assembly/vec3.ts index ab85af7e..8e9d37ab 100644 --- a/assembly/vec3.ts +++ b/assembly/vec3.ts @@ -802,6 +802,7 @@ export const sqrLen = squaredLength; * @returns {Array} a * @function */ +// @ts-ignore export const forEach: () => (a: vec3, stride: u16, offset: u16, count: u16, fn: (a: vec3, b: vec3, arg: IArguments) => void, arg: IArguments) => vec3 = (() => { let vec = create(); diff --git a/assembly/vec4.ts b/assembly/vec4.ts index 0360a782..50a6589f 100644 --- a/assembly/vec4.ts +++ b/assembly/vec4.ts @@ -641,6 +641,7 @@ export const sqrLen = squaredLength; * @returns {Array} a * @function */ +// @ts-ignore export const forEach: () => (a: vec4, stride: u16, offset: u16, count: u16, fn: (a: vec4, b: vec4, arg: IArguments) => void, arg: IArguments) => vec4 = (() => { let vec = create(); diff --git a/build/optimized.wat b/build/optimized.wat index 4bebbc1d..b9e7c48d 100644 --- a/build/optimized.wat +++ b/build/optimized.wat @@ -1,8 +1,40 @@ (module + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) + (type $i32_=>_none (func (param i32))) (type $f64_f64_=>_i32 (func (param f64 f64) (result i32))) + (type $none_=>_none (func)) + (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) + (type $f64_i32_i32_=>_i32 (func (param f64 i32 i32) (result i32))) + (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) + (type $i32_f64_i32_=>_i32 (func (param i32 f64 i32) (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_i32_f64_=>_i32 (func (param i32 i32 f64) (result i32))) + (type $none_=>_f64 (func (result f64))) + (type $i32_=>_f64 (func (param i32) (result f64))) (type $f64_=>_f64 (func (param f64) (result f64))) + (type $i32_i32_=>_f64 (func (param i32 i32) (result f64))) + (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (type $i32_i32_f64_=>_none (func (param i32 i32 f64))) + (type $f64_i32_i32_=>_none (func (param f64 i32 i32))) + (type $i64_=>_i32 (func (param i64) (result i32))) + (type $f64_=>_i32 (func (param f64) (result i32))) + (type $i32_i32_i32_f64_=>_i32 (func (param i32 i32 i32 f64) (result i32))) + (type $i32_i64_i32_i64_i32_i64_i32_=>_i32 (func (param i32 i64 i32 i64 i32 i64 i32) (result i32))) + (type $i32_f64_i32_i32_=>_i32 (func (param i32 f64 i32 i32) (result i32))) + (type $i32_f64_f64_f64_f64_=>_i32 (func (param i32 f64 f64 f64 f64) (result i32))) + (type $f64_f64_f64_f64_=>_i32 (func (param f64 f64 f64 f64) (result i32))) + (type $i64_=>_i64 (func (param i64) (result i64))) + (type $f64_i32_i32_=>_f64 (func (param f64 i32 i32) (result f64))) (type $f64_f64_f64_=>_f64 (func (param f64 f64 f64) (result f64))) - (import "Math" "max" (func $src/as/imports/MathUtil.max3 (param f64 f64 f64) (result f64))) + (type $f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_=>_f64 (func (param f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64) (result f64))) + (import "env" "seed" (func $~lib/builtins/seed (result f64))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (import "Math" "hypot" (func $assembly/imports/MathUtil.hypot (param f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64) (result f64))) + (import "Math" "max" (func $assembly/imports/MathUtil.max3 (param f64 f64 f64) (result f64))) (memory $0 1) (data (i32.const 1036) ",") (data (i32.const 1048) "\01\00\00\00\18\00\00\00~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s") @@ -10,35 +42,8663 @@ (data (i32.const 1096) "\03\00\00\00\08\00\00\00\01") (data (i32.const 1116) "\1c") (data (i32.const 1128) "\01\00\00\00\06\00\00\00z\00y\00x") - (data (i32.const 1148) "\1c") - (data (i32.const 1160) "\04\00\00\00\08\00\00\00\02") - (global $src/as/common/EPSILON f64 (f64.const 1e-06)) - (global $src/as/common/RANDOM i32 (i32.const 1104)) - (global $src/as/common/ANGLE_ORDER i32 (i32.const 1136)) - (export "EPSILON" (global $src/as/common/EPSILON)) - (export "RANDOM" (global $src/as/common/RANDOM)) - (export "ANGLE_ORDER" (global $src/as/common/ANGLE_ORDER)) - (export "toRadian" (func $src/as/common/toRadian)) - (export "equals" (func $src/as/common/equals)) + (data (i32.const 1148) "<") + (data (i32.const 1160) "\01\00\00\00$\00\00\00I\00n\00d\00e\00x\00 \00o\00u\00t\00 \00o\00f\00 \00r\00a\00n\00g\00e") + (data (i32.const 1212) "<") + (data (i32.const 1224) "\01\00\00\00$\00\00\00~\00l\00i\00b\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 1276) "\1c") + (data (i32.const 1288) "\07\00\00\00\08\00\00\00\02") + (data (i32.const 1308) "\1c") + (data (i32.const 1320) "\07\00\00\00\08\00\00\00\03") + (data (i32.const 1340) ",") + (data (i32.const 1352) "\01\00\00\00\1c\00\00\00I\00n\00v\00a\00l\00i\00d\00 \00l\00e\00n\00g\00t\00h") + (data (i32.const 1388) "<") + (data (i32.const 1400) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 1452) "<") + (data (i32.const 1464) "\01\00\00\00(\00\00\00A\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e") + (data (i32.const 1516) "<") + (data (i32.const 1528) "\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00r\00t\00/\00i\00t\00c\00m\00s\00.\00t\00s") + (data (i32.const 1644) ",") + (data (i32.const 1656) "\01\00\00\00\14\00\00\00~\00l\00i\00b\00/\00r\00t\00.\00t\00s") + (data (i32.const 1724) "<") + (data (i32.const 1736) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s") + (data (i32.const 1788) "\1c") + (data (i32.const 1800) "\01") + (data (i32.const 1820) "\1c") + (data (i32.const 1832) "\01\00\00\00\06\00\00\000\00.\000") + (data (i32.const 1852) "\1c") + (data (i32.const 1864) "\01\00\00\00\06\00\00\00N\00a\00N") + (data (i32.const 1884) ",") + (data (i32.const 1896) "\01\00\00\00\12\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y") + (data (i32.const 1932) ",") + (data (i32.const 1944) "\01\00\00\00\10\00\00\00I\00n\00f\00i\00n\00i\00t\00y") + (data (i32.const 2040) "\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\a7)\b1&p\9c\e9\84D\bb.9\d6\919A~_\b4\8b_\84\9c\f49S\83\ff\97\f8\1f;(\f9\bd\8b\11/\ef\0f\98\05\de\cf~6m\1fm\nZf?FO\b7\t\cb\'\c7\ba\'u-\ea_\9e\f79\07={\f1\e5\eb\b1_\fbk\ea\92R\8aF0\03V\08]\8d\1f \bc\cf\f0\abk{\fca\91\e3\a9\1d6\f4\9a_\85\99e\08\1b\e6^\80\d8\ff\8d@h\a0\14W\15\06\061\'sM") + (data (i32.const 3196) "\1c") + (data (i32.const 3208) "\01\00\00\00\n\00\00\00m\00a\00t\002\00(") + (data (i32.const 3228) "\1c") + (data (i32.const 3240) "\01\00\00\00\04\00\00\00,\00 ") + (data (i32.const 3260) "\1c") + (data (i32.const 3272) "\01\00\00\00\02\00\00\00)") + (data (i32.const 3292) "\1c") + (data (i32.const 3304) "\0b\00\00\00\08\00\00\00\04") + (data (i32.const 3328) "\0c\00\00\00 \00\00\00\00\00\00\00 ") + (data (i32.const 3364) "\01\1a\00\00\05\00\00\00\01\1a\00\00\02\00\00\00\01\1a\00\00\04") + (data (i32.const 3396) "\01\1a\00\00\05\00\00\00\02A\00\00\00\00\00\00\02\t") + (table $0 5 funcref) + (elem (i32.const 1) $~lib/math/NativeMath.random $assembly/mat2/multiply $assembly/mat2/subtract $~lib/util/sort/COMPARATOR~anonymous|0) + (global $~lib/math/random_seeded (mut i32) (i32.const 0)) + (global $~lib/math/random_state0_64 (mut i64) (i64.const 0)) + (global $~lib/math/random_state1_64 (mut i64) (i64.const 0)) + (global $~lib/math/random_state0_32 (mut i32) (i32.const 0)) + (global $~lib/math/random_state1_32 (mut i32) (i32.const 0)) + (global $assembly/mat2/mul i32 (i32.const 1296)) + (global $assembly/mat2/sub i32 (i32.const 1328)) + (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) + (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) + (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) + (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) + (global $~lib/rt/itcms/iter (mut i32) (i32.const 0)) + (global $~lib/rt/itcms/toSpace (mut i32) (i32.const 0)) + (global $~lib/rt/itcms/white (mut i32) (i32.const 0)) + (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) + (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) + (global $~argumentsLength (mut i32) (i32.const 0)) + (global $~lib/util/number/_frc_plus (mut i64) (i64.const 0)) + (global $~lib/util/number/_frc_minus (mut i64) (i64.const 0)) + (global $~lib/util/number/_exp (mut i32) (i32.const 0)) + (global $~lib/util/number/_K (mut i32) (i32.const 0)) + (global $~lib/util/number/_frc_pow (mut i64) (i64.const 0)) + (global $~lib/util/number/_exp_pow (mut i32) (i32.const 0)) + (global $~lib/math/rempio2_y0 (mut f64) (f64.const 0)) + (global $~lib/math/rempio2_y1 (mut f64) (f64.const 0)) + (global $~lib/math/res128_hi (mut i64) (i64.const 0)) + (global $assembly/mat2/ReadonlyVec2 i32 (i32.const 8)) + (global $assembly/mat2/mat2 i32 (i32.const 4)) + (global $assembly/mat2/ReadonlyMat2 i32 (i32.const 6)) + (global $~lib/memory/__stack_pointer (mut i32) (i32.const 19812)) + (export "ReadonlyVec2" (global $assembly/mat2/ReadonlyVec2)) + (export "mat2" (global $assembly/mat2/mat2)) + (export "default" (global $assembly/mat2/mat2)) + (export "ReadonlyMat2" (global $assembly/mat2/ReadonlyMat2)) + (export "create" (func $assembly/mat2/create)) + (export "fromValues" (func $assembly/mat2/fromValues)) + (export "mul" (global $assembly/mat2/mul)) + (export "sub" (global $assembly/mat2/sub)) (export "memory" (memory $0)) - (func $src/as/common/toRadian (param $0 f64) (result f64) + (export "__setArgumentsLength" (func $~setArgumentsLength)) + (export "ReadonlyVec2#get:buffer" (func $export:~lib/arraybuffer/ArrayBufferView#get:buffer)) + (export "ReadonlyVec2#get:dataStart" (func $export:~lib/arraybuffer/ArrayBufferView#get:dataStart)) + (export "ReadonlyVec2#get:byteLength" (func $export:~lib/arraybuffer/ArrayBufferView#get:byteLength)) + (export "ReadonlyVec2#get:byteOffset" (func $export:~lib/arraybuffer/ArrayBufferView#get:byteOffset)) + (export "ReadonlyVec2#constructor" (func $export:assembly/mat2/ReadonlyVec2#constructor)) + (export "ReadonlyVec2#get:length" (func $export:~lib/typedarray/Float64Array#get:length)) + (export "ReadonlyVec2#at" (func $export:~lib/typedarray/Float64Array#at)) + (export "ReadonlyVec2#includes" (func $export:~lib/typedarray/Float64Array#includes@varargs)) + (export "ReadonlyVec2#indexOf" (func $export:~lib/typedarray/Float64Array#indexOf@varargs)) + (export "ReadonlyVec2#lastIndexOf" (func $export:~lib/typedarray/Float64Array#lastIndexOf@varargs)) + (export "ReadonlyVec2#fill" (func $export:~lib/typedarray/Float64Array#fill@varargs)) + (export "ReadonlyVec2#sort" (func $export:~lib/typedarray/Float64Array#sort@varargs)) + (export "ReadonlyVec2#slice" (func $export:~lib/typedarray/Float64Array#slice@varargs)) + (export "ReadonlyVec2#subarray" (func $export:~lib/typedarray/Float64Array#subarray@varargs)) + (export "ReadonlyVec2#copyWithin" (func $export:~lib/typedarray/Float64Array#copyWithin@varargs)) + (export "ReadonlyVec2#map" (func $export:~lib/typedarray/Float64Array#map)) + (export "ReadonlyVec2#filter" (func $export:~lib/typedarray/Float64Array#filter)) + (export "ReadonlyVec2#findIndex" (func $export:~lib/typedarray/Float64Array#findIndex)) + (export "ReadonlyVec2#some" (func $export:~lib/typedarray/Float64Array#some)) + (export "ReadonlyVec2#every" (func $export:~lib/typedarray/Float64Array#every)) + (export "ReadonlyVec2#forEach" (func $export:~lib/typedarray/Float64Array#forEach)) + (export "ReadonlyVec2#reverse" (func $export:~lib/typedarray/Float64Array#reverse)) + (export "ReadonlyVec2#join" (func $export:~lib/typedarray/Float64Array#join@varargs)) + (export "ReadonlyVec2#toString" (func $export:~lib/typedarray/Float64Array#toString)) + (export "mat2#get:buffer" (func $export:~lib/arraybuffer/ArrayBufferView#get:buffer)) + (export "mat2#get:dataStart" (func $export:~lib/arraybuffer/ArrayBufferView#get:dataStart)) + (export "mat2#get:byteLength" (func $export:~lib/arraybuffer/ArrayBufferView#get:byteLength)) + (export "mat2#get:byteOffset" (func $export:~lib/arraybuffer/ArrayBufferView#get:byteOffset)) + (export "mat2#constructor" (func $export:assembly/mat2/mat2#constructor)) + (export "mat2#get:length" (func $export:~lib/typedarray/Float64Array#get:length)) + (export "mat2#at" (func $export:~lib/typedarray/Float64Array#at)) + (export "mat2#includes" (func $export:~lib/typedarray/Float64Array#includes@varargs)) + (export "mat2#indexOf" (func $export:~lib/typedarray/Float64Array#indexOf@varargs)) + (export "mat2#lastIndexOf" (func $export:~lib/typedarray/Float64Array#lastIndexOf@varargs)) + (export "mat2#fill" (func $export:~lib/typedarray/Float64Array#fill@varargs)) + (export "mat2#sort" (func $export:~lib/typedarray/Float64Array#sort@varargs)) + (export "mat2#slice" (func $export:~lib/typedarray/Float64Array#slice@varargs)) + (export "mat2#subarray" (func $export:~lib/typedarray/Float64Array#subarray@varargs)) + (export "mat2#copyWithin" (func $export:~lib/typedarray/Float64Array#copyWithin@varargs)) + (export "mat2#map" (func $export:~lib/typedarray/Float64Array#map)) + (export "mat2#filter" (func $export:~lib/typedarray/Float64Array#filter)) + (export "mat2#findIndex" (func $export:~lib/typedarray/Float64Array#findIndex)) + (export "mat2#some" (func $export:~lib/typedarray/Float64Array#some)) + (export "mat2#every" (func $export:~lib/typedarray/Float64Array#every)) + (export "mat2#forEach" (func $export:~lib/typedarray/Float64Array#forEach)) + (export "mat2#reverse" (func $export:~lib/typedarray/Float64Array#reverse)) + (export "mat2#join" (func $export:~lib/typedarray/Float64Array#join@varargs)) + (export "mat2#toString" (func $export:~lib/typedarray/Float64Array#toString)) + (export "default#get:buffer" (func $export:~lib/arraybuffer/ArrayBufferView#get:buffer)) + (export "default#get:dataStart" (func $export:~lib/arraybuffer/ArrayBufferView#get:dataStart)) + (export "default#get:byteLength" (func $export:~lib/arraybuffer/ArrayBufferView#get:byteLength)) + (export "default#get:byteOffset" (func $export:~lib/arraybuffer/ArrayBufferView#get:byteOffset)) + (export "default#constructor" (func $export:assembly/mat2/mat2#constructor)) + (export "default#get:length" (func $export:~lib/typedarray/Float64Array#get:length)) + (export "default#at" (func $export:~lib/typedarray/Float64Array#at)) + (export "default#includes" (func $export:~lib/typedarray/Float64Array#includes@varargs)) + (export "default#indexOf" (func $export:~lib/typedarray/Float64Array#indexOf@varargs)) + (export "default#lastIndexOf" (func $export:~lib/typedarray/Float64Array#lastIndexOf@varargs)) + (export "default#fill" (func $export:~lib/typedarray/Float64Array#fill@varargs)) + (export "default#sort" (func $export:~lib/typedarray/Float64Array#sort@varargs)) + (export "default#slice" (func $export:~lib/typedarray/Float64Array#slice@varargs)) + (export "default#subarray" (func $export:~lib/typedarray/Float64Array#subarray@varargs)) + (export "default#copyWithin" (func $export:~lib/typedarray/Float64Array#copyWithin@varargs)) + (export "default#map" (func $export:~lib/typedarray/Float64Array#map)) + (export "default#filter" (func $export:~lib/typedarray/Float64Array#filter)) + (export "default#findIndex" (func $export:~lib/typedarray/Float64Array#findIndex)) + (export "default#some" (func $export:~lib/typedarray/Float64Array#some)) + (export "default#every" (func $export:~lib/typedarray/Float64Array#every)) + (export "default#forEach" (func $export:~lib/typedarray/Float64Array#forEach)) + (export "default#reverse" (func $export:~lib/typedarray/Float64Array#reverse)) + (export "default#join" (func $export:~lib/typedarray/Float64Array#join@varargs)) + (export "default#toString" (func $export:~lib/typedarray/Float64Array#toString)) + (export "ReadonlyMat2#get:buffer" (func $export:~lib/arraybuffer/ArrayBufferView#get:buffer)) + (export "ReadonlyMat2#get:dataStart" (func $export:~lib/arraybuffer/ArrayBufferView#get:dataStart)) + (export "ReadonlyMat2#get:byteLength" (func $export:~lib/arraybuffer/ArrayBufferView#get:byteLength)) + (export "ReadonlyMat2#get:byteOffset" (func $export:~lib/arraybuffer/ArrayBufferView#get:byteOffset)) + (export "ReadonlyMat2#constructor" (func $export:assembly/mat2/ReadonlyMat2#constructor)) + (export "ReadonlyMat2#get:length" (func $export:~lib/typedarray/Float64Array#get:length)) + (export "ReadonlyMat2#at" (func $export:~lib/typedarray/Float64Array#at)) + (export "ReadonlyMat2#includes" (func $export:~lib/typedarray/Float64Array#includes@varargs)) + (export "ReadonlyMat2#indexOf" (func $export:~lib/typedarray/Float64Array#indexOf@varargs)) + (export "ReadonlyMat2#lastIndexOf" (func $export:~lib/typedarray/Float64Array#lastIndexOf@varargs)) + (export "ReadonlyMat2#fill" (func $export:~lib/typedarray/Float64Array#fill@varargs)) + (export "ReadonlyMat2#sort" (func $export:~lib/typedarray/Float64Array#sort@varargs)) + (export "ReadonlyMat2#slice" (func $export:~lib/typedarray/Float64Array#slice@varargs)) + (export "ReadonlyMat2#subarray" (func $export:~lib/typedarray/Float64Array#subarray@varargs)) + (export "ReadonlyMat2#copyWithin" (func $export:~lib/typedarray/Float64Array#copyWithin@varargs)) + (export "ReadonlyMat2#map" (func $export:~lib/typedarray/Float64Array#map)) + (export "ReadonlyMat2#filter" (func $export:~lib/typedarray/Float64Array#filter)) + (export "ReadonlyMat2#findIndex" (func $export:~lib/typedarray/Float64Array#findIndex)) + (export "ReadonlyMat2#some" (func $export:~lib/typedarray/Float64Array#some)) + (export "ReadonlyMat2#every" (func $export:~lib/typedarray/Float64Array#every)) + (export "ReadonlyMat2#forEach" (func $export:~lib/typedarray/Float64Array#forEach)) + (export "ReadonlyMat2#reverse" (func $export:~lib/typedarray/Float64Array#reverse)) + (export "ReadonlyMat2#join" (func $export:~lib/typedarray/Float64Array#join@varargs)) + (export "ReadonlyMat2#toString" (func $export:~lib/typedarray/Float64Array#toString)) + (export "clone" (func $export:assembly/mat2/clone)) + (export "copy" (func $export:assembly/mat2/copy)) + (export "identity" (func $export:assembly/mat2/identity)) + (export "set" (func $export:assembly/mat2/set)) + (export "transpose" (func $export:assembly/mat2/transpose)) + (export "invert" (func $export:assembly/mat2/invert)) + (export "adjoint" (func $export:assembly/mat2/adjoint)) + (export "determinant" (func $export:assembly/mat2/determinant)) + (export "multiply" (func $export:assembly/mat2/multiply)) + (export "rotate" (func $export:assembly/mat2/rotate)) + (export "scale" (func $export:assembly/mat2/scale)) + (export "fromRotation" (func $export:assembly/mat2/fromRotation)) + (export "fromScaling" (func $export:assembly/mat2/fromScaling)) + (export "str" (func $export:assembly/mat2/str)) + (export "frob" (func $export:assembly/mat2/frob)) + (export "LDU" (func $export:assembly/mat2/LDU)) + (export "add" (func $export:assembly/mat2/add)) + (export "subtract" (func $export:assembly/mat2/subtract)) + (export "exactEquals" (func $export:assembly/mat2/exactEquals)) + (export "equals" (func $export:assembly/mat2/equals)) + (export "multiplyScalar" (func $export:assembly/mat2/multiplyScalar)) + (export "multiplyScalarAndAdd" (func $export:assembly/mat2/multiplyScalarAndAdd)) + (start $~start) + (func $~lib/math/murmurHash3 (param $0 i64) (result i64) local.get $0 - f64.const 0.017453292519943295 + local.get $0 + i64.const 33 + i64.shr_u + i64.xor + i64.const -49064778989728563 + i64.mul + local.tee $0 + local.get $0 + i64.const 33 + i64.shr_u + i64.xor + i64.const -4265267296055464877 + i64.mul + local.tee $0 + local.get $0 + i64.const 33 + i64.shr_u + i64.xor + ) + (func $~lib/math/splitMix32 (param $0 i32) (result i32) + local.get $0 + i32.const 1831565813 + i32.add + local.tee $0 + local.get $0 + i32.const 15 + i32.shr_u + i32.xor + local.get $0 + i32.const 1 + i32.or + i32.mul + local.tee $0 + local.get $0 + local.get $0 + i32.const 61 + i32.or + local.get $0 + local.get $0 + i32.const 7 + i32.shr_u + i32.xor + i32.mul + i32.add + i32.xor + local.tee $0 + local.get $0 + i32.const 14 + i32.shr_u + i32.xor + ) + (func $~lib/math/NativeMath.random (result f64) + (local $0 i64) + (local $1 i64) + global.get $~lib/math/random_seeded + i32.eqz + if + call $~lib/builtins/seed + i64.reinterpret_f64 + local.set $0 + i32.const 1 + global.set $~lib/math/random_seeded + local.get $0 + call $~lib/math/murmurHash3 + global.set $~lib/math/random_state0_64 + global.get $~lib/math/random_state0_64 + i64.const -1 + i64.xor + call $~lib/math/murmurHash3 + global.set $~lib/math/random_state1_64 + local.get $0 + i32.wrap_i64 + call $~lib/math/splitMix32 + global.set $~lib/math/random_state0_32 + global.get $~lib/math/random_state0_32 + call $~lib/math/splitMix32 + global.set $~lib/math/random_state1_32 + global.get $~lib/math/random_state1_32 + i32.const 0 + i32.ne + i32.const 0 + global.get $~lib/math/random_state0_32 + i32.const 0 + global.get $~lib/math/random_state1_64 + i64.const 0 + i64.ne + i32.const 0 + global.get $~lib/math/random_state0_64 + i64.const 0 + i64.ne + select + select + select + i32.eqz + if + i32.const 0 + i32.const 1056 + i32.const 1399 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + end + global.get $~lib/math/random_state0_64 + local.set $1 + global.get $~lib/math/random_state1_64 + local.tee $0 + global.set $~lib/math/random_state0_64 + local.get $0 + local.get $1 + local.get $1 + i64.const 23 + i64.shl + i64.xor + local.tee $1 + local.get $1 + i64.const 17 + i64.shr_u + i64.xor + i64.xor + local.get $0 + i64.const 26 + i64.shr_u + i64.xor + global.set $~lib/math/random_state1_64 + local.get $0 + i64.const 12 + i64.shr_u + i64.const 4607182418800017408 + i64.or + f64.reinterpret_i64 + f64.const 1 + f64.sub + ) + (func $~lib/typedarray/Float64Array#__get (param $0 i32) (param $1 i32) (result f64) + local.get $1 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.ge_u + if + i32.const 1168 + i32.const 1232 + i32.const 1374 + i32.const 64 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + f64.load + ) + (func $~lib/typedarray/Float64Array#__set (param $0 i32) (param $1 i32) (param $2 f64) + local.get $1 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.ge_u + if + i32.const 1168 + i32.const 1232 + i32.const 1385 + i32.const 64 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + local.get $2 + f64.store + ) + (func $assembly/mat2/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $0 + i32.const 0 + local.get $3 + local.get $7 + f64.mul + local.get $5 + local.get $8 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $4 + local.get $7 f64.mul + local.get $6 + local.get $8 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $3 + local.get $9 + f64.mul + local.get $5 + local.get $10 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $4 + local.get $9 + f64.mul + local.get $6 + local.get $10 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 ) - (func $src/as/common/equals (param $0 f64) (param $1 f64) (result i32) + (func $assembly/mat2/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 + i32.const 0 local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get f64.sub - f64.abs - f64.const 1 + call $~lib/typedarray/Float64Array#__set local.get $0 - f64.abs + i32.const 1 local.get $1 - f64.abs - call $src/as/imports/MathUtil.max3 - f64.const 1e-06 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) + local.get $0 + local.get $0 + i32.store offset=4 + local.get $0 + local.get $0 + i32.store offset=8 + local.get $0 + ) + (func $~lib/rt/itcms/visitRoots + (local $0 i32) + (local $1 i32) + i32.const 1168 + call $~lib/rt/itcms/__visit + i32.const 1360 + call $~lib/rt/itcms/__visit + i32.const 1472 + call $~lib/rt/itcms/__visit + i32.const 1136 + call $~lib/rt/itcms/__visit + global.get $~lib/rt/itcms/pinSpace + local.tee $1 + i32.load offset=4 + i32.const -4 + i32.and + local.set $0 + loop $while-continue|0 + local.get $0 + local.get $1 + i32.ne + if + local.get $0 + i32.load offset=4 + i32.const 3 + i32.and + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1536 + i32.const 159 + i32.const 16 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 20 + i32.add + call $~lib/rt/__visit_members + local.get $0 + i32.load offset=4 + i32.const -4 + i32.and + local.set $0 + br $while-continue|0 + end + end + ) + (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + local.get $0 + i32.load offset=4 + i32.const -4 + i32.and + i32.or + i32.store offset=4 + ) + (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + local.get $0 + i32.load offset=4 + i32.const 3 + i32.and + i32.or + i32.store offset=4 + ) + (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + local.get $1 + i32.load offset=8 + local.set $3 + local.get $0 + local.get $1 + local.get $2 + i32.or + i32.store offset=4 + local.get $0 + local.get $3 + i32.store offset=8 + local.get $3 + local.get $0 + call $~lib/rt/itcms/Object#set:next + local.get $1 + local.get $0 + i32.store offset=8 + ) + (func $~lib/rt/itcms/Object#makeGray (param $0 i32) + (local $1 i32) + (local $2 i32) + local.get $0 + global.get $~lib/rt/itcms/iter + i32.eq + if + local.get $0 + i32.load offset=8 + local.tee $1 + i32.eqz + if + i32.const 0 + i32.const 1536 + i32.const 147 + i32.const 30 + call $~lib/builtins/abort + unreachable + end + local.get $1 + global.set $~lib/rt/itcms/iter + end + block $__inlined_func$~lib/rt/itcms/Object#unlink + local.get $0 + i32.load offset=4 + i32.const -4 + i32.and + local.tee $1 + i32.eqz + if + i32.const 0 + local.get $0 + i32.const 19812 + i32.lt_u + local.get $0 + i32.load offset=8 + select + i32.eqz + if + i32.const 0 + i32.const 1536 + i32.const 127 + i32.const 18 + call $~lib/builtins/abort + unreachable + end + br $__inlined_func$~lib/rt/itcms/Object#unlink + end + local.get $0 + i32.load offset=8 + local.tee $2 + i32.eqz + if + i32.const 0 + i32.const 1536 + i32.const 131 + i32.const 16 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.store offset=8 + local.get $2 + local.get $1 + call $~lib/rt/itcms/Object#set:next + end + local.get $0 + global.get $~lib/rt/itcms/toSpace + local.get $0 + i32.load offset=12 + local.tee $1 + i32.const 1 + i32.le_u + if (result i32) + i32.const 1 + else + local.get $1 + i32.const 3328 + i32.load + i32.gt_u + if + i32.const 1168 + i32.const 1664 + i32.const 22 + i32.const 28 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 3 + i32.shl + i32.const 3332 + i32.add + i32.load + i32.const 32 + i32.and + end + if (result i32) + global.get $~lib/rt/itcms/white + i32.eqz + else + i32.const 2 + end + call $~lib/rt/itcms/Object#linkTo + ) + (func $~lib/rt/itcms/__visit (param $0 i32) + local.get $0 + i32.eqz + if + return + end + global.get $~lib/rt/itcms/white + local.get $0 + i32.const 20 + i32.sub + local.tee $0 + i32.load offset=4 + i32.const 3 + i32.and + i32.eq + if + local.get $0 + call $~lib/rt/itcms/Object#makeGray + global.get $~lib/rt/itcms/visitCount + i32.const 1 + i32.add + global.set $~lib/rt/itcms/visitCount + end + ) + (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $1 + i32.load + local.tee $2 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 1744 + i32.const 273 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const -4 + i32.and + local.tee $2 + i32.const 1073741820 + i32.lt_u + i32.const 0 + local.get $2 + i32.const 12 + i32.ge_u + select + i32.eqz + if + i32.const 0 + i32.const 1744 + i32.const 275 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 256 + i32.lt_u + if + local.get $2 + i32.const 4 + i32.shr_u + local.set $2 + else + local.get $2 + i32.const 31 + local.get $2 + i32.clz + i32.sub + local.tee $3 + i32.const 4 + i32.sub + i32.shr_u + i32.const 16 + i32.xor + local.set $2 + local.get $3 + i32.const 7 + i32.sub + local.set $3 + end + local.get $2 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $3 + i32.const 23 + i32.lt_u + select + i32.eqz + if + i32.const 0 + i32.const 1744 + i32.const 288 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load offset=8 + local.set $4 + local.get $1 + i32.load offset=4 + local.tee $5 + if + local.get $5 + local.get $4 + i32.store offset=8 + end + local.get $4 + if + local.get $4 + local.get $5 + i32.store offset=4 + end + local.get $1 + local.get $0 + local.get $2 + local.get $3 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + i32.eq + if + local.get $0 + local.get $2 + local.get $3 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + local.get $4 + i32.store offset=96 + local.get $4 + i32.eqz + if + local.get $0 + local.get $3 + i32.const 2 + i32.shl + i32.add + local.tee $4 + i32.load offset=4 + i32.const -2 + local.get $2 + i32.rotl + i32.and + local.set $1 + local.get $4 + local.get $1 + i32.store offset=4 + local.get $1 + i32.eqz + if + local.get $0 + local.get $0 + i32.load + i32.const -2 + local.get $3 + i32.rotl + i32.and + i32.store + end + end + end + ) + (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $1 + i32.eqz + if + i32.const 0 + i32.const 1744 + i32.const 201 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load + local.tee $4 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 1744 + i32.const 203 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 4 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.tee $5 + i32.load + local.tee $2 + i32.const 1 + i32.and + if + local.get $4 + i32.const -4 + i32.and + i32.const 4 + i32.add + local.get $2 + i32.const -4 + i32.and + i32.add + local.tee $3 + i32.const 1073741820 + i32.lt_u + if + local.get $0 + local.get $5 + call $~lib/rt/tlsf/removeBlock + local.get $1 + local.get $3 + local.get $4 + i32.const 3 + i32.and + i32.or + local.tee $4 + i32.store + local.get $1 + i32.const 4 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.tee $5 + i32.load + local.set $2 + end + end + local.get $4 + i32.const 2 + i32.and + if + local.get $1 + i32.const 4 + i32.sub + i32.load + local.tee $3 + i32.load + local.tee $7 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 1744 + i32.const 224 + i32.const 16 + call $~lib/builtins/abort + unreachable + end + local.get $7 + i32.const -4 + i32.and + i32.const 4 + i32.add + local.get $4 + i32.const -4 + i32.and + i32.add + local.tee $8 + i32.const 1073741820 + i32.lt_u + if (result i32) + local.get $0 + local.get $3 + call $~lib/rt/tlsf/removeBlock + local.get $3 + local.get $8 + local.get $7 + i32.const 3 + i32.and + i32.or + local.tee $4 + i32.store + local.get $3 + else + local.get $1 + end + local.set $1 + end + local.get $5 + local.get $2 + i32.const 2 + i32.or + i32.store + local.get $4 + i32.const -4 + i32.and + local.tee $3 + i32.const 1073741820 + i32.lt_u + i32.const 0 + local.get $3 + i32.const 12 + i32.ge_u + select + i32.eqz + if + i32.const 0 + i32.const 1744 + i32.const 239 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $5 + local.get $3 + local.get $1 + i32.const 4 + i32.add + i32.add + i32.ne + if + i32.const 0 + i32.const 1744 + i32.const 240 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $5 + i32.const 4 + i32.sub + local.get $1 + i32.store + local.get $3 + i32.const 256 + i32.lt_u + if + local.get $3 + i32.const 4 + i32.shr_u + local.set $3 + else + local.get $3 + i32.const 31 + local.get $3 + i32.clz + i32.sub + local.tee $4 + i32.const 4 + i32.sub + i32.shr_u + i32.const 16 + i32.xor + local.set $3 + local.get $4 + i32.const 7 + i32.sub + local.set $6 + end + local.get $3 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $6 + i32.const 23 + i32.lt_u + select + i32.eqz + if + i32.const 0 + i32.const 1744 + i32.const 256 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $3 + local.get $6 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + local.set $4 + local.get $1 + i32.const 0 + i32.store offset=4 + local.get $1 + local.get $4 + i32.store offset=8 + local.get $4 + if + local.get $4 + local.get $1 + i32.store offset=4 + end + local.get $0 + local.get $3 + local.get $6 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + local.get $1 + i32.store offset=96 + local.get $0 + local.get $0 + i32.load + i32.const 1 + local.get $6 + i32.shl + i32.or + i32.store + local.get $0 + local.get $6 + i32.const 2 + i32.shl + i32.add + local.tee $0 + local.get $0 + i32.load offset=4 + i32.const 1 + local.get $3 + i32.shl + i32.or + i32.store offset=4 + ) + (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + local.get $1 + local.get $2 + i32.gt_u + if + i32.const 0 + i32.const 1744 + i32.const 381 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 19 + i32.add + i32.const -16 + i32.and + i32.const 4 + i32.sub + local.set $1 + local.get $2 + i32.const -16 + i32.and + local.get $0 + i32.load offset=1568 + local.tee $2 + if + local.get $1 + local.get $2 + i32.const 4 + i32.add + i32.lt_u + if + i32.const 0 + i32.const 1744 + i32.const 388 + i32.const 16 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + i32.const 16 + i32.sub + i32.eq + if + local.get $2 + i32.load + local.set $4 + local.get $1 + i32.const 16 + i32.sub + local.set $1 + end + else + local.get $1 + local.get $0 + i32.const 1572 + i32.add + i32.lt_u + if + i32.const 0 + i32.const 1744 + i32.const 401 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + end + local.get $1 + i32.sub + local.tee $2 + i32.const 20 + i32.lt_u + if + return + end + local.get $1 + local.get $4 + i32.const 2 + i32.and + local.get $2 + i32.const 8 + i32.sub + local.tee $2 + i32.const 1 + i32.or + i32.or + i32.store + local.get $1 + i32.const 0 + i32.store offset=4 + local.get $1 + i32.const 0 + i32.store offset=8 + local.get $2 + local.get $1 + i32.const 4 + i32.add + i32.add + local.tee $2 + i32.const 2 + i32.store + local.get $0 + local.get $2 + i32.store offset=1568 + local.get $0 + local.get $1 + call $~lib/rt/tlsf/insertBlock + ) + (func $~lib/rt/tlsf/initialize + (local $0 i32) + (local $1 i32) + memory.size + local.tee $0 + i32.const 1 + i32.lt_s + if (result i32) + i32.const 1 + local.get $0 + i32.sub + memory.grow + i32.const 0 + i32.lt_s + else + i32.const 0 + end + if + unreachable + end + i32.const 19824 + i32.const 0 + i32.store + i32.const 21392 + i32.const 0 + i32.store + loop $for-loop|0 + local.get $1 + i32.const 23 + i32.lt_u + if + local.get $1 + i32.const 2 + i32.shl + i32.const 19824 + i32.add + i32.const 0 + i32.store offset=4 + i32.const 0 + local.set $0 + loop $for-loop|1 + local.get $0 + i32.const 16 + i32.lt_u + if + local.get $0 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.const 19824 + i32.add + i32.const 0 + i32.store offset=96 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|1 + end + end + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|0 + end + end + i32.const 19824 + i32.const 21396 + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + i32.const 19824 + global.set $~lib/rt/tlsf/ROOT + ) + (func $~lib/rt/tlsf/__free (param $0 i32) + (local $1 i32) + (local $2 i32) + local.get $0 + i32.const 19812 + i32.lt_u + if + return + end + global.get $~lib/rt/tlsf/ROOT + i32.eqz + if + call $~lib/rt/tlsf/initialize + end + global.get $~lib/rt/tlsf/ROOT + local.get $0 + i32.const 4 + i32.sub + local.set $1 + local.get $0 + i32.const 15 + i32.and + i32.eqz + i32.const 0 + local.get $0 + select + if (result i32) + local.get $1 + i32.load + i32.const 1 + i32.and + i32.eqz + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 1744 + i32.const 565 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $1 + i32.load + i32.const 1 + i32.or + i32.store + local.get $1 + call $~lib/rt/tlsf/insertBlock + ) + (func $~lib/rt/itcms/step (result i32) + (local $0 i32) + (local $1 i32) + block $folding-inner0 + block $break|0 + block $case2|0 + block $case1|0 + block $case0|0 + global.get $~lib/rt/itcms/state + br_table $case0|0 $case1|0 $case2|0 $break|0 + end + i32.const 1 + global.set $~lib/rt/itcms/state + i32.const 0 + global.set $~lib/rt/itcms/visitCount + call $~lib/rt/itcms/visitRoots + global.get $~lib/rt/itcms/toSpace + global.set $~lib/rt/itcms/iter + br $folding-inner0 + end + global.get $~lib/rt/itcms/white + i32.eqz + local.set $1 + global.get $~lib/rt/itcms/iter + i32.load offset=4 + i32.const -4 + i32.and + local.set $0 + loop $while-continue|1 + local.get $0 + global.get $~lib/rt/itcms/toSpace + i32.ne + if + local.get $0 + global.set $~lib/rt/itcms/iter + local.get $1 + local.get $0 + i32.load offset=4 + i32.const 3 + i32.and + i32.ne + if + local.get $0 + local.get $1 + call $~lib/rt/itcms/Object#set:color + i32.const 0 + global.set $~lib/rt/itcms/visitCount + local.get $0 + i32.const 20 + i32.add + call $~lib/rt/__visit_members + br $folding-inner0 + end + local.get $0 + i32.load offset=4 + i32.const -4 + i32.and + local.set $0 + br $while-continue|1 + end + end + i32.const 0 + global.set $~lib/rt/itcms/visitCount + call $~lib/rt/itcms/visitRoots + global.get $~lib/rt/itcms/toSpace + global.get $~lib/rt/itcms/iter + i32.load offset=4 + i32.const -4 + i32.and + i32.eq + if + global.get $~lib/memory/__stack_pointer + local.set $0 + loop $while-continue|0 + local.get $0 + i32.const 19812 + i32.lt_u + if + local.get $0 + i32.load + call $~lib/rt/itcms/__visit + local.get $0 + i32.const 4 + i32.add + local.set $0 + br $while-continue|0 + end + end + global.get $~lib/rt/itcms/iter + i32.load offset=4 + i32.const -4 + i32.and + local.set $0 + loop $while-continue|2 + local.get $0 + global.get $~lib/rt/itcms/toSpace + i32.ne + if + local.get $1 + local.get $0 + i32.load offset=4 + i32.const 3 + i32.and + i32.ne + if + local.get $0 + local.get $1 + call $~lib/rt/itcms/Object#set:color + local.get $0 + i32.const 20 + i32.add + call $~lib/rt/__visit_members + end + local.get $0 + i32.load offset=4 + i32.const -4 + i32.and + local.set $0 + br $while-continue|2 + end + end + global.get $~lib/rt/itcms/fromSpace + local.set $0 + global.get $~lib/rt/itcms/toSpace + global.set $~lib/rt/itcms/fromSpace + local.get $0 + global.set $~lib/rt/itcms/toSpace + local.get $1 + global.set $~lib/rt/itcms/white + local.get $0 + i32.load offset=4 + i32.const -4 + i32.and + global.set $~lib/rt/itcms/iter + i32.const 2 + global.set $~lib/rt/itcms/state + end + br $folding-inner0 + end + global.get $~lib/rt/itcms/iter + local.tee $0 + global.get $~lib/rt/itcms/toSpace + i32.ne + if + local.get $0 + i32.load offset=4 + i32.const -4 + i32.and + global.set $~lib/rt/itcms/iter + global.get $~lib/rt/itcms/white + i32.eqz + local.get $0 + i32.load offset=4 + i32.const 3 + i32.and + i32.ne + if + i32.const 0 + i32.const 1536 + i32.const 228 + i32.const 20 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 19812 + i32.lt_u + if + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + else + global.get $~lib/rt/itcms/total + local.get $0 + i32.load + i32.const -4 + i32.and + i32.const 4 + i32.add + i32.sub + global.set $~lib/rt/itcms/total + local.get $0 + i32.const 4 + i32.add + call $~lib/rt/tlsf/__free + end + i32.const 10 + return + end + global.get $~lib/rt/itcms/toSpace + global.get $~lib/rt/itcms/toSpace + i32.store offset=4 + global.get $~lib/rt/itcms/toSpace + global.get $~lib/rt/itcms/toSpace + i32.store offset=8 + i32.const 0 + global.set $~lib/rt/itcms/state + end + i32.const 0 + return + end + global.get $~lib/rt/itcms/visitCount + ) + (func $~lib/rt/tlsf/searchBlock (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $1 + i32.const 256 + i32.lt_u + if + local.get $1 + i32.const 4 + i32.shr_u + local.set $1 + else + i32.const 31 + local.get $1 + i32.const 1 + i32.const 27 + local.get $1 + i32.clz + i32.sub + i32.shl + i32.add + i32.const 1 + i32.sub + local.get $1 + local.get $1 + i32.const 536870910 + i32.lt_u + select + local.tee $1 + i32.clz + i32.sub + local.set $2 + local.get $1 + local.get $2 + i32.const 4 + i32.sub + i32.shr_u + i32.const 16 + i32.xor + local.set $1 + local.get $2 + i32.const 7 + i32.sub + local.set $2 + end + local.get $1 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $2 + i32.const 23 + i32.lt_u + select + i32.eqz + if + i32.const 0 + i32.const 1744 + i32.const 334 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + i32.const -1 + local.get $1 + i32.shl + i32.and + local.tee $1 + if (result i32) + local.get $0 + local.get $1 + i32.ctz + local.get $2 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + else + local.get $0 + i32.load + i32.const -1 + local.get $2 + i32.const 1 + i32.add + i32.shl + i32.and + local.tee $1 + if (result i32) + local.get $0 + local.get $1 + i32.ctz + local.tee $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + local.tee $2 + i32.eqz + if + i32.const 0 + i32.const 1744 + i32.const 347 + i32.const 18 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $2 + i32.ctz + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + else + i32.const 0 + end + end + ) + (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $1 + i32.const 1073741820 + i32.ge_u + if + i32.const 1472 + i32.const 1744 + i32.const 462 + i32.const 30 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 12 + local.get $1 + i32.const 19 + i32.add + i32.const -16 + i32.and + i32.const 4 + i32.sub + local.get $1 + i32.const 12 + i32.le_u + select + local.tee $2 + call $~lib/rt/tlsf/searchBlock + local.tee $1 + i32.eqz + if + i32.const 4 + memory.size + local.tee $1 + i32.const 16 + i32.shl + i32.const 4 + i32.sub + local.get $0 + i32.load offset=1568 + i32.ne + i32.shl + local.get $2 + i32.const 1 + i32.const 27 + local.get $2 + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + i32.add + local.get $2 + local.get $2 + i32.const 536870910 + i32.lt_u + select + i32.add + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.set $3 + local.get $1 + local.get $3 + local.get $1 + local.get $3 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $3 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $1 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + local.get $0 + local.get $2 + call $~lib/rt/tlsf/searchBlock + local.tee $1 + i32.eqz + if + i32.const 0 + i32.const 1744 + i32.const 500 + i32.const 16 + call $~lib/builtins/abort + unreachable + end + end + local.get $2 + local.get $1 + i32.load + i32.const -4 + i32.and + i32.gt_u + if + i32.const 0 + i32.const 1744 + i32.const 502 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + call $~lib/rt/tlsf/removeBlock + local.get $1 + i32.load + local.set $3 + local.get $2 + i32.const 4 + i32.add + i32.const 15 + i32.and + if + i32.const 0 + i32.const 1744 + i32.const 361 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.const -4 + i32.and + local.get $2 + i32.sub + local.tee $4 + i32.const 16 + i32.ge_u + if + local.get $1 + local.get $2 + local.get $3 + i32.const 2 + i32.and + i32.or + i32.store + local.get $2 + local.get $1 + i32.const 4 + i32.add + i32.add + local.tee $2 + local.get $4 + i32.const 4 + i32.sub + i32.const 1 + i32.or + i32.store + local.get $0 + local.get $2 + call $~lib/rt/tlsf/insertBlock + else + local.get $1 + local.get $3 + i32.const -2 + i32.and + i32.store + local.get $1 + i32.const 4 + i32.add + local.tee $0 + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.get $0 + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + i32.load + i32.const -3 + i32.and + i32.store + end + local.get $1 + ) + (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + global.get $~lib/rt/tlsf/ROOT + i32.eqz + if + call $~lib/rt/tlsf/initialize + end + global.get $~lib/rt/tlsf/ROOT + local.get $0 + call $~lib/rt/tlsf/allocateBlock + i32.const 4 + i32.add + ) + (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) + (local $2 i32) + block $~lib/util/memory/memset|inlined.0 + local.get $1 + i32.eqz + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 0 + i32.store8 + local.get $0 + local.get $1 + i32.add + i32.const 4 + i32.sub + local.tee $2 + i32.const 0 + i32.store8 offset=3 + local.get $1 + i32.const 2 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 0 + i32.store8 offset=1 + local.get $0 + i32.const 0 + i32.store8 offset=2 + local.get $2 + i32.const 0 + i32.store8 offset=2 + local.get $2 + i32.const 0 + i32.store8 offset=1 + local.get $1 + i32.const 6 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 0 + i32.store8 offset=3 + local.get $2 + i32.const 0 + i32.store8 + local.get $1 + i32.const 8 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.tee $2 + i32.add + local.tee $0 + i32.const 0 + i32.store + local.get $0 + local.get $1 + local.get $2 + i32.sub + i32.const -4 + i32.and + local.tee $2 + i32.add + i32.const 28 + i32.sub + local.tee $1 + i32.const 0 + i32.store offset=24 + local.get $2 + i32.const 8 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=16 + local.get $1 + i32.const 0 + i32.store offset=20 + local.get $2 + i32.const 24 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $0 + i32.const 0 + i32.store offset=20 + local.get $0 + i32.const 0 + i32.store offset=24 + local.get $1 + i32.const 0 + i32.store + local.get $1 + i32.const 0 + i32.store offset=4 + local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $0 + local.get $0 + i32.const 4 + i32.and + i32.const 24 + i32.add + local.tee $1 + i32.add + local.set $0 + local.get $2 + local.get $1 + i32.sub + local.set $1 + loop $while-continue|0 + local.get $1 + i32.const 32 + i32.ge_u + if + local.get $0 + i64.const 0 + i64.store + local.get $0 + i64.const 0 + i64.store offset=8 + local.get $0 + i64.const 0 + i64.store offset=16 + local.get $0 + i64.const 0 + i64.store offset=24 + local.get $1 + i32.const 32 + i32.sub + local.set $1 + local.get $0 + i32.const 32 + i32.add + local.set $0 + br $while-continue|0 + end + end + end + ) + (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + i32.const 1073741804 + i32.ge_u + if + i32.const 1472 + i32.const 1536 + i32.const 260 + i32.const 31 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/rt/itcms/total + global.get $~lib/rt/itcms/threshold + i32.ge_u + if + block $__inlined_func$~lib/rt/itcms/interrupt + i32.const 2048 + local.set $2 + loop $do-continue|0 + local.get $2 + call $~lib/rt/itcms/step + i32.sub + local.set $2 + global.get $~lib/rt/itcms/state + i32.eqz + if + global.get $~lib/rt/itcms/total + i64.extend_i32_u + i64.const 200 + i64.mul + i64.const 100 + i64.div_u + i32.wrap_i64 + i32.const 1024 + i32.add + global.set $~lib/rt/itcms/threshold + br $__inlined_func$~lib/rt/itcms/interrupt + end + local.get $2 + i32.const 0 + i32.gt_s + br_if $do-continue|0 + end + global.get $~lib/rt/itcms/total + global.get $~lib/rt/itcms/total + global.get $~lib/rt/itcms/threshold + i32.sub + i32.const 1024 + i32.lt_u + i32.const 10 + i32.shl + i32.add + global.set $~lib/rt/itcms/threshold + end + end + local.get $0 + i32.const 16 + i32.add + call $~lib/rt/tlsf/__alloc + i32.const 4 + i32.sub + local.tee $2 + local.get $1 + i32.store offset=12 + local.get $2 + local.get $0 + i32.store offset=16 + local.get $2 + global.get $~lib/rt/itcms/fromSpace + global.get $~lib/rt/itcms/white + call $~lib/rt/itcms/Object#linkTo + global.get $~lib/rt/itcms/total + local.get $2 + i32.load + i32.const -4 + i32.and + i32.const 4 + i32.add + i32.add + global.set $~lib/rt/itcms/total + local.get $2 + i32.const 20 + i32.add + local.tee $1 + local.get $0 + call $~lib/memory/memory.fill + local.get $1 + ) + (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + local.get $1 + i32.eqz + if + return + end + local.get $0 + i32.eqz + if + i32.const 0 + i32.const 1536 + i32.const 294 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/rt/itcms/white + local.get $1 + i32.const 20 + i32.sub + local.tee $1 + i32.load offset=4 + i32.const 3 + i32.and + i32.eq + if + local.get $0 + i32.const 20 + i32.sub + local.tee $0 + i32.load offset=4 + i32.const 3 + i32.and + local.tee $3 + local.set $4 + local.get $3 + global.get $~lib/rt/itcms/white + i32.eqz + i32.eq + if + local.get $2 + if + local.get $0 + call $~lib/rt/itcms/Object#makeGray + else + local.get $1 + call $~lib/rt/itcms/Object#makeGray + end + else + global.get $~lib/rt/itcms/state + i32.const 1 + i32.eq + i32.const 0 + local.get $4 + i32.const 3 + i32.eq + select + if + local.get $1 + call $~lib/rt/itcms/Object#makeGray + end + end + end + ) + (func $~lib/arraybuffer/ArrayBufferView#set:buffer (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store + local.get $0 + local.get $1 + i32.const 0 + call $~lib/rt/itcms/__link + ) + (func $~lib/util/sort/weakHeapSort (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 f64) + (local $6 i32) + (local $7 f64) + (local $8 i32) + local.get $1 + i32.const 31 + i32.add + i32.const 5 + i32.shr_u + i32.const 2 + i32.shl + local.tee $3 + call $~lib/rt/tlsf/__alloc + local.tee $6 + local.get $3 + call $~lib/memory/memory.fill + local.get $1 + i32.const 1 + i32.sub + local.set $4 + loop $for-loop|0 + local.get $4 + i32.const 0 + i32.gt_s + if + local.get $4 + local.set $3 + loop $while-continue|1 + local.get $3 + i32.const 1 + i32.and + local.get $6 + local.get $3 + i32.const 6 + i32.shr_u + i32.const 2 + i32.shl + i32.add + i32.load + local.get $3 + i32.const 1 + i32.shr_s + i32.shr_u + i32.const 1 + i32.and + i32.eq + if + local.get $3 + i32.const 1 + i32.shr_s + local.set $3 + br $while-continue|1 + end + end + local.get $0 + local.get $3 + i32.const 1 + i32.shr_s + local.tee $3 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $5 + local.get $0 + local.get $4 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $7 + i32.const 2 + global.set $~argumentsLength + local.get $5 + local.get $7 + local.get $2 + i32.load + call_indirect $0 (type $f64_f64_=>_i32) + i32.const 0 + i32.lt_s + if + local.get $6 + local.get $4 + i32.const 5 + i32.shr_u + i32.const 2 + i32.shl + i32.add + local.tee $8 + local.get $8 + i32.load + i32.const 1 + local.get $4 + i32.shl + i32.xor + i32.store + local.get $0 + local.get $4 + i32.const 3 + i32.shl + i32.add + local.get $5 + f64.store + local.get $0 + local.get $3 + i32.const 3 + i32.shl + i32.add + local.get $7 + f64.store + end + local.get $4 + i32.const 1 + i32.sub + local.set $4 + br $for-loop|0 + end + end + local.get $1 + i32.const 1 + i32.sub + local.set $4 + loop $for-loop|2 + local.get $4 + i32.const 2 + i32.ge_s + if + local.get $0 + f64.load + local.set $5 + local.get $0 + local.get $0 + local.get $4 + i32.const 3 + i32.shl + i32.add + local.tee $1 + f64.load + f64.store + local.get $1 + local.get $5 + f64.store + i32.const 1 + local.set $1 + loop $while-continue|3 + local.get $4 + local.get $6 + local.get $1 + i32.const 5 + i32.shr_u + i32.const 2 + i32.shl + i32.add + i32.load + local.get $1 + i32.shr_u + i32.const 1 + i32.and + local.get $1 + i32.const 1 + i32.shl + i32.add + local.tee $3 + i32.gt_s + if + local.get $3 + local.set $1 + br $while-continue|3 + end + end + loop $while-continue|4 + local.get $1 + i32.const 0 + i32.gt_s + if + local.get $0 + f64.load + local.set $5 + local.get $0 + local.get $1 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $7 + i32.const 2 + global.set $~argumentsLength + local.get $5 + local.get $7 + local.get $2 + i32.load + call_indirect $0 (type $f64_f64_=>_i32) + i32.const 0 + i32.lt_s + if + local.get $6 + local.get $1 + i32.const 5 + i32.shr_u + i32.const 2 + i32.shl + i32.add + local.tee $3 + local.get $3 + i32.load + i32.const 1 + local.get $1 + i32.shl + i32.xor + i32.store + local.get $0 + local.get $1 + i32.const 3 + i32.shl + i32.add + local.get $5 + f64.store + local.get $0 + local.get $7 + f64.store + end + local.get $1 + i32.const 1 + i32.shr_s + local.set $1 + br $while-continue|4 + end + end + local.get $4 + i32.const 1 + i32.sub + local.set $4 + br $for-loop|2 + end + end + local.get $6 + call $~lib/rt/tlsf/__free + local.get $0 + f64.load offset=8 + local.set $5 + local.get $0 + local.get $0 + f64.load + f64.store offset=8 + local.get $0 + local.get $5 + f64.store + ) + (func $~lib/typedarray/Float64Array#sort (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 f64) + (local $6 f64) + (local $7 i32) + (local $8 i32) + block $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 + local.get $0 + local.tee $2 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.tee $8 + i32.const 1 + i32.le_u + br_if $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 + local.get $2 + i32.load offset=4 + local.set $4 + local.get $8 + i32.const 2 + i32.eq + if + local.get $4 + f64.load offset=8 + local.set $5 + local.get $4 + f64.load + local.set $6 + i32.const 2 + global.set $~argumentsLength + local.get $5 + local.get $6 + local.get $1 + i32.load + call_indirect $0 (type $f64_f64_=>_i32) + i32.const 0 + i32.lt_s + if + local.get $4 + local.get $6 + f64.store offset=8 + local.get $4 + local.get $5 + f64.store + end + br $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 + end + local.get $8 + i32.const 256 + i32.lt_u + if + local.get $1 + local.set $3 + loop $for-loop|0 + local.get $7 + local.get $8 + i32.lt_s + if + local.get $4 + local.get $7 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $5 + local.get $7 + i32.const 1 + i32.sub + local.set $1 + loop $while-continue|1 + local.get $1 + i32.const 0 + i32.ge_s + if + block $while-break|1 + local.get $4 + local.get $1 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $6 + i32.const 2 + global.set $~argumentsLength + local.get $5 + local.get $6 + local.get $3 + i32.load + call_indirect $0 (type $f64_f64_=>_i32) + i32.const 0 + i32.ge_s + br_if $while-break|1 + local.get $1 + local.tee $0 + i32.const 1 + i32.sub + local.set $1 + local.get $4 + local.get $0 + i32.const 1 + i32.add + i32.const 3 + i32.shl + i32.add + local.get $6 + f64.store + br $while-continue|1 + end + end + end + local.get $4 + local.get $1 + i32.const 1 + i32.add + i32.const 3 + i32.shl + i32.add + local.get $5 + f64.store + local.get $7 + i32.const 1 + i32.add + local.set $7 + br $for-loop|0 + end + end + else + local.get $4 + local.get $8 + local.get $1 + call $~lib/util/sort/weakHeapSort + end + end + local.get $2 + ) + (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + block $~lib/util/memory/memmove|inlined.0 + local.get $2 + local.set $4 + local.get $0 + local.get $1 + i32.eq + br_if $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.lt_u + if + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|0 + local.get $0 + i32.const 7 + i32.and + if + local.get $4 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $4 + i32.const 1 + i32.sub + local.set $4 + local.get $0 + local.tee $2 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $2 + local.get $3 + i32.load8_u + i32.store8 + br $while-continue|0 + end + end + loop $while-continue|1 + local.get $4 + i32.const 8 + i32.ge_u + if + local.get $0 + local.get $1 + i64.load + i64.store + local.get $4 + i32.const 8 + i32.sub + local.set $4 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + br $while-continue|1 + end + end + end + loop $while-continue|2 + local.get $4 + if + local.get $0 + local.tee $2 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $2 + local.get $3 + i32.load8_u + i32.store8 + local.get $4 + i32.const 1 + i32.sub + local.set $4 + br $while-continue|2 + end + end + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|3 + local.get $0 + local.get $4 + i32.add + i32.const 7 + i32.and + if + local.get $4 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $4 + i32.const 1 + i32.sub + local.tee $4 + local.get $0 + i32.add + local.get $1 + local.get $4 + i32.add + i32.load8_u + i32.store8 + br $while-continue|3 + end + end + loop $while-continue|4 + local.get $4 + i32.const 8 + i32.ge_u + if + local.get $4 + i32.const 8 + i32.sub + local.tee $4 + local.get $0 + i32.add + local.get $1 + local.get $4 + i32.add + i64.load + i64.store + br $while-continue|4 + end + end + end + loop $while-continue|5 + local.get $4 + if + local.get $4 + i32.const 1 + i32.sub + local.tee $4 + local.get $0 + i32.add + local.get $1 + local.get $4 + i32.add + i32.load8_u + i32.store8 + br $while-continue|5 + end + end + end + end + ) + (func $~lib/typedarray/Float64Array#copyWithin (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + local.get $3 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.tee $4 + local.get $3 + local.get $4 + i32.lt_s + select + local.set $5 + local.get $0 + local.tee $3 + i32.load offset=4 + local.tee $6 + local.get $1 + i32.const 0 + i32.lt_s + if (result i32) + local.get $1 + local.get $4 + i32.add + local.tee $0 + i32.const 0 + local.get $0 + i32.const 0 + i32.gt_s + select + else + local.get $1 + local.get $4 + local.get $1 + local.get $4 + i32.lt_s + select + end + local.tee $1 + i32.const 3 + i32.shl + i32.add + local.get $6 + local.get $2 + i32.const 0 + i32.lt_s + if (result i32) + local.get $2 + local.get $4 + i32.add + local.tee $0 + i32.const 0 + local.get $0 + i32.const 0 + i32.gt_s + select + else + local.get $2 + local.get $4 + local.get $2 + local.get $4 + i32.lt_s + select + end + local.tee $0 + i32.const 3 + i32.shl + i32.add + local.get $5 + i32.const 0 + i32.lt_s + if (result i32) + local.get $4 + local.get $5 + i32.add + local.tee $2 + i32.const 0 + local.get $2 + i32.const 0 + i32.gt_s + select + else + local.get $5 + local.get $4 + local.get $4 + local.get $5 + i32.gt_s + select + end + local.get $0 + i32.sub + local.tee $2 + local.get $4 + local.get $1 + i32.sub + local.tee $0 + local.get $0 + local.get $2 + i32.gt_s + select + i32.const 3 + i32.shl + call $~lib/memory/memory.copy + local.get $3 + ) + (func $~lib/util/number/decimalCount32 (param $0 i32) (result i32) + local.get $0 + i32.const 10 + i32.ge_u + i32.const 1 + i32.add + local.get $0 + i32.const 10000 + i32.ge_u + i32.const 3 + i32.add + local.get $0 + i32.const 1000 + i32.ge_u + i32.add + local.get $0 + i32.const 100 + i32.lt_u + select + local.get $0 + i32.const 1000000 + i32.ge_u + i32.const 6 + i32.add + local.get $0 + i32.const 1000000000 + i32.ge_u + i32.const 8 + i32.add + local.get $0 + i32.const 100000000 + i32.ge_u + i32.add + local.get $0 + i32.const 10000000 + i32.lt_u + select + local.get $0 + i32.const 100000 + i32.lt_u + select + ) + (func $~lib/util/number/genDigits (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) + (local $7 i64) + (local $8 i64) + (local $9 i32) + (local $10 i64) + (local $11 i32) + (local $12 i64) + (local $13 i64) + local.get $3 + local.get $1 + i64.sub + local.set $8 + local.get $3 + i64.const 1 + i32.const 0 + local.get $4 + i32.sub + local.tee $11 + i64.extend_i32_s + i64.shl + local.tee $10 + i64.const 1 + i64.sub + local.tee $12 + i64.and + local.set $7 + local.get $3 + local.get $11 + i64.extend_i32_s + i64.shr_u + i32.wrap_i64 + local.tee $2 + call $~lib/util/number/decimalCount32 + local.set $9 + loop $while-continue|0 + local.get $9 + i32.const 0 + i32.gt_s + if + block $break|1 + block $case10|1 + block $case9|1 + block $case8|1 + block $case7|1 + block $case6|1 + block $case5|1 + block $case4|1 + block $case3|1 + block $case2|1 + block $case1|1 + block $case0|1 + local.get $9 + i32.const 1 + i32.sub + br_table $case9|1 $case8|1 $case7|1 $case6|1 $case5|1 $case4|1 $case3|1 $case2|1 $case1|1 $case0|1 $case10|1 + end + local.get $2 + i32.const 1000000000 + i32.div_u + local.set $4 + local.get $2 + i32.const 1000000000 + i32.rem_u + local.set $2 + br $break|1 + end + local.get $2 + i32.const 100000000 + i32.div_u + local.set $4 + local.get $2 + i32.const 100000000 + i32.rem_u + local.set $2 + br $break|1 + end + local.get $2 + i32.const 10000000 + i32.div_u + local.set $4 + local.get $2 + i32.const 10000000 + i32.rem_u + local.set $2 + br $break|1 + end + local.get $2 + i32.const 1000000 + i32.div_u + local.set $4 + local.get $2 + i32.const 1000000 + i32.rem_u + local.set $2 + br $break|1 + end + local.get $2 + i32.const 100000 + i32.div_u + local.set $4 + local.get $2 + i32.const 100000 + i32.rem_u + local.set $2 + br $break|1 + end + local.get $2 + i32.const 10000 + i32.div_u + local.set $4 + local.get $2 + i32.const 10000 + i32.rem_u + local.set $2 + br $break|1 + end + local.get $2 + i32.const 1000 + i32.div_u + local.set $4 + local.get $2 + i32.const 1000 + i32.rem_u + local.set $2 + br $break|1 + end + local.get $2 + i32.const 100 + i32.div_u + local.set $4 + local.get $2 + i32.const 100 + i32.rem_u + local.set $2 + br $break|1 + end + local.get $2 + i32.const 10 + i32.div_u + local.set $4 + local.get $2 + i32.const 10 + i32.rem_u + local.set $2 + br $break|1 + end + local.get $2 + local.set $4 + i32.const 0 + local.set $2 + br $break|1 + end + i32.const 0 + local.set $4 + end + local.get $4 + local.get $6 + i32.or + if + local.get $0 + local.get $6 + i32.const 1 + i32.shl + i32.add + local.get $4 + i32.const 65535 + i32.and + i32.const 48 + i32.add + i32.store16 + local.get $6 + i32.const 1 + i32.add + local.set $6 + end + local.get $9 + i32.const 1 + i32.sub + local.set $9 + local.get $5 + local.get $7 + local.get $2 + i64.extend_i32_u + local.get $11 + i64.extend_i32_s + i64.shl + i64.add + local.tee $1 + i64.ge_u + if + local.get $9 + global.get $~lib/util/number/_K + i32.add + global.set $~lib/util/number/_K + local.get $9 + i32.const 2 + i32.shl + i32.const 2912 + i32.add + i64.load32_u + local.get $11 + i64.extend_i32_s + i64.shl + local.set $10 + local.get $0 + local.get $6 + i32.const 1 + i32.sub + i32.const 1 + i32.shl + i32.add + local.tee $0 + i32.load16_u + local.set $2 + loop $while-continue|3 + i32.const 1 + local.get $8 + local.get $1 + i64.sub + local.get $1 + local.get $10 + i64.add + local.tee $3 + local.get $8 + i64.sub + i64.gt_u + local.get $3 + local.get $8 + i64.lt_u + select + i32.const 0 + local.get $10 + local.get $5 + local.get $1 + i64.sub + i64.le_u + i32.const 0 + local.get $1 + local.get $8 + i64.lt_u + select + select + if + local.get $2 + i32.const 1 + i32.sub + local.set $2 + local.get $1 + local.get $10 + i64.add + local.set $1 + br $while-continue|3 + end + end + local.get $0 + local.get $2 + i32.store16 + local.get $6 + return + end + br $while-continue|0 + end + end + local.get $11 + i64.extend_i32_s + local.set $13 + loop $while-continue|4 (result i32) + local.get $5 + i64.const 10 + i64.mul + local.set $5 + local.get $7 + i64.const 10 + i64.mul + local.tee $3 + local.get $13 + i64.shr_u + local.tee $1 + local.get $6 + i64.extend_i32_s + i64.or + i64.const 0 + i64.ne + if + local.get $0 + local.get $6 + i32.const 1 + i32.shl + i32.add + local.get $1 + i32.wrap_i64 + i32.const 65535 + i32.and + i32.const 48 + i32.add + i32.store16 + local.get $6 + i32.const 1 + i32.add + local.set $6 + end + local.get $9 + i32.const 1 + i32.sub + local.set $9 + local.get $3 + local.get $12 + i64.and + local.tee $7 + local.get $5 + i64.ge_u + br_if $while-continue|4 + local.get $9 + global.get $~lib/util/number/_K + i32.add + global.set $~lib/util/number/_K + local.get $7 + local.set $1 + local.get $8 + i32.const 0 + local.get $9 + i32.sub + i32.const 2 + i32.shl + i32.const 2912 + i32.add + i64.load32_u + i64.mul + local.set $8 + local.get $0 + local.get $6 + i32.const 1 + i32.sub + i32.const 1 + i32.shl + i32.add + local.tee $0 + i32.load16_u + local.set $2 + loop $while-continue|6 + i32.const 1 + local.get $8 + local.get $1 + i64.sub + local.get $1 + local.get $10 + i64.add + local.tee $3 + local.get $8 + i64.sub + i64.gt_u + local.get $3 + local.get $8 + i64.lt_u + select + i32.const 0 + local.get $10 + local.get $5 + local.get $1 + i64.sub + i64.le_u + i32.const 0 + local.get $1 + local.get $8 + i64.lt_u + select + select + if + local.get $2 + i32.const 1 + i32.sub + local.set $2 + local.get $1 + local.get $10 + i64.add + local.set $1 + br $while-continue|6 + end + end + local.get $0 + local.get $2 + i32.store16 + local.get $6 + end + ) + (func $~lib/util/number/utoa_dec_simple (param $0 i32) (param $1 i32) (param $2 i32) + loop $do-continue|0 + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.const 1 + i32.shl + i32.add + local.get $1 + i32.const 10 + i32.rem_u + i32.const 48 + i32.add + i32.store16 + local.get $1 + i32.const 10 + i32.div_u + local.tee $1 + br_if $do-continue|0 + end + ) + (func $~lib/util/number/prettify (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + local.get $2 + i32.eqz + if + local.get $0 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.const 3145774 + i32.store + local.get $1 + i32.const 2 + i32.add + return + end + local.get $1 + local.get $2 + i32.add + local.tee $3 + i32.const 21 + i32.le_s + i32.const 0 + local.get $1 + local.get $3 + i32.le_s + select + if (result i32) + loop $for-loop|0 + local.get $1 + local.get $3 + i32.lt_s + if + local.get $0 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.const 48 + i32.store16 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|0 + end + end + local.get $0 + local.get $3 + i32.const 1 + i32.shl + i32.add + i32.const 3145774 + i32.store + local.get $3 + i32.const 2 + i32.add + else + local.get $3 + i32.const 21 + i32.le_s + i32.const 0 + local.get $3 + i32.const 0 + i32.gt_s + select + if (result i32) + local.get $0 + local.get $3 + i32.const 1 + i32.shl + i32.add + local.tee $0 + i32.const 2 + i32.add + local.get $0 + i32.const 0 + local.get $2 + i32.sub + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $0 + i32.const 46 + i32.store16 + local.get $1 + i32.const 1 + i32.add + else + local.get $3 + i32.const 0 + i32.le_s + i32.const 0 + local.get $3 + i32.const -6 + i32.gt_s + select + if (result i32) + local.get $0 + i32.const 2 + local.get $3 + i32.sub + local.tee $3 + i32.const 1 + i32.shl + i32.add + local.get $0 + local.get $1 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $0 + i32.const 3014704 + i32.store + i32.const 2 + local.set $2 + loop $for-loop|1 + local.get $2 + local.get $3 + i32.lt_s + if + local.get $0 + local.get $2 + i32.const 1 + i32.shl + i32.add + i32.const 48 + i32.store16 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|1 + end + end + local.get $1 + local.get $3 + i32.add + else + local.get $1 + i32.const 1 + i32.eq + if (result i32) + local.get $0 + i32.const 101 + i32.store16 offset=2 + local.get $0 + local.tee $1 + i32.const 4 + i32.add + local.get $3 + i32.const 1 + i32.sub + local.tee $0 + i32.const 0 + i32.lt_s + local.tee $2 + if + i32.const 0 + local.get $0 + i32.sub + local.set $0 + end + local.get $0 + local.get $0 + call $~lib/util/number/decimalCount32 + i32.const 1 + i32.add + local.tee $0 + call $~lib/util/number/utoa_dec_simple + local.get $1 + i32.const 45 + i32.const 43 + local.get $2 + select + i32.store16 offset=4 + local.get $0 + i32.const 2 + i32.add + else + local.get $0 + i32.const 4 + i32.add + local.get $0 + i32.const 2 + i32.add + local.get $1 + i32.const 1 + i32.shl + local.tee $2 + i32.const 2 + i32.sub + call $~lib/memory/memory.copy + local.get $0 + i32.const 46 + i32.store16 offset=2 + local.get $0 + local.get $2 + i32.add + local.tee $0 + i32.const 101 + i32.store16 offset=2 + local.get $0 + local.tee $2 + i32.const 4 + i32.add + local.get $3 + i32.const 1 + i32.sub + local.tee $0 + i32.const 0 + i32.lt_s + local.tee $3 + if + i32.const 0 + local.get $0 + i32.sub + local.set $0 + end + local.get $0 + local.get $0 + call $~lib/util/number/decimalCount32 + i32.const 1 + i32.add + local.tee $0 + call $~lib/util/number/utoa_dec_simple + local.get $2 + i32.const 45 + i32.const 43 + local.get $3 + select + i32.store16 offset=4 + local.get $0 + local.get $1 + i32.add + i32.const 2 + i32.add + end + end + end + end + ) + (func $~lib/util/number/dtoa_core (param $0 i32) (param $1 f64) (result i32) + (local $2 i64) + (local $3 i64) + (local $4 i32) + (local $5 i64) + (local $6 i64) + (local $7 i64) + (local $8 i32) + (local $9 i32) + (local $10 i32) + local.get $1 + f64.const 0 + f64.lt + local.tee $9 + if (result f64) + local.get $0 + i32.const 45 + i32.store16 + local.get $1 + f64.neg + else + local.get $1 + end + i64.reinterpret_f64 + local.tee $2 + i64.const 9218868437227405312 + i64.and + i64.const 52 + i64.shr_u + i32.wrap_i64 + local.tee $8 + i32.const 0 + i32.ne + i64.extend_i32_u + i64.const 52 + i64.shl + local.get $2 + i64.const 4503599627370495 + i64.and + i64.add + local.tee $3 + i64.const 1 + i64.shl + i64.const 1 + i64.add + local.tee $2 + local.get $2 + i64.clz + i32.wrap_i64 + local.tee $4 + i64.extend_i32_s + i64.shl + global.set $~lib/util/number/_frc_plus + local.get $8 + i32.const 1 + local.get $8 + select + i32.const 1075 + i32.sub + local.tee $8 + i32.const 1 + i32.sub + local.get $4 + i32.sub + local.set $4 + local.get $3 + local.get $3 + i64.const 4503599627370496 + i64.eq + i32.const 1 + i32.add + local.tee $10 + i64.extend_i32_s + i64.shl + i64.const 1 + i64.sub + local.get $8 + local.get $10 + i32.sub + local.get $4 + i32.sub + i64.extend_i32_s + i64.shl + global.set $~lib/util/number/_frc_minus + local.get $4 + global.set $~lib/util/number/_exp + i32.const 348 + i32.const -61 + global.get $~lib/util/number/_exp + i32.sub + f64.convert_i32_s + f64.const 0.30102999566398114 f64.mul - f64.le + f64.const 347 + f64.add + local.tee $1 + i32.trunc_f64_s + local.tee $4 + local.get $1 + local.get $4 + f64.convert_i32_s + f64.ne + i32.add + i32.const 3 + i32.shr_s + i32.const 1 + i32.add + local.tee $4 + i32.const 3 + i32.shl + local.tee $10 + i32.sub + global.set $~lib/util/number/_K + local.get $10 + i32.const 2040 + i32.add + i64.load + global.set $~lib/util/number/_frc_pow + local.get $4 + i32.const 1 + i32.shl + i32.const 2736 + i32.add + i32.load16_s + global.set $~lib/util/number/_exp_pow + global.get $~lib/util/number/_frc_pow + local.tee $6 + i64.const 4294967295 + i64.and + local.set $2 + local.get $6 + i64.const 32 + i64.shr_u + local.tee $6 + global.get $~lib/util/number/_frc_plus + local.tee $5 + i64.const 32 + i64.shr_u + local.tee $7 + i64.mul + local.get $2 + local.get $7 + i64.mul + local.get $2 + local.get $5 + i64.const 4294967295 + i64.and + local.tee $5 + i64.mul + i64.const 32 + i64.shr_u + i64.add + local.tee $7 + i64.const 32 + i64.shr_u + i64.add + local.get $5 + local.get $6 + i64.mul + local.get $7 + i64.const 4294967295 + i64.and + i64.add + i64.const 2147483647 + i64.add + i64.const 32 + i64.shr_u + i64.add + i64.const 1 + i64.sub + local.set $5 + local.get $0 + local.get $9 + i32.const 1 + i32.shl + i32.add + local.get $0 + local.get $6 + local.get $3 + local.get $3 + i64.clz + i32.wrap_i64 + local.tee $0 + i64.extend_i32_s + i64.shl + local.tee $3 + i64.const 32 + i64.shr_u + local.tee $7 + i64.mul + local.get $2 + local.get $7 + i64.mul + local.get $2 + local.get $3 + i64.const 4294967295 + i64.and + local.tee $3 + i64.mul + i64.const 32 + i64.shr_u + i64.add + local.tee $7 + i64.const 32 + i64.shr_u + i64.add + local.get $3 + local.get $6 + i64.mul + local.get $7 + i64.const 4294967295 + i64.and + i64.add + i64.const 2147483647 + i64.add + i64.const 32 + i64.shr_u + i64.add + global.get $~lib/util/number/_exp_pow + local.tee $4 + local.get $8 + local.get $0 + i32.sub + i32.add + i32.const -64 + i32.sub + local.get $5 + local.get $4 + global.get $~lib/util/number/_exp + i32.add + i32.const -64 + i32.sub + local.get $5 + local.get $6 + global.get $~lib/util/number/_frc_minus + local.tee $3 + i64.const 32 + i64.shr_u + local.tee $5 + i64.mul + local.get $2 + local.get $5 + i64.mul + local.get $2 + local.get $3 + i64.const 4294967295 + i64.and + local.tee $2 + i64.mul + i64.const 32 + i64.shr_u + i64.add + local.tee $3 + i64.const 32 + i64.shr_u + i64.add + local.get $2 + local.get $6 + i64.mul + local.get $3 + i64.const 4294967295 + i64.and + i64.add + i64.const 2147483647 + i64.add + i64.const 32 + i64.shr_u + i64.add + i64.const 1 + i64.add + i64.sub + local.get $9 + call $~lib/util/number/genDigits + local.get $9 + i32.sub + global.get $~lib/util/number/_K + call $~lib/util/number/prettify + local.get $9 + i32.add + ) + (func $~lib/util/number/dtoa_buffered (param $0 i32) (param $1 f64) (result i32) + (local $2 i32) + local.get $1 + f64.const 0 + f64.eq + if + local.get $0 + i32.const 48 + i32.store16 + local.get $0 + i32.const 46 + i32.store16 offset=2 + local.get $0 + i32.const 48 + i32.store16 offset=4 + i32.const 3 + return + end + local.get $1 + local.get $1 + f64.sub + f64.const 0 + f64.ne + if + local.get $1 + local.get $1 + f64.ne + if + local.get $0 + i32.const 78 + i32.store16 + local.get $0 + i32.const 97 + i32.store16 offset=2 + local.get $0 + i32.const 78 + i32.store16 offset=4 + i32.const 3 + return + else + local.get $1 + f64.const 0 + f64.lt + local.tee $2 + if + local.get $0 + i32.const 45 + i32.store16 + local.get $0 + i32.const 2 + i32.add + local.set $0 + end + local.get $0 + i64.const 29555310648492105 + i64.store + local.get $0 + i64.const 34058970405077102 + i64.store offset=8 + local.get $2 + i32.const 8 + i32.add + return + end + unreachable + end + local.get $0 + local.get $1 + call $~lib/util/number/dtoa_core + ) + (func $~lib/typedarray/Float64Array#join (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.get $1 + call $~lib/util/string/joinFloatArray + ) + (func $~lib/math/pio2_large_quot (param $0 i64) (result i32) + (local $1 i64) + (local $2 i64) + (local $3 i64) + (local $4 i64) + (local $5 i64) + (local $6 i64) + (local $7 i32) + (local $8 i64) + (local $9 i64) + (local $10 i64) + (local $11 i64) + (local $12 f64) + local.get $0 + i64.const 9223372036854775807 + i64.and + i64.const 52 + i64.shr_u + i64.const 1045 + i64.sub + local.tee $4 + i64.const 6 + i64.shr_s + i32.wrap_i64 + i32.const 3 + i32.shl + i32.const 2992 + i32.add + local.tee $7 + i64.load + local.set $6 + local.get $7 + i64.load offset=8 + local.set $3 + local.get $7 + i64.load offset=16 + local.set $1 + local.get $4 + i64.const 63 + i64.and + local.tee $4 + i64.const 0 + i64.ne + if + local.get $6 + local.get $4 + i64.shl + local.get $3 + i64.const 64 + local.get $4 + i64.sub + local.tee $2 + i64.shr_u + i64.or + local.set $6 + local.get $3 + local.get $4 + i64.shl + local.get $1 + local.get $2 + i64.shr_u + i64.or + local.set $3 + local.get $1 + local.get $4 + i64.shl + local.get $7 + i64.load offset=24 + local.get $2 + i64.shr_u + i64.or + local.set $1 + end + local.get $0 + i64.const 4503599627370495 + i64.and + i64.const 4503599627370496 + i64.or + local.tee $4 + i64.const 4294967295 + i64.and + local.tee $2 + local.get $3 + i64.const 32 + i64.shr_u + local.tee $8 + i64.mul + local.get $3 + i64.const 4294967295 + i64.and + local.tee $5 + local.get $2 + i64.mul + local.tee $9 + i64.const 32 + i64.shr_u + i64.add + local.set $3 + local.get $5 + local.get $4 + i64.const 32 + i64.shr_u + local.tee $5 + i64.mul + local.get $3 + i64.const 4294967295 + i64.and + i64.add + local.set $2 + local.get $5 + local.get $8 + i64.mul + local.get $3 + i64.const 32 + i64.shr_u + i64.add + local.get $2 + i64.const 32 + i64.shr_u + i64.add + global.set $~lib/math/res128_hi + local.get $4 + i64.const 32 + i64.shr_s + local.get $1 + i64.const 32 + i64.shr_u + i64.mul + local.tee $3 + local.get $9 + i64.const 4294967295 + i64.and + local.get $2 + i64.const 32 + i64.shl + i64.add + i64.add + local.set $1 + local.get $1 + local.get $3 + i64.lt_u + i64.extend_i32_u + global.get $~lib/math/res128_hi + local.get $4 + local.get $6 + i64.mul + i64.add + i64.add + local.tee $8 + i64.const 2 + i64.shl + local.get $1 + i64.const 62 + i64.shr_u + i64.or + local.tee $6 + i64.const 63 + i64.shr_s + local.tee $4 + i64.const 1 + i64.shr_s + local.get $6 + i64.xor + local.tee $2 + i64.clz + local.set $3 + local.get $2 + local.get $3 + i64.shl + local.get $4 + local.get $1 + i64.const 2 + i64.shl + i64.xor + local.tee $5 + i64.const 64 + local.get $3 + i64.sub + i64.shr_u + i64.or + local.tee $1 + i64.const 4294967295 + i64.and + local.set $2 + local.get $1 + i64.const 32 + i64.shr_u + local.tee $9 + i64.const 560513588 + i64.mul + local.get $2 + i64.const 3373259426 + i64.mul + local.get $2 + i64.const 560513588 + i64.mul + local.tee $10 + i64.const 32 + i64.shr_u + i64.add + local.tee $11 + i64.const 4294967295 + i64.and + i64.add + local.set $2 + local.get $9 + i64.const 3373259426 + i64.mul + local.get $11 + i64.const 32 + i64.shr_u + i64.add + local.get $2 + i64.const 32 + i64.shr_u + i64.add + global.set $~lib/math/res128_hi + local.get $10 + i64.const 4294967295 + i64.and + local.get $2 + i64.const 32 + i64.shl + i64.add + local.tee $2 + local.get $1 + f64.convert_i64_u + f64.const 3.753184150245214e-04 + f64.mul + local.get $5 + local.get $3 + i64.shl + f64.convert_i64_u + f64.const 3.834951969714103e-04 + f64.mul + f64.add + i64.trunc_f64_u + local.tee $1 + i64.lt_u + i64.extend_i32_u + global.get $~lib/math/res128_hi + local.tee $5 + i64.const 11 + i64.shr_u + i64.add + f64.convert_i64_u + global.set $~lib/math/rempio2_y0 + local.get $1 + local.get $5 + i64.const 53 + i64.shl + local.get $2 + i64.const 11 + i64.shr_u + i64.or + i64.add + f64.convert_i64_u + f64.const 5.421010862427522e-20 + f64.mul + global.set $~lib/math/rempio2_y1 + global.get $~lib/math/rempio2_y0 + i64.const 4372995238176751616 + local.get $3 + i64.const 52 + i64.shl + i64.sub + local.get $0 + local.get $6 + i64.xor + i64.const -9223372036854775808 + i64.and + i64.or + f64.reinterpret_i64 + local.tee $12 + f64.mul + global.set $~lib/math/rempio2_y0 + global.get $~lib/math/rempio2_y1 + local.get $12 + f64.mul + global.set $~lib/math/rempio2_y1 + local.get $8 + i64.const 62 + i64.shr_s + local.get $4 + i64.sub + i32.wrap_i64 + ) + (func $~lib/math/NativeMath.sin (param $0 f64) (result f64) + (local $1 f64) + (local $2 i64) + (local $3 f64) + (local $4 f64) + (local $5 i32) + (local $6 i32) + (local $7 f64) + local.get $0 + i64.reinterpret_f64 + local.tee $2 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.tee $5 + i32.const 31 + i32.shr_u + local.set $6 + local.get $5 + i32.const 2147483647 + i32.and + local.tee $5 + i32.const 1072243195 + i32.le_u + if + local.get $5 + i32.const 1045430272 + i32.lt_u + if + local.get $0 + return + end + local.get $0 + local.get $0 + local.get $0 + f64.mul + local.tee $3 + local.get $0 + f64.mul + local.get $3 + local.get $3 + local.get $3 + f64.const 2.7557313707070068e-06 + f64.mul + f64.const -1.984126982985795e-04 + f64.add + f64.mul + f64.const 0.00833333333332249 + f64.add + local.get $3 + local.get $3 + local.get $3 + f64.mul + f64.mul + local.get $3 + f64.const 1.58969099521155e-10 + f64.mul + f64.const -2.5050760253406863e-08 + f64.add + f64.mul + f64.add + f64.mul + f64.const -0.16666666666666632 + f64.add + f64.mul + f64.add + return + end + local.get $5 + i32.const 2146435072 + i32.ge_u + if + local.get $0 + local.get $0 + f64.sub + return + end + block $~lib/math/rempio2|inlined.0 (result i32) + local.get $2 + i64.const 32 + i64.shr_u + i32.wrap_i64 + i32.const 2147483647 + i32.and + local.tee $5 + i32.const 1094263291 + i32.lt_u + if + local.get $5 + i32.const 20 + i32.shr_u + local.tee $6 + local.get $0 + local.get $0 + f64.const 0.6366197723675814 + f64.mul + f64.nearest + local.tee $3 + f64.const 1.5707963267341256 + f64.mul + f64.sub + local.tee $0 + local.get $3 + f64.const 6.077100506506192e-11 + f64.mul + local.tee $4 + f64.sub + local.tee $1 + i64.reinterpret_f64 + i64.const 32 + i64.shr_u + i32.wrap_i64 + i32.const 20 + i32.shr_u + i32.const 2047 + i32.and + i32.sub + i32.const 16 + i32.gt_u + if + local.get $3 + f64.const 2.0222662487959506e-21 + f64.mul + local.get $0 + local.get $0 + local.get $3 + f64.const 6.077100506303966e-11 + f64.mul + local.tee $4 + f64.sub + local.tee $0 + f64.sub + local.get $4 + f64.sub + f64.sub + local.set $4 + local.get $6 + local.get $0 + local.get $4 + f64.sub + local.tee $1 + i64.reinterpret_f64 + i64.const 32 + i64.shr_u + i32.wrap_i64 + i32.const 20 + i32.shr_u + i32.const 2047 + i32.and + i32.sub + i32.const 49 + i32.gt_u + if (result f64) + local.get $3 + f64.const 8.4784276603689e-32 + f64.mul + local.get $0 + local.get $0 + local.get $3 + f64.const 2.0222662487111665e-21 + f64.mul + local.tee $4 + f64.sub + local.tee $0 + f64.sub + local.get $4 + f64.sub + f64.sub + local.set $4 + local.get $0 + local.get $4 + f64.sub + else + local.get $1 + end + local.set $1 + end + local.get $1 + global.set $~lib/math/rempio2_y0 + local.get $0 + local.get $1 + f64.sub + local.get $4 + f64.sub + global.set $~lib/math/rempio2_y1 + local.get $3 + i32.trunc_f64_s + br $~lib/math/rempio2|inlined.0 + end + i32.const 0 + local.get $2 + call $~lib/math/pio2_large_quot + local.tee $5 + i32.sub + local.get $5 + local.get $6 + select + end + local.set $6 + global.get $~lib/math/rempio2_y0 + local.set $3 + global.get $~lib/math/rempio2_y1 + local.set $4 + local.get $6 + i32.const 1 + i32.and + if (result f64) + f64.const 1 + local.get $3 + local.get $3 + f64.mul + local.tee $0 + f64.const 0.5 + f64.mul + local.tee $1 + f64.sub + local.tee $7 + f64.const 1 + local.get $7 + f64.sub + local.get $1 + f64.sub + local.get $0 + local.get $0 + local.get $0 + local.get $0 + f64.const 2.480158728947673e-05 + f64.mul + f64.const -0.001388888888887411 + f64.add + f64.mul + f64.const 0.0416666666666666 + f64.add + f64.mul + local.get $0 + local.get $0 + f64.mul + local.tee $1 + local.get $1 + f64.mul + local.get $0 + local.get $0 + f64.const -1.1359647557788195e-11 + f64.mul + f64.const 2.087572321298175e-09 + f64.add + f64.mul + f64.const -2.7557314351390663e-07 + f64.add + f64.mul + f64.add + f64.mul + local.get $3 + local.get $4 + f64.mul + f64.sub + f64.add + f64.add + else + local.get $3 + local.get $3 + f64.mul + local.tee $0 + local.get $3 + f64.mul + local.set $1 + local.get $3 + local.get $0 + local.get $4 + f64.const 0.5 + f64.mul + local.get $1 + local.get $0 + local.get $0 + f64.const 2.7557313707070068e-06 + f64.mul + f64.const -1.984126982985795e-04 + f64.add + f64.mul + f64.const 0.00833333333332249 + f64.add + local.get $0 + local.get $0 + local.get $0 + f64.mul + f64.mul + local.get $0 + f64.const 1.58969099521155e-10 + f64.mul + f64.const -2.5050760253406863e-08 + f64.add + f64.mul + f64.add + f64.mul + f64.sub + f64.mul + local.get $4 + f64.sub + local.get $1 + f64.const -0.16666666666666632 + f64.mul + f64.sub + f64.sub + end + local.tee $0 + f64.neg + local.get $0 + local.get $6 + i32.const 2 + i32.and + select + ) + (func $~lib/math/NativeMath.cos (param $0 f64) (result f64) + (local $1 f64) + (local $2 i64) + (local $3 f64) + (local $4 f64) + (local $5 i32) + (local $6 i32) + (local $7 f64) + local.get $0 + i64.reinterpret_f64 + local.tee $2 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.tee $5 + i32.const 31 + i32.shr_u + local.set $6 + local.get $5 + i32.const 2147483647 + i32.and + local.tee $5 + i32.const 1072243195 + i32.le_u + if + local.get $5 + i32.const 1044816030 + i32.lt_u + if + f64.const 1 + return + end + f64.const 1 + local.get $0 + local.get $0 + f64.mul + local.tee $3 + f64.const 0.5 + f64.mul + local.tee $4 + f64.sub + local.tee $1 + f64.const 1 + local.get $1 + f64.sub + local.get $4 + f64.sub + local.get $3 + local.get $3 + local.get $3 + local.get $3 + f64.const 2.480158728947673e-05 + f64.mul + f64.const -0.001388888888887411 + f64.add + f64.mul + f64.const 0.0416666666666666 + f64.add + f64.mul + local.get $3 + local.get $3 + f64.mul + local.tee $4 + local.get $4 + f64.mul + local.get $3 + local.get $3 + f64.const -1.1359647557788195e-11 + f64.mul + f64.const 2.087572321298175e-09 + f64.add + f64.mul + f64.const -2.7557314351390663e-07 + f64.add + f64.mul + f64.add + f64.mul + local.get $0 + f64.const 0 + f64.mul + f64.sub + f64.add + f64.add + return + end + local.get $5 + i32.const 2146435072 + i32.ge_u + if + local.get $0 + local.get $0 + f64.sub + return + end + block $~lib/math/rempio2|inlined.1 (result i32) + local.get $2 + i64.const 32 + i64.shr_u + i32.wrap_i64 + i32.const 2147483647 + i32.and + local.tee $5 + i32.const 1094263291 + i32.lt_u + if + local.get $5 + i32.const 20 + i32.shr_u + local.tee $6 + local.get $0 + local.get $0 + f64.const 0.6366197723675814 + f64.mul + f64.nearest + local.tee $3 + f64.const 1.5707963267341256 + f64.mul + f64.sub + local.tee $0 + local.get $3 + f64.const 6.077100506506192e-11 + f64.mul + local.tee $4 + f64.sub + local.tee $1 + i64.reinterpret_f64 + i64.const 32 + i64.shr_u + i32.wrap_i64 + i32.const 20 + i32.shr_u + i32.const 2047 + i32.and + i32.sub + i32.const 16 + i32.gt_u + if + local.get $3 + f64.const 2.0222662487959506e-21 + f64.mul + local.get $0 + local.get $0 + local.get $3 + f64.const 6.077100506303966e-11 + f64.mul + local.tee $4 + f64.sub + local.tee $0 + f64.sub + local.get $4 + f64.sub + f64.sub + local.set $4 + local.get $6 + local.get $0 + local.get $4 + f64.sub + local.tee $1 + i64.reinterpret_f64 + i64.const 32 + i64.shr_u + i32.wrap_i64 + i32.const 20 + i32.shr_u + i32.const 2047 + i32.and + i32.sub + i32.const 49 + i32.gt_u + if (result f64) + local.get $3 + f64.const 8.4784276603689e-32 + f64.mul + local.get $0 + local.get $0 + local.get $3 + f64.const 2.0222662487111665e-21 + f64.mul + local.tee $4 + f64.sub + local.tee $0 + f64.sub + local.get $4 + f64.sub + f64.sub + local.set $4 + local.get $0 + local.get $4 + f64.sub + else + local.get $1 + end + local.set $1 + end + local.get $1 + global.set $~lib/math/rempio2_y0 + local.get $0 + local.get $1 + f64.sub + local.get $4 + f64.sub + global.set $~lib/math/rempio2_y1 + local.get $3 + i32.trunc_f64_s + br $~lib/math/rempio2|inlined.1 + end + i32.const 0 + local.get $2 + call $~lib/math/pio2_large_quot + local.tee $5 + i32.sub + local.get $5 + local.get $6 + select + end + local.set $6 + global.get $~lib/math/rempio2_y0 + local.set $3 + global.get $~lib/math/rempio2_y1 + local.set $4 + local.get $6 + i32.const 1 + i32.and + if (result f64) + local.get $3 + local.get $3 + f64.mul + local.tee $0 + local.get $3 + f64.mul + local.set $1 + local.get $3 + local.get $0 + local.get $4 + f64.const 0.5 + f64.mul + local.get $1 + local.get $0 + local.get $0 + f64.const 2.7557313707070068e-06 + f64.mul + f64.const -1.984126982985795e-04 + f64.add + f64.mul + f64.const 0.00833333333332249 + f64.add + local.get $0 + local.get $0 + local.get $0 + f64.mul + f64.mul + local.get $0 + f64.const 1.58969099521155e-10 + f64.mul + f64.const -2.5050760253406863e-08 + f64.add + f64.mul + f64.add + f64.mul + f64.sub + f64.mul + local.get $4 + f64.sub + local.get $1 + f64.const -0.16666666666666632 + f64.mul + f64.sub + f64.sub + else + f64.const 1 + local.get $3 + local.get $3 + f64.mul + local.tee $0 + f64.const 0.5 + f64.mul + local.tee $1 + f64.sub + local.tee $7 + f64.const 1 + local.get $7 + f64.sub + local.get $1 + f64.sub + local.get $0 + local.get $0 + local.get $0 + local.get $0 + f64.const 2.480158728947673e-05 + f64.mul + f64.const -0.001388888888887411 + f64.add + f64.mul + f64.const 0.0416666666666666 + f64.add + f64.mul + local.get $0 + local.get $0 + f64.mul + local.tee $1 + local.get $1 + f64.mul + local.get $0 + local.get $0 + f64.const -1.1359647557788195e-11 + f64.mul + f64.const 2.087572321298175e-09 + f64.add + f64.mul + f64.const -2.7557314351390663e-07 + f64.add + f64.mul + f64.add + f64.mul + local.get $3 + local.get $4 + f64.mul + f64.sub + f64.add + f64.add + end + local.tee $0 + f64.neg + local.get $0 + local.get $6 + i32.const 1 + i32.add + i32.const 2 + i32.and + select + ) + (func $~lib/string/String.__concat (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + block $__inlined_func$~lib/string/String#concat + local.get $1 + i32.const 20 + i32.sub + i32.load offset=16 + i32.const 1 + i32.shr_u + i32.const 1 + i32.shl + local.tee $4 + local.get $0 + local.tee $2 + i32.const 20 + i32.sub + i32.load offset=16 + i32.const 1 + i32.shr_u + i32.const 1 + i32.shl + local.tee $3 + i32.add + local.tee $0 + i32.eqz + if + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + i32.const 1808 + local.set $0 + br $__inlined_func$~lib/string/String#concat + end + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.const 1 + call $~lib/rt/itcms/__new + local.tee $0 + i32.store + local.get $0 + local.get $2 + local.get $3 + call $~lib/memory/memory.copy + local.get $0 + local.get $3 + i32.add + local.get $1 + local.get $4 + call $~lib/memory/memory.copy + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + end + local.get $0 + ) + (func $~lib/array/Array#__uset (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store + local.get $0 + local.get $2 + i32.const 1 + call $~lib/rt/itcms/__link + ) + (func $assembly/mat2/equals (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $2 + local.get $6 + f64.sub + f64.abs + f64.const 1 + local.get $2 + f64.abs + local.get $6 + f64.abs + call $assembly/imports/MathUtil.max3 + f64.const 1e-06 + f64.mul + f64.le + if (result i32) + local.get $3 + local.get $7 + f64.sub + f64.abs + f64.const 1 + local.get $3 + f64.abs + local.get $7 + f64.abs + call $assembly/imports/MathUtil.max3 + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $4 + local.get $8 + f64.sub + f64.abs + f64.const 1 + local.get $4 + f64.abs + local.get $8 + f64.abs + call $assembly/imports/MathUtil.max3 + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $5 + local.get $9 + f64.sub + f64.abs + f64.const 1 + local.get $5 + f64.abs + local.get $9 + f64.abs + call $assembly/imports/MathUtil.max3 + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + ) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 f64) (param $1 f64) (result i32) + (local $2 i64) + (local $3 i64) + local.get $0 + i64.reinterpret_f64 + local.tee $2 + local.get $2 + i64.const 63 + i64.shr_s + i64.const 1 + i64.shr_u + i64.xor + local.tee $2 + local.get $1 + i64.reinterpret_f64 + local.tee $3 + local.get $3 + i64.const 63 + i64.shr_s + i64.const 1 + i64.shr_u + i64.xor + local.tee $3 + i64.gt_s + local.get $2 + local.get $3 + i64.lt_s + i32.sub + ) + (func $~lib/rt/__visit_members (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + block $folding-inner3 + block $folding-inner2 + block $folding-inner0 + block $invalid + block $~lib/array/Array + block $~lib/array/Array + block $~lib/string/String + block $~lib/arraybuffer/ArrayBuffer + local.get $0 + i32.const 8 + i32.sub + i32.load + br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $folding-inner2 $folding-inner0 $folding-inner3 $folding-inner2 $folding-inner3 $folding-inner0 $folding-inner3 $~lib/array/Array $~lib/array/Array $folding-inner0 $invalid + end + return + end + return + end + local.get $0 + i32.load offset=4 + local.tee $1 + local.get $0 + i32.load offset=12 + i32.const 2 + i32.shl + i32.add + local.set $2 + loop $while-continue|0 + local.get $1 + local.get $2 + i32.lt_u + if + local.get $1 + i32.load + local.tee $3 + if + local.get $3 + call $~lib/rt/itcms/__visit + end + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $while-continue|0 + end + end + local.get $0 + i32.load + call $~lib/rt/itcms/__visit + return + end + local.get $0 + i32.load + call $~lib/rt/itcms/__visit + return + end + unreachable + end + local.get $0 + i32.load offset=4 + call $~lib/rt/itcms/__visit + return + end + local.get $0 + i32.load + local.tee $0 + if + local.get $0 + call $~lib/rt/itcms/__visit + end + return + end + local.get $0 + i32.load + local.tee $0 + if + local.get $0 + call $~lib/rt/itcms/__visit + end + ) + (func $~setArgumentsLength (param $0 i32) + local.get $0 + global.set $~argumentsLength + ) + (func $~start + memory.size + i32.const 16 + i32.shl + i32.const 19812 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold + i32.const 1584 + call $~lib/rt/itcms/initLazy + global.set $~lib/rt/itcms/pinSpace + i32.const 1616 + call $~lib/rt/itcms/initLazy + global.set $~lib/rt/itcms/toSpace + i32.const 1696 + call $~lib/rt/itcms/initLazy + global.set $~lib/rt/itcms/fromSpace + ) + (func $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 3428 + i32.lt_s + if + i32.const 19840 + i32.const 19888 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + ) + (func $assembly/mat2/str (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const -64 + i32.add + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=8 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=16 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=24 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=32 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=40 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=48 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=56 + global.get $~lib/memory/__stack_pointer + i32.const 3216 + i32.store offset=56 + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/util/number/dtoa + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=60 + i32.const 3216 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=48 + global.get $~lib/memory/__stack_pointer + i32.const 3248 + i32.store offset=52 + local.get $1 + i32.const 3248 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=40 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/util/number/dtoa + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=44 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=32 + global.get $~lib/memory/__stack_pointer + i32.const 3248 + i32.store offset=36 + local.get $1 + i32.const 3248 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=24 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/util/number/dtoa + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=28 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=16 + global.get $~lib/memory/__stack_pointer + i32.const 3248 + i32.store offset=20 + local.get $1 + i32.const 3248 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=8 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/util/number/dtoa + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=12 + local.get $1 + local.get $0 + call $~lib/string/String.__concat + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 3280 + i32.store offset=4 + local.get $0 + i32.const 3280 + call $~lib/string/String.__concat + global.get $~lib/memory/__stack_pointer + i32.const -64 + i32.sub + global.set $~lib/memory/__stack_pointer + ) + (func $~lib/typedarray/Float64Array#constructor (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + local.get $0 + i32.eqz + if + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.const 5 + call $~lib/rt/itcms/__new + local.tee $0 + i32.store + end + global.get $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + local.get $0 + i32.eqz + if + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.const 2 + call $~lib/rt/itcms/__new + local.tee $0 + i32.store + end + local.get $0 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#set:buffer + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 134217727 + i32.gt_u + if + i32.const 1360 + i32.const 1408 + i32.const 18 + i32.const 57 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.const 3 + i32.shl + local.tee $2 + i32.const 0 + call $~lib/rt/itcms/__new + local.tee $1 + i32.store offset=4 + local.get $1 + local.get $2 + call $~lib/memory/memory.fill + local.get $0 + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#set:buffer + local.get $0 + local.get $1 + i32.store offset=4 + local.get $0 + local.get $2 + i32.store offset=8 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $~lib/typedarray/Float64Array#slice (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $3 + local.get $1 + i32.const 0 + i32.lt_s + if (result i32) + local.get $1 + local.get $3 + i32.add + local.tee $1 + i32.const 0 + local.get $1 + i32.const 0 + i32.gt_s + select + else + local.get $1 + local.get $3 + local.get $1 + local.get $3 + i32.lt_s + select + end + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 0 + local.get $2 + i32.const 0 + i32.lt_s + if (result i32) + local.get $2 + local.get $3 + i32.add + local.tee $2 + i32.const 0 + local.get $2 + i32.const 0 + i32.gt_s + select + else + local.get $2 + local.get $3 + local.get $2 + local.get $3 + i32.lt_s + select + end + local.get $1 + i32.sub + local.tee $2 + i32.const 0 + local.get $2 + i32.const 0 + i32.gt_s + select + local.tee $2 + call $~lib/typedarray/Float64Array#constructor + local.tee $3 + i32.store + local.get $3 + i32.load offset=4 + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + local.get $2 + i32.const 3 + i32.shl + call $~lib/memory/memory.copy + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $~lib/typedarray/Float64Array#subarray (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + local.get $0 + local.tee $3 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $4 + local.get $1 + i32.const 0 + i32.lt_s + if (result i32) + local.get $1 + local.get $4 + i32.add + local.tee $0 + i32.const 0 + local.get $0 + i32.const 0 + i32.gt_s + select + else + local.get $1 + local.get $4 + local.get $1 + local.get $4 + i32.lt_s + select + end + local.set $0 + local.get $2 + i32.const 0 + i32.lt_s + if (result i32) + local.get $2 + local.get $4 + i32.add + local.tee $1 + i32.const 0 + local.get $1 + i32.const 0 + i32.gt_s + select + else + local.get $2 + local.get $4 + local.get $2 + local.get $4 + i32.lt_s + select + end + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.const 5 + call $~lib/rt/itcms/__new + local.tee $1 + i32.store + local.get $1 + local.get $3 + i32.load + local.tee $4 + i32.store + local.get $1 + local.get $4 + i32.const 0 + call $~lib/rt/itcms/__link + local.get $1 + local.get $3 + i32.load offset=4 + local.get $0 + i32.const 3 + i32.shl + i32.add + i32.store offset=4 + local.get $1 + local.get $2 + local.get $0 + local.get $0 + local.get $2 + i32.lt_s + select + local.get $0 + i32.sub + i32.const 3 + i32.shl + i32.store offset=8 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $~lib/typedarray/Float64Array#map (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 f64) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $5 + local.get $0 + i32.load offset=4 + local.set $6 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.const 5 + call $~lib/rt/itcms/__new + local.tee $2 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $5 + i32.const 3 + i32.shl + local.tee $7 + i32.const 0 + call $~lib/rt/itcms/__new + local.tee $3 + i32.store offset=4 + loop $for-loop|0 + local.get $4 + local.get $5 + i32.lt_s + if + local.get $6 + local.get $4 + i32.const 3 + i32.shl + local.tee $8 + i32.add + f64.load + local.set $9 + i32.const 3 + global.set $~argumentsLength + local.get $3 + local.get $8 + i32.add + local.get $9 + local.get $4 + local.get $0 + local.get $1 + i32.load + call_indirect $0 (type $f64_i32_i32_=>_f64) + f64.store + local.get $4 + i32.const 1 + i32.add + local.set $4 + br $for-loop|0 + end + end + local.get $2 + local.get $3 + i32.store + local.get $2 + local.get $3 + i32.const 0 + call $~lib/rt/itcms/__link + local.get $2 + local.get $3 + i32.store offset=4 + local.get $2 + local.get $7 + i32.store offset=8 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $~lib/typedarray/Float64Array#filter (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 f64) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $4 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.const 5 + call $~lib/rt/itcms/__new + local.tee $5 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $4 + i32.const 3 + i32.shl + i32.const 0 + call $~lib/rt/itcms/__new + local.tee $3 + i32.store offset=4 + local.get $0 + i32.load offset=4 + local.set $6 + loop $for-loop|0 + local.get $4 + local.get $7 + i32.gt_s + if + local.get $6 + local.get $7 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $8 + i32.const 3 + global.set $~argumentsLength + local.get $8 + local.get $7 + local.get $0 + local.get $1 + i32.load + call_indirect $0 (type $f64_i32_i32_=>_i32) + if + local.get $3 + local.get $2 + i32.const 3 + i32.shl + i32.add + local.get $8 + f64.store + local.get $2 + i32.const 1 + i32.add + local.set $2 + end + local.get $7 + i32.const 1 + i32.add + local.set $7 + br $for-loop|0 + end + end + local.get $3 + local.set $0 + block $__inlined_func$~lib/rt/itcms/__renew + local.get $2 + i32.const 3 + i32.shl + local.tee $3 + local.tee $4 + local.get $0 + i32.const 20 + i32.sub + local.tee $6 + i32.load + i32.const -4 + i32.and + i32.const 16 + i32.sub + i32.le_u + if + local.get $6 + local.get $4 + i32.store offset=16 + br $__inlined_func$~lib/rt/itcms/__renew + end + local.get $4 + local.get $6 + i32.load offset=12 + call $~lib/rt/itcms/__new + local.tee $1 + local.get $0 + local.get $4 + local.get $6 + i32.load offset=16 + local.tee $0 + local.get $0 + local.get $4 + i32.gt_u + select + call $~lib/memory/memory.copy + local.get $1 + local.set $0 + end + local.get $5 + local.get $0 + i32.store + local.get $5 + local.get $0 + i32.const 0 + call $~lib/rt/itcms/__link + local.get $5 + local.get $3 + i32.store offset=8 + local.get $5 + local.get $0 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $5 + ) + (func $~lib/util/number/dtoa (param $0 f64) (result i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + local.get $0 + f64.const 0 + f64.eq + if + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + i32.const 1840 + return + end + local.get $0 + local.get $0 + f64.sub + f64.const 0 + f64.ne + if + local.get $0 + local.get $0 + f64.ne + if + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + i32.const 1872 + return + end + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + i32.const 1904 + i32.const 1952 + local.get $0 + f64.const 0 + f64.lt + select + return + end + i32.const 1984 + local.get $0 + call $~lib/util/number/dtoa_core + i32.const 1 + i32.shl + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.const 1 + call $~lib/rt/itcms/__new + local.tee $2 + i32.store + local.get $2 + i32.const 1984 + local.get $1 + call $~lib/memory/memory.copy + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $~lib/string/String#substring (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + i32.const 0 + local.get $0 + i32.const 20 + i32.sub + i32.load offset=16 + i32.const 1 + i32.shr_u + local.tee $2 + local.get $2 + i32.const 0 + i32.gt_s + select + local.tee $3 + local.get $1 + i32.const 0 + local.get $1 + i32.const 0 + i32.gt_s + select + local.tee $1 + local.get $2 + local.get $1 + local.get $2 + i32.lt_s + select + local.tee $1 + local.get $1 + local.get $3 + i32.lt_s + select + i32.const 1 + i32.shl + local.tee $4 + local.get $3 + local.get $1 + local.get $1 + local.get $3 + i32.gt_s + select + i32.const 1 + i32.shl + local.tee $1 + i32.sub + local.tee $3 + i32.eqz + if + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + i32.const 1808 + return + end + i32.const 0 + local.get $4 + local.get $2 + i32.const 1 + i32.shl + i32.eq + local.get $1 + select + if + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + return + end + global.get $~lib/memory/__stack_pointer + local.get $3 + i32.const 1 + call $~lib/rt/itcms/__new + local.tee $2 + i32.store + local.get $2 + local.get $0 + local.get $1 + i32.add + local.get $3 + call $~lib/memory/memory.copy + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $~lib/util/string/joinFloatArray (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + local.get $1 + i32.const 1 + i32.sub + local.tee $4 + i32.const 0 + i32.lt_s + if + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + i32.const 1808 + return + end + block $folding-inner0 + local.get $4 + i32.eqz + if + local.get $0 + f64.load + call $~lib/util/number/dtoa + local.set $0 + br $folding-inner0 + end + global.get $~lib/memory/__stack_pointer + local.get $4 + local.get $2 + i32.const 20 + i32.sub + i32.load offset=16 + i32.const 1 + i32.shr_u + local.tee $5 + i32.const 28 + i32.add + i32.mul + i32.const 28 + i32.add + local.tee $7 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/itcms/__new + local.tee $1 + i32.store + loop $for-loop|0 + local.get $4 + local.get $6 + i32.gt_s + if + local.get $1 + local.get $3 + i32.const 1 + i32.shl + i32.add + local.get $0 + local.get $6 + i32.const 3 + i32.shl + i32.add + f64.load + call $~lib/util/number/dtoa_buffered + local.get $3 + i32.add + local.set $3 + local.get $5 + if + local.get $1 + local.get $3 + i32.const 1 + i32.shl + i32.add + local.get $2 + local.get $5 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $3 + local.get $5 + i32.add + local.set $3 + end + local.get $6 + i32.const 1 + i32.add + local.set $6 + br $for-loop|0 + end + end + local.get $7 + local.get $1 + local.get $3 + i32.const 1 + i32.shl + i32.add + local.get $0 + local.get $4 + i32.const 3 + i32.shl + i32.add + f64.load + call $~lib/util/number/dtoa_buffered + local.get $3 + i32.add + local.tee $0 + i32.gt_s + if + local.get $1 + local.get $0 + call $~lib/string/String#substring + local.set $0 + br $folding-inner0 + end + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + return + end + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $assembly/mat2/mat2#constructor (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + local.get $0 + i32.eqz + if + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.const 4 + call $~lib/rt/itcms/__new + local.tee $0 + i32.store + end + global.get $~lib/memory/__stack_pointer + local.get $0 + local.get $1 + call $~lib/typedarray/Float64Array#constructor + local.tee $0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $assembly/mat2/create (result i32) + (local $0 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.const 4 + call $assembly/mat2/mat2#constructor + local.tee $0 + i32.store + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 0 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $assembly/mat2/fromValues (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) + (local $4 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.const 4 + call $assembly/mat2/mat2#constructor + local.tee $4 + i32.store + local.get $4 + i32.const 0 + local.get $0 + call $~lib/typedarray/Float64Array#__set + local.get $4 + i32.const 1 + local.get $1 + call $~lib/typedarray/Float64Array#__set + local.get $4 + i32.const 2 + local.get $2 + call $~lib/typedarray/Float64Array#__set + local.get $4 + i32.const 3 + local.get $3 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $4 + ) + (func $assembly/mat2/LDU (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 i32) + (local $5 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + local.get $0 + i32.const 2 + local.get $3 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $3 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $2 + i32.const 0 + local.get $3 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $2 + i32.const 1 + local.get $3 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $2 + i32.const 3 + local.get $3 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.const 0 + call $~lib/rt/itcms/__new + local.tee $4 + i32.store + i32.const 16 + i32.const 9 + call $~lib/rt/itcms/__new + local.tee $3 + local.get $4 + i32.store + local.get $3 + local.get $4 + i32.const 0 + call $~lib/rt/itcms/__link + local.get $3 + local.get $4 + i32.store offset=4 + local.get $3 + i32.const 12 + i32.store offset=8 + local.get $3 + i32.const 3 + i32.store offset=12 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $3 + i32.load offset=4 + i32.store offset=4 + local.get $3 + i32.const 0 + local.get $0 + call $~lib/array/Array#__uset + local.get $3 + i32.const 1 + local.get $1 + call $~lib/array/Array#__uset + local.get $3 + i32.const 2 + local.get $2 + call $~lib/array/Array#__uset + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:~lib/arraybuffer/ArrayBufferView#get:buffer (param $0 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + i32.load + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:~lib/arraybuffer/ArrayBufferView#get:dataStart (param $0 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + i32.load offset=4 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:~lib/arraybuffer/ArrayBufferView#get:byteLength (param $0 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + i32.load offset=8 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:~lib/arraybuffer/ArrayBufferView#get:byteOffset (param $0 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + i32.load offset=4 + local.get $0 + i32.load + i32.sub + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat2/ReadonlyVec2#constructor (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + local.get $0 + i32.eqz + if + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.const 8 + call $~lib/rt/itcms/__new + local.tee $0 + i32.store + end + global.get $~lib/memory/__stack_pointer + local.get $0 + local.get $1 + call $~lib/typedarray/Float64Array#constructor + local.tee $0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:~lib/typedarray/Float64Array#get:length (param $0 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:~lib/typedarray/Float64Array#at (param $0 i32) (param $1 i32) (result f64) + (local $2 i32) + (local $3 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $1 + i32.const 0 + local.get $0 + local.tee $2 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.tee $0 + local.get $1 + i32.const 0 + i32.ge_s + select + i32.add + local.set $1 + local.get $0 + local.get $1 + i32.le_u + if + i32.const 1168 + i32.const 1232 + i32.const 1397 + i32.const 33 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + f64.load + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:~lib/typedarray/Float64Array#includes@varargs (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (local $3 i32) + (local $4 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + i32.const 1 + i32.sub + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + i32.const 0 + local.set $2 + end + block $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) + i32.const 0 + local.get $2 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.tee $3 + i32.ge_s + i32.const 1 + local.get $3 + select + br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 + drop + local.get $2 + i32.const 0 + i32.lt_s + if + local.get $2 + local.get $3 + i32.add + local.tee $2 + i32.const 0 + local.get $2 + i32.const 0 + i32.gt_s + select + local.set $2 + end + local.get $0 + i32.load offset=4 + local.set $0 + loop $while-continue|0 + local.get $2 + local.get $3 + i32.lt_s + if + i32.const 1 + i32.const 1 + local.get $0 + local.get $2 + i32.const 3 + i32.shl + i32.add + f64.load + local.tee $4 + local.get $4 + f64.ne + local.get $1 + local.get $1 + f64.ne + i32.and + local.get $1 + local.get $4 + f64.eq + select + br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 + drop + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $while-continue|0 + end + end + i32.const 0 + end + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:~lib/typedarray/Float64Array#indexOf@varargs (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + i32.const 1 + i32.sub + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + i32.const 0 + local.set $2 + end + i32.const -1 + local.set $3 + block $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 + local.get $2 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.tee $4 + i32.ge_s + i32.const 1 + local.get $4 + select + br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 + local.get $2 + i32.const 0 + i32.lt_s + if + local.get $2 + local.get $4 + i32.add + local.tee $2 + i32.const 0 + local.get $2 + i32.const 0 + i32.gt_s + select + local.set $2 + end + local.get $0 + i32.load offset=4 + local.set $0 + loop $while-continue|0 + local.get $2 + local.get $4 + i32.lt_s + if + local.get $1 + local.get $0 + local.get $2 + local.tee $3 + i32.const 3 + i32.shl + i32.add + f64.load + f64.eq + br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 + local.get $3 + i32.const 1 + i32.add + local.set $2 + br $while-continue|0 + end + end + i32.const -1 + local.set $3 + end + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:~lib/typedarray/Float64Array#lastIndexOf@varargs (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + i32.const 1 + i32.sub + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $2 + end + local.get $0 + local.set $3 + i32.const -1 + local.set $0 + block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 + local.get $3 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.tee $4 + i32.eqz + br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 + local.get $2 + local.get $4 + i32.add + local.get $4 + i32.const 1 + i32.sub + local.get $2 + local.get $2 + local.get $4 + i32.ge_s + select + local.get $2 + i32.const 0 + i32.lt_s + select + local.set $0 + local.get $3 + i32.load offset=4 + local.set $2 + loop $while-continue|0 + local.get $0 + i32.const 0 + i32.ge_s + if + local.get $1 + local.get $2 + local.get $0 + i32.const 3 + i32.shl + i32.add + f64.load + f64.eq + br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 + local.get $0 + i32.const 1 + i32.sub + local.set $0 + br $while-continue|0 + end + end + i32.const -1 + local.set $0 + end + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:~lib/typedarray/Float64Array#fill@varargs (param $0 i32) (param $1 f64) (param $2 i32) (param $3 i32) (result i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + block $2of2 + block $1of2 + block $0of2 + block $outOfRange + global.get $~argumentsLength + i32.const 1 + i32.sub + br_table $0of2 $1of2 $2of2 $outOfRange + end + unreachable + end + i32.const 0 + local.set $2 + end + i32.const 2147483647 + local.set $3 + end + local.get $0 + local.tee $4 + i32.load offset=4 + local.set $6 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $5 + local.get $2 + i32.const 0 + i32.lt_s + if (result i32) + local.get $2 + local.get $5 + i32.add + local.tee $0 + i32.const 0 + local.get $0 + i32.const 0 + i32.gt_s + select + else + local.get $2 + local.get $5 + local.get $2 + local.get $5 + i32.lt_s + select + end + local.set $0 + local.get $3 + i32.const 0 + i32.lt_s + if (result i32) + local.get $3 + local.get $5 + i32.add + local.tee $2 + i32.const 0 + local.get $2 + i32.const 0 + i32.gt_s + select + else + local.get $3 + local.get $5 + local.get $3 + local.get $5 + i32.lt_s + select + end + local.set $2 + loop $for-loop|0 + local.get $0 + local.get $2 + i32.lt_s + if + local.get $6 + local.get $0 + i32.const 3 + i32.shl + i32.add + local.get $1 + f64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $4 + ) + (func $export:~lib/typedarray/Float64Array#sort@varargs (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + i32.const 3312 + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 3312 + i32.store + end + local.get $0 + local.get $1 + call $~lib/typedarray/Float64Array#sort + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:~lib/typedarray/Float64Array#slice@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + block $2of2 + block $1of2 + block $0of2 + block $outOfRange + global.get $~argumentsLength + br_table $0of2 $1of2 $2of2 $outOfRange + end + unreachable + end + i32.const 0 + local.set $1 + end + i32.const 2147483647 + local.set $2 + end + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/Float64Array#slice + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:~lib/typedarray/Float64Array#subarray@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + block $2of2 + block $1of2 + block $0of2 + block $outOfRange + global.get $~argumentsLength + br_table $0of2 $1of2 $2of2 $outOfRange + end + unreachable + end + i32.const 0 + local.set $1 + end + i32.const 2147483647 + local.set $2 + end + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/Float64Array#subarray + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:~lib/typedarray/Float64Array#copyWithin@varargs (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + i32.const 2 + i32.sub + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + i32.const 2147483647 + local.set $3 + end + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $~lib/typedarray/Float64Array#copyWithin + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:~lib/typedarray/Float64Array#map (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $~lib/typedarray/Float64Array#map + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:~lib/typedarray/Float64Array#filter (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $~lib/typedarray/Float64Array#filter + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:~lib/typedarray/Float64Array#findIndex (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 f64) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $4 + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float64Array,f64>|inlined.0 + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s + if + local.get $3 + local.get $2 + i32.const 3 + i32.shl + i32.add + f64.load + i32.const 3 + global.set $~argumentsLength + local.get $2 + local.get $0 + local.get $1 + i32.load + call_indirect $0 (type $f64_i32_i32_=>_i32) + br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float64Array,f64>|inlined.0 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + i32.const -1 + local.set $2 + end + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:~lib/typedarray/Float64Array#some (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 f64) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + block $~lib/typedarray/SOME<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) + local.get $0 + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $4 + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s + if + local.get $3 + local.get $2 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $5 + i32.const 3 + global.set $~argumentsLength + i32.const 1 + local.get $5 + local.get $2 + local.get $0 + local.get $1 + i32.load + call_indirect $0 (type $f64_i32_i32_=>_i32) + br_if $~lib/typedarray/SOME<~lib/typedarray/Float64Array,f64>|inlined.0 + drop + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + i32.const 0 + end + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:~lib/typedarray/Float64Array#every (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 f64) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + block $~lib/typedarray/EVERY<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) + local.get $0 + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $4 + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s + if + local.get $3 + local.get $2 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $5 + i32.const 3 + global.set $~argumentsLength + i32.const 0 + local.get $5 + local.get $2 + local.get $0 + local.get $1 + i32.load + call_indirect $0 (type $f64_i32_i32_=>_i32) + i32.eqz + br_if $~lib/typedarray/EVERY<~lib/typedarray/Float64Array,f64>|inlined.0 + drop + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + i32.const 1 + end + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:~lib/typedarray/Float64Array#forEach (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 f64) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $4 + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s + if + local.get $3 + local.get $2 + i32.const 3 + i32.shl + i32.add + f64.load + i32.const 3 + global.set $~argumentsLength + local.get $2 + local.get $0 + local.get $1 + i32.load + call_indirect $0 (type $f64_i32_i32_=>_none) + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:~lib/typedarray/Float64Array#reverse (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + i32.load offset=4 + local.set $4 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.const 1 + i32.sub + local.set $2 + loop $for-loop|0 + local.get $1 + local.get $2 + i32.lt_u + if + local.get $4 + local.get $1 + i32.const 3 + i32.shl + i32.add + local.tee $3 + f64.load + local.set $5 + local.get $3 + local.get $4 + local.get $2 + i32.const 3 + i32.shl + i32.add + local.tee $3 + f64.load + f64.store + local.get $3 + local.get $5 + f64.store + local.get $1 + i32.const 1 + i32.add + local.set $1 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $for-loop|0 + end + end + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:~lib/typedarray/Float64Array#join@varargs (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + i32.const 2976 + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 2976 + i32.store + end + local.get $0 + local.get $1 + call $~lib/typedarray/Float64Array#join + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:~lib/typedarray/Float64Array#toString (param $0 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 2976 + i32.store + local.get $0 + i32.const 2976 + call $~lib/typedarray/Float64Array#join + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat2/mat2#constructor (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + local.get $1 + call $assembly/mat2/mat2#constructor + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat2/ReadonlyMat2#constructor (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + local.get $0 + i32.eqz + if + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.const 6 + call $~lib/rt/itcms/__new + local.tee $0 + i32.store + end + global.get $~lib/memory/__stack_pointer + local.get $0 + local.get $1 + call $assembly/mat2/mat2#constructor + local.tee $0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat2/clone (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.const 4 + call $assembly/mat2/mat2#constructor + local.tee $1 + i32.store + local.get $1 + i32.const 0 + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 1 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 2 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 3 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $export:assembly/mat2/copy (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat2/identity (param $0 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + i32.const 0 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat2/set (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + i32.const 0 + local.get $1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $2 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $3 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $4 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat2/transpose (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + i32.eq + if + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $0 + i32.const 1 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $2 + call $~lib/typedarray/Float64Array#__set + else + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + end + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat2/invert (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $5 + block $__inlined_func$assembly/mat2/invert + local.get $3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.tee $2 + f64.mul + local.get $5 + local.get $4 + f64.mul + f64.sub + local.tee $6 + i64.reinterpret_f64 + i64.const 1 + i64.shl + i64.const 2 + i64.sub + i64.const -9007199254740994 + i64.gt_u + if + i32.const 0 + local.set $0 + br $__inlined_func$assembly/mat2/invert + end + local.get $0 + i32.const 0 + local.get $2 + f64.const 1 + local.get $6 + f64.div + local.tee $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $4 + f64.neg + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $5 + f64.neg + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $3 + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + end + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat2/adjoint (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $0 + i32.const 0 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $2 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat2/determinant (param $0 i32) (result f64) + (local $1 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.mul + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.sub + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat2/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/mat2/multiply + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat2/rotate (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $2 + call $~lib/math/NativeMath.sin + local.set $3 + local.get $0 + i32.const 0 + local.get $4 + local.get $2 + call $~lib/math/NativeMath.cos + local.tee $2 + f64.mul + local.get $6 + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $5 + local.get $2 + f64.mul + local.get $7 + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $4 + local.get $3 + f64.neg + f64.mul + local.get $6 + local.get $2 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $5 + local.get $3 + f64.neg + f64.mul + local.get $7 + local.get $2 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat2/scale (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $0 + i32.const 0 + local.get $5 + local.get $3 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $6 + local.get $3 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $7 + local.get $4 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $8 + local.get $4 + f64.mul + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat2/fromRotation (param $0 i32) (param $1 f64) (result i32) + (local $2 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $1 + call $~lib/math/NativeMath.sin + local.set $2 + local.get $0 + i32.const 0 + local.get $1 + call $~lib/math/NativeMath.cos + local.tee $1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $2 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $2 + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat2/fromScaling (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat2/str (param $0 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/mat2/str + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat2/frob (param $0 i32) (result f64) + (local $1 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $assembly/imports/MathUtil.hypot + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat2/LDU (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 16 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + global.get $~lib/memory/__stack_pointer + local.get $3 + i32.store offset=12 + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $assembly/mat2/LDU + global.get $~lib/memory/__stack_pointer + i32.const 16 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat2/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat2/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/mat2/subtract + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat2/exactEquals (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.eq + if (result i32) + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat2/equals (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat2/equals + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat2/multiplyScalar (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat2/multiplyScalarAndAdd (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 ) ) diff --git a/package.json b/package.json index f88f053a..54a81875 100644 --- a/package.json +++ b/package.json @@ -36,8 +36,8 @@ "build-dts": "tsc --allowJs --declaration --emitDeclarationOnly --module amd --outFile ./dist/index.d.ts ./src/index.js ./src/types.d.ts && node ./utils/bundle-dts.js && tsc --noEmit ./dist/index.d.ts", "build": "del dist && npm run update-license-version && npm run build-umd && npm run build-esm && npm run build-cjs && npm run build-dts && node ./utils/build.js", "prepare": "npm run build", - "asbuild:untouched": "asc assembly/index.ts --target debug", - "asbuild:optimized": "asc assembly/index.ts --target release", + "asbuild:untouched": "asc assembly/index.as.ts --target debug", + "asbuild:optimized": "asc assembly/index.as.ts --target release", "asbuild": "npm run asbuild:untouched && npm run asbuild:optimized" }, "devDependencies": { From 758766d27e38b9c8b6386cb787ca21515dea6617 Mon Sep 17 00:00:00 2001 From: Huguenin-Elie Steve Date: Sat, 27 Mar 2021 09:44:05 +0100 Subject: [PATCH 04/32] update gitignore - yarn --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 2002d3c1..7ad93499 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ tmp node_modules npm-debug.log package-lock.json +yarn.lock dist !dist/gl-matrix.js !dist/gl-matrix.min.js From 22391431a595159bc061f78d2a3a8c1d98e20bb7 Mon Sep 17 00:00:00 2001 From: Huguenin-Elie Steve Date: Sat, 27 Mar 2021 12:42:26 +0100 Subject: [PATCH 05/32] configuration for compilation of AS into JS --- assembly/index.ts | 16 ++++++++----- assembly/quat.ts | 18 +++++++-------- assembly/vec2.ts | 58 +++++++++++++++++++++++------------------------ assembly/vec3.ts | 6 ++--- assembly/vec4.ts | 6 ++--- package.json | 9 ++++---- 6 files changed, 59 insertions(+), 54 deletions(-) diff --git a/assembly/index.ts b/assembly/index.ts index 25733b3a..78f259b1 100644 --- a/assembly/index.ts +++ b/assembly/index.ts @@ -1,10 +1,14 @@ import "assemblyscript/std/portable"; -import { - glMatrix, - mat2, mat2d, mat3, mat4, - quat, quat2, - vec2, vec3, vec4, -} from "./index.as"; +import * as glMatrix from "./common"; +import * as mat2 from "./mat2"; +import * as mat2d from "./mat2d"; +import * as mat3 from "./mat3"; +import * as mat4 from "./mat4"; +import * as quat from "./quat"; +import * as quat2 from "./quat2"; +import * as vec2 from "./vec2"; +import * as vec3 from "./vec3"; +import * as vec4 from "./vec4"; export { glMatrix, diff --git a/assembly/quat.ts b/assembly/quat.ts index e7b49ec5..0bbca465 100644 --- a/assembly/quat.ts +++ b/assembly/quat.ts @@ -704,8 +704,7 @@ export function equals(a: ReadonlyQuat, b: ReadonlyQuat): bool { * @param {ReadonlyVec3} b the destination vector * @returns {quat} out */ -// @ts-ignore -export const rotationTo: () => (out: quat, a: ReadonlyQuat, b: ReadonlyQuat) => quat = (() => { +export function rotationTo(): (out: quat, a: ReadonlyQuat, b: ReadonlyQuat) => quat { let tmpvec3 = vec3.create(); let xUnitVec3 = vec3.fromValues(1, 0, 0); let yUnitVec3 = vec3.fromValues(0, 1, 0); @@ -733,7 +732,8 @@ export const rotationTo: () => (out: quat, a: ReadonlyQuat, b: ReadonlyQuat) => return normalize(out, out); } }; -})(); +} +rotationTo(); /** * Performs a spherical linear interpolation with two control points @@ -746,8 +746,7 @@ export const rotationTo: () => (out: quat, a: ReadonlyQuat, b: ReadonlyQuat) => * @param {Number} t interpolation amount, in the range [0-1], between the two inputs * @returns {quat} out */ -// @ts-ignore -export const sqlerp: () => (out: quat, a: ReadonlyQuat, b: ReadonlyQuat, c: ReadonlyQuat, d: ReadonlyQuat, t: f64) => quat = (() => { +export function sqlerp(): (out: quat, a: ReadonlyQuat, b: ReadonlyQuat, c: ReadonlyQuat, d: ReadonlyQuat, t: f64) => quat { let temp1 = create(); let temp2 = create(); @@ -758,7 +757,8 @@ export const sqlerp: () => (out: quat, a: ReadonlyQuat, b: ReadonlyQuat, c: Read return out; }; -})(); +} +sqlerp(); /** * Sets the specified quaternion with values corresponding to the given @@ -771,8 +771,7 @@ export const sqlerp: () => (out: quat, a: ReadonlyQuat, b: ReadonlyQuat, c: Read * @param {ReadonlyVec3} up the vector representing the local "up" direction * @returns {quat} out */ -// @ts-ignore -export const setAxes: () => (out: quat, view: vec3.ReadonlyVec3, right: vec3.ReadonlyVec3, up: vec3.ReadonlyVec3) => quat = (() => { +export function setAxes(): (out: quat, view: vec3.ReadonlyVec3, right: vec3.ReadonlyVec3, up: vec3.ReadonlyVec3) => quat { let matr = mat3.create(); return function (out: quat, view: vec3.ReadonlyVec3, right: vec3.ReadonlyVec3, up: vec3.ReadonlyVec3) { @@ -790,4 +789,5 @@ export const setAxes: () => (out: quat, view: vec3.ReadonlyVec3, right: vec3.Rea return normalize(out, fromMat3(out, matr)); }; -})(); +} +setAxes(); diff --git a/assembly/vec2.ts b/assembly/vec2.ts index 70493318..fa676943 100644 --- a/assembly/vec2.ts +++ b/assembly/vec2.ts @@ -604,33 +604,33 @@ export const sqrLen = squaredLength; * @returns {Array} a * @function */ -// @ts-ignore -export const forEach: () => (a: vec2, stride: u16, offset: u16, count: u16, fn: (a: vec2, b: vec2, arg: IArguments) => void, arg: IArguments) => vec2 = (() => { - let vec = create(); - return function(a: vec2, stride: u16, offset: u16, count: u16, fn: (a: vec2, b: vec2, arg: IArguments) => void, arg: IArguments) { - let i: u16, l: u16; - if (!stride) { - stride = 2; - } - - if (!offset) { - offset = 0; - } - - if (count) { - l = Math.min(count * stride + offset, a.length); - } else { - l = a.length; - } - - for (i = offset; i < l; i += stride) { - vec[0] = a[i]; - vec[1] = a[i + 1]; - fn(vec, vec, arg); - a[i] = vec[0]; - a[i + 1] = vec[1]; - } - - return a; +export function forEach(): (a: vec2, stride: u16, offset: u16, count: u16, fn: (a: vec2, b: vec2, arg: IArguments) => void, arg: IArguments) => vec2 { + let vec = create(); + return function (a: vec2, stride: u16, offset: u16, count: u16, fn: (a: vec2, b: vec2, arg: IArguments) => void, arg: IArguments) { + let i: u16, l: u16; + if (!stride) { + stride = 2; } - })(); + + if (!offset) { + offset = 0; + } + + if (count) { + l = Math.min(count * stride + offset, a.length); + } else { + l = a.length; + } + + for (i = offset; i < l; i += stride) { + vec[0] = a[i]; + vec[1] = a[i + 1]; + fn(vec, vec, arg); + a[i] = vec[0]; + a[i + 1] = vec[1]; + } + + return a; + }; +} +forEach(); diff --git a/assembly/vec3.ts b/assembly/vec3.ts index 8e9d37ab..a4e6f710 100644 --- a/assembly/vec3.ts +++ b/assembly/vec3.ts @@ -802,8 +802,7 @@ export const sqrLen = squaredLength; * @returns {Array} a * @function */ -// @ts-ignore -export const forEach: () => (a: vec3, stride: u16, offset: u16, count: u16, fn: (a: vec3, b: vec3, arg: IArguments) => void, arg: IArguments) => vec3 = (() => { +export function forEach(): (a: vec3, stride: u16, offset: u16, count: u16, fn: (a: vec3, b: vec3, arg: IArguments) => void, arg: IArguments) => vec3 { let vec = create(); return function(a: vec3, stride: u16, offset: u16, count: u16, fn: (a: vec3, b: vec3, arg: IArguments) => void, arg: IArguments) { @@ -834,4 +833,5 @@ export const forEach: () => (a: vec3, stride: u16, offset: u16, count: u16, fn: return a; }; -})(); +} +forEach(); diff --git a/assembly/vec4.ts b/assembly/vec4.ts index 50a6589f..9240d547 100644 --- a/assembly/vec4.ts +++ b/assembly/vec4.ts @@ -641,8 +641,7 @@ export const sqrLen = squaredLength; * @returns {Array} a * @function */ -// @ts-ignore -export const forEach: () => (a: vec4, stride: u16, offset: u16, count: u16, fn: (a: vec4, b: vec4, arg: IArguments) => void, arg: IArguments) => vec4 = (() => { +export function forEach(): (a: vec4, stride: u16, offset: u16, count: u16, fn: (a: vec4, b: vec4, arg: IArguments) => void, arg: IArguments) => vec4 { let vec = create(); return function(a: vec4, stride: u16, offset: u16, count: u16, fn: (a: vec4, b: vec4, arg: IArguments) => void, arg: IArguments) { @@ -675,4 +674,5 @@ export const forEach: () => (a: vec4, stride: u16, offset: u16, count: u16, fn: return a; }; -})(); +} +forEach(); diff --git a/package.json b/package.json index 54a81875..eba37f36 100644 --- a/package.json +++ b/package.json @@ -30,11 +30,12 @@ "test": "mocha --require @babel/register --recursive spec", "doc": "jsdoc -c jsdoc.config.json", "update-license-version": "node utils/update-license-version.js", + "build-js": "tsc --outDir ./js ./assembly/index.ts", "build-umd": "rollup -c", - "build-esm": "cross-env BABEL_ENV=esm babel src -d dist/esm", - "build-cjs": "babel src -d dist/cjs", - "build-dts": "tsc --allowJs --declaration --emitDeclarationOnly --module amd --outFile ./dist/index.d.ts ./src/index.js ./src/types.d.ts && node ./utils/bundle-dts.js && tsc --noEmit ./dist/index.d.ts", - "build": "del dist && npm run update-license-version && npm run build-umd && npm run build-esm && npm run build-cjs && npm run build-dts && node ./utils/build.js", + "build-esm": "cross-env BABEL_ENV=esm babel js -d dist/esm", + "build-cjs": "babel js -d dist/cjs", + "build-dts": "tsc --allowJs --declaration --emitDeclarationOnly --outFile ./dist/index.d.ts ./js/index.js ./js/types.d.ts && node ./utils/bundle-dts.js && tsc --noEmit ./dist/index.d.ts", + "build": "del dist && npm run update-license-version && npm run build-js && npm run build-umd && npm run build-esm && npm run build-cjs && npm run build-dts && node ./utils/build.js", "prepare": "npm run build", "asbuild:untouched": "asc assembly/index.as.ts --target debug", "asbuild:optimized": "asc assembly/index.as.ts --target release", From b61761e3de9e1c9e282652486d48b77eea178abe Mon Sep 17 00:00:00 2001 From: Huguenin-Elie Steve Date: Sat, 27 Mar 2021 14:55:51 +0100 Subject: [PATCH 06/32] add source types declarations for build --- js/.gitignore | 1 + js/types.d.ts | 94 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 95 insertions(+) create mode 100644 js/.gitignore create mode 100644 js/types.d.ts diff --git a/js/.gitignore b/js/.gitignore new file mode 100644 index 00000000..a6c7c285 --- /dev/null +++ b/js/.gitignore @@ -0,0 +1 @@ +*.js diff --git a/js/types.d.ts b/js/types.d.ts new file mode 100644 index 00000000..58237b88 --- /dev/null +++ b/js/types.d.ts @@ -0,0 +1,94 @@ +interface IndexedCollection extends Iterable { + readonly length: number; + [index: number]: number; +} + +// prettier-ignore +declare type mat2 = + | [number, number, + number, number] + | IndexedCollection; + +// prettier-ignore +declare type mat2d = + | [number, number, + number, number, + number, number] + | IndexedCollection; + +// prettier-ignore +declare type mat3 = + | [number, number, number, + number, number, number, + number, number, number] + | IndexedCollection; + +// prettier-ignore +declare type mat4 = + | [number, number, number, number, + number, number, number, number, + number, number, number, number, + number, number, number, number] + | IndexedCollection; + +declare type quat = [number, number, number, number] | IndexedCollection; + +// prettier-ignore +declare type quat2 = + | [number, number, number, number, + number, number, number, number] + | IndexedCollection; + +declare type vec2 = [number, number] | IndexedCollection; +declare type vec3 = [number, number, number] | IndexedCollection; +declare type vec4 = [number, number, number, number] | IndexedCollection; + +// prettier-ignore +declare type ReadonlyMat2 = + | readonly [ + number, number, + number, number + ] + | IndexedCollection; + +// prettier-ignore +declare type ReadonlyMat2d = + | readonly [ + number, number, + number, number, + number, number + ] + | IndexedCollection; + +// prettier-ignore +declare type ReadonlyMat3 = + | readonly [ + number, number, number, + number, number, number, + number, number, number + ] + | IndexedCollection; + +// prettier-ignore +declare type ReadonlyMat4 = + | readonly [ + number, number, number, number, + number, number, number, number, + number, number, number, number, + number, number, number, number + ] + | IndexedCollection; + +declare type ReadonlyQuat = + | readonly [number, number, number, number] + | IndexedCollection; + +declare type ReadonlyQuat2 = + | readonly [number, number, number, number, number, number, number, number] + | IndexedCollection; + +declare type ReadonlyVec2 = readonly [number, number] | IndexedCollection; +declare type ReadonlyVec3 = readonly [number, number, number] | IndexedCollection; +declare type ReadonlyVec4 = + | readonly [number, number, number, number] + | IndexedCollection; From 4276d9cee8925a656f3982d4682d9556fefeffb5 Mon Sep 17 00:00:00 2001 From: Huguenin-Elie Steve Date: Sun, 28 Mar 2021 01:40:07 +0100 Subject: [PATCH 07/32] fix required explicit toString conversion --- assembly/vec3.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assembly/vec3.ts b/assembly/vec3.ts index a4e6f710..9639c221 100644 --- a/assembly/vec3.ts +++ b/assembly/vec3.ts @@ -710,7 +710,7 @@ export function zero(out: vec3): vec3 { * @returns {String} string representation of the vector */ export function str(a: ReadonlyVec3): string { - return "vec3(" + a[0] + ", " + a[1] + ", " + a[2] + ")"; + return "vec3(" + a[0].toString() + ", " + a[1].toString() + ", " + a[2].toString() + ")"; } /** From fd1907b82e6d50d9b4e4d4c1bb3dc260322812a1 Mon Sep 17 00:00:00 2001 From: Huguenin-Elie Steve Date: Sun, 28 Mar 2021 03:06:02 +0200 Subject: [PATCH 08/32] fix module typings --- assembly/common.ts | 2 +- assembly/imports.ts | 9 +++++ assembly/mat2.ts | 12 +++---- assembly/mat2d.ts | 12 +++---- assembly/mat3.ts | 14 ++++---- assembly/mat4.ts | 22 ++++++------ assembly/quat.ts | 84 +++++++++++++++++++-------------------------- assembly/quat2.ts | 16 ++++----- assembly/vec2.ts | 20 +++++------ assembly/vec3.ts | 20 +++++------ assembly/vec4.ts | 20 +++++------ 11 files changed, 113 insertions(+), 118 deletions(-) diff --git a/assembly/common.ts b/assembly/common.ts index 67bc9df8..b1457693 100644 --- a/assembly/common.ts +++ b/assembly/common.ts @@ -7,7 +7,7 @@ import { MathUtil } from "./imports" // Configuration Constants export const EPSILON = 0.000001; -// export let ARRAY_TYPE = f64 +export type ARRAY_TYPE = Float64Array export let RANDOM = Math.random; export let ANGLE_ORDER = "zyx"; diff --git a/assembly/imports.ts b/assembly/imports.ts index 5ef7dc91..478d8e01 100644 --- a/assembly/imports.ts +++ b/assembly/imports.ts @@ -5,6 +5,10 @@ // prettier-ignore export declare namespace MathUtil { + // @ts-ignore decorator + @external("Math", "min") + function min(a: i32, b: i32, c?: i32): i32; + // @ts-ignore decorator @external("Math", "max") function max(a: f64, b: f64, c?: f64): f64; @@ -13,3 +17,8 @@ export declare namespace MathUtil { @external("Math", "hypot") function hypot(a: f64, b: f64, c?: f64, d?: f64, e?: f64, f?: f64, g?: f64, h?: f64, i?: f64, j?: f64, k?: f64, l?: f64, m?: f64, n?: f64, o?: f64, p?: f64): f64; } + +export interface IArguments { +} + +export type IndexedCollection = Float64Array; diff --git a/assembly/mat2.ts b/assembly/mat2.ts index 438ad709..3b8a30b9 100644 --- a/assembly/mat2.ts +++ b/assembly/mat2.ts @@ -1,10 +1,10 @@ import * as glMatrix from "./common"; -import { MathUtil } from "./imports"; +import { IndexedCollection, MathUtil } from "./imports"; import { ReadonlyVec2 } from "./vec2"; -export class mat2 extends Float64Array {} +export type mat2 = IndexedCollection; -export class ReadonlyMat2 extends mat2 {} +export type ReadonlyMat2 = IndexedCollection; /** * 2x2 Matrix @@ -17,7 +17,7 @@ export class ReadonlyMat2 extends mat2 {} * @returns {mat2} a new 2x2 matrix */ export function create(): mat2 { - let out: mat2 = new mat2(4); + let out: mat2 = changetype(new Float64Array(4)); //if (glMatrix.ARRAY_TYPE != Float32Array) { out[1] = 0; out[2] = 0; @@ -34,7 +34,7 @@ export function create(): mat2 { * @returns {mat2} a new 2x2 matrix */ export function clone(a: ReadonlyMat2): mat2 { - let out: mat2 = new mat2(4); + let out: mat2 = changetype(new Float64Array(4)); out[0] = a[0]; out[1] = a[1]; out[2] = a[2]; @@ -81,7 +81,7 @@ export function identity(out: mat2): mat2 { * @returns {mat2} out A new 2x2 matrix */ export function fromValues(m00: f64, m01: f64, m10: f64, m11: f64): mat2 { - let out: mat2 = new mat2(4); + let out: mat2 = changetype(new Float64Array(4)); out[0] = m00; out[1] = m01; out[2] = m10; diff --git a/assembly/mat2d.ts b/assembly/mat2d.ts index e1bb1598..0651398d 100644 --- a/assembly/mat2d.ts +++ b/assembly/mat2d.ts @@ -1,10 +1,10 @@ import * as glMatrix from "./common"; -import { MathUtil } from "./imports"; +import { IndexedCollection, MathUtil } from "./imports"; import { ReadonlyVec2 } from "./vec2"; -export class mat2d extends Float64Array {} +export type mat2d = IndexedCollection; -export class ReadonlyMat2d extends mat2d {} +export type ReadonlyMat2d = IndexedCollection; /** * 2x3 Matrix @@ -31,7 +31,7 @@ export class ReadonlyMat2d extends mat2d {} * @returns {mat2d} a new 2x3 matrix */ export function create(): mat2d { - let out: mat2d = new mat2d(6); + let out: mat2d = changetype(new Float64Array(6)); //if (mat2d != Float32Array) { out[1] = 0; out[2] = 0; @@ -50,7 +50,7 @@ export function create(): mat2d { * @returns {mat2d} a new 2x3 matrix */ export function clone(a: ReadonlyMat2d): mat2d { - let out: mat2d = new mat2d(6); + let out: mat2d = changetype(new Float64Array(6)); out[0] = a[0]; out[1] = a[1]; out[2] = a[2]; @@ -105,7 +105,7 @@ export function identity(out: mat2d): mat2d { * @returns {mat2d} A new mat2d */ export function fromValues(a: f64, b: f64, c: f64, d: f64, tx: f64, ty: f64): mat2d { - let out: mat2d = new mat2d(6); + let out: mat2d = changetype(new Float64Array(6)); out[0] = a; out[1] = b; out[2] = c; diff --git a/assembly/mat3.ts b/assembly/mat3.ts index 23b4776a..1d55264c 100644 --- a/assembly/mat3.ts +++ b/assembly/mat3.ts @@ -1,14 +1,14 @@ import * as glMatrix from "./common"; -import { MathUtil } from "./imports"; +import { IndexedCollection, MathUtil } from "./imports"; import { ReadonlyMat2 } from "./mat2"; import { ReadonlyMat4 } from "./mat4"; import { ReadonlyVec2 } from "./vec2"; -export class ReadonlyQuat extends Float64Array {} +export type ReadonlyQuat = IndexedCollection; -export class mat3 extends Float64Array {} +export type mat3 = IndexedCollection; -export class ReadonlyMat3 extends mat3 {} +export type ReadonlyMat3 = IndexedCollection; /** * 3x3 Matrix @@ -21,7 +21,7 @@ export class ReadonlyMat3 extends mat3 {} * @returns {mat3} a new 3x3 matrix */ export function create(): mat3 { - let out = new mat3(9); + let out = changetype(new Float64Array(9)); //if (glMatrix.ARRAY_TYPE != Float32Array): mat3 { out[1] = 0; out[2] = 0; @@ -63,7 +63,7 @@ export function fromMat4(out: mat3, a: ReadonlyMat4): mat3 { * @returns {mat3} a new 3x3 matrix */ export function clone(a: ReadonlyMat3): mat3 { - let out = new mat3(9); + let out = changetype(new Float64Array(9)); out[0] = a[0]; out[1] = a[1]; out[2] = a[2]; @@ -111,7 +111,7 @@ export function copy(out: mat3, a: ReadonlyMat3): mat3 { * @returns {mat3} A new mat3 */ export function fromValues(m00: f64, m01: f64, m02: f64, m10: f64, m11: f64, m12: f64, m20: f64, m21: f64, m22: f64): mat3 { - let out = new mat3(9); + let out = changetype(new Float64Array(9)); out[0] = m00; out[1] = m01; out[2] = m02; diff --git a/assembly/mat4.ts b/assembly/mat4.ts index 18a6fa82..3dc18e44 100644 --- a/assembly/mat4.ts +++ b/assembly/mat4.ts @@ -1,14 +1,14 @@ import * as glMatrix from "./common"; -import { MathUtil } from "./imports"; +import { IndexedCollection, MathUtil } from "./imports"; import * as quat from "./quat"; import { ReadonlyQuat2 } from "./quat2"; import * as vec3 from "./vec3"; -export class quat4 extends quat.quat {} +export type quat4 = IndexedCollection; -export class mat4 extends Float64Array {} +export type mat4 = IndexedCollection; -export class ReadonlyMat4 extends mat4 {} +export type ReadonlyMat4 = IndexedCollection; /** * Object containing the following values: upDegrees, downDegrees, leftDegrees, rightDegrees @@ -32,7 +32,7 @@ export class Fov { * @returns {mat4} a new 4x4 matrix */ export function create(): mat4 { - let out = new mat4(16); + let out = changetype(new Float64Array(16)); //if (glMatrix.ARRAY_TYPE != Float32Array) { out[1] = 0; out[2] = 0; @@ -61,7 +61,7 @@ export function create(): mat4 { * @returns {mat4} a new 4x4 matrix */ export function clone(a: ReadonlyMat4): mat4 { - let out = new mat4(16); + let out = changetype(new Float64Array(16)); out[0] = a[0]; out[1] = a[1]; out[2] = a[2]; @@ -147,7 +147,7 @@ export function fromValues( m32: f64, m33: f64 ): mat4 { - let out = new mat4(16); + let out = changetype(new Float64Array(16)); out[0] = m00; out[1] = m01; out[2] = m02; @@ -1118,7 +1118,7 @@ export function fromRotationTranslation(out: mat4, q: quat4, v: vec3.ReadonlyVec * @returns {mat4} mat4 receiving operation result */ export function fromQuat2(out: mat4, a: ReadonlyQuat2): mat4 { - let translation = new vec3.ReadonlyVec3(3); + let translation = new Float64Array(3); let bx = -a[0], by = -a[1], bz = -a[2], @@ -1198,7 +1198,7 @@ export function getScaling(out: mat4, mat: ReadonlyMat4): mat4 { * @return {quat} out */ export function getRotation(out: mat4, mat: ReadonlyMat4): mat4 { - let scaling = new mat4(3); + let scaling = changetype(new Float64Array(3)); getScaling(scaling, mat); let is1 = 1 / scaling[0]; @@ -1557,7 +1557,7 @@ export function frustum(out: mat4, left: f64, right: f64, bottom: f64, top: f64, * @param {number} far Far bound of the frustum, can be null or Infinity * @returns {mat4} out */ -export function perspectiveNO(out: mat4, fovy: f64, aspect: f64, near: f64, far: f64): mat4 { +export function perspectiveNO(out: mat4, fovy: f64, aspect: f64, near: f64, far: usize): mat4 { const f = 1.0 / Math.tan(fovy / 2); out[0] = f / aspect; out[1] = 0; @@ -1603,7 +1603,7 @@ export const perspective = perspectiveNO; * @param {number} far Far bound of the frustum, can be null or Infinity * @returns {mat4} out */ -export function perspectiveZO(out: mat4, fovy: f64, aspect: f64, near: f64, far: f64): mat4 { +export function perspectiveZO(out: mat4, fovy: f64, aspect: f64, near: f64, far: usize): mat4 { const f = 1.0 / Math.tan(fovy / 2); out[0] = f / aspect; out[1] = 0; diff --git a/assembly/quat.ts b/assembly/quat.ts index 0bbca465..9205ebf8 100644 --- a/assembly/quat.ts +++ b/assembly/quat.ts @@ -1,11 +1,12 @@ import * as glMatrix from "./common"; +import { IndexedCollection } from "./imports"; import * as mat3 from "./mat3"; import * as vec3 from "./vec3"; import * as vec4 from "./vec4"; -export class quat extends Float64Array {} +export type quat = IndexedCollection; -export class ReadonlyQuat extends quat {} +export type ReadonlyQuat = IndexedCollection; /** * Quaternion in the format XYZW @@ -18,7 +19,7 @@ export class ReadonlyQuat extends quat {} * @returns {quat} a new quaternion */ export function create(): quat { - let out = new quat(4); + let out = changetype(new Float64Array(4)); //if (glMatrix.ARRAY_TYPE != Float32Array) { out[0] = 0; out[1] = 0; @@ -478,52 +479,37 @@ export function fromEuler(out: quat, x: x, y: y, z: z, order: string = glMatrix. let sz = Math.sin(z); let cz = Math.cos(z); - switch (order) { - case "xyz": - out[0] = sx * cy * cz + cx * sy * sz; - out[1] = cx * sy * cz - sx * cy * sz; - out[2] = cx * cy * sz + sx * sy * cz; - out[3] = cx * cy * cz - sx * sy * sz; - break; - - case "xzy": - out[0] = sx * cy * cz - cx * sy * sz; - out[1] = cx * sy * cz - sx * cy * sz; - out[2] = cx * cy * sz + sx * sy * cz; - out[3] = cx * cy * cz + sx * sy * sz; - break; - - case "yxz": - out[0] = sx * cy * cz + cx * sy * sz; - out[1] = cx * sy * cz - sx * cy * sz; - out[2] = cx * cy * sz - sx * sy * cz; - out[3] = cx * cy * cz + sx * sy * sz; - break; - - case "yzx": - out[0] = sx * cy * cz + cx * sy * sz; - out[1] = cx * sy * cz + sx * cy * sz; - out[2] = cx * cy * sz - sx * sy * cz; - out[3] = cx * cy * cz - sx * sy * sz; - break; - - case "zxy": - out[0] = sx * cy * cz - cx * sy * sz; - out[1] = cx * sy * cz + sx * cy * sz; - out[2] = cx * cy * sz + sx * sy * cz; - out[3] = cx * cy * cz - sx * sy * sz; - break; - - case "zyx": - out[0] = sx * cy * cz - cx * sy * sz; - out[1] = cx * sy * cz + sx * cy * sz; - out[2] = cx * cy * sz - sx * sy * cz; - out[3] = cx * cy * cz + sx * sy * sz; - break; - - default: - throw new Error('Unknown angle order ' + order); - } + if (order === "xyz") { + out[0] = sx * cy * cz + cx * sy * sz; + out[1] = cx * sy * cz - sx * cy * sz; + out[2] = cx * cy * sz + sx * sy * cz; + out[3] = cx * cy * cz - sx * sy * sz; + } else if (order === "xzy") { + out[0] = sx * cy * cz - cx * sy * sz; + out[1] = cx * sy * cz - sx * cy * sz; + out[2] = cx * cy * sz + sx * sy * cz; + out[3] = cx * cy * cz + sx * sy * sz; + } else if (order === "yxz") { + out[0] = sx * cy * cz + cx * sy * sz; + out[1] = cx * sy * cz - sx * cy * sz; + out[2] = cx * cy * sz - sx * sy * cz; + out[3] = cx * cy * cz + sx * sy * sz; + } else if (order === "yzx") { + out[0] = sx * cy * cz + cx * sy * sz; + out[1] = cx * sy * cz + sx * cy * sz; + out[2] = cx * cy * sz - sx * sy * cz; + out[3] = cx * cy * cz - sx * sy * sz; + } else if (order === "zxy") { + out[0] = sx * cy * cz - cx * sy * sz; + out[1] = cx * sy * cz + sx * cy * sz; + out[2] = cx * cy * sz + sx * sy * cz; + out[3] = cx * cy * cz - sx * sy * sz; + } else if (order === "zyx") { + out[0] = sx * cy * cz - cx * sy * sz; + out[1] = cx * sy * cz + sx * cy * sz; + out[2] = cx * cy * sz - sx * sy * cz; + out[3] = cx * cy * cz + sx * sy * sz; + } else throw new Error('Unknown angle order ' + order); return out; } diff --git a/assembly/quat2.ts b/assembly/quat2.ts index 53a0b51b..6aa9aeeb 100644 --- a/assembly/quat2.ts +++ b/assembly/quat2.ts @@ -1,12 +1,12 @@ import * as glMatrix from "./common"; -import { MathUtil } from "./imports"; +import { IndexedCollection, MathUtil } from "./imports"; import * as mat4 from "./mat4"; import * as quat from "./quat"; import * as vec3 from "./vec3"; -export default class quat2 extends Float64Array {} +export type quat2 = IndexedCollection; -export class ReadonlyQuat2 extends quat2 {} +export type ReadonlyQuat2 = IndexedCollection; /** * Dual Quaternion
@@ -22,7 +22,7 @@ export class ReadonlyQuat2 extends quat2 {} * @returns {quat2} a new dual quaternion [real -> rotation, dual -> translation] */ export function create(): quat2 { - let dq = new quat2(8); + let dq = changetype(new Float64Array(8)); //if (glMatrix.ARRAY_TYPE != Float32Array) { dq[0] = 0; dq[1] = 0; @@ -44,7 +44,7 @@ export function create(): quat2 { * @function */ export function clone(a: ReadonlyQuat2): quat2 { - let dq = new quat2(8); + let dq = changetype(new Float64Array(8)); dq[0] = a[0]; dq[1] = a[1]; dq[2] = a[2]; @@ -71,7 +71,7 @@ export function clone(a: ReadonlyQuat2): quat2 { * @function */ export function fromValues(x1: f64, y1: f64, z1: f64, w1: f64, x2: f64, y2: f64, z2: f64, w2: f64): quat2 { - let dq = new quat2(8); + let dq = changetype(new Float64Array(8)); dq[0] = x1; dq[1] = y1; dq[2] = z1; @@ -97,7 +97,7 @@ export function fromValues(x1: f64, y1: f64, z1: f64, w1: f64, x2: f64, y2: f64, * @function */ export function fromRotationTranslationValues(x1: f64, y1: f64, z1: f64, w1: f64, x2: f64, y2: f64, z2: f64): quat2 { - let dq = new quat2(8); + let dq = changetype(new Float64Array(8)); dq[0] = x1; dq[1] = y1; dq[2] = z1; @@ -192,7 +192,7 @@ export function fromMat4(out: quat2, a: mat4.ReadonlyMat4): quat2 { //TODO Optimize this let outer = quat.create(); mat4.getRotation(outer, a); - let t = new vec3.vec3(3); + let t = new Float64Array(3); mat4.getTranslation(t, a); fromRotationTranslation(out, outer, t); return out; diff --git a/assembly/vec2.ts b/assembly/vec2.ts index fa676943..2c2430f3 100644 --- a/assembly/vec2.ts +++ b/assembly/vec2.ts @@ -1,13 +1,13 @@ import * as glMatrix from "./common"; -import { MathUtil } from "./imports"; +import { IArguments, IndexedCollection, MathUtil } from "./imports"; import { ReadonlyMat2 } from "./mat2"; import { ReadonlyMat2d } from "./mat2d"; import { ReadonlyMat3 } from "./mat3"; import { ReadonlyMat4 } from "./mat4"; -export class vec2 extends Float64Array {} +export type vec2 = IndexedCollection; -export class ReadonlyVec2 extends vec2 {} +export type ReadonlyVec2 = IndexedCollection; /** * 2 Dimensional Vector @@ -20,7 +20,7 @@ export class ReadonlyVec2 extends vec2 {} * @returns {vec2} a new 2D vector */ export function create(): vec2 { - let out = new vec2(2); + let out = changetype(new Float64Array(2)); //if (glMatrix.ARRAY_TYPE != Float32Array) { out[0] = 0; out[1] = 0; @@ -35,7 +35,7 @@ export function create(): vec2 { * @returns {vec2} a new 2D vector */ export function clone(a: ReadonlyVec2): vec2 { - let out = new vec2(2); + let out = changetype(new Float64Array(2)); out[0] = a[0]; out[1] = a[1]; return out; @@ -49,7 +49,7 @@ export function clone(a: ReadonlyVec2): vec2 { * @returns {vec2} a new 2D vector */ export function fromValues(x: f64, y: f64): vec2 { - let out = new vec2(2); + let out = changetype(new Float64Array(2)); out[0] = x; out[1] = y; return out; @@ -604,10 +604,10 @@ export const sqrLen = squaredLength; * @returns {Array} a * @function */ -export function forEach(): (a: vec2, stride: u16, offset: u16, count: u16, fn: (a: vec2, b: vec2, arg: IArguments) => void, arg: IArguments) => vec2 { +export function forEach(): (a: vec2, stride: i32, offset: i32, count: i32, fn: (a: vec2, b: vec2, arg: IArguments) => void, arg: IArguments) => vec2 { let vec = create(); - return function (a: vec2, stride: u16, offset: u16, count: u16, fn: (a: vec2, b: vec2, arg: IArguments) => void, arg: IArguments) { - let i: u16, l: u16; + return function (a: vec2, stride: i32, offset: i32, count: i32, fn: (a: vec2, b: vec2, arg: IArguments) => void, arg: IArguments) { + let i: i32, l: i32; if (!stride) { stride = 2; } @@ -617,7 +617,7 @@ export function forEach(): (a: vec2, stride: u16, offset: u16, count: u16, fn: ( } if (count) { - l = Math.min(count * stride + offset, a.length); + l = MathUtil.min(count * stride + offset, a.length); } else { l = a.length; } diff --git a/assembly/vec3.ts b/assembly/vec3.ts index 9639c221..c4006b8b 100644 --- a/assembly/vec3.ts +++ b/assembly/vec3.ts @@ -1,12 +1,12 @@ import * as glMatrix from "./common"; -import { MathUtil } from "./imports"; +import { IArguments, IndexedCollection, MathUtil } from "./imports"; import { ReadonlyMat3 } from "./mat3"; import { ReadonlyMat4 } from "./mat4"; import { ReadonlyQuat } from "./quat"; -export class vec3 extends Float64Array {} +export type vec3 = IndexedCollection; -export class ReadonlyVec3 extends Float64Array {} +export type ReadonlyVec3 = IndexedCollection; /** * 3 Dimensional Vector @@ -19,7 +19,7 @@ export class ReadonlyVec3 extends Float64Array {} * @returns {vec3} a new 3D vector */ export function create(): vec3 { - let out = new vec3(3); + let out = changetype(new Float64Array(3)); //if (glMatrix.ARRAY_TYPE != Float32Array) { out[0] = 0; out[1] = 0; @@ -35,7 +35,7 @@ export function create(): vec3 { * @returns {vec3} a new 3D vector */ export function clone(a: ReadonlyVec3): vec3 { - var out = new vec3(3); + var out = changetype(new Float64Array(3)); out[0] = a[0]; out[1] = a[1]; out[2] = a[2]; @@ -64,7 +64,7 @@ export function length(a: ReadonlyVec3): f64 { * @returns {vec3} a new 3D vector */ export function fromValues(x: f64, y: f64, z: f64): vec3 { - let out = new vec3(3); + let out = changetype(new Float64Array(3)); out[0] = x; out[1] = y; out[2] = z; @@ -802,11 +802,11 @@ export const sqrLen = squaredLength; * @returns {Array} a * @function */ -export function forEach(): (a: vec3, stride: u16, offset: u16, count: u16, fn: (a: vec3, b: vec3, arg: IArguments) => void, arg: IArguments) => vec3 { +export function forEach(): (a: vec3, stride: i32, offset: i32, count: i32, fn: (a: vec3, b: vec3, arg: IArguments) => void, arg: IArguments) => vec3 { let vec = create(); - return function(a: vec3, stride: u16, offset: u16, count: u16, fn: (a: vec3, b: vec3, arg: IArguments) => void, arg: IArguments) { - let i: u16, l: u16; + return function(a: vec3, stride: i32, offset: i32, count: i32, fn: (a: vec3, b: vec3, arg: IArguments) => void, arg: IArguments) { + let i: i32, l: i32; if (!stride) { stride = 3; } @@ -816,7 +816,7 @@ export function forEach(): (a: vec3, stride: u16, offset: u16, count: u16, fn: ( } if (count) { - l = Math.min(count * stride + offset, a.length); + l = MathUtil.min(count * stride + offset, a.length); } else { l = a.length; } diff --git a/assembly/vec4.ts b/assembly/vec4.ts index 9240d547..acda654c 100644 --- a/assembly/vec4.ts +++ b/assembly/vec4.ts @@ -1,10 +1,10 @@ import * as glMatrix from "./common"; -import { MathUtil } from "./imports"; +import { IArguments, IndexedCollection, MathUtil } from "./imports"; import { ReadonlyQuat } from "./quat"; -export class vec4 extends Float64Array {} +export type vec4 = IndexedCollection; -export class ReadonlyVec4 extends vec4 {} +export type ReadonlyVec4 = IndexedCollection; /** * 4 Dimensional Vector @@ -17,7 +17,7 @@ export class ReadonlyVec4 extends vec4 {} * @returns {vec4} a new 4D vector */ export function create(): vec4 { - let out = new vec4(4); + let out = changetype(new Float64Array(4)); //if (glMatrix.ARRAY_TYPE != Float32Array) { out[0] = 0; out[1] = 0; @@ -34,7 +34,7 @@ export function create(): vec4 { * @returns {vec4} a new 4D vector */ export function clone(a: ReadonlyVec4): vec4 { - let out = new vec4(4); + let out = changetype(new Float64Array(4)); out[0] = a[0]; out[1] = a[1]; out[2] = a[2]; @@ -52,7 +52,7 @@ export function clone(a: ReadonlyVec4): vec4 { * @returns {vec4} a new 4D vector */ export function fromValues(x: f64, y: f64, z: f64, w: f64): vec4 { - let out = new vec4(4); + let out = changetype(new Float64Array(4)); out[0] = x; out[1] = y; out[2] = z; @@ -641,11 +641,11 @@ export const sqrLen = squaredLength; * @returns {Array} a * @function */ -export function forEach(): (a: vec4, stride: u16, offset: u16, count: u16, fn: (a: vec4, b: vec4, arg: IArguments) => void, arg: IArguments) => vec4 { +export function forEach(): (a: vec4, stride: i32, offset: i32, count: i32, fn: (a: vec4, b: vec4, arg: IArguments) => void, arg: IArguments) => vec4 { let vec = create(); - return function(a: vec4, stride: u16, offset: u16, count: u16, fn: (a: vec4, b: vec4, arg: IArguments) => void, arg: IArguments) { - let i: u16, l: u16; + return function(a: vec4, stride: i32, offset: i32, count: i32, fn: (a: vec4, b: vec4, arg: IArguments) => void, arg: IArguments) { + let i: i32, l: i32; if (!stride) { stride = 4; } @@ -655,7 +655,7 @@ export function forEach(): (a: vec4, stride: u16, offset: u16, count: u16, fn: ( } if (count) { - l = Math.min(count * stride + offset, a.length); + l = MathUtil.min(count * stride + offset, a.length); } else { l = a.length; } From f917c0c4ee4b58a2d9377a61b9b9635a53a96960 Mon Sep 17 00:00:00 2001 From: Huguenin-Elie Steve Date: Sun, 28 Mar 2021 10:28:31 +0200 Subject: [PATCH 09/32] implement workaround for AS100 --- assembly/quat.ts | 6 +- assembly/tsconfig.json | 2 +- assembly/vec2.ts | 3 +- assembly/vec3.ts | 2 +- assembly/vec4.ts | 2 +- build/optimized.wat | 41013 ++++++++++++++++++++++++++++++----- build/untouched.wat | 45484 +++++++++++++++++++++++++++++++++++++++ 7 files changed, 80539 insertions(+), 5973 deletions(-) create mode 100644 build/untouched.wat diff --git a/assembly/quat.ts b/assembly/quat.ts index 9205ebf8..c882153d 100644 --- a/assembly/quat.ts +++ b/assembly/quat.ts @@ -690,10 +690,10 @@ export function equals(a: ReadonlyQuat, b: ReadonlyQuat): bool { * @param {ReadonlyVec3} b the destination vector * @returns {quat} out */ -export function rotationTo(): (out: quat, a: ReadonlyQuat, b: ReadonlyQuat) => quat { let tmpvec3 = vec3.create(); let xUnitVec3 = vec3.fromValues(1, 0, 0); let yUnitVec3 = vec3.fromValues(0, 1, 0); +export function rotationTo(): (out: quat, a: ReadonlyQuat, b: ReadonlyQuat) => quat { return function (out: quat, a: ReadonlyQuat, b: ReadonlyQuat) { let dot = vec3.dot(a, b); @@ -732,9 +732,9 @@ rotationTo(); * @param {Number} t interpolation amount, in the range [0-1], between the two inputs * @returns {quat} out */ -export function sqlerp(): (out: quat, a: ReadonlyQuat, b: ReadonlyQuat, c: ReadonlyQuat, d: ReadonlyQuat, t: f64) => quat { let temp1 = create(); let temp2 = create(); +export function sqlerp(): (out: quat, a: ReadonlyQuat, b: ReadonlyQuat, c: ReadonlyQuat, d: ReadonlyQuat, t: f64) => quat { return function (out: quat, a: ReadonlyQuat, b: ReadonlyQuat, c: ReadonlyQuat, d: ReadonlyQuat, t: f64) { slerp(temp1, a, d, t); @@ -757,8 +757,8 @@ sqlerp(); * @param {ReadonlyVec3} up the vector representing the local "up" direction * @returns {quat} out */ -export function setAxes(): (out: quat, view: vec3.ReadonlyVec3, right: vec3.ReadonlyVec3, up: vec3.ReadonlyVec3) => quat { let matr = mat3.create(); +export function setAxes(): (out: quat, view: vec3.ReadonlyVec3, right: vec3.ReadonlyVec3, up: vec3.ReadonlyVec3) => quat { return function (out: quat, view: vec3.ReadonlyVec3, right: vec3.ReadonlyVec3, up: vec3.ReadonlyVec3) { matr[0] = right[0]; diff --git a/assembly/tsconfig.json b/assembly/tsconfig.json index 91421cd7..d0c49237 100644 --- a/assembly/tsconfig.json +++ b/assembly/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "assemblyscript/std/portable.json", "compilerOptions": { - "types": ["./assembly/types.d.ts"] + "types": ["types.d.ts"] }, "include": [ "./**/*.ts" diff --git a/assembly/vec2.ts b/assembly/vec2.ts index 2c2430f3..2f417707 100644 --- a/assembly/vec2.ts +++ b/assembly/vec2.ts @@ -604,8 +604,9 @@ export const sqrLen = squaredLength; * @returns {Array} a * @function */ -export function forEach(): (a: vec2, stride: i32, offset: i32, count: i32, fn: (a: vec2, b: vec2, arg: IArguments) => void, arg: IArguments) => vec2 { let vec = create(); +export function forEach(): (a: vec2, stride: i32, offset: i32, count: i32, fn: (a: vec2, b: vec2, arg: IArguments) => void, arg: IArguments) => vec2 { + return function (a: vec2, stride: i32, offset: i32, count: i32, fn: (a: vec2, b: vec2, arg: IArguments) => void, arg: IArguments) { let i: i32, l: i32; if (!stride) { diff --git a/assembly/vec3.ts b/assembly/vec3.ts index c4006b8b..dd39c315 100644 --- a/assembly/vec3.ts +++ b/assembly/vec3.ts @@ -802,8 +802,8 @@ export const sqrLen = squaredLength; * @returns {Array} a * @function */ -export function forEach(): (a: vec3, stride: i32, offset: i32, count: i32, fn: (a: vec3, b: vec3, arg: IArguments) => void, arg: IArguments) => vec3 { let vec = create(); +export function forEach(): (a: vec3, stride: i32, offset: i32, count: i32, fn: (a: vec3, b: vec3, arg: IArguments) => void, arg: IArguments) => vec3 { return function(a: vec3, stride: i32, offset: i32, count: i32, fn: (a: vec3, b: vec3, arg: IArguments) => void, arg: IArguments) { let i: i32, l: i32; diff --git a/assembly/vec4.ts b/assembly/vec4.ts index acda654c..3c938a8f 100644 --- a/assembly/vec4.ts +++ b/assembly/vec4.ts @@ -641,8 +641,8 @@ export const sqrLen = squaredLength; * @returns {Array} a * @function */ -export function forEach(): (a: vec4, stride: i32, offset: i32, count: i32, fn: (a: vec4, b: vec4, arg: IArguments) => void, arg: IArguments) => vec4 { let vec = create(); +export function forEach(): (a: vec4, stride: i32, offset: i32, count: i32, fn: (a: vec4, b: vec4, arg: IArguments) => void, arg: IArguments) => vec4 { return function(a: vec4, stride: i32, offset: i32, count: i32, fn: (a: vec4, b: vec4, arg: IArguments) => void, arg: IArguments) { let i: i32, l: i32; diff --git a/build/optimized.wat b/build/optimized.wat index b9e7c48d..432dea6c 100644 --- a/build/optimized.wat +++ b/build/optimized.wat @@ -1,40 +1,58 @@ (module (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) - (type $i32_i32_=>_none (func (param i32 i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) - (type $i32_=>_none (func (param i32))) - (type $f64_f64_=>_i32 (func (param f64 f64) (result i32))) - (type $none_=>_none (func)) - (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) - (type $f64_i32_i32_=>_i32 (func (param f64 i32 i32) (result i32))) - (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) - (type $i32_f64_i32_=>_i32 (func (param i32 f64 i32) (result i32))) - (type $none_=>_i32 (func (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_f64_=>_i32 (func (param i32 i32 f64) (result i32))) - (type $none_=>_f64 (func (result f64))) (type $i32_=>_f64 (func (param i32) (result f64))) - (type $f64_=>_f64 (func (param f64) (result f64))) + (type $i32_i32_i32_f64_=>_i32 (func (param i32 i32 i32 f64) (result i32))) (type $i32_i32_=>_f64 (func (param i32 i32) (result f64))) - (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) + (type $none_=>_f64 (func (result f64))) + (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) + (type $f64_=>_f64 (func (param f64) (result f64))) + (type $i32_f64_f64_f64_f64_f64_f64_=>_i32 (func (param i32 f64 f64 f64 f64 f64 f64) (result i32))) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_f64_f64_f64_i32_=>_i32 (func (param i32 f64 f64 f64 i32) (result i32))) + (type $i32_i32_i32_i32_i32_f64_=>_i32 (func (param i32 i32 i32 i32 i32 f64) (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $i32_f64_=>_none (func (param i32 f64))) + (type $i32_i32_i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32 i32) (result i32))) (type $i32_i32_f64_=>_none (func (param i32 i32 f64))) - (type $f64_i32_i32_=>_none (func (param f64 i32 i32))) - (type $i64_=>_i32 (func (param i64) (result i32))) (type $f64_=>_i32 (func (param f64) (result i32))) - (type $i32_i32_i32_f64_=>_i32 (func (param i32 i32 i32 f64) (result i32))) - (type $i32_i64_i32_i64_i32_i64_i32_=>_i32 (func (param i32 i64 i32 i64 i32 i64 i32) (result i32))) - (type $i32_f64_i32_i32_=>_i32 (func (param i32 f64 i32 i32) (result i32))) + (type $i32_i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32) (result i32))) + (type $i32_i32_f64_i32_=>_i32 (func (param i32 i32 f64 i32) (result i32))) + (type $i32_i32_f64_f64_=>_i32 (func (param i32 i32 f64 f64) (result i32))) + (type $i32_f64_i32_=>_i32 (func (param i32 f64 i32) (result i32))) + (type $i32_f64_f64_=>_i32 (func (param i32 f64 f64) (result i32))) (type $i32_f64_f64_f64_f64_=>_i32 (func (param i32 f64 f64 f64 f64) (result i32))) + (type $f64_f64_=>_i32 (func (param f64 f64) (result i32))) + (type $f64_f64_=>_f64 (func (param f64 f64) (result f64))) + (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (type $i64_=>_i32 (func (param i64) (result i32))) + (type $i32_f64_f64_f64_=>_i32 (func (param i32 f64 f64 f64) (result i32))) + (type $i32_f64_f64_f64_f64_f64_f64_f64_f64_=>_i32 (func (param i32 f64 f64 f64 f64 f64 f64 f64 f64) (result i32))) + (type $i32_f64_f64_f64_f64_f64_f64_f64_f64_f64_=>_i32 (func (param i32 f64 f64 f64 f64 f64 f64 f64 f64 f64) (result i32))) + (type $i32_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_=>_i32 (func (param i32 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64) (result i32))) + (type $i64_i32_i64_i32_i64_i32_=>_i32 (func (param i64 i32 i64 i32 i64 i32) (result i32))) + (type $f64_f64_f64_=>_i32 (func (param f64 f64 f64) (result i32))) (type $f64_f64_f64_f64_=>_i32 (func (param f64 f64 f64 f64) (result i32))) + (type $f64_f64_f64_f64_f64_f64_=>_i32 (func (param f64 f64 f64 f64 f64 f64) (result i32))) + (type $f64_f64_f64_f64_f64_f64_f64_=>_i32 (func (param f64 f64 f64 f64 f64 f64 f64) (result i32))) + (type $f64_f64_f64_f64_f64_f64_f64_f64_=>_i32 (func (param f64 f64 f64 f64 f64 f64 f64 f64) (result i32))) + (type $f64_f64_f64_f64_f64_f64_f64_f64_f64_=>_i32 (func (param f64 f64 f64 f64 f64 f64 f64 f64 f64) (result i32))) + (type $f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_=>_i32 (func (param f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64) (result i32))) (type $i64_=>_i64 (func (param i64) (result i64))) - (type $f64_i32_i32_=>_f64 (func (param f64 i32 i32) (result f64))) + (type $f64_f64_i32_=>_f64 (func (param f64 f64 i32) (result f64))) (type $f64_f64_f64_=>_f64 (func (param f64 f64 f64) (result f64))) (type $f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_=>_f64 (func (param f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64) (result f64))) (import "env" "seed" (func $~lib/builtins/seed (result f64))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "Math" "hypot" (func $assembly/imports/MathUtil.hypot (param f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64) (result f64))) - (import "Math" "max" (func $assembly/imports/MathUtil.max3 (param f64 f64 f64) (result f64))) + (import "Math" "min" (func $assembly/imports/MathUtil.min (param i32 i32 i32) (result i32))) + (import "Math" "max" (func $assembly/imports/MathUtil.max (param f64 f64 f64) (result f64))) (memory $0 1) (data (i32.const 1036) ",") (data (i32.const 1048) "\01\00\00\00\18\00\00\00~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s") @@ -47,57 +65,196 @@ (data (i32.const 1212) "<") (data (i32.const 1224) "\01\00\00\00$\00\00\00~\00l\00i\00b\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s") (data (i32.const 1276) "\1c") - (data (i32.const 1288) "\07\00\00\00\08\00\00\00\02") + (data (i32.const 1288) "\05\00\00\00\08\00\00\00\02") (data (i32.const 1308) "\1c") - (data (i32.const 1320) "\07\00\00\00\08\00\00\00\03") - (data (i32.const 1340) ",") - (data (i32.const 1352) "\01\00\00\00\1c\00\00\00I\00n\00v\00a\00l\00i\00d\00 \00l\00e\00n\00g\00t\00h") - (data (i32.const 1388) "<") - (data (i32.const 1400) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 1452) "<") - (data (i32.const 1464) "\01\00\00\00(\00\00\00A\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e") - (data (i32.const 1516) "<") - (data (i32.const 1528) "\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00r\00t\00/\00i\00t\00c\00m\00s\00.\00t\00s") - (data (i32.const 1644) ",") - (data (i32.const 1656) "\01\00\00\00\14\00\00\00~\00l\00i\00b\00/\00r\00t\00.\00t\00s") - (data (i32.const 1724) "<") - (data (i32.const 1736) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s") - (data (i32.const 1788) "\1c") - (data (i32.const 1800) "\01") - (data (i32.const 1820) "\1c") - (data (i32.const 1832) "\01\00\00\00\06\00\00\000\00.\000") - (data (i32.const 1852) "\1c") - (data (i32.const 1864) "\01\00\00\00\06\00\00\00N\00a\00N") - (data (i32.const 1884) ",") - (data (i32.const 1896) "\01\00\00\00\12\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 1932) ",") - (data (i32.const 1944) "\01\00\00\00\10\00\00\00I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 2040) "\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\a7)\b1&p\9c\e9\84D\bb.9\d6\919A~_\b4\8b_\84\9c\f49S\83\ff\97\f8\1f;(\f9\bd\8b\11/\ef\0f\98\05\de\cf~6m\1fm\nZf?FO\b7\t\cb\'\c7\ba\'u-\ea_\9e\f79\07={\f1\e5\eb\b1_\fbk\ea\92R\8aF0\03V\08]\8d\1f \bc\cf\f0\abk{\fca\91\e3\a9\1d6\f4\9a_\85\99e\08\1b\e6^\80\d8\ff\8d@h\a0\14W\15\06\061\'sM") + (data (i32.const 2860) "\1c") + (data (i32.const 2872) "\05\00\00\00\08\00\00\00\1f") + (data (i32.const 2892) "\1c") + (data (i32.const 2904) "\11\00\00\00\08\00\00\00 ") + (data (i32.const 2924) "\1c") + (data (i32.const 2936) "\12\00\00\00\08\00\00\00!") (data (i32.const 2956) "\1c") - (data (i32.const 2968) "\01\00\00\00\02\00\00\00,") - (data (i32.const 2992) "n\83\f9\a2\00\00\00\00\d1W\'\fc)\15DN\99\95b\db\c0\dd4\f5\abcQ\feA\90C<:n$\b7a\c5\bb\de\ea.I\06\e0\d2MB\1c\eb\1d\fe\1c\92\d1\t\f55\82\e8>\a7)\b1&p\9c\e9\84D\bb.9\d6\919A~_\b4\8b_\84\9c\f49S\83\ff\97\f8\1f;(\f9\bd\8b\11/\ef\0f\98\05\de\cf~6m\1fm\nZf?FO\b7\t\cb\'\c7\ba\'u-\ea_\9e\f79\07={\f1\e5\eb\b1_\fbk\ea\92R\8aF0\03V\08]\8d\1f \bc\cf\f0\abk{\fca\91\e3\a9\1d6\f4\9a_\85\99e\08\1b\e6^\80\d8\ff\8d@h\a0\14W\15\06\061\'sM") - (data (i32.const 3196) "\1c") - (data (i32.const 3208) "\01\00\00\00\n\00\00\00m\00a\00t\002\00(") - (data (i32.const 3228) "\1c") - (data (i32.const 3240) "\01\00\00\00\04\00\00\00,\00 ") - (data (i32.const 3260) "\1c") - (data (i32.const 3272) "\01\00\00\00\02\00\00\00)") - (data (i32.const 3292) "\1c") - (data (i32.const 3304) "\0b\00\00\00\08\00\00\00\04") - (data (i32.const 3328) "\0c\00\00\00 \00\00\00\00\00\00\00 ") - (data (i32.const 3364) "\01\1a\00\00\05\00\00\00\01\1a\00\00\02\00\00\00\01\1a\00\00\04") - (data (i32.const 3396) "\01\1a\00\00\05\00\00\00\02A\00\00\00\00\00\00\02\t") - (table $0 5 funcref) - (elem (i32.const 1) $~lib/math/NativeMath.random $assembly/mat2/multiply $assembly/mat2/subtract $~lib/util/sort/COMPARATOR~anonymous|0) + (data (i32.const 2968) "\05\00\00\00\08\00\00\00\"") + (data (i32.const 2988) "\1c") + (data (i32.const 3000) "\13\00\00\00\08\00\00\00#") + (data (i32.const 3020) "\1c") + (data (i32.const 3032) "\14\00\00\00\08\00\00\00$") + (data (i32.const 3052) "\1c") + (data (i32.const 3064) "\05\00\00\00\08\00\00\00%") + (data (i32.const 3084) "\1c") + (data (i32.const 3096) "\05\00\00\00\08\00\00\00&") + (data (i32.const 3116) "\1c") + (data (i32.const 3128) "\05\00\00\00\08\00\00\00\'") + (data (i32.const 3148) "\1c") + (data (i32.const 3160) "\05\00\00\00\08\00\00\00(") + (data (i32.const 3180) "\1c") + (data (i32.const 3192) "\07\00\00\00\08\00\00\00)") + (data (i32.const 3212) "\1c") + (data (i32.const 3224) "\05\00\00\00\08\00\00\00*") + (data (i32.const 3244) "\1c") + (data (i32.const 3256) "\05\00\00\00\08\00\00\00+") + (data (i32.const 3276) "\1c") + (data (i32.const 3288) "\05\00\00\00\08\00\00\00,") + (data (i32.const 3308) "\1c") + (data (i32.const 3320) "\06\00\00\00\08\00\00\00-") + (data (i32.const 3340) "\1c") + (data (i32.const 3352) "\06\00\00\00\08\00\00\00.") + (data (i32.const 3372) "\1c") + (data (i32.const 3384) "\07\00\00\00\08\00\00\00/") + (data (i32.const 3404) "\1c") + (data (i32.const 3416) "\t\00\00\00\08\00\00\000") + (data (i32.const 3436) "\1c") + (data (i32.const 3448) "\05\00\00\00\08\00\00\001") + (data (i32.const 3468) "\1c") + (data (i32.const 3480) "\05\00\00\00\08\00\00\002") + (data (i32.const 3500) "\1c") + (data (i32.const 3512) "\01\00\00\00\n\00\00\00m\00a\00t\002\00(") + (data (i32.const 3532) "\1c") + (data (i32.const 3544) "\01\00\00\00\06\00\00\000\00.\000") + (data (i32.const 3564) "\1c") + (data (i32.const 3576) "\01\00\00\00\06\00\00\00N\00a\00N") + (data (i32.const 3596) ",") + (data (i32.const 3608) "\01\00\00\00\12\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y") + (data (i32.const 3644) ",") + (data (i32.const 3656) "\01\00\00\00\10\00\00\00I\00n\00f\00i\00n\00i\00t\00y") + (data (i32.const 3752) "\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8 (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 f64) - (local $6 i32) - (local $7 f64) - (local $8 i32) + (func $assembly/vec3/forEach (result i32) + i32.const 2032 + ) + (func $assembly/vec4/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.const 0 local.get $1 - i32.const 31 - i32.add - i32.const 5 - i32.shr_u + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 i32.const 2 - i32.shl - local.tee $3 - call $~lib/rt/tlsf/__alloc - local.tee $6 - local.get $3 - call $~lib/memory/memory.fill local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec4/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 i32.const 1 - i32.sub - local.set $4 - loop $for-loop|0 - local.get $4 - i32.const 0 - i32.gt_s - if - local.get $4 - local.set $3 - loop $while-continue|1 - local.get $3 - i32.const 1 - i32.and - local.get $6 - local.get $3 - i32.const 6 - i32.shr_u - i32.const 2 - i32.shl - i32.add - i32.load - local.get $3 - i32.const 1 - i32.shr_s - i32.shr_u - i32.const 1 - i32.and - i32.eq - if - local.get $3 - i32.const 1 - i32.shr_s - local.set $3 - br $while-continue|1 - end - end - local.get $0 - local.get $3 - i32.const 1 - i32.shr_s - local.tee $3 - i32.const 3 - i32.shl - i32.add - f64.load - local.set $5 - local.get $0 - local.get $4 - i32.const 3 - i32.shl - i32.add - f64.load - local.set $7 - i32.const 2 - global.set $~argumentsLength - local.get $5 - local.get $7 - local.get $2 - i32.load - call_indirect $0 (type $f64_f64_=>_i32) - i32.const 0 - i32.lt_s - if - local.get $6 - local.get $4 - i32.const 5 - i32.shr_u - i32.const 2 - i32.shl - i32.add - local.tee $8 - local.get $8 - i32.load - i32.const 1 - local.get $4 - i32.shl - i32.xor - i32.store - local.get $0 - local.get $4 - i32.const 3 - i32.shl - i32.add - local.get $5 - f64.store - local.get $0 - local.get $3 - i32.const 3 - i32.shl - i32.add - local.get $7 - f64.store - end - local.get $4 - i32.const 1 - i32.sub - local.set $4 - br $for-loop|0 - end - end local.get $1 i32.const 1 - i32.sub - local.set $4 - loop $for-loop|2 - local.get $4 - i32.const 2 - i32.ge_s - if - local.get $0 - f64.load - local.set $5 - local.get $0 - local.get $0 - local.get $4 - i32.const 3 - i32.shl - i32.add - local.tee $1 - f64.load - f64.store - local.get $1 - local.get $5 - f64.store - i32.const 1 - local.set $1 - loop $while-continue|3 - local.get $4 - local.get $6 - local.get $1 - i32.const 5 - i32.shr_u - i32.const 2 - i32.shl - i32.add - i32.load - local.get $1 - i32.shr_u - i32.const 1 - i32.and - local.get $1 - i32.const 1 - i32.shl - i32.add - local.tee $3 - i32.gt_s - if - local.get $3 - local.set $1 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $1 - i32.const 0 - i32.gt_s - if - local.get $0 - f64.load - local.set $5 - local.get $0 - local.get $1 - i32.const 3 - i32.shl - i32.add - f64.load - local.set $7 - i32.const 2 - global.set $~argumentsLength - local.get $5 - local.get $7 - local.get $2 - i32.load - call_indirect $0 (type $f64_f64_=>_i32) - i32.const 0 - i32.lt_s - if - local.get $6 - local.get $1 - i32.const 5 - i32.shr_u - i32.const 2 - i32.shl - i32.add - local.tee $3 - local.get $3 - i32.load - i32.const 1 - local.get $1 - i32.shl - i32.xor - i32.store - local.get $0 - local.get $1 - i32.const 3 - i32.shl - i32.add - local.get $5 - f64.store - local.get $0 - local.get $7 - f64.store - end - local.get $1 - i32.const 1 - i32.shr_s - local.set $1 - br $while-continue|4 - end - end - local.get $4 - i32.const 1 - i32.sub - local.set $4 - br $for-loop|2 - end - end - local.get $6 - call $~lib/rt/tlsf/__free - local.get $0 - f64.load offset=8 - local.set $5 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.mul + call $~lib/typedarray/Float64Array#__set local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.mul + call $~lib/typedarray/Float64Array#__set local.get $0 - f64.load - f64.store offset=8 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.mul + call $~lib/typedarray/Float64Array#__set local.get $0 - local.get $5 - f64.store ) - (func $~lib/typedarray/Float64Array#sort (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 f64) - (local $6 f64) - (local $7 i32) - (local $8 i32) - block $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 - local.get $0 - local.tee $2 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.tee $8 - i32.const 1 - i32.le_u - br_if $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 - local.get $2 - i32.load offset=4 - local.set $4 - local.get $8 - i32.const 2 - i32.eq - if - local.get $4 - f64.load offset=8 - local.set $5 - local.get $4 - f64.load - local.set $6 - i32.const 2 - global.set $~argumentsLength - local.get $5 - local.get $6 - local.get $1 - i32.load - call_indirect $0 (type $f64_f64_=>_i32) - i32.const 0 - i32.lt_s - if - local.get $4 - local.get $6 - f64.store offset=8 - local.get $4 - local.get $5 - f64.store - end - br $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 - end - local.get $8 - i32.const 256 - i32.lt_u - if - local.get $1 - local.set $3 - loop $for-loop|0 - local.get $7 - local.get $8 - i32.lt_s - if - local.get $4 - local.get $7 - i32.const 3 - i32.shl - i32.add - f64.load - local.set $5 - local.get $7 - i32.const 1 - i32.sub - local.set $1 - loop $while-continue|1 - local.get $1 - i32.const 0 - i32.ge_s - if - block $while-break|1 - local.get $4 - local.get $1 - i32.const 3 - i32.shl - i32.add - f64.load - local.set $6 - i32.const 2 - global.set $~argumentsLength - local.get $5 - local.get $6 - local.get $3 - i32.load - call_indirect $0 (type $f64_f64_=>_i32) - i32.const 0 - i32.ge_s - br_if $while-break|1 - local.get $1 - local.tee $0 - i32.const 1 - i32.sub - local.set $1 - local.get $4 - local.get $0 - i32.const 1 - i32.add - i32.const 3 - i32.shl - i32.add - local.get $6 - f64.store - br $while-continue|1 - end - end - end - local.get $4 - local.get $1 - i32.const 1 - i32.add - i32.const 3 - i32.shl - i32.add - local.get $5 - f64.store - local.get $7 - i32.const 1 - i32.add - local.set $7 - br $for-loop|0 - end - end - else - local.get $4 - local.get $8 - local.get $1 - call $~lib/util/sort/weakHeapSort - end - end + (func $assembly/vec4/divide (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $2 - local.set $4 - local.get $0 - local.get $1 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $4 - i32.const 8 - i32.ge_u - if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $4 - i32.const 8 - i32.sub - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $4 - if - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - br $while-continue|2 - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $0 - local.get $4 - i32.add - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $4 - i32.const 8 - i32.ge_u - if - local.get $4 - i32.const 8 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 - local.get $4 - if - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end - end - end - end - ) - (func $~lib/typedarray/Float64Array#copyWithin (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $3 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.tee $4 - local.get $3 - local.get $4 - i32.lt_s - select - local.set $5 - local.get $0 - local.tee $3 - i32.load offset=4 - local.tee $6 + (func $assembly/vec4/distance (param $0 i32) (param $1 i32) (result f64) local.get $1 i32.const 0 - i32.lt_s - if (result i32) - local.get $1 - local.get $4 - i32.add - local.tee $0 - i32.const 0 - local.get $0 - i32.const 0 - i32.gt_s - select - else - local.get $1 - local.get $4 - local.get $1 - local.get $4 - i32.lt_s - select - end - local.tee $1 - i32.const 3 - i32.shl - i32.add - local.get $6 - local.get $2 - i32.const 0 - i32.lt_s - if (result i32) - local.get $2 - local.get $4 - i32.add - local.tee $0 - i32.const 0 - local.get $0 - i32.const 0 - i32.gt_s - select - else - local.get $2 - local.get $4 - local.get $2 - local.get $4 - i32.lt_s - select - end - local.tee $0 - i32.const 3 - i32.shl - i32.add - local.get $5 - i32.const 0 - i32.lt_s - if (result i32) - local.get $4 - local.get $5 - i32.add - local.tee $2 - i32.const 0 - local.get $2 - i32.const 0 - i32.gt_s - select - else - local.get $5 - local.get $4 - local.get $4 - local.get $5 - i32.gt_s - select - end + call $~lib/typedarray/Float64Array#__get local.get $0 - i32.sub - local.tee $2 - local.get $4 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.sub local.get $1 - i32.sub - local.tee $0 - local.get $0 - local.get $2 - i32.gt_s - select - i32.const 3 - i32.shl - call $~lib/memory/memory.copy - local.get $3 - ) - (func $~lib/util/number/decimalCount32 (param $0 i32) (result i32) + i32.const 1 + call $~lib/typedarray/Float64Array#__get local.get $0 - i32.const 10 - i32.ge_u i32.const 1 - i32.add + call $~lib/typedarray/Float64Array#__get + f64.sub + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get local.get $0 - i32.const 10000 - i32.ge_u + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.sub + local.get $1 i32.const 3 - i32.add + call $~lib/typedarray/Float64Array#__get local.get $0 - i32.const 1000 - i32.ge_u - i32.add + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.sub + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $assembly/imports/MathUtil.hypot + ) + (func $assembly/vec4/squaredDistance (param $0 i32) (param $1 i32) (result f64) + (local $2 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get local.get $0 - i32.const 100 - i32.lt_u - select + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.sub + local.tee $2 + local.get $2 + f64.mul + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get local.get $0 - i32.const 1000000 - i32.ge_u - i32.const 6 - i32.add + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.sub + local.tee $2 + local.get $2 + f64.mul + f64.add + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get local.get $0 - i32.const 1000000000 - i32.ge_u - i32.const 8 - i32.add + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.sub + local.tee $2 + local.get $2 + f64.mul + f64.add + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get local.get $0 - i32.const 100000000 - i32.ge_u - i32.add + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.sub + local.tee $2 + local.get $2 + f64.mul + f64.add + ) + (func $assembly/vec4/length (param $0 i32) (result f64) local.get $0 - i32.const 10000000 - i32.lt_u - select + i32.const 0 + call $~lib/typedarray/Float64Array#__get local.get $0 - i32.const 100000 - i32.lt_u - select + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $assembly/imports/MathUtil.hypot ) - (func $~lib/util/number/genDigits (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) - (local $7 i64) - (local $8 i64) - (local $9 i32) - (local $10 i64) - (local $11 i32) - (local $12 i64) - (local $13 i64) - local.get $3 + (func $assembly/vec4/squaredLength (param $0 i32) (result f64) + (local $1 f64) + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.tee $1 local.get $1 - i64.sub - local.set $8 - local.get $3 - i64.const 1 + f64.mul + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.tee $1 + local.get $1 + f64.mul + f64.add + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.tee $1 + local.get $1 + f64.mul + f64.add + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.tee $1 + local.get $1 + f64.mul + f64.add + ) + (func $assembly/vec4/forEach (result i32) + i32.const 2288 + ) + (func $assembly/vec4/copy (param $0 i32) (param $1 i32) (result i32) + local.get $0 i32.const 0 - local.get $4 - i32.sub - local.tee $11 - i64.extend_i32_s - i64.shl - local.tee $10 - i64.const 1 - i64.sub - local.tee $12 - i64.and - local.set $7 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec4/set (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (result i32) + local.get $0 + i32.const 0 + local.get $1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $2 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 local.get $3 - local.get $11 - i64.extend_i32_s - i64.shr_u - i32.wrap_i64 - local.tee $2 - call $~lib/util/number/decimalCount32 - local.set $9 - loop $while-continue|0 - local.get $9 - i32.const 0 - i32.gt_s - if - block $break|1 - block $case10|1 - block $case9|1 - block $case8|1 - block $case7|1 - block $case6|1 - block $case5|1 - block $case4|1 - block $case3|1 - block $case2|1 - block $case1|1 - block $case0|1 - local.get $9 - i32.const 1 - i32.sub - br_table $case9|1 $case8|1 $case7|1 $case6|1 $case5|1 $case4|1 $case3|1 $case2|1 $case1|1 $case0|1 $case10|1 - end - local.get $2 - i32.const 1000000000 - i32.div_u - local.set $4 - local.get $2 - i32.const 1000000000 - i32.rem_u - local.set $2 - br $break|1 - end - local.get $2 - i32.const 100000000 - i32.div_u - local.set $4 - local.get $2 - i32.const 100000000 - i32.rem_u - local.set $2 - br $break|1 - end - local.get $2 - i32.const 10000000 - i32.div_u - local.set $4 - local.get $2 - i32.const 10000000 - i32.rem_u - local.set $2 - br $break|1 - end - local.get $2 - i32.const 1000000 - i32.div_u - local.set $4 - local.get $2 - i32.const 1000000 - i32.rem_u - local.set $2 - br $break|1 - end - local.get $2 - i32.const 100000 - i32.div_u - local.set $4 - local.get $2 - i32.const 100000 - i32.rem_u - local.set $2 - br $break|1 - end - local.get $2 - i32.const 10000 - i32.div_u - local.set $4 - local.get $2 - i32.const 10000 - i32.rem_u - local.set $2 - br $break|1 - end - local.get $2 - i32.const 1000 - i32.div_u - local.set $4 - local.get $2 - i32.const 1000 - i32.rem_u - local.set $2 - br $break|1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $4 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec4/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/quat/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $0 + i32.const 0 + local.get $3 + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.tee $10 + f64.mul + local.get $6 + local.get $7 + f64.mul + f64.add + local.get $4 + local.get $9 + f64.mul + f64.add + local.get $5 + local.get $8 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $4 + local.get $10 + f64.mul + local.get $6 + local.get $8 + f64.mul + f64.add + local.get $5 + local.get $7 + f64.mul + f64.add + local.get $3 + local.get $9 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $5 + local.get $10 + f64.mul + local.get $6 + local.get $9 + f64.mul + f64.add + local.get $3 + local.get $8 + f64.mul + f64.add + local.get $4 + local.get $7 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $6 + local.get $10 + f64.mul + local.get $3 + local.get $7 + f64.mul + f64.sub + local.get $4 + local.get $8 + f64.mul + f64.sub + local.get $5 + local.get $9 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec4/scale (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec4/dot (param $0 i32) (param $1 i32) (result f64) + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.mul + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.add + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.add + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.add + ) + (func $assembly/vec4/lerp (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $0 + i32.const 0 + local.get $4 + local.get $3 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.sub + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $5 + local.get $3 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.sub + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $6 + local.get $3 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $6 + f64.sub + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $7 + local.get $3 + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $7 + f64.sub + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec4/normalize (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.tee $3 + local.get $3 + f64.mul + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.tee $4 + local.get $4 + f64.mul + f64.add + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.tee $5 + local.get $5 + f64.mul + f64.add + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.tee $6 + local.get $6 + f64.mul + f64.add + local.tee $2 + f64.const 0 + f64.gt + if + f64.const 1 + local.get $2 + f64.sqrt + f64.div + local.set $2 + end + local.get $0 + i32.const 0 + local.get $3 + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $4 + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $5 + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $6 + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec4/exactEquals (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.eq + if (result i32) + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + ) + (func $assembly/vec3/dot (param $0 i32) (param $1 i32) (result f64) + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.mul + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.add + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.add + ) + (func $assembly/vec3/cross (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $0 + i32.const 0 + local.get $4 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.tee $8 + f64.mul + local.get $5 + local.get $7 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $5 + local.get $6 + f64.mul + local.get $3 + local.get $8 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $3 + local.get $7 + f64.mul + local.get $4 + local.get $6 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec3/normalize (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.tee $2 + local.get $2 + f64.mul + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.tee $2 + local.get $2 + f64.mul + f64.add + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.tee $2 + local.get $2 + f64.mul + f64.add + local.tee $2 + f64.const 0 + f64.gt + if + f64.const 1 + local.get $2 + f64.sqrt + f64.div + local.set $2 + end + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $~lib/math/pio2_large_quot (param $0 i64) (result i32) + (local $1 i64) + (local $2 i64) + (local $3 i64) + (local $4 i64) + (local $5 i64) + (local $6 i64) + (local $7 i32) + (local $8 i64) + (local $9 i64) + (local $10 i64) + (local $11 i64) + (local $12 f64) + local.get $0 + i64.const 9223372036854775807 + i64.and + i64.const 52 + i64.shr_u + i64.const 1045 + i64.sub + local.tee $4 + i64.const 6 + i64.shr_s + i32.wrap_i64 + i32.const 3 + i32.shl + i32.const 2656 + i32.add + local.tee $7 + i64.load + local.set $6 + local.get $7 + i64.load offset=8 + local.set $3 + local.get $7 + i64.load offset=16 + local.set $1 + local.get $4 + i64.const 63 + i64.and + local.tee $4 + i64.const 0 + i64.ne + if + local.get $6 + local.get $4 + i64.shl + local.get $3 + i64.const 64 + local.get $4 + i64.sub + local.tee $2 + i64.shr_u + i64.or + local.set $6 + local.get $3 + local.get $4 + i64.shl + local.get $1 + local.get $2 + i64.shr_u + i64.or + local.set $3 + local.get $1 + local.get $4 + i64.shl + local.get $7 + i64.load offset=24 + local.get $2 + i64.shr_u + i64.or + local.set $1 + end + local.get $0 + i64.const 4503599627370495 + i64.and + i64.const 4503599627370496 + i64.or + local.tee $4 + i64.const 4294967295 + i64.and + local.tee $2 + local.get $3 + i64.const 32 + i64.shr_u + local.tee $8 + i64.mul + local.get $3 + i64.const 4294967295 + i64.and + local.tee $5 + local.get $2 + i64.mul + local.tee $9 + i64.const 32 + i64.shr_u + i64.add + local.set $3 + local.get $5 + local.get $4 + i64.const 32 + i64.shr_u + local.tee $5 + i64.mul + local.get $3 + i64.const 4294967295 + i64.and + i64.add + local.set $2 + local.get $5 + local.get $8 + i64.mul + local.get $3 + i64.const 32 + i64.shr_u + i64.add + local.get $2 + i64.const 32 + i64.shr_u + i64.add + global.set $~lib/math/res128_hi + local.get $4 + i64.const 32 + i64.shr_s + local.get $1 + i64.const 32 + i64.shr_u + i64.mul + local.tee $3 + local.get $9 + i64.const 4294967295 + i64.and + local.get $2 + i64.const 32 + i64.shl + i64.add + i64.add + local.set $1 + local.get $1 + local.get $3 + i64.lt_u + i64.extend_i32_u + global.get $~lib/math/res128_hi + local.get $4 + local.get $6 + i64.mul + i64.add + i64.add + local.tee $8 + i64.const 2 + i64.shl + local.get $1 + i64.const 62 + i64.shr_u + i64.or + local.tee $6 + i64.const 63 + i64.shr_s + local.tee $4 + i64.const 1 + i64.shr_s + local.get $6 + i64.xor + local.tee $2 + i64.clz + local.set $3 + local.get $2 + local.get $3 + i64.shl + local.get $4 + local.get $1 + i64.const 2 + i64.shl + i64.xor + local.tee $5 + i64.const 64 + local.get $3 + i64.sub + i64.shr_u + i64.or + local.tee $1 + i64.const 4294967295 + i64.and + local.set $2 + local.get $1 + i64.const 32 + i64.shr_u + local.tee $9 + i64.const 560513588 + i64.mul + local.get $2 + i64.const 3373259426 + i64.mul + local.get $2 + i64.const 560513588 + i64.mul + local.tee $10 + i64.const 32 + i64.shr_u + i64.add + local.tee $11 + i64.const 4294967295 + i64.and + i64.add + local.set $2 + local.get $9 + i64.const 3373259426 + i64.mul + local.get $11 + i64.const 32 + i64.shr_u + i64.add + local.get $2 + i64.const 32 + i64.shr_u + i64.add + global.set $~lib/math/res128_hi + local.get $10 + i64.const 4294967295 + i64.and + local.get $2 + i64.const 32 + i64.shl + i64.add + local.tee $2 + local.get $1 + f64.convert_i64_u + f64.const 3.753184150245214e-04 + f64.mul + local.get $5 + local.get $3 + i64.shl + f64.convert_i64_u + f64.const 3.834951969714103e-04 + f64.mul + f64.add + i64.trunc_f64_u + local.tee $1 + i64.lt_u + i64.extend_i32_u + global.get $~lib/math/res128_hi + local.tee $5 + i64.const 11 + i64.shr_u + i64.add + f64.convert_i64_u + global.set $~lib/math/rempio2_y0 + local.get $1 + local.get $5 + i64.const 53 + i64.shl + local.get $2 + i64.const 11 + i64.shr_u + i64.or + i64.add + f64.convert_i64_u + f64.const 5.421010862427522e-20 + f64.mul + global.set $~lib/math/rempio2_y1 + global.get $~lib/math/rempio2_y0 + i64.const 4372995238176751616 + local.get $3 + i64.const 52 + i64.shl + i64.sub + local.get $0 + local.get $6 + i64.xor + i64.const -9223372036854775808 + i64.and + i64.or + f64.reinterpret_i64 + local.tee $12 + f64.mul + global.set $~lib/math/rempio2_y0 + global.get $~lib/math/rempio2_y1 + local.get $12 + f64.mul + global.set $~lib/math/rempio2_y1 + local.get $8 + i64.const 62 + i64.shr_s + local.get $4 + i64.sub + i32.wrap_i64 + ) + (func $~lib/math/NativeMath.sin (param $0 f64) (result f64) + (local $1 f64) + (local $2 i64) + (local $3 f64) + (local $4 f64) + (local $5 i32) + (local $6 i32) + (local $7 f64) + local.get $0 + i64.reinterpret_f64 + local.tee $2 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.tee $5 + i32.const 31 + i32.shr_u + local.set $6 + local.get $5 + i32.const 2147483647 + i32.and + local.tee $5 + i32.const 1072243195 + i32.le_u + if + local.get $5 + i32.const 1045430272 + i32.lt_u + if + local.get $0 + return + end + local.get $0 + local.get $0 + local.get $0 + f64.mul + local.tee $3 + local.get $0 + f64.mul + local.get $3 + local.get $3 + local.get $3 + f64.const 2.7557313707070068e-06 + f64.mul + f64.const -1.984126982985795e-04 + f64.add + f64.mul + f64.const 0.00833333333332249 + f64.add + local.get $3 + local.get $3 + local.get $3 + f64.mul + f64.mul + local.get $3 + f64.const 1.58969099521155e-10 + f64.mul + f64.const -2.5050760253406863e-08 + f64.add + f64.mul + f64.add + f64.mul + f64.const -0.16666666666666632 + f64.add + f64.mul + f64.add + return + end + local.get $5 + i32.const 2146435072 + i32.ge_u + if + local.get $0 + local.get $0 + f64.sub + return + end + block $~lib/math/rempio2|inlined.0 (result i32) + local.get $2 + i64.const 32 + i64.shr_u + i32.wrap_i64 + i32.const 2147483647 + i32.and + local.tee $5 + i32.const 1094263291 + i32.lt_u + if + local.get $5 + i32.const 20 + i32.shr_u + local.tee $6 + local.get $0 + local.get $0 + f64.const 0.6366197723675814 + f64.mul + f64.nearest + local.tee $3 + f64.const 1.5707963267341256 + f64.mul + f64.sub + local.tee $0 + local.get $3 + f64.const 6.077100506506192e-11 + f64.mul + local.tee $4 + f64.sub + local.tee $1 + i64.reinterpret_f64 + i64.const 32 + i64.shr_u + i32.wrap_i64 + i32.const 20 + i32.shr_u + i32.const 2047 + i32.and + i32.sub + i32.const 16 + i32.gt_u + if + local.get $3 + f64.const 2.0222662487959506e-21 + f64.mul + local.get $0 + local.get $0 + local.get $3 + f64.const 6.077100506303966e-11 + f64.mul + local.tee $4 + f64.sub + local.tee $0 + f64.sub + local.get $4 + f64.sub + f64.sub + local.set $4 + local.get $6 + local.get $0 + local.get $4 + f64.sub + local.tee $1 + i64.reinterpret_f64 + i64.const 32 + i64.shr_u + i32.wrap_i64 + i32.const 20 + i32.shr_u + i32.const 2047 + i32.and + i32.sub + i32.const 49 + i32.gt_u + if (result f64) + local.get $3 + f64.const 8.4784276603689e-32 + f64.mul + local.get $0 + local.get $0 + local.get $3 + f64.const 2.0222662487111665e-21 + f64.mul + local.tee $4 + f64.sub + local.tee $0 + f64.sub + local.get $4 + f64.sub + f64.sub + local.set $4 + local.get $0 + local.get $4 + f64.sub + else + local.get $1 + end + local.set $1 + end + local.get $1 + global.set $~lib/math/rempio2_y0 + local.get $0 + local.get $1 + f64.sub + local.get $4 + f64.sub + global.set $~lib/math/rempio2_y1 + local.get $3 + i32.trunc_f64_s + br $~lib/math/rempio2|inlined.0 + end + i32.const 0 + local.get $2 + call $~lib/math/pio2_large_quot + local.tee $5 + i32.sub + local.get $5 + local.get $6 + select + end + local.set $6 + global.get $~lib/math/rempio2_y0 + local.set $3 + global.get $~lib/math/rempio2_y1 + local.set $4 + local.get $6 + i32.const 1 + i32.and + if (result f64) + f64.const 1 + local.get $3 + local.get $3 + f64.mul + local.tee $0 + f64.const 0.5 + f64.mul + local.tee $1 + f64.sub + local.tee $7 + f64.const 1 + local.get $7 + f64.sub + local.get $1 + f64.sub + local.get $0 + local.get $0 + local.get $0 + local.get $0 + f64.const 2.480158728947673e-05 + f64.mul + f64.const -0.001388888888887411 + f64.add + f64.mul + f64.const 0.0416666666666666 + f64.add + f64.mul + local.get $0 + local.get $0 + f64.mul + local.tee $1 + local.get $1 + f64.mul + local.get $0 + local.get $0 + f64.const -1.1359647557788195e-11 + f64.mul + f64.const 2.087572321298175e-09 + f64.add + f64.mul + f64.const -2.7557314351390663e-07 + f64.add + f64.mul + f64.add + f64.mul + local.get $3 + local.get $4 + f64.mul + f64.sub + f64.add + f64.add + else + local.get $3 + local.get $3 + f64.mul + local.tee $0 + local.get $3 + f64.mul + local.set $1 + local.get $3 + local.get $0 + local.get $4 + f64.const 0.5 + f64.mul + local.get $1 + local.get $0 + local.get $0 + f64.const 2.7557313707070068e-06 + f64.mul + f64.const -1.984126982985795e-04 + f64.add + f64.mul + f64.const 0.00833333333332249 + f64.add + local.get $0 + local.get $0 + local.get $0 + f64.mul + f64.mul + local.get $0 + f64.const 1.58969099521155e-10 + f64.mul + f64.const -2.5050760253406863e-08 + f64.add + f64.mul + f64.add + f64.mul + f64.sub + f64.mul + local.get $4 + f64.sub + local.get $1 + f64.const -0.16666666666666632 + f64.mul + f64.sub + f64.sub + end + local.tee $0 + f64.neg + local.get $0 + local.get $6 + i32.const 2 + i32.and + select + ) + (func $~lib/math/NativeMath.cos (param $0 f64) (result f64) + (local $1 f64) + (local $2 i64) + (local $3 f64) + (local $4 f64) + (local $5 i32) + (local $6 i32) + (local $7 f64) + local.get $0 + i64.reinterpret_f64 + local.tee $2 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.tee $5 + i32.const 31 + i32.shr_u + local.set $6 + local.get $5 + i32.const 2147483647 + i32.and + local.tee $5 + i32.const 1072243195 + i32.le_u + if + local.get $5 + i32.const 1044816030 + i32.lt_u + if + f64.const 1 + return + end + f64.const 1 + local.get $0 + local.get $0 + f64.mul + local.tee $3 + f64.const 0.5 + f64.mul + local.tee $4 + f64.sub + local.tee $1 + f64.const 1 + local.get $1 + f64.sub + local.get $4 + f64.sub + local.get $3 + local.get $3 + local.get $3 + local.get $3 + f64.const 2.480158728947673e-05 + f64.mul + f64.const -0.001388888888887411 + f64.add + f64.mul + f64.const 0.0416666666666666 + f64.add + f64.mul + local.get $3 + local.get $3 + f64.mul + local.tee $4 + local.get $4 + f64.mul + local.get $3 + local.get $3 + f64.const -1.1359647557788195e-11 + f64.mul + f64.const 2.087572321298175e-09 + f64.add + f64.mul + f64.const -2.7557314351390663e-07 + f64.add + f64.mul + f64.add + f64.mul + local.get $0 + f64.const 0 + f64.mul + f64.sub + f64.add + f64.add + return + end + local.get $5 + i32.const 2146435072 + i32.ge_u + if + local.get $0 + local.get $0 + f64.sub + return + end + block $~lib/math/rempio2|inlined.1 (result i32) + local.get $2 + i64.const 32 + i64.shr_u + i32.wrap_i64 + i32.const 2147483647 + i32.and + local.tee $5 + i32.const 1094263291 + i32.lt_u + if + local.get $5 + i32.const 20 + i32.shr_u + local.tee $6 + local.get $0 + local.get $0 + f64.const 0.6366197723675814 + f64.mul + f64.nearest + local.tee $3 + f64.const 1.5707963267341256 + f64.mul + f64.sub + local.tee $0 + local.get $3 + f64.const 6.077100506506192e-11 + f64.mul + local.tee $4 + f64.sub + local.tee $1 + i64.reinterpret_f64 + i64.const 32 + i64.shr_u + i32.wrap_i64 + i32.const 20 + i32.shr_u + i32.const 2047 + i32.and + i32.sub + i32.const 16 + i32.gt_u + if + local.get $3 + f64.const 2.0222662487959506e-21 + f64.mul + local.get $0 + local.get $0 + local.get $3 + f64.const 6.077100506303966e-11 + f64.mul + local.tee $4 + f64.sub + local.tee $0 + f64.sub + local.get $4 + f64.sub + f64.sub + local.set $4 + local.get $6 + local.get $0 + local.get $4 + f64.sub + local.tee $1 + i64.reinterpret_f64 + i64.const 32 + i64.shr_u + i32.wrap_i64 + i32.const 20 + i32.shr_u + i32.const 2047 + i32.and + i32.sub + i32.const 49 + i32.gt_u + if (result f64) + local.get $3 + f64.const 8.4784276603689e-32 + f64.mul + local.get $0 + local.get $0 + local.get $3 + f64.const 2.0222662487111665e-21 + f64.mul + local.tee $4 + f64.sub + local.tee $0 + f64.sub + local.get $4 + f64.sub + f64.sub + local.set $4 + local.get $0 + local.get $4 + f64.sub + else + local.get $1 + end + local.set $1 + end + local.get $1 + global.set $~lib/math/rempio2_y0 + local.get $0 + local.get $1 + f64.sub + local.get $4 + f64.sub + global.set $~lib/math/rempio2_y1 + local.get $3 + i32.trunc_f64_s + br $~lib/math/rempio2|inlined.1 + end + i32.const 0 + local.get $2 + call $~lib/math/pio2_large_quot + local.tee $5 + i32.sub + local.get $5 + local.get $6 + select + end + local.set $6 + global.get $~lib/math/rempio2_y0 + local.set $3 + global.get $~lib/math/rempio2_y1 + local.set $4 + local.get $6 + i32.const 1 + i32.and + if (result f64) + local.get $3 + local.get $3 + f64.mul + local.tee $0 + local.get $3 + f64.mul + local.set $1 + local.get $3 + local.get $0 + local.get $4 + f64.const 0.5 + f64.mul + local.get $1 + local.get $0 + local.get $0 + f64.const 2.7557313707070068e-06 + f64.mul + f64.const -1.984126982985795e-04 + f64.add + f64.mul + f64.const 0.00833333333332249 + f64.add + local.get $0 + local.get $0 + local.get $0 + f64.mul + f64.mul + local.get $0 + f64.const 1.58969099521155e-10 + f64.mul + f64.const -2.5050760253406863e-08 + f64.add + f64.mul + f64.add + f64.mul + f64.sub + f64.mul + local.get $4 + f64.sub + local.get $1 + f64.const -0.16666666666666632 + f64.mul + f64.sub + f64.sub + else + f64.const 1 + local.get $3 + local.get $3 + f64.mul + local.tee $0 + f64.const 0.5 + f64.mul + local.tee $1 + f64.sub + local.tee $7 + f64.const 1 + local.get $7 + f64.sub + local.get $1 + f64.sub + local.get $0 + local.get $0 + local.get $0 + local.get $0 + f64.const 2.480158728947673e-05 + f64.mul + f64.const -0.001388888888887411 + f64.add + f64.mul + f64.const 0.0416666666666666 + f64.add + f64.mul + local.get $0 + local.get $0 + f64.mul + local.tee $1 + local.get $1 + f64.mul + local.get $0 + local.get $0 + f64.const -1.1359647557788195e-11 + f64.mul + f64.const 2.087572321298175e-09 + f64.add + f64.mul + f64.const -2.7557314351390663e-07 + f64.add + f64.mul + f64.add + f64.mul + local.get $3 + local.get $4 + f64.mul + f64.sub + f64.add + f64.add + end + local.tee $0 + f64.neg + local.get $0 + local.get $6 + i32.const 1 + i32.add + i32.const 2 + i32.and + select + ) + (func $assembly/quat/setAxisAngle (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 f64) + local.get $0 + i32.const 0 + local.get $2 + f64.const 0.5 + f64.mul + local.tee $3 + call $~lib/math/NativeMath.sin + local.tee $2 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $2 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $3 + call $~lib/math/NativeMath.cos + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/quat/rotationTo (result i32) + i32.const 2880 + ) + (func $~lib/math/R (param $0 f64) (result f64) + local.get $0 + local.get $0 + local.get $0 + local.get $0 + local.get $0 + local.get $0 + f64.const 3.479331075960212e-05 + f64.mul + f64.const 7.915349942898145e-04 + f64.add + f64.mul + f64.const -0.04005553450067941 + f64.add + f64.mul + f64.const 0.20121253213486293 + f64.add + f64.mul + f64.const -0.3255658186224009 + f64.add + f64.mul + f64.const 0.16666666666666666 + f64.add + f64.mul + local.get $0 + local.get $0 + local.get $0 + local.get $0 + f64.const 0.07703815055590194 + f64.mul + f64.const -0.6882839716054533 + f64.add + f64.mul + f64.const 2.0209457602335057 + f64.add + f64.mul + f64.const -2.403394911734414 + f64.add + f64.mul + f64.const 1 + f64.add + f64.div + ) + (func $~lib/math/NativeMath.acos (param $0 f64) (result f64) + (local $1 f64) + (local $2 i32) + (local $3 i32) + (local $4 f64) + local.get $0 + i64.reinterpret_f64 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.tee $3 + i32.const 2147483647 + i32.and + local.tee $2 + i32.const 1072693248 + i32.ge_u + if + local.get $0 + i64.reinterpret_f64 + i32.wrap_i64 + local.get $2 + i32.const 1072693248 + i32.sub + i32.or + i32.eqz + if + local.get $3 + i32.const 31 + i32.shr_u + if + f64.const 3.141592653589793 + return + end + f64.const 0 + return + end + f64.const 0 + local.get $0 + local.get $0 + f64.sub + f64.div + return + end + local.get $2 + i32.const 1071644672 + i32.lt_u + if + local.get $2 + i32.const 1012924416 + i32.le_u + if + f64.const 1.5707963267948966 + return + end + f64.const 1.5707963267948966 + local.get $0 + f64.const 6.123233995736766e-17 + local.get $0 + local.get $0 + local.get $0 + f64.mul + call $~lib/math/R + f64.mul + f64.sub + f64.sub + f64.sub + return + end + local.get $3 + i32.const 31 + i32.shr_u + if + f64.const 1.5707963267948966 + local.get $0 + f64.const 0.5 + f64.mul + f64.const 0.5 + f64.add + local.tee $0 + f64.sqrt + local.tee $1 + local.get $0 + call $~lib/math/R + local.get $1 + f64.mul + f64.const 6.123233995736766e-17 + f64.sub + f64.add + f64.sub + local.tee $0 + local.get $0 + f64.add + return + end + f64.const 0.5 + local.get $0 + f64.const 0.5 + f64.mul + f64.sub + local.tee $1 + f64.sqrt + local.tee $4 + i64.reinterpret_f64 + i64.const -4294967296 + i64.and + f64.reinterpret_i64 + local.tee $0 + local.get $1 + call $~lib/math/R + local.get $4 + f64.mul + local.get $1 + local.get $0 + local.get $0 + f64.mul + f64.sub + local.get $4 + local.get $0 + f64.add + f64.div + f64.add + f64.add + local.tee $0 + local.get $0 + f64.add + ) + (func $assembly/quat/slerp (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $12 + f64.const 1 + local.get $9 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.tee $5 + f64.mul + local.get $10 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.tee $6 + f64.mul + f64.add + local.get $11 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.tee $7 + f64.mul + f64.add + local.get $12 + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.tee $8 + f64.mul + f64.add + local.tee $4 + f64.const 0 + f64.lt + if + local.get $5 + f64.neg + local.set $5 + local.get $6 + f64.neg + local.set $6 + local.get $7 + f64.neg + local.set $7 + local.get $8 + f64.neg + local.set $8 + local.get $4 + f64.neg + local.set $4 + end + local.get $4 + f64.sub + f64.const 1e-06 + f64.gt + if + local.get $4 + call $~lib/math/NativeMath.acos + local.tee $13 + call $~lib/math/NativeMath.sin + local.set $14 + f64.const 1 + local.get $3 + f64.sub + local.get $13 + f64.mul + call $~lib/math/NativeMath.sin + local.get $14 + f64.div + local.set $4 + local.get $3 + local.get $13 + f64.mul + call $~lib/math/NativeMath.sin + local.get $14 + f64.div + local.set $3 + else + f64.const 1 + local.get $3 + f64.sub + local.set $4 + end + local.get $0 + i32.const 0 + local.get $4 + local.get $9 + f64.mul + local.get $3 + local.get $5 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $4 + local.get $10 + f64.mul + local.get $3 + local.get $6 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $4 + local.get $11 + f64.mul + local.get $3 + local.get $7 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $4 + local.get $12 + f64.mul + local.get $3 + local.get $8 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/quat/sqlerp (result i32) + i32.const 2912 + ) + (func $assembly/quat/fromMat3 (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + f64.add + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + f64.add + local.tee $2 + f64.const 0 + f64.gt + if + local.get $0 + i32.const 3 + local.get $2 + f64.const 1 + f64.add + f64.sqrt + local.tee $2 + f64.const 0.5 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 0 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + f64.sub + f64.const 0.5 + local.get $2 + f64.div + local.tee $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.sub + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.sub + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + else + local.get $0 + i32.const 2 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.gt + local.tee $3 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.get $1 + local.get $3 + local.get $3 + i32.const 3 + i32.mul + i32.add + call $~lib/typedarray/Float64Array#__get + f64.gt + select + local.tee $3 + local.get $1 + local.get $3 + local.get $3 + i32.const 3 + i32.mul + local.tee $6 + i32.add + call $~lib/typedarray/Float64Array#__get + local.get $1 + local.get $3 + i32.const 1 + i32.add + i32.const 3 + i32.rem_s + local.tee $4 + local.get $4 + i32.const 3 + i32.mul + local.tee $7 + i32.add + call $~lib/typedarray/Float64Array#__get + f64.sub + local.get $1 + local.get $3 + i32.const 2 + i32.add + i32.const 3 + i32.rem_s + local.tee $5 + local.get $5 + i32.const 3 + i32.mul + local.tee $8 + i32.add + call $~lib/typedarray/Float64Array#__get + f64.sub + f64.const 1 + f64.add + f64.sqrt + local.tee $2 + f64.const 0.5 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + local.get $5 + local.get $7 + i32.add + call $~lib/typedarray/Float64Array#__get + local.get $1 + local.get $4 + local.get $8 + i32.add + call $~lib/typedarray/Float64Array#__get + f64.sub + f64.const 0.5 + local.get $2 + f64.div + local.tee $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + local.get $4 + local.get $1 + local.get $3 + local.get $7 + i32.add + call $~lib/typedarray/Float64Array#__get + local.get $1 + local.get $4 + local.get $6 + i32.add + call $~lib/typedarray/Float64Array#__get + f64.add + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + local.get $5 + local.get $1 + local.get $3 + local.get $8 + i32.add + call $~lib/typedarray/Float64Array#__get + local.get $1 + local.get $5 + local.get $6 + i32.add + call $~lib/typedarray/Float64Array#__get + f64.add + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + end + local.get $0 + ) + (func $assembly/quat/setAxes (result i32) + i32.const 2944 + ) + (func $assembly/quat2/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 f64) + (local $16 f64) + (local $17 f64) + (local $18 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $2 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $2 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $12 + local.get $2 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $13 + local.get $2 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $14 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $15 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $16 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $17 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $18 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $0 + i32.const 0 + local.get $3 + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.tee $10 + f64.mul + local.get $6 + local.get $7 + f64.mul + f64.add + local.get $4 + local.get $9 + f64.mul + f64.add + local.get $5 + local.get $8 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $4 + local.get $10 + f64.mul + local.get $6 + local.get $8 + f64.mul + f64.add + local.get $5 + local.get $7 + f64.mul + f64.add + local.get $3 + local.get $9 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $5 + local.get $10 + f64.mul + local.get $6 + local.get $9 + f64.mul + f64.add + local.get $3 + local.get $8 + f64.mul + f64.add + local.get $4 + local.get $7 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $6 + local.get $10 + f64.mul + local.get $3 + local.get $7 + f64.mul + f64.sub + local.get $4 + local.get $8 + f64.mul + f64.sub + local.get $5 + local.get $9 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $3 + local.get $14 + f64.mul + local.get $6 + local.get $11 + f64.mul + f64.add + local.get $4 + local.get $13 + f64.mul + f64.add + local.get $5 + local.get $12 + f64.mul + f64.sub + local.get $15 + local.get $10 + f64.mul + f64.add + local.get $18 + local.get $7 + f64.mul + f64.add + local.get $16 + local.get $9 + f64.mul + f64.add + local.get $17 + local.get $8 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $4 + local.get $14 + f64.mul + local.get $6 + local.get $12 + f64.mul + f64.add + local.get $5 + local.get $11 + f64.mul + f64.add + local.get $3 + local.get $13 + f64.mul + f64.sub + local.get $16 + local.get $10 + f64.mul + f64.add + local.get $18 + local.get $8 + f64.mul + f64.add + local.get $17 + local.get $7 + f64.mul + f64.add + local.get $15 + local.get $9 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $5 + local.get $14 + f64.mul + local.get $6 + local.get $13 + f64.mul + f64.add + local.get $3 + local.get $12 + f64.mul + f64.add + local.get $4 + local.get $11 + f64.mul + f64.sub + local.get $17 + local.get $10 + f64.mul + f64.add + local.get $18 + local.get $9 + f64.mul + f64.add + local.get $15 + local.get $8 + f64.mul + f64.add + local.get $16 + local.get $7 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $6 + local.get $14 + f64.mul + local.get $3 + local.get $11 + f64.mul + f64.sub + local.get $4 + local.get $12 + f64.mul + f64.sub + local.get $5 + local.get $13 + f64.mul + f64.sub + local.get $18 + local.get $10 + f64.mul + f64.add + local.get $15 + local.get $7 + f64.mul + f64.sub + local.get $16 + local.get $8 + f64.mul + f64.sub + local.get $17 + local.get $9 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $~lib/math/tan_kern (param $0 f64) (param $1 f64) (param $2 i32) (result f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 i32) + (local $7 i32) + local.get $0 + i64.reinterpret_f64 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.tee $6 + i32.const 2147483647 + i32.and + i32.const 1072010280 + i32.ge_u + local.tee $7 + if + f64.const 0.7853981633974483 + local.get $6 + i32.const 0 + i32.lt_s + if (result f64) + local.get $1 + f64.neg + local.set $1 + local.get $0 + f64.neg + else + local.get $0 + end + f64.sub + f64.const 3.061616997868383e-17 + local.get $1 + f64.sub + f64.add + local.set $0 + f64.const 0 + local.set $1 + end + local.get $0 + local.get $0 + f64.mul + local.tee $4 + local.get $0 + f64.mul + local.set $5 + local.get $0 + local.get $1 + local.get $4 + local.get $5 + local.get $4 + local.get $4 + f64.mul + local.tee $3 + local.get $3 + local.get $3 + local.get $3 + local.get $3 + f64.const -1.8558637485527546e-05 + f64.mul + f64.const 7.817944429395571e-05 + f64.add + f64.mul + f64.const 5.880412408202641e-04 + f64.add + f64.mul + f64.const 3.5920791075913124e-03 + f64.add + f64.mul + f64.const 0.021869488294859542 + f64.add + f64.mul + f64.const 0.13333333333320124 + f64.add + local.get $4 + local.get $3 + local.get $3 + local.get $3 + local.get $3 + local.get $3 + f64.const 2.590730518636337e-05 + f64.mul + f64.const 7.140724913826082e-05 + f64.add + f64.mul + f64.const 2.464631348184699e-04 + f64.add + f64.mul + f64.const 1.4562094543252903e-03 + f64.add + f64.mul + f64.const 0.0088632398235993 + f64.add + f64.mul + f64.const 0.05396825397622605 + f64.add + f64.mul + f64.add + f64.mul + local.get $1 + f64.add + f64.mul + f64.add + local.get $5 + f64.const 0.3333333333333341 + f64.mul + f64.add + local.tee $3 + f64.add + local.set $1 + local.get $7 + if + f64.const 1 + local.get $6 + i32.const 30 + i32.shr_s + i32.const 2 + i32.and + f64.convert_i32_s + f64.sub + local.get $2 + f64.convert_i32_s + local.tee $4 + local.get $0 + local.get $1 + local.get $1 + f64.mul + local.get $1 + local.get $4 + f64.add + f64.div + local.get $3 + f64.sub + f64.sub + local.tee $0 + local.get $0 + f64.add + f64.sub + f64.mul + return + end + local.get $2 + i32.const 1 + i32.eq + if + local.get $1 + return + end + f64.const -1 + local.get $1 + f64.div + local.tee $5 + i64.reinterpret_f64 + i64.const -4294967296 + i64.and + f64.reinterpret_i64 + local.tee $4 + local.get $5 + local.get $4 + local.get $1 + i64.reinterpret_f64 + i64.const -4294967296 + i64.and + f64.reinterpret_i64 + local.tee $1 + f64.mul + f64.const 1 + f64.add + local.get $4 + local.get $3 + local.get $1 + local.get $0 + f64.sub + f64.sub + f64.mul + f64.add + f64.mul + f64.add + ) + (func $~lib/math/NativeMath.tan (param $0 f64) (result f64) + (local $1 f64) + (local $2 i64) + (local $3 f64) + (local $4 i32) + (local $5 f64) + (local $6 i32) + local.get $0 + i64.reinterpret_f64 + local.tee $2 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.tee $4 + i32.const 31 + i32.shr_u + local.set $6 + local.get $4 + i32.const 2147483647 + i32.and + local.tee $4 + i32.const 1072243195 + i32.le_u + if + local.get $4 + i32.const 1044381696 + i32.lt_s + if + local.get $0 + return + end + local.get $0 + f64.const 0 + i32.const 1 + call $~lib/math/tan_kern + return + end + local.get $4 + i32.const 2146435072 + i32.ge_s + if + local.get $0 + local.get $0 + f64.sub + return + end + block $~lib/math/rempio2|inlined.2 (result i32) + local.get $2 + i64.const 32 + i64.shr_u + i32.wrap_i64 + i32.const 2147483647 + i32.and + local.tee $4 + i32.const 1094263291 + i32.lt_u + if + local.get $4 + i32.const 20 + i32.shr_u + local.tee $6 + local.get $0 + local.get $0 + f64.const 0.6366197723675814 + f64.mul + f64.nearest + local.tee $5 + f64.const 1.5707963267341256 + f64.mul + f64.sub + local.tee $0 + local.get $5 + f64.const 6.077100506506192e-11 + f64.mul + local.tee $3 + f64.sub + local.tee $1 + i64.reinterpret_f64 + i64.const 32 + i64.shr_u + i32.wrap_i64 + i32.const 20 + i32.shr_u + i32.const 2047 + i32.and + i32.sub + i32.const 16 + i32.gt_u + if + local.get $5 + f64.const 2.0222662487959506e-21 + f64.mul + local.get $0 + local.get $0 + local.get $5 + f64.const 6.077100506303966e-11 + f64.mul + local.tee $3 + f64.sub + local.tee $0 + f64.sub + local.get $3 + f64.sub + f64.sub + local.set $3 + local.get $6 + local.get $0 + local.get $3 + f64.sub + local.tee $1 + i64.reinterpret_f64 + i64.const 32 + i64.shr_u + i32.wrap_i64 + i32.const 20 + i32.shr_u + i32.const 2047 + i32.and + i32.sub + i32.const 49 + i32.gt_u + if (result f64) + local.get $5 + f64.const 8.4784276603689e-32 + f64.mul + local.get $0 + local.get $0 + local.get $5 + f64.const 2.0222662487111665e-21 + f64.mul + local.tee $3 + f64.sub + local.tee $0 + f64.sub + local.get $3 + f64.sub + f64.sub + local.set $3 + local.get $0 + local.get $3 + f64.sub + else + local.get $1 + end + local.set $1 + end + local.get $1 + global.set $~lib/math/rempio2_y0 + local.get $0 + local.get $1 + f64.sub + local.get $3 + f64.sub + global.set $~lib/math/rempio2_y1 + local.get $5 + i32.trunc_f64_s + br $~lib/math/rempio2|inlined.2 + end + i32.const 0 + local.get $2 + call $~lib/math/pio2_large_quot + local.tee $4 + i32.sub + local.get $4 + local.get $6 + select + end + local.set $6 + global.get $~lib/math/rempio2_y0 + global.get $~lib/math/rempio2_y1 + i32.const 1 + local.get $6 + i32.const 1 + i32.and + i32.const 1 + i32.shl + i32.sub + call $~lib/math/tan_kern + ) + (func $assembly/mat4/perspectiveNO (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) + local.get $0 + i32.const 0 + f64.const 1 + local.get $1 + f64.const 0.5 + f64.mul + call $~lib/math/NativeMath.tan + f64.div + local.tee $1 + local.get $2 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + f64.const -1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $4 + f64.convert_i32_u + f64.const inf + f64.ne + i32.const 0 + local.get $4 + select + if + local.get $0 + i32.const 10 + local.get $4 + f64.convert_i32_u + local.get $3 + f64.add + f64.const 1 + local.get $3 + local.get $4 + f64.convert_i32_u + f64.sub + f64.div + local.tee $1 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $4 + f64.convert_i32_u + local.tee $2 + local.get $2 + f64.add + local.get $3 + f64.mul + local.get $1 + f64.mul + call $~lib/typedarray/Float64Array#__set + else + local.get $0 + i32.const 10 + f64.const -1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $3 + f64.const -2 + f64.mul + call $~lib/typedarray/Float64Array#__set + end + local.get $0 + ) + (func $assembly/mat4/orthoNO (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (result i32) + (local $7 f64) + (local $8 f64) + (local $9 f64) + local.get $0 + i32.const 0 + f64.const 1 + local.get $1 + local.get $2 + f64.sub + f64.div + local.tee $8 + f64.const -2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 1 + local.get $3 + local.get $4 + f64.sub + f64.div + local.tee $9 + f64.const -2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + f64.const 1 + local.get $5 + local.get $6 + f64.sub + f64.div + local.tee $7 + local.get $7 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + local.get $1 + local.get $2 + f64.add + local.get $8 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $4 + local.get $3 + f64.add + local.get $9 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $6 + local.get $5 + f64.add + local.get $7 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat4/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 f64) + (local $16 f64) + (local $17 f64) + (local $18 f64) + (local $19 f64) + (local $20 f64) + (local $21 f64) + (local $22 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $12 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $13 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $14 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $15 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.set $16 + local.get $1 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.set $17 + local.get $1 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.set $18 + local.get $1 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + local.set $19 + local.get $1 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + local.set $20 + local.get $1 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + local.set $21 + local.get $1 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + local.set $22 + local.get $0 + i32.const 0 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.tee $3 + local.get $7 + f64.mul + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.tee $4 + local.get $8 + f64.mul + f64.add + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.tee $5 + local.get $9 + f64.mul + f64.add + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.tee $6 + local.get $19 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $3 + local.get $10 + f64.mul + local.get $4 + local.get $13 + f64.mul + f64.add + local.get $5 + local.get $16 + f64.mul + f64.add + local.get $6 + local.get $20 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $3 + local.get $11 + f64.mul + local.get $4 + local.get $14 + f64.mul + f64.add + local.get $5 + local.get $17 + f64.mul + f64.add + local.get $6 + local.get $21 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $3 + local.get $12 + f64.mul + local.get $4 + local.get $15 + f64.mul + f64.add + local.get $5 + local.get $18 + f64.mul + f64.add + local.get $6 + local.get $22 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $2 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.tee $3 + local.get $7 + f64.mul + local.get $2 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.tee $4 + local.get $8 + f64.mul + f64.add + local.get $2 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.tee $5 + local.get $9 + f64.mul + f64.add + local.get $2 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.tee $6 + local.get $19 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $3 + local.get $10 + f64.mul + local.get $4 + local.get $13 + f64.mul + f64.add + local.get $5 + local.get $16 + f64.mul + f64.add + local.get $6 + local.get $20 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $3 + local.get $11 + f64.mul + local.get $4 + local.get $14 + f64.mul + f64.add + local.get $5 + local.get $17 + f64.mul + f64.add + local.get $6 + local.get $21 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $3 + local.get $12 + f64.mul + local.get $4 + local.get $15 + f64.mul + f64.add + local.get $5 + local.get $18 + f64.mul + f64.add + local.get $6 + local.get $22 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $2 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.tee $3 + local.get $7 + f64.mul + local.get $2 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.tee $4 + local.get $8 + f64.mul + f64.add + local.get $2 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.tee $5 + local.get $9 + f64.mul + f64.add + local.get $2 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.tee $6 + local.get $19 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $3 + local.get $10 + f64.mul + local.get $4 + local.get $13 + f64.mul + f64.add + local.get $5 + local.get $16 + f64.mul + f64.add + local.get $6 + local.get $20 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + local.get $3 + local.get $11 + f64.mul + local.get $4 + local.get $14 + f64.mul + f64.add + local.get $5 + local.get $17 + f64.mul + f64.add + local.get $6 + local.get $21 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + local.get $3 + local.get $12 + f64.mul + local.get $4 + local.get $15 + f64.mul + f64.add + local.get $5 + local.get $18 + f64.mul + f64.add + local.get $6 + local.get $22 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + local.get $2 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + local.tee $3 + local.get $7 + f64.mul + local.get $2 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + local.tee $7 + local.get $8 + f64.mul + f64.add + local.get $2 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + local.tee $8 + local.get $9 + f64.mul + f64.add + local.get $2 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + local.tee $9 + local.get $19 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $3 + local.get $10 + f64.mul + local.get $7 + local.get $13 + f64.mul + f64.add + local.get $8 + local.get $16 + f64.mul + f64.add + local.get $9 + local.get $20 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $3 + local.get $11 + f64.mul + local.get $7 + local.get $14 + f64.mul + f64.add + local.get $8 + local.get $17 + f64.mul + f64.add + local.get $9 + local.get $21 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + local.get $3 + local.get $12 + f64.mul + local.get $7 + local.get $15 + f64.mul + f64.add + local.get $8 + local.get $18 + f64.mul + f64.add + local.get $9 + local.get $22 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat4/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + local.get $1 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + local.get $1 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + local.get $1 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $1 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $1 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + local.get $1 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat3/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 f64) + (local $16 f64) + (local $17 f64) + (local $18 f64) + (local $19 f64) + (local $20 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $12 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $13 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $14 + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $15 + local.get $2 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $16 + local.get $2 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $17 + local.get $2 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $18 + local.get $2 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $19 + local.get $2 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.set $20 + local.get $0 + i32.const 0 + local.get $12 + local.get $3 + f64.mul + local.get $13 + local.get $6 + f64.mul + f64.add + local.get $14 + local.get $9 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $12 + local.get $4 + f64.mul + local.get $13 + local.get $7 + f64.mul + f64.add + local.get $14 + local.get $10 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $12 + local.get $5 + f64.mul + local.get $13 + local.get $8 + f64.mul + f64.add + local.get $14 + local.get $11 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $15 + local.get $3 + f64.mul + local.get $16 + local.get $6 + f64.mul + f64.add + local.get $17 + local.get $9 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $15 + local.get $4 + f64.mul + local.get $16 + local.get $7 + f64.mul + f64.add + local.get $17 + local.get $10 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $15 + local.get $5 + f64.mul + local.get $16 + local.get $8 + f64.mul + f64.add + local.get $17 + local.get $11 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $18 + local.get $3 + f64.mul + local.get $19 + local.get $6 + f64.mul + f64.add + local.get $20 + local.get $9 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $18 + local.get $4 + f64.mul + local.get $19 + local.get $7 + f64.mul + f64.add + local.get $20 + local.get $10 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $18 + local.get $5 + f64.mul + local.get $19 + local.get $8 + f64.mul + f64.add + local.get $20 + local.get $11 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat3/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $~lib/math/NativeMath.hypot (param $0 f64) (param $1 f64) (result f64) + (local $2 i64) + (local $3 i64) + (local $4 i64) + (local $5 f64) + (local $6 i32) + (local $7 f64) + (local $8 i32) + (local $9 f64) + (local $10 f64) + (local $11 f64) + local.get $1 + i64.reinterpret_f64 + i64.const 9223372036854775807 + i64.and + local.tee $2 + local.get $0 + i64.reinterpret_f64 + i64.const 9223372036854775807 + i64.and + local.tee $3 + i64.gt_u + if + local.get $3 + local.get $2 + local.set $3 + local.set $2 + end + local.get $2 + f64.reinterpret_i64 + local.set $1 + local.get $2 + i64.const 52 + i64.shr_u + i32.wrap_i64 + local.tee $6 + i32.const 2047 + i32.eq + if + local.get $1 + return + end + local.get $3 + f64.reinterpret_i64 + local.set $0 + i32.const 1 + local.get $2 + i64.eqz + local.get $3 + i64.const 52 + i64.shr_u + i32.wrap_i64 + local.tee $8 + i32.const 2047 + i32.eq + select + if + local.get $0 + return + end + local.get $8 + local.get $6 + i32.sub + i32.const 64 + i32.gt_s + if + local.get $0 + local.get $1 + f64.add + return + end + f64.const 1 + local.set $7 + local.get $8 + i32.const 1533 + i32.gt_u + if (result f64) + f64.const 5260135901548373507240989e186 + local.set $7 + local.get $1 + f64.const 1.90109156629516e-211 + f64.mul + local.set $1 + local.get $0 + f64.const 1.90109156629516e-211 + f64.mul + else + local.get $6 + i32.const 573 + i32.lt_u + if (result f64) + f64.const 1.90109156629516e-211 + local.set $7 + local.get $1 + f64.const 5260135901548373507240989e186 + f64.mul + local.set $1 + local.get $0 + f64.const 5260135901548373507240989e186 + f64.mul + else + local.get $0 + end + end + local.set $0 + local.get $1 + local.get $1 + local.get $1 + f64.const 134217729 + f64.mul + local.tee $11 + f64.sub + local.get $11 + f64.add + local.tee $10 + f64.sub + local.set $5 + local.get $0 + local.get $0 + local.get $0 + f64.const 134217729 + f64.mul + local.tee $11 + f64.sub + local.get $11 + f64.add + local.tee $9 + f64.sub + local.set $11 + local.get $7 + local.get $10 + local.get $10 + f64.mul + local.get $1 + local.get $1 + f64.mul + local.tee $1 + f64.sub + local.get $10 + local.get $10 + f64.add + local.get $5 + f64.add + local.get $5 + f64.mul + f64.add + local.get $9 + local.get $9 + f64.mul + local.get $0 + local.get $0 + f64.mul + local.tee $0 + f64.sub + local.get $9 + local.get $9 + f64.add + local.get $11 + f64.add + local.get $11 + f64.mul + f64.add + f64.add + local.get $1 + f64.add + local.get $0 + f64.add + f64.sqrt + f64.mul + ) + (func $assembly/vec2/length (param $0 i32) (result f64) + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/math/NativeMath.hypot + ) + (func $assembly/vec2/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec2/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec2/divide (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec2/distance (param $0 i32) (param $1 i32) (result f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.sub + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.sub + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $assembly/imports/MathUtil.hypot + ) + (func $assembly/vec2/squaredDistance (param $0 i32) (param $1 i32) (result f64) + (local $2 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.sub + local.tee $2 + local.get $2 + f64.mul + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.sub + local.tee $2 + local.get $2 + f64.mul + f64.add + ) + (func $assembly/vec2/squaredLength (param $0 i32) (result f64) + (local $1 f64) + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.tee $1 + local.get $1 + f64.mul + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.tee $1 + local.get $1 + f64.mul + f64.add + ) + (func $assembly/vec2/forEach (result i32) + i32.const 3424 + ) + (func $assembly/mat2/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $0 + i32.const 0 + local.get $3 + local.get $7 + f64.mul + local.get $5 + local.get $8 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $4 + local.get $7 + f64.mul + local.get $6 + local.get $8 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $3 + local.get $9 + f64.mul + local.get $5 + local.get $10 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $4 + local.get $9 + f64.mul + local.get $6 + local.get $10 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/common/toRadian (param $0 f64) (result f64) + local.get $0 + f64.const 0.017453292519943295 + f64.mul + ) + (func $assembly/common/equals (param $0 f64) (param $1 f64) (result i32) + local.get $0 + local.get $1 + f64.sub + f64.abs + f64.const 1 + local.get $0 + f64.abs + local.get $1 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + ) + (func $~lib/util/number/decimalCount32 (param $0 i32) (result i32) + local.get $0 + i32.const 10 + i32.ge_u + i32.const 1 + i32.add + local.get $0 + i32.const 10000 + i32.ge_u + i32.const 3 + i32.add + local.get $0 + i32.const 1000 + i32.ge_u + i32.add + local.get $0 + i32.const 100 + i32.lt_u + select + local.get $0 + i32.const 1000000 + i32.ge_u + i32.const 6 + i32.add + local.get $0 + i32.const 1000000000 + i32.ge_u + i32.const 8 + i32.add + local.get $0 + i32.const 100000000 + i32.ge_u + i32.add + local.get $0 + i32.const 10000000 + i32.lt_u + select + local.get $0 + i32.const 100000 + i32.lt_u + select + ) + (func $~lib/util/number/genDigits (param $0 i64) (param $1 i32) (param $2 i64) (param $3 i32) (param $4 i64) (param $5 i32) (result i32) + (local $6 i64) + (local $7 i32) + (local $8 i64) + (local $9 i32) + (local $10 i64) + (local $11 i64) + local.get $2 + local.get $0 + i64.sub + local.set $8 + local.get $2 + i64.const 1 + i32.const 0 + local.get $3 + i32.sub + local.tee $9 + i64.extend_i32_s + i64.shl + local.tee $10 + i64.const 1 + i64.sub + local.tee $11 + i64.and + local.set $6 + local.get $2 + local.get $9 + i64.extend_i32_s + i64.shr_u + i32.wrap_i64 + local.tee $1 + call $~lib/util/number/decimalCount32 + local.set $7 + loop $while-continue|0 + local.get $7 + i32.const 0 + i32.gt_s + if + block $break|1 + block $case10|1 + block $case9|1 + block $case8|1 + block $case7|1 + block $case6|1 + block $case5|1 + block $case4|1 + block $case3|1 + block $case2|1 + block $case1|1 + block $case0|1 + local.get $7 + i32.const 1 + i32.sub + br_table $case9|1 $case8|1 $case7|1 $case6|1 $case5|1 $case4|1 $case3|1 $case2|1 $case1|1 $case0|1 $case10|1 + end + local.get $1 + i32.const 1000000000 + i32.div_u + local.set $3 + local.get $1 + i32.const 1000000000 + i32.rem_u + local.set $1 + br $break|1 + end + local.get $1 + i32.const 100000000 + i32.div_u + local.set $3 + local.get $1 + i32.const 100000000 + i32.rem_u + local.set $1 + br $break|1 + end + local.get $1 + i32.const 10000000 + i32.div_u + local.set $3 + local.get $1 + i32.const 10000000 + i32.rem_u + local.set $1 + br $break|1 + end + local.get $1 + i32.const 1000000 + i32.div_u + local.set $3 + local.get $1 + i32.const 1000000 + i32.rem_u + local.set $1 + br $break|1 + end + local.get $1 + i32.const 100000 + i32.div_u + local.set $3 + local.get $1 + i32.const 100000 + i32.rem_u + local.set $1 + br $break|1 + end + local.get $1 + i32.const 10000 + i32.div_u + local.set $3 + local.get $1 + i32.const 10000 + i32.rem_u + local.set $1 + br $break|1 + end + local.get $1 + i32.const 1000 + i32.div_u + local.set $3 + local.get $1 + i32.const 1000 + i32.rem_u + local.set $1 + br $break|1 + end + local.get $1 + i32.const 100 + i32.div_u + local.set $3 + local.get $1 + i32.const 100 + i32.rem_u + local.set $1 + br $break|1 + end + local.get $1 + i32.const 10 + i32.div_u + local.set $3 + local.get $1 + i32.const 10 + i32.rem_u + local.set $1 + br $break|1 + end + local.get $1 + local.set $3 + i32.const 0 + local.set $1 + br $break|1 + end + i32.const 0 + local.set $3 + end + local.get $3 + local.get $5 + i32.or + if + local.get $5 + i32.const 1 + i32.shl + i32.const 3696 + i32.add + local.get $3 + i32.const 65535 + i32.and + i32.const 48 + i32.add + i32.store16 + local.get $5 + i32.const 1 + i32.add + local.set $5 + end + local.get $7 + i32.const 1 + i32.sub + local.set $7 + local.get $6 + local.get $1 + i64.extend_i32_u + local.get $9 + i64.extend_i32_s + i64.shl + i64.add + local.tee $0 + local.get $4 + i64.le_u + if + local.get $7 + global.get $~lib/util/number/_K + i32.add + global.set $~lib/util/number/_K + local.get $7 + i32.const 2 + i32.shl + i32.const 4624 + i32.add + i64.load32_u + local.get $9 + i64.extend_i32_s + i64.shl + local.set $2 + local.get $5 + i32.const 1 + i32.shl + i32.const 3694 + i32.add + local.tee $3 + i32.load16_u + local.set $1 + loop $while-continue|3 + i32.const 1 + local.get $8 + local.get $0 + i64.sub + local.get $0 + local.get $2 + i64.add + local.tee $6 + local.get $8 + i64.sub + i64.gt_u + local.get $6 + local.get $8 + i64.lt_u + select + i32.const 0 + local.get $2 + local.get $4 + local.get $0 + i64.sub + i64.le_u + i32.const 0 + local.get $0 + local.get $8 + i64.lt_u + select + select + if + local.get $1 + i32.const 1 + i32.sub + local.set $1 + local.get $0 + local.get $2 + i64.add + local.set $0 + br $while-continue|3 + end + end + local.get $3 + local.get $1 + i32.store16 + local.get $5 + return + end + br $while-continue|0 + end + end + local.get $9 + i64.extend_i32_s + local.set $0 + loop $while-continue|4 + local.get $4 + i64.const 10 + i64.mul + local.set $4 + local.get $6 + i64.const 10 + i64.mul + local.tee $2 + local.get $0 + i64.shr_u + local.tee $6 + local.get $5 + i64.extend_i32_s + i64.or + i64.const 0 + i64.ne + if + local.get $5 + i32.const 1 + i32.shl + i32.const 3696 + i32.add + local.get $6 + i32.wrap_i64 + i32.const 65535 + i32.and + i32.const 48 + i32.add + i32.store16 + local.get $5 + i32.const 1 + i32.add + local.set $5 + end + local.get $7 + i32.const 1 + i32.sub + local.set $7 + local.get $4 + local.get $2 + local.get $11 + i64.and + local.tee $6 + i64.le_u + br_if $while-continue|4 + end + local.get $7 + global.get $~lib/util/number/_K + i32.add + global.set $~lib/util/number/_K + local.get $6 + local.set $0 + local.get $8 + i32.const 0 + local.get $7 + i32.sub + i32.const 2 + i32.shl + i32.const 4624 + i32.add + i64.load32_u + i64.mul + local.set $2 + local.get $5 + i32.const 1 + i32.shl + i32.const 3694 + i32.add + local.tee $3 + i32.load16_u + local.set $1 + loop $while-continue|6 + i32.const 1 + local.get $2 + local.get $0 + i64.sub + local.get $0 + local.get $10 + i64.add + local.tee $6 + local.get $2 + i64.sub + i64.gt_u + local.get $2 + local.get $6 + i64.gt_u + select + i32.const 0 + local.get $10 + local.get $4 + local.get $0 + i64.sub + i64.le_u + i32.const 0 + local.get $0 + local.get $2 + i64.lt_u + select + select + if + local.get $1 + i32.const 1 + i32.sub + local.set $1 + local.get $0 + local.get $10 + i64.add + local.set $0 + br $while-continue|6 + end + end + local.get $3 + local.get $1 + i32.store16 + local.get $5 + ) + (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + block $~lib/util/memory/memmove|inlined.0 + local.get $2 + local.set $4 + local.get $0 + local.get $1 + i32.eq + br_if $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.lt_u + if + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|0 + local.get $0 + i32.const 7 + i32.and + if + local.get $4 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $4 + i32.const 1 + i32.sub + local.set $4 + local.get $0 + local.tee $2 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $2 + local.get $3 + i32.load8_u + i32.store8 + br $while-continue|0 + end + end + loop $while-continue|1 + local.get $4 + i32.const 8 + i32.ge_u + if + local.get $0 + local.get $1 + i64.load + i64.store + local.get $4 + i32.const 8 + i32.sub + local.set $4 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + br $while-continue|1 + end + end + end + loop $while-continue|2 + local.get $4 + if + local.get $0 + local.tee $2 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $2 + local.get $3 + i32.load8_u + i32.store8 + local.get $4 + i32.const 1 + i32.sub + local.set $4 + br $while-continue|2 + end + end + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|3 + local.get $0 + local.get $4 + i32.add + i32.const 7 + i32.and + if + local.get $4 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $4 + i32.const 1 + i32.sub + local.tee $4 + local.get $0 + i32.add + local.get $1 + local.get $4 + i32.add + i32.load8_u + i32.store8 + br $while-continue|3 + end + end + loop $while-continue|4 + local.get $4 + i32.const 8 + i32.ge_u + if + local.get $4 + i32.const 8 + i32.sub + local.tee $4 + local.get $0 + i32.add + local.get $1 + local.get $4 + i32.add + i64.load + i64.store + br $while-continue|4 + end + end + end + loop $while-continue|5 + local.get $4 + if + local.get $4 + i32.const 1 + i32.sub + local.tee $4 + local.get $0 + i32.add + local.get $1 + local.get $4 + i32.add + i32.load8_u + i32.store8 + br $while-continue|5 + end + end + end + end + ) + (func $~lib/util/number/utoa_dec_simple (param $0 i32) (param $1 i32) (param $2 i32) + loop $do-continue|0 + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.const 1 + i32.shl + i32.add + local.get $1 + i32.const 10 + i32.rem_u + i32.const 48 + i32.add + i32.store16 + local.get $1 + i32.const 10 + i32.div_u + local.tee $1 + br_if $do-continue|0 + end + ) + (func $~lib/util/number/prettify (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + local.get $2 + i32.eqz + if + local.get $0 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.const 3145774 + i32.store + local.get $1 + i32.const 2 + i32.add + return + end + local.get $1 + local.get $2 + i32.add + local.tee $3 + i32.const 21 + i32.le_s + i32.const 0 + local.get $1 + local.get $3 + i32.le_s + select + if (result i32) + loop $for-loop|0 + local.get $1 + local.get $3 + i32.lt_s + if + local.get $0 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.const 48 + i32.store16 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|0 + end + end + local.get $0 + local.get $3 + i32.const 1 + i32.shl + i32.add + i32.const 3145774 + i32.store + local.get $3 + i32.const 2 + i32.add + else + local.get $3 + i32.const 21 + i32.le_s + i32.const 0 + local.get $3 + i32.const 0 + i32.gt_s + select + if (result i32) + local.get $0 + local.get $3 + i32.const 1 + i32.shl + i32.add + local.tee $0 + i32.const 2 + i32.add + local.get $0 + i32.const 0 + local.get $2 + i32.sub + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $0 + i32.const 46 + i32.store16 + local.get $1 + i32.const 1 + i32.add + else + local.get $3 + i32.const 0 + i32.le_s + i32.const 0 + local.get $3 + i32.const -6 + i32.gt_s + select + if (result i32) + local.get $0 + i32.const 2 + local.get $3 + i32.sub + local.tee $3 + i32.const 1 + i32.shl + i32.add + local.get $0 + local.get $1 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $0 + i32.const 3014704 + i32.store + i32.const 2 + local.set $2 + loop $for-loop|1 + local.get $2 + local.get $3 + i32.lt_s + if + local.get $0 + local.get $2 + i32.const 1 + i32.shl + i32.add + i32.const 48 + i32.store16 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|1 + end + end + local.get $1 + local.get $3 + i32.add + else + local.get $1 + i32.const 1 + i32.eq + if (result i32) + local.get $0 + i32.const 101 + i32.store16 offset=2 + local.get $0 + local.tee $1 + i32.const 4 + i32.add + local.get $3 + i32.const 1 + i32.sub + local.tee $0 + i32.const 0 + i32.lt_s + local.tee $2 + if + i32.const 0 + local.get $0 + i32.sub + local.set $0 + end + local.get $0 + local.get $0 + call $~lib/util/number/decimalCount32 + i32.const 1 + i32.add + local.tee $0 + call $~lib/util/number/utoa_dec_simple + local.get $1 + i32.const 45 + i32.const 43 + local.get $2 + select + i32.store16 offset=4 + local.get $0 + i32.const 2 + i32.add + else + local.get $0 + i32.const 4 + i32.add + local.get $0 + i32.const 2 + i32.add + local.get $1 + i32.const 1 + i32.shl + local.tee $2 + i32.const 2 + i32.sub + call $~lib/memory/memory.copy + local.get $0 + i32.const 46 + i32.store16 offset=2 + local.get $0 + local.get $2 + i32.add + local.tee $0 + i32.const 101 + i32.store16 offset=2 + local.get $0 + local.tee $2 + i32.const 4 + i32.add + local.get $3 + i32.const 1 + i32.sub + local.tee $0 + i32.const 0 + i32.lt_s + local.tee $3 + if + i32.const 0 + local.get $0 + i32.sub + local.set $0 + end + local.get $0 + local.get $0 + call $~lib/util/number/decimalCount32 + i32.const 1 + i32.add + local.tee $0 + call $~lib/util/number/utoa_dec_simple + local.get $2 + i32.const 45 + i32.const 43 + local.get $3 + select + i32.store16 offset=4 + local.get $0 + local.get $1 + i32.add + i32.const 2 + i32.add + end + end + end + end + ) + (func $~lib/util/number/dtoa_core (param $0 f64) (result i32) + (local $1 i64) + (local $2 i32) + (local $3 i64) + (local $4 i64) + (local $5 i64) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i64) + (local $10 i64) + (local $11 i64) + local.get $0 + f64.const 0 + f64.lt + local.tee $8 + if (result f64) + i32.const 3696 + i32.const 45 + i32.store16 + local.get $0 + f64.neg + else + local.get $0 + end + i64.reinterpret_f64 + local.tee $3 + i64.const 9218868437227405312 + i64.and + i64.const 52 + i64.shr_u + i32.wrap_i64 + local.tee $6 + i32.const 0 + i32.ne + i64.extend_i32_u + i64.const 52 + i64.shl + local.get $3 + i64.const 4503599627370495 + i64.and + i64.add + local.tee $1 + i64.const 1 + i64.shl + i64.const 1 + i64.add + local.tee $3 + i64.clz + i32.wrap_i64 + local.set $2 + local.get $3 + local.get $2 + i64.extend_i32_s + i64.shl + global.set $~lib/util/number/_frc_plus + local.get $6 + i32.const 1 + local.get $6 + select + i32.const 1075 + i32.sub + local.tee $6 + i32.const 1 + i32.sub + local.get $2 + i32.sub + local.set $2 + local.get $1 + local.get $1 + i64.const 4503599627370496 + i64.eq + i32.const 1 + i32.add + local.tee $7 + i64.extend_i32_s + i64.shl + i64.const 1 + i64.sub + local.get $6 + local.get $7 + i32.sub + local.get $2 + i32.sub + i64.extend_i32_s + i64.shl + global.set $~lib/util/number/_frc_minus + local.get $2 + global.set $~lib/util/number/_exp + i32.const 348 + i32.const -61 + global.get $~lib/util/number/_exp + i32.sub + f64.convert_i32_s + f64.const 0.30102999566398114 + f64.mul + f64.const 347 + f64.add + local.tee $0 + i32.trunc_f64_s + local.tee $2 + local.get $0 + local.get $2 + f64.convert_i32_s + f64.ne + i32.add + i32.const 3 + i32.shr_s + i32.const 1 + i32.add + local.tee $2 + i32.const 3 + i32.shl + local.tee $7 + i32.sub + global.set $~lib/util/number/_K + local.get $7 + i32.const 3752 + i32.add + i64.load + global.set $~lib/util/number/_frc_pow + local.get $2 + i32.const 1 + i32.shl + i32.const 4448 + i32.add + i32.load16_s + global.set $~lib/util/number/_exp_pow + global.get $~lib/util/number/_frc_pow + local.tee $4 + i64.const 32 + i64.shr_u + local.set $3 + local.get $4 + i64.const 4294967295 + i64.and + local.tee $4 + global.get $~lib/util/number/_frc_plus + local.tee $5 + i64.const 32 + i64.shr_u + local.tee $10 + i64.mul + local.get $4 + local.get $5 + i64.const 4294967295 + i64.and + local.tee $11 + i64.mul + i64.const 32 + i64.shr_u + i64.add + local.set $5 + local.get $8 + i32.const 1 + i32.shl + i32.const 3696 + i32.add + local.get $3 + local.get $1 + local.get $1 + i64.clz + i32.wrap_i64 + local.tee $2 + i64.extend_i32_s + i64.shl + local.tee $1 + i64.const 32 + i64.shr_u + local.tee $9 + i64.mul + local.get $4 + local.get $9 + i64.mul + local.get $4 + local.get $1 + i64.const 4294967295 + i64.and + local.tee $1 + i64.mul + i64.const 32 + i64.shr_u + i64.add + local.tee $9 + i64.const 32 + i64.shr_u + i64.add + local.get $1 + local.get $3 + i64.mul + local.get $9 + i64.const 4294967295 + i64.and + i64.add + i64.const 2147483647 + i64.add + i64.const 32 + i64.shr_u + i64.add + global.get $~lib/util/number/_exp_pow + local.tee $7 + local.get $6 + local.get $2 + i32.sub + i32.add + i32.const -64 + i32.sub + local.get $3 + local.get $10 + i64.mul + local.get $5 + i64.const 32 + i64.shr_u + i64.add + local.get $3 + local.get $11 + i64.mul + local.get $5 + i64.const 4294967295 + i64.and + i64.add + i64.const 2147483647 + i64.add + i64.const 32 + i64.shr_u + i64.add + i64.const 1 + i64.sub + local.tee $1 + local.get $7 + global.get $~lib/util/number/_exp + i32.add + i32.const -64 + i32.sub + local.get $1 + local.get $3 + global.get $~lib/util/number/_frc_minus + local.tee $1 + i64.const 32 + i64.shr_u + local.tee $5 + i64.mul + local.get $4 + local.get $5 + i64.mul + local.get $4 + local.get $1 + i64.const 4294967295 + i64.and + local.tee $4 + i64.mul + i64.const 32 + i64.shr_u + i64.add + local.tee $1 + i64.const 32 + i64.shr_u + i64.add + local.get $3 + local.get $4 + i64.mul + local.get $1 + i64.const 4294967295 + i64.and + i64.add + i64.const 2147483647 + i64.add + i64.const 32 + i64.shr_u + i64.add + i64.const 1 + i64.add + i64.sub + local.get $8 + call $~lib/util/number/genDigits + local.get $8 + i32.sub + global.get $~lib/util/number/_K + call $~lib/util/number/prettify + local.get $8 + i32.add + ) + (func $~lib/number/F64#toString (param $0 f64) (result i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + block $__inlined_func$~lib/util/number/dtoa + local.get $0 + f64.const 0 + f64.eq + if + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + i32.const 3552 + local.set $1 + br $__inlined_func$~lib/util/number/dtoa + end + local.get $0 + local.get $0 + f64.sub + f64.const 0 + f64.ne + if + local.get $0 + local.get $0 + f64.ne + if + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + i32.const 3584 + local.set $1 + br $__inlined_func$~lib/util/number/dtoa + end + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + i32.const 3616 + i32.const 3664 + local.get $0 + f64.const 0 + f64.lt + select + local.set $1 + br $__inlined_func$~lib/util/number/dtoa + end + local.get $0 + call $~lib/util/number/dtoa_core + i32.const 1 + i32.shl + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.const 1 + call $~lib/rt/itcms/__new + local.tee $1 + i32.store + local.get $1 + i32.const 3696 + local.get $2 + call $~lib/memory/memory.copy + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + end + local.get $1 + ) + (func $~lib/string/String.__concat (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + block $__inlined_func$~lib/string/String#concat + local.get $1 + i32.const 20 + i32.sub + i32.load offset=16 + i32.const 1 + i32.shr_u + i32.const 1 + i32.shl + local.tee $4 + local.get $0 + local.tee $2 + i32.const 20 + i32.sub + i32.load offset=16 + i32.const 1 + i32.shr_u + i32.const 1 + i32.shl + local.tee $3 + i32.add + local.tee $0 + i32.eqz + if + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + i32.const 4688 + local.set $0 + br $__inlined_func$~lib/string/String#concat + end + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.const 1 + call $~lib/rt/itcms/__new + local.tee $0 + i32.store + local.get $0 + local.get $2 + local.get $3 + call $~lib/memory/memory.copy + local.get $0 + local.get $3 + i32.add + local.get $1 + local.get $4 + call $~lib/memory/memory.copy + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + end + local.get $0 + ) + (func $~lib/array/Array<~lib/typedarray/Float64Array>#__uset (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store + local.get $0 + local.get $2 + i32.const 1 + call $~lib/rt/itcms/__link + ) + (func $assembly/mat2/equals (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $2 + local.get $6 + f64.sub + f64.abs + f64.const 1 + local.get $2 + f64.abs + local.get $6 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + if (result i32) + local.get $3 + local.get $7 + f64.sub + f64.abs + f64.const 1 + local.get $3 + f64.abs + local.get $7 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $4 + local.get $8 + f64.sub + f64.abs + f64.const 1 + local.get $4 + f64.abs + local.get $8 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $5 + local.get $9 + f64.sub + f64.abs + f64.const 1 + local.get $5 + f64.abs + local.get $9 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + ) + (func $assembly/mat2d/invert (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $3 + local.get $6 + f64.mul + local.get $4 + local.get $5 + f64.mul + f64.sub + local.tee $2 + i64.reinterpret_f64 + i64.const 1 + i64.shl + i64.const 2 + i64.sub + i64.const -9007199254740994 + i64.gt_u + if + i32.const 0 + return + end + local.get $0 + i32.const 0 + local.get $6 + f64.const 1 + local.get $2 + f64.div + local.tee $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $4 + f64.neg + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $5 + f64.neg + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $3 + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $5 + local.get $8 + f64.mul + local.get $6 + local.get $7 + f64.mul + f64.sub + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $4 + local.get $7 + f64.mul + local.get $3 + local.get $8 + f64.mul + f64.sub + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat2d/rotate (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $2 + call $~lib/math/NativeMath.sin + local.set $3 + local.get $0 + i32.const 0 + local.get $4 + local.get $2 + call $~lib/math/NativeMath.cos + local.tee $2 + f64.mul + local.get $6 + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $5 + local.get $2 + f64.mul + local.get $7 + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $4 + local.get $3 + f64.neg + f64.mul + local.get $6 + local.get $2 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $5 + local.get $3 + f64.neg + f64.mul + local.get $7 + local.get $2 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $8 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $9 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat2d/equals (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $0 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $0 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $12 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $13 + local.get $2 + local.get $8 + f64.sub + f64.abs + f64.const 1 + local.get $2 + f64.abs + local.get $8 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + if (result i32) + local.get $3 + local.get $9 + f64.sub + f64.abs + f64.const 1 + local.get $3 + f64.abs + local.get $9 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $4 + local.get $10 + f64.sub + f64.abs + f64.const 1 + local.get $4 + f64.abs + local.get $10 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $5 + local.get $11 + f64.sub + f64.abs + f64.const 1 + local.get $5 + f64.abs + local.get $11 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $6 + local.get $12 + f64.sub + f64.abs + f64.const 1 + local.get $6 + f64.abs + local.get $12 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $7 + local.get $13 + f64.sub + f64.abs + f64.const 1 + local.get $7 + f64.abs + local.get $13 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + ) + (func $assembly/mat3/transpose (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + local.get $0 + local.get $1 + i32.eq + if + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $0 + i32.const 1 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $2 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $3 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $4 + call $~lib/typedarray/Float64Array#__set + else + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + end + local.get $0 + ) + (func $assembly/mat3/invert (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $3 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.tee $11 + local.get $7 + f64.mul + local.get $8 + local.get $10 + f64.mul + f64.sub + local.tee $2 + f64.mul + local.get $4 + local.get $11 + f64.neg + local.get $6 + f64.mul + local.get $8 + local.get $9 + f64.mul + f64.add + local.tee $12 + f64.mul + f64.add + local.get $5 + local.get $10 + local.get $6 + f64.mul + local.get $7 + local.get $9 + f64.mul + f64.sub + local.tee $13 + f64.mul + f64.add + local.tee $14 + i64.reinterpret_f64 + i64.const 1 + i64.shl + i64.const 2 + i64.sub + i64.const -9007199254740994 + i64.gt_u + if + i32.const 0 + return + end + local.get $0 + i32.const 0 + local.get $2 + f64.const 1 + local.get $14 + f64.div + local.tee $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $11 + f64.neg + local.get $4 + f64.mul + local.get $5 + local.get $10 + f64.mul + f64.add + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $8 + local.get $4 + f64.mul + local.get $5 + local.get $7 + f64.mul + f64.sub + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $12 + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $11 + local.get $3 + f64.mul + local.get $5 + local.get $9 + f64.mul + f64.sub + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $8 + f64.neg + local.get $3 + f64.mul + local.get $5 + local.get $6 + f64.mul + f64.add + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $13 + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $10 + f64.neg + local.get $3 + f64.mul + local.get $4 + local.get $9 + f64.mul + f64.add + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $7 + local.get $3 + f64.mul + local.get $4 + local.get $6 + f64.mul + f64.sub + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat3/adjoint (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $0 + i32.const 0 + local.get $6 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.tee $10 + f64.mul + local.get $7 + local.get $9 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $4 + local.get $9 + f64.mul + local.get $3 + local.get $10 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $3 + local.get $7 + f64.mul + local.get $4 + local.get $6 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $7 + local.get $8 + f64.mul + local.get $5 + local.get $10 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $2 + local.get $10 + f64.mul + local.get $4 + local.get $8 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $4 + local.get $5 + f64.mul + local.get $2 + local.get $7 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $5 + local.get $9 + f64.mul + local.get $6 + local.get $8 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $3 + local.get $8 + f64.mul + local.get $2 + local.get $9 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $2 + local.get $6 + f64.mul + local.get $3 + local.get $5 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat3/translate (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $12 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.set $13 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $0 + i32.const 0 + local.get $5 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $6 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $7 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $8 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $9 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $10 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $3 + local.get $5 + f64.mul + local.get $4 + local.get $8 + f64.mul + f64.add + local.get $11 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $3 + local.get $6 + f64.mul + local.get $4 + local.get $9 + f64.mul + f64.add + local.get $12 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $3 + local.get $7 + f64.mul + local.get $4 + local.get $10 + f64.mul + f64.add + local.get $13 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat3/rotate (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.set $12 + local.get $2 + call $~lib/math/NativeMath.sin + local.set $3 + local.get $0 + i32.const 0 + local.get $2 + call $~lib/math/NativeMath.cos + local.tee $2 + local.get $4 + f64.mul + local.get $3 + local.get $7 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $2 + local.get $5 + f64.mul + local.get $3 + local.get $8 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $2 + local.get $6 + f64.mul + local.get $3 + local.get $9 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $2 + local.get $7 + f64.mul + local.get $3 + local.get $4 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $2 + local.get $8 + f64.mul + local.get $3 + local.get $5 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $2 + local.get $9 + f64.mul + local.get $3 + local.get $6 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $10 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $11 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $12 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat3/fromQuat (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.tee $3 + local.get $3 + f64.add + local.set $5 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $0 + i32.const 0 + f64.const 1 + local.get $2 + local.get $2 + local.get $2 + f64.add + local.tee $7 + f64.mul + local.tee $8 + f64.sub + local.get $3 + local.get $5 + f64.mul + local.tee $9 + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $2 + local.get $4 + local.get $4 + f64.add + local.tee $2 + f64.mul + local.tee $10 + local.get $6 + local.get $5 + f64.mul + local.tee $5 + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $3 + local.get $2 + f64.mul + local.tee $11 + local.get $6 + local.get $7 + f64.mul + local.tee $12 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $10 + local.get $5 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 1 + local.get $4 + local.get $2 + f64.mul + f64.sub + local.tee $4 + local.get $9 + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $3 + local.get $7 + f64.mul + local.tee $3 + local.get $6 + local.get $2 + f64.mul + local.tee $2 + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $11 + local.get $12 + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $3 + local.get $2 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $4 + local.get $8 + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat3/normalFromMat4 (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 f64) + (local $16 f64) + (local $17 f64) + (local $18 f64) + (local $19 f64) + (local $20 f64) + (local $21 f64) + (local $22 f64) + (local $23 f64) + (local $24 f64) + (local $25 f64) + (local $26 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $12 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $13 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + local.set $14 + local.get $1 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + local.set $15 + local.get $1 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + local.set $16 + local.get $8 + local.get $12 + f64.mul + local.get $9 + local.get $11 + f64.mul + f64.sub + local.tee $24 + local.get $7 + local.get $1 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + local.tee $17 + f64.mul + local.get $3 + local.get $16 + f64.mul + f64.sub + local.tee $18 + f64.mul + local.get $8 + local.get $13 + f64.mul + local.get $10 + local.get $11 + f64.mul + f64.sub + local.tee $25 + local.get $6 + local.get $17 + f64.mul + local.get $3 + local.get $15 + f64.mul + f64.sub + local.tee $19 + f64.mul + f64.sub + local.get $8 + local.get $5 + f64.mul + local.get $4 + local.get $11 + f64.mul + f64.sub + local.tee $20 + local.get $6 + local.get $16 + f64.mul + local.get $7 + local.get $15 + f64.mul + f64.sub + local.tee $21 + f64.mul + f64.add + local.get $9 + local.get $13 + f64.mul + local.get $10 + local.get $12 + f64.mul + f64.sub + local.tee $26 + local.get $2 + local.get $17 + f64.mul + local.get $3 + local.get $14 + f64.mul + f64.sub + local.tee $3 + f64.mul + f64.add + local.get $9 + local.get $5 + f64.mul + local.get $4 + local.get $12 + f64.mul + f64.sub + local.tee $22 + local.get $2 + local.get $16 + f64.mul + local.get $7 + local.get $14 + f64.mul + f64.sub + local.tee $7 + f64.mul + f64.sub + local.get $10 + local.get $5 + f64.mul + local.get $4 + local.get $13 + f64.mul + f64.sub + local.tee $23 + local.get $2 + local.get $15 + f64.mul + local.get $6 + local.get $14 + f64.mul + f64.sub + local.tee $6 + f64.mul + f64.add + local.tee $2 + i64.reinterpret_f64 + i64.const 1 + i64.shl + i64.const 2 + i64.sub + i64.const -9007199254740994 + i64.gt_u + if + i32.const 0 + return + end + local.get $0 + i32.const 0 + local.get $12 + local.get $18 + f64.mul + local.get $13 + local.get $19 + f64.mul + f64.sub + local.get $5 + local.get $21 + f64.mul + f64.add + f64.const 1 + local.get $2 + f64.div + local.tee $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $13 + local.get $3 + f64.mul + local.get $11 + local.get $18 + f64.mul + f64.sub + local.get $5 + local.get $7 + f64.mul + f64.sub + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $11 + local.get $19 + f64.mul + local.get $12 + local.get $3 + f64.mul + f64.sub + local.get $5 + local.get $6 + f64.mul + f64.add + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $10 + local.get $19 + f64.mul + local.get $9 + local.get $18 + f64.mul + f64.sub + local.get $4 + local.get $21 + f64.mul + f64.sub + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $8 + local.get $18 + f64.mul + local.get $10 + local.get $3 + f64.mul + f64.sub + local.get $4 + local.get $7 + f64.mul + f64.add + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $9 + local.get $3 + f64.mul + local.get $8 + local.get $19 + f64.mul + f64.sub + local.get $4 + local.get $6 + f64.mul + f64.sub + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $15 + local.get $23 + f64.mul + local.get $16 + local.get $22 + f64.mul + f64.sub + local.get $17 + local.get $26 + f64.mul + f64.add + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $16 + local.get $20 + f64.mul + local.get $14 + local.get $23 + f64.mul + f64.sub + local.get $17 + local.get $25 + f64.mul + f64.sub + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $14 + local.get $22 + f64.mul + local.get $15 + local.get $20 + f64.mul + f64.sub + local.get $17 + local.get $24 + f64.mul + f64.add + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat3/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat3/multiplyScalarAndAdd (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat3/equals (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 f64) + (local $16 f64) + (local $17 f64) + (local $18 f64) + (local $19 f64) + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $0 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $0 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $0 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $0 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $0 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $12 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $13 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $14 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $15 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $16 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $17 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $18 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.set $19 + local.get $2 + local.get $11 + f64.sub + f64.abs + f64.const 1 + local.get $2 + f64.abs + local.get $11 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + if (result i32) + local.get $3 + local.get $12 + f64.sub + f64.abs + f64.const 1 + local.get $3 + f64.abs + local.get $12 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $4 + local.get $13 + f64.sub + f64.abs + f64.const 1 + local.get $4 + f64.abs + local.get $13 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $5 + local.get $14 + f64.sub + f64.abs + f64.const 1 + local.get $5 + f64.abs + local.get $14 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $6 + local.get $15 + f64.sub + f64.abs + f64.const 1 + local.get $6 + f64.abs + local.get $15 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $7 + local.get $16 + f64.sub + f64.abs + f64.const 1 + local.get $7 + f64.abs + local.get $16 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $8 + local.get $17 + f64.sub + f64.abs + f64.const 1 + local.get $8 + f64.abs + local.get $17 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $9 + local.get $18 + f64.sub + f64.abs + f64.const 1 + local.get $9 + f64.abs + local.get $18 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $10 + local.get $19 + f64.sub + f64.abs + f64.const 1 + local.get $10 + f64.abs + local.get $19 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + ) + (func $assembly/mat4/copy (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + local.get $1 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + local.get $1 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + local.get $1 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $1 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $1 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + local.get $1 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat4/identity (param $0 i32) (result i32) + local.get $0 + i32.const 0 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat4/transpose (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + local.get $0 + local.get $1 + i32.eq + if + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $0 + i32.const 1 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $2 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $3 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $5 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + local.get $1 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + local.get $4 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $6 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $7 + call $~lib/typedarray/Float64Array#__set + else + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + local.get $1 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + local.get $1 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $1 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + local.get $1 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + end + local.get $0 + ) + (func $assembly/mat4/invert (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 f64) + (local $16 f64) + (local $17 f64) + (local $18 f64) + (local $19 f64) + (local $20 f64) + (local $21 f64) + (local $22 f64) + (local $23 f64) + (local $24 f64) + (local $25 f64) + (local $26 f64) + (local $27 f64) + (local $28 f64) + (local $29 f64) + (local $30 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.set $12 + local.get $1 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.set $13 + local.get $1 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.set $14 + local.get $1 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + local.set $15 + local.get $1 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + local.set $16 + local.get $1 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + local.set $17 + local.get $3 + local.get $8 + f64.mul + local.get $4 + local.get $7 + f64.mul + f64.sub + local.tee $19 + local.get $13 + local.get $1 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + local.tee $18 + f64.mul + local.get $14 + local.get $17 + f64.mul + f64.sub + local.tee $20 + f64.mul + local.get $3 + local.get $9 + f64.mul + local.get $5 + local.get $7 + f64.mul + f64.sub + local.tee $21 + local.get $12 + local.get $18 + f64.mul + local.get $14 + local.get $16 + f64.mul + f64.sub + local.tee $22 + f64.mul + f64.sub + local.get $3 + local.get $10 + f64.mul + local.get $6 + local.get $7 + f64.mul + f64.sub + local.tee $23 + local.get $12 + local.get $17 + f64.mul + local.get $13 + local.get $16 + f64.mul + f64.sub + local.tee $24 + f64.mul + f64.add + local.get $4 + local.get $9 + f64.mul + local.get $5 + local.get $8 + f64.mul + f64.sub + local.tee $25 + local.get $11 + local.get $18 + f64.mul + local.get $14 + local.get $15 + f64.mul + f64.sub + local.tee $26 + f64.mul + f64.add + local.get $4 + local.get $10 + f64.mul + local.get $6 + local.get $8 + f64.mul + f64.sub + local.tee $27 + local.get $11 + local.get $17 + f64.mul + local.get $13 + local.get $15 + f64.mul + f64.sub + local.tee $28 + f64.mul + f64.sub + local.get $5 + local.get $10 + f64.mul + local.get $6 + local.get $9 + f64.mul + f64.sub + local.tee $29 + local.get $11 + local.get $16 + f64.mul + local.get $12 + local.get $15 + f64.mul + f64.sub + local.tee $30 + f64.mul + f64.add + local.tee $2 + i64.reinterpret_f64 + i64.const 1 + i64.shl + i64.const 2 + i64.sub + i64.const -9007199254740994 + i64.gt_u + if + i32.const 0 + return + end + local.get $0 + i32.const 0 + local.get $8 + local.get $20 + f64.mul + local.get $9 + local.get $22 + f64.mul + f64.sub + local.get $10 + local.get $24 + f64.mul + f64.add + f64.const 1 + local.get $2 + f64.div + local.tee $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $5 + local.get $22 + f64.mul + local.get $4 + local.get $20 + f64.mul + f64.sub + local.get $6 + local.get $24 + f64.mul + f64.sub + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $16 + local.get $29 + f64.mul + local.get $17 + local.get $27 + f64.mul + f64.sub + local.get $18 + local.get $25 + f64.mul + f64.add + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $13 + local.get $27 + f64.mul + local.get $12 + local.get $29 + f64.mul + f64.sub + local.get $14 + local.get $25 + f64.mul + f64.sub + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $9 + local.get $26 + f64.mul + local.get $7 + local.get $20 + f64.mul + f64.sub + local.get $10 + local.get $28 + f64.mul + f64.sub + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $3 + local.get $20 + f64.mul + local.get $5 + local.get $26 + f64.mul + f64.sub + local.get $6 + local.get $28 + f64.mul + f64.add + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $17 + local.get $23 + f64.mul + local.get $15 + local.get $29 + f64.mul + f64.sub + local.get $18 + local.get $21 + f64.mul + f64.sub + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $11 + local.get $29 + f64.mul + local.get $13 + local.get $23 + f64.mul + f64.sub + local.get $14 + local.get $21 + f64.mul + f64.add + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $7 + local.get $22 + f64.mul + local.get $8 + local.get $26 + f64.mul + f64.sub + local.get $10 + local.get $30 + f64.mul + f64.add + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $4 + local.get $26 + f64.mul + local.get $3 + local.get $22 + f64.mul + f64.sub + local.get $6 + local.get $30 + f64.mul + f64.sub + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + local.get $15 + local.get $27 + f64.mul + local.get $16 + local.get $23 + f64.mul + f64.sub + local.get $18 + local.get $19 + f64.mul + f64.add + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + local.get $12 + local.get $23 + f64.mul + local.get $11 + local.get $27 + f64.mul + f64.sub + local.get $14 + local.get $19 + f64.mul + f64.sub + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + local.get $8 + local.get $28 + f64.mul + local.get $7 + local.get $24 + f64.mul + f64.sub + local.get $9 + local.get $30 + f64.mul + f64.sub + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $3 + local.get $24 + f64.mul + local.get $4 + local.get $28 + f64.mul + f64.sub + local.get $5 + local.get $30 + f64.mul + f64.add + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $16 + local.get $21 + f64.mul + local.get $15 + local.get $25 + f64.mul + f64.sub + local.get $17 + local.get $19 + f64.mul + f64.sub + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + local.get $11 + local.get $25 + f64.mul + local.get $12 + local.get $21 + f64.mul + f64.sub + local.get $13 + local.get $19 + f64.mul + f64.add + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat4/adjoint (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 f64) + (local $16 f64) + (local $17 f64) + (local $18 f64) + (local $19 f64) + (local $20 f64) + (local $21 f64) + (local $22 f64) + (local $23 f64) + (local $24 f64) + (local $25 f64) + (local $26 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.set $12 + local.get $1 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.set $13 + local.get $1 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.set $14 + local.get $1 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + local.set $15 + local.get $1 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + local.set $16 + local.get $1 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + local.set $17 + local.get $0 + i32.const 0 + local.get $9 + local.get $13 + local.get $1 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + local.tee $18 + f64.mul + local.get $14 + local.get $17 + f64.mul + f64.sub + local.tee $4 + f64.mul + local.get $10 + local.get $12 + local.get $18 + f64.mul + local.get $14 + local.get $16 + f64.mul + f64.sub + local.tee $19 + f64.mul + f64.sub + local.get $3 + local.get $12 + local.get $17 + f64.mul + local.get $13 + local.get $16 + f64.mul + f64.sub + local.tee $20 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $7 + local.get $19 + f64.mul + local.get $6 + local.get $4 + f64.mul + f64.sub + local.get $2 + local.get $20 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $16 + local.get $7 + local.get $3 + f64.mul + local.get $2 + local.get $10 + f64.mul + f64.sub + local.tee $21 + f64.mul + local.get $17 + local.get $6 + local.get $3 + f64.mul + local.get $2 + local.get $9 + f64.mul + f64.sub + local.tee $22 + f64.mul + f64.sub + local.get $18 + local.get $6 + local.get $10 + f64.mul + local.get $7 + local.get $9 + f64.mul + f64.sub + local.tee $23 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $13 + local.get $22 + f64.mul + local.get $12 + local.get $21 + f64.mul + f64.sub + local.get $14 + local.get $23 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $10 + local.get $11 + local.get $18 + f64.mul + local.get $14 + local.get $15 + f64.mul + f64.sub + local.tee $24 + f64.mul + local.get $8 + local.get $4 + f64.mul + f64.sub + local.get $3 + local.get $11 + local.get $17 + f64.mul + local.get $13 + local.get $15 + f64.mul + f64.sub + local.tee $25 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $5 + local.get $4 + f64.mul + local.get $7 + local.get $24 + f64.mul + f64.sub + local.get $2 + local.get $25 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $17 + local.get $5 + local.get $3 + f64.mul + local.get $2 + local.get $8 + f64.mul + f64.sub + local.tee $4 + f64.mul + local.get $15 + local.get $21 + f64.mul + f64.sub + local.get $18 + local.get $5 + local.get $10 + f64.mul + local.get $7 + local.get $8 + f64.mul + f64.sub + local.tee $26 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $11 + local.get $21 + f64.mul + local.get $13 + local.get $4 + f64.mul + f64.sub + local.get $14 + local.get $26 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $8 + local.get $19 + f64.mul + local.get $9 + local.get $24 + f64.mul + f64.sub + local.get $3 + local.get $11 + local.get $16 + f64.mul + local.get $12 + local.get $15 + f64.mul + f64.sub + local.tee $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $6 + local.get $24 + f64.mul + local.get $5 + local.get $19 + f64.mul + f64.sub + local.get $2 + local.get $3 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + local.get $15 + local.get $22 + f64.mul + local.get $16 + local.get $4 + f64.mul + f64.sub + local.get $18 + local.get $5 + local.get $9 + f64.mul + local.get $6 + local.get $8 + f64.mul + f64.sub + local.tee $2 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + local.get $12 + local.get $4 + f64.mul + local.get $11 + local.get $22 + f64.mul + f64.sub + local.get $14 + local.get $2 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + local.get $9 + local.get $25 + f64.mul + local.get $8 + local.get $20 + f64.mul + f64.sub + local.get $10 + local.get $3 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $5 + local.get $20 + f64.mul + local.get $6 + local.get $25 + f64.mul + f64.sub + local.get $7 + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $16 + local.get $26 + f64.mul + local.get $15 + local.get $23 + f64.mul + f64.sub + local.get $17 + local.get $2 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + local.get $11 + local.get $23 + f64.mul + local.get $12 + local.get $26 + f64.mul + f64.sub + local.get $13 + local.get $2 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat4/determinant (param $0 i32) (result f64) + (local $1 f64) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 f64) + (local $16 f64) + (local $17 f64) + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $1 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $13 + local.get $0 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $0 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $0 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $0 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $0 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $0 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $0 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.set $14 + local.get $0 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $0 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + local.set $12 + local.get $1 + local.get $9 + local.get $0 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + local.tee $4 + f64.mul + local.get $10 + local.get $12 + f64.mul + f64.sub + local.tee $15 + f64.mul + local.get $5 + local.get $3 + local.get $4 + f64.mul + local.get $10 + local.get $11 + f64.mul + f64.sub + local.tee $16 + f64.mul + f64.sub + local.get $2 + local.get $3 + local.get $12 + f64.mul + local.get $9 + local.get $11 + f64.mul + f64.sub + local.tee $17 + f64.mul + f64.add + f64.mul + local.get $13 + local.get $6 + local.get $15 + f64.mul + local.get $7 + local.get $16 + f64.mul + f64.sub + local.get $8 + local.get $17 + f64.mul + f64.add + f64.mul + f64.sub + local.get $0 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + local.get $3 + local.get $5 + local.get $8 + f64.mul + local.get $2 + local.get $7 + f64.mul + f64.sub + local.tee $3 + f64.mul + local.get $9 + local.get $1 + local.get $8 + f64.mul + local.get $2 + local.get $6 + f64.mul + f64.sub + local.tee $2 + f64.mul + f64.sub + local.get $10 + local.get $1 + local.get $7 + f64.mul + local.get $5 + local.get $6 + f64.mul + f64.sub + local.tee $1 + f64.mul + f64.add + f64.mul + f64.add + local.get $14 + local.get $11 + local.get $3 + f64.mul + local.get $12 + local.get $2 + f64.mul + f64.sub + local.get $4 + local.get $1 + f64.mul + f64.add + f64.mul + f64.sub + ) + (func $assembly/mat4/translate (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 f64) + (local $16 f64) + (local $17 f64) + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $0 + local.get $1 + i32.eq + if + local.get $0 + i32.const 12 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + f64.add + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.mul + f64.add + local.get $1 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + f64.add + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.mul + f64.add + local.get $1 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + f64.add + local.get $1 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.mul + f64.add + local.get $1 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + f64.add + local.get $1 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.mul + f64.add + local.get $1 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + else + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $12 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $13 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.set $14 + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.set $15 + local.get $1 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.set $16 + local.get $1 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.set $17 + local.get $0 + i32.const 0 + local.get $6 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $7 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $8 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $9 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $10 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $11 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $12 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $13 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $14 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $15 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + local.get $16 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + local.get $17 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + local.get $6 + local.get $3 + f64.mul + local.get $10 + local.get $4 + f64.mul + f64.add + local.get $14 + local.get $5 + f64.mul + f64.add + local.get $1 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $7 + local.get $3 + f64.mul + local.get $11 + local.get $4 + f64.mul + f64.add + local.get $15 + local.get $5 + f64.mul + f64.add + local.get $1 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $8 + local.get $3 + f64.mul + local.get $12 + local.get $4 + f64.mul + f64.add + local.get $16 + local.get $5 + f64.mul + f64.add + local.get $1 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + local.get $9 + local.get $3 + f64.mul + local.get $13 + local.get $4 + f64.mul + f64.add + local.get $17 + local.get $5 + f64.mul + f64.add + local.get $1 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + end + local.get $0 + ) + (func $assembly/mat4/scale (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + local.get $1 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + local.get $1 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + local.get $1 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $1 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $1 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + local.get $1 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat4/rotate (param $0 i32) (param $1 i32) (param $2 f64) (param $3 i32) (result i32) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 f64) + (local $16 f64) + (local $17 f64) + (local $18 f64) + (local $19 f64) + (local $20 f64) + (local $21 f64) + (local $22 f64) + (local $23 f64) + (local $24 f64) + (local $25 f64) + local.get $3 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.tee $4 + local.get $3 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.tee $7 + local.get $3 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.tee $6 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $assembly/imports/MathUtil.hypot + local.tee $5 + f64.const 1e-06 + f64.lt + if + i32.const 0 + return + end + local.get $2 + call $~lib/math/NativeMath.sin + local.set $11 + local.get $2 + call $~lib/math/NativeMath.cos + local.set $12 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $13 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $14 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $15 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $16 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $17 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $18 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $19 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.set $20 + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.set $21 + local.get $1 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.set $22 + local.get $1 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.set $23 + local.get $0 + i32.const 0 + local.get $8 + local.get $4 + f64.const 1 + local.get $5 + f64.div + local.tee $5 + f64.mul + local.tee $4 + local.get $4 + f64.mul + f64.const 1 + local.get $12 + f64.sub + local.tee $2 + f64.mul + local.get $12 + f64.add + local.tee $9 + f64.mul + local.get $16 + local.get $7 + local.get $5 + f64.mul + local.tee $7 + local.get $4 + f64.mul + local.get $2 + f64.mul + local.get $6 + local.get $5 + f64.mul + local.tee $5 + local.get $11 + f64.mul + local.tee $24 + f64.add + local.tee $6 + f64.mul + f64.add + local.get $20 + local.get $5 + local.get $4 + f64.mul + local.get $2 + f64.mul + local.get $7 + local.get $11 + f64.mul + local.tee $25 + f64.sub + local.tee $10 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $13 + local.get $9 + f64.mul + local.get $17 + local.get $6 + f64.mul + f64.add + local.get $21 + local.get $10 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $14 + local.get $9 + f64.mul + local.get $18 + local.get $6 + f64.mul + f64.add + local.get $22 + local.get $10 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $15 + local.get $9 + f64.mul + local.get $19 + local.get $6 + f64.mul + f64.add + local.get $23 + local.get $10 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $8 + local.get $4 + local.get $7 + f64.mul + local.get $2 + f64.mul + local.get $24 + f64.sub + local.tee $9 + f64.mul + local.get $16 + local.get $7 + local.get $7 + f64.mul + local.get $2 + f64.mul + local.get $12 + f64.add + local.tee $6 + f64.mul + f64.add + local.get $20 + local.get $5 + local.get $7 + f64.mul + local.get $2 + f64.mul + local.get $4 + local.get $11 + f64.mul + local.tee $11 + f64.add + local.tee $10 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $13 + local.get $9 + f64.mul + local.get $17 + local.get $6 + f64.mul + f64.add + local.get $21 + local.get $10 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $14 + local.get $9 + f64.mul + local.get $18 + local.get $6 + f64.mul + f64.add + local.get $22 + local.get $10 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $15 + local.get $9 + f64.mul + local.get $19 + local.get $6 + f64.mul + f64.add + local.get $23 + local.get $10 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $8 + local.get $4 + local.get $5 + f64.mul + local.get $2 + f64.mul + local.get $25 + f64.add + local.tee $8 + f64.mul + local.get $16 + local.get $7 + local.get $5 + f64.mul + local.get $2 + f64.mul + local.get $11 + f64.sub + local.tee $4 + f64.mul + f64.add + local.get $20 + local.get $5 + local.get $5 + f64.mul + local.get $2 + f64.mul + local.get $12 + f64.add + local.tee $2 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $13 + local.get $8 + f64.mul + local.get $17 + local.get $4 + f64.mul + f64.add + local.get $21 + local.get $2 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + local.get $14 + local.get $8 + f64.mul + local.get $18 + local.get $4 + f64.mul + f64.add + local.get $22 + local.get $2 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + local.get $15 + local.get $8 + f64.mul + local.get $19 + local.get $4 + f64.mul + f64.add + local.get $23 + local.get $2 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + local.get $1 + i32.ne + if + local.get $0 + i32.const 12 + local.get $1 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $1 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $1 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + local.get $1 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + end + local.get $0 + ) + (func $assembly/mat4/rotateX (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + local.get $2 + call $~lib/math/NativeMath.sin + local.set $3 + local.get $2 + call $~lib/math/NativeMath.cos + local.set $2 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $1 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $1 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $0 + local.get $1 + i32.ne + if + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + local.get $1 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $1 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $1 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + local.get $1 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + end + local.get $0 + i32.const 4 + local.get $4 + local.get $2 + f64.mul + local.get $8 + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $5 + local.get $2 + f64.mul + local.get $9 + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $6 + local.get $2 + f64.mul + local.get $10 + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $7 + local.get $2 + f64.mul + local.get $11 + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $8 + local.get $2 + f64.mul + local.get $4 + local.get $3 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $9 + local.get $2 + f64.mul + local.get $5 + local.get $3 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + local.get $10 + local.get $2 + f64.mul + local.get $6 + local.get $3 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + local.get $11 + local.get $2 + f64.mul + local.get $7 + local.get $3 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat4/rotateY (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + local.get $2 + call $~lib/math/NativeMath.sin + local.set $3 + local.get $2 + call $~lib/math/NativeMath.cos + local.set $2 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $1 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $1 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $0 + local.get $1 + i32.ne + if + local.get $0 + i32.const 4 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + local.get $1 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $1 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $1 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + local.get $1 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + end + local.get $0 + i32.const 0 + local.get $4 + local.get $2 + f64.mul + local.get $8 + local.get $3 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $5 + local.get $2 + f64.mul + local.get $9 + local.get $3 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $6 + local.get $2 + f64.mul + local.get $10 + local.get $3 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $7 + local.get $2 + f64.mul + local.get $11 + local.get $3 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $4 + local.get $3 + f64.mul + local.get $8 + local.get $2 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $5 + local.get $3 + f64.mul + local.get $9 + local.get $2 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + local.get $6 + local.get $3 + f64.mul + local.get $10 + local.get $2 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + local.get $7 + local.get $3 + f64.mul + local.get $11 + local.get $2 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat4/rotateZ (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + local.get $2 + call $~lib/math/NativeMath.sin + local.set $3 + local.get $2 + call $~lib/math/NativeMath.cos + local.set $2 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $0 + local.get $1 + i32.ne + if + local.get $0 + i32.const 8 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + local.get $1 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + local.get $1 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + local.get $1 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $1 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $1 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + local.get $1 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + end + local.get $0 + i32.const 0 + local.get $4 + local.get $2 + f64.mul + local.get $8 + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $5 + local.get $2 + f64.mul + local.get $9 + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $6 + local.get $2 + f64.mul + local.get $10 + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $7 + local.get $2 + f64.mul + local.get $11 + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $8 + local.get $2 + f64.mul + local.get $4 + local.get $3 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $9 + local.get $2 + f64.mul + local.get $5 + local.get $3 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $10 + local.get $2 + f64.mul + local.get $6 + local.get $3 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $11 + local.get $2 + f64.mul + local.get $7 + local.get $3 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat4/fromRotation (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.tee $4 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.tee $5 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.tee $7 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $assembly/imports/MathUtil.hypot + local.tee $3 + f64.const 1e-06 + f64.lt + if + i32.const 0 + return + end + local.get $1 + call $~lib/math/NativeMath.sin + local.set $6 + local.get $0 + i32.const 0 + local.get $4 + f64.const 1 + local.get $3 + f64.div + local.tee $3 + f64.mul + local.tee $4 + local.get $4 + f64.mul + f64.const 1 + local.get $1 + call $~lib/math/NativeMath.cos + local.tee $8 + f64.sub + local.tee $1 + f64.mul + local.get $8 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $5 + local.get $3 + f64.mul + local.tee $5 + local.get $4 + f64.mul + local.get $1 + f64.mul + local.get $7 + local.get $3 + f64.mul + local.tee $3 + local.get $6 + f64.mul + local.tee $7 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $3 + local.get $4 + f64.mul + local.get $1 + f64.mul + local.get $5 + local.get $6 + f64.mul + local.tee $9 + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $4 + local.get $5 + f64.mul + local.get $1 + f64.mul + local.get $7 + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $5 + local.get $5 + f64.mul + local.get $1 + f64.mul + local.get $8 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $3 + local.get $5 + f64.mul + local.get $1 + f64.mul + local.get $4 + local.get $6 + f64.mul + local.tee $6 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $4 + local.get $3 + f64.mul + local.get $1 + f64.mul + local.get $9 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $5 + local.get $3 + f64.mul + local.get $1 + f64.mul + local.get $6 + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + local.get $3 + local.get $3 + f64.mul + local.get $1 + f64.mul + local.get $8 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat4/fromRotationTranslation (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.tee $5 + local.get $5 + f64.add + local.set $6 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $0 + i32.const 0 + f64.const 1 + local.get $4 + local.get $4 + local.get $4 + f64.add + local.tee $7 + f64.mul + local.tee $10 + local.get $5 + local.get $6 + f64.mul + local.tee $5 + f64.add + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $3 + local.get $7 + f64.mul + local.tee $9 + local.get $8 + local.get $6 + f64.mul + local.tee $11 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $3 + local.get $6 + f64.mul + local.tee $12 + local.get $8 + local.get $7 + f64.mul + local.tee $7 + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $9 + local.get $11 + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 1 + local.get $3 + local.get $3 + local.get $3 + f64.add + local.tee $3 + f64.mul + local.tee $9 + local.get $5 + f64.add + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $4 + local.get $6 + f64.mul + local.tee $4 + local.get $8 + local.get $3 + f64.mul + local.tee $3 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $12 + local.get $7 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $4 + local.get $3 + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + f64.const 1 + local.get $9 + local.get $10 + f64.add + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat4/getTranslation (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat4/getScaling (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $1 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $0 + i32.const 0 + local.get $2 + local.get $3 + local.get $4 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $assembly/imports/MathUtil.hypot + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $5 + local.get $6 + local.get $7 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $assembly/imports/MathUtil.hypot + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $8 + local.get $9 + local.get $10 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $assembly/imports/MathUtil.hypot + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat4/decompose (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 f64) + local.get $1 + i32.const 0 + local.get $3 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 1 + local.get $3 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 2 + local.get $3 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $3 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $3 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $3 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $3 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $3 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $12 + local.get $3 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $3 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $3 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $3 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.set $14 + local.get $2 + i32.const 0 + local.get $6 + local.get $5 + local.get $7 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $assembly/imports/MathUtil.hypot + call $~lib/typedarray/Float64Array#__set + local.get $2 + i32.const 1 + local.get $8 + local.get $12 + local.get $9 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $assembly/imports/MathUtil.hypot + call $~lib/typedarray/Float64Array#__set + local.get $2 + i32.const 2 + local.get $10 + local.get $11 + local.get $14 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $assembly/imports/MathUtil.hypot + call $~lib/typedarray/Float64Array#__set + f64.const 1 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.div + local.set $4 + local.get $5 + f64.const 1 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.div + local.tee $5 + f64.mul + local.set $13 + local.get $7 + f64.const 1 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.div + local.tee $15 + f64.mul + local.set $7 + local.get $8 + local.get $4 + f64.mul + local.set $8 + local.get $9 + local.get $15 + f64.mul + local.set $9 + local.get $10 + local.get $4 + f64.mul + local.set $10 + local.get $11 + local.get $5 + f64.mul + local.set $11 + local.get $6 + local.get $4 + f64.mul + local.tee $4 + local.get $12 + local.get $5 + f64.mul + local.tee $6 + f64.add + local.get $14 + local.get $15 + f64.mul + local.tee $5 + f64.add + local.tee $12 + f64.const 0 + f64.gt + if + local.get $0 + i32.const 3 + local.get $12 + f64.const 1 + f64.add + f64.sqrt + local.tee $4 + local.get $4 + f64.add + local.tee $4 + f64.const 0.25 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 0 + local.get $9 + local.get $11 + f64.sub + local.get $4 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $10 + local.get $7 + f64.sub + local.get $4 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $13 + local.get $8 + f64.sub + local.get $4 + f64.div + call $~lib/typedarray/Float64Array#__set + else + local.get $4 + local.get $5 + f64.gt + i32.const 0 + local.get $4 + local.get $6 + f64.gt + select + if + local.get $0 + i32.const 3 + local.get $9 + local.get $11 + f64.sub + local.get $4 + f64.const 1 + f64.add + local.get $6 + f64.sub + local.get $5 + f64.sub + f64.sqrt + local.tee $4 + local.get $4 + f64.add + local.tee $4 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 0 + local.get $4 + f64.const 0.25 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $13 + local.get $8 + f64.add + local.get $4 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $10 + local.get $7 + f64.add + local.get $4 + f64.div + call $~lib/typedarray/Float64Array#__set + else + local.get $5 + local.get $6 + f64.lt + if + local.get $0 + i32.const 3 + local.get $10 + local.get $7 + f64.sub + local.get $6 + f64.const 1 + f64.add + local.get $4 + f64.sub + local.get $5 + f64.sub + f64.sqrt + local.tee $4 + local.get $4 + f64.add + local.tee $4 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 0 + local.get $13 + local.get $8 + f64.add + local.get $4 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $4 + f64.const 0.25 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $9 + local.get $11 + f64.add + local.get $4 + f64.div + call $~lib/typedarray/Float64Array#__set + else + local.get $0 + i32.const 3 + local.get $13 + local.get $8 + f64.sub + local.get $5 + f64.const 1 + f64.add + local.get $4 + f64.sub + local.get $6 + f64.sub + f64.sqrt + local.tee $4 + local.get $4 + f64.add + local.tee $4 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 0 + local.get $10 + local.get $7 + f64.add + local.get $4 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $9 + local.get $11 + f64.add + local.get $4 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $4 + f64.const 0.25 + f64.mul + call $~lib/typedarray/Float64Array#__set + end + end + end + local.get $0 + ) + (func $assembly/mat4/fromRotationTranslationScale (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 f64) + (local $16 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.tee $7 + local.get $7 + f64.add + local.set $8 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $3 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $3 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $3 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $12 + local.get $0 + i32.const 0 + f64.const 1 + local.get $5 + local.get $5 + local.get $5 + f64.add + local.tee $9 + f64.mul + local.tee $13 + local.get $7 + local.get $8 + f64.mul + local.tee $7 + f64.add + f64.sub + local.get $6 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $4 + local.get $9 + f64.mul + local.tee $14 + local.get $10 + local.get $8 + f64.mul + local.tee $15 + f64.add + local.get $6 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $4 + local.get $8 + f64.mul + local.tee $16 + local.get $10 + local.get $9 + f64.mul + local.tee $9 + f64.sub + local.get $6 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $14 + local.get $15 + f64.sub + local.get $11 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 1 + local.get $4 + local.get $4 + local.get $4 + f64.add + local.tee $4 + f64.mul + local.tee $6 + local.get $7 + f64.add + f64.sub + local.get $11 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $5 + local.get $8 + f64.mul + local.tee $5 + local.get $10 + local.get $4 + f64.mul + local.tee $4 + f64.add + local.get $11 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $16 + local.get $9 + f64.add + local.get $12 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $5 + local.get $4 + f64.sub + local.get $12 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + f64.const 1 + local.get $6 + local.get $13 + f64.add + f64.sub + local.get $12 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat4/fromRotationTranslationScaleOrigin (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 f64) + (local $16 f64) + (local $17 f64) + (local $18 f64) + (local $19 f64) + (local $20 f64) + (local $21 f64) + (local $22 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.tee $7 + local.get $7 + f64.add + local.set $8 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $3 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $3 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $15 + local.get $3 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $16 + local.get $4 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $4 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $12 + local.get $4 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $13 + local.get $0 + i32.const 0 + f64.const 1 + local.get $6 + local.get $6 + local.get $6 + f64.add + local.tee $14 + f64.mul + local.tee $19 + local.get $7 + local.get $8 + f64.mul + local.tee $7 + f64.add + f64.sub + local.get $10 + f64.mul + local.tee $20 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $5 + local.get $14 + f64.mul + local.tee $17 + local.get $9 + local.get $8 + f64.mul + local.tee $18 + f64.add + local.get $10 + f64.mul + local.tee $21 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $5 + local.get $8 + f64.mul + local.tee $22 + local.get $9 + local.get $14 + f64.mul + local.tee $14 + f64.sub + local.get $10 + f64.mul + local.tee $10 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $17 + local.get $18 + f64.sub + local.get $15 + f64.mul + local.tee $17 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 1 + local.get $5 + local.get $5 + local.get $5 + f64.add + local.tee $5 + f64.mul + local.tee $18 + local.get $7 + f64.add + f64.sub + local.get $15 + f64.mul + local.tee $7 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $6 + local.get $8 + f64.mul + local.tee $6 + local.get $9 + local.get $5 + f64.mul + local.tee $5 + f64.add + local.get $15 + f64.mul + local.tee $8 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $22 + local.get $14 + f64.add + local.get $16 + f64.mul + local.tee $9 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $6 + local.get $5 + f64.sub + local.get $16 + f64.mul + local.tee $5 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + f64.const 1 + local.get $18 + local.get $19 + f64.add + f64.sub + local.get $16 + f64.mul + local.tee $6 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $11 + f64.add + local.get $20 + local.get $11 + f64.mul + local.get $17 + local.get $12 + f64.mul + f64.add + local.get $9 + local.get $13 + f64.mul + f64.add + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $12 + f64.add + local.get $21 + local.get $11 + f64.mul + local.get $7 + local.get $12 + f64.mul + f64.add + local.get $5 + local.get $13 + f64.mul + f64.add + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $13 + f64.add + local.get $10 + local.get $11 + f64.mul + local.get $8 + local.get $12 + f64.mul + f64.add + local.get $6 + local.get $13 + f64.mul + f64.add + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat4/fromQuat (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.tee $3 + local.get $3 + f64.add + local.set $5 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $0 + i32.const 0 + f64.const 1 + local.get $2 + local.get $2 + local.get $2 + f64.add + local.tee $7 + f64.mul + local.tee $8 + f64.sub + local.get $3 + local.get $5 + f64.mul + local.tee $9 + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $2 + local.get $4 + local.get $4 + f64.add + local.tee $2 + f64.mul + local.tee $10 + local.get $6 + local.get $5 + f64.mul + local.tee $5 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $3 + local.get $2 + f64.mul + local.tee $11 + local.get $6 + local.get $7 + f64.mul + local.tee $12 + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $10 + local.get $5 + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 1 + local.get $4 + local.get $2 + f64.mul + f64.sub + local.tee $4 + local.get $9 + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $3 + local.get $7 + f64.mul + local.tee $3 + local.get $6 + local.get $2 + f64.mul + local.tee $2 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $11 + local.get $12 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $3 + local.get $2 + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + local.get $4 + local.get $8 + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat4/frustum (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (result i32) + (local $7 f64) + (local $8 f64) + local.get $0 + i32.const 0 + local.get $5 + local.get $5 + f64.add + local.tee $7 + f64.const 1 + local.get $2 + local.get $1 + f64.sub + f64.div + local.tee $8 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $7 + f64.const 1 + local.get $4 + local.get $3 + f64.sub + f64.div + local.tee $7 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $2 + local.get $1 + f64.add + local.get $8 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $4 + local.get $3 + f64.add + local.get $7 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + local.get $6 + local.get $5 + f64.add + f64.const 1 + local.get $5 + local.get $6 + f64.sub + f64.div + local.tee $1 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + f64.const -1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $6 + local.get $5 + f64.mul + local.tee $2 + local.get $2 + f64.add + local.get $1 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat4/perspectiveZO (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) + local.get $0 + i32.const 0 + f64.const 1 + local.get $1 + f64.const 0.5 + f64.mul + call $~lib/math/NativeMath.tan + f64.div + local.tee $1 + local.get $2 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + f64.const -1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $4 + f64.convert_i32_u + f64.const inf + f64.ne + i32.const 0 + local.get $4 + select + if + local.get $0 + i32.const 10 + local.get $4 + f64.convert_i32_u + f64.const 1 + local.get $3 + local.get $4 + f64.convert_i32_u + f64.sub + f64.div + local.tee $1 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $4 + f64.convert_i32_u + local.get $3 + f64.mul + local.get $1 + f64.mul + call $~lib/typedarray/Float64Array#__set + else + local.get $0 + i32.const 10 + f64.const -1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $3 + f64.neg + call $~lib/typedarray/Float64Array#__set + end + local.get $0 + ) + (func $assembly/mat4/perspectiveFromFieldOfView (param $0 i32) (param $1 i32) (param $2 f64) (param $3 f64) (result i32) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + local.get $1 + f64.load + f64.const 3.141592653589793 + f64.mul + f64.const 180 + f64.div + call $~lib/math/NativeMath.tan + local.set $4 + local.get $1 + f64.load offset=8 + f64.const 3.141592653589793 + f64.mul + f64.const 180 + f64.div + call $~lib/math/NativeMath.tan + local.set $5 + local.get $0 + i32.const 0 + f64.const 2 + local.get $1 + f64.load offset=16 + f64.const 3.141592653589793 + f64.mul + f64.const 180 + f64.div + call $~lib/math/NativeMath.tan + local.tee $6 + local.get $1 + f64.load offset=24 + f64.const 3.141592653589793 + f64.mul + f64.const 180 + f64.div + call $~lib/math/NativeMath.tan + local.tee $7 + f64.add + f64.div + local.tee $8 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 2 + local.get $4 + local.get $5 + f64.add + f64.div + local.tee $9 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $6 + local.get $7 + f64.sub + local.get $8 + f64.mul + f64.const 0.5 + f64.mul + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $4 + local.get $5 + f64.sub + local.get $9 + f64.mul + f64.const 0.5 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + local.get $3 + local.get $2 + local.get $3 + f64.sub + local.tee $4 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + f64.const -1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $3 + local.get $2 + f64.mul + local.get $4 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat4/orthoZO (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (result i32) + (local $7 f64) + (local $8 f64) + local.get $0 + i32.const 0 + f64.const 1 + local.get $1 + local.get $2 + f64.sub + f64.div + local.tee $7 + f64.const -2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 1 + local.get $3 + local.get $4 + f64.sub + f64.div + local.tee $8 + f64.const -2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + f64.const 1 + local.get $5 + local.get $6 + f64.sub + f64.div + local.tee $6 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + local.get $1 + local.get $2 + f64.add + local.get $7 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $4 + local.get $3 + f64.add + local.get $8 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $5 + local.get $6 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat4/lookAt (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 f64) + (local $16 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $13 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $14 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $15 + local.get $3 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $3 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $3 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $15 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.tee $4 + f64.sub + f64.abs + f64.const 1e-06 + f64.lt + i32.const 0 + local.get $14 + local.get $8 + f64.sub + f64.abs + f64.const 1e-06 + f64.lt + i32.const 0 + local.get $13 + local.get $7 + f64.sub + f64.abs + f64.const 1e-06 + f64.lt + select + select + if + local.get $0 + call $assembly/mat4/identity + return + end + f64.const 1 + local.get $13 + local.get $7 + f64.sub + local.tee $9 + local.get $14 + local.get $8 + f64.sub + local.tee $8 + local.get $15 + local.get $4 + f64.sub + local.tee $7 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $assembly/imports/MathUtil.hypot + f64.div + local.set $4 + local.get $11 + local.get $7 + local.get $4 + f64.mul + local.tee $7 + f64.mul + local.get $6 + local.get $8 + local.get $4 + f64.mul + local.tee $8 + f64.mul + f64.sub + local.tee $12 + local.get $6 + local.get $9 + local.get $4 + f64.mul + local.tee $4 + f64.mul + local.get $5 + local.get $7 + f64.mul + f64.sub + local.tee $9 + local.get $5 + local.get $8 + f64.mul + local.get $11 + local.get $4 + f64.mul + f64.sub + local.tee $10 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $assembly/imports/MathUtil.hypot + local.tee $5 + i64.reinterpret_f64 + i64.const 1 + i64.shl + i64.const 2 + i64.sub + i64.const -9007199254740994 + i64.gt_u + if (result f64) + f64.const 0 + local.set $5 + f64.const 0 + local.set $11 + f64.const 0 + else + local.get $12 + f64.const 1 + local.get $5 + f64.div + local.tee $6 + f64.mul + local.set $5 + local.get $9 + local.get $6 + f64.mul + local.set $11 + local.get $10 + local.get $6 + f64.mul + end + local.set $6 + local.get $8 + local.get $6 + f64.mul + local.get $7 + local.get $11 + f64.mul + f64.sub + local.tee $9 + local.get $7 + local.get $5 + f64.mul + local.get $4 + local.get $6 + f64.mul + f64.sub + local.tee $12 + local.get $4 + local.get $11 + f64.mul + local.get $8 + local.get $5 + f64.mul + f64.sub + local.tee $16 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $assembly/imports/MathUtil.hypot + local.tee $10 + i64.reinterpret_f64 + i64.const 1 + i64.shl + i64.const 2 + i64.sub + i64.const -9007199254740994 + i64.gt_u + if (result f64) + f64.const 0 + local.set $9 + f64.const 0 + local.set $12 + f64.const 0 + else + local.get $9 + f64.const 1 + local.get $10 + f64.div + local.tee $10 + f64.mul + local.set $9 + local.get $12 + local.get $10 + f64.mul + local.set $12 + local.get $16 + local.get $10 + f64.mul + end + local.set $10 + local.get $0 + i32.const 0 + local.get $5 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $9 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $4 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $11 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $12 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $8 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $6 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $10 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + local.get $7 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + local.get $5 + local.get $13 + f64.mul + local.get $11 + local.get $14 + f64.mul + f64.add + local.get $6 + local.get $15 + f64.mul + f64.add + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $9 + local.get $13 + f64.mul + local.get $12 + local.get $14 + f64.mul + f64.add + local.get $10 + local.get $15 + f64.mul + f64.add + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $4 + local.get $13 + f64.mul + local.get $8 + local.get $14 + f64.mul + f64.add + local.get $7 + local.get $15 + f64.mul + f64.add + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat4/targetTo (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $3 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $12 + local.get $3 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $3 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $8 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.sub + local.tee $11 + local.get $11 + f64.mul + local.get $7 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.sub + local.tee $4 + local.get $4 + f64.mul + f64.add + local.get $6 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.sub + local.tee $10 + local.get $10 + f64.mul + f64.add + local.tee $13 + f64.const 0 + f64.gt + if + local.get $11 + f64.const 1 + local.get $13 + f64.sqrt + f64.div + local.tee $13 + f64.mul + local.set $11 + local.get $10 + local.get $13 + f64.mul + local.set $10 + local.get $4 + local.get $13 + f64.mul + local.set $4 + end + local.get $9 + local.get $10 + f64.mul + local.get $5 + local.get $4 + f64.mul + f64.sub + local.tee $13 + local.get $13 + f64.mul + local.get $5 + local.get $11 + f64.mul + local.get $12 + local.get $10 + f64.mul + f64.sub + local.tee $5 + local.get $5 + f64.mul + f64.add + local.get $12 + local.get $4 + f64.mul + local.get $9 + local.get $11 + f64.mul + f64.sub + local.tee $12 + local.get $12 + f64.mul + f64.add + local.tee $9 + f64.const 0 + f64.gt + if + local.get $13 + f64.const 1 + local.get $9 + f64.sqrt + f64.div + local.tee $9 + f64.mul + local.set $13 + local.get $12 + local.get $9 + f64.mul + local.set $12 + local.get $5 + local.get $9 + f64.mul + local.set $5 + end + local.get $0 + i32.const 0 + local.get $13 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $5 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $12 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $4 + local.get $12 + f64.mul + local.get $10 + local.get $5 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $10 + local.get $13 + f64.mul + local.get $11 + local.get $12 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $11 + local.get $5 + f64.mul + local.get $4 + local.get $13 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $11 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $4 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + local.get $10 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + local.get $8 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $7 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $6 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat4/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + local.get $1 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + local.get $1 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + local.get $1 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $1 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $1 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + local.get $1 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat4/multiplyScalar (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + local.get $1 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + local.get $1 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + local.get $1 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $1 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $1 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + local.get $1 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat4/multiplyScalarAndAdd (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + local.get $1 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + local.get $1 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + local.get $1 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $1 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $1 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + local.get $1 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat4/exactEquals (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.eq + if (result i32) + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + ) + (func $assembly/mat4/equals (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 f64) + (local $16 f64) + (local $17 f64) + (local $18 f64) + (local $19 f64) + (local $20 f64) + (local $21 f64) + (local $22 f64) + (local $23 f64) + (local $24 f64) + (local $25 f64) + (local $26 f64) + (local $27 f64) + (local $28 f64) + (local $29 f64) + (local $30 f64) + (local $31 f64) + (local $32 f64) + (local $33 f64) + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $0 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $0 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $0 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $0 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $0 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $0 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $0 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.set $12 + local.get $0 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.set $13 + local.get $0 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + local.set $14 + local.get $0 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + local.set $15 + local.get $0 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + local.set $16 + local.get $0 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + local.set $17 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $18 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $19 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $20 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $21 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $22 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $23 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $24 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $25 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.set $26 + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.set $27 + local.get $1 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.set $28 + local.get $1 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.set $29 + local.get $1 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + local.set $30 + local.get $1 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + local.set $31 + local.get $1 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + local.set $32 + local.get $1 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + local.set $33 + local.get $2 + local.get $18 + f64.sub + f64.abs + f64.const 1 + local.get $2 + f64.abs + local.get $18 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + if (result i32) + local.get $3 + local.get $19 + f64.sub + f64.abs + f64.const 1 + local.get $3 + f64.abs + local.get $19 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $4 + local.get $20 + f64.sub + f64.abs + f64.const 1 + local.get $4 + f64.abs + local.get $20 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $5 + local.get $21 + f64.sub + f64.abs + f64.const 1 + local.get $5 + f64.abs + local.get $21 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $6 + local.get $22 + f64.sub + f64.abs + f64.const 1 + local.get $6 + f64.abs + local.get $22 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $7 + local.get $23 + f64.sub + f64.abs + f64.const 1 + local.get $7 + f64.abs + local.get $23 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $8 + local.get $24 + f64.sub + f64.abs + f64.const 1 + local.get $8 + f64.abs + local.get $24 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $9 + local.get $25 + f64.sub + f64.abs + f64.const 1 + local.get $9 + f64.abs + local.get $25 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $10 + local.get $26 + f64.sub + f64.abs + f64.const 1 + local.get $10 + f64.abs + local.get $26 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $11 + local.get $27 + f64.sub + f64.abs + f64.const 1 + local.get $11 + f64.abs + local.get $27 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $12 + local.get $28 + f64.sub + f64.abs + f64.const 1 + local.get $12 + f64.abs + local.get $28 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $13 + local.get $29 + f64.sub + f64.abs + f64.const 1 + local.get $13 + f64.abs + local.get $29 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $14 + local.get $30 + f64.sub + f64.abs + f64.const 1 + local.get $14 + f64.abs + local.get $30 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $15 + local.get $31 + f64.sub + f64.abs + f64.const 1 + local.get $15 + f64.abs + local.get $31 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $16 + local.get $32 + f64.sub + f64.abs + f64.const 1 + local.get $16 + f64.abs + local.get $32 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $17 + local.get $33 + f64.sub + f64.abs + f64.const 1 + local.get $17 + f64.abs + local.get $33 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + ) + (func $assembly/quat/rotateX (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $2 + f64.const 0.5 + f64.mul + local.tee $3 + call $~lib/math/NativeMath.sin + local.set $2 + local.get $0 + i32.const 0 + local.get $4 + local.get $3 + call $~lib/math/NativeMath.cos + local.tee $3 + f64.mul + local.get $7 + local.get $2 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $5 + local.get $3 + f64.mul + local.get $6 + local.get $2 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $6 + local.get $3 + f64.mul + local.get $5 + local.get $2 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $7 + local.get $3 + f64.mul + local.get $4 + local.get $2 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/quat/rotateY (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $2 + f64.const 0.5 + f64.mul + local.tee $3 + call $~lib/math/NativeMath.sin + local.set $2 + local.get $0 + i32.const 0 + local.get $4 + local.get $3 + call $~lib/math/NativeMath.cos + local.tee $3 + f64.mul + local.get $6 + local.get $2 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $5 + local.get $3 + f64.mul + local.get $7 + local.get $2 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $6 + local.get $3 + f64.mul + local.get $4 + local.get $2 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $7 + local.get $3 + f64.mul + local.get $5 + local.get $2 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/quat/rotateZ (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $2 + f64.const 0.5 + f64.mul + local.tee $3 + call $~lib/math/NativeMath.sin + local.set $2 + local.get $0 + i32.const 0 + local.get $4 + local.get $3 + call $~lib/math/NativeMath.cos + local.tee $3 + f64.mul + local.get $5 + local.get $2 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $5 + local.get $3 + f64.mul + local.get $4 + local.get $2 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $6 + local.get $3 + f64.mul + local.get $7 + local.get $2 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $7 + local.get $3 + f64.mul + local.get $6 + local.get $2 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $~lib/math/NativeMath.exp (param $0 f64) (result f64) + (local $1 f64) + (local $2 i32) + (local $3 i32) + (local $4 f64) + (local $5 f64) + (local $6 i32) + (local $7 f64) + local.get $0 + i64.reinterpret_f64 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.tee $3 + i32.const 31 + i32.shr_u + local.set $6 + local.get $3 + i32.const 2147483647 + i32.and + local.tee $3 + i32.const 1082532651 + i32.ge_u + if + local.get $0 + local.get $0 + f64.ne + if + local.get $0 + return + end + local.get $0 + f64.const 709.782712893384 + f64.gt + if + local.get $0 + f64.const 8988465674311579538646525e283 + f64.mul + return + end + local.get $0 + f64.const -745.1332191019411 + f64.lt + if + f64.const 0 + return + end + end + local.get $3 + i32.const 1071001154 + i32.gt_u + if + local.get $0 + local.get $3 + i32.const 1072734898 + i32.ge_u + if (result i32) + local.get $0 + f64.const 1.4426950408889634 + f64.mul + f64.const 0.5 + local.get $0 + f64.copysign + f64.add + i32.trunc_f64_s + else + i32.const 1 + local.get $6 + i32.const 1 + i32.shl + i32.sub + end + local.tee $2 + f64.convert_i32_s + f64.const 0.6931471803691238 + f64.mul + f64.sub + local.tee $1 + local.get $2 + f64.convert_i32_s + f64.const 1.9082149292705877e-10 + f64.mul + local.tee $7 + f64.sub + local.set $0 + else + local.get $3 + i32.const 1043333120 + i32.le_u + if + local.get $0 + f64.const 1 + f64.add + return + end + local.get $0 + local.set $1 + end + local.get $0 + local.get $0 + f64.mul + local.tee $4 + local.get $4 + f64.mul + local.set $5 + local.get $0 + local.get $0 + local.get $4 + f64.const 0.16666666666666602 + f64.mul + local.get $5 + local.get $4 + f64.const 6.613756321437934e-05 + f64.mul + f64.const -2.7777777777015593e-03 + f64.add + local.get $5 + local.get $4 + f64.const 4.1381367970572385e-08 + f64.mul + f64.const -1.6533902205465252e-06 + f64.add + f64.mul + f64.add + f64.mul + f64.add + f64.sub + local.tee $0 + f64.mul + f64.const 2 + local.get $0 + f64.sub + f64.div + local.get $7 + f64.sub + local.get $1 + f64.add + f64.const 1 + f64.add + local.set $0 + local.get $2 + if (result f64) + local.get $2 + i32.const 1023 + i32.gt_s + if (result f64) + local.get $0 + f64.const 8988465674311579538646525e283 + f64.mul + local.set $0 + local.get $2 + i32.const 1023 + i32.sub + local.tee $2 + i32.const 1023 + i32.gt_s + if (result f64) + local.get $2 + i32.const 1023 + i32.sub + local.tee $2 + i32.const 1023 + local.get $2 + i32.const 1023 + i32.lt_s + select + local.set $2 + local.get $0 + f64.const 8988465674311579538646525e283 + f64.mul + else + local.get $0 + end + else + local.get $2 + i32.const -1022 + i32.lt_s + if (result f64) + local.get $0 + f64.const 2.004168360008973e-292 + f64.mul + local.set $0 + local.get $2 + i32.const 969 + i32.add + local.tee $2 + i32.const -1022 + i32.lt_s + if (result f64) + local.get $2 + i32.const 969 + i32.add + local.tee $2 + i32.const -1022 + local.get $2 + i32.const -1022 + i32.gt_s + select + local.set $2 + local.get $0 + f64.const 2.004168360008973e-292 + f64.mul + else + local.get $0 + end + else + local.get $0 + end + end + local.get $2 + i64.extend_i32_s + i64.const 1023 + i64.add + i64.const 52 + i64.shl + f64.reinterpret_i64 + f64.mul + else + local.get $0 + end + ) + (func $assembly/quat/exp (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/math/NativeMath.exp + local.set $5 + local.get $0 + i32.const 0 + local.get $2 + local.get $2 + local.get $2 + f64.mul + local.get $3 + local.get $3 + f64.mul + f64.add + local.get $4 + local.get $4 + f64.mul + f64.add + f64.sqrt + local.tee $2 + f64.const 0 + f64.gt + if (result f64) + local.get $5 + local.get $2 + call $~lib/math/NativeMath.sin + f64.mul + local.get $2 + f64.div + else + f64.const 0 + end + local.tee $6 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $3 + local.get $6 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $4 + local.get $6 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $5 + local.get $2 + call $~lib/math/NativeMath.cos + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $~lib/math/NativeMath.atan (param $0 f64) (result f64) + (local $1 f64) + (local $2 f64) + (local $3 i32) + (local $4 i32) + (local $5 f64) + local.get $0 + local.set $1 + local.get $0 + i64.reinterpret_f64 + i64.const 32 + i64.shr_u + i32.wrap_i64 + i32.const 2147483647 + i32.and + local.tee $3 + i32.const 1141899264 + i32.ge_u + if + local.get $0 + local.get $0 + f64.ne + if + local.get $0 + return + end + f64.const 1.5707963267948966 + local.get $1 + f64.copysign + return + end + local.get $3 + i32.const 1071382528 + i32.lt_u + if + local.get $3 + i32.const 1044381696 + i32.lt_u + if + local.get $0 + return + end + i32.const -1 + local.set $4 + else + local.get $0 + f64.abs + local.set $0 + local.get $3 + i32.const 1072889856 + i32.lt_u + if (result f64) + local.get $3 + i32.const 1072037888 + i32.lt_u + if (result f64) + local.get $0 + local.get $0 + f64.add + f64.const 1 + f64.sub + local.get $0 + f64.const 2 + f64.add + f64.div + else + i32.const 1 + local.set $4 + local.get $0 + f64.const 1 + f64.sub + local.get $0 + f64.const 1 + f64.add + f64.div + end + else + local.get $3 + i32.const 1073971200 + i32.lt_u + if (result f64) + i32.const 2 + local.set $4 + local.get $0 + f64.const 1.5 + f64.sub + local.get $0 + f64.const 1.5 + f64.mul + f64.const 1 + f64.add + f64.div + else + i32.const 3 + local.set $4 + f64.const -1 + local.get $0 + f64.div + end + end + local.set $0 + end + local.get $0 + local.get $0 + f64.mul + local.tee $5 + local.get $5 + f64.mul + local.set $2 + local.get $0 + local.get $5 + local.get $2 + local.get $2 + local.get $2 + local.get $2 + local.get $2 + f64.const 0.016285820115365782 + f64.mul + f64.const 0.049768779946159324 + f64.add + f64.mul + f64.const 0.06661073137387531 + f64.add + f64.mul + f64.const 0.09090887133436507 + f64.add + f64.mul + f64.const 0.14285714272503466 + f64.add + f64.mul + f64.const 0.3333333333333293 + f64.add + f64.mul + local.get $2 + local.get $2 + local.get $2 + local.get $2 + local.get $2 + f64.const -0.036531572744216916 + f64.mul + f64.const -0.058335701337905735 + f64.add + f64.mul + f64.const -0.0769187620504483 + f64.add + f64.mul + f64.const -0.11111110405462356 + f64.add + f64.mul + f64.const -0.19999999999876483 + f64.add + f64.mul + f64.add + f64.mul + local.set $2 + local.get $4 + i32.const 0 + i32.lt_s + if + local.get $0 + local.get $2 + f64.sub + return + end + block $break|0 + block $case4|0 + block $case3|0 + block $case2|0 + block $case1|0 + block $case0|0 + local.get $4 + br_table $case0|0 $case1|0 $case2|0 $case3|0 $case4|0 + end + f64.const 0.4636476090008061 + local.get $2 + f64.const 2.2698777452961687e-17 + f64.sub + local.get $0 + f64.sub + f64.sub + local.set $0 + br $break|0 + end + f64.const 0.7853981633974483 + local.get $2 + f64.const 3.061616997868383e-17 + f64.sub + local.get $0 + f64.sub + f64.sub + local.set $0 + br $break|0 + end + f64.const 0.982793723247329 + local.get $2 + f64.const 1.3903311031230998e-17 + f64.sub + local.get $0 + f64.sub + f64.sub + local.set $0 + br $break|0 + end + f64.const 1.5707963267948966 + local.get $2 + f64.const 6.123233995736766e-17 + f64.sub + local.get $0 + f64.sub + f64.sub + local.set $0 + br $break|0 + end + unreachable + end + local.get $0 + local.get $1 + f64.copysign + ) + (func $~lib/math/NativeMath.atan2 (param $0 f64) (param $1 f64) (result f64) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i64) + (local $7 i32) + i32.const 1 + local.get $0 + local.get $0 + f64.ne + local.get $1 + local.get $1 + f64.ne + select + if + local.get $1 + local.get $0 + f64.add + return + end + local.get $0 + i64.reinterpret_f64 + local.tee $6 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.set $4 + local.get $6 + i32.wrap_i64 + local.set $3 + local.get $1 + i64.reinterpret_f64 + local.tee $6 + i32.wrap_i64 + local.tee $7 + local.get $6 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.tee $5 + i32.const 1072693248 + i32.sub + i32.or + i32.eqz + if + local.get $0 + call $~lib/math/NativeMath.atan + return + end + local.get $5 + i32.const 30 + i32.shr_u + i32.const 2 + i32.and + local.get $4 + i32.const 31 + i32.shr_u + i32.or + local.set $2 + local.get $5 + i32.const 2147483647 + i32.and + local.set $5 + local.get $4 + i32.const 2147483647 + i32.and + local.tee $4 + local.get $3 + i32.or + i32.eqz + if + block $break|0 + block $case3|0 + block $case2|0 + block $case0|0 + local.get $2 + i32.eqz + br_if $case0|0 + block $tablify|0 + local.get $2 + i32.const 1 + i32.sub + br_table $case0|0 $case2|0 $case3|0 $tablify|0 + end + br $break|0 + end + local.get $0 + return + end + f64.const 3.141592653589793 + return + end + f64.const -3.141592653589793 + return + end + end + block $folding-inner0 + local.get $5 + local.get $7 + i32.or + i32.eqz + br_if $folding-inner0 + local.get $5 + i32.const 2146435072 + i32.eq + if + f64.const 2.356194490192345 + f64.const 0.7853981633974483 + local.get $2 + i32.const 2 + i32.and + select + f64.const 3.141592653589793 + f64.const 0 + local.get $2 + i32.const 2 + i32.and + select + local.get $4 + i32.const 2146435072 + i32.eq + select + local.tee $0 + f64.neg + local.get $0 + local.get $2 + i32.const 1 + i32.and + select + return + end + i32.const 1 + local.get $4 + i32.const 2146435072 + i32.eq + local.get $4 + local.get $5 + i32.const 67108864 + i32.add + i32.gt_u + select + br_if $folding-inner0 + local.get $5 + local.get $4 + i32.const 67108864 + i32.add + i32.gt_u + i32.const 0 + local.get $2 + i32.const 2 + i32.and + select + if (result f64) + f64.const 0 + else + local.get $0 + local.get $1 + f64.div + f64.abs + call $~lib/math/NativeMath.atan + end + local.set $0 + block $break|1 + block $case3|1 + block $case2|1 + block $case1|1 + local.get $2 + local.tee $3 + if + local.get $3 + i32.const 1 + i32.sub + br_table $case1|1 $case2|1 $case3|1 $break|1 + end + local.get $0 + return + end + local.get $0 + f64.neg + return + end + f64.const 3.141592653589793 + local.get $0 + f64.const 1.2246467991473532e-16 + f64.sub + f64.sub + return + end + local.get $0 + f64.const 1.2246467991473532e-16 + f64.sub + f64.const 3.141592653589793 + f64.sub + return + end + unreachable + end + f64.const -1.5707963267948966 + f64.const 1.5707963267948966 + local.get $2 + i32.const 1 + i32.and + select + ) + (func $~lib/math/NativeMath.log (param $0 f64) (result f64) + (local $1 i32) + (local $2 i64) + (local $3 f64) + (local $4 f64) + (local $5 i32) + i32.const 1 + local.get $0 + i64.reinterpret_f64 + local.tee $2 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.tee $1 + i32.const 31 + i32.shr_u + local.get $1 + i32.const 1048576 + i32.lt_u + select + if + local.get $2 + i64.const 1 + i64.shl + i64.eqz + if + f64.const -1 + local.get $0 + local.get $0 + f64.mul + f64.div + return + end + local.get $1 + i32.const 31 + i32.shr_u + if + local.get $0 + local.get $0 + f64.sub + f64.const 0 + f64.div + return + end + i32.const -54 + local.set $5 + local.get $0 + f64.const 18014398509481984 + f64.mul + i64.reinterpret_f64 + local.tee $2 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.set $1 + else + local.get $1 + i32.const 2146435072 + i32.ge_u + if + local.get $0 + return + else + local.get $2 + i64.const 32 + i64.shl + i64.eqz + i32.const 0 + local.get $1 + i32.const 1072693248 + i32.eq + select + if + f64.const 0 + return + end + end + end + local.get $2 + i64.const 4294967295 + i64.and + local.get $1 + i32.const 614242 + i32.add + local.tee $1 + i32.const 1048575 + i32.and + i32.const 1072079006 + i32.add + i64.extend_i32_u + i64.const 32 + i64.shl + i64.or + f64.reinterpret_i64 + f64.const 1 + f64.sub + local.tee $3 + local.get $3 + f64.const 2 + f64.add + f64.div + local.tee $4 + local.get $4 + f64.mul + local.set $0 + local.get $4 + local.get $3 + f64.const 0.5 + f64.mul + local.get $3 + f64.mul + local.tee $4 + local.get $0 + local.get $0 + local.get $0 + f64.mul + local.tee $0 + local.get $0 + local.get $0 + f64.const 0.14798198605116586 + f64.mul + f64.const 0.1818357216161805 + f64.add + f64.mul + f64.const 0.2857142874366239 + f64.add + f64.mul + f64.const 0.6666666666666735 + f64.add + f64.mul + local.get $0 + local.get $0 + local.get $0 + f64.const 0.15313837699209373 + f64.mul + f64.const 0.22222198432149784 + f64.add + f64.mul + f64.const 0.3999999999940942 + f64.add + f64.mul + f64.add + f64.add + f64.mul + local.get $5 + local.get $1 + i32.const 20 + i32.shr_s + i32.const 1023 + i32.sub + i32.add + f64.convert_i32_s + local.tee $0 + f64.const 1.9082149292705877e-10 + f64.mul + f64.add + local.get $4 + f64.sub + local.get $3 + f64.add + local.get $0 + f64.const 0.6931471803691238 + f64.mul + f64.add + ) + (func $assembly/quat/ln (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $0 + i32.const 0 + local.get $2 + local.get $2 + local.get $2 + f64.mul + local.get $3 + local.get $3 + f64.mul + f64.add + local.get $4 + local.get $4 + f64.mul + f64.add + f64.sqrt + local.tee $5 + f64.const 0 + f64.gt + if (result f64) + local.get $5 + local.get $6 + call $~lib/math/NativeMath.atan2 + local.get $5 + f64.div + else + f64.const 0 + end + local.tee $5 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $3 + local.get $5 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $4 + local.get $5 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $2 + local.get $2 + f64.mul + local.get $3 + local.get $3 + f64.mul + f64.add + local.get $4 + local.get $4 + f64.mul + f64.add + local.get $6 + local.get $6 + f64.mul + f64.add + call $~lib/math/NativeMath.log + f64.const 0.5 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/quat2/fromRotationTranslation (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.const 0.5 + f64.mul + local.set $3 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.const 0.5 + f64.mul + local.set $4 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.const 0.5 + f64.mul + local.set $5 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $0 + i32.const 0 + local.get $6 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $7 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $8 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $9 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $3 + local.get $9 + f64.mul + local.get $4 + local.get $8 + f64.mul + f64.add + local.get $5 + local.get $7 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $4 + local.get $9 + f64.mul + local.get $5 + local.get $6 + f64.mul + f64.add + local.get $3 + local.get $8 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $5 + local.get $9 + f64.mul + local.get $3 + local.get $7 + f64.mul + f64.add + local.get $4 + local.get $6 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $3 + f64.neg + local.get $6 + f64.mul + local.get $4 + local.get $7 + f64.mul + f64.sub + local.get $5 + local.get $8 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/quat2/copy (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/quat2/getTranslation (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.neg + local.set $6 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.neg + local.set $7 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.neg + local.set $8 + local.get $0 + i32.const 0 + local.get $2 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.tee $10 + f64.mul + local.get $5 + local.get $6 + f64.mul + f64.add + local.get $3 + local.get $8 + f64.mul + f64.add + local.get $4 + local.get $7 + f64.mul + f64.sub + local.tee $9 + local.get $9 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $3 + local.get $10 + f64.mul + local.get $5 + local.get $7 + f64.mul + f64.add + local.get $4 + local.get $6 + f64.mul + f64.add + local.get $2 + local.get $8 + f64.mul + f64.sub + local.tee $9 + local.get $9 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $4 + local.get $10 + f64.mul + local.get $5 + local.get $8 + f64.mul + f64.add + local.get $2 + local.get $7 + f64.mul + f64.add + local.get $3 + local.get $6 + f64.mul + f64.sub + local.tee $2 + local.get $2 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/quat2/translate (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.const 0.5 + f64.mul + local.set $7 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.const 0.5 + f64.mul + local.set $8 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.const 0.5 + f64.mul + local.set $9 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $12 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $13 + local.get $0 + i32.const 0 + local.get $3 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $4 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $5 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $6 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $6 + local.get $7 + f64.mul + local.get $4 + local.get $9 + f64.mul + f64.add + local.get $5 + local.get $8 + f64.mul + f64.sub + local.get $10 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $6 + local.get $8 + f64.mul + local.get $5 + local.get $7 + f64.mul + f64.add + local.get $3 + local.get $9 + f64.mul + f64.sub + local.get $11 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $6 + local.get $9 + f64.mul + local.get $3 + local.get $8 + f64.mul + f64.add + local.get $4 + local.get $7 + f64.mul + f64.sub + local.get $12 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $3 + f64.neg + local.get $7 + f64.mul + local.get $4 + local.get $8 + f64.mul + f64.sub + local.get $5 + local.get $9 + f64.mul + f64.sub + local.get $13 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/quat2/rotateX (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 f64) + (local $16 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.neg + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.neg + local.set $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.neg + local.set $5 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $0 + local.get $1 + local.get $2 + call $assembly/quat/rotateX + drop + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $12 + local.get $0 + i32.const 4 + local.get $7 + local.get $6 + f64.mul + local.get $10 + local.get $3 + f64.mul + f64.add + local.get $8 + local.get $5 + f64.mul + f64.add + local.get $9 + local.get $4 + f64.mul + f64.sub + local.tee $13 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.tee $14 + f64.mul + local.get $10 + local.get $6 + f64.mul + local.get $7 + local.get $3 + f64.mul + f64.sub + local.get $8 + local.get $4 + f64.mul + f64.sub + local.get $9 + local.get $5 + f64.mul + f64.sub + local.tee $15 + local.get $2 + f64.mul + f64.add + local.get $8 + local.get $6 + f64.mul + local.get $10 + local.get $4 + f64.mul + f64.add + local.get $9 + local.get $3 + f64.mul + f64.add + local.get $7 + local.get $5 + f64.mul + f64.sub + local.tee $16 + local.get $12 + f64.mul + f64.add + local.get $9 + local.get $6 + f64.mul + local.get $10 + local.get $5 + f64.mul + f64.add + local.get $7 + local.get $4 + f64.mul + f64.add + local.get $8 + local.get $3 + f64.mul + f64.sub + local.tee $3 + local.get $11 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $16 + local.get $14 + f64.mul + local.get $15 + local.get $11 + f64.mul + f64.add + local.get $3 + local.get $2 + f64.mul + f64.add + local.get $13 + local.get $12 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $3 + local.get $14 + f64.mul + local.get $15 + local.get $12 + f64.mul + f64.add + local.get $13 + local.get $11 + f64.mul + f64.add + local.get $16 + local.get $2 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $15 + local.get $14 + f64.mul + local.get $13 + local.get $2 + f64.mul + f64.sub + local.get $16 + local.get $11 + f64.mul + f64.sub + local.get $3 + local.get $12 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/quat2/rotateY (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 f64) + (local $16 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.neg + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.neg + local.set $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.neg + local.set $5 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $0 + local.get $1 + local.get $2 + call $assembly/quat/rotateY + drop + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $12 + local.get $0 + i32.const 4 + local.get $7 + local.get $6 + f64.mul + local.get $10 + local.get $3 + f64.mul + f64.add + local.get $8 + local.get $5 + f64.mul + f64.add + local.get $9 + local.get $4 + f64.mul + f64.sub + local.tee $13 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.tee $14 + f64.mul + local.get $10 + local.get $6 + f64.mul + local.get $7 + local.get $3 + f64.mul + f64.sub + local.get $8 + local.get $4 + f64.mul + f64.sub + local.get $9 + local.get $5 + f64.mul + f64.sub + local.tee $15 + local.get $2 + f64.mul + f64.add + local.get $8 + local.get $6 + f64.mul + local.get $10 + local.get $4 + f64.mul + f64.add + local.get $9 + local.get $3 + f64.mul + f64.add + local.get $7 + local.get $5 + f64.mul + f64.sub + local.tee $16 + local.get $12 + f64.mul + f64.add + local.get $9 + local.get $6 + f64.mul + local.get $10 + local.get $5 + f64.mul + f64.add + local.get $7 + local.get $4 + f64.mul + f64.add + local.get $8 + local.get $3 + f64.mul + f64.sub + local.tee $3 + local.get $11 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $16 + local.get $14 + f64.mul + local.get $15 + local.get $11 + f64.mul + f64.add + local.get $3 + local.get $2 + f64.mul + f64.add + local.get $13 + local.get $12 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $3 + local.get $14 + f64.mul + local.get $15 + local.get $12 + f64.mul + f64.add + local.get $13 + local.get $11 + f64.mul + f64.add + local.get $16 + local.get $2 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $15 + local.get $14 + f64.mul + local.get $13 + local.get $2 + f64.mul + f64.sub + local.get $16 + local.get $11 + f64.mul + f64.sub + local.get $3 + local.get $12 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/quat2/rotateZ (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 f64) + (local $16 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.neg + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.neg + local.set $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.neg + local.set $5 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $0 + local.get $1 + local.get $2 + call $assembly/quat/rotateZ + drop + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $12 + local.get $0 + i32.const 4 + local.get $7 + local.get $6 + f64.mul + local.get $10 + local.get $3 + f64.mul + f64.add + local.get $8 + local.get $5 + f64.mul + f64.add + local.get $9 + local.get $4 + f64.mul + f64.sub + local.tee $13 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.tee $14 + f64.mul + local.get $10 + local.get $6 + f64.mul + local.get $7 + local.get $3 + f64.mul + f64.sub + local.get $8 + local.get $4 + f64.mul + f64.sub + local.get $9 + local.get $5 + f64.mul + f64.sub + local.tee $15 + local.get $2 + f64.mul + f64.add + local.get $8 + local.get $6 + f64.mul + local.get $10 + local.get $4 + f64.mul + f64.add + local.get $9 + local.get $3 + f64.mul + f64.add + local.get $7 + local.get $5 + f64.mul + f64.sub + local.tee $16 + local.get $12 + f64.mul + f64.add + local.get $9 + local.get $6 + f64.mul + local.get $10 + local.get $5 + f64.mul + f64.add + local.get $7 + local.get $4 + f64.mul + f64.add + local.get $8 + local.get $3 + f64.mul + f64.sub + local.tee $3 + local.get $11 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $16 + local.get $14 + f64.mul + local.get $15 + local.get $11 + f64.mul + f64.add + local.get $3 + local.get $2 + f64.mul + f64.add + local.get $13 + local.get $12 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $3 + local.get $14 + f64.mul + local.get $15 + local.get $12 + f64.mul + f64.add + local.get $13 + local.get $11 + f64.mul + f64.add + local.get $16 + local.get $2 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $15 + local.get $14 + f64.mul + local.get $13 + local.get $2 + f64.mul + f64.sub + local.get $16 + local.get $11 + f64.mul + f64.sub + local.get $3 + local.get $12 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/quat2/rotateByQuatAppend (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $0 + i32.const 0 + local.get $3 + local.get $9 + f64.mul + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.tee $10 + local.get $6 + f64.mul + f64.add + local.get $4 + local.get $8 + f64.mul + f64.add + local.get $5 + local.get $7 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $4 + local.get $9 + f64.mul + local.get $10 + local.get $7 + f64.mul + f64.add + local.get $5 + local.get $6 + f64.mul + f64.add + local.get $3 + local.get $8 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $5 + local.get $9 + f64.mul + local.get $10 + local.get $8 + f64.mul + f64.add + local.get $3 + local.get $7 + f64.mul + f64.add + local.get $4 + local.get $6 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $10 + local.get $9 + f64.mul + local.get $3 + local.get $6 + f64.mul + f64.sub + local.get $4 + local.get $7 + f64.mul + f64.sub + local.get $5 + local.get $8 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $0 + i32.const 4 + local.get $3 + local.get $9 + f64.mul + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.tee $10 + local.get $6 + f64.mul + f64.add + local.get $4 + local.get $8 + f64.mul + f64.add + local.get $5 + local.get $7 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $4 + local.get $9 + f64.mul + local.get $10 + local.get $7 + f64.mul + f64.add + local.get $5 + local.get $6 + f64.mul + f64.add + local.get $3 + local.get $8 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $5 + local.get $9 + f64.mul + local.get $10 + local.get $8 + f64.mul + f64.add + local.get $3 + local.get $7 + f64.mul + f64.add + local.get $4 + local.get $6 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $10 + local.get $9 + f64.mul + local.get $3 + local.get $6 + f64.mul + f64.sub + local.get $4 + local.get $7 + f64.mul + f64.sub + local.get $5 + local.get $8 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/quat2/rotateByQuatPrepend (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $0 + i32.const 0 + local.get $6 + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.tee $10 + f64.mul + local.get $9 + local.get $3 + f64.mul + f64.add + local.get $7 + local.get $5 + f64.mul + f64.add + local.get $8 + local.get $4 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $7 + local.get $10 + f64.mul + local.get $9 + local.get $4 + f64.mul + f64.add + local.get $8 + local.get $3 + f64.mul + f64.add + local.get $6 + local.get $5 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $8 + local.get $10 + f64.mul + local.get $9 + local.get $5 + f64.mul + f64.add + local.get $6 + local.get $4 + f64.mul + f64.add + local.get $7 + local.get $3 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $9 + local.get $10 + f64.mul + local.get $6 + local.get $3 + f64.mul + f64.sub + local.get $7 + local.get $4 + f64.mul + f64.sub + local.get $8 + local.get $5 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $2 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $2 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $2 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $0 + i32.const 4 + local.get $6 + local.get $2 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.tee $10 + f64.mul + local.get $9 + local.get $3 + f64.mul + f64.add + local.get $7 + local.get $5 + f64.mul + f64.add + local.get $8 + local.get $4 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $7 + local.get $10 + f64.mul + local.get $9 + local.get $4 + f64.mul + f64.add + local.get $8 + local.get $3 + f64.mul + f64.add + local.get $6 + local.get $5 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $8 + local.get $10 + f64.mul + local.get $9 + local.get $5 + f64.mul + f64.add + local.get $6 + local.get $4 + f64.mul + f64.add + local.get $7 + local.get $3 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $9 + local.get $10 + f64.mul + local.get $6 + local.get $3 + f64.mul + f64.sub + local.get $7 + local.get $4 + f64.mul + f64.sub + local.get $8 + local.get $5 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/quat2/rotateAroundAxis (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + local.get $3 + f64.abs + f64.const 1e-06 + f64.lt + if + local.get $0 + local.get $1 + call $assembly/quat2/copy + return + end + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $assembly/imports/MathUtil.hypot + local.set $4 + local.get $3 + f64.const 0.5 + f64.mul + local.tee $5 + call $~lib/math/NativeMath.sin + local.tee $6 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.mul + local.get $4 + f64.div + local.set $3 + local.get $6 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.mul + local.get $4 + f64.div + local.set $9 + local.get $6 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.mul + local.get $4 + f64.div + local.set $4 + local.get $5 + call $~lib/math/NativeMath.cos + local.set $6 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $0 + i32.const 0 + local.get $5 + local.get $6 + f64.mul + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.tee $10 + local.get $3 + f64.mul + f64.add + local.get $7 + local.get $4 + f64.mul + f64.add + local.get $8 + local.get $9 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $7 + local.get $6 + f64.mul + local.get $10 + local.get $9 + f64.mul + f64.add + local.get $8 + local.get $3 + f64.mul + f64.add + local.get $5 + local.get $4 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $8 + local.get $6 + f64.mul + local.get $10 + local.get $4 + f64.mul + f64.add + local.get $5 + local.get $9 + f64.mul + f64.add + local.get $7 + local.get $3 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $10 + local.get $6 + f64.mul + local.get $5 + local.get $3 + f64.mul + f64.sub + local.get $7 + local.get $9 + f64.mul + f64.sub + local.get $8 + local.get $4 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $0 + i32.const 4 + local.get $5 + local.get $6 + f64.mul + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.tee $10 + local.get $3 + f64.mul + f64.add + local.get $7 + local.get $4 + f64.mul + f64.add + local.get $8 + local.get $9 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $7 + local.get $6 + f64.mul + local.get $10 + local.get $9 + f64.mul + f64.add + local.get $8 + local.get $3 + f64.mul + f64.add + local.get $5 + local.get $4 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $8 + local.get $6 + f64.mul + local.get $10 + local.get $4 + f64.mul + f64.add + local.get $5 + local.get $9 + f64.mul + f64.add + local.get $7 + local.get $3 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $10 + local.get $6 + f64.mul + local.get $5 + local.get $3 + f64.mul + f64.sub + local.get $7 + local.get $9 + f64.mul + f64.sub + local.get $8 + local.get $4 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/quat2/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/quat2/lerp (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + (local $4 f64) + i32.const 2 + global.set $~argumentsLength + f64.const 1 + local.get $3 + f64.sub + local.set $4 + local.get $3 + f64.neg + local.get $3 + local.get $1 + local.get $2 + i32.const 2544 + i32.load + call_indirect $0 (type $i32_i32_=>_f64) + f64.const 0 + f64.lt + select + local.set $3 + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + local.get $2 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + local.get $2 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + local.get $2 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + local.get $2 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/quat2/normalize (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + i32.const 1 + global.set $~argumentsLength + local.get $1 + i32.const 2256 + i32.load + call_indirect $0 (type $i32_=>_f64) + local.tee $2 + f64.const 0 + f64.gt + if + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.sqrt + local.tee $2 + f64.div + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.div + local.set $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.div + local.set $5 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.div + local.set $6 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $0 + i32.const 0 + local.get $3 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $4 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $5 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $6 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $7 + local.get $3 + local.get $3 + local.get $7 + f64.mul + local.get $4 + local.get $8 + f64.mul + f64.add + local.get $5 + local.get $9 + f64.mul + f64.add + local.get $6 + local.get $10 + f64.mul + f64.add + local.tee $3 + f64.mul + f64.sub + local.get $2 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $8 + local.get $4 + local.get $3 + f64.mul + f64.sub + local.get $2 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $9 + local.get $5 + local.get $3 + f64.mul + f64.sub + local.get $2 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $10 + local.get $6 + local.get $3 + f64.mul + f64.sub + local.get $2 + f64.div + call $~lib/typedarray/Float64Array#__set + end + local.get $0 + ) + (func $assembly/quat2/equals (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 f64) + (local $16 f64) + (local $17 f64) + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $0 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $0 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $0 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $0 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $12 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $13 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $14 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $15 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $16 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $17 + local.get $2 + local.get $10 + f64.sub + f64.abs + f64.const 1 + local.get $2 + f64.abs + local.get $10 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + if (result i32) + local.get $3 + local.get $11 + f64.sub + f64.abs + f64.const 1 + local.get $3 + f64.abs + local.get $11 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $4 + local.get $12 + f64.sub + f64.abs + f64.const 1 + local.get $4 + f64.abs + local.get $12 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $5 + local.get $13 + f64.sub + f64.abs + f64.const 1 + local.get $5 + f64.abs + local.get $13 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $6 + local.get $14 + f64.sub + f64.abs + f64.const 1 + local.get $6 + f64.abs + local.get $14 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $7 + local.get $15 + f64.sub + f64.abs + f64.const 1 + local.get $7 + f64.abs + local.get $15 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $8 + local.get $16 + f64.sub + f64.abs + f64.const 1 + local.get $8 + f64.abs + local.get $16 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $9 + local.get $17 + f64.sub + f64.abs + f64.const 1 + local.get $9 + f64.abs + local.get $17 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + ) + (func $assembly/vec3/hermite (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 f64) (result i32) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $5 + local.get $5 + f64.mul + local.tee $6 + local.get $5 + local.get $5 + f64.add + local.tee $9 + f64.const 3 + f64.sub + f64.mul + f64.const 1 + f64.add + local.tee $7 + f64.mul + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $6 + local.get $5 + f64.const 2 + f64.sub + f64.mul + local.get $5 + f64.add + local.tee $8 + f64.mul + f64.add + local.get $3 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $6 + local.get $5 + f64.const 1 + f64.sub + f64.mul + local.tee $5 + f64.mul + f64.add + local.get $4 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $6 + f64.const 3 + local.get $9 + f64.sub + f64.mul + local.tee $6 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $7 + f64.mul + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $8 + f64.mul + f64.add + local.get $3 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.mul + f64.add + local.get $4 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $6 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $7 + f64.mul + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $8 + f64.mul + f64.add + local.get $3 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.mul + f64.add + local.get $4 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $6 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec3/bezier (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 f64) (result i32) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.const 1 + local.get $5 + f64.sub + local.tee $6 + local.get $6 + f64.mul + local.tee $7 + local.get $6 + f64.mul + local.tee $8 + f64.mul + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.const 3 + f64.mul + local.get $7 + f64.mul + local.tee $7 + f64.mul + f64.add + local.get $3 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $5 + local.get $5 + f64.mul + local.tee $9 + f64.const 3 + f64.mul + local.get $6 + f64.mul + local.tee $6 + f64.mul + f64.add + local.get $4 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $9 + local.get $5 + f64.mul + local.tee $5 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $8 + f64.mul + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $7 + f64.mul + f64.add + local.get $3 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $6 + f64.mul + f64.add + local.get $4 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $8 + f64.mul + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $7 + f64.mul + f64.add + local.get $3 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $6 + f64.mul + f64.add + local.get $4 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec3/transformMat4 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + local.get $2 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.mul + f64.add + local.get $2 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.get $6 + f64.mul + f64.add + local.get $2 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + f64.add + local.tee $3 + f64.const 1 + local.get $3 + i64.reinterpret_f64 + i64.const 1 + i64.shl + i64.const 2 + i64.sub + i64.const -9007199254740994 + i64.le_u + select + local.set $3 + local.get $0 + i32.const 0 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + local.get $2 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.mul + f64.add + local.get $2 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.get $6 + f64.mul + f64.add + local.get $2 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + f64.add + local.get $3 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + local.get $2 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.mul + f64.add + local.get $2 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.get $6 + f64.mul + f64.add + local.get $2 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + f64.add + local.get $3 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + local.get $2 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.mul + f64.add + local.get $2 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.get $6 + f64.mul + f64.add + local.get $2 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + f64.add + local.get $3 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec3/transformQuat (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $0 + i32.const 0 + local.get $5 + local.get $7 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.tee $9 + f64.mul + local.get $4 + local.get $8 + f64.mul + f64.sub + local.tee $10 + local.get $6 + local.get $6 + f64.add + local.tee $6 + f64.mul + f64.add + local.get $7 + local.get $3 + local.get $8 + f64.mul + local.get $7 + local.get $5 + f64.mul + f64.sub + local.tee $11 + f64.mul + local.get $4 + local.get $4 + local.get $5 + f64.mul + local.get $3 + local.get $9 + f64.mul + f64.sub + local.tee $5 + f64.mul + f64.sub + local.tee $12 + local.get $12 + f64.add + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $8 + local.get $5 + local.get $6 + f64.mul + f64.add + local.get $4 + local.get $10 + f64.mul + local.get $3 + local.get $11 + f64.mul + f64.sub + local.tee $4 + local.get $4 + f64.add + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $9 + local.get $11 + local.get $6 + f64.mul + f64.add + local.get $3 + local.get $5 + f64.mul + local.get $7 + local.get $10 + f64.mul + f64.sub + local.tee $3 + local.get $3 + f64.add + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 f64) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_u + if + local.get $1 + i32.const 0 + i32.lt_s + if + i32.const 1168 + i32.const 5328 + i32.const 108 + i32.const 22 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 1 + i32.add + local.tee $7 + local.set $4 + local.get $7 + local.get $0 + i32.load offset=8 + local.tee $8 + i32.const 3 + i32.shr_u + i32.gt_u + if + local.get $4 + i32.const 134217727 + i32.gt_u + if + i32.const 1584 + i32.const 5328 + i32.const 14 + i32.const 48 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load + local.tee $9 + local.set $3 + block $__inlined_func$~lib/rt/itcms/__renew + local.get $4 + i32.const 3 + i32.shl + local.tee $10 + local.tee $5 + local.get $9 + i32.const 20 + i32.sub + local.tee $6 + i32.load + i32.const -4 + i32.and + i32.const 16 + i32.sub + i32.le_u + if + local.get $6 + local.get $5 + i32.store offset=16 + br $__inlined_func$~lib/rt/itcms/__renew + end + local.get $5 + local.get $6 + i32.load offset=12 + call $~lib/rt/itcms/__new + local.tee $4 + local.get $3 + local.get $5 + local.get $6 + i32.load offset=16 + local.tee $3 + local.get $3 + local.get $5 + i32.gt_u + select + call $~lib/memory/memory.copy + local.get $4 + local.set $3 + end + local.get $3 + local.get $8 + i32.add + local.get $10 + local.get $8 + i32.sub + call $~lib/memory/memory.fill + local.get $3 + local.get $9 + i32.ne + if + local.get $0 + local.get $3 + i32.store + local.get $0 + local.get $3 + i32.store offset=4 + local.get $0 + local.get $3 + i32.const 0 + call $~lib/rt/itcms/__link + end + local.get $0 + local.get $10 + i32.store offset=8 + end + local.get $0 + local.get $7 + i32.store offset=12 + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + local.get $2 + f64.store + ) + (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result f64) + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_u + if + i32.const 1168 + i32.const 5328 + i32.const 92 + i32.const 42 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + f64.load + ) + (func $assembly/vec4/cross (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $3 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.mul + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $3 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.sub + local.set $5 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $3 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.mul + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $3 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.sub + local.set $6 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $3 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.mul + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $3 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.sub + local.set $7 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $3 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.mul + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $3 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.sub + local.set $8 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $3 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.mul + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $3 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.sub + local.set $9 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $3 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.mul + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $3 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.sub + local.set $10 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $0 + i32.const 0 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.tee $11 + local.get $10 + f64.mul + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.tee $12 + local.get $9 + f64.mul + f64.sub + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.tee $13 + local.get $8 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $4 + local.get $10 + f64.mul + f64.neg + local.get $12 + local.get $7 + f64.mul + f64.add + local.get $13 + local.get $6 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $4 + local.get $9 + f64.mul + local.get $11 + local.get $7 + f64.mul + f64.sub + local.get $13 + local.get $5 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $4 + local.get $8 + f64.mul + f64.neg + local.get $11 + local.get $6 + f64.mul + f64.add + local.get $12 + local.get $5 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec4/random (param $0 i32) (param $1 f64) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + local.get $1 + f64.const 1 + local.get $1 + i64.reinterpret_f64 + i64.const 1 + i64.shl + i64.const 2 + i64.sub + i64.const -9007199254740994 + i64.le_u + select + local.set $1 + loop $do-continue|0 + i32.const 0 + global.set $~argumentsLength + global.get $assembly/common/RANDOM + i32.load + call_indirect $0 (type $none_=>_f64) + local.tee $2 + local.get $2 + f64.add + f64.const 1 + f64.sub + local.set $2 + i32.const 0 + global.set $~argumentsLength + local.get $2 + local.get $2 + f64.mul + global.get $assembly/common/RANDOM + i32.load + call_indirect $0 (type $none_=>_f64) + local.tee $3 + local.get $3 + f64.add + f64.const 1 + f64.sub + local.tee $5 + local.get $5 + f64.mul + f64.add + local.tee $6 + f64.const 1 + f64.ge + br_if $do-continue|0 + end + loop $do-continue|1 + i32.const 0 + global.set $~argumentsLength + global.get $assembly/common/RANDOM + i32.load + call_indirect $0 (type $none_=>_f64) + local.tee $3 + local.get $3 + f64.add + f64.const 1 + f64.sub + local.set $3 + i32.const 0 + global.set $~argumentsLength + local.get $3 + local.get $3 + f64.mul + global.get $assembly/common/RANDOM + i32.load + call_indirect $0 (type $none_=>_f64) + local.tee $4 + local.get $4 + f64.add + f64.const 1 + f64.sub + local.tee $4 + local.get $4 + f64.mul + f64.add + local.tee $7 + f64.const 1 + f64.ge + br_if $do-continue|1 + end + local.get $0 + i32.const 0 + local.get $1 + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + local.get $5 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + local.get $3 + f64.mul + f64.const 1 + local.get $6 + f64.sub + local.get $7 + f64.div + f64.sqrt + local.tee $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + local.get $4 + f64.mul + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec4/transformMat4 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $0 + i32.const 0 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + local.get $2 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + f64.add + local.get $2 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.mul + f64.add + local.get $2 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + local.get $6 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + local.get $2 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + f64.add + local.get $2 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.mul + f64.add + local.get $2 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + local.get $6 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + local.get $2 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + f64.add + local.get $2 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.mul + f64.add + local.get $2 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + local.get $6 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + local.get $2 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + f64.add + local.get $2 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.mul + f64.add + local.get $2 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + local.get $6 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec4/transformQuat (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $0 + i32.const 0 + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.tee $7 + local.get $3 + f64.mul + local.get $5 + local.get $9 + f64.mul + f64.add + local.get $6 + local.get $8 + f64.mul + f64.sub + local.tee $10 + local.get $7 + f64.mul + local.get $4 + f64.neg + local.get $3 + f64.mul + local.get $5 + local.get $8 + f64.mul + f64.sub + local.get $6 + local.get $9 + f64.mul + f64.sub + local.tee $11 + local.get $4 + f64.neg + f64.mul + f64.add + local.get $7 + local.get $8 + f64.mul + local.get $6 + local.get $3 + f64.mul + f64.add + local.get $4 + local.get $9 + f64.mul + f64.sub + local.tee $12 + local.get $6 + f64.neg + f64.mul + f64.add + local.get $7 + local.get $9 + f64.mul + local.get $4 + local.get $8 + f64.mul + f64.add + local.get $5 + local.get $3 + f64.mul + f64.sub + local.tee $3 + local.get $5 + f64.neg + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $12 + local.get $7 + f64.mul + local.get $11 + local.get $5 + f64.neg + f64.mul + f64.add + local.get $3 + local.get $4 + f64.neg + f64.mul + f64.add + local.get $10 + local.get $6 + f64.neg + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $3 + local.get $7 + f64.mul + local.get $11 + local.get $6 + f64.neg + f64.mul + f64.add + local.get $10 + local.get $5 + f64.neg + f64.mul + f64.add + local.get $12 + local.get $4 + f64.neg + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $~lib/rt/__visit_members (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + block $folding-inner2 + block $folding-inner1 + block $folding-inner0 + block $invalid + block $assembly/mat4/Fov + block $~lib/array/Array<~lib/typedarray/Float64Array> + block $assembly/imports/IArguments + block $~lib/string/String + block $~lib/arraybuffer/ArrayBuffer + local.get $0 + i32.const 8 + i32.sub + i32.load + br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $folding-inner2 $folding-inner0 $folding-inner2 $folding-inner0 $folding-inner0 $folding-inner0 $assembly/imports/IArguments $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $~lib/array/Array<~lib/typedarray/Float64Array> $folding-inner1 $assembly/mat4/Fov $folding-inner1 $invalid + end + return + end + return + end + return + end + local.get $0 + i32.load offset=4 + local.tee $1 + local.get $0 + i32.load offset=12 + i32.const 2 + i32.shl + i32.add + local.set $2 + loop $while-continue|0 + local.get $1 + local.get $2 + i32.lt_u + if + local.get $1 + i32.load + local.tee $3 + if + local.get $3 + call $~lib/rt/itcms/__visit + end + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $while-continue|0 end + end + local.get $0 + i32.load + call $~lib/rt/itcms/__visit + return + end + return + end + unreachable + end + local.get $0 + i32.load offset=4 + call $~lib/rt/itcms/__visit + return + end + local.get $0 + i32.load + call $~lib/rt/itcms/__visit + return + end + local.get $0 + i32.load + local.tee $0 + if + local.get $0 + call $~lib/rt/itcms/__visit + end + ) + (func $~setArgumentsLength (param $0 i32) + local.get $0 + global.set $~argumentsLength + ) + (func $~start + memory.size + i32.const 16 + i32.shl + i32.const 22140 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold + i32.const 1808 + call $~lib/rt/itcms/initLazy + global.set $~lib/rt/itcms/pinSpace + i32.const 1840 + call $~lib/rt/itcms/initLazy + global.set $~lib/rt/itcms/toSpace + i32.const 1920 + call $~lib/rt/itcms/initLazy + global.set $~lib/rt/itcms/fromSpace + call $assembly/vec3/create + global.set $assembly/vec3/vec + call $assembly/vec4/create + global.set $assembly/vec4/vec + call $assembly/vec3/create + global.set $assembly/quat/tmpvec3 + f64.const 1 + f64.const 0 + f64.const 0 + call $assembly/vec3/fromValues + global.set $assembly/quat/xUnitVec3 + f64.const 0 + f64.const 1 + f64.const 0 + call $assembly/vec3/fromValues + global.set $assembly/quat/yUnitVec3 + call $assembly/quat/create + global.set $assembly/quat/temp1 + call $assembly/quat/create + global.set $assembly/quat/temp2 + call $assembly/mat3/create + global.set $assembly/quat/matr + call $assembly/vec2/create + global.set $assembly/vec2/vec + ) + (func $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 5756 + i32.lt_s + if + i32.const 22160 + i32.const 22208 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + ) + (func $assembly/vec3/forEach~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (result i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + local.get $1 + i32.const 3 + local.get $1 + select + local.set $8 + local.get $2 + i32.const 0 + local.get $2 + select + local.set $2 + local.get $3 + if (result i32) + local.get $2 + local.get $3 + local.get $8 + i32.mul + i32.add + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.const 0 + call $assembly/imports/MathUtil.min + else + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + end + local.set $1 + loop $for-loop|0 + local.get $1 + local.get $2 + i32.gt_s + if + global.get $~lib/memory/__stack_pointer + global.get $assembly/vec3/vec + local.tee $3 + i32.store + local.get $3 + i32.const 0 + local.get $0 + local.get $2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + global.get $assembly/vec3/vec + local.tee $3 + i32.store + local.get $3 + i32.const 1 + local.get $0 + local.get $2 + i32.const 1 + i32.add + local.tee $3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + global.get $assembly/vec3/vec + local.tee $7 + i32.store + local.get $7 + i32.const 2 + local.get $0 + local.get $2 + i32.const 2 + i32.add + local.tee $7 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + global.get $assembly/vec3/vec + local.tee $6 + i32.store + global.get $~lib/memory/__stack_pointer + global.get $assembly/vec3/vec + local.tee $9 + i32.store offset=4 + i32.const 3 + global.set $~argumentsLength + local.get $6 + local.get $9 + local.get $5 + local.get $4 + i32.load + call_indirect $0 (type $i32_i32_i32_=>_none) + global.get $~lib/memory/__stack_pointer + global.get $assembly/vec3/vec + local.tee $6 + i32.store + local.get $0 + local.get $2 + local.get $6 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + global.get $assembly/vec3/vec + local.tee $6 + i32.store + local.get $0 + local.get $3 + local.get $6 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + global.get $assembly/vec3/vec + local.tee $3 + i32.store + local.get $0 + local.get $7 + local.get $3 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $2 + local.get $8 + i32.add + local.set $2 + br $for-loop|0 + end + end + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $assembly/vec4/forEach~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (result i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + local.get $1 + i32.const 4 + local.get $1 + select + local.set $9 + local.get $2 + i32.const 0 + local.get $2 + select + local.set $2 + local.get $3 + if (result i32) + local.get $2 + local.get $3 + local.get $9 + i32.mul + i32.add + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.const 0 + call $assembly/imports/MathUtil.min + else + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + end + local.set $1 + loop $for-loop|0 + local.get $1 + local.get $2 + i32.gt_s + if + global.get $~lib/memory/__stack_pointer + global.get $assembly/vec4/vec + local.tee $3 + i32.store + local.get $3 + i32.const 0 + local.get $0 + local.get $2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + global.get $assembly/vec4/vec + local.tee $3 + i32.store + local.get $3 + i32.const 1 + local.get $0 + local.get $2 + i32.const 1 + i32.add + local.tee $3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + global.get $assembly/vec4/vec + local.tee $7 + i32.store + local.get $7 + i32.const 2 + local.get $0 + local.get $2 + i32.const 2 + i32.add + local.tee $7 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + global.get $assembly/vec4/vec + local.tee $8 + i32.store + local.get $8 + i32.const 3 + local.get $0 + local.get $2 + i32.const 3 + i32.add + local.tee $8 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + global.get $assembly/vec4/vec + local.tee $6 + i32.store + global.get $~lib/memory/__stack_pointer + global.get $assembly/vec4/vec + local.tee $10 + i32.store offset=4 + i32.const 3 + global.set $~argumentsLength + local.get $6 + local.get $10 + local.get $5 + local.get $4 + i32.load + call_indirect $0 (type $i32_i32_i32_=>_none) + global.get $~lib/memory/__stack_pointer + global.get $assembly/vec4/vec + local.tee $6 + i32.store + local.get $0 + local.get $2 + local.get $6 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + global.get $assembly/vec4/vec + local.tee $6 + i32.store + local.get $0 + local.get $3 + local.get $6 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + global.get $assembly/vec4/vec + local.tee $3 + i32.store + local.get $0 + local.get $7 + local.get $3 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + global.get $assembly/vec4/vec + local.tee $3 + i32.store + local.get $0 + local.get $8 + local.get $3 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $2 + local.get $9 + i32.add + local.set $2 + br $for-loop|0 + end + end + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $assembly/quat/rotationTo~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 f64) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + local.get $1 + local.get $2 + call $assembly/vec3/dot + local.tee $4 + f64.const -0.999999 + f64.lt + if + global.get $~lib/memory/__stack_pointer + global.get $assembly/quat/tmpvec3 + local.tee $2 + i32.store + local.get $2 + global.get $~lib/memory/__stack_pointer + global.get $assembly/quat/xUnitVec3 + local.tee $2 + i32.store offset=4 + local.get $2 + local.get $1 + call $assembly/vec3/cross + drop + global.get $~lib/memory/__stack_pointer + global.get $assembly/quat/tmpvec3 + local.tee $2 + i32.store + i32.const 1 + global.set $~argumentsLength + local.get $2 + i32.const 1520 + i32.load + call_indirect $0 (type $i32_=>_f64) + f64.const 1e-06 + f64.lt + if + global.get $~lib/memory/__stack_pointer + global.get $assembly/quat/tmpvec3 + local.tee $2 + i32.store + local.get $2 + global.get $~lib/memory/__stack_pointer + global.get $assembly/quat/yUnitVec3 + local.tee $2 + i32.store offset=4 + local.get $2 + local.get $1 + call $assembly/vec3/cross + drop + end + global.get $~lib/memory/__stack_pointer + global.get $assembly/quat/tmpvec3 + local.tee $1 + i32.store + local.get $1 + global.get $~lib/memory/__stack_pointer + global.get $assembly/quat/tmpvec3 + local.tee $1 + i32.store offset=4 + local.get $1 + call $assembly/vec3/normalize + drop + global.get $~lib/memory/__stack_pointer + global.get $assembly/quat/tmpvec3 + local.tee $1 + i32.store offset=4 + local.get $0 + local.get $1 + f64.const 3.141592653589793 + call $assembly/quat/setAxisAngle + drop + else + local.get $4 + f64.const 0.999999 + f64.gt + if + local.get $0 + i32.const 0 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + else + global.get $~lib/memory/__stack_pointer + global.get $assembly/quat/tmpvec3 + local.tee $3 + i32.store + local.get $3 + local.get $1 + local.get $2 + call $assembly/vec3/cross + drop + global.get $~lib/memory/__stack_pointer + global.get $assembly/quat/tmpvec3 + local.tee $1 + i32.store + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + global.get $assembly/quat/tmpvec3 + local.tee $1 + i32.store + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + global.get $assembly/quat/tmpvec3 + local.tee $1 + i32.store + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $4 + f64.const 1 + f64.add + call $~lib/typedarray/Float64Array#__set + i32.const 2 + global.set $~argumentsLength + local.get $0 + local.get $0 + i32.const 2608 + i32.load + call_indirect $0 (type $i32_i32_=>_i32) + local.set $0 + end + end + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $assembly/quat/sqlerp~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 f64) (result i32) + (local $6 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store offset=8 + global.get $~lib/memory/__stack_pointer + global.get $assembly/quat/temp1 + local.tee $6 + i32.store + local.get $6 + local.get $1 + local.get $4 + local.get $5 + call $assembly/quat/slerp + drop + global.get $~lib/memory/__stack_pointer + global.get $assembly/quat/temp2 + local.tee $1 + i32.store + local.get $1 + local.get $2 + local.get $3 + local.get $5 + call $assembly/quat/slerp + drop + global.get $~lib/memory/__stack_pointer + global.get $assembly/quat/temp1 + local.tee $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + global.get $assembly/quat/temp2 + local.tee $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + local.get $5 + local.get $5 + f64.add + f64.const 1 + local.get $5 + f64.sub + f64.mul + call $assembly/quat/slerp + drop + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $assembly/quat/setAxes~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store offset=8 + global.get $~lib/memory/__stack_pointer + global.get $assembly/quat/matr + local.tee $4 + i32.store + local.get $4 + i32.const 0 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + global.get $assembly/quat/matr + local.tee $4 + i32.store + local.get $4 + i32.const 3 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + global.get $assembly/quat/matr + local.tee $4 + i32.store + local.get $4 + i32.const 6 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + global.get $assembly/quat/matr + local.tee $2 + i32.store + local.get $2 + i32.const 1 + local.get $3 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + global.get $assembly/quat/matr + local.tee $2 + i32.store + local.get $2 + i32.const 4 + local.get $3 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + global.get $assembly/quat/matr + local.tee $2 + i32.store + local.get $2 + i32.const 7 + local.get $3 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + global.get $assembly/quat/matr + local.tee $2 + i32.store + local.get $2 + i32.const 2 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.neg + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + global.get $assembly/quat/matr + local.tee $2 + i32.store + local.get $2 + i32.const 5 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.neg + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + global.get $assembly/quat/matr + local.tee $2 + i32.store + local.get $2 + i32.const 8 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + local.set $1 + global.get $~lib/memory/__stack_pointer + global.get $assembly/quat/matr + local.tee $0 + i32.store offset=8 + local.get $1 + local.get $0 + call $assembly/quat/fromMat3 + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=4 + i32.const 2 + global.set $~argumentsLength + local.get $1 + local.get $0 + i32.const 2608 + i32.load + call_indirect $0 (type $i32_i32_=>_i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $assembly/vec2/forEach~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (result i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + local.get $1 + i32.const 2 + local.get $1 + select + local.set $7 + local.get $2 + i32.const 0 + local.get $2 + select + local.set $2 + local.get $3 + if (result i32) + local.get $2 + local.get $3 + local.get $7 + i32.mul + i32.add + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.const 0 + call $assembly/imports/MathUtil.min + else + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + end + local.set $1 + loop $for-loop|0 + local.get $1 + local.get $2 + i32.gt_s + if + global.get $~lib/memory/__stack_pointer + global.get $assembly/vec2/vec + local.tee $3 + i32.store + local.get $3 + i32.const 0 + local.get $0 + local.get $2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + global.get $assembly/vec2/vec + local.tee $3 + i32.store + local.get $3 + i32.const 1 + local.get $0 + local.get $2 + i32.const 1 + i32.add + local.tee $3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + global.get $assembly/vec2/vec + local.tee $6 + i32.store + global.get $~lib/memory/__stack_pointer + global.get $assembly/vec2/vec + local.tee $8 + i32.store offset=4 + i32.const 3 + global.set $~argumentsLength + local.get $6 + local.get $8 + local.get $5 + local.get $4 + i32.load + call_indirect $0 (type $i32_i32_i32_=>_none) + global.get $~lib/memory/__stack_pointer + global.get $assembly/vec2/vec + local.tee $6 + i32.store + local.get $0 + local.get $2 + local.get $6 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + global.get $assembly/vec2/vec + local.tee $6 + i32.store + local.get $0 + local.get $3 + local.get $6 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $2 + local.get $7 + i32.add + local.set $2 + br $for-loop|0 + end + end + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $assembly/mat2/str (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const -64 + i32.add + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=8 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=16 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=24 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=32 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=40 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=48 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=56 + global.get $~lib/memory/__stack_pointer + i32.const 3520 + i32.store offset=56 + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=60 + i32.const 3520 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=48 + global.get $~lib/memory/__stack_pointer + i32.const 4720 + i32.store offset=52 + local.get $1 + i32.const 4720 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=40 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=44 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=32 + global.get $~lib/memory/__stack_pointer + i32.const 4720 + i32.store offset=36 + local.get $1 + i32.const 4720 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=24 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=28 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=16 + global.get $~lib/memory/__stack_pointer + i32.const 4720 + i32.store offset=20 + local.get $1 + i32.const 4720 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=8 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=12 + local.get $1 + local.get $0 + call $~lib/string/String.__concat + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 4752 + i32.store offset=4 + local.get $0 + i32.const 4752 + call $~lib/string/String.__concat + global.get $~lib/memory/__stack_pointer + i32.const -64 + i32.sub + global.set $~lib/memory/__stack_pointer + ) + (func $assembly/mat2d/str (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 96 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=8 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=16 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=24 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=32 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=40 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=48 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=56 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=64 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=72 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=80 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=88 + global.get $~lib/memory/__stack_pointer + i32.const 4784 + i32.store offset=88 + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=92 + i32.const 4784 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=80 + global.get $~lib/memory/__stack_pointer + i32.const 4720 + i32.store offset=84 + local.get $1 + i32.const 4720 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=72 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=76 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=64 + global.get $~lib/memory/__stack_pointer + i32.const 4720 + i32.store offset=68 + local.get $1 + i32.const 4720 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=56 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=60 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=48 + global.get $~lib/memory/__stack_pointer + i32.const 4720 + i32.store offset=52 + local.get $1 + i32.const 4720 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=40 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=44 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=32 + global.get $~lib/memory/__stack_pointer + i32.const 4720 + i32.store offset=36 + local.get $1 + i32.const 4720 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=24 + local.get $0 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=28 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=16 + global.get $~lib/memory/__stack_pointer + i32.const 4720 + i32.store offset=20 + local.get $1 + i32.const 4720 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=8 + local.get $0 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=12 + local.get $1 + local.get $0 + call $~lib/string/String.__concat + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 4752 + i32.store offset=4 + local.get $0 + i32.const 4752 + call $~lib/string/String.__concat + global.get $~lib/memory/__stack_pointer + i32.const 96 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $assembly/mat3/str (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 144 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=8 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=16 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=24 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=32 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=40 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=48 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=56 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=64 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=72 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=80 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=88 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=96 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=104 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=112 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=120 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=128 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=136 + global.get $~lib/memory/__stack_pointer + i32.const 4816 + i32.store offset=136 + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=140 + i32.const 4816 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=128 + global.get $~lib/memory/__stack_pointer + i32.const 4720 + i32.store offset=132 + local.get $1 + i32.const 4720 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=120 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=124 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=112 + global.get $~lib/memory/__stack_pointer + i32.const 4720 + i32.store offset=116 + local.get $1 + i32.const 4720 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=104 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=108 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=96 + global.get $~lib/memory/__stack_pointer + i32.const 4720 + i32.store offset=100 + local.get $1 + i32.const 4720 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=88 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=92 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=80 + global.get $~lib/memory/__stack_pointer + i32.const 4720 + i32.store offset=84 + local.get $1 + i32.const 4720 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=72 + local.get $0 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=76 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=64 + global.get $~lib/memory/__stack_pointer + i32.const 4720 + i32.store offset=68 + local.get $1 + i32.const 4720 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=56 + local.get $0 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=60 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=48 + global.get $~lib/memory/__stack_pointer + i32.const 4720 + i32.store offset=52 + local.get $1 + i32.const 4720 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=40 + local.get $0 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=44 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=32 + global.get $~lib/memory/__stack_pointer + i32.const 4720 + i32.store offset=36 + local.get $1 + i32.const 4720 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=24 + local.get $0 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=28 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=16 + global.get $~lib/memory/__stack_pointer + i32.const 4720 + i32.store offset=20 + local.get $1 + i32.const 4720 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=8 + local.get $0 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=12 + local.get $1 + local.get $0 + call $~lib/string/String.__concat + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 4752 + i32.store offset=4 + local.get $0 + i32.const 4752 + call $~lib/string/String.__concat + global.get $~lib/memory/__stack_pointer + i32.const 144 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $assembly/mat4/str (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 256 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=8 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=16 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=24 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=32 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=40 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=48 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=56 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=64 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=72 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=80 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=88 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=96 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=104 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=112 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=120 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=128 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=136 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=144 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=152 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=160 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=168 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=176 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=184 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=192 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=200 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=208 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=216 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=224 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=232 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=240 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=248 + global.get $~lib/memory/__stack_pointer + i32.const 4848 + i32.store offset=248 + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=252 + i32.const 4848 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=240 + global.get $~lib/memory/__stack_pointer + i32.const 4720 + i32.store offset=244 + local.get $1 + i32.const 4720 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=232 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=236 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=224 + global.get $~lib/memory/__stack_pointer + i32.const 4720 + i32.store offset=228 + local.get $1 + i32.const 4720 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=216 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=220 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=208 + global.get $~lib/memory/__stack_pointer + i32.const 4720 + i32.store offset=212 + local.get $1 + i32.const 4720 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=200 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=204 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=192 + global.get $~lib/memory/__stack_pointer + i32.const 4720 + i32.store offset=196 + local.get $1 + i32.const 4720 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=184 + local.get $0 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=188 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=176 + global.get $~lib/memory/__stack_pointer + i32.const 4720 + i32.store offset=180 + local.get $1 + i32.const 4720 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=168 + local.get $0 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=172 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=160 + global.get $~lib/memory/__stack_pointer + i32.const 4720 + i32.store offset=164 + local.get $1 + i32.const 4720 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=152 + local.get $0 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=156 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=144 + global.get $~lib/memory/__stack_pointer + i32.const 4720 + i32.store offset=148 + local.get $1 + i32.const 4720 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=136 + local.get $0 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=140 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=128 + global.get $~lib/memory/__stack_pointer + i32.const 4720 + i32.store offset=132 + local.get $1 + i32.const 4720 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=120 + local.get $0 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=124 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=112 + global.get $~lib/memory/__stack_pointer + i32.const 4720 + i32.store offset=116 + local.get $1 + i32.const 4720 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=104 + local.get $0 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=108 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=96 + global.get $~lib/memory/__stack_pointer + i32.const 4720 + i32.store offset=100 + local.get $1 + i32.const 4720 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=88 + local.get $0 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=92 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=80 + global.get $~lib/memory/__stack_pointer + i32.const 4720 + i32.store offset=84 + local.get $1 + i32.const 4720 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=72 + local.get $0 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=76 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=64 + global.get $~lib/memory/__stack_pointer + i32.const 4720 + i32.store offset=68 + local.get $1 + i32.const 4720 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=56 + local.get $0 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=60 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=48 + global.get $~lib/memory/__stack_pointer + i32.const 4720 + i32.store offset=52 + local.get $1 + i32.const 4720 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=40 + local.get $0 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=44 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=32 + global.get $~lib/memory/__stack_pointer + i32.const 4720 + i32.store offset=36 + local.get $1 + i32.const 4720 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=24 + local.get $0 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=28 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=16 + global.get $~lib/memory/__stack_pointer + i32.const 4720 + i32.store offset=20 + local.get $1 + i32.const 4720 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=8 + local.get $0 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=12 + local.get $1 + local.get $0 + call $~lib/string/String.__concat + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 4752 + i32.store offset=4 + local.get $0 + i32.const 4752 + call $~lib/string/String.__concat + global.get $~lib/memory/__stack_pointer + i32.const 256 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $assembly/quat/fromEuler (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + local.get $1 + f64.const 0.008726646259971648 + f64.mul + local.tee $5 + call $~lib/math/NativeMath.sin + local.set $1 + local.get $5 + call $~lib/math/NativeMath.cos + local.set $5 + local.get $2 + f64.const 0.008726646259971648 + f64.mul + local.tee $7 + call $~lib/math/NativeMath.sin + local.set $2 + local.get $7 + call $~lib/math/NativeMath.cos + local.set $7 + local.get $3 + f64.const 0.008726646259971648 + f64.mul + local.tee $6 + call $~lib/math/NativeMath.sin + local.set $3 + local.get $6 + call $~lib/math/NativeMath.cos + local.set $6 + local.get $4 + i32.const 4880 + i32.eq + if + local.get $0 + i32.const 0 + local.get $1 + local.get $7 + f64.mul + local.tee $8 + local.get $6 + f64.mul + local.get $5 + local.get $2 + f64.mul + local.tee $9 + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $9 + local.get $6 + f64.mul + local.get $8 + local.get $3 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $5 + local.get $7 + f64.mul + local.tee $5 + local.get $3 + f64.mul + local.get $1 + local.get $2 + f64.mul + local.tee $1 + local.get $6 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $5 + local.get $6 + f64.mul + local.get $1 + local.get $3 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + else + local.get $4 + i32.const 4912 + i32.eq + if + local.get $0 + i32.const 0 + local.get $1 + local.get $7 + f64.mul + local.tee $8 + local.get $6 + f64.mul + local.get $5 + local.get $2 + f64.mul + local.tee $9 + local.get $3 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $9 + local.get $6 + f64.mul + local.get $8 + local.get $3 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $5 + local.get $7 + f64.mul + local.tee $5 + local.get $3 + f64.mul + local.get $1 + local.get $2 + f64.mul + local.tee $1 + local.get $6 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $5 + local.get $6 + f64.mul + local.get $1 + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + else + local.get $4 + i32.const 4944 + i32.eq + if + local.get $0 + i32.const 0 + local.get $1 + local.get $7 + f64.mul + local.tee $8 + local.get $6 + f64.mul + local.get $5 + local.get $2 + f64.mul + local.tee $9 + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $9 + local.get $6 + f64.mul + local.get $8 + local.get $3 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $5 + local.get $7 + f64.mul + local.tee $5 + local.get $3 + f64.mul + local.get $1 + local.get $2 + f64.mul + local.tee $1 + local.get $6 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $5 + local.get $6 + f64.mul + local.get $1 + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + else + local.get $4 + i32.const 4976 + i32.eq + if + local.get $0 + i32.const 0 + local.get $1 + local.get $7 + f64.mul + local.tee $8 + local.get $6 + f64.mul + local.get $5 + local.get $2 + f64.mul + local.tee $9 + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $9 + local.get $6 + f64.mul + local.get $8 + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $5 + local.get $7 + f64.mul + local.tee $5 + local.get $3 + f64.mul + local.get $1 + local.get $2 + f64.mul + local.tee $1 + local.get $6 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $5 + local.get $6 + f64.mul + local.get $1 + local.get $3 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + else + local.get $4 + i32.const 5008 + i32.eq + if + local.get $0 + i32.const 0 + local.get $1 + local.get $7 + f64.mul + local.tee $8 + local.get $6 + f64.mul + local.get $5 + local.get $2 + f64.mul + local.tee $9 + local.get $3 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $9 + local.get $6 + f64.mul + local.get $8 + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $5 + local.get $7 + f64.mul + local.tee $5 + local.get $3 + f64.mul + local.get $1 + local.get $2 + f64.mul + local.tee $1 + local.get $6 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $5 + local.get $6 + f64.mul + local.get $1 + local.get $3 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + else + local.get $4 + i32.const 1136 + i32.eq + if + local.get $0 + i32.const 0 + local.get $1 + local.get $7 + f64.mul + local.tee $8 + local.get $6 + f64.mul + local.get $5 local.get $2 - i32.const 100 - i32.div_u - local.set $4 + f64.mul + local.tee $9 + local.get $3 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $9 + local.get $6 + f64.mul + local.get $8 + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $5 + local.get $7 + f64.mul + local.tee $5 + local.get $3 + f64.mul + local.get $1 local.get $2 - i32.const 100 - i32.rem_u - local.set $2 - br $break|1 + f64.mul + local.tee $1 + local.get $6 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $5 + local.get $6 + f64.mul + local.get $1 + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + else + global.get $~lib/memory/__stack_pointer + i32.const 5040 + i32.store + i32.const 5040 + local.get $4 + call $~lib/string/String.__concat + i32.const 5104 + i32.const 512 + i32.const 10 + call $~lib/builtins/abort + unreachable end - local.get $2 - i32.const 10 - i32.div_u - local.set $4 - local.get $2 - i32.const 10 - i32.rem_u - local.set $2 - br $break|1 end - local.get $2 - local.set $4 - i32.const 0 - local.set $2 - br $break|1 end - i32.const 0 - local.set $4 end + end + end + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $assembly/quat/str (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const -64 + i32.add + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=8 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=16 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=24 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=32 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=40 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=48 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=56 + global.get $~lib/memory/__stack_pointer + i32.const 5168 + i32.store offset=56 + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=60 + i32.const 5168 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=48 + global.get $~lib/memory/__stack_pointer + i32.const 4720 + i32.store offset=52 + local.get $1 + i32.const 4720 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=40 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=44 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=32 + global.get $~lib/memory/__stack_pointer + i32.const 4720 + i32.store offset=36 + local.get $1 + i32.const 4720 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=24 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=28 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=16 + global.get $~lib/memory/__stack_pointer + i32.const 4720 + i32.store offset=20 + local.get $1 + i32.const 4720 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=8 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=12 + local.get $1 + local.get $0 + call $~lib/string/String.__concat + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 4752 + i32.store offset=4 + local.get $0 + i32.const 4752 + call $~lib/string/String.__concat + global.get $~lib/memory/__stack_pointer + i32.const -64 + i32.sub + global.set $~lib/memory/__stack_pointer + ) + (func $assembly/quat2/str (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 128 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=8 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=16 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=24 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=32 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=40 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=48 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=56 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=64 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=72 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=80 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=88 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=96 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=104 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=112 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=120 + global.get $~lib/memory/__stack_pointer + i32.const 5200 + i32.store offset=120 + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=124 + i32.const 5200 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=112 + global.get $~lib/memory/__stack_pointer + i32.const 4720 + i32.store offset=116 + local.get $1 + i32.const 4720 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=104 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=108 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=96 + global.get $~lib/memory/__stack_pointer + i32.const 4720 + i32.store offset=100 + local.get $1 + i32.const 4720 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=88 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=92 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=80 + global.get $~lib/memory/__stack_pointer + i32.const 4720 + i32.store offset=84 + local.get $1 + i32.const 4720 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=72 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=76 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=64 + global.get $~lib/memory/__stack_pointer + i32.const 4720 + i32.store offset=68 + local.get $1 + i32.const 4720 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=56 + local.get $0 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=60 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=48 + global.get $~lib/memory/__stack_pointer + i32.const 4720 + i32.store offset=52 + local.get $1 + i32.const 4720 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=40 + local.get $0 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=44 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=32 + global.get $~lib/memory/__stack_pointer + i32.const 4720 + i32.store offset=36 + local.get $1 + i32.const 4720 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=24 + local.get $0 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=28 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=16 + global.get $~lib/memory/__stack_pointer + i32.const 4720 + i32.store offset=20 + local.get $1 + i32.const 4720 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=8 + local.get $0 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=12 + local.get $1 + local.get $0 + call $~lib/string/String.__concat + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 4752 + i32.store offset=4 + local.get $0 + i32.const 4752 + call $~lib/string/String.__concat + global.get $~lib/memory/__stack_pointer + i32.const 128 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $assembly/vec3/str (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 48 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=8 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=16 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=24 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=32 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=40 + global.get $~lib/memory/__stack_pointer + i32.const 5504 + i32.store offset=40 + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=44 + i32.const 5504 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=32 + global.get $~lib/memory/__stack_pointer + i32.const 4720 + i32.store offset=36 + local.get $1 + i32.const 4720 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=24 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=28 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=16 + global.get $~lib/memory/__stack_pointer + i32.const 4720 + i32.store offset=20 + local.get $1 + i32.const 4720 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=8 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=12 + local.get $1 + local.get $0 + call $~lib/string/String.__concat + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 4752 + i32.store offset=4 + local.get $0 + i32.const 4752 + call $~lib/string/String.__concat + global.get $~lib/memory/__stack_pointer + i32.const 48 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $assembly/vec4/str (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const -64 + i32.add + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=8 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=16 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=24 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=32 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=40 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=48 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=56 + global.get $~lib/memory/__stack_pointer + i32.const 5536 + i32.store offset=56 + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=60 + i32.const 5536 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=48 + global.get $~lib/memory/__stack_pointer + i32.const 4720 + i32.store offset=52 + local.get $1 + i32.const 4720 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=40 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=44 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=32 + global.get $~lib/memory/__stack_pointer + i32.const 4720 + i32.store offset=36 + local.get $1 + i32.const 4720 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=24 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=28 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=16 + global.get $~lib/memory/__stack_pointer + i32.const 4720 + i32.store offset=20 + local.get $1 + i32.const 4720 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=8 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=12 + local.get $1 + local.get $0 + call $~lib/string/String.__concat + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 4752 + i32.store offset=4 + local.get $0 + i32.const 4752 + call $~lib/string/String.__concat + global.get $~lib/memory/__stack_pointer + i32.const -64 + i32.sub + global.set $~lib/memory/__stack_pointer + ) + (func $~lib/typedarray/Float64Array#constructor (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.const 4 + call $~lib/rt/itcms/__new + local.tee $1 + i32.store + global.get $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + local.get $1 + i32.eqz + if + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.const 2 + call $~lib/rt/itcms/__new + local.tee $1 + i32.store + end + local.get $1 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#set:buffer + local.get $1 + i32.const 0 + i32.store offset=4 + local.get $1 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 134217727 + i32.gt_u + if + i32.const 1584 + i32.const 1632 + i32.const 18 + i32.const 57 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.const 3 + i32.shl + local.tee $0 + i32.const 0 + call $~lib/rt/itcms/__new + local.tee $2 + i32.store offset=4 + local.get $2 + local.get $0 + call $~lib/memory/memory.fill + local.get $1 + local.get $2 + call $~lib/arraybuffer/ArrayBufferView#set:buffer + local.get $1 + local.get $2 + i32.store offset=4 + local.get $1 + local.get $0 + i32.store offset=8 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $assembly/vec3/create (result i32) + (local $0 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + local.tee $0 + i32.store + local.get $0 + i32.const 0 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $assembly/vec4/create (result i32) + (local $0 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 4 + call $~lib/typedarray/Float64Array#constructor + local.tee $0 + i32.store + local.get $0 + i32.const 0 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $assembly/vec4/clone (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 4 + call $~lib/typedarray/Float64Array#constructor + local.tee $1 + i32.store + local.get $1 + i32.const 0 + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 1 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 2 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 3 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $assembly/vec4/fromValues (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) + (local $4 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 4 + call $~lib/typedarray/Float64Array#constructor + local.tee $4 + i32.store + local.get $4 + i32.const 0 + local.get $0 + call $~lib/typedarray/Float64Array#__set + local.get $4 + i32.const 1 + local.get $1 + call $~lib/typedarray/Float64Array#__set + local.get $4 + i32.const 2 + local.get $2 + call $~lib/typedarray/Float64Array#__set + local.get $4 + i32.const 3 + local.get $3 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $4 + ) + (func $assembly/vec3/fromValues (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + local.tee $3 + i32.store + local.get $3 + i32.const 0 + local.get $0 + call $~lib/typedarray/Float64Array#__set + local.get $3 + i32.const 1 + local.get $1 + call $~lib/typedarray/Float64Array#__set + local.get $3 + i32.const 2 + local.get $2 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $assembly/quat/create (result i32) + (local $0 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 4 + call $~lib/typedarray/Float64Array#constructor + local.tee $0 + i32.store + local.get $0 + i32.const 0 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $assembly/mat3/create (result i32) + (local $0 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 9 + call $~lib/typedarray/Float64Array#constructor + local.tee $0 + i32.store + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 0 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $assembly/vec2/create (result i32) + (local $0 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 2 + call $~lib/typedarray/Float64Array#constructor + local.tee $0 + i32.store + local.get $0 + i32.const 0 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $assembly/mat2/create (result i32) + (local $0 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 4 + call $~lib/typedarray/Float64Array#constructor + local.tee $0 + i32.store + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 0 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $~lib/rt/__newArray (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 i32) + (local $5 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $0 + local.get $1 + i32.shl + local.tee $4 + local.set $5 + local.get $4 + i32.const 0 + call $~lib/rt/itcms/__new + local.set $1 + local.get $3 + if + local.get $1 + local.get $3 + local.get $5 + call $~lib/memory/memory.copy + end + local.get $1 + local.tee $3 + i32.store + i32.const 16 + local.get $2 + call $~lib/rt/itcms/__new + local.tee $1 + local.get $3 + i32.store + local.get $1 + local.get $3 + i32.const 0 + call $~lib/rt/itcms/__link + local.get $1 + local.get $3 + i32.store offset=4 + local.get $1 + local.get $4 + i32.store offset=8 + local.get $1 + local.get $0 + i32.store offset=12 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $assembly/mat2d/create (result i32) + (local $0 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 6 + call $~lib/typedarray/Float64Array#constructor + local.tee $0 + i32.store + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 0 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $assembly/mat2d/fromValues (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (result i32) + (local $6 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 6 + call $~lib/typedarray/Float64Array#constructor + local.tee $6 + i32.store + local.get $6 + i32.const 0 + local.get $0 + call $~lib/typedarray/Float64Array#__set + local.get $6 + i32.const 1 + local.get $1 + call $~lib/typedarray/Float64Array#__set + local.get $6 + i32.const 2 + local.get $2 + call $~lib/typedarray/Float64Array#__set + local.get $6 + i32.const 3 + local.get $3 + call $~lib/typedarray/Float64Array#__set + local.get $6 + i32.const 4 + local.get $4 + call $~lib/typedarray/Float64Array#__set + local.get $6 + i32.const 5 + local.get $5 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $6 + ) + (func $assembly/mat3/fromValues (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (param $7 f64) (param $8 f64) (result i32) + (local $9 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 9 + call $~lib/typedarray/Float64Array#constructor + local.tee $9 + i32.store + local.get $9 + i32.const 0 + local.get $0 + call $~lib/typedarray/Float64Array#__set + local.get $9 + i32.const 1 + local.get $1 + call $~lib/typedarray/Float64Array#__set + local.get $9 + i32.const 2 + local.get $2 + call $~lib/typedarray/Float64Array#__set + local.get $9 + i32.const 3 + local.get $3 + call $~lib/typedarray/Float64Array#__set + local.get $9 + i32.const 4 + local.get $4 + call $~lib/typedarray/Float64Array#__set + local.get $9 + i32.const 5 + local.get $5 + call $~lib/typedarray/Float64Array#__set + local.get $9 + i32.const 6 + local.get $6 + call $~lib/typedarray/Float64Array#__set + local.get $9 + i32.const 7 + local.get $7 + call $~lib/typedarray/Float64Array#__set + local.get $9 + i32.const 8 + local.get $8 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $9 + ) + (func $assembly/mat4/create (result i32) + (local $0 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 16 + call $~lib/typedarray/Float64Array#constructor + local.tee $0 + i32.store + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 0 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $assembly/mat4/clone (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 16 + call $~lib/typedarray/Float64Array#constructor + local.tee $1 + i32.store + local.get $1 + i32.const 0 + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 1 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 2 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 3 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 4 + local.get $0 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 5 + local.get $0 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 6 + local.get $0 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 7 + local.get $0 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 8 + local.get $0 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 9 + local.get $0 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 10 + local.get $0 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 11 + local.get $0 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 12 + local.get $0 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 13 + local.get $0 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 14 + local.get $0 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 15 + local.get $0 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $assembly/mat4/fromValues (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (param $7 f64) (param $8 f64) (param $9 f64) (param $10 f64) (param $11 f64) (param $12 f64) (param $13 f64) (param $14 f64) (param $15 f64) (result i32) + (local $16 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 16 + call $~lib/typedarray/Float64Array#constructor + local.tee $16 + i32.store + local.get $16 + i32.const 0 + local.get $0 + call $~lib/typedarray/Float64Array#__set + local.get $16 + i32.const 1 + local.get $1 + call $~lib/typedarray/Float64Array#__set + local.get $16 + i32.const 2 + local.get $2 + call $~lib/typedarray/Float64Array#__set + local.get $16 + i32.const 3 + local.get $3 + call $~lib/typedarray/Float64Array#__set + local.get $16 + i32.const 4 + local.get $4 + call $~lib/typedarray/Float64Array#__set + local.get $16 + i32.const 5 + local.get $5 + call $~lib/typedarray/Float64Array#__set + local.get $16 + i32.const 6 + local.get $6 + call $~lib/typedarray/Float64Array#__set + local.get $16 + i32.const 7 + local.get $7 + call $~lib/typedarray/Float64Array#__set + local.get $16 + i32.const 8 + local.get $8 + call $~lib/typedarray/Float64Array#__set + local.get $16 + i32.const 9 + local.get $9 + call $~lib/typedarray/Float64Array#__set + local.get $16 + i32.const 10 + local.get $10 + call $~lib/typedarray/Float64Array#__set + local.get $16 + i32.const 11 + local.get $11 + call $~lib/typedarray/Float64Array#__set + local.get $16 + i32.const 12 + local.get $12 + call $~lib/typedarray/Float64Array#__set + local.get $16 + i32.const 13 + local.get $13 + call $~lib/typedarray/Float64Array#__set + local.get $16 + i32.const 14 + local.get $14 + call $~lib/typedarray/Float64Array#__set + local.get $16 + i32.const 15 + local.get $15 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $16 + ) + (func $assembly/mat4/fromQuat2 (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 i32) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + local.tee $6 + i32.store + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.neg + local.set $2 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.neg + local.set $3 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.neg + local.set $4 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $2 + local.get $2 + f64.mul + local.get $3 + local.get $3 + f64.mul + f64.add + local.get $4 + local.get $4 + f64.mul + f64.add + local.get $5 + local.get $5 + f64.mul + f64.add + local.tee $7 + f64.const 0 + f64.gt + if + local.get $6 + i32.const 0 + local.get $8 + local.get $5 + f64.mul + local.get $11 + local.get $2 + f64.mul + f64.add + local.get $9 + local.get $4 + f64.mul + f64.add + local.get $10 + local.get $3 + f64.mul + f64.sub + local.tee $12 + local.get $12 + f64.add + local.get $7 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $6 + i32.const 1 + local.get $9 + local.get $5 + f64.mul + local.get $11 + local.get $3 + f64.mul + f64.add + local.get $10 + local.get $2 + f64.mul + f64.add + local.get $8 + local.get $4 + f64.mul + f64.sub + local.tee $12 + local.get $12 + f64.add + local.get $7 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $6 + i32.const 2 + local.get $10 + local.get $5 + f64.mul + local.get $11 + local.get $4 + f64.mul + f64.add + local.get $8 + local.get $3 + f64.mul + f64.add + local.get $9 + local.get $2 + f64.mul + f64.sub + local.tee $2 + local.get $2 + f64.add + local.get $7 + f64.div + call $~lib/typedarray/Float64Array#__set + else + local.get $6 + i32.const 0 + local.get $8 + local.get $5 + f64.mul + local.get $11 + local.get $2 + f64.mul + f64.add + local.get $9 + local.get $4 + f64.mul + f64.add + local.get $10 + local.get $3 + f64.mul + f64.sub + local.tee $7 + local.get $7 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $6 + i32.const 1 + local.get $9 + local.get $5 + f64.mul + local.get $11 + local.get $3 + f64.mul + f64.add + local.get $10 + local.get $2 + f64.mul + f64.add + local.get $8 + local.get $4 + f64.mul + f64.sub + local.tee $7 + local.get $7 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $6 + i32.const 2 + local.get $10 + local.get $5 + f64.mul + local.get $11 + local.get $4 + f64.mul + f64.add + local.get $8 + local.get $3 + f64.mul + f64.add + local.get $9 + local.get $2 + f64.mul + f64.sub + local.tee $2 + local.get $2 + f64.add + call $~lib/typedarray/Float64Array#__set + end + local.get $0 + local.get $1 + local.get $6 + call $assembly/mat4/fromRotationTranslation + drop + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $assembly/mat4/getRotation (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 i32) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + local.tee $7 + i32.store + local.get $7 + local.get $1 + call $assembly/mat4/getScaling + drop + f64.const 1 + local.get $7 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.div + local.set $3 + f64.const 1 + local.get $7 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.div + local.set $4 + f64.const 1 + local.get $7 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.div + local.set $6 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + local.set $2 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + local.set $8 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $6 + f64.mul + local.set $9 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + local.set $10 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + local.set $5 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.get $6 + f64.mul + local.set $11 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + local.set $12 + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + local.set $4 + local.get $2 + local.get $5 + f64.add + local.get $1 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.get $6 + f64.mul + local.tee $3 + f64.add + local.tee $6 + f64.const 0 + f64.gt + if + local.get $0 + i32.const 3 + local.get $6 + f64.const 1 + f64.add + f64.sqrt + local.tee $2 + local.get $2 + f64.add + local.tee $2 + f64.const 0.25 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 0 + local.get $11 + local.get $4 + f64.sub + local.get $2 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $12 + local.get $9 + f64.sub + local.get $2 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $8 + local.get $10 + f64.sub + local.get $2 + f64.div + call $~lib/typedarray/Float64Array#__set + else + local.get $2 + local.get $3 + f64.gt + i32.const 0 + local.get $2 + local.get $5 + f64.gt + select + if + local.get $0 + i32.const 3 + local.get $11 local.get $4 - local.get $6 - i32.or - if - local.get $0 - local.get $6 - i32.const 1 - i32.shl - i32.add - local.get $4 - i32.const 65535 - i32.and - i32.const 48 - i32.add - i32.store16 - local.get $6 - i32.const 1 - i32.add - local.set $6 - end - local.get $9 - i32.const 1 - i32.sub - local.set $9 + f64.sub + local.get $2 + f64.const 1 + f64.add local.get $5 - local.get $7 + f64.sub + local.get $3 + f64.sub + f64.sqrt + local.tee $2 local.get $2 - i64.extend_i32_u - local.get $11 - i64.extend_i32_s - i64.shl - i64.add - local.tee $1 - i64.ge_u + f64.add + local.tee $2 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 0 + local.get $2 + f64.const 0.25 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $8 + local.get $10 + f64.add + local.get $2 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $12 + local.get $9 + f64.add + local.get $2 + f64.div + call $~lib/typedarray/Float64Array#__set + else + local.get $3 + local.get $5 + f64.lt if + local.get $0 + i32.const 3 + local.get $12 local.get $9 - global.get $~lib/util/number/_K - i32.add - global.set $~lib/util/number/_K - local.get $9 + f64.sub + local.get $5 + f64.const 1 + f64.add + local.get $2 + f64.sub + local.get $3 + f64.sub + f64.sqrt + local.tee $2 + local.get $2 + f64.add + local.tee $2 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 0 + local.get $8 + local.get $10 + f64.add + local.get $2 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $2 + f64.const 0.25 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 i32.const 2 - i32.shl - i32.const 2912 - i32.add - i64.load32_u local.get $11 - i64.extend_i32_s - i64.shl - local.set $10 + local.get $4 + f64.add + local.get $2 + f64.div + call $~lib/typedarray/Float64Array#__set + else + local.get $0 + i32.const 3 + local.get $8 + local.get $10 + f64.sub + local.get $3 + f64.const 1 + f64.add + local.get $2 + f64.sub + local.get $5 + f64.sub + f64.sqrt + local.tee $2 + local.get $2 + f64.add + local.tee $2 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 0 + local.get $12 + local.get $9 + f64.add + local.get $2 + f64.div + call $~lib/typedarray/Float64Array#__set local.get $0 - local.get $6 i32.const 1 + local.get $11 + local.get $4 + f64.add + local.get $2 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $2 + f64.const 0.25 + f64.mul + call $~lib/typedarray/Float64Array#__set + end + end + end + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $assembly/quat2/create (result i32) + (local $0 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 8 + call $~lib/typedarray/Float64Array#constructor + local.tee $0 + i32.store + local.get $0 + i32.const 0 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $assembly/quat2/fromValues (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (param $7 f64) (result i32) + (local $8 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 8 + call $~lib/typedarray/Float64Array#constructor + local.tee $8 + i32.store + local.get $8 + i32.const 0 + local.get $0 + call $~lib/typedarray/Float64Array#__set + local.get $8 + i32.const 1 + local.get $1 + call $~lib/typedarray/Float64Array#__set + local.get $8 + i32.const 2 + local.get $2 + call $~lib/typedarray/Float64Array#__set + local.get $8 + i32.const 3 + local.get $3 + call $~lib/typedarray/Float64Array#__set + local.get $8 + i32.const 4 + local.get $4 + call $~lib/typedarray/Float64Array#__set + local.get $8 + i32.const 5 + local.get $5 + call $~lib/typedarray/Float64Array#__set + local.get $8 + i32.const 6 + local.get $6 + call $~lib/typedarray/Float64Array#__set + local.get $8 + i32.const 7 + local.get $7 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $8 + ) + (func $assembly/quat2/fromRotationTranslationValues (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (result i32) + (local $7 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 8 + call $~lib/typedarray/Float64Array#constructor + local.tee $7 + i32.store + local.get $7 + i32.const 0 + local.get $0 + call $~lib/typedarray/Float64Array#__set + local.get $7 + i32.const 1 + local.get $1 + call $~lib/typedarray/Float64Array#__set + local.get $7 + i32.const 2 + local.get $2 + call $~lib/typedarray/Float64Array#__set + local.get $7 + i32.const 3 + local.get $3 + call $~lib/typedarray/Float64Array#__set + local.get $7 + i32.const 4 + local.get $4 + f64.const 0.5 + f64.mul + local.tee $4 + local.get $3 + f64.mul + local.get $5 + f64.const 0.5 + f64.mul + local.tee $5 + local.get $2 + f64.mul + f64.add + local.get $6 + f64.const 0.5 + f64.mul + local.tee $6 + local.get $1 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $7 + i32.const 5 + local.get $5 + local.get $3 + f64.mul + local.get $6 + local.get $0 + f64.mul + f64.add + local.get $4 + local.get $2 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $7 + i32.const 6 + local.get $6 + local.get $3 + f64.mul + local.get $4 + local.get $1 + f64.mul + f64.add + local.get $5 + local.get $0 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $7 + i32.const 7 + local.get $4 + f64.neg + local.get $0 + f64.mul + local.get $5 + local.get $1 + f64.mul + f64.sub + local.get $6 + local.get $2 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $7 + ) + (func $assembly/vec2/fromValues (param $0 f64) (param $1 f64) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 2 + call $~lib/typedarray/Float64Array#constructor + local.tee $2 + i32.store + local.get $2 + i32.const 0 + local.get $0 + call $~lib/typedarray/Float64Array#__set + local.get $2 + i32.const 1 + local.get $1 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $assembly/vec3/rotateX (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + (local $4 i32) + (local $5 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.const 3 + i32.const 24 + i32.const 5264 + call $~lib/rt/__newArray + local.tee $4 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.const 3 + i32.const 24 + i32.const 5296 + call $~lib/rt/__newArray + local.tee $5 + i32.store offset=4 + local.get $4 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/array/Array#__set + local.get $4 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/array/Array#__set + local.get $4 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/array/Array#__set + local.get $5 + i32.const 0 + local.get $4 + i32.const 0 + call $~lib/array/Array#__get + call $~lib/array/Array#__set + local.get $5 + i32.const 1 + local.get $4 + i32.const 1 + call $~lib/array/Array#__get + local.get $3 + call $~lib/math/NativeMath.cos + f64.mul + local.get $4 + i32.const 2 + call $~lib/array/Array#__get + local.get $3 + call $~lib/math/NativeMath.sin + f64.mul + f64.sub + call $~lib/array/Array#__set + local.get $5 + i32.const 2 + local.get $4 + i32.const 1 + call $~lib/array/Array#__get + local.get $3 + call $~lib/math/NativeMath.sin + f64.mul + local.get $4 + i32.const 2 + call $~lib/array/Array#__get + local.get $3 + call $~lib/math/NativeMath.cos + f64.mul + f64.add + call $~lib/array/Array#__set + local.get $0 + i32.const 0 + local.get $5 + i32.const 0 + call $~lib/array/Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $5 + i32.const 1 + call $~lib/array/Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $5 + i32.const 2 + call $~lib/array/Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $assembly/vec3/rotateY (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + (local $4 i32) + (local $5 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.const 3 + i32.const 24 + i32.const 5376 + call $~lib/rt/__newArray + local.tee $4 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.const 3 + i32.const 24 + i32.const 5408 + call $~lib/rt/__newArray + local.tee $5 + i32.store offset=4 + local.get $4 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/array/Array#__set + local.get $4 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/array/Array#__set + local.get $4 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/array/Array#__set + local.get $5 + i32.const 0 + local.get $4 + i32.const 2 + call $~lib/array/Array#__get + local.get $3 + call $~lib/math/NativeMath.sin + f64.mul + local.get $4 + i32.const 0 + call $~lib/array/Array#__get + local.get $3 + call $~lib/math/NativeMath.cos + f64.mul + f64.add + call $~lib/array/Array#__set + local.get $5 + i32.const 1 + local.get $4 + i32.const 1 + call $~lib/array/Array#__get + call $~lib/array/Array#__set + local.get $5 + i32.const 2 + local.get $4 + i32.const 2 + call $~lib/array/Array#__get + local.get $3 + call $~lib/math/NativeMath.cos + f64.mul + local.get $4 + i32.const 0 + call $~lib/array/Array#__get + local.get $3 + call $~lib/math/NativeMath.sin + f64.mul + f64.sub + call $~lib/array/Array#__set + local.get $0 + i32.const 0 + local.get $5 + i32.const 0 + call $~lib/array/Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $5 + i32.const 1 + call $~lib/array/Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $5 + i32.const 2 + call $~lib/array/Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $assembly/vec3/rotateZ (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + (local $4 i32) + (local $5 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.const 3 + i32.const 24 + i32.const 5440 + call $~lib/rt/__newArray + local.tee $4 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.const 3 + i32.const 24 + i32.const 5472 + call $~lib/rt/__newArray + local.tee $5 + i32.store offset=4 + local.get $4 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/array/Array#__set + local.get $4 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/array/Array#__set + local.get $4 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/array/Array#__set + local.get $5 + i32.const 0 + local.get $4 + i32.const 0 + call $~lib/array/Array#__get + local.get $3 + call $~lib/math/NativeMath.cos + f64.mul + local.get $4 + i32.const 1 + call $~lib/array/Array#__get + local.get $3 + call $~lib/math/NativeMath.sin + f64.mul + f64.sub + call $~lib/array/Array#__set + local.get $5 + i32.const 1 + local.get $4 + i32.const 0 + call $~lib/array/Array#__get + local.get $3 + call $~lib/math/NativeMath.sin + f64.mul + local.get $4 + i32.const 1 + call $~lib/array/Array#__get + local.get $3 + call $~lib/math/NativeMath.cos + f64.mul + f64.add + call $~lib/array/Array#__set + local.get $5 + i32.const 2 + local.get $4 + i32.const 2 + call $~lib/array/Array#__get + call $~lib/array/Array#__set + local.get $0 + i32.const 0 + local.get $5 + i32.const 0 + call $~lib/array/Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $5 + i32.const 1 + call $~lib/array/Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $5 + i32.const 2 + call $~lib/array/Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat2/clone (param $0 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/vec4/clone + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat2/copy (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/vec4/copy + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat2/identity (param $0 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + i32.const 0 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat2/set (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + local.get $1 + local.get $2 + local.get $3 + local.get $4 + call $assembly/vec4/set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat2/transpose (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + i32.eq + if + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $0 + i32.const 1 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $2 + call $~lib/typedarray/Float64Array#__set + else + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + end + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat2/invert (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $5 + block $__inlined_func$assembly/mat2/invert + local.get $3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.tee $2 + f64.mul + local.get $5 + local.get $4 + f64.mul + f64.sub + local.tee $6 + i64.reinterpret_f64 + i64.const 1 + i64.shl + i64.const 2 + i64.sub + i64.const -9007199254740994 + i64.gt_u + if + i32.const 0 + local.set $0 + br $__inlined_func$assembly/mat2/invert + end + local.get $0 + i32.const 0 + local.get $2 + f64.const 1 + local.get $6 + f64.div + local.tee $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $4 + f64.neg + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $5 + f64.neg + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $3 + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + end + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat2/adjoint (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $0 + i32.const 0 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $2 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat2/determinant (param $0 i32) (result f64) + (local $1 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.mul + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.sub + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat2/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/mat2/multiply + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat2/rotate (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $2 + call $~lib/math/NativeMath.sin + local.set $3 + local.get $0 + i32.const 0 + local.get $4 + local.get $2 + call $~lib/math/NativeMath.cos + local.tee $2 + f64.mul + local.get $6 + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $5 + local.get $2 + f64.mul + local.get $7 + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $4 + local.get $3 + f64.neg + f64.mul + local.get $6 + local.get $2 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $5 + local.get $3 + f64.neg + f64.mul + local.get $7 + local.get $2 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat2/scale (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $0 + i32.const 0 + local.get $5 + local.get $3 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $6 + local.get $3 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $7 + local.get $4 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $8 + local.get $4 + f64.mul + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat2/fromRotation (param $0 i32) (param $1 f64) (result i32) + (local $2 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $1 + call $~lib/math/NativeMath.sin + local.set $2 + local.get $0 + i32.const 0 + local.get $1 + call $~lib/math/NativeMath.cos + local.tee $1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $2 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $2 + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat2/fromScaling (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat2/str (param $0 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/mat2/str + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat2/frob (param $0 i32) (result f64) + (local $1 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $assembly/imports/MathUtil.hypot + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat2/LDU (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 16 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + global.get $~lib/memory/__stack_pointer + local.get $3 + i32.store offset=12 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + local.get $0 + i32.const 2 + local.get $3 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $3 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $2 + i32.const 0 + local.get $3 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $2 + i32.const 1 + local.get $3 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $2 + i32.const 3 + local.get $3 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 3 + i32.const 2 + i32.const 21 + i32.const 0 + call $~lib/rt/__newArray + local.tee $3 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $3 + i32.load offset=4 + i32.store offset=4 + local.get $3 + i32.const 0 + local.get $0 + call $~lib/array/Array<~lib/typedarray/Float64Array>#__uset + local.get $3 + i32.const 1 + local.get $1 + call $~lib/array/Array<~lib/typedarray/Float64Array>#__uset + local.get $3 + i32.const 2 + local.get $2 + call $~lib/array/Array<~lib/typedarray/Float64Array>#__uset + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 16 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/mat2/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/vec4/add + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat2/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/vec4/subtract + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat2/exactEquals (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/vec4/exactEquals + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat2/equals (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat2/equals + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat2/multiplyScalar (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + local.get $2 + call $assembly/vec4/scale + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat2/multiplyScalarAndAdd (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat2d/clone (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 6 + call $~lib/typedarray/Float64Array#constructor + local.tee $1 + i32.store + local.get $1 + i32.const 0 + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 1 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 2 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 3 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 4 + local.get $0 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 5 + local.get $0 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $export:assembly/mat2d/copy (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat2d/identity (param $0 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + i32.const 0 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat2d/set (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + i32.const 0 + local.get $1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $2 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $3 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $4 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $5 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $6 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat2d/invert (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat2d/invert + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat2d/determinant (param $0 i32) (result f64) + (local $1 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.mul + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.sub + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat2d/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/mat2d/multiply + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat2d/rotate (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + local.get $2 + call $assembly/mat2d/rotate + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat2d/scale (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $0 + i32.const 0 + local.get $5 + local.get $3 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $6 + local.get $3 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $7 + local.get $4 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $8 + local.get $4 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $9 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $10 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat2d/translate (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $0 + i32.const 0 + local.get $3 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $4 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $5 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $6 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $3 + local.get $7 + f64.mul + local.get $5 + local.get $8 + f64.mul + f64.add + local.get $9 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $4 + local.get $7 + f64.mul + local.get $6 + local.get $8 + f64.mul + f64.add + local.get $10 + f64.add + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat2d/fromRotation (param $0 i32) (param $1 f64) (result i32) + (local $2 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $1 + call $~lib/math/NativeMath.sin + local.set $2 + local.get $0 + i32.const 0 + local.get $1 + call $~lib/math/NativeMath.cos + local.tee $1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $2 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $2 + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat2d/fromScaling (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat2d/fromTranslation (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + i32.const 0 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat2d/str (param $0 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/mat2d/str + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat2d/frob (param $0 i32) (result f64) + (local $1 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + f64.const 1 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $assembly/imports/MathUtil.hypot + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat2d/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat2d/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/mat2d/subtract + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat2d/multiplyScalar (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat2d/multiplyScalarAndAdd (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat2d/exactEquals (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.eq + if (result i32) + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat2d/equals (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat2d/equals + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat3/fromMat4 (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $1 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat3/clone (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 9 + call $~lib/typedarray/Float64Array#constructor + local.tee $1 + i32.store + local.get $1 + i32.const 0 + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 1 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 2 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 3 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 4 + local.get $0 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 5 + local.get $0 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 6 + local.get $0 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 7 + local.get $0 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 8 + local.get $0 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $export:assembly/mat3/copy (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat3/set (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (param $7 f64) (param $8 f64) (param $9 f64) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + i32.const 0 + local.get $1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $2 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $3 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $4 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $5 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $6 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $7 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $8 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $9 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat3/identity (param $0 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + i32.const 0 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat3/transpose (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat3/transpose + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat3/invert (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat3/invert + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat3/adjoint (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat3/adjoint + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat3/determinant (param $0 i32) (result f64) + (local $1 f64) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $1 + local.get $0 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $0 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $0 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $0 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $0 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.tee $2 + local.get $3 + f64.mul + local.get $4 + local.get $6 + f64.mul + f64.sub + f64.mul + local.get $7 + local.get $2 + f64.neg + local.get $1 + f64.mul + local.get $4 + local.get $5 + f64.mul + f64.add + f64.mul + f64.add + local.get $8 + local.get $6 + local.get $1 + f64.mul + local.get $3 + local.get $5 + f64.mul + f64.sub + f64.mul + f64.add + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat3/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/mat3/multiply + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat3/translate (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/mat3/translate + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat3/rotate (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + local.get $2 + call $assembly/mat3/rotate + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat3/scale (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $0 + i32.const 0 + local.get $3 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $3 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $4 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $4 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $4 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat3/fromTranslation (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + i32.const 0 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat3/fromRotation (param $0 i32) (param $1 f64) (result i32) + (local $2 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $1 + call $~lib/math/NativeMath.sin + local.set $2 + local.get $0 + i32.const 0 + local.get $1 + call $~lib/math/NativeMath.cos + local.tee $1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $2 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $2 + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat3/fromScaling (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat3/fromMat2d (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat3/fromQuat (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat3/fromQuat + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat3/normalFromMat4 (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat3/normalFromMat4 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat3/projection (param $0 i32) (param $1 f64) (param $2 f64) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + i32.const 0 + f64.const 2 + local.get $1 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const -2 + local.get $2 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + f64.const -1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat3/str (param $0 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/mat3/str + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat3/frob (param $0 i32) (result f64) + (local $1 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $assembly/imports/MathUtil.hypot + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat3/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/mat3/add + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat3/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/mat3/subtract + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat3/multiplyScalar (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat3/multiplyScalarAndAdd (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $assembly/mat3/multiplyScalarAndAdd + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat3/exactEquals (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.eq + if (result i32) + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat3/equals (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat3/equals + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/Fov#get:upDegrees (param $0 i32) (result f64) + (local $1 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + f64.load + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/Fov#set:upDegrees (param $0 i32) (param $1 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + local.get $1 + f64.store + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/Fov#get:downDegrees (param $0 i32) (result f64) + (local $1 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + f64.load offset=8 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/Fov#set:downDegrees (param $0 i32) (param $1 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + local.get $1 + f64.store offset=8 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/Fov#get:leftDegrees (param $0 i32) (result f64) + (local $1 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + f64.load offset=16 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/Fov#set:leftDegrees (param $0 i32) (param $1 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + local.get $1 + f64.store offset=16 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/Fov#get:rightDegrees (param $0 i32) (result f64) + (local $1 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + f64.load offset=24 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/Fov#set:rightDegrees (param $0 i32) (param $1 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + local.get $1 + f64.store offset=24 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/Fov#constructor (param $0 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + local.get $0 + i32.eqz + if + global.get $~lib/memory/__stack_pointer + i32.const 32 + i32.const 23 + call $~lib/rt/itcms/__new + local.tee $0 + i32.store + end + local.get $0 + f64.const 0 + f64.store + local.get $0 + f64.const 0 + f64.store offset=8 + local.get $0 + f64.const 0 + f64.store offset=16 + local.get $0 + f64.const 0 + f64.store offset=24 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat4/clone (param $0 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/mat4/clone + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/copy (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat4/copy + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/set (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (param $7 f64) (param $8 f64) (param $9 f64) (param $10 f64) (param $11 f64) (param $12 f64) (param $13 f64) (param $14 f64) (param $15 f64) (param $16 f64) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + i32.const 0 + local.get $1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $2 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $3 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $4 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $5 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $6 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $7 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $8 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $9 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $10 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + local.get $11 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + local.get $12 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + local.get $13 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $14 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $15 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + local.get $16 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat4/identity (param $0 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/mat4/identity + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/transpose (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat4/transpose + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/invert (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat4/invert + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/adjoint (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat4/adjoint + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/determinant (param $0 i32) (result f64) + (local $1 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/mat4/determinant + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/mat4/multiply + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/translate (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/mat4/translate + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/scale (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/mat4/scale + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/rotate (param $0 i32) (param $1 i32) (param $2 f64) (param $3 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $3 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $assembly/mat4/rotate + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/rotateX (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + local.get $2 + call $assembly/mat4/rotateX + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/rotateY (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + local.get $2 + call $assembly/mat4/rotateY + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/rotateZ (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + local.get $2 + call $assembly/mat4/rotateZ + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/fromTranslation (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + i32.const 0 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat4/fromScaling (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat4/fromRotation (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=4 + local.get $0 + local.get $1 + local.get $2 + call $assembly/mat4/fromRotation + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/fromXRotation (param $0 i32) (param $1 f64) (result i32) + (local $2 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $1 + call $~lib/math/NativeMath.sin + local.set $2 + local.get $1 + call $~lib/math/NativeMath.cos + local.set $1 + local.get $0 + i32.const 0 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $2 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $2 + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + local.get $1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat4/fromYRotation (param $0 i32) (param $1 f64) (result i32) + (local $2 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $1 + call $~lib/math/NativeMath.sin + local.set $2 + local.get $0 + i32.const 0 + local.get $1 + call $~lib/math/NativeMath.cos + local.tee $1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $2 + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $2 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + local.get $1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat4/fromZRotation (param $0 i32) (param $1 f64) (result i32) + (local $2 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $1 + call $~lib/math/NativeMath.sin + local.set $2 + local.get $0 + i32.const 0 + local.get $1 + call $~lib/math/NativeMath.cos + local.tee $1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $2 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $2 + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat4/fromRotationTranslation (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/mat4/fromRotationTranslation + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/fromQuat2 (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat4/fromQuat2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/getTranslation (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat4/getTranslation + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/getScaling (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat4/getScaling + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/getRotation (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat4/getRotation + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/decompose (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 16 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + global.get $~lib/memory/__stack_pointer + local.get $3 + i32.store offset=12 + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $assembly/mat4/decompose + global.get $~lib/memory/__stack_pointer + i32.const 16 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/fromRotationTranslationScale (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 16 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + global.get $~lib/memory/__stack_pointer + local.get $3 + i32.store offset=12 + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $assembly/mat4/fromRotationTranslationScale + global.get $~lib/memory/__stack_pointer + i32.const 16 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/fromRotationTranslationScaleOrigin (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 20 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + global.get $~lib/memory/__stack_pointer + local.get $3 + i32.store offset=12 + global.get $~lib/memory/__stack_pointer + local.get $4 + i32.store offset=16 + local.get $0 + local.get $1 + local.get $2 + local.get $3 + local.get $4 + call $assembly/mat4/fromRotationTranslationScaleOrigin + global.get $~lib/memory/__stack_pointer + i32.const 20 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/fromQuat (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat4/fromQuat + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/frustum (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + local.get $1 + local.get $2 + local.get $3 + local.get $4 + local.get $5 + local.get $6 + call $assembly/mat4/frustum + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/perspectiveNO (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + local.get $1 + local.get $2 + local.get $3 + local.get $4 + call $assembly/mat4/perspectiveNO + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/perspectiveZO (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + local.get $1 + local.get $2 + local.get $3 + local.get $4 + call $assembly/mat4/perspectiveZO + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/perspectiveFromFieldOfView (param $0 i32) (param $1 i32) (param $2 f64) (param $3 f64) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $assembly/mat4/perspectiveFromFieldOfView + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/orthoNO (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + local.get $1 + local.get $2 + local.get $3 + local.get $4 + local.get $5 + local.get $6 + call $assembly/mat4/orthoNO + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/orthoZO (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + local.get $1 + local.get $2 + local.get $3 + local.get $4 + local.get $5 + local.get $6 + call $assembly/mat4/orthoZO + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/lookAt (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 16 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + global.get $~lib/memory/__stack_pointer + local.get $3 + i32.store offset=12 + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $assembly/mat4/lookAt + global.get $~lib/memory/__stack_pointer + i32.const 16 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/targetTo (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 16 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + global.get $~lib/memory/__stack_pointer + local.get $3 + i32.store offset=12 + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $assembly/mat4/targetTo + global.get $~lib/memory/__stack_pointer + i32.const 16 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/str (param $0 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/mat4/str + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/frob (param $0 i32) (result f64) + (local $1 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + call $assembly/imports/MathUtil.hypot + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/mat4/add + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/mat4/subtract + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/multiplyScalar (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + local.get $2 + call $assembly/mat4/multiplyScalar + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/multiplyScalarAndAdd (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $assembly/mat4/multiplyScalarAndAdd + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/exactEquals (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat4/exactEquals + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/equals (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat4/equals + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/quat/identity (param $0 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + i32.const 0 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/quat/setAxisAngle (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + local.get $2 + call $assembly/quat/setAxisAngle + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/quat/getAxisAngle (param $0 i32) (param $1 i32) (result f64) + (local $2 f64) + (local $3 f64) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/math/NativeMath.acos + local.tee $2 + local.get $2 + f64.add + local.tee $3 + f64.const 0.5 + f64.mul + call $~lib/math/NativeMath.sin + local.tee $2 + f64.const 1e-06 + f64.gt + if + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.div + call $~lib/typedarray/Float64Array#__set + else + local.get $0 + i32.const 0 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + end + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/quat/getAngle (param $0 i32) (param $1 i32) (result f64) + (local $2 f64) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + i32.const 2 + global.set $~argumentsLength + local.get $0 + local.get $1 + i32.const 2544 + i32.load + call_indirect $0 (type $i32_i32_=>_f64) + local.tee $2 + local.get $2 + f64.add + local.get $2 + f64.mul + f64.const 1 + f64.sub + call $~lib/math/NativeMath.acos + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/quat/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/quat/multiply + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/quat/rotateX (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + local.get $2 + call $assembly/quat/rotateX + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/quat/rotateY (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + local.get $2 + call $assembly/quat/rotateY + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/quat/rotateZ (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + local.get $2 + call $assembly/quat/rotateZ + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/quat/calculateW (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $0 + i32.const 0 + local.get $2 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $3 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $4 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 1 + local.get $2 + local.get $2 + f64.mul + f64.sub + local.get $3 + local.get $3 + f64.mul + f64.sub + local.get $4 + local.get $4 + f64.mul + f64.sub + f64.abs + f64.sqrt + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/quat/exp (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/quat/exp + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/quat/ln (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/quat/ln + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/quat/pow (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/quat/ln + drop + i32.const 3 + global.set $~argumentsLength + local.get $0 + local.get $0 + local.get $2 + i32.const 2512 + i32.load + call_indirect $0 (type $i32_i32_f64_=>_i32) + drop + local.get $0 + local.get $0 + call $assembly/quat/exp + drop + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/quat/slerp (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $assembly/quat/slerp + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/quat/random (param $0 i32) (result i32) + (local $1 f64) + (local $2 f64) + (local $3 f64) + (local $4 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + i32.const 0 + global.set $~argumentsLength + global.get $assembly/common/RANDOM + i32.load + call_indirect $0 (type $none_=>_f64) + local.set $2 + i32.const 0 + global.set $~argumentsLength + global.get $assembly/common/RANDOM + i32.load + call_indirect $0 (type $none_=>_f64) + local.set $1 + i32.const 0 + global.set $~argumentsLength + global.get $assembly/common/RANDOM + i32.load + call_indirect $0 (type $none_=>_f64) + local.set $3 + local.get $0 + i32.const 0 + f64.const 1 + local.get $2 + f64.sub + f64.sqrt + local.tee $4 + local.get $1 + f64.const 6.283185307179586 + f64.mul + local.tee $1 + call $~lib/math/NativeMath.sin + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $4 + local.get $1 + call $~lib/math/NativeMath.cos + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $2 + f64.sqrt + local.tee $2 + local.get $3 + f64.const 6.283185307179586 + f64.mul + local.tee $1 + call $~lib/math/NativeMath.sin + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $2 + local.get $1 + call $~lib/math/NativeMath.cos + f64.mul + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/quat/invert (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.tee $2 + f64.neg + f64.const 1 + local.get $2 + local.get $2 + f64.mul + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.tee $3 + local.get $3 + f64.mul + f64.add + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.tee $4 + local.get $4 + f64.mul + f64.add + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.tee $5 + local.get $5 + f64.mul + f64.add + local.tee $2 + f64.div + f64.const 0 + local.get $2 + i64.reinterpret_f64 + i64.const 1 + i64.shl + i64.const 2 + i64.sub + i64.const -9007199254740994 + i64.le_u + select + local.tee $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $3 + f64.neg + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $4 + f64.neg + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $5 + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/quat/conjugate (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/quat/fromMat3 (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/quat/fromMat3 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/quat/fromEuler@varargs (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $4 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + i32.const 4 i32.sub - i32.const 1 - i32.shl - i32.add - local.tee $0 - i32.load16_u - local.set $2 - loop $while-continue|3 - i32.const 1 - local.get $8 - local.get $1 - i64.sub - local.get $1 - local.get $10 - i64.add - local.tee $3 - local.get $8 - i64.sub - i64.gt_u - local.get $3 - local.get $8 - i64.lt_u - select - i32.const 0 - local.get $10 - local.get $5 - local.get $1 - i64.sub - i64.le_u - i32.const 0 - local.get $1 - local.get $8 - i64.lt_u - select - select - if - local.get $2 - i32.const 1 - i32.sub - local.set $2 - local.get $1 - local.get $10 - i64.add - local.set $1 - br $while-continue|3 - end - end - local.get $0 - local.get $2 - i32.store16 - local.get $6 - return + br_table $0of1 $1of1 $outOfRange end - br $while-continue|0 + unreachable end + global.get $~lib/memory/__stack_pointer + global.get $assembly/common/ANGLE_ORDER + local.tee $4 + i32.store end - local.get $11 - i64.extend_i32_s - local.set $13 - loop $while-continue|4 (result i32) - local.get $5 - i64.const 10 - i64.mul - local.set $5 - local.get $7 - i64.const 10 - i64.mul - local.tee $3 - local.get $13 - i64.shr_u - local.tee $1 - local.get $6 - i64.extend_i32_s - i64.or - i64.const 0 - i64.ne - if - local.get $0 - local.get $6 - i32.const 1 - i32.shl - i32.add - local.get $1 - i32.wrap_i64 - i32.const 65535 - i32.and - i32.const 48 - i32.add - i32.store16 - local.get $6 - i32.const 1 - i32.add - local.set $6 - end - local.get $9 - i32.const 1 - i32.sub - local.set $9 - local.get $3 - local.get $12 - i64.and - local.tee $7 - local.get $5 - i64.ge_u - br_if $while-continue|4 - local.get $9 - global.get $~lib/util/number/_K - i32.add - global.set $~lib/util/number/_K - local.get $7 - local.set $1 - local.get $8 - i32.const 0 - local.get $9 - i32.sub - i32.const 2 - i32.shl - i32.const 2912 - i32.add - i64.load32_u - i64.mul - local.set $8 + local.get $0 + local.get $1 + local.get $2 + local.get $3 + local.get $4 + call $assembly/quat/fromEuler + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/quat/str (param $0 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/quat/str + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/quat/equals (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/vec4/dot + f64.abs + f64.const 0.999999 + f64.ge + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/quat2/clone (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 8 + call $~lib/typedarray/Float64Array#constructor + local.tee $1 + i32.store + local.get $1 + i32.const 0 + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 1 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 2 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 3 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 4 + local.get $0 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 5 + local.get $0 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 6 + local.get $0 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 7 + local.get $0 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $export:assembly/quat2/fromRotationTranslation (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/quat2/fromRotationTranslation + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/quat2/fromTranslation (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + i32.const 0 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.const 0.5 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.const 0.5 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.const 0.5 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/quat2/fromRotation (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/quat2/fromMat4 (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + global.get $~lib/memory/__stack_pointer + call $assembly/quat/create + local.tee $2 + i32.store + local.get $2 + local.get $1 + call $assembly/mat4/getRotation + drop + global.get $~lib/memory/__stack_pointer + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + local.tee $3 + i32.store offset=4 + local.get $3 + local.get $1 + call $assembly/mat4/getTranslation + drop + local.get $0 + local.get $2 + local.get $3 + call $assembly/quat2/fromRotationTranslation + drop + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/quat2/copy (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/quat2/copy + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/quat2/identity (param $0 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + i32.const 0 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/quat2/set (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (param $7 f64) (param $8 f64) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + i32.const 0 + local.get $1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $2 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $3 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $4 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $5 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $6 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $7 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $8 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/quat2/getDual (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + i32.const 0 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/quat2/setDual (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + i32.const 4 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/quat2/getTranslation (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/quat2/getTranslation + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/quat2/translate (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/quat2/translate + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/quat2/rotateX (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + local.get $2 + call $assembly/quat2/rotateX + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/quat2/rotateY (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + local.get $2 + call $assembly/quat2/rotateY + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/quat2/rotateZ (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + local.get $2 + call $assembly/quat2/rotateZ + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/quat2/rotateByQuatAppend (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/quat2/rotateByQuatAppend + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/quat2/rotateByQuatPrepend (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/quat2/rotateByQuatPrepend + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/quat2/rotateAroundAxis (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $assembly/quat2/rotateAroundAxis + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/quat2/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/quat2/add + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/quat2/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/quat2/multiply + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/quat2/scale (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/quat2/lerp (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $assembly/quat2/lerp + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/quat2/invert (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + i32.const 1 + global.set $~argumentsLength + local.get $1 + i32.const 2256 + i32.load + call_indirect $0 (type $i32_=>_f64) + local.set $2 + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.neg + local.get $2 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.neg + local.get $2 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.neg + local.get $2 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + f64.neg + local.get $2 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + f64.neg + local.get $2 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + f64.neg + local.get $2 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.div + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/quat2/conjugate (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/quat2/normalize (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/quat2/normalize + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/quat2/str (param $0 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/quat2/str + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/quat2/exactEquals (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.eq + if (result i32) local.get $0 - local.get $6 i32.const 1 - i32.sub + call $~lib/typedarray/Float64Array#__get + local.get $1 i32.const 1 - i32.shl - i32.add - local.tee $0 - i32.load16_u - local.set $2 - loop $while-continue|6 - i32.const 1 - local.get $8 - local.get $1 - i64.sub - local.get $1 - local.get $10 - i64.add - local.tee $3 - local.get $8 - i64.sub - i64.gt_u - local.get $3 - local.get $8 - i64.lt_u - select - i32.const 0 - local.get $10 - local.get $5 - local.get $1 - i64.sub - i64.le_u - i32.const 0 - local.get $1 - local.get $8 - i64.lt_u - select - select - if - local.get $2 - i32.const 1 - i32.sub - local.set $2 - local.get $1 - local.get $10 - i64.add - local.set $1 - br $while-continue|6 - end - end - local.get $0 - local.get $2 - i32.store16 - local.get $6 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 end - ) - (func $~lib/util/number/utoa_dec_simple (param $0 i32) (param $1 i32) (param $2 i32) - loop $do-continue|0 + if (result i32) local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.const 1 - i32.shl - i32.add + i32.const 2 + call $~lib/typedarray/Float64Array#__get local.get $1 - i32.const 10 - i32.rem_u - i32.const 48 - i32.add - i32.store16 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get local.get $1 - i32.const 10 - i32.div_u - local.tee $1 - br_if $do-continue|0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 end - ) - (func $~lib/util/number/prettify (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - local.get $2 - i32.eqz - if + if (result i32) local.get $0 + i32.const 4 + call $~lib/typedarray/Float64Array#__get local.get $1 - i32.const 1 - i32.shl - i32.add - i32.const 3145774 - i32.store + i32.const 4 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 5 + call $~lib/typedarray/Float64Array#__get local.get $1 - i32.const 2 - i32.add - return + i32.const 5 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 end - local.get $1 - local.get $2 - i32.add - local.tee $3 - i32.const 21 - i32.le_s - i32.const 0 - local.get $1 - local.get $3 - i32.le_s - select if (result i32) - loop $for-loop|0 - local.get $1 - local.get $3 - i32.lt_s - if - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.const 48 - i32.store16 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end local.get $0 - local.get $3 - i32.const 1 - i32.shl - i32.add - i32.const 3145774 - i32.store - local.get $3 - i32.const 2 - i32.add + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + f64.eq else - local.get $3 - i32.const 21 - i32.le_s i32.const 0 - local.get $3 + end + if (result i32) + local.get $0 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + f64.eq + else i32.const 0 - i32.gt_s - select - if (result i32) - local.get $0 - local.get $3 - i32.const 1 - i32.shl - i32.add - local.tee $0 - i32.const 2 - i32.add - local.get $0 - i32.const 0 - local.get $2 - i32.sub - i32.const 1 - i32.shl - call $~lib/memory/memory.copy - local.get $0 - i32.const 46 - i32.store16 - local.get $1 - i32.const 1 - i32.add - else - local.get $3 - i32.const 0 - i32.le_s - i32.const 0 - local.get $3 - i32.const -6 - i32.gt_s - select - if (result i32) - local.get $0 - i32.const 2 - local.get $3 - i32.sub - local.tee $3 - i32.const 1 - i32.shl - i32.add - local.get $0 - local.get $1 - i32.const 1 - i32.shl - call $~lib/memory/memory.copy - local.get $0 - i32.const 3014704 - i32.store - i32.const 2 - local.set $2 - loop $for-loop|1 - local.get $2 - local.get $3 - i32.lt_s - if - local.get $0 - local.get $2 - i32.const 1 - i32.shl - i32.add - i32.const 48 - i32.store16 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|1 - end - end - local.get $1 - local.get $3 - i32.add - else - local.get $1 - i32.const 1 - i32.eq - if (result i32) - local.get $0 - i32.const 101 - i32.store16 offset=2 - local.get $0 - local.tee $1 - i32.const 4 - i32.add - local.get $3 - i32.const 1 - i32.sub - local.tee $0 - i32.const 0 - i32.lt_s - local.tee $2 - if - i32.const 0 - local.get $0 - i32.sub - local.set $0 - end - local.get $0 - local.get $0 - call $~lib/util/number/decimalCount32 - i32.const 1 - i32.add - local.tee $0 - call $~lib/util/number/utoa_dec_simple - local.get $1 - i32.const 45 - i32.const 43 - local.get $2 - select - i32.store16 offset=4 - local.get $0 - i32.const 2 - i32.add - else - local.get $0 - i32.const 4 - i32.add - local.get $0 - i32.const 2 - i32.add - local.get $1 - i32.const 1 - i32.shl - local.tee $2 - i32.const 2 - i32.sub - call $~lib/memory/memory.copy - local.get $0 - i32.const 46 - i32.store16 offset=2 - local.get $0 - local.get $2 - i32.add - local.tee $0 - i32.const 101 - i32.store16 offset=2 - local.get $0 - local.tee $2 - i32.const 4 - i32.add - local.get $3 - i32.const 1 - i32.sub - local.tee $0 - i32.const 0 - i32.lt_s - local.tee $3 - if - i32.const 0 - local.get $0 - i32.sub - local.set $0 - end - local.get $0 - local.get $0 - call $~lib/util/number/decimalCount32 - i32.const 1 - i32.add - local.tee $0 - call $~lib/util/number/utoa_dec_simple - local.get $2 - i32.const 45 - i32.const 43 - local.get $3 - select - i32.store16 offset=4 - local.get $0 - local.get $1 - i32.add - i32.const 2 - i32.add - end - end - end end + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/quat2/equals (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/quat2/equals + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer ) - (func $~lib/util/number/dtoa_core (param $0 i32) (param $1 f64) (result i32) - (local $2 i64) - (local $3 i64) - (local $4 i32) - (local $5 i64) - (local $6 i64) - (local $7 i64) - (local $8 i32) - (local $9 i32) - (local $10 i32) + (func $export:assembly/vec2/clone (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 2 + call $~lib/typedarray/Float64Array#constructor + local.tee $1 + i32.store local.get $1 - f64.const 0 - f64.lt - local.tee $9 - if (result f64) - local.get $0 - i32.const 45 - i32.store16 - local.get $1 - f64.neg - else - local.get $1 - end - i64.reinterpret_f64 - local.tee $2 - i64.const 9218868437227405312 - i64.and - i64.const 52 - i64.shr_u - i32.wrap_i64 - local.tee $8 i32.const 0 - i32.ne - i64.extend_i32_u - i64.const 52 - i64.shl - local.get $2 - i64.const 4503599627370495 - i64.and - i64.add - local.tee $3 - i64.const 1 - i64.shl - i64.const 1 - i64.add - local.tee $2 - local.get $2 - i64.clz - i32.wrap_i64 - local.tee $4 - i64.extend_i32_s - i64.shl - global.set $~lib/util/number/_frc_plus - local.get $8 - i32.const 1 - local.get $8 - select - i32.const 1075 - i32.sub - local.tee $8 + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 i32.const 1 - i32.sub - local.get $4 - i32.sub - local.set $4 - local.get $3 - local.get $3 - i64.const 4503599627370496 - i64.eq + local.get $0 i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 i32.add - local.tee $10 - i64.extend_i32_s - i64.shl - i64.const 1 - i64.sub - local.get $8 - local.get $10 - i32.sub - local.get $4 - i32.sub - i64.extend_i32_s - i64.shl - global.set $~lib/util/number/_frc_minus - local.get $4 - global.set $~lib/util/number/_exp - i32.const 348 - i32.const -61 - global.get $~lib/util/number/_exp + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $export:assembly/vec2/copy (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 i32.sub - f64.convert_i32_s - f64.const 0.30102999566398114 - f64.mul - f64.const 347 - f64.add - local.tee $1 - i32.trunc_f64_s - local.tee $4 + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer local.get $1 - local.get $4 - f64.convert_i32_s - f64.ne - i32.add - i32.const 3 - i32.shr_s + i32.store offset=4 + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 8 i32.add - local.tee $4 - i32.const 3 - i32.shl - local.tee $10 + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/vec2/set (param $0 i32) (param $1 f64) (param $2 f64) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 i32.sub - global.set $~lib/util/number/_K - local.get $10 - i32.const 2040 - i32.add - i64.load - global.set $~lib/util/number/_frc_pow - local.get $4 + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + i32.const 0 + local.get $1 + call $~lib/typedarray/Float64Array#__set + local.get $0 i32.const 1 - i32.shl - i32.const 2736 + local.get $2 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 i32.add - i32.load16_s - global.set $~lib/util/number/_exp_pow - global.get $~lib/util/number/_frc_pow - local.tee $6 - i64.const 4294967295 - i64.and - local.set $2 - local.get $6 - i64.const 32 - i64.shr_u - local.tee $6 - global.get $~lib/util/number/_frc_plus - local.tee $5 - i64.const 32 - i64.shr_u - local.tee $7 - i64.mul + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/vec2/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer local.get $2 - local.get $7 - i64.mul + i32.store offset=8 + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get local.get $2 - local.get $5 - i64.const 4294967295 - i64.and - local.tee $5 - i64.mul - i64.const 32 - i64.shr_u - i64.add - local.tee $7 - i64.const 32 - i64.shr_u - i64.add - local.get $5 - local.get $6 - i64.mul - local.get $7 - i64.const 4294967295 - i64.and - i64.add - i64.const 2147483647 - i64.add - i64.const 32 - i64.shr_u - i64.add - i64.const 1 - i64.sub - local.set $5 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set local.get $0 - local.get $9 i32.const 1 - i32.shl + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 12 i32.add + global.set $~lib/memory/__stack_pointer local.get $0 - local.get $6 - local.get $3 - local.get $3 - i64.clz - i32.wrap_i64 - local.tee $0 - i64.extend_i32_s - i64.shl - local.tee $3 - i64.const 32 - i64.shr_u - local.tee $7 - i64.mul - local.get $2 - local.get $7 - i64.mul + ) + (func $export:assembly/vec2/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer local.get $2 - local.get $3 - i64.const 4294967295 - i64.and - local.tee $3 - i64.mul - i64.const 32 - i64.shr_u - i64.add - local.tee $7 - i64.const 32 - i64.shr_u - i64.add - local.get $3 - local.get $6 - i64.mul - local.get $7 - i64.const 4294967295 - i64.and - i64.add - i64.const 2147483647 - i64.add - i64.const 32 - i64.shr_u - i64.add - global.get $~lib/util/number/_exp_pow - local.tee $4 - local.get $8 + i32.store offset=8 local.get $0 - i32.sub + local.get $1 + local.get $2 + call $assembly/vec2/subtract + global.get $~lib/memory/__stack_pointer + i32.const 12 i32.add - i32.const -64 + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/vec2/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 i32.sub - local.get $5 - local.get $4 - global.get $~lib/util/number/_exp + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/vec2/multiply + global.get $~lib/memory/__stack_pointer + i32.const 12 i32.add - i32.const -64 + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/vec2/divide (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 i32.sub - local.get $5 - local.get $6 - global.get $~lib/util/number/_frc_minus - local.tee $3 - i64.const 32 - i64.shr_u - local.tee $5 - i64.mul - local.get $2 - local.get $5 - i64.mul + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer local.get $2 - local.get $3 - i64.const 4294967295 - i64.and - local.tee $2 - i64.mul - i64.const 32 - i64.shr_u - i64.add - local.tee $3 - i64.const 32 - i64.shr_u - i64.add + i32.store offset=8 + local.get $0 + local.get $1 local.get $2 - local.get $6 - i64.mul - local.get $3 - i64.const 4294967295 - i64.and - i64.add - i64.const 2147483647 - i64.add - i64.const 32 - i64.shr_u - i64.add - i64.const 1 - i64.add - i64.sub - local.get $9 - call $~lib/util/number/genDigits - local.get $9 - i32.sub - global.get $~lib/util/number/_K - call $~lib/util/number/prettify - local.get $9 + call $assembly/vec2/divide + global.get $~lib/memory/__stack_pointer + i32.const 12 i32.add + global.set $~lib/memory/__stack_pointer ) - (func $~lib/util/number/dtoa_buffered (param $0 i32) (param $1 f64) (result i32) - (local $2 i32) + (func $export:assembly/vec2/ceil (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer local.get $1 - f64.const 0 - f64.eq - if - local.get $0 - i32.const 48 - i32.store16 - local.get $0 - i32.const 46 - i32.store16 offset=2 - local.get $0 - i32.const 48 - i32.store16 offset=4 - i32.const 3 - return - end + i32.store offset=4 + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.ceil + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.ceil + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/vec2/floor (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer local.get $1 - f64.sub - f64.const 0 - f64.ne - if - local.get $1 - local.get $1 - f64.ne - if - local.get $0 - i32.const 78 - i32.store16 - local.get $0 - i32.const 97 - i32.store16 offset=2 - local.get $0 - i32.const 78 - i32.store16 offset=4 - i32.const 3 - return - else - local.get $1 - f64.const 0 - f64.lt - local.tee $2 - if - local.get $0 - i32.const 45 - i32.store16 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $0 - i64.const 29555310648492105 - i64.store - local.get $0 - i64.const 34058970405077102 - i64.store offset=8 - local.get $2 - i32.const 8 - i32.add - return - end - unreachable - end + i32.store offset=4 + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.floor + call $~lib/typedarray/Float64Array#__set local.get $0 + i32.const 1 local.get $1 - call $~lib/util/number/dtoa_core + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.floor + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 ) - (func $~lib/typedarray/Float64Array#join (param $0 i32) (param $1 i32) (result i32) + (func $export:assembly/vec2/min (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer local.get $0 - i32.load offset=4 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u + i32.const 0 local.get $1 - call $~lib/util/string/joinFloatArray - ) - (func $~lib/math/pio2_large_quot (param $0 i64) (result i32) - (local $1 i64) - (local $2 i64) - (local $3 i64) - (local $4 i64) - (local $5 i64) - (local $6 i64) - (local $7 i32) - (local $8 i64) - (local $9 i64) - (local $10 i64) - (local $11 i64) - (local $12 f64) + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.min + call $~lib/typedarray/Float64Array#__set local.get $0 - i64.const 9223372036854775807 - i64.and - i64.const 52 - i64.shr_u - i64.const 1045 - i64.sub - local.tee $4 - i64.const 6 - i64.shr_s - i32.wrap_i64 - i32.const 3 - i32.shl - i32.const 2992 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.min + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 12 i32.add - local.tee $7 - i64.load - local.set $6 - local.get $7 - i64.load offset=8 - local.set $3 - local.get $7 - i64.load offset=16 - local.set $1 - local.get $4 - i64.const 63 - i64.and - local.tee $4 - i64.const 0 - i64.ne - if - local.get $6 - local.get $4 - i64.shl - local.get $3 - i64.const 64 - local.get $4 - i64.sub - local.tee $2 - i64.shr_u - i64.or - local.set $6 - local.get $3 - local.get $4 - i64.shl - local.get $1 - local.get $2 - i64.shr_u - i64.or - local.set $3 - local.get $1 - local.get $4 - i64.shl - local.get $7 - i64.load offset=24 - local.get $2 - i64.shr_u - i64.or - local.set $1 - end + global.set $~lib/memory/__stack_pointer local.get $0 - i64.const 4503599627370495 - i64.and - i64.const 4503599627370496 - i64.or - local.tee $4 - i64.const 4294967295 - i64.and - local.tee $2 - local.get $3 - i64.const 32 - i64.shr_u - local.tee $8 - i64.mul - local.get $3 - i64.const 4294967295 - i64.and - local.tee $5 + ) + (func $export:assembly/vec2/max (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer local.get $2 - i64.mul - local.tee $9 - i64.const 32 - i64.shr_u - i64.add - local.set $3 - local.get $5 - local.get $4 - i64.const 32 - i64.shr_u - local.tee $5 - i64.mul - local.get $3 - i64.const 4294967295 - i64.and - i64.add - local.set $2 - local.get $5 - local.get $8 - i64.mul - local.get $3 - i64.const 32 - i64.shr_u - i64.add + i32.store offset=8 + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get local.get $2 - i64.const 32 - i64.shr_u - i64.add - global.set $~lib/math/res128_hi - local.get $4 - i64.const 32 - i64.shr_s + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.max + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 local.get $1 - i64.const 32 - i64.shr_u - i64.mul - local.tee $3 - local.get $9 - i64.const 4294967295 - i64.and + i32.const 1 + call $~lib/typedarray/Float64Array#__get local.get $2 - i64.const 32 - i64.shl - i64.add - i64.add - local.set $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.max + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/vec2/round (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer local.get $1 - local.get $3 - i64.lt_u - i64.extend_i32_u - global.get $~lib/math/res128_hi - local.get $4 - local.get $6 - i64.mul - i64.add - i64.add - local.tee $8 - i64.const 2 - i64.shl + i32.store offset=4 + local.get $0 + i32.const 0 local.get $1 - i64.const 62 - i64.shr_u - i64.or - local.tee $6 - i64.const 63 - i64.shr_s - local.tee $4 - i64.const 1 - i64.shr_s - local.get $6 - i64.xor + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.tee $2 + f64.const 0.5 + f64.add + f64.floor + local.get $2 + f64.copysign + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get local.tee $2 - i64.clz - local.set $3 + f64.const 0.5 + f64.add + f64.floor local.get $2 - local.get $3 - i64.shl - local.get $4 + f64.copysign + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/vec2/scale (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer local.get $1 - i64.const 2 - i64.shl - i64.xor - local.tee $5 - i64.const 64 - local.get $3 - i64.sub - i64.shr_u - i64.or - local.tee $1 - i64.const 4294967295 - i64.and - local.set $2 + i32.store offset=4 + local.get $0 + i32.const 0 local.get $1 - i64.const 32 - i64.shr_u - local.tee $9 - i64.const 560513588 - i64.mul - local.get $2 - i64.const 3373259426 - i64.mul + i32.const 0 + call $~lib/typedarray/Float64Array#__get local.get $2 - i64.const 560513588 - i64.mul - local.tee $10 - i64.const 32 - i64.shr_u - i64.add - local.tee $11 - i64.const 4294967295 - i64.and - i64.add - local.set $2 - local.get $9 - i64.const 3373259426 - i64.mul - local.get $11 - i64.const 32 - i64.shr_u - i64.add + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get local.get $2 - i64.const 32 - i64.shr_u - i64.add - global.set $~lib/math/res128_hi - local.get $10 - i64.const 4294967295 - i64.and + f64.mul + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/vec2/scaleAndAdd (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer local.get $2 - i64.const 32 - i64.shl - i64.add - local.tee $2 + i32.store offset=8 + local.get $0 + i32.const 0 local.get $1 - f64.convert_i64_u - f64.const 3.753184150245214e-04 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $3 f64.mul - local.get $5 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get local.get $3 - i64.shl - f64.convert_i64_u - f64.const 3.834951969714103e-04 f64.mul f64.add - i64.trunc_f64_u - local.tee $1 - i64.lt_u - i64.extend_i32_u - global.get $~lib/math/res128_hi - local.tee $5 - i64.const 11 - i64.shr_u - i64.add - f64.convert_i64_u - global.set $~lib/math/rempio2_y0 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/vec2/distance (param $0 i32) (param $1 i32) (result f64) + (local $2 f64) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/vec2/distance + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/vec2/squaredDistance (param $0 i32) (param $1 i32) (result f64) + (local $2 f64) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/vec2/squaredDistance + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/vec2/length (param $0 i32) (result f64) + (local $1 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/vec2/length + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/vec2/squaredLength (param $0 i32) (result f64) + (local $1 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/vec2/squaredLength + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/vec2/negate (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.neg + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/vec2/inverse (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer local.get $1 - local.get $5 - i64.const 53 - i64.shl - local.get $2 - i64.const 11 - i64.shr_u - i64.or - i64.add - f64.convert_i64_u - f64.const 5.421010862427522e-20 - f64.mul - global.set $~lib/math/rempio2_y1 - global.get $~lib/math/rempio2_y0 - i64.const 4372995238176751616 - local.get $3 - i64.const 52 - i64.shl - i64.sub + i32.store offset=4 + local.get $0 + i32.const 0 + f64.const 1 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.div + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer local.get $0 - local.get $6 - i64.xor - i64.const -9223372036854775808 - i64.and - i64.or - f64.reinterpret_i64 - local.tee $12 - f64.mul - global.set $~lib/math/rempio2_y0 - global.get $~lib/math/rempio2_y1 - local.get $12 - f64.mul - global.set $~lib/math/rempio2_y1 - local.get $8 - i64.const 62 - i64.shr_s - local.get $4 - i64.sub - i32.wrap_i64 ) - (func $~lib/math/NativeMath.sin (param $0 f64) (result f64) - (local $1 f64) - (local $2 i64) - (local $3 f64) - (local $4 f64) - (local $5 i32) - (local $6 i32) - (local $7 f64) + (func $export:assembly/vec2/normalize (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer local.get $0 - i64.reinterpret_f64 - local.tee $2 - i64.const 32 - i64.shr_u - i32.wrap_i64 - local.tee $5 - i32.const 31 - i32.shr_u - local.set $6 - local.get $5 - i32.const 2147483647 - i32.and - local.tee $5 - i32.const 1072243195 - i32.le_u - if - local.get $5 - i32.const 1045430272 - i32.lt_u - if - local.get $0 - return - end - local.get $0 - local.get $0 - local.get $0 - f64.mul - local.tee $3 - local.get $0 - f64.mul - local.get $3 - local.get $3 - local.get $3 - f64.const 2.7557313707070068e-06 - f64.mul - f64.const -1.984126982985795e-04 - f64.add - f64.mul - f64.const 0.00833333333332249 - f64.add - local.get $3 - local.get $3 - local.get $3 - f64.mul - f64.mul - local.get $3 - f64.const 1.58969099521155e-10 - f64.mul - f64.const -2.5050760253406863e-08 - f64.add - f64.mul - f64.add - f64.mul - f64.const -0.16666666666666632 - f64.add - f64.mul - f64.add - return - end - local.get $5 - i32.const 2146435072 - i32.ge_u - if - local.get $0 - local.get $0 - f64.sub - return - end - block $~lib/math/rempio2|inlined.0 (result i32) - local.get $2 - i64.const 32 - i64.shr_u - i32.wrap_i64 - i32.const 2147483647 - i32.and - local.tee $5 - i32.const 1094263291 - i32.lt_u - if - local.get $5 - i32.const 20 - i32.shr_u - local.tee $6 - local.get $0 - local.get $0 - f64.const 0.6366197723675814 - f64.mul - f64.nearest - local.tee $3 - f64.const 1.5707963267341256 - f64.mul - f64.sub - local.tee $0 - local.get $3 - f64.const 6.077100506506192e-11 - f64.mul - local.tee $4 - f64.sub - local.tee $1 - i64.reinterpret_f64 - i64.const 32 - i64.shr_u - i32.wrap_i64 - i32.const 20 - i32.shr_u - i32.const 2047 - i32.and - i32.sub - i32.const 16 - i32.gt_u - if - local.get $3 - f64.const 2.0222662487959506e-21 - f64.mul - local.get $0 - local.get $0 - local.get $3 - f64.const 6.077100506303966e-11 - f64.mul - local.tee $4 - f64.sub - local.tee $0 - f64.sub - local.get $4 - f64.sub - f64.sub - local.set $4 - local.get $6 - local.get $0 - local.get $4 - f64.sub - local.tee $1 - i64.reinterpret_f64 - i64.const 32 - i64.shr_u - i32.wrap_i64 - i32.const 20 - i32.shr_u - i32.const 2047 - i32.and - i32.sub - i32.const 49 - i32.gt_u - if (result f64) - local.get $3 - f64.const 8.4784276603689e-32 - f64.mul - local.get $0 - local.get $0 - local.get $3 - f64.const 2.0222662487111665e-21 - f64.mul - local.tee $4 - f64.sub - local.tee $0 - f64.sub - local.get $4 - f64.sub - f64.sub - local.set $4 - local.get $0 - local.get $4 - f64.sub - else - local.get $1 - end - local.set $1 - end - local.get $1 - global.set $~lib/math/rempio2_y0 - local.get $0 - local.get $1 - f64.sub - local.get $4 - f64.sub - global.set $~lib/math/rempio2_y1 - local.get $3 - i32.trunc_f64_s - br $~lib/math/rempio2|inlined.0 - end - i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.tee $2 + local.get $2 + f64.mul + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.tee $2 + local.get $2 + f64.mul + f64.add + local.tee $2 + f64.const 0 + f64.gt + if + f64.const 1 local.get $2 - call $~lib/math/pio2_large_quot - local.tee $5 - i32.sub - local.get $5 - local.get $6 - select + f64.sqrt + f64.div + local.set $2 end - local.set $6 - global.get $~lib/math/rempio2_y0 + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/vec2/dot (param $0 i32) (param $1 i32) (result f64) + (local $2 f64) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.mul + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.add + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/vec2/cross (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.mul + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.sub local.set $3 - global.get $~lib/math/rempio2_y1 - local.set $4 - local.get $6 + local.get $0 i32.const 1 - i32.and - if (result f64) - f64.const 1 - local.get $3 - local.get $3 - f64.mul - local.tee $0 - f64.const 0.5 - f64.mul - local.tee $1 - f64.sub - local.tee $7 - f64.const 1 - local.get $7 - f64.sub - local.get $1 - f64.sub - local.get $0 - local.get $0 - local.get $0 - local.get $0 - f64.const 2.480158728947673e-05 - f64.mul - f64.const -0.001388888888887411 - f64.add - f64.mul - f64.const 0.0416666666666666 - f64.add - f64.mul - local.get $0 - local.get $0 - f64.mul - local.tee $1 - local.get $1 - f64.mul - local.get $0 - local.get $0 - f64.const -1.1359647557788195e-11 - f64.mul - f64.const 2.087572321298175e-09 - f64.add - f64.mul - f64.const -2.7557314351390663e-07 - f64.add - f64.mul - f64.add - f64.mul - local.get $3 - local.get $4 - f64.mul - f64.sub - f64.add - f64.add - else - local.get $3 - local.get $3 - f64.mul - local.tee $0 - local.get $3 - f64.mul - local.set $1 - local.get $3 - local.get $0 - local.get $4 - f64.const 0.5 - f64.mul - local.get $1 - local.get $0 - local.get $0 - f64.const 2.7557313707070068e-06 - f64.mul - f64.const -1.984126982985795e-04 - f64.add - f64.mul - f64.const 0.00833333333332249 - f64.add - local.get $0 - local.get $0 - local.get $0 - f64.mul - f64.mul - local.get $0 - f64.const 1.58969099521155e-10 - f64.mul - f64.const -2.5050760253406863e-08 - f64.add - f64.mul - f64.add - f64.mul - f64.sub - f64.mul - local.get $4 - f64.sub - local.get $1 - f64.const -0.16666666666666632 - f64.mul - f64.sub - f64.sub - end - local.tee $0 - f64.neg + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 0 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $3 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/vec2/lerp (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + (local $4 f64) + (local $5 f64) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $5 local.get $0 - local.get $6 - i32.const 2 - i32.and - select - ) - (func $~lib/math/NativeMath.cos (param $0 f64) (result f64) - (local $1 f64) - (local $2 i64) - (local $3 f64) - (local $4 f64) - (local $5 i32) - (local $6 i32) - (local $7 f64) + i32.const 0 + local.get $4 + local.get $3 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.sub + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set local.get $0 - i64.reinterpret_f64 - local.tee $2 - i64.const 32 - i64.shr_u - i32.wrap_i64 - local.tee $5 - i32.const 31 - i32.shr_u - local.set $6 + i32.const 1 local.get $5 - i32.const 2147483647 - i32.and - local.tee $5 - i32.const 1072243195 - i32.le_u - if - local.get $5 - i32.const 1044816030 - i32.lt_u - if - f64.const 1 - return - end - f64.const 1 - local.get $0 - local.get $0 - f64.mul - local.tee $3 - f64.const 0.5 - f64.mul - local.tee $4 - f64.sub - local.tee $1 - f64.const 1 - local.get $1 - f64.sub - local.get $4 - f64.sub - local.get $3 - local.get $3 - local.get $3 - local.get $3 - f64.const 2.480158728947673e-05 - f64.mul - f64.const -0.001388888888887411 - f64.add - f64.mul - f64.const 0.0416666666666666 - f64.add - f64.mul - local.get $3 - local.get $3 - f64.mul - local.tee $4 - local.get $4 - f64.mul - local.get $3 - local.get $3 - f64.const -1.1359647557788195e-11 - f64.mul - f64.const 2.087572321298175e-09 - f64.add - f64.mul - f64.const -2.7557314351390663e-07 - f64.add - f64.mul - f64.add - f64.mul - local.get $0 - f64.const 0 - f64.mul - f64.sub - f64.add - f64.add - return - end + local.get $3 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get local.get $5 - i32.const 2146435072 - i32.ge_u - if - local.get $0 - local.get $0 - f64.sub - return - end - block $~lib/math/rempio2|inlined.1 (result i32) - local.get $2 - i64.const 32 - i64.shr_u - i32.wrap_i64 - i32.const 2147483647 - i32.and - local.tee $5 - i32.const 1094263291 - i32.lt_u - if - local.get $5 - i32.const 20 - i32.shr_u - local.tee $6 - local.get $0 - local.get $0 - f64.const 0.6366197723675814 - f64.mul - f64.nearest - local.tee $3 - f64.const 1.5707963267341256 - f64.mul - f64.sub - local.tee $0 - local.get $3 - f64.const 6.077100506506192e-11 - f64.mul - local.tee $4 - f64.sub - local.tee $1 - i64.reinterpret_f64 - i64.const 32 - i64.shr_u - i32.wrap_i64 - i32.const 20 - i32.shr_u - i32.const 2047 - i32.and - i32.sub - i32.const 16 - i32.gt_u - if - local.get $3 - f64.const 2.0222662487959506e-21 - f64.mul - local.get $0 - local.get $0 - local.get $3 - f64.const 6.077100506303966e-11 - f64.mul - local.tee $4 - f64.sub - local.tee $0 - f64.sub - local.get $4 - f64.sub - f64.sub - local.set $4 - local.get $6 - local.get $0 - local.get $4 - f64.sub - local.tee $1 - i64.reinterpret_f64 - i64.const 32 - i64.shr_u - i32.wrap_i64 - i32.const 20 - i32.shr_u - i32.const 2047 - i32.and - i32.sub - i32.const 49 - i32.gt_u - if (result f64) - local.get $3 - f64.const 8.4784276603689e-32 - f64.mul - local.get $0 - local.get $0 - local.get $3 - f64.const 2.0222662487111665e-21 - f64.mul - local.tee $4 - f64.sub - local.tee $0 - f64.sub - local.get $4 - f64.sub - f64.sub - local.set $4 - local.get $0 - local.get $4 - f64.sub - else - local.get $1 - end - local.set $1 - end - local.get $1 - global.set $~lib/math/rempio2_y0 - local.get $0 - local.get $1 - f64.sub - local.get $4 - f64.sub - global.set $~lib/math/rempio2_y1 - local.get $3 - i32.trunc_f64_s - br $~lib/math/rempio2|inlined.1 - end - i32.const 0 - local.get $2 - call $~lib/math/pio2_large_quot - local.tee $5 - i32.sub - local.get $5 - local.get $6 - select - end - local.set $6 - global.get $~lib/math/rempio2_y0 + f64.sub + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/vec2/random (param $0 i32) (param $1 f64) (result i32) + (local $2 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + i32.const 0 + global.set $~argumentsLength + local.get $0 + i32.const 0 + global.get $assembly/common/RANDOM + i32.load + call_indirect $0 (type $none_=>_f64) + local.tee $2 + local.get $2 + f64.add + f64.const 3.141592653589793 + f64.mul + local.tee $2 + call $~lib/math/NativeMath.cos + local.get $1 + f64.const 1 + local.get $1 + i64.reinterpret_f64 + i64.const 1 + i64.shl + i64.const 2 + i64.sub + i64.const -9007199254740994 + i64.le_u + select + local.tee $1 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $2 + call $~lib/math/NativeMath.sin + local.get $1 + f64.mul + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/vec2/transformMat2 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get local.set $3 - global.get $~lib/math/rempio2_y1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get local.set $4 - local.get $6 + local.get $0 + i32.const 0 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 i32.const 1 - i32.and - if (result f64) - local.get $3 - local.get $3 - f64.mul - local.tee $0 - local.get $3 - f64.mul - local.set $1 - local.get $3 - local.get $0 - local.get $4 - f64.const 0.5 - f64.mul - local.get $1 - local.get $0 - local.get $0 - f64.const 2.7557313707070068e-06 - f64.mul - f64.const -1.984126982985795e-04 - f64.add - f64.mul - f64.const 0.00833333333332249 - f64.add - local.get $0 - local.get $0 - local.get $0 - f64.mul - f64.mul - local.get $0 - f64.const 1.58969099521155e-10 - f64.mul - f64.const -2.5050760253406863e-08 - f64.add - f64.mul - f64.add - f64.mul - f64.sub - f64.mul - local.get $4 - f64.sub - local.get $1 - f64.const -0.16666666666666632 - f64.mul - f64.sub - f64.sub - else - f64.const 1 - local.get $3 - local.get $3 - f64.mul - local.tee $0 - f64.const 0.5 - f64.mul - local.tee $1 - f64.sub - local.tee $7 - f64.const 1 - local.get $7 - f64.sub - local.get $1 - f64.sub - local.get $0 - local.get $0 - local.get $0 - local.get $0 - f64.const 2.480158728947673e-05 - f64.mul - f64.const -0.001388888888887411 - f64.add - f64.mul - f64.const 0.0416666666666666 - f64.add - f64.mul - local.get $0 - local.get $0 - f64.mul - local.tee $1 - local.get $1 - f64.mul - local.get $0 - local.get $0 - f64.const -1.1359647557788195e-11 - f64.mul - f64.const 2.087572321298175e-09 - f64.add - f64.mul - f64.const -2.7557314351390663e-07 - f64.add - f64.mul - f64.add - f64.mul - local.get $3 - local.get $4 - f64.mul - f64.sub - f64.add - f64.add - end - local.tee $0 - f64.neg + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/vec2/transformMat2d (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $0 + i32.const 0 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + f64.add + local.get $2 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + f64.add + local.get $2 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer local.get $0 - local.get $6 + ) + (func $export:assembly/vec2/transformMat3 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $0 + i32.const 0 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + f64.add + local.get $2 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $2 i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + local.get $2 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + f64.add + local.get $2 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 12 i32.add - i32.const 2 - i32.and - select + global.set $~lib/memory/__stack_pointer + local.get $0 ) - (func $~lib/string/String.__concat (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) + (func $export:assembly/vec2/transformMat4 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i32.const 0 + local.get $0 i32.store - block $__inlined_func$~lib/string/String#concat - local.get $1 - i32.const 20 - i32.sub - i32.load offset=16 - i32.const 1 - i32.shr_u - i32.const 1 - i32.shl - local.tee $4 - local.get $0 - local.tee $2 - i32.const 20 - i32.sub - i32.load offset=16 - i32.const 1 - i32.shr_u - i32.const 1 - i32.shl - local.tee $3 - i32.add - local.tee $0 - i32.eqz - if - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - i32.const 1808 - local.set $0 - br $__inlined_func$~lib/string/String#concat - end - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.const 1 - call $~lib/rt/itcms/__new - local.tee $0 - i32.store - local.get $0 - local.get $2 - local.get $3 - call $~lib/memory/memory.copy - local.get $0 - local.get $3 - i32.add - local.get $1 - local.get $4 - call $~lib/memory/memory.copy - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - end + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $0 + i32.const 0 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + local.get $2 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + f64.add + local.get $2 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + local.get $2 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + f64.add + local.get $2 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $~lib/array/Array#__uset (param $0 i32) (param $1 i32) (param $2 i32) + (func $export:assembly/vec2/rotate (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + (local $4 f64) + (local $5 f64) + (local $6 f64) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer local.get $0 - i32.load offset=4 + i32.store + global.get $~lib/memory/__stack_pointer local.get $1 - i32.const 2 - i32.shl + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.sub + local.set $4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.sub + local.set $5 + local.get $3 + call $~lib/math/NativeMath.sin + local.set $6 + local.get $0 + i32.const 0 + local.get $4 + local.get $3 + call $~lib/math/NativeMath.cos + local.tee $3 + f64.mul + local.get $5 + local.get $6 + f64.mul + f64.sub + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $4 + local.get $6 + f64.mul + local.get $5 + local.get $3 + f64.mul + f64.add + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 12 i32.add - local.get $2 - i32.store + global.set $~lib/memory/__stack_pointer local.get $0 - local.get $2 - i32.const 1 - call $~lib/rt/itcms/__link ) - (func $assembly/mat2/equals (param $0 i32) (param $1 i32) (result i32) + (func $export:assembly/vec2/angle (param $0 i32) (param $1 i32) (result f64) (local $2 f64) (local $3 f64) (local $4 f64) (local $5 f64) (local $6 f64) - (local $7 f64) - (local $8 f64) - (local $9 f64) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 local.get $0 i32.const 0 call $~lib/typedarray/Float64Array#__get - local.set $2 + local.tee $3 + local.get $3 + f64.mul local.get $0 i32.const 1 call $~lib/typedarray/Float64Array#__get - local.set $3 - local.get $0 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.set $4 - local.get $0 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.set $5 + local.tee $4 + local.get $4 + f64.mul + f64.add + f64.sqrt local.get $1 i32.const 0 call $~lib/typedarray/Float64Array#__get - local.set $6 + local.tee $5 + local.get $5 + f64.mul local.get $1 i32.const 1 call $~lib/typedarray/Float64Array#__get - local.set $7 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.set $8 - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.set $9 - local.get $2 + local.tee $6 local.get $6 - f64.sub - f64.abs - f64.const 1 - local.get $2 - f64.abs + f64.mul + f64.add + f64.sqrt + f64.mul + local.set $2 + local.get $3 + local.get $5 + f64.mul + local.get $4 local.get $6 - f64.abs - call $assembly/imports/MathUtil.max3 - f64.const 1e-06 f64.mul - f64.le - if (result i32) - local.get $3 - local.get $7 - f64.sub - f64.abs - f64.const 1 - local.get $3 - f64.abs - local.get $7 - f64.abs - call $assembly/imports/MathUtil.max3 - f64.const 1e-06 - f64.mul - f64.le - else - i32.const 0 - end - if (result i32) - local.get $4 - local.get $8 - f64.sub - f64.abs - f64.const 1 - local.get $4 - f64.abs - local.get $8 - f64.abs - call $assembly/imports/MathUtil.max3 - f64.const 1e-06 - f64.mul - f64.le - else - i32.const 0 - end - if (result i32) - local.get $5 - local.get $9 - f64.sub - f64.abs - f64.const 1 - local.get $5 - f64.abs - local.get $9 - f64.abs - call $assembly/imports/MathUtil.max3 - f64.const 1e-06 - f64.mul - f64.le - else - i32.const 0 - end - ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 f64) (param $1 f64) (result i32) - (local $2 i64) - (local $3 i64) - local.get $0 - i64.reinterpret_f64 - local.tee $2 + f64.add + local.get $2 + f64.div + local.get $2 local.get $2 - i64.const 63 - i64.shr_s - i64.const 1 - i64.shr_u - i64.xor - local.tee $2 - local.get $1 i64.reinterpret_f64 - local.tee $3 - local.get $3 - i64.const 63 - i64.shr_s i64.const 1 - i64.shr_u - i64.xor - local.tee $3 - i64.gt_s - local.get $2 - local.get $3 - i64.lt_s - i32.sub + i64.shl + i64.const 2 + i64.sub + i64.const -9007199254740994 + i64.le_u + select + f64.const -1 + f64.max + f64.const 1 + f64.min + call $~lib/math/NativeMath.acos + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer ) - (func $~lib/rt/__visit_members (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - block $folding-inner3 - block $folding-inner2 - block $folding-inner0 - block $invalid - block $~lib/array/Array - block $~lib/array/Array - block $~lib/string/String - block $~lib/arraybuffer/ArrayBuffer - local.get $0 - i32.const 8 - i32.sub - i32.load - br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $folding-inner2 $folding-inner0 $folding-inner3 $folding-inner2 $folding-inner3 $folding-inner0 $folding-inner3 $~lib/array/Array $~lib/array/Array $folding-inner0 $invalid - end - return - end - return - end - local.get $0 - i32.load offset=4 - local.tee $1 - local.get $0 - i32.load offset=12 - i32.const 2 - i32.shl - i32.add - local.set $2 - loop $while-continue|0 - local.get $1 - local.get $2 - i32.lt_u - if - local.get $1 - i32.load - local.tee $3 - if - local.get $3 - call $~lib/rt/itcms/__visit - end - local.get $1 - i32.const 4 - i32.add - local.set $1 - br $while-continue|0 - end - end - local.get $0 - i32.load - call $~lib/rt/itcms/__visit - return - end - local.get $0 - i32.load - call $~lib/rt/itcms/__visit - return - end - unreachable - end - local.get $0 - i32.load offset=4 - call $~lib/rt/itcms/__visit - return - end - local.get $0 - i32.load - local.tee $0 - if - local.get $0 - call $~lib/rt/itcms/__visit - end - return - end + (func $export:assembly/vec2/zero (param $0 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer local.get $0 - i32.load - local.tee $0 - if - local.get $0 - call $~lib/rt/itcms/__visit - end - ) - (func $~setArgumentsLength (param $0 i32) + i32.store + local.get $0 + i32.const 0 + f64.const 0 + call $~lib/typedarray/Float64Array#__set local.get $0 - global.set $~argumentsLength - ) - (func $~start - memory.size - i32.const 16 - i32.shl - i32.const 19812 - i32.sub i32.const 1 - i32.shr_u - global.set $~lib/rt/itcms/threshold - i32.const 1584 - call $~lib/rt/itcms/initLazy - global.set $~lib/rt/itcms/pinSpace - i32.const 1616 - call $~lib/rt/itcms/initLazy - global.set $~lib/rt/itcms/toSpace - i32.const 1696 - call $~lib/rt/itcms/initLazy - global.set $~lib/rt/itcms/fromSpace - ) - (func $~stack_check + f64.const 0 + call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - i32.const 3428 - i32.lt_s - if - i32.const 19840 - i32.const 19888 - i32.const 1 - i32.const 1 - call $~lib/builtins/abort - unreachable - end + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 ) - (func $assembly/mat2/str (param $0 i32) (result i32) + (func $export:assembly/vec2/str (param $0 i32) (result i32) (local $1 i32) - (local $2 i32) global.get $~lib/memory/__stack_pointer - i32.const -64 - i32.add + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 32 + i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer @@ -5345,99 +35328,37 @@ i64.const 0 i64.store offset=24 global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=32 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=40 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=48 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=56 - global.get $~lib/memory/__stack_pointer - i32.const 3216 - i32.store offset=56 + i32.const 5232 + i32.store offset=24 local.get $0 i32.const 0 call $~lib/typedarray/Float64Array#__get - call $~lib/util/number/dtoa - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=60 - i32.const 3216 - local.get $1 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=48 - global.get $~lib/memory/__stack_pointer - i32.const 3248 - i32.store offset=52 - local.get $1 - i32.const 3248 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=40 - local.get $0 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - call $~lib/util/number/dtoa - local.set $2 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=44 - local.get $1 - local.get $2 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=32 - global.get $~lib/memory/__stack_pointer - i32.const 3248 - i32.store offset=36 - local.get $1 - i32.const 3248 - call $~lib/string/String.__concat + call $~lib/number/F64#toString local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 - i32.store offset=24 - local.get $0 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - call $~lib/util/number/dtoa - local.set $2 - global.get $~lib/memory/__stack_pointer - local.get $2 i32.store offset=28 + i32.const 5232 local.get $1 - local.get $2 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 i32.store offset=16 global.get $~lib/memory/__stack_pointer - i32.const 3248 + i32.const 4720 i32.store offset=20 local.get $1 - i32.const 3248 + i32.const 4720 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 i32.store offset=8 local.get $0 - i32.const 3 + i32.const 1 call $~lib/typedarray/Float64Array#__get - call $~lib/util/number/dtoa + call $~lib/number/F64#toString local.set $0 global.get $~lib/memory/__stack_pointer local.get $0 @@ -5450,1092 +35371,754 @@ local.get $0 i32.store global.get $~lib/memory/__stack_pointer - i32.const 3280 + i32.const 4752 i32.store offset=4 local.get $0 - i32.const 3280 + i32.const 4752 call $~lib/string/String.__concat global.get $~lib/memory/__stack_pointer - i32.const -64 - i32.sub + i32.const 32 + i32.add global.set $~lib/memory/__stack_pointer - ) - (func $~lib/typedarray/Float64Array#constructor (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) global.get $~lib/memory/__stack_pointer i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/vec2/exactEquals (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i32.const 0 + local.get $0 i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 local.get $0 - i32.eqz - if - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.const 5 - call $~lib/rt/itcms/__new - local.tee $0 - i32.store + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.eq + if (result i32) + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 end global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/vec2/equals (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - local.get $0 - i32.eqz - if - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.const 2 - call $~lib/rt/itcms/__new - local.tee $0 - i32.store - end local.get $0 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#set:buffer + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 local.get $0 i32.const 0 - i32.store offset=4 + call $~lib/typedarray/Float64Array#__get + local.set $2 local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 i32.const 0 - i32.store offset=8 + call $~lib/typedarray/Float64Array#__get + local.set $4 local.get $1 - i32.const 134217727 - i32.gt_u - if - i32.const 1360 - i32.const 1408 - i32.const 18 - i32.const 57 - call $~lib/builtins/abort - unreachable + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $2 + local.get $4 + f64.sub + f64.abs + f64.const 1 + local.get $2 + f64.abs + local.get $4 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + if (result i32) + local.get $3 + local.get $5 + f64.sub + f64.abs + f64.const 1 + local.get $3 + f64.abs + local.get $5 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 end global.get $~lib/memory/__stack_pointer - local.get $1 - i32.const 3 - i32.shl - local.tee $2 + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/vec3/clone (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer i32.const 0 - call $~lib/rt/itcms/__new + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 3 + call $~lib/typedarray/Float64Array#constructor local.tee $1 - i32.store offset=4 + i32.store local.get $1 - local.get $2 - call $~lib/memory/memory.fill + i32.const 0 local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set local.get $1 - call $~lib/arraybuffer/ArrayBufferView#set:buffer + i32.const 1 local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set local.get $1 - i32.store offset=4 + i32.const 2 local.get $0 - local.get $2 - i32.store offset=8 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $export:assembly/vec3/length (param $0 i32) (result f64) + (local $1 f64) global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add + i32.const 4 + i32.sub global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer local.get $0 i32.store + local.get $0 + call $assembly/vec3/length global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $0 ) - (func $~lib/typedarray/Float64Array#slice (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) + (func $export:assembly/vec3/copy (param $0 i32) (param $1 i32) (result i32) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $3 - local.get $1 - i32.const 0 - i32.lt_s - if (result i32) - local.get $1 - local.get $3 - i32.add - local.tee $1 - i32.const 0 - local.get $1 - i32.const 0 - i32.gt_s - select - else - local.get $1 - local.get $3 - local.get $1 - local.get $3 - i32.lt_s - select - end - local.set $1 + i32.store global.get $~lib/memory/__stack_pointer - i32.const 0 - local.get $2 - i32.const 0 - i32.lt_s - if (result i32) - local.get $2 - local.get $3 - i32.add - local.tee $2 - i32.const 0 - local.get $2 - i32.const 0 - i32.gt_s - select - else - local.get $2 - local.get $3 - local.get $2 - local.get $3 - i32.lt_s - select - end local.get $1 - i32.sub - local.tee $2 + i32.store offset=4 + local.get $0 i32.const 0 - local.get $2 + local.get $1 i32.const 0 - i32.gt_s - select - local.tee $2 - call $~lib/typedarray/Float64Array#constructor - local.tee $3 - i32.store - local.get $3 - i32.load offset=4 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.load offset=4 + i32.const 1 local.get $1 - i32.const 3 - i32.shl - i32.add - local.get $2 - i32.const 3 - i32.shl - call $~lib/memory/memory.copy + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $3 + local.get $0 ) - (func $~lib/typedarray/Float64Array#subarray (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) + (func $export:assembly/vec3/set (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store local.get $0 - local.tee $3 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $4 - local.get $1 - i32.const 0 - i32.lt_s - if (result i32) - local.get $1 - local.get $4 - i32.add - local.tee $0 - i32.const 0 - local.get $0 - i32.const 0 - i32.gt_s - select - else - local.get $1 - local.get $4 - local.get $1 - local.get $4 - i32.lt_s - select - end - local.set $0 - local.get $2 - i32.const 0 - i32.lt_s - if (result i32) - local.get $2 - local.get $4 - i32.add - local.tee $1 - i32.const 0 - local.get $1 - i32.const 0 - i32.gt_s - select - else - local.get $2 - local.get $4 - local.get $2 - local.get $4 - i32.lt_s - select - end - local.set $2 - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.const 5 - call $~lib/rt/itcms/__new - local.tee $1 - i32.store - local.get $1 - local.get $3 - i32.load - local.tee $4 i32.store - local.get $1 - local.get $4 - i32.const 0 - call $~lib/rt/itcms/__link - local.get $1 - local.get $3 - i32.load offset=4 local.get $0 - i32.const 3 - i32.shl - i32.add - i32.store offset=4 + i32.const 0 local.get $1 - local.get $2 - local.get $0 + call $~lib/typedarray/Float64Array#__set local.get $0 + i32.const 1 local.get $2 - i32.lt_s - select + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.sub - i32.const 3 - i32.shl - i32.store offset=8 + i32.const 2 + local.get $3 + call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $1 + local.get $0 ) - (func $~lib/typedarray/Float64Array#map (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 f64) + (func $export:assembly/vec3/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32) global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $5 local.get $0 - i32.load offset=4 - local.set $6 - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.const 5 - call $~lib/rt/itcms/__new - local.tee $2 i32.store global.get $~lib/memory/__stack_pointer - local.get $5 - i32.const 3 - i32.shl - local.tee $7 - i32.const 0 - call $~lib/rt/itcms/__new - local.tee $3 + local.get $1 i32.store offset=4 - loop $for-loop|0 - local.get $4 - local.get $5 - i32.lt_s - if - local.get $6 - local.get $4 - i32.const 3 - i32.shl - local.tee $8 - i32.add - f64.load - local.set $9 - i32.const 3 - global.set $~argumentsLength - local.get $3 - local.get $8 - i32.add - local.get $9 - local.get $4 - local.get $0 - local.get $1 - i32.load - call_indirect $0 (type $f64_i32_i32_=>_f64) - f64.store - local.get $4 - i32.const 1 - i32.add - local.set $4 - br $for-loop|0 - end - end - local.get $2 - local.get $3 - i32.store + global.get $~lib/memory/__stack_pointer local.get $2 - local.get $3 + i32.store offset=8 + local.get $0 i32.const 0 - call $~lib/rt/itcms/__link + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get local.get $2 - local.get $3 - i32.store offset=4 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get local.get $2 - local.get $7 - i32.store offset=8 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 12 i32.add global.set $~lib/memory/__stack_pointer - local.get $2 + local.get $0 ) - (func $~lib/typedarray/Float64Array#filter (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 f64) + (func $export:assembly/vec3/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32) global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $4 - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.const 5 - call $~lib/rt/itcms/__new - local.tee $5 i32.store global.get $~lib/memory/__stack_pointer - local.get $4 - i32.const 3 - i32.shl - i32.const 0 - call $~lib/rt/itcms/__new - local.tee $3 + local.get $1 i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 local.get $0 - i32.load offset=4 - local.set $6 - loop $for-loop|0 - local.get $4 - local.get $7 - i32.gt_s - if - local.get $6 - local.get $7 - i32.const 3 - i32.shl - i32.add - f64.load - local.set $8 - i32.const 3 - global.set $~argumentsLength - local.get $8 - local.get $7 - local.get $0 - local.get $1 - i32.load - call_indirect $0 (type $f64_i32_i32_=>_i32) - if - local.get $3 - local.get $2 - i32.const 3 - i32.shl - i32.add - local.get $8 - f64.store - local.get $2 - i32.const 1 - i32.add - local.set $2 - end - local.get $7 - i32.const 1 - i32.add - local.set $7 - br $for-loop|0 - end - end - local.get $3 - local.set $0 - block $__inlined_func$~lib/rt/itcms/__renew - local.get $2 - i32.const 3 - i32.shl - local.tee $3 - local.tee $4 - local.get $0 - i32.const 20 - i32.sub - local.tee $6 - i32.load - i32.const -4 - i32.and - i32.const 16 - i32.sub - i32.le_u - if - local.get $6 - local.get $4 - i32.store offset=16 - br $__inlined_func$~lib/rt/itcms/__renew - end - local.get $4 - local.get $6 - i32.load offset=12 - call $~lib/rt/itcms/__new - local.tee $1 - local.get $0 - local.get $4 - local.get $6 - i32.load offset=16 - local.tee $0 - local.get $0 - local.get $4 - i32.gt_u - select - call $~lib/memory/memory.copy - local.get $1 - local.set $0 - end - local.get $5 + local.get $1 + local.get $2 + call $assembly/vec3/subtract + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/vec3/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer local.get $0 i32.store - local.get $5 - local.get $0 - i32.const 0 - call $~lib/rt/itcms/__link - local.get $5 - local.get $3 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 i32.store offset=8 - local.get $5 local.get $0 - i32.store offset=4 + local.get $1 + local.get $2 + call $assembly/vec3/multiply global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 12 i32.add global.set $~lib/memory/__stack_pointer - local.get $5 ) - (func $~lib/util/number/dtoa (param $0 f64) (result i32) - (local $1 i32) - (local $2 i32) + (func $export:assembly/vec3/divide (param $0 i32) (param $1 i32) (param $2 i32) (result i32) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - local.get $0 - f64.const 0 - f64.eq - if - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - i32.const 1840 - return - end local.get $0 - local.get $0 - f64.sub - f64.const 0 - f64.ne - if - local.get $0 - local.get $0 - f64.ne - if - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - i32.const 1872 - return - end - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - i32.const 1904 - i32.const 1952 - local.get $0 - f64.const 0 - f64.lt - select - return - end - i32.const 1984 - local.get $0 - call $~lib/util/number/dtoa_core - i32.const 1 - i32.shl - local.set $1 + i32.store global.get $~lib/memory/__stack_pointer local.get $1 - i32.const 1 - call $~lib/rt/itcms/__new - local.tee $2 - i32.store + i32.store offset=4 + global.get $~lib/memory/__stack_pointer local.get $2 - i32.const 1984 + i32.store offset=8 + local.get $0 local.get $1 - call $~lib/memory/memory.copy + local.get $2 + call $assembly/vec3/divide global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 12 i32.add global.set $~lib/memory/__stack_pointer - local.get $2 ) - (func $~lib/string/String#substring (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) + (func $export:assembly/vec3/ceil (param $0 i32) (param $1 i32) (result i32) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - i32.const 0 local.get $0 - i32.const 20 - i32.sub - i32.load offset=16 - i32.const 1 - i32.shr_u - local.tee $2 - local.get $2 - i32.const 0 - i32.gt_s - select - local.tee $3 - local.get $1 - i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer local.get $1 + i32.store offset=4 + local.get $0 i32.const 0 - i32.gt_s - select - local.tee $1 - local.get $2 - local.get $1 - local.get $2 - i32.lt_s - select - local.tee $1 - local.get $1 - local.get $3 - i32.lt_s - select - i32.const 1 - i32.shl - local.tee $4 - local.get $3 - local.get $1 local.get $1 - local.get $3 - i32.gt_s - select - i32.const 1 - i32.shl - local.tee $1 - i32.sub - local.tee $3 - i32.eqz - if - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - i32.const 1808 - return - end i32.const 0 - local.get $4 - local.get $2 + call $~lib/typedarray/Float64Array#__get + f64.ceil + call $~lib/typedarray/Float64Array#__set + local.get $0 i32.const 1 - i32.shl - i32.eq local.get $1 - select - if - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $0 - return - end - global.get $~lib/memory/__stack_pointer - local.get $3 i32.const 1 - call $~lib/rt/itcms/__new - local.tee $2 - i32.store - local.get $2 + call $~lib/typedarray/Float64Array#__get + f64.ceil + call $~lib/typedarray/Float64Array#__set local.get $0 + i32.const 2 local.get $1 - i32.add - local.get $3 - call $~lib/memory/memory.copy + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.ceil + call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $2 + local.get $0 ) - (func $~lib/util/string/joinFloatArray (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $export:assembly/vec3/floor (param $0 i32) (param $1 i32) (result i32) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i32.const 0 + local.get $0 i32.store + global.get $~lib/memory/__stack_pointer local.get $1 - i32.const 1 - i32.sub - local.tee $4 + i32.store offset=4 + local.get $0 i32.const 0 - i32.lt_s - if - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - i32.const 1808 - return - end - block $folding-inner0 - local.get $4 - i32.eqz - if - local.get $0 - f64.load - call $~lib/util/number/dtoa - local.set $0 - br $folding-inner0 - end - global.get $~lib/memory/__stack_pointer - local.get $4 - local.get $2 - i32.const 20 - i32.sub - i32.load offset=16 - i32.const 1 - i32.shr_u - local.tee $5 - i32.const 28 - i32.add - i32.mul - i32.const 28 - i32.add - local.tee $7 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/itcms/__new - local.tee $1 - i32.store - loop $for-loop|0 - local.get $4 - local.get $6 - i32.gt_s - if - local.get $1 - local.get $3 - i32.const 1 - i32.shl - i32.add - local.get $0 - local.get $6 - i32.const 3 - i32.shl - i32.add - f64.load - call $~lib/util/number/dtoa_buffered - local.get $3 - i32.add - local.set $3 - local.get $5 - if - local.get $1 - local.get $3 - i32.const 1 - i32.shl - i32.add - local.get $2 - local.get $5 - i32.const 1 - i32.shl - call $~lib/memory/memory.copy - local.get $3 - local.get $5 - i32.add - local.set $3 - end - local.get $6 - i32.const 1 - i32.add - local.set $6 - br $for-loop|0 - end - end - local.get $7 - local.get $1 - local.get $3 - i32.const 1 - i32.shl - i32.add - local.get $0 - local.get $4 - i32.const 3 - i32.shl - i32.add - f64.load - call $~lib/util/number/dtoa_buffered - local.get $3 - i32.add - local.tee $0 - i32.gt_s - if - local.get $1 - local.get $0 - call $~lib/string/String#substring - local.set $0 - br $folding-inner0 - end - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $1 - return - end + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.floor + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.floor + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.floor + call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $assembly/mat2/mat2#constructor (param $0 i32) (param $1 i32) (result i32) + (func $export:assembly/vec3/min (param $0 i32) (param $1 i32) (param $2 i32) (result i32) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store local.get $0 - i32.eqz - if - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.const 4 - call $~lib/rt/itcms/__new - local.tee $0 - i32.store - end + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 local.get $0 + i32.const 0 local.get $1 - call $~lib/typedarray/Float64Array#constructor - local.tee $0 - i32.store + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.min + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.min + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.min + call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 12 i32.add global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $assembly/mat2/create (result i32) - (local $0 i32) + (func $export:assembly/vec3/max (param $0 i32) (param $1 i32) (param $2 i32) (result i32) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i32.const 0 + local.get $0 i32.store global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 i32.const 0 - i32.const 4 - call $assembly/mat2/mat2#constructor - local.tee $0 - i32.store + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.max + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 - f64.const 0 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.max call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 0 - f64.const 1 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - f64.const 1 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.max call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 12 i32.add global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $assembly/mat2/fromValues (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) - (local $4 i32) + (func $export:assembly/vec3/round (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i32.const 0 + local.get $0 i32.store global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 i32.const 0 - i32.const 4 - call $assembly/mat2/mat2#constructor - local.tee $4 - i32.store - local.get $4 + local.get $1 i32.const 0 - local.get $0 + call $~lib/typedarray/Float64Array#__get + local.tee $2 + f64.const 0.5 + f64.add + f64.floor + local.get $2 + f64.copysign call $~lib/typedarray/Float64Array#__set - local.get $4 + local.get $0 i32.const 1 local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.tee $2 + f64.const 0.5 + f64.add + f64.floor + local.get $2 + f64.copysign call $~lib/typedarray/Float64Array#__set - local.get $4 + local.get $0 + i32.const 2 + local.get $1 i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.tee $2 + f64.const 0.5 + f64.add + f64.floor local.get $2 - call $~lib/typedarray/Float64Array#__set - local.get $4 - i32.const 3 - local.get $3 + f64.copysign call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $4 + local.get $0 ) - (func $assembly/mat2/LDU (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - (local $4 i32) - (local $5 i32) + (func $export:assembly/vec3/scale (param $0 i32) (param $1 i32) (param $2 f64) (result i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store local.get $0 - i32.const 2 - local.get $3 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.get $3 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - f64.div - call $~lib/typedarray/Float64Array#__set - local.get $2 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 i32.const 0 - local.get $3 + local.get $1 i32.const 0 call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 i32.const 1 - local.get $3 + local.get $1 i32.const 1 call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set local.get $2 - i32.const 3 - local.get $3 - i32.const 3 - call $~lib/typedarray/Float64Array#__get + f64.mul + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 + local.get $1 + i32.const 2 call $~lib/typedarray/Float64Array#__get local.get $2 - i32.const 1 - call $~lib/typedarray/Float64Array#__get f64.mul - f64.sub call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/vec3/scaleAndAdd (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i32.const 0 + local.get $0 i32.store global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.const 0 - call $~lib/rt/itcms/__new - local.tee $4 - i32.store - i32.const 16 - i32.const 9 - call $~lib/rt/itcms/__new - local.tee $3 - local.get $4 - i32.store - local.get $3 - local.get $4 - i32.const 0 - call $~lib/rt/itcms/__link - local.get $3 - local.get $4 + local.get $1 i32.store offset=4 - local.get $3 - i32.const 12 - i32.store offset=8 - local.get $3 - i32.const 3 - i32.store offset=12 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $3 - i32.store global.get $~lib/memory/__stack_pointer - local.get $3 - i32.load offset=4 - i32.store offset=4 - local.get $3 - i32.const 0 + local.get $2 + i32.store offset=8 local.get $0 - call $~lib/array/Array#__uset + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 i32.const 1 local.get $1 - call $~lib/array/Array#__uset + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get local.get $2 - call $~lib/array/Array#__uset + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 12 i32.add global.set $~lib/memory/__stack_pointer - local.get $3 + local.get $0 ) - (func $export:~lib/arraybuffer/ArrayBufferView#get:buffer (param $0 i32) (result i32) + (func $export:assembly/vec3/distance (param $0 i32) (param $1 i32) (result f64) + (local $2 f64) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer local.get $0 i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 local.get $0 - i32.load + local.get $1 + call $assembly/vec3/distance global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer ) - (func $export:~lib/arraybuffer/ArrayBufferView#get:dataStart (param $0 i32) (result i32) + (func $export:assembly/vec3/squaredDistance (param $0 i32) (param $1 i32) (result f64) + (local $2 f64) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer local.get $0 i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 local.get $0 - i32.load offset=4 + local.get $1 + call $assembly/vec3/squaredDistance global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer ) - (func $export:~lib/arraybuffer/ArrayBufferView#get:byteLength (param $0 i32) (result i32) + (func $export:assembly/vec3/squaredLength (param $0 i32) (result f64) + (local $1 f64) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -6545,34 +36128,54 @@ local.get $0 i32.store local.get $0 - i32.load offset=8 + call $assembly/vec3/squaredLength global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer ) - (func $export:~lib/arraybuffer/ArrayBufferView#get:byteOffset (param $0 i32) (result i32) + (func $export:assembly/vec3/negate (param $0 i32) (param $1 i32) (result i32) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer local.get $0 i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 local.get $0 - i32.load offset=4 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.neg + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.load - i32.sub + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.neg + call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer + local.get $0 ) - (func $export:assembly/mat2/ReadonlyVec2#constructor (param $0 i32) (param $1 i32) (result i32) + (func $export:assembly/vec3/inverse (param $0 i32) (param $1 i32) (result i32) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check @@ -6580,486 +36183,271 @@ local.get $0 i32.store global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 i32.const 0 - i32.store + f64.const 1 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.div + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.eqz - if - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.const 8 - call $~lib/rt/itcms/__new - local.tee $0 - i32.store - end - global.get $~lib/memory/__stack_pointer + i32.const 1 + f64.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.div + call $~lib/typedarray/Float64Array#__set local.get $0 + i32.const 2 + f64.const 1 local.get $1 - call $~lib/typedarray/Float64Array#constructor - local.tee $0 - i32.store - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.div + call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $export:~lib/typedarray/Float64Array#get:length (param $0 i32) (result i32) + (func $export:assembly/vec3/normalize (param $0 i32) (param $1 i32) (result i32) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer local.get $0 i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u + local.get $1 + call $assembly/vec3/normalize global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer ) - (func $export:~lib/typedarray/Float64Array#at (param $0 i32) (param $1 i32) (result f64) - (local $2 i32) - (local $3 f64) + (func $export:assembly/vec3/dot (param $0 i32) (param $1 i32) (result f64) + (local $2 f64) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer local.get $0 i32.store + global.get $~lib/memory/__stack_pointer local.get $1 - i32.const 0 - local.get $0 - local.tee $2 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.tee $0 - local.get $1 - i32.const 0 - i32.ge_s - select - i32.add - local.set $1 + i32.store offset=4 local.get $0 local.get $1 - i32.le_u - if - i32.const 1168 - i32.const 1232 - i32.const 1397 - i32.const 33 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.load offset=4 - local.get $1 - i32.const 3 - i32.shl - i32.add - f64.load + call $assembly/vec3/dot global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer ) - (func $export:~lib/typedarray/Float64Array#includes@varargs (param $0 i32) (param $1 f64) (param $2 i32) (result i32) - (local $3 i32) - (local $4 f64) + (func $export:assembly/vec3/cross (param $0 i32) (param $1 i32) (param $2 i32) (result i32) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer local.get $0 i32.store - block $1of1 - block $0of1 - block $outOfRange - global.get $~argumentsLength - i32.const 1 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - i32.const 0 - local.set $2 - end - block $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) - i32.const 0 - local.get $2 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.tee $3 - i32.ge_s - i32.const 1 - local.get $3 - select - br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 - drop - local.get $2 - i32.const 0 - i32.lt_s - if - local.get $2 - local.get $3 - i32.add - local.tee $2 - i32.const 0 - local.get $2 - i32.const 0 - i32.gt_s - select - local.set $2 - end - local.get $0 - i32.load offset=4 - local.set $0 - loop $while-continue|0 - local.get $2 - local.get $3 - i32.lt_s - if - i32.const 1 - i32.const 1 - local.get $0 - local.get $2 - i32.const 3 - i32.shl - i32.add - f64.load - local.tee $4 - local.get $4 - f64.ne - local.get $1 - local.get $1 - f64.ne - i32.and - local.get $1 - local.get $4 - f64.eq - select - br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 - drop - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $while-continue|0 - end - end - i32.const 0 - end - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:~lib/typedarray/Float64Array#indexOf@varargs (param $0 i32) (param $1 f64) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check + local.get $1 + i32.store offset=4 global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 local.get $0 - i32.store - block $1of1 - block $0of1 - block $outOfRange - global.get $~argumentsLength - i32.const 1 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - i32.const 0 - local.set $2 - end - i32.const -1 - local.set $3 - block $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 - local.get $2 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.tee $4 - i32.ge_s - i32.const 1 - local.get $4 - select - br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 - local.get $2 - i32.const 0 - i32.lt_s - if - local.get $2 - local.get $4 - i32.add - local.tee $2 - i32.const 0 - local.get $2 - i32.const 0 - i32.gt_s - select - local.set $2 - end - local.get $0 - i32.load offset=4 - local.set $0 - loop $while-continue|0 - local.get $2 - local.get $4 - i32.lt_s - if - local.get $1 - local.get $0 - local.get $2 - local.tee $3 - i32.const 3 - i32.shl - i32.add - f64.load - f64.eq - br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 - local.get $3 - i32.const 1 - i32.add - local.set $2 - br $while-continue|0 - end - end - i32.const -1 - local.set $3 - end + local.get $1 + local.get $2 + call $assembly/vec3/cross global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 12 i32.add global.set $~lib/memory/__stack_pointer - local.get $3 ) - (func $export:~lib/typedarray/Float64Array#lastIndexOf@varargs (param $0 i32) (param $1 f64) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) + (func $export:assembly/vec3/lerp (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + (local $4 f64) + (local $5 f64) + (local $6 f64) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer local.get $0 i32.store - block $1of1 - block $0of1 - block $outOfRange - global.get $~argumentsLength - i32.const 1 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $2 - end + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $6 local.get $0 - local.set $3 - i32.const -1 - local.set $0 - block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 - local.get $3 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.tee $4 - i32.eqz - br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 - local.get $2 - local.get $4 - i32.add - local.get $4 - i32.const 1 - i32.sub - local.get $2 - local.get $2 - local.get $4 - i32.ge_s - select - local.get $2 - i32.const 0 - i32.lt_s - select - local.set $0 - local.get $3 - i32.load offset=4 - local.set $2 - loop $while-continue|0 - local.get $0 - i32.const 0 - i32.ge_s - if - local.get $1 - local.get $2 - local.get $0 - i32.const 3 - i32.shl - i32.add - f64.load - f64.eq - br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 - local.get $0 - i32.const 1 - i32.sub - local.set $0 - br $while-continue|0 - end - end - i32.const -1 - local.set $0 - end + i32.const 0 + local.get $4 + local.get $3 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.sub + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $5 + local.get $3 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.sub + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $6 + local.get $3 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $6 + f64.sub + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 12 i32.add global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $export:~lib/typedarray/Float64Array#fill@varargs (param $0 i32) (param $1 f64) (param $2 i32) (param $3 i32) (result i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) + (func $export:assembly/vec3/slerp (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + (local $4 f64) + (local $5 f64) + (local $6 f64) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer local.get $0 i32.store - block $2of2 - block $1of2 - block $0of2 - block $outOfRange - global.get $~argumentsLength - i32.const 1 - i32.sub - br_table $0of2 $1of2 $2of2 $outOfRange - end - unreachable - end - i32.const 0 - local.set $2 - end - i32.const 2147483647 - local.set $3 - end - local.get $0 - local.tee $4 - i32.load offset=4 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $1 + local.get $2 + call $assembly/vec3/dot + f64.const -1 + f64.max + f64.const 1 + f64.min + call $~lib/math/NativeMath.acos + local.tee $5 + call $~lib/math/NativeMath.sin local.set $6 + f64.const 1 + local.get $3 + f64.sub + local.get $5 + f64.mul + call $~lib/math/NativeMath.sin + local.get $6 + f64.div + local.set $4 + local.get $3 + local.get $5 + f64.mul + call $~lib/math/NativeMath.sin + local.get $6 + f64.div + local.set $3 local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $5 - local.get $2 i32.const 0 - i32.lt_s - if (result i32) - local.get $2 - local.get $5 - i32.add - local.tee $0 - i32.const 0 - local.get $0 - i32.const 0 - i32.gt_s - select - else - local.get $2 - local.get $5 - local.get $2 - local.get $5 - i32.lt_s - select - end - local.set $0 + local.get $4 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.mul local.get $3 + local.get $2 i32.const 0 - i32.lt_s - if (result i32) - local.get $3 - local.get $5 - i32.add - local.tee $2 - i32.const 0 - local.get $2 - i32.const 0 - i32.gt_s - select - else - local.get $3 - local.get $5 - local.get $3 - local.get $5 - i32.lt_s - select - end - local.set $2 - loop $for-loop|0 - local.get $0 - local.get $2 - i32.lt_s - if - local.get $6 - local.get $0 - i32.const 3 - i32.shl - i32.add - local.get $1 - f64.store - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end - end + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.mul + local.get $3 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.mul + local.get $3 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 12 i32.add global.set $~lib/memory/__stack_pointer - local.get $4 + local.get $0 ) - (func $export:~lib/typedarray/Float64Array#sort@varargs (param $0 i32) (param $1 i32) (result i32) + (func $export:assembly/vec3/hermite (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 f64) (result i32) global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 20 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check @@ -7070,106 +36458,63 @@ local.get $1 i32.store offset=4 global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check + local.get $2 + i32.store offset=8 global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - block $1of1 - block $0of1 - block $outOfRange - global.get $~argumentsLength - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - i32.const 3312 - local.set $1 - global.get $~lib/memory/__stack_pointer - i32.const 3312 - i32.store - end + local.get $3 + i32.store offset=12 + global.get $~lib/memory/__stack_pointer + local.get $4 + i32.store offset=16 local.get $0 local.get $1 - call $~lib/typedarray/Float64Array#sort - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer + local.get $2 + local.get $3 + local.get $4 + local.get $5 + call $assembly/vec3/hermite global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 20 i32.add global.set $~lib/memory/__stack_pointer ) - (func $export:~lib/typedarray/Float64Array#slice@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $export:assembly/vec3/bezier (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 f64) (result i32) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 20 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer local.get $0 i32.store - block $2of2 - block $1of2 - block $0of2 - block $outOfRange - global.get $~argumentsLength - br_table $0of2 $1of2 $2of2 $outOfRange - end - unreachable - end - i32.const 0 - local.set $1 - end - i32.const 2147483647 - local.set $2 - end - local.get $0 + global.get $~lib/memory/__stack_pointer local.get $1 - local.get $2 - call $~lib/typedarray/Float64Array#slice + i32.store offset=4 global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:~lib/typedarray/Float64Array#subarray@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $2 + i32.store offset=8 global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check + local.get $3 + i32.store offset=12 global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - block $2of2 - block $1of2 - block $0of2 - block $outOfRange - global.get $~argumentsLength - br_table $0of2 $1of2 $2of2 $outOfRange - end - unreachable - end - i32.const 0 - local.set $1 - end - i32.const 2147483647 - local.set $2 - end + local.get $4 + i32.store offset=16 local.get $0 local.get $1 local.get $2 - call $~lib/typedarray/Float64Array#subarray + local.get $3 + local.get $4 + local.get $5 + call $assembly/vec3/bezier global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 20 i32.add global.set $~lib/memory/__stack_pointer ) - (func $export:~lib/typedarray/Float64Array#copyWithin@varargs (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $export:assembly/vec3/random (param $0 i32) (param $1 f64) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -7178,32 +36523,76 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.store - block $1of1 - block $0of1 - block $outOfRange - global.get $~argumentsLength - i32.const 2 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - i32.const 2147483647 - local.set $3 - end + i32.const 0 + global.set $~argumentsLength + global.get $assembly/common/RANDOM + i32.load + call_indirect $0 (type $none_=>_f64) + local.set $2 + i32.const 0 + global.set $~argumentsLength + f64.const 1 + global.get $assembly/common/RANDOM + i32.load + call_indirect $0 (type $none_=>_f64) + local.tee $3 + local.get $3 + f64.add + f64.const 1 + f64.sub + local.tee $3 + local.get $3 + f64.mul + f64.sub + f64.sqrt + local.get $1 + f64.const 1 + local.get $1 + i64.reinterpret_f64 + i64.const 1 + i64.shl + i64.const 2 + i64.sub + i64.const -9007199254740994 + i64.le_u + select + local.tee $4 + f64.mul + local.set $1 local.get $0 + i32.const 0 + local.get $2 + local.get $2 + f64.add + f64.const 3.141592653589793 + f64.mul + local.tee $2 + call $~lib/math/NativeMath.cos local.get $1 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 local.get $2 + call $~lib/math/NativeMath.sin + local.get $1 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 local.get $3 - call $~lib/typedarray/Float64Array#copyWithin + local.get $4 + f64.mul + call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer + local.get $0 ) - (func $export:~lib/typedarray/Float64Array#map (param $0 i32) (param $1 i32) (result i32) + (func $export:assembly/vec3/transformMat4 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check @@ -7213,17 +36602,24 @@ global.get $~lib/memory/__stack_pointer local.get $1 i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 local.get $0 local.get $1 - call $~lib/typedarray/Float64Array#map + local.get $2 + call $assembly/vec3/transformMat4 global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 12 i32.add global.set $~lib/memory/__stack_pointer ) - (func $export:~lib/typedarray/Float64Array#filter (param $0 i32) (param $1 i32) (result i32) + (func $export:assembly/vec3/transformMat3 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check @@ -7233,21 +36629,90 @@ global.get $~lib/memory/__stack_pointer local.get $1 i32.store offset=4 - local.get $0 - local.get $1 - call $~lib/typedarray/Float64Array#filter global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $0 + i32.const 0 + local.get $3 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.mul + local.get $4 + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.add + local.get $5 + local.get $2 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $3 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.mul + local.get $4 + local.get $2 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.add + local.get $5 + local.get $2 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $3 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.mul + local.get $4 + local.get $2 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.add + local.get $5 + local.get $2 i32.const 8 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 12 i32.add global.set $~lib/memory/__stack_pointer + local.get $0 ) - (func $export:~lib/typedarray/Float64Array#findIndex (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 f64) + (func $export:assembly/vec3/transformQuat (param $0 i32) (param $1 i32) (param $2 i32) (result i32) global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check @@ -7257,119 +36722,21 @@ global.get $~lib/memory/__stack_pointer local.get $1 i32.store offset=4 - local.get $0 - i32.load offset=4 - local.set $3 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $4 - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float64Array,f64>|inlined.0 - loop $for-loop|0 - local.get $2 - local.get $4 - i32.lt_s - if - local.get $3 - local.get $2 - i32.const 3 - i32.shl - i32.add - f64.load - i32.const 3 - global.set $~argumentsLength - local.get $2 - local.get $0 - local.get $1 - i32.load - call_indirect $0 (type $f64_i32_i32_=>_i32) - br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float64Array,f64>|inlined.0 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - i32.const -1 - local.set $2 - end global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer local.get $2 - ) - (func $export:~lib/typedarray/Float64Array#some (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 f64) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer + i32.store offset=8 local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer local.get $1 - i32.store offset=4 - block $~lib/typedarray/SOME<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) - local.get $0 - i32.load offset=4 - local.set $3 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $4 - loop $for-loop|0 - local.get $2 - local.get $4 - i32.lt_s - if - local.get $3 - local.get $2 - i32.const 3 - i32.shl - i32.add - f64.load - local.set $5 - i32.const 3 - global.set $~argumentsLength - i32.const 1 - local.get $5 - local.get $2 - local.get $0 - local.get $1 - i32.load - call_indirect $0 (type $f64_i32_i32_=>_i32) - br_if $~lib/typedarray/SOME<~lib/typedarray/Float64Array,f64>|inlined.0 - drop - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - i32.const 0 - end + local.get $2 + call $assembly/vec3/transformQuat global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 12 i32.add global.set $~lib/memory/__stack_pointer ) - (func $export:~lib/typedarray/Float64Array#every (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 f64) + (func $export:assembly/vec3/rotateX (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check @@ -7379,60 +36746,22 @@ global.get $~lib/memory/__stack_pointer local.get $1 i32.store offset=4 - block $~lib/typedarray/EVERY<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) - local.get $0 - i32.load offset=4 - local.set $3 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $4 - loop $for-loop|0 - local.get $2 - local.get $4 - i32.lt_s - if - local.get $3 - local.get $2 - i32.const 3 - i32.shl - i32.add - f64.load - local.set $5 - i32.const 3 - global.set $~argumentsLength - i32.const 0 - local.get $5 - local.get $2 - local.get $0 - local.get $1 - i32.load - call_indirect $0 (type $f64_i32_i32_=>_i32) - i32.eqz - br_if $~lib/typedarray/EVERY<~lib/typedarray/Float64Array,f64>|inlined.0 - drop - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - i32.const 1 - end global.get $~lib/memory/__stack_pointer - i32.const 8 + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $assembly/vec3/rotateX + global.get $~lib/memory/__stack_pointer + i32.const 12 i32.add global.set $~lib/memory/__stack_pointer ) - (func $export:~lib/typedarray/Float64Array#forEach (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 f64) + (func $export:assembly/vec3/rotateY (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check @@ -7442,111 +36771,46 @@ global.get $~lib/memory/__stack_pointer local.get $1 i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 local.get $0 - i32.load offset=4 - local.set $3 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $4 - loop $for-loop|0 - local.get $2 - local.get $4 - i32.lt_s - if - local.get $3 - local.get $2 - i32.const 3 - i32.shl - i32.add - f64.load - i32.const 3 - global.set $~argumentsLength - local.get $2 - local.get $0 - local.get $1 - i32.load - call_indirect $0 (type $f64_i32_i32_=>_none) - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end + local.get $1 + local.get $2 + local.get $3 + call $assembly/vec3/rotateY global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 12 i32.add global.set $~lib/memory/__stack_pointer ) - (func $export:~lib/typedarray/Float64Array#reverse (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 f64) + (func $export:assembly/vec3/rotateZ (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer local.get $0 i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 local.get $0 - i32.load offset=4 - local.set $4 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.const 1 - i32.sub - local.set $2 - loop $for-loop|0 - local.get $1 - local.get $2 - i32.lt_u - if - local.get $4 - local.get $1 - i32.const 3 - i32.shl - i32.add - local.tee $3 - f64.load - local.set $5 - local.get $3 - local.get $4 - local.get $2 - i32.const 3 - i32.shl - i32.add - local.tee $3 - f64.load - f64.store - local.get $3 - local.get $5 - f64.store - local.get $1 - i32.const 1 - i32.add - local.set $1 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $for-loop|0 - end - end + local.get $1 + local.get $2 + local.get $3 + call $assembly/vec3/rotateZ global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 12 i32.add global.set $~lib/memory/__stack_pointer - local.get $0 ) - (func $export:~lib/typedarray/Float64Array#join@varargs (param $0 i32) (param $1 i32) (result i32) + (func $export:assembly/vec3/angle (param $0 i32) (param $1 i32) (result f64) + (local $2 f64) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -7558,41 +36822,77 @@ global.get $~lib/memory/__stack_pointer local.get $1 i32.store offset=4 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer + local.get $0 i32.const 0 - i32.store - block $1of1 - block $0of1 - block $outOfRange - global.get $~argumentsLength - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - i32.const 2976 - local.set $1 - global.get $~lib/memory/__stack_pointer - i32.const 2976 - i32.store - end + call $~lib/typedarray/Float64Array#__get + local.tee $2 + local.get $2 + f64.mul + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.tee $2 + local.get $2 + f64.mul + f64.add local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.tee $2 + local.get $2 + f64.mul + f64.add + f64.sqrt local.get $1 - call $~lib/typedarray/Float64Array#join - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.tee $2 + local.get $2 + f64.mul + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.tee $2 + local.get $2 + f64.mul + f64.add + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.tee $2 + local.get $2 + f64.mul + f64.add + f64.sqrt + f64.mul + local.tee $2 + i64.reinterpret_f64 + i64.const 1 + i64.shl + i64.const 2 + i64.sub + i64.const -9007199254740994 + i64.le_u + if (result f64) + local.get $0 + local.get $1 + call $assembly/vec3/dot + local.get $2 + f64.div + else + local.get $2 + end + f64.const -1 + f64.max + f64.const 1 + f64.min + call $~lib/math/NativeMath.acos global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer ) - (func $export:~lib/typedarray/Float64Array#toString (param $0 i32) (result i32) + (func $export:assembly/vec3/zero (param $0 i32) (result i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -7601,49 +36901,95 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.store + local.get $0 + i32.const 0 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/vec3/str (param $0 i32) (result i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - global.get $~lib/memory/__stack_pointer - i32.const 2976 + local.get $0 i32.store local.get $0 - i32.const 2976 - call $~lib/typedarray/Float64Array#join - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer + call $assembly/vec3/str global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer ) - (func $export:assembly/mat2/mat2#constructor (param $0 i32) (param $1 i32) (result i32) + (func $export:assembly/vec3/exactEquals (param $0 i32) (param $1 i32) (result i32) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer local.get $0 i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get local.get $1 - call $assembly/mat2/mat2#constructor + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.eq + if (result i32) + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer ) - (func $export:assembly/mat2/ReadonlyMat2#constructor (param $0 i32) (param $1 i32) (result i32) + (func $export:assembly/vec3/equals (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check @@ -7651,43 +36997,87 @@ local.get $0 i32.store global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 i32.const 0 - i32.store + call $~lib/typedarray/Float64Array#__get + local.set $2 local.get $0 - i32.eqz - if - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.const 6 - call $~lib/rt/itcms/__new - local.tee $0 - i32.store - end - global.get $~lib/memory/__stack_pointer + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $3 local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $4 local.get $1 - call $assembly/mat2/mat2#constructor - local.tee $0 - i32.store - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $2 + local.get $5 + f64.sub + f64.abs + f64.const 1 + local.get $2 + f64.abs + local.get $5 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + if (result i32) + local.get $3 + local.get $6 + f64.sub + f64.abs + f64.const 1 + local.get $3 + f64.abs + local.get $6 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $4 + local.get $7 + f64.sub + f64.abs + f64.const 1 + local.get $4 + f64.abs + local.get $7 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $0 ) - (func $export:assembly/mat2/clone (param $0 i32) (result i32) - (local $1 i32) + (func $export:assembly/vec4/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check @@ -7695,54 +37085,45 @@ local.get $0 i32.store global.get $~lib/memory/__stack_pointer - i32.const 4 + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/vec4/multiply + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/vec4/divide (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i32.const 0 + local.get $0 i32.store global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.const 4 - call $assembly/mat2/mat2#constructor - local.tee $1 - i32.store - local.get $1 - i32.const 0 - local.get $0 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 1 - local.get $0 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set local.get $1 - i32.const 2 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 local.get $0 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set local.get $1 - i32.const 3 - local.get $0 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer + local.get $2 + call $assembly/vec4/divide global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 12 i32.add global.set $~lib/memory/__stack_pointer - local.get $1 ) - (func $export:assembly/mat2/copy (param $0 i32) (param $1 i32) (result i32) + (func $export:assembly/vec4/ceil (param $0 i32) (param $1 i32) (result i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -7759,24 +37140,28 @@ local.get $1 i32.const 0 call $~lib/typedarray/Float64Array#__get + f64.ceil call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 local.get $1 i32.const 1 call $~lib/typedarray/Float64Array#__get + f64.ceil call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 local.get $1 i32.const 2 call $~lib/typedarray/Float64Array#__get + f64.ceil call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 3 local.get $1 i32.const 3 call $~lib/typedarray/Float64Array#__get + f64.ceil call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer i32.const 8 @@ -7784,72 +37169,55 @@ global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $export:assembly/mat2/identity (param $0 i32) (result i32) + (func $export:assembly/vec4/floor (param $0 i32) (param $1 i32) (result i32) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer local.get $0 i32.store - local.get $0 - i32.const 0 - f64.const 1 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - f64.const 1 - call $~lib/typedarray/Float64Array#__set - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $0 - ) - (func $export:assembly/mat2/set (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store + local.get $1 + i32.store offset=4 local.get $0 i32.const 0 local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.floor call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 - local.get $2 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.floor call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 - local.get $3 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.floor call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 3 - local.get $4 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.floor call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $export:assembly/mat2/transpose (param $0 i32) (param $1 i32) (result i32) - (local $2 f64) + (func $export:assembly/vec4/min (param $0 i32) (param $1 i32) (param $2 i32) (result i32) global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check @@ -7859,149 +37227,58 @@ global.get $~lib/memory/__stack_pointer local.get $1 i32.store offset=4 - local.get $0 - local.get $1 - i32.eq - if - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.set $2 - local.get $0 - i32.const 1 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - local.get $2 - call $~lib/typedarray/Float64Array#__set - else - local.get $0 - i32.const 0 - local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - end - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $0 - ) - (func $export:assembly/mat2/invert (param $0 i32) (param $1 i32) (result i32) - (local $2 f64) - (local $3 f64) - (local $4 f64) - (local $5 f64) - (local $6 f64) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 + i32.const 0 local.get $1 i32.const 0 call $~lib/typedarray/Float64Array#__get - local.set $3 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.min + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 local.get $1 i32.const 1 call $~lib/typedarray/Float64Array#__get - local.set $4 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.min + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 local.get $1 i32.const 2 call $~lib/typedarray/Float64Array#__get - local.set $5 - block $__inlined_func$assembly/mat2/invert - local.get $3 - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.tee $2 - f64.mul - local.get $5 - local.get $4 - f64.mul - f64.sub - local.tee $6 - i64.reinterpret_f64 - i64.const 1 - i64.shl - i64.const 2 - i64.sub - i64.const -9007199254740994 - i64.gt_u - if - i32.const 0 - local.set $0 - br $__inlined_func$assembly/mat2/invert - end - local.get $0 - i32.const 0 - local.get $2 - f64.const 1 - local.get $6 - f64.div - local.tee $2 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - local.get $4 - f64.neg - local.get $2 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - local.get $5 - f64.neg - local.get $2 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - local.get $3 - local.get $2 - f64.mul - call $~lib/typedarray/Float64Array#__set - end + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.min + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.min + call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 12 i32.add global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $export:assembly/mat2/adjoint (param $0 i32) (param $1 i32) (result i32) - (local $2 f64) + (func $export:assembly/vec4/max (param $0 i32) (param $1 i32) (param $2 i32) (result i32) global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check @@ -8011,73 +37288,126 @@ global.get $~lib/memory/__stack_pointer local.get $1 i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + i32.const 0 local.get $1 i32.const 0 call $~lib/typedarray/Float64Array#__get - local.set $2 - local.get $0 + local.get $2 i32.const 0 - local.get $1 - i32.const 3 call $~lib/typedarray/Float64Array#__get + f64.max call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 local.get $1 i32.const 1 call $~lib/typedarray/Float64Array#__get - f64.neg + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.max call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 local.get $1 i32.const 2 call $~lib/typedarray/Float64Array#__get - f64.neg + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.max call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.max call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 12 i32.add global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $export:assembly/mat2/determinant (param $0 i32) (result f64) - (local $1 f64) + (func $export:assembly/vec4/round (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer local.get $0 i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 local.get $0 i32.const 0 + local.get $1 + i32.const 0 call $~lib/typedarray/Float64Array#__get + local.tee $2 + f64.const 0.5 + f64.add + f64.floor + local.get $2 + f64.copysign + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 3 + i32.const 1 + local.get $1 + i32.const 1 call $~lib/typedarray/Float64Array#__get - f64.mul + local.tee $2 + f64.const 0.5 + f64.add + f64.floor + local.get $2 + f64.copysign + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 + local.get $1 + i32.const 2 call $~lib/typedarray/Float64Array#__get + local.tee $2 + f64.const 0.5 + f64.add + f64.floor + local.get $2 + f64.copysign + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 1 + i32.const 3 + local.get $1 + i32.const 3 call $~lib/typedarray/Float64Array#__get - f64.mul - f64.sub + local.tee $2 + f64.const 0.5 + f64.add + f64.floor + local.get $2 + f64.copysign + call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer + local.get $0 ) - (func $export:assembly/mat2/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $export:assembly/vec4/distance (param $0 i32) (param $1 i32) (result f64) + (local $2 f64) global.get $~lib/memory/__stack_pointer - i32.const 12 + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check @@ -8087,24 +37417,16 @@ global.get $~lib/memory/__stack_pointer local.get $1 i32.store offset=4 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=8 local.get $0 local.get $1 - local.get $2 - call $assembly/mat2/multiply + call $assembly/vec4/distance global.get $~lib/memory/__stack_pointer - i32.const 12 + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer ) - (func $export:assembly/mat2/rotate (param $0 i32) (param $1 i32) (param $2 f64) (result i32) - (local $3 f64) - (local $4 f64) - (local $5 f64) - (local $6 f64) - (local $7 f64) + (func $export:assembly/vec4/squaredDistance (param $0 i32) (param $1 i32) (result f64) + (local $2 f64) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -8116,189 +37438,95 @@ global.get $~lib/memory/__stack_pointer local.get $1 i32.store offset=4 - local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.set $4 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.set $5 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.set $6 - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.set $7 - local.get $2 - call $~lib/math/NativeMath.sin - local.set $3 - local.get $0 - i32.const 0 - local.get $4 - local.get $2 - call $~lib/math/NativeMath.cos - local.tee $2 - f64.mul - local.get $6 - local.get $3 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - local.get $5 - local.get $2 - f64.mul - local.get $7 - local.get $3 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - local.get $4 - local.get $3 - f64.neg - f64.mul - local.get $6 - local.get $2 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 3 - local.get $5 - local.get $3 - f64.neg - f64.mul - local.get $7 - local.get $2 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set + local.get $1 + call $assembly/vec4/squaredDistance global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $0 ) - (func $export:assembly/mat2/scale (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 f64) - (local $4 f64) - (local $5 f64) - (local $6 f64) - (local $7 f64) - (local $8 f64) + (func $export:assembly/vec4/length (param $0 i32) (result f64) + (local $1 f64) global.get $~lib/memory/__stack_pointer - i32.const 12 + i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer local.get $0 i32.store + local.get $0 + call $assembly/vec4/length global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/vec4/squaredLength (param $0 i32) (result f64) + (local $1 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=8 - local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.set $5 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.set $6 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.set $7 - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.set $8 - local.get $2 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.set $3 - local.get $2 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.set $4 - local.get $0 - i32.const 0 - local.get $5 - local.get $3 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - local.get $6 - local.get $3 - f64.mul - call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 2 - local.get $7 - local.get $4 - f64.mul - call $~lib/typedarray/Float64Array#__set + i32.store local.get $0 - i32.const 3 - local.get $8 - local.get $4 - f64.mul - call $~lib/typedarray/Float64Array#__set + call $assembly/vec4/squaredLength global.get $~lib/memory/__stack_pointer - i32.const 12 + i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $0 ) - (func $export:assembly/mat2/fromRotation (param $0 i32) (param $1 f64) (result i32) - (local $2 f64) + (func $export:assembly/vec4/negate (param $0 i32) (param $1 i32) (result i32) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer local.get $0 i32.store + global.get $~lib/memory/__stack_pointer local.get $1 - call $~lib/math/NativeMath.sin - local.set $2 + i32.store offset=4 local.get $0 i32.const 0 local.get $1 - call $~lib/math/NativeMath.cos - local.tee $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.neg call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 - local.get $2 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.neg call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 - local.get $2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get f64.neg call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 3 local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.neg call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $export:assembly/mat2/fromScaling (param $0 i32) (param $1 i32) (result i32) + (func $export:assembly/vec4/inverse (param $0 i32) (param $1 i32) (result i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -8312,23 +37540,35 @@ i32.store offset=4 local.get $0 i32.const 0 + f64.const 1 local.get $1 i32.const 0 call $~lib/typedarray/Float64Array#__get + f64.div call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 - f64.const 0 + f64.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.div call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 - f64.const 0 + f64.const 1 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.div call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 3 + f64.const 1 local.get $1 - i32.const 1 + i32.const 3 call $~lib/typedarray/Float64Array#__get + f64.div call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer i32.const 8 @@ -8336,63 +37576,48 @@ global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $export:assembly/mat2/str (param $0 i32) (result i32) + (func $export:assembly/vec4/normalize (param $0 i32) (param $1 i32) (result i32) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer local.get $0 i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 local.get $0 - call $assembly/mat2/str + local.get $1 + call $assembly/vec4/normalize global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer ) - (func $export:assembly/mat2/frob (param $0 i32) (result f64) - (local $1 f64) + (func $export:assembly/vec4/dot (param $0 i32) (param $1 i32) (result f64) + (local $2 f64) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer local.get $0 i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 local.get $0 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.get $0 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.get $0 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.get $0 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $assembly/imports/MathUtil.hypot + local.get $1 + call $assembly/vec4/dot global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer ) - (func $export:assembly/mat2/LDU (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $export:assembly/vec4/cross (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) global.get $~lib/memory/__stack_pointer i32.const 16 i32.sub @@ -8414,13 +37639,13 @@ local.get $1 local.get $2 local.get $3 - call $assembly/mat2/LDU + call $assembly/vec4/cross global.get $~lib/memory/__stack_pointer i32.const 16 i32.add global.set $~lib/memory/__stack_pointer ) - (func $export:assembly/mat2/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $export:assembly/vec4/lerp (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub @@ -8436,78 +37661,35 @@ local.get $2 i32.store offset=8 local.get $0 - i32.const 0 - local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get local.get $2 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - f64.add - call $~lib/typedarray/Float64Array#__set + local.get $3 + call $assembly/vec4/lerp global.get $~lib/memory/__stack_pointer i32.const 12 i32.add global.set $~lib/memory/__stack_pointer - local.get $0 ) - (func $export:assembly/mat2/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $export:assembly/vec4/random (param $0 i32) (param $1 f64) (result i32) global.get $~lib/memory/__stack_pointer - i32.const 12 + i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer local.get $0 i32.store - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=8 local.get $0 local.get $1 - local.get $2 - call $assembly/mat2/subtract + call $assembly/vec4/random global.get $~lib/memory/__stack_pointer - i32.const 12 + i32.const 4 i32.add global.set $~lib/memory/__stack_pointer ) - (func $export:assembly/mat2/exactEquals (param $0 i32) (param $1 i32) (result i32) + (func $export:assembly/vec4/transformMat4 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check @@ -8517,54 +37699,21 @@ global.get $~lib/memory/__stack_pointer local.get $1 i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 local.get $0 - i32.const 0 - call $~lib/typedarray/Float64Array#__get local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - f64.eq - if (result i32) - local.get $0 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - f64.eq - else - i32.const 0 - end - if (result i32) - local.get $0 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - f64.eq - else - i32.const 0 - end - if (result i32) - local.get $0 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - f64.eq - else - i32.const 0 - end + local.get $2 + call $assembly/vec4/transformMat4 global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 12 i32.add global.set $~lib/memory/__stack_pointer ) - (func $export:assembly/mat2/equals (param $0 i32) (param $1 i32) (result i32) + (func $export:assembly/vec4/transformQuat (param $0 i32) (param $1 i32) (param $2 i32) (result i32) global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check @@ -8574,131 +37723,63 @@ global.get $~lib/memory/__stack_pointer local.get $1 i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 local.get $0 local.get $1 - call $assembly/mat2/equals + local.get $2 + call $assembly/vec4/transformQuat global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 12 i32.add global.set $~lib/memory/__stack_pointer ) - (func $export:assembly/mat2/multiplyScalar (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (func $export:assembly/vec4/zero (param $0 i32) (result i32) global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer local.get $0 i32.store - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 local.get $0 i32.const 0 - local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.get $2 - f64.mul + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.get $2 - f64.mul + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.get $2 - f64.mul + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 3 - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.get $2 - f64.mul + f64.const 0 call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 4 i32.add global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $export:assembly/mat2/multiplyScalarAndAdd (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + (func $export:assembly/vec4/str (param $0 i32) (result i32) global.get $~lib/memory/__stack_pointer - i32.const 12 + i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer local.get $0 i32.store - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=8 - local.get $0 - i32.const 0 - local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.get $3 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.get $3 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.get $3 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 3 - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.get $3 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set + call $assembly/vec4/str global.get $~lib/memory/__stack_pointer - i32.const 12 + i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $0 ) ) diff --git a/build/untouched.wat b/build/untouched.wat new file mode 100644 index 00000000..ddaa33a4 --- /dev/null +++ b/build/untouched.wat @@ -0,0 +1,45484 @@ +(module + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_i32_f64_=>_i32 (func (param i32 i32 f64) (result i32))) + (type $i32_=>_f64 (func (param i32) (result f64))) + (type $i32_i32_i32_f64_=>_i32 (func (param i32 i32 i32 f64) (result i32))) + (type $i32_i32_=>_f64 (func (param i32 i32) (result f64))) + (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) + (type $none_=>_none (func)) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) + (type $none_=>_f64 (func (result f64))) + (type $f64_=>_f64 (func (param f64) (result f64))) + (type $i32_=>_none (func (param i32))) + (type $i32_f64_=>_none (func (param i32 f64))) + (type $i32_f64_f64_f64_f64_f64_f64_=>_i32 (func (param i32 f64 f64 f64 f64 f64 f64) (result i32))) + (type $i32_f64_f64_f64_i32_=>_i32 (func (param i32 f64 f64 f64 i32) (result i32))) + (type $i32_i32_i32_i32_i32_f64_=>_i32 (func (param i32 i32 i32 i32 i32 f64) (result i32))) + (type $i32_f64_f64_=>_i32 (func (param i32 f64 f64) (result i32))) + (type $i32_f64_f64_f64_f64_=>_i32 (func (param i32 f64 f64 f64 f64) (result i32))) + (type $i32_i32_f64_=>_none (func (param i32 i32 f64))) + (type $i32_i32_i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32 i32) (result i32))) + (type $i32_i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32) (result i32))) + (type $i32_i32_f64_i32_=>_i32 (func (param i32 i32 f64 i32) (result i32))) + (type $i32_i32_f64_f64_=>_i32 (func (param i32 i32 f64 f64) (result i32))) + (type $i32_f64_i32_=>_i32 (func (param i32 f64 i32) (result i32))) + (type $i32_f64_f64_f64_=>_i32 (func (param i32 f64 f64 f64) (result i32))) + (type $i32_f64_f64_f64_f64_f64_f64_f64_f64_=>_i32 (func (param i32 f64 f64 f64 f64 f64 f64 f64 f64) (result i32))) + (type $i32_f64_f64_f64_f64_f64_f64_f64_f64_f64_=>_i32 (func (param i32 f64 f64 f64 f64 f64 f64 f64 f64 f64) (result i32))) + (type $i32_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_=>_i32 (func (param i32 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64) (result i32))) + (type $f64_f64_=>_i32 (func (param f64 f64) (result i32))) + (type $f64_f64_f64_f64_=>_i32 (func (param f64 f64 f64 f64) (result i32))) + (type $f64_f64_=>_f64 (func (param f64 f64) (result f64))) + (type $i64_=>_none (func (param i64))) + (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (type $f64_=>_i32 (func (param f64) (result i32))) + (type $i32_i64_i32_i64_i32_i64_i32_=>_i32 (func (param i32 i64 i32 i64 i32 i64 i32) (result i32))) + (type $f64_i32_=>_i32 (func (param f64 i32) (result i32))) + (type $f64_i64_=>_i32 (func (param f64 i64) (result i32))) + (type $f64_f64_f64_=>_i32 (func (param f64 f64 f64) (result i32))) + (type $f64_f64_f64_f64_f64_f64_=>_i32 (func (param f64 f64 f64 f64 f64 f64) (result i32))) + (type $f64_f64_f64_f64_f64_f64_f64_=>_i32 (func (param f64 f64 f64 f64 f64 f64 f64) (result i32))) + (type $f64_f64_f64_f64_f64_f64_f64_f64_=>_i32 (func (param f64 f64 f64 f64 f64 f64 f64 f64) (result i32))) + (type $f64_f64_f64_f64_f64_f64_f64_f64_f64_=>_i32 (func (param f64 f64 f64 f64 f64 f64 f64 f64 f64) (result i32))) + (type $f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_=>_i32 (func (param f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64) (result i32))) + (type $i64_=>_i64 (func (param i64) (result i64))) + (type $f64_f64_i32_=>_f64 (func (param f64 f64 i32) (result f64))) + (type $f64_f64_f64_=>_f64 (func (param f64 f64 f64) (result f64))) + (type $f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_=>_f64 (func (param f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64) (result f64))) + (import "env" "seed" (func $~lib/builtins/seed (result f64))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (import "Math" "hypot" (func $assembly/imports/MathUtil.hypot (param f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64) (result f64))) + (import "Math" "min" (func $assembly/imports/MathUtil.min (param i32 i32 i32) (result i32))) + (import "Math" "max" (func $assembly/imports/MathUtil.max (param f64 f64 f64) (result f64))) + (memory $0 1) + (data (i32.const 12) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\18\00\00\00~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s\00\00\00\00\00") + (data (i32.const 60) "\1c\00\00\00\00\00\00\00\00\00\00\00\03\00\00\00\08\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 92) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00z\00y\00x\00\00\00\00\00\00\00") + (data (i32.const 124) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00$\00\00\00I\00n\00d\00e\00x\00 \00o\00u\00t\00 \00o\00f\00 \00r\00a\00n\00g\00e\00\00\00\00\00\00\00\00\00") + (data (i32.const 188) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00$\00\00\00~\00l\00i\00b\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s\00\00\00\00\00\00\00\00\00") + (data (i32.const 252) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 284) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00\03\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 316) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 348) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 380) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00\06\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 412) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\00\07\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 444) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 476) "\1c\00\00\00\00\00\00\00\00\00\00\00\07\00\00\00\08\00\00\00\t\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 508) "\1c\00\00\00\00\00\00\00\00\00\00\00\07\00\00\00\08\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 540) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1c\00\00\00I\00n\00v\00a\00l\00i\00d\00 \00l\00e\00n\00g\00t\00h\00") + (data (i32.const 588) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00\00\00\00\00\00\00") + (data (i32.const 652) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00(\00\00\00A\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e\00\00\00\00\00") + (data (i32.const 716) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00r\00t\00/\00i\00t\00c\00m\00s\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 784) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 816) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 844) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\00~\00l\00i\00b\00/\00r\00t\00.\00t\00s\00\00\00\00\00\00\00\00\00") + (data (i32.const 896) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 924) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 988) "\1c\00\00\00\00\00\00\00\00\00\00\00\t\00\00\00\08\00\00\00\0b\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1020) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1052) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00\0d\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1084) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1116) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\00\0f\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1148) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1180) "\1c\00\00\00\00\00\00\00\00\00\00\00\07\00\00\00\08\00\00\00\11\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1212) "\1c\00\00\00\00\00\00\00\00\00\00\00\07\00\00\00\08\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1244) "\1c\00\00\00\00\00\00\00\00\00\00\00\t\00\00\00\08\00\00\00\13\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1276) "\1c\00\00\00\00\00\00\00\00\00\00\00\n\00\00\00\08\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1308) "\1c\00\00\00\00\00\00\00\00\00\00\00\0b\00\00\00\08\00\00\00\15\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1340) "\1c\00\00\00\00\00\00\00\00\00\00\00\0c\00\00\00\08\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1372) "\1c\00\00\00\00\00\00\00\00\00\00\00\0d\00\00\00\08\00\00\00\17\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1404) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00\18\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1436) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00\19\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1468) "\1c\00\00\00\00\00\00\00\00\00\00\00\0e\00\00\00\08\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1500) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\00\1b\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1532) "\1c\00\00\00\00\00\00\00\00\00\00\00\0f\00\00\00\08\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1564) "\1c\00\00\00\00\00\00\00\00\00\00\00\0c\00\00\00\08\00\00\00\1d\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1596) "\1c\00\00\00\00\00\00\00\00\00\00\00\10\00\00\00\08\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1632) "n\83\f9\a2\00\00\00\00\d1W\'\fc)\15DN\99\95b\db\c0\dd4\f5\abcQ\feA\90C<:n$\b7a\c5\bb\de\ea.I\06\e0\d2MB\1c\eb\1d\fe\1c\92\d1\t\f55\82\e8>\a7)\b1&p\9c\e9\84D\bb.9\d6\919A~_\b4\8b_\84\9c\f49S\83\ff\97\f8\1f;(\f9\bd\8b\11/\ef\0f\98\05\de\cf~6m\1fm\nZf?FO\b7\t\cb\'\c7\ba\'u-\ea_\9e\f79\07={\f1\e5\eb\b1_\fbk\ea\92R\8aF0\03V\08]\8d\1f \bc\cf\f0\abk{\fca\91\e3\a9\1d6\f4\9a_\85\99e\08\1b\e6^\80\d8\ff\8d@h\a0\14W\15\06\061\'sM") + (data (i32.const 1836) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00\1f\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1868) "\1c\00\00\00\00\00\00\00\00\00\00\00\11\00\00\00\08\00\00\00 \00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1900) "\1c\00\00\00\00\00\00\00\00\00\00\00\12\00\00\00\08\00\00\00!\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1932) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1964) "\1c\00\00\00\00\00\00\00\00\00\00\00\13\00\00\00\08\00\00\00#\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1996) "\1c\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\08\00\00\00$\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2028) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00%\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2060) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00&\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2092) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00\'\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2124) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00(\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2156) "\1c\00\00\00\00\00\00\00\00\00\00\00\07\00\00\00\08\00\00\00)\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2188) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00*\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2220) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00+\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2252) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00,\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2284) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\00-\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2316) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\00.\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2348) "\1c\00\00\00\00\00\00\00\00\00\00\00\07\00\00\00\08\00\00\00/\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2380) "\1c\00\00\00\00\00\00\00\00\00\00\00\t\00\00\00\08\00\00\000\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2412) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\001\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2444) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\002\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2476) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00m\00a\00t\002\00(\00\00\00") + (data (i32.const 2508) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\000\00.\000\00\00\00\00\00\00\00") + (data (i32.const 2540) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00N\00a\00N\00\00\00\00\00\00\00") + (data (i32.const 2572) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\12\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2620) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\00I\00n\00f\00i\00n\00i\00t\00y\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2672) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2728) "\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\9a\ec\ef?\d1f\87\10z^\90\bc\85\7fn\e8\15\e3\ef?\13\f6g5R\d2\8c\be\ef?m{\83]\a6\9a\97<\0f\89\f9lX\b5\ef?\fc\ef\fd\92\1a\b5\8e<\f7Gr+\92\ac\ef?\d1\9c/p=\be><\a2\d1\d32\ec\a3\ef?\0bn\90\894\03j\bc\1b\d3\fe\aff\9b\ef?\0e\bd/*RV\95\bcQ[\12\d0\01\93\ef?U\eaN\8c\ef\80P\bc\cc1l\c0\bd\8a\ef?\16\f4\d5\b9#\c9\91\bc\e0-\a9\ae\9a\82\ef?\afU\\\e9\e3\d3\80\f7\ec\9a<\aa\b9h1\87T\ef?\9d8\86\cb\82\e7\8f\bc\1d\d9\fc\"PM\ef?\8d\c3\a6DAo\8a<\d6\8cb\88;F\ef?}\04\e4\b0\05z\80<\96\dc}\91I?\ef?\94\a8\a8\e3\fd\8e\96<8bunz8\ef?}Ht\f2\18^\87\a9\af\0c\ef?\b6\ab\b0MuM\83<\15\b71\n\fe\06\ef?Lt\ac\e2\01B\86<1\d8L\fcp\01\ef?J\f8\d3]9\dd\8f<\ff\16d\b2\08\fc\ee?\04[\8e;\80\a3\86\bc\f1\9f\92_\c5\f6\ee?hPK\cc\edJ\92\bc\cb\a9:7\a7\f1\ee?\8e-Q\1b\f8\07\99\bcf\d8\05m\ae\ec\ee?\d26\94>\e8\d1q\bc\f7\9f\e54\db\e7\ee?\15\1b\ce\b3\19\19\99\bc\e5\a8\13\c3-\e3\ee?mL*\a7H\9f\85<\"4\12L\a6\de\ee?\8ai(z`\12\93\bc\1c\80\ac\04E\da\ee?[\89\17H\8f\a7X\bc*.\f7!\n\d6\ee?\1b\9aIg\9b,|\bc\97\a8P\d9\f5\d1\ee?\11\ac\c2`\edcC<-\89a`\08\ce\ee?\efd\06;\tf\96Z~d\1fx\bct_\ec\e8u\9f\ee?\b0}\8b\c0J\ee\86\bct\81\a5H\9a\9f\ee?\8a\e6U\1e2\19\86\bc\c9gBV\eb\9f\ee?\d3\d4\t^\cb\9c\90T\'\a4\ee?47;\f1\b6i\93\bc\13\ceL\99\89\a5\ee?\1e\ff\19:\84^\80\bc\ad\c7#F\1a\a7\ee?nWr\d8P\d4\94\bc\ed\92D\9b\d9\a8\ee?\00\8a\0e[g\ad\90<\99f\8a\d9\c7\aa\ee?\b4\ea\f0\c1/\b7\8d<\db\a0*B\e5\ac\ee?\ff\e7\c5\9c`\b6e\bc\8cD\b5\162\af\ee?D_\f3Y\83\f6{<6w\15\99\ae\b1\ee?\83=\1e\a7\1f\t\93\bc\c6\ff\91\0b[\b4\ee?)\1el\8b\b8\a9]\bc\e5\c5\cd\b07\b7\ee?Y\b9\90|\f9#l\bc\0fR\c8\cbD\ba\ee?\aa\f9\f4\"CC\92\bcPN\de\9f\82\bd\ee?K\8ef\d7l\ca\85\bc\ba\07\cap\f1\c0\ee?\'\ce\91+\fc\afq<\90\f0\a3\82\91\c4\ee?\bbs\n\e15\d2m<##\e3\19c\c8\ee?c\"b\"\04\c5\87\bce\e5]{f\cc\ee?\d51\e2\e3\86\1c\8b<3-J\ec\9b\d0\ee?\15\bb\bc\d3\d1\bb\91\bc]%>\b2\03\d5\ee?\d21\ee\9c1\cc\90\b4\07!\d5\82\bc_\9b{3\97|\ef?\c9\0dG;\b9*\89\bc)\a1\f5\14F\86\ef?\d3\88:`\04\b6t<\f6?\8b\e7.\90\ef?qr\9dQ\ec\c5\83<\83L\c7\fbQ\9a\ef?\f0\91\d3\8f\12\f7\8f\bc\da\90\a4\a2\af\a4\ef?}t#\e2\98\ae\8d\bc\f1g\8e-H\af\ef?\08 \aaA\bc\c3\8e<\'Za\ee\1b\ba\ef?2\eb\a9\c3\94+\84<\97\bak7+\c5\ef?\ee\85\d11\a9d\8a<@En[v\d0\ef?\ed\e3;\e4\ba7\8e\bc\14\be\9c\ad\fd\db\ef?\9d\cd\91M;\89w<\d8\90\9e\81\c1\e7\ef?\89\cc`A\c1\05S<\f1q\8f+\c2\f3\ef?") + (data (i32.const 6288) "\9f\de\e0\c3\f04\f7?\00\90\e6y\7f\cc\d7\bf\1f\e9,jx\13\f7?\00\00\0d\c2\eeo\d7\bf\a0\b5\fa\08`\f2\f6?\00\e0Q\13\e3\13\d7\bf}\8c\13\1f\a6\d1\f6?\00x(8[\b8\d6\bf\d1\b4\c5\0bI\b1\f6?\00x\80\90U]\d6\bf\ba\0c/3G\91\f6?\00\00\18v\d0\02\d6\bf#B\"\18\9fq\f6?\00\90\90\86\ca\a8\d5\bf\d9\1e\a5\99OR\f6?\00P\03VCO\d5\bf\c4$\8f\aaV3\f6?\00@k\c37\f6\d4\bf\14\dc\9dk\b3\14\f6?\00P\a8\fd\a7\9d\d4\bfL\\\c6Rd\f6\f5?\00\a8\899\92E\d4\bfO,\91\b5g\d8\f5?\00\b8\b09\f4\ed\d3\bf\de\90[\cb\bc\ba\f5?\00p\8fD\ce\96\d3\bfx\1a\d9\f2a\9d\f5?\00\a0\bd\17\1e@\d3\bf\87VF\12V\80\f5?\00\80F\ef\e2\e9\d2\bf\d3k\e7\ce\97c\f5?\00\e008\1b\94\d2\bf\93\7f\a7\e2%G\f5?\00\88\da\8c\c5>\d2\bf\83E\06B\ff*\f5?\00\90\')\e1\e9\d1\bf\df\bd\b2\db\"\0f\f5?\00\f8H+m\95\d1\bf\d7\de4G\8f\f3\f4?\00\f8\b9\9agA\d1\bf@(\de\cfC\d8\f4?\00\98\ef\94\d0\ed\d0\bf\c8\a3x\c0>\bd\f4?\00\10\db\18\a5\9a\d0\bf\8a%\e0\c3\7f\a2\f4?\00\b8cR\e6G\d0\bf4\84\d4$\05\88\f4?\00\f0\86E\"\eb\cf\bf\0b-\19\1b\cem\f4?\00\b0\17uJG\cf\bfT\189\d3\d9S\f4?\000\10=D\a4\ce\bfZ\84\b4D\':\f4?\00\b0\e9D\0d\02\ce\bf\fb\f8\15A\b5 \f4?\00\f0w)\a2`\cd\bf\b1\f4>\da\82\07\f4?\00\90\95\04\01\c0\cc\bf\8f\feW]\8f\ee\f3?\00\10\89V) \cc\bf\e9L\0b\a0\d9\d5\f3?\00\10\81\8d\17\81\cb\bf+\c1\10\c0`\bd\f3?\00\d0\d3\cc\c9\e2\ca\bf\b8\dau+$\a5\f3?\00\90\12.@E\ca\bf\02\d0\9f\cd\"\8d\f3?\00\f0\1dhw\a8\c9\bf\1cz\84\c5[u\f3?\000Him\0c\c9\bf\e26\adI\ce]\f3?\00\c0E\a6 q\c8\bf@\d4M\98yF\f3?\000\14\b4\8f\d6\c7\bf$\cb\ff\ce\\/\f3?\00pb<\b8<\c7\bfI\0d\a1uw\18\f3?\00`7\9b\9a\a3\c6\bf\909>7\c8\01\f3?\00\a0\b7T1\0b\c6\bfA\f8\95\bbN\eb\f2?\000$v}s\c5\bf\d1\a9\19\02\n\d5\f2?\000\c2\8f{\dc\c4\bf*\fd\b7\a8\f9\be\f2?\00\00\d2Q,F\c4\bf\ab\1b\0cz\1c\a9\f2?\00\00\83\bc\8a\b0\c3\bf0\b5\14`r\93\f2?\00\00Ik\99\1b\c3\bf\f5\a1WW\fa}\f2?\00@\a4\90T\87\c2\bf\bf;\1d\9b\b3h\f2?\00\a0y\f8\b9\f3\c1\bf\bd\f5\8f\83\9dS\f2?\00\a0,%\c8`\c1\bf;\08\c9\aa\b7>\f2?\00 \f7W\7f\ce\c0\bf\b6@\a9+\01*\f2?\00\a0\feI\dc<\c0\bf2A\cc\96y\15\f2?\00\80K\bc\bdW\bf\bf\9b\fc\d2\1d \01\f2?\00@@\96\087\be\bf\0bHMI\f4\ec\f1?\00@\f9>\98\17\bd\bfie\8fR\f5\d8\f1?\00\a0\d8Ng\f9\bb\bf|~W\11#\c5\f1?\00`/ y\dc\ba\bf\e9&\cbt|\b1\f1?\00\80(\e7\c3\c0\b9\bf\b6\1a,\0c\01\9e\f1?\00\c0r\b3F\a6\b8\bf\bdp\b6{\b0\8a\f1?\00\00\ac\b3\01\8d\b7\bf\b6\bc\ef%\8aw\f1?\00\008E\f1t\b6\bf\da1L5\8dd\f1?\00\80\87m\0e^\b5\bf\dd_\'\90\b9Q\f1?\00\e0\a1\de\\H\b4\bfL\d22\a4\0e?\f1?\00\a0jM\d93\b3\bf\da\f9\10r\8b,\f1?\00`\c5\f8y \b2\bf1\b5\ec(0\1a\f1?\00 b\98F\0e\b1\bf\af4\84\da\fb\07\f1?\00\00\d2jl\fa\af\bf\b3kN\0f\ee\f5\f0?\00@wJ\8d\da\ad\bf\ce\9f*]\06\e4\f0?\00\00\85\e4\ec\bc\ab\bf!\a5,cD\d2\f0?\00\c0\12@\89\a1\a9\bf\1a\98\e2|\a7\c0\f0?\00\c0\023X\88\a7\bf\d16\c6\83/\af\f0?\00\80\d6g^q\a5\bf9\13\a0\98\db\9d\f0?\00\80eI\8a\\\a3\bf\df\e7R\af\ab\8c\f0?\00@\15d\e3I\a1\bf\fb(N/\9f{\f0?\00\80\eb\82\c0r\9e\bf\19\8f5\8c\b5j\f0?\00\80RR\f1U\9a\bf,\f9\ec\a5\eeY\f0?\00\80\81\cfb=\96\bf\90,\d1\cdII\f0?\00\00\aa\8c\fb(\92\bf\a9\ad\f0\c6\c68\f0?\00\00\f9 {1\8c\bf\a92y\13e(\f0?\00\00\aa]5\19\84\bfHs\ea\'$\18\f0?\00\00\ec\c2\03\12x\bf\95\b1\14\06\04\08\f0?\00\00$y\t\04`\bf\1a\fa&\f7\1f\e0\ef?\00\00\90\84\f3\efo?t\eaa\c2\1c\a1\ef?\00\00=5A\dc\87?.\99\81\b0\10c\ef?\00\80\c2\c4\a3\ce\93?\cd\ad\ee<\f6%\ef?\00\00\89\14\c1\9f\9b?\e7\13\91\03\c8\e9\ee?\00\00\11\ce\d8\b0\a1?\ab\b1\cbx\80\ae\ee?\00\c0\01\d0[\8a\a5?\9b\0c\9d\a2\1at\ee?\00\80\d8@\83\\\a9?\b5\99\n\83\91:\ee?\00\80W\efj\'\ad?V\9a`\t\e0\01\ee?\00\c0\98\e5\98u\b0?\98\bbw\e5\01\ca\ed?\00 \0d\e3\f5S\b2?\03\91|\0b\f2\92\ed?\00\008\8b\dd.\b4?\ce\\\fbf\ac\\\ed?\00\c0W\87Y\06\b6?\9d\de^\aa,\'\ed?\00\00j5v\da\b7?\cd,k>n\f2\ec?\00`\1cNC\ab\b9?\02y\a7\a2m\be\ec?\00`\0d\bb\c7x\bb?m\087m&\8b\ec?\00 \e72\13C\bd?\04X]\bd\94X\ec?\00`\deq1\n\bf?\8c\9f\bb3\b5&\ec?\00@\91+\15g\c0??\e7\ec\ee\83\f5\eb?\00\b0\92\82\85G\c1?\c1\96\dbu\fd\c4\eb?\000\ca\cdn&\c2?(J\86\0c\1e\95\eb?\00P\c5\a6\d7\03\c3?,>\ef\c5\e2e\eb?\00\103<\c3\df\c3?\8b\88\c9gH7\eb?\00\80zk6\ba\c4?J0\1d!K\t\eb?\00\f0\d1(9\93\c5?~\ef\f2\85\e8\db\ea?\00\f0\18$\cdj\c6?\a2=`1\1d\af\ea?\00\90f\ec\f8@\c7?\a7X\d3?\e6\82\ea?\00\f0\1a\f5\c0\15\c8?\8bs\t\ef@W\ea?\00\80\f6T)\e9\c8?\'K\ab\90*,\ea?\00@\f8\026\bb\c9?\d1\f2\93\13\a0\01\ea?\00\00,\1c\ed\8b\ca?\1b<\db$\9f\d7\e9?\00\d0\01\\Q[\cb?\90\b1\c7\05%\ae\e9?\00\c0\bc\ccg)\cc?/\ce\97\f2.\85\e9?\00`H\d55\f6\cc?uK\a4\ee\ba\\\e9?\00\c0F4\bd\c1\cd?8H\e7\9d\c64\e9?\00\e0\cf\b8\01\8c\ce?\e6Rg/O\0d\e9?\00\90\17\c0\tU\cf?\9d\d7\ff\8eR\e6\e8?\00\b8\1f\12l\0e\d0?|\00\cc\9f\ce\bf\e8?\00\d0\93\0e\b8q\d0?\0e\c3\be\da\c0\99\e8?\00p\86\9ek\d4\d0?\fb\17#\aa\'t\e8?\00\d0K3\876\d1?\08\9a\b3\ac\00O\e8?\00H#g\0d\98\d1?U>e\e8I*\e8?\00\80\cc\e0\ff\f8\d1?`\02\f4\95\01\06\e8?\00hc\d7_Y\d2?)\a3\e0c%\e2\e7?\00\a8\14\t0\b9\d2?\ad\b5\dcw\b3\be\e7?\00`C\10r\18\d3?\c2%\97g\aa\9b\e7?\00\18\ecm&w\d3?W\06\17\f2\07y\e7?\000\af\fbO\d5\d3?\0c\13\d6\db\caV\e7?\00\e0/\e3\ee2\d4?") + (data (i32.const 8336) "k\b6O\01\00\10\e6?<[B\91l\02~<\95\b4M\03\000\e6?A]\00H\ea\bf\8d\f6\05\eb\ff\ef\e6?S-\e2\1a\04\80~\bc\80\97\86\0e\00\10\e7?Ry\tqf\ff{<\12\e9g\fc\ff/\e7?$\87\bd&\e2\00\8c\89<\b9{F\13\000\e9?v\02\98KN\80\7f.\98\dd\ff\af\e9?7\93Z\8a\e0@\87\bcf\fbI\ed\ff\cf\e9?\00\e0\9b\c1\08\ce?O*\00\b0\ea?_?\ff<\04\fdi\bc\d1\1e\ae\d7\ff\cf\ea?\b4p\90\12\e7>\82\bcx\04Q\ee\ff\ef\ea?\a3\de\0e\e0>\06j<[\0de\db\ff\0f\eb?\b9\n\1f8\c8\06ZO\86\d0E\ff\8a<@\16\87\f9\ff\8f\eb?\f9\c3\c2\96w\fe|\f0\0f\00\f0\f4?\1cS\85\0b\89\7f\97<\d1K\dc\12\00\10\f5?6\a4fqe\04`\c9\03\00\b0\f5?\c0\0c\bf\n\08A\9f\bc\bc\19I\1d\00\d0\f5?)G%\fb*\81\98\bc\89z\b8\e7\ff\ef\f5?\04i\ed\80\b7~\94\bc") + (data (i32.const 10396) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00x\00y\00z\00\00\00\00\00\00\00") + (data (i32.const 10428) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00x\00z\00y\00\00\00\00\00\00\00") + (data (i32.const 10460) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00y\00x\00z\00\00\00\00\00\00\00") + (data (i32.const 10492) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00y\00z\00x\00\00\00\00\00\00\00") + (data (i32.const 10524) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00z\00x\00y\00\00\00\00\00\00\00") + (data (i32.const 10556) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00(\00\00\00U\00n\00k\00n\00o\00w\00n\00 \00a\00n\00g\00l\00e\00 \00o\00r\00d\00e\00r\00 \00\00\00\00\00") + (data (i32.const 10620) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00 \00\00\00a\00s\00s\00e\00m\00b\00l\00y\00/\00q\00u\00a\00t\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 10684) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00q\00u\00a\00t\00(\00\00\00") + (data (i32.const 10716) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00q\00u\00a\00t\002\00(\00") + (data (i32.const 10748) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00v\00e\00c\002\00(\00\00\00") + (data (i32.const 10780) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 10812) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 10844) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00\00\00") + (data (i32.const 10892) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 10924) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 10956) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 10988) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 11020) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00v\00e\00c\003\00(\00\00\00") + (data (i32.const 11052) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00v\00e\00c\004\00(\00\00\00") + (data (i32.const 11088) "\19\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\1a\00\00\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\02A\00\00\00\00\00\00\02\t\00\00\00\00\00\00 \00\00\00\00\00\00\00\02\1a\00\00\00\00\00\00") + (table $0 51 funcref) + (elem (i32.const 1) $~lib/math/NativeMath.random $assembly/mat2d/multiply $assembly/mat2d/subtract $assembly/vec3/subtract $assembly/vec3/multiply $assembly/vec3/divide $assembly/vec3/distance $assembly/vec3/squaredDistance $assembly/vec3/length $assembly/vec3/squaredLength $assembly/vec3/forEach~anonymous|0 $assembly/vec4/subtract $assembly/vec4/multiply $assembly/vec4/divide $assembly/vec4/distance $assembly/vec4/squaredDistance $assembly/vec4/length $assembly/vec4/squaredLength $assembly/vec4/forEach~anonymous|0 $assembly/vec4/clone $assembly/vec4/fromValues $assembly/vec4/copy $assembly/vec4/set $assembly/vec4/add $assembly/quat/multiply $assembly/vec4/scale $assembly/vec4/dot $assembly/vec4/lerp $assembly/vec4/normalize $assembly/vec4/exactEquals $assembly/quat/rotationTo~anonymous|0 $assembly/quat/sqlerp~anonymous|0 $assembly/quat/setAxes~anonymous|0 $assembly/quat2/multiply $assembly/mat4/perspectiveNO $assembly/mat4/orthoNO $assembly/mat4/multiply $assembly/mat4/subtract $assembly/mat3/multiply $assembly/mat3/subtract $assembly/vec2/length $assembly/vec2/subtract $assembly/vec2/multiply $assembly/vec2/divide $assembly/vec2/distance $assembly/vec2/squaredDistance $assembly/vec2/squaredLength $assembly/vec2/forEach~anonymous|0 $assembly/mat2/multiply $assembly/mat2/subtract) + (global $assembly/common/EPSILON f64 (f64.const 1e-06)) + (global $~lib/math/random_seeded (mut i32) (i32.const 0)) + (global $~lib/math/random_state0_64 (mut i64) (i64.const 0)) + (global $~lib/math/random_state1_64 (mut i64) (i64.const 0)) + (global $~lib/math/random_state0_32 (mut i32) (i32.const 0)) + (global $~lib/math/random_state1_32 (mut i32) (i32.const 0)) + (global $assembly/common/RANDOM (mut i32) (i32.const 80)) + (global $assembly/common/ANGLE_ORDER (mut i32) (i32.const 112)) + (global $~lib/math/NativeMath.PI f64 (f64.const 3.141592653589793)) + (global $assembly/common/degree f64 (f64.const 0.017453292519943295)) + (global $assembly/mat2d/mul i32 (i32.const 272)) + (global $assembly/mat2d/sub i32 (i32.const 304)) + (global $assembly/vec3/sub i32 (i32.const 336)) + (global $assembly/vec3/mul i32 (i32.const 368)) + (global $assembly/vec3/div i32 (i32.const 400)) + (global $assembly/vec3/dist i32 (i32.const 432)) + (global $assembly/vec3/sqrDist i32 (i32.const 464)) + (global $assembly/vec3/len i32 (i32.const 496)) + (global $assembly/vec3/sqrLen i32 (i32.const 528)) + (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) + (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) + (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) + (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) + (global $~lib/rt/itcms/iter (mut i32) (i32.const 0)) + (global $~lib/rt/itcms/toSpace (mut i32) (i32.const 0)) + (global $~lib/rt/itcms/white (mut i32) (i32.const 0)) + (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) + (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) + (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $assembly/vec3/vec (mut i32) (i32.const 0)) + (global $~argumentsLength (mut i32) (i32.const 0)) + (global $assembly/vec4/sub i32 (i32.const 1040)) + (global $assembly/vec4/mul i32 (i32.const 1072)) + (global $assembly/vec4/div i32 (i32.const 1104)) + (global $assembly/vec4/dist i32 (i32.const 1136)) + (global $assembly/vec4/sqrDist i32 (i32.const 1168)) + (global $assembly/vec4/len i32 (i32.const 1200)) + (global $assembly/vec4/sqrLen i32 (i32.const 1232)) + (global $assembly/vec4/vec (mut i32) (i32.const 0)) + (global $assembly/quat/clone i32 (i32.const 1296)) + (global $assembly/quat/fromValues i32 (i32.const 1328)) + (global $assembly/quat/copy i32 (i32.const 1360)) + (global $assembly/quat/set i32 (i32.const 1392)) + (global $assembly/quat/add i32 (i32.const 1424)) + (global $assembly/quat/mul i32 (i32.const 1456)) + (global $assembly/quat/scale i32 (i32.const 1488)) + (global $assembly/quat/dot i32 (i32.const 1520)) + (global $assembly/quat/lerp i32 (i32.const 1552)) + (global $assembly/quat/length i32 (i32.const 1200)) + (global $assembly/quat/len i32 (i32.const 1200)) + (global $assembly/quat/squaredLength i32 (i32.const 1232)) + (global $assembly/quat/sqrLen i32 (i32.const 1232)) + (global $assembly/quat/normalize i32 (i32.const 1584)) + (global $assembly/quat/exactEquals i32 (i32.const 1616)) + (global $assembly/quat/tmpvec3 (mut i32) (i32.const 0)) + (global $assembly/quat/xUnitVec3 (mut i32) (i32.const 0)) + (global $assembly/quat/yUnitVec3 (mut i32) (i32.const 0)) + (global $~lib/math/rempio2_y0 (mut f64) (f64.const 0)) + (global $~lib/math/rempio2_y1 (mut f64) (f64.const 0)) + (global $~lib/math/res128_hi (mut i64) (i64.const 0)) + (global $assembly/quat/temp1 (mut i32) (i32.const 0)) + (global $assembly/quat/temp2 (mut i32) (i32.const 0)) + (global $assembly/quat/matr (mut i32) (i32.const 0)) + (global $assembly/quat2/getReal i32 (i32.const 1360)) + (global $assembly/quat2/setReal i32 (i32.const 1360)) + (global $assembly/quat2/mul i32 (i32.const 1952)) + (global $assembly/quat2/dot i32 (i32.const 1520)) + (global $assembly/quat2/length i32 (i32.const 1200)) + (global $assembly/quat2/len i32 (i32.const 1200)) + (global $assembly/quat2/squaredLength i32 (i32.const 1232)) + (global $assembly/quat2/sqrLen i32 (i32.const 1232)) + (global $assembly/mat4/perspective i32 (i32.const 1984)) + (global $assembly/mat4/ortho i32 (i32.const 2016)) + (global $assembly/mat4/mul i32 (i32.const 2048)) + (global $assembly/mat4/sub i32 (i32.const 2080)) + (global $assembly/mat3/mul i32 (i32.const 2112)) + (global $assembly/mat3/sub i32 (i32.const 2144)) + (global $assembly/vec2/len i32 (i32.const 2176)) + (global $assembly/vec2/sub i32 (i32.const 2208)) + (global $assembly/vec2/mul i32 (i32.const 2240)) + (global $assembly/vec2/div i32 (i32.const 2272)) + (global $assembly/vec2/dist i32 (i32.const 2304)) + (global $assembly/vec2/sqrDist i32 (i32.const 2336)) + (global $assembly/vec2/sqrLen i32 (i32.const 2368)) + (global $assembly/vec2/vec (mut i32) (i32.const 0)) + (global $assembly/mat2/mul i32 (i32.const 2432)) + (global $assembly/mat2/sub i32 (i32.const 2464)) + (global $~lib/util/number/_frc_plus (mut i64) (i64.const 0)) + (global $~lib/util/number/_frc_minus (mut i64) (i64.const 0)) + (global $~lib/util/number/_exp (mut i32) (i32.const 0)) + (global $~lib/util/number/_K (mut i32) (i32.const 0)) + (global $~lib/util/number/_frc_pow (mut i64) (i64.const 0)) + (global $~lib/util/number/_exp_pow (mut i32) (i32.const 0)) + (global $assembly/mat4/Fov i32 (i32.const 23)) + (global $~lib/rt/__rtti_base i32 (i32.const 11088)) + (global $~lib/memory/__data_end i32 (i32.const 11292)) + (global $~lib/memory/__stack_pointer (mut i32) (i32.const 27676)) + (global $~lib/memory/__heap_base i32 (i32.const 27676)) + (export "glMatrix.EPSILON" (global $assembly/common/EPSILON)) + (export "glMatrix.RANDOM" (global $assembly/common/RANDOM)) + (export "glMatrix.ANGLE_ORDER" (global $assembly/common/ANGLE_ORDER)) + (export "glMatrix.toRadian" (func $assembly/common/toRadian)) + (export "glMatrix.equals" (func $assembly/common/equals)) + (export "mat2.create" (func $assembly/mat2/create)) + (export "mat2.fromValues" (func $assembly/mat2/fromValues)) + (export "mat2.mul" (global $assembly/mat2/mul)) + (export "mat2.sub" (global $assembly/mat2/sub)) + (export "mat2d.create" (func $assembly/mat2d/create)) + (export "mat2d.fromValues" (func $assembly/mat2d/fromValues)) + (export "mat2d.mul" (global $assembly/mat2d/mul)) + (export "mat2d.sub" (global $assembly/mat2d/sub)) + (export "mat3.create" (func $assembly/mat3/create)) + (export "mat3.fromValues" (func $assembly/mat3/fromValues)) + (export "mat3.mul" (global $assembly/mat3/mul)) + (export "mat3.sub" (global $assembly/mat3/sub)) + (export "mat4.Fov" (global $assembly/mat4/Fov)) + (export "mat4.create" (func $assembly/mat4/create)) + (export "mat4.fromValues" (func $assembly/mat4/fromValues)) + (export "mat4.perspective" (global $assembly/mat4/perspective)) + (export "mat4.ortho" (global $assembly/mat4/ortho)) + (export "mat4.mul" (global $assembly/mat4/mul)) + (export "mat4.sub" (global $assembly/mat4/sub)) + (export "quat.create" (func $assembly/quat/create)) + (export "quat.clone" (global $assembly/quat/clone)) + (export "quat.fromValues" (global $assembly/quat/fromValues)) + (export "quat.copy" (global $assembly/quat/copy)) + (export "quat.set" (global $assembly/quat/set)) + (export "quat.add" (global $assembly/quat/add)) + (export "quat.mul" (global $assembly/quat/mul)) + (export "quat.scale" (global $assembly/quat/scale)) + (export "quat.dot" (global $assembly/quat/dot)) + (export "quat.lerp" (global $assembly/quat/lerp)) + (export "quat.length" (global $assembly/quat/length)) + (export "quat.len" (global $assembly/quat/len)) + (export "quat.squaredLength" (global $assembly/quat/squaredLength)) + (export "quat.sqrLen" (global $assembly/quat/sqrLen)) + (export "quat.normalize" (global $assembly/quat/normalize)) + (export "quat.exactEquals" (global $assembly/quat/exactEquals)) + (export "quat.rotationTo" (func $assembly/quat/rotationTo)) + (export "quat.sqlerp" (func $assembly/quat/sqlerp)) + (export "quat.setAxes" (func $assembly/quat/setAxes)) + (export "quat2.create" (func $assembly/quat2/create)) + (export "quat2.fromValues" (func $assembly/quat2/fromValues)) + (export "quat2.fromRotationTranslationValues" (func $assembly/quat2/fromRotationTranslationValues)) + (export "quat2.getReal" (global $assembly/quat2/getReal)) + (export "quat2.setReal" (global $assembly/quat2/setReal)) + (export "quat2.mul" (global $assembly/quat2/mul)) + (export "quat2.dot" (global $assembly/quat2/dot)) + (export "quat2.length" (global $assembly/quat2/length)) + (export "quat2.len" (global $assembly/quat2/len)) + (export "quat2.squaredLength" (global $assembly/quat2/squaredLength)) + (export "quat2.sqrLen" (global $assembly/quat2/sqrLen)) + (export "vec2.create" (func $assembly/vec2/create)) + (export "vec2.fromValues" (func $assembly/vec2/fromValues)) + (export "vec2.len" (global $assembly/vec2/len)) + (export "vec2.sub" (global $assembly/vec2/sub)) + (export "vec2.mul" (global $assembly/vec2/mul)) + (export "vec2.div" (global $assembly/vec2/div)) + (export "vec2.dist" (global $assembly/vec2/dist)) + (export "vec2.sqrDist" (global $assembly/vec2/sqrDist)) + (export "vec2.sqrLen" (global $assembly/vec2/sqrLen)) + (export "vec2.forEach" (func $assembly/vec2/forEach)) + (export "vec3.create" (func $assembly/vec3/create)) + (export "vec3.fromValues" (func $assembly/vec3/fromValues)) + (export "vec3.sub" (global $assembly/vec3/sub)) + (export "vec3.mul" (global $assembly/vec3/mul)) + (export "vec3.div" (global $assembly/vec3/div)) + (export "vec3.dist" (global $assembly/vec3/dist)) + (export "vec3.sqrDist" (global $assembly/vec3/sqrDist)) + (export "vec3.len" (global $assembly/vec3/len)) + (export "vec3.sqrLen" (global $assembly/vec3/sqrLen)) + (export "vec3.forEach" (func $assembly/vec3/forEach)) + (export "vec4.create" (func $assembly/vec4/create)) + (export "vec4.fromValues" (func $assembly/vec4/fromValues)) + (export "vec4.sub" (global $assembly/vec4/sub)) + (export "vec4.mul" (global $assembly/vec4/mul)) + (export "vec4.div" (global $assembly/vec4/div)) + (export "vec4.dist" (global $assembly/vec4/dist)) + (export "vec4.sqrDist" (global $assembly/vec4/sqrDist)) + (export "vec4.len" (global $assembly/vec4/len)) + (export "vec4.sqrLen" (global $assembly/vec4/sqrLen)) + (export "vec4.forEach" (func $assembly/vec4/forEach)) + (export "memory" (memory $0)) + (export "__setArgumentsLength" (func $~setArgumentsLength)) + (export "mat2.clone" (func $export:assembly/mat2/clone)) + (export "mat2.copy" (func $export:assembly/mat2/copy)) + (export "mat2.identity" (func $export:assembly/mat2/identity)) + (export "mat2.set" (func $export:assembly/mat2/set)) + (export "mat2.transpose" (func $export:assembly/mat2/transpose)) + (export "mat2.invert" (func $export:assembly/mat2/invert)) + (export "mat2.adjoint" (func $export:assembly/mat2/adjoint)) + (export "mat2.determinant" (func $export:assembly/mat2/determinant)) + (export "mat2.multiply" (func $export:assembly/mat2/multiply)) + (export "mat2.rotate" (func $export:assembly/mat2/rotate)) + (export "mat2.scale" (func $export:assembly/mat2/scale)) + (export "mat2.fromRotation" (func $export:assembly/mat2/fromRotation)) + (export "mat2.fromScaling" (func $export:assembly/mat2/fromScaling)) + (export "mat2.str" (func $export:assembly/mat2/str)) + (export "mat2.frob" (func $export:assembly/mat2/frob)) + (export "mat2.LDU" (func $export:assembly/mat2/LDU)) + (export "mat2.add" (func $export:assembly/mat2/add)) + (export "mat2.subtract" (func $export:assembly/mat2/subtract)) + (export "mat2.exactEquals" (func $export:assembly/mat2/exactEquals)) + (export "mat2.equals" (func $export:assembly/mat2/equals)) + (export "mat2.multiplyScalar" (func $export:assembly/mat2/multiplyScalar)) + (export "mat2.multiplyScalarAndAdd" (func $export:assembly/mat2/multiplyScalarAndAdd)) + (export "mat2d.clone" (func $export:assembly/mat2d/clone)) + (export "mat2d.copy" (func $export:assembly/mat2d/copy)) + (export "mat2d.identity" (func $export:assembly/mat2d/identity)) + (export "mat2d.set" (func $export:assembly/mat2d/set)) + (export "mat2d.invert" (func $export:assembly/mat2d/invert)) + (export "mat2d.determinant" (func $export:assembly/mat2d/determinant)) + (export "mat2d.multiply" (func $export:assembly/mat2d/multiply)) + (export "mat2d.rotate" (func $export:assembly/mat2d/rotate)) + (export "mat2d.scale" (func $export:assembly/mat2d/scale)) + (export "mat2d.translate" (func $export:assembly/mat2d/translate)) + (export "mat2d.fromRotation" (func $export:assembly/mat2d/fromRotation)) + (export "mat2d.fromScaling" (func $export:assembly/mat2d/fromScaling)) + (export "mat2d.fromTranslation" (func $export:assembly/mat2d/fromTranslation)) + (export "mat2d.str" (func $export:assembly/mat2d/str)) + (export "mat2d.frob" (func $export:assembly/mat2d/frob)) + (export "mat2d.add" (func $export:assembly/mat2d/add)) + (export "mat2d.subtract" (func $export:assembly/mat2d/subtract)) + (export "mat2d.multiplyScalar" (func $export:assembly/mat2d/multiplyScalar)) + (export "mat2d.multiplyScalarAndAdd" (func $export:assembly/mat2d/multiplyScalarAndAdd)) + (export "mat2d.exactEquals" (func $export:assembly/mat2d/exactEquals)) + (export "mat2d.equals" (func $export:assembly/mat2d/equals)) + (export "mat3.fromMat4" (func $export:assembly/mat3/fromMat4)) + (export "mat3.clone" (func $export:assembly/mat3/clone)) + (export "mat3.copy" (func $export:assembly/mat3/copy)) + (export "mat3.set" (func $export:assembly/mat3/set)) + (export "mat3.identity" (func $export:assembly/mat3/identity)) + (export "mat3.transpose" (func $export:assembly/mat3/transpose)) + (export "mat3.invert" (func $export:assembly/mat3/invert)) + (export "mat3.adjoint" (func $export:assembly/mat3/adjoint)) + (export "mat3.determinant" (func $export:assembly/mat3/determinant)) + (export "mat3.multiply" (func $export:assembly/mat3/multiply)) + (export "mat3.translate" (func $export:assembly/mat3/translate)) + (export "mat3.rotate" (func $export:assembly/mat3/rotate)) + (export "mat3.scale" (func $export:assembly/mat3/scale)) + (export "mat3.fromTranslation" (func $export:assembly/mat3/fromTranslation)) + (export "mat3.fromRotation" (func $export:assembly/mat3/fromRotation)) + (export "mat3.fromScaling" (func $export:assembly/mat3/fromScaling)) + (export "mat3.fromMat2d" (func $export:assembly/mat3/fromMat2d)) + (export "mat3.fromQuat" (func $export:assembly/mat3/fromQuat)) + (export "mat3.normalFromMat4" (func $export:assembly/mat3/normalFromMat4)) + (export "mat3.projection" (func $export:assembly/mat3/projection)) + (export "mat3.str" (func $export:assembly/mat3/str)) + (export "mat3.frob" (func $export:assembly/mat3/frob)) + (export "mat3.add" (func $export:assembly/mat3/add)) + (export "mat3.subtract" (func $export:assembly/mat3/subtract)) + (export "mat3.multiplyScalar" (func $export:assembly/mat3/multiplyScalar)) + (export "mat3.multiplyScalarAndAdd" (func $export:assembly/mat3/multiplyScalarAndAdd)) + (export "mat3.exactEquals" (func $export:assembly/mat3/exactEquals)) + (export "mat3.equals" (func $export:assembly/mat3/equals)) + (export "mat4.Fov#get:upDegrees" (func $export:assembly/mat4/Fov#get:upDegrees)) + (export "mat4.Fov#set:upDegrees" (func $export:assembly/mat4/Fov#set:upDegrees)) + (export "mat4.Fov#get:downDegrees" (func $export:assembly/mat4/Fov#get:downDegrees)) + (export "mat4.Fov#set:downDegrees" (func $export:assembly/mat4/Fov#set:downDegrees)) + (export "mat4.Fov#get:leftDegrees" (func $export:assembly/mat4/Fov#get:leftDegrees)) + (export "mat4.Fov#set:leftDegrees" (func $export:assembly/mat4/Fov#set:leftDegrees)) + (export "mat4.Fov#get:rightDegrees" (func $export:assembly/mat4/Fov#get:rightDegrees)) + (export "mat4.Fov#set:rightDegrees" (func $export:assembly/mat4/Fov#set:rightDegrees)) + (export "mat4.Fov#constructor" (func $export:assembly/mat4/Fov#constructor)) + (export "mat4.clone" (func $export:assembly/mat4/clone)) + (export "mat4.copy" (func $export:assembly/mat4/copy)) + (export "mat4.set" (func $export:assembly/mat4/set)) + (export "mat4.identity" (func $export:assembly/mat4/identity)) + (export "mat4.transpose" (func $export:assembly/mat4/transpose)) + (export "mat4.invert" (func $export:assembly/mat4/invert)) + (export "mat4.adjoint" (func $export:assembly/mat4/adjoint)) + (export "mat4.determinant" (func $export:assembly/mat4/determinant)) + (export "mat4.multiply" (func $export:assembly/mat4/multiply)) + (export "mat4.translate" (func $export:assembly/mat4/translate)) + (export "mat4.scale" (func $export:assembly/mat4/scale)) + (export "mat4.rotate" (func $export:assembly/mat4/rotate)) + (export "mat4.rotateX" (func $export:assembly/mat4/rotateX)) + (export "mat4.rotateY" (func $export:assembly/mat4/rotateY)) + (export "mat4.rotateZ" (func $export:assembly/mat4/rotateZ)) + (export "mat4.fromTranslation" (func $export:assembly/mat4/fromTranslation)) + (export "mat4.fromScaling" (func $export:assembly/mat4/fromScaling)) + (export "mat4.fromRotation" (func $export:assembly/mat4/fromRotation)) + (export "mat4.fromXRotation" (func $export:assembly/mat4/fromXRotation)) + (export "mat4.fromYRotation" (func $export:assembly/mat4/fromYRotation)) + (export "mat4.fromZRotation" (func $export:assembly/mat4/fromZRotation)) + (export "mat4.fromRotationTranslation" (func $export:assembly/mat4/fromRotationTranslation)) + (export "mat4.fromQuat2" (func $export:assembly/mat4/fromQuat2)) + (export "mat4.getTranslation" (func $export:assembly/mat4/getTranslation)) + (export "mat4.getScaling" (func $export:assembly/mat4/getScaling)) + (export "mat4.getRotation" (func $export:assembly/mat4/getRotation)) + (export "mat4.decompose" (func $export:assembly/mat4/decompose)) + (export "mat4.fromRotationTranslationScale" (func $export:assembly/mat4/fromRotationTranslationScale)) + (export "mat4.fromRotationTranslationScaleOrigin" (func $export:assembly/mat4/fromRotationTranslationScaleOrigin)) + (export "mat4.fromQuat" (func $export:assembly/mat4/fromQuat)) + (export "mat4.frustum" (func $export:assembly/mat4/frustum)) + (export "mat4.perspectiveNO" (func $export:assembly/mat4/perspectiveNO)) + (export "mat4.perspectiveZO" (func $export:assembly/mat4/perspectiveZO)) + (export "mat4.perspectiveFromFieldOfView" (func $export:assembly/mat4/perspectiveFromFieldOfView)) + (export "mat4.orthoNO" (func $export:assembly/mat4/orthoNO)) + (export "mat4.orthoZO" (func $export:assembly/mat4/orthoZO)) + (export "mat4.lookAt" (func $export:assembly/mat4/lookAt)) + (export "mat4.targetTo" (func $export:assembly/mat4/targetTo)) + (export "mat4.str" (func $export:assembly/mat4/str)) + (export "mat4.frob" (func $export:assembly/mat4/frob)) + (export "mat4.add" (func $export:assembly/mat4/add)) + (export "mat4.subtract" (func $export:assembly/mat4/subtract)) + (export "mat4.multiplyScalar" (func $export:assembly/mat4/multiplyScalar)) + (export "mat4.multiplyScalarAndAdd" (func $export:assembly/mat4/multiplyScalarAndAdd)) + (export "mat4.exactEquals" (func $export:assembly/mat4/exactEquals)) + (export "mat4.equals" (func $export:assembly/mat4/equals)) + (export "quat.identity" (func $export:assembly/quat/identity)) + (export "quat.setAxisAngle" (func $export:assembly/quat/setAxisAngle)) + (export "quat.getAxisAngle" (func $export:assembly/quat/getAxisAngle)) + (export "quat.getAngle" (func $export:assembly/quat/getAngle)) + (export "quat.multiply" (func $export:assembly/quat/multiply)) + (export "quat.rotateX" (func $export:assembly/quat/rotateX)) + (export "quat.rotateY" (func $export:assembly/quat/rotateY)) + (export "quat.rotateZ" (func $export:assembly/quat/rotateZ)) + (export "quat.calculateW" (func $export:assembly/quat/calculateW)) + (export "quat.exp" (func $export:assembly/quat/exp)) + (export "quat.ln" (func $export:assembly/quat/ln)) + (export "quat.pow" (func $export:assembly/quat/pow)) + (export "quat.slerp" (func $export:assembly/quat/slerp)) + (export "quat.random" (func $export:assembly/quat/random)) + (export "quat.invert" (func $export:assembly/quat/invert)) + (export "quat.conjugate" (func $export:assembly/quat/conjugate)) + (export "quat.fromMat3" (func $export:assembly/quat/fromMat3)) + (export "quat.fromEuler" (func $export:assembly/quat/fromEuler@varargs)) + (export "quat.str" (func $export:assembly/quat/str)) + (export "quat.equals" (func $export:assembly/quat/equals)) + (export "quat2.clone" (func $export:assembly/quat2/clone)) + (export "quat2.fromRotationTranslation" (func $export:assembly/quat2/fromRotationTranslation)) + (export "quat2.fromTranslation" (func $export:assembly/quat2/fromTranslation)) + (export "quat2.fromRotation" (func $export:assembly/quat2/fromRotation)) + (export "quat2.fromMat4" (func $export:assembly/quat2/fromMat4)) + (export "quat2.copy" (func $export:assembly/quat2/copy)) + (export "quat2.identity" (func $export:assembly/quat2/identity)) + (export "quat2.set" (func $export:assembly/quat2/set)) + (export "quat2.getDual" (func $export:assembly/quat2/getDual)) + (export "quat2.setDual" (func $export:assembly/quat2/setDual)) + (export "quat2.getTranslation" (func $export:assembly/quat2/getTranslation)) + (export "quat2.translate" (func $export:assembly/quat2/translate)) + (export "quat2.rotateX" (func $export:assembly/quat2/rotateX)) + (export "quat2.rotateY" (func $export:assembly/quat2/rotateY)) + (export "quat2.rotateZ" (func $export:assembly/quat2/rotateZ)) + (export "quat2.rotateByQuatAppend" (func $export:assembly/quat2/rotateByQuatAppend)) + (export "quat2.rotateByQuatPrepend" (func $export:assembly/quat2/rotateByQuatPrepend)) + (export "quat2.rotateAroundAxis" (func $export:assembly/quat2/rotateAroundAxis)) + (export "quat2.add" (func $export:assembly/quat2/add)) + (export "quat2.multiply" (func $export:assembly/quat2/multiply)) + (export "quat2.scale" (func $export:assembly/quat2/scale)) + (export "quat2.lerp" (func $export:assembly/quat2/lerp)) + (export "quat2.invert" (func $export:assembly/quat2/invert)) + (export "quat2.conjugate" (func $export:assembly/quat2/conjugate)) + (export "quat2.normalize" (func $export:assembly/quat2/normalize)) + (export "quat2.str" (func $export:assembly/quat2/str)) + (export "quat2.exactEquals" (func $export:assembly/quat2/exactEquals)) + (export "quat2.equals" (func $export:assembly/quat2/equals)) + (export "vec2.clone" (func $export:assembly/vec2/clone)) + (export "vec2.copy" (func $export:assembly/vec2/copy)) + (export "vec2.set" (func $export:assembly/vec2/set)) + (export "vec2.add" (func $export:assembly/vec2/add)) + (export "vec2.subtract" (func $export:assembly/vec2/subtract)) + (export "vec2.multiply" (func $export:assembly/vec2/multiply)) + (export "vec2.divide" (func $export:assembly/vec2/divide)) + (export "vec2.ceil" (func $export:assembly/vec2/ceil)) + (export "vec2.floor" (func $export:assembly/vec2/floor)) + (export "vec2.min" (func $export:assembly/vec2/min)) + (export "vec2.max" (func $export:assembly/vec2/max)) + (export "vec2.round" (func $export:assembly/vec2/round)) + (export "vec2.scale" (func $export:assembly/vec2/scale)) + (export "vec2.scaleAndAdd" (func $export:assembly/vec2/scaleAndAdd)) + (export "vec2.distance" (func $export:assembly/vec2/distance)) + (export "vec2.squaredDistance" (func $export:assembly/vec2/squaredDistance)) + (export "vec2.length" (func $export:assembly/vec2/length)) + (export "vec2.squaredLength" (func $export:assembly/vec2/squaredLength)) + (export "vec2.negate" (func $export:assembly/vec2/negate)) + (export "vec2.inverse" (func $export:assembly/vec2/inverse)) + (export "vec2.normalize" (func $export:assembly/vec2/normalize)) + (export "vec2.dot" (func $export:assembly/vec2/dot)) + (export "vec2.cross" (func $export:assembly/vec2/cross)) + (export "vec2.lerp" (func $export:assembly/vec2/lerp)) + (export "vec2.random" (func $export:assembly/vec2/random)) + (export "vec2.transformMat2" (func $export:assembly/vec2/transformMat2)) + (export "vec2.transformMat2d" (func $export:assembly/vec2/transformMat2d)) + (export "vec2.transformMat3" (func $export:assembly/vec2/transformMat3)) + (export "vec2.transformMat4" (func $export:assembly/vec2/transformMat4)) + (export "vec2.rotate" (func $export:assembly/vec2/rotate)) + (export "vec2.angle" (func $export:assembly/vec2/angle)) + (export "vec2.zero" (func $export:assembly/vec2/zero)) + (export "vec2.str" (func $export:assembly/vec2/str)) + (export "vec2.exactEquals" (func $export:assembly/vec2/exactEquals)) + (export "vec2.equals" (func $export:assembly/vec2/equals)) + (export "vec3.clone" (func $export:assembly/vec3/clone)) + (export "vec3.length" (func $export:assembly/vec3/length)) + (export "vec3.copy" (func $export:assembly/vec3/copy)) + (export "vec3.set" (func $export:assembly/vec3/set)) + (export "vec3.add" (func $export:assembly/vec3/add)) + (export "vec3.subtract" (func $export:assembly/vec3/subtract)) + (export "vec3.multiply" (func $export:assembly/vec3/multiply)) + (export "vec3.divide" (func $export:assembly/vec3/divide)) + (export "vec3.ceil" (func $export:assembly/vec3/ceil)) + (export "vec3.floor" (func $export:assembly/vec3/floor)) + (export "vec3.min" (func $export:assembly/vec3/min)) + (export "vec3.max" (func $export:assembly/vec3/max)) + (export "vec3.round" (func $export:assembly/vec3/round)) + (export "vec3.scale" (func $export:assembly/vec3/scale)) + (export "vec3.scaleAndAdd" (func $export:assembly/vec3/scaleAndAdd)) + (export "vec3.distance" (func $export:assembly/vec3/distance)) + (export "vec3.squaredDistance" (func $export:assembly/vec3/squaredDistance)) + (export "vec3.squaredLength" (func $export:assembly/vec3/squaredLength)) + (export "vec3.negate" (func $export:assembly/vec3/negate)) + (export "vec3.inverse" (func $export:assembly/vec3/inverse)) + (export "vec3.normalize" (func $export:assembly/vec3/normalize)) + (export "vec3.dot" (func $export:assembly/vec3/dot)) + (export "vec3.cross" (func $export:assembly/vec3/cross)) + (export "vec3.lerp" (func $export:assembly/vec3/lerp)) + (export "vec3.slerp" (func $export:assembly/vec3/slerp)) + (export "vec3.hermite" (func $export:assembly/vec3/hermite)) + (export "vec3.bezier" (func $export:assembly/vec3/bezier)) + (export "vec3.random" (func $export:assembly/vec3/random)) + (export "vec3.transformMat4" (func $export:assembly/vec3/transformMat4)) + (export "vec3.transformMat3" (func $export:assembly/vec3/transformMat3)) + (export "vec3.transformQuat" (func $export:assembly/vec3/transformQuat)) + (export "vec3.rotateX" (func $export:assembly/vec3/rotateX)) + (export "vec3.rotateY" (func $export:assembly/vec3/rotateY)) + (export "vec3.rotateZ" (func $export:assembly/vec3/rotateZ)) + (export "vec3.angle" (func $export:assembly/vec3/angle)) + (export "vec3.zero" (func $export:assembly/vec3/zero)) + (export "vec3.str" (func $export:assembly/vec3/str)) + (export "vec3.exactEquals" (func $export:assembly/vec3/exactEquals)) + (export "vec3.equals" (func $export:assembly/vec3/equals)) + (export "vec4.clone" (func $export:assembly/vec4/clone)) + (export "vec4.copy" (func $export:assembly/vec4/copy)) + (export "vec4.set" (func $export:assembly/vec4/set)) + (export "vec4.add" (func $export:assembly/vec4/add)) + (export "vec4.subtract" (func $export:assembly/vec4/subtract)) + (export "vec4.multiply" (func $export:assembly/vec4/multiply)) + (export "vec4.divide" (func $export:assembly/vec4/divide)) + (export "vec4.ceil" (func $export:assembly/vec4/ceil)) + (export "vec4.floor" (func $export:assembly/vec4/floor)) + (export "vec4.min" (func $export:assembly/vec4/min)) + (export "vec4.max" (func $export:assembly/vec4/max)) + (export "vec4.round" (func $export:assembly/vec4/round)) + (export "vec4.scale" (func $export:assembly/vec4/scale)) + (export "vec4.scaleAndAdd" (func $export:assembly/vec4/scaleAndAdd)) + (export "vec4.distance" (func $export:assembly/vec4/distance)) + (export "vec4.squaredDistance" (func $export:assembly/vec4/squaredDistance)) + (export "vec4.length" (func $export:assembly/vec4/length)) + (export "vec4.squaredLength" (func $export:assembly/vec4/squaredLength)) + (export "vec4.negate" (func $export:assembly/vec4/negate)) + (export "vec4.inverse" (func $export:assembly/vec4/inverse)) + (export "vec4.normalize" (func $export:assembly/vec4/normalize)) + (export "vec4.dot" (func $export:assembly/vec4/dot)) + (export "vec4.cross" (func $export:assembly/vec4/cross)) + (export "vec4.lerp" (func $export:assembly/vec4/lerp)) + (export "vec4.random" (func $export:assembly/vec4/random)) + (export "vec4.transformMat4" (func $export:assembly/vec4/transformMat4)) + (export "vec4.transformQuat" (func $export:assembly/vec4/transformQuat)) + (export "vec4.zero" (func $export:assembly/vec4/zero)) + (export "vec4.str" (func $export:assembly/vec4/str)) + (export "vec4.exactEquals" (func $export:assembly/vec4/exactEquals)) + (export "vec4.equals" (func $export:assembly/vec4/equals)) + (start $~start) + (func $~lib/math/murmurHash3 (param $0 i64) (result i64) + local.get $0 + local.get $0 + i64.const 33 + i64.shr_u + i64.xor + local.set $0 + local.get $0 + i64.const -49064778989728563 + i64.mul + local.set $0 + local.get $0 + local.get $0 + i64.const 33 + i64.shr_u + i64.xor + local.set $0 + local.get $0 + i64.const -4265267296055464877 + i64.mul + local.set $0 + local.get $0 + local.get $0 + i64.const 33 + i64.shr_u + i64.xor + local.set $0 + local.get $0 + ) + (func $~lib/math/splitMix32 (param $0 i32) (result i32) + local.get $0 + i32.const 1831565813 + i32.add + local.set $0 + local.get $0 + local.get $0 + i32.const 15 + i32.shr_u + i32.xor + local.get $0 + i32.const 1 + i32.or + i32.mul + local.set $0 + local.get $0 + local.get $0 + local.get $0 + local.get $0 + i32.const 7 + i32.shr_u + i32.xor + local.get $0 + i32.const 61 + i32.or + i32.mul + i32.add + i32.xor + local.set $0 + local.get $0 + local.get $0 + i32.const 14 + i32.shr_u + i32.xor + ) + (func $~lib/math/NativeMath.seedRandom (param $0 i64) + i32.const 1 + global.set $~lib/math/random_seeded + local.get $0 + call $~lib/math/murmurHash3 + global.set $~lib/math/random_state0_64 + global.get $~lib/math/random_state0_64 + i64.const -1 + i64.xor + call $~lib/math/murmurHash3 + global.set $~lib/math/random_state1_64 + local.get $0 + i32.wrap_i64 + call $~lib/math/splitMix32 + global.set $~lib/math/random_state0_32 + global.get $~lib/math/random_state0_32 + call $~lib/math/splitMix32 + global.set $~lib/math/random_state1_32 + global.get $~lib/math/random_state0_64 + i64.const 0 + i64.ne + if (result i32) + global.get $~lib/math/random_state1_64 + i64.const 0 + i64.ne + else + i32.const 0 + end + if (result i32) + global.get $~lib/math/random_state0_32 + i32.const 0 + i32.ne + else + i32.const 0 + end + if (result i32) + global.get $~lib/math/random_state1_32 + i32.const 0 + i32.ne + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 32 + i32.const 1399 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/math/NativeMath.random (result f64) + (local $0 i64) + (local $1 i64) + (local $2 i64) + global.get $~lib/math/random_seeded + i32.eqz + if + call $~lib/builtins/seed + i64.reinterpret_f64 + call $~lib/math/NativeMath.seedRandom + end + global.get $~lib/math/random_state0_64 + local.set $0 + global.get $~lib/math/random_state1_64 + local.set $1 + local.get $1 + global.set $~lib/math/random_state0_64 + local.get $0 + local.get $0 + i64.const 23 + i64.shl + i64.xor + local.set $0 + local.get $0 + local.get $0 + i64.const 17 + i64.shr_u + i64.xor + local.set $0 + local.get $0 + local.get $1 + i64.xor + local.set $0 + local.get $0 + local.get $1 + i64.const 26 + i64.shr_u + i64.xor + local.set $0 + local.get $0 + global.set $~lib/math/random_state1_64 + local.get $1 + i64.const 12 + i64.shr_u + i64.const 4607182418800017408 + i64.or + local.set $2 + local.get $2 + f64.reinterpret_i64 + f64.const 1 + f64.sub + ) + (func $~lib/typedarray/Float64Array#__get (param $0 i32) (param $1 i32) (result f64) + local.get $1 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.ge_u + if + i32.const 144 + i32.const 208 + i32.const 1374 + i32.const 64 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + f64.load + ) + (func $~lib/typedarray/Float64Array#__set (param $0 i32) (param $1 i32) (param $2 f64) + local.get $1 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.ge_u + if + i32.const 144 + i32.const 208 + i32.const 1385 + i32.const 64 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + local.get $2 + f64.store + ) + (func $assembly/mat2d/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $12 + local.get $2 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $13 + local.get $2 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $14 + local.get $0 + i32.const 0 + local.get $3 + local.get $9 + f64.mul + local.get $5 + local.get $10 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $4 + local.get $9 + f64.mul + local.get $6 + local.get $10 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $3 + local.get $11 + f64.mul + local.get $5 + local.get $12 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $4 + local.get $11 + f64.mul + local.get $6 + local.get $12 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $3 + local.get $13 + f64.mul + local.get $5 + local.get $14 + f64.mul + f64.add + local.get $7 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $4 + local.get $13 + f64.mul + local.get $6 + local.get $14 + f64.mul + f64.add + local.get $8 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat2d/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec3/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec3/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec3/divide (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec3/distance (param $0 i32) (param $1 i32) (result f64) + (local $2 f64) + (local $3 f64) + (local $4 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.sub + local.set $2 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.sub + local.set $3 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.sub + local.set $4 + local.get $2 + local.get $3 + local.get $4 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $assembly/imports/MathUtil.hypot + ) + (func $assembly/vec3/squaredDistance (param $0 i32) (param $1 i32) (result f64) + (local $2 f64) + (local $3 f64) + (local $4 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.sub + local.set $2 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.sub + local.set $3 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.sub + local.set $4 + local.get $2 + local.get $2 + f64.mul + local.get $3 + local.get $3 + f64.mul + f64.add + local.get $4 + local.get $4 + f64.mul + f64.add + ) + (func $assembly/vec3/length (param $0 i32) (result f64) + (local $1 f64) + (local $2 f64) + (local $3 f64) + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $1 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + local.get $2 + local.get $3 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $assembly/imports/MathUtil.hypot + ) + (func $assembly/vec3/squaredLength (param $0 i32) (result f64) + (local $1 f64) + (local $2 f64) + (local $3 f64) + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $1 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + local.get $1 + f64.mul + local.get $2 + local.get $2 + f64.mul + f64.add + local.get $3 + local.get $3 + f64.mul + f64.add + ) + (func $~lib/rt/itcms/Object#set:nextWithColor (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=4 + ) + (func $~lib/rt/itcms/Object#set:prev (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=8 + ) + (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) + local.get $0 + local.get $0 + call $~lib/rt/itcms/Object#set:nextWithColor + local.get $0 + local.get $0 + call $~lib/rt/itcms/Object#set:prev + local.get $0 + ) + (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) + local.get $0 + i32.load offset=4 + i32.const 3 + i32.const -1 + i32.xor + i32.and + ) + (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) + local.get $0 + i32.load offset=4 + i32.const 3 + i32.and + ) + (func $~lib/rt/itcms/visitRoots (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + call $~lib/rt/__visit_globals + global.get $~lib/rt/itcms/pinSpace + local.set $1 + local.get $1 + call $~lib/rt/itcms/Object#get:next + local.set $2 + loop $while-continue|0 + local.get $2 + local.get $1 + i32.ne + local.set $3 + local.get $3 + if + i32.const 1 + drop + local.get $2 + call $~lib/rt/itcms/Object#get:color + i32.const 3 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 736 + i32.const 159 + i32.const 16 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 20 + i32.add + local.get $0 + call $~lib/rt/__visit_members + local.get $2 + call $~lib/rt/itcms/Object#get:next + local.set $2 + br $while-continue|0 + end + end + ) + (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) + local.get $0 + local.get $0 + i32.load offset=4 + i32.const 3 + i32.const -1 + i32.xor + i32.and + local.get $1 + i32.or + call $~lib/rt/itcms/Object#set:nextWithColor + ) + (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + local.get $0 + i32.load offset=4 + i32.const 3 + i32.and + i32.or + call $~lib/rt/itcms/Object#set:nextWithColor + ) + (func $~lib/rt/itcms/Object#unlink (param $0 i32) + (local $1 i32) + (local $2 i32) + local.get $0 + call $~lib/rt/itcms/Object#get:next + local.set $1 + local.get $1 + i32.const 0 + i32.eq + if + i32.const 1 + drop + local.get $0 + i32.load offset=8 + i32.const 0 + i32.eq + if (result i32) + local.get $0 + global.get $~lib/memory/__heap_base + i32.lt_u + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 736 + i32.const 127 + i32.const 18 + call $~lib/builtins/abort + unreachable + end + return + end + local.get $0 + i32.load offset=8 + local.set $2 + i32.const 1 + drop + local.get $2 + i32.eqz + if + i32.const 0 + i32.const 736 + i32.const 131 + i32.const 16 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + call $~lib/rt/itcms/Object#set:prev + local.get $2 + local.get $1 + call $~lib/rt/itcms/Object#set:next + ) + (func $~lib/rt/__typeinfo (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/rt/__rtti_base + local.set $1 + local.get $0 + local.get $1 + i32.load + i32.gt_u + if + i32.const 144 + i32.const 864 + i32.const 22 + i32.const 28 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 4 + i32.add + local.get $0 + i32.const 8 + i32.mul + i32.add + i32.load + ) + (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.load offset=12 + local.set $1 + local.get $1 + i32.const 1 + i32.le_u + if (result i32) + i32.const 1 + else + local.get $1 + call $~lib/rt/__typeinfo + i32.const 32 + i32.and + i32.const 0 + i32.ne + end + ) + (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + local.get $1 + i32.load offset=8 + local.set $3 + local.get $0 + local.get $1 + local.get $2 + i32.or + call $~lib/rt/itcms/Object#set:nextWithColor + local.get $0 + local.get $3 + call $~lib/rt/itcms/Object#set:prev + local.get $3 + local.get $0 + call $~lib/rt/itcms/Object#set:next + local.get $1 + local.get $0 + call $~lib/rt/itcms/Object#set:prev + ) + (func $~lib/rt/itcms/Object#makeGray (param $0 i32) + (local $1 i32) + local.get $0 + global.get $~lib/rt/itcms/iter + i32.eq + if + local.get $0 + i32.load offset=8 + local.tee $1 + i32.eqz + if (result i32) + i32.const 0 + i32.const 736 + i32.const 147 + i32.const 30 + call $~lib/builtins/abort + unreachable + else + local.get $1 + end + global.set $~lib/rt/itcms/iter + end + local.get $0 + call $~lib/rt/itcms/Object#unlink + local.get $0 + global.get $~lib/rt/itcms/toSpace + local.get $0 + call $~lib/rt/itcms/Object#get:isPointerfree + if (result i32) + global.get $~lib/rt/itcms/white + i32.eqz + else + i32.const 2 + end + call $~lib/rt/itcms/Object#linkTo + ) + (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + i32.eqz + if + return + end + local.get $0 + i32.const 20 + i32.sub + local.set $2 + i32.const 0 + drop + local.get $2 + call $~lib/rt/itcms/Object#get:color + global.get $~lib/rt/itcms/white + i32.eq + if + local.get $2 + call $~lib/rt/itcms/Object#makeGray + global.get $~lib/rt/itcms/visitCount + i32.const 1 + i32.add + global.set $~lib/rt/itcms/visitCount + end + ) + (func $~lib/rt/itcms/visitStack (param $0 i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + local.set $1 + loop $while-continue|0 + local.get $1 + global.get $~lib/memory/__heap_base + i32.lt_u + local.set $2 + local.get $2 + if + local.get $1 + i32.load + local.get $0 + call $~lib/rt/itcms/__visit + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $while-continue|0 + end + end + ) + (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + i32.const 4 + local.get $0 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + ) + (func $~lib/rt/tlsf/Root#set:flMap (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store + ) + (func $~lib/rt/common/BLOCK#set:mmInfo (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store + ) + (func $~lib/rt/tlsf/Block#set:prev (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/Block#set:next (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=8 + ) + (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + local.get $1 + i32.load + local.set $2 + i32.const 1 + drop + local.get $2 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 944 + i32.const 273 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 3 + i32.const -1 + i32.xor + i32.and + local.set $3 + i32.const 1 + drop + local.get $3 + i32.const 12 + i32.ge_u + if (result i32) + local.get $3 + i32.const 1073741820 + i32.lt_u + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 944 + i32.const 275 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.const 256 + i32.lt_u + if + i32.const 0 + local.set $4 + local.get $3 + i32.const 4 + i32.shr_u + local.set $5 + else + i32.const 31 + local.get $3 + i32.clz + i32.sub + local.set $4 + local.get $3 + local.get $4 + i32.const 4 + i32.sub + i32.shr_u + i32.const 1 + i32.const 4 + i32.shl + i32.xor + local.set $5 + local.get $4 + i32.const 8 + i32.const 1 + i32.sub + i32.sub + local.set $4 + end + i32.const 1 + drop + local.get $4 + i32.const 23 + i32.lt_u + if (result i32) + local.get $5 + i32.const 16 + i32.lt_u + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 944 + i32.const 288 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load offset=4 + local.set $6 + local.get $1 + i32.load offset=8 + local.set $7 + local.get $6 + if + local.get $6 + local.get $7 + call $~lib/rt/tlsf/Block#set:next + end + local.get $7 + if + local.get $7 + local.get $6 + call $~lib/rt/tlsf/Block#set:prev + end + local.get $1 + local.get $0 + local.set $10 + local.get $4 + local.set $9 + local.get $5 + local.set $8 + local.get $10 + local.get $9 + i32.const 4 + i32.shl + local.get $8 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + i32.eq + if + local.get $0 + local.set $11 + local.get $4 + local.set $10 + local.get $5 + local.set $9 + local.get $7 + local.set $8 + local.get $11 + local.get $10 + i32.const 4 + i32.shl + local.get $9 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $8 + i32.store offset=96 + local.get $7 + i32.eqz + if + local.get $0 + local.set $9 + local.get $4 + local.set $8 + local.get $9 + local.get $8 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + local.set $9 + local.get $0 + local.set $8 + local.get $4 + local.set $11 + local.get $9 + i32.const 1 + local.get $5 + i32.shl + i32.const -1 + i32.xor + i32.and + local.tee $9 + local.set $10 + local.get $8 + local.get $11 + i32.const 2 + i32.shl + i32.add + local.get $10 + i32.store offset=4 + local.get $9 + i32.eqz + if + local.get $0 + local.get $0 + i32.load + i32.const 1 + local.get $4 + i32.shl + i32.const -1 + i32.xor + i32.and + call $~lib/rt/tlsf/Root#set:flMap + end + end + end + ) + (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) + (local $13 i32) + i32.const 1 + drop + local.get $1 + i32.eqz + if + i32.const 0 + i32.const 944 + i32.const 201 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load + local.set $2 + i32.const 1 + drop + local.get $2 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 944 + i32.const 203 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.set $3 + local.get $3 + i32.const 4 + i32.add + local.get $3 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + local.set $4 + local.get $4 + i32.load + local.set $5 + local.get $5 + i32.const 1 + i32.and + if + local.get $2 + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.const 4 + i32.add + local.get $5 + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + local.set $3 + local.get $3 + i32.const 1073741820 + i32.lt_u + if + local.get $0 + local.get $4 + call $~lib/rt/tlsf/removeBlock + local.get $1 + local.get $2 + i32.const 3 + i32.and + local.get $3 + i32.or + local.tee $2 + call $~lib/rt/common/BLOCK#set:mmInfo + local.get $1 + local.set $6 + local.get $6 + i32.const 4 + i32.add + local.get $6 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + local.set $4 + local.get $4 + i32.load + local.set $5 + end + end + local.get $2 + i32.const 2 + i32.and + if + local.get $1 + local.set $6 + local.get $6 + i32.const 4 + i32.sub + i32.load + local.set $6 + local.get $6 + i32.load + local.set $3 + i32.const 1 + drop + local.get $3 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 944 + i32.const 224 + i32.const 16 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.const 4 + i32.add + local.get $2 + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + local.set $7 + local.get $7 + i32.const 1073741820 + i32.lt_u + if + local.get $0 + local.get $6 + call $~lib/rt/tlsf/removeBlock + local.get $6 + local.get $3 + i32.const 3 + i32.and + local.get $7 + i32.or + local.tee $2 + call $~lib/rt/common/BLOCK#set:mmInfo + local.get $6 + local.set $1 + end + end + local.get $4 + local.get $5 + i32.const 2 + i32.or + call $~lib/rt/common/BLOCK#set:mmInfo + local.get $2 + i32.const 3 + i32.const -1 + i32.xor + i32.and + local.set $8 + i32.const 1 + drop + local.get $8 + i32.const 12 + i32.ge_u + if (result i32) + local.get $8 + i32.const 1073741820 + i32.lt_u + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 944 + i32.const 239 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + i32.const 1 + drop + local.get $1 + i32.const 4 + i32.add + local.get $8 + i32.add + local.get $4 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 944 + i32.const 240 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $4 + i32.const 4 + i32.sub + local.get $1 + i32.store + local.get $8 + i32.const 256 + i32.lt_u + if + i32.const 0 + local.set $9 + local.get $8 + i32.const 4 + i32.shr_u + local.set $10 + else + i32.const 31 + local.get $8 + i32.clz + i32.sub + local.set $9 + local.get $8 + local.get $9 + i32.const 4 + i32.sub + i32.shr_u + i32.const 1 + i32.const 4 + i32.shl + i32.xor + local.set $10 + local.get $9 + i32.const 8 + i32.const 1 + i32.sub + i32.sub + local.set $9 + end + i32.const 1 + drop + local.get $9 + i32.const 23 + i32.lt_u + if (result i32) + local.get $10 + i32.const 16 + i32.lt_u + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 944 + i32.const 256 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.set $7 + local.get $9 + local.set $3 + local.get $10 + local.set $6 + local.get $7 + local.get $3 + i32.const 4 + i32.shl + local.get $6 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + local.set $11 + local.get $1 + i32.const 0 + call $~lib/rt/tlsf/Block#set:prev + local.get $1 + local.get $11 + call $~lib/rt/tlsf/Block#set:next + local.get $11 + if + local.get $11 + local.get $1 + call $~lib/rt/tlsf/Block#set:prev + end + local.get $0 + local.set $12 + local.get $9 + local.set $7 + local.get $10 + local.set $3 + local.get $1 + local.set $6 + local.get $12 + local.get $7 + i32.const 4 + i32.shl + local.get $3 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $6 + i32.store offset=96 + local.get $0 + local.get $0 + i32.load + i32.const 1 + local.get $9 + i32.shl + i32.or + call $~lib/rt/tlsf/Root#set:flMap + local.get $0 + local.set $13 + local.get $9 + local.set $12 + local.get $0 + local.set $3 + local.get $9 + local.set $6 + local.get $3 + local.get $6 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + i32.const 1 + local.get $10 + i32.shl + i32.or + local.set $7 + local.get $13 + local.get $12 + i32.const 2 + i32.shl + i32.add + local.get $7 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + i32.const 1 + drop + local.get $1 + local.get $2 + i32.le_u + i32.eqz + if + i32.const 0 + i32.const 944 + i32.const 381 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 4 + i32.add + i32.const 15 + i32.add + i32.const 15 + i32.const -1 + i32.xor + i32.and + i32.const 4 + i32.sub + local.set $1 + local.get $2 + i32.const 15 + i32.const -1 + i32.xor + i32.and + local.set $2 + local.get $0 + local.set $3 + local.get $3 + i32.load offset=1568 + local.set $4 + i32.const 0 + local.set $5 + local.get $4 + if + i32.const 1 + drop + local.get $1 + local.get $4 + i32.const 4 + i32.add + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 944 + i32.const 388 + i32.const 16 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 16 + i32.sub + local.get $4 + i32.eq + if + local.get $1 + i32.const 16 + i32.sub + local.set $1 + local.get $4 + i32.load + local.set $5 + else + nop + end + else + i32.const 1 + drop + local.get $1 + local.get $0 + i32.const 1572 + i32.add + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 944 + i32.const 401 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + end + local.get $2 + local.get $1 + i32.sub + local.set $6 + local.get $6 + i32.const 4 + i32.const 12 + i32.add + i32.const 4 + i32.add + i32.lt_u + if + i32.const 0 + return + end + local.get $6 + i32.const 2 + i32.const 4 + i32.mul + i32.sub + local.set $7 + local.get $1 + local.set $8 + local.get $8 + local.get $7 + i32.const 1 + i32.or + local.get $5 + i32.const 2 + i32.and + i32.or + call $~lib/rt/common/BLOCK#set:mmInfo + local.get $8 + i32.const 0 + call $~lib/rt/tlsf/Block#set:prev + local.get $8 + i32.const 0 + call $~lib/rt/tlsf/Block#set:next + local.get $1 + i32.const 4 + i32.add + local.get $7 + i32.add + local.set $4 + local.get $4 + i32.const 0 + i32.const 2 + i32.or + call $~lib/rt/common/BLOCK#set:mmInfo + local.get $0 + local.set $9 + local.get $4 + local.set $3 + local.get $9 + local.get $3 + i32.store offset=1568 + local.get $0 + local.get $8 + call $~lib/rt/tlsf/insertBlock + i32.const 1 + ) + (func $~lib/rt/tlsf/initialize + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) + i32.const 0 + drop + global.get $~lib/memory/__heap_base + i32.const 15 + i32.add + i32.const 15 + i32.const -1 + i32.xor + i32.and + local.set $0 + memory.size + local.set $1 + local.get $0 + i32.const 1572 + i32.add + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $2 + local.get $2 + local.get $1 + i32.gt_s + if (result i32) + local.get $2 + local.get $1 + i32.sub + memory.grow + i32.const 0 + i32.lt_s + else + i32.const 0 + end + if + unreachable + end + local.get $0 + local.set $3 + local.get $3 + i32.const 0 + call $~lib/rt/tlsf/Root#set:flMap + local.get $3 + local.set $5 + i32.const 0 + local.set $4 + local.get $5 + local.get $4 + i32.store offset=1568 + i32.const 0 + local.set $5 + loop $for-loop|0 + local.get $5 + i32.const 23 + i32.lt_u + local.set $4 + local.get $4 + if + local.get $3 + local.set $8 + local.get $5 + local.set $7 + i32.const 0 + local.set $6 + local.get $8 + local.get $7 + i32.const 2 + i32.shl + i32.add + local.get $6 + i32.store offset=4 + i32.const 0 + local.set $8 + loop $for-loop|1 + local.get $8 + i32.const 16 + i32.lt_u + local.set $7 + local.get $7 + if + local.get $3 + local.set $11 + local.get $5 + local.set $10 + local.get $8 + local.set $9 + i32.const 0 + local.set $6 + local.get $11 + local.get $10 + i32.const 4 + i32.shl + local.get $9 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $6 + i32.store offset=96 + local.get $8 + i32.const 1 + i32.add + local.set $8 + br $for-loop|1 + end + end + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|0 + end + end + local.get $0 + i32.const 1572 + i32.add + local.set $12 + i32.const 0 + drop + local.get $3 + local.get $12 + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + drop + local.get $3 + global.set $~lib/rt/tlsf/ROOT + ) + (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.const 4 + i32.sub + local.set $1 + local.get $0 + i32.const 0 + i32.ne + if (result i32) + local.get $0 + i32.const 15 + i32.and + i32.eqz + else + i32.const 0 + end + if (result i32) + local.get $1 + i32.load + i32.const 1 + i32.and + i32.eqz + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 944 + i32.const 565 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + ) + (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + i32.const 0 + drop + local.get $1 + local.get $1 + i32.load + i32.const 1 + i32.or + call $~lib/rt/common/BLOCK#set:mmInfo + local.get $0 + local.get $1 + call $~lib/rt/tlsf/insertBlock + ) + (func $~lib/rt/tlsf/__free (param $0 i32) + local.get $0 + global.get $~lib/memory/__heap_base + i32.lt_u + if + return + end + global.get $~lib/rt/tlsf/ROOT + i32.eqz + if + call $~lib/rt/tlsf/initialize + end + global.get $~lib/rt/tlsf/ROOT + local.get $0 + call $~lib/rt/tlsf/checkUsedBlock + call $~lib/rt/tlsf/freeBlock + ) + (func $~lib/rt/itcms/free (param $0 i32) + local.get $0 + global.get $~lib/memory/__heap_base + i32.lt_u + if + local.get $0 + i32.const 0 + call $~lib/rt/itcms/Object#set:nextWithColor + local.get $0 + i32.const 0 + call $~lib/rt/itcms/Object#set:prev + else + global.get $~lib/rt/itcms/total + local.get $0 + call $~lib/rt/itcms/Object#get:size + i32.sub + global.set $~lib/rt/itcms/total + i32.const 0 + drop + local.get $0 + i32.const 4 + i32.add + call $~lib/rt/tlsf/__free + end + ) + (func $~lib/rt/itcms/step (result i32) + (local $0 i32) + (local $1 i32) + (local $2 i32) + block $break|0 + block $case2|0 + block $case1|0 + block $case0|0 + global.get $~lib/rt/itcms/state + local.set $1 + local.get $1 + i32.const 0 + i32.eq + br_if $case0|0 + local.get $1 + i32.const 1 + i32.eq + br_if $case1|0 + local.get $1 + i32.const 2 + i32.eq + br_if $case2|0 + br $break|0 + end + i32.const 1 + global.set $~lib/rt/itcms/state + i32.const 0 + global.set $~lib/rt/itcms/visitCount + i32.const 0 + call $~lib/rt/itcms/visitRoots + global.get $~lib/rt/itcms/toSpace + global.set $~lib/rt/itcms/iter + global.get $~lib/rt/itcms/visitCount + i32.const 1 + i32.mul + return + end + global.get $~lib/rt/itcms/white + i32.eqz + local.set $1 + global.get $~lib/rt/itcms/iter + call $~lib/rt/itcms/Object#get:next + local.set $0 + loop $while-continue|1 + local.get $0 + global.get $~lib/rt/itcms/toSpace + i32.ne + local.set $2 + local.get $2 + if + local.get $0 + global.set $~lib/rt/itcms/iter + local.get $0 + call $~lib/rt/itcms/Object#get:color + local.get $1 + i32.ne + if + local.get $0 + local.get $1 + call $~lib/rt/itcms/Object#set:color + i32.const 0 + global.set $~lib/rt/itcms/visitCount + local.get $0 + i32.const 20 + i32.add + i32.const 0 + call $~lib/rt/__visit_members + global.get $~lib/rt/itcms/visitCount + i32.const 1 + i32.mul + return + end + local.get $0 + call $~lib/rt/itcms/Object#get:next + local.set $0 + br $while-continue|1 + end + end + i32.const 0 + global.set $~lib/rt/itcms/visitCount + i32.const 0 + call $~lib/rt/itcms/visitRoots + global.get $~lib/rt/itcms/iter + call $~lib/rt/itcms/Object#get:next + local.set $0 + local.get $0 + global.get $~lib/rt/itcms/toSpace + i32.eq + if + i32.const 0 + call $~lib/rt/itcms/visitStack + global.get $~lib/rt/itcms/iter + call $~lib/rt/itcms/Object#get:next + local.set $0 + loop $while-continue|2 + local.get $0 + global.get $~lib/rt/itcms/toSpace + i32.ne + local.set $2 + local.get $2 + if + local.get $0 + call $~lib/rt/itcms/Object#get:color + local.get $1 + i32.ne + if + local.get $0 + local.get $1 + call $~lib/rt/itcms/Object#set:color + local.get $0 + i32.const 20 + i32.add + i32.const 0 + call $~lib/rt/__visit_members + end + local.get $0 + call $~lib/rt/itcms/Object#get:next + local.set $0 + br $while-continue|2 + end + end + global.get $~lib/rt/itcms/fromSpace + local.set $2 + global.get $~lib/rt/itcms/toSpace + global.set $~lib/rt/itcms/fromSpace + local.get $2 + global.set $~lib/rt/itcms/toSpace + local.get $1 + global.set $~lib/rt/itcms/white + local.get $2 + call $~lib/rt/itcms/Object#get:next + global.set $~lib/rt/itcms/iter + i32.const 2 + global.set $~lib/rt/itcms/state + end + global.get $~lib/rt/itcms/visitCount + i32.const 1 + i32.mul + return + end + global.get $~lib/rt/itcms/iter + local.set $0 + local.get $0 + global.get $~lib/rt/itcms/toSpace + i32.ne + if + local.get $0 + call $~lib/rt/itcms/Object#get:next + global.set $~lib/rt/itcms/iter + i32.const 1 + drop + local.get $0 + call $~lib/rt/itcms/Object#get:color + global.get $~lib/rt/itcms/white + i32.eqz + i32.eq + i32.eqz + if + i32.const 0 + i32.const 736 + i32.const 228 + i32.const 20 + call $~lib/builtins/abort + unreachable + end + local.get $0 + call $~lib/rt/itcms/free + i32.const 10 + return + end + global.get $~lib/rt/itcms/toSpace + global.get $~lib/rt/itcms/toSpace + call $~lib/rt/itcms/Object#set:nextWithColor + global.get $~lib/rt/itcms/toSpace + global.get $~lib/rt/itcms/toSpace + call $~lib/rt/itcms/Object#set:prev + i32.const 0 + global.set $~lib/rt/itcms/state + br $break|0 + end + i32.const 0 + ) + (func $~lib/rt/itcms/interrupt + (local $0 i32) + (local $1 i32) + i32.const 0 + drop + i32.const 0 + drop + i32.const 1024 + i32.const 200 + i32.mul + i32.const 100 + i32.div_u + local.set $0 + loop $do-continue|0 + local.get $0 + call $~lib/rt/itcms/step + i32.sub + local.set $0 + global.get $~lib/rt/itcms/state + i32.const 0 + i32.eq + if + i32.const 0 + drop + global.get $~lib/rt/itcms/total + i64.extend_i32_u + i64.const 200 + i64.mul + i64.const 100 + i64.div_u + i32.wrap_i64 + i32.const 1024 + i32.add + global.set $~lib/rt/itcms/threshold + i32.const 0 + drop + return + end + local.get $0 + i32.const 0 + i32.gt_s + local.set $1 + local.get $1 + br_if $do-continue|0 + end + i32.const 0 + drop + global.get $~lib/rt/itcms/total + i32.const 1024 + global.get $~lib/rt/itcms/total + global.get $~lib/rt/itcms/threshold + i32.sub + i32.const 1024 + i32.lt_u + i32.mul + i32.add + global.set $~lib/rt/itcms/threshold + i32.const 0 + drop + ) + (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) + local.get $0 + i32.const 12 + i32.le_u + if (result i32) + i32.const 12 + else + local.get $0 + i32.const 4 + i32.add + i32.const 15 + i32.add + i32.const 15 + i32.const -1 + i32.xor + i32.and + i32.const 4 + i32.sub + end + ) + (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) + local.get $0 + i32.const 1073741820 + i32.ge_u + if + i32.const 672 + i32.const 944 + i32.const 462 + i32.const 30 + call $~lib/builtins/abort + unreachable + end + local.get $0 + call $~lib/rt/tlsf/computeSize + ) + (func $~lib/rt/tlsf/searchBlock (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + local.get $1 + i32.const 256 + i32.lt_u + if + i32.const 0 + local.set $2 + local.get $1 + i32.const 4 + i32.shr_u + local.set $3 + else + local.get $1 + i32.const 536870910 + i32.lt_u + if (result i32) + local.get $1 + i32.const 1 + i32.const 27 + local.get $1 + i32.clz + i32.sub + i32.shl + i32.add + i32.const 1 + i32.sub + else + local.get $1 + end + local.set $4 + i32.const 31 + local.get $4 + i32.clz + i32.sub + local.set $2 + local.get $4 + local.get $2 + i32.const 4 + i32.sub + i32.shr_u + i32.const 1 + i32.const 4 + i32.shl + i32.xor + local.set $3 + local.get $2 + i32.const 8 + i32.const 1 + i32.sub + i32.sub + local.set $2 + end + i32.const 1 + drop + local.get $2 + i32.const 23 + i32.lt_u + if (result i32) + local.get $3 + i32.const 16 + i32.lt_u + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 944 + i32.const 334 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.set $5 + local.get $2 + local.set $4 + local.get $5 + local.get $4 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + i32.const 0 + i32.const -1 + i32.xor + local.get $3 + i32.shl + i32.and + local.set $6 + i32.const 0 + local.set $7 + local.get $6 + i32.eqz + if + local.get $0 + i32.load + i32.const 0 + i32.const -1 + i32.xor + local.get $2 + i32.const 1 + i32.add + i32.shl + i32.and + local.set $5 + local.get $5 + i32.eqz + if + i32.const 0 + local.set $7 + else + local.get $5 + i32.ctz + local.set $2 + local.get $0 + local.set $8 + local.get $2 + local.set $4 + local.get $8 + local.get $4 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + local.set $6 + i32.const 1 + drop + local.get $6 + i32.eqz + if + i32.const 0 + i32.const 944 + i32.const 347 + i32.const 18 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.set $9 + local.get $2 + local.set $8 + local.get $6 + i32.ctz + local.set $4 + local.get $9 + local.get $8 + i32.const 4 + i32.shl + local.get $4 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + local.set $7 + end + else + local.get $0 + local.set $9 + local.get $2 + local.set $8 + local.get $6 + i32.ctz + local.set $4 + local.get $9 + local.get $8 + i32.const 4 + i32.shl + local.get $4 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + local.set $7 + end + local.get $7 + ) + (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + i32.const 0 + drop + local.get $1 + i32.const 536870910 + i32.lt_u + if + local.get $1 + i32.const 1 + i32.const 27 + local.get $1 + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + i32.add + local.set $1 + end + memory.size + local.set $2 + local.get $1 + i32.const 4 + local.get $2 + i32.const 16 + i32.shl + i32.const 4 + i32.sub + local.get $0 + local.set $3 + local.get $3 + i32.load offset=1568 + i32.ne + i32.shl + i32.add + local.set $1 + local.get $1 + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $4 + local.get $2 + local.tee $3 + local.get $4 + local.tee $5 + local.get $3 + local.get $5 + i32.gt_s + select + local.set $6 + local.get $6 + memory.grow + i32.const 0 + i32.lt_s + if + local.get $4 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + memory.size + local.set $7 + local.get $0 + local.get $2 + i32.const 16 + i32.shl + local.get $7 + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + drop + ) + (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $1 + i32.load + local.set $3 + i32.const 1 + drop + local.get $2 + i32.const 4 + i32.add + i32.const 15 + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 944 + i32.const 361 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.const 3 + i32.const -1 + i32.xor + i32.and + local.get $2 + i32.sub + local.set $4 + local.get $4 + i32.const 4 + i32.const 12 + i32.add + i32.ge_u + if + local.get $1 + local.get $2 + local.get $3 + i32.const 2 + i32.and + i32.or + call $~lib/rt/common/BLOCK#set:mmInfo + local.get $1 + i32.const 4 + i32.add + local.get $2 + i32.add + local.set $5 + local.get $5 + local.get $4 + i32.const 4 + i32.sub + i32.const 1 + i32.or + call $~lib/rt/common/BLOCK#set:mmInfo + local.get $0 + local.get $5 + call $~lib/rt/tlsf/insertBlock + else + local.get $1 + local.get $3 + i32.const 1 + i32.const -1 + i32.xor + i32.and + call $~lib/rt/common/BLOCK#set:mmInfo + local.get $1 + local.set $5 + local.get $5 + i32.const 4 + i32.add + local.get $5 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + local.get $1 + local.set $5 + local.get $5 + i32.const 4 + i32.add + local.get $5 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + i32.load + i32.const 2 + i32.const -1 + i32.xor + i32.and + call $~lib/rt/common/BLOCK#set:mmInfo + end + ) + (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $1 + call $~lib/rt/tlsf/prepareSize + local.set $2 + local.get $0 + local.get $2 + call $~lib/rt/tlsf/searchBlock + local.set $3 + local.get $3 + i32.eqz + if + local.get $0 + local.get $2 + call $~lib/rt/tlsf/growMemory + local.get $0 + local.get $2 + call $~lib/rt/tlsf/searchBlock + local.set $3 + i32.const 1 + drop + local.get $3 + i32.eqz + if + i32.const 0 + i32.const 944 + i32.const 500 + i32.const 16 + call $~lib/builtins/abort + unreachable + end + end + i32.const 1 + drop + local.get $3 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + local.get $2 + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 944 + i32.const 502 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $3 + call $~lib/rt/tlsf/removeBlock + local.get $0 + local.get $3 + local.get $2 + call $~lib/rt/tlsf/prepareBlock + i32.const 0 + drop + local.get $3 + ) + (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + global.get $~lib/rt/tlsf/ROOT + i32.eqz + if + call $~lib/rt/tlsf/initialize + end + global.get $~lib/rt/tlsf/ROOT + local.get $0 + call $~lib/rt/tlsf/allocateBlock + i32.const 4 + i32.add + ) + (func $~lib/rt/itcms/Object#set:rtId (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=12 + ) + (func $~lib/rt/itcms/Object#set:rtSize (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=16 + ) + (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i64) + (local $10 i32) + block $~lib/util/memory/memset|inlined.0 + local.get $0 + local.set $5 + local.get $1 + local.set $4 + local.get $2 + local.set $3 + i32.const 0 + i32.const 1 + i32.gt_s + drop + local.get $3 + i32.eqz + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $5 + local.get $3 + i32.add + i32.const 4 + i32.sub + local.set $6 + local.get $5 + local.get $4 + i32.store8 + local.get $6 + local.get $4 + i32.store8 offset=3 + local.get $3 + i32.const 2 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $5 + local.get $4 + i32.store8 offset=1 + local.get $5 + local.get $4 + i32.store8 offset=2 + local.get $6 + local.get $4 + i32.store8 offset=2 + local.get $6 + local.get $4 + i32.store8 offset=1 + local.get $3 + i32.const 6 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $5 + local.get $4 + i32.store8 offset=3 + local.get $6 + local.get $4 + i32.store8 + local.get $3 + i32.const 8 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + i32.const 0 + local.get $5 + i32.sub + i32.const 3 + i32.and + local.set $7 + local.get $5 + local.get $7 + i32.add + local.set $5 + local.get $3 + local.get $7 + i32.sub + local.set $3 + local.get $3 + i32.const -4 + i32.and + local.set $3 + i32.const -1 + i32.const 255 + i32.div_u + local.get $4 + i32.const 255 + i32.and + i32.mul + local.set $8 + local.get $5 + local.get $3 + i32.add + i32.const 28 + i32.sub + local.set $6 + local.get $5 + local.get $8 + i32.store + local.get $6 + local.get $8 + i32.store offset=24 + local.get $3 + i32.const 8 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $5 + local.get $8 + i32.store offset=4 + local.get $5 + local.get $8 + i32.store offset=8 + local.get $6 + local.get $8 + i32.store offset=16 + local.get $6 + local.get $8 + i32.store offset=20 + local.get $3 + i32.const 24 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $5 + local.get $8 + i32.store offset=12 + local.get $5 + local.get $8 + i32.store offset=16 + local.get $5 + local.get $8 + i32.store offset=20 + local.get $5 + local.get $8 + i32.store offset=24 + local.get $6 + local.get $8 + i32.store + local.get $6 + local.get $8 + i32.store offset=4 + local.get $6 + local.get $8 + i32.store offset=8 + local.get $6 + local.get $8 + i32.store offset=12 + i32.const 24 + local.get $5 + i32.const 4 + i32.and + i32.add + local.set $7 + local.get $5 + local.get $7 + i32.add + local.set $5 + local.get $3 + local.get $7 + i32.sub + local.set $3 + local.get $8 + i64.extend_i32_u + local.get $8 + i64.extend_i32_u + i64.const 32 + i64.shl + i64.or + local.set $9 + loop $while-continue|0 + local.get $3 + i32.const 32 + i32.ge_u + local.set $10 + local.get $10 + if + local.get $5 + local.get $9 + i64.store + local.get $5 + local.get $9 + i64.store offset=8 + local.get $5 + local.get $9 + i64.store offset=16 + local.get $5 + local.get $9 + i64.store offset=24 + local.get $3 + i32.const 32 + i32.sub + local.set $3 + local.get $5 + i32.const 32 + i32.add + local.set $5 + br $while-continue|0 + end + end + end + ) + (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $0 + i32.const 1073741804 + i32.ge_u + if + i32.const 672 + i32.const 736 + i32.const 260 + i32.const 31 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/rt/itcms/total + global.get $~lib/rt/itcms/threshold + i32.ge_u + if + call $~lib/rt/itcms/interrupt + end + i32.const 16 + local.get $0 + i32.add + call $~lib/rt/tlsf/__alloc + i32.const 4 + i32.sub + local.set $2 + local.get $2 + local.get $1 + call $~lib/rt/itcms/Object#set:rtId + local.get $2 + local.get $0 + call $~lib/rt/itcms/Object#set:rtSize + local.get $2 + global.get $~lib/rt/itcms/fromSpace + global.get $~lib/rt/itcms/white + call $~lib/rt/itcms/Object#linkTo + global.get $~lib/rt/itcms/total + local.get $2 + call $~lib/rt/itcms/Object#get:size + i32.add + global.set $~lib/rt/itcms/total + local.get $2 + i32.const 20 + i32.add + local.set $3 + local.get $3 + i32.const 0 + local.get $0 + call $~lib/memory/memory.fill + local.get $3 + ) + (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $1 + i32.eqz + if + return + end + i32.const 1 + drop + local.get $0 + i32.eqz + if + i32.const 0 + i32.const 736 + i32.const 294 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 20 + i32.sub + local.set $3 + local.get $3 + call $~lib/rt/itcms/Object#get:color + global.get $~lib/rt/itcms/white + i32.eq + if + local.get $0 + i32.const 20 + i32.sub + local.set $4 + local.get $4 + call $~lib/rt/itcms/Object#get:color + local.set $5 + local.get $5 + global.get $~lib/rt/itcms/white + i32.eqz + i32.eq + if + local.get $2 + if + local.get $4 + call $~lib/rt/itcms/Object#makeGray + else + local.get $3 + call $~lib/rt/itcms/Object#makeGray + end + else + local.get $5 + i32.const 3 + i32.eq + if (result i32) + global.get $~lib/rt/itcms/state + i32.const 1 + i32.eq + else + i32.const 0 + end + if + local.get $3 + call $~lib/rt/itcms/Object#makeGray + end + end + end + ) + (func $~lib/arraybuffer/ArrayBufferView#set:buffer (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store + local.get $0 + local.get $1 + i32.const 0 + call $~lib/rt/itcms/__link + ) + (func $~lib/arraybuffer/ArrayBufferView#set:dataStart (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=4 + ) + (func $~lib/arraybuffer/ArrayBufferView#set:byteLength (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=8 + ) + (func $~lib/typedarray/Float64Array#get:length (param $0 i32) (result i32) + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + ) + (func $assembly/vec3/forEach (result i32) + i32.const 1008 + ) + (func $start:assembly/vec3 + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold + i32.const 784 + call $~lib/rt/itcms/initLazy + global.set $~lib/rt/itcms/pinSpace + i32.const 816 + call $~lib/rt/itcms/initLazy + global.set $~lib/rt/itcms/toSpace + i32.const 896 + call $~lib/rt/itcms/initLazy + global.set $~lib/rt/itcms/fromSpace + call $assembly/vec3/create + global.set $assembly/vec3/vec + call $assembly/vec3/forEach + drop + ) + (func $assembly/vec4/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec4/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec4/divide (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec4/distance (param $0 i32) (param $1 i32) (result f64) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.sub + local.set $2 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.sub + local.set $3 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.sub + local.set $4 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.sub + local.set $5 + local.get $2 + local.get $3 + local.get $4 + local.get $5 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $assembly/imports/MathUtil.hypot + ) + (func $assembly/vec4/squaredDistance (param $0 i32) (param $1 i32) (result f64) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.sub + local.set $2 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.sub + local.set $3 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.sub + local.set $4 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.sub + local.set $5 + local.get $2 + local.get $2 + f64.mul + local.get $3 + local.get $3 + f64.mul + f64.add + local.get $4 + local.get $4 + f64.mul + f64.add + local.get $5 + local.get $5 + f64.mul + f64.add + ) + (func $assembly/vec4/length (param $0 i32) (result f64) + (local $1 f64) + (local $2 f64) + (local $3 f64) + (local $4 f64) + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $1 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + local.get $2 + local.get $3 + local.get $4 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $assembly/imports/MathUtil.hypot + ) + (func $assembly/vec4/squaredLength (param $0 i32) (result f64) + (local $1 f64) + (local $2 f64) + (local $3 f64) + (local $4 f64) + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $1 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + local.get $1 + f64.mul + local.get $2 + local.get $2 + f64.mul + f64.add + local.get $3 + local.get $3 + f64.mul + f64.add + local.get $4 + local.get $4 + f64.mul + f64.add + ) + (func $assembly/vec4/forEach (result i32) + i32.const 1264 + ) + (func $start:assembly/vec4 + call $assembly/vec4/create + global.set $assembly/vec4/vec + call $assembly/vec4/forEach + drop + ) + (func $assembly/vec4/copy (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec4/set (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (result i32) + local.get $0 + i32.const 0 + local.get $1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $2 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $3 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $4 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec4/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/quat/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $0 + i32.const 0 + local.get $3 + local.get $10 + f64.mul + local.get $6 + local.get $7 + f64.mul + f64.add + local.get $4 + local.get $9 + f64.mul + f64.add + local.get $5 + local.get $8 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $4 + local.get $10 + f64.mul + local.get $6 + local.get $8 + f64.mul + f64.add + local.get $5 + local.get $7 + f64.mul + f64.add + local.get $3 + local.get $9 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $5 + local.get $10 + f64.mul + local.get $6 + local.get $9 + f64.mul + f64.add + local.get $3 + local.get $8 + f64.mul + f64.add + local.get $4 + local.get $7 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $6 + local.get $10 + f64.mul + local.get $3 + local.get $7 + f64.mul + f64.sub + local.get $4 + local.get $8 + f64.mul + f64.sub + local.get $5 + local.get $9 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec4/scale (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec4/dot (param $0 i32) (param $1 i32) (result f64) + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.mul + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.add + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.add + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.add + ) + (func $assembly/vec4/lerp (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $0 + i32.const 0 + local.get $4 + local.get $3 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.sub + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $5 + local.get $3 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.sub + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $6 + local.get $3 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $6 + f64.sub + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $7 + local.get $3 + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $7 + f64.sub + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec4/normalize (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $2 + local.get $2 + f64.mul + local.get $3 + local.get $3 + f64.mul + f64.add + local.get $4 + local.get $4 + f64.mul + f64.add + local.get $5 + local.get $5 + f64.mul + f64.add + local.set $6 + local.get $6 + f64.const 0 + f64.gt + if + f64.const 1 + local.get $6 + local.set $7 + local.get $7 + f64.sqrt + f64.div + local.set $6 + end + local.get $0 + i32.const 0 + local.get $2 + local.get $6 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $3 + local.get $6 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $4 + local.get $6 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $5 + local.get $6 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec4/exactEquals (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.eq + if (result i32) + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + ) + (func $assembly/vec3/dot (param $0 i32) (param $1 i32) (result f64) + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.mul + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.add + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.add + ) + (func $assembly/vec3/cross (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $0 + i32.const 0 + local.get $4 + local.get $8 + f64.mul + local.get $5 + local.get $7 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $5 + local.get $6 + f64.mul + local.get $3 + local.get $8 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $3 + local.get $7 + f64.mul + local.get $4 + local.get $6 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec3/normalize (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $2 + local.get $2 + f64.mul + local.get $3 + local.get $3 + f64.mul + f64.add + local.get $4 + local.get $4 + f64.mul + f64.add + local.set $5 + local.get $5 + f64.const 0 + f64.gt + if + f64.const 1 + local.get $5 + local.set $6 + local.get $6 + f64.sqrt + f64.div + local.set $5 + end + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $~lib/math/pio2_large_quot (param $0 f64) (param $1 i64) (result i32) + (local $2 i64) + (local $3 i64) + (local $4 i64) + (local $5 i32) + (local $6 i64) + (local $7 i64) + (local $8 i64) + (local $9 i64) + (local $10 i64) + (local $11 i64) + (local $12 i64) + (local $13 i64) + (local $14 i64) + (local $15 i64) + (local $16 i64) + (local $17 i64) + (local $18 i64) + (local $19 i64) + (local $20 i64) + (local $21 i64) + (local $22 i64) + (local $23 i64) + (local $24 i64) + (local $25 i64) + (local $26 i64) + (local $27 i64) + (local $28 i64) + (local $29 i64) + (local $30 i64) + (local $31 i64) + (local $32 i64) + (local $33 i64) + (local $34 i64) + (local $35 i64) + (local $36 f64) + local.get $1 + i64.const 9223372036854775807 + i64.and + local.set $2 + local.get $2 + i64.const 52 + i64.shr_s + i64.const 1045 + i64.sub + local.set $3 + local.get $3 + i64.const 63 + i64.and + local.set $4 + i32.const 1632 + local.get $3 + i64.const 6 + i64.shr_s + i32.wrap_i64 + i32.const 3 + i32.shl + i32.add + local.set $5 + local.get $5 + i64.load + local.set $9 + local.get $5 + i64.load offset=8 + local.set $10 + local.get $5 + i64.load offset=16 + local.set $11 + local.get $4 + i64.const 0 + i64.ne + if + i32.const 64 + i64.extend_i32_s + local.get $4 + i64.sub + local.set $12 + local.get $5 + i64.load offset=24 + local.set $13 + local.get $10 + local.get $12 + i64.shr_u + local.get $9 + local.get $4 + i64.shl + i64.or + local.set $6 + local.get $11 + local.get $12 + i64.shr_u + local.get $10 + local.get $4 + i64.shl + i64.or + local.set $7 + local.get $13 + local.get $12 + i64.shr_u + local.get $11 + local.get $4 + i64.shl + i64.or + local.set $8 + else + local.get $9 + local.set $6 + local.get $10 + local.set $7 + local.get $11 + local.set $8 + end + local.get $1 + i64.const 4503599627370495 + i64.and + i64.const 4503599627370496 + i64.or + local.set $14 + local.get $7 + local.set $13 + local.get $14 + local.set $12 + local.get $13 + i64.const 4294967295 + i64.and + local.set $15 + local.get $12 + i64.const 4294967295 + i64.and + local.set $16 + local.get $13 + i64.const 32 + i64.shr_u + local.set $13 + local.get $12 + i64.const 32 + i64.shr_u + local.set $12 + local.get $15 + local.get $16 + i64.mul + local.set $19 + local.get $19 + i64.const 4294967295 + i64.and + local.set $17 + local.get $13 + local.get $16 + i64.mul + local.get $19 + i64.const 32 + i64.shr_u + i64.add + local.set $19 + local.get $19 + i64.const 32 + i64.shr_u + local.set $18 + local.get $15 + local.get $12 + i64.mul + local.get $19 + i64.const 4294967295 + i64.and + i64.add + local.set $19 + local.get $13 + local.get $12 + i64.mul + local.get $18 + i64.add + local.get $19 + i64.const 32 + i64.shr_u + i64.add + global.set $~lib/math/res128_hi + local.get $19 + i64.const 32 + i64.shl + local.get $17 + i64.add + local.set $20 + global.get $~lib/math/res128_hi + local.set $21 + local.get $6 + local.get $14 + i64.mul + local.set $22 + local.get $8 + i64.const 32 + i64.shr_u + local.get $14 + i64.const 32 + i64.shr_s + i64.mul + local.set $23 + local.get $20 + local.get $23 + i64.add + local.set $24 + local.get $22 + local.get $21 + i64.add + local.get $24 + local.get $23 + i64.lt_u + i64.extend_i32_u + i64.add + local.set $25 + local.get $24 + i64.const 2 + i64.shl + local.set $26 + local.get $25 + i64.const 2 + i64.shl + local.get $24 + i64.const 62 + i64.shr_u + i64.or + local.set $27 + local.get $27 + i64.const 63 + i64.shr_s + local.set $28 + local.get $28 + i64.const 1 + i64.shr_s + local.set $29 + local.get $25 + i64.const 62 + i64.shr_s + local.get $28 + i64.sub + local.set $30 + i64.const 4372995238176751616 + local.get $26 + local.get $28 + i64.xor + local.set $13 + local.get $27 + local.get $29 + i64.xor + local.set $12 + local.get $12 + i64.clz + local.set $19 + local.get $12 + local.get $19 + i64.shl + local.get $13 + i64.const 64 + local.get $19 + i64.sub + i64.shr_u + i64.or + local.set $12 + local.get $13 + local.get $19 + i64.shl + local.set $13 + i64.const -3958705157555305932 + local.set $16 + local.get $12 + local.set $15 + local.get $16 + i64.const 4294967295 + i64.and + local.set $18 + local.get $15 + i64.const 4294967295 + i64.and + local.set $17 + local.get $16 + i64.const 32 + i64.shr_u + local.set $16 + local.get $15 + i64.const 32 + i64.shr_u + local.set $15 + local.get $18 + local.get $17 + i64.mul + local.set $33 + local.get $33 + i64.const 4294967295 + i64.and + local.set $31 + local.get $16 + local.get $17 + i64.mul + local.get $33 + i64.const 32 + i64.shr_u + i64.add + local.set $33 + local.get $33 + i64.const 32 + i64.shr_u + local.set $32 + local.get $18 + local.get $15 + i64.mul + local.get $33 + i64.const 4294967295 + i64.and + i64.add + local.set $33 + local.get $16 + local.get $15 + i64.mul + local.get $32 + i64.add + local.get $33 + i64.const 32 + i64.shr_u + i64.add + global.set $~lib/math/res128_hi + local.get $33 + i64.const 32 + i64.shl + local.get $31 + i64.add + local.set $33 + global.get $~lib/math/res128_hi + local.set $32 + local.get $32 + i64.const 11 + i64.shr_u + local.set $31 + local.get $33 + i64.const 11 + i64.shr_u + local.get $32 + i64.const 53 + i64.shl + i64.or + local.set $17 + f64.const 2.6469779601696886e-23 + i64.const -4267615245585081135 + f64.convert_i64_u + f64.mul + local.get $12 + f64.convert_i64_u + f64.mul + f64.const 2.6469779601696886e-23 + i64.const -3958705157555305932 + f64.convert_i64_u + f64.mul + local.get $13 + f64.convert_i64_u + f64.mul + f64.add + i64.trunc_f64_u + local.set $18 + local.get $31 + local.get $33 + local.get $18 + i64.lt_u + i64.extend_i32_u + i64.add + f64.convert_i64_u + global.set $~lib/math/rempio2_y0 + f64.const 5.421010862427522e-20 + local.get $17 + local.get $18 + i64.add + f64.convert_i64_u + f64.mul + global.set $~lib/math/rempio2_y1 + local.get $19 + i64.const 52 + i64.shl + i64.sub + local.set $34 + local.get $1 + local.get $27 + i64.xor + i64.const -9223372036854775808 + i64.and + local.set $35 + local.get $34 + local.get $35 + i64.or + f64.reinterpret_i64 + local.set $36 + global.get $~lib/math/rempio2_y0 + local.get $36 + f64.mul + global.set $~lib/math/rempio2_y0 + global.get $~lib/math/rempio2_y1 + local.get $36 + f64.mul + global.set $~lib/math/rempio2_y1 + local.get $30 + i32.wrap_i64 + ) + (func $~lib/math/NativeMath.sin (param $0 f64) (result f64) + (local $1 i64) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 i64) + (local $12 i32) + (local $13 i32) + (local $14 i32) + (local $15 i32) + (local $16 f64) + (local $17 i32) + (local $18 f64) + (local $19 f64) + local.get $0 + i64.reinterpret_f64 + local.set $1 + local.get $1 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.set $2 + local.get $2 + i32.const 31 + i32.shr_u + local.set $3 + local.get $2 + i32.const 2147483647 + i32.and + local.set $2 + local.get $2 + i32.const 1072243195 + i32.le_u + if + local.get $2 + i32.const 1045430272 + i32.lt_u + if + local.get $0 + return + end + block $~lib/math/sin_kern|inlined.0 (result f64) + local.get $0 + local.set $6 + f64.const 0 + local.set $5 + i32.const 0 + local.set $4 + local.get $6 + local.get $6 + f64.mul + local.set $7 + local.get $7 + local.get $7 + f64.mul + local.set $8 + f64.const 0.00833333333332249 + local.get $7 + f64.const -1.984126982985795e-04 + local.get $7 + f64.const 2.7557313707070068e-06 + f64.mul + f64.add + f64.mul + f64.add + local.get $7 + local.get $8 + f64.mul + f64.const -2.5050760253406863e-08 + local.get $7 + f64.const 1.58969099521155e-10 + f64.mul + f64.add + f64.mul + f64.add + local.set $9 + local.get $7 + local.get $6 + f64.mul + local.set $10 + local.get $4 + i32.eqz + if + local.get $6 + local.get $10 + f64.const -0.16666666666666632 + local.get $7 + local.get $9 + f64.mul + f64.add + f64.mul + f64.add + br $~lib/math/sin_kern|inlined.0 + else + local.get $6 + local.get $7 + f64.const 0.5 + local.get $5 + f64.mul + local.get $10 + local.get $9 + f64.mul + f64.sub + f64.mul + local.get $5 + f64.sub + local.get $10 + f64.const -0.16666666666666632 + f64.mul + f64.sub + f64.sub + br $~lib/math/sin_kern|inlined.0 + end + unreachable + end + return + end + local.get $2 + i32.const 2146435072 + i32.ge_u + if + local.get $0 + local.get $0 + f64.sub + return + end + block $~lib/math/rempio2|inlined.0 (result i32) + local.get $0 + local.set $5 + local.get $1 + local.set $11 + local.get $3 + local.set $4 + local.get $11 + i64.const 32 + i64.shr_u + i32.wrap_i64 + i32.const 2147483647 + i32.and + local.set $12 + i32.const 0 + i32.const 1 + i32.lt_s + drop + local.get $12 + i32.const 1073928572 + i32.lt_u + if + i32.const 1 + local.set $13 + local.get $4 + i32.eqz + if + local.get $5 + f64.const 1.5707963267341256 + f64.sub + local.set $10 + local.get $12 + i32.const 1073291771 + i32.ne + if + local.get $10 + f64.const 6.077100506506192e-11 + f64.sub + local.set $9 + local.get $10 + local.get $9 + f64.sub + f64.const 6.077100506506192e-11 + f64.sub + local.set $8 + else + local.get $10 + f64.const 6.077100506303966e-11 + f64.sub + local.set $10 + local.get $10 + f64.const 2.0222662487959506e-21 + f64.sub + local.set $9 + local.get $10 + local.get $9 + f64.sub + f64.const 2.0222662487959506e-21 + f64.sub + local.set $8 + end + else + local.get $5 + f64.const 1.5707963267341256 + f64.add + local.set $10 + local.get $12 + i32.const 1073291771 + i32.ne + if + local.get $10 + f64.const 6.077100506506192e-11 + f64.add + local.set $9 + local.get $10 + local.get $9 + f64.sub + f64.const 6.077100506506192e-11 + f64.add + local.set $8 + else + local.get $10 + f64.const 6.077100506303966e-11 + f64.add + local.set $10 + local.get $10 + f64.const 2.0222662487959506e-21 + f64.add + local.set $9 + local.get $10 + local.get $9 + f64.sub + f64.const 2.0222662487959506e-21 + f64.add + local.set $8 + end + i32.const -1 + local.set $13 + end + local.get $9 + global.set $~lib/math/rempio2_y0 + local.get $8 + global.set $~lib/math/rempio2_y1 + local.get $13 + br $~lib/math/rempio2|inlined.0 + end + local.get $12 + i32.const 1094263291 + i32.lt_u + if + local.get $5 + f64.const 0.6366197723675814 + f64.mul + f64.nearest + local.set $8 + local.get $5 + local.get $8 + f64.const 1.5707963267341256 + f64.mul + f64.sub + local.set $9 + local.get $8 + f64.const 6.077100506506192e-11 + f64.mul + local.set $10 + local.get $12 + i32.const 20 + i32.shr_u + local.set $13 + local.get $9 + local.get $10 + f64.sub + local.set $7 + local.get $7 + i64.reinterpret_f64 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.set $14 + local.get $13 + local.get $14 + i32.const 20 + i32.shr_u + i32.const 2047 + i32.and + i32.sub + local.set $15 + local.get $15 + i32.const 16 + i32.gt_u + if + local.get $9 + local.set $6 + local.get $8 + f64.const 6.077100506303966e-11 + f64.mul + local.set $10 + local.get $6 + local.get $10 + f64.sub + local.set $9 + local.get $8 + f64.const 2.0222662487959506e-21 + f64.mul + local.get $6 + local.get $9 + f64.sub + local.get $10 + f64.sub + f64.sub + local.set $10 + local.get $9 + local.get $10 + f64.sub + local.set $7 + local.get $7 + i64.reinterpret_f64 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.set $14 + local.get $13 + local.get $14 + i32.const 20 + i32.shr_u + i32.const 2047 + i32.and + i32.sub + local.set $15 + local.get $15 + i32.const 49 + i32.gt_u + if + local.get $9 + local.set $16 + local.get $8 + f64.const 2.0222662487111665e-21 + f64.mul + local.set $10 + local.get $16 + local.get $10 + f64.sub + local.set $9 + local.get $8 + f64.const 8.4784276603689e-32 + f64.mul + local.get $16 + local.get $9 + f64.sub + local.get $10 + f64.sub + f64.sub + local.set $10 + local.get $9 + local.get $10 + f64.sub + local.set $7 + end + end + local.get $9 + local.get $7 + f64.sub + local.get $10 + f64.sub + local.set $6 + local.get $7 + global.set $~lib/math/rempio2_y0 + local.get $6 + global.set $~lib/math/rempio2_y1 + local.get $8 + i32.trunc_f64_s + br $~lib/math/rempio2|inlined.0 + end + local.get $5 + local.get $11 + call $~lib/math/pio2_large_quot + local.set $15 + i32.const 0 + local.get $15 + i32.sub + local.get $15 + local.get $4 + select + end + local.set $17 + global.get $~lib/math/rempio2_y0 + local.set $18 + global.get $~lib/math/rempio2_y1 + local.set $19 + local.get $17 + i32.const 1 + i32.and + if (result f64) + local.get $18 + local.set $8 + local.get $19 + local.set $16 + local.get $8 + local.get $8 + f64.mul + local.set $5 + local.get $5 + local.get $5 + f64.mul + local.set $6 + local.get $5 + f64.const 0.0416666666666666 + local.get $5 + f64.const -0.001388888888887411 + local.get $5 + f64.const 2.480158728947673e-05 + f64.mul + f64.add + f64.mul + f64.add + f64.mul + local.get $6 + local.get $6 + f64.mul + f64.const -2.7557314351390663e-07 + local.get $5 + f64.const 2.087572321298175e-09 + local.get $5 + f64.const -1.1359647557788195e-11 + f64.mul + f64.add + f64.mul + f64.add + f64.mul + f64.add + local.set $7 + f64.const 0.5 + local.get $5 + f64.mul + local.set $10 + f64.const 1 + local.get $10 + f64.sub + local.set $6 + local.get $6 + f64.const 1 + local.get $6 + f64.sub + local.get $10 + f64.sub + local.get $5 + local.get $7 + f64.mul + local.get $8 + local.get $16 + f64.mul + f64.sub + f64.add + f64.add + else + block $~lib/math/sin_kern|inlined.1 (result f64) + local.get $18 + local.set $16 + local.get $19 + local.set $9 + i32.const 1 + local.set $13 + local.get $16 + local.get $16 + f64.mul + local.set $10 + local.get $10 + local.get $10 + f64.mul + local.set $7 + f64.const 0.00833333333332249 + local.get $10 + f64.const -1.984126982985795e-04 + local.get $10 + f64.const 2.7557313707070068e-06 + f64.mul + f64.add + f64.mul + f64.add + local.get $10 + local.get $7 + f64.mul + f64.const -2.5050760253406863e-08 + local.get $10 + f64.const 1.58969099521155e-10 + f64.mul + f64.add + f64.mul + f64.add + local.set $6 + local.get $10 + local.get $16 + f64.mul + local.set $5 + local.get $13 + i32.eqz + if + local.get $16 + local.get $5 + f64.const -0.16666666666666632 + local.get $10 + local.get $6 + f64.mul + f64.add + f64.mul + f64.add + br $~lib/math/sin_kern|inlined.1 + else + local.get $16 + local.get $10 + f64.const 0.5 + local.get $9 + f64.mul + local.get $5 + local.get $6 + f64.mul + f64.sub + f64.mul + local.get $9 + f64.sub + local.get $5 + f64.const -0.16666666666666632 + f64.mul + f64.sub + f64.sub + br $~lib/math/sin_kern|inlined.1 + end + unreachable + end + end + local.set $0 + local.get $17 + i32.const 2 + i32.and + if (result f64) + local.get $0 + f64.neg + else + local.get $0 + end + ) + (func $~lib/math/NativeMath.cos (param $0 f64) (result f64) + (local $1 i64) + (local $2 i32) + (local $3 i32) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 i32) + (local $11 i64) + (local $12 i32) + (local $13 i32) + (local $14 i32) + (local $15 i32) + (local $16 f64) + (local $17 i32) + (local $18 f64) + (local $19 f64) + local.get $0 + i64.reinterpret_f64 + local.set $1 + local.get $1 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.set $2 + local.get $2 + i32.const 31 + i32.shr_u + local.set $3 + local.get $2 + i32.const 2147483647 + i32.and + local.set $2 + local.get $2 + i32.const 1072243195 + i32.le_u + if + local.get $2 + i32.const 1044816030 + i32.lt_u + if + f64.const 1 + return + end + local.get $0 + local.set $5 + f64.const 0 + local.set $4 + local.get $5 + local.get $5 + f64.mul + local.set $6 + local.get $6 + local.get $6 + f64.mul + local.set $7 + local.get $6 + f64.const 0.0416666666666666 + local.get $6 + f64.const -0.001388888888887411 + local.get $6 + f64.const 2.480158728947673e-05 + f64.mul + f64.add + f64.mul + f64.add + f64.mul + local.get $7 + local.get $7 + f64.mul + f64.const -2.7557314351390663e-07 + local.get $6 + f64.const 2.087572321298175e-09 + local.get $6 + f64.const -1.1359647557788195e-11 + f64.mul + f64.add + f64.mul + f64.add + f64.mul + f64.add + local.set $8 + f64.const 0.5 + local.get $6 + f64.mul + local.set $9 + f64.const 1 + local.get $9 + f64.sub + local.set $7 + local.get $7 + f64.const 1 + local.get $7 + f64.sub + local.get $9 + f64.sub + local.get $6 + local.get $8 + f64.mul + local.get $5 + local.get $4 + f64.mul + f64.sub + f64.add + f64.add + return + end + local.get $2 + i32.const 2146435072 + i32.ge_u + if + local.get $0 + local.get $0 + f64.sub + return + end + block $~lib/math/rempio2|inlined.1 (result i32) + local.get $0 + local.set $4 + local.get $1 + local.set $11 + local.get $3 + local.set $10 + local.get $11 + i64.const 32 + i64.shr_u + i32.wrap_i64 + i32.const 2147483647 + i32.and + local.set $12 + i32.const 0 + i32.const 1 + i32.lt_s + drop + local.get $12 + i32.const 1073928572 + i32.lt_u + if + i32.const 1 + local.set $13 + local.get $10 + i32.eqz + if + local.get $4 + f64.const 1.5707963267341256 + f64.sub + local.set $9 + local.get $12 + i32.const 1073291771 + i32.ne + if + local.get $9 + f64.const 6.077100506506192e-11 + f64.sub + local.set $8 + local.get $9 + local.get $8 + f64.sub + f64.const 6.077100506506192e-11 + f64.sub + local.set $7 + else + local.get $9 + f64.const 6.077100506303966e-11 + f64.sub + local.set $9 + local.get $9 + f64.const 2.0222662487959506e-21 + f64.sub + local.set $8 + local.get $9 + local.get $8 + f64.sub + f64.const 2.0222662487959506e-21 + f64.sub + local.set $7 + end + else + local.get $4 + f64.const 1.5707963267341256 + f64.add + local.set $9 + local.get $12 + i32.const 1073291771 + i32.ne + if + local.get $9 + f64.const 6.077100506506192e-11 + f64.add + local.set $8 + local.get $9 + local.get $8 + f64.sub + f64.const 6.077100506506192e-11 + f64.add + local.set $7 + else + local.get $9 + f64.const 6.077100506303966e-11 + f64.add + local.set $9 + local.get $9 + f64.const 2.0222662487959506e-21 + f64.add + local.set $8 + local.get $9 + local.get $8 + f64.sub + f64.const 2.0222662487959506e-21 + f64.add + local.set $7 + end + i32.const -1 + local.set $13 + end + local.get $8 + global.set $~lib/math/rempio2_y0 + local.get $7 + global.set $~lib/math/rempio2_y1 + local.get $13 + br $~lib/math/rempio2|inlined.1 + end + local.get $12 + i32.const 1094263291 + i32.lt_u + if + local.get $4 + f64.const 0.6366197723675814 + f64.mul + f64.nearest + local.set $7 + local.get $4 + local.get $7 + f64.const 1.5707963267341256 + f64.mul + f64.sub + local.set $8 + local.get $7 + f64.const 6.077100506506192e-11 + f64.mul + local.set $9 + local.get $12 + i32.const 20 + i32.shr_u + local.set $13 + local.get $8 + local.get $9 + f64.sub + local.set $6 + local.get $6 + i64.reinterpret_f64 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.set $14 + local.get $13 + local.get $14 + i32.const 20 + i32.shr_u + i32.const 2047 + i32.and + i32.sub + local.set $15 + local.get $15 + i32.const 16 + i32.gt_u + if + local.get $8 + local.set $5 + local.get $7 + f64.const 6.077100506303966e-11 + f64.mul + local.set $9 + local.get $5 + local.get $9 + f64.sub + local.set $8 + local.get $7 + f64.const 2.0222662487959506e-21 + f64.mul + local.get $5 + local.get $8 + f64.sub + local.get $9 + f64.sub + f64.sub + local.set $9 + local.get $8 + local.get $9 + f64.sub + local.set $6 + local.get $6 + i64.reinterpret_f64 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.set $14 + local.get $13 + local.get $14 + i32.const 20 + i32.shr_u + i32.const 2047 + i32.and + i32.sub + local.set $15 + local.get $15 + i32.const 49 + i32.gt_u + if + local.get $8 + local.set $16 + local.get $7 + f64.const 2.0222662487111665e-21 + f64.mul + local.set $9 + local.get $16 + local.get $9 + f64.sub + local.set $8 + local.get $7 + f64.const 8.4784276603689e-32 + f64.mul + local.get $16 + local.get $8 + f64.sub + local.get $9 + f64.sub + f64.sub + local.set $9 + local.get $8 + local.get $9 + f64.sub + local.set $6 + end + end + local.get $8 + local.get $6 + f64.sub + local.get $9 + f64.sub + local.set $5 + local.get $6 + global.set $~lib/math/rempio2_y0 + local.get $5 + global.set $~lib/math/rempio2_y1 + local.get $7 + i32.trunc_f64_s + br $~lib/math/rempio2|inlined.1 + end + local.get $4 + local.get $11 + call $~lib/math/pio2_large_quot + local.set $15 + i32.const 0 + local.get $15 + i32.sub + local.get $15 + local.get $10 + select + end + local.set $17 + global.get $~lib/math/rempio2_y0 + local.set $18 + global.get $~lib/math/rempio2_y1 + local.set $19 + local.get $17 + i32.const 1 + i32.and + if (result f64) + block $~lib/math/sin_kern|inlined.2 (result f64) + local.get $18 + local.set $7 + local.get $19 + local.set $16 + i32.const 1 + local.set $13 + local.get $7 + local.get $7 + f64.mul + local.set $4 + local.get $4 + local.get $4 + f64.mul + local.set $5 + f64.const 0.00833333333332249 + local.get $4 + f64.const -1.984126982985795e-04 + local.get $4 + f64.const 2.7557313707070068e-06 + f64.mul + f64.add + f64.mul + f64.add + local.get $4 + local.get $5 + f64.mul + f64.const -2.5050760253406863e-08 + local.get $4 + f64.const 1.58969099521155e-10 + f64.mul + f64.add + f64.mul + f64.add + local.set $6 + local.get $4 + local.get $7 + f64.mul + local.set $9 + local.get $13 + i32.eqz + if + local.get $7 + local.get $9 + f64.const -0.16666666666666632 + local.get $4 + local.get $6 + f64.mul + f64.add + f64.mul + f64.add + br $~lib/math/sin_kern|inlined.2 + else + local.get $7 + local.get $4 + f64.const 0.5 + local.get $16 + f64.mul + local.get $9 + local.get $6 + f64.mul + f64.sub + f64.mul + local.get $16 + f64.sub + local.get $9 + f64.const -0.16666666666666632 + f64.mul + f64.sub + f64.sub + br $~lib/math/sin_kern|inlined.2 + end + unreachable + end + else + local.get $18 + local.set $16 + local.get $19 + local.set $8 + local.get $16 + local.get $16 + f64.mul + local.set $9 + local.get $9 + local.get $9 + f64.mul + local.set $6 + local.get $9 + f64.const 0.0416666666666666 + local.get $9 + f64.const -0.001388888888887411 + local.get $9 + f64.const 2.480158728947673e-05 + f64.mul + f64.add + f64.mul + f64.add + f64.mul + local.get $6 + local.get $6 + f64.mul + f64.const -2.7557314351390663e-07 + local.get $9 + f64.const 2.087572321298175e-09 + local.get $9 + f64.const -1.1359647557788195e-11 + f64.mul + f64.add + f64.mul + f64.add + f64.mul + f64.add + local.set $5 + f64.const 0.5 + local.get $9 + f64.mul + local.set $4 + f64.const 1 + local.get $4 + f64.sub + local.set $6 + local.get $6 + f64.const 1 + local.get $6 + f64.sub + local.get $4 + f64.sub + local.get $9 + local.get $5 + f64.mul + local.get $16 + local.get $8 + f64.mul + f64.sub + f64.add + f64.add + end + local.set $0 + local.get $17 + i32.const 1 + i32.add + i32.const 2 + i32.and + if (result f64) + local.get $0 + f64.neg + else + local.get $0 + end + ) + (func $assembly/quat/setAxisAngle (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 f64) + local.get $2 + f64.const 0.5 + f64.mul + local.set $2 + local.get $2 + call $~lib/math/NativeMath.sin + local.set $3 + local.get $0 + i32.const 0 + local.get $3 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $3 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $2 + call $~lib/math/NativeMath.cos + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/quat/rotationTo (result i32) + i32.const 1856 + ) + (func $~lib/math/R (param $0 f64) (result f64) + (local $1 f64) + (local $2 f64) + local.get $0 + f64.const 0.16666666666666666 + local.get $0 + f64.const -0.3255658186224009 + local.get $0 + f64.const 0.20121253213486293 + local.get $0 + f64.const -0.04005553450067941 + local.get $0 + f64.const 7.915349942898145e-04 + local.get $0 + f64.const 3.479331075960212e-05 + f64.mul + f64.add + f64.mul + f64.add + f64.mul + f64.add + f64.mul + f64.add + f64.mul + f64.add + f64.mul + local.set $1 + f64.const 1 + local.get $0 + f64.const -2.403394911734414 + local.get $0 + f64.const 2.0209457602335057 + local.get $0 + f64.const -0.6882839716054533 + local.get $0 + f64.const 0.07703815055590194 + f64.mul + f64.add + f64.mul + f64.add + f64.mul + f64.add + f64.mul + f64.add + local.set $2 + local.get $1 + local.get $2 + f64.div + ) + (func $~lib/math/NativeMath.acos (param $0 f64) (result f64) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + local.get $0 + i64.reinterpret_f64 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.set $1 + local.get $1 + i32.const 2147483647 + i32.and + local.set $2 + local.get $2 + i32.const 1072693248 + i32.ge_u + if + local.get $0 + i64.reinterpret_f64 + i32.wrap_i64 + local.set $3 + local.get $2 + i32.const 1072693248 + i32.sub + local.get $3 + i32.or + i32.const 0 + i32.eq + if + local.get $1 + i32.const 31 + i32.shr_u + if + f64.const 2 + f64.const 1.5707963267948966 + f64.mul + f32.const 7.52316384526264e-37 + f64.promote_f32 + f64.add + return + end + f64.const 0 + return + end + f64.const 0 + local.get $0 + local.get $0 + f64.sub + f64.div + return + end + local.get $2 + i32.const 1071644672 + i32.lt_u + if + local.get $2 + i32.const 1012924416 + i32.le_u + if + f64.const 1.5707963267948966 + f32.const 7.52316384526264e-37 + f64.promote_f32 + f64.add + return + end + f64.const 1.5707963267948966 + local.get $0 + f64.const 6.123233995736766e-17 + local.get $0 + local.get $0 + local.get $0 + f64.mul + call $~lib/math/R + f64.mul + f64.sub + f64.sub + f64.sub + return + end + local.get $1 + i32.const 31 + i32.shr_u + if + f64.const 0.5 + local.get $0 + f64.const 0.5 + f64.mul + f64.add + local.set $6 + local.get $6 + f64.sqrt + local.set $4 + local.get $6 + call $~lib/math/R + local.get $4 + f64.mul + f64.const 6.123233995736766e-17 + f64.sub + local.set $5 + f64.const 2 + f64.const 1.5707963267948966 + local.get $4 + local.get $5 + f64.add + f64.sub + f64.mul + return + end + f64.const 0.5 + local.get $0 + f64.const 0.5 + f64.mul + f64.sub + local.set $6 + local.get $6 + f64.sqrt + local.set $4 + local.get $4 + i64.reinterpret_f64 + i64.const -4294967296 + i64.and + f64.reinterpret_i64 + local.set $7 + local.get $6 + local.get $7 + local.get $7 + f64.mul + f64.sub + local.get $4 + local.get $7 + f64.add + f64.div + local.set $8 + local.get $6 + call $~lib/math/R + local.get $4 + f64.mul + local.get $8 + f64.add + local.set $5 + f64.const 2 + local.get $7 + local.get $5 + f64.add + f64.mul + ) + (func $assembly/quat/slerp (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 f64) + (local $16 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $4 + local.get $8 + f64.mul + local.get $5 + local.get $9 + f64.mul + f64.add + local.get $6 + local.get $10 + f64.mul + f64.add + local.get $7 + local.get $11 + f64.mul + f64.add + local.set $13 + local.get $13 + f64.const 0 + f64.lt + if + local.get $13 + f64.neg + local.set $13 + local.get $8 + f64.neg + local.set $8 + local.get $9 + f64.neg + local.set $9 + local.get $10 + f64.neg + local.set $10 + local.get $11 + f64.neg + local.set $11 + end + f64.const 1 + local.get $13 + f64.sub + global.get $assembly/common/EPSILON + f64.gt + if + local.get $13 + call $~lib/math/NativeMath.acos + local.set $12 + local.get $12 + call $~lib/math/NativeMath.sin + local.set $14 + f64.const 1 + local.get $3 + f64.sub + local.get $12 + f64.mul + call $~lib/math/NativeMath.sin + local.get $14 + f64.div + local.set $15 + local.get $3 + local.get $12 + f64.mul + call $~lib/math/NativeMath.sin + local.get $14 + f64.div + local.set $16 + else + f64.const 1 + local.get $3 + f64.sub + local.set $15 + local.get $3 + local.set $16 + end + local.get $0 + i32.const 0 + local.get $15 + local.get $4 + f64.mul + local.get $16 + local.get $8 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $15 + local.get $5 + f64.mul + local.get $16 + local.get $9 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $15 + local.get $6 + f64.mul + local.get $16 + local.get $10 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $15 + local.get $7 + f64.mul + local.get $16 + local.get $11 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/quat/sqlerp (result i32) + i32.const 1888 + ) + (func $assembly/quat/fromMat3 (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 i32) + (local $6 i32) + (local $7 i32) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + f64.add + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + f64.add + local.set $2 + local.get $2 + f64.const 0 + f64.gt + if + local.get $2 + f64.const 1 + f64.add + local.set $4 + local.get $4 + f64.sqrt + local.set $3 + local.get $0 + i32.const 3 + f64.const 0.5 + local.get $3 + f64.mul + call $~lib/typedarray/Float64Array#__set + f64.const 0.5 + local.get $3 + f64.div + local.set $3 + local.get $0 + i32.const 0 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + f64.sub + local.get $3 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.sub + local.get $3 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.sub + local.get $3 + f64.mul + call $~lib/typedarray/Float64Array#__set + else + i32.const 0 + local.set $5 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.gt + if + i32.const 1 + local.set $5 + end + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.get $1 + local.get $5 + i32.const 3 + i32.mul + local.get $5 + i32.add + call $~lib/typedarray/Float64Array#__get + f64.gt + if + i32.const 2 + local.set $5 + end + local.get $5 + i32.const 1 + i32.add + i32.const 3 + i32.rem_s + local.set $6 + local.get $5 + i32.const 2 + i32.add + i32.const 3 + i32.rem_s + local.set $7 + local.get $1 + local.get $5 + i32.const 3 + i32.mul + local.get $5 + i32.add + call $~lib/typedarray/Float64Array#__get + local.get $1 + local.get $6 + i32.const 3 + i32.mul + local.get $6 + i32.add + call $~lib/typedarray/Float64Array#__get + f64.sub + local.get $1 + local.get $7 + i32.const 3 + i32.mul + local.get $7 + i32.add + call $~lib/typedarray/Float64Array#__get + f64.sub + f64.const 1 + f64.add + local.set $4 + local.get $4 + f64.sqrt + local.set $3 + local.get $0 + local.get $5 + f64.const 0.5 + local.get $3 + f64.mul + call $~lib/typedarray/Float64Array#__set + f64.const 0.5 + local.get $3 + f64.div + local.set $3 + local.get $0 + i32.const 3 + local.get $1 + local.get $6 + i32.const 3 + i32.mul + local.get $7 + i32.add + call $~lib/typedarray/Float64Array#__get + local.get $1 + local.get $7 + i32.const 3 + i32.mul + local.get $6 + i32.add + call $~lib/typedarray/Float64Array#__get + f64.sub + local.get $3 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + local.get $6 + local.get $1 + local.get $6 + i32.const 3 + i32.mul + local.get $5 + i32.add + call $~lib/typedarray/Float64Array#__get + local.get $1 + local.get $5 + i32.const 3 + i32.mul + local.get $6 + i32.add + call $~lib/typedarray/Float64Array#__get + f64.add + local.get $3 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + local.get $7 + local.get $1 + local.get $7 + i32.const 3 + i32.mul + local.get $5 + i32.add + call $~lib/typedarray/Float64Array#__get + local.get $1 + local.get $5 + i32.const 3 + i32.mul + local.get $7 + i32.add + call $~lib/typedarray/Float64Array#__get + f64.add + local.get $3 + f64.mul + call $~lib/typedarray/Float64Array#__set + end + local.get $0 + ) + (func $assembly/quat/setAxes (result i32) + i32.const 1920 + ) + (func $start:assembly/quat + call $start:assembly/vec3 + call $start:assembly/vec4 + call $assembly/vec3/create + global.set $assembly/quat/tmpvec3 + f64.const 1 + f64.const 0 + f64.const 0 + call $assembly/vec3/fromValues + global.set $assembly/quat/xUnitVec3 + f64.const 0 + f64.const 1 + f64.const 0 + call $assembly/vec3/fromValues + global.set $assembly/quat/yUnitVec3 + call $assembly/quat/rotationTo + drop + call $assembly/quat/create + global.set $assembly/quat/temp1 + call $assembly/quat/create + global.set $assembly/quat/temp2 + call $assembly/quat/sqlerp + drop + call $assembly/mat3/create + global.set $assembly/quat/matr + call $assembly/quat/setAxes + drop + ) + (func $assembly/quat2/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 f64) + (local $16 f64) + (local $17 f64) + (local $18 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $2 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $2 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $2 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $2 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $12 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $13 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $14 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $15 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $16 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $17 + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $18 + local.get $0 + i32.const 0 + local.get $3 + local.get $18 + f64.mul + local.get $6 + local.get $15 + f64.mul + f64.add + local.get $4 + local.get $17 + f64.mul + f64.add + local.get $5 + local.get $16 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $4 + local.get $18 + f64.mul + local.get $6 + local.get $16 + f64.mul + f64.add + local.get $5 + local.get $15 + f64.mul + f64.add + local.get $3 + local.get $17 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $5 + local.get $18 + f64.mul + local.get $6 + local.get $17 + f64.mul + f64.add + local.get $3 + local.get $16 + f64.mul + f64.add + local.get $4 + local.get $15 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $6 + local.get $18 + f64.mul + local.get $3 + local.get $15 + f64.mul + f64.sub + local.get $4 + local.get $16 + f64.mul + f64.sub + local.get $5 + local.get $17 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $3 + local.get $10 + f64.mul + local.get $6 + local.get $7 + f64.mul + f64.add + local.get $4 + local.get $9 + f64.mul + f64.add + local.get $5 + local.get $8 + f64.mul + f64.sub + local.get $11 + local.get $18 + f64.mul + f64.add + local.get $14 + local.get $15 + f64.mul + f64.add + local.get $12 + local.get $17 + f64.mul + f64.add + local.get $13 + local.get $16 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $4 + local.get $10 + f64.mul + local.get $6 + local.get $8 + f64.mul + f64.add + local.get $5 + local.get $7 + f64.mul + f64.add + local.get $3 + local.get $9 + f64.mul + f64.sub + local.get $12 + local.get $18 + f64.mul + f64.add + local.get $14 + local.get $16 + f64.mul + f64.add + local.get $13 + local.get $15 + f64.mul + f64.add + local.get $11 + local.get $17 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $5 + local.get $10 + f64.mul + local.get $6 + local.get $9 + f64.mul + f64.add + local.get $3 + local.get $8 + f64.mul + f64.add + local.get $4 + local.get $7 + f64.mul + f64.sub + local.get $13 + local.get $18 + f64.mul + f64.add + local.get $14 + local.get $17 + f64.mul + f64.add + local.get $11 + local.get $16 + f64.mul + f64.add + local.get $12 + local.get $15 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $6 + local.get $10 + f64.mul + local.get $3 + local.get $7 + f64.mul + f64.sub + local.get $4 + local.get $8 + f64.mul + f64.sub + local.get $5 + local.get $9 + f64.mul + f64.sub + local.get $14 + local.get $18 + f64.mul + f64.add + local.get $11 + local.get $15 + f64.mul + f64.sub + local.get $12 + local.get $16 + f64.mul + f64.sub + local.get $13 + local.get $17 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $~lib/math/tan_kern (param $0 f64) (param $1 f64) (param $2 i32) (result f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 f64) + (local $12 f64) + local.get $0 + i64.reinterpret_f64 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.set $8 + local.get $8 + i32.const 2147483647 + i32.and + local.set $9 + local.get $9 + i32.const 1072010280 + i32.ge_s + local.set $10 + local.get $10 + if + local.get $8 + i32.const 0 + i32.lt_s + if + local.get $0 + f64.neg + local.set $0 + local.get $1 + f64.neg + local.set $1 + end + f64.const 0.7853981633974483 + local.get $0 + f64.sub + local.set $3 + f64.const 3.061616997868383e-17 + local.get $1 + f64.sub + local.set $6 + local.get $3 + local.get $6 + f64.add + local.set $0 + f64.const 0 + local.set $1 + end + local.get $0 + local.get $0 + f64.mul + local.set $3 + local.get $3 + local.get $3 + f64.mul + local.set $6 + f64.const 0.13333333333320124 + local.get $6 + f64.const 0.021869488294859542 + local.get $6 + f64.const 3.5920791075913124e-03 + local.get $6 + f64.const 5.880412408202641e-04 + local.get $6 + f64.const 7.817944429395571e-05 + local.get $6 + f64.const -1.8558637485527546e-05 + f64.mul + f64.add + f64.mul + f64.add + f64.mul + f64.add + f64.mul + f64.add + f64.mul + f64.add + local.set $4 + local.get $3 + f64.const 0.05396825397622605 + local.get $6 + f64.const 0.0088632398235993 + local.get $6 + f64.const 1.4562094543252903e-03 + local.get $6 + f64.const 2.464631348184699e-04 + local.get $6 + f64.const 7.140724913826082e-05 + local.get $6 + f64.const 2.590730518636337e-05 + f64.mul + f64.add + f64.mul + f64.add + f64.mul + f64.add + f64.mul + f64.add + f64.mul + f64.add + f64.mul + local.set $5 + local.get $3 + local.get $0 + f64.mul + local.set $7 + local.get $1 + local.get $3 + local.get $7 + local.get $4 + local.get $5 + f64.add + f64.mul + local.get $1 + f64.add + f64.mul + f64.add + local.set $4 + local.get $4 + f64.const 0.3333333333333341 + local.get $7 + f64.mul + f64.add + local.set $4 + local.get $0 + local.get $4 + f64.add + local.set $6 + local.get $10 + if + local.get $2 + f64.convert_i32_s + local.set $5 + f64.const 1 + local.get $8 + i32.const 30 + i32.shr_s + i32.const 2 + i32.and + f64.convert_i32_s + f64.sub + local.get $5 + f64.const 2 + local.get $0 + local.get $6 + local.get $6 + f64.mul + local.get $6 + local.get $5 + f64.add + f64.div + local.get $4 + f64.sub + f64.sub + f64.mul + f64.sub + f64.mul + return + end + local.get $2 + i32.const 1 + i32.eq + if + local.get $6 + return + end + local.get $6 + local.set $3 + local.get $3 + i64.reinterpret_f64 + i64.const -4294967296 + i64.and + f64.reinterpret_i64 + local.set $3 + local.get $4 + local.get $3 + local.get $0 + f64.sub + f64.sub + local.set $5 + f64.const 1 + f64.neg + local.get $6 + f64.div + local.tee $11 + local.set $12 + local.get $12 + i64.reinterpret_f64 + i64.const -4294967296 + i64.and + f64.reinterpret_i64 + local.set $12 + f64.const 1 + local.get $12 + local.get $3 + f64.mul + f64.add + local.set $7 + local.get $12 + local.get $11 + local.get $7 + local.get $12 + local.get $5 + f64.mul + f64.add + f64.mul + f64.add + ) + (func $~lib/math/NativeMath.tan (param $0 f64) (result f64) + (local $1 i64) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i64) + (local $6 f64) + (local $7 i32) + (local $8 i32) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 i32) + (local $14 i32) + (local $15 f64) + (local $16 f64) + (local $17 i32) + local.get $0 + i64.reinterpret_f64 + local.set $1 + local.get $1 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.set $2 + local.get $2 + i32.const 31 + i32.shr_u + local.set $3 + local.get $2 + i32.const 2147483647 + i32.and + local.set $2 + local.get $2 + i32.const 1072243195 + i32.le_s + if + local.get $2 + i32.const 1044381696 + i32.lt_s + if + local.get $0 + return + end + local.get $0 + f64.const 0 + i32.const 1 + call $~lib/math/tan_kern + return + end + local.get $2 + i32.const 2146435072 + i32.ge_s + if + local.get $0 + local.get $0 + f64.sub + return + end + block $~lib/math/rempio2|inlined.2 (result i32) + local.get $0 + local.set $6 + local.get $1 + local.set $5 + local.get $3 + local.set $4 + local.get $5 + i64.const 32 + i64.shr_u + i32.wrap_i64 + i32.const 2147483647 + i32.and + local.set $7 + i32.const 0 + i32.const 1 + i32.lt_s + drop + local.get $7 + i32.const 1073928572 + i32.lt_u + if + i32.const 1 + local.set $8 + local.get $4 + i32.eqz + if + local.get $6 + f64.const 1.5707963267341256 + f64.sub + local.set $9 + local.get $7 + i32.const 1073291771 + i32.ne + if + local.get $9 + f64.const 6.077100506506192e-11 + f64.sub + local.set $10 + local.get $9 + local.get $10 + f64.sub + f64.const 6.077100506506192e-11 + f64.sub + local.set $11 + else + local.get $9 + f64.const 6.077100506303966e-11 + f64.sub + local.set $9 + local.get $9 + f64.const 2.0222662487959506e-21 + f64.sub + local.set $10 + local.get $9 + local.get $10 + f64.sub + f64.const 2.0222662487959506e-21 + f64.sub + local.set $11 + end + else + local.get $6 + f64.const 1.5707963267341256 + f64.add + local.set $9 + local.get $7 + i32.const 1073291771 + i32.ne + if + local.get $9 + f64.const 6.077100506506192e-11 + f64.add + local.set $10 + local.get $9 + local.get $10 + f64.sub + f64.const 6.077100506506192e-11 + f64.add + local.set $11 + else + local.get $9 + f64.const 6.077100506303966e-11 + f64.add + local.set $9 + local.get $9 + f64.const 2.0222662487959506e-21 + f64.add + local.set $10 + local.get $9 + local.get $10 + f64.sub + f64.const 2.0222662487959506e-21 + f64.add + local.set $11 + end + i32.const -1 + local.set $8 + end + local.get $10 + global.set $~lib/math/rempio2_y0 + local.get $11 + global.set $~lib/math/rempio2_y1 + local.get $8 + br $~lib/math/rempio2|inlined.2 + end + local.get $7 + i32.const 1094263291 + i32.lt_u + if + local.get $6 + f64.const 0.6366197723675814 + f64.mul + f64.nearest + local.set $11 + local.get $6 + local.get $11 + f64.const 1.5707963267341256 + f64.mul + f64.sub + local.set $10 + local.get $11 + f64.const 6.077100506506192e-11 + f64.mul + local.set $9 + local.get $7 + i32.const 20 + i32.shr_u + local.set $8 + local.get $10 + local.get $9 + f64.sub + local.set $12 + local.get $12 + i64.reinterpret_f64 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.set $13 + local.get $8 + local.get $13 + i32.const 20 + i32.shr_u + i32.const 2047 + i32.and + i32.sub + local.set $14 + local.get $14 + i32.const 16 + i32.gt_u + if + local.get $10 + local.set $15 + local.get $11 + f64.const 6.077100506303966e-11 + f64.mul + local.set $9 + local.get $15 + local.get $9 + f64.sub + local.set $10 + local.get $11 + f64.const 2.0222662487959506e-21 + f64.mul + local.get $15 + local.get $10 + f64.sub + local.get $9 + f64.sub + f64.sub + local.set $9 + local.get $10 + local.get $9 + f64.sub + local.set $12 + local.get $12 + i64.reinterpret_f64 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.set $13 + local.get $8 + local.get $13 + i32.const 20 + i32.shr_u + i32.const 2047 + i32.and + i32.sub + local.set $14 + local.get $14 + i32.const 49 + i32.gt_u + if + local.get $10 + local.set $16 + local.get $11 + f64.const 2.0222662487111665e-21 + f64.mul + local.set $9 + local.get $16 + local.get $9 + f64.sub + local.set $10 + local.get $11 + f64.const 8.4784276603689e-32 + f64.mul + local.get $16 + local.get $10 + f64.sub + local.get $9 + f64.sub + f64.sub + local.set $9 + local.get $10 + local.get $9 + f64.sub + local.set $12 + end + end + local.get $10 + local.get $12 + f64.sub + local.get $9 + f64.sub + local.set $15 + local.get $12 + global.set $~lib/math/rempio2_y0 + local.get $15 + global.set $~lib/math/rempio2_y1 + local.get $11 + i32.trunc_f64_s + br $~lib/math/rempio2|inlined.2 + end + local.get $6 + local.get $5 + call $~lib/math/pio2_large_quot + local.set $14 + i32.const 0 + local.get $14 + i32.sub + local.get $14 + local.get $4 + select + end + local.set $17 + global.get $~lib/math/rempio2_y0 + global.get $~lib/math/rempio2_y1 + i32.const 1 + local.get $17 + i32.const 1 + i32.and + i32.const 1 + i32.shl + i32.sub + call $~lib/math/tan_kern + ) + (func $assembly/mat4/perspectiveNO (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) + (local $5 f64) + (local $6 f64) + f64.const 1 + local.get $1 + f64.const 2 + f64.div + call $~lib/math/NativeMath.tan + f64.div + local.set $5 + local.get $0 + i32.const 0 + local.get $5 + local.get $2 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $5 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + f64.const -1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $4 + i32.const 0 + i32.ne + if (result i32) + local.get $4 + f64.convert_i32_u + f64.const inf + f64.ne + else + i32.const 0 + end + if + i32.const 1 + f64.convert_i32_s + local.get $3 + local.get $4 + f64.convert_i32_u + f64.sub + f64.div + local.set $6 + local.get $0 + i32.const 10 + local.get $4 + f64.convert_i32_u + local.get $3 + f64.add + local.get $6 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + f64.const 2 + local.get $4 + f64.convert_i32_u + f64.mul + local.get $3 + f64.mul + local.get $6 + f64.mul + call $~lib/typedarray/Float64Array#__set + else + local.get $0 + i32.const 10 + f64.const -1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + f64.const -2 + local.get $3 + f64.mul + call $~lib/typedarray/Float64Array#__set + end + local.get $0 + ) + (func $assembly/mat4/orthoNO (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (result i32) + (local $7 f64) + (local $8 f64) + (local $9 f64) + i32.const 1 + f64.convert_i32_s + local.get $1 + local.get $2 + f64.sub + f64.div + local.set $7 + i32.const 1 + f64.convert_i32_s + local.get $3 + local.get $4 + f64.sub + f64.div + local.set $8 + i32.const 1 + f64.convert_i32_s + local.get $5 + local.get $6 + f64.sub + f64.div + local.set $9 + local.get $0 + i32.const 0 + f64.const -2 + local.get $7 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const -2 + local.get $8 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + f64.const 2 + local.get $9 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + local.get $1 + local.get $2 + f64.add + local.get $7 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $4 + local.get $3 + f64.add + local.get $8 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $6 + local.get $5 + f64.add + local.get $9 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat4/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 f64) + (local $16 f64) + (local $17 f64) + (local $18 f64) + (local $19 f64) + (local $20 f64) + (local $21 f64) + (local $22 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.set $12 + local.get $1 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.set $13 + local.get $1 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.set $14 + local.get $1 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + local.set $15 + local.get $1 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + local.set $16 + local.get $1 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + local.set $17 + local.get $1 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + local.set $18 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $19 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $20 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $21 + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $22 + local.get $0 + i32.const 0 + local.get $19 + local.get $3 + f64.mul + local.get $20 + local.get $7 + f64.mul + f64.add + local.get $21 + local.get $11 + f64.mul + f64.add + local.get $22 + local.get $15 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $19 + local.get $4 + f64.mul + local.get $20 + local.get $8 + f64.mul + f64.add + local.get $21 + local.get $12 + f64.mul + f64.add + local.get $22 + local.get $16 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $19 + local.get $5 + f64.mul + local.get $20 + local.get $9 + f64.mul + f64.add + local.get $21 + local.get $13 + f64.mul + f64.add + local.get $22 + local.get $17 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $19 + local.get $6 + f64.mul + local.get $20 + local.get $10 + f64.mul + f64.add + local.get $21 + local.get $14 + f64.mul + f64.add + local.get $22 + local.get $18 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $2 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $19 + local.get $2 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $20 + local.get $2 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $21 + local.get $2 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $22 + local.get $0 + i32.const 4 + local.get $19 + local.get $3 + f64.mul + local.get $20 + local.get $7 + f64.mul + f64.add + local.get $21 + local.get $11 + f64.mul + f64.add + local.get $22 + local.get $15 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $19 + local.get $4 + f64.mul + local.get $20 + local.get $8 + f64.mul + f64.add + local.get $21 + local.get $12 + f64.mul + f64.add + local.get $22 + local.get $16 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $19 + local.get $5 + f64.mul + local.get $20 + local.get $9 + f64.mul + f64.add + local.get $21 + local.get $13 + f64.mul + f64.add + local.get $22 + local.get $17 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $19 + local.get $6 + f64.mul + local.get $20 + local.get $10 + f64.mul + f64.add + local.get $21 + local.get $14 + f64.mul + f64.add + local.get $22 + local.get $18 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $2 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.set $19 + local.get $2 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.set $20 + local.get $2 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.set $21 + local.get $2 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.set $22 + local.get $0 + i32.const 8 + local.get $19 + local.get $3 + f64.mul + local.get $20 + local.get $7 + f64.mul + f64.add + local.get $21 + local.get $11 + f64.mul + f64.add + local.get $22 + local.get $15 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $19 + local.get $4 + f64.mul + local.get $20 + local.get $8 + f64.mul + f64.add + local.get $21 + local.get $12 + f64.mul + f64.add + local.get $22 + local.get $16 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + local.get $19 + local.get $5 + f64.mul + local.get $20 + local.get $9 + f64.mul + f64.add + local.get $21 + local.get $13 + f64.mul + f64.add + local.get $22 + local.get $17 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + local.get $19 + local.get $6 + f64.mul + local.get $20 + local.get $10 + f64.mul + f64.add + local.get $21 + local.get $14 + f64.mul + f64.add + local.get $22 + local.get $18 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $2 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + local.set $19 + local.get $2 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + local.set $20 + local.get $2 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + local.set $21 + local.get $2 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + local.set $22 + local.get $0 + i32.const 12 + local.get $19 + local.get $3 + f64.mul + local.get $20 + local.get $7 + f64.mul + f64.add + local.get $21 + local.get $11 + f64.mul + f64.add + local.get $22 + local.get $15 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $19 + local.get $4 + f64.mul + local.get $20 + local.get $8 + f64.mul + f64.add + local.get $21 + local.get $12 + f64.mul + f64.add + local.get $22 + local.get $16 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $19 + local.get $5 + f64.mul + local.get $20 + local.get $9 + f64.mul + f64.add + local.get $21 + local.get $13 + f64.mul + f64.add + local.get $22 + local.get $17 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + local.get $19 + local.get $6 + f64.mul + local.get $20 + local.get $10 + f64.mul + f64.add + local.get $21 + local.get $14 + f64.mul + f64.add + local.get $22 + local.get $18 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat4/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + local.get $1 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + local.get $1 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + local.get $1 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $1 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $1 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + local.get $1 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $start:assembly/mat4 + call $start:assembly/quat + ) + (func $assembly/mat3/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 f64) + (local $16 f64) + (local $17 f64) + (local $18 f64) + (local $19 f64) + (local $20 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $12 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $13 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $14 + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $15 + local.get $2 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $16 + local.get $2 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $17 + local.get $2 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $18 + local.get $2 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $19 + local.get $2 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.set $20 + local.get $0 + i32.const 0 + local.get $12 + local.get $3 + f64.mul + local.get $13 + local.get $6 + f64.mul + f64.add + local.get $14 + local.get $9 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $12 + local.get $4 + f64.mul + local.get $13 + local.get $7 + f64.mul + f64.add + local.get $14 + local.get $10 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $12 + local.get $5 + f64.mul + local.get $13 + local.get $8 + f64.mul + f64.add + local.get $14 + local.get $11 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $15 + local.get $3 + f64.mul + local.get $16 + local.get $6 + f64.mul + f64.add + local.get $17 + local.get $9 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $15 + local.get $4 + f64.mul + local.get $16 + local.get $7 + f64.mul + f64.add + local.get $17 + local.get $10 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $15 + local.get $5 + f64.mul + local.get $16 + local.get $8 + f64.mul + f64.add + local.get $17 + local.get $11 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $18 + local.get $3 + f64.mul + local.get $19 + local.get $6 + f64.mul + f64.add + local.get $20 + local.get $9 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $18 + local.get $4 + f64.mul + local.get $19 + local.get $7 + f64.mul + f64.add + local.get $20 + local.get $10 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $18 + local.get $5 + f64.mul + local.get $19 + local.get $8 + f64.mul + f64.add + local.get $20 + local.get $11 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat3/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $start:assembly/mat3 + call $start:assembly/mat4 + ) + (func $~lib/math/NativeMath.hypot (param $0 f64) (param $1 f64) (result f64) + (local $2 i64) + (local $3 i64) + (local $4 i64) + (local $5 i32) + (local $6 i32) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + local.get $0 + i64.reinterpret_f64 + local.set $2 + local.get $1 + i64.reinterpret_f64 + local.set $3 + local.get $2 + i64.const 9223372036854775807 + i64.and + local.set $2 + local.get $3 + i64.const 9223372036854775807 + i64.and + local.set $3 + local.get $2 + local.get $3 + i64.lt_u + if + local.get $2 + local.set $4 + local.get $3 + local.set $2 + local.get $4 + local.set $3 + end + local.get $2 + i64.const 52 + i64.shr_u + i32.wrap_i64 + local.set $5 + local.get $3 + i64.const 52 + i64.shr_u + i32.wrap_i64 + local.set $6 + local.get $3 + f64.reinterpret_i64 + local.set $1 + local.get $6 + i32.const 2047 + i32.eq + if + local.get $1 + return + end + local.get $2 + f64.reinterpret_i64 + local.set $0 + local.get $5 + i32.const 2047 + i32.eq + if (result i32) + i32.const 1 + else + local.get $3 + i64.const 0 + i64.eq + end + if + local.get $0 + return + end + local.get $5 + local.get $6 + i32.sub + i32.const 64 + i32.gt_s + if + local.get $0 + local.get $1 + f64.add + return + end + f64.const 1 + local.set $7 + local.get $5 + i32.const 1023 + i32.const 510 + i32.add + i32.gt_s + if + f64.const 5260135901548373507240989e186 + local.set $7 + local.get $0 + f64.const 1.90109156629516e-211 + f64.mul + local.set $0 + local.get $1 + f64.const 1.90109156629516e-211 + f64.mul + local.set $1 + else + local.get $6 + i32.const 1023 + i32.const 450 + i32.sub + i32.lt_s + if + f64.const 1.90109156629516e-211 + local.set $7 + local.get $0 + f64.const 5260135901548373507240989e186 + f64.mul + local.set $0 + local.get $1 + f64.const 5260135901548373507240989e186 + f64.mul + local.set $1 + end + end + local.get $0 + f64.const 134217729 + f64.mul + local.set $8 + local.get $0 + local.get $8 + f64.sub + local.get $8 + f64.add + local.set $9 + local.get $0 + local.get $9 + f64.sub + local.set $10 + local.get $0 + local.get $0 + f64.mul + local.set $11 + local.get $9 + local.get $9 + f64.mul + local.get $11 + f64.sub + f64.const 2 + local.get $9 + f64.mul + local.get $10 + f64.add + local.get $10 + f64.mul + f64.add + local.set $12 + local.get $1 + f64.const 134217729 + f64.mul + local.set $8 + local.get $1 + local.get $8 + f64.sub + local.get $8 + f64.add + local.set $9 + local.get $1 + local.get $9 + f64.sub + local.set $10 + local.get $1 + local.get $1 + f64.mul + local.set $13 + local.get $9 + local.get $9 + f64.mul + local.get $13 + f64.sub + f64.const 2 + local.get $9 + f64.mul + local.get $10 + f64.add + local.get $10 + f64.mul + f64.add + local.set $14 + local.get $7 + local.get $14 + local.get $12 + f64.add + local.get $13 + f64.add + local.get $11 + f64.add + f64.sqrt + f64.mul + ) + (func $assembly/vec2/length (param $0 i32) (result f64) + (local $1 f64) + (local $2 f64) + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $1 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $1 + local.get $2 + call $~lib/math/NativeMath.hypot + ) + (func $assembly/vec2/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec2/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec2/divide (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec2/distance (param $0 i32) (param $1 i32) (result f64) + (local $2 f64) + (local $3 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.sub + local.set $2 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.sub + local.set $3 + local.get $2 + local.get $3 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $assembly/imports/MathUtil.hypot + ) + (func $assembly/vec2/squaredDistance (param $0 i32) (param $1 i32) (result f64) + (local $2 f64) + (local $3 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.sub + local.set $2 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.sub + local.set $3 + local.get $2 + local.get $2 + f64.mul + local.get $3 + local.get $3 + f64.mul + f64.add + ) + (func $assembly/vec2/squaredLength (param $0 i32) (result f64) + (local $1 f64) + (local $2 f64) + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $1 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $1 + local.get $1 + f64.mul + local.get $2 + local.get $2 + f64.mul + f64.add + ) + (func $assembly/vec2/forEach (result i32) + i32.const 2400 + ) + (func $start:assembly/vec2 + call $start:assembly/mat3 + call $assembly/vec2/create + global.set $assembly/vec2/vec + call $assembly/vec2/forEach + drop + ) + (func $assembly/mat2/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $0 + i32.const 0 + local.get $3 + local.get $7 + f64.mul + local.get $5 + local.get $8 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $4 + local.get $7 + f64.mul + local.get $6 + local.get $8 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $3 + local.get $9 + f64.mul + local.get $5 + local.get $10 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $4 + local.get $9 + f64.mul + local.get $6 + local.get $10 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat2/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $start:assembly/mat2 + call $start:assembly/vec2 + ) + (func $start:assembly/index.as + call $start:assembly/mat2 + ) + (func $assembly/common/toRadian (param $0 f64) (result f64) + local.get $0 + global.get $assembly/common/degree + f64.mul + ) + (func $assembly/common/equals (param $0 f64) (param $1 f64) (result i32) + (local $2 f64) + local.get $0 + local.get $1 + f64.sub + local.set $2 + local.get $2 + f64.abs + global.get $assembly/common/EPSILON + f64.const 1 + local.get $0 + local.set $2 + local.get $2 + f64.abs + local.get $1 + local.set $2 + local.get $2 + f64.abs + call $assembly/imports/MathUtil.max + f64.mul + f64.le + ) + (func $assembly/mat2/copy (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat2/identity (param $0 i32) (result i32) + local.get $0 + i32.const 0 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat2/set (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (result i32) + local.get $0 + i32.const 0 + local.get $1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $2 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $3 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $4 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat2/transpose (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + local.get $0 + local.get $1 + i32.eq + if + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $0 + i32.const 1 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $2 + call $~lib/typedarray/Float64Array#__set + else + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + end + local.get $0 + ) + (func $assembly/mat2/invert (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $2 + local.get $5 + f64.mul + local.get $4 + local.get $3 + f64.mul + f64.sub + local.set $6 + local.get $6 + i64.reinterpret_f64 + i64.const 1 + i64.shl + i64.const 2 + i64.sub + i64.const -9007199254740994 + i64.le_u + i32.eqz + if + i32.const 0 + return + end + f64.const 1 + local.get $6 + f64.div + local.set $6 + local.get $0 + i32.const 0 + local.get $5 + local.get $6 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $3 + f64.neg + local.get $6 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $4 + f64.neg + local.get $6 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $2 + local.get $6 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat2/adjoint (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $0 + i32.const 0 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $2 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat2/determinant (param $0 i32) (result f64) + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.mul + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.sub + ) + (func $assembly/mat2/rotate (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $2 + call $~lib/math/NativeMath.sin + local.set $7 + local.get $2 + call $~lib/math/NativeMath.cos + local.set $8 + local.get $0 + i32.const 0 + local.get $3 + local.get $8 + f64.mul + local.get $5 + local.get $7 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $4 + local.get $8 + f64.mul + local.get $6 + local.get $7 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $3 + local.get $7 + f64.neg + f64.mul + local.get $5 + local.get $8 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $4 + local.get $7 + f64.neg + f64.mul + local.get $6 + local.get $8 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat2/scale (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $0 + i32.const 0 + local.get $3 + local.get $7 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $4 + local.get $7 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $5 + local.get $8 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $6 + local.get $8 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat2/fromRotation (param $0 i32) (param $1 f64) (result i32) + (local $2 f64) + (local $3 f64) + local.get $1 + call $~lib/math/NativeMath.sin + local.set $2 + local.get $1 + call $~lib/math/NativeMath.cos + local.set $3 + local.get $0 + i32.const 0 + local.get $3 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $2 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $2 + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $3 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat2/fromScaling (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $~lib/util/number/decimalCount32 (param $0 i32) (result i32) + local.get $0 + i32.const 100000 + i32.lt_u + if + local.get $0 + i32.const 100 + i32.lt_u + if + i32.const 1 + local.get $0 + i32.const 10 + i32.ge_u + i32.add + return + else + i32.const 3 + local.get $0 + i32.const 10000 + i32.ge_u + i32.add + local.get $0 + i32.const 1000 + i32.ge_u + i32.add + return + end + unreachable + else + local.get $0 + i32.const 10000000 + i32.lt_u + if + i32.const 6 + local.get $0 + i32.const 1000000 + i32.ge_u + i32.add + return + else + i32.const 8 + local.get $0 + i32.const 1000000000 + i32.ge_u + i32.add + local.get $0 + i32.const 100000000 + i32.ge_u + i32.add + return + end + unreachable + end + unreachable + ) + (func $~lib/util/number/genDigits (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) + (local $7 i32) + (local $8 i64) + (local $9 i64) + (local $10 i64) + (local $11 i32) + (local $12 i64) + (local $13 i32) + (local $14 i32) + (local $15 i32) + (local $16 i32) + (local $17 i32) + (local $18 i64) + (local $19 i64) + (local $20 i64) + (local $21 i64) + (local $22 i64) + (local $23 i32) + (local $24 i32) + (local $25 i32) + (local $26 i32) + (local $27 i64) + i32.const 0 + local.get $4 + i32.sub + local.set $7 + i64.const 1 + local.get $7 + i64.extend_i32_s + i64.shl + local.set $8 + local.get $8 + i64.const 1 + i64.sub + local.set $9 + local.get $3 + local.get $1 + i64.sub + local.set $10 + local.get $3 + local.get $7 + i64.extend_i32_s + i64.shr_u + i32.wrap_i64 + local.set $11 + local.get $3 + local.get $9 + i64.and + local.set $12 + local.get $11 + call $~lib/util/number/decimalCount32 + local.set $13 + local.get $6 + local.set $14 + loop $while-continue|0 + local.get $13 + i32.const 0 + i32.gt_s + local.set $15 + local.get $15 + if + block $break|1 + block $case10|1 + block $case9|1 + block $case8|1 + block $case7|1 + block $case6|1 + block $case5|1 + block $case4|1 + block $case3|1 + block $case2|1 + block $case1|1 + block $case0|1 + local.get $13 + local.set $17 + local.get $17 + i32.const 10 + i32.eq + br_if $case0|1 + local.get $17 + i32.const 9 + i32.eq + br_if $case1|1 + local.get $17 + i32.const 8 + i32.eq + br_if $case2|1 + local.get $17 + i32.const 7 + i32.eq + br_if $case3|1 + local.get $17 + i32.const 6 + i32.eq + br_if $case4|1 + local.get $17 + i32.const 5 + i32.eq + br_if $case5|1 + local.get $17 + i32.const 4 + i32.eq + br_if $case6|1 + local.get $17 + i32.const 3 + i32.eq + br_if $case7|1 + local.get $17 + i32.const 2 + i32.eq + br_if $case8|1 + local.get $17 + i32.const 1 + i32.eq + br_if $case9|1 + br $case10|1 + end + local.get $11 + i32.const 1000000000 + i32.div_u + local.set $16 + local.get $11 + i32.const 1000000000 + i32.rem_u + local.set $11 + br $break|1 + end + local.get $11 + i32.const 100000000 + i32.div_u + local.set $16 + local.get $11 + i32.const 100000000 + i32.rem_u + local.set $11 + br $break|1 + end + local.get $11 + i32.const 10000000 + i32.div_u + local.set $16 + local.get $11 + i32.const 10000000 + i32.rem_u + local.set $11 + br $break|1 + end + local.get $11 + i32.const 1000000 + i32.div_u + local.set $16 + local.get $11 + i32.const 1000000 + i32.rem_u + local.set $11 + br $break|1 + end + local.get $11 + i32.const 100000 + i32.div_u + local.set $16 + local.get $11 + i32.const 100000 + i32.rem_u + local.set $11 + br $break|1 + end + local.get $11 + i32.const 10000 + i32.div_u + local.set $16 + local.get $11 + i32.const 10000 + i32.rem_u + local.set $11 + br $break|1 + end + local.get $11 + i32.const 1000 + i32.div_u + local.set $16 + local.get $11 + i32.const 1000 + i32.rem_u + local.set $11 + br $break|1 + end + local.get $11 + i32.const 100 + i32.div_u + local.set $16 + local.get $11 + i32.const 100 + i32.rem_u + local.set $11 + br $break|1 + end + local.get $11 + i32.const 10 + i32.div_u + local.set $16 + local.get $11 + i32.const 10 + i32.rem_u + local.set $11 + br $break|1 + end + local.get $11 + local.set $16 + i32.const 0 + local.set $11 + br $break|1 + end + i32.const 0 + local.set $16 + br $break|1 + end + local.get $16 + local.get $14 + i32.or + if + local.get $0 + local.get $14 + local.tee $17 + i32.const 1 + i32.add + local.set $14 + local.get $17 + i32.const 1 + i32.shl + i32.add + i32.const 48 + local.get $16 + i32.const 65535 + i32.and + i32.add + i32.store16 + end + local.get $13 + i32.const 1 + i32.sub + local.set $13 + local.get $11 + i64.extend_i32_u + local.get $7 + i64.extend_i32_s + i64.shl + local.get $12 + i64.add + local.set $18 + local.get $18 + local.get $5 + i64.le_u + if + global.get $~lib/util/number/_K + local.get $13 + i32.add + global.set $~lib/util/number/_K + local.get $0 + local.set $23 + local.get $14 + local.set $17 + local.get $5 + local.set $22 + local.get $18 + local.set $21 + i32.const 3600 + local.get $13 + i32.const 2 + i32.shl + i32.add + i64.load32_u + local.get $7 + i64.extend_i32_s + i64.shl + local.set $20 + local.get $10 + local.set $19 + local.get $23 + local.get $17 + i32.const 1 + i32.sub + i32.const 1 + i32.shl + i32.add + local.set $24 + local.get $24 + i32.load16_u + local.set $25 + loop $while-continue|3 + local.get $21 + local.get $19 + i64.lt_u + if (result i32) + local.get $22 + local.get $21 + i64.sub + local.get $20 + i64.ge_u + else + i32.const 0 + end + if (result i32) + local.get $21 + local.get $20 + i64.add + local.get $19 + i64.lt_u + if (result i32) + i32.const 1 + else + local.get $19 + local.get $21 + i64.sub + local.get $21 + local.get $20 + i64.add + local.get $19 + i64.sub + i64.gt_u + end + else + i32.const 0 + end + local.set $26 + local.get $26 + if + local.get $25 + i32.const 1 + i32.sub + local.set $25 + local.get $21 + local.get $20 + i64.add + local.set $21 + br $while-continue|3 + end + end + local.get $24 + local.get $25 + i32.store16 + local.get $14 + return + end + br $while-continue|0 + end + end + loop $while-continue|4 + i32.const 1 + local.set $15 + local.get $15 + if + local.get $12 + i64.const 10 + i64.mul + local.set $12 + local.get $5 + i64.const 10 + i64.mul + local.set $5 + local.get $12 + local.get $7 + i64.extend_i32_s + i64.shr_u + local.set $22 + local.get $22 + local.get $14 + i64.extend_i32_s + i64.or + i64.const 0 + i64.ne + if + local.get $0 + local.get $14 + local.tee $25 + i32.const 1 + i32.add + local.set $14 + local.get $25 + i32.const 1 + i32.shl + i32.add + i32.const 48 + local.get $22 + i32.wrap_i64 + i32.const 65535 + i32.and + i32.add + i32.store16 + end + local.get $12 + local.get $9 + i64.and + local.set $12 + local.get $13 + i32.const 1 + i32.sub + local.set $13 + local.get $12 + local.get $5 + i64.lt_u + if + global.get $~lib/util/number/_K + local.get $13 + i32.add + global.set $~lib/util/number/_K + local.get $10 + i32.const 3600 + i32.const 0 + local.get $13 + i32.sub + i32.const 2 + i32.shl + i32.add + i64.load32_u + i64.mul + local.set $10 + local.get $0 + local.set $17 + local.get $14 + local.set $26 + local.get $5 + local.set $27 + local.get $12 + local.set $21 + local.get $8 + local.set $20 + local.get $10 + local.set $19 + local.get $17 + local.get $26 + i32.const 1 + i32.sub + i32.const 1 + i32.shl + i32.add + local.set $25 + local.get $25 + i32.load16_u + local.set $24 + loop $while-continue|6 + local.get $21 + local.get $19 + i64.lt_u + if (result i32) + local.get $27 + local.get $21 + i64.sub + local.get $20 + i64.ge_u + else + i32.const 0 + end + if (result i32) + local.get $21 + local.get $20 + i64.add + local.get $19 + i64.lt_u + if (result i32) + i32.const 1 + else + local.get $19 + local.get $21 + i64.sub + local.get $21 + local.get $20 + i64.add + local.get $19 + i64.sub + i64.gt_u + end + else + i32.const 0 + end + local.set $23 + local.get $23 + if + local.get $24 + i32.const 1 + i32.sub + local.set $24 + local.get $21 + local.get $20 + i64.add + local.set $21 + br $while-continue|6 + end + end + local.get $25 + local.get $24 + i32.store16 + local.get $14 + return + end + br $while-continue|4 + end + end + unreachable + ) + (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + loop $while-continue|0 + local.get $2 + if (result i32) + local.get $1 + i32.const 3 + i32.and + else + i32.const 0 + end + local.set $5 + local.get $5 + if + local.get $0 + local.tee $6 + i32.const 1 + i32.add + local.set $0 + local.get $6 + local.get $1 + local.tee $6 + i32.const 1 + i32.add + local.set $1 + local.get $6 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|0 + end + end + local.get $0 + i32.const 3 + i32.and + i32.const 0 + i32.eq + if + loop $while-continue|1 + local.get $2 + i32.const 16 + i32.ge_u + local.set $5 + local.get $5 + if + local.get $0 + local.get $1 + i32.load + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 4 + i32.add + i32.load + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $1 + i32.const 8 + i32.add + i32.load + i32.store + local.get $0 + i32.const 12 + i32.add + local.get $1 + i32.const 12 + i32.add + i32.load + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + br $while-continue|1 + end + end + local.get $2 + i32.const 8 + i32.and + if + local.get $0 + local.get $1 + i32.load + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 4 + i32.add + i32.load + i32.store + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + end + local.get $2 + i32.const 4 + i32.and + if + local.get $0 + local.get $1 + i32.load + i32.store + local.get $0 + i32.const 4 + i32.add + local.set $0 + local.get $1 + i32.const 4 + i32.add + local.set $1 + end + local.get $2 + i32.const 2 + i32.and + if + local.get $0 + local.get $1 + i32.load16_u + i32.store16 + local.get $0 + i32.const 2 + i32.add + local.set $0 + local.get $1 + i32.const 2 + i32.add + local.set $1 + end + local.get $2 + i32.const 1 + i32.and + if + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + i32.load8_u + i32.store8 + end + return + end + local.get $2 + i32.const 32 + i32.ge_u + if + block $break|2 + block $case2|2 + block $case1|2 + block $case0|2 + local.get $0 + i32.const 3 + i32.and + local.set $5 + local.get $5 + i32.const 1 + i32.eq + br_if $case0|2 + local.get $5 + i32.const 2 + i32.eq + br_if $case1|2 + local.get $5 + i32.const 3 + i32.eq + br_if $case2|2 + br $break|2 + end + local.get $1 + i32.load + local.set $3 + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + i32.load8_u + i32.store8 + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + i32.load8_u + i32.store8 + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + i32.load8_u + i32.store8 + local.get $2 + i32.const 3 + i32.sub + local.set $2 + loop $while-continue|3 + local.get $2 + i32.const 17 + i32.ge_u + local.set $5 + local.get $5 + if + local.get $1 + i32.const 1 + i32.add + i32.load + local.set $4 + local.get $0 + local.get $3 + i32.const 24 + i32.shr_u + local.get $4 + i32.const 8 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 5 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 4 + i32.add + local.get $4 + i32.const 24 + i32.shr_u + local.get $3 + i32.const 8 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 9 + i32.add + i32.load + local.set $4 + local.get $0 + i32.const 8 + i32.add + local.get $3 + i32.const 24 + i32.shr_u + local.get $4 + i32.const 8 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 13 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 12 + i32.add + local.get $4 + i32.const 24 + i32.shr_u + local.get $3 + i32.const 8 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + br $while-continue|3 + end + end + br $break|2 + end + local.get $1 + i32.load + local.set $3 + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + i32.load8_u + i32.store8 + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + i32.load8_u + i32.store8 + local.get $2 + i32.const 2 + i32.sub + local.set $2 + loop $while-continue|4 + local.get $2 + i32.const 18 + i32.ge_u + local.set $5 + local.get $5 + if + local.get $1 + i32.const 2 + i32.add + i32.load + local.set $4 + local.get $0 + local.get $3 + i32.const 16 + i32.shr_u + local.get $4 + i32.const 16 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 6 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 4 + i32.add + local.get $4 + i32.const 16 + i32.shr_u + local.get $3 + i32.const 16 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 10 + i32.add + i32.load + local.set $4 + local.get $0 + i32.const 8 + i32.add + local.get $3 + i32.const 16 + i32.shr_u + local.get $4 + i32.const 16 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 14 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 12 + i32.add + local.get $4 + i32.const 16 + i32.shr_u + local.get $3 + i32.const 16 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + br $while-continue|4 + end + end + br $break|2 + end + local.get $1 + i32.load + local.set $3 + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + loop $while-continue|5 + local.get $2 + i32.const 19 + i32.ge_u + local.set $5 + local.get $5 + if + local.get $1 + i32.const 3 + i32.add + i32.load + local.set $4 + local.get $0 + local.get $3 + i32.const 8 + i32.shr_u + local.get $4 + i32.const 24 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 7 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 4 + i32.add + local.get $4 + i32.const 8 + i32.shr_u + local.get $3 + i32.const 24 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 11 + i32.add + i32.load + local.set $4 + local.get $0 + i32.const 8 + i32.add + local.get $3 + i32.const 8 + i32.shr_u + local.get $4 + i32.const 24 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 15 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 12 + i32.add + local.get $4 + i32.const 8 + i32.shr_u + local.get $3 + i32.const 24 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + br $while-continue|5 + end + end + br $break|2 + end + end + local.get $2 + i32.const 16 + i32.and + if + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + i32.load8_u + i32.store8 + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + i32.load8_u + i32.store8 + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + i32.load8_u + i32.store8 + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + i32.load8_u + i32.store8 + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + i32.load8_u + i32.store8 + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + i32.load8_u + i32.store8 + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + i32.load8_u + i32.store8 + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + i32.load8_u + i32.store8 + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + i32.load8_u + i32.store8 + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + i32.load8_u + i32.store8 + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + i32.load8_u + i32.store8 + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + i32.load8_u + i32.store8 + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + i32.load8_u + i32.store8 + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + i32.load8_u + i32.store8 + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + i32.load8_u + i32.store8 + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 8 + i32.and + if + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + i32.load8_u + i32.store8 + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + i32.load8_u + i32.store8 + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + i32.load8_u + i32.store8 + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + i32.load8_u + i32.store8 + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + i32.load8_u + i32.store8 + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + i32.load8_u + i32.store8 + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + i32.load8_u + i32.store8 + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 4 + i32.and + if + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + i32.load8_u + i32.store8 + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + i32.load8_u + i32.store8 + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + i32.load8_u + i32.store8 + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 2 + i32.and + if + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + i32.load8_u + i32.store8 + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 1 + i32.and + if + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + i32.load8_u + i32.store8 + end + ) + (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.set $5 + local.get $1 + local.set $4 + local.get $2 + local.set $3 + local.get $5 + local.get $4 + i32.eq + if + br $~lib/util/memory/memmove|inlined.0 + end + i32.const 0 + i32.const 1 + i32.lt_s + drop + local.get $4 + local.get $5 + i32.sub + local.get $3 + i32.sub + i32.const 0 + local.get $3 + i32.const 1 + i32.shl + i32.sub + i32.le_u + if + local.get $5 + local.get $4 + local.get $3 + call $~lib/util/memory/memcpy + br $~lib/util/memory/memmove|inlined.0 + end + local.get $5 + local.get $4 + i32.lt_u + if + i32.const 0 + i32.const 2 + i32.lt_s + drop + local.get $4 + i32.const 7 + i32.and + local.get $5 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|0 + local.get $5 + i32.const 7 + i32.and + local.set $6 + local.get $6 + if + local.get $3 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $3 + i32.const 1 + i32.sub + local.set $3 + local.get $5 + local.tee $7 + i32.const 1 + i32.add + local.set $5 + local.get $7 + local.get $4 + local.tee $7 + i32.const 1 + i32.add + local.set $4 + local.get $7 + i32.load8_u + i32.store8 + br $while-continue|0 + end + end + loop $while-continue|1 + local.get $3 + i32.const 8 + i32.ge_u + local.set $6 + local.get $6 + if + local.get $5 + local.get $4 + i64.load + i64.store + local.get $3 + i32.const 8 + i32.sub + local.set $3 + local.get $5 + i32.const 8 + i32.add + local.set $5 + local.get $4 + i32.const 8 + i32.add + local.set $4 + br $while-continue|1 + end + end + end + loop $while-continue|2 + local.get $3 + local.set $6 + local.get $6 + if + local.get $5 + local.tee $7 + i32.const 1 + i32.add + local.set $5 + local.get $7 + local.get $4 + local.tee $7 + i32.const 1 + i32.add + local.set $4 + local.get $7 + i32.load8_u + i32.store8 + local.get $3 + i32.const 1 + i32.sub + local.set $3 + br $while-continue|2 + end + end + else + i32.const 0 + i32.const 2 + i32.lt_s + drop + local.get $4 + i32.const 7 + i32.and + local.get $5 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|3 + local.get $5 + local.get $3 + i32.add + i32.const 7 + i32.and + local.set $6 + local.get $6 + if + local.get $3 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $5 + local.get $3 + i32.const 1 + i32.sub + local.tee $3 + i32.add + local.get $4 + local.get $3 + i32.add + i32.load8_u + i32.store8 + br $while-continue|3 + end + end + loop $while-continue|4 + local.get $3 + i32.const 8 + i32.ge_u + local.set $6 + local.get $6 + if + local.get $3 + i32.const 8 + i32.sub + local.set $3 + local.get $5 + local.get $3 + i32.add + local.get $4 + local.get $3 + i32.add + i64.load + i64.store + br $while-continue|4 + end + end + end + loop $while-continue|5 + local.get $3 + local.set $6 + local.get $6 + if + local.get $5 + local.get $3 + i32.const 1 + i32.sub + local.tee $3 + i32.add + local.get $4 + local.get $3 + i32.add + i32.load8_u + i32.store8 + br $while-continue|5 + end + end + end + end + ) + (func $~lib/util/number/utoa32_dec_lut (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i64) + (local $9 i64) + (local $10 i32) + (local $11 i32) + loop $while-continue|0 + local.get $1 + i32.const 10000 + i32.ge_u + local.set $3 + local.get $3 + if + local.get $1 + i32.const 10000 + i32.div_u + local.set $4 + local.get $1 + i32.const 10000 + i32.rem_u + local.set $5 + local.get $4 + local.set $1 + local.get $5 + i32.const 100 + i32.div_u + local.set $6 + local.get $5 + i32.const 100 + i32.rem_u + local.set $7 + i32.const 3640 + local.get $6 + i32.const 2 + i32.shl + i32.add + i64.load32_u + local.set $8 + i32.const 3640 + local.get $7 + i32.const 2 + i32.shl + i32.add + i64.load32_u + local.set $9 + local.get $2 + i32.const 4 + i32.sub + local.set $2 + local.get $0 + local.get $2 + i32.const 1 + i32.shl + i32.add + local.get $8 + local.get $9 + i64.const 32 + i64.shl + i64.or + i64.store + br $while-continue|0 + end + end + local.get $1 + i32.const 100 + i32.ge_u + if + local.get $1 + i32.const 100 + i32.div_u + local.set $3 + local.get $1 + i32.const 100 + i32.rem_u + local.set $10 + local.get $3 + local.set $1 + local.get $2 + i32.const 2 + i32.sub + local.set $2 + i32.const 3640 + local.get $10 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $11 + local.get $0 + local.get $2 + i32.const 1 + i32.shl + i32.add + local.get $11 + i32.store + end + local.get $1 + i32.const 10 + i32.ge_u + if + local.get $2 + i32.const 2 + i32.sub + local.set $2 + i32.const 3640 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $11 + local.get $0 + local.get $2 + i32.const 1 + i32.shl + i32.add + local.get $11 + i32.store + else + local.get $2 + i32.const 1 + i32.sub + local.set $2 + i32.const 48 + local.get $1 + i32.add + local.set $11 + local.get $0 + local.get $2 + i32.const 1 + i32.shl + i32.add + local.get $11 + i32.store16 + end + ) + (func $~lib/util/number/prettify (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + local.get $2 + i32.eqz + if + local.get $0 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.const 46 + i32.const 48 + i32.const 16 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 2 + i32.add + return + end + local.get $1 + local.get $2 + i32.add + local.set $3 + local.get $1 + local.get $3 + i32.le_s + if (result i32) + local.get $3 + i32.const 21 + i32.le_s + else + i32.const 0 + end + if + local.get $1 + local.set $4 + loop $for-loop|0 + local.get $4 + local.get $3 + i32.lt_s + local.set $5 + local.get $5 + if + local.get $0 + local.get $4 + i32.const 1 + i32.shl + i32.add + i32.const 48 + i32.store16 + local.get $4 + i32.const 1 + i32.add + local.set $4 + br $for-loop|0 + end + end + local.get $0 + local.get $3 + i32.const 1 + i32.shl + i32.add + i32.const 46 + i32.const 48 + i32.const 16 + i32.shl + i32.or + i32.store + local.get $3 + i32.const 2 + i32.add + return + else + local.get $3 + i32.const 0 + i32.gt_s + if (result i32) + local.get $3 + i32.const 21 + i32.le_s + else + i32.const 0 + end + if + local.get $0 + local.get $3 + i32.const 1 + i32.shl + i32.add + local.set $4 + local.get $4 + i32.const 2 + i32.add + local.get $4 + i32.const 0 + local.get $2 + i32.sub + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $0 + local.get $3 + i32.const 1 + i32.shl + i32.add + i32.const 46 + i32.store16 + local.get $1 + i32.const 1 + i32.add + return + else + i32.const -6 + local.get $3 + i32.lt_s + if (result i32) + local.get $3 + i32.const 0 + i32.le_s + else + i32.const 0 + end + if + i32.const 2 + local.get $3 + i32.sub + local.set $4 + local.get $0 + local.get $4 + i32.const 1 + i32.shl + i32.add + local.get $0 + local.get $1 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $0 + i32.const 48 + i32.const 46 + i32.const 16 + i32.shl + i32.or + i32.store + i32.const 2 + local.set $5 + loop $for-loop|1 + local.get $5 + local.get $4 + i32.lt_s + local.set $6 + local.get $6 + if + local.get $0 + local.get $5 + i32.const 1 + i32.shl + i32.add + i32.const 48 + i32.store16 + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|1 + end + end + local.get $1 + local.get $4 + i32.add + return + else + local.get $1 + i32.const 1 + i32.eq + if + local.get $0 + i32.const 101 + i32.store16 offset=2 + local.get $0 + i32.const 4 + i32.add + local.set $5 + local.get $3 + i32.const 1 + i32.sub + local.set $6 + local.get $6 + i32.const 0 + i32.lt_s + local.set $4 + local.get $4 + if + i32.const 0 + local.get $6 + i32.sub + local.set $6 + end + local.get $6 + call $~lib/util/number/decimalCount32 + i32.const 1 + i32.add + local.set $7 + local.get $5 + local.set $10 + local.get $6 + local.set $9 + local.get $7 + local.set $8 + i32.const 0 + i32.const 1 + i32.ge_s + drop + local.get $10 + local.get $9 + local.get $8 + call $~lib/util/number/utoa32_dec_lut + local.get $5 + i32.const 45 + i32.const 43 + local.get $4 + select + i32.store16 + local.get $7 + local.set $1 + local.get $1 + i32.const 2 + i32.add + return + else + local.get $1 + i32.const 1 + i32.shl + local.set $7 + local.get $0 + i32.const 4 + i32.add + local.get $0 + i32.const 2 + i32.add + local.get $7 + i32.const 2 + i32.sub + call $~lib/memory/memory.copy + local.get $0 + i32.const 46 + i32.store16 offset=2 + local.get $0 + local.get $7 + i32.add + i32.const 101 + i32.store16 offset=2 + local.get $1 + local.get $0 + local.get $7 + i32.add + i32.const 4 + i32.add + local.set $9 + local.get $3 + i32.const 1 + i32.sub + local.set $8 + local.get $8 + i32.const 0 + i32.lt_s + local.set $4 + local.get $4 + if + i32.const 0 + local.get $8 + i32.sub + local.set $8 + end + local.get $8 + call $~lib/util/number/decimalCount32 + i32.const 1 + i32.add + local.set $5 + local.get $9 + local.set $11 + local.get $8 + local.set $6 + local.get $5 + local.set $10 + i32.const 0 + i32.const 1 + i32.ge_s + drop + local.get $11 + local.get $6 + local.get $10 + call $~lib/util/number/utoa32_dec_lut + local.get $9 + i32.const 45 + i32.const 43 + local.get $4 + select + i32.store16 + local.get $5 + i32.add + local.set $1 + local.get $1 + i32.const 2 + i32.add + return + end + unreachable + end + unreachable + end + unreachable + end + unreachable + ) + (func $~lib/util/number/dtoa_core (param $0 i32) (param $1 f64) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 f64) + (local $6 i64) + (local $7 i32) + (local $8 i64) + (local $9 i64) + (local $10 i32) + (local $11 i64) + (local $12 i64) + (local $13 i32) + (local $14 i32) + (local $15 i32) + (local $16 f64) + (local $17 i64) + (local $18 i64) + (local $19 i64) + (local $20 i64) + (local $21 i64) + (local $22 i64) + (local $23 i64) + (local $24 i64) + (local $25 i64) + (local $26 i32) + (local $27 i64) + (local $28 i32) + local.get $1 + f64.const 0 + f64.lt + local.set $2 + local.get $2 + if + local.get $1 + f64.neg + local.set $1 + local.get $0 + i32.const 45 + i32.store16 + end + local.get $1 + local.set $5 + local.get $0 + local.set $4 + local.get $2 + local.set $3 + local.get $5 + i64.reinterpret_f64 + local.set $6 + local.get $6 + i64.const 9218868437227405312 + i64.and + i64.const 52 + i64.shr_u + i32.wrap_i64 + local.set $7 + local.get $6 + i64.const 4503599627370495 + i64.and + local.set $8 + local.get $7 + i32.const 0 + i32.ne + i64.extend_i32_u + i64.const 52 + i64.shl + local.get $8 + i64.add + local.set $9 + local.get $7 + i32.const 1 + local.get $7 + select + i32.const 1023 + i32.const 52 + i32.add + i32.sub + local.set $7 + local.get $9 + local.set $11 + local.get $7 + local.set $10 + local.get $11 + i64.const 1 + i64.shl + i64.const 1 + i64.add + local.set $12 + local.get $10 + i32.const 1 + i32.sub + local.set $13 + local.get $12 + i64.clz + i32.wrap_i64 + local.set $14 + local.get $12 + local.get $14 + i64.extend_i32_s + i64.shl + local.set $12 + local.get $13 + local.get $14 + i32.sub + local.set $13 + i32.const 1 + local.get $11 + i64.const 4503599627370496 + i64.eq + i32.add + local.set $15 + local.get $12 + global.set $~lib/util/number/_frc_plus + local.get $11 + local.get $15 + i64.extend_i32_s + i64.shl + i64.const 1 + i64.sub + local.get $10 + local.get $15 + i32.sub + local.get $13 + i32.sub + i64.extend_i32_s + i64.shl + global.set $~lib/util/number/_frc_minus + local.get $13 + global.set $~lib/util/number/_exp + global.get $~lib/util/number/_exp + local.set $10 + i32.const -61 + local.get $10 + i32.sub + f64.convert_i32_s + f64.const 0.30102999566398114 + f64.mul + f64.const 347 + f64.add + local.set $16 + local.get $16 + i32.trunc_f64_s + local.set $15 + local.get $15 + local.get $15 + f64.convert_i32_s + local.get $16 + f64.ne + i32.add + local.set $15 + local.get $15 + i32.const 3 + i32.shr_s + i32.const 1 + i32.add + local.set $14 + i32.const 348 + local.get $14 + i32.const 3 + i32.shl + i32.sub + global.set $~lib/util/number/_K + i32.const 2728 + local.get $14 + i32.const 3 + i32.shl + i32.add + i64.load + global.set $~lib/util/number/_frc_pow + i32.const 3424 + local.get $14 + i32.const 1 + i32.shl + i32.add + i32.load16_s + global.set $~lib/util/number/_exp_pow + local.get $9 + i64.clz + i32.wrap_i64 + local.set $14 + local.get $9 + local.get $14 + i64.extend_i32_s + i64.shl + local.set $9 + local.get $7 + local.get $14 + i32.sub + local.set $7 + global.get $~lib/util/number/_frc_pow + local.set $12 + global.get $~lib/util/number/_exp_pow + local.set $15 + local.get $9 + local.set $17 + local.get $12 + local.set $11 + local.get $17 + i64.const 4294967295 + i64.and + local.set $18 + local.get $11 + i64.const 4294967295 + i64.and + local.set $19 + local.get $17 + i64.const 32 + i64.shr_u + local.set $20 + local.get $11 + i64.const 32 + i64.shr_u + local.set $21 + local.get $18 + local.get $19 + i64.mul + local.set $22 + local.get $20 + local.get $19 + i64.mul + local.get $22 + i64.const 32 + i64.shr_u + i64.add + local.set $23 + local.get $18 + local.get $21 + i64.mul + local.get $23 + i64.const 4294967295 + i64.and + i64.add + local.set $24 + local.get $24 + i64.const 2147483647 + i64.add + local.set $24 + local.get $23 + i64.const 32 + i64.shr_u + local.set $23 + local.get $24 + i64.const 32 + i64.shr_u + local.set $24 + local.get $20 + local.get $21 + i64.mul + local.get $23 + i64.add + local.get $24 + i64.add + local.set $24 + local.get $7 + local.set $10 + local.get $15 + local.set $13 + local.get $10 + local.get $13 + i32.add + i32.const 64 + i32.add + local.set $10 + global.get $~lib/util/number/_frc_plus + local.set $17 + local.get $12 + local.set $11 + local.get $17 + i64.const 4294967295 + i64.and + local.set $23 + local.get $11 + i64.const 4294967295 + i64.and + local.set $22 + local.get $17 + i64.const 32 + i64.shr_u + local.set $21 + local.get $11 + i64.const 32 + i64.shr_u + local.set $20 + local.get $23 + local.get $22 + i64.mul + local.set $19 + local.get $21 + local.get $22 + i64.mul + local.get $19 + i64.const 32 + i64.shr_u + i64.add + local.set $18 + local.get $23 + local.get $20 + i64.mul + local.get $18 + i64.const 4294967295 + i64.and + i64.add + local.set $25 + local.get $25 + i64.const 2147483647 + i64.add + local.set $25 + local.get $18 + i64.const 32 + i64.shr_u + local.set $18 + local.get $25 + i64.const 32 + i64.shr_u + local.set $25 + local.get $21 + local.get $20 + i64.mul + local.get $18 + i64.add + local.get $25 + i64.add + i64.const 1 + i64.sub + local.set $25 + global.get $~lib/util/number/_exp + local.set $26 + local.get $15 + local.set $13 + local.get $26 + local.get $13 + i32.add + i32.const 64 + i32.add + local.set $26 + global.get $~lib/util/number/_frc_minus + local.set $17 + local.get $12 + local.set $11 + local.get $17 + i64.const 4294967295 + i64.and + local.set $18 + local.get $11 + i64.const 4294967295 + i64.and + local.set $19 + local.get $17 + i64.const 32 + i64.shr_u + local.set $20 + local.get $11 + i64.const 32 + i64.shr_u + local.set $21 + local.get $18 + local.get $19 + i64.mul + local.set $22 + local.get $20 + local.get $19 + i64.mul + local.get $22 + i64.const 32 + i64.shr_u + i64.add + local.set $23 + local.get $18 + local.get $21 + i64.mul + local.get $23 + i64.const 4294967295 + i64.and + i64.add + local.set $27 + local.get $27 + i64.const 2147483647 + i64.add + local.set $27 + local.get $23 + i64.const 32 + i64.shr_u + local.set $23 + local.get $27 + i64.const 32 + i64.shr_u + local.set $27 + local.get $20 + local.get $21 + i64.mul + local.get $23 + i64.add + local.get $27 + i64.add + i64.const 1 + i64.add + local.set $27 + local.get $25 + local.get $27 + i64.sub + local.set $23 + local.get $4 + local.get $24 + local.get $10 + local.get $25 + local.get $26 + local.get $23 + local.get $3 + call $~lib/util/number/genDigits + local.set $28 + local.get $0 + local.get $2 + i32.const 1 + i32.shl + i32.add + local.get $28 + local.get $2 + i32.sub + global.get $~lib/util/number/_K + call $~lib/util/number/prettify + local.set $28 + local.get $28 + local.get $2 + i32.add + ) + (func $~lib/number/F64#toString (param $0 f64) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/number/dtoa + ) + (func $~lib/string/String#get:length (param $0 i32) (result i32) + local.get $0 + i32.const 20 + i32.sub + i32.load offset=16 + i32.const 1 + i32.shr_u + ) + (func $~lib/string/String.__concat (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/string/String#concat + ) + (func $assembly/mat2/frob (param $0 i32) (result f64) + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $assembly/imports/MathUtil.hypot + ) + (func $~lib/rt/__newBuffer (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + local.get $0 + local.get $1 + call $~lib/rt/itcms/__new + local.set $3 + local.get $2 + if + local.get $3 + local.get $2 + local.get $0 + call $~lib/memory/memory.copy + end + local.get $3 + ) + (func $~lib/array/Array<~lib/typedarray/Float64Array>#__uset (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store + i32.const 1 + drop + local.get $0 + local.get $2 + i32.const 1 + call $~lib/rt/itcms/__link + ) + (func $assembly/mat2/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat2/exactEquals (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.eq + if (result i32) + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + ) + (func $assembly/mat2/equals (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $2 + local.get $6 + f64.sub + local.set $10 + local.get $10 + f64.abs + global.get $assembly/common/EPSILON + f64.const 1 + local.get $2 + local.set $10 + local.get $10 + f64.abs + local.get $6 + local.set $10 + local.get $10 + f64.abs + call $assembly/imports/MathUtil.max + f64.mul + f64.le + if (result i32) + local.get $3 + local.get $7 + f64.sub + local.set $10 + local.get $10 + f64.abs + global.get $assembly/common/EPSILON + f64.const 1 + local.get $3 + local.set $10 + local.get $10 + f64.abs + local.get $7 + local.set $10 + local.get $10 + f64.abs + call $assembly/imports/MathUtil.max + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $4 + local.get $8 + f64.sub + local.set $10 + local.get $10 + f64.abs + global.get $assembly/common/EPSILON + f64.const 1 + local.get $4 + local.set $10 + local.get $10 + f64.abs + local.get $8 + local.set $10 + local.get $10 + f64.abs + call $assembly/imports/MathUtil.max + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $5 + local.get $9 + f64.sub + local.set $10 + local.get $10 + f64.abs + global.get $assembly/common/EPSILON + f64.const 1 + local.get $5 + local.set $10 + local.get $10 + f64.abs + local.get $9 + local.set $10 + local.get $10 + f64.abs + call $assembly/imports/MathUtil.max + f64.mul + f64.le + else + i32.const 0 + end + ) + (func $assembly/mat2/multiplyScalar (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat2/multiplyScalarAndAdd (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat2d/copy (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat2d/identity (param $0 i32) (result i32) + local.get $0 + i32.const 0 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat2d/set (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (result i32) + local.get $0 + i32.const 0 + local.get $1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $2 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $3 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $4 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $5 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $6 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat2d/invert (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $2 + local.get $5 + f64.mul + local.get $3 + local.get $4 + f64.mul + f64.sub + local.set $8 + local.get $8 + i64.reinterpret_f64 + i64.const 1 + i64.shl + i64.const 2 + i64.sub + i64.const -9007199254740994 + i64.le_u + i32.eqz + if + i32.const 0 + return + end + f64.const 1 + local.get $8 + f64.div + local.set $8 + local.get $0 + i32.const 0 + local.get $5 + local.get $8 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $3 + f64.neg + local.get $8 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $4 + f64.neg + local.get $8 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $2 + local.get $8 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $4 + local.get $7 + f64.mul + local.get $5 + local.get $6 + f64.mul + f64.sub + local.get $8 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $3 + local.get $6 + f64.mul + local.get $2 + local.get $7 + f64.mul + f64.sub + local.get $8 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat2d/determinant (param $0 i32) (result f64) + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.mul + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.sub + ) + (func $assembly/mat2d/rotate (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $2 + call $~lib/math/NativeMath.sin + local.set $9 + local.get $2 + call $~lib/math/NativeMath.cos + local.set $10 + local.get $0 + i32.const 0 + local.get $3 + local.get $10 + f64.mul + local.get $5 + local.get $9 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $4 + local.get $10 + f64.mul + local.get $6 + local.get $9 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $3 + local.get $9 + f64.neg + f64.mul + local.get $5 + local.get $10 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $4 + local.get $9 + f64.neg + f64.mul + local.get $6 + local.get $10 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $7 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $8 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat2d/scale (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $0 + i32.const 0 + local.get $3 + local.get $9 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $4 + local.get $9 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $5 + local.get $10 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $6 + local.get $10 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $7 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $8 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat2d/translate (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $0 + i32.const 0 + local.get $3 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $4 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $5 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $6 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $3 + local.get $9 + f64.mul + local.get $5 + local.get $10 + f64.mul + f64.add + local.get $7 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $4 + local.get $9 + f64.mul + local.get $6 + local.get $10 + f64.mul + f64.add + local.get $8 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat2d/fromRotation (param $0 i32) (param $1 f64) (result i32) + (local $2 f64) + (local $3 f64) + local.get $1 + call $~lib/math/NativeMath.sin + local.set $2 + local.get $1 + call $~lib/math/NativeMath.cos + local.set $3 + local.get $0 + i32.const 0 + local.get $3 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $2 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $2 + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $3 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat2d/fromScaling (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat2d/fromTranslation (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 0 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat2d/frob (param $0 i32) (result f64) + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + f64.const 1 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $assembly/imports/MathUtil.hypot + ) + (func $assembly/mat2d/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat2d/multiplyScalar (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat2d/multiplyScalarAndAdd (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat2d/exactEquals (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.eq + if (result i32) + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + ) + (func $assembly/mat2d/equals (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $0 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $0 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $12 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $13 + local.get $2 + local.get $8 + f64.sub + local.set $14 + local.get $14 + f64.abs + global.get $assembly/common/EPSILON + f64.const 1 + local.get $2 + local.set $14 + local.get $14 + f64.abs + local.get $8 + local.set $14 + local.get $14 + f64.abs + call $assembly/imports/MathUtil.max + f64.mul + f64.le + if (result i32) + local.get $3 + local.get $9 + f64.sub + local.set $14 + local.get $14 + f64.abs + global.get $assembly/common/EPSILON + f64.const 1 + local.get $3 + local.set $14 + local.get $14 + f64.abs + local.get $9 + local.set $14 + local.get $14 + f64.abs + call $assembly/imports/MathUtil.max + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $4 + local.get $10 + f64.sub + local.set $14 + local.get $14 + f64.abs + global.get $assembly/common/EPSILON + f64.const 1 + local.get $4 + local.set $14 + local.get $14 + f64.abs + local.get $10 + local.set $14 + local.get $14 + f64.abs + call $assembly/imports/MathUtil.max + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $5 + local.get $11 + f64.sub + local.set $14 + local.get $14 + f64.abs + global.get $assembly/common/EPSILON + f64.const 1 + local.get $5 + local.set $14 + local.get $14 + f64.abs + local.get $11 + local.set $14 + local.get $14 + f64.abs + call $assembly/imports/MathUtil.max + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $6 + local.get $12 + f64.sub + local.set $14 + local.get $14 + f64.abs + global.get $assembly/common/EPSILON + f64.const 1 + local.get $6 + local.set $14 + local.get $14 + f64.abs + local.get $12 + local.set $14 + local.get $14 + f64.abs + call $assembly/imports/MathUtil.max + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $7 + local.get $13 + f64.sub + local.set $14 + local.get $14 + f64.abs + global.get $assembly/common/EPSILON + f64.const 1 + local.get $7 + local.set $14 + local.get $14 + f64.abs + local.get $13 + local.set $14 + local.get $14 + f64.abs + call $assembly/imports/MathUtil.max + f64.mul + f64.le + else + i32.const 0 + end + ) + (func $assembly/mat3/fromMat4 (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $1 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat3/copy (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat3/set (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (param $7 f64) (param $8 f64) (param $9 f64) (result i32) + local.get $0 + i32.const 0 + local.get $1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $2 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $3 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $4 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $5 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $6 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $7 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $8 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $9 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat3/identity (param $0 i32) (result i32) + local.get $0 + i32.const 0 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat3/transpose (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + local.get $0 + local.get $1 + i32.eq + if + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $0 + i32.const 1 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $2 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $3 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $4 + call $~lib/typedarray/Float64Array#__set + else + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + end + local.get $0 + ) + (func $assembly/mat3/invert (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $10 + local.get $6 + f64.mul + local.get $7 + local.get $9 + f64.mul + f64.sub + local.set $11 + local.get $10 + f64.neg + local.get $5 + f64.mul + local.get $7 + local.get $8 + f64.mul + f64.add + local.set $12 + local.get $9 + local.get $5 + f64.mul + local.get $6 + local.get $8 + f64.mul + f64.sub + local.set $13 + local.get $2 + local.get $11 + f64.mul + local.get $3 + local.get $12 + f64.mul + f64.add + local.get $4 + local.get $13 + f64.mul + f64.add + local.set $14 + local.get $14 + i64.reinterpret_f64 + i64.const 1 + i64.shl + i64.const 2 + i64.sub + i64.const -9007199254740994 + i64.le_u + i32.eqz + if + i32.const 0 + return + end + f64.const 1 + local.get $14 + f64.div + local.set $14 + local.get $0 + i32.const 0 + local.get $11 + local.get $14 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $10 + f64.neg + local.get $3 + f64.mul + local.get $4 + local.get $9 + f64.mul + f64.add + local.get $14 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $7 + local.get $3 + f64.mul + local.get $4 + local.get $6 + f64.mul + f64.sub + local.get $14 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $12 + local.get $14 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $10 + local.get $2 + f64.mul + local.get $4 + local.get $8 + f64.mul + f64.sub + local.get $14 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $7 + f64.neg + local.get $2 + f64.mul + local.get $4 + local.get $5 + f64.mul + f64.add + local.get $14 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $13 + local.get $14 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $9 + f64.neg + local.get $2 + f64.mul + local.get $3 + local.get $8 + f64.mul + f64.add + local.get $14 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $6 + local.get $2 + f64.mul + local.get $3 + local.get $5 + f64.mul + f64.sub + local.get $14 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat3/adjoint (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $0 + i32.const 0 + local.get $6 + local.get $10 + f64.mul + local.get $7 + local.get $9 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $4 + local.get $9 + f64.mul + local.get $3 + local.get $10 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $3 + local.get $7 + f64.mul + local.get $4 + local.get $6 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $7 + local.get $8 + f64.mul + local.get $5 + local.get $10 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $2 + local.get $10 + f64.mul + local.get $4 + local.get $8 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $4 + local.get $5 + f64.mul + local.get $2 + local.get $7 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $5 + local.get $9 + f64.mul + local.get $6 + local.get $8 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $3 + local.get $8 + f64.mul + local.get $2 + local.get $9 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $2 + local.get $6 + f64.mul + local.get $3 + local.get $5 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat3/determinant (param $0 i32) (result f64) + (local $1 f64) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $1 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $0 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $0 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $0 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $0 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $0 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $1 + local.get $9 + local.get $5 + f64.mul + local.get $6 + local.get $8 + f64.mul + f64.sub + f64.mul + local.get $2 + local.get $9 + f64.neg + local.get $4 + f64.mul + local.get $6 + local.get $7 + f64.mul + f64.add + f64.mul + f64.add + local.get $3 + local.get $8 + local.get $4 + f64.mul + local.get $5 + local.get $7 + f64.mul + f64.sub + f64.mul + f64.add + ) + (func $assembly/mat3/translate (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $12 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $13 + local.get $0 + i32.const 0 + local.get $3 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $4 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $5 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $6 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $7 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $8 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $12 + local.get $3 + f64.mul + local.get $13 + local.get $6 + f64.mul + f64.add + local.get $9 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $12 + local.get $4 + f64.mul + local.get $13 + local.get $7 + f64.mul + f64.add + local.get $10 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $12 + local.get $5 + f64.mul + local.get $13 + local.get $8 + f64.mul + f64.add + local.get $11 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat3/rotate (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $2 + call $~lib/math/NativeMath.sin + local.set $12 + local.get $2 + call $~lib/math/NativeMath.cos + local.set $13 + local.get $0 + i32.const 0 + local.get $13 + local.get $3 + f64.mul + local.get $12 + local.get $6 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $13 + local.get $4 + f64.mul + local.get $12 + local.get $7 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $13 + local.get $5 + f64.mul + local.get $12 + local.get $8 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $13 + local.get $6 + f64.mul + local.get $12 + local.get $3 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $13 + local.get $7 + f64.mul + local.get $12 + local.get $4 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $13 + local.get $8 + f64.mul + local.get $12 + local.get $5 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $9 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $10 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $11 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat3/scale (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $0 + i32.const 0 + local.get $3 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $3 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $4 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $4 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $4 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat3/fromTranslation (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 0 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat3/fromRotation (param $0 i32) (param $1 f64) (result i32) + (local $2 f64) + (local $3 f64) + local.get $1 + call $~lib/math/NativeMath.sin + local.set $2 + local.get $1 + call $~lib/math/NativeMath.cos + local.set $3 + local.get $0 + i32.const 0 + local.get $3 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $2 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $2 + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $3 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat3/fromScaling (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat3/fromMat2d (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat3/fromQuat (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 f64) + (local $16 f64) + (local $17 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $2 + local.get $2 + f64.add + local.set $6 + local.get $3 + local.get $3 + f64.add + local.set $7 + local.get $4 + local.get $4 + f64.add + local.set $8 + local.get $2 + local.get $6 + f64.mul + local.set $9 + local.get $3 + local.get $6 + f64.mul + local.set $10 + local.get $3 + local.get $7 + f64.mul + local.set $11 + local.get $4 + local.get $6 + f64.mul + local.set $12 + local.get $4 + local.get $7 + f64.mul + local.set $13 + local.get $4 + local.get $8 + f64.mul + local.set $14 + local.get $5 + local.get $6 + f64.mul + local.set $15 + local.get $5 + local.get $7 + f64.mul + local.set $16 + local.get $5 + local.get $8 + f64.mul + local.set $17 + local.get $0 + i32.const 0 + f64.const 1 + local.get $11 + f64.sub + local.get $14 + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $10 + local.get $17 + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $12 + local.get $16 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $10 + local.get $17 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 1 + local.get $9 + f64.sub + local.get $14 + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $13 + local.get $15 + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $12 + local.get $16 + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $13 + local.get $15 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + f64.const 1 + local.get $9 + f64.sub + local.get $11 + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat3/normalFromMat4 (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 f64) + (local $16 f64) + (local $17 f64) + (local $18 f64) + (local $19 f64) + (local $20 f64) + (local $21 f64) + (local $22 f64) + (local $23 f64) + (local $24 f64) + (local $25 f64) + (local $26 f64) + (local $27 f64) + (local $28 f64) + (local $29 f64) + (local $30 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $1 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.set $12 + local.get $1 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.set $13 + local.get $1 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + local.set $14 + local.get $1 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + local.set $15 + local.get $1 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + local.set $16 + local.get $1 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + local.set $17 + local.get $2 + local.get $7 + f64.mul + local.get $3 + local.get $6 + f64.mul + f64.sub + local.set $18 + local.get $2 + local.get $8 + f64.mul + local.get $4 + local.get $6 + f64.mul + f64.sub + local.set $19 + local.get $2 + local.get $9 + f64.mul + local.get $5 + local.get $6 + f64.mul + f64.sub + local.set $20 + local.get $3 + local.get $8 + f64.mul + local.get $4 + local.get $7 + f64.mul + f64.sub + local.set $21 + local.get $3 + local.get $9 + f64.mul + local.get $5 + local.get $7 + f64.mul + f64.sub + local.set $22 + local.get $4 + local.get $9 + f64.mul + local.get $5 + local.get $8 + f64.mul + f64.sub + local.set $23 + local.get $10 + local.get $15 + f64.mul + local.get $11 + local.get $14 + f64.mul + f64.sub + local.set $24 + local.get $10 + local.get $16 + f64.mul + local.get $12 + local.get $14 + f64.mul + f64.sub + local.set $25 + local.get $10 + local.get $17 + f64.mul + local.get $13 + local.get $14 + f64.mul + f64.sub + local.set $26 + local.get $11 + local.get $16 + f64.mul + local.get $12 + local.get $15 + f64.mul + f64.sub + local.set $27 + local.get $11 + local.get $17 + f64.mul + local.get $13 + local.get $15 + f64.mul + f64.sub + local.set $28 + local.get $12 + local.get $17 + f64.mul + local.get $13 + local.get $16 + f64.mul + f64.sub + local.set $29 + local.get $18 + local.get $29 + f64.mul + local.get $19 + local.get $28 + f64.mul + f64.sub + local.get $20 + local.get $27 + f64.mul + f64.add + local.get $21 + local.get $26 + f64.mul + f64.add + local.get $22 + local.get $25 + f64.mul + f64.sub + local.get $23 + local.get $24 + f64.mul + f64.add + local.set $30 + local.get $30 + i64.reinterpret_f64 + i64.const 1 + i64.shl + i64.const 2 + i64.sub + i64.const -9007199254740994 + i64.le_u + i32.eqz + if + i32.const 0 + return + end + f64.const 1 + local.get $30 + f64.div + local.set $30 + local.get $0 + i32.const 0 + local.get $7 + local.get $29 + f64.mul + local.get $8 + local.get $28 + f64.mul + f64.sub + local.get $9 + local.get $27 + f64.mul + f64.add + local.get $30 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $8 + local.get $26 + f64.mul + local.get $6 + local.get $29 + f64.mul + f64.sub + local.get $9 + local.get $25 + f64.mul + f64.sub + local.get $30 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $6 + local.get $28 + f64.mul + local.get $7 + local.get $26 + f64.mul + f64.sub + local.get $9 + local.get $24 + f64.mul + f64.add + local.get $30 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $4 + local.get $28 + f64.mul + local.get $3 + local.get $29 + f64.mul + f64.sub + local.get $5 + local.get $27 + f64.mul + f64.sub + local.get $30 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $2 + local.get $29 + f64.mul + local.get $4 + local.get $26 + f64.mul + f64.sub + local.get $5 + local.get $25 + f64.mul + f64.add + local.get $30 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $3 + local.get $26 + f64.mul + local.get $2 + local.get $28 + f64.mul + f64.sub + local.get $5 + local.get $24 + f64.mul + f64.sub + local.get $30 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $15 + local.get $23 + f64.mul + local.get $16 + local.get $22 + f64.mul + f64.sub + local.get $17 + local.get $21 + f64.mul + f64.add + local.get $30 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $16 + local.get $20 + f64.mul + local.get $14 + local.get $23 + f64.mul + f64.sub + local.get $17 + local.get $19 + f64.mul + f64.sub + local.get $30 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $14 + local.get $22 + f64.mul + local.get $15 + local.get $20 + f64.mul + f64.sub + local.get $17 + local.get $18 + f64.mul + f64.add + local.get $30 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat3/projection (param $0 i32) (param $1 f64) (param $2 f64) (result i32) + local.get $0 + i32.const 0 + f64.const 2 + local.get $1 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const -2 + local.get $2 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + f64.const -1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat3/frob (param $0 i32) (result f64) + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $assembly/imports/MathUtil.hypot + ) + (func $assembly/mat3/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat3/multiplyScalar (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat3/multiplyScalarAndAdd (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat3/exactEquals (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.eq + if (result i32) + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + ) + (func $assembly/mat3/equals (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 f64) + (local $16 f64) + (local $17 f64) + (local $18 f64) + (local $19 f64) + (local $20 f64) + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $0 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $0 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $0 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $0 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $0 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $12 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $13 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $14 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $15 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $16 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $17 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $18 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.set $19 + local.get $2 + local.get $11 + f64.sub + local.set $20 + local.get $20 + f64.abs + global.get $assembly/common/EPSILON + f64.const 1 + local.get $2 + local.set $20 + local.get $20 + f64.abs + local.get $11 + local.set $20 + local.get $20 + f64.abs + call $assembly/imports/MathUtil.max + f64.mul + f64.le + if (result i32) + local.get $3 + local.get $12 + f64.sub + local.set $20 + local.get $20 + f64.abs + global.get $assembly/common/EPSILON + f64.const 1 + local.get $3 + local.set $20 + local.get $20 + f64.abs + local.get $12 + local.set $20 + local.get $20 + f64.abs + call $assembly/imports/MathUtil.max + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $4 + local.get $13 + f64.sub + local.set $20 + local.get $20 + f64.abs + global.get $assembly/common/EPSILON + f64.const 1 + local.get $4 + local.set $20 + local.get $20 + f64.abs + local.get $13 + local.set $20 + local.get $20 + f64.abs + call $assembly/imports/MathUtil.max + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $5 + local.get $14 + f64.sub + local.set $20 + local.get $20 + f64.abs + global.get $assembly/common/EPSILON + f64.const 1 + local.get $5 + local.set $20 + local.get $20 + f64.abs + local.get $14 + local.set $20 + local.get $20 + f64.abs + call $assembly/imports/MathUtil.max + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $6 + local.get $15 + f64.sub + local.set $20 + local.get $20 + f64.abs + global.get $assembly/common/EPSILON + f64.const 1 + local.get $6 + local.set $20 + local.get $20 + f64.abs + local.get $15 + local.set $20 + local.get $20 + f64.abs + call $assembly/imports/MathUtil.max + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $7 + local.get $16 + f64.sub + local.set $20 + local.get $20 + f64.abs + global.get $assembly/common/EPSILON + f64.const 1 + local.get $7 + local.set $20 + local.get $20 + f64.abs + local.get $16 + local.set $20 + local.get $20 + f64.abs + call $assembly/imports/MathUtil.max + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $8 + local.get $17 + f64.sub + local.set $20 + local.get $20 + f64.abs + global.get $assembly/common/EPSILON + f64.const 1 + local.get $8 + local.set $20 + local.get $20 + f64.abs + local.get $17 + local.set $20 + local.get $20 + f64.abs + call $assembly/imports/MathUtil.max + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $9 + local.get $18 + f64.sub + local.set $20 + local.get $20 + f64.abs + global.get $assembly/common/EPSILON + f64.const 1 + local.get $9 + local.set $20 + local.get $20 + f64.abs + local.get $18 + local.set $20 + local.get $20 + f64.abs + call $assembly/imports/MathUtil.max + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $10 + local.get $19 + f64.sub + local.set $20 + local.get $20 + f64.abs + global.get $assembly/common/EPSILON + f64.const 1 + local.get $10 + local.set $20 + local.get $20 + f64.abs + local.get $19 + local.set $20 + local.get $20 + f64.abs + call $assembly/imports/MathUtil.max + f64.mul + f64.le + else + i32.const 0 + end + ) + (func $assembly/mat4/Fov#set:upDegrees (param $0 i32) (param $1 f64) + local.get $0 + local.get $1 + f64.store + ) + (func $assembly/mat4/Fov#set:downDegrees (param $0 i32) (param $1 f64) + local.get $0 + local.get $1 + f64.store offset=8 + ) + (func $assembly/mat4/Fov#set:leftDegrees (param $0 i32) (param $1 f64) + local.get $0 + local.get $1 + f64.store offset=16 + ) + (func $assembly/mat4/Fov#set:rightDegrees (param $0 i32) (param $1 f64) + local.get $0 + local.get $1 + f64.store offset=24 + ) + (func $assembly/mat4/Fov#get:upDegrees (param $0 i32) (result f64) + local.get $0 + f64.load + ) + (func $assembly/mat4/Fov#get:downDegrees (param $0 i32) (result f64) + local.get $0 + f64.load offset=8 + ) + (func $assembly/mat4/Fov#get:leftDegrees (param $0 i32) (result f64) + local.get $0 + f64.load offset=16 + ) + (func $assembly/mat4/Fov#get:rightDegrees (param $0 i32) (result f64) + local.get $0 + f64.load offset=24 + ) + (func $assembly/mat4/copy (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + local.get $1 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + local.get $1 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + local.get $1 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $1 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $1 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + local.get $1 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat4/set (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (param $7 f64) (param $8 f64) (param $9 f64) (param $10 f64) (param $11 f64) (param $12 f64) (param $13 f64) (param $14 f64) (param $15 f64) (param $16 f64) (result i32) + local.get $0 + i32.const 0 + local.get $1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $2 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $3 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $4 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $5 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $6 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $7 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $8 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $9 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $10 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + local.get $11 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + local.get $12 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + local.get $13 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $14 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $15 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + local.get $16 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat4/identity (param $0 i32) (result i32) + local.get $0 + i32.const 0 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat4/transpose (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + local.get $0 + local.get $1 + i32.eq + if + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $0 + i32.const 1 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $2 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $3 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $5 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + local.get $1 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + local.get $4 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $6 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $7 + call $~lib/typedarray/Float64Array#__set + else + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + local.get $1 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + local.get $1 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $1 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + local.get $1 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + end + local.get $0 + ) + (func $assembly/mat4/invert (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 f64) + (local $16 f64) + (local $17 f64) + (local $18 f64) + (local $19 f64) + (local $20 f64) + (local $21 f64) + (local $22 f64) + (local $23 f64) + (local $24 f64) + (local $25 f64) + (local $26 f64) + (local $27 f64) + (local $28 f64) + (local $29 f64) + (local $30 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $1 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.set $12 + local.get $1 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.set $13 + local.get $1 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + local.set $14 + local.get $1 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + local.set $15 + local.get $1 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + local.set $16 + local.get $1 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + local.set $17 + local.get $2 + local.get $7 + f64.mul + local.get $3 + local.get $6 + f64.mul + f64.sub + local.set $18 + local.get $2 + local.get $8 + f64.mul + local.get $4 + local.get $6 + f64.mul + f64.sub + local.set $19 + local.get $2 + local.get $9 + f64.mul + local.get $5 + local.get $6 + f64.mul + f64.sub + local.set $20 + local.get $3 + local.get $8 + f64.mul + local.get $4 + local.get $7 + f64.mul + f64.sub + local.set $21 + local.get $3 + local.get $9 + f64.mul + local.get $5 + local.get $7 + f64.mul + f64.sub + local.set $22 + local.get $4 + local.get $9 + f64.mul + local.get $5 + local.get $8 + f64.mul + f64.sub + local.set $23 + local.get $10 + local.get $15 + f64.mul + local.get $11 + local.get $14 + f64.mul + f64.sub + local.set $24 + local.get $10 + local.get $16 + f64.mul + local.get $12 + local.get $14 + f64.mul + f64.sub + local.set $25 + local.get $10 + local.get $17 + f64.mul + local.get $13 + local.get $14 + f64.mul + f64.sub + local.set $26 + local.get $11 + local.get $16 + f64.mul + local.get $12 + local.get $15 + f64.mul + f64.sub + local.set $27 + local.get $11 + local.get $17 + f64.mul + local.get $13 + local.get $15 + f64.mul + f64.sub + local.set $28 + local.get $12 + local.get $17 + f64.mul + local.get $13 + local.get $16 + f64.mul + f64.sub + local.set $29 + local.get $18 + local.get $29 + f64.mul + local.get $19 + local.get $28 + f64.mul + f64.sub + local.get $20 + local.get $27 + f64.mul + f64.add + local.get $21 + local.get $26 + f64.mul + f64.add + local.get $22 + local.get $25 + f64.mul + f64.sub + local.get $23 + local.get $24 + f64.mul + f64.add + local.set $30 + local.get $30 + i64.reinterpret_f64 + i64.const 1 + i64.shl + i64.const 2 + i64.sub + i64.const -9007199254740994 + i64.le_u + i32.eqz + if + i32.const 0 + return + end + f64.const 1 + local.get $30 + f64.div + local.set $30 + local.get $0 + i32.const 0 + local.get $7 + local.get $29 + f64.mul + local.get $8 + local.get $28 + f64.mul + f64.sub + local.get $9 + local.get $27 + f64.mul + f64.add + local.get $30 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $4 + local.get $28 + f64.mul + local.get $3 + local.get $29 + f64.mul + f64.sub + local.get $5 + local.get $27 + f64.mul + f64.sub + local.get $30 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $15 + local.get $23 + f64.mul + local.get $16 + local.get $22 + f64.mul + f64.sub + local.get $17 + local.get $21 + f64.mul + f64.add + local.get $30 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $12 + local.get $22 + f64.mul + local.get $11 + local.get $23 + f64.mul + f64.sub + local.get $13 + local.get $21 + f64.mul + f64.sub + local.get $30 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $8 + local.get $26 + f64.mul + local.get $6 + local.get $29 + f64.mul + f64.sub + local.get $9 + local.get $25 + f64.mul + f64.sub + local.get $30 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $2 + local.get $29 + f64.mul + local.get $4 + local.get $26 + f64.mul + f64.sub + local.get $5 + local.get $25 + f64.mul + f64.add + local.get $30 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $16 + local.get $20 + f64.mul + local.get $14 + local.get $23 + f64.mul + f64.sub + local.get $17 + local.get $19 + f64.mul + f64.sub + local.get $30 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $10 + local.get $23 + f64.mul + local.get $12 + local.get $20 + f64.mul + f64.sub + local.get $13 + local.get $19 + f64.mul + f64.add + local.get $30 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $6 + local.get $28 + f64.mul + local.get $7 + local.get $26 + f64.mul + f64.sub + local.get $9 + local.get $24 + f64.mul + f64.add + local.get $30 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $3 + local.get $26 + f64.mul + local.get $2 + local.get $28 + f64.mul + f64.sub + local.get $5 + local.get $24 + f64.mul + f64.sub + local.get $30 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + local.get $14 + local.get $22 + f64.mul + local.get $15 + local.get $20 + f64.mul + f64.sub + local.get $17 + local.get $18 + f64.mul + f64.add + local.get $30 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + local.get $11 + local.get $20 + f64.mul + local.get $10 + local.get $22 + f64.mul + f64.sub + local.get $13 + local.get $18 + f64.mul + f64.sub + local.get $30 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + local.get $7 + local.get $25 + f64.mul + local.get $6 + local.get $27 + f64.mul + f64.sub + local.get $8 + local.get $24 + f64.mul + f64.sub + local.get $30 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $2 + local.get $27 + f64.mul + local.get $3 + local.get $25 + f64.mul + f64.sub + local.get $4 + local.get $24 + f64.mul + f64.add + local.get $30 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $15 + local.get $19 + f64.mul + local.get $14 + local.get $21 + f64.mul + f64.sub + local.get $16 + local.get $18 + f64.mul + f64.sub + local.get $30 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + local.get $10 + local.get $21 + f64.mul + local.get $11 + local.get $19 + f64.mul + f64.sub + local.get $12 + local.get $18 + f64.mul + f64.add + local.get $30 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat4/adjoint (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 f64) + (local $16 f64) + (local $17 f64) + (local $18 f64) + (local $19 f64) + (local $20 f64) + (local $21 f64) + (local $22 f64) + (local $23 f64) + (local $24 f64) + (local $25 f64) + (local $26 f64) + (local $27 f64) + (local $28 f64) + (local $29 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $1 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.set $12 + local.get $1 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.set $13 + local.get $1 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + local.set $14 + local.get $1 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + local.set $15 + local.get $1 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + local.set $16 + local.get $1 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + local.set $17 + local.get $2 + local.get $7 + f64.mul + local.get $3 + local.get $6 + f64.mul + f64.sub + local.set $18 + local.get $2 + local.get $8 + f64.mul + local.get $4 + local.get $6 + f64.mul + f64.sub + local.set $19 + local.get $2 + local.get $9 + f64.mul + local.get $5 + local.get $6 + f64.mul + f64.sub + local.set $20 + local.get $3 + local.get $8 + f64.mul + local.get $4 + local.get $7 + f64.mul + f64.sub + local.set $21 + local.get $3 + local.get $9 + f64.mul + local.get $5 + local.get $7 + f64.mul + f64.sub + local.set $22 + local.get $4 + local.get $9 + f64.mul + local.get $5 + local.get $8 + f64.mul + f64.sub + local.set $23 + local.get $10 + local.get $15 + f64.mul + local.get $11 + local.get $14 + f64.mul + f64.sub + local.set $24 + local.get $10 + local.get $16 + f64.mul + local.get $12 + local.get $14 + f64.mul + f64.sub + local.set $25 + local.get $10 + local.get $17 + f64.mul + local.get $13 + local.get $14 + f64.mul + f64.sub + local.set $26 + local.get $11 + local.get $16 + f64.mul + local.get $12 + local.get $15 + f64.mul + f64.sub + local.set $27 + local.get $11 + local.get $17 + f64.mul + local.get $13 + local.get $15 + f64.mul + f64.sub + local.set $28 + local.get $12 + local.get $17 + f64.mul + local.get $13 + local.get $16 + f64.mul + f64.sub + local.set $29 + local.get $0 + i32.const 0 + local.get $7 + local.get $29 + f64.mul + local.get $8 + local.get $28 + f64.mul + f64.sub + local.get $9 + local.get $27 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $4 + local.get $28 + f64.mul + local.get $3 + local.get $29 + f64.mul + f64.sub + local.get $5 + local.get $27 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $15 + local.get $23 + f64.mul + local.get $16 + local.get $22 + f64.mul + f64.sub + local.get $17 + local.get $21 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $12 + local.get $22 + f64.mul + local.get $11 + local.get $23 + f64.mul + f64.sub + local.get $13 + local.get $21 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $8 + local.get $26 + f64.mul + local.get $6 + local.get $29 + f64.mul + f64.sub + local.get $9 + local.get $25 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $2 + local.get $29 + f64.mul + local.get $4 + local.get $26 + f64.mul + f64.sub + local.get $5 + local.get $25 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $16 + local.get $20 + f64.mul + local.get $14 + local.get $23 + f64.mul + f64.sub + local.get $17 + local.get $19 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $10 + local.get $23 + f64.mul + local.get $12 + local.get $20 + f64.mul + f64.sub + local.get $13 + local.get $19 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $6 + local.get $28 + f64.mul + local.get $7 + local.get $26 + f64.mul + f64.sub + local.get $9 + local.get $24 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $3 + local.get $26 + f64.mul + local.get $2 + local.get $28 + f64.mul + f64.sub + local.get $5 + local.get $24 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + local.get $14 + local.get $22 + f64.mul + local.get $15 + local.get $20 + f64.mul + f64.sub + local.get $17 + local.get $18 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + local.get $11 + local.get $20 + f64.mul + local.get $10 + local.get $22 + f64.mul + f64.sub + local.get $13 + local.get $18 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + local.get $7 + local.get $25 + f64.mul + local.get $6 + local.get $27 + f64.mul + f64.sub + local.get $8 + local.get $24 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $2 + local.get $27 + f64.mul + local.get $3 + local.get $25 + f64.mul + f64.sub + local.get $4 + local.get $24 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $15 + local.get $19 + f64.mul + local.get $14 + local.get $21 + f64.mul + f64.sub + local.get $16 + local.get $18 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + local.get $10 + local.get $21 + f64.mul + local.get $11 + local.get $19 + f64.mul + f64.sub + local.get $12 + local.get $18 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat4/determinant (param $0 i32) (result f64) + (local $1 f64) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 f64) + (local $16 f64) + (local $17 f64) + (local $18 f64) + (local $19 f64) + (local $20 f64) + (local $21 f64) + (local $22 f64) + (local $23 f64) + (local $24 f64) + (local $25 f64) + (local $26 f64) + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $1 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $0 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $0 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $0 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $0 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $0 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $0 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $0 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $0 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.set $12 + local.get $0 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + local.set $13 + local.get $0 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + local.set $14 + local.get $0 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + local.set $15 + local.get $0 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + local.set $16 + local.get $1 + local.get $6 + f64.mul + local.get $2 + local.get $5 + f64.mul + f64.sub + local.set $17 + local.get $1 + local.get $7 + f64.mul + local.get $3 + local.get $5 + f64.mul + f64.sub + local.set $18 + local.get $2 + local.get $7 + f64.mul + local.get $3 + local.get $6 + f64.mul + f64.sub + local.set $19 + local.get $9 + local.get $14 + f64.mul + local.get $10 + local.get $13 + f64.mul + f64.sub + local.set $20 + local.get $9 + local.get $15 + f64.mul + local.get $11 + local.get $13 + f64.mul + f64.sub + local.set $21 + local.get $10 + local.get $15 + f64.mul + local.get $11 + local.get $14 + f64.mul + f64.sub + local.set $22 + local.get $1 + local.get $22 + f64.mul + local.get $2 + local.get $21 + f64.mul + f64.sub + local.get $3 + local.get $20 + f64.mul + f64.add + local.set $23 + local.get $5 + local.get $22 + f64.mul + local.get $6 + local.get $21 + f64.mul + f64.sub + local.get $7 + local.get $20 + f64.mul + f64.add + local.set $24 + local.get $9 + local.get $19 + f64.mul + local.get $10 + local.get $18 + f64.mul + f64.sub + local.get $11 + local.get $17 + f64.mul + f64.add + local.set $25 + local.get $13 + local.get $19 + f64.mul + local.get $14 + local.get $18 + f64.mul + f64.sub + local.get $15 + local.get $17 + f64.mul + f64.add + local.set $26 + local.get $8 + local.get $23 + f64.mul + local.get $4 + local.get $24 + f64.mul + f64.sub + local.get $16 + local.get $25 + f64.mul + f64.add + local.get $12 + local.get $26 + f64.mul + f64.sub + ) + (func $assembly/mat4/translate (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 f64) + (local $16 f64) + (local $17 f64) + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + local.get $0 + i32.eq + if + local.get $0 + i32.const 12 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + f64.add + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.mul + f64.add + local.get $1 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + f64.add + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.mul + f64.add + local.get $1 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + f64.add + local.get $1 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.mul + f64.add + local.get $1 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + f64.add + local.get $1 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.mul + f64.add + local.get $1 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + else + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $12 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $13 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.set $14 + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.set $15 + local.get $1 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.set $16 + local.get $1 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.set $17 + local.get $0 + i32.const 0 + local.get $6 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $7 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $8 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $9 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $10 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $11 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $12 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $13 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $14 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $15 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + local.get $16 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + local.get $17 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + local.get $6 + local.get $3 + f64.mul + local.get $10 + local.get $4 + f64.mul + f64.add + local.get $14 + local.get $5 + f64.mul + f64.add + local.get $1 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $7 + local.get $3 + f64.mul + local.get $11 + local.get $4 + f64.mul + f64.add + local.get $15 + local.get $5 + f64.mul + f64.add + local.get $1 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $8 + local.get $3 + f64.mul + local.get $12 + local.get $4 + f64.mul + f64.add + local.get $16 + local.get $5 + f64.mul + f64.add + local.get $1 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + local.get $9 + local.get $3 + f64.mul + local.get $13 + local.get $4 + f64.mul + f64.add + local.get $17 + local.get $5 + f64.mul + f64.add + local.get $1 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + end + local.get $0 + ) + (func $assembly/mat4/scale (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + local.get $1 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + local.get $1 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + local.get $1 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $1 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $1 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + local.get $1 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat4/rotate (param $0 i32) (param $1 i32) (param $2 f64) (param $3 i32) (result i32) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 f64) + (local $16 f64) + (local $17 f64) + (local $18 f64) + (local $19 f64) + (local $20 f64) + (local $21 f64) + (local $22 f64) + (local $23 f64) + (local $24 f64) + (local $25 f64) + (local $26 f64) + (local $27 f64) + (local $28 f64) + (local $29 f64) + (local $30 f64) + (local $31 f64) + local.get $3 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $3 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $3 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $4 + local.get $5 + local.get $6 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $assembly/imports/MathUtil.hypot + local.set $7 + local.get $7 + global.get $assembly/common/EPSILON + f64.lt + if + i32.const 0 + return + end + f64.const 1 + local.get $7 + f64.div + local.set $7 + local.get $4 + local.get $7 + f64.mul + local.set $4 + local.get $5 + local.get $7 + f64.mul + local.set $5 + local.get $6 + local.get $7 + f64.mul + local.set $6 + local.get $2 + call $~lib/math/NativeMath.sin + local.set $8 + local.get $2 + call $~lib/math/NativeMath.cos + local.set $9 + f64.const 1 + local.get $9 + f64.sub + local.set $10 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $12 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $13 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $14 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $15 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $16 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $17 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $18 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.set $19 + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.set $20 + local.get $1 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.set $21 + local.get $1 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.set $22 + local.get $4 + local.get $4 + f64.mul + local.get $10 + f64.mul + local.get $9 + f64.add + local.set $23 + local.get $5 + local.get $4 + f64.mul + local.get $10 + f64.mul + local.get $6 + local.get $8 + f64.mul + f64.add + local.set $24 + local.get $6 + local.get $4 + f64.mul + local.get $10 + f64.mul + local.get $5 + local.get $8 + f64.mul + f64.sub + local.set $25 + local.get $4 + local.get $5 + f64.mul + local.get $10 + f64.mul + local.get $6 + local.get $8 + f64.mul + f64.sub + local.set $26 + local.get $5 + local.get $5 + f64.mul + local.get $10 + f64.mul + local.get $9 + f64.add + local.set $27 + local.get $6 + local.get $5 + f64.mul + local.get $10 + f64.mul + local.get $4 + local.get $8 + f64.mul + f64.add + local.set $28 + local.get $4 + local.get $6 + f64.mul + local.get $10 + f64.mul + local.get $5 + local.get $8 + f64.mul + f64.add + local.set $29 + local.get $5 + local.get $6 + f64.mul + local.get $10 + f64.mul + local.get $4 + local.get $8 + f64.mul + f64.sub + local.set $30 + local.get $6 + local.get $6 + f64.mul + local.get $10 + f64.mul + local.get $9 + f64.add + local.set $31 + local.get $0 + i32.const 0 + local.get $11 + local.get $23 + f64.mul + local.get $15 + local.get $24 + f64.mul + f64.add + local.get $19 + local.get $25 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $12 + local.get $23 + f64.mul + local.get $16 + local.get $24 + f64.mul + f64.add + local.get $20 + local.get $25 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $13 + local.get $23 + f64.mul + local.get $17 + local.get $24 + f64.mul + f64.add + local.get $21 + local.get $25 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $14 + local.get $23 + f64.mul + local.get $18 + local.get $24 + f64.mul + f64.add + local.get $22 + local.get $25 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $11 + local.get $26 + f64.mul + local.get $15 + local.get $27 + f64.mul + f64.add + local.get $19 + local.get $28 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $12 + local.get $26 + f64.mul + local.get $16 + local.get $27 + f64.mul + f64.add + local.get $20 + local.get $28 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $13 + local.get $26 + f64.mul + local.get $17 + local.get $27 + f64.mul + f64.add + local.get $21 + local.get $28 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $14 + local.get $26 + f64.mul + local.get $18 + local.get $27 + f64.mul + f64.add + local.get $22 + local.get $28 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $11 + local.get $29 + f64.mul + local.get $15 + local.get $30 + f64.mul + f64.add + local.get $19 + local.get $31 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $12 + local.get $29 + f64.mul + local.get $16 + local.get $30 + f64.mul + f64.add + local.get $20 + local.get $31 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + local.get $13 + local.get $29 + f64.mul + local.get $17 + local.get $30 + f64.mul + f64.add + local.get $21 + local.get $31 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + local.get $14 + local.get $29 + f64.mul + local.get $18 + local.get $30 + f64.mul + f64.add + local.get $22 + local.get $31 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $1 + local.get $0 + i32.ne + if + local.get $0 + i32.const 12 + local.get $1 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $1 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $1 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + local.get $1 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + end + local.get $0 + ) + (func $assembly/mat4/rotateX (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + local.get $2 + call $~lib/math/NativeMath.sin + local.set $3 + local.get $2 + call $~lib/math/NativeMath.cos + local.set $4 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $1 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $1 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.set $12 + local.get $1 + local.get $0 + i32.ne + if + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + local.get $1 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $1 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $1 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + local.get $1 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + end + local.get $0 + i32.const 4 + local.get $5 + local.get $4 + f64.mul + local.get $9 + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $6 + local.get $4 + f64.mul + local.get $10 + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $7 + local.get $4 + f64.mul + local.get $11 + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $8 + local.get $4 + f64.mul + local.get $12 + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $9 + local.get $4 + f64.mul + local.get $5 + local.get $3 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $10 + local.get $4 + f64.mul + local.get $6 + local.get $3 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + local.get $11 + local.get $4 + f64.mul + local.get $7 + local.get $3 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + local.get $12 + local.get $4 + f64.mul + local.get $8 + local.get $3 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat4/rotateY (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + local.get $2 + call $~lib/math/NativeMath.sin + local.set $3 + local.get $2 + call $~lib/math/NativeMath.cos + local.set $4 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $1 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $1 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.set $12 + local.get $1 + local.get $0 + i32.ne + if + local.get $0 + i32.const 4 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + local.get $1 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $1 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $1 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + local.get $1 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + end + local.get $0 + i32.const 0 + local.get $5 + local.get $4 + f64.mul + local.get $9 + local.get $3 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $6 + local.get $4 + f64.mul + local.get $10 + local.get $3 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $7 + local.get $4 + f64.mul + local.get $11 + local.get $3 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $8 + local.get $4 + f64.mul + local.get $12 + local.get $3 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $5 + local.get $3 + f64.mul + local.get $9 + local.get $4 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $6 + local.get $3 + f64.mul + local.get $10 + local.get $4 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + local.get $7 + local.get $3 + f64.mul + local.get $11 + local.get $4 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + local.get $8 + local.get $3 + f64.mul + local.get $12 + local.get $4 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat4/rotateZ (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + local.get $2 + call $~lib/math/NativeMath.sin + local.set $3 + local.get $2 + call $~lib/math/NativeMath.cos + local.set $4 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $12 + local.get $1 + local.get $0 + i32.ne + if + local.get $0 + i32.const 8 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + local.get $1 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + local.get $1 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + local.get $1 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $1 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $1 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + local.get $1 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + end + local.get $0 + i32.const 0 + local.get $5 + local.get $4 + f64.mul + local.get $9 + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $6 + local.get $4 + f64.mul + local.get $10 + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $7 + local.get $4 + f64.mul + local.get $11 + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $8 + local.get $4 + f64.mul + local.get $12 + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $9 + local.get $4 + f64.mul + local.get $5 + local.get $3 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $10 + local.get $4 + f64.mul + local.get $6 + local.get $3 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $11 + local.get $4 + f64.mul + local.get $7 + local.get $3 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $12 + local.get $4 + f64.mul + local.get $8 + local.get $3 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat4/fromTranslation (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 0 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat4/fromScaling (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat4/fromRotation (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $3 + local.get $4 + local.get $5 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $assembly/imports/MathUtil.hypot + local.set $6 + local.get $6 + global.get $assembly/common/EPSILON + f64.lt + if + i32.const 0 + return + end + f64.const 1 + local.get $6 + f64.div + local.set $6 + local.get $3 + local.get $6 + f64.mul + local.set $3 + local.get $4 + local.get $6 + f64.mul + local.set $4 + local.get $5 + local.get $6 + f64.mul + local.set $5 + local.get $1 + call $~lib/math/NativeMath.sin + local.set $7 + local.get $1 + call $~lib/math/NativeMath.cos + local.set $8 + f64.const 1 + local.get $8 + f64.sub + local.set $9 + local.get $0 + i32.const 0 + local.get $3 + local.get $3 + f64.mul + local.get $9 + f64.mul + local.get $8 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $4 + local.get $3 + f64.mul + local.get $9 + f64.mul + local.get $5 + local.get $7 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $5 + local.get $3 + f64.mul + local.get $9 + f64.mul + local.get $4 + local.get $7 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $3 + local.get $4 + f64.mul + local.get $9 + f64.mul + local.get $5 + local.get $7 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $4 + local.get $4 + f64.mul + local.get $9 + f64.mul + local.get $8 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $5 + local.get $4 + f64.mul + local.get $9 + f64.mul + local.get $3 + local.get $7 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $3 + local.get $5 + f64.mul + local.get $9 + f64.mul + local.get $4 + local.get $7 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $4 + local.get $5 + f64.mul + local.get $9 + f64.mul + local.get $3 + local.get $7 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + local.get $5 + local.get $5 + f64.mul + local.get $9 + f64.mul + local.get $8 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat4/fromXRotation (param $0 i32) (param $1 f64) (result i32) + (local $2 f64) + (local $3 f64) + local.get $1 + call $~lib/math/NativeMath.sin + local.set $2 + local.get $1 + call $~lib/math/NativeMath.cos + local.set $3 + local.get $0 + i32.const 0 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $3 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $2 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $2 + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + local.get $3 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat4/fromYRotation (param $0 i32) (param $1 f64) (result i32) + (local $2 f64) + (local $3 f64) + local.get $1 + call $~lib/math/NativeMath.sin + local.set $2 + local.get $1 + call $~lib/math/NativeMath.cos + local.set $3 + local.get $0 + i32.const 0 + local.get $3 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $2 + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $2 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + local.get $3 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat4/fromZRotation (param $0 i32) (param $1 f64) (result i32) + (local $2 f64) + (local $3 f64) + local.get $1 + call $~lib/math/NativeMath.sin + local.set $2 + local.get $1 + call $~lib/math/NativeMath.cos + local.set $3 + local.get $0 + i32.const 0 + local.get $3 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $2 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $2 + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $3 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat4/fromRotationTranslation (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 f64) + (local $16 f64) + (local $17 f64) + (local $18 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $3 + local.get $3 + f64.add + local.set $7 + local.get $4 + local.get $4 + f64.add + local.set $8 + local.get $5 + local.get $5 + f64.add + local.set $9 + local.get $3 + local.get $7 + f64.mul + local.set $10 + local.get $3 + local.get $8 + f64.mul + local.set $11 + local.get $3 + local.get $9 + f64.mul + local.set $12 + local.get $4 + local.get $8 + f64.mul + local.set $13 + local.get $4 + local.get $9 + f64.mul + local.set $14 + local.get $5 + local.get $9 + f64.mul + local.set $15 + local.get $6 + local.get $7 + f64.mul + local.set $16 + local.get $6 + local.get $8 + f64.mul + local.set $17 + local.get $6 + local.get $9 + f64.mul + local.set $18 + local.get $0 + i32.const 0 + f64.const 1 + local.get $13 + local.get $15 + f64.add + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $11 + local.get $18 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $12 + local.get $17 + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $11 + local.get $18 + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 1 + local.get $10 + local.get $15 + f64.add + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $14 + local.get $16 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $12 + local.get $17 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $14 + local.get $16 + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + f64.const 1 + local.get $10 + local.get $13 + f64.add + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat4/getTranslation (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat4/getScaling (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $1 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $0 + i32.const 0 + local.get $2 + local.get $3 + local.get $4 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $assembly/imports/MathUtil.hypot + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $5 + local.get $6 + local.get $7 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $assembly/imports/MathUtil.hypot + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $8 + local.get $9 + local.get $10 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $assembly/imports/MathUtil.hypot + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat4/decompose (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 f64) + (local $16 f64) + (local $17 f64) + (local $18 f64) + (local $19 f64) + (local $20 f64) + (local $21 f64) + (local $22 f64) + (local $23 f64) + (local $24 f64) + (local $25 f64) + (local $26 f64) + (local $27 f64) + local.get $1 + i32.const 0 + local.get $3 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 1 + local.get $3 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 2 + local.get $3 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $3 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $3 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $3 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $3 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $3 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $3 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $3 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $3 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $3 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.set $12 + local.get $2 + i32.const 0 + local.get $4 + local.get $5 + local.get $6 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $assembly/imports/MathUtil.hypot + call $~lib/typedarray/Float64Array#__set + local.get $2 + i32.const 1 + local.get $7 + local.get $8 + local.get $9 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $assembly/imports/MathUtil.hypot + call $~lib/typedarray/Float64Array#__set + local.get $2 + i32.const 2 + local.get $10 + local.get $11 + local.get $12 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $assembly/imports/MathUtil.hypot + call $~lib/typedarray/Float64Array#__set + i32.const 1 + f64.convert_i32_s + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.div + local.set $13 + i32.const 1 + f64.convert_i32_s + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.div + local.set $14 + i32.const 1 + f64.convert_i32_s + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.div + local.set $15 + local.get $4 + local.get $13 + f64.mul + local.set $16 + local.get $5 + local.get $14 + f64.mul + local.set $17 + local.get $6 + local.get $15 + f64.mul + local.set $18 + local.get $7 + local.get $13 + f64.mul + local.set $19 + local.get $8 + local.get $14 + f64.mul + local.set $20 + local.get $9 + local.get $15 + f64.mul + local.set $21 + local.get $10 + local.get $13 + f64.mul + local.set $22 + local.get $11 + local.get $14 + f64.mul + local.set $23 + local.get $12 + local.get $15 + f64.mul + local.set $24 + local.get $16 + local.get $20 + f64.add + local.get $24 + f64.add + local.set $25 + f64.const 0 + local.set $26 + local.get $25 + f64.const 0 + f64.gt + if + local.get $25 + f64.const 1 + f64.add + local.set $27 + local.get $27 + f64.sqrt + f64.const 2 + f64.mul + local.set $26 + local.get $0 + i32.const 3 + f64.const 0.25 + local.get $26 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 0 + local.get $21 + local.get $23 + f64.sub + local.get $26 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $22 + local.get $18 + f64.sub + local.get $26 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $17 + local.get $19 + f64.sub + local.get $26 + f64.div + call $~lib/typedarray/Float64Array#__set + else + local.get $16 + local.get $20 + f64.gt + if (result i32) + local.get $16 + local.get $24 + f64.gt + else + i32.const 0 + end + if + f64.const 1 + local.get $16 + f64.add + local.get $20 + f64.sub + local.get $24 + f64.sub + local.set $27 + local.get $27 + f64.sqrt + f64.const 2 + f64.mul + local.set $26 + local.get $0 + i32.const 3 + local.get $21 + local.get $23 + f64.sub + local.get $26 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 0 + f64.const 0.25 + local.get $26 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $17 + local.get $19 + f64.add + local.get $26 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $22 + local.get $18 + f64.add + local.get $26 + f64.div + call $~lib/typedarray/Float64Array#__set + else + local.get $20 + local.get $24 + f64.gt + if + f64.const 1 + local.get $20 + f64.add + local.get $16 + f64.sub + local.get $24 + f64.sub + local.set $27 + local.get $27 + f64.sqrt + f64.const 2 + f64.mul + local.set $26 + local.get $0 + i32.const 3 + local.get $22 + local.get $18 + f64.sub + local.get $26 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 0 + local.get $17 + local.get $19 + f64.add + local.get $26 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0.25 + local.get $26 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $21 + local.get $23 + f64.add + local.get $26 + f64.div + call $~lib/typedarray/Float64Array#__set + else + f64.const 1 + local.get $24 + f64.add + local.get $16 + f64.sub + local.get $20 + f64.sub + local.set $27 + local.get $27 + f64.sqrt + f64.const 2 + f64.mul + local.set $26 + local.get $0 + i32.const 3 + local.get $17 + local.get $19 + f64.sub + local.get $26 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 0 + local.get $22 + local.get $18 + f64.add + local.get $26 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $21 + local.get $23 + f64.add + local.get $26 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0.25 + local.get $26 + f64.mul + call $~lib/typedarray/Float64Array#__set + end + end + end + local.get $0 + ) + (func $assembly/mat4/fromRotationTranslationScale (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 f64) + (local $16 f64) + (local $17 f64) + (local $18 f64) + (local $19 f64) + (local $20 f64) + (local $21 f64) + (local $22 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $4 + local.get $4 + f64.add + local.set $8 + local.get $5 + local.get $5 + f64.add + local.set $9 + local.get $6 + local.get $6 + f64.add + local.set $10 + local.get $4 + local.get $8 + f64.mul + local.set $11 + local.get $4 + local.get $9 + f64.mul + local.set $12 + local.get $4 + local.get $10 + f64.mul + local.set $13 + local.get $5 + local.get $9 + f64.mul + local.set $14 + local.get $5 + local.get $10 + f64.mul + local.set $15 + local.get $6 + local.get $10 + f64.mul + local.set $16 + local.get $7 + local.get $8 + f64.mul + local.set $17 + local.get $7 + local.get $9 + f64.mul + local.set $18 + local.get $7 + local.get $10 + f64.mul + local.set $19 + local.get $3 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $20 + local.get $3 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $21 + local.get $3 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $22 + local.get $0 + i32.const 0 + f64.const 1 + local.get $14 + local.get $16 + f64.add + f64.sub + local.get $20 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $12 + local.get $19 + f64.add + local.get $20 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $13 + local.get $18 + f64.sub + local.get $20 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $12 + local.get $19 + f64.sub + local.get $21 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 1 + local.get $11 + local.get $16 + f64.add + f64.sub + local.get $21 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $15 + local.get $17 + f64.add + local.get $21 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $13 + local.get $18 + f64.add + local.get $22 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $15 + local.get $17 + f64.sub + local.get $22 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + f64.const 1 + local.get $11 + local.get $14 + f64.add + f64.sub + local.get $22 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat4/fromRotationTranslationScaleOrigin (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 f64) + (local $16 f64) + (local $17 f64) + (local $18 f64) + (local $19 f64) + (local $20 f64) + (local $21 f64) + (local $22 f64) + (local $23 f64) + (local $24 f64) + (local $25 f64) + (local $26 f64) + (local $27 f64) + (local $28 f64) + (local $29 f64) + (local $30 f64) + (local $31 f64) + (local $32 f64) + (local $33 f64) + (local $34 f64) + (local $35 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $5 + local.get $5 + f64.add + local.set $9 + local.get $6 + local.get $6 + f64.add + local.set $10 + local.get $7 + local.get $7 + f64.add + local.set $11 + local.get $5 + local.get $9 + f64.mul + local.set $12 + local.get $5 + local.get $10 + f64.mul + local.set $13 + local.get $5 + local.get $11 + f64.mul + local.set $14 + local.get $6 + local.get $10 + f64.mul + local.set $15 + local.get $6 + local.get $11 + f64.mul + local.set $16 + local.get $7 + local.get $11 + f64.mul + local.set $17 + local.get $8 + local.get $9 + f64.mul + local.set $18 + local.get $8 + local.get $10 + f64.mul + local.set $19 + local.get $8 + local.get $11 + f64.mul + local.set $20 + local.get $3 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $21 + local.get $3 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $22 + local.get $3 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $23 + local.get $4 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $24 + local.get $4 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $25 + local.get $4 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $26 + i32.const 1 + f64.convert_i32_s + local.get $15 + local.get $17 + f64.add + f64.sub + local.get $21 + f64.mul + local.set $27 + local.get $13 + local.get $20 + f64.add + local.get $21 + f64.mul + local.set $28 + local.get $14 + local.get $19 + f64.sub + local.get $21 + f64.mul + local.set $29 + local.get $13 + local.get $20 + f64.sub + local.get $22 + f64.mul + local.set $30 + i32.const 1 + f64.convert_i32_s + local.get $12 + local.get $17 + f64.add + f64.sub + local.get $22 + f64.mul + local.set $31 + local.get $16 + local.get $18 + f64.add + local.get $22 + f64.mul + local.set $32 + local.get $14 + local.get $19 + f64.add + local.get $23 + f64.mul + local.set $33 + local.get $16 + local.get $18 + f64.sub + local.get $23 + f64.mul + local.set $34 + i32.const 1 + f64.convert_i32_s + local.get $12 + local.get $15 + f64.add + f64.sub + local.get $23 + f64.mul + local.set $35 + local.get $0 + i32.const 0 + local.get $27 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $28 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $29 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $30 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $31 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $32 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $33 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $34 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + local.get $35 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $24 + f64.add + local.get $27 + local.get $24 + f64.mul + local.get $30 + local.get $25 + f64.mul + f64.add + local.get $33 + local.get $26 + f64.mul + f64.add + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $25 + f64.add + local.get $28 + local.get $24 + f64.mul + local.get $31 + local.get $25 + f64.mul + f64.add + local.get $34 + local.get $26 + f64.mul + f64.add + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $26 + f64.add + local.get $29 + local.get $24 + f64.mul + local.get $32 + local.get $25 + f64.mul + f64.add + local.get $35 + local.get $26 + f64.mul + f64.add + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat4/fromQuat (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 f64) + (local $16 f64) + (local $17 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $2 + local.get $2 + f64.add + local.set $6 + local.get $3 + local.get $3 + f64.add + local.set $7 + local.get $4 + local.get $4 + f64.add + local.set $8 + local.get $2 + local.get $6 + f64.mul + local.set $9 + local.get $3 + local.get $6 + f64.mul + local.set $10 + local.get $3 + local.get $7 + f64.mul + local.set $11 + local.get $4 + local.get $6 + f64.mul + local.set $12 + local.get $4 + local.get $7 + f64.mul + local.set $13 + local.get $4 + local.get $8 + f64.mul + local.set $14 + local.get $5 + local.get $6 + f64.mul + local.set $15 + local.get $5 + local.get $7 + f64.mul + local.set $16 + local.get $5 + local.get $8 + f64.mul + local.set $17 + local.get $0 + i32.const 0 + f64.const 1 + local.get $11 + f64.sub + local.get $14 + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $10 + local.get $17 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $12 + local.get $16 + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $10 + local.get $17 + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 1 + local.get $9 + f64.sub + local.get $14 + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $13 + local.get $15 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $12 + local.get $16 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $13 + local.get $15 + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + f64.const 1 + local.get $9 + f64.sub + local.get $11 + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat4/frustum (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (result i32) + (local $7 f64) + (local $8 f64) + (local $9 f64) + i32.const 1 + f64.convert_i32_s + local.get $2 + local.get $1 + f64.sub + f64.div + local.set $7 + i32.const 1 + f64.convert_i32_s + local.get $4 + local.get $3 + f64.sub + f64.div + local.set $8 + i32.const 1 + f64.convert_i32_s + local.get $5 + local.get $6 + f64.sub + f64.div + local.set $9 + local.get $0 + i32.const 0 + local.get $5 + f64.const 2 + f64.mul + local.get $7 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $5 + f64.const 2 + f64.mul + local.get $8 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $2 + local.get $1 + f64.add + local.get $7 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $4 + local.get $3 + f64.add + local.get $8 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + local.get $6 + local.get $5 + f64.add + local.get $9 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + f64.const -1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $6 + local.get $5 + f64.mul + f64.const 2 + f64.mul + local.get $9 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat4/perspectiveZO (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) + (local $5 f64) + (local $6 f64) + f64.const 1 + local.get $1 + f64.const 2 + f64.div + call $~lib/math/NativeMath.tan + f64.div + local.set $5 + local.get $0 + i32.const 0 + local.get $5 + local.get $2 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $5 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + f64.const -1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $4 + i32.const 0 + i32.ne + if (result i32) + local.get $4 + f64.convert_i32_u + f64.const inf + f64.ne + else + i32.const 0 + end + if + i32.const 1 + f64.convert_i32_s + local.get $3 + local.get $4 + f64.convert_i32_u + f64.sub + f64.div + local.set $6 + local.get $0 + i32.const 10 + local.get $4 + f64.convert_i32_u + local.get $6 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $4 + f64.convert_i32_u + local.get $3 + f64.mul + local.get $6 + f64.mul + call $~lib/typedarray/Float64Array#__set + else + local.get $0 + i32.const 10 + f64.const -1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $3 + f64.neg + call $~lib/typedarray/Float64Array#__set + end + local.get $0 + ) + (func $assembly/mat4/perspectiveFromFieldOfView (param $0 i32) (param $1 i32) (param $2 f64) (param $3 f64) (result i32) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + local.get $1 + f64.load + global.get $~lib/math/NativeMath.PI + f64.mul + f64.const 180 + f64.div + call $~lib/math/NativeMath.tan + local.set $4 + local.get $1 + f64.load offset=8 + global.get $~lib/math/NativeMath.PI + f64.mul + f64.const 180 + f64.div + call $~lib/math/NativeMath.tan + local.set $5 + local.get $1 + f64.load offset=16 + global.get $~lib/math/NativeMath.PI + f64.mul + f64.const 180 + f64.div + call $~lib/math/NativeMath.tan + local.set $6 + local.get $1 + f64.load offset=24 + global.get $~lib/math/NativeMath.PI + f64.mul + f64.const 180 + f64.div + call $~lib/math/NativeMath.tan + local.set $7 + f64.const 2 + local.get $6 + local.get $7 + f64.add + f64.div + local.set $8 + f64.const 2 + local.get $4 + local.get $5 + f64.add + f64.div + local.set $9 + local.get $0 + i32.const 0 + local.get $8 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $9 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $6 + local.get $7 + f64.sub + local.get $8 + f64.mul + f64.const 0.5 + f64.mul + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $4 + local.get $5 + f64.sub + local.get $9 + f64.mul + f64.const 0.5 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + local.get $3 + local.get $2 + local.get $3 + f64.sub + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + f64.const -1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $3 + local.get $2 + f64.mul + local.get $2 + local.get $3 + f64.sub + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat4/orthoZO (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (result i32) + (local $7 f64) + (local $8 f64) + (local $9 f64) + i32.const 1 + f64.convert_i32_s + local.get $1 + local.get $2 + f64.sub + f64.div + local.set $7 + i32.const 1 + f64.convert_i32_s + local.get $3 + local.get $4 + f64.sub + f64.div + local.set $8 + i32.const 1 + f64.convert_i32_s + local.get $5 + local.get $6 + f64.sub + f64.div + local.set $9 + local.get $0 + i32.const 0 + f64.const -2 + local.get $7 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const -2 + local.get $8 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + local.get $9 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + local.get $1 + local.get $2 + f64.add + local.get $7 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $4 + local.get $3 + f64.add + local.get $8 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $5 + local.get $9 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat4/lookAt (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 f64) + (local $16 f64) + (local $17 f64) + (local $18 f64) + (local $19 f64) + (local $20 f64) + (local $21 f64) + (local $22 f64) + (local $23 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $14 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $15 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $16 + local.get $3 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $17 + local.get $3 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $18 + local.get $3 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $19 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $20 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $21 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $22 + local.get $14 + local.get $20 + f64.sub + local.set $23 + local.get $23 + f64.abs + global.get $assembly/common/EPSILON + f64.lt + if (result i32) + local.get $15 + local.get $21 + f64.sub + local.set $23 + local.get $23 + f64.abs + global.get $assembly/common/EPSILON + f64.lt + else + i32.const 0 + end + if (result i32) + local.get $16 + local.get $22 + f64.sub + local.set $23 + local.get $23 + f64.abs + global.get $assembly/common/EPSILON + f64.lt + else + i32.const 0 + end + if + local.get $0 + call $assembly/mat4/identity + return + end + local.get $14 + local.get $20 + f64.sub + local.set $10 + local.get $15 + local.get $21 + f64.sub + local.set $11 + local.get $16 + local.get $22 + f64.sub + local.set $12 + f64.const 1 + local.get $10 + local.get $11 + local.get $12 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $assembly/imports/MathUtil.hypot + f64.div + local.set $13 + local.get $10 + local.get $13 + f64.mul + local.set $10 + local.get $11 + local.get $13 + f64.mul + local.set $11 + local.get $12 + local.get $13 + f64.mul + local.set $12 + local.get $18 + local.get $12 + f64.mul + local.get $19 + local.get $11 + f64.mul + f64.sub + local.set $4 + local.get $19 + local.get $10 + f64.mul + local.get $17 + local.get $12 + f64.mul + f64.sub + local.set $5 + local.get $17 + local.get $11 + f64.mul + local.get $18 + local.get $10 + f64.mul + f64.sub + local.set $6 + local.get $4 + local.get $5 + local.get $6 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $assembly/imports/MathUtil.hypot + local.set $13 + local.get $13 + i64.reinterpret_f64 + i64.const 1 + i64.shl + i64.const 2 + i64.sub + i64.const -9007199254740994 + i64.le_u + i32.eqz + if + f64.const 0 + local.set $4 + f64.const 0 + local.set $5 + f64.const 0 + local.set $6 + else + f64.const 1 + local.get $13 + f64.div + local.set $13 + local.get $4 + local.get $13 + f64.mul + local.set $4 + local.get $5 + local.get $13 + f64.mul + local.set $5 + local.get $6 + local.get $13 + f64.mul + local.set $6 + end + local.get $11 + local.get $6 + f64.mul + local.get $12 + local.get $5 + f64.mul + f64.sub + local.set $7 + local.get $12 + local.get $4 + f64.mul + local.get $10 + local.get $6 + f64.mul + f64.sub + local.set $8 + local.get $10 + local.get $5 + f64.mul + local.get $11 + local.get $4 + f64.mul + f64.sub + local.set $9 + local.get $7 + local.get $8 + local.get $9 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $assembly/imports/MathUtil.hypot + local.set $13 + local.get $13 + i64.reinterpret_f64 + i64.const 1 + i64.shl + i64.const 2 + i64.sub + i64.const -9007199254740994 + i64.le_u + i32.eqz + if + f64.const 0 + local.set $7 + f64.const 0 + local.set $8 + f64.const 0 + local.set $9 + else + f64.const 1 + local.get $13 + f64.div + local.set $13 + local.get $7 + local.get $13 + f64.mul + local.set $7 + local.get $8 + local.get $13 + f64.mul + local.set $8 + local.get $9 + local.get $13 + f64.mul + local.set $9 + end + local.get $0 + i32.const 0 + local.get $4 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $7 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $10 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $5 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $8 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $11 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $6 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $9 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + local.get $12 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + local.get $4 + local.get $14 + f64.mul + local.get $5 + local.get $15 + f64.mul + f64.add + local.get $6 + local.get $16 + f64.mul + f64.add + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $7 + local.get $14 + f64.mul + local.get $8 + local.get $15 + f64.mul + f64.add + local.get $9 + local.get $16 + f64.mul + f64.add + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $10 + local.get $14 + f64.mul + local.get $11 + local.get $15 + f64.mul + f64.add + local.get $12 + local.get $16 + f64.mul + f64.add + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat4/targetTo (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 f64) + (local $16 f64) + (local $17 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $3 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $3 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $3 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $4 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.sub + local.set $10 + local.get $5 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.sub + local.set $11 + local.get $6 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.sub + local.set $12 + local.get $10 + local.get $10 + f64.mul + local.get $11 + local.get $11 + f64.mul + f64.add + local.get $12 + local.get $12 + f64.mul + f64.add + local.set $13 + local.get $13 + f64.const 0 + f64.gt + if + f64.const 1 + local.get $13 + local.set $14 + local.get $14 + f64.sqrt + f64.div + local.set $13 + local.get $10 + local.get $13 + f64.mul + local.set $10 + local.get $11 + local.get $13 + f64.mul + local.set $11 + local.get $12 + local.get $13 + f64.mul + local.set $12 + end + local.get $8 + local.get $12 + f64.mul + local.get $9 + local.get $11 + f64.mul + f64.sub + local.set $14 + local.get $9 + local.get $10 + f64.mul + local.get $7 + local.get $12 + f64.mul + f64.sub + local.set $15 + local.get $7 + local.get $11 + f64.mul + local.get $8 + local.get $10 + f64.mul + f64.sub + local.set $16 + local.get $14 + local.get $14 + f64.mul + local.get $15 + local.get $15 + f64.mul + f64.add + local.get $16 + local.get $16 + f64.mul + f64.add + local.set $13 + local.get $13 + f64.const 0 + f64.gt + if + f64.const 1 + local.get $13 + local.set $17 + local.get $17 + f64.sqrt + f64.div + local.set $13 + local.get $14 + local.get $13 + f64.mul + local.set $14 + local.get $15 + local.get $13 + f64.mul + local.set $15 + local.get $16 + local.get $13 + f64.mul + local.set $16 + end + local.get $0 + i32.const 0 + local.get $14 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $15 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $16 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $11 + local.get $16 + f64.mul + local.get $12 + local.get $15 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $12 + local.get $14 + f64.mul + local.get $10 + local.get $16 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $10 + local.get $15 + f64.mul + local.get $11 + local.get $14 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $10 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $11 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + local.get $12 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + local.get $4 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $5 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $6 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat4/frob (param $0 i32) (result f64) + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + call $assembly/imports/MathUtil.hypot + ) + (func $assembly/mat4/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + local.get $1 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + local.get $1 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + local.get $1 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $1 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $1 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + local.get $1 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat4/multiplyScalar (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + local.get $1 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + local.get $1 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + local.get $1 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $1 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $1 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + local.get $1 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat4/multiplyScalarAndAdd (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + local.get $1 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + local.get $1 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + local.get $1 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $1 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $1 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + local.get $1 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat4/exactEquals (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.eq + if (result i32) + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + ) + (func $assembly/mat4/equals (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 f64) + (local $16 f64) + (local $17 f64) + (local $18 f64) + (local $19 f64) + (local $20 f64) + (local $21 f64) + (local $22 f64) + (local $23 f64) + (local $24 f64) + (local $25 f64) + (local $26 f64) + (local $27 f64) + (local $28 f64) + (local $29 f64) + (local $30 f64) + (local $31 f64) + (local $32 f64) + (local $33 f64) + (local $34 f64) + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $0 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $0 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $0 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $0 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $0 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $0 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $0 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.set $12 + local.get $0 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.set $13 + local.get $0 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + local.set $14 + local.get $0 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + local.set $15 + local.get $0 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + local.set $16 + local.get $0 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + local.set $17 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $18 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $19 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $20 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $21 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $22 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $23 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $24 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $25 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.set $26 + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.set $27 + local.get $1 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.set $28 + local.get $1 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.set $29 + local.get $1 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + local.set $30 + local.get $1 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + local.set $31 + local.get $1 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + local.set $32 + local.get $1 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + local.set $33 + local.get $2 + local.get $18 + f64.sub + local.set $34 + local.get $34 + f64.abs + global.get $assembly/common/EPSILON + f64.const 1 + local.get $2 + local.set $34 + local.get $34 + f64.abs + local.get $18 + local.set $34 + local.get $34 + f64.abs + call $assembly/imports/MathUtil.max + f64.mul + f64.le + if (result i32) + local.get $3 + local.get $19 + f64.sub + local.set $34 + local.get $34 + f64.abs + global.get $assembly/common/EPSILON + f64.const 1 + local.get $3 + local.set $34 + local.get $34 + f64.abs + local.get $19 + local.set $34 + local.get $34 + f64.abs + call $assembly/imports/MathUtil.max + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $4 + local.get $20 + f64.sub + local.set $34 + local.get $34 + f64.abs + global.get $assembly/common/EPSILON + f64.const 1 + local.get $4 + local.set $34 + local.get $34 + f64.abs + local.get $20 + local.set $34 + local.get $34 + f64.abs + call $assembly/imports/MathUtil.max + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $5 + local.get $21 + f64.sub + local.set $34 + local.get $34 + f64.abs + global.get $assembly/common/EPSILON + f64.const 1 + local.get $5 + local.set $34 + local.get $34 + f64.abs + local.get $21 + local.set $34 + local.get $34 + f64.abs + call $assembly/imports/MathUtil.max + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $6 + local.get $22 + f64.sub + local.set $34 + local.get $34 + f64.abs + global.get $assembly/common/EPSILON + f64.const 1 + local.get $6 + local.set $34 + local.get $34 + f64.abs + local.get $22 + local.set $34 + local.get $34 + f64.abs + call $assembly/imports/MathUtil.max + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $7 + local.get $23 + f64.sub + local.set $34 + local.get $34 + f64.abs + global.get $assembly/common/EPSILON + f64.const 1 + local.get $7 + local.set $34 + local.get $34 + f64.abs + local.get $23 + local.set $34 + local.get $34 + f64.abs + call $assembly/imports/MathUtil.max + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $8 + local.get $24 + f64.sub + local.set $34 + local.get $34 + f64.abs + global.get $assembly/common/EPSILON + f64.const 1 + local.get $8 + local.set $34 + local.get $34 + f64.abs + local.get $24 + local.set $34 + local.get $34 + f64.abs + call $assembly/imports/MathUtil.max + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $9 + local.get $25 + f64.sub + local.set $34 + local.get $34 + f64.abs + global.get $assembly/common/EPSILON + f64.const 1 + local.get $9 + local.set $34 + local.get $34 + f64.abs + local.get $25 + local.set $34 + local.get $34 + f64.abs + call $assembly/imports/MathUtil.max + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $10 + local.get $26 + f64.sub + local.set $34 + local.get $34 + f64.abs + global.get $assembly/common/EPSILON + f64.const 1 + local.get $10 + local.set $34 + local.get $34 + f64.abs + local.get $26 + local.set $34 + local.get $34 + f64.abs + call $assembly/imports/MathUtil.max + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $11 + local.get $27 + f64.sub + local.set $34 + local.get $34 + f64.abs + global.get $assembly/common/EPSILON + f64.const 1 + local.get $11 + local.set $34 + local.get $34 + f64.abs + local.get $27 + local.set $34 + local.get $34 + f64.abs + call $assembly/imports/MathUtil.max + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $12 + local.get $28 + f64.sub + local.set $34 + local.get $34 + f64.abs + global.get $assembly/common/EPSILON + f64.const 1 + local.get $12 + local.set $34 + local.get $34 + f64.abs + local.get $28 + local.set $34 + local.get $34 + f64.abs + call $assembly/imports/MathUtil.max + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $13 + local.get $29 + f64.sub + local.set $34 + local.get $34 + f64.abs + global.get $assembly/common/EPSILON + f64.const 1 + local.get $13 + local.set $34 + local.get $34 + f64.abs + local.get $29 + local.set $34 + local.get $34 + f64.abs + call $assembly/imports/MathUtil.max + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $14 + local.get $30 + f64.sub + local.set $34 + local.get $34 + f64.abs + global.get $assembly/common/EPSILON + f64.const 1 + local.get $14 + local.set $34 + local.get $34 + f64.abs + local.get $30 + local.set $34 + local.get $34 + f64.abs + call $assembly/imports/MathUtil.max + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $15 + local.get $31 + f64.sub + local.set $34 + local.get $34 + f64.abs + global.get $assembly/common/EPSILON + f64.const 1 + local.get $15 + local.set $34 + local.get $34 + f64.abs + local.get $31 + local.set $34 + local.get $34 + f64.abs + call $assembly/imports/MathUtil.max + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $16 + local.get $32 + f64.sub + local.set $34 + local.get $34 + f64.abs + global.get $assembly/common/EPSILON + f64.const 1 + local.get $16 + local.set $34 + local.get $34 + f64.abs + local.get $32 + local.set $34 + local.get $34 + f64.abs + call $assembly/imports/MathUtil.max + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $17 + local.get $33 + f64.sub + local.set $34 + local.get $34 + f64.abs + global.get $assembly/common/EPSILON + f64.const 1 + local.get $17 + local.set $34 + local.get $34 + f64.abs + local.get $33 + local.set $34 + local.get $34 + f64.abs + call $assembly/imports/MathUtil.max + f64.mul + f64.le + else + i32.const 0 + end + ) + (func $assembly/quat/identity (param $0 i32) (result i32) + local.get $0 + i32.const 0 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/quat/getAxisAngle (param $0 i32) (param $1 i32) (result f64) + (local $2 f64) + (local $3 f64) + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/math/NativeMath.acos + f64.const 2 + f64.mul + local.set $2 + local.get $2 + f64.const 2 + f64.div + call $~lib/math/NativeMath.sin + local.set $3 + local.get $3 + global.get $assembly/common/EPSILON + f64.gt + if + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.div + call $~lib/typedarray/Float64Array#__set + else + local.get $0 + i32.const 0 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + end + local.get $2 + ) + (func $assembly/quat/getAngle (param $0 i32) (param $1 i32) (result f64) + (local $2 f64) + local.get $0 + local.get $1 + i32.const 2 + global.set $~argumentsLength + global.get $assembly/quat/dot + i32.load + call_indirect $0 (type $i32_i32_=>_f64) + local.set $2 + f64.const 2 + local.get $2 + f64.mul + local.get $2 + f64.mul + f64.const 1 + f64.sub + call $~lib/math/NativeMath.acos + ) + (func $assembly/quat/rotateX (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + local.get $2 + f64.const 0.5 + f64.mul + local.set $2 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $2 + call $~lib/math/NativeMath.sin + local.set $7 + local.get $2 + call $~lib/math/NativeMath.cos + local.set $8 + local.get $0 + i32.const 0 + local.get $3 + local.get $8 + f64.mul + local.get $6 + local.get $7 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $4 + local.get $8 + f64.mul + local.get $5 + local.get $7 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $5 + local.get $8 + f64.mul + local.get $4 + local.get $7 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $6 + local.get $8 + f64.mul + local.get $3 + local.get $7 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/quat/rotateY (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + local.get $2 + f64.const 0.5 + f64.mul + local.set $2 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $2 + call $~lib/math/NativeMath.sin + local.set $7 + local.get $2 + call $~lib/math/NativeMath.cos + local.set $8 + local.get $0 + i32.const 0 + local.get $3 + local.get $8 + f64.mul + local.get $5 + local.get $7 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $4 + local.get $8 + f64.mul + local.get $6 + local.get $7 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $5 + local.get $8 + f64.mul + local.get $3 + local.get $7 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $6 + local.get $8 + f64.mul + local.get $4 + local.get $7 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/quat/rotateZ (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + local.get $2 + f64.const 0.5 + f64.mul + local.set $2 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $2 + call $~lib/math/NativeMath.sin + local.set $7 + local.get $2 + call $~lib/math/NativeMath.cos + local.set $8 + local.get $0 + i32.const 0 + local.get $3 + local.get $8 + f64.mul + local.get $4 + local.get $7 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $4 + local.get $8 + f64.mul + local.get $3 + local.get $7 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $5 + local.get $8 + f64.mul + local.get $6 + local.get $7 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $6 + local.get $8 + f64.mul + local.get $5 + local.get $7 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/quat/calculateW (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $0 + i32.const 0 + local.get $2 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $3 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $4 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 1 + local.get $2 + local.get $2 + f64.mul + f64.sub + local.get $3 + local.get $3 + f64.mul + f64.sub + local.get $4 + local.get $4 + f64.mul + f64.sub + local.set $5 + local.get $5 + f64.abs + local.set $5 + local.get $5 + f64.sqrt + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $~lib/math/NativeMath.exp (param $0 f64) (result f64) + (local $1 f64) + (local $2 i64) + (local $3 i32) + (local $4 f64) + (local $5 f64) + (local $6 i64) + (local $7 f64) + (local $8 i32) + (local $9 i64) + (local $10 f64) + (local $11 i64) + (local $12 f64) + (local $13 f64) + (local $14 i64) + (local $15 i64) + (local $16 f64) + (local $17 f64) + (local $18 f64) + (local $19 f64) + (local $20 f64) + (local $21 f64) + i32.const 0 + i32.const 1 + i32.lt_s + drop + block $~lib/util/math/exp_lut|inlined.0 (result f64) + local.get $0 + local.set $1 + local.get $1 + i64.reinterpret_f64 + local.set $2 + local.get $2 + i64.const 52 + i64.shr_u + i64.const 2047 + i64.and + i32.wrap_i64 + local.set $3 + local.get $3 + i32.const 969 + i32.sub + i32.const 63 + i32.ge_u + if + local.get $3 + i32.const 969 + i32.sub + i32.const -2147483648 + i32.ge_u + if + f64.const 1 + br $~lib/util/math/exp_lut|inlined.0 + end + local.get $3 + i32.const 1033 + i32.ge_u + if + local.get $2 + i64.const -4503599627370496 + i64.eq + if + f64.const 0 + br $~lib/util/math/exp_lut|inlined.0 + end + local.get $3 + i32.const 2047 + i32.ge_u + if + f64.const 1 + local.get $1 + f64.add + br $~lib/util/math/exp_lut|inlined.0 + end + f64.const 0 + f64.const inf + local.get $2 + i64.const 63 + i64.shr_u + i64.const 0 + i64.ne + select + br $~lib/util/math/exp_lut|inlined.0 + end + i32.const 0 + local.set $3 + end + f64.const 184.6649652337873 + local.get $1 + f64.mul + local.set $4 + local.get $4 + f64.const 6755399441055744 + f64.add + local.set $5 + local.get $5 + i64.reinterpret_f64 + local.set $6 + local.get $5 + f64.const 6755399441055744 + f64.sub + local.set $5 + local.get $1 + local.get $5 + f64.const -0.005415212348111709 + f64.mul + f64.add + local.get $5 + f64.const -1.2864023111638346e-14 + f64.mul + f64.add + local.set $7 + local.get $6 + i64.const 127 + i64.and + i64.const 1 + i64.shl + i32.wrap_i64 + local.set $8 + local.get $6 + i64.const 52 + i64.const 7 + i64.sub + i64.shl + local.set $9 + i32.const 4240 + local.get $8 + i32.const 3 + i32.shl + i32.add + i64.load + f64.reinterpret_i64 + local.set $10 + i32.const 4240 + local.get $8 + i32.const 3 + i32.shl + i32.add + i64.load offset=8 + local.get $9 + i64.add + local.set $11 + local.get $7 + local.get $7 + f64.mul + local.set $12 + local.get $10 + local.get $7 + f64.add + local.get $12 + f64.const 0.49999999999996786 + local.get $7 + f64.const 0.16666666666665886 + f64.mul + f64.add + f64.mul + f64.add + local.get $12 + local.get $12 + f64.mul + f64.const 0.0416666808410674 + local.get $7 + f64.const 0.008333335853059549 + f64.mul + f64.add + f64.mul + f64.add + local.set $13 + local.get $3 + i32.const 0 + i32.eq + if + block $~lib/util/math/specialcase|inlined.0 (result f64) + local.get $13 + local.set $16 + local.get $11 + local.set $15 + local.get $6 + local.set $14 + local.get $14 + i64.const 2147483648 + i64.and + i64.const 0 + i64.ne + i32.eqz + if + local.get $15 + i64.const 1009 + i64.const 52 + i64.shl + i64.sub + local.set $15 + local.get $15 + f64.reinterpret_i64 + local.set $17 + f64.const 5486124068793688683255936e279 + local.get $17 + local.get $17 + local.get $16 + f64.mul + f64.add + f64.mul + br $~lib/util/math/specialcase|inlined.0 + end + local.get $15 + i64.const 1022 + i64.const 52 + i64.shl + i64.add + local.set $15 + local.get $15 + f64.reinterpret_i64 + local.set $17 + local.get $17 + local.get $17 + local.get $16 + f64.mul + f64.add + local.set $18 + local.get $18 + f64.abs + f64.const 1 + f64.lt + if + f64.const 1 + local.get $18 + f64.copysign + local.set $19 + local.get $17 + local.get $18 + f64.sub + local.get $17 + local.get $16 + f64.mul + f64.add + local.set $20 + local.get $19 + local.get $18 + f64.add + local.set $21 + local.get $19 + local.get $21 + f64.sub + local.get $18 + f64.add + local.get $20 + f64.add + local.set $20 + local.get $21 + local.get $20 + f64.add + local.get $19 + f64.sub + local.set $18 + local.get $18 + f64.const 0 + f64.eq + if + local.get $15 + i64.const -9223372036854775808 + i64.and + f64.reinterpret_i64 + local.set $18 + end + end + local.get $18 + f64.const 2.2250738585072014e-308 + f64.mul + end + br $~lib/util/math/exp_lut|inlined.0 + end + local.get $11 + f64.reinterpret_i64 + local.set $18 + local.get $18 + local.get $18 + local.get $13 + f64.mul + f64.add + end + return + ) + (func $assembly/quat/exp (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $2 + local.get $2 + f64.mul + local.get $3 + local.get $3 + f64.mul + f64.add + local.get $4 + local.get $4 + f64.mul + f64.add + local.set $6 + local.get $6 + f64.sqrt + local.set $6 + local.get $5 + call $~lib/math/NativeMath.exp + local.set $7 + local.get $6 + f64.const 0 + f64.gt + if (result f64) + local.get $7 + local.get $6 + call $~lib/math/NativeMath.sin + f64.mul + local.get $6 + f64.div + else + f64.const 0 + end + local.set $8 + local.get $0 + i32.const 0 + local.get $2 + local.get $8 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $3 + local.get $8 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $4 + local.get $8 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $7 + local.get $6 + call $~lib/math/NativeMath.cos + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $~lib/math/NativeMath.atan (param $0 f64) (result f64) + (local $1 i32) + (local $2 f64) + (local $3 f64) + (local $4 i32) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 i32) + local.get $0 + i64.reinterpret_f64 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.set $1 + local.get $0 + local.set $2 + local.get $1 + i32.const 2147483647 + i32.and + local.set $1 + local.get $1 + i32.const 1141899264 + i32.ge_u + if + local.get $0 + local.get $0 + f64.ne + if + local.get $0 + return + end + f64.const 1.5707963267948966 + f32.const 7.52316384526264e-37 + f64.promote_f32 + f64.add + local.set $3 + local.get $3 + local.get $2 + f64.copysign + return + end + local.get $1 + i32.const 1071382528 + i32.lt_u + if + local.get $1 + i32.const 1044381696 + i32.lt_u + if + local.get $0 + return + end + i32.const -1 + local.set $4 + else + local.get $0 + f64.abs + local.set $0 + local.get $1 + i32.const 1072889856 + i32.lt_u + if + local.get $1 + i32.const 1072037888 + i32.lt_u + if + i32.const 0 + local.set $4 + f64.const 2 + local.get $0 + f64.mul + f64.const 1 + f64.sub + f64.const 2 + local.get $0 + f64.add + f64.div + local.set $0 + else + i32.const 1 + local.set $4 + local.get $0 + f64.const 1 + f64.sub + local.get $0 + f64.const 1 + f64.add + f64.div + local.set $0 + end + else + local.get $1 + i32.const 1073971200 + i32.lt_u + if + i32.const 2 + local.set $4 + local.get $0 + f64.const 1.5 + f64.sub + f64.const 1 + f64.const 1.5 + local.get $0 + f64.mul + f64.add + f64.div + local.set $0 + else + i32.const 3 + local.set $4 + f64.const -1 + local.get $0 + f64.div + local.set $0 + end + end + end + local.get $0 + local.get $0 + f64.mul + local.set $3 + local.get $3 + local.get $3 + f64.mul + local.set $5 + local.get $3 + f64.const 0.3333333333333293 + local.get $5 + f64.const 0.14285714272503466 + local.get $5 + f64.const 0.09090887133436507 + local.get $5 + f64.const 0.06661073137387531 + local.get $5 + f64.const 0.049768779946159324 + local.get $5 + f64.const 0.016285820115365782 + f64.mul + f64.add + f64.mul + f64.add + f64.mul + f64.add + f64.mul + f64.add + f64.mul + f64.add + f64.mul + local.set $6 + local.get $5 + f64.const -0.19999999999876483 + local.get $5 + f64.const -0.11111110405462356 + local.get $5 + f64.const -0.0769187620504483 + local.get $5 + f64.const -0.058335701337905735 + local.get $5 + f64.const -0.036531572744216916 + f64.mul + f64.add + f64.mul + f64.add + f64.mul + f64.add + f64.mul + f64.add + f64.mul + local.set $7 + local.get $0 + local.get $6 + local.get $7 + f64.add + f64.mul + local.set $8 + local.get $4 + i32.const 0 + i32.lt_s + if + local.get $0 + local.get $8 + f64.sub + return + end + block $break|0 + block $case4|0 + block $case3|0 + block $case2|0 + block $case1|0 + block $case0|0 + local.get $4 + local.set $9 + local.get $9 + i32.const 0 + i32.eq + br_if $case0|0 + local.get $9 + i32.const 1 + i32.eq + br_if $case1|0 + local.get $9 + i32.const 2 + i32.eq + br_if $case2|0 + local.get $9 + i32.const 3 + i32.eq + br_if $case3|0 + br $case4|0 + end + f64.const 0.4636476090008061 + local.get $8 + f64.const 2.2698777452961687e-17 + f64.sub + local.get $0 + f64.sub + f64.sub + local.set $3 + br $break|0 + end + f64.const 0.7853981633974483 + local.get $8 + f64.const 3.061616997868383e-17 + f64.sub + local.get $0 + f64.sub + f64.sub + local.set $3 + br $break|0 + end + f64.const 0.982793723247329 + local.get $8 + f64.const 1.3903311031230998e-17 + f64.sub + local.get $0 + f64.sub + f64.sub + local.set $3 + br $break|0 + end + f64.const 1.5707963267948966 + local.get $8 + f64.const 6.123233995736766e-17 + f64.sub + local.get $0 + f64.sub + f64.sub + local.set $3 + br $break|0 + end + unreachable + end + local.get $3 + local.get $2 + f64.copysign + ) + (func $~lib/math/NativeMath.atan2 (param $0 f64) (param $1 f64) (result f64) + (local $2 i64) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 f64) + (local $10 f64) + local.get $1 + local.get $1 + f64.ne + if (result i32) + i32.const 1 + else + local.get $0 + local.get $0 + f64.ne + end + if + local.get $1 + local.get $0 + f64.add + return + end + local.get $1 + i64.reinterpret_f64 + local.set $2 + local.get $2 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.set $3 + local.get $2 + i32.wrap_i64 + local.set $4 + local.get $0 + i64.reinterpret_f64 + local.set $2 + local.get $2 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.set $5 + local.get $2 + i32.wrap_i64 + local.set $6 + local.get $3 + i32.const 1072693248 + i32.sub + local.get $4 + i32.or + i32.const 0 + i32.eq + if + local.get $0 + call $~lib/math/NativeMath.atan + return + end + local.get $5 + i32.const 31 + i32.shr_u + i32.const 1 + i32.and + local.get $3 + i32.const 30 + i32.shr_u + i32.const 2 + i32.and + i32.or + local.set $7 + local.get $3 + i32.const 2147483647 + i32.and + local.set $3 + local.get $5 + i32.const 2147483647 + i32.and + local.set $5 + local.get $5 + local.get $6 + i32.or + i32.const 0 + i32.eq + if + block $break|0 + block $case3|0 + block $case2|0 + block $case1|0 + block $case0|0 + local.get $7 + local.set $8 + local.get $8 + i32.const 0 + i32.eq + br_if $case0|0 + local.get $8 + i32.const 1 + i32.eq + br_if $case1|0 + local.get $8 + i32.const 2 + i32.eq + br_if $case2|0 + local.get $8 + i32.const 3 + i32.eq + br_if $case3|0 + br $break|0 + end + end + local.get $0 + return + end + global.get $~lib/math/NativeMath.PI + return + end + global.get $~lib/math/NativeMath.PI + f64.neg + return + end + end + local.get $3 + local.get $4 + i32.or + i32.const 0 + i32.eq + if + local.get $7 + i32.const 1 + i32.and + if (result f64) + global.get $~lib/math/NativeMath.PI + f64.neg + f64.const 2 + f64.div + else + global.get $~lib/math/NativeMath.PI + f64.const 2 + f64.div + end + return + end + local.get $3 + i32.const 2146435072 + i32.eq + if + local.get $5 + i32.const 2146435072 + i32.eq + if + local.get $7 + i32.const 2 + i32.and + if (result f64) + i32.const 3 + f64.convert_i32_s + global.get $~lib/math/NativeMath.PI + f64.mul + f64.const 4 + f64.div + else + global.get $~lib/math/NativeMath.PI + f64.const 4 + f64.div + end + local.set $9 + local.get $7 + i32.const 1 + i32.and + if (result f64) + local.get $9 + f64.neg + else + local.get $9 + end + return + else + local.get $7 + i32.const 2 + i32.and + if (result f64) + global.get $~lib/math/NativeMath.PI + else + f64.const 0 + end + local.set $9 + local.get $7 + i32.const 1 + i32.and + if (result f64) + local.get $9 + f64.neg + else + local.get $9 + end + return + end + unreachable + end + local.get $3 + i32.const 64 + i32.const 20 + i32.shl + i32.add + local.get $5 + i32.lt_u + if (result i32) + i32.const 1 + else + local.get $5 + i32.const 2146435072 + i32.eq + end + if + local.get $7 + i32.const 1 + i32.and + if (result f64) + global.get $~lib/math/NativeMath.PI + f64.neg + f64.const 2 + f64.div + else + global.get $~lib/math/NativeMath.PI + f64.const 2 + f64.div + end + return + end + local.get $7 + i32.const 2 + i32.and + if (result i32) + local.get $5 + i32.const 64 + i32.const 20 + i32.shl + i32.add + local.get $3 + i32.lt_u + else + i32.const 0 + end + if + f64.const 0 + local.set $10 + else + local.get $0 + local.get $1 + f64.div + f64.abs + call $~lib/math/NativeMath.atan + local.set $10 + end + block $break|1 + block $case3|1 + block $case2|1 + block $case1|1 + block $case0|1 + local.get $7 + local.set $8 + local.get $8 + i32.const 0 + i32.eq + br_if $case0|1 + local.get $8 + i32.const 1 + i32.eq + br_if $case1|1 + local.get $8 + i32.const 2 + i32.eq + br_if $case2|1 + local.get $8 + i32.const 3 + i32.eq + br_if $case3|1 + br $break|1 + end + local.get $10 + return + end + local.get $10 + f64.neg + return + end + global.get $~lib/math/NativeMath.PI + local.get $10 + f64.const 1.2246467991473532e-16 + f64.sub + f64.sub + return + end + local.get $10 + f64.const 1.2246467991473532e-16 + f64.sub + global.get $~lib/math/NativeMath.PI + f64.sub + return + end + unreachable + ) + (func $~lib/math/NativeMath.log (param $0 f64) (result f64) + (local $1 f64) + (local $2 i64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 i32) + (local $13 i64) + (local $14 i32) + (local $15 i64) + (local $16 i64) + (local $17 f64) + (local $18 f64) + i32.const 0 + i32.const 1 + i32.lt_s + drop + block $~lib/util/math/log_lut|inlined.0 (result f64) + local.get $0 + local.set $1 + local.get $1 + i64.reinterpret_f64 + local.set $2 + local.get $2 + i64.const 4606619468846596096 + i64.sub + i64.const 4607473789381378048 + i64.const 4606619468846596096 + i64.sub + i64.lt_u + if + local.get $1 + f64.const 1 + f64.sub + local.set $3 + local.get $3 + local.get $3 + f64.mul + local.set $4 + local.get $4 + local.get $3 + f64.mul + local.set $5 + local.get $5 + f64.const 0.3333333333333352 + local.get $3 + f64.const -0.24999999999998432 + f64.mul + f64.add + local.get $4 + f64.const 0.19999999999320328 + f64.mul + f64.add + local.get $5 + f64.const -0.16666666669929706 + local.get $3 + f64.const 0.14285715076560868 + f64.mul + f64.add + local.get $4 + f64.const -0.12499997863982555 + f64.mul + f64.add + local.get $5 + f64.const 0.11110712032936046 + local.get $3 + f64.const -0.10000486757818193 + f64.mul + f64.add + local.get $4 + f64.const 0.09181994006195467 + f64.mul + f64.add + local.get $5 + f64.const -0.08328363062289341 + f64.mul + f64.add + f64.mul + f64.add + f64.mul + f64.add + f64.mul + local.set $6 + local.get $3 + f64.const 134217728 + f64.mul + local.set $7 + local.get $3 + local.get $7 + f64.add + local.get $7 + f64.sub + local.set $8 + local.get $3 + local.get $8 + f64.sub + local.set $9 + local.get $8 + local.get $8 + f64.mul + f64.const -0.5 + f64.mul + local.set $7 + local.get $3 + local.get $7 + f64.add + local.set $10 + local.get $3 + local.get $10 + f64.sub + local.get $7 + f64.add + local.set $11 + local.get $11 + f64.const -0.5 + local.get $9 + f64.mul + local.get $8 + local.get $3 + f64.add + f64.mul + f64.add + local.set $11 + local.get $6 + local.get $11 + f64.add + local.get $10 + f64.add + br $~lib/util/math/log_lut|inlined.0 + end + local.get $2 + i64.const 48 + i64.shr_u + i32.wrap_i64 + local.set $12 + local.get $12 + i32.const 16 + i32.sub + i32.const 32752 + i32.const 16 + i32.sub + i32.ge_u + if + local.get $2 + i64.const 1 + i64.shl + i64.const 0 + i64.eq + if + f64.const -1 + local.get $1 + local.get $1 + f64.mul + f64.div + br $~lib/util/math/log_lut|inlined.0 + end + local.get $2 + f64.const inf + i64.reinterpret_f64 + i64.eq + if + local.get $1 + br $~lib/util/math/log_lut|inlined.0 + end + local.get $12 + i32.const 32768 + i32.and + if (result i32) + i32.const 1 + else + local.get $12 + i32.const 32752 + i32.and + i32.const 32752 + i32.eq + end + if + local.get $1 + local.get $1 + f64.sub + local.get $1 + local.get $1 + f64.sub + f64.div + br $~lib/util/math/log_lut|inlined.0 + end + local.get $1 + f64.const 4503599627370496 + f64.mul + i64.reinterpret_f64 + local.set $2 + local.get $2 + i64.const 52 + i64.const 52 + i64.shl + i64.sub + local.set $2 + end + local.get $2 + i64.const 4604367669032910848 + i64.sub + local.set $13 + local.get $13 + i64.const 52 + i64.const 7 + i64.sub + i64.shr_u + i64.const 127 + i64.and + i32.wrap_i64 + local.set $14 + local.get $13 + i64.const 52 + i64.shr_s + local.set $15 + local.get $2 + local.get $13 + i64.const 4095 + i64.const 52 + i64.shl + i64.and + i64.sub + local.set $16 + i32.const 6288 + local.get $14 + i32.const 1 + i32.const 3 + i32.add + i32.shl + i32.add + f64.load + local.set $11 + i32.const 6288 + local.get $14 + i32.const 1 + i32.const 3 + i32.add + i32.shl + i32.add + f64.load offset=8 + local.set $10 + local.get $16 + f64.reinterpret_i64 + local.set $9 + i32.const 8336 + local.get $14 + i32.const 1 + i32.const 3 + i32.add + i32.shl + i32.add + f64.load + local.set $8 + i32.const 8336 + local.get $14 + i32.const 1 + i32.const 3 + i32.add + i32.shl + i32.add + f64.load offset=8 + local.set $7 + local.get $9 + local.get $8 + f64.sub + local.get $7 + f64.sub + local.get $11 + f64.mul + local.set $6 + local.get $15 + f64.convert_i64_s + local.set $5 + local.get $5 + f64.const 0.6931471805598903 + f64.mul + local.get $10 + f64.add + local.set $4 + local.get $4 + local.get $6 + f64.add + local.set $3 + local.get $4 + local.get $3 + f64.sub + local.get $6 + f64.add + local.get $5 + f64.const 5.497923018708371e-14 + f64.mul + f64.add + local.set $17 + local.get $6 + local.get $6 + f64.mul + local.set $18 + local.get $17 + local.get $18 + f64.const -0.5000000000000001 + f64.mul + f64.add + local.get $6 + local.get $18 + f64.mul + f64.const 0.33333333331825593 + local.get $6 + f64.const -0.2499999999622955 + f64.mul + f64.add + local.get $18 + f64.const 0.20000304511814496 + local.get $6 + f64.const -0.16667054827627667 + f64.mul + f64.add + f64.mul + f64.add + f64.mul + f64.add + local.get $3 + f64.add + end + return + ) + (func $assembly/quat/ln (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $2 + local.get $2 + f64.mul + local.get $3 + local.get $3 + f64.mul + f64.add + local.get $4 + local.get $4 + f64.mul + f64.add + local.set $6 + local.get $6 + f64.sqrt + local.set $6 + local.get $6 + f64.const 0 + f64.gt + if (result f64) + local.get $6 + local.get $5 + call $~lib/math/NativeMath.atan2 + local.get $6 + f64.div + else + f64.const 0 + end + local.set $7 + local.get $0 + i32.const 0 + local.get $2 + local.get $7 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $3 + local.get $7 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $4 + local.get $7 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0.5 + local.get $2 + local.get $2 + f64.mul + local.get $3 + local.get $3 + f64.mul + f64.add + local.get $4 + local.get $4 + f64.mul + f64.add + local.get $5 + local.get $5 + f64.mul + f64.add + call $~lib/math/NativeMath.log + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/quat/pow (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + local.get $0 + local.get $1 + call $assembly/quat/ln + drop + local.get $0 + local.get $0 + local.get $2 + i32.const 3 + global.set $~argumentsLength + global.get $assembly/quat/scale + i32.load + call_indirect $0 (type $i32_i32_f64_=>_i32) + drop + local.get $0 + local.get $0 + call $assembly/quat/exp + drop + local.get $0 + ) + (func $assembly/quat/random (param $0 i32) (result i32) + (local $1 f64) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + i32.const 0 + global.set $~argumentsLength + global.get $assembly/common/RANDOM + i32.load + call_indirect $0 (type $none_=>_f64) + local.set $1 + i32.const 0 + global.set $~argumentsLength + global.get $assembly/common/RANDOM + i32.load + call_indirect $0 (type $none_=>_f64) + local.set $2 + i32.const 0 + global.set $~argumentsLength + global.get $assembly/common/RANDOM + i32.load + call_indirect $0 (type $none_=>_f64) + local.set $3 + f64.const 1 + local.get $1 + f64.sub + local.set $4 + local.get $4 + f64.sqrt + local.set $4 + local.get $1 + local.set $5 + local.get $5 + f64.sqrt + local.set $5 + local.get $0 + i32.const 0 + local.get $4 + f64.const 2 + global.get $~lib/math/NativeMath.PI + f64.mul + local.get $2 + f64.mul + call $~lib/math/NativeMath.sin + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $4 + f64.const 2 + global.get $~lib/math/NativeMath.PI + f64.mul + local.get $2 + f64.mul + call $~lib/math/NativeMath.cos + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $5 + f64.const 2 + global.get $~lib/math/NativeMath.PI + f64.mul + local.get $3 + f64.mul + call $~lib/math/NativeMath.sin + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $5 + f64.const 2 + global.get $~lib/math/NativeMath.PI + f64.mul + local.get $3 + f64.mul + call $~lib/math/NativeMath.cos + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/quat/invert (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $2 + local.get $2 + f64.mul + local.get $3 + local.get $3 + f64.mul + f64.add + local.get $4 + local.get $4 + f64.mul + f64.add + local.get $5 + local.get $5 + f64.mul + f64.add + local.set $6 + local.get $6 + i64.reinterpret_f64 + i64.const 1 + i64.shl + i64.const 2 + i64.sub + i64.const -9007199254740994 + i64.le_u + if (result f64) + f64.const 1 + local.get $6 + f64.div + else + f64.const 0 + end + local.set $7 + local.get $0 + i32.const 0 + local.get $2 + f64.neg + local.get $7 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $3 + f64.neg + local.get $7 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $4 + f64.neg + local.get $7 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $5 + local.get $7 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/quat/conjugate (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/quat/equals (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + local.get $0 + local.get $1 + call $assembly/vec4/dot + local.set $2 + local.get $2 + f64.abs + f64.const 1 + global.get $assembly/common/EPSILON + f64.sub + f64.ge + ) + (func $assembly/quat2/fromRotationTranslation (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.const 0.5 + f64.mul + local.set $3 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.const 0.5 + f64.mul + local.set $4 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.const 0.5 + f64.mul + local.set $5 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $0 + i32.const 0 + local.get $6 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $7 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $8 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $9 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $3 + local.get $9 + f64.mul + local.get $4 + local.get $8 + f64.mul + f64.add + local.get $5 + local.get $7 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $4 + local.get $9 + f64.mul + local.get $5 + local.get $6 + f64.mul + f64.add + local.get $3 + local.get $8 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $5 + local.get $9 + f64.mul + local.get $3 + local.get $7 + f64.mul + f64.add + local.get $4 + local.get $6 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $3 + f64.neg + local.get $6 + f64.mul + local.get $4 + local.get $7 + f64.mul + f64.sub + local.get $5 + local.get $8 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/quat2/fromTranslation (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 0 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.const 0.5 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.const 0.5 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.const 0.5 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/quat2/fromRotation (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/quat2/copy (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/quat2/identity (param $0 i32) (result i32) + local.get $0 + i32.const 0 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/quat2/set (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (param $7 f64) (param $8 f64) (result i32) + local.get $0 + i32.const 0 + local.get $1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $2 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $3 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $4 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $5 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $6 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $7 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $8 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/quat2/getDual (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/quat2/setDual (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 4 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/quat2/getTranslation (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.neg + local.set $6 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.neg + local.set $7 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.neg + local.set $8 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $0 + i32.const 0 + local.get $2 + local.get $9 + f64.mul + local.get $5 + local.get $6 + f64.mul + f64.add + local.get $3 + local.get $8 + f64.mul + f64.add + local.get $4 + local.get $7 + f64.mul + f64.sub + f64.const 2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $3 + local.get $9 + f64.mul + local.get $5 + local.get $7 + f64.mul + f64.add + local.get $4 + local.get $6 + f64.mul + f64.add + local.get $2 + local.get $8 + f64.mul + f64.sub + f64.const 2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $4 + local.get $9 + f64.mul + local.get $5 + local.get $8 + f64.mul + f64.add + local.get $2 + local.get $7 + f64.mul + f64.add + local.get $3 + local.get $6 + f64.mul + f64.sub + f64.const 2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/quat2/translate (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.const 0.5 + f64.mul + local.set $7 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.const 0.5 + f64.mul + local.set $8 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.const 0.5 + f64.mul + local.set $9 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $12 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $13 + local.get $0 + i32.const 0 + local.get $3 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $4 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $5 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $6 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $6 + local.get $7 + f64.mul + local.get $4 + local.get $9 + f64.mul + f64.add + local.get $5 + local.get $8 + f64.mul + f64.sub + local.get $10 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $6 + local.get $8 + f64.mul + local.get $5 + local.get $7 + f64.mul + f64.add + local.get $3 + local.get $9 + f64.mul + f64.sub + local.get $11 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $6 + local.get $9 + f64.mul + local.get $3 + local.get $8 + f64.mul + f64.add + local.get $4 + local.get $7 + f64.mul + f64.sub + local.get $12 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $3 + f64.neg + local.get $7 + f64.mul + local.get $4 + local.get $8 + f64.mul + f64.sub + local.get $5 + local.get $9 + f64.mul + f64.sub + local.get $13 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/quat2/rotateX (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.neg + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.neg + local.set $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.neg + local.set $5 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $7 + local.get $6 + f64.mul + local.get $10 + local.get $3 + f64.mul + f64.add + local.get $8 + local.get $5 + f64.mul + f64.add + local.get $9 + local.get $4 + f64.mul + f64.sub + local.set $11 + local.get $8 + local.get $6 + f64.mul + local.get $10 + local.get $4 + f64.mul + f64.add + local.get $9 + local.get $3 + f64.mul + f64.add + local.get $7 + local.get $5 + f64.mul + f64.sub + local.set $12 + local.get $9 + local.get $6 + f64.mul + local.get $10 + local.get $5 + f64.mul + f64.add + local.get $7 + local.get $4 + f64.mul + f64.add + local.get $8 + local.get $3 + f64.mul + f64.sub + local.set $13 + local.get $10 + local.get $6 + f64.mul + local.get $7 + local.get $3 + f64.mul + f64.sub + local.get $8 + local.get $4 + f64.mul + f64.sub + local.get $9 + local.get $5 + f64.mul + f64.sub + local.set $14 + local.get $0 + local.get $1 + local.get $2 + call $assembly/quat/rotateX + drop + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $0 + i32.const 4 + local.get $11 + local.get $6 + f64.mul + local.get $14 + local.get $3 + f64.mul + f64.add + local.get $12 + local.get $5 + f64.mul + f64.add + local.get $13 + local.get $4 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $12 + local.get $6 + f64.mul + local.get $14 + local.get $4 + f64.mul + f64.add + local.get $13 + local.get $3 + f64.mul + f64.add + local.get $11 + local.get $5 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $13 + local.get $6 + f64.mul + local.get $14 + local.get $5 + f64.mul + f64.add + local.get $11 + local.get $4 + f64.mul + f64.add + local.get $12 + local.get $3 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $14 + local.get $6 + f64.mul + local.get $11 + local.get $3 + f64.mul + f64.sub + local.get $12 + local.get $4 + f64.mul + f64.sub + local.get $13 + local.get $5 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/quat2/rotateY (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.neg + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.neg + local.set $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.neg + local.set $5 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $7 + local.get $6 + f64.mul + local.get $10 + local.get $3 + f64.mul + f64.add + local.get $8 + local.get $5 + f64.mul + f64.add + local.get $9 + local.get $4 + f64.mul + f64.sub + local.set $11 + local.get $8 + local.get $6 + f64.mul + local.get $10 + local.get $4 + f64.mul + f64.add + local.get $9 + local.get $3 + f64.mul + f64.add + local.get $7 + local.get $5 + f64.mul + f64.sub + local.set $12 + local.get $9 + local.get $6 + f64.mul + local.get $10 + local.get $5 + f64.mul + f64.add + local.get $7 + local.get $4 + f64.mul + f64.add + local.get $8 + local.get $3 + f64.mul + f64.sub + local.set $13 + local.get $10 + local.get $6 + f64.mul + local.get $7 + local.get $3 + f64.mul + f64.sub + local.get $8 + local.get $4 + f64.mul + f64.sub + local.get $9 + local.get $5 + f64.mul + f64.sub + local.set $14 + local.get $0 + local.get $1 + local.get $2 + call $assembly/quat/rotateY + drop + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $0 + i32.const 4 + local.get $11 + local.get $6 + f64.mul + local.get $14 + local.get $3 + f64.mul + f64.add + local.get $12 + local.get $5 + f64.mul + f64.add + local.get $13 + local.get $4 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $12 + local.get $6 + f64.mul + local.get $14 + local.get $4 + f64.mul + f64.add + local.get $13 + local.get $3 + f64.mul + f64.add + local.get $11 + local.get $5 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $13 + local.get $6 + f64.mul + local.get $14 + local.get $5 + f64.mul + f64.add + local.get $11 + local.get $4 + f64.mul + f64.add + local.get $12 + local.get $3 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $14 + local.get $6 + f64.mul + local.get $11 + local.get $3 + f64.mul + f64.sub + local.get $12 + local.get $4 + f64.mul + f64.sub + local.get $13 + local.get $5 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/quat2/rotateZ (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.neg + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.neg + local.set $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.neg + local.set $5 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $7 + local.get $6 + f64.mul + local.get $10 + local.get $3 + f64.mul + f64.add + local.get $8 + local.get $5 + f64.mul + f64.add + local.get $9 + local.get $4 + f64.mul + f64.sub + local.set $11 + local.get $8 + local.get $6 + f64.mul + local.get $10 + local.get $4 + f64.mul + f64.add + local.get $9 + local.get $3 + f64.mul + f64.add + local.get $7 + local.get $5 + f64.mul + f64.sub + local.set $12 + local.get $9 + local.get $6 + f64.mul + local.get $10 + local.get $5 + f64.mul + f64.add + local.get $7 + local.get $4 + f64.mul + f64.add + local.get $8 + local.get $3 + f64.mul + f64.sub + local.set $13 + local.get $10 + local.get $6 + f64.mul + local.get $7 + local.get $3 + f64.mul + f64.sub + local.get $8 + local.get $4 + f64.mul + f64.sub + local.get $9 + local.get $5 + f64.mul + f64.sub + local.set $14 + local.get $0 + local.get $1 + local.get $2 + call $assembly/quat/rotateZ + drop + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $0 + i32.const 4 + local.get $11 + local.get $6 + f64.mul + local.get $14 + local.get $3 + f64.mul + f64.add + local.get $12 + local.get $5 + f64.mul + f64.add + local.get $13 + local.get $4 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $12 + local.get $6 + f64.mul + local.get $14 + local.get $4 + f64.mul + f64.add + local.get $13 + local.get $3 + f64.mul + f64.add + local.get $11 + local.get $5 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $13 + local.get $6 + f64.mul + local.get $14 + local.get $5 + f64.mul + f64.add + local.get $11 + local.get $4 + f64.mul + f64.add + local.get $12 + local.get $3 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $14 + local.get $6 + f64.mul + local.get $11 + local.get $3 + f64.mul + f64.sub + local.get $12 + local.get $4 + f64.mul + f64.sub + local.get $13 + local.get $5 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/quat2/rotateByQuatAppend (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $0 + i32.const 0 + local.get $7 + local.get $6 + f64.mul + local.get $10 + local.get $3 + f64.mul + f64.add + local.get $8 + local.get $5 + f64.mul + f64.add + local.get $9 + local.get $4 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $8 + local.get $6 + f64.mul + local.get $10 + local.get $4 + f64.mul + f64.add + local.get $9 + local.get $3 + f64.mul + f64.add + local.get $7 + local.get $5 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $9 + local.get $6 + f64.mul + local.get $10 + local.get $5 + f64.mul + f64.add + local.get $7 + local.get $4 + f64.mul + f64.add + local.get $8 + local.get $3 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $10 + local.get $6 + f64.mul + local.get $7 + local.get $3 + f64.mul + f64.sub + local.get $8 + local.get $4 + f64.mul + f64.sub + local.get $9 + local.get $5 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $0 + i32.const 4 + local.get $7 + local.get $6 + f64.mul + local.get $10 + local.get $3 + f64.mul + f64.add + local.get $8 + local.get $5 + f64.mul + f64.add + local.get $9 + local.get $4 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $8 + local.get $6 + f64.mul + local.get $10 + local.get $4 + f64.mul + f64.add + local.get $9 + local.get $3 + f64.mul + f64.add + local.get $7 + local.get $5 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $9 + local.get $6 + f64.mul + local.get $10 + local.get $5 + f64.mul + f64.add + local.get $7 + local.get $4 + f64.mul + f64.add + local.get $8 + local.get $3 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $10 + local.get $6 + f64.mul + local.get $7 + local.get $3 + f64.mul + f64.sub + local.get $8 + local.get $4 + f64.mul + f64.sub + local.get $9 + local.get $5 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/quat2/rotateByQuatPrepend (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $0 + i32.const 0 + local.get $3 + local.get $10 + f64.mul + local.get $6 + local.get $7 + f64.mul + f64.add + local.get $4 + local.get $9 + f64.mul + f64.add + local.get $5 + local.get $8 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $4 + local.get $10 + f64.mul + local.get $6 + local.get $8 + f64.mul + f64.add + local.get $5 + local.get $7 + f64.mul + f64.add + local.get $3 + local.get $9 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $5 + local.get $10 + f64.mul + local.get $6 + local.get $9 + f64.mul + f64.add + local.get $3 + local.get $8 + f64.mul + f64.add + local.get $4 + local.get $7 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $6 + local.get $10 + f64.mul + local.get $3 + local.get $7 + f64.mul + f64.sub + local.get $4 + local.get $8 + f64.mul + f64.sub + local.get $5 + local.get $9 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $2 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $2 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $2 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $2 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $0 + i32.const 4 + local.get $3 + local.get $10 + f64.mul + local.get $6 + local.get $7 + f64.mul + f64.add + local.get $4 + local.get $9 + f64.mul + f64.add + local.get $5 + local.get $8 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $4 + local.get $10 + f64.mul + local.get $6 + local.get $8 + f64.mul + f64.add + local.get $5 + local.get $7 + f64.mul + f64.add + local.get $3 + local.get $9 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $5 + local.get $10 + f64.mul + local.get $6 + local.get $9 + f64.mul + f64.add + local.get $3 + local.get $8 + f64.mul + f64.add + local.get $4 + local.get $7 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $6 + local.get $10 + f64.mul + local.get $3 + local.get $7 + f64.mul + f64.sub + local.get $4 + local.get $8 + f64.mul + f64.sub + local.get $5 + local.get $9 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/quat2/rotateAroundAxis (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 f64) + (local $16 f64) + (local $17 f64) + local.get $3 + local.set $4 + local.get $4 + f64.abs + global.get $assembly/common/EPSILON + f64.lt + if + local.get $0 + local.get $1 + call $assembly/quat2/copy + return + end + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $assembly/imports/MathUtil.hypot + local.set $4 + local.get $3 + f64.const 0.5 + f64.mul + local.set $3 + local.get $3 + call $~lib/math/NativeMath.sin + local.set $5 + local.get $5 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.mul + local.get $4 + f64.div + local.set $6 + local.get $5 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.mul + local.get $4 + f64.div + local.set $7 + local.get $5 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.mul + local.get $4 + f64.div + local.set $8 + local.get $3 + call $~lib/math/NativeMath.cos + local.set $9 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $12 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $13 + local.get $0 + i32.const 0 + local.get $10 + local.get $9 + f64.mul + local.get $13 + local.get $6 + f64.mul + f64.add + local.get $11 + local.get $8 + f64.mul + f64.add + local.get $12 + local.get $7 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $11 + local.get $9 + f64.mul + local.get $13 + local.get $7 + f64.mul + f64.add + local.get $12 + local.get $6 + f64.mul + f64.add + local.get $10 + local.get $8 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $12 + local.get $9 + f64.mul + local.get $13 + local.get $8 + f64.mul + f64.add + local.get $10 + local.get $7 + f64.mul + f64.add + local.get $11 + local.get $6 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $13 + local.get $9 + f64.mul + local.get $10 + local.get $6 + f64.mul + f64.sub + local.get $11 + local.get $7 + f64.mul + f64.sub + local.get $12 + local.get $8 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $14 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $15 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $16 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $17 + local.get $0 + i32.const 4 + local.get $14 + local.get $9 + f64.mul + local.get $17 + local.get $6 + f64.mul + f64.add + local.get $15 + local.get $8 + f64.mul + f64.add + local.get $16 + local.get $7 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $15 + local.get $9 + f64.mul + local.get $17 + local.get $7 + f64.mul + f64.add + local.get $16 + local.get $6 + f64.mul + f64.add + local.get $14 + local.get $8 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $16 + local.get $9 + f64.mul + local.get $17 + local.get $8 + f64.mul + f64.add + local.get $14 + local.get $7 + f64.mul + f64.add + local.get $15 + local.get $6 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $17 + local.get $9 + f64.mul + local.get $14 + local.get $6 + f64.mul + f64.sub + local.get $15 + local.get $7 + f64.mul + f64.sub + local.get $16 + local.get $8 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/quat2/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/quat2/scale (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/quat2/lerp (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + (local $4 f64) + i32.const 1 + f64.convert_i32_s + local.get $3 + f64.sub + local.set $4 + local.get $1 + local.get $2 + i32.const 2 + global.set $~argumentsLength + global.get $assembly/quat2/dot + i32.load + call_indirect $0 (type $i32_i32_=>_f64) + f64.const 0 + f64.lt + if + local.get $3 + f64.neg + local.set $3 + end + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + local.get $2 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + local.get $2 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + local.get $2 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + local.get $2 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/quat2/invert (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + local.get $1 + i32.const 1 + global.set $~argumentsLength + global.get $assembly/quat2/squaredLength + i32.load + call_indirect $0 (type $i32_=>_f64) + local.set $2 + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.neg + local.get $2 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.neg + local.get $2 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.neg + local.get $2 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + f64.neg + local.get $2 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + f64.neg + local.get $2 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + f64.neg + local.get $2 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/quat2/conjugate (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/quat2/normalize (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + local.get $1 + i32.const 1 + global.set $~argumentsLength + global.get $assembly/quat2/squaredLength + i32.load + call_indirect $0 (type $i32_=>_f64) + local.set $2 + local.get $2 + f64.const 0 + f64.gt + if + local.get $2 + local.set $3 + local.get $3 + f64.sqrt + local.set $2 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.div + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.div + local.set $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.div + local.set $5 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.div + local.set $6 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $3 + local.get $7 + f64.mul + local.get $4 + local.get $8 + f64.mul + f64.add + local.get $5 + local.get $9 + f64.mul + f64.add + local.get $6 + local.get $10 + f64.mul + f64.add + local.set $11 + local.get $0 + i32.const 0 + local.get $3 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $4 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $5 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $6 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $7 + local.get $3 + local.get $11 + f64.mul + f64.sub + local.get $2 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $8 + local.get $4 + local.get $11 + f64.mul + f64.sub + local.get $2 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $9 + local.get $5 + local.get $11 + f64.mul + f64.sub + local.get $2 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $10 + local.get $6 + local.get $11 + f64.mul + f64.sub + local.get $2 + f64.div + call $~lib/typedarray/Float64Array#__set + end + local.get $0 + ) + (func $assembly/quat2/exactEquals (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.eq + if (result i32) + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + ) + (func $assembly/quat2/equals (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 f64) + (local $16 f64) + (local $17 f64) + (local $18 f64) + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $0 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $0 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $0 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $0 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $12 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $13 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $14 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $15 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $16 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $17 + local.get $2 + local.get $10 + f64.sub + local.set $18 + local.get $18 + f64.abs + global.get $assembly/common/EPSILON + f64.const 1 + local.get $2 + local.set $18 + local.get $18 + f64.abs + local.get $10 + local.set $18 + local.get $18 + f64.abs + call $assembly/imports/MathUtil.max + f64.mul + f64.le + if (result i32) + local.get $3 + local.get $11 + f64.sub + local.set $18 + local.get $18 + f64.abs + global.get $assembly/common/EPSILON + f64.const 1 + local.get $3 + local.set $18 + local.get $18 + f64.abs + local.get $11 + local.set $18 + local.get $18 + f64.abs + call $assembly/imports/MathUtil.max + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $4 + local.get $12 + f64.sub + local.set $18 + local.get $18 + f64.abs + global.get $assembly/common/EPSILON + f64.const 1 + local.get $4 + local.set $18 + local.get $18 + f64.abs + local.get $12 + local.set $18 + local.get $18 + f64.abs + call $assembly/imports/MathUtil.max + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $5 + local.get $13 + f64.sub + local.set $18 + local.get $18 + f64.abs + global.get $assembly/common/EPSILON + f64.const 1 + local.get $5 + local.set $18 + local.get $18 + f64.abs + local.get $13 + local.set $18 + local.get $18 + f64.abs + call $assembly/imports/MathUtil.max + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $6 + local.get $14 + f64.sub + local.set $18 + local.get $18 + f64.abs + global.get $assembly/common/EPSILON + f64.const 1 + local.get $6 + local.set $18 + local.get $18 + f64.abs + local.get $14 + local.set $18 + local.get $18 + f64.abs + call $assembly/imports/MathUtil.max + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $7 + local.get $15 + f64.sub + local.set $18 + local.get $18 + f64.abs + global.get $assembly/common/EPSILON + f64.const 1 + local.get $7 + local.set $18 + local.get $18 + f64.abs + local.get $15 + local.set $18 + local.get $18 + f64.abs + call $assembly/imports/MathUtil.max + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $8 + local.get $16 + f64.sub + local.set $18 + local.get $18 + f64.abs + global.get $assembly/common/EPSILON + f64.const 1 + local.get $8 + local.set $18 + local.get $18 + f64.abs + local.get $16 + local.set $18 + local.get $18 + f64.abs + call $assembly/imports/MathUtil.max + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $9 + local.get $17 + f64.sub + local.set $18 + local.get $18 + f64.abs + global.get $assembly/common/EPSILON + f64.const 1 + local.get $9 + local.set $18 + local.get $18 + f64.abs + local.get $17 + local.set $18 + local.get $18 + f64.abs + call $assembly/imports/MathUtil.max + f64.mul + f64.le + else + i32.const 0 + end + ) + (func $assembly/vec2/copy (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec2/set (param $0 i32) (param $1 f64) (param $2 f64) (result i32) + local.get $0 + i32.const 0 + local.get $1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $2 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec2/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec2/ceil (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $2 + f64.ceil + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $2 + f64.ceil + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec2/floor (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $2 + f64.floor + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $2 + f64.floor + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec2/min (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $4 + local.get $3 + f64.min + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $4 + local.get $3 + f64.min + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec2/max (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $4 + local.get $3 + f64.max + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $4 + local.get $3 + f64.max + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec2/round (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $2 + f64.const 0.5 + f64.add + f64.floor + local.get $2 + f64.copysign + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $2 + f64.const 0.5 + f64.add + f64.floor + local.get $2 + f64.copysign + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec2/scale (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec2/scaleAndAdd (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec2/negate (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec2/inverse (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 0 + f64.const 1 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec2/normalize (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $2 + local.get $2 + f64.mul + local.get $3 + local.get $3 + f64.mul + f64.add + local.set $4 + local.get $4 + f64.const 0 + f64.gt + if + f64.const 1 + local.get $4 + local.set $5 + local.get $5 + f64.sqrt + f64.div + local.set $4 + end + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec2/dot (param $0 i32) (param $1 i32) (result f64) + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.mul + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.add + ) + (func $assembly/vec2/cross (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 i32) + (local $5 i32) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.mul + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.sub + local.set $3 + local.get $0 + i32.const 0 + local.get $0 + local.tee $4 + i32.const 1 + local.tee $5 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $4 + local.get $5 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $3 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec2/lerp (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + (local $4 f64) + (local $5 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $0 + i32.const 0 + local.get $4 + local.get $3 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.sub + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $5 + local.get $3 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.sub + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec2/random (param $0 i32) (param $1 f64) (result i32) + (local $2 f64) + local.get $1 + i64.reinterpret_f64 + i64.const 1 + i64.shl + i64.const 2 + i64.sub + i64.const -9007199254740994 + i64.le_u + if (result f64) + local.get $1 + else + f64.const 1 + end + local.set $1 + i32.const 0 + global.set $~argumentsLength + global.get $assembly/common/RANDOM + i32.load + call_indirect $0 (type $none_=>_f64) + f64.const 2 + f64.mul + global.get $~lib/math/NativeMath.PI + f64.mul + local.set $2 + local.get $0 + i32.const 0 + local.get $2 + call $~lib/math/NativeMath.cos + local.get $1 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $2 + call $~lib/math/NativeMath.sin + local.get $1 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec2/transformMat2 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $0 + i32.const 0 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec2/transformMat2d (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $0 + i32.const 0 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + f64.add + local.get $2 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + f64.add + local.get $2 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec2/transformMat3 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $0 + i32.const 0 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + f64.add + local.get $2 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + local.get $2 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + f64.add + local.get $2 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec2/transformMat4 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $0 + i32.const 0 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + local.get $2 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + f64.add + local.get $2 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + local.get $2 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + f64.add + local.get $2 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec2/rotate (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.sub + local.set $4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.sub + local.set $5 + local.get $3 + call $~lib/math/NativeMath.sin + local.set $6 + local.get $3 + call $~lib/math/NativeMath.cos + local.set $7 + local.get $0 + i32.const 0 + local.get $4 + local.get $7 + f64.mul + local.get $5 + local.get $6 + f64.mul + f64.sub + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $4 + local.get $6 + f64.mul + local.get $5 + local.get $7 + f64.mul + f64.add + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec2/angle (param $0 i32) (param $1 i32) (result f64) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $2 + local.get $2 + f64.mul + local.get $3 + local.get $3 + f64.mul + f64.add + local.set $6 + local.get $6 + f64.sqrt + local.get $4 + local.get $4 + f64.mul + local.get $5 + local.get $5 + f64.mul + f64.add + local.set $6 + local.get $6 + f64.sqrt + f64.mul + local.set $6 + local.get $6 + i64.reinterpret_f64 + i64.const 1 + i64.shl + i64.const 2 + i64.sub + i64.const -9007199254740994 + i64.le_u + if (result f64) + local.get $2 + local.get $4 + f64.mul + local.get $3 + local.get $5 + f64.mul + f64.add + local.get $6 + f64.div + else + local.get $6 + end + local.set $7 + local.get $7 + local.set $9 + f64.const -1 + local.set $8 + local.get $9 + local.get $8 + f64.max + local.set $9 + f64.const 1 + local.set $8 + local.get $9 + local.get $8 + f64.min + call $~lib/math/NativeMath.acos + ) + (func $assembly/vec2/zero (param $0 i32) (result i32) + local.get $0 + i32.const 0 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec2/exactEquals (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.eq + if (result i32) + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + ) + (func $assembly/vec2/equals (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $2 + local.get $4 + f64.sub + local.set $6 + local.get $6 + f64.abs + global.get $assembly/common/EPSILON + f64.const 1 + local.get $2 + local.set $6 + local.get $6 + f64.abs + local.get $4 + local.set $6 + local.get $6 + f64.abs + call $assembly/imports/MathUtil.max + f64.mul + f64.le + if (result i32) + local.get $3 + local.get $5 + f64.sub + local.set $6 + local.get $6 + f64.abs + global.get $assembly/common/EPSILON + f64.const 1 + local.get $3 + local.set $6 + local.get $6 + f64.abs + local.get $5 + local.set $6 + local.get $6 + f64.abs + call $assembly/imports/MathUtil.max + f64.mul + f64.le + else + i32.const 0 + end + ) + (func $assembly/vec3/copy (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec3/set (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) + local.get $0 + i32.const 0 + local.get $1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $2 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $3 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec3/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec3/ceil (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $2 + f64.ceil + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $2 + f64.ceil + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $2 + f64.ceil + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec3/floor (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $2 + f64.floor + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $2 + f64.floor + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $2 + f64.floor + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec3/min (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $4 + local.get $3 + f64.min + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $4 + local.get $3 + f64.min + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $4 + local.get $3 + f64.min + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec3/max (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $4 + local.get $3 + f64.max + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $4 + local.get $3 + f64.max + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $4 + local.get $3 + f64.max + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec3/round (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $2 + f64.const 0.5 + f64.add + f64.floor + local.get $2 + f64.copysign + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $2 + f64.const 0.5 + f64.add + f64.floor + local.get $2 + f64.copysign + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $2 + f64.const 0.5 + f64.add + f64.floor + local.get $2 + f64.copysign + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec3/scale (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec3/scaleAndAdd (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec3/negate (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec3/inverse (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 0 + f64.const 1 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 1 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec3/lerp (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + (local $4 f64) + (local $5 f64) + (local $6 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $0 + i32.const 0 + local.get $4 + local.get $3 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.sub + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $5 + local.get $3 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.sub + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $6 + local.get $3 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $6 + f64.sub + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec3/slerp (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + local.get $1 + local.get $2 + call $assembly/vec3/dot + local.set $5 + f64.const -1 + local.set $4 + local.get $5 + local.get $4 + f64.max + local.set $5 + f64.const 1 + local.set $4 + local.get $5 + local.get $4 + f64.min + call $~lib/math/NativeMath.acos + local.set $5 + local.get $5 + call $~lib/math/NativeMath.sin + local.set $4 + f64.const 1 + local.get $3 + f64.sub + local.get $5 + f64.mul + call $~lib/math/NativeMath.sin + local.get $4 + f64.div + local.set $6 + local.get $3 + local.get $5 + f64.mul + call $~lib/math/NativeMath.sin + local.get $4 + f64.div + local.set $7 + local.get $0 + i32.const 0 + local.get $6 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.mul + local.get $7 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $6 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.mul + local.get $7 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $6 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.mul + local.get $7 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec3/hermite (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 f64) (result i32) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + local.get $5 + local.get $5 + f64.mul + local.set $6 + local.get $6 + f64.const 2 + local.get $5 + f64.mul + f64.const 3 + f64.sub + f64.mul + f64.const 1 + f64.add + local.set $7 + local.get $6 + local.get $5 + f64.const 2 + f64.sub + f64.mul + local.get $5 + f64.add + local.set $8 + local.get $6 + local.get $5 + f64.const 1 + f64.sub + f64.mul + local.set $9 + local.get $6 + f64.const 3 + f64.const 2 + local.get $5 + f64.mul + f64.sub + f64.mul + local.set $10 + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $7 + f64.mul + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $8 + f64.mul + f64.add + local.get $3 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $9 + f64.mul + f64.add + local.get $4 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $10 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $7 + f64.mul + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $8 + f64.mul + f64.add + local.get $3 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $9 + f64.mul + f64.add + local.get $4 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $10 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $7 + f64.mul + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $8 + f64.mul + f64.add + local.get $3 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $9 + f64.mul + f64.add + local.get $4 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $10 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec3/bezier (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 f64) (result i32) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + i32.const 1 + f64.convert_i32_s + local.get $5 + f64.sub + local.set $6 + local.get $6 + local.get $6 + f64.mul + local.set $7 + local.get $5 + local.get $5 + f64.mul + local.set $8 + local.get $7 + local.get $6 + f64.mul + local.set $9 + i32.const 3 + f64.convert_i32_s + local.get $5 + f64.mul + local.get $7 + f64.mul + local.set $10 + i32.const 3 + f64.convert_i32_s + local.get $8 + f64.mul + local.get $6 + f64.mul + local.set $11 + local.get $8 + local.get $5 + f64.mul + local.set $12 + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $9 + f64.mul + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $10 + f64.mul + f64.add + local.get $3 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $11 + f64.mul + f64.add + local.get $4 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $12 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $9 + f64.mul + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $10 + f64.mul + f64.add + local.get $3 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $11 + f64.mul + f64.add + local.get $4 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $12 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $9 + f64.mul + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $10 + f64.mul + f64.add + local.get $3 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $11 + f64.mul + f64.add + local.get $4 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $12 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec3/random (param $0 i32) (param $1 f64) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + local.get $1 + i64.reinterpret_f64 + i64.const 1 + i64.shl + i64.const 2 + i64.sub + i64.const -9007199254740994 + i64.le_u + if (result f64) + local.get $1 + else + f64.const 1 + end + local.set $1 + i32.const 0 + global.set $~argumentsLength + global.get $assembly/common/RANDOM + i32.load + call_indirect $0 (type $none_=>_f64) + f64.const 2 + f64.mul + global.get $~lib/math/NativeMath.PI + f64.mul + local.set $2 + i32.const 0 + global.set $~argumentsLength + global.get $assembly/common/RANDOM + i32.load + call_indirect $0 (type $none_=>_f64) + f64.const 2 + f64.mul + f64.const 1 + f64.sub + local.set $3 + f64.const 1 + local.get $3 + local.get $3 + f64.mul + f64.sub + local.set $4 + local.get $4 + f64.sqrt + local.get $1 + f64.mul + local.set $4 + local.get $0 + i32.const 0 + local.get $2 + call $~lib/math/NativeMath.cos + local.get $4 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $2 + call $~lib/math/NativeMath.sin + local.get $4 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $3 + local.get $1 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec3/transformMat4 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + local.get $2 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + f64.add + local.get $2 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.mul + f64.add + local.get $2 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + f64.add + local.set $6 + local.get $6 + i64.reinterpret_f64 + i64.const 1 + i64.shl + i64.const 2 + i64.sub + i64.const -9007199254740994 + i64.le_u + if (result f64) + local.get $6 + else + f64.const 1 + end + local.set $6 + local.get $0 + i32.const 0 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + local.get $2 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + f64.add + local.get $2 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.mul + f64.add + local.get $2 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + f64.add + local.get $6 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + local.get $2 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + f64.add + local.get $2 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.mul + f64.add + local.get $2 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + f64.add + local.get $6 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + local.get $2 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + f64.add + local.get $2 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.mul + f64.add + local.get $2 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + f64.add + local.get $6 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec3/transformMat3 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $0 + i32.const 0 + local.get $3 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.mul + local.get $4 + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.add + local.get $5 + local.get $2 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $3 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.mul + local.get $4 + local.get $2 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.add + local.get $5 + local.get $2 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $3 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.mul + local.get $4 + local.get $2 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.add + local.get $5 + local.get $2 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec3/transformQuat (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 f64) + (local $16 f64) + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $4 + local.get $9 + f64.mul + local.get $5 + local.get $8 + f64.mul + f64.sub + local.set $10 + local.get $5 + local.get $7 + f64.mul + local.get $3 + local.get $9 + f64.mul + f64.sub + local.set $11 + local.get $3 + local.get $8 + f64.mul + local.get $4 + local.get $7 + f64.mul + f64.sub + local.set $12 + local.get $4 + local.get $12 + f64.mul + local.get $5 + local.get $11 + f64.mul + f64.sub + local.set $13 + local.get $5 + local.get $10 + f64.mul + local.get $3 + local.get $12 + f64.mul + f64.sub + local.set $14 + local.get $3 + local.get $11 + f64.mul + local.get $4 + local.get $10 + f64.mul + f64.sub + local.set $15 + local.get $6 + f64.const 2 + f64.mul + local.set $16 + local.get $10 + local.get $16 + f64.mul + local.set $10 + local.get $11 + local.get $16 + f64.mul + local.set $11 + local.get $12 + local.get $16 + f64.mul + local.set $12 + local.get $13 + f64.const 2 + f64.mul + local.set $13 + local.get $14 + f64.const 2 + f64.mul + local.set $14 + local.get $15 + f64.const 2 + f64.mul + local.set $15 + local.get $0 + i32.const 0 + local.get $7 + local.get $10 + f64.add + local.get $13 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $8 + local.get $11 + f64.add + local.get $14 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $9 + local.get $12 + f64.add + local.get $15 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $~lib/rt/itcms/__renew (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.const 20 + i32.sub + local.set $2 + local.get $1 + local.get $2 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.sub + i32.le_u + if + local.get $2 + local.get $1 + call $~lib/rt/itcms/Object#set:rtSize + local.get $0 + return + end + local.get $1 + local.get $2 + i32.load offset=12 + call $~lib/rt/itcms/__new + local.set $3 + local.get $3 + local.get $0 + local.get $1 + local.tee $4 + local.get $2 + i32.load offset=16 + local.tee $5 + local.get $4 + local.get $5 + i32.lt_u + select + call $~lib/memory/memory.copy + local.get $3 + ) + (func $~lib/array/ensureSize (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + local.get $0 + i32.load offset=8 + local.set $3 + local.get $1 + local.get $3 + local.get $2 + i32.shr_u + i32.gt_u + if + local.get $1 + i32.const 1073741820 + local.get $2 + i32.shr_u + i32.gt_u + if + i32.const 560 + i32.const 10864 + i32.const 14 + i32.const 48 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load + local.set $4 + local.get $1 + local.get $2 + i32.shl + local.set $5 + local.get $4 + local.get $5 + call $~lib/rt/itcms/__renew + local.set $6 + local.get $6 + local.get $3 + i32.add + i32.const 0 + local.get $5 + local.get $3 + i32.sub + call $~lib/memory/memory.fill + local.get $6 + local.get $4 + i32.ne + if + local.get $0 + local.get $6 + i32.store + local.get $0 + local.get $6 + i32.store offset=4 + local.get $0 + local.get $6 + i32.const 0 + call $~lib/rt/itcms/__link + end + local.get $0 + local.get $5 + i32.store offset=8 + end + ) + (func $~lib/array/Array#set:length_ (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=12 + ) + (func $~lib/array/Array#__uset (param $0 i32) (param $1 i32) (param $2 f64) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + local.get $2 + f64.store + i32.const 0 + drop + ) + (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 f64) + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_u + if + local.get $1 + i32.const 0 + i32.lt_s + if + i32.const 144 + i32.const 10864 + i32.const 108 + i32.const 22 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.const 3 + call $~lib/array/ensureSize + local.get $0 + local.get $1 + i32.const 1 + i32.add + call $~lib/array/Array#set:length_ + end + local.get $0 + local.get $1 + local.get $2 + call $~lib/array/Array#__uset + ) + (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result f64) + (local $2 f64) + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_u + if + i32.const 144 + i32.const 10864 + i32.const 92 + i32.const 42 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $2 + i32.const 0 + drop + local.get $2 + ) + (func $assembly/vec3/angle (param $0 i32) (param $1 i32) (result f64) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $2 + local.get $2 + f64.mul + local.get $3 + local.get $3 + f64.mul + f64.add + local.get $4 + local.get $4 + f64.mul + f64.add + local.set $8 + local.get $8 + f64.sqrt + local.set $8 + local.get $5 + local.get $5 + f64.mul + local.get $6 + local.get $6 + f64.mul + f64.add + local.get $7 + local.get $7 + f64.mul + f64.add + local.set $9 + local.get $9 + f64.sqrt + local.set $9 + local.get $8 + local.get $9 + f64.mul + local.set $10 + local.get $10 + i64.reinterpret_f64 + i64.const 1 + i64.shl + i64.const 2 + i64.sub + i64.const -9007199254740994 + i64.le_u + if (result f64) + local.get $0 + local.get $1 + call $assembly/vec3/dot + local.get $10 + f64.div + else + local.get $10 + end + local.set $11 + local.get $11 + local.set $13 + f64.const -1 + local.set $12 + local.get $13 + local.get $12 + f64.max + local.set $13 + f64.const 1 + local.set $12 + local.get $13 + local.get $12 + f64.min + call $~lib/math/NativeMath.acos + ) + (func $assembly/vec3/zero (param $0 i32) (result i32) + local.get $0 + i32.const 0 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec3/exactEquals (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.eq + if (result i32) + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + ) + (func $assembly/vec3/equals (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $2 + local.get $5 + f64.sub + local.set $8 + local.get $8 + f64.abs + global.get $assembly/common/EPSILON + f64.const 1 + local.get $2 + local.set $8 + local.get $8 + f64.abs + local.get $5 + local.set $8 + local.get $8 + f64.abs + call $assembly/imports/MathUtil.max + f64.mul + f64.le + if (result i32) + local.get $3 + local.get $6 + f64.sub + local.set $8 + local.get $8 + f64.abs + global.get $assembly/common/EPSILON + f64.const 1 + local.get $3 + local.set $8 + local.get $8 + f64.abs + local.get $6 + local.set $8 + local.get $8 + f64.abs + call $assembly/imports/MathUtil.max + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $4 + local.get $7 + f64.sub + local.set $8 + local.get $8 + f64.abs + global.get $assembly/common/EPSILON + f64.const 1 + local.get $4 + local.set $8 + local.get $8 + f64.abs + local.get $7 + local.set $8 + local.get $8 + f64.abs + call $assembly/imports/MathUtil.max + f64.mul + f64.le + else + i32.const 0 + end + ) + (func $assembly/vec4/ceil (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $2 + f64.ceil + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $2 + f64.ceil + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $2 + f64.ceil + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $2 + f64.ceil + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec4/floor (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $2 + f64.floor + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $2 + f64.floor + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $2 + f64.floor + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $2 + f64.floor + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec4/min (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $4 + local.get $3 + f64.min + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $4 + local.get $3 + f64.min + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $4 + local.get $3 + f64.min + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $4 + local.get $3 + f64.min + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec4/max (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $4 + local.get $3 + f64.max + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $4 + local.get $3 + f64.max + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $4 + local.get $3 + f64.max + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $4 + local.get $3 + f64.max + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec4/round (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $2 + f64.const 0.5 + f64.add + f64.floor + local.get $2 + f64.copysign + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $2 + f64.const 0.5 + f64.add + f64.floor + local.get $2 + f64.copysign + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $2 + f64.const 0.5 + f64.add + f64.floor + local.get $2 + f64.copysign + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $2 + f64.const 0.5 + f64.add + f64.floor + local.get $2 + f64.copysign + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec4/scaleAndAdd (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec4/negate (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec4/inverse (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 0 + f64.const 1 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 1 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 1 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec4/cross (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $3 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.mul + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $3 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.sub + local.set $4 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $3 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.mul + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $3 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.sub + local.set $5 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $3 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.mul + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $3 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.sub + local.set $6 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $3 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.mul + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $3 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.sub + local.set $7 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $3 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.mul + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $3 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.sub + local.set $8 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $3 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.mul + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $3 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.sub + local.set $9 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $12 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $13 + local.get $0 + i32.const 0 + local.get $11 + local.get $9 + f64.mul + local.get $12 + local.get $8 + f64.mul + f64.sub + local.get $13 + local.get $7 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $10 + local.get $9 + f64.mul + f64.neg + local.get $12 + local.get $6 + f64.mul + f64.add + local.get $13 + local.get $5 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $10 + local.get $8 + f64.mul + local.get $11 + local.get $6 + f64.mul + f64.sub + local.get $13 + local.get $4 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $10 + local.get $7 + f64.mul + f64.neg + local.get $11 + local.get $5 + f64.mul + f64.add + local.get $12 + local.get $4 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec4/random (param $0 i32) (param $1 f64) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 i32) + (local $9 f64) + (local $10 f64) + local.get $1 + i64.reinterpret_f64 + i64.const 1 + i64.shl + i64.const 2 + i64.sub + i64.const -9007199254740994 + i64.le_u + if (result f64) + local.get $1 + else + f64.const 1 + end + local.set $1 + loop $do-continue|0 + i32.const 0 + global.set $~argumentsLength + global.get $assembly/common/RANDOM + i32.load + call_indirect $0 (type $none_=>_f64) + f64.const 2 + f64.mul + f64.const 1 + f64.sub + local.set $2 + i32.const 0 + global.set $~argumentsLength + global.get $assembly/common/RANDOM + i32.load + call_indirect $0 (type $none_=>_f64) + f64.const 2 + f64.mul + f64.const 1 + f64.sub + local.set $3 + local.get $2 + local.get $2 + f64.mul + local.get $3 + local.get $3 + f64.mul + f64.add + local.set $6 + local.get $6 + f64.const 1 + f64.ge + local.set $8 + local.get $8 + br_if $do-continue|0 + end + loop $do-continue|1 + i32.const 0 + global.set $~argumentsLength + global.get $assembly/common/RANDOM + i32.load + call_indirect $0 (type $none_=>_f64) + f64.const 2 + f64.mul + f64.const 1 + f64.sub + local.set $4 + i32.const 0 + global.set $~argumentsLength + global.get $assembly/common/RANDOM + i32.load + call_indirect $0 (type $none_=>_f64) + f64.const 2 + f64.mul + f64.const 1 + f64.sub + local.set $5 + local.get $4 + local.get $4 + f64.mul + local.get $5 + local.get $5 + f64.mul + f64.add + local.set $7 + local.get $7 + f64.const 1 + f64.ge + local.set $8 + local.get $8 + br_if $do-continue|1 + end + f64.const 1 + local.get $6 + f64.sub + local.get $7 + f64.div + local.set $9 + local.get $9 + f64.sqrt + local.set $10 + local.get $0 + i32.const 0 + local.get $1 + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + local.get $3 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + local.get $4 + f64.mul + local.get $10 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + local.get $5 + f64.mul + local.get $10 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec4/transformMat4 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $0 + i32.const 0 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + local.get $2 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + f64.add + local.get $2 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.mul + f64.add + local.get $2 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + local.get $6 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + local.get $2 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + f64.add + local.get $2 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.mul + f64.add + local.get $2 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + local.get $6 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + local.get $2 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + f64.add + local.get $2 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.mul + f64.add + local.get $2 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + local.get $6 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + local.get $2 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + f64.add + local.get $2 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.mul + f64.add + local.get $2 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + local.get $6 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec4/transformQuat (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $9 + local.get $3 + f64.mul + local.get $7 + local.get $5 + f64.mul + f64.add + local.get $8 + local.get $4 + f64.mul + f64.sub + local.set $10 + local.get $9 + local.get $4 + f64.mul + local.get $8 + local.get $3 + f64.mul + f64.add + local.get $6 + local.get $5 + f64.mul + f64.sub + local.set $11 + local.get $9 + local.get $5 + f64.mul + local.get $6 + local.get $4 + f64.mul + f64.add + local.get $7 + local.get $3 + f64.mul + f64.sub + local.set $12 + local.get $6 + f64.neg + local.get $3 + f64.mul + local.get $7 + local.get $4 + f64.mul + f64.sub + local.get $8 + local.get $5 + f64.mul + f64.sub + local.set $13 + local.get $0 + i32.const 0 + local.get $10 + local.get $9 + f64.mul + local.get $13 + local.get $6 + f64.neg + f64.mul + f64.add + local.get $11 + local.get $8 + f64.neg + f64.mul + f64.add + local.get $12 + local.get $7 + f64.neg + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $11 + local.get $9 + f64.mul + local.get $13 + local.get $7 + f64.neg + f64.mul + f64.add + local.get $12 + local.get $6 + f64.neg + f64.mul + f64.add + local.get $10 + local.get $8 + f64.neg + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $12 + local.get $9 + f64.mul + local.get $13 + local.get $8 + f64.neg + f64.mul + f64.add + local.get $10 + local.get $7 + f64.neg + f64.mul + f64.add + local.get $11 + local.get $6 + f64.neg + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec4/zero (param $0 i32) (result i32) + local.get $0 + i32.const 0 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/vec4/equals (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $2 + local.get $6 + f64.sub + local.set $10 + local.get $10 + f64.abs + global.get $assembly/common/EPSILON + f64.const 1 + local.get $2 + local.set $10 + local.get $10 + f64.abs + local.get $6 + local.set $10 + local.get $10 + f64.abs + call $assembly/imports/MathUtil.max + f64.mul + f64.le + if (result i32) + local.get $3 + local.get $7 + f64.sub + local.set $10 + local.get $10 + f64.abs + global.get $assembly/common/EPSILON + f64.const 1 + local.get $3 + local.set $10 + local.get $10 + f64.abs + local.get $7 + local.set $10 + local.get $10 + f64.abs + call $assembly/imports/MathUtil.max + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $4 + local.get $8 + f64.sub + local.set $10 + local.get $10 + f64.abs + global.get $assembly/common/EPSILON + f64.const 1 + local.get $4 + local.set $10 + local.get $10 + f64.abs + local.get $8 + local.set $10 + local.get $10 + f64.abs + call $assembly/imports/MathUtil.max + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $5 + local.get $9 + f64.sub + local.set $10 + local.get $10 + f64.abs + global.get $assembly/common/EPSILON + f64.const 1 + local.get $5 + local.set $10 + local.get $10 + f64.abs + local.get $9 + local.set $10 + local.get $10 + f64.abs + call $assembly/imports/MathUtil.max + f64.mul + f64.le + else + i32.const 0 + end + ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + i32.const 144 + local.get $0 + call $~lib/rt/itcms/__visit + i32.const 560 + local.get $0 + call $~lib/rt/itcms/__visit + i32.const 672 + local.get $0 + call $~lib/rt/itcms/__visit + global.get $assembly/common/ANGLE_ORDER + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $assembly/quat/tmpvec3 + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $assembly/quat/xUnitVec3 + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $assembly/quat/yUnitVec3 + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $assembly/quat/temp1 + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $assembly/quat/temp2 + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $assembly/quat/matr + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $assembly/vec2/vec + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $assembly/vec3/vec + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $assembly/vec4/vec + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + ) + (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + i32.load + local.tee $2 + if + local.get $2 + local.get $1 + call $~lib/rt/itcms/__visit + end + ) + (func $~lib/function/Function<%28%29=>f64>#__visit (param $0 i32) (param $1 i32) + local.get $0 + i32.load offset=4 + local.get $1 + call $~lib/rt/itcms/__visit + ) + (func $~lib/function/Function<%28%29=>f64>~visit (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/function/Function<%28%29=>f64>#__visit + ) + (func $~lib/typedarray/Float64Array~visit (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/arraybuffer/ArrayBufferView~visit + ) + (func $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>#__visit (param $0 i32) (param $1 i32) + local.get $0 + i32.load offset=4 + local.get $1 + call $~lib/rt/itcms/__visit + ) + (func $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>~visit (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>#__visit + ) + (func $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>f64>#__visit (param $0 i32) (param $1 i32) + local.get $0 + i32.load offset=4 + local.get $1 + call $~lib/rt/itcms/__visit + ) + (func $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>f64>~visit (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>f64>#__visit + ) + (func $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>f64>#__visit (param $0 i32) (param $1 i32) + local.get $0 + i32.load offset=4 + local.get $1 + call $~lib/rt/itcms/__visit + ) + (func $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>f64>~visit (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>f64>#__visit + ) + (func $~lib/function/Function<%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array>#__visit (param $0 i32) (param $1 i32) + local.get $0 + i32.load offset=4 + local.get $1 + call $~lib/rt/itcms/__visit + ) + (func $~lib/function/Function<%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array>~visit (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/function/Function<%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array>#__visit + ) + (func $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>#__visit (param $0 i32) (param $1 i32) + local.get $0 + i32.load offset=4 + local.get $1 + call $~lib/rt/itcms/__visit + ) + (func $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>~visit (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>#__visit + ) + (func $~lib/function/Function<%28f64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array>#__visit (param $0 i32) (param $1 i32) + local.get $0 + i32.load offset=4 + local.get $1 + call $~lib/rt/itcms/__visit + ) + (func $~lib/function/Function<%28f64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array>~visit (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/function/Function<%28f64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array>#__visit + ) + (func $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>#__visit (param $0 i32) (param $1 i32) + local.get $0 + i32.load offset=4 + local.get $1 + call $~lib/rt/itcms/__visit + ) + (func $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>~visit (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>#__visit + ) + (func $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array>#__visit (param $0 i32) (param $1 i32) + local.get $0 + i32.load offset=4 + local.get $1 + call $~lib/rt/itcms/__visit + ) + (func $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array>~visit (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array>#__visit + ) + (func $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>#__visit (param $0 i32) (param $1 i32) + local.get $0 + i32.load offset=4 + local.get $1 + call $~lib/rt/itcms/__visit + ) + (func $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>~visit (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>#__visit + ) + (func $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>#__visit (param $0 i32) (param $1 i32) + local.get $0 + i32.load offset=4 + local.get $1 + call $~lib/rt/itcms/__visit + ) + (func $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>~visit (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>#__visit + ) + (func $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>bool>#__visit (param $0 i32) (param $1 i32) + local.get $0 + i32.load offset=4 + local.get $1 + call $~lib/rt/itcms/__visit + ) + (func $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>bool>~visit (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>bool>#__visit + ) + (func $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>#__visit (param $0 i32) (param $1 i32) + local.get $0 + i32.load offset=4 + local.get $1 + call $~lib/rt/itcms/__visit + ) + (func $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>~visit (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>#__visit + ) + (func $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>#__visit (param $0 i32) (param $1 i32) + local.get $0 + i32.load offset=4 + local.get $1 + call $~lib/rt/itcms/__visit + ) + (func $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>~visit (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>#__visit + ) + (func $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cusize%29=>~lib/typedarray/Float64Array>#__visit (param $0 i32) (param $1 i32) + local.get $0 + i32.load offset=4 + local.get $1 + call $~lib/rt/itcms/__visit + ) + (func $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cusize%29=>~lib/typedarray/Float64Array>~visit (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cusize%29=>~lib/typedarray/Float64Array>#__visit + ) + (func $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array>#__visit (param $0 i32) (param $1 i32) + local.get $0 + i32.load offset=4 + local.get $1 + call $~lib/rt/itcms/__visit + ) + (func $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array>~visit (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array>#__visit + ) + (func $~lib/array/Array<~lib/typedarray/Float64Array>#__visit (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 1 + drop + local.get $0 + i32.load offset=4 + local.set $2 + local.get $2 + local.get $0 + i32.load offset=12 + i32.const 2 + i32.shl + i32.add + local.set $3 + loop $while-continue|0 + local.get $2 + local.get $3 + i32.lt_u + local.set $4 + local.get $4 + if + local.get $2 + i32.load + local.set $5 + local.get $5 + if + local.get $5 + local.get $1 + call $~lib/rt/itcms/__visit + end + local.get $2 + i32.const 4 + i32.add + local.set $2 + br $while-continue|0 + end + end + local.get $0 + i32.load + local.get $1 + call $~lib/rt/itcms/__visit + ) + (func $~lib/array/Array<~lib/typedarray/Float64Array>~visit (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/array/Array<~lib/typedarray/Float64Array>#__visit + ) + (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + i32.const 0 + drop + local.get $0 + i32.load + local.get $1 + call $~lib/rt/itcms/__visit + ) + (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/array/Array#__visit + ) + (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + i32.const 0 + drop + local.get $0 + i32.load + local.get $1 + call $~lib/rt/itcms/__visit + ) + (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/array/Array#__visit + ) + (func $~lib/rt/__visit_members (param $0 i32) (param $1 i32) + block $invalid + block $~lib/array/Array + block $assembly/mat4/Fov + block $~lib/array/Array + block $~lib/array/Array<~lib/typedarray/Float64Array> + block $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array> + block $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cusize%29=>~lib/typedarray/Float64Array> + block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> + block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> + block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>bool> + block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> + block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> + block $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array> + block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> + block $~lib/function/Function<%28f64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array> + block $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> + block $~lib/function/Function<%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array> + block $assembly/imports/IArguments + block $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>f64> + block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>f64> + block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> + block $~lib/typedarray/Float64Array + block $~lib/function/Function<%28%29=>f64> + block $~lib/arraybuffer/ArrayBufferView + block $~lib/string/String + block $~lib/arraybuffer/ArrayBuffer + local.get $0 + i32.const 8 + i32.sub + i32.load + br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/arraybuffer/ArrayBufferView $~lib/function/Function<%28%29=>f64> $~lib/typedarray/Float64Array $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>f64> $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>f64> $assembly/imports/IArguments $~lib/function/Function<%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28f64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>bool> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cusize%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/array/Array<~lib/typedarray/Float64Array> $~lib/array/Array $assembly/mat4/Fov $~lib/array/Array $invalid + end + return + end + return + end + local.get $0 + local.get $1 + call $~lib/arraybuffer/ArrayBufferView~visit + return + end + local.get $0 + local.get $1 + call $~lib/function/Function<%28%29=>f64>~visit + return + end + local.get $0 + local.get $1 + call $~lib/typedarray/Float64Array~visit + return + end + local.get $0 + local.get $1 + call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>~visit + return + end + local.get $0 + local.get $1 + call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>f64>~visit + return + end + local.get $0 + local.get $1 + call $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>f64>~visit + return + end + return + end + local.get $0 + local.get $1 + call $~lib/function/Function<%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array>~visit + return + end + local.get $0 + local.get $1 + call $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>~visit + return + end + local.get $0 + local.get $1 + call $~lib/function/Function<%28f64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array>~visit + return + end + local.get $0 + local.get $1 + call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>~visit + return + end + local.get $0 + local.get $1 + call $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array>~visit + return + end + local.get $0 + local.get $1 + call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>~visit + return + end + local.get $0 + local.get $1 + call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>~visit + return + end + local.get $0 + local.get $1 + call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>bool>~visit + return + end + local.get $0 + local.get $1 + call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>~visit + return + end + local.get $0 + local.get $1 + call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>~visit + return + end + local.get $0 + local.get $1 + call $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cusize%29=>~lib/typedarray/Float64Array>~visit + return + end + local.get $0 + local.get $1 + call $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array>~visit + return + end + local.get $0 + local.get $1 + call $~lib/array/Array<~lib/typedarray/Float64Array>~visit + return + end + local.get $0 + local.get $1 + call $~lib/array/Array~visit + return + end + return + end + local.get $0 + local.get $1 + call $~lib/array/Array~visit + return + end + unreachable + ) + (func $~setArgumentsLength (param $0 i32) + local.get $0 + global.set $~argumentsLength + ) + (func $~start + call $start:assembly/index.as + ) + (func $~stack_check + global.get $~lib/memory/__stack_pointer + global.get $~lib/memory/__data_end + i32.lt_s + if + i32.const 27696 + i32.const 27744 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + ) + (func $assembly/vec3/forEach~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (result i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + local.get $1 + i32.eqz + if + i32.const 3 + local.set $1 + end + local.get $2 + i32.eqz + if + i32.const 0 + local.set $2 + end + local.get $3 + if + local.get $3 + local.get $1 + i32.mul + local.get $2 + i32.add + local.get $0 + call $~lib/typedarray/Float64Array#get:length + i32.const 0 + call $assembly/imports/MathUtil.min + local.set $7 + else + local.get $0 + call $~lib/typedarray/Float64Array#get:length + local.set $7 + end + local.get $2 + local.set $6 + loop $for-loop|0 + local.get $6 + local.get $7 + i32.lt_s + local.set $8 + local.get $8 + if + global.get $assembly/vec3/vec + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store + local.get $9 + i32.const 0 + local.get $0 + local.get $6 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $assembly/vec3/vec + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store + local.get $9 + i32.const 1 + local.get $0 + local.get $6 + i32.const 1 + i32.add + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $assembly/vec3/vec + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store + local.get $9 + i32.const 2 + local.get $0 + local.get $6 + i32.const 2 + i32.add + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $assembly/vec3/vec + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store + local.get $9 + global.get $assembly/vec3/vec + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $5 + i32.const 3 + global.set $~argumentsLength + local.get $4 + i32.load + call_indirect $0 (type $i32_i32_i32_=>_none) + local.get $0 + local.get $6 + global.get $assembly/vec3/vec + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store + local.get $9 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + local.get $6 + i32.const 1 + i32.add + global.get $assembly/vec3/vec + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store + local.get $9 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + local.get $6 + i32.const 2 + i32.add + global.get $assembly/vec3/vec + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store + local.get $9 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $6 + local.get $1 + i32.add + local.set $6 + br $for-loop|0 + end + end + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $9 + ) + (func $assembly/vec4/forEach~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (result i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + local.get $1 + i32.eqz + if + i32.const 4 + local.set $1 + end + local.get $2 + i32.eqz + if + i32.const 0 + local.set $2 + end + local.get $3 + if + local.get $3 + local.get $1 + i32.mul + local.get $2 + i32.add + local.get $0 + call $~lib/typedarray/Float64Array#get:length + i32.const 0 + call $assembly/imports/MathUtil.min + local.set $7 + else + local.get $0 + call $~lib/typedarray/Float64Array#get:length + local.set $7 + end + local.get $2 + local.set $6 + loop $for-loop|0 + local.get $6 + local.get $7 + i32.lt_s + local.set $8 + local.get $8 + if + global.get $assembly/vec4/vec + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store + local.get $9 + i32.const 0 + local.get $0 + local.get $6 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $assembly/vec4/vec + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store + local.get $9 + i32.const 1 + local.get $0 + local.get $6 + i32.const 1 + i32.add + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $assembly/vec4/vec + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store + local.get $9 + i32.const 2 + local.get $0 + local.get $6 + i32.const 2 + i32.add + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $assembly/vec4/vec + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store + local.get $9 + i32.const 3 + local.get $0 + local.get $6 + i32.const 3 + i32.add + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $assembly/vec4/vec + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store + local.get $9 + global.get $assembly/vec4/vec + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $5 + i32.const 3 + global.set $~argumentsLength + local.get $4 + i32.load + call_indirect $0 (type $i32_i32_i32_=>_none) + local.get $0 + local.get $6 + global.get $assembly/vec4/vec + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store + local.get $9 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + local.get $6 + i32.const 1 + i32.add + global.get $assembly/vec4/vec + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store + local.get $9 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + local.get $6 + i32.const 2 + i32.add + global.get $assembly/vec4/vec + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store + local.get $9 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + local.get $6 + i32.const 3 + i32.add + global.get $assembly/vec4/vec + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store + local.get $9 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $6 + local.get $1 + i32.add + local.set $6 + br $for-loop|0 + end + end + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $9 + ) + (func $assembly/quat/rotationTo~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + local.get $1 + local.get $2 + call $assembly/vec3/dot + local.set $3 + local.get $3 + f64.const -0.999999 + f64.lt + if + global.get $assembly/quat/tmpvec3 + local.set $4 + global.get $~lib/memory/__stack_pointer + local.get $4 + i32.store + local.get $4 + global.get $assembly/quat/xUnitVec3 + local.set $4 + global.get $~lib/memory/__stack_pointer + local.get $4 + i32.store offset=4 + local.get $4 + local.get $1 + call $assembly/vec3/cross + drop + global.get $assembly/quat/tmpvec3 + local.set $4 + global.get $~lib/memory/__stack_pointer + local.get $4 + i32.store + local.get $4 + i32.const 1 + global.set $~argumentsLength + global.get $assembly/vec3/len + i32.load + call_indirect $0 (type $i32_=>_f64) + f64.const 1e-06 + f64.lt + if + global.get $assembly/quat/tmpvec3 + local.set $4 + global.get $~lib/memory/__stack_pointer + local.get $4 + i32.store + local.get $4 + global.get $assembly/quat/yUnitVec3 + local.set $4 + global.get $~lib/memory/__stack_pointer + local.get $4 + i32.store offset=4 + local.get $4 + local.get $1 + call $assembly/vec3/cross + drop + end + global.get $assembly/quat/tmpvec3 + local.set $4 + global.get $~lib/memory/__stack_pointer + local.get $4 + i32.store + local.get $4 + global.get $assembly/quat/tmpvec3 + local.set $4 + global.get $~lib/memory/__stack_pointer + local.get $4 + i32.store offset=4 + local.get $4 + call $assembly/vec3/normalize + drop + local.get $0 + global.get $assembly/quat/tmpvec3 + local.set $4 + global.get $~lib/memory/__stack_pointer + local.get $4 + i32.store offset=4 + local.get $4 + global.get $~lib/math/NativeMath.PI + call $assembly/quat/setAxisAngle + drop + local.get $0 + local.set $4 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $4 + return + else + local.get $3 + f64.const 0.999999 + f64.gt + if + local.get $0 + i32.const 0 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + local.set $4 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $4 + return + else + global.get $assembly/quat/tmpvec3 + local.set $4 + global.get $~lib/memory/__stack_pointer + local.get $4 + i32.store + local.get $4 + local.get $1 + local.get $2 + call $assembly/vec3/cross + drop + local.get $0 + i32.const 0 + global.get $assembly/quat/tmpvec3 + local.set $4 + global.get $~lib/memory/__stack_pointer + local.get $4 + i32.store + local.get $4 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + global.get $assembly/quat/tmpvec3 + local.set $4 + global.get $~lib/memory/__stack_pointer + local.get $4 + i32.store + local.get $4 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + global.get $assembly/quat/tmpvec3 + local.set $4 + global.get $~lib/memory/__stack_pointer + local.get $4 + i32.store + local.get $4 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 1 + local.get $3 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + local.get $0 + i32.const 2 + global.set $~argumentsLength + global.get $assembly/quat/normalize + i32.load + call_indirect $0 (type $i32_i32_=>_i32) + local.set $4 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $4 + return + end + unreachable + end + unreachable + ) + (func $assembly/quat/sqlerp~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 f64) (result i32) + (local $6 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store offset=8 + global.get $assembly/quat/temp1 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store + local.get $6 + local.get $1 + local.get $4 + local.get $5 + call $assembly/quat/slerp + drop + global.get $assembly/quat/temp2 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store + local.get $6 + local.get $2 + local.get $3 + local.get $5 + call $assembly/quat/slerp + drop + local.get $0 + global.get $assembly/quat/temp1 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=4 + local.get $6 + global.get $assembly/quat/temp2 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=8 + local.get $6 + f64.const 2 + local.get $5 + f64.mul + f64.const 1 + local.get $5 + f64.sub + f64.mul + call $assembly/quat/slerp + drop + local.get $0 + local.set $6 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $6 + ) + (func $assembly/quat/setAxes~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store offset=8 + global.get $assembly/quat/matr + local.set $4 + global.get $~lib/memory/__stack_pointer + local.get $4 + i32.store + local.get $4 + i32.const 0 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $assembly/quat/matr + local.set $4 + global.get $~lib/memory/__stack_pointer + local.get $4 + i32.store + local.get $4 + i32.const 3 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $assembly/quat/matr + local.set $4 + global.get $~lib/memory/__stack_pointer + local.get $4 + i32.store + local.get $4 + i32.const 6 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $assembly/quat/matr + local.set $4 + global.get $~lib/memory/__stack_pointer + local.get $4 + i32.store + local.get $4 + i32.const 1 + local.get $3 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $assembly/quat/matr + local.set $4 + global.get $~lib/memory/__stack_pointer + local.get $4 + i32.store + local.get $4 + i32.const 4 + local.get $3 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $assembly/quat/matr + local.set $4 + global.get $~lib/memory/__stack_pointer + local.get $4 + i32.store + local.get $4 + i32.const 7 + local.get $3 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $assembly/quat/matr + local.set $4 + global.get $~lib/memory/__stack_pointer + local.get $4 + i32.store + local.get $4 + i32.const 2 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.neg + call $~lib/typedarray/Float64Array#__set + global.get $assembly/quat/matr + local.set $4 + global.get $~lib/memory/__stack_pointer + local.get $4 + i32.store + local.get $4 + i32.const 5 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.neg + call $~lib/typedarray/Float64Array#__set + global.get $assembly/quat/matr + local.set $4 + global.get $~lib/memory/__stack_pointer + local.get $4 + i32.store + local.get $4 + i32.const 8 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + local.get $0 + global.get $assembly/quat/matr + local.set $4 + global.get $~lib/memory/__stack_pointer + local.get $4 + i32.store offset=8 + local.get $4 + call $assembly/quat/fromMat3 + local.set $4 + global.get $~lib/memory/__stack_pointer + local.get $4 + i32.store offset=4 + local.get $4 + i32.const 2 + global.set $~argumentsLength + global.get $assembly/quat/normalize + i32.load + call_indirect $0 (type $i32_i32_=>_i32) + local.set $4 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $4 + ) + (func $assembly/vec2/forEach~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (result i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + local.get $1 + i32.eqz + if + i32.const 2 + local.set $1 + end + local.get $2 + i32.eqz + if + i32.const 0 + local.set $2 + end + local.get $3 + if + local.get $3 + local.get $1 + i32.mul + local.get $2 + i32.add + local.get $0 + call $~lib/typedarray/Float64Array#get:length + i32.const 0 + call $assembly/imports/MathUtil.min + local.set $7 + else + local.get $0 + call $~lib/typedarray/Float64Array#get:length + local.set $7 + end + local.get $2 + local.set $6 + loop $for-loop|0 + local.get $6 + local.get $7 + i32.lt_s + local.set $8 + local.get $8 + if + global.get $assembly/vec2/vec + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store + local.get $9 + i32.const 0 + local.get $0 + local.get $6 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $assembly/vec2/vec + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store + local.get $9 + i32.const 1 + local.get $0 + local.get $6 + i32.const 1 + i32.add + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $assembly/vec2/vec + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store + local.get $9 + global.get $assembly/vec2/vec + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $5 + i32.const 3 + global.set $~argumentsLength + local.get $4 + i32.load + call_indirect $0 (type $i32_i32_i32_=>_none) + local.get $0 + local.get $6 + global.get $assembly/vec2/vec + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store + local.get $9 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + local.get $6 + i32.const 1 + i32.add + global.get $assembly/vec2/vec + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store + local.get $9 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $6 + local.get $1 + i32.add + local.set $6 + br $for-loop|0 + end + end + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $9 + ) + (func $assembly/mat2/str (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 64 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=8 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=16 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=24 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=32 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=40 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=48 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=56 + i32.const 2496 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=56 + local.get $1 + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + i32.const 0 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=60 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=48 + local.get $1 + i32.const 4096 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=52 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=40 + local.get $1 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + i32.const 0 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=44 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=32 + local.get $1 + i32.const 4096 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=36 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=24 + local.get $1 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + i32.const 0 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=28 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=16 + local.get $1 + i32.const 4096 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=20 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=8 + local.get $1 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + i32.const 0 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=12 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store + local.get $1 + i32.const 4128 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 64 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $assembly/mat2d/str (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 96 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=8 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=16 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=24 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=32 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=40 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=48 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=56 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=64 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=72 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=80 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=88 + i32.const 4160 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=88 + local.get $1 + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + i32.const 0 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=92 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=80 + local.get $1 + i32.const 4096 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=84 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=72 + local.get $1 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + i32.const 0 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=76 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=64 + local.get $1 + i32.const 4096 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=68 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=56 + local.get $1 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + i32.const 0 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=60 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=48 + local.get $1 + i32.const 4096 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=52 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=40 + local.get $1 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + i32.const 0 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=44 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=32 + local.get $1 + i32.const 4096 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=36 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=24 + local.get $1 + local.get $0 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + i32.const 0 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=28 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=16 + local.get $1 + i32.const 4096 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=20 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=8 + local.get $1 + local.get $0 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + i32.const 0 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=12 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store + local.get $1 + i32.const 4128 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 96 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $assembly/mat3/str (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 144 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=8 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=16 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=24 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=32 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=40 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=48 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=56 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=64 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=72 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=80 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=88 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=96 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=104 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=112 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=120 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=128 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=136 + i32.const 4192 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=136 + local.get $1 + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + i32.const 0 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=140 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=128 + local.get $1 + i32.const 4096 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=132 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=120 + local.get $1 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + i32.const 0 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=124 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=112 + local.get $1 + i32.const 4096 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=116 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=104 + local.get $1 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + i32.const 0 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=108 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=96 + local.get $1 + i32.const 4096 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=100 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=88 + local.get $1 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + i32.const 0 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=92 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=80 + local.get $1 + i32.const 4096 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=84 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=72 + local.get $1 + local.get $0 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + i32.const 0 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=76 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=64 + local.get $1 + i32.const 4096 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=68 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=56 + local.get $1 + local.get $0 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + i32.const 0 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=60 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=48 + local.get $1 + i32.const 4096 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=52 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=40 + local.get $1 + local.get $0 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + i32.const 0 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=44 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=32 + local.get $1 + i32.const 4096 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=36 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=24 + local.get $1 + local.get $0 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + i32.const 0 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=28 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=16 + local.get $1 + i32.const 4096 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=20 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=8 + local.get $1 + local.get $0 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + i32.const 0 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=12 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store + local.get $1 + i32.const 4128 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 144 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $assembly/mat4/str (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 256 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=8 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=16 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=24 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=32 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=40 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=48 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=56 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=64 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=72 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=80 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=88 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=96 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=104 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=112 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=120 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=128 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=136 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=144 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=152 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=160 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=168 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=176 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=184 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=192 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=200 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=208 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=216 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=224 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=232 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=240 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=248 + i32.const 4224 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=248 + local.get $1 + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + i32.const 0 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=252 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=240 + local.get $1 + i32.const 4096 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=244 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=232 + local.get $1 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + i32.const 0 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=236 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=224 + local.get $1 + i32.const 4096 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=228 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=216 + local.get $1 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + i32.const 0 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=220 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=208 + local.get $1 + i32.const 4096 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=212 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=200 + local.get $1 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + i32.const 0 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=204 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=192 + local.get $1 + i32.const 4096 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=196 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=184 + local.get $1 + local.get $0 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + i32.const 0 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=188 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=176 + local.get $1 + i32.const 4096 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=180 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=168 + local.get $1 + local.get $0 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + i32.const 0 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=172 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=160 + local.get $1 + i32.const 4096 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=164 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=152 + local.get $1 + local.get $0 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + i32.const 0 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=156 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=144 + local.get $1 + i32.const 4096 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=148 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=136 + local.get $1 + local.get $0 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + i32.const 0 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=140 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=128 + local.get $1 + i32.const 4096 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=132 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=120 + local.get $1 + local.get $0 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + i32.const 0 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=124 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=112 + local.get $1 + i32.const 4096 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=116 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=104 + local.get $1 + local.get $0 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + i32.const 0 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=108 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=96 + local.get $1 + i32.const 4096 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=100 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=88 + local.get $1 + local.get $0 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + i32.const 0 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=92 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=80 + local.get $1 + i32.const 4096 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=84 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=72 + local.get $1 + local.get $0 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + i32.const 0 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=76 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=64 + local.get $1 + i32.const 4096 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=68 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=56 + local.get $1 + local.get $0 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + i32.const 0 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=60 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=48 + local.get $1 + i32.const 4096 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=52 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=40 + local.get $1 + local.get $0 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + i32.const 0 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=44 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=32 + local.get $1 + i32.const 4096 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=36 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=24 + local.get $1 + local.get $0 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + i32.const 0 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=28 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=16 + local.get $1 + i32.const 4096 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=20 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=8 + local.get $1 + local.get $0 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + i32.const 0 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=12 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store + local.get $1 + i32.const 4128 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 256 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $assembly/quat/fromEuler (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/math/NativeMath.PI + f64.const 360 + f64.div + local.set $5 + local.get $1 + local.get $5 + f64.mul + local.set $1 + local.get $3 + local.get $5 + f64.mul + local.set $3 + local.get $2 + local.get $5 + f64.mul + local.set $2 + local.get $1 + call $~lib/math/NativeMath.sin + local.set $6 + local.get $1 + call $~lib/math/NativeMath.cos + local.set $7 + local.get $2 + call $~lib/math/NativeMath.sin + local.set $8 + local.get $2 + call $~lib/math/NativeMath.cos + local.set $9 + local.get $3 + call $~lib/math/NativeMath.sin + local.set $10 + local.get $3 + call $~lib/math/NativeMath.cos + local.set $11 + local.get $4 + i32.const 10416 + i32.eq + if + local.get $0 + i32.const 0 + local.get $6 + local.get $9 + f64.mul + local.get $11 + f64.mul + local.get $7 + local.get $8 + f64.mul + local.get $10 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $7 + local.get $8 + f64.mul + local.get $11 + f64.mul + local.get $6 + local.get $9 + f64.mul + local.get $10 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $7 + local.get $9 + f64.mul + local.get $10 + f64.mul + local.get $6 + local.get $8 + f64.mul + local.get $11 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $7 + local.get $9 + f64.mul + local.get $11 + f64.mul + local.get $6 + local.get $8 + f64.mul + local.get $10 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + else + local.get $4 + i32.const 10448 + i32.eq + if + local.get $0 + i32.const 0 + local.get $6 + local.get $9 + f64.mul + local.get $11 + f64.mul + local.get $7 + local.get $8 + f64.mul + local.get $10 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $7 + local.get $8 + f64.mul + local.get $11 + f64.mul + local.get $6 + local.get $9 + f64.mul + local.get $10 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $7 + local.get $9 + f64.mul + local.get $10 + f64.mul + local.get $6 + local.get $8 + f64.mul + local.get $11 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $7 + local.get $9 + f64.mul + local.get $11 + f64.mul + local.get $6 + local.get $8 + f64.mul + local.get $10 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + else + local.get $4 + i32.const 10480 + i32.eq + if + local.get $0 + i32.const 0 + local.get $6 + local.get $9 + f64.mul + local.get $11 + f64.mul + local.get $7 + local.get $8 + f64.mul + local.get $10 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $7 + local.get $8 + f64.mul + local.get $11 + f64.mul + local.get $6 + local.get $9 + f64.mul + local.get $10 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $7 + local.get $9 + f64.mul + local.get $10 + f64.mul + local.get $6 + local.get $8 + f64.mul + local.get $11 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $7 + local.get $9 + f64.mul + local.get $11 + f64.mul + local.get $6 + local.get $8 + f64.mul + local.get $10 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + else + local.get $4 + i32.const 10512 + i32.eq + if + local.get $0 + i32.const 0 + local.get $6 + local.get $9 + f64.mul + local.get $11 + f64.mul + local.get $7 + local.get $8 + f64.mul + local.get $10 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $7 + local.get $8 + f64.mul + local.get $11 + f64.mul + local.get $6 + local.get $9 + f64.mul + local.get $10 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $7 + local.get $9 + f64.mul + local.get $10 + f64.mul + local.get $6 + local.get $8 + f64.mul + local.get $11 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $7 + local.get $9 + f64.mul + local.get $11 + f64.mul + local.get $6 + local.get $8 + f64.mul + local.get $10 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + else + local.get $4 + i32.const 10544 + i32.eq + if + local.get $0 + i32.const 0 + local.get $6 + local.get $9 + f64.mul + local.get $11 + f64.mul + local.get $7 + local.get $8 + f64.mul + local.get $10 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $7 + local.get $8 + f64.mul + local.get $11 + f64.mul + local.get $6 + local.get $9 + f64.mul + local.get $10 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $7 + local.get $9 + f64.mul + local.get $10 + f64.mul + local.get $6 + local.get $8 + f64.mul + local.get $11 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $7 + local.get $9 + f64.mul + local.get $11 + f64.mul + local.get $6 + local.get $8 + f64.mul + local.get $10 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + else + local.get $4 + i32.const 112 + i32.eq + if + local.get $0 + i32.const 0 + local.get $6 + local.get $9 + f64.mul + local.get $11 + f64.mul + local.get $7 + local.get $8 + f64.mul + local.get $10 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $7 + local.get $8 + f64.mul + local.get $11 + f64.mul + local.get $6 + local.get $9 + f64.mul + local.get $10 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $7 + local.get $9 + f64.mul + local.get $10 + f64.mul + local.get $6 + local.get $8 + f64.mul + local.get $11 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $7 + local.get $9 + f64.mul + local.get $11 + f64.mul + local.get $6 + local.get $8 + f64.mul + local.get $10 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + else + i32.const 10576 + local.set $12 + global.get $~lib/memory/__stack_pointer + local.get $12 + i32.store + local.get $12 + local.get $4 + call $~lib/string/String.__concat + i32.const 10640 + i32.const 512 + i32.const 10 + call $~lib/builtins/abort + unreachable + end + end + end + end + end + end + local.get $0 + local.set $12 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $12 + ) + (func $assembly/quat/str (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 64 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=8 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=16 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=24 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=32 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=40 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=48 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=56 + i32.const 10704 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=56 + local.get $1 + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + i32.const 0 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=60 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=48 + local.get $1 + i32.const 4096 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=52 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=40 + local.get $1 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + i32.const 0 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=44 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=32 + local.get $1 + i32.const 4096 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=36 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=24 + local.get $1 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + i32.const 0 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=28 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=16 + local.get $1 + i32.const 4096 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=20 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=8 + local.get $1 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + i32.const 0 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=12 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store + local.get $1 + i32.const 4128 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 64 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $assembly/quat2/str (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 128 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=8 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=16 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=24 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=32 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=40 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=48 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=56 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=64 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=72 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=80 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=88 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=96 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=104 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=112 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=120 + i32.const 10736 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=120 + local.get $1 + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + i32.const 0 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=124 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=112 + local.get $1 + i32.const 4096 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=116 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=104 + local.get $1 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + i32.const 0 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=108 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=96 + local.get $1 + i32.const 4096 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=100 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=88 + local.get $1 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + i32.const 0 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=92 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=80 + local.get $1 + i32.const 4096 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=84 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=72 + local.get $1 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + i32.const 0 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=76 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=64 + local.get $1 + i32.const 4096 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=68 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=56 + local.get $1 + local.get $0 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + i32.const 0 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=60 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=48 + local.get $1 + i32.const 4096 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=52 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=40 + local.get $1 + local.get $0 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + i32.const 0 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=44 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=32 + local.get $1 + i32.const 4096 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=36 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=24 + local.get $1 + local.get $0 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + i32.const 0 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=28 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=16 + local.get $1 + i32.const 4096 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=20 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=8 + local.get $1 + local.get $0 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + i32.const 0 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=12 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store + local.get $1 + i32.const 4128 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 128 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $assembly/vec2/str (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 32 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=8 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=16 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=24 + i32.const 10768 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=24 + local.get $1 + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + i32.const 0 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=28 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=16 + local.get $1 + i32.const 4096 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=20 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=8 + local.get $1 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + i32.const 0 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=12 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store + local.get $1 + i32.const 4128 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 32 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $assembly/vec3/str (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 48 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=8 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=16 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=24 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=32 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=40 + i32.const 11040 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=40 + local.get $1 + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + i32.const 0 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=44 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=32 + local.get $1 + i32.const 4096 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=36 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=24 + local.get $1 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + i32.const 0 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=28 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=16 + local.get $1 + i32.const 4096 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=20 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=8 + local.get $1 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + i32.const 0 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=12 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store + local.get $1 + i32.const 4128 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 48 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $assembly/vec4/str (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 64 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=8 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=16 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=24 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=32 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=40 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=48 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=56 + i32.const 11072 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=56 + local.get $1 + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + i32.const 0 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=60 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=48 + local.get $1 + i32.const 4096 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=52 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=40 + local.get $1 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + i32.const 0 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=44 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=32 + local.get $1 + i32.const 4096 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=36 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=24 + local.get $1 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + i32.const 0 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=28 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=16 + local.get $1 + i32.const 4096 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=20 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=8 + local.get $1 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + i32.const 0 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=12 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store + local.get $1 + i32.const 4128 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 64 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $~lib/arraybuffer/ArrayBufferView#constructor (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + local.get $0 + i32.eqz + if + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.const 2 + call $~lib/rt/itcms/__new + local.tee $0 + i32.store + end + local.get $0 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#set:buffer + local.get $0 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#set:dataStart + local.get $0 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#set:byteLength + local.get $1 + i32.const 1073741820 + local.get $2 + i32.shr_u + i32.gt_u + if + i32.const 560 + i32.const 608 + i32.const 18 + i32.const 57 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.get $1 + local.get $2 + i32.shl + local.tee $1 + i32.const 0 + call $~lib/rt/itcms/__new + local.tee $3 + i32.store offset=4 + local.get $3 + i32.const 0 + local.get $1 + call $~lib/memory/memory.fill + local.get $0 + local.get $3 + call $~lib/arraybuffer/ArrayBufferView#set:buffer + local.get $0 + local.get $3 + call $~lib/arraybuffer/ArrayBufferView#set:dataStart + local.get $0 + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#set:byteLength + local.get $0 + local.set $4 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $4 + ) + (func $~lib/typedarray/Float64Array#constructor (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + local.get $0 + i32.eqz + if + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.const 4 + call $~lib/rt/itcms/__new + local.tee $0 + i32.store + end + global.get $~lib/memory/__stack_pointer + local.get $0 + local.get $1 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $0 + i32.store + local.get $0 + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $assembly/vec3/create (result i32) + (local $0 i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + local.tee $0 + i32.store + local.get $0 + i32.const 0 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $assembly/vec4/create (result i32) + (local $0 i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.const 4 + call $~lib/typedarray/Float64Array#constructor + local.tee $0 + i32.store + local.get $0 + i32.const 0 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $assembly/vec4/clone (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.const 4 + call $~lib/typedarray/Float64Array#constructor + local.tee $1 + i32.store + local.get $1 + i32.const 0 + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 1 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 2 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 3 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $assembly/vec4/fromValues (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) + (local $4 i32) + (local $5 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.const 4 + call $~lib/typedarray/Float64Array#constructor + local.tee $4 + i32.store + local.get $4 + i32.const 0 + local.get $0 + call $~lib/typedarray/Float64Array#__set + local.get $4 + i32.const 1 + local.get $1 + call $~lib/typedarray/Float64Array#__set + local.get $4 + i32.const 2 + local.get $2 + call $~lib/typedarray/Float64Array#__set + local.get $4 + i32.const 3 + local.get $3 + call $~lib/typedarray/Float64Array#__set + local.get $4 + local.set $5 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $5 + ) + (func $assembly/vec3/fromValues (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (local $3 i32) + (local $4 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + local.tee $3 + i32.store + local.get $3 + i32.const 0 + local.get $0 + call $~lib/typedarray/Float64Array#__set + local.get $3 + i32.const 1 + local.get $1 + call $~lib/typedarray/Float64Array#__set + local.get $3 + i32.const 2 + local.get $2 + call $~lib/typedarray/Float64Array#__set + local.get $3 + local.set $4 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $4 + ) + (func $assembly/quat/create (result i32) + (local $0 i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.const 4 + call $~lib/typedarray/Float64Array#constructor + local.tee $0 + i32.store + local.get $0 + i32.const 0 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $assembly/mat3/create (result i32) + (local $0 i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.const 9 + call $~lib/typedarray/Float64Array#constructor + local.tee $0 + i32.store + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 0 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $assembly/vec2/create (result i32) + (local $0 i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.const 2 + call $~lib/typedarray/Float64Array#constructor + local.tee $0 + i32.store + local.get $0 + i32.const 0 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $assembly/mat2/create (result i32) + (local $0 i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.const 4 + call $~lib/typedarray/Float64Array#constructor + local.tee $0 + i32.store + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 0 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $assembly/mat2/clone (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.const 4 + call $~lib/typedarray/Float64Array#constructor + local.tee $1 + i32.store + local.get $1 + i32.const 0 + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 1 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 2 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 3 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $assembly/mat2/fromValues (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) + (local $4 i32) + (local $5 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.const 4 + call $~lib/typedarray/Float64Array#constructor + local.tee $4 + i32.store + local.get $4 + i32.const 0 + local.get $0 + call $~lib/typedarray/Float64Array#__set + local.get $4 + i32.const 1 + local.get $1 + call $~lib/typedarray/Float64Array#__set + local.get $4 + i32.const 2 + local.get $2 + call $~lib/typedarray/Float64Array#__set + local.get $4 + i32.const 3 + local.get $3 + call $~lib/typedarray/Float64Array#__set + local.get $4 + local.set $5 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $5 + ) + (func $~lib/util/number/dtoa (param $0 f64) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + local.get $0 + f64.const 0 + f64.eq + if + i32.const 2528 + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + return + end + local.get $0 + local.get $0 + f64.sub + f64.const 0 + f64.eq + i32.eqz + if + local.get $0 + local.get $0 + f64.ne + if + i32.const 2560 + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + return + end + i32.const 2592 + i32.const 2640 + local.get $0 + f64.const 0 + f64.lt + select + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + return + end + i32.const 2672 + local.get $0 + call $~lib/util/number/dtoa_core + i32.const 1 + i32.shl + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.const 1 + call $~lib/rt/itcms/__new + local.tee $2 + i32.store + local.get $2 + i32.const 2672 + local.get $1 + call $~lib/memory/memory.copy + local.get $2 + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $~lib/string/String#concat (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + local.get $0 + call $~lib/string/String#get:length + i32.const 1 + i32.shl + local.set $2 + local.get $1 + call $~lib/string/String#get:length + i32.const 1 + i32.shl + local.set $3 + local.get $2 + local.get $3 + i32.add + local.set $4 + local.get $4 + i32.const 0 + i32.eq + if + i32.const 4064 + local.set $6 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $6 + return + end + global.get $~lib/memory/__stack_pointer + local.get $4 + i32.const 1 + call $~lib/rt/itcms/__new + local.tee $5 + i32.store + local.get $5 + local.get $0 + local.get $2 + call $~lib/memory/memory.copy + local.get $5 + local.get $2 + i32.add + local.get $1 + local.get $3 + call $~lib/memory/memory.copy + local.get $5 + local.set $6 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $6 + ) + (func $~lib/rt/__newArray (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + local.get $0 + local.get $1 + i32.shl + local.set $4 + global.get $~lib/memory/__stack_pointer + local.get $4 + i32.const 0 + local.get $3 + call $~lib/rt/__newBuffer + local.tee $5 + i32.store + i32.const 16 + local.get $2 + call $~lib/rt/itcms/__new + local.set $6 + local.get $6 + local.get $5 + i32.store + local.get $6 + local.get $5 + i32.const 0 + call $~lib/rt/itcms/__link + local.get $6 + local.get $5 + i32.store offset=4 + local.get $6 + local.get $4 + i32.store offset=8 + local.get $6 + local.get $0 + i32.store offset=12 + local.get $6 + local.set $7 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $7 + ) + (func $assembly/mat2/LDU (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + local.get $0 + i32.const 2 + local.get $3 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $3 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $2 + i32.const 0 + local.get $3 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $2 + i32.const 1 + local.get $3 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $2 + i32.const 3 + local.get $3 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 3 + i32.const 2 + i32.const 21 + i32.const 0 + call $~lib/rt/__newArray + local.tee $4 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $4 + i32.load offset=4 + local.tee $5 + i32.store offset=4 + local.get $4 + i32.const 0 + local.get $0 + call $~lib/array/Array<~lib/typedarray/Float64Array>#__uset + local.get $4 + i32.const 1 + local.get $1 + call $~lib/array/Array<~lib/typedarray/Float64Array>#__uset + local.get $4 + i32.const 2 + local.get $2 + call $~lib/array/Array<~lib/typedarray/Float64Array>#__uset + local.get $4 + local.set $6 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $6 + ) + (func $assembly/mat2d/create (result i32) + (local $0 i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.const 6 + call $~lib/typedarray/Float64Array#constructor + local.tee $0 + i32.store + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 0 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $assembly/mat2d/clone (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.const 6 + call $~lib/typedarray/Float64Array#constructor + local.tee $1 + i32.store + local.get $1 + i32.const 0 + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 1 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 2 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 3 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 4 + local.get $0 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 5 + local.get $0 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $assembly/mat2d/fromValues (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (result i32) + (local $6 i32) + (local $7 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.const 6 + call $~lib/typedarray/Float64Array#constructor + local.tee $6 + i32.store + local.get $6 + i32.const 0 + local.get $0 + call $~lib/typedarray/Float64Array#__set + local.get $6 + i32.const 1 + local.get $1 + call $~lib/typedarray/Float64Array#__set + local.get $6 + i32.const 2 + local.get $2 + call $~lib/typedarray/Float64Array#__set + local.get $6 + i32.const 3 + local.get $3 + call $~lib/typedarray/Float64Array#__set + local.get $6 + i32.const 4 + local.get $4 + call $~lib/typedarray/Float64Array#__set + local.get $6 + i32.const 5 + local.get $5 + call $~lib/typedarray/Float64Array#__set + local.get $6 + local.set $7 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $7 + ) + (func $assembly/mat3/clone (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.const 9 + call $~lib/typedarray/Float64Array#constructor + local.tee $1 + i32.store + local.get $1 + i32.const 0 + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 1 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 2 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 3 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 4 + local.get $0 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 5 + local.get $0 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 6 + local.get $0 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 7 + local.get $0 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 8 + local.get $0 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $assembly/mat3/fromValues (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (param $7 f64) (param $8 f64) (result i32) + (local $9 i32) + (local $10 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.const 9 + call $~lib/typedarray/Float64Array#constructor + local.tee $9 + i32.store + local.get $9 + i32.const 0 + local.get $0 + call $~lib/typedarray/Float64Array#__set + local.get $9 + i32.const 1 + local.get $1 + call $~lib/typedarray/Float64Array#__set + local.get $9 + i32.const 2 + local.get $2 + call $~lib/typedarray/Float64Array#__set + local.get $9 + i32.const 3 + local.get $3 + call $~lib/typedarray/Float64Array#__set + local.get $9 + i32.const 4 + local.get $4 + call $~lib/typedarray/Float64Array#__set + local.get $9 + i32.const 5 + local.get $5 + call $~lib/typedarray/Float64Array#__set + local.get $9 + i32.const 6 + local.get $6 + call $~lib/typedarray/Float64Array#__set + local.get $9 + i32.const 7 + local.get $7 + call $~lib/typedarray/Float64Array#__set + local.get $9 + i32.const 8 + local.get $8 + call $~lib/typedarray/Float64Array#__set + local.get $9 + local.set $10 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $10 + ) + (func $assembly/mat4/Fov#constructor (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + local.get $0 + i32.eqz + if + global.get $~lib/memory/__stack_pointer + i32.const 32 + i32.const 23 + call $~lib/rt/itcms/__new + local.tee $0 + i32.store + end + local.get $0 + f64.const 0 + call $assembly/mat4/Fov#set:upDegrees + local.get $0 + f64.const 0 + call $assembly/mat4/Fov#set:downDegrees + local.get $0 + f64.const 0 + call $assembly/mat4/Fov#set:leftDegrees + local.get $0 + f64.const 0 + call $assembly/mat4/Fov#set:rightDegrees + local.get $0 + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $assembly/mat4/create (result i32) + (local $0 i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.const 16 + call $~lib/typedarray/Float64Array#constructor + local.tee $0 + i32.store + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 0 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $assembly/mat4/clone (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.const 16 + call $~lib/typedarray/Float64Array#constructor + local.tee $1 + i32.store + local.get $1 + i32.const 0 + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 1 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 2 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 3 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 4 + local.get $0 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 5 + local.get $0 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 6 + local.get $0 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 7 + local.get $0 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 8 + local.get $0 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 9 + local.get $0 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 10 + local.get $0 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 11 + local.get $0 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 12 + local.get $0 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 13 + local.get $0 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 14 + local.get $0 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 15 + local.get $0 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $assembly/mat4/fromValues (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (param $7 f64) (param $8 f64) (param $9 f64) (param $10 f64) (param $11 f64) (param $12 f64) (param $13 f64) (param $14 f64) (param $15 f64) (result i32) + (local $16 i32) + (local $17 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.const 16 + call $~lib/typedarray/Float64Array#constructor + local.tee $16 + i32.store + local.get $16 + i32.const 0 + local.get $0 + call $~lib/typedarray/Float64Array#__set + local.get $16 + i32.const 1 + local.get $1 + call $~lib/typedarray/Float64Array#__set + local.get $16 + i32.const 2 + local.get $2 + call $~lib/typedarray/Float64Array#__set + local.get $16 + i32.const 3 + local.get $3 + call $~lib/typedarray/Float64Array#__set + local.get $16 + i32.const 4 + local.get $4 + call $~lib/typedarray/Float64Array#__set + local.get $16 + i32.const 5 + local.get $5 + call $~lib/typedarray/Float64Array#__set + local.get $16 + i32.const 6 + local.get $6 + call $~lib/typedarray/Float64Array#__set + local.get $16 + i32.const 7 + local.get $7 + call $~lib/typedarray/Float64Array#__set + local.get $16 + i32.const 8 + local.get $8 + call $~lib/typedarray/Float64Array#__set + local.get $16 + i32.const 9 + local.get $9 + call $~lib/typedarray/Float64Array#__set + local.get $16 + i32.const 10 + local.get $10 + call $~lib/typedarray/Float64Array#__set + local.get $16 + i32.const 11 + local.get $11 + call $~lib/typedarray/Float64Array#__set + local.get $16 + i32.const 12 + local.get $12 + call $~lib/typedarray/Float64Array#__set + local.get $16 + i32.const 13 + local.get $13 + call $~lib/typedarray/Float64Array#__set + local.get $16 + i32.const 14 + local.get $14 + call $~lib/typedarray/Float64Array#__set + local.get $16 + i32.const 15 + local.get $15 + call $~lib/typedarray/Float64Array#__set + local.get $16 + local.set $17 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $17 + ) + (func $assembly/mat4/fromQuat2 (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + local.tee $2 + i32.store + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.neg + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.neg + local.set $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.neg + local.set $5 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $3 + local.get $3 + f64.mul + local.get $4 + local.get $4 + f64.mul + f64.add + local.get $5 + local.get $5 + f64.mul + f64.add + local.get $6 + local.get $6 + f64.mul + f64.add + local.set $11 + local.get $11 + f64.const 0 + f64.gt + if + local.get $2 + i32.const 0 + local.get $7 + local.get $6 + f64.mul + local.get $10 + local.get $3 + f64.mul + f64.add + local.get $8 + local.get $5 + f64.mul + f64.add + local.get $9 + local.get $4 + f64.mul + f64.sub + f64.const 2 + f64.mul + local.get $11 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $2 + i32.const 1 + local.get $8 + local.get $6 + f64.mul + local.get $10 + local.get $4 + f64.mul + f64.add + local.get $9 + local.get $3 + f64.mul + f64.add + local.get $7 + local.get $5 + f64.mul + f64.sub + f64.const 2 + f64.mul + local.get $11 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $2 + i32.const 2 + local.get $9 + local.get $6 + f64.mul + local.get $10 + local.get $5 + f64.mul + f64.add + local.get $7 + local.get $4 + f64.mul + f64.add + local.get $8 + local.get $3 + f64.mul + f64.sub + f64.const 2 + f64.mul + local.get $11 + f64.div + call $~lib/typedarray/Float64Array#__set + else + local.get $2 + i32.const 0 + local.get $7 + local.get $6 + f64.mul + local.get $10 + local.get $3 + f64.mul + f64.add + local.get $8 + local.get $5 + f64.mul + f64.add + local.get $9 + local.get $4 + f64.mul + f64.sub + f64.const 2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $2 + i32.const 1 + local.get $8 + local.get $6 + f64.mul + local.get $10 + local.get $4 + f64.mul + f64.add + local.get $9 + local.get $3 + f64.mul + f64.add + local.get $7 + local.get $5 + f64.mul + f64.sub + f64.const 2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $2 + i32.const 2 + local.get $9 + local.get $6 + f64.mul + local.get $10 + local.get $5 + f64.mul + f64.add + local.get $7 + local.get $4 + f64.mul + f64.add + local.get $8 + local.get $3 + f64.mul + f64.sub + f64.const 2 + f64.mul + call $~lib/typedarray/Float64Array#__set + end + local.get $0 + local.get $1 + local.get $2 + call $assembly/mat4/fromRotationTranslation + drop + local.get $0 + local.set $12 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $12 + ) + (func $assembly/mat4/getRotation (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 f64) + (local $16 f64) + (local $17 f64) + (local $18 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + local.tee $2 + i32.store + local.get $2 + local.get $1 + call $assembly/mat4/getScaling + drop + i32.const 1 + f64.convert_i32_s + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.div + local.set $3 + i32.const 1 + f64.convert_i32_s + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.div + local.set $4 + i32.const 1 + f64.convert_i32_s + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.div + local.set $5 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + local.set $6 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + local.set $7 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.mul + local.set $8 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + local.set $9 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + local.set $10 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.mul + local.set $11 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + local.set $12 + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + local.set $13 + local.get $1 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.mul + local.set $14 + local.get $6 + local.get $10 + f64.add + local.get $14 + f64.add + local.set $15 + f64.const 0 + local.set $16 + local.get $15 + f64.const 0 + f64.gt + if + local.get $15 + f64.const 1 + f64.add + local.set $17 + local.get $17 + f64.sqrt + f64.const 2 + f64.mul + local.set $16 + local.get $0 + i32.const 3 + f64.const 0.25 + local.get $16 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 0 + local.get $11 + local.get $13 + f64.sub + local.get $16 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $12 + local.get $8 + f64.sub + local.get $16 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $7 + local.get $9 + f64.sub + local.get $16 + f64.div + call $~lib/typedarray/Float64Array#__set + else + local.get $6 + local.get $10 + f64.gt + if (result i32) + local.get $6 + local.get $14 + f64.gt + else + i32.const 0 + end + if + f64.const 1 + local.get $6 + f64.add + local.get $10 + f64.sub + local.get $14 + f64.sub + local.set $17 + local.get $17 + f64.sqrt + f64.const 2 + f64.mul + local.set $16 + local.get $0 + i32.const 3 + local.get $11 + local.get $13 + f64.sub + local.get $16 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 0 + f64.const 0.25 + local.get $16 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $7 + local.get $9 + f64.add + local.get $16 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $12 + local.get $8 + f64.add + local.get $16 + f64.div + call $~lib/typedarray/Float64Array#__set + else + local.get $10 + local.get $14 + f64.gt + if + f64.const 1 + local.get $10 + f64.add + local.get $6 + f64.sub + local.get $14 + f64.sub + local.set $17 + local.get $17 + f64.sqrt + f64.const 2 + f64.mul + local.set $16 + local.get $0 + i32.const 3 + local.get $12 + local.get $8 + f64.sub + local.get $16 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 0 + local.get $7 + local.get $9 + f64.add + local.get $16 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0.25 + local.get $16 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $11 + local.get $13 + f64.add + local.get $16 + f64.div + call $~lib/typedarray/Float64Array#__set + else + f64.const 1 + local.get $14 + f64.add + local.get $6 + f64.sub + local.get $10 + f64.sub + local.set $17 + local.get $17 + f64.sqrt + f64.const 2 + f64.mul + local.set $16 + local.get $0 + i32.const 3 + local.get $7 + local.get $9 + f64.sub + local.get $16 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 0 + local.get $12 + local.get $8 + f64.add + local.get $16 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $11 + local.get $13 + f64.add + local.get $16 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0.25 + local.get $16 + f64.mul + call $~lib/typedarray/Float64Array#__set + end + end + end + local.get $0 + local.set $18 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $18 + ) + (func $assembly/quat2/create (result i32) + (local $0 i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.const 8 + call $~lib/typedarray/Float64Array#constructor + local.tee $0 + i32.store + local.get $0 + i32.const 0 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $assembly/quat2/clone (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.const 8 + call $~lib/typedarray/Float64Array#constructor + local.tee $1 + i32.store + local.get $1 + i32.const 0 + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 1 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 2 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 3 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 4 + local.get $0 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 5 + local.get $0 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 6 + local.get $0 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 7 + local.get $0 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $assembly/quat2/fromValues (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (param $7 f64) (result i32) + (local $8 i32) + (local $9 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.const 8 + call $~lib/typedarray/Float64Array#constructor + local.tee $8 + i32.store + local.get $8 + i32.const 0 + local.get $0 + call $~lib/typedarray/Float64Array#__set + local.get $8 + i32.const 1 + local.get $1 + call $~lib/typedarray/Float64Array#__set + local.get $8 + i32.const 2 + local.get $2 + call $~lib/typedarray/Float64Array#__set + local.get $8 + i32.const 3 + local.get $3 + call $~lib/typedarray/Float64Array#__set + local.get $8 + i32.const 4 + local.get $4 + call $~lib/typedarray/Float64Array#__set + local.get $8 + i32.const 5 + local.get $5 + call $~lib/typedarray/Float64Array#__set + local.get $8 + i32.const 6 + local.get $6 + call $~lib/typedarray/Float64Array#__set + local.get $8 + i32.const 7 + local.get $7 + call $~lib/typedarray/Float64Array#__set + local.get $8 + local.set $9 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $9 + ) + (func $assembly/quat2/fromRotationTranslationValues (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (result i32) + (local $7 i32) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.const 8 + call $~lib/typedarray/Float64Array#constructor + local.tee $7 + i32.store + local.get $7 + i32.const 0 + local.get $0 + call $~lib/typedarray/Float64Array#__set + local.get $7 + i32.const 1 + local.get $1 + call $~lib/typedarray/Float64Array#__set + local.get $7 + i32.const 2 + local.get $2 + call $~lib/typedarray/Float64Array#__set + local.get $7 + i32.const 3 + local.get $3 + call $~lib/typedarray/Float64Array#__set + local.get $4 + f64.const 0.5 + f64.mul + local.set $8 + local.get $5 + f64.const 0.5 + f64.mul + local.set $9 + local.get $6 + f64.const 0.5 + f64.mul + local.set $10 + local.get $7 + i32.const 4 + local.get $8 + local.get $3 + f64.mul + local.get $9 + local.get $2 + f64.mul + f64.add + local.get $10 + local.get $1 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $7 + i32.const 5 + local.get $9 + local.get $3 + f64.mul + local.get $10 + local.get $0 + f64.mul + f64.add + local.get $8 + local.get $2 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $7 + i32.const 6 + local.get $10 + local.get $3 + f64.mul + local.get $8 + local.get $1 + f64.mul + f64.add + local.get $9 + local.get $0 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $7 + i32.const 7 + local.get $8 + f64.neg + local.get $0 + f64.mul + local.get $9 + local.get $1 + f64.mul + f64.sub + local.get $10 + local.get $2 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $7 + local.set $11 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $11 + ) + (func $assembly/quat2/fromMat4 (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + global.get $~lib/memory/__stack_pointer + call $assembly/quat/create + local.tee $2 + i32.store + local.get $2 + local.get $1 + call $assembly/mat4/getRotation + drop + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + local.tee $3 + i32.store offset=4 + local.get $3 + local.get $1 + call $assembly/mat4/getTranslation + drop + local.get $0 + local.get $2 + local.get $3 + call $assembly/quat2/fromRotationTranslation + drop + local.get $0 + local.set $4 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $4 + ) + (func $assembly/vec2/clone (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.const 2 + call $~lib/typedarray/Float64Array#constructor + local.tee $1 + i32.store + local.get $1 + i32.const 0 + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 1 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $assembly/vec2/fromValues (param $0 f64) (param $1 f64) (result i32) + (local $2 i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.const 2 + call $~lib/typedarray/Float64Array#constructor + local.tee $2 + i32.store + local.get $2 + i32.const 0 + local.get $0 + call $~lib/typedarray/Float64Array#__set + local.get $2 + i32.const 1 + local.get $1 + call $~lib/typedarray/Float64Array#__set + local.get $2 + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $assembly/vec3/clone (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + local.tee $1 + i32.store + local.get $1 + i32.const 0 + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 1 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 2 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $assembly/vec3/rotateX (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.const 3 + i32.const 24 + i32.const 10800 + call $~lib/rt/__newArray + local.tee $5 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.const 3 + i32.const 24 + i32.const 10832 + call $~lib/rt/__newArray + local.tee $6 + i32.store offset=4 + local.get $5 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/array/Array#__set + local.get $5 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/array/Array#__set + local.get $5 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/array/Array#__set + local.get $6 + i32.const 0 + local.get $5 + i32.const 0 + call $~lib/array/Array#__get + call $~lib/array/Array#__set + local.get $6 + i32.const 1 + local.get $5 + i32.const 1 + call $~lib/array/Array#__get + local.get $3 + call $~lib/math/NativeMath.cos + f64.mul + local.get $5 + i32.const 2 + call $~lib/array/Array#__get + local.get $3 + call $~lib/math/NativeMath.sin + f64.mul + f64.sub + call $~lib/array/Array#__set + local.get $6 + i32.const 2 + local.get $5 + i32.const 1 + call $~lib/array/Array#__get + local.get $3 + call $~lib/math/NativeMath.sin + f64.mul + local.get $5 + i32.const 2 + call $~lib/array/Array#__get + local.get $3 + call $~lib/math/NativeMath.cos + f64.mul + f64.add + call $~lib/array/Array#__set + local.get $0 + i32.const 0 + local.get $6 + i32.const 0 + call $~lib/array/Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $6 + i32.const 1 + call $~lib/array/Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $6 + i32.const 2 + call $~lib/array/Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + local.set $7 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $7 + ) + (func $assembly/vec3/rotateY (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.const 3 + i32.const 24 + i32.const 10912 + call $~lib/rt/__newArray + local.tee $5 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.const 3 + i32.const 24 + i32.const 10944 + call $~lib/rt/__newArray + local.tee $6 + i32.store offset=4 + local.get $5 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/array/Array#__set + local.get $5 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/array/Array#__set + local.get $5 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/array/Array#__set + local.get $6 + i32.const 0 + local.get $5 + i32.const 2 + call $~lib/array/Array#__get + local.get $3 + call $~lib/math/NativeMath.sin + f64.mul + local.get $5 + i32.const 0 + call $~lib/array/Array#__get + local.get $3 + call $~lib/math/NativeMath.cos + f64.mul + f64.add + call $~lib/array/Array#__set + local.get $6 + i32.const 1 + local.get $5 + i32.const 1 + call $~lib/array/Array#__get + call $~lib/array/Array#__set + local.get $6 + i32.const 2 + local.get $5 + i32.const 2 + call $~lib/array/Array#__get + local.get $3 + call $~lib/math/NativeMath.cos + f64.mul + local.get $5 + i32.const 0 + call $~lib/array/Array#__get + local.get $3 + call $~lib/math/NativeMath.sin + f64.mul + f64.sub + call $~lib/array/Array#__set + local.get $0 + i32.const 0 + local.get $6 + i32.const 0 + call $~lib/array/Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $6 + i32.const 1 + call $~lib/array/Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $6 + i32.const 2 + call $~lib/array/Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + local.set $7 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $7 + ) + (func $assembly/vec3/rotateZ (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.const 3 + i32.const 24 + i32.const 10976 + call $~lib/rt/__newArray + local.tee $5 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.const 3 + i32.const 24 + i32.const 11008 + call $~lib/rt/__newArray + local.tee $6 + i32.store offset=4 + local.get $5 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/array/Array#__set + local.get $5 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/array/Array#__set + local.get $5 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/array/Array#__set + local.get $6 + i32.const 0 + local.get $5 + i32.const 0 + call $~lib/array/Array#__get + local.get $3 + call $~lib/math/NativeMath.cos + f64.mul + local.get $5 + i32.const 1 + call $~lib/array/Array#__get + local.get $3 + call $~lib/math/NativeMath.sin + f64.mul + f64.sub + call $~lib/array/Array#__set + local.get $6 + i32.const 1 + local.get $5 + i32.const 0 + call $~lib/array/Array#__get + local.get $3 + call $~lib/math/NativeMath.sin + f64.mul + local.get $5 + i32.const 1 + call $~lib/array/Array#__get + local.get $3 + call $~lib/math/NativeMath.cos + f64.mul + f64.add + call $~lib/array/Array#__set + local.get $6 + i32.const 2 + local.get $5 + i32.const 2 + call $~lib/array/Array#__get + call $~lib/array/Array#__set + local.get $0 + i32.const 0 + local.get $6 + i32.const 0 + call $~lib/array/Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $6 + i32.const 1 + call $~lib/array/Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $6 + i32.const 2 + call $~lib/array/Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + local.set $7 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $7 + ) + (func $assembly/quat/fromEuler@varargs (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) + (local $5 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + i32.const 4 + i32.sub + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + global.get $~lib/memory/__stack_pointer + global.get $assembly/common/ANGLE_ORDER + local.tee $4 + i32.store + end + local.get $0 + local.get $1 + local.get $2 + local.get $3 + local.get $4 + call $assembly/quat/fromEuler + local.set $5 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $5 + ) + (func $export:assembly/mat2/clone (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/mat2/clone + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $export:assembly/mat2/copy (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat2/copy + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/mat2/identity (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/mat2/identity + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $export:assembly/mat2/set (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (result i32) + (local $5 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + local.get $1 + local.get $2 + local.get $3 + local.get $4 + call $assembly/mat2/set + local.set $5 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $5 + ) + (func $export:assembly/mat2/transpose (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat2/transpose + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/mat2/invert (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat2/invert + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/mat2/adjoint (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat2/adjoint + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/mat2/determinant (param $0 i32) (result f64) + (local $1 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/mat2/determinant + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $export:assembly/mat2/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/mat2/multiply + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/mat2/rotate (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + local.get $2 + call $assembly/mat2/rotate + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/mat2/scale (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/mat2/scale + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/mat2/fromRotation (param $0 i32) (param $1 f64) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + local.get $1 + call $assembly/mat2/fromRotation + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/mat2/fromScaling (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat2/fromScaling + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/mat2/str (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/mat2/str + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $export:assembly/mat2/frob (param $0 i32) (result f64) + (local $1 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/mat2/frob + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $export:assembly/mat2/LDU (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 i32) + global.get $~lib/memory/__stack_pointer + i32.const 16 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + global.get $~lib/memory/__stack_pointer + local.get $3 + i32.store offset=12 + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $assembly/mat2/LDU + local.set $4 + global.get $~lib/memory/__stack_pointer + i32.const 16 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $4 + ) + (func $export:assembly/mat2/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/mat2/add + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/mat2/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/mat2/subtract + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/mat2/exactEquals (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat2/exactEquals + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/mat2/equals (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat2/equals + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/mat2/multiplyScalar (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + local.get $2 + call $assembly/mat2/multiplyScalar + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/mat2/multiplyScalarAndAdd (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + (local $4 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $assembly/mat2/multiplyScalarAndAdd + local.set $4 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $4 + ) + (func $export:assembly/mat2d/clone (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/mat2d/clone + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $export:assembly/mat2d/copy (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat2d/copy + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/mat2d/identity (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/mat2d/identity + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $export:assembly/mat2d/set (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (result i32) + (local $7 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + local.get $1 + local.get $2 + local.get $3 + local.get $4 + local.get $5 + local.get $6 + call $assembly/mat2d/set + local.set $7 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $7 + ) + (func $export:assembly/mat2d/invert (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat2d/invert + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/mat2d/determinant (param $0 i32) (result f64) + (local $1 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/mat2d/determinant + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $export:assembly/mat2d/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/mat2d/multiply + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/mat2d/rotate (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + local.get $2 + call $assembly/mat2d/rotate + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/mat2d/scale (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/mat2d/scale + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/mat2d/translate (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/mat2d/translate + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/mat2d/fromRotation (param $0 i32) (param $1 f64) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + local.get $1 + call $assembly/mat2d/fromRotation + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/mat2d/fromScaling (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat2d/fromScaling + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/mat2d/fromTranslation (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat2d/fromTranslation + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/mat2d/str (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/mat2d/str + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $export:assembly/mat2d/frob (param $0 i32) (result f64) + (local $1 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/mat2d/frob + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $export:assembly/mat2d/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/mat2d/add + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/mat2d/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/mat2d/subtract + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/mat2d/multiplyScalar (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + local.get $2 + call $assembly/mat2d/multiplyScalar + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/mat2d/multiplyScalarAndAdd (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + (local $4 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $assembly/mat2d/multiplyScalarAndAdd + local.set $4 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $4 + ) + (func $export:assembly/mat2d/exactEquals (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat2d/exactEquals + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/mat2d/equals (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat2d/equals + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/mat3/fromMat4 (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat3/fromMat4 + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/mat3/clone (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/mat3/clone + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $export:assembly/mat3/copy (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat3/copy + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/mat3/set (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (param $7 f64) (param $8 f64) (param $9 f64) (result i32) + (local $10 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + local.get $1 + local.get $2 + local.get $3 + local.get $4 + local.get $5 + local.get $6 + local.get $7 + local.get $8 + local.get $9 + call $assembly/mat3/set + local.set $10 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $10 + ) + (func $export:assembly/mat3/identity (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/mat3/identity + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $export:assembly/mat3/transpose (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat3/transpose + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/mat3/invert (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat3/invert + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/mat3/adjoint (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat3/adjoint + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/mat3/determinant (param $0 i32) (result f64) + (local $1 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/mat3/determinant + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $export:assembly/mat3/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/mat3/multiply + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/mat3/translate (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/mat3/translate + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/mat3/rotate (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + local.get $2 + call $assembly/mat3/rotate + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/mat3/scale (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/mat3/scale + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/mat3/fromTranslation (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat3/fromTranslation + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/mat3/fromRotation (param $0 i32) (param $1 f64) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + local.get $1 + call $assembly/mat3/fromRotation + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/mat3/fromScaling (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat3/fromScaling + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/mat3/fromMat2d (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat3/fromMat2d + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/mat3/fromQuat (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat3/fromQuat + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/mat3/normalFromMat4 (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat3/normalFromMat4 + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/mat3/projection (param $0 i32) (param $1 f64) (param $2 f64) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + local.get $1 + local.get $2 + call $assembly/mat3/projection + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/mat3/str (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/mat3/str + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $export:assembly/mat3/frob (param $0 i32) (result f64) + (local $1 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/mat3/frob + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $export:assembly/mat3/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/mat3/add + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/mat3/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/mat3/subtract + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/mat3/multiplyScalar (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + local.get $2 + call $assembly/mat3/multiplyScalar + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/mat3/multiplyScalarAndAdd (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + (local $4 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $assembly/mat3/multiplyScalarAndAdd + local.set $4 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $4 + ) + (func $export:assembly/mat3/exactEquals (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat3/exactEquals + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/mat3/equals (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat3/equals + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/mat4/Fov#get:upDegrees (param $0 i32) (result f64) + (local $1 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/mat4/Fov#get:upDegrees + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $export:assembly/mat4/Fov#set:upDegrees (param $0 i32) (param $1 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + local.get $1 + call $assembly/mat4/Fov#set:upDegrees + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/Fov#get:downDegrees (param $0 i32) (result f64) + (local $1 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/mat4/Fov#get:downDegrees + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $export:assembly/mat4/Fov#set:downDegrees (param $0 i32) (param $1 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + local.get $1 + call $assembly/mat4/Fov#set:downDegrees + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/Fov#get:leftDegrees (param $0 i32) (result f64) + (local $1 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/mat4/Fov#get:leftDegrees + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $export:assembly/mat4/Fov#set:leftDegrees (param $0 i32) (param $1 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + local.get $1 + call $assembly/mat4/Fov#set:leftDegrees + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/Fov#get:rightDegrees (param $0 i32) (result f64) + (local $1 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/mat4/Fov#get:rightDegrees + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $export:assembly/mat4/Fov#set:rightDegrees (param $0 i32) (param $1 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + local.get $1 + call $assembly/mat4/Fov#set:rightDegrees + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/Fov#constructor (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/mat4/Fov#constructor + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $export:assembly/mat4/clone (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/mat4/clone + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $export:assembly/mat4/copy (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat4/copy + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/mat4/set (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (param $7 f64) (param $8 f64) (param $9 f64) (param $10 f64) (param $11 f64) (param $12 f64) (param $13 f64) (param $14 f64) (param $15 f64) (param $16 f64) (result i32) + (local $17 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + local.get $1 + local.get $2 + local.get $3 + local.get $4 + local.get $5 + local.get $6 + local.get $7 + local.get $8 + local.get $9 + local.get $10 + local.get $11 + local.get $12 + local.get $13 + local.get $14 + local.get $15 + local.get $16 + call $assembly/mat4/set + local.set $17 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $17 + ) + (func $export:assembly/mat4/identity (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/mat4/identity + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $export:assembly/mat4/transpose (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat4/transpose + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/mat4/invert (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat4/invert + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/mat4/adjoint (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat4/adjoint + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/mat4/determinant (param $0 i32) (result f64) + (local $1 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/mat4/determinant + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $export:assembly/mat4/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/mat4/multiply + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/mat4/translate (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/mat4/translate + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/mat4/scale (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/mat4/scale + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/mat4/rotate (param $0 i32) (param $1 i32) (param $2 f64) (param $3 i32) (result i32) + (local $4 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $3 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $assembly/mat4/rotate + local.set $4 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $4 + ) + (func $export:assembly/mat4/rotateX (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + local.get $2 + call $assembly/mat4/rotateX + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/mat4/rotateY (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + local.get $2 + call $assembly/mat4/rotateY + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/mat4/rotateZ (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + local.get $2 + call $assembly/mat4/rotateZ + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/mat4/fromTranslation (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat4/fromTranslation + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/mat4/fromScaling (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat4/fromScaling + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/mat4/fromRotation (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=4 + local.get $0 + local.get $1 + local.get $2 + call $assembly/mat4/fromRotation + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/mat4/fromXRotation (param $0 i32) (param $1 f64) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + local.get $1 + call $assembly/mat4/fromXRotation + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/mat4/fromYRotation (param $0 i32) (param $1 f64) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + local.get $1 + call $assembly/mat4/fromYRotation + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/mat4/fromZRotation (param $0 i32) (param $1 f64) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + local.get $1 + call $assembly/mat4/fromZRotation + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/mat4/fromRotationTranslation (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/mat4/fromRotationTranslation + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/mat4/fromQuat2 (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat4/fromQuat2 + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/mat4/getTranslation (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat4/getTranslation + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/mat4/getScaling (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat4/getScaling + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/mat4/getRotation (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat4/getRotation + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/mat4/decompose (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 i32) + global.get $~lib/memory/__stack_pointer + i32.const 16 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + global.get $~lib/memory/__stack_pointer + local.get $3 + i32.store offset=12 + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $assembly/mat4/decompose + local.set $4 + global.get $~lib/memory/__stack_pointer + i32.const 16 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $4 + ) + (func $export:assembly/mat4/fromRotationTranslationScale (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 i32) + global.get $~lib/memory/__stack_pointer + i32.const 16 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + global.get $~lib/memory/__stack_pointer + local.get $3 + i32.store offset=12 + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $assembly/mat4/fromRotationTranslationScale + local.set $4 + global.get $~lib/memory/__stack_pointer + i32.const 16 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $4 + ) + (func $export:assembly/mat4/fromRotationTranslationScaleOrigin (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) + (local $5 i32) + global.get $~lib/memory/__stack_pointer + i32.const 20 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + global.get $~lib/memory/__stack_pointer + local.get $3 + i32.store offset=12 + global.get $~lib/memory/__stack_pointer + local.get $4 + i32.store offset=16 + local.get $0 + local.get $1 + local.get $2 + local.get $3 + local.get $4 + call $assembly/mat4/fromRotationTranslationScaleOrigin + local.set $5 + global.get $~lib/memory/__stack_pointer + i32.const 20 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $5 + ) + (func $export:assembly/mat4/fromQuat (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat4/fromQuat + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/mat4/frustum (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (result i32) + (local $7 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + local.get $1 + local.get $2 + local.get $3 + local.get $4 + local.get $5 + local.get $6 + call $assembly/mat4/frustum + local.set $7 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $7 + ) + (func $export:assembly/mat4/perspectiveNO (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) + (local $5 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + local.get $1 + local.get $2 + local.get $3 + local.get $4 + call $assembly/mat4/perspectiveNO + local.set $5 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $5 + ) + (func $export:assembly/mat4/perspectiveZO (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) + (local $5 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + local.get $1 + local.get $2 + local.get $3 + local.get $4 + call $assembly/mat4/perspectiveZO + local.set $5 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $5 + ) + (func $export:assembly/mat4/perspectiveFromFieldOfView (param $0 i32) (param $1 i32) (param $2 f64) (param $3 f64) (result i32) + (local $4 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $assembly/mat4/perspectiveFromFieldOfView + local.set $4 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $4 + ) + (func $export:assembly/mat4/orthoNO (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (result i32) + (local $7 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + local.get $1 + local.get $2 + local.get $3 + local.get $4 + local.get $5 + local.get $6 + call $assembly/mat4/orthoNO + local.set $7 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $7 + ) + (func $export:assembly/mat4/orthoZO (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (result i32) + (local $7 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + local.get $1 + local.get $2 + local.get $3 + local.get $4 + local.get $5 + local.get $6 + call $assembly/mat4/orthoZO + local.set $7 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $7 + ) + (func $export:assembly/mat4/lookAt (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 i32) + global.get $~lib/memory/__stack_pointer + i32.const 16 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + global.get $~lib/memory/__stack_pointer + local.get $3 + i32.store offset=12 + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $assembly/mat4/lookAt + local.set $4 + global.get $~lib/memory/__stack_pointer + i32.const 16 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $4 + ) + (func $export:assembly/mat4/targetTo (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 i32) + global.get $~lib/memory/__stack_pointer + i32.const 16 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + global.get $~lib/memory/__stack_pointer + local.get $3 + i32.store offset=12 + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $assembly/mat4/targetTo + local.set $4 + global.get $~lib/memory/__stack_pointer + i32.const 16 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $4 + ) + (func $export:assembly/mat4/str (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/mat4/str + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $export:assembly/mat4/frob (param $0 i32) (result f64) + (local $1 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/mat4/frob + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $export:assembly/mat4/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/mat4/add + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/mat4/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/mat4/subtract + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/mat4/multiplyScalar (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + local.get $2 + call $assembly/mat4/multiplyScalar + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/mat4/multiplyScalarAndAdd (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + (local $4 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $assembly/mat4/multiplyScalarAndAdd + local.set $4 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $4 + ) + (func $export:assembly/mat4/exactEquals (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat4/exactEquals + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/mat4/equals (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat4/equals + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/quat/identity (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/quat/identity + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $export:assembly/quat/setAxisAngle (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + local.get $2 + call $assembly/quat/setAxisAngle + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/quat/getAxisAngle (param $0 i32) (param $1 i32) (result f64) + (local $2 f64) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/quat/getAxisAngle + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/quat/getAngle (param $0 i32) (param $1 i32) (result f64) + (local $2 f64) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/quat/getAngle + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/quat/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/quat/multiply + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/quat/rotateX (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + local.get $2 + call $assembly/quat/rotateX + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/quat/rotateY (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + local.get $2 + call $assembly/quat/rotateY + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/quat/rotateZ (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + local.get $2 + call $assembly/quat/rotateZ + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/quat/calculateW (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/quat/calculateW + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/quat/exp (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/quat/exp + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/quat/ln (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/quat/ln + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/quat/pow (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + local.get $2 + call $assembly/quat/pow + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/quat/slerp (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + (local $4 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $assembly/quat/slerp + local.set $4 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $4 + ) + (func $export:assembly/quat/random (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/quat/random + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $export:assembly/quat/invert (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/quat/invert + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/quat/conjugate (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/quat/conjugate + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/quat/fromMat3 (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/quat/fromMat3 + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/quat/fromEuler@varargs (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) + (local $5 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $4 + i32.store offset=4 + local.get $0 + local.get $1 + local.get $2 + local.get $3 + local.get $4 + call $assembly/quat/fromEuler@varargs + local.set $5 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $5 + ) + (func $export:assembly/quat/str (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/quat/str + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $export:assembly/quat/equals (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/quat/equals + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/quat2/clone (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/quat2/clone + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $export:assembly/quat2/fromRotationTranslation (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/quat2/fromRotationTranslation + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/quat2/fromTranslation (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/quat2/fromTranslation + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/quat2/fromRotation (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/quat2/fromRotation + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/quat2/fromMat4 (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/quat2/fromMat4 + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/quat2/copy (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/quat2/copy + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/quat2/identity (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/quat2/identity + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $export:assembly/quat2/set (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (param $7 f64) (param $8 f64) (result i32) + (local $9 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + local.get $1 + local.get $2 + local.get $3 + local.get $4 + local.get $5 + local.get $6 + local.get $7 + local.get $8 + call $assembly/quat2/set + local.set $9 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $9 + ) + (func $export:assembly/quat2/getDual (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/quat2/getDual + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/quat2/setDual (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/quat2/setDual + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/quat2/getTranslation (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/quat2/getTranslation + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/quat2/translate (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/quat2/translate + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/quat2/rotateX (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + local.get $2 + call $assembly/quat2/rotateX + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/quat2/rotateY (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + local.get $2 + call $assembly/quat2/rotateY + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/quat2/rotateZ (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + local.get $2 + call $assembly/quat2/rotateZ + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/quat2/rotateByQuatAppend (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/quat2/rotateByQuatAppend + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/quat2/rotateByQuatPrepend (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/quat2/rotateByQuatPrepend + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/quat2/rotateAroundAxis (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + (local $4 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $assembly/quat2/rotateAroundAxis + local.set $4 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $4 + ) + (func $export:assembly/quat2/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/quat2/add + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/quat2/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/quat2/multiply + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/quat2/scale (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + local.get $2 + call $assembly/quat2/scale + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/quat2/lerp (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + (local $4 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $assembly/quat2/lerp + local.set $4 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $4 + ) + (func $export:assembly/quat2/invert (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/quat2/invert + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/quat2/conjugate (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/quat2/conjugate + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/quat2/normalize (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/quat2/normalize + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/quat2/str (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/quat2/str + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $export:assembly/quat2/exactEquals (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/quat2/exactEquals + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/quat2/equals (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/quat2/equals + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/vec2/clone (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/vec2/clone + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $export:assembly/vec2/copy (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/vec2/copy + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/vec2/set (param $0 i32) (param $1 f64) (param $2 f64) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + local.get $1 + local.get $2 + call $assembly/vec2/set + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/vec2/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/vec2/add + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/vec2/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/vec2/subtract + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/vec2/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/vec2/multiply + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/vec2/divide (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/vec2/divide + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/vec2/ceil (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/vec2/ceil + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/vec2/floor (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/vec2/floor + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/vec2/min (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/vec2/min + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/vec2/max (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/vec2/max + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/vec2/round (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/vec2/round + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/vec2/scale (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + local.get $2 + call $assembly/vec2/scale + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/vec2/scaleAndAdd (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + (local $4 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $assembly/vec2/scaleAndAdd + local.set $4 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $4 + ) + (func $export:assembly/vec2/distance (param $0 i32) (param $1 i32) (result f64) + (local $2 f64) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/vec2/distance + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/vec2/squaredDistance (param $0 i32) (param $1 i32) (result f64) + (local $2 f64) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/vec2/squaredDistance + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/vec2/length (param $0 i32) (result f64) + (local $1 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/vec2/length + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $export:assembly/vec2/squaredLength (param $0 i32) (result f64) + (local $1 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/vec2/squaredLength + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $export:assembly/vec2/negate (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/vec2/negate + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/vec2/inverse (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/vec2/inverse + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/vec2/normalize (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/vec2/normalize + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/vec2/dot (param $0 i32) (param $1 i32) (result f64) + (local $2 f64) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/vec2/dot + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/vec2/cross (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/vec2/cross + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/vec2/lerp (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + (local $4 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $assembly/vec2/lerp + local.set $4 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $4 + ) + (func $export:assembly/vec2/random (param $0 i32) (param $1 f64) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + local.get $1 + call $assembly/vec2/random + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/vec2/transformMat2 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/vec2/transformMat2 + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/vec2/transformMat2d (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/vec2/transformMat2d + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/vec2/transformMat3 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/vec2/transformMat3 + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/vec2/transformMat4 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/vec2/transformMat4 + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/vec2/rotate (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + (local $4 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $assembly/vec2/rotate + local.set $4 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $4 + ) + (func $export:assembly/vec2/angle (param $0 i32) (param $1 i32) (result f64) + (local $2 f64) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/vec2/angle + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/vec2/zero (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/vec2/zero + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $export:assembly/vec2/str (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/vec2/str + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $export:assembly/vec2/exactEquals (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/vec2/exactEquals + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/vec2/equals (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/vec2/equals + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/vec3/clone (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/vec3/clone + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $export:assembly/vec3/length (param $0 i32) (result f64) + (local $1 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/vec3/length + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $export:assembly/vec3/copy (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/vec3/copy + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/vec3/set (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) + (local $4 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $assembly/vec3/set + local.set $4 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $4 + ) + (func $export:assembly/vec3/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/vec3/add + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/vec3/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/vec3/subtract + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/vec3/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/vec3/multiply + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/vec3/divide (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/vec3/divide + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/vec3/ceil (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/vec3/ceil + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/vec3/floor (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/vec3/floor + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/vec3/min (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/vec3/min + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/vec3/max (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/vec3/max + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/vec3/round (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/vec3/round + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/vec3/scale (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + local.get $2 + call $assembly/vec3/scale + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/vec3/scaleAndAdd (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + (local $4 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $assembly/vec3/scaleAndAdd + local.set $4 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $4 + ) + (func $export:assembly/vec3/distance (param $0 i32) (param $1 i32) (result f64) + (local $2 f64) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/vec3/distance + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/vec3/squaredDistance (param $0 i32) (param $1 i32) (result f64) + (local $2 f64) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/vec3/squaredDistance + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/vec3/squaredLength (param $0 i32) (result f64) + (local $1 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/vec3/squaredLength + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $export:assembly/vec3/negate (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/vec3/negate + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/vec3/inverse (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/vec3/inverse + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/vec3/normalize (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/vec3/normalize + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/vec3/dot (param $0 i32) (param $1 i32) (result f64) + (local $2 f64) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/vec3/dot + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/vec3/cross (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/vec3/cross + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/vec3/lerp (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + (local $4 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $assembly/vec3/lerp + local.set $4 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $4 + ) + (func $export:assembly/vec3/slerp (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + (local $4 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $assembly/vec3/slerp + local.set $4 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $4 + ) + (func $export:assembly/vec3/hermite (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 f64) (result i32) + (local $6 i32) + global.get $~lib/memory/__stack_pointer + i32.const 20 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + global.get $~lib/memory/__stack_pointer + local.get $3 + i32.store offset=12 + global.get $~lib/memory/__stack_pointer + local.get $4 + i32.store offset=16 + local.get $0 + local.get $1 + local.get $2 + local.get $3 + local.get $4 + local.get $5 + call $assembly/vec3/hermite + local.set $6 + global.get $~lib/memory/__stack_pointer + i32.const 20 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $6 + ) + (func $export:assembly/vec3/bezier (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 f64) (result i32) + (local $6 i32) + global.get $~lib/memory/__stack_pointer + i32.const 20 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + global.get $~lib/memory/__stack_pointer + local.get $3 + i32.store offset=12 + global.get $~lib/memory/__stack_pointer + local.get $4 + i32.store offset=16 + local.get $0 + local.get $1 + local.get $2 + local.get $3 + local.get $4 + local.get $5 + call $assembly/vec3/bezier + local.set $6 + global.get $~lib/memory/__stack_pointer + i32.const 20 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $6 + ) + (func $export:assembly/vec3/random (param $0 i32) (param $1 f64) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + local.get $1 + call $assembly/vec3/random + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/vec3/transformMat4 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/vec3/transformMat4 + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/vec3/transformMat3 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/vec3/transformMat3 + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/vec3/transformQuat (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/vec3/transformQuat + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/vec3/rotateX (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + (local $4 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $assembly/vec3/rotateX + local.set $4 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $4 + ) + (func $export:assembly/vec3/rotateY (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + (local $4 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $assembly/vec3/rotateY + local.set $4 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $4 + ) + (func $export:assembly/vec3/rotateZ (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + (local $4 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $assembly/vec3/rotateZ + local.set $4 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $4 + ) + (func $export:assembly/vec3/angle (param $0 i32) (param $1 i32) (result f64) + (local $2 f64) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/vec3/angle + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/vec3/zero (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/vec3/zero + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $export:assembly/vec3/str (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/vec3/str + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $export:assembly/vec3/exactEquals (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/vec3/exactEquals + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/vec3/equals (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/vec3/equals + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/vec4/clone (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/vec4/clone + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $export:assembly/vec4/copy (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/vec4/copy + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/vec4/set (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (result i32) + (local $5 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + local.get $1 + local.get $2 + local.get $3 + local.get $4 + call $assembly/vec4/set + local.set $5 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $5 + ) + (func $export:assembly/vec4/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/vec4/add + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/vec4/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/vec4/subtract + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/vec4/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/vec4/multiply + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/vec4/divide (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/vec4/divide + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/vec4/ceil (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/vec4/ceil + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/vec4/floor (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/vec4/floor + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/vec4/min (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/vec4/min + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/vec4/max (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/vec4/max + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/vec4/round (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/vec4/round + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/vec4/scale (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + local.get $2 + call $assembly/vec4/scale + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/vec4/scaleAndAdd (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + (local $4 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $assembly/vec4/scaleAndAdd + local.set $4 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $4 + ) + (func $export:assembly/vec4/distance (param $0 i32) (param $1 i32) (result f64) + (local $2 f64) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/vec4/distance + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/vec4/squaredDistance (param $0 i32) (param $1 i32) (result f64) + (local $2 f64) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/vec4/squaredDistance + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/vec4/length (param $0 i32) (result f64) + (local $1 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/vec4/length + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $export:assembly/vec4/squaredLength (param $0 i32) (result f64) + (local $1 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/vec4/squaredLength + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $export:assembly/vec4/negate (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/vec4/negate + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/vec4/inverse (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/vec4/inverse + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/vec4/normalize (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/vec4/normalize + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/vec4/dot (param $0 i32) (param $1 i32) (result f64) + (local $2 f64) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/vec4/dot + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/vec4/cross (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 i32) + global.get $~lib/memory/__stack_pointer + i32.const 16 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + global.get $~lib/memory/__stack_pointer + local.get $3 + i32.store offset=12 + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $assembly/vec4/cross + local.set $4 + global.get $~lib/memory/__stack_pointer + i32.const 16 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $4 + ) + (func $export:assembly/vec4/lerp (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + (local $4 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $assembly/vec4/lerp + local.set $4 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $4 + ) + (func $export:assembly/vec4/random (param $0 i32) (param $1 f64) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + local.get $1 + call $assembly/vec4/random + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/vec4/transformMat4 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/vec4/transformMat4 + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/vec4/transformQuat (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/vec4/transformQuat + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $export:assembly/vec4/zero (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/vec4/zero + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $export:assembly/vec4/str (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/vec4/str + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $export:assembly/vec4/exactEquals (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/vec4/exactEquals + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $export:assembly/vec4/equals (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/vec4/equals + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) +) From 2e2ac0b689839c4c167435bc5019a171812c7d5f Mon Sep 17 00:00:00 2001 From: Huguenin-Elie Steve Date: Sun, 28 Mar 2021 12:59:03 +0200 Subject: [PATCH 10/32] tsc build dist/index.dts from portable AS directly --- .size-snapshot.json | 6 +- assembly/common.ts | 2 +- assembly/types.d.ts | 94 - dist/gl-matrix-min.js | 4 +- dist/gl-matrix.js | 7736 +---------------------------------------- package.json | 2 +- rollup.config.js | 2 +- utils/build.js | 2 +- 8 files changed, 37 insertions(+), 7811 deletions(-) delete mode 100644 assembly/types.d.ts diff --git a/.size-snapshot.json b/.size-snapshot.json index ebf0fd37..96c4e346 100644 --- a/.size-snapshot.json +++ b/.size-snapshot.json @@ -5,8 +5,8 @@ "gzipped": 13273 }, "dist\\gl-matrix-min.js": { - "bundled": 199625, - "minified": 50914, - "gzipped": 12913 + "bundled": 2173, + "minified": 1927, + "gzipped": 1003 } } diff --git a/assembly/common.ts b/assembly/common.ts index b1457693..0da08fa6 100644 --- a/assembly/common.ts +++ b/assembly/common.ts @@ -7,7 +7,7 @@ import { MathUtil } from "./imports" // Configuration Constants export const EPSILON = 0.000001; -export type ARRAY_TYPE = Float64Array +export type ARRAY_TYPE = Float64Array; export let RANDOM = Math.random; export let ANGLE_ORDER = "zyx"; diff --git a/assembly/types.d.ts b/assembly/types.d.ts deleted file mode 100644 index 03e5ff22..00000000 --- a/assembly/types.d.ts +++ /dev/null @@ -1,94 +0,0 @@ -interface IndexedCollection extends Iterable { - readonly length: f64; - [key: f64]: f64; -} - -// prettier-ignore -declare type mat2 = - | [f64, f64, - f64, f64] - | IndexedCollection; - -// prettier-ignore -declare type mat2d = - | [f64, f64, - f64, f64, - f64, f64] - | IndexedCollection; - -// prettier-ignore -declare type mat3 = - | [f64, f64, f64, - f64, f64, f64, - f64, f64, f64] - | IndexedCollection; - -// prettier-ignore -declare type mat4 = - | [f64, f64, f64, f64, - f64, f64, f64, f64, - f64, f64, f64, f64, - f64, f64, f64, f64] - | IndexedCollection; - -declare type quat = [f64, f64, f64, f64] | IndexedCollection; - -// prettier-ignore -declare type quat2 = - | [f64, f64, f64, f64, - f64, f64, f64, f64] - | IndexedCollection; - -declare type vec2 = [f64, f64] | IndexedCollection; -declare type vec3 = [f64, f64, f64] | IndexedCollection; -declare type vec4 = [f64, f64, f64, f64] | IndexedCollection; - -// prettier-ignore -declare type ReadonlyMat2 = - | readonly [ - f64, f64, - f64, f64 - ] - | IndexedCollection; - -// prettier-ignore -declare type ReadonlyMat2d = - | readonly [ - f64, f64, - f64, f64, - f64, f64 - ] - | IndexedCollection; - -// prettier-ignore -declare type ReadonlyMat3 = - | readonly [ - f64, f64, f64, - f64, f64, f64, - f64, f64, f64 - ] - | IndexedCollection; - -// prettier-ignore -declare type ReadonlyMat4 = - | readonly [ - f64, f64, f64, f64, - f64, f64, f64, f64, - f64, f64, f64, f64, - f64, f64, f64, f64 - ] - | IndexedCollection; - -declare type ReadonlyQuat = - | readonly [f64, f64, f64, f64] - | IndexedCollection; - -declare type ReadonlyQuat2 = - | readonly [f64, f64, f64, f64, f64, f64, f64, f64] - | IndexedCollection; - -declare type ReadonlyVec2 = readonly [f64, f64] | IndexedCollection; -declare type ReadonlyVec3 = readonly [f64, f64, f64] | IndexedCollection; -declare type ReadonlyVec4 = - | readonly [f64, f64, f64, f64] - | IndexedCollection; diff --git a/dist/gl-matrix-min.js b/dist/gl-matrix-min.js index 6b15da4f..4f9dfedf 100644 --- a/dist/gl-matrix-min.js +++ b/dist/gl-matrix-min.js @@ -4,7 +4,7 @@ @author Colin MacKenzie IV @version 3.3.0 -Copyright (c) 2015-2020, Brandon Jones, Colin MacKenzie IV. +Copyright (c) 2015-2021, Brandon Jones, Colin MacKenzie IV. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -25,4 +25,4 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).glMatrix={})}(this,(function(t){"use strict";var n=1e-6,a="undefined"!=typeof Float32Array?Float32Array:Array,r=Math.random;var u=Math.PI/180;Math.hypot||(Math.hypot=function(){for(var t=0,n=arguments.length;n--;)t+=arguments[n]*arguments[n];return Math.sqrt(t)});var e=Object.freeze({__proto__:null,EPSILON:n,get ARRAY_TYPE(){return a},RANDOM:r,setMatrixArrayType:function(t){a=t},toRadian:function(t){return t*u},equals:function(t,a){return Math.abs(t-a)<=n*Math.max(1,Math.abs(t),Math.abs(a))}});function o(t,n,a){var r=n[0],u=n[1],e=n[2],o=n[3],i=a[0],h=a[1],c=a[2],s=a[3];return t[0]=r*i+e*h,t[1]=u*i+o*h,t[2]=r*c+e*s,t[3]=u*c+o*s,t}function i(t,n,a){return t[0]=n[0]-a[0],t[1]=n[1]-a[1],t[2]=n[2]-a[2],t[3]=n[3]-a[3],t}var h=o,c=i,s=Object.freeze({__proto__:null,create:function(){var t=new a(4);return a!=Float32Array&&(t[1]=0,t[2]=0),t[0]=1,t[3]=1,t},clone:function(t){var n=new a(4);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n},copy:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t},fromValues:function(t,n,r,u){var e=new a(4);return e[0]=t,e[1]=n,e[2]=r,e[3]=u,e},set:function(t,n,a,r,u){return t[0]=n,t[1]=a,t[2]=r,t[3]=u,t},transpose:function(t,n){if(t===n){var a=n[1];t[1]=n[2],t[2]=a}else t[0]=n[0],t[1]=n[2],t[2]=n[1],t[3]=n[3];return t},invert:function(t,n){var a=n[0],r=n[1],u=n[2],e=n[3],o=a*e-u*r;return o?(o=1/o,t[0]=e*o,t[1]=-r*o,t[2]=-u*o,t[3]=a*o,t):null},adjoint:function(t,n){var a=n[0];return t[0]=n[3],t[1]=-n[1],t[2]=-n[2],t[3]=a,t},determinant:function(t){return t[0]*t[3]-t[2]*t[1]},multiply:o,rotate:function(t,n,a){var r=n[0],u=n[1],e=n[2],o=n[3],i=Math.sin(a),h=Math.cos(a);return t[0]=r*h+e*i,t[1]=u*h+o*i,t[2]=r*-i+e*h,t[3]=u*-i+o*h,t},scale:function(t,n,a){var r=n[0],u=n[1],e=n[2],o=n[3],i=a[0],h=a[1];return t[0]=r*i,t[1]=u*i,t[2]=e*h,t[3]=o*h,t},fromRotation:function(t,n){var a=Math.sin(n),r=Math.cos(n);return t[0]=r,t[1]=a,t[2]=-a,t[3]=r,t},fromScaling:function(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=n[1],t},str:function(t){return"mat2("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},frob:function(t){return Math.hypot(t[0],t[1],t[2],t[3])},LDU:function(t,n,a,r){return t[2]=r[2]/r[0],a[0]=r[0],a[1]=r[1],a[3]=r[3]-t[2]*a[1],[t,n,a]},add:function(t,n,a){return t[0]=n[0]+a[0],t[1]=n[1]+a[1],t[2]=n[2]+a[2],t[3]=n[3]+a[3],t},subtract:i,exactEquals:function(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]},equals:function(t,a){var r=t[0],u=t[1],e=t[2],o=t[3],i=a[0],h=a[1],c=a[2],s=a[3];return Math.abs(r-i)<=n*Math.max(1,Math.abs(r),Math.abs(i))&&Math.abs(u-h)<=n*Math.max(1,Math.abs(u),Math.abs(h))&&Math.abs(e-c)<=n*Math.max(1,Math.abs(e),Math.abs(c))&&Math.abs(o-s)<=n*Math.max(1,Math.abs(o),Math.abs(s))},multiplyScalar:function(t,n,a){return t[0]=n[0]*a,t[1]=n[1]*a,t[2]=n[2]*a,t[3]=n[3]*a,t},multiplyScalarAndAdd:function(t,n,a,r){return t[0]=n[0]+a[0]*r,t[1]=n[1]+a[1]*r,t[2]=n[2]+a[2]*r,t[3]=n[3]+a[3]*r,t},mul:h,sub:c});function M(t,n,a){var r=n[0],u=n[1],e=n[2],o=n[3],i=n[4],h=n[5],c=a[0],s=a[1],M=a[2],f=a[3],l=a[4],v=a[5];return t[0]=r*c+e*s,t[1]=u*c+o*s,t[2]=r*M+e*f,t[3]=u*M+o*f,t[4]=r*l+e*v+i,t[5]=u*l+o*v+h,t}function f(t,n,a){return t[0]=n[0]-a[0],t[1]=n[1]-a[1],t[2]=n[2]-a[2],t[3]=n[3]-a[3],t[4]=n[4]-a[4],t[5]=n[5]-a[5],t}var l=M,v=f,b=Object.freeze({__proto__:null,create:function(){var t=new a(6);return a!=Float32Array&&(t[1]=0,t[2]=0,t[4]=0,t[5]=0),t[0]=1,t[3]=1,t},clone:function(t){var n=new a(6);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n},copy:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t},fromValues:function(t,n,r,u,e,o){var i=new a(6);return i[0]=t,i[1]=n,i[2]=r,i[3]=u,i[4]=e,i[5]=o,i},set:function(t,n,a,r,u,e,o){return t[0]=n,t[1]=a,t[2]=r,t[3]=u,t[4]=e,t[5]=o,t},invert:function(t,n){var a=n[0],r=n[1],u=n[2],e=n[3],o=n[4],i=n[5],h=a*e-r*u;return h?(h=1/h,t[0]=e*h,t[1]=-r*h,t[2]=-u*h,t[3]=a*h,t[4]=(u*i-e*o)*h,t[5]=(r*o-a*i)*h,t):null},determinant:function(t){return t[0]*t[3]-t[1]*t[2]},multiply:M,rotate:function(t,n,a){var r=n[0],u=n[1],e=n[2],o=n[3],i=n[4],h=n[5],c=Math.sin(a),s=Math.cos(a);return t[0]=r*s+e*c,t[1]=u*s+o*c,t[2]=r*-c+e*s,t[3]=u*-c+o*s,t[4]=i,t[5]=h,t},scale:function(t,n,a){var r=n[0],u=n[1],e=n[2],o=n[3],i=n[4],h=n[5],c=a[0],s=a[1];return t[0]=r*c,t[1]=u*c,t[2]=e*s,t[3]=o*s,t[4]=i,t[5]=h,t},translate:function(t,n,a){var r=n[0],u=n[1],e=n[2],o=n[3],i=n[4],h=n[5],c=a[0],s=a[1];return t[0]=r,t[1]=u,t[2]=e,t[3]=o,t[4]=r*c+e*s+i,t[5]=u*c+o*s+h,t},fromRotation:function(t,n){var a=Math.sin(n),r=Math.cos(n);return t[0]=r,t[1]=a,t[2]=-a,t[3]=r,t[4]=0,t[5]=0,t},fromScaling:function(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=n[1],t[4]=0,t[5]=0,t},fromTranslation:function(t,n){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=n[0],t[5]=n[1],t},str:function(t){return"mat2d("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+")"},frob:function(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],1)},add:function(t,n,a){return t[0]=n[0]+a[0],t[1]=n[1]+a[1],t[2]=n[2]+a[2],t[3]=n[3]+a[3],t[4]=n[4]+a[4],t[5]=n[5]+a[5],t},subtract:f,multiplyScalar:function(t,n,a){return t[0]=n[0]*a,t[1]=n[1]*a,t[2]=n[2]*a,t[3]=n[3]*a,t[4]=n[4]*a,t[5]=n[5]*a,t},multiplyScalarAndAdd:function(t,n,a,r){return t[0]=n[0]+a[0]*r,t[1]=n[1]+a[1]*r,t[2]=n[2]+a[2]*r,t[3]=n[3]+a[3]*r,t[4]=n[4]+a[4]*r,t[5]=n[5]+a[5]*r,t},exactEquals:function(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[5]===n[5]},equals:function(t,a){var r=t[0],u=t[1],e=t[2],o=t[3],i=t[4],h=t[5],c=a[0],s=a[1],M=a[2],f=a[3],l=a[4],v=a[5];return Math.abs(r-c)<=n*Math.max(1,Math.abs(r),Math.abs(c))&&Math.abs(u-s)<=n*Math.max(1,Math.abs(u),Math.abs(s))&&Math.abs(e-M)<=n*Math.max(1,Math.abs(e),Math.abs(M))&&Math.abs(o-f)<=n*Math.max(1,Math.abs(o),Math.abs(f))&&Math.abs(i-l)<=n*Math.max(1,Math.abs(i),Math.abs(l))&&Math.abs(h-v)<=n*Math.max(1,Math.abs(h),Math.abs(v))},mul:l,sub:v});function m(){var t=new a(9);return a!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function d(t,n,a){var r=n[0],u=n[1],e=n[2],o=n[3],i=n[4],h=n[5],c=n[6],s=n[7],M=n[8],f=a[0],l=a[1],v=a[2],b=a[3],m=a[4],d=a[5],x=a[6],p=a[7],y=a[8];return t[0]=f*r+l*o+v*c,t[1]=f*u+l*i+v*s,t[2]=f*e+l*h+v*M,t[3]=b*r+m*o+d*c,t[4]=b*u+m*i+d*s,t[5]=b*e+m*h+d*M,t[6]=x*r+p*o+y*c,t[7]=x*u+p*i+y*s,t[8]=x*e+p*h+y*M,t}function x(t,n,a){return t[0]=n[0]-a[0],t[1]=n[1]-a[1],t[2]=n[2]-a[2],t[3]=n[3]-a[3],t[4]=n[4]-a[4],t[5]=n[5]-a[5],t[6]=n[6]-a[6],t[7]=n[7]-a[7],t[8]=n[8]-a[8],t}var p=d,y=x,q=Object.freeze({__proto__:null,create:m,fromMat4:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[4],t[4]=n[5],t[5]=n[6],t[6]=n[8],t[7]=n[9],t[8]=n[10],t},clone:function(t){var n=new a(9);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n},copy:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t},fromValues:function(t,n,r,u,e,o,i,h,c){var s=new a(9);return s[0]=t,s[1]=n,s[2]=r,s[3]=u,s[4]=e,s[5]=o,s[6]=i,s[7]=h,s[8]=c,s},set:function(t,n,a,r,u,e,o,i,h,c){return t[0]=n,t[1]=a,t[2]=r,t[3]=u,t[4]=e,t[5]=o,t[6]=i,t[7]=h,t[8]=c,t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},transpose:function(t,n){if(t===n){var a=n[1],r=n[2],u=n[5];t[1]=n[3],t[2]=n[6],t[3]=a,t[5]=n[7],t[6]=r,t[7]=u}else t[0]=n[0],t[1]=n[3],t[2]=n[6],t[3]=n[1],t[4]=n[4],t[5]=n[7],t[6]=n[2],t[7]=n[5],t[8]=n[8];return t},invert:function(t,n){var a=n[0],r=n[1],u=n[2],e=n[3],o=n[4],i=n[5],h=n[6],c=n[7],s=n[8],M=s*o-i*c,f=-s*e+i*h,l=c*e-o*h,v=a*M+r*f+u*l;return v?(v=1/v,t[0]=M*v,t[1]=(-s*r+u*c)*v,t[2]=(i*r-u*o)*v,t[3]=f*v,t[4]=(s*a-u*h)*v,t[5]=(-i*a+u*e)*v,t[6]=l*v,t[7]=(-c*a+r*h)*v,t[8]=(o*a-r*e)*v,t):null},adjoint:function(t,n){var a=n[0],r=n[1],u=n[2],e=n[3],o=n[4],i=n[5],h=n[6],c=n[7],s=n[8];return t[0]=o*s-i*c,t[1]=u*c-r*s,t[2]=r*i-u*o,t[3]=i*h-e*s,t[4]=a*s-u*h,t[5]=u*e-a*i,t[6]=e*c-o*h,t[7]=r*h-a*c,t[8]=a*o-r*e,t},determinant:function(t){var n=t[0],a=t[1],r=t[2],u=t[3],e=t[4],o=t[5],i=t[6],h=t[7],c=t[8];return n*(c*e-o*h)+a*(-c*u+o*i)+r*(h*u-e*i)},multiply:d,translate:function(t,n,a){var r=n[0],u=n[1],e=n[2],o=n[3],i=n[4],h=n[5],c=n[6],s=n[7],M=n[8],f=a[0],l=a[1];return t[0]=r,t[1]=u,t[2]=e,t[3]=o,t[4]=i,t[5]=h,t[6]=f*r+l*o+c,t[7]=f*u+l*i+s,t[8]=f*e+l*h+M,t},rotate:function(t,n,a){var r=n[0],u=n[1],e=n[2],o=n[3],i=n[4],h=n[5],c=n[6],s=n[7],M=n[8],f=Math.sin(a),l=Math.cos(a);return t[0]=l*r+f*o,t[1]=l*u+f*i,t[2]=l*e+f*h,t[3]=l*o-f*r,t[4]=l*i-f*u,t[5]=l*h-f*e,t[6]=c,t[7]=s,t[8]=M,t},scale:function(t,n,a){var r=a[0],u=a[1];return t[0]=r*n[0],t[1]=r*n[1],t[2]=r*n[2],t[3]=u*n[3],t[4]=u*n[4],t[5]=u*n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t},fromTranslation:function(t,n){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=n[0],t[7]=n[1],t[8]=1,t},fromRotation:function(t,n){var a=Math.sin(n),r=Math.cos(n);return t[0]=r,t[1]=a,t[2]=0,t[3]=-a,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromScaling:function(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=0,t[4]=n[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromMat2d:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=0,t[3]=n[2],t[4]=n[3],t[5]=0,t[6]=n[4],t[7]=n[5],t[8]=1,t},fromQuat:function(t,n){var a=n[0],r=n[1],u=n[2],e=n[3],o=a+a,i=r+r,h=u+u,c=a*o,s=r*o,M=r*i,f=u*o,l=u*i,v=u*h,b=e*o,m=e*i,d=e*h;return t[0]=1-M-v,t[3]=s-d,t[6]=f+m,t[1]=s+d,t[4]=1-c-v,t[7]=l-b,t[2]=f-m,t[5]=l+b,t[8]=1-c-M,t},normalFromMat4:function(t,n){var a=n[0],r=n[1],u=n[2],e=n[3],o=n[4],i=n[5],h=n[6],c=n[7],s=n[8],M=n[9],f=n[10],l=n[11],v=n[12],b=n[13],m=n[14],d=n[15],x=a*i-r*o,p=a*h-u*o,y=a*c-e*o,q=r*h-u*i,g=r*c-e*i,_=u*c-e*h,A=s*b-M*v,w=s*m-f*v,z=s*d-l*v,R=M*m-f*b,j=M*d-l*b,P=f*d-l*m,T=x*P-p*j+y*R+q*z-g*w+_*A;return T?(T=1/T,t[0]=(i*P-h*j+c*R)*T,t[1]=(h*z-o*P-c*w)*T,t[2]=(o*j-i*z+c*A)*T,t[3]=(u*j-r*P-e*R)*T,t[4]=(a*P-u*z+e*w)*T,t[5]=(r*z-a*j-e*A)*T,t[6]=(b*_-m*g+d*q)*T,t[7]=(m*y-v*_-d*p)*T,t[8]=(v*g-b*y+d*x)*T,t):null},projection:function(t,n,a){return t[0]=2/n,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/a,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},str:function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},frob:function(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8])},add:function(t,n,a){return t[0]=n[0]+a[0],t[1]=n[1]+a[1],t[2]=n[2]+a[2],t[3]=n[3]+a[3],t[4]=n[4]+a[4],t[5]=n[5]+a[5],t[6]=n[6]+a[6],t[7]=n[7]+a[7],t[8]=n[8]+a[8],t},subtract:x,multiplyScalar:function(t,n,a){return t[0]=n[0]*a,t[1]=n[1]*a,t[2]=n[2]*a,t[3]=n[3]*a,t[4]=n[4]*a,t[5]=n[5]*a,t[6]=n[6]*a,t[7]=n[7]*a,t[8]=n[8]*a,t},multiplyScalarAndAdd:function(t,n,a,r){return t[0]=n[0]+a[0]*r,t[1]=n[1]+a[1]*r,t[2]=n[2]+a[2]*r,t[3]=n[3]+a[3]*r,t[4]=n[4]+a[4]*r,t[5]=n[5]+a[5]*r,t[6]=n[6]+a[6]*r,t[7]=n[7]+a[7]*r,t[8]=n[8]+a[8]*r,t},exactEquals:function(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[7]===n[7]&&t[8]===n[8]},equals:function(t,a){var r=t[0],u=t[1],e=t[2],o=t[3],i=t[4],h=t[5],c=t[6],s=t[7],M=t[8],f=a[0],l=a[1],v=a[2],b=a[3],m=a[4],d=a[5],x=a[6],p=a[7],y=a[8];return Math.abs(r-f)<=n*Math.max(1,Math.abs(r),Math.abs(f))&&Math.abs(u-l)<=n*Math.max(1,Math.abs(u),Math.abs(l))&&Math.abs(e-v)<=n*Math.max(1,Math.abs(e),Math.abs(v))&&Math.abs(o-b)<=n*Math.max(1,Math.abs(o),Math.abs(b))&&Math.abs(i-m)<=n*Math.max(1,Math.abs(i),Math.abs(m))&&Math.abs(h-d)<=n*Math.max(1,Math.abs(h),Math.abs(d))&&Math.abs(c-x)<=n*Math.max(1,Math.abs(c),Math.abs(x))&&Math.abs(s-p)<=n*Math.max(1,Math.abs(s),Math.abs(p))&&Math.abs(M-y)<=n*Math.max(1,Math.abs(M),Math.abs(y))},mul:p,sub:y});function g(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function _(t,n,a){var r=n[0],u=n[1],e=n[2],o=n[3],i=n[4],h=n[5],c=n[6],s=n[7],M=n[8],f=n[9],l=n[10],v=n[11],b=n[12],m=n[13],d=n[14],x=n[15],p=a[0],y=a[1],q=a[2],g=a[3];return t[0]=p*r+y*i+q*M+g*b,t[1]=p*u+y*h+q*f+g*m,t[2]=p*e+y*c+q*l+g*d,t[3]=p*o+y*s+q*v+g*x,p=a[4],y=a[5],q=a[6],g=a[7],t[4]=p*r+y*i+q*M+g*b,t[5]=p*u+y*h+q*f+g*m,t[6]=p*e+y*c+q*l+g*d,t[7]=p*o+y*s+q*v+g*x,p=a[8],y=a[9],q=a[10],g=a[11],t[8]=p*r+y*i+q*M+g*b,t[9]=p*u+y*h+q*f+g*m,t[10]=p*e+y*c+q*l+g*d,t[11]=p*o+y*s+q*v+g*x,p=a[12],y=a[13],q=a[14],g=a[15],t[12]=p*r+y*i+q*M+g*b,t[13]=p*u+y*h+q*f+g*m,t[14]=p*e+y*c+q*l+g*d,t[15]=p*o+y*s+q*v+g*x,t}function A(t,n,a){var r=n[0],u=n[1],e=n[2],o=n[3],i=r+r,h=u+u,c=e+e,s=r*i,M=r*h,f=r*c,l=u*h,v=u*c,b=e*c,m=o*i,d=o*h,x=o*c;return t[0]=1-(l+b),t[1]=M+x,t[2]=f-d,t[3]=0,t[4]=M-x,t[5]=1-(s+b),t[6]=v+m,t[7]=0,t[8]=f+d,t[9]=v-m,t[10]=1-(s+l),t[11]=0,t[12]=a[0],t[13]=a[1],t[14]=a[2],t[15]=1,t}function w(t,n){return t[0]=n[12],t[1]=n[13],t[2]=n[14],t}function z(t,n){var a=n[0],r=n[1],u=n[2],e=n[4],o=n[5],i=n[6],h=n[8],c=n[9],s=n[10];return t[0]=Math.hypot(a,r,u),t[1]=Math.hypot(e,o,i),t[2]=Math.hypot(h,c,s),t}function R(t,n){var r=new a(3);z(r,n);var u=1/r[0],e=1/r[1],o=1/r[2],i=n[0]*u,h=n[1]*e,c=n[2]*o,s=n[4]*u,M=n[5]*e,f=n[6]*o,l=n[8]*u,v=n[9]*e,b=n[10]*o,m=i+M+b,d=0;return m>0?(d=2*Math.sqrt(m+1),t[3]=.25*d,t[0]=(f-v)/d,t[1]=(l-c)/d,t[2]=(h-s)/d):i>M&&i>b?(d=2*Math.sqrt(1+i-M-b),t[3]=(f-v)/d,t[0]=.25*d,t[1]=(h+s)/d,t[2]=(l+c)/d):M>b?(d=2*Math.sqrt(1+M-i-b),t[3]=(l-c)/d,t[0]=(h+s)/d,t[1]=.25*d,t[2]=(f+v)/d):(d=2*Math.sqrt(1+b-i-M),t[3]=(h-s)/d,t[0]=(l+c)/d,t[1]=(f+v)/d,t[2]=.25*d),t}function j(t,n,a){return t[0]=n[0]-a[0],t[1]=n[1]-a[1],t[2]=n[2]-a[2],t[3]=n[3]-a[3],t[4]=n[4]-a[4],t[5]=n[5]-a[5],t[6]=n[6]-a[6],t[7]=n[7]-a[7],t[8]=n[8]-a[8],t[9]=n[9]-a[9],t[10]=n[10]-a[10],t[11]=n[11]-a[11],t[12]=n[12]-a[12],t[13]=n[13]-a[13],t[14]=n[14]-a[14],t[15]=n[15]-a[15],t}var P=_,T=j,S=Object.freeze({__proto__:null,create:function(){var t=new a(16);return a!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t},clone:function(t){var n=new a(16);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n[9]=t[9],n[10]=t[10],n[11]=t[11],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15],n},copy:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],t},fromValues:function(t,n,r,u,e,o,i,h,c,s,M,f,l,v,b,m){var d=new a(16);return d[0]=t,d[1]=n,d[2]=r,d[3]=u,d[4]=e,d[5]=o,d[6]=i,d[7]=h,d[8]=c,d[9]=s,d[10]=M,d[11]=f,d[12]=l,d[13]=v,d[14]=b,d[15]=m,d},set:function(t,n,a,r,u,e,o,i,h,c,s,M,f,l,v,b,m){return t[0]=n,t[1]=a,t[2]=r,t[3]=u,t[4]=e,t[5]=o,t[6]=i,t[7]=h,t[8]=c,t[9]=s,t[10]=M,t[11]=f,t[12]=l,t[13]=v,t[14]=b,t[15]=m,t},identity:g,transpose:function(t,n){if(t===n){var a=n[1],r=n[2],u=n[3],e=n[6],o=n[7],i=n[11];t[1]=n[4],t[2]=n[8],t[3]=n[12],t[4]=a,t[6]=n[9],t[7]=n[13],t[8]=r,t[9]=e,t[11]=n[14],t[12]=u,t[13]=o,t[14]=i}else t[0]=n[0],t[1]=n[4],t[2]=n[8],t[3]=n[12],t[4]=n[1],t[5]=n[5],t[6]=n[9],t[7]=n[13],t[8]=n[2],t[9]=n[6],t[10]=n[10],t[11]=n[14],t[12]=n[3],t[13]=n[7],t[14]=n[11],t[15]=n[15];return t},invert:function(t,n){var a=n[0],r=n[1],u=n[2],e=n[3],o=n[4],i=n[5],h=n[6],c=n[7],s=n[8],M=n[9],f=n[10],l=n[11],v=n[12],b=n[13],m=n[14],d=n[15],x=a*i-r*o,p=a*h-u*o,y=a*c-e*o,q=r*h-u*i,g=r*c-e*i,_=u*c-e*h,A=s*b-M*v,w=s*m-f*v,z=s*d-l*v,R=M*m-f*b,j=M*d-l*b,P=f*d-l*m,T=x*P-p*j+y*R+q*z-g*w+_*A;return T?(T=1/T,t[0]=(i*P-h*j+c*R)*T,t[1]=(u*j-r*P-e*R)*T,t[2]=(b*_-m*g+d*q)*T,t[3]=(f*g-M*_-l*q)*T,t[4]=(h*z-o*P-c*w)*T,t[5]=(a*P-u*z+e*w)*T,t[6]=(m*y-v*_-d*p)*T,t[7]=(s*_-f*y+l*p)*T,t[8]=(o*j-i*z+c*A)*T,t[9]=(r*z-a*j-e*A)*T,t[10]=(v*g-b*y+d*x)*T,t[11]=(M*y-s*g-l*x)*T,t[12]=(i*w-o*R-h*A)*T,t[13]=(a*R-r*w+u*A)*T,t[14]=(b*p-v*q-m*x)*T,t[15]=(s*q-M*p+f*x)*T,t):null},adjoint:function(t,n){var a=n[0],r=n[1],u=n[2],e=n[3],o=n[4],i=n[5],h=n[6],c=n[7],s=n[8],M=n[9],f=n[10],l=n[11],v=n[12],b=n[13],m=n[14],d=n[15],x=a*i-r*o,p=a*h-u*o,y=a*c-e*o,q=r*h-u*i,g=r*c-e*i,_=u*c-e*h,A=s*b-M*v,w=s*m-f*v,z=s*d-l*v,R=M*m-f*b,j=M*d-l*b,P=f*d-l*m;return t[0]=i*P-h*j+c*R,t[1]=u*j-r*P-e*R,t[2]=b*_-m*g+d*q,t[3]=f*g-M*_-l*q,t[4]=h*z-o*P-c*w,t[5]=a*P-u*z+e*w,t[6]=m*y-v*_-d*p,t[7]=s*_-f*y+l*p,t[8]=o*j-i*z+c*A,t[9]=r*z-a*j-e*A,t[10]=v*g-b*y+d*x,t[11]=M*y-s*g-l*x,t[12]=i*w-o*R-h*A,t[13]=a*R-r*w+u*A,t[14]=b*p-v*q-m*x,t[15]=s*q-M*p+f*x,t},determinant:function(t){var n=t[0],a=t[1],r=t[2],u=t[3],e=t[4],o=t[5],i=t[6],h=t[7],c=t[8],s=t[9],M=t[10],f=t[11],l=t[12],v=t[13],b=t[14],m=n*o-a*e,d=n*i-r*e,x=a*i-r*o,p=c*v-s*l,y=c*b-M*l,q=s*b-M*v;return h*(n*q-a*y+r*p)-u*(e*q-o*y+i*p)+t[15]*(c*x-s*d+M*m)-f*(l*x-v*d+b*m)},multiply:_,translate:function(t,n,a){var r,u,e,o,i,h,c,s,M,f,l,v,b=a[0],m=a[1],d=a[2];return n===t?(t[12]=n[0]*b+n[4]*m+n[8]*d+n[12],t[13]=n[1]*b+n[5]*m+n[9]*d+n[13],t[14]=n[2]*b+n[6]*m+n[10]*d+n[14],t[15]=n[3]*b+n[7]*m+n[11]*d+n[15]):(r=n[0],u=n[1],e=n[2],o=n[3],i=n[4],h=n[5],c=n[6],s=n[7],M=n[8],f=n[9],l=n[10],v=n[11],t[0]=r,t[1]=u,t[2]=e,t[3]=o,t[4]=i,t[5]=h,t[6]=c,t[7]=s,t[8]=M,t[9]=f,t[10]=l,t[11]=v,t[12]=r*b+i*m+M*d+n[12],t[13]=u*b+h*m+f*d+n[13],t[14]=e*b+c*m+l*d+n[14],t[15]=o*b+s*m+v*d+n[15]),t},scale:function(t,n,a){var r=a[0],u=a[1],e=a[2];return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=n[3]*r,t[4]=n[4]*u,t[5]=n[5]*u,t[6]=n[6]*u,t[7]=n[7]*u,t[8]=n[8]*e,t[9]=n[9]*e,t[10]=n[10]*e,t[11]=n[11]*e,t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],t},rotate:function(t,a,r,u){var e,o,i,h,c,s,M,f,l,v,b,m,d,x,p,y,q,g,_,A,w,z,R,j,P=u[0],T=u[1],S=u[2],E=Math.hypot(P,T,S);return E0?(r[0]=2*(h*i+M*u+c*o-s*e)/f,r[1]=2*(c*i+M*e+s*u-h*o)/f,r[2]=2*(s*i+M*o+h*e-c*u)/f):(r[0]=2*(h*i+M*u+c*o-s*e),r[1]=2*(c*i+M*e+s*u-h*o),r[2]=2*(s*i+M*o+h*e-c*u)),A(t,n,r),t},getTranslation:w,getScaling:z,getRotation:R,decompose:function(t,n,a,r){n[0]=r[12],n[1]=r[13],n[2]=r[14];var u=r[0],e=r[1],o=r[2],i=r[4],h=r[5],c=r[6],s=r[8],M=r[9],f=r[10];a[0]=Math.hypot(u,e,o),a[1]=Math.hypot(i,h,c),a[2]=Math.hypot(s,M,f);var l=1/a[0],v=1/a[1],b=1/a[2],m=u*l,d=e*v,x=o*b,p=i*l,y=h*v,q=c*b,g=s*l,_=M*v,A=f*b,w=m+y+A,z=0;return w>0?(z=2*Math.sqrt(w+1),t[3]=.25*z,t[0]=(q-_)/z,t[1]=(g-x)/z,t[2]=(d-p)/z):m>y&&m>A?(z=2*Math.sqrt(1+m-y-A),t[3]=(q-_)/z,t[0]=.25*z,t[1]=(d+p)/z,t[2]=(g+x)/z):y>A?(z=2*Math.sqrt(1+y-m-A),t[3]=(g-x)/z,t[0]=(d+p)/z,t[1]=.25*z,t[2]=(q+_)/z):(z=2*Math.sqrt(1+A-m-y),t[3]=(d-p)/z,t[0]=(g+x)/z,t[1]=(q+_)/z,t[2]=.25*z),t},fromRotationTranslationScale:function(t,n,a,r){var u=n[0],e=n[1],o=n[2],i=n[3],h=u+u,c=e+e,s=o+o,M=u*h,f=u*c,l=u*s,v=e*c,b=e*s,m=o*s,d=i*h,x=i*c,p=i*s,y=r[0],q=r[1],g=r[2];return t[0]=(1-(v+m))*y,t[1]=(f+p)*y,t[2]=(l-x)*y,t[3]=0,t[4]=(f-p)*q,t[5]=(1-(M+m))*q,t[6]=(b+d)*q,t[7]=0,t[8]=(l+x)*g,t[9]=(b-d)*g,t[10]=(1-(M+v))*g,t[11]=0,t[12]=a[0],t[13]=a[1],t[14]=a[2],t[15]=1,t},fromRotationTranslationScaleOrigin:function(t,n,a,r,u){var e=n[0],o=n[1],i=n[2],h=n[3],c=e+e,s=o+o,M=i+i,f=e*c,l=e*s,v=e*M,b=o*s,m=o*M,d=i*M,x=h*c,p=h*s,y=h*M,q=r[0],g=r[1],_=r[2],A=u[0],w=u[1],z=u[2],R=(1-(b+d))*q,j=(l+y)*q,P=(v-p)*q,T=(l-y)*g,S=(1-(f+d))*g,E=(m+x)*g,O=(v+p)*_,D=(m-x)*_,F=(1-(f+b))*_;return t[0]=R,t[1]=j,t[2]=P,t[3]=0,t[4]=T,t[5]=S,t[6]=E,t[7]=0,t[8]=O,t[9]=D,t[10]=F,t[11]=0,t[12]=a[0]+A-(R*A+T*w+O*z),t[13]=a[1]+w-(j*A+S*w+D*z),t[14]=a[2]+z-(P*A+E*w+F*z),t[15]=1,t},fromQuat:function(t,n){var a=n[0],r=n[1],u=n[2],e=n[3],o=a+a,i=r+r,h=u+u,c=a*o,s=r*o,M=r*i,f=u*o,l=u*i,v=u*h,b=e*o,m=e*i,d=e*h;return t[0]=1-M-v,t[1]=s+d,t[2]=f-m,t[3]=0,t[4]=s-d,t[5]=1-c-v,t[6]=l+b,t[7]=0,t[8]=f+m,t[9]=l-b,t[10]=1-c-M,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},frustum:function(t,n,a,r,u,e,o){var i=1/(a-n),h=1/(u-r),c=1/(e-o);return t[0]=2*e*i,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*e*h,t[6]=0,t[7]=0,t[8]=(a+n)*i,t[9]=(u+r)*h,t[10]=(o+e)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*e*2*c,t[15]=0,t},perspective:function(t,n,a,r,u){var e,o=1/Math.tan(n/2);return t[0]=o/a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=u&&u!==1/0?(e=1/(r-u),t[10]=(u+r)*e,t[14]=2*u*r*e):(t[10]=-1,t[14]=-2*r),t},perspectiveFromFieldOfView:function(t,n,a,r){var u=Math.tan(n.upDegrees*Math.PI/180),e=Math.tan(n.downDegrees*Math.PI/180),o=Math.tan(n.leftDegrees*Math.PI/180),i=Math.tan(n.rightDegrees*Math.PI/180),h=2/(o+i),c=2/(u+e);return t[0]=h,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=c,t[6]=0,t[7]=0,t[8]=-(o-i)*h*.5,t[9]=(u-e)*c*.5,t[10]=r/(a-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*a/(a-r),t[15]=0,t},ortho:function(t,n,a,r,u,e,o){var i=1/(n-a),h=1/(r-u),c=1/(e-o);return t[0]=-2*i,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*h,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(n+a)*i,t[13]=(u+r)*h,t[14]=(o+e)*c,t[15]=1,t},lookAt:function(t,a,r,u){var e,o,i,h,c,s,M,f,l,v,b=a[0],m=a[1],d=a[2],x=u[0],p=u[1],y=u[2],q=r[0],_=r[1],A=r[2];return Math.abs(b-q)0&&(s*=l=1/Math.sqrt(l),M*=l,f*=l);var v=h*f-c*M,b=c*s-i*f,m=i*M-h*s;return(l=v*v+b*b+m*m)>0&&(v*=l=1/Math.sqrt(l),b*=l,m*=l),t[0]=v,t[1]=b,t[2]=m,t[3]=0,t[4]=M*m-f*b,t[5]=f*v-s*m,t[6]=s*b-M*v,t[7]=0,t[8]=s,t[9]=M,t[10]=f,t[11]=0,t[12]=u,t[13]=e,t[14]=o,t[15]=1,t},str:function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},frob:function(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},add:function(t,n,a){return t[0]=n[0]+a[0],t[1]=n[1]+a[1],t[2]=n[2]+a[2],t[3]=n[3]+a[3],t[4]=n[4]+a[4],t[5]=n[5]+a[5],t[6]=n[6]+a[6],t[7]=n[7]+a[7],t[8]=n[8]+a[8],t[9]=n[9]+a[9],t[10]=n[10]+a[10],t[11]=n[11]+a[11],t[12]=n[12]+a[12],t[13]=n[13]+a[13],t[14]=n[14]+a[14],t[15]=n[15]+a[15],t},subtract:j,multiplyScalar:function(t,n,a){return t[0]=n[0]*a,t[1]=n[1]*a,t[2]=n[2]*a,t[3]=n[3]*a,t[4]=n[4]*a,t[5]=n[5]*a,t[6]=n[6]*a,t[7]=n[7]*a,t[8]=n[8]*a,t[9]=n[9]*a,t[10]=n[10]*a,t[11]=n[11]*a,t[12]=n[12]*a,t[13]=n[13]*a,t[14]=n[14]*a,t[15]=n[15]*a,t},multiplyScalarAndAdd:function(t,n,a,r){return t[0]=n[0]+a[0]*r,t[1]=n[1]+a[1]*r,t[2]=n[2]+a[2]*r,t[3]=n[3]+a[3]*r,t[4]=n[4]+a[4]*r,t[5]=n[5]+a[5]*r,t[6]=n[6]+a[6]*r,t[7]=n[7]+a[7]*r,t[8]=n[8]+a[8]*r,t[9]=n[9]+a[9]*r,t[10]=n[10]+a[10]*r,t[11]=n[11]+a[11]*r,t[12]=n[12]+a[12]*r,t[13]=n[13]+a[13]*r,t[14]=n[14]+a[14]*r,t[15]=n[15]+a[15]*r,t},exactEquals:function(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[7]===n[7]&&t[8]===n[8]&&t[9]===n[9]&&t[10]===n[10]&&t[11]===n[11]&&t[12]===n[12]&&t[13]===n[13]&&t[14]===n[14]&&t[15]===n[15]},equals:function(t,a){var r=t[0],u=t[1],e=t[2],o=t[3],i=t[4],h=t[5],c=t[6],s=t[7],M=t[8],f=t[9],l=t[10],v=t[11],b=t[12],m=t[13],d=t[14],x=t[15],p=a[0],y=a[1],q=a[2],g=a[3],_=a[4],A=a[5],w=a[6],z=a[7],R=a[8],j=a[9],P=a[10],T=a[11],S=a[12],E=a[13],O=a[14],D=a[15];return Math.abs(r-p)<=n*Math.max(1,Math.abs(r),Math.abs(p))&&Math.abs(u-y)<=n*Math.max(1,Math.abs(u),Math.abs(y))&&Math.abs(e-q)<=n*Math.max(1,Math.abs(e),Math.abs(q))&&Math.abs(o-g)<=n*Math.max(1,Math.abs(o),Math.abs(g))&&Math.abs(i-_)<=n*Math.max(1,Math.abs(i),Math.abs(_))&&Math.abs(h-A)<=n*Math.max(1,Math.abs(h),Math.abs(A))&&Math.abs(c-w)<=n*Math.max(1,Math.abs(c),Math.abs(w))&&Math.abs(s-z)<=n*Math.max(1,Math.abs(s),Math.abs(z))&&Math.abs(M-R)<=n*Math.max(1,Math.abs(M),Math.abs(R))&&Math.abs(f-j)<=n*Math.max(1,Math.abs(f),Math.abs(j))&&Math.abs(l-P)<=n*Math.max(1,Math.abs(l),Math.abs(P))&&Math.abs(v-T)<=n*Math.max(1,Math.abs(v),Math.abs(T))&&Math.abs(b-S)<=n*Math.max(1,Math.abs(b),Math.abs(S))&&Math.abs(m-E)<=n*Math.max(1,Math.abs(m),Math.abs(E))&&Math.abs(d-O)<=n*Math.max(1,Math.abs(d),Math.abs(O))&&Math.abs(x-D)<=n*Math.max(1,Math.abs(x),Math.abs(D))},mul:P,sub:T});function E(){var t=new a(3);return a!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function O(t){var n=t[0],a=t[1],r=t[2];return Math.hypot(n,a,r)}function D(t,n,r){var u=new a(3);return u[0]=t,u[1]=n,u[2]=r,u}function F(t,n,a){return t[0]=n[0]-a[0],t[1]=n[1]-a[1],t[2]=n[2]-a[2],t}function I(t,n,a){return t[0]=n[0]*a[0],t[1]=n[1]*a[1],t[2]=n[2]*a[2],t}function L(t,n,a){return t[0]=n[0]/a[0],t[1]=n[1]/a[1],t[2]=n[2]/a[2],t}function V(t,n){var a=n[0]-t[0],r=n[1]-t[1],u=n[2]-t[2];return Math.hypot(a,r,u)}function Q(t,n){var a=n[0]-t[0],r=n[1]-t[1],u=n[2]-t[2];return a*a+r*r+u*u}function Y(t){var n=t[0],a=t[1],r=t[2];return n*n+a*a+r*r}function k(t,n){var a=n[0],r=n[1],u=n[2],e=a*a+r*r+u*u;return e>0&&(e=1/Math.sqrt(e)),t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t}function X(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function Z(t,n,a){var r=n[0],u=n[1],e=n[2],o=a[0],i=a[1],h=a[2];return t[0]=u*h-e*i,t[1]=e*o-r*h,t[2]=r*i-u*o,t}var B,N=F,C=I,U=L,W=V,G=Q,H=O,J=Y,K=(B=E(),function(t,n,a,r,u,e){var o,i;for(n||(n=3),a||(a=0),i=r?Math.min(r*n+a,t.length):t.length,o=a;o0&&(o=1/Math.sqrt(o)),t[0]=a*o,t[1]=r*o,t[2]=u*o,t[3]=e*o,t}function bt(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]+t[3]*n[3]}function mt(t,n,a,r){var u=n[0],e=n[1],o=n[2],i=n[3];return t[0]=u+r*(a[0]-u),t[1]=e+r*(a[1]-e),t[2]=o+r*(a[2]-o),t[3]=i+r*(a[3]-i),t}function dt(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]}function xt(t,a){var r=t[0],u=t[1],e=t[2],o=t[3],i=a[0],h=a[1],c=a[2],s=a[3];return Math.abs(r-i)<=n*Math.max(1,Math.abs(r),Math.abs(i))&&Math.abs(u-h)<=n*Math.max(1,Math.abs(u),Math.abs(h))&&Math.abs(e-c)<=n*Math.max(1,Math.abs(e),Math.abs(c))&&Math.abs(o-s)<=n*Math.max(1,Math.abs(o),Math.abs(s))}var pt=ot,yt=it,qt=ht,gt=st,_t=Mt,At=ft,wt=lt,zt=function(){var t=tt();return function(n,a,r,u,e,o){var i,h;for(a||(a=4),r||(r=0),h=u?Math.min(u*a+r,n.length):n.length,i=r;i=1);do{h=(e=2*r()-1)*e+(o=2*r()-1)*o}while(h>=1);var c=Math.sqrt((1-i)/h);return t[0]=n*a,t[1]=n*u,t[2]=n*e*c,t[3]=n*o*c,t},transformMat4:function(t,n,a){var r=n[0],u=n[1],e=n[2],o=n[3];return t[0]=a[0]*r+a[4]*u+a[8]*e+a[12]*o,t[1]=a[1]*r+a[5]*u+a[9]*e+a[13]*o,t[2]=a[2]*r+a[6]*u+a[10]*e+a[14]*o,t[3]=a[3]*r+a[7]*u+a[11]*e+a[15]*o,t},transformQuat:function(t,n,a){var r=n[0],u=n[1],e=n[2],o=a[0],i=a[1],h=a[2],c=a[3],s=c*r+i*e-h*u,M=c*u+h*r-o*e,f=c*e+o*u-i*r,l=-o*r-i*u-h*e;return t[0]=s*c+l*-o+M*-h-f*-i,t[1]=M*c+l*-i+f*-o-s*-h,t[2]=f*c+l*-h+s*-i-M*-o,t[3]=n[3],t},zero:function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t},str:function(t){return"vec4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},exactEquals:dt,equals:xt,sub:pt,mul:yt,div:qt,dist:gt,sqrDist:_t,len:At,sqrLen:wt,forEach:zt});function jt(){var t=new a(4);return a!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function Pt(t,n,a){a*=.5;var r=Math.sin(a);return t[0]=r*n[0],t[1]=r*n[1],t[2]=r*n[2],t[3]=Math.cos(a),t}function Tt(t,n,a){var r=n[0],u=n[1],e=n[2],o=n[3],i=a[0],h=a[1],c=a[2],s=a[3];return t[0]=r*s+o*i+u*c-e*h,t[1]=u*s+o*h+e*i-r*c,t[2]=e*s+o*c+r*h-u*i,t[3]=o*s-r*i-u*h-e*c,t}function St(t,n,a){a*=.5;var r=n[0],u=n[1],e=n[2],o=n[3],i=Math.sin(a),h=Math.cos(a);return t[0]=r*h+o*i,t[1]=u*h+e*i,t[2]=e*h-u*i,t[3]=o*h-r*i,t}function Et(t,n,a){a*=.5;var r=n[0],u=n[1],e=n[2],o=n[3],i=Math.sin(a),h=Math.cos(a);return t[0]=r*h-e*i,t[1]=u*h+o*i,t[2]=e*h+r*i,t[3]=o*h-u*i,t}function Ot(t,n,a){a*=.5;var r=n[0],u=n[1],e=n[2],o=n[3],i=Math.sin(a),h=Math.cos(a);return t[0]=r*h+u*i,t[1]=u*h-r*i,t[2]=e*h+o*i,t[3]=o*h-e*i,t}function Dt(t,n){var a=n[0],r=n[1],u=n[2],e=n[3],o=Math.sqrt(a*a+r*r+u*u),i=Math.exp(e),h=o>0?i*Math.sin(o)/o:0;return t[0]=a*h,t[1]=r*h,t[2]=u*h,t[3]=i*Math.cos(o),t}function Ft(t,n){var a=n[0],r=n[1],u=n[2],e=n[3],o=Math.sqrt(a*a+r*r+u*u),i=o>0?Math.atan2(o,e)/o:0;return t[0]=a*i,t[1]=r*i,t[2]=u*i,t[3]=.5*Math.log(a*a+r*r+u*u+e*e),t}function It(t,a,r,u){var e,o,i,h,c,s=a[0],M=a[1],f=a[2],l=a[3],v=r[0],b=r[1],m=r[2],d=r[3];return(o=s*v+M*b+f*m+l*d)<0&&(o=-o,v=-v,b=-b,m=-m,d=-d),1-o>n?(e=Math.acos(o),i=Math.sin(e),h=Math.sin((1-u)*e)/i,c=Math.sin(u*e)/i):(h=1-u,c=u),t[0]=h*s+c*v,t[1]=h*M+c*b,t[2]=h*f+c*m,t[3]=h*l+c*d,t}function Lt(t,n){var a,r=n[0]+n[4]+n[8];if(r>0)a=Math.sqrt(r+1),t[3]=.5*a,a=.5/a,t[0]=(n[5]-n[7])*a,t[1]=(n[6]-n[2])*a,t[2]=(n[1]-n[3])*a;else{var u=0;n[4]>n[0]&&(u=1),n[8]>n[3*u+u]&&(u=2);var e=(u+1)%3,o=(u+2)%3;a=Math.sqrt(n[3*u+u]-n[3*e+e]-n[3*o+o]+1),t[u]=.5*a,a=.5/a,t[3]=(n[3*e+o]-n[3*o+e])*a,t[e]=(n[3*e+u]+n[3*u+e])*a,t[o]=(n[3*o+u]+n[3*u+o])*a}return t}var Vt,Qt,Yt,kt,Xt,Zt,Bt=nt,Nt=at,Ct=rt,Ut=ut,Wt=et,Gt=Tt,Ht=ct,Jt=bt,Kt=mt,$t=ft,tn=$t,nn=lt,an=nn,rn=vt,un=dt,en=xt,on=(Vt=E(),Qt=D(1,0,0),Yt=D(0,1,0),function(t,n,a){var r=X(n,a);return r<-.999999?(Z(Vt,Qt,n),H(Vt)<1e-6&&Z(Vt,Yt,n),k(Vt,Vt),Pt(t,Vt,Math.PI),t):r>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):(Z(Vt,n,a),t[0]=Vt[0],t[1]=Vt[1],t[2]=Vt[2],t[3]=1+r,rn(t,t))}),hn=(kt=jt(),Xt=jt(),function(t,n,a,r,u,e){return It(kt,n,u,e),It(Xt,a,r,e),It(t,kt,Xt,2*e*(1-e)),t}),cn=(Zt=m(),function(t,n,a,r){return Zt[0]=a[0],Zt[3]=a[1],Zt[6]=a[2],Zt[1]=r[0],Zt[4]=r[1],Zt[7]=r[2],Zt[2]=-n[0],Zt[5]=-n[1],Zt[8]=-n[2],rn(t,Lt(t,Zt))}),sn=Object.freeze({__proto__:null,create:jt,identity:function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},setAxisAngle:Pt,getAxisAngle:function(t,a){var r=2*Math.acos(a[3]),u=Math.sin(r/2);return u>n?(t[0]=a[0]/u,t[1]=a[1]/u,t[2]=a[2]/u):(t[0]=1,t[1]=0,t[2]=0),r},getAngle:function(t,n){var a=Jt(t,n);return Math.acos(2*a*a-1)},multiply:Tt,rotateX:St,rotateY:Et,rotateZ:Ot,calculateW:function(t,n){var a=n[0],r=n[1],u=n[2];return t[0]=a,t[1]=r,t[2]=u,t[3]=Math.sqrt(Math.abs(1-a*a-r*r-u*u)),t},exp:Dt,ln:Ft,pow:function(t,n,a){return Ft(t,n),Ht(t,t,a),Dt(t,t),t},slerp:It,random:function(t){var n=r(),a=r(),u=r(),e=Math.sqrt(1-n),o=Math.sqrt(n);return t[0]=e*Math.sin(2*Math.PI*a),t[1]=e*Math.cos(2*Math.PI*a),t[2]=o*Math.sin(2*Math.PI*u),t[3]=o*Math.cos(2*Math.PI*u),t},invert:function(t,n){var a=n[0],r=n[1],u=n[2],e=n[3],o=a*a+r*r+u*u+e*e,i=o?1/o:0;return t[0]=-a*i,t[1]=-r*i,t[2]=-u*i,t[3]=e*i,t},conjugate:function(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=n[3],t},fromMat3:Lt,fromEuler:function(t,n,a,r){var u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"zyx",e=.5*Math.PI/180;n*=e,r*=e,a*=e;var o=Math.sin(n),i=Math.cos(n),h=Math.sin(a),c=Math.cos(a),s=Math.sin(r),M=Math.cos(r);switch("string"!=typeof u&&(u="zyx"),u.toLowerCase()){case"xyz":t[0]=o*c*M+i*h*s,t[1]=i*h*M-o*c*s,t[2]=i*c*s+o*h*M,t[3]=i*c*M-o*h*s;break;case"xzy":t[0]=o*c*M-i*h*s,t[1]=i*h*M-o*c*s,t[2]=i*c*s+o*h*M,t[3]=i*c*M+o*h*s;break;case"yxz":t[0]=o*c*M+i*h*s,t[1]=i*h*M-o*c*s,t[2]=i*c*s-o*h*M,t[3]=i*c*M+o*h*s;break;case"yzx":t[0]=o*c*M+i*h*s,t[1]=i*h*M+o*c*s,t[2]=i*c*s-o*h*M,t[3]=i*c*M-o*h*s;break;case"zxy":t[0]=o*c*M-i*h*s,t[1]=i*h*M+o*c*s,t[2]=i*c*s+o*h*M,t[3]=i*c*M-o*h*s;break;case"zyx":default:t[0]=o*c*M-i*h*s,t[1]=i*h*M+o*c*s,t[2]=i*c*s-o*h*M,t[3]=i*c*M+o*h*s}return t},str:function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},clone:Bt,fromValues:Nt,copy:Ct,set:Ut,add:Wt,mul:Gt,scale:Ht,dot:Jt,lerp:Kt,length:$t,len:tn,squaredLength:nn,sqrLen:an,normalize:rn,exactEquals:un,equals:en,rotationTo:on,sqlerp:hn,setAxes:cn});function Mn(t,n,a){var r=.5*a[0],u=.5*a[1],e=.5*a[2],o=n[0],i=n[1],h=n[2],c=n[3];return t[0]=o,t[1]=i,t[2]=h,t[3]=c,t[4]=r*c+u*h-e*i,t[5]=u*c+e*o-r*h,t[6]=e*c+r*i-u*o,t[7]=-r*o-u*i-e*h,t}function fn(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t}var ln=Ct;var vn=Ct;function bn(t,n,a){var r=n[0],u=n[1],e=n[2],o=n[3],i=a[4],h=a[5],c=a[6],s=a[7],M=n[4],f=n[5],l=n[6],v=n[7],b=a[0],m=a[1],d=a[2],x=a[3];return t[0]=r*x+o*b+u*d-e*m,t[1]=u*x+o*m+e*b-r*d,t[2]=e*x+o*d+r*m-u*b,t[3]=o*x-r*b-u*m-e*d,t[4]=r*s+o*i+u*c-e*h+M*x+v*b+f*d-l*m,t[5]=u*s+o*h+e*i-r*c+f*x+v*m+l*b-M*d,t[6]=e*s+o*c+r*h-u*i+l*x+v*d+M*m-f*b,t[7]=o*s-r*i-u*h-e*c+v*x-M*b-f*m-l*d,t}var mn=bn;var dn=Jt;var xn=$t,pn=xn,yn=nn,qn=yn;var gn=Object.freeze({__proto__:null,create:function(){var t=new a(8);return a!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[4]=0,t[5]=0,t[6]=0,t[7]=0),t[3]=1,t},clone:function(t){var n=new a(8);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n},fromValues:function(t,n,r,u,e,o,i,h){var c=new a(8);return c[0]=t,c[1]=n,c[2]=r,c[3]=u,c[4]=e,c[5]=o,c[6]=i,c[7]=h,c},fromRotationTranslationValues:function(t,n,r,u,e,o,i){var h=new a(8);h[0]=t,h[1]=n,h[2]=r,h[3]=u;var c=.5*e,s=.5*o,M=.5*i;return h[4]=c*u+s*r-M*n,h[5]=s*u+M*t-c*r,h[6]=M*u+c*n-s*t,h[7]=-c*t-s*n-M*r,h},fromRotationTranslation:Mn,fromTranslation:function(t,n){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t[4]=.5*n[0],t[5]=.5*n[1],t[6]=.5*n[2],t[7]=0,t},fromRotation:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=0,t[5]=0,t[6]=0,t[7]=0,t},fromMat4:function(t,n){var r=jt();R(r,n);var u=new a(3);return w(u,n),Mn(t,r,u),t},copy:fn,identity:function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t[6]=0,t[7]=0,t},set:function(t,n,a,r,u,e,o,i,h){return t[0]=n,t[1]=a,t[2]=r,t[3]=u,t[4]=e,t[5]=o,t[6]=i,t[7]=h,t},getReal:ln,getDual:function(t,n){return t[0]=n[4],t[1]=n[5],t[2]=n[6],t[3]=n[7],t},setReal:vn,setDual:function(t,n){return t[4]=n[0],t[5]=n[1],t[6]=n[2],t[7]=n[3],t},getTranslation:function(t,n){var a=n[4],r=n[5],u=n[6],e=n[7],o=-n[0],i=-n[1],h=-n[2],c=n[3];return t[0]=2*(a*c+e*o+r*h-u*i),t[1]=2*(r*c+e*i+u*o-a*h),t[2]=2*(u*c+e*h+a*i-r*o),t},translate:function(t,n,a){var r=n[0],u=n[1],e=n[2],o=n[3],i=.5*a[0],h=.5*a[1],c=.5*a[2],s=n[4],M=n[5],f=n[6],l=n[7];return t[0]=r,t[1]=u,t[2]=e,t[3]=o,t[4]=o*i+u*c-e*h+s,t[5]=o*h+e*i-r*c+M,t[6]=o*c+r*h-u*i+f,t[7]=-r*i-u*h-e*c+l,t},rotateX:function(t,n,a){var r=-n[0],u=-n[1],e=-n[2],o=n[3],i=n[4],h=n[5],c=n[6],s=n[7],M=i*o+s*r+h*e-c*u,f=h*o+s*u+c*r-i*e,l=c*o+s*e+i*u-h*r,v=s*o-i*r-h*u-c*e;return St(t,n,a),r=t[0],u=t[1],e=t[2],o=t[3],t[4]=M*o+v*r+f*e-l*u,t[5]=f*o+v*u+l*r-M*e,t[6]=l*o+v*e+M*u-f*r,t[7]=v*o-M*r-f*u-l*e,t},rotateY:function(t,n,a){var r=-n[0],u=-n[1],e=-n[2],o=n[3],i=n[4],h=n[5],c=n[6],s=n[7],M=i*o+s*r+h*e-c*u,f=h*o+s*u+c*r-i*e,l=c*o+s*e+i*u-h*r,v=s*o-i*r-h*u-c*e;return Et(t,n,a),r=t[0],u=t[1],e=t[2],o=t[3],t[4]=M*o+v*r+f*e-l*u,t[5]=f*o+v*u+l*r-M*e,t[6]=l*o+v*e+M*u-f*r,t[7]=v*o-M*r-f*u-l*e,t},rotateZ:function(t,n,a){var r=-n[0],u=-n[1],e=-n[2],o=n[3],i=n[4],h=n[5],c=n[6],s=n[7],M=i*o+s*r+h*e-c*u,f=h*o+s*u+c*r-i*e,l=c*o+s*e+i*u-h*r,v=s*o-i*r-h*u-c*e;return Ot(t,n,a),r=t[0],u=t[1],e=t[2],o=t[3],t[4]=M*o+v*r+f*e-l*u,t[5]=f*o+v*u+l*r-M*e,t[6]=l*o+v*e+M*u-f*r,t[7]=v*o-M*r-f*u-l*e,t},rotateByQuatAppend:function(t,n,a){var r=a[0],u=a[1],e=a[2],o=a[3],i=n[0],h=n[1],c=n[2],s=n[3];return t[0]=i*o+s*r+h*e-c*u,t[1]=h*o+s*u+c*r-i*e,t[2]=c*o+s*e+i*u-h*r,t[3]=s*o-i*r-h*u-c*e,i=n[4],h=n[5],c=n[6],s=n[7],t[4]=i*o+s*r+h*e-c*u,t[5]=h*o+s*u+c*r-i*e,t[6]=c*o+s*e+i*u-h*r,t[7]=s*o-i*r-h*u-c*e,t},rotateByQuatPrepend:function(t,n,a){var r=n[0],u=n[1],e=n[2],o=n[3],i=a[0],h=a[1],c=a[2],s=a[3];return t[0]=r*s+o*i+u*c-e*h,t[1]=u*s+o*h+e*i-r*c,t[2]=e*s+o*c+r*h-u*i,t[3]=o*s-r*i-u*h-e*c,i=a[4],h=a[5],c=a[6],s=a[7],t[4]=r*s+o*i+u*c-e*h,t[5]=u*s+o*h+e*i-r*c,t[6]=e*s+o*c+r*h-u*i,t[7]=o*s-r*i-u*h-e*c,t},rotateAroundAxis:function(t,a,r,u){if(Math.abs(u)0){a=Math.sqrt(a);var r=n[0]/a,u=n[1]/a,e=n[2]/a,o=n[3]/a,i=n[4],h=n[5],c=n[6],s=n[7],M=r*i+u*h+e*c+o*s;t[0]=r,t[1]=u,t[2]=e,t[3]=o,t[4]=(i-r*M)/a,t[5]=(h-u*M)/a,t[6]=(c-e*M)/a,t[7]=(s-o*M)/a}return t},str:function(t){return"quat2("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+")"},exactEquals:function(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[7]===n[7]},equals:function(t,a){var r=t[0],u=t[1],e=t[2],o=t[3],i=t[4],h=t[5],c=t[6],s=t[7],M=a[0],f=a[1],l=a[2],v=a[3],b=a[4],m=a[5],d=a[6],x=a[7];return Math.abs(r-M)<=n*Math.max(1,Math.abs(r),Math.abs(M))&&Math.abs(u-f)<=n*Math.max(1,Math.abs(u),Math.abs(f))&&Math.abs(e-l)<=n*Math.max(1,Math.abs(e),Math.abs(l))&&Math.abs(o-v)<=n*Math.max(1,Math.abs(o),Math.abs(v))&&Math.abs(i-b)<=n*Math.max(1,Math.abs(i),Math.abs(b))&&Math.abs(h-m)<=n*Math.max(1,Math.abs(h),Math.abs(m))&&Math.abs(c-d)<=n*Math.max(1,Math.abs(c),Math.abs(d))&&Math.abs(s-x)<=n*Math.max(1,Math.abs(s),Math.abs(x))}});function _n(){var t=new a(2);return a!=Float32Array&&(t[0]=0,t[1]=0),t}function An(t,n,a){return t[0]=n[0]-a[0],t[1]=n[1]-a[1],t}function wn(t,n,a){return t[0]=n[0]*a[0],t[1]=n[1]*a[1],t}function zn(t,n,a){return t[0]=n[0]/a[0],t[1]=n[1]/a[1],t}function Rn(t,n){var a=n[0]-t[0],r=n[1]-t[1];return Math.hypot(a,r)}function jn(t,n){var a=n[0]-t[0],r=n[1]-t[1];return a*a+r*r}function Pn(t){var n=t[0],a=t[1];return Math.hypot(n,a)}function Tn(t){var n=t[0],a=t[1];return n*n+a*a}var Sn=Pn,En=An,On=wn,Dn=zn,Fn=Rn,In=jn,Ln=Tn,Vn=function(){var t=_n();return function(n,a,r,u,e,o){var i,h;for(a||(a=2),r||(r=0),h=u?Math.min(u*a+r,n.length):n.length,i=r;i0&&(u=1/Math.sqrt(u)),t[0]=n[0]*u,t[1]=n[1]*u,t},dot:function(t,n){return t[0]*n[0]+t[1]*n[1]},cross:function(t,n,a){var r=n[0]*a[1]-n[1]*a[0];return t[0]=t[1]=0,t[2]=r,t},lerp:function(t,n,a,r){var u=n[0],e=n[1];return t[0]=u+r*(a[0]-u),t[1]=e+r*(a[1]-e),t},random:function(t,n){n=n||1;var a=2*r()*Math.PI;return t[0]=Math.cos(a)*n,t[1]=Math.sin(a)*n,t},transformMat2:function(t,n,a){var r=n[0],u=n[1];return t[0]=a[0]*r+a[2]*u,t[1]=a[1]*r+a[3]*u,t},transformMat2d:function(t,n,a){var r=n[0],u=n[1];return t[0]=a[0]*r+a[2]*u+a[4],t[1]=a[1]*r+a[3]*u+a[5],t},transformMat3:function(t,n,a){var r=n[0],u=n[1];return t[0]=a[0]*r+a[3]*u+a[6],t[1]=a[1]*r+a[4]*u+a[7],t},transformMat4:function(t,n,a){var r=n[0],u=n[1];return t[0]=a[0]*r+a[4]*u+a[12],t[1]=a[1]*r+a[5]*u+a[13],t},rotate:function(t,n,a,r){var u=n[0]-a[0],e=n[1]-a[1],o=Math.sin(r),i=Math.cos(r);return t[0]=u*i-e*o+a[0],t[1]=u*o+e*i+a[1],t},angle:function(t,n){var a=t[0],r=t[1],u=n[0],e=n[1],o=Math.sqrt(a*a+r*r)*Math.sqrt(u*u+e*e),i=o&&(a*u+r*e)/o;return Math.acos(Math.min(Math.max(i,-1),1))},zero:function(t){return t[0]=0,t[1]=0,t},str:function(t){return"vec2("+t[0]+", "+t[1]+")"},exactEquals:function(t,n){return t[0]===n[0]&&t[1]===n[1]},equals:function(t,a){var r=t[0],u=t[1],e=a[0],o=a[1];return Math.abs(r-e)<=n*Math.max(1,Math.abs(r),Math.abs(e))&&Math.abs(u-o)<=n*Math.max(1,Math.abs(u),Math.abs(o))},len:Sn,sub:En,mul:On,div:Dn,dist:Fn,sqrDist:In,sqrLen:Ln,forEach:Vn});t.glMatrix=e,t.mat2=s,t.mat2d=b,t.mat3=q,t.mat4=S,t.quat=sn,t.quat2=gn,t.vec2=Qn,t.vec3=$,t.vec4=Rt,Object.defineProperty(t,"__esModule",{value:!0})})); +!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){"use strict";exports.__esModule=!0,exports.vec4=exports.vec3=exports.vec2=exports.quat2=exports.quat=exports.mat4=exports.mat3=exports.mat2d=exports.mat2=exports.glMatrix=void 0,require("assemblyscript/std/portable");var e=require("./common");exports.glMatrix=e;var r=require("./mat2");exports.mat2=r;var t=require("./mat2d");exports.mat2d=t;var a=require("./mat3");exports.mat3=a;var o=require("./mat4");exports.mat4=o;var s=require("./quat");exports.quat=s;var p=require("./quat2");exports.quat2=p;var x=require("./vec2");exports.vec2=x;var i=require("./vec3");exports.vec3=i;var u=require("./vec4");exports.vec4=u})); diff --git a/dist/gl-matrix.js b/dist/gl-matrix.js index bb0b858a..e07f4ed7 100644 --- a/dist/gl-matrix.js +++ b/dist/gl-matrix.js @@ -5,7 +5,7 @@ @author Colin MacKenzie IV @version 3.3.0 -Copyright (c) 2015-2020, Brandon Jones, Colin MacKenzie IV. +Copyright (c) 2015-2021, Brandon Jones, Colin MacKenzie IV. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -26,7734 +26,54 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.glMatrix = {})); -}(this, (function (exports) { 'use strict'; +(function (factory) { + typeof define === 'function' && define.amd ? define(factory) : + factory(); +}((function () { 'use strict'; - /** - * Common utilities - * @module glMatrix - */ - // Configuration Constants - var EPSILON = 0.000001; - var ARRAY_TYPE = typeof Float32Array !== 'undefined' ? Float32Array : Array; - var RANDOM = Math.random; - /** - * Sets the type of array used when creating new vectors and matrices - * - * @param {Float32ArrayConstructor | ArrayConstructor} type Array type, such as Float32Array or Array - */ + exports.__esModule = true; + exports.vec4 = exports.vec3 = exports.vec2 = exports.quat2 = exports.quat = exports.mat4 = exports.mat3 = exports.mat2d = exports.mat2 = exports.glMatrix = void 0; - function setMatrixArrayType(type) { - ARRAY_TYPE = type; - } - var degree = Math.PI / 180; - /** - * Convert Degree To Radian - * - * @param {Number} a Angle in Degrees - */ + require("assemblyscript/std/portable"); - function toRadian(a) { - return a * degree; - } - /** - * Tests whether or not the arguments have approximately the same value, within an absolute - * or relative tolerance of glMatrix.EPSILON (an absolute tolerance is used for values less - * than or equal to 1.0, and a relative tolerance is used for larger values) - * - * @param {Number} a The first number to test. - * @param {Number} b The second number to test. - * @returns {Boolean} True if the numbers are approximately equal, false otherwise. - */ + var glMatrix = require("./common"); - function equals(a, b) { - return Math.abs(a - b) <= EPSILON * Math.max(1.0, Math.abs(a), Math.abs(b)); - } - if (!Math.hypot) Math.hypot = function () { - var y = 0, - i = arguments.length; + exports.glMatrix = glMatrix; - while (i--) { - y += arguments[i] * arguments[i]; - } + var mat2 = require("./mat2"); - return Math.sqrt(y); - }; + exports.mat2 = mat2; - var common = /*#__PURE__*/Object.freeze({ - __proto__: null, - EPSILON: EPSILON, - get ARRAY_TYPE () { return ARRAY_TYPE; }, - RANDOM: RANDOM, - setMatrixArrayType: setMatrixArrayType, - toRadian: toRadian, - equals: equals - }); + var mat2d = require("./mat2d"); - /** - * 2x2 Matrix - * @module mat2 - */ + exports.mat2d = mat2d; - /** - * Creates a new identity mat2 - * - * @returns {mat2} a new 2x2 matrix - */ + var mat3 = require("./mat3"); - function create() { - var out = new ARRAY_TYPE(4); + exports.mat3 = mat3; - if (ARRAY_TYPE != Float32Array) { - out[1] = 0; - out[2] = 0; - } + var mat4 = require("./mat4"); - out[0] = 1; - out[3] = 1; - return out; - } - /** - * Creates a new mat2 initialized with values from an existing matrix - * - * @param {ReadonlyMat2} a matrix to clone - * @returns {mat2} a new 2x2 matrix - */ + exports.mat4 = mat4; - function clone(a) { - var out = new ARRAY_TYPE(4); - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - return out; - } - /** - * Copy the values from one mat2 to another - * - * @param {mat2} out the receiving matrix - * @param {ReadonlyMat2} a the source matrix - * @returns {mat2} out - */ + var quat = require("./quat"); - function copy(out, a) { - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - return out; - } - /** - * Set a mat2 to the identity matrix - * - * @param {mat2} out the receiving matrix - * @returns {mat2} out - */ + exports.quat = quat; - function identity(out) { - out[0] = 1; - out[1] = 0; - out[2] = 0; - out[3] = 1; - return out; - } - /** - * Create a new mat2 with the given values - * - * @param {Number} m00 Component in column 0, row 0 position (index 0) - * @param {Number} m01 Component in column 0, row 1 position (index 1) - * @param {Number} m10 Component in column 1, row 0 position (index 2) - * @param {Number} m11 Component in column 1, row 1 position (index 3) - * @returns {mat2} out A new 2x2 matrix - */ + var quat2 = require("./quat2"); - function fromValues(m00, m01, m10, m11) { - var out = new ARRAY_TYPE(4); - out[0] = m00; - out[1] = m01; - out[2] = m10; - out[3] = m11; - return out; - } - /** - * Set the components of a mat2 to the given values - * - * @param {mat2} out the receiving matrix - * @param {Number} m00 Component in column 0, row 0 position (index 0) - * @param {Number} m01 Component in column 0, row 1 position (index 1) - * @param {Number} m10 Component in column 1, row 0 position (index 2) - * @param {Number} m11 Component in column 1, row 1 position (index 3) - * @returns {mat2} out - */ + exports.quat2 = quat2; - function set(out, m00, m01, m10, m11) { - out[0] = m00; - out[1] = m01; - out[2] = m10; - out[3] = m11; - return out; - } - /** - * Transpose the values of a mat2 - * - * @param {mat2} out the receiving matrix - * @param {ReadonlyMat2} a the source matrix - * @returns {mat2} out - */ + var vec2 = require("./vec2"); - function transpose(out, a) { - // If we are transposing ourselves we can skip a few steps but have to cache - // some values - if (out === a) { - var a1 = a[1]; - out[1] = a[2]; - out[2] = a1; - } else { - out[0] = a[0]; - out[1] = a[2]; - out[2] = a[1]; - out[3] = a[3]; - } + exports.vec2 = vec2; - return out; - } - /** - * Inverts a mat2 - * - * @param {mat2} out the receiving matrix - * @param {ReadonlyMat2} a the source matrix - * @returns {mat2} out - */ + var vec3 = require("./vec3"); - function invert(out, a) { - var a0 = a[0], - a1 = a[1], - a2 = a[2], - a3 = a[3]; // Calculate the determinant + exports.vec3 = vec3; - var det = a0 * a3 - a2 * a1; + var vec4 = require("./vec4"); - if (!det) { - return null; - } - - det = 1.0 / det; - out[0] = a3 * det; - out[1] = -a1 * det; - out[2] = -a2 * det; - out[3] = a0 * det; - return out; - } - /** - * Calculates the adjugate of a mat2 - * - * @param {mat2} out the receiving matrix - * @param {ReadonlyMat2} a the source matrix - * @returns {mat2} out - */ - - function adjoint(out, a) { - // Caching this value is nessecary if out == a - var a0 = a[0]; - out[0] = a[3]; - out[1] = -a[1]; - out[2] = -a[2]; - out[3] = a0; - return out; - } - /** - * Calculates the determinant of a mat2 - * - * @param {ReadonlyMat2} a the source matrix - * @returns {Number} determinant of a - */ - - function determinant(a) { - return a[0] * a[3] - a[2] * a[1]; - } - /** - * Multiplies two mat2's - * - * @param {mat2} out the receiving matrix - * @param {ReadonlyMat2} a the first operand - * @param {ReadonlyMat2} b the second operand - * @returns {mat2} out - */ - - function multiply(out, a, b) { - var a0 = a[0], - a1 = a[1], - a2 = a[2], - a3 = a[3]; - var b0 = b[0], - b1 = b[1], - b2 = b[2], - b3 = b[3]; - out[0] = a0 * b0 + a2 * b1; - out[1] = a1 * b0 + a3 * b1; - out[2] = a0 * b2 + a2 * b3; - out[3] = a1 * b2 + a3 * b3; - return out; - } - /** - * Rotates a mat2 by the given angle - * - * @param {mat2} out the receiving matrix - * @param {ReadonlyMat2} a the matrix to rotate - * @param {Number} rad the angle to rotate the matrix by - * @returns {mat2} out - */ - - function rotate(out, a, rad) { - var a0 = a[0], - a1 = a[1], - a2 = a[2], - a3 = a[3]; - var s = Math.sin(rad); - var c = Math.cos(rad); - out[0] = a0 * c + a2 * s; - out[1] = a1 * c + a3 * s; - out[2] = a0 * -s + a2 * c; - out[3] = a1 * -s + a3 * c; - return out; - } - /** - * Scales the mat2 by the dimensions in the given vec2 - * - * @param {mat2} out the receiving matrix - * @param {ReadonlyMat2} a the matrix to rotate - * @param {ReadonlyVec2} v the vec2 to scale the matrix by - * @returns {mat2} out - **/ - - function scale(out, a, v) { - var a0 = a[0], - a1 = a[1], - a2 = a[2], - a3 = a[3]; - var v0 = v[0], - v1 = v[1]; - out[0] = a0 * v0; - out[1] = a1 * v0; - out[2] = a2 * v1; - out[3] = a3 * v1; - return out; - } - /** - * Creates a matrix from a given angle - * This is equivalent to (but much faster than): - * - * mat2.identity(dest); - * mat2.rotate(dest, dest, rad); - * - * @param {mat2} out mat2 receiving operation result - * @param {Number} rad the angle to rotate the matrix by - * @returns {mat2} out - */ - - function fromRotation(out, rad) { - var s = Math.sin(rad); - var c = Math.cos(rad); - out[0] = c; - out[1] = s; - out[2] = -s; - out[3] = c; - return out; - } - /** - * Creates a matrix from a vector scaling - * This is equivalent to (but much faster than): - * - * mat2.identity(dest); - * mat2.scale(dest, dest, vec); - * - * @param {mat2} out mat2 receiving operation result - * @param {ReadonlyVec2} v Scaling vector - * @returns {mat2} out - */ - - function fromScaling(out, v) { - out[0] = v[0]; - out[1] = 0; - out[2] = 0; - out[3] = v[1]; - return out; - } - /** - * Returns a string representation of a mat2 - * - * @param {ReadonlyMat2} a matrix to represent as a string - * @returns {String} string representation of the matrix - */ - - function str(a) { - return "mat2(" + a[0] + ", " + a[1] + ", " + a[2] + ", " + a[3] + ")"; - } - /** - * Returns Frobenius norm of a mat2 - * - * @param {ReadonlyMat2} a the matrix to calculate Frobenius norm of - * @returns {Number} Frobenius norm - */ - - function frob(a) { - return Math.hypot(a[0], a[1], a[2], a[3]); - } - /** - * Returns L, D and U matrices (Lower triangular, Diagonal and Upper triangular) by factorizing the input matrix - * @param {ReadonlyMat2} L the lower triangular matrix - * @param {ReadonlyMat2} D the diagonal matrix - * @param {ReadonlyMat2} U the upper triangular matrix - * @param {ReadonlyMat2} a the input matrix to factorize - */ - - function LDU(L, D, U, a) { - L[2] = a[2] / a[0]; - U[0] = a[0]; - U[1] = a[1]; - U[3] = a[3] - L[2] * U[1]; - return [L, D, U]; - } - /** - * Adds two mat2's - * - * @param {mat2} out the receiving matrix - * @param {ReadonlyMat2} a the first operand - * @param {ReadonlyMat2} b the second operand - * @returns {mat2} out - */ - - function add(out, a, b) { - out[0] = a[0] + b[0]; - out[1] = a[1] + b[1]; - out[2] = a[2] + b[2]; - out[3] = a[3] + b[3]; - return out; - } - /** - * Subtracts matrix b from matrix a - * - * @param {mat2} out the receiving matrix - * @param {ReadonlyMat2} a the first operand - * @param {ReadonlyMat2} b the second operand - * @returns {mat2} out - */ - - function subtract(out, a, b) { - out[0] = a[0] - b[0]; - out[1] = a[1] - b[1]; - out[2] = a[2] - b[2]; - out[3] = a[3] - b[3]; - return out; - } - /** - * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===) - * - * @param {ReadonlyMat2} a The first matrix. - * @param {ReadonlyMat2} b The second matrix. - * @returns {Boolean} True if the matrices are equal, false otherwise. - */ - - function exactEquals(a, b) { - return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3]; - } - /** - * Returns whether or not the matrices have approximately the same elements in the same position. - * - * @param {ReadonlyMat2} a The first matrix. - * @param {ReadonlyMat2} b The second matrix. - * @returns {Boolean} True if the matrices are equal, false otherwise. - */ - - function equals$1(a, b) { - var a0 = a[0], - a1 = a[1], - a2 = a[2], - a3 = a[3]; - var b0 = b[0], - b1 = b[1], - b2 = b[2], - b3 = b[3]; - return Math.abs(a0 - b0) <= EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3)); - } - /** - * Multiply each element of the matrix by a scalar. - * - * @param {mat2} out the receiving matrix - * @param {ReadonlyMat2} a the matrix to scale - * @param {Number} b amount to scale the matrix's elements by - * @returns {mat2} out - */ - - function multiplyScalar(out, a, b) { - out[0] = a[0] * b; - out[1] = a[1] * b; - out[2] = a[2] * b; - out[3] = a[3] * b; - return out; - } - /** - * Adds two mat2's after multiplying each element of the second operand by a scalar value. - * - * @param {mat2} out the receiving vector - * @param {ReadonlyMat2} a the first operand - * @param {ReadonlyMat2} b the second operand - * @param {Number} scale the amount to scale b's elements by before adding - * @returns {mat2} out - */ - - function multiplyScalarAndAdd(out, a, b, scale) { - out[0] = a[0] + b[0] * scale; - out[1] = a[1] + b[1] * scale; - out[2] = a[2] + b[2] * scale; - out[3] = a[3] + b[3] * scale; - return out; - } - /** - * Alias for {@link mat2.multiply} - * @function - */ - - var mul = multiply; - /** - * Alias for {@link mat2.subtract} - * @function - */ - - var sub = subtract; - - var mat2 = /*#__PURE__*/Object.freeze({ - __proto__: null, - create: create, - clone: clone, - copy: copy, - identity: identity, - fromValues: fromValues, - set: set, - transpose: transpose, - invert: invert, - adjoint: adjoint, - determinant: determinant, - multiply: multiply, - rotate: rotate, - scale: scale, - fromRotation: fromRotation, - fromScaling: fromScaling, - str: str, - frob: frob, - LDU: LDU, - add: add, - subtract: subtract, - exactEquals: exactEquals, - equals: equals$1, - multiplyScalar: multiplyScalar, - multiplyScalarAndAdd: multiplyScalarAndAdd, - mul: mul, - sub: sub - }); - - /** - * 2x3 Matrix - * @module mat2d - * @description - * A mat2d contains six elements defined as: - *
-   * [a, b,
-   *  c, d,
-   *  tx, ty]
-   * 
- * This is a short form for the 3x3 matrix: - *
-   * [a, b, 0,
-   *  c, d, 0,
-   *  tx, ty, 1]
-   * 
- * The last column is ignored so the array is shorter and operations are faster. - */ - - /** - * Creates a new identity mat2d - * - * @returns {mat2d} a new 2x3 matrix - */ - - function create$1() { - var out = new ARRAY_TYPE(6); - - if (ARRAY_TYPE != Float32Array) { - out[1] = 0; - out[2] = 0; - out[4] = 0; - out[5] = 0; - } - - out[0] = 1; - out[3] = 1; - return out; - } - /** - * Creates a new mat2d initialized with values from an existing matrix - * - * @param {ReadonlyMat2d} a matrix to clone - * @returns {mat2d} a new 2x3 matrix - */ - - function clone$1(a) { - var out = new ARRAY_TYPE(6); - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - out[4] = a[4]; - out[5] = a[5]; - return out; - } - /** - * Copy the values from one mat2d to another - * - * @param {mat2d} out the receiving matrix - * @param {ReadonlyMat2d} a the source matrix - * @returns {mat2d} out - */ - - function copy$1(out, a) { - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - out[4] = a[4]; - out[5] = a[5]; - return out; - } - /** - * Set a mat2d to the identity matrix - * - * @param {mat2d} out the receiving matrix - * @returns {mat2d} out - */ - - function identity$1(out) { - out[0] = 1; - out[1] = 0; - out[2] = 0; - out[3] = 1; - out[4] = 0; - out[5] = 0; - return out; - } - /** - * Create a new mat2d with the given values - * - * @param {Number} a Component A (index 0) - * @param {Number} b Component B (index 1) - * @param {Number} c Component C (index 2) - * @param {Number} d Component D (index 3) - * @param {Number} tx Component TX (index 4) - * @param {Number} ty Component TY (index 5) - * @returns {mat2d} A new mat2d - */ - - function fromValues$1(a, b, c, d, tx, ty) { - var out = new ARRAY_TYPE(6); - out[0] = a; - out[1] = b; - out[2] = c; - out[3] = d; - out[4] = tx; - out[5] = ty; - return out; - } - /** - * Set the components of a mat2d to the given values - * - * @param {mat2d} out the receiving matrix - * @param {Number} a Component A (index 0) - * @param {Number} b Component B (index 1) - * @param {Number} c Component C (index 2) - * @param {Number} d Component D (index 3) - * @param {Number} tx Component TX (index 4) - * @param {Number} ty Component TY (index 5) - * @returns {mat2d} out - */ - - function set$1(out, a, b, c, d, tx, ty) { - out[0] = a; - out[1] = b; - out[2] = c; - out[3] = d; - out[4] = tx; - out[5] = ty; - return out; - } - /** - * Inverts a mat2d - * - * @param {mat2d} out the receiving matrix - * @param {ReadonlyMat2d} a the source matrix - * @returns {mat2d} out - */ - - function invert$1(out, a) { - var aa = a[0], - ab = a[1], - ac = a[2], - ad = a[3]; - var atx = a[4], - aty = a[5]; - var det = aa * ad - ab * ac; - - if (!det) { - return null; - } - - det = 1.0 / det; - out[0] = ad * det; - out[1] = -ab * det; - out[2] = -ac * det; - out[3] = aa * det; - out[4] = (ac * aty - ad * atx) * det; - out[5] = (ab * atx - aa * aty) * det; - return out; - } - /** - * Calculates the determinant of a mat2d - * - * @param {ReadonlyMat2d} a the source matrix - * @returns {Number} determinant of a - */ - - function determinant$1(a) { - return a[0] * a[3] - a[1] * a[2]; - } - /** - * Multiplies two mat2d's - * - * @param {mat2d} out the receiving matrix - * @param {ReadonlyMat2d} a the first operand - * @param {ReadonlyMat2d} b the second operand - * @returns {mat2d} out - */ - - function multiply$1(out, a, b) { - var a0 = a[0], - a1 = a[1], - a2 = a[2], - a3 = a[3], - a4 = a[4], - a5 = a[5]; - var b0 = b[0], - b1 = b[1], - b2 = b[2], - b3 = b[3], - b4 = b[4], - b5 = b[5]; - out[0] = a0 * b0 + a2 * b1; - out[1] = a1 * b0 + a3 * b1; - out[2] = a0 * b2 + a2 * b3; - out[3] = a1 * b2 + a3 * b3; - out[4] = a0 * b4 + a2 * b5 + a4; - out[5] = a1 * b4 + a3 * b5 + a5; - return out; - } - /** - * Rotates a mat2d by the given angle - * - * @param {mat2d} out the receiving matrix - * @param {ReadonlyMat2d} a the matrix to rotate - * @param {Number} rad the angle to rotate the matrix by - * @returns {mat2d} out - */ - - function rotate$1(out, a, rad) { - var a0 = a[0], - a1 = a[1], - a2 = a[2], - a3 = a[3], - a4 = a[4], - a5 = a[5]; - var s = Math.sin(rad); - var c = Math.cos(rad); - out[0] = a0 * c + a2 * s; - out[1] = a1 * c + a3 * s; - out[2] = a0 * -s + a2 * c; - out[3] = a1 * -s + a3 * c; - out[4] = a4; - out[5] = a5; - return out; - } - /** - * Scales the mat2d by the dimensions in the given vec2 - * - * @param {mat2d} out the receiving matrix - * @param {ReadonlyMat2d} a the matrix to translate - * @param {ReadonlyVec2} v the vec2 to scale the matrix by - * @returns {mat2d} out - **/ - - function scale$1(out, a, v) { - var a0 = a[0], - a1 = a[1], - a2 = a[2], - a3 = a[3], - a4 = a[4], - a5 = a[5]; - var v0 = v[0], - v1 = v[1]; - out[0] = a0 * v0; - out[1] = a1 * v0; - out[2] = a2 * v1; - out[3] = a3 * v1; - out[4] = a4; - out[5] = a5; - return out; - } - /** - * Translates the mat2d by the dimensions in the given vec2 - * - * @param {mat2d} out the receiving matrix - * @param {ReadonlyMat2d} a the matrix to translate - * @param {ReadonlyVec2} v the vec2 to translate the matrix by - * @returns {mat2d} out - **/ - - function translate(out, a, v) { - var a0 = a[0], - a1 = a[1], - a2 = a[2], - a3 = a[3], - a4 = a[4], - a5 = a[5]; - var v0 = v[0], - v1 = v[1]; - out[0] = a0; - out[1] = a1; - out[2] = a2; - out[3] = a3; - out[4] = a0 * v0 + a2 * v1 + a4; - out[5] = a1 * v0 + a3 * v1 + a5; - return out; - } - /** - * Creates a matrix from a given angle - * This is equivalent to (but much faster than): - * - * mat2d.identity(dest); - * mat2d.rotate(dest, dest, rad); - * - * @param {mat2d} out mat2d receiving operation result - * @param {Number} rad the angle to rotate the matrix by - * @returns {mat2d} out - */ - - function fromRotation$1(out, rad) { - var s = Math.sin(rad), - c = Math.cos(rad); - out[0] = c; - out[1] = s; - out[2] = -s; - out[3] = c; - out[4] = 0; - out[5] = 0; - return out; - } - /** - * Creates a matrix from a vector scaling - * This is equivalent to (but much faster than): - * - * mat2d.identity(dest); - * mat2d.scale(dest, dest, vec); - * - * @param {mat2d} out mat2d receiving operation result - * @param {ReadonlyVec2} v Scaling vector - * @returns {mat2d} out - */ - - function fromScaling$1(out, v) { - out[0] = v[0]; - out[1] = 0; - out[2] = 0; - out[3] = v[1]; - out[4] = 0; - out[5] = 0; - return out; - } - /** - * Creates a matrix from a vector translation - * This is equivalent to (but much faster than): - * - * mat2d.identity(dest); - * mat2d.translate(dest, dest, vec); - * - * @param {mat2d} out mat2d receiving operation result - * @param {ReadonlyVec2} v Translation vector - * @returns {mat2d} out - */ - - function fromTranslation(out, v) { - out[0] = 1; - out[1] = 0; - out[2] = 0; - out[3] = 1; - out[4] = v[0]; - out[5] = v[1]; - return out; - } - /** - * Returns a string representation of a mat2d - * - * @param {ReadonlyMat2d} a matrix to represent as a string - * @returns {String} string representation of the matrix - */ - - function str$1(a) { - return "mat2d(" + a[0] + ", " + a[1] + ", " + a[2] + ", " + a[3] + ", " + a[4] + ", " + a[5] + ")"; - } - /** - * Returns Frobenius norm of a mat2d - * - * @param {ReadonlyMat2d} a the matrix to calculate Frobenius norm of - * @returns {Number} Frobenius norm - */ - - function frob$1(a) { - return Math.hypot(a[0], a[1], a[2], a[3], a[4], a[5], 1); - } - /** - * Adds two mat2d's - * - * @param {mat2d} out the receiving matrix - * @param {ReadonlyMat2d} a the first operand - * @param {ReadonlyMat2d} b the second operand - * @returns {mat2d} out - */ - - function add$1(out, a, b) { - out[0] = a[0] + b[0]; - out[1] = a[1] + b[1]; - out[2] = a[2] + b[2]; - out[3] = a[3] + b[3]; - out[4] = a[4] + b[4]; - out[5] = a[5] + b[5]; - return out; - } - /** - * Subtracts matrix b from matrix a - * - * @param {mat2d} out the receiving matrix - * @param {ReadonlyMat2d} a the first operand - * @param {ReadonlyMat2d} b the second operand - * @returns {mat2d} out - */ - - function subtract$1(out, a, b) { - out[0] = a[0] - b[0]; - out[1] = a[1] - b[1]; - out[2] = a[2] - b[2]; - out[3] = a[3] - b[3]; - out[4] = a[4] - b[4]; - out[5] = a[5] - b[5]; - return out; - } - /** - * Multiply each element of the matrix by a scalar. - * - * @param {mat2d} out the receiving matrix - * @param {ReadonlyMat2d} a the matrix to scale - * @param {Number} b amount to scale the matrix's elements by - * @returns {mat2d} out - */ - - function multiplyScalar$1(out, a, b) { - out[0] = a[0] * b; - out[1] = a[1] * b; - out[2] = a[2] * b; - out[3] = a[3] * b; - out[4] = a[4] * b; - out[5] = a[5] * b; - return out; - } - /** - * Adds two mat2d's after multiplying each element of the second operand by a scalar value. - * - * @param {mat2d} out the receiving vector - * @param {ReadonlyMat2d} a the first operand - * @param {ReadonlyMat2d} b the second operand - * @param {Number} scale the amount to scale b's elements by before adding - * @returns {mat2d} out - */ - - function multiplyScalarAndAdd$1(out, a, b, scale) { - out[0] = a[0] + b[0] * scale; - out[1] = a[1] + b[1] * scale; - out[2] = a[2] + b[2] * scale; - out[3] = a[3] + b[3] * scale; - out[4] = a[4] + b[4] * scale; - out[5] = a[5] + b[5] * scale; - return out; - } - /** - * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===) - * - * @param {ReadonlyMat2d} a The first matrix. - * @param {ReadonlyMat2d} b The second matrix. - * @returns {Boolean} True if the matrices are equal, false otherwise. - */ - - function exactEquals$1(a, b) { - return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5]; - } - /** - * Returns whether or not the matrices have approximately the same elements in the same position. - * - * @param {ReadonlyMat2d} a The first matrix. - * @param {ReadonlyMat2d} b The second matrix. - * @returns {Boolean} True if the matrices are equal, false otherwise. - */ - - function equals$2(a, b) { - var a0 = a[0], - a1 = a[1], - a2 = a[2], - a3 = a[3], - a4 = a[4], - a5 = a[5]; - var b0 = b[0], - b1 = b[1], - b2 = b[2], - b3 = b[3], - b4 = b[4], - b5 = b[5]; - return Math.abs(a0 - b0) <= EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= EPSILON * Math.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= EPSILON * Math.max(1.0, Math.abs(a5), Math.abs(b5)); - } - /** - * Alias for {@link mat2d.multiply} - * @function - */ - - var mul$1 = multiply$1; - /** - * Alias for {@link mat2d.subtract} - * @function - */ - - var sub$1 = subtract$1; - - var mat2d = /*#__PURE__*/Object.freeze({ - __proto__: null, - create: create$1, - clone: clone$1, - copy: copy$1, - identity: identity$1, - fromValues: fromValues$1, - set: set$1, - invert: invert$1, - determinant: determinant$1, - multiply: multiply$1, - rotate: rotate$1, - scale: scale$1, - translate: translate, - fromRotation: fromRotation$1, - fromScaling: fromScaling$1, - fromTranslation: fromTranslation, - str: str$1, - frob: frob$1, - add: add$1, - subtract: subtract$1, - multiplyScalar: multiplyScalar$1, - multiplyScalarAndAdd: multiplyScalarAndAdd$1, - exactEquals: exactEquals$1, - equals: equals$2, - mul: mul$1, - sub: sub$1 - }); - - /** - * 3x3 Matrix - * @module mat3 - */ - - /** - * Creates a new identity mat3 - * - * @returns {mat3} a new 3x3 matrix - */ - - function create$2() { - var out = new ARRAY_TYPE(9); - - if (ARRAY_TYPE != Float32Array) { - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[5] = 0; - out[6] = 0; - out[7] = 0; - } - - out[0] = 1; - out[4] = 1; - out[8] = 1; - return out; - } - /** - * Copies the upper-left 3x3 values into the given mat3. - * - * @param {mat3} out the receiving 3x3 matrix - * @param {ReadonlyMat4} a the source 4x4 matrix - * @returns {mat3} out - */ - - function fromMat4(out, a) { - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[4]; - out[4] = a[5]; - out[5] = a[6]; - out[6] = a[8]; - out[7] = a[9]; - out[8] = a[10]; - return out; - } - /** - * Creates a new mat3 initialized with values from an existing matrix - * - * @param {ReadonlyMat3} a matrix to clone - * @returns {mat3} a new 3x3 matrix - */ - - function clone$2(a) { - var out = new ARRAY_TYPE(9); - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - out[4] = a[4]; - out[5] = a[5]; - out[6] = a[6]; - out[7] = a[7]; - out[8] = a[8]; - return out; - } - /** - * Copy the values from one mat3 to another - * - * @param {mat3} out the receiving matrix - * @param {ReadonlyMat3} a the source matrix - * @returns {mat3} out - */ - - function copy$2(out, a) { - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - out[4] = a[4]; - out[5] = a[5]; - out[6] = a[6]; - out[7] = a[7]; - out[8] = a[8]; - return out; - } - /** - * Create a new mat3 with the given values - * - * @param {Number} m00 Component in column 0, row 0 position (index 0) - * @param {Number} m01 Component in column 0, row 1 position (index 1) - * @param {Number} m02 Component in column 0, row 2 position (index 2) - * @param {Number} m10 Component in column 1, row 0 position (index 3) - * @param {Number} m11 Component in column 1, row 1 position (index 4) - * @param {Number} m12 Component in column 1, row 2 position (index 5) - * @param {Number} m20 Component in column 2, row 0 position (index 6) - * @param {Number} m21 Component in column 2, row 1 position (index 7) - * @param {Number} m22 Component in column 2, row 2 position (index 8) - * @returns {mat3} A new mat3 - */ - - function fromValues$2(m00, m01, m02, m10, m11, m12, m20, m21, m22) { - var out = new ARRAY_TYPE(9); - out[0] = m00; - out[1] = m01; - out[2] = m02; - out[3] = m10; - out[4] = m11; - out[5] = m12; - out[6] = m20; - out[7] = m21; - out[8] = m22; - return out; - } - /** - * Set the components of a mat3 to the given values - * - * @param {mat3} out the receiving matrix - * @param {Number} m00 Component in column 0, row 0 position (index 0) - * @param {Number} m01 Component in column 0, row 1 position (index 1) - * @param {Number} m02 Component in column 0, row 2 position (index 2) - * @param {Number} m10 Component in column 1, row 0 position (index 3) - * @param {Number} m11 Component in column 1, row 1 position (index 4) - * @param {Number} m12 Component in column 1, row 2 position (index 5) - * @param {Number} m20 Component in column 2, row 0 position (index 6) - * @param {Number} m21 Component in column 2, row 1 position (index 7) - * @param {Number} m22 Component in column 2, row 2 position (index 8) - * @returns {mat3} out - */ - - function set$2(out, m00, m01, m02, m10, m11, m12, m20, m21, m22) { - out[0] = m00; - out[1] = m01; - out[2] = m02; - out[3] = m10; - out[4] = m11; - out[5] = m12; - out[6] = m20; - out[7] = m21; - out[8] = m22; - return out; - } - /** - * Set a mat3 to the identity matrix - * - * @param {mat3} out the receiving matrix - * @returns {mat3} out - */ - - function identity$2(out) { - out[0] = 1; - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = 1; - out[5] = 0; - out[6] = 0; - out[7] = 0; - out[8] = 1; - return out; - } - /** - * Transpose the values of a mat3 - * - * @param {mat3} out the receiving matrix - * @param {ReadonlyMat3} a the source matrix - * @returns {mat3} out - */ - - function transpose$1(out, a) { - // If we are transposing ourselves we can skip a few steps but have to cache some values - if (out === a) { - var a01 = a[1], - a02 = a[2], - a12 = a[5]; - out[1] = a[3]; - out[2] = a[6]; - out[3] = a01; - out[5] = a[7]; - out[6] = a02; - out[7] = a12; - } else { - out[0] = a[0]; - out[1] = a[3]; - out[2] = a[6]; - out[3] = a[1]; - out[4] = a[4]; - out[5] = a[7]; - out[6] = a[2]; - out[7] = a[5]; - out[8] = a[8]; - } - - return out; - } - /** - * Inverts a mat3 - * - * @param {mat3} out the receiving matrix - * @param {ReadonlyMat3} a the source matrix - * @returns {mat3} out - */ - - function invert$2(out, a) { - var a00 = a[0], - a01 = a[1], - a02 = a[2]; - var a10 = a[3], - a11 = a[4], - a12 = a[5]; - var a20 = a[6], - a21 = a[7], - a22 = a[8]; - var b01 = a22 * a11 - a12 * a21; - var b11 = -a22 * a10 + a12 * a20; - var b21 = a21 * a10 - a11 * a20; // Calculate the determinant - - var det = a00 * b01 + a01 * b11 + a02 * b21; - - if (!det) { - return null; - } - - det = 1.0 / det; - out[0] = b01 * det; - out[1] = (-a22 * a01 + a02 * a21) * det; - out[2] = (a12 * a01 - a02 * a11) * det; - out[3] = b11 * det; - out[4] = (a22 * a00 - a02 * a20) * det; - out[5] = (-a12 * a00 + a02 * a10) * det; - out[6] = b21 * det; - out[7] = (-a21 * a00 + a01 * a20) * det; - out[8] = (a11 * a00 - a01 * a10) * det; - return out; - } - /** - * Calculates the adjugate of a mat3 - * - * @param {mat3} out the receiving matrix - * @param {ReadonlyMat3} a the source matrix - * @returns {mat3} out - */ - - function adjoint$1(out, a) { - var a00 = a[0], - a01 = a[1], - a02 = a[2]; - var a10 = a[3], - a11 = a[4], - a12 = a[5]; - var a20 = a[6], - a21 = a[7], - a22 = a[8]; - out[0] = a11 * a22 - a12 * a21; - out[1] = a02 * a21 - a01 * a22; - out[2] = a01 * a12 - a02 * a11; - out[3] = a12 * a20 - a10 * a22; - out[4] = a00 * a22 - a02 * a20; - out[5] = a02 * a10 - a00 * a12; - out[6] = a10 * a21 - a11 * a20; - out[7] = a01 * a20 - a00 * a21; - out[8] = a00 * a11 - a01 * a10; - return out; - } - /** - * Calculates the determinant of a mat3 - * - * @param {ReadonlyMat3} a the source matrix - * @returns {Number} determinant of a - */ - - function determinant$2(a) { - var a00 = a[0], - a01 = a[1], - a02 = a[2]; - var a10 = a[3], - a11 = a[4], - a12 = a[5]; - var a20 = a[6], - a21 = a[7], - a22 = a[8]; - return a00 * (a22 * a11 - a12 * a21) + a01 * (-a22 * a10 + a12 * a20) + a02 * (a21 * a10 - a11 * a20); - } - /** - * Multiplies two mat3's - * - * @param {mat3} out the receiving matrix - * @param {ReadonlyMat3} a the first operand - * @param {ReadonlyMat3} b the second operand - * @returns {mat3} out - */ - - function multiply$2(out, a, b) { - var a00 = a[0], - a01 = a[1], - a02 = a[2]; - var a10 = a[3], - a11 = a[4], - a12 = a[5]; - var a20 = a[6], - a21 = a[7], - a22 = a[8]; - var b00 = b[0], - b01 = b[1], - b02 = b[2]; - var b10 = b[3], - b11 = b[4], - b12 = b[5]; - var b20 = b[6], - b21 = b[7], - b22 = b[8]; - out[0] = b00 * a00 + b01 * a10 + b02 * a20; - out[1] = b00 * a01 + b01 * a11 + b02 * a21; - out[2] = b00 * a02 + b01 * a12 + b02 * a22; - out[3] = b10 * a00 + b11 * a10 + b12 * a20; - out[4] = b10 * a01 + b11 * a11 + b12 * a21; - out[5] = b10 * a02 + b11 * a12 + b12 * a22; - out[6] = b20 * a00 + b21 * a10 + b22 * a20; - out[7] = b20 * a01 + b21 * a11 + b22 * a21; - out[8] = b20 * a02 + b21 * a12 + b22 * a22; - return out; - } - /** - * Translate a mat3 by the given vector - * - * @param {mat3} out the receiving matrix - * @param {ReadonlyMat3} a the matrix to translate - * @param {ReadonlyVec2} v vector to translate by - * @returns {mat3} out - */ - - function translate$1(out, a, v) { - var a00 = a[0], - a01 = a[1], - a02 = a[2], - a10 = a[3], - a11 = a[4], - a12 = a[5], - a20 = a[6], - a21 = a[7], - a22 = a[8], - x = v[0], - y = v[1]; - out[0] = a00; - out[1] = a01; - out[2] = a02; - out[3] = a10; - out[4] = a11; - out[5] = a12; - out[6] = x * a00 + y * a10 + a20; - out[7] = x * a01 + y * a11 + a21; - out[8] = x * a02 + y * a12 + a22; - return out; - } - /** - * Rotates a mat3 by the given angle - * - * @param {mat3} out the receiving matrix - * @param {ReadonlyMat3} a the matrix to rotate - * @param {Number} rad the angle to rotate the matrix by - * @returns {mat3} out - */ - - function rotate$2(out, a, rad) { - var a00 = a[0], - a01 = a[1], - a02 = a[2], - a10 = a[3], - a11 = a[4], - a12 = a[5], - a20 = a[6], - a21 = a[7], - a22 = a[8], - s = Math.sin(rad), - c = Math.cos(rad); - out[0] = c * a00 + s * a10; - out[1] = c * a01 + s * a11; - out[2] = c * a02 + s * a12; - out[3] = c * a10 - s * a00; - out[4] = c * a11 - s * a01; - out[5] = c * a12 - s * a02; - out[6] = a20; - out[7] = a21; - out[8] = a22; - return out; - } - /** - * Scales the mat3 by the dimensions in the given vec2 - * - * @param {mat3} out the receiving matrix - * @param {ReadonlyMat3} a the matrix to rotate - * @param {ReadonlyVec2} v the vec2 to scale the matrix by - * @returns {mat3} out - **/ - - function scale$2(out, a, v) { - var x = v[0], - y = v[1]; - out[0] = x * a[0]; - out[1] = x * a[1]; - out[2] = x * a[2]; - out[3] = y * a[3]; - out[4] = y * a[4]; - out[5] = y * a[5]; - out[6] = a[6]; - out[7] = a[7]; - out[8] = a[8]; - return out; - } - /** - * Creates a matrix from a vector translation - * This is equivalent to (but much faster than): - * - * mat3.identity(dest); - * mat3.translate(dest, dest, vec); - * - * @param {mat3} out mat3 receiving operation result - * @param {ReadonlyVec2} v Translation vector - * @returns {mat3} out - */ - - function fromTranslation$1(out, v) { - out[0] = 1; - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = 1; - out[5] = 0; - out[6] = v[0]; - out[7] = v[1]; - out[8] = 1; - return out; - } - /** - * Creates a matrix from a given angle - * This is equivalent to (but much faster than): - * - * mat3.identity(dest); - * mat3.rotate(dest, dest, rad); - * - * @param {mat3} out mat3 receiving operation result - * @param {Number} rad the angle to rotate the matrix by - * @returns {mat3} out - */ - - function fromRotation$2(out, rad) { - var s = Math.sin(rad), - c = Math.cos(rad); - out[0] = c; - out[1] = s; - out[2] = 0; - out[3] = -s; - out[4] = c; - out[5] = 0; - out[6] = 0; - out[7] = 0; - out[8] = 1; - return out; - } - /** - * Creates a matrix from a vector scaling - * This is equivalent to (but much faster than): - * - * mat3.identity(dest); - * mat3.scale(dest, dest, vec); - * - * @param {mat3} out mat3 receiving operation result - * @param {ReadonlyVec2} v Scaling vector - * @returns {mat3} out - */ - - function fromScaling$2(out, v) { - out[0] = v[0]; - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = v[1]; - out[5] = 0; - out[6] = 0; - out[7] = 0; - out[8] = 1; - return out; - } - /** - * Copies the values from a mat2d into a mat3 - * - * @param {mat3} out the receiving matrix - * @param {ReadonlyMat2d} a the matrix to copy - * @returns {mat3} out - **/ - - function fromMat2d(out, a) { - out[0] = a[0]; - out[1] = a[1]; - out[2] = 0; - out[3] = a[2]; - out[4] = a[3]; - out[5] = 0; - out[6] = a[4]; - out[7] = a[5]; - out[8] = 1; - return out; - } - /** - * Calculates a 3x3 matrix from the given quaternion - * - * @param {mat3} out mat3 receiving operation result - * @param {ReadonlyQuat} q Quaternion to create matrix from - * - * @returns {mat3} out - */ - - function fromQuat(out, q) { - var x = q[0], - y = q[1], - z = q[2], - w = q[3]; - var x2 = x + x; - var y2 = y + y; - var z2 = z + z; - var xx = x * x2; - var yx = y * x2; - var yy = y * y2; - var zx = z * x2; - var zy = z * y2; - var zz = z * z2; - var wx = w * x2; - var wy = w * y2; - var wz = w * z2; - out[0] = 1 - yy - zz; - out[3] = yx - wz; - out[6] = zx + wy; - out[1] = yx + wz; - out[4] = 1 - xx - zz; - out[7] = zy - wx; - out[2] = zx - wy; - out[5] = zy + wx; - out[8] = 1 - xx - yy; - return out; - } - /** - * Calculates a 3x3 normal matrix (transpose inverse) from the 4x4 matrix - * - * @param {mat3} out mat3 receiving operation result - * @param {ReadonlyMat4} a Mat4 to derive the normal matrix from - * - * @returns {mat3} out - */ - - function normalFromMat4(out, a) { - var a00 = a[0], - a01 = a[1], - a02 = a[2], - a03 = a[3]; - var a10 = a[4], - a11 = a[5], - a12 = a[6], - a13 = a[7]; - var a20 = a[8], - a21 = a[9], - a22 = a[10], - a23 = a[11]; - var a30 = a[12], - a31 = a[13], - a32 = a[14], - a33 = a[15]; - var b00 = a00 * a11 - a01 * a10; - var b01 = a00 * a12 - a02 * a10; - var b02 = a00 * a13 - a03 * a10; - var b03 = a01 * a12 - a02 * a11; - var b04 = a01 * a13 - a03 * a11; - var b05 = a02 * a13 - a03 * a12; - var b06 = a20 * a31 - a21 * a30; - var b07 = a20 * a32 - a22 * a30; - var b08 = a20 * a33 - a23 * a30; - var b09 = a21 * a32 - a22 * a31; - var b10 = a21 * a33 - a23 * a31; - var b11 = a22 * a33 - a23 * a32; // Calculate the determinant - - var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06; - - if (!det) { - return null; - } - - det = 1.0 / det; - out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det; - out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det; - out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det; - out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det; - out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det; - out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det; - out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det; - out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det; - out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det; - return out; - } - /** - * Generates a 2D projection matrix with the given bounds - * - * @param {mat3} out mat3 frustum matrix will be written into - * @param {number} width Width of your gl context - * @param {number} height Height of gl context - * @returns {mat3} out - */ - - function projection(out, width, height) { - out[0] = 2 / width; - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = -2 / height; - out[5] = 0; - out[6] = -1; - out[7] = 1; - out[8] = 1; - return out; - } - /** - * Returns a string representation of a mat3 - * - * @param {ReadonlyMat3} a matrix to represent as a string - * @returns {String} string representation of the matrix - */ - - function str$2(a) { - return "mat3(" + a[0] + ", " + a[1] + ", " + a[2] + ", " + a[3] + ", " + a[4] + ", " + a[5] + ", " + a[6] + ", " + a[7] + ", " + a[8] + ")"; - } - /** - * Returns Frobenius norm of a mat3 - * - * @param {ReadonlyMat3} a the matrix to calculate Frobenius norm of - * @returns {Number} Frobenius norm - */ - - function frob$2(a) { - return Math.hypot(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8]); - } - /** - * Adds two mat3's - * - * @param {mat3} out the receiving matrix - * @param {ReadonlyMat3} a the first operand - * @param {ReadonlyMat3} b the second operand - * @returns {mat3} out - */ - - function add$2(out, a, b) { - out[0] = a[0] + b[0]; - out[1] = a[1] + b[1]; - out[2] = a[2] + b[2]; - out[3] = a[3] + b[3]; - out[4] = a[4] + b[4]; - out[5] = a[5] + b[5]; - out[6] = a[6] + b[6]; - out[7] = a[7] + b[7]; - out[8] = a[8] + b[8]; - return out; - } - /** - * Subtracts matrix b from matrix a - * - * @param {mat3} out the receiving matrix - * @param {ReadonlyMat3} a the first operand - * @param {ReadonlyMat3} b the second operand - * @returns {mat3} out - */ - - function subtract$2(out, a, b) { - out[0] = a[0] - b[0]; - out[1] = a[1] - b[1]; - out[2] = a[2] - b[2]; - out[3] = a[3] - b[3]; - out[4] = a[4] - b[4]; - out[5] = a[5] - b[5]; - out[6] = a[6] - b[6]; - out[7] = a[7] - b[7]; - out[8] = a[8] - b[8]; - return out; - } - /** - * Multiply each element of the matrix by a scalar. - * - * @param {mat3} out the receiving matrix - * @param {ReadonlyMat3} a the matrix to scale - * @param {Number} b amount to scale the matrix's elements by - * @returns {mat3} out - */ - - function multiplyScalar$2(out, a, b) { - out[0] = a[0] * b; - out[1] = a[1] * b; - out[2] = a[2] * b; - out[3] = a[3] * b; - out[4] = a[4] * b; - out[5] = a[5] * b; - out[6] = a[6] * b; - out[7] = a[7] * b; - out[8] = a[8] * b; - return out; - } - /** - * Adds two mat3's after multiplying each element of the second operand by a scalar value. - * - * @param {mat3} out the receiving vector - * @param {ReadonlyMat3} a the first operand - * @param {ReadonlyMat3} b the second operand - * @param {Number} scale the amount to scale b's elements by before adding - * @returns {mat3} out - */ - - function multiplyScalarAndAdd$2(out, a, b, scale) { - out[0] = a[0] + b[0] * scale; - out[1] = a[1] + b[1] * scale; - out[2] = a[2] + b[2] * scale; - out[3] = a[3] + b[3] * scale; - out[4] = a[4] + b[4] * scale; - out[5] = a[5] + b[5] * scale; - out[6] = a[6] + b[6] * scale; - out[7] = a[7] + b[7] * scale; - out[8] = a[8] + b[8] * scale; - return out; - } - /** - * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===) - * - * @param {ReadonlyMat3} a The first matrix. - * @param {ReadonlyMat3} b The second matrix. - * @returns {Boolean} True if the matrices are equal, false otherwise. - */ - - function exactEquals$2(a, b) { - return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5] && a[6] === b[6] && a[7] === b[7] && a[8] === b[8]; - } - /** - * Returns whether or not the matrices have approximately the same elements in the same position. - * - * @param {ReadonlyMat3} a The first matrix. - * @param {ReadonlyMat3} b The second matrix. - * @returns {Boolean} True if the matrices are equal, false otherwise. - */ - - function equals$3(a, b) { - var a0 = a[0], - a1 = a[1], - a2 = a[2], - a3 = a[3], - a4 = a[4], - a5 = a[5], - a6 = a[6], - a7 = a[7], - a8 = a[8]; - var b0 = b[0], - b1 = b[1], - b2 = b[2], - b3 = b[3], - b4 = b[4], - b5 = b[5], - b6 = b[6], - b7 = b[7], - b8 = b[8]; - return Math.abs(a0 - b0) <= EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= EPSILON * Math.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= EPSILON * Math.max(1.0, Math.abs(a5), Math.abs(b5)) && Math.abs(a6 - b6) <= EPSILON * Math.max(1.0, Math.abs(a6), Math.abs(b6)) && Math.abs(a7 - b7) <= EPSILON * Math.max(1.0, Math.abs(a7), Math.abs(b7)) && Math.abs(a8 - b8) <= EPSILON * Math.max(1.0, Math.abs(a8), Math.abs(b8)); - } - /** - * Alias for {@link mat3.multiply} - * @function - */ - - var mul$2 = multiply$2; - /** - * Alias for {@link mat3.subtract} - * @function - */ - - var sub$2 = subtract$2; - - var mat3 = /*#__PURE__*/Object.freeze({ - __proto__: null, - create: create$2, - fromMat4: fromMat4, - clone: clone$2, - copy: copy$2, - fromValues: fromValues$2, - set: set$2, - identity: identity$2, - transpose: transpose$1, - invert: invert$2, - adjoint: adjoint$1, - determinant: determinant$2, - multiply: multiply$2, - translate: translate$1, - rotate: rotate$2, - scale: scale$2, - fromTranslation: fromTranslation$1, - fromRotation: fromRotation$2, - fromScaling: fromScaling$2, - fromMat2d: fromMat2d, - fromQuat: fromQuat, - normalFromMat4: normalFromMat4, - projection: projection, - str: str$2, - frob: frob$2, - add: add$2, - subtract: subtract$2, - multiplyScalar: multiplyScalar$2, - multiplyScalarAndAdd: multiplyScalarAndAdd$2, - exactEquals: exactEquals$2, - equals: equals$3, - mul: mul$2, - sub: sub$2 - }); - - /** - * 4x4 Matrix
Format: column-major, when typed out it looks like row-major
The matrices are being post multiplied. - * @module mat4 - */ - - /** - * Creates a new identity mat4 - * - * @returns {mat4} a new 4x4 matrix - */ - - function create$3() { - var out = new ARRAY_TYPE(16); - - if (ARRAY_TYPE != Float32Array) { - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = 0; - out[6] = 0; - out[7] = 0; - out[8] = 0; - out[9] = 0; - out[11] = 0; - out[12] = 0; - out[13] = 0; - out[14] = 0; - } - - out[0] = 1; - out[5] = 1; - out[10] = 1; - out[15] = 1; - return out; - } - /** - * Creates a new mat4 initialized with values from an existing matrix - * - * @param {ReadonlyMat4} a matrix to clone - * @returns {mat4} a new 4x4 matrix - */ - - function clone$3(a) { - var out = new ARRAY_TYPE(16); - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - out[4] = a[4]; - out[5] = a[5]; - out[6] = a[6]; - out[7] = a[7]; - out[8] = a[8]; - out[9] = a[9]; - out[10] = a[10]; - out[11] = a[11]; - out[12] = a[12]; - out[13] = a[13]; - out[14] = a[14]; - out[15] = a[15]; - return out; - } - /** - * Copy the values from one mat4 to another - * - * @param {mat4} out the receiving matrix - * @param {ReadonlyMat4} a the source matrix - * @returns {mat4} out - */ - - function copy$3(out, a) { - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - out[4] = a[4]; - out[5] = a[5]; - out[6] = a[6]; - out[7] = a[7]; - out[8] = a[8]; - out[9] = a[9]; - out[10] = a[10]; - out[11] = a[11]; - out[12] = a[12]; - out[13] = a[13]; - out[14] = a[14]; - out[15] = a[15]; - return out; - } - /** - * Create a new mat4 with the given values - * - * @param {Number} m00 Component in column 0, row 0 position (index 0) - * @param {Number} m01 Component in column 0, row 1 position (index 1) - * @param {Number} m02 Component in column 0, row 2 position (index 2) - * @param {Number} m03 Component in column 0, row 3 position (index 3) - * @param {Number} m10 Component in column 1, row 0 position (index 4) - * @param {Number} m11 Component in column 1, row 1 position (index 5) - * @param {Number} m12 Component in column 1, row 2 position (index 6) - * @param {Number} m13 Component in column 1, row 3 position (index 7) - * @param {Number} m20 Component in column 2, row 0 position (index 8) - * @param {Number} m21 Component in column 2, row 1 position (index 9) - * @param {Number} m22 Component in column 2, row 2 position (index 10) - * @param {Number} m23 Component in column 2, row 3 position (index 11) - * @param {Number} m30 Component in column 3, row 0 position (index 12) - * @param {Number} m31 Component in column 3, row 1 position (index 13) - * @param {Number} m32 Component in column 3, row 2 position (index 14) - * @param {Number} m33 Component in column 3, row 3 position (index 15) - * @returns {mat4} A new mat4 - */ - - function fromValues$3(m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) { - var out = new ARRAY_TYPE(16); - out[0] = m00; - out[1] = m01; - out[2] = m02; - out[3] = m03; - out[4] = m10; - out[5] = m11; - out[6] = m12; - out[7] = m13; - out[8] = m20; - out[9] = m21; - out[10] = m22; - out[11] = m23; - out[12] = m30; - out[13] = m31; - out[14] = m32; - out[15] = m33; - return out; - } - /** - * Set the components of a mat4 to the given values - * - * @param {mat4} out the receiving matrix - * @param {Number} m00 Component in column 0, row 0 position (index 0) - * @param {Number} m01 Component in column 0, row 1 position (index 1) - * @param {Number} m02 Component in column 0, row 2 position (index 2) - * @param {Number} m03 Component in column 0, row 3 position (index 3) - * @param {Number} m10 Component in column 1, row 0 position (index 4) - * @param {Number} m11 Component in column 1, row 1 position (index 5) - * @param {Number} m12 Component in column 1, row 2 position (index 6) - * @param {Number} m13 Component in column 1, row 3 position (index 7) - * @param {Number} m20 Component in column 2, row 0 position (index 8) - * @param {Number} m21 Component in column 2, row 1 position (index 9) - * @param {Number} m22 Component in column 2, row 2 position (index 10) - * @param {Number} m23 Component in column 2, row 3 position (index 11) - * @param {Number} m30 Component in column 3, row 0 position (index 12) - * @param {Number} m31 Component in column 3, row 1 position (index 13) - * @param {Number} m32 Component in column 3, row 2 position (index 14) - * @param {Number} m33 Component in column 3, row 3 position (index 15) - * @returns {mat4} out - */ - - function set$3(out, m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) { - out[0] = m00; - out[1] = m01; - out[2] = m02; - out[3] = m03; - out[4] = m10; - out[5] = m11; - out[6] = m12; - out[7] = m13; - out[8] = m20; - out[9] = m21; - out[10] = m22; - out[11] = m23; - out[12] = m30; - out[13] = m31; - out[14] = m32; - out[15] = m33; - return out; - } - /** - * Set a mat4 to the identity matrix - * - * @param {mat4} out the receiving matrix - * @returns {mat4} out - */ - - function identity$3(out) { - out[0] = 1; - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = 0; - out[5] = 1; - out[6] = 0; - out[7] = 0; - out[8] = 0; - out[9] = 0; - out[10] = 1; - out[11] = 0; - out[12] = 0; - out[13] = 0; - out[14] = 0; - out[15] = 1; - return out; - } - /** - * Transpose the values of a mat4 - * - * @param {mat4} out the receiving matrix - * @param {ReadonlyMat4} a the source matrix - * @returns {mat4} out - */ - - function transpose$2(out, a) { - // If we are transposing ourselves we can skip a few steps but have to cache some values - if (out === a) { - var a01 = a[1], - a02 = a[2], - a03 = a[3]; - var a12 = a[6], - a13 = a[7]; - var a23 = a[11]; - out[1] = a[4]; - out[2] = a[8]; - out[3] = a[12]; - out[4] = a01; - out[6] = a[9]; - out[7] = a[13]; - out[8] = a02; - out[9] = a12; - out[11] = a[14]; - out[12] = a03; - out[13] = a13; - out[14] = a23; - } else { - out[0] = a[0]; - out[1] = a[4]; - out[2] = a[8]; - out[3] = a[12]; - out[4] = a[1]; - out[5] = a[5]; - out[6] = a[9]; - out[7] = a[13]; - out[8] = a[2]; - out[9] = a[6]; - out[10] = a[10]; - out[11] = a[14]; - out[12] = a[3]; - out[13] = a[7]; - out[14] = a[11]; - out[15] = a[15]; - } - - return out; - } - /** - * Inverts a mat4 - * - * @param {mat4} out the receiving matrix - * @param {ReadonlyMat4} a the source matrix - * @returns {mat4} out - */ - - function invert$3(out, a) { - var a00 = a[0], - a01 = a[1], - a02 = a[2], - a03 = a[3]; - var a10 = a[4], - a11 = a[5], - a12 = a[6], - a13 = a[7]; - var a20 = a[8], - a21 = a[9], - a22 = a[10], - a23 = a[11]; - var a30 = a[12], - a31 = a[13], - a32 = a[14], - a33 = a[15]; - var b00 = a00 * a11 - a01 * a10; - var b01 = a00 * a12 - a02 * a10; - var b02 = a00 * a13 - a03 * a10; - var b03 = a01 * a12 - a02 * a11; - var b04 = a01 * a13 - a03 * a11; - var b05 = a02 * a13 - a03 * a12; - var b06 = a20 * a31 - a21 * a30; - var b07 = a20 * a32 - a22 * a30; - var b08 = a20 * a33 - a23 * a30; - var b09 = a21 * a32 - a22 * a31; - var b10 = a21 * a33 - a23 * a31; - var b11 = a22 * a33 - a23 * a32; // Calculate the determinant - - var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06; - - if (!det) { - return null; - } - - det = 1.0 / det; - out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det; - out[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det; - out[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det; - out[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det; - out[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det; - out[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det; - out[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det; - out[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det; - out[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det; - out[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det; - out[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det; - out[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det; - out[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det; - out[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det; - out[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det; - out[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det; - return out; - } - /** - * Calculates the adjugate of a mat4 - * - * @param {mat4} out the receiving matrix - * @param {ReadonlyMat4} a the source matrix - * @returns {mat4} out - */ - - function adjoint$2(out, a) { - var a00 = a[0], - a01 = a[1], - a02 = a[2], - a03 = a[3]; - var a10 = a[4], - a11 = a[5], - a12 = a[6], - a13 = a[7]; - var a20 = a[8], - a21 = a[9], - a22 = a[10], - a23 = a[11]; - var a30 = a[12], - a31 = a[13], - a32 = a[14], - a33 = a[15]; - var b00 = a00 * a11 - a01 * a10; - var b01 = a00 * a12 - a02 * a10; - var b02 = a00 * a13 - a03 * a10; - var b03 = a01 * a12 - a02 * a11; - var b04 = a01 * a13 - a03 * a11; - var b05 = a02 * a13 - a03 * a12; - var b06 = a20 * a31 - a21 * a30; - var b07 = a20 * a32 - a22 * a30; - var b08 = a20 * a33 - a23 * a30; - var b09 = a21 * a32 - a22 * a31; - var b10 = a21 * a33 - a23 * a31; - var b11 = a22 * a33 - a23 * a32; - out[0] = a11 * b11 - a12 * b10 + a13 * b09; - out[1] = a02 * b10 - a01 * b11 - a03 * b09; - out[2] = a31 * b05 - a32 * b04 + a33 * b03; - out[3] = a22 * b04 - a21 * b05 - a23 * b03; - out[4] = a12 * b08 - a10 * b11 - a13 * b07; - out[5] = a00 * b11 - a02 * b08 + a03 * b07; - out[6] = a32 * b02 - a30 * b05 - a33 * b01; - out[7] = a20 * b05 - a22 * b02 + a23 * b01; - out[8] = a10 * b10 - a11 * b08 + a13 * b06; - out[9] = a01 * b08 - a00 * b10 - a03 * b06; - out[10] = a30 * b04 - a31 * b02 + a33 * b00; - out[11] = a21 * b02 - a20 * b04 - a23 * b00; - out[12] = a11 * b07 - a10 * b09 - a12 * b06; - out[13] = a00 * b09 - a01 * b07 + a02 * b06; - out[14] = a31 * b01 - a30 * b03 - a32 * b00; - out[15] = a20 * b03 - a21 * b01 + a22 * b00; - return out; - } - /** - * Calculates the determinant of a mat4 - * - * @param {ReadonlyMat4} a the source matrix - * @returns {Number} determinant of a - */ - - function determinant$3(a) { - var a00 = a[0], - a01 = a[1], - a02 = a[2], - a03 = a[3]; - var a10 = a[4], - a11 = a[5], - a12 = a[6], - a13 = a[7]; - var a20 = a[8], - a21 = a[9], - a22 = a[10], - a23 = a[11]; - var a30 = a[12], - a31 = a[13], - a32 = a[14], - a33 = a[15]; - var b0 = a00 * a11 - a01 * a10; - var b1 = a00 * a12 - a02 * a10; - var b2 = a01 * a12 - a02 * a11; - var b3 = a20 * a31 - a21 * a30; - var b4 = a20 * a32 - a22 * a30; - var b5 = a21 * a32 - a22 * a31; - var b6 = a00 * b5 - a01 * b4 + a02 * b3; - var b7 = a10 * b5 - a11 * b4 + a12 * b3; - var b8 = a20 * b2 - a21 * b1 + a22 * b0; - var b9 = a30 * b2 - a31 * b1 + a32 * b0; // Calculate the determinant - - return a13 * b6 - a03 * b7 + a33 * b8 - a23 * b9; - } - /** - * Multiplies two mat4s - * - * @param {mat4} out the receiving matrix - * @param {ReadonlyMat4} a the first operand - * @param {ReadonlyMat4} b the second operand - * @returns {mat4} out - */ - - function multiply$3(out, a, b) { - var a00 = a[0], - a01 = a[1], - a02 = a[2], - a03 = a[3]; - var a10 = a[4], - a11 = a[5], - a12 = a[6], - a13 = a[7]; - var a20 = a[8], - a21 = a[9], - a22 = a[10], - a23 = a[11]; - var a30 = a[12], - a31 = a[13], - a32 = a[14], - a33 = a[15]; // Cache only the current line of the second matrix - - var b0 = b[0], - b1 = b[1], - b2 = b[2], - b3 = b[3]; - out[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; - out[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; - out[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; - out[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; - b0 = b[4]; - b1 = b[5]; - b2 = b[6]; - b3 = b[7]; - out[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; - out[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; - out[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; - out[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; - b0 = b[8]; - b1 = b[9]; - b2 = b[10]; - b3 = b[11]; - out[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; - out[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; - out[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; - out[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; - b0 = b[12]; - b1 = b[13]; - b2 = b[14]; - b3 = b[15]; - out[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; - out[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; - out[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; - out[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; - return out; - } - /** - * Translate a mat4 by the given vector - * - * @param {mat4} out the receiving matrix - * @param {ReadonlyMat4} a the matrix to translate - * @param {ReadonlyVec3} v vector to translate by - * @returns {mat4} out - */ - - function translate$2(out, a, v) { - var x = v[0], - y = v[1], - z = v[2]; - var a00, a01, a02, a03; - var a10, a11, a12, a13; - var a20, a21, a22, a23; - - if (a === out) { - out[12] = a[0] * x + a[4] * y + a[8] * z + a[12]; - out[13] = a[1] * x + a[5] * y + a[9] * z + a[13]; - out[14] = a[2] * x + a[6] * y + a[10] * z + a[14]; - out[15] = a[3] * x + a[7] * y + a[11] * z + a[15]; - } else { - a00 = a[0]; - a01 = a[1]; - a02 = a[2]; - a03 = a[3]; - a10 = a[4]; - a11 = a[5]; - a12 = a[6]; - a13 = a[7]; - a20 = a[8]; - a21 = a[9]; - a22 = a[10]; - a23 = a[11]; - out[0] = a00; - out[1] = a01; - out[2] = a02; - out[3] = a03; - out[4] = a10; - out[5] = a11; - out[6] = a12; - out[7] = a13; - out[8] = a20; - out[9] = a21; - out[10] = a22; - out[11] = a23; - out[12] = a00 * x + a10 * y + a20 * z + a[12]; - out[13] = a01 * x + a11 * y + a21 * z + a[13]; - out[14] = a02 * x + a12 * y + a22 * z + a[14]; - out[15] = a03 * x + a13 * y + a23 * z + a[15]; - } - - return out; - } - /** - * Scales the mat4 by the dimensions in the given vec3 not using vectorization - * - * @param {mat4} out the receiving matrix - * @param {ReadonlyMat4} a the matrix to scale - * @param {ReadonlyVec3} v the vec3 to scale the matrix by - * @returns {mat4} out - **/ - - function scale$3(out, a, v) { - var x = v[0], - y = v[1], - z = v[2]; - out[0] = a[0] * x; - out[1] = a[1] * x; - out[2] = a[2] * x; - out[3] = a[3] * x; - out[4] = a[4] * y; - out[5] = a[5] * y; - out[6] = a[6] * y; - out[7] = a[7] * y; - out[8] = a[8] * z; - out[9] = a[9] * z; - out[10] = a[10] * z; - out[11] = a[11] * z; - out[12] = a[12]; - out[13] = a[13]; - out[14] = a[14]; - out[15] = a[15]; - return out; - } - /** - * Rotates a mat4 by the given angle around the given axis - * - * @param {mat4} out the receiving matrix - * @param {ReadonlyMat4} a the matrix to rotate - * @param {Number} rad the angle to rotate the matrix by - * @param {ReadonlyVec3} axis the axis to rotate around - * @returns {mat4} out - */ - - function rotate$3(out, a, rad, axis) { - var x = axis[0], - y = axis[1], - z = axis[2]; - var len = Math.hypot(x, y, z); - var s, c, t; - var a00, a01, a02, a03; - var a10, a11, a12, a13; - var a20, a21, a22, a23; - var b00, b01, b02; - var b10, b11, b12; - var b20, b21, b22; - - if (len < EPSILON) { - return null; - } - - len = 1 / len; - x *= len; - y *= len; - z *= len; - s = Math.sin(rad); - c = Math.cos(rad); - t = 1 - c; - a00 = a[0]; - a01 = a[1]; - a02 = a[2]; - a03 = a[3]; - a10 = a[4]; - a11 = a[5]; - a12 = a[6]; - a13 = a[7]; - a20 = a[8]; - a21 = a[9]; - a22 = a[10]; - a23 = a[11]; // Construct the elements of the rotation matrix - - b00 = x * x * t + c; - b01 = y * x * t + z * s; - b02 = z * x * t - y * s; - b10 = x * y * t - z * s; - b11 = y * y * t + c; - b12 = z * y * t + x * s; - b20 = x * z * t + y * s; - b21 = y * z * t - x * s; - b22 = z * z * t + c; // Perform rotation-specific matrix multiplication - - out[0] = a00 * b00 + a10 * b01 + a20 * b02; - out[1] = a01 * b00 + a11 * b01 + a21 * b02; - out[2] = a02 * b00 + a12 * b01 + a22 * b02; - out[3] = a03 * b00 + a13 * b01 + a23 * b02; - out[4] = a00 * b10 + a10 * b11 + a20 * b12; - out[5] = a01 * b10 + a11 * b11 + a21 * b12; - out[6] = a02 * b10 + a12 * b11 + a22 * b12; - out[7] = a03 * b10 + a13 * b11 + a23 * b12; - out[8] = a00 * b20 + a10 * b21 + a20 * b22; - out[9] = a01 * b20 + a11 * b21 + a21 * b22; - out[10] = a02 * b20 + a12 * b21 + a22 * b22; - out[11] = a03 * b20 + a13 * b21 + a23 * b22; - - if (a !== out) { - // If the source and destination differ, copy the unchanged last row - out[12] = a[12]; - out[13] = a[13]; - out[14] = a[14]; - out[15] = a[15]; - } - - return out; - } - /** - * Rotates a matrix by the given angle around the X axis - * - * @param {mat4} out the receiving matrix - * @param {ReadonlyMat4} a the matrix to rotate - * @param {Number} rad the angle to rotate the matrix by - * @returns {mat4} out - */ - - function rotateX(out, a, rad) { - var s = Math.sin(rad); - var c = Math.cos(rad); - var a10 = a[4]; - var a11 = a[5]; - var a12 = a[6]; - var a13 = a[7]; - var a20 = a[8]; - var a21 = a[9]; - var a22 = a[10]; - var a23 = a[11]; - - if (a !== out) { - // If the source and destination differ, copy the unchanged rows - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - out[12] = a[12]; - out[13] = a[13]; - out[14] = a[14]; - out[15] = a[15]; - } // Perform axis-specific matrix multiplication - - - out[4] = a10 * c + a20 * s; - out[5] = a11 * c + a21 * s; - out[6] = a12 * c + a22 * s; - out[7] = a13 * c + a23 * s; - out[8] = a20 * c - a10 * s; - out[9] = a21 * c - a11 * s; - out[10] = a22 * c - a12 * s; - out[11] = a23 * c - a13 * s; - return out; - } - /** - * Rotates a matrix by the given angle around the Y axis - * - * @param {mat4} out the receiving matrix - * @param {ReadonlyMat4} a the matrix to rotate - * @param {Number} rad the angle to rotate the matrix by - * @returns {mat4} out - */ - - function rotateY(out, a, rad) { - var s = Math.sin(rad); - var c = Math.cos(rad); - var a00 = a[0]; - var a01 = a[1]; - var a02 = a[2]; - var a03 = a[3]; - var a20 = a[8]; - var a21 = a[9]; - var a22 = a[10]; - var a23 = a[11]; - - if (a !== out) { - // If the source and destination differ, copy the unchanged rows - out[4] = a[4]; - out[5] = a[5]; - out[6] = a[6]; - out[7] = a[7]; - out[12] = a[12]; - out[13] = a[13]; - out[14] = a[14]; - out[15] = a[15]; - } // Perform axis-specific matrix multiplication - - - out[0] = a00 * c - a20 * s; - out[1] = a01 * c - a21 * s; - out[2] = a02 * c - a22 * s; - out[3] = a03 * c - a23 * s; - out[8] = a00 * s + a20 * c; - out[9] = a01 * s + a21 * c; - out[10] = a02 * s + a22 * c; - out[11] = a03 * s + a23 * c; - return out; - } - /** - * Rotates a matrix by the given angle around the Z axis - * - * @param {mat4} out the receiving matrix - * @param {ReadonlyMat4} a the matrix to rotate - * @param {Number} rad the angle to rotate the matrix by - * @returns {mat4} out - */ - - function rotateZ(out, a, rad) { - var s = Math.sin(rad); - var c = Math.cos(rad); - var a00 = a[0]; - var a01 = a[1]; - var a02 = a[2]; - var a03 = a[3]; - var a10 = a[4]; - var a11 = a[5]; - var a12 = a[6]; - var a13 = a[7]; - - if (a !== out) { - // If the source and destination differ, copy the unchanged last row - out[8] = a[8]; - out[9] = a[9]; - out[10] = a[10]; - out[11] = a[11]; - out[12] = a[12]; - out[13] = a[13]; - out[14] = a[14]; - out[15] = a[15]; - } // Perform axis-specific matrix multiplication - - - out[0] = a00 * c + a10 * s; - out[1] = a01 * c + a11 * s; - out[2] = a02 * c + a12 * s; - out[3] = a03 * c + a13 * s; - out[4] = a10 * c - a00 * s; - out[5] = a11 * c - a01 * s; - out[6] = a12 * c - a02 * s; - out[7] = a13 * c - a03 * s; - return out; - } - /** - * Creates a matrix from a vector translation - * This is equivalent to (but much faster than): - * - * mat4.identity(dest); - * mat4.translate(dest, dest, vec); - * - * @param {mat4} out mat4 receiving operation result - * @param {ReadonlyVec3} v Translation vector - * @returns {mat4} out - */ - - function fromTranslation$2(out, v) { - out[0] = 1; - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = 0; - out[5] = 1; - out[6] = 0; - out[7] = 0; - out[8] = 0; - out[9] = 0; - out[10] = 1; - out[11] = 0; - out[12] = v[0]; - out[13] = v[1]; - out[14] = v[2]; - out[15] = 1; - return out; - } - /** - * Creates a matrix from a vector scaling - * This is equivalent to (but much faster than): - * - * mat4.identity(dest); - * mat4.scale(dest, dest, vec); - * - * @param {mat4} out mat4 receiving operation result - * @param {ReadonlyVec3} v Scaling vector - * @returns {mat4} out - */ - - function fromScaling$3(out, v) { - out[0] = v[0]; - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = 0; - out[5] = v[1]; - out[6] = 0; - out[7] = 0; - out[8] = 0; - out[9] = 0; - out[10] = v[2]; - out[11] = 0; - out[12] = 0; - out[13] = 0; - out[14] = 0; - out[15] = 1; - return out; - } - /** - * Creates a matrix from a given angle around a given axis - * This is equivalent to (but much faster than): - * - * mat4.identity(dest); - * mat4.rotate(dest, dest, rad, axis); - * - * @param {mat4} out mat4 receiving operation result - * @param {Number} rad the angle to rotate the matrix by - * @param {ReadonlyVec3} axis the axis to rotate around - * @returns {mat4} out - */ - - function fromRotation$3(out, rad, axis) { - var x = axis[0], - y = axis[1], - z = axis[2]; - var len = Math.hypot(x, y, z); - var s, c, t; - - if (len < EPSILON) { - return null; - } - - len = 1 / len; - x *= len; - y *= len; - z *= len; - s = Math.sin(rad); - c = Math.cos(rad); - t = 1 - c; // Perform rotation-specific matrix multiplication - - out[0] = x * x * t + c; - out[1] = y * x * t + z * s; - out[2] = z * x * t - y * s; - out[3] = 0; - out[4] = x * y * t - z * s; - out[5] = y * y * t + c; - out[6] = z * y * t + x * s; - out[7] = 0; - out[8] = x * z * t + y * s; - out[9] = y * z * t - x * s; - out[10] = z * z * t + c; - out[11] = 0; - out[12] = 0; - out[13] = 0; - out[14] = 0; - out[15] = 1; - return out; - } - /** - * Creates a matrix from the given angle around the X axis - * This is equivalent to (but much faster than): - * - * mat4.identity(dest); - * mat4.rotateX(dest, dest, rad); - * - * @param {mat4} out mat4 receiving operation result - * @param {Number} rad the angle to rotate the matrix by - * @returns {mat4} out - */ - - function fromXRotation(out, rad) { - var s = Math.sin(rad); - var c = Math.cos(rad); // Perform axis-specific matrix multiplication - - out[0] = 1; - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = 0; - out[5] = c; - out[6] = s; - out[7] = 0; - out[8] = 0; - out[9] = -s; - out[10] = c; - out[11] = 0; - out[12] = 0; - out[13] = 0; - out[14] = 0; - out[15] = 1; - return out; - } - /** - * Creates a matrix from the given angle around the Y axis - * This is equivalent to (but much faster than): - * - * mat4.identity(dest); - * mat4.rotateY(dest, dest, rad); - * - * @param {mat4} out mat4 receiving operation result - * @param {Number} rad the angle to rotate the matrix by - * @returns {mat4} out - */ - - function fromYRotation(out, rad) { - var s = Math.sin(rad); - var c = Math.cos(rad); // Perform axis-specific matrix multiplication - - out[0] = c; - out[1] = 0; - out[2] = -s; - out[3] = 0; - out[4] = 0; - out[5] = 1; - out[6] = 0; - out[7] = 0; - out[8] = s; - out[9] = 0; - out[10] = c; - out[11] = 0; - out[12] = 0; - out[13] = 0; - out[14] = 0; - out[15] = 1; - return out; - } - /** - * Creates a matrix from the given angle around the Z axis - * This is equivalent to (but much faster than): - * - * mat4.identity(dest); - * mat4.rotateZ(dest, dest, rad); - * - * @param {mat4} out mat4 receiving operation result - * @param {Number} rad the angle to rotate the matrix by - * @returns {mat4} out - */ - - function fromZRotation(out, rad) { - var s = Math.sin(rad); - var c = Math.cos(rad); // Perform axis-specific matrix multiplication - - out[0] = c; - out[1] = s; - out[2] = 0; - out[3] = 0; - out[4] = -s; - out[5] = c; - out[6] = 0; - out[7] = 0; - out[8] = 0; - out[9] = 0; - out[10] = 1; - out[11] = 0; - out[12] = 0; - out[13] = 0; - out[14] = 0; - out[15] = 1; - return out; - } - /** - * Creates a matrix from a quaternion rotation and vector translation - * This is equivalent to (but much faster than): - * - * mat4.identity(dest); - * mat4.translate(dest, vec); - * let quatMat = mat4.create(); - * quat4.toMat4(quat, quatMat); - * mat4.multiply(dest, quatMat); - * - * @param {mat4} out mat4 receiving operation result - * @param {quat4} q Rotation quaternion - * @param {ReadonlyVec3} v Translation vector - * @returns {mat4} out - */ - - function fromRotationTranslation(out, q, v) { - // Quaternion math - var x = q[0], - y = q[1], - z = q[2], - w = q[3]; - var x2 = x + x; - var y2 = y + y; - var z2 = z + z; - var xx = x * x2; - var xy = x * y2; - var xz = x * z2; - var yy = y * y2; - var yz = y * z2; - var zz = z * z2; - var wx = w * x2; - var wy = w * y2; - var wz = w * z2; - out[0] = 1 - (yy + zz); - out[1] = xy + wz; - out[2] = xz - wy; - out[3] = 0; - out[4] = xy - wz; - out[5] = 1 - (xx + zz); - out[6] = yz + wx; - out[7] = 0; - out[8] = xz + wy; - out[9] = yz - wx; - out[10] = 1 - (xx + yy); - out[11] = 0; - out[12] = v[0]; - out[13] = v[1]; - out[14] = v[2]; - out[15] = 1; - return out; - } - /** - * Creates a new mat4 from a dual quat. - * - * @param {mat4} out Matrix - * @param {ReadonlyQuat2} a Dual Quaternion - * @returns {mat4} mat4 receiving operation result - */ - - function fromQuat2(out, a) { - var translation = new ARRAY_TYPE(3); - var bx = -a[0], - by = -a[1], - bz = -a[2], - bw = a[3], - ax = a[4], - ay = a[5], - az = a[6], - aw = a[7]; - var magnitude = bx * bx + by * by + bz * bz + bw * bw; //Only scale if it makes sense - - if (magnitude > 0) { - translation[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2 / magnitude; - translation[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2 / magnitude; - translation[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2 / magnitude; - } else { - translation[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2; - translation[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2; - translation[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2; - } - - fromRotationTranslation(out, a, translation); - return out; - } - /** - * Returns the translation vector component of a transformation - * matrix. If a matrix is built with fromRotationTranslation, - * the returned vector will be the same as the translation vector - * originally supplied. - * @param {vec3} out Vector to receive translation component - * @param {ReadonlyMat4} mat Matrix to be decomposed (input) - * @return {vec3} out - */ - - function getTranslation(out, mat) { - out[0] = mat[12]; - out[1] = mat[13]; - out[2] = mat[14]; - return out; - } - /** - * Returns the scaling factor component of a transformation - * matrix. If a matrix is built with fromRotationTranslationScale - * with a normalized Quaternion paramter, the returned vector will be - * the same as the scaling vector - * originally supplied. - * @param {vec3} out Vector to receive scaling factor component - * @param {ReadonlyMat4} mat Matrix to be decomposed (input) - * @return {vec3} out - */ - - function getScaling(out, mat) { - var m11 = mat[0]; - var m12 = mat[1]; - var m13 = mat[2]; - var m21 = mat[4]; - var m22 = mat[5]; - var m23 = mat[6]; - var m31 = mat[8]; - var m32 = mat[9]; - var m33 = mat[10]; - out[0] = Math.hypot(m11, m12, m13); - out[1] = Math.hypot(m21, m22, m23); - out[2] = Math.hypot(m31, m32, m33); - return out; - } - /** - * Returns a quaternion representing the rotational component - * of a transformation matrix. If a matrix is built with - * fromRotationTranslation, the returned quaternion will be the - * same as the quaternion originally supplied. - * @param {quat} out Quaternion to receive the rotation component - * @param {ReadonlyMat4} mat Matrix to be decomposed (input) - * @return {quat} out - */ - - function getRotation(out, mat) { - var scaling = new ARRAY_TYPE(3); - getScaling(scaling, mat); - var is1 = 1 / scaling[0]; - var is2 = 1 / scaling[1]; - var is3 = 1 / scaling[2]; - var sm11 = mat[0] * is1; - var sm12 = mat[1] * is2; - var sm13 = mat[2] * is3; - var sm21 = mat[4] * is1; - var sm22 = mat[5] * is2; - var sm23 = mat[6] * is3; - var sm31 = mat[8] * is1; - var sm32 = mat[9] * is2; - var sm33 = mat[10] * is3; - var trace = sm11 + sm22 + sm33; - var S = 0; - - if (trace > 0) { - S = Math.sqrt(trace + 1.0) * 2; - out[3] = 0.25 * S; - out[0] = (sm23 - sm32) / S; - out[1] = (sm31 - sm13) / S; - out[2] = (sm12 - sm21) / S; - } else if (sm11 > sm22 && sm11 > sm33) { - S = Math.sqrt(1.0 + sm11 - sm22 - sm33) * 2; - out[3] = (sm23 - sm32) / S; - out[0] = 0.25 * S; - out[1] = (sm12 + sm21) / S; - out[2] = (sm31 + sm13) / S; - } else if (sm22 > sm33) { - S = Math.sqrt(1.0 + sm22 - sm11 - sm33) * 2; - out[3] = (sm31 - sm13) / S; - out[0] = (sm12 + sm21) / S; - out[1] = 0.25 * S; - out[2] = (sm23 + sm32) / S; - } else { - S = Math.sqrt(1.0 + sm33 - sm11 - sm22) * 2; - out[3] = (sm12 - sm21) / S; - out[0] = (sm31 + sm13) / S; - out[1] = (sm23 + sm32) / S; - out[2] = 0.25 * S; - } - - return out; - } - /** - * Decomposes a transformation matrix into its rotation, translation - * and scale components. Returns only the rotation component - * @param {quat} out_r Quaternion to receive the rotation component - * @param {vec3} out_t Vector to receive the translation vector - * @param {vec3} out_s Vector to receive the scaling factor - * @param {ReadonlyMat4} mat Matrix to be decomposed (input) - * @returns {quat} out_r - */ - - function decompose(out_r, out_t, out_s, mat) { - out_t[0] = mat[12]; - out_t[1] = mat[13]; - out_t[2] = mat[14]; - var m11 = mat[0]; - var m12 = mat[1]; - var m13 = mat[2]; - var m21 = mat[4]; - var m22 = mat[5]; - var m23 = mat[6]; - var m31 = mat[8]; - var m32 = mat[9]; - var m33 = mat[10]; - out_s[0] = Math.hypot(m11, m12, m13); - out_s[1] = Math.hypot(m21, m22, m23); - out_s[2] = Math.hypot(m31, m32, m33); - var is1 = 1 / out_s[0]; - var is2 = 1 / out_s[1]; - var is3 = 1 / out_s[2]; - var sm11 = m11 * is1; - var sm12 = m12 * is2; - var sm13 = m13 * is3; - var sm21 = m21 * is1; - var sm22 = m22 * is2; - var sm23 = m23 * is3; - var sm31 = m31 * is1; - var sm32 = m32 * is2; - var sm33 = m33 * is3; - var trace = sm11 + sm22 + sm33; - var S = 0; - - if (trace > 0) { - S = Math.sqrt(trace + 1.0) * 2; - out_r[3] = 0.25 * S; - out_r[0] = (sm23 - sm32) / S; - out_r[1] = (sm31 - sm13) / S; - out_r[2] = (sm12 - sm21) / S; - } else if (sm11 > sm22 && sm11 > sm33) { - S = Math.sqrt(1.0 + sm11 - sm22 - sm33) * 2; - out_r[3] = (sm23 - sm32) / S; - out_r[0] = 0.25 * S; - out_r[1] = (sm12 + sm21) / S; - out_r[2] = (sm31 + sm13) / S; - } else if (sm22 > sm33) { - S = Math.sqrt(1.0 + sm22 - sm11 - sm33) * 2; - out_r[3] = (sm31 - sm13) / S; - out_r[0] = (sm12 + sm21) / S; - out_r[1] = 0.25 * S; - out_r[2] = (sm23 + sm32) / S; - } else { - S = Math.sqrt(1.0 + sm33 - sm11 - sm22) * 2; - out_r[3] = (sm12 - sm21) / S; - out_r[0] = (sm31 + sm13) / S; - out_r[1] = (sm23 + sm32) / S; - out_r[2] = 0.25 * S; - } - - return out_r; - } - /** - * Creates a matrix from a quaternion rotation, vector translation and vector scale - * This is equivalent to (but much faster than): - * - * mat4.identity(dest); - * mat4.translate(dest, vec); - * let quatMat = mat4.create(); - * quat4.toMat4(quat, quatMat); - * mat4.multiply(dest, quatMat); - * mat4.scale(dest, scale) - * - * @param {mat4} out mat4 receiving operation result - * @param {quat4} q Rotation quaternion - * @param {ReadonlyVec3} v Translation vector - * @param {ReadonlyVec3} s Scaling vector - * @returns {mat4} out - */ - - function fromRotationTranslationScale(out, q, v, s) { - // Quaternion math - var x = q[0], - y = q[1], - z = q[2], - w = q[3]; - var x2 = x + x; - var y2 = y + y; - var z2 = z + z; - var xx = x * x2; - var xy = x * y2; - var xz = x * z2; - var yy = y * y2; - var yz = y * z2; - var zz = z * z2; - var wx = w * x2; - var wy = w * y2; - var wz = w * z2; - var sx = s[0]; - var sy = s[1]; - var sz = s[2]; - out[0] = (1 - (yy + zz)) * sx; - out[1] = (xy + wz) * sx; - out[2] = (xz - wy) * sx; - out[3] = 0; - out[4] = (xy - wz) * sy; - out[5] = (1 - (xx + zz)) * sy; - out[6] = (yz + wx) * sy; - out[7] = 0; - out[8] = (xz + wy) * sz; - out[9] = (yz - wx) * sz; - out[10] = (1 - (xx + yy)) * sz; - out[11] = 0; - out[12] = v[0]; - out[13] = v[1]; - out[14] = v[2]; - out[15] = 1; - return out; - } - /** - * Creates a matrix from a quaternion rotation, vector translation and vector scale, rotating and scaling around the given origin - * This is equivalent to (but much faster than): - * - * mat4.identity(dest); - * mat4.translate(dest, vec); - * mat4.translate(dest, origin); - * let quatMat = mat4.create(); - * quat4.toMat4(quat, quatMat); - * mat4.multiply(dest, quatMat); - * mat4.scale(dest, scale) - * mat4.translate(dest, negativeOrigin); - * - * @param {mat4} out mat4 receiving operation result - * @param {quat4} q Rotation quaternion - * @param {ReadonlyVec3} v Translation vector - * @param {ReadonlyVec3} s Scaling vector - * @param {ReadonlyVec3} o The origin vector around which to scale and rotate - * @returns {mat4} out - */ - - function fromRotationTranslationScaleOrigin(out, q, v, s, o) { - // Quaternion math - var x = q[0], - y = q[1], - z = q[2], - w = q[3]; - var x2 = x + x; - var y2 = y + y; - var z2 = z + z; - var xx = x * x2; - var xy = x * y2; - var xz = x * z2; - var yy = y * y2; - var yz = y * z2; - var zz = z * z2; - var wx = w * x2; - var wy = w * y2; - var wz = w * z2; - var sx = s[0]; - var sy = s[1]; - var sz = s[2]; - var ox = o[0]; - var oy = o[1]; - var oz = o[2]; - var out0 = (1 - (yy + zz)) * sx; - var out1 = (xy + wz) * sx; - var out2 = (xz - wy) * sx; - var out4 = (xy - wz) * sy; - var out5 = (1 - (xx + zz)) * sy; - var out6 = (yz + wx) * sy; - var out8 = (xz + wy) * sz; - var out9 = (yz - wx) * sz; - var out10 = (1 - (xx + yy)) * sz; - out[0] = out0; - out[1] = out1; - out[2] = out2; - out[3] = 0; - out[4] = out4; - out[5] = out5; - out[6] = out6; - out[7] = 0; - out[8] = out8; - out[9] = out9; - out[10] = out10; - out[11] = 0; - out[12] = v[0] + ox - (out0 * ox + out4 * oy + out8 * oz); - out[13] = v[1] + oy - (out1 * ox + out5 * oy + out9 * oz); - out[14] = v[2] + oz - (out2 * ox + out6 * oy + out10 * oz); - out[15] = 1; - return out; - } - /** - * Calculates a 4x4 matrix from the given quaternion - * - * @param {mat4} out mat4 receiving operation result - * @param {ReadonlyQuat} q Quaternion to create matrix from - * - * @returns {mat4} out - */ - - function fromQuat$1(out, q) { - var x = q[0], - y = q[1], - z = q[2], - w = q[3]; - var x2 = x + x; - var y2 = y + y; - var z2 = z + z; - var xx = x * x2; - var yx = y * x2; - var yy = y * y2; - var zx = z * x2; - var zy = z * y2; - var zz = z * z2; - var wx = w * x2; - var wy = w * y2; - var wz = w * z2; - out[0] = 1 - yy - zz; - out[1] = yx + wz; - out[2] = zx - wy; - out[3] = 0; - out[4] = yx - wz; - out[5] = 1 - xx - zz; - out[6] = zy + wx; - out[7] = 0; - out[8] = zx + wy; - out[9] = zy - wx; - out[10] = 1 - xx - yy; - out[11] = 0; - out[12] = 0; - out[13] = 0; - out[14] = 0; - out[15] = 1; - return out; - } - /** - * Generates a frustum matrix with the given bounds - * - * @param {mat4} out mat4 frustum matrix will be written into - * @param {Number} left Left bound of the frustum - * @param {Number} right Right bound of the frustum - * @param {Number} bottom Bottom bound of the frustum - * @param {Number} top Top bound of the frustum - * @param {Number} near Near bound of the frustum - * @param {Number} far Far bound of the frustum - * @returns {mat4} out - */ - - function frustum(out, left, right, bottom, top, near, far) { - var rl = 1 / (right - left); - var tb = 1 / (top - bottom); - var nf = 1 / (near - far); - out[0] = near * 2 * rl; - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = 0; - out[5] = near * 2 * tb; - out[6] = 0; - out[7] = 0; - out[8] = (right + left) * rl; - out[9] = (top + bottom) * tb; - out[10] = (far + near) * nf; - out[11] = -1; - out[12] = 0; - out[13] = 0; - out[14] = far * near * 2 * nf; - out[15] = 0; - return out; - } - /** - * Generates a perspective projection matrix with the given bounds. - * Passing null/undefined/no value for far will generate infinite projection matrix. - * - * @param {mat4} out mat4 frustum matrix will be written into - * @param {number} fovy Vertical field of view in radians - * @param {number} aspect Aspect ratio. typically viewport width/height - * @param {number} near Near bound of the frustum - * @param {number} far Far bound of the frustum, can be null or Infinity - * @returns {mat4} out - */ - - function perspective(out, fovy, aspect, near, far) { - var f = 1.0 / Math.tan(fovy / 2), - nf; - out[0] = f / aspect; - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = 0; - out[5] = f; - out[6] = 0; - out[7] = 0; - out[8] = 0; - out[9] = 0; - out[11] = -1; - out[12] = 0; - out[13] = 0; - out[15] = 0; - - if (far != null && far !== Infinity) { - nf = 1 / (near - far); - out[10] = (far + near) * nf; - out[14] = 2 * far * near * nf; - } else { - out[10] = -1; - out[14] = -2 * near; - } - - return out; - } - /** - * Generates a perspective projection matrix with the given field of view. - * This is primarily useful for generating projection matrices to be used - * with the still experiemental WebVR API. - * - * @param {mat4} out mat4 frustum matrix will be written into - * @param {Object} fov Object containing the following values: upDegrees, downDegrees, leftDegrees, rightDegrees - * @param {number} near Near bound of the frustum - * @param {number} far Far bound of the frustum - * @returns {mat4} out - */ - - function perspectiveFromFieldOfView(out, fov, near, far) { - var upTan = Math.tan(fov.upDegrees * Math.PI / 180.0); - var downTan = Math.tan(fov.downDegrees * Math.PI / 180.0); - var leftTan = Math.tan(fov.leftDegrees * Math.PI / 180.0); - var rightTan = Math.tan(fov.rightDegrees * Math.PI / 180.0); - var xScale = 2.0 / (leftTan + rightTan); - var yScale = 2.0 / (upTan + downTan); - out[0] = xScale; - out[1] = 0.0; - out[2] = 0.0; - out[3] = 0.0; - out[4] = 0.0; - out[5] = yScale; - out[6] = 0.0; - out[7] = 0.0; - out[8] = -((leftTan - rightTan) * xScale * 0.5); - out[9] = (upTan - downTan) * yScale * 0.5; - out[10] = far / (near - far); - out[11] = -1.0; - out[12] = 0.0; - out[13] = 0.0; - out[14] = far * near / (near - far); - out[15] = 0.0; - return out; - } - /** - * Generates a orthogonal projection matrix with the given bounds - * - * @param {mat4} out mat4 frustum matrix will be written into - * @param {number} left Left bound of the frustum - * @param {number} right Right bound of the frustum - * @param {number} bottom Bottom bound of the frustum - * @param {number} top Top bound of the frustum - * @param {number} near Near bound of the frustum - * @param {number} far Far bound of the frustum - * @returns {mat4} out - */ - - function ortho(out, left, right, bottom, top, near, far) { - var lr = 1 / (left - right); - var bt = 1 / (bottom - top); - var nf = 1 / (near - far); - out[0] = -2 * lr; - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = 0; - out[5] = -2 * bt; - out[6] = 0; - out[7] = 0; - out[8] = 0; - out[9] = 0; - out[10] = 2 * nf; - out[11] = 0; - out[12] = (left + right) * lr; - out[13] = (top + bottom) * bt; - out[14] = (far + near) * nf; - out[15] = 1; - return out; - } - /** - * Generates a look-at matrix with the given eye position, focal point, and up axis. - * If you want a matrix that actually makes an object look at another object, you should use targetTo instead. - * - * @param {mat4} out mat4 frustum matrix will be written into - * @param {ReadonlyVec3} eye Position of the viewer - * @param {ReadonlyVec3} center Point the viewer is looking at - * @param {ReadonlyVec3} up vec3 pointing up - * @returns {mat4} out - */ - - function lookAt(out, eye, center, up) { - var x0, x1, x2, y0, y1, y2, z0, z1, z2, len; - var eyex = eye[0]; - var eyey = eye[1]; - var eyez = eye[2]; - var upx = up[0]; - var upy = up[1]; - var upz = up[2]; - var centerx = center[0]; - var centery = center[1]; - var centerz = center[2]; - - if (Math.abs(eyex - centerx) < EPSILON && Math.abs(eyey - centery) < EPSILON && Math.abs(eyez - centerz) < EPSILON) { - return identity$3(out); - } - - z0 = eyex - centerx; - z1 = eyey - centery; - z2 = eyez - centerz; - len = 1 / Math.hypot(z0, z1, z2); - z0 *= len; - z1 *= len; - z2 *= len; - x0 = upy * z2 - upz * z1; - x1 = upz * z0 - upx * z2; - x2 = upx * z1 - upy * z0; - len = Math.hypot(x0, x1, x2); - - if (!len) { - x0 = 0; - x1 = 0; - x2 = 0; - } else { - len = 1 / len; - x0 *= len; - x1 *= len; - x2 *= len; - } - - y0 = z1 * x2 - z2 * x1; - y1 = z2 * x0 - z0 * x2; - y2 = z0 * x1 - z1 * x0; - len = Math.hypot(y0, y1, y2); - - if (!len) { - y0 = 0; - y1 = 0; - y2 = 0; - } else { - len = 1 / len; - y0 *= len; - y1 *= len; - y2 *= len; - } - - out[0] = x0; - out[1] = y0; - out[2] = z0; - out[3] = 0; - out[4] = x1; - out[5] = y1; - out[6] = z1; - out[7] = 0; - out[8] = x2; - out[9] = y2; - out[10] = z2; - out[11] = 0; - out[12] = -(x0 * eyex + x1 * eyey + x2 * eyez); - out[13] = -(y0 * eyex + y1 * eyey + y2 * eyez); - out[14] = -(z0 * eyex + z1 * eyey + z2 * eyez); - out[15] = 1; - return out; - } - /** - * Generates a matrix that makes something look at something else. - * - * @param {mat4} out mat4 frustum matrix will be written into - * @param {ReadonlyVec3} eye Position of the viewer - * @param {ReadonlyVec3} center Point the viewer is looking at - * @param {ReadonlyVec3} up vec3 pointing up - * @returns {mat4} out - */ - - function targetTo(out, eye, target, up) { - var eyex = eye[0], - eyey = eye[1], - eyez = eye[2], - upx = up[0], - upy = up[1], - upz = up[2]; - var z0 = eyex - target[0], - z1 = eyey - target[1], - z2 = eyez - target[2]; - var len = z0 * z0 + z1 * z1 + z2 * z2; - - if (len > 0) { - len = 1 / Math.sqrt(len); - z0 *= len; - z1 *= len; - z2 *= len; - } - - var x0 = upy * z2 - upz * z1, - x1 = upz * z0 - upx * z2, - x2 = upx * z1 - upy * z0; - len = x0 * x0 + x1 * x1 + x2 * x2; - - if (len > 0) { - len = 1 / Math.sqrt(len); - x0 *= len; - x1 *= len; - x2 *= len; - } - - out[0] = x0; - out[1] = x1; - out[2] = x2; - out[3] = 0; - out[4] = z1 * x2 - z2 * x1; - out[5] = z2 * x0 - z0 * x2; - out[6] = z0 * x1 - z1 * x0; - out[7] = 0; - out[8] = z0; - out[9] = z1; - out[10] = z2; - out[11] = 0; - out[12] = eyex; - out[13] = eyey; - out[14] = eyez; - out[15] = 1; - return out; - } - /** - * Returns a string representation of a mat4 - * - * @param {ReadonlyMat4} a matrix to represent as a string - * @returns {String} string representation of the matrix - */ - - function str$3(a) { - return "mat4(" + a[0] + ", " + a[1] + ", " + a[2] + ", " + a[3] + ", " + a[4] + ", " + a[5] + ", " + a[6] + ", " + a[7] + ", " + a[8] + ", " + a[9] + ", " + a[10] + ", " + a[11] + ", " + a[12] + ", " + a[13] + ", " + a[14] + ", " + a[15] + ")"; - } - /** - * Returns Frobenius norm of a mat4 - * - * @param {ReadonlyMat4} a the matrix to calculate Frobenius norm of - * @returns {Number} Frobenius norm - */ - - function frob$3(a) { - return Math.hypot(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]); - } - /** - * Adds two mat4's - * - * @param {mat4} out the receiving matrix - * @param {ReadonlyMat4} a the first operand - * @param {ReadonlyMat4} b the second operand - * @returns {mat4} out - */ - - function add$3(out, a, b) { - out[0] = a[0] + b[0]; - out[1] = a[1] + b[1]; - out[2] = a[2] + b[2]; - out[3] = a[3] + b[3]; - out[4] = a[4] + b[4]; - out[5] = a[5] + b[5]; - out[6] = a[6] + b[6]; - out[7] = a[7] + b[7]; - out[8] = a[8] + b[8]; - out[9] = a[9] + b[9]; - out[10] = a[10] + b[10]; - out[11] = a[11] + b[11]; - out[12] = a[12] + b[12]; - out[13] = a[13] + b[13]; - out[14] = a[14] + b[14]; - out[15] = a[15] + b[15]; - return out; - } - /** - * Subtracts matrix b from matrix a - * - * @param {mat4} out the receiving matrix - * @param {ReadonlyMat4} a the first operand - * @param {ReadonlyMat4} b the second operand - * @returns {mat4} out - */ - - function subtract$3(out, a, b) { - out[0] = a[0] - b[0]; - out[1] = a[1] - b[1]; - out[2] = a[2] - b[2]; - out[3] = a[3] - b[3]; - out[4] = a[4] - b[4]; - out[5] = a[5] - b[5]; - out[6] = a[6] - b[6]; - out[7] = a[7] - b[7]; - out[8] = a[8] - b[8]; - out[9] = a[9] - b[9]; - out[10] = a[10] - b[10]; - out[11] = a[11] - b[11]; - out[12] = a[12] - b[12]; - out[13] = a[13] - b[13]; - out[14] = a[14] - b[14]; - out[15] = a[15] - b[15]; - return out; - } - /** - * Multiply each element of the matrix by a scalar. - * - * @param {mat4} out the receiving matrix - * @param {ReadonlyMat4} a the matrix to scale - * @param {Number} b amount to scale the matrix's elements by - * @returns {mat4} out - */ - - function multiplyScalar$3(out, a, b) { - out[0] = a[0] * b; - out[1] = a[1] * b; - out[2] = a[2] * b; - out[3] = a[3] * b; - out[4] = a[4] * b; - out[5] = a[5] * b; - out[6] = a[6] * b; - out[7] = a[7] * b; - out[8] = a[8] * b; - out[9] = a[9] * b; - out[10] = a[10] * b; - out[11] = a[11] * b; - out[12] = a[12] * b; - out[13] = a[13] * b; - out[14] = a[14] * b; - out[15] = a[15] * b; - return out; - } - /** - * Adds two mat4's after multiplying each element of the second operand by a scalar value. - * - * @param {mat4} out the receiving vector - * @param {ReadonlyMat4} a the first operand - * @param {ReadonlyMat4} b the second operand - * @param {Number} scale the amount to scale b's elements by before adding - * @returns {mat4} out - */ - - function multiplyScalarAndAdd$3(out, a, b, scale) { - out[0] = a[0] + b[0] * scale; - out[1] = a[1] + b[1] * scale; - out[2] = a[2] + b[2] * scale; - out[3] = a[3] + b[3] * scale; - out[4] = a[4] + b[4] * scale; - out[5] = a[5] + b[5] * scale; - out[6] = a[6] + b[6] * scale; - out[7] = a[7] + b[7] * scale; - out[8] = a[8] + b[8] * scale; - out[9] = a[9] + b[9] * scale; - out[10] = a[10] + b[10] * scale; - out[11] = a[11] + b[11] * scale; - out[12] = a[12] + b[12] * scale; - out[13] = a[13] + b[13] * scale; - out[14] = a[14] + b[14] * scale; - out[15] = a[15] + b[15] * scale; - return out; - } - /** - * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===) - * - * @param {ReadonlyMat4} a The first matrix. - * @param {ReadonlyMat4} b The second matrix. - * @returns {Boolean} True if the matrices are equal, false otherwise. - */ - - function exactEquals$3(a, b) { - return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5] && a[6] === b[6] && a[7] === b[7] && a[8] === b[8] && a[9] === b[9] && a[10] === b[10] && a[11] === b[11] && a[12] === b[12] && a[13] === b[13] && a[14] === b[14] && a[15] === b[15]; - } - /** - * Returns whether or not the matrices have approximately the same elements in the same position. - * - * @param {ReadonlyMat4} a The first matrix. - * @param {ReadonlyMat4} b The second matrix. - * @returns {Boolean} True if the matrices are equal, false otherwise. - */ - - function equals$4(a, b) { - var a0 = a[0], - a1 = a[1], - a2 = a[2], - a3 = a[3]; - var a4 = a[4], - a5 = a[5], - a6 = a[6], - a7 = a[7]; - var a8 = a[8], - a9 = a[9], - a10 = a[10], - a11 = a[11]; - var a12 = a[12], - a13 = a[13], - a14 = a[14], - a15 = a[15]; - var b0 = b[0], - b1 = b[1], - b2 = b[2], - b3 = b[3]; - var b4 = b[4], - b5 = b[5], - b6 = b[6], - b7 = b[7]; - var b8 = b[8], - b9 = b[9], - b10 = b[10], - b11 = b[11]; - var b12 = b[12], - b13 = b[13], - b14 = b[14], - b15 = b[15]; - return Math.abs(a0 - b0) <= EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= EPSILON * Math.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= EPSILON * Math.max(1.0, Math.abs(a5), Math.abs(b5)) && Math.abs(a6 - b6) <= EPSILON * Math.max(1.0, Math.abs(a6), Math.abs(b6)) && Math.abs(a7 - b7) <= EPSILON * Math.max(1.0, Math.abs(a7), Math.abs(b7)) && Math.abs(a8 - b8) <= EPSILON * Math.max(1.0, Math.abs(a8), Math.abs(b8)) && Math.abs(a9 - b9) <= EPSILON * Math.max(1.0, Math.abs(a9), Math.abs(b9)) && Math.abs(a10 - b10) <= EPSILON * Math.max(1.0, Math.abs(a10), Math.abs(b10)) && Math.abs(a11 - b11) <= EPSILON * Math.max(1.0, Math.abs(a11), Math.abs(b11)) && Math.abs(a12 - b12) <= EPSILON * Math.max(1.0, Math.abs(a12), Math.abs(b12)) && Math.abs(a13 - b13) <= EPSILON * Math.max(1.0, Math.abs(a13), Math.abs(b13)) && Math.abs(a14 - b14) <= EPSILON * Math.max(1.0, Math.abs(a14), Math.abs(b14)) && Math.abs(a15 - b15) <= EPSILON * Math.max(1.0, Math.abs(a15), Math.abs(b15)); - } - /** - * Alias for {@link mat4.multiply} - * @function - */ - - var mul$3 = multiply$3; - /** - * Alias for {@link mat4.subtract} - * @function - */ - - var sub$3 = subtract$3; - - var mat4 = /*#__PURE__*/Object.freeze({ - __proto__: null, - create: create$3, - clone: clone$3, - copy: copy$3, - fromValues: fromValues$3, - set: set$3, - identity: identity$3, - transpose: transpose$2, - invert: invert$3, - adjoint: adjoint$2, - determinant: determinant$3, - multiply: multiply$3, - translate: translate$2, - scale: scale$3, - rotate: rotate$3, - rotateX: rotateX, - rotateY: rotateY, - rotateZ: rotateZ, - fromTranslation: fromTranslation$2, - fromScaling: fromScaling$3, - fromRotation: fromRotation$3, - fromXRotation: fromXRotation, - fromYRotation: fromYRotation, - fromZRotation: fromZRotation, - fromRotationTranslation: fromRotationTranslation, - fromQuat2: fromQuat2, - getTranslation: getTranslation, - getScaling: getScaling, - getRotation: getRotation, - decompose: decompose, - fromRotationTranslationScale: fromRotationTranslationScale, - fromRotationTranslationScaleOrigin: fromRotationTranslationScaleOrigin, - fromQuat: fromQuat$1, - frustum: frustum, - perspective: perspective, - perspectiveFromFieldOfView: perspectiveFromFieldOfView, - ortho: ortho, - lookAt: lookAt, - targetTo: targetTo, - str: str$3, - frob: frob$3, - add: add$3, - subtract: subtract$3, - multiplyScalar: multiplyScalar$3, - multiplyScalarAndAdd: multiplyScalarAndAdd$3, - exactEquals: exactEquals$3, - equals: equals$4, - mul: mul$3, - sub: sub$3 - }); - - /** - * 3 Dimensional Vector - * @module vec3 - */ - - /** - * Creates a new, empty vec3 - * - * @returns {vec3} a new 3D vector - */ - - function create$4() { - var out = new ARRAY_TYPE(3); - - if (ARRAY_TYPE != Float32Array) { - out[0] = 0; - out[1] = 0; - out[2] = 0; - } - - return out; - } - /** - * Creates a new vec3 initialized with values from an existing vector - * - * @param {ReadonlyVec3} a vector to clone - * @returns {vec3} a new 3D vector - */ - - function clone$4(a) { - var out = new ARRAY_TYPE(3); - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - return out; - } - /** - * Calculates the length of a vec3 - * - * @param {ReadonlyVec3} a vector to calculate length of - * @returns {Number} length of a - */ - - function length(a) { - var x = a[0]; - var y = a[1]; - var z = a[2]; - return Math.hypot(x, y, z); - } - /** - * Creates a new vec3 initialized with the given values - * - * @param {Number} x X component - * @param {Number} y Y component - * @param {Number} z Z component - * @returns {vec3} a new 3D vector - */ - - function fromValues$4(x, y, z) { - var out = new ARRAY_TYPE(3); - out[0] = x; - out[1] = y; - out[2] = z; - return out; - } - /** - * Copy the values from one vec3 to another - * - * @param {vec3} out the receiving vector - * @param {ReadonlyVec3} a the source vector - * @returns {vec3} out - */ - - function copy$4(out, a) { - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - return out; - } - /** - * Set the components of a vec3 to the given values - * - * @param {vec3} out the receiving vector - * @param {Number} x X component - * @param {Number} y Y component - * @param {Number} z Z component - * @returns {vec3} out - */ - - function set$4(out, x, y, z) { - out[0] = x; - out[1] = y; - out[2] = z; - return out; - } - /** - * Adds two vec3's - * - * @param {vec3} out the receiving vector - * @param {ReadonlyVec3} a the first operand - * @param {ReadonlyVec3} b the second operand - * @returns {vec3} out - */ - - function add$4(out, a, b) { - out[0] = a[0] + b[0]; - out[1] = a[1] + b[1]; - out[2] = a[2] + b[2]; - return out; - } - /** - * Subtracts vector b from vector a - * - * @param {vec3} out the receiving vector - * @param {ReadonlyVec3} a the first operand - * @param {ReadonlyVec3} b the second operand - * @returns {vec3} out - */ - - function subtract$4(out, a, b) { - out[0] = a[0] - b[0]; - out[1] = a[1] - b[1]; - out[2] = a[2] - b[2]; - return out; - } - /** - * Multiplies two vec3's - * - * @param {vec3} out the receiving vector - * @param {ReadonlyVec3} a the first operand - * @param {ReadonlyVec3} b the second operand - * @returns {vec3} out - */ - - function multiply$4(out, a, b) { - out[0] = a[0] * b[0]; - out[1] = a[1] * b[1]; - out[2] = a[2] * b[2]; - return out; - } - /** - * Divides two vec3's - * - * @param {vec3} out the receiving vector - * @param {ReadonlyVec3} a the first operand - * @param {ReadonlyVec3} b the second operand - * @returns {vec3} out - */ - - function divide(out, a, b) { - out[0] = a[0] / b[0]; - out[1] = a[1] / b[1]; - out[2] = a[2] / b[2]; - return out; - } - /** - * Math.ceil the components of a vec3 - * - * @param {vec3} out the receiving vector - * @param {ReadonlyVec3} a vector to ceil - * @returns {vec3} out - */ - - function ceil(out, a) { - out[0] = Math.ceil(a[0]); - out[1] = Math.ceil(a[1]); - out[2] = Math.ceil(a[2]); - return out; - } - /** - * Math.floor the components of a vec3 - * - * @param {vec3} out the receiving vector - * @param {ReadonlyVec3} a vector to floor - * @returns {vec3} out - */ - - function floor(out, a) { - out[0] = Math.floor(a[0]); - out[1] = Math.floor(a[1]); - out[2] = Math.floor(a[2]); - return out; - } - /** - * Returns the minimum of two vec3's - * - * @param {vec3} out the receiving vector - * @param {ReadonlyVec3} a the first operand - * @param {ReadonlyVec3} b the second operand - * @returns {vec3} out - */ - - function min(out, a, b) { - out[0] = Math.min(a[0], b[0]); - out[1] = Math.min(a[1], b[1]); - out[2] = Math.min(a[2], b[2]); - return out; - } - /** - * Returns the maximum of two vec3's - * - * @param {vec3} out the receiving vector - * @param {ReadonlyVec3} a the first operand - * @param {ReadonlyVec3} b the second operand - * @returns {vec3} out - */ - - function max(out, a, b) { - out[0] = Math.max(a[0], b[0]); - out[1] = Math.max(a[1], b[1]); - out[2] = Math.max(a[2], b[2]); - return out; - } - /** - * Math.round the components of a vec3 - * - * @param {vec3} out the receiving vector - * @param {ReadonlyVec3} a vector to round - * @returns {vec3} out - */ - - function round(out, a) { - out[0] = Math.round(a[0]); - out[1] = Math.round(a[1]); - out[2] = Math.round(a[2]); - return out; - } - /** - * Scales a vec3 by a scalar number - * - * @param {vec3} out the receiving vector - * @param {ReadonlyVec3} a the vector to scale - * @param {Number} b amount to scale the vector by - * @returns {vec3} out - */ - - function scale$4(out, a, b) { - out[0] = a[0] * b; - out[1] = a[1] * b; - out[2] = a[2] * b; - return out; - } - /** - * Adds two vec3's after scaling the second operand by a scalar value - * - * @param {vec3} out the receiving vector - * @param {ReadonlyVec3} a the first operand - * @param {ReadonlyVec3} b the second operand - * @param {Number} scale the amount to scale b by before adding - * @returns {vec3} out - */ - - function scaleAndAdd(out, a, b, scale) { - out[0] = a[0] + b[0] * scale; - out[1] = a[1] + b[1] * scale; - out[2] = a[2] + b[2] * scale; - return out; - } - /** - * Calculates the euclidian distance between two vec3's - * - * @param {ReadonlyVec3} a the first operand - * @param {ReadonlyVec3} b the second operand - * @returns {Number} distance between a and b - */ - - function distance(a, b) { - var x = b[0] - a[0]; - var y = b[1] - a[1]; - var z = b[2] - a[2]; - return Math.hypot(x, y, z); - } - /** - * Calculates the squared euclidian distance between two vec3's - * - * @param {ReadonlyVec3} a the first operand - * @param {ReadonlyVec3} b the second operand - * @returns {Number} squared distance between a and b - */ - - function squaredDistance(a, b) { - var x = b[0] - a[0]; - var y = b[1] - a[1]; - var z = b[2] - a[2]; - return x * x + y * y + z * z; - } - /** - * Calculates the squared length of a vec3 - * - * @param {ReadonlyVec3} a vector to calculate squared length of - * @returns {Number} squared length of a - */ - - function squaredLength(a) { - var x = a[0]; - var y = a[1]; - var z = a[2]; - return x * x + y * y + z * z; - } - /** - * Negates the components of a vec3 - * - * @param {vec3} out the receiving vector - * @param {ReadonlyVec3} a vector to negate - * @returns {vec3} out - */ - - function negate(out, a) { - out[0] = -a[0]; - out[1] = -a[1]; - out[2] = -a[2]; - return out; - } - /** - * Returns the inverse of the components of a vec3 - * - * @param {vec3} out the receiving vector - * @param {ReadonlyVec3} a vector to invert - * @returns {vec3} out - */ - - function inverse(out, a) { - out[0] = 1.0 / a[0]; - out[1] = 1.0 / a[1]; - out[2] = 1.0 / a[2]; - return out; - } - /** - * Normalize a vec3 - * - * @param {vec3} out the receiving vector - * @param {ReadonlyVec3} a vector to normalize - * @returns {vec3} out - */ - - function normalize(out, a) { - var x = a[0]; - var y = a[1]; - var z = a[2]; - var len = x * x + y * y + z * z; - - if (len > 0) { - //TODO: evaluate use of glm_invsqrt here? - len = 1 / Math.sqrt(len); - } - - out[0] = a[0] * len; - out[1] = a[1] * len; - out[2] = a[2] * len; - return out; - } - /** - * Calculates the dot product of two vec3's - * - * @param {ReadonlyVec3} a the first operand - * @param {ReadonlyVec3} b the second operand - * @returns {Number} dot product of a and b - */ - - function dot(a, b) { - return a[0] * b[0] + a[1] * b[1] + a[2] * b[2]; - } - /** - * Computes the cross product of two vec3's - * - * @param {vec3} out the receiving vector - * @param {ReadonlyVec3} a the first operand - * @param {ReadonlyVec3} b the second operand - * @returns {vec3} out - */ - - function cross(out, a, b) { - var ax = a[0], - ay = a[1], - az = a[2]; - var bx = b[0], - by = b[1], - bz = b[2]; - out[0] = ay * bz - az * by; - out[1] = az * bx - ax * bz; - out[2] = ax * by - ay * bx; - return out; - } - /** - * Performs a linear interpolation between two vec3's - * - * @param {vec3} out the receiving vector - * @param {ReadonlyVec3} a the first operand - * @param {ReadonlyVec3} b the second operand - * @param {Number} t interpolation amount, in the range [0-1], between the two inputs - * @returns {vec3} out - */ - - function lerp(out, a, b, t) { - var ax = a[0]; - var ay = a[1]; - var az = a[2]; - out[0] = ax + t * (b[0] - ax); - out[1] = ay + t * (b[1] - ay); - out[2] = az + t * (b[2] - az); - return out; - } - /** - * Performs a spherical linear interpolation between two vec3's - * - * @param {vec3} out the receiving vector - * @param {ReadonlyVec3} a the first operand - * @param {ReadonlyVec3} b the second operand - * @param {Number} t interpolation amount, in the range [0-1], between the two inputs - * @returns {vec3} out - */ - - function slerp(out, a, b, t) { - var angle = Math.acos(Math.min(Math.max(dot(a, b), -1), 1)); - var sinTotal = Math.sin(angle); - var ratioA = Math.sin((1 - t) * angle) / sinTotal; - var ratioB = Math.sin(t * angle) / sinTotal; - out[0] = ratioA * a[0] + ratioB * b[0]; - out[1] = ratioA * a[1] + ratioB * b[1]; - out[2] = ratioA * a[2] + ratioB * b[2]; - return out; - } - /** - * Performs a hermite interpolation with two control points - * - * @param {vec3} out the receiving vector - * @param {ReadonlyVec3} a the first operand - * @param {ReadonlyVec3} b the second operand - * @param {ReadonlyVec3} c the third operand - * @param {ReadonlyVec3} d the fourth operand - * @param {Number} t interpolation amount, in the range [0-1], between the two inputs - * @returns {vec3} out - */ - - function hermite(out, a, b, c, d, t) { - var factorTimes2 = t * t; - var factor1 = factorTimes2 * (2 * t - 3) + 1; - var factor2 = factorTimes2 * (t - 2) + t; - var factor3 = factorTimes2 * (t - 1); - var factor4 = factorTimes2 * (3 - 2 * t); - out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4; - out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4; - out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4; - return out; - } - /** - * Performs a bezier interpolation with two control points - * - * @param {vec3} out the receiving vector - * @param {ReadonlyVec3} a the first operand - * @param {ReadonlyVec3} b the second operand - * @param {ReadonlyVec3} c the third operand - * @param {ReadonlyVec3} d the fourth operand - * @param {Number} t interpolation amount, in the range [0-1], between the two inputs - * @returns {vec3} out - */ - - function bezier(out, a, b, c, d, t) { - var inverseFactor = 1 - t; - var inverseFactorTimesTwo = inverseFactor * inverseFactor; - var factorTimes2 = t * t; - var factor1 = inverseFactorTimesTwo * inverseFactor; - var factor2 = 3 * t * inverseFactorTimesTwo; - var factor3 = 3 * factorTimes2 * inverseFactor; - var factor4 = factorTimes2 * t; - out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4; - out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4; - out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4; - return out; - } - /** - * Generates a random vector with the given scale - * - * @param {vec3} out the receiving vector - * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned - * @returns {vec3} out - */ - - function random(out, scale) { - scale = scale || 1.0; - var r = RANDOM() * 2.0 * Math.PI; - var z = RANDOM() * 2.0 - 1.0; - var zScale = Math.sqrt(1.0 - z * z) * scale; - out[0] = Math.cos(r) * zScale; - out[1] = Math.sin(r) * zScale; - out[2] = z * scale; - return out; - } - /** - * Transforms the vec3 with a mat4. - * 4th vector component is implicitly '1' - * - * @param {vec3} out the receiving vector - * @param {ReadonlyVec3} a the vector to transform - * @param {ReadonlyMat4} m matrix to transform with - * @returns {vec3} out - */ - - function transformMat4(out, a, m) { - var x = a[0], - y = a[1], - z = a[2]; - var w = m[3] * x + m[7] * y + m[11] * z + m[15]; - w = w || 1.0; - out[0] = (m[0] * x + m[4] * y + m[8] * z + m[12]) / w; - out[1] = (m[1] * x + m[5] * y + m[9] * z + m[13]) / w; - out[2] = (m[2] * x + m[6] * y + m[10] * z + m[14]) / w; - return out; - } - /** - * Transforms the vec3 with a mat3. - * - * @param {vec3} out the receiving vector - * @param {ReadonlyVec3} a the vector to transform - * @param {ReadonlyMat3} m the 3x3 matrix to transform with - * @returns {vec3} out - */ - - function transformMat3(out, a, m) { - var x = a[0], - y = a[1], - z = a[2]; - out[0] = x * m[0] + y * m[3] + z * m[6]; - out[1] = x * m[1] + y * m[4] + z * m[7]; - out[2] = x * m[2] + y * m[5] + z * m[8]; - return out; - } - /** - * Transforms the vec3 with a quat - * Can also be used for dual quaternions. (Multiply it with the real part) - * - * @param {vec3} out the receiving vector - * @param {ReadonlyVec3} a the vector to transform - * @param {ReadonlyQuat} q quaternion to transform with - * @returns {vec3} out - */ - - function transformQuat(out, a, q) { - // benchmarks: https://jsperf.com/quaternion-transform-vec3-implementations-fixed - var qx = q[0], - qy = q[1], - qz = q[2], - qw = q[3]; - var x = a[0], - y = a[1], - z = a[2]; // var qvec = [qx, qy, qz]; - // var uv = vec3.cross([], qvec, a); - - var uvx = qy * z - qz * y, - uvy = qz * x - qx * z, - uvz = qx * y - qy * x; // var uuv = vec3.cross([], qvec, uv); - - var uuvx = qy * uvz - qz * uvy, - uuvy = qz * uvx - qx * uvz, - uuvz = qx * uvy - qy * uvx; // vec3.scale(uv, uv, 2 * w); - - var w2 = qw * 2; - uvx *= w2; - uvy *= w2; - uvz *= w2; // vec3.scale(uuv, uuv, 2); - - uuvx *= 2; - uuvy *= 2; - uuvz *= 2; // return vec3.add(out, a, vec3.add(out, uv, uuv)); - - out[0] = x + uvx + uuvx; - out[1] = y + uvy + uuvy; - out[2] = z + uvz + uuvz; - return out; - } - /** - * Rotate a 3D vector around the x-axis - * @param {vec3} out The receiving vec3 - * @param {ReadonlyVec3} a The vec3 point to rotate - * @param {ReadonlyVec3} b The origin of the rotation - * @param {Number} rad The angle of rotation in radians - * @returns {vec3} out - */ - - function rotateX$1(out, a, b, rad) { - var p = [], - r = []; //Translate point to the origin - - p[0] = a[0] - b[0]; - p[1] = a[1] - b[1]; - p[2] = a[2] - b[2]; //perform rotation - - r[0] = p[0]; - r[1] = p[1] * Math.cos(rad) - p[2] * Math.sin(rad); - r[2] = p[1] * Math.sin(rad) + p[2] * Math.cos(rad); //translate to correct position - - out[0] = r[0] + b[0]; - out[1] = r[1] + b[1]; - out[2] = r[2] + b[2]; - return out; - } - /** - * Rotate a 3D vector around the y-axis - * @param {vec3} out The receiving vec3 - * @param {ReadonlyVec3} a The vec3 point to rotate - * @param {ReadonlyVec3} b The origin of the rotation - * @param {Number} rad The angle of rotation in radians - * @returns {vec3} out - */ - - function rotateY$1(out, a, b, rad) { - var p = [], - r = []; //Translate point to the origin - - p[0] = a[0] - b[0]; - p[1] = a[1] - b[1]; - p[2] = a[2] - b[2]; //perform rotation - - r[0] = p[2] * Math.sin(rad) + p[0] * Math.cos(rad); - r[1] = p[1]; - r[2] = p[2] * Math.cos(rad) - p[0] * Math.sin(rad); //translate to correct position - - out[0] = r[0] + b[0]; - out[1] = r[1] + b[1]; - out[2] = r[2] + b[2]; - return out; - } - /** - * Rotate a 3D vector around the z-axis - * @param {vec3} out The receiving vec3 - * @param {ReadonlyVec3} a The vec3 point to rotate - * @param {ReadonlyVec3} b The origin of the rotation - * @param {Number} rad The angle of rotation in radians - * @returns {vec3} out - */ - - function rotateZ$1(out, a, b, rad) { - var p = [], - r = []; //Translate point to the origin - - p[0] = a[0] - b[0]; - p[1] = a[1] - b[1]; - p[2] = a[2] - b[2]; //perform rotation - - r[0] = p[0] * Math.cos(rad) - p[1] * Math.sin(rad); - r[1] = p[0] * Math.sin(rad) + p[1] * Math.cos(rad); - r[2] = p[2]; //translate to correct position - - out[0] = r[0] + b[0]; - out[1] = r[1] + b[1]; - out[2] = r[2] + b[2]; - return out; - } - /** - * Get the angle between two 3D vectors - * @param {ReadonlyVec3} a The first operand - * @param {ReadonlyVec3} b The second operand - * @returns {Number} The angle in radians - */ - - function angle(a, b) { - var ax = a[0], - ay = a[1], - az = a[2], - bx = b[0], - by = b[1], - bz = b[2], - mag1 = Math.sqrt(ax * ax + ay * ay + az * az), - mag2 = Math.sqrt(bx * bx + by * by + bz * bz), - mag = mag1 * mag2, - cosine = mag && dot(a, b) / mag; - return Math.acos(Math.min(Math.max(cosine, -1), 1)); - } - /** - * Set the components of a vec3 to zero - * - * @param {vec3} out the receiving vector - * @returns {vec3} out - */ - - function zero(out) { - out[0] = 0.0; - out[1] = 0.0; - out[2] = 0.0; - return out; - } - /** - * Returns a string representation of a vector - * - * @param {ReadonlyVec3} a vector to represent as a string - * @returns {String} string representation of the vector - */ - - function str$4(a) { - return "vec3(" + a[0] + ", " + a[1] + ", " + a[2] + ")"; - } - /** - * Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===) - * - * @param {ReadonlyVec3} a The first vector. - * @param {ReadonlyVec3} b The second vector. - * @returns {Boolean} True if the vectors are equal, false otherwise. - */ - - function exactEquals$4(a, b) { - return a[0] === b[0] && a[1] === b[1] && a[2] === b[2]; - } - /** - * Returns whether or not the vectors have approximately the same elements in the same position. - * - * @param {ReadonlyVec3} a The first vector. - * @param {ReadonlyVec3} b The second vector. - * @returns {Boolean} True if the vectors are equal, false otherwise. - */ - - function equals$5(a, b) { - var a0 = a[0], - a1 = a[1], - a2 = a[2]; - var b0 = b[0], - b1 = b[1], - b2 = b[2]; - return Math.abs(a0 - b0) <= EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)); - } - /** - * Alias for {@link vec3.subtract} - * @function - */ - - var sub$4 = subtract$4; - /** - * Alias for {@link vec3.multiply} - * @function - */ - - var mul$4 = multiply$4; - /** - * Alias for {@link vec3.divide} - * @function - */ - - var div = divide; - /** - * Alias for {@link vec3.distance} - * @function - */ - - var dist = distance; - /** - * Alias for {@link vec3.squaredDistance} - * @function - */ - - var sqrDist = squaredDistance; - /** - * Alias for {@link vec3.length} - * @function - */ - - var len = length; - /** - * Alias for {@link vec3.squaredLength} - * @function - */ - - var sqrLen = squaredLength; - /** - * Perform some operation over an array of vec3s. - * - * @param {Array} a the array of vectors to iterate over - * @param {Number} stride Number of elements between the start of each vec3. If 0 assumes tightly packed - * @param {Number} offset Number of elements to skip at the beginning of the array - * @param {Number} count Number of vec3s to iterate over. If 0 iterates over entire array - * @param {Function} fn Function to call for each vector in the array - * @param {Object} [arg] additional argument to pass to fn - * @returns {Array} a - * @function - */ - - var forEach = function () { - var vec = create$4(); - return function (a, stride, offset, count, fn, arg) { - var i, l; - - if (!stride) { - stride = 3; - } - - if (!offset) { - offset = 0; - } - - if (count) { - l = Math.min(count * stride + offset, a.length); - } else { - l = a.length; - } - - for (i = offset; i < l; i += stride) { - vec[0] = a[i]; - vec[1] = a[i + 1]; - vec[2] = a[i + 2]; - fn(vec, vec, arg); - a[i] = vec[0]; - a[i + 1] = vec[1]; - a[i + 2] = vec[2]; - } - - return a; - }; - }(); - - var vec3 = /*#__PURE__*/Object.freeze({ - __proto__: null, - create: create$4, - clone: clone$4, - length: length, - fromValues: fromValues$4, - copy: copy$4, - set: set$4, - add: add$4, - subtract: subtract$4, - multiply: multiply$4, - divide: divide, - ceil: ceil, - floor: floor, - min: min, - max: max, - round: round, - scale: scale$4, - scaleAndAdd: scaleAndAdd, - distance: distance, - squaredDistance: squaredDistance, - squaredLength: squaredLength, - negate: negate, - inverse: inverse, - normalize: normalize, - dot: dot, - cross: cross, - lerp: lerp, - slerp: slerp, - hermite: hermite, - bezier: bezier, - random: random, - transformMat4: transformMat4, - transformMat3: transformMat3, - transformQuat: transformQuat, - rotateX: rotateX$1, - rotateY: rotateY$1, - rotateZ: rotateZ$1, - angle: angle, - zero: zero, - str: str$4, - exactEquals: exactEquals$4, - equals: equals$5, - sub: sub$4, - mul: mul$4, - div: div, - dist: dist, - sqrDist: sqrDist, - len: len, - sqrLen: sqrLen, - forEach: forEach - }); - - /** - * 4 Dimensional Vector - * @module vec4 - */ - - /** - * Creates a new, empty vec4 - * - * @returns {vec4} a new 4D vector - */ - - function create$5() { - var out = new ARRAY_TYPE(4); - - if (ARRAY_TYPE != Float32Array) { - out[0] = 0; - out[1] = 0; - out[2] = 0; - out[3] = 0; - } - - return out; - } - /** - * Creates a new vec4 initialized with values from an existing vector - * - * @param {ReadonlyVec4} a vector to clone - * @returns {vec4} a new 4D vector - */ - - function clone$5(a) { - var out = new ARRAY_TYPE(4); - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - return out; - } - /** - * Creates a new vec4 initialized with the given values - * - * @param {Number} x X component - * @param {Number} y Y component - * @param {Number} z Z component - * @param {Number} w W component - * @returns {vec4} a new 4D vector - */ - - function fromValues$5(x, y, z, w) { - var out = new ARRAY_TYPE(4); - out[0] = x; - out[1] = y; - out[2] = z; - out[3] = w; - return out; - } - /** - * Copy the values from one vec4 to another - * - * @param {vec4} out the receiving vector - * @param {ReadonlyVec4} a the source vector - * @returns {vec4} out - */ - - function copy$5(out, a) { - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - return out; - } - /** - * Set the components of a vec4 to the given values - * - * @param {vec4} out the receiving vector - * @param {Number} x X component - * @param {Number} y Y component - * @param {Number} z Z component - * @param {Number} w W component - * @returns {vec4} out - */ - - function set$5(out, x, y, z, w) { - out[0] = x; - out[1] = y; - out[2] = z; - out[3] = w; - return out; - } - /** - * Adds two vec4's - * - * @param {vec4} out the receiving vector - * @param {ReadonlyVec4} a the first operand - * @param {ReadonlyVec4} b the second operand - * @returns {vec4} out - */ - - function add$5(out, a, b) { - out[0] = a[0] + b[0]; - out[1] = a[1] + b[1]; - out[2] = a[2] + b[2]; - out[3] = a[3] + b[3]; - return out; - } - /** - * Subtracts vector b from vector a - * - * @param {vec4} out the receiving vector - * @param {ReadonlyVec4} a the first operand - * @param {ReadonlyVec4} b the second operand - * @returns {vec4} out - */ - - function subtract$5(out, a, b) { - out[0] = a[0] - b[0]; - out[1] = a[1] - b[1]; - out[2] = a[2] - b[2]; - out[3] = a[3] - b[3]; - return out; - } - /** - * Multiplies two vec4's - * - * @param {vec4} out the receiving vector - * @param {ReadonlyVec4} a the first operand - * @param {ReadonlyVec4} b the second operand - * @returns {vec4} out - */ - - function multiply$5(out, a, b) { - out[0] = a[0] * b[0]; - out[1] = a[1] * b[1]; - out[2] = a[2] * b[2]; - out[3] = a[3] * b[3]; - return out; - } - /** - * Divides two vec4's - * - * @param {vec4} out the receiving vector - * @param {ReadonlyVec4} a the first operand - * @param {ReadonlyVec4} b the second operand - * @returns {vec4} out - */ - - function divide$1(out, a, b) { - out[0] = a[0] / b[0]; - out[1] = a[1] / b[1]; - out[2] = a[2] / b[2]; - out[3] = a[3] / b[3]; - return out; - } - /** - * Math.ceil the components of a vec4 - * - * @param {vec4} out the receiving vector - * @param {ReadonlyVec4} a vector to ceil - * @returns {vec4} out - */ - - function ceil$1(out, a) { - out[0] = Math.ceil(a[0]); - out[1] = Math.ceil(a[1]); - out[2] = Math.ceil(a[2]); - out[3] = Math.ceil(a[3]); - return out; - } - /** - * Math.floor the components of a vec4 - * - * @param {vec4} out the receiving vector - * @param {ReadonlyVec4} a vector to floor - * @returns {vec4} out - */ - - function floor$1(out, a) { - out[0] = Math.floor(a[0]); - out[1] = Math.floor(a[1]); - out[2] = Math.floor(a[2]); - out[3] = Math.floor(a[3]); - return out; - } - /** - * Returns the minimum of two vec4's - * - * @param {vec4} out the receiving vector - * @param {ReadonlyVec4} a the first operand - * @param {ReadonlyVec4} b the second operand - * @returns {vec4} out - */ - - function min$1(out, a, b) { - out[0] = Math.min(a[0], b[0]); - out[1] = Math.min(a[1], b[1]); - out[2] = Math.min(a[2], b[2]); - out[3] = Math.min(a[3], b[3]); - return out; - } - /** - * Returns the maximum of two vec4's - * - * @param {vec4} out the receiving vector - * @param {ReadonlyVec4} a the first operand - * @param {ReadonlyVec4} b the second operand - * @returns {vec4} out - */ - - function max$1(out, a, b) { - out[0] = Math.max(a[0], b[0]); - out[1] = Math.max(a[1], b[1]); - out[2] = Math.max(a[2], b[2]); - out[3] = Math.max(a[3], b[3]); - return out; - } - /** - * Math.round the components of a vec4 - * - * @param {vec4} out the receiving vector - * @param {ReadonlyVec4} a vector to round - * @returns {vec4} out - */ - - function round$1(out, a) { - out[0] = Math.round(a[0]); - out[1] = Math.round(a[1]); - out[2] = Math.round(a[2]); - out[3] = Math.round(a[3]); - return out; - } - /** - * Scales a vec4 by a scalar number - * - * @param {vec4} out the receiving vector - * @param {ReadonlyVec4} a the vector to scale - * @param {Number} b amount to scale the vector by - * @returns {vec4} out - */ - - function scale$5(out, a, b) { - out[0] = a[0] * b; - out[1] = a[1] * b; - out[2] = a[2] * b; - out[3] = a[3] * b; - return out; - } - /** - * Adds two vec4's after scaling the second operand by a scalar value - * - * @param {vec4} out the receiving vector - * @param {ReadonlyVec4} a the first operand - * @param {ReadonlyVec4} b the second operand - * @param {Number} scale the amount to scale b by before adding - * @returns {vec4} out - */ - - function scaleAndAdd$1(out, a, b, scale) { - out[0] = a[0] + b[0] * scale; - out[1] = a[1] + b[1] * scale; - out[2] = a[2] + b[2] * scale; - out[3] = a[3] + b[3] * scale; - return out; - } - /** - * Calculates the euclidian distance between two vec4's - * - * @param {ReadonlyVec4} a the first operand - * @param {ReadonlyVec4} b the second operand - * @returns {Number} distance between a and b - */ - - function distance$1(a, b) { - var x = b[0] - a[0]; - var y = b[1] - a[1]; - var z = b[2] - a[2]; - var w = b[3] - a[3]; - return Math.hypot(x, y, z, w); - } - /** - * Calculates the squared euclidian distance between two vec4's - * - * @param {ReadonlyVec4} a the first operand - * @param {ReadonlyVec4} b the second operand - * @returns {Number} squared distance between a and b - */ - - function squaredDistance$1(a, b) { - var x = b[0] - a[0]; - var y = b[1] - a[1]; - var z = b[2] - a[2]; - var w = b[3] - a[3]; - return x * x + y * y + z * z + w * w; - } - /** - * Calculates the length of a vec4 - * - * @param {ReadonlyVec4} a vector to calculate length of - * @returns {Number} length of a - */ - - function length$1(a) { - var x = a[0]; - var y = a[1]; - var z = a[2]; - var w = a[3]; - return Math.hypot(x, y, z, w); - } - /** - * Calculates the squared length of a vec4 - * - * @param {ReadonlyVec4} a vector to calculate squared length of - * @returns {Number} squared length of a - */ - - function squaredLength$1(a) { - var x = a[0]; - var y = a[1]; - var z = a[2]; - var w = a[3]; - return x * x + y * y + z * z + w * w; - } - /** - * Negates the components of a vec4 - * - * @param {vec4} out the receiving vector - * @param {ReadonlyVec4} a vector to negate - * @returns {vec4} out - */ - - function negate$1(out, a) { - out[0] = -a[0]; - out[1] = -a[1]; - out[2] = -a[2]; - out[3] = -a[3]; - return out; - } - /** - * Returns the inverse of the components of a vec4 - * - * @param {vec4} out the receiving vector - * @param {ReadonlyVec4} a vector to invert - * @returns {vec4} out - */ - - function inverse$1(out, a) { - out[0] = 1.0 / a[0]; - out[1] = 1.0 / a[1]; - out[2] = 1.0 / a[2]; - out[3] = 1.0 / a[3]; - return out; - } - /** - * Normalize a vec4 - * - * @param {vec4} out the receiving vector - * @param {ReadonlyVec4} a vector to normalize - * @returns {vec4} out - */ - - function normalize$1(out, a) { - var x = a[0]; - var y = a[1]; - var z = a[2]; - var w = a[3]; - var len = x * x + y * y + z * z + w * w; - - if (len > 0) { - len = 1 / Math.sqrt(len); - } - - out[0] = x * len; - out[1] = y * len; - out[2] = z * len; - out[3] = w * len; - return out; - } - /** - * Calculates the dot product of two vec4's - * - * @param {ReadonlyVec4} a the first operand - * @param {ReadonlyVec4} b the second operand - * @returns {Number} dot product of a and b - */ - - function dot$1(a, b) { - return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3]; - } - /** - * Returns the cross-product of three vectors in a 4-dimensional space - * - * @param {ReadonlyVec4} result the receiving vector - * @param {ReadonlyVec4} U the first vector - * @param {ReadonlyVec4} V the second vector - * @param {ReadonlyVec4} W the third vector - * @returns {vec4} result - */ - - function cross$1(out, u, v, w) { - var A = v[0] * w[1] - v[1] * w[0], - B = v[0] * w[2] - v[2] * w[0], - C = v[0] * w[3] - v[3] * w[0], - D = v[1] * w[2] - v[2] * w[1], - E = v[1] * w[3] - v[3] * w[1], - F = v[2] * w[3] - v[3] * w[2]; - var G = u[0]; - var H = u[1]; - var I = u[2]; - var J = u[3]; - out[0] = H * F - I * E + J * D; - out[1] = -(G * F) + I * C - J * B; - out[2] = G * E - H * C + J * A; - out[3] = -(G * D) + H * B - I * A; - return out; - } - /** - * Performs a linear interpolation between two vec4's - * - * @param {vec4} out the receiving vector - * @param {ReadonlyVec4} a the first operand - * @param {ReadonlyVec4} b the second operand - * @param {Number} t interpolation amount, in the range [0-1], between the two inputs - * @returns {vec4} out - */ - - function lerp$1(out, a, b, t) { - var ax = a[0]; - var ay = a[1]; - var az = a[2]; - var aw = a[3]; - out[0] = ax + t * (b[0] - ax); - out[1] = ay + t * (b[1] - ay); - out[2] = az + t * (b[2] - az); - out[3] = aw + t * (b[3] - aw); - return out; - } - /** - * Generates a random vector with the given scale - * - * @param {vec4} out the receiving vector - * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned - * @returns {vec4} out - */ - - function random$1(out, scale) { - scale = scale || 1.0; // Marsaglia, George. Choosing a Point from the Surface of a - // Sphere. Ann. Math. Statist. 43 (1972), no. 2, 645--646. - // http://projecteuclid.org/euclid.aoms/1177692644; - - var v1, v2, v3, v4; - var s1, s2; - - do { - v1 = RANDOM() * 2 - 1; - v2 = RANDOM() * 2 - 1; - s1 = v1 * v1 + v2 * v2; - } while (s1 >= 1); - - do { - v3 = RANDOM() * 2 - 1; - v4 = RANDOM() * 2 - 1; - s2 = v3 * v3 + v4 * v4; - } while (s2 >= 1); - - var d = Math.sqrt((1 - s1) / s2); - out[0] = scale * v1; - out[1] = scale * v2; - out[2] = scale * v3 * d; - out[3] = scale * v4 * d; - return out; - } - /** - * Transforms the vec4 with a mat4. - * - * @param {vec4} out the receiving vector - * @param {ReadonlyVec4} a the vector to transform - * @param {ReadonlyMat4} m matrix to transform with - * @returns {vec4} out - */ - - function transformMat4$1(out, a, m) { - var x = a[0], - y = a[1], - z = a[2], - w = a[3]; - out[0] = m[0] * x + m[4] * y + m[8] * z + m[12] * w; - out[1] = m[1] * x + m[5] * y + m[9] * z + m[13] * w; - out[2] = m[2] * x + m[6] * y + m[10] * z + m[14] * w; - out[3] = m[3] * x + m[7] * y + m[11] * z + m[15] * w; - return out; - } - /** - * Transforms the vec4 with a quat - * - * @param {vec4} out the receiving vector - * @param {ReadonlyVec4} a the vector to transform - * @param {ReadonlyQuat} q quaternion to transform with - * @returns {vec4} out - */ - - function transformQuat$1(out, a, q) { - var x = a[0], - y = a[1], - z = a[2]; - var qx = q[0], - qy = q[1], - qz = q[2], - qw = q[3]; // calculate quat * vec - - var ix = qw * x + qy * z - qz * y; - var iy = qw * y + qz * x - qx * z; - var iz = qw * z + qx * y - qy * x; - var iw = -qx * x - qy * y - qz * z; // calculate result * inverse quat - - out[0] = ix * qw + iw * -qx + iy * -qz - iz * -qy; - out[1] = iy * qw + iw * -qy + iz * -qx - ix * -qz; - out[2] = iz * qw + iw * -qz + ix * -qy - iy * -qx; - out[3] = a[3]; - return out; - } - /** - * Set the components of a vec4 to zero - * - * @param {vec4} out the receiving vector - * @returns {vec4} out - */ - - function zero$1(out) { - out[0] = 0.0; - out[1] = 0.0; - out[2] = 0.0; - out[3] = 0.0; - return out; - } - /** - * Returns a string representation of a vector - * - * @param {ReadonlyVec4} a vector to represent as a string - * @returns {String} string representation of the vector - */ - - function str$5(a) { - return "vec4(" + a[0] + ", " + a[1] + ", " + a[2] + ", " + a[3] + ")"; - } - /** - * Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===) - * - * @param {ReadonlyVec4} a The first vector. - * @param {ReadonlyVec4} b The second vector. - * @returns {Boolean} True if the vectors are equal, false otherwise. - */ - - function exactEquals$5(a, b) { - return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3]; - } - /** - * Returns whether or not the vectors have approximately the same elements in the same position. - * - * @param {ReadonlyVec4} a The first vector. - * @param {ReadonlyVec4} b The second vector. - * @returns {Boolean} True if the vectors are equal, false otherwise. - */ - - function equals$6(a, b) { - var a0 = a[0], - a1 = a[1], - a2 = a[2], - a3 = a[3]; - var b0 = b[0], - b1 = b[1], - b2 = b[2], - b3 = b[3]; - return Math.abs(a0 - b0) <= EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3)); - } - /** - * Alias for {@link vec4.subtract} - * @function - */ - - var sub$5 = subtract$5; - /** - * Alias for {@link vec4.multiply} - * @function - */ - - var mul$5 = multiply$5; - /** - * Alias for {@link vec4.divide} - * @function - */ - - var div$1 = divide$1; - /** - * Alias for {@link vec4.distance} - * @function - */ - - var dist$1 = distance$1; - /** - * Alias for {@link vec4.squaredDistance} - * @function - */ - - var sqrDist$1 = squaredDistance$1; - /** - * Alias for {@link vec4.length} - * @function - */ - - var len$1 = length$1; - /** - * Alias for {@link vec4.squaredLength} - * @function - */ - - var sqrLen$1 = squaredLength$1; - /** - * Perform some operation over an array of vec4s. - * - * @param {Array} a the array of vectors to iterate over - * @param {Number} stride Number of elements between the start of each vec4. If 0 assumes tightly packed - * @param {Number} offset Number of elements to skip at the beginning of the array - * @param {Number} count Number of vec4s to iterate over. If 0 iterates over entire array - * @param {Function} fn Function to call for each vector in the array - * @param {Object} [arg] additional argument to pass to fn - * @returns {Array} a - * @function - */ - - var forEach$1 = function () { - var vec = create$5(); - return function (a, stride, offset, count, fn, arg) { - var i, l; - - if (!stride) { - stride = 4; - } - - if (!offset) { - offset = 0; - } - - if (count) { - l = Math.min(count * stride + offset, a.length); - } else { - l = a.length; - } - - for (i = offset; i < l; i += stride) { - vec[0] = a[i]; - vec[1] = a[i + 1]; - vec[2] = a[i + 2]; - vec[3] = a[i + 3]; - fn(vec, vec, arg); - a[i] = vec[0]; - a[i + 1] = vec[1]; - a[i + 2] = vec[2]; - a[i + 3] = vec[3]; - } - - return a; - }; - }(); - - var vec4 = /*#__PURE__*/Object.freeze({ - __proto__: null, - create: create$5, - clone: clone$5, - fromValues: fromValues$5, - copy: copy$5, - set: set$5, - add: add$5, - subtract: subtract$5, - multiply: multiply$5, - divide: divide$1, - ceil: ceil$1, - floor: floor$1, - min: min$1, - max: max$1, - round: round$1, - scale: scale$5, - scaleAndAdd: scaleAndAdd$1, - distance: distance$1, - squaredDistance: squaredDistance$1, - length: length$1, - squaredLength: squaredLength$1, - negate: negate$1, - inverse: inverse$1, - normalize: normalize$1, - dot: dot$1, - cross: cross$1, - lerp: lerp$1, - random: random$1, - transformMat4: transformMat4$1, - transformQuat: transformQuat$1, - zero: zero$1, - str: str$5, - exactEquals: exactEquals$5, - equals: equals$6, - sub: sub$5, - mul: mul$5, - div: div$1, - dist: dist$1, - sqrDist: sqrDist$1, - len: len$1, - sqrLen: sqrLen$1, - forEach: forEach$1 - }); - - /** - * Quaternion in the format XYZW - * @module quat - */ - - /** - * Creates a new identity quat - * - * @returns {quat} a new quaternion - */ - - function create$6() { - var out = new ARRAY_TYPE(4); - - if (ARRAY_TYPE != Float32Array) { - out[0] = 0; - out[1] = 0; - out[2] = 0; - } - - out[3] = 1; - return out; - } - /** - * Set a quat to the identity quaternion - * - * @param {quat} out the receiving quaternion - * @returns {quat} out - */ - - function identity$4(out) { - out[0] = 0; - out[1] = 0; - out[2] = 0; - out[3] = 1; - return out; - } - /** - * Sets a quat from the given angle and rotation axis, - * then returns it. - * - * @param {quat} out the receiving quaternion - * @param {ReadonlyVec3} axis the axis around which to rotate - * @param {Number} rad the angle in radians - * @returns {quat} out - **/ - - function setAxisAngle(out, axis, rad) { - rad = rad * 0.5; - var s = Math.sin(rad); - out[0] = s * axis[0]; - out[1] = s * axis[1]; - out[2] = s * axis[2]; - out[3] = Math.cos(rad); - return out; - } - /** - * Gets the rotation axis and angle for a given - * quaternion. If a quaternion is created with - * setAxisAngle, this method will return the same - * values as providied in the original parameter list - * OR functionally equivalent values. - * Example: The quaternion formed by axis [0, 0, 1] and - * angle -90 is the same as the quaternion formed by - * [0, 0, 1] and 270. This method favors the latter. - * @param {vec3} out_axis Vector receiving the axis of rotation - * @param {ReadonlyQuat} q Quaternion to be decomposed - * @return {Number} Angle, in radians, of the rotation - */ - - function getAxisAngle(out_axis, q) { - var rad = Math.acos(q[3]) * 2.0; - var s = Math.sin(rad / 2.0); - - if (s > EPSILON) { - out_axis[0] = q[0] / s; - out_axis[1] = q[1] / s; - out_axis[2] = q[2] / s; - } else { - // If s is zero, return any axis (no rotation - axis does not matter) - out_axis[0] = 1; - out_axis[1] = 0; - out_axis[2] = 0; - } - - return rad; - } - /** - * Gets the angular distance between two unit quaternions - * - * @param {ReadonlyQuat} a Origin unit quaternion - * @param {ReadonlyQuat} b Destination unit quaternion - * @return {Number} Angle, in radians, between the two quaternions - */ - - function getAngle(a, b) { - var dotproduct = dot$2(a, b); - return Math.acos(2 * dotproduct * dotproduct - 1); - } - /** - * Multiplies two quat's - * - * @param {quat} out the receiving quaternion - * @param {ReadonlyQuat} a the first operand - * @param {ReadonlyQuat} b the second operand - * @returns {quat} out - */ - - function multiply$6(out, a, b) { - var ax = a[0], - ay = a[1], - az = a[2], - aw = a[3]; - var bx = b[0], - by = b[1], - bz = b[2], - bw = b[3]; - out[0] = ax * bw + aw * bx + ay * bz - az * by; - out[1] = ay * bw + aw * by + az * bx - ax * bz; - out[2] = az * bw + aw * bz + ax * by - ay * bx; - out[3] = aw * bw - ax * bx - ay * by - az * bz; - return out; - } - /** - * Rotates a quaternion by the given angle about the X axis - * - * @param {quat} out quat receiving operation result - * @param {ReadonlyQuat} a quat to rotate - * @param {number} rad angle (in radians) to rotate - * @returns {quat} out - */ - - function rotateX$2(out, a, rad) { - rad *= 0.5; - var ax = a[0], - ay = a[1], - az = a[2], - aw = a[3]; - var bx = Math.sin(rad), - bw = Math.cos(rad); - out[0] = ax * bw + aw * bx; - out[1] = ay * bw + az * bx; - out[2] = az * bw - ay * bx; - out[3] = aw * bw - ax * bx; - return out; - } - /** - * Rotates a quaternion by the given angle about the Y axis - * - * @param {quat} out quat receiving operation result - * @param {ReadonlyQuat} a quat to rotate - * @param {number} rad angle (in radians) to rotate - * @returns {quat} out - */ - - function rotateY$2(out, a, rad) { - rad *= 0.5; - var ax = a[0], - ay = a[1], - az = a[2], - aw = a[3]; - var by = Math.sin(rad), - bw = Math.cos(rad); - out[0] = ax * bw - az * by; - out[1] = ay * bw + aw * by; - out[2] = az * bw + ax * by; - out[3] = aw * bw - ay * by; - return out; - } - /** - * Rotates a quaternion by the given angle about the Z axis - * - * @param {quat} out quat receiving operation result - * @param {ReadonlyQuat} a quat to rotate - * @param {number} rad angle (in radians) to rotate - * @returns {quat} out - */ - - function rotateZ$2(out, a, rad) { - rad *= 0.5; - var ax = a[0], - ay = a[1], - az = a[2], - aw = a[3]; - var bz = Math.sin(rad), - bw = Math.cos(rad); - out[0] = ax * bw + ay * bz; - out[1] = ay * bw - ax * bz; - out[2] = az * bw + aw * bz; - out[3] = aw * bw - az * bz; - return out; - } - /** - * Calculates the W component of a quat from the X, Y, and Z components. - * Assumes that quaternion is 1 unit in length. - * Any existing W component will be ignored. - * - * @param {quat} out the receiving quaternion - * @param {ReadonlyQuat} a quat to calculate W component of - * @returns {quat} out - */ - - function calculateW(out, a) { - var x = a[0], - y = a[1], - z = a[2]; - out[0] = x; - out[1] = y; - out[2] = z; - out[3] = Math.sqrt(Math.abs(1.0 - x * x - y * y - z * z)); - return out; - } - /** - * Calculate the exponential of a unit quaternion. - * - * @param {quat} out the receiving quaternion - * @param {ReadonlyQuat} a quat to calculate the exponential of - * @returns {quat} out - */ - - function exp(out, a) { - var x = a[0], - y = a[1], - z = a[2], - w = a[3]; - var r = Math.sqrt(x * x + y * y + z * z); - var et = Math.exp(w); - var s = r > 0 ? et * Math.sin(r) / r : 0; - out[0] = x * s; - out[1] = y * s; - out[2] = z * s; - out[3] = et * Math.cos(r); - return out; - } - /** - * Calculate the natural logarithm of a unit quaternion. - * - * @param {quat} out the receiving quaternion - * @param {ReadonlyQuat} a quat to calculate the exponential of - * @returns {quat} out - */ - - function ln(out, a) { - var x = a[0], - y = a[1], - z = a[2], - w = a[3]; - var r = Math.sqrt(x * x + y * y + z * z); - var t = r > 0 ? Math.atan2(r, w) / r : 0; - out[0] = x * t; - out[1] = y * t; - out[2] = z * t; - out[3] = 0.5 * Math.log(x * x + y * y + z * z + w * w); - return out; - } - /** - * Calculate the scalar power of a unit quaternion. - * - * @param {quat} out the receiving quaternion - * @param {ReadonlyQuat} a quat to calculate the exponential of - * @param {Number} b amount to scale the quaternion by - * @returns {quat} out - */ - - function pow(out, a, b) { - ln(out, a); - scale$6(out, out, b); - exp(out, out); - return out; - } - /** - * Performs a spherical linear interpolation between two quat - * - * @param {quat} out the receiving quaternion - * @param {ReadonlyQuat} a the first operand - * @param {ReadonlyQuat} b the second operand - * @param {Number} t interpolation amount, in the range [0-1], between the two inputs - * @returns {quat} out - */ - - function slerp$1(out, a, b, t) { - // benchmarks: - // http://jsperf.com/quaternion-slerp-implementations - var ax = a[0], - ay = a[1], - az = a[2], - aw = a[3]; - var bx = b[0], - by = b[1], - bz = b[2], - bw = b[3]; - var omega, cosom, sinom, scale0, scale1; // calc cosine - - cosom = ax * bx + ay * by + az * bz + aw * bw; // adjust signs (if necessary) - - if (cosom < 0.0) { - cosom = -cosom; - bx = -bx; - by = -by; - bz = -bz; - bw = -bw; - } // calculate coefficients - - - if (1.0 - cosom > EPSILON) { - // standard case (slerp) - omega = Math.acos(cosom); - sinom = Math.sin(omega); - scale0 = Math.sin((1.0 - t) * omega) / sinom; - scale1 = Math.sin(t * omega) / sinom; - } else { - // "from" and "to" quaternions are very close - // ... so we can do a linear interpolation - scale0 = 1.0 - t; - scale1 = t; - } // calculate final values - - - out[0] = scale0 * ax + scale1 * bx; - out[1] = scale0 * ay + scale1 * by; - out[2] = scale0 * az + scale1 * bz; - out[3] = scale0 * aw + scale1 * bw; - return out; - } - /** - * Generates a random unit quaternion - * - * @param {quat} out the receiving quaternion - * @returns {quat} out - */ - - function random$2(out) { - // Implementation of http://planning.cs.uiuc.edu/node198.html - // TODO: Calling random 3 times is probably not the fastest solution - var u1 = RANDOM(); - var u2 = RANDOM(); - var u3 = RANDOM(); - var sqrt1MinusU1 = Math.sqrt(1 - u1); - var sqrtU1 = Math.sqrt(u1); - out[0] = sqrt1MinusU1 * Math.sin(2.0 * Math.PI * u2); - out[1] = sqrt1MinusU1 * Math.cos(2.0 * Math.PI * u2); - out[2] = sqrtU1 * Math.sin(2.0 * Math.PI * u3); - out[3] = sqrtU1 * Math.cos(2.0 * Math.PI * u3); - return out; - } - /** - * Calculates the inverse of a quat - * - * @param {quat} out the receiving quaternion - * @param {ReadonlyQuat} a quat to calculate inverse of - * @returns {quat} out - */ - - function invert$4(out, a) { - var a0 = a[0], - a1 = a[1], - a2 = a[2], - a3 = a[3]; - var dot = a0 * a0 + a1 * a1 + a2 * a2 + a3 * a3; - var invDot = dot ? 1.0 / dot : 0; // TODO: Would be faster to return [0,0,0,0] immediately if dot == 0 - - out[0] = -a0 * invDot; - out[1] = -a1 * invDot; - out[2] = -a2 * invDot; - out[3] = a3 * invDot; - return out; - } - /** - * Calculates the conjugate of a quat - * If the quaternion is normalized, this function is faster than quat.inverse and produces the same result. - * - * @param {quat} out the receiving quaternion - * @param {ReadonlyQuat} a quat to calculate conjugate of - * @returns {quat} out - */ - - function conjugate(out, a) { - out[0] = -a[0]; - out[1] = -a[1]; - out[2] = -a[2]; - out[3] = a[3]; - return out; - } - /** - * Creates a quaternion from the given 3x3 rotation matrix. - * - * NOTE: The resultant quaternion is not normalized, so you should be sure - * to renormalize the quaternion yourself where necessary. - * - * @param {quat} out the receiving quaternion - * @param {ReadonlyMat3} m rotation matrix - * @returns {quat} out - * @function - */ - - function fromMat3(out, m) { - // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes - // article "Quaternion Calculus and Fast Animation". - var fTrace = m[0] + m[4] + m[8]; - var fRoot; - - if (fTrace > 0.0) { - // |w| > 1/2, may as well choose w > 1/2 - fRoot = Math.sqrt(fTrace + 1.0); // 2w - - out[3] = 0.5 * fRoot; - fRoot = 0.5 / fRoot; // 1/(4w) - - out[0] = (m[5] - m[7]) * fRoot; - out[1] = (m[6] - m[2]) * fRoot; - out[2] = (m[1] - m[3]) * fRoot; - } else { - // |w| <= 1/2 - var i = 0; - if (m[4] > m[0]) i = 1; - if (m[8] > m[i * 3 + i]) i = 2; - var j = (i + 1) % 3; - var k = (i + 2) % 3; - fRoot = Math.sqrt(m[i * 3 + i] - m[j * 3 + j] - m[k * 3 + k] + 1.0); - out[i] = 0.5 * fRoot; - fRoot = 0.5 / fRoot; - out[3] = (m[j * 3 + k] - m[k * 3 + j]) * fRoot; - out[j] = (m[j * 3 + i] + m[i * 3 + j]) * fRoot; - out[k] = (m[k * 3 + i] + m[i * 3 + k]) * fRoot; - } - - return out; - } - /** - * Creates a quaternion from the given euler angle x, y, z using the provided intrinsic order for the conversion. - * - * @param {quat} out the receiving quaternion - * @param {x} Angle to rotate around X axis in degrees. - * @param {y} Angle to rotate around Y axis in degrees. - * @param {z} Angle to rotate around Z axis in degrees. - * @param {order} Intrinsic order for conversion, default is ZYX. - * @returns {quat} out - * @function - */ - - function fromEuler(out, x, y, z) { - var order = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'zyx'; - var halfToRad = 0.5 * Math.PI / 180.0; - x *= halfToRad; - z *= halfToRad; - y *= halfToRad; - var sx = Math.sin(x); - var cx = Math.cos(x); - var sy = Math.sin(y); - var cy = Math.cos(y); - var sz = Math.sin(z); - var cz = Math.cos(z); - - if (typeof order != 'string') { - order = 'zyx'; - } - - switch (order.toLowerCase()) { - case 'xyz': - out[0] = sx * cy * cz + cx * sy * sz; - out[1] = cx * sy * cz - sx * cy * sz; - out[2] = cx * cy * sz + sx * sy * cz; - out[3] = cx * cy * cz - sx * sy * sz; - break; - - case 'xzy': - out[0] = sx * cy * cz - cx * sy * sz; - out[1] = cx * sy * cz - sx * cy * sz; - out[2] = cx * cy * sz + sx * sy * cz; - out[3] = cx * cy * cz + sx * sy * sz; - break; - - case 'yxz': - out[0] = sx * cy * cz + cx * sy * sz; - out[1] = cx * sy * cz - sx * cy * sz; - out[2] = cx * cy * sz - sx * sy * cz; - out[3] = cx * cy * cz + sx * sy * sz; - break; - - case 'yzx': - out[0] = sx * cy * cz + cx * sy * sz; - out[1] = cx * sy * cz + sx * cy * sz; - out[2] = cx * cy * sz - sx * sy * cz; - out[3] = cx * cy * cz - sx * sy * sz; - break; - - case 'zxy': - out[0] = sx * cy * cz - cx * sy * sz; - out[1] = cx * sy * cz + sx * cy * sz; - out[2] = cx * cy * sz + sx * sy * cz; - out[3] = cx * cy * cz - sx * sy * sz; - break; - - case 'zyx': - default: - out[0] = sx * cy * cz - cx * sy * sz; - out[1] = cx * sy * cz + sx * cy * sz; - out[2] = cx * cy * sz - sx * sy * cz; - out[3] = cx * cy * cz + sx * sy * sz; - } - - return out; - } - /** - * Returns a string representation of a quatenion - * - * @param {ReadonlyQuat} a vector to represent as a string - * @returns {String} string representation of the vector - */ - - function str$6(a) { - return "quat(" + a[0] + ", " + a[1] + ", " + a[2] + ", " + a[3] + ")"; - } - /** - * Creates a new quat initialized with values from an existing quaternion - * - * @param {ReadonlyQuat} a quaternion to clone - * @returns {quat} a new quaternion - * @function - */ - - var clone$6 = clone$5; - /** - * Creates a new quat initialized with the given values - * - * @param {Number} x X component - * @param {Number} y Y component - * @param {Number} z Z component - * @param {Number} w W component - * @returns {quat} a new quaternion - * @function - */ - - var fromValues$6 = fromValues$5; - /** - * Copy the values from one quat to another - * - * @param {quat} out the receiving quaternion - * @param {ReadonlyQuat} a the source quaternion - * @returns {quat} out - * @function - */ - - var copy$6 = copy$5; - /** - * Set the components of a quat to the given values - * - * @param {quat} out the receiving quaternion - * @param {Number} x X component - * @param {Number} y Y component - * @param {Number} z Z component - * @param {Number} w W component - * @returns {quat} out - * @function - */ - - var set$6 = set$5; - /** - * Adds two quat's - * - * @param {quat} out the receiving quaternion - * @param {ReadonlyQuat} a the first operand - * @param {ReadonlyQuat} b the second operand - * @returns {quat} out - * @function - */ - - var add$6 = add$5; - /** - * Alias for {@link quat.multiply} - * @function - */ - - var mul$6 = multiply$6; - /** - * Scales a quat by a scalar number - * - * @param {quat} out the receiving vector - * @param {ReadonlyQuat} a the vector to scale - * @param {Number} b amount to scale the vector by - * @returns {quat} out - * @function - */ - - var scale$6 = scale$5; - /** - * Calculates the dot product of two quat's - * - * @param {ReadonlyQuat} a the first operand - * @param {ReadonlyQuat} b the second operand - * @returns {Number} dot product of a and b - * @function - */ - - var dot$2 = dot$1; - /** - * Performs a linear interpolation between two quat's - * - * @param {quat} out the receiving quaternion - * @param {ReadonlyQuat} a the first operand - * @param {ReadonlyQuat} b the second operand - * @param {Number} t interpolation amount, in the range [0-1], between the two inputs - * @returns {quat} out - * @function - */ - - var lerp$2 = lerp$1; - /** - * Calculates the length of a quat - * - * @param {ReadonlyQuat} a vector to calculate length of - * @returns {Number} length of a - */ - - var length$2 = length$1; - /** - * Alias for {@link quat.length} - * @function - */ - - var len$2 = length$2; - /** - * Calculates the squared length of a quat - * - * @param {ReadonlyQuat} a vector to calculate squared length of - * @returns {Number} squared length of a - * @function - */ - - var squaredLength$2 = squaredLength$1; - /** - * Alias for {@link quat.squaredLength} - * @function - */ - - var sqrLen$2 = squaredLength$2; - /** - * Normalize a quat - * - * @param {quat} out the receiving quaternion - * @param {ReadonlyQuat} a quaternion to normalize - * @returns {quat} out - * @function - */ - - var normalize$2 = normalize$1; - /** - * Returns whether or not the quaternions have exactly the same elements in the same position (when compared with ===) - * - * @param {ReadonlyQuat} a The first quaternion. - * @param {ReadonlyQuat} b The second quaternion. - * @returns {Boolean} True if the vectors are equal, false otherwise. - */ - - var exactEquals$6 = exactEquals$5; - /** - * Returns whether or not the quaternions have approximately the same elements in the same position. - * - * @param {ReadonlyQuat} a The first vector. - * @param {ReadonlyQuat} b The second vector. - * @returns {Boolean} True if the vectors are equal, false otherwise. - */ - - var equals$7 = equals$6; - /** - * Sets a quaternion to represent the shortest rotation from one - * vector to another. - * - * Both vectors are assumed to be unit length. - * - * @param {quat} out the receiving quaternion. - * @param {ReadonlyVec3} a the initial vector - * @param {ReadonlyVec3} b the destination vector - * @returns {quat} out - */ - - var rotationTo = function () { - var tmpvec3 = create$4(); - var xUnitVec3 = fromValues$4(1, 0, 0); - var yUnitVec3 = fromValues$4(0, 1, 0); - return function (out, a, b) { - var dot$1 = dot(a, b); - - if (dot$1 < -0.999999) { - cross(tmpvec3, xUnitVec3, a); - if (len(tmpvec3) < 0.000001) cross(tmpvec3, yUnitVec3, a); - normalize(tmpvec3, tmpvec3); - setAxisAngle(out, tmpvec3, Math.PI); - return out; - } else if (dot$1 > 0.999999) { - out[0] = 0; - out[1] = 0; - out[2] = 0; - out[3] = 1; - return out; - } else { - cross(tmpvec3, a, b); - out[0] = tmpvec3[0]; - out[1] = tmpvec3[1]; - out[2] = tmpvec3[2]; - out[3] = 1 + dot$1; - return normalize$2(out, out); - } - }; - }(); - /** - * Performs a spherical linear interpolation with two control points - * - * @param {quat} out the receiving quaternion - * @param {ReadonlyQuat} a the first operand - * @param {ReadonlyQuat} b the second operand - * @param {ReadonlyQuat} c the third operand - * @param {ReadonlyQuat} d the fourth operand - * @param {Number} t interpolation amount, in the range [0-1], between the two inputs - * @returns {quat} out - */ - - var sqlerp = function () { - var temp1 = create$6(); - var temp2 = create$6(); - return function (out, a, b, c, d, t) { - slerp$1(temp1, a, d, t); - slerp$1(temp2, b, c, t); - slerp$1(out, temp1, temp2, 2 * t * (1 - t)); - return out; - }; - }(); - /** - * Sets the specified quaternion with values corresponding to the given - * axes. Each axis is a vec3 and is expected to be unit length and - * perpendicular to all other specified axes. - * - * @param {ReadonlyVec3} view the vector representing the viewing direction - * @param {ReadonlyVec3} right the vector representing the local "right" direction - * @param {ReadonlyVec3} up the vector representing the local "up" direction - * @returns {quat} out - */ - - var setAxes = function () { - var matr = create$2(); - return function (out, view, right, up) { - matr[0] = right[0]; - matr[3] = right[1]; - matr[6] = right[2]; - matr[1] = up[0]; - matr[4] = up[1]; - matr[7] = up[2]; - matr[2] = -view[0]; - matr[5] = -view[1]; - matr[8] = -view[2]; - return normalize$2(out, fromMat3(out, matr)); - }; - }(); - - var quat = /*#__PURE__*/Object.freeze({ - __proto__: null, - create: create$6, - identity: identity$4, - setAxisAngle: setAxisAngle, - getAxisAngle: getAxisAngle, - getAngle: getAngle, - multiply: multiply$6, - rotateX: rotateX$2, - rotateY: rotateY$2, - rotateZ: rotateZ$2, - calculateW: calculateW, - exp: exp, - ln: ln, - pow: pow, - slerp: slerp$1, - random: random$2, - invert: invert$4, - conjugate: conjugate, - fromMat3: fromMat3, - fromEuler: fromEuler, - str: str$6, - clone: clone$6, - fromValues: fromValues$6, - copy: copy$6, - set: set$6, - add: add$6, - mul: mul$6, - scale: scale$6, - dot: dot$2, - lerp: lerp$2, - length: length$2, - len: len$2, - squaredLength: squaredLength$2, - sqrLen: sqrLen$2, - normalize: normalize$2, - exactEquals: exactEquals$6, - equals: equals$7, - rotationTo: rotationTo, - sqlerp: sqlerp, - setAxes: setAxes - }); - - /** - * Dual Quaternion
- * Format: [real, dual]
- * Quaternion format: XYZW
- * Make sure to have normalized dual quaternions, otherwise the functions may not work as intended.
- * @module quat2 - */ - - /** - * Creates a new identity dual quat - * - * @returns {quat2} a new dual quaternion [real -> rotation, dual -> translation] - */ - - function create$7() { - var dq = new ARRAY_TYPE(8); - - if (ARRAY_TYPE != Float32Array) { - dq[0] = 0; - dq[1] = 0; - dq[2] = 0; - dq[4] = 0; - dq[5] = 0; - dq[6] = 0; - dq[7] = 0; - } - - dq[3] = 1; - return dq; - } - /** - * Creates a new quat initialized with values from an existing quaternion - * - * @param {ReadonlyQuat2} a dual quaternion to clone - * @returns {quat2} new dual quaternion - * @function - */ - - function clone$7(a) { - var dq = new ARRAY_TYPE(8); - dq[0] = a[0]; - dq[1] = a[1]; - dq[2] = a[2]; - dq[3] = a[3]; - dq[4] = a[4]; - dq[5] = a[5]; - dq[6] = a[6]; - dq[7] = a[7]; - return dq; - } - /** - * Creates a new dual quat initialized with the given values - * - * @param {Number} x1 X component - * @param {Number} y1 Y component - * @param {Number} z1 Z component - * @param {Number} w1 W component - * @param {Number} x2 X component - * @param {Number} y2 Y component - * @param {Number} z2 Z component - * @param {Number} w2 W component - * @returns {quat2} new dual quaternion - * @function - */ - - function fromValues$7(x1, y1, z1, w1, x2, y2, z2, w2) { - var dq = new ARRAY_TYPE(8); - dq[0] = x1; - dq[1] = y1; - dq[2] = z1; - dq[3] = w1; - dq[4] = x2; - dq[5] = y2; - dq[6] = z2; - dq[7] = w2; - return dq; - } - /** - * Creates a new dual quat from the given values (quat and translation) - * - * @param {Number} x1 X component - * @param {Number} y1 Y component - * @param {Number} z1 Z component - * @param {Number} w1 W component - * @param {Number} x2 X component (translation) - * @param {Number} y2 Y component (translation) - * @param {Number} z2 Z component (translation) - * @returns {quat2} new dual quaternion - * @function - */ - - function fromRotationTranslationValues(x1, y1, z1, w1, x2, y2, z2) { - var dq = new ARRAY_TYPE(8); - dq[0] = x1; - dq[1] = y1; - dq[2] = z1; - dq[3] = w1; - var ax = x2 * 0.5, - ay = y2 * 0.5, - az = z2 * 0.5; - dq[4] = ax * w1 + ay * z1 - az * y1; - dq[5] = ay * w1 + az * x1 - ax * z1; - dq[6] = az * w1 + ax * y1 - ay * x1; - dq[7] = -ax * x1 - ay * y1 - az * z1; - return dq; - } - /** - * Creates a dual quat from a quaternion and a translation - * - * @param {ReadonlyQuat2} dual quaternion receiving operation result - * @param {ReadonlyQuat} q a normalized quaternion - * @param {ReadonlyVec3} t tranlation vector - * @returns {quat2} dual quaternion receiving operation result - * @function - */ - - function fromRotationTranslation$1(out, q, t) { - var ax = t[0] * 0.5, - ay = t[1] * 0.5, - az = t[2] * 0.5, - bx = q[0], - by = q[1], - bz = q[2], - bw = q[3]; - out[0] = bx; - out[1] = by; - out[2] = bz; - out[3] = bw; - out[4] = ax * bw + ay * bz - az * by; - out[5] = ay * bw + az * bx - ax * bz; - out[6] = az * bw + ax * by - ay * bx; - out[7] = -ax * bx - ay * by - az * bz; - return out; - } - /** - * Creates a dual quat from a translation - * - * @param {ReadonlyQuat2} dual quaternion receiving operation result - * @param {ReadonlyVec3} t translation vector - * @returns {quat2} dual quaternion receiving operation result - * @function - */ - - function fromTranslation$3(out, t) { - out[0] = 0; - out[1] = 0; - out[2] = 0; - out[3] = 1; - out[4] = t[0] * 0.5; - out[5] = t[1] * 0.5; - out[6] = t[2] * 0.5; - out[7] = 0; - return out; - } - /** - * Creates a dual quat from a quaternion - * - * @param {ReadonlyQuat2} dual quaternion receiving operation result - * @param {ReadonlyQuat} q the quaternion - * @returns {quat2} dual quaternion receiving operation result - * @function - */ - - function fromRotation$4(out, q) { - out[0] = q[0]; - out[1] = q[1]; - out[2] = q[2]; - out[3] = q[3]; - out[4] = 0; - out[5] = 0; - out[6] = 0; - out[7] = 0; - return out; - } - /** - * Creates a new dual quat from a matrix (4x4) - * - * @param {quat2} out the dual quaternion - * @param {ReadonlyMat4} a the matrix - * @returns {quat2} dual quat receiving operation result - * @function - */ - - function fromMat4$1(out, a) { - //TODO Optimize this - var outer = create$6(); - getRotation(outer, a); - var t = new ARRAY_TYPE(3); - getTranslation(t, a); - fromRotationTranslation$1(out, outer, t); - return out; - } - /** - * Copy the values from one dual quat to another - * - * @param {quat2} out the receiving dual quaternion - * @param {ReadonlyQuat2} a the source dual quaternion - * @returns {quat2} out - * @function - */ - - function copy$7(out, a) { - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - out[4] = a[4]; - out[5] = a[5]; - out[6] = a[6]; - out[7] = a[7]; - return out; - } - /** - * Set a dual quat to the identity dual quaternion - * - * @param {quat2} out the receiving quaternion - * @returns {quat2} out - */ - - function identity$5(out) { - out[0] = 0; - out[1] = 0; - out[2] = 0; - out[3] = 1; - out[4] = 0; - out[5] = 0; - out[6] = 0; - out[7] = 0; - return out; - } - /** - * Set the components of a dual quat to the given values - * - * @param {quat2} out the receiving quaternion - * @param {Number} x1 X component - * @param {Number} y1 Y component - * @param {Number} z1 Z component - * @param {Number} w1 W component - * @param {Number} x2 X component - * @param {Number} y2 Y component - * @param {Number} z2 Z component - * @param {Number} w2 W component - * @returns {quat2} out - * @function - */ - - function set$7(out, x1, y1, z1, w1, x2, y2, z2, w2) { - out[0] = x1; - out[1] = y1; - out[2] = z1; - out[3] = w1; - out[4] = x2; - out[5] = y2; - out[6] = z2; - out[7] = w2; - return out; - } - /** - * Gets the real part of a dual quat - * @param {quat} out real part - * @param {ReadonlyQuat2} a Dual Quaternion - * @return {quat} real part - */ - - var getReal = copy$6; - /** - * Gets the dual part of a dual quat - * @param {quat} out dual part - * @param {ReadonlyQuat2} a Dual Quaternion - * @return {quat} dual part - */ - - function getDual(out, a) { - out[0] = a[4]; - out[1] = a[5]; - out[2] = a[6]; - out[3] = a[7]; - return out; - } - /** - * Set the real component of a dual quat to the given quaternion - * - * @param {quat2} out the receiving quaternion - * @param {ReadonlyQuat} q a quaternion representing the real part - * @returns {quat2} out - * @function - */ - - var setReal = copy$6; - /** - * Set the dual component of a dual quat to the given quaternion - * - * @param {quat2} out the receiving quaternion - * @param {ReadonlyQuat} q a quaternion representing the dual part - * @returns {quat2} out - * @function - */ - - function setDual(out, q) { - out[4] = q[0]; - out[5] = q[1]; - out[6] = q[2]; - out[7] = q[3]; - return out; - } - /** - * Gets the translation of a normalized dual quat - * @param {vec3} out translation - * @param {ReadonlyQuat2} a Dual Quaternion to be decomposed - * @return {vec3} translation - */ - - function getTranslation$1(out, a) { - var ax = a[4], - ay = a[5], - az = a[6], - aw = a[7], - bx = -a[0], - by = -a[1], - bz = -a[2], - bw = a[3]; - out[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2; - out[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2; - out[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2; - return out; - } - /** - * Translates a dual quat by the given vector - * - * @param {quat2} out the receiving dual quaternion - * @param {ReadonlyQuat2} a the dual quaternion to translate - * @param {ReadonlyVec3} v vector to translate by - * @returns {quat2} out - */ - - function translate$3(out, a, v) { - var ax1 = a[0], - ay1 = a[1], - az1 = a[2], - aw1 = a[3], - bx1 = v[0] * 0.5, - by1 = v[1] * 0.5, - bz1 = v[2] * 0.5, - ax2 = a[4], - ay2 = a[5], - az2 = a[6], - aw2 = a[7]; - out[0] = ax1; - out[1] = ay1; - out[2] = az1; - out[3] = aw1; - out[4] = aw1 * bx1 + ay1 * bz1 - az1 * by1 + ax2; - out[5] = aw1 * by1 + az1 * bx1 - ax1 * bz1 + ay2; - out[6] = aw1 * bz1 + ax1 * by1 - ay1 * bx1 + az2; - out[7] = -ax1 * bx1 - ay1 * by1 - az1 * bz1 + aw2; - return out; - } - /** - * Rotates a dual quat around the X axis - * - * @param {quat2} out the receiving dual quaternion - * @param {ReadonlyQuat2} a the dual quaternion to rotate - * @param {number} rad how far should the rotation be - * @returns {quat2} out - */ - - function rotateX$3(out, a, rad) { - var bx = -a[0], - by = -a[1], - bz = -a[2], - bw = a[3], - ax = a[4], - ay = a[5], - az = a[6], - aw = a[7], - ax1 = ax * bw + aw * bx + ay * bz - az * by, - ay1 = ay * bw + aw * by + az * bx - ax * bz, - az1 = az * bw + aw * bz + ax * by - ay * bx, - aw1 = aw * bw - ax * bx - ay * by - az * bz; - rotateX$2(out, a, rad); - bx = out[0]; - by = out[1]; - bz = out[2]; - bw = out[3]; - out[4] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by; - out[5] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz; - out[6] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx; - out[7] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz; - return out; - } - /** - * Rotates a dual quat around the Y axis - * - * @param {quat2} out the receiving dual quaternion - * @param {ReadonlyQuat2} a the dual quaternion to rotate - * @param {number} rad how far should the rotation be - * @returns {quat2} out - */ - - function rotateY$3(out, a, rad) { - var bx = -a[0], - by = -a[1], - bz = -a[2], - bw = a[3], - ax = a[4], - ay = a[5], - az = a[6], - aw = a[7], - ax1 = ax * bw + aw * bx + ay * bz - az * by, - ay1 = ay * bw + aw * by + az * bx - ax * bz, - az1 = az * bw + aw * bz + ax * by - ay * bx, - aw1 = aw * bw - ax * bx - ay * by - az * bz; - rotateY$2(out, a, rad); - bx = out[0]; - by = out[1]; - bz = out[2]; - bw = out[3]; - out[4] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by; - out[5] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz; - out[6] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx; - out[7] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz; - return out; - } - /** - * Rotates a dual quat around the Z axis - * - * @param {quat2} out the receiving dual quaternion - * @param {ReadonlyQuat2} a the dual quaternion to rotate - * @param {number} rad how far should the rotation be - * @returns {quat2} out - */ - - function rotateZ$3(out, a, rad) { - var bx = -a[0], - by = -a[1], - bz = -a[2], - bw = a[3], - ax = a[4], - ay = a[5], - az = a[6], - aw = a[7], - ax1 = ax * bw + aw * bx + ay * bz - az * by, - ay1 = ay * bw + aw * by + az * bx - ax * bz, - az1 = az * bw + aw * bz + ax * by - ay * bx, - aw1 = aw * bw - ax * bx - ay * by - az * bz; - rotateZ$2(out, a, rad); - bx = out[0]; - by = out[1]; - bz = out[2]; - bw = out[3]; - out[4] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by; - out[5] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz; - out[6] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx; - out[7] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz; - return out; - } - /** - * Rotates a dual quat by a given quaternion (a * q) - * - * @param {quat2} out the receiving dual quaternion - * @param {ReadonlyQuat2} a the dual quaternion to rotate - * @param {ReadonlyQuat} q quaternion to rotate by - * @returns {quat2} out - */ - - function rotateByQuatAppend(out, a, q) { - var qx = q[0], - qy = q[1], - qz = q[2], - qw = q[3], - ax = a[0], - ay = a[1], - az = a[2], - aw = a[3]; - out[0] = ax * qw + aw * qx + ay * qz - az * qy; - out[1] = ay * qw + aw * qy + az * qx - ax * qz; - out[2] = az * qw + aw * qz + ax * qy - ay * qx; - out[3] = aw * qw - ax * qx - ay * qy - az * qz; - ax = a[4]; - ay = a[5]; - az = a[6]; - aw = a[7]; - out[4] = ax * qw + aw * qx + ay * qz - az * qy; - out[5] = ay * qw + aw * qy + az * qx - ax * qz; - out[6] = az * qw + aw * qz + ax * qy - ay * qx; - out[7] = aw * qw - ax * qx - ay * qy - az * qz; - return out; - } - /** - * Rotates a dual quat by a given quaternion (q * a) - * - * @param {quat2} out the receiving dual quaternion - * @param {ReadonlyQuat} q quaternion to rotate by - * @param {ReadonlyQuat2} a the dual quaternion to rotate - * @returns {quat2} out - */ - - function rotateByQuatPrepend(out, q, a) { - var qx = q[0], - qy = q[1], - qz = q[2], - qw = q[3], - bx = a[0], - by = a[1], - bz = a[2], - bw = a[3]; - out[0] = qx * bw + qw * bx + qy * bz - qz * by; - out[1] = qy * bw + qw * by + qz * bx - qx * bz; - out[2] = qz * bw + qw * bz + qx * by - qy * bx; - out[3] = qw * bw - qx * bx - qy * by - qz * bz; - bx = a[4]; - by = a[5]; - bz = a[6]; - bw = a[7]; - out[4] = qx * bw + qw * bx + qy * bz - qz * by; - out[5] = qy * bw + qw * by + qz * bx - qx * bz; - out[6] = qz * bw + qw * bz + qx * by - qy * bx; - out[7] = qw * bw - qx * bx - qy * by - qz * bz; - return out; - } - /** - * Rotates a dual quat around a given axis. Does the normalisation automatically - * - * @param {quat2} out the receiving dual quaternion - * @param {ReadonlyQuat2} a the dual quaternion to rotate - * @param {ReadonlyVec3} axis the axis to rotate around - * @param {Number} rad how far the rotation should be - * @returns {quat2} out - */ - - function rotateAroundAxis(out, a, axis, rad) { - //Special case for rad = 0 - if (Math.abs(rad) < EPSILON) { - return copy$7(out, a); - } - - var axisLength = Math.hypot(axis[0], axis[1], axis[2]); - rad = rad * 0.5; - var s = Math.sin(rad); - var bx = s * axis[0] / axisLength; - var by = s * axis[1] / axisLength; - var bz = s * axis[2] / axisLength; - var bw = Math.cos(rad); - var ax1 = a[0], - ay1 = a[1], - az1 = a[2], - aw1 = a[3]; - out[0] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by; - out[1] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz; - out[2] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx; - out[3] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz; - var ax = a[4], - ay = a[5], - az = a[6], - aw = a[7]; - out[4] = ax * bw + aw * bx + ay * bz - az * by; - out[5] = ay * bw + aw * by + az * bx - ax * bz; - out[6] = az * bw + aw * bz + ax * by - ay * bx; - out[7] = aw * bw - ax * bx - ay * by - az * bz; - return out; - } - /** - * Adds two dual quat's - * - * @param {quat2} out the receiving dual quaternion - * @param {ReadonlyQuat2} a the first operand - * @param {ReadonlyQuat2} b the second operand - * @returns {quat2} out - * @function - */ - - function add$7(out, a, b) { - out[0] = a[0] + b[0]; - out[1] = a[1] + b[1]; - out[2] = a[2] + b[2]; - out[3] = a[3] + b[3]; - out[4] = a[4] + b[4]; - out[5] = a[5] + b[5]; - out[6] = a[6] + b[6]; - out[7] = a[7] + b[7]; - return out; - } - /** - * Multiplies two dual quat's - * - * @param {quat2} out the receiving dual quaternion - * @param {ReadonlyQuat2} a the first operand - * @param {ReadonlyQuat2} b the second operand - * @returns {quat2} out - */ - - function multiply$7(out, a, b) { - var ax0 = a[0], - ay0 = a[1], - az0 = a[2], - aw0 = a[3], - bx1 = b[4], - by1 = b[5], - bz1 = b[6], - bw1 = b[7], - ax1 = a[4], - ay1 = a[5], - az1 = a[6], - aw1 = a[7], - bx0 = b[0], - by0 = b[1], - bz0 = b[2], - bw0 = b[3]; - out[0] = ax0 * bw0 + aw0 * bx0 + ay0 * bz0 - az0 * by0; - out[1] = ay0 * bw0 + aw0 * by0 + az0 * bx0 - ax0 * bz0; - out[2] = az0 * bw0 + aw0 * bz0 + ax0 * by0 - ay0 * bx0; - out[3] = aw0 * bw0 - ax0 * bx0 - ay0 * by0 - az0 * bz0; - out[4] = ax0 * bw1 + aw0 * bx1 + ay0 * bz1 - az0 * by1 + ax1 * bw0 + aw1 * bx0 + ay1 * bz0 - az1 * by0; - out[5] = ay0 * bw1 + aw0 * by1 + az0 * bx1 - ax0 * bz1 + ay1 * bw0 + aw1 * by0 + az1 * bx0 - ax1 * bz0; - out[6] = az0 * bw1 + aw0 * bz1 + ax0 * by1 - ay0 * bx1 + az1 * bw0 + aw1 * bz0 + ax1 * by0 - ay1 * bx0; - out[7] = aw0 * bw1 - ax0 * bx1 - ay0 * by1 - az0 * bz1 + aw1 * bw0 - ax1 * bx0 - ay1 * by0 - az1 * bz0; - return out; - } - /** - * Alias for {@link quat2.multiply} - * @function - */ - - var mul$7 = multiply$7; - /** - * Scales a dual quat by a scalar number - * - * @param {quat2} out the receiving dual quat - * @param {ReadonlyQuat2} a the dual quat to scale - * @param {Number} b amount to scale the dual quat by - * @returns {quat2} out - * @function - */ - - function scale$7(out, a, b) { - out[0] = a[0] * b; - out[1] = a[1] * b; - out[2] = a[2] * b; - out[3] = a[3] * b; - out[4] = a[4] * b; - out[5] = a[5] * b; - out[6] = a[6] * b; - out[7] = a[7] * b; - return out; - } - /** - * Calculates the dot product of two dual quat's (The dot product of the real parts) - * - * @param {ReadonlyQuat2} a the first operand - * @param {ReadonlyQuat2} b the second operand - * @returns {Number} dot product of a and b - * @function - */ - - var dot$3 = dot$2; - /** - * Performs a linear interpolation between two dual quats's - * NOTE: The resulting dual quaternions won't always be normalized (The error is most noticeable when t = 0.5) - * - * @param {quat2} out the receiving dual quat - * @param {ReadonlyQuat2} a the first operand - * @param {ReadonlyQuat2} b the second operand - * @param {Number} t interpolation amount, in the range [0-1], between the two inputs - * @returns {quat2} out - */ - - function lerp$3(out, a, b, t) { - var mt = 1 - t; - if (dot$3(a, b) < 0) t = -t; - out[0] = a[0] * mt + b[0] * t; - out[1] = a[1] * mt + b[1] * t; - out[2] = a[2] * mt + b[2] * t; - out[3] = a[3] * mt + b[3] * t; - out[4] = a[4] * mt + b[4] * t; - out[5] = a[5] * mt + b[5] * t; - out[6] = a[6] * mt + b[6] * t; - out[7] = a[7] * mt + b[7] * t; - return out; - } - /** - * Calculates the inverse of a dual quat. If they are normalized, conjugate is cheaper - * - * @param {quat2} out the receiving dual quaternion - * @param {ReadonlyQuat2} a dual quat to calculate inverse of - * @returns {quat2} out - */ - - function invert$5(out, a) { - var sqlen = squaredLength$3(a); - out[0] = -a[0] / sqlen; - out[1] = -a[1] / sqlen; - out[2] = -a[2] / sqlen; - out[3] = a[3] / sqlen; - out[4] = -a[4] / sqlen; - out[5] = -a[5] / sqlen; - out[6] = -a[6] / sqlen; - out[7] = a[7] / sqlen; - return out; - } - /** - * Calculates the conjugate of a dual quat - * If the dual quaternion is normalized, this function is faster than quat2.inverse and produces the same result. - * - * @param {quat2} out the receiving quaternion - * @param {ReadonlyQuat2} a quat to calculate conjugate of - * @returns {quat2} out - */ - - function conjugate$1(out, a) { - out[0] = -a[0]; - out[1] = -a[1]; - out[2] = -a[2]; - out[3] = a[3]; - out[4] = -a[4]; - out[5] = -a[5]; - out[6] = -a[6]; - out[7] = a[7]; - return out; - } - /** - * Calculates the length of a dual quat - * - * @param {ReadonlyQuat2} a dual quat to calculate length of - * @returns {Number} length of a - * @function - */ - - var length$3 = length$2; - /** - * Alias for {@link quat2.length} - * @function - */ - - var len$3 = length$3; - /** - * Calculates the squared length of a dual quat - * - * @param {ReadonlyQuat2} a dual quat to calculate squared length of - * @returns {Number} squared length of a - * @function - */ - - var squaredLength$3 = squaredLength$2; - /** - * Alias for {@link quat2.squaredLength} - * @function - */ - - var sqrLen$3 = squaredLength$3; - /** - * Normalize a dual quat - * - * @param {quat2} out the receiving dual quaternion - * @param {ReadonlyQuat2} a dual quaternion to normalize - * @returns {quat2} out - * @function - */ - - function normalize$3(out, a) { - var magnitude = squaredLength$3(a); - - if (magnitude > 0) { - magnitude = Math.sqrt(magnitude); - var a0 = a[0] / magnitude; - var a1 = a[1] / magnitude; - var a2 = a[2] / magnitude; - var a3 = a[3] / magnitude; - var b0 = a[4]; - var b1 = a[5]; - var b2 = a[6]; - var b3 = a[7]; - var a_dot_b = a0 * b0 + a1 * b1 + a2 * b2 + a3 * b3; - out[0] = a0; - out[1] = a1; - out[2] = a2; - out[3] = a3; - out[4] = (b0 - a0 * a_dot_b) / magnitude; - out[5] = (b1 - a1 * a_dot_b) / magnitude; - out[6] = (b2 - a2 * a_dot_b) / magnitude; - out[7] = (b3 - a3 * a_dot_b) / magnitude; - } - - return out; - } - /** - * Returns a string representation of a dual quatenion - * - * @param {ReadonlyQuat2} a dual quaternion to represent as a string - * @returns {String} string representation of the dual quat - */ - - function str$7(a) { - return "quat2(" + a[0] + ", " + a[1] + ", " + a[2] + ", " + a[3] + ", " + a[4] + ", " + a[5] + ", " + a[6] + ", " + a[7] + ")"; - } - /** - * Returns whether or not the dual quaternions have exactly the same elements in the same position (when compared with ===) - * - * @param {ReadonlyQuat2} a the first dual quaternion. - * @param {ReadonlyQuat2} b the second dual quaternion. - * @returns {Boolean} true if the dual quaternions are equal, false otherwise. - */ - - function exactEquals$7(a, b) { - return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5] && a[6] === b[6] && a[7] === b[7]; - } - /** - * Returns whether or not the dual quaternions have approximately the same elements in the same position. - * - * @param {ReadonlyQuat2} a the first dual quat. - * @param {ReadonlyQuat2} b the second dual quat. - * @returns {Boolean} true if the dual quats are equal, false otherwise. - */ - - function equals$8(a, b) { - var a0 = a[0], - a1 = a[1], - a2 = a[2], - a3 = a[3], - a4 = a[4], - a5 = a[5], - a6 = a[6], - a7 = a[7]; - var b0 = b[0], - b1 = b[1], - b2 = b[2], - b3 = b[3], - b4 = b[4], - b5 = b[5], - b6 = b[6], - b7 = b[7]; - return Math.abs(a0 - b0) <= EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= EPSILON * Math.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= EPSILON * Math.max(1.0, Math.abs(a5), Math.abs(b5)) && Math.abs(a6 - b6) <= EPSILON * Math.max(1.0, Math.abs(a6), Math.abs(b6)) && Math.abs(a7 - b7) <= EPSILON * Math.max(1.0, Math.abs(a7), Math.abs(b7)); - } - - var quat2 = /*#__PURE__*/Object.freeze({ - __proto__: null, - create: create$7, - clone: clone$7, - fromValues: fromValues$7, - fromRotationTranslationValues: fromRotationTranslationValues, - fromRotationTranslation: fromRotationTranslation$1, - fromTranslation: fromTranslation$3, - fromRotation: fromRotation$4, - fromMat4: fromMat4$1, - copy: copy$7, - identity: identity$5, - set: set$7, - getReal: getReal, - getDual: getDual, - setReal: setReal, - setDual: setDual, - getTranslation: getTranslation$1, - translate: translate$3, - rotateX: rotateX$3, - rotateY: rotateY$3, - rotateZ: rotateZ$3, - rotateByQuatAppend: rotateByQuatAppend, - rotateByQuatPrepend: rotateByQuatPrepend, - rotateAroundAxis: rotateAroundAxis, - add: add$7, - multiply: multiply$7, - mul: mul$7, - scale: scale$7, - dot: dot$3, - lerp: lerp$3, - invert: invert$5, - conjugate: conjugate$1, - length: length$3, - len: len$3, - squaredLength: squaredLength$3, - sqrLen: sqrLen$3, - normalize: normalize$3, - str: str$7, - exactEquals: exactEquals$7, - equals: equals$8 - }); - - /** - * 2 Dimensional Vector - * @module vec2 - */ - - /** - * Creates a new, empty vec2 - * - * @returns {vec2} a new 2D vector - */ - - function create$8() { - var out = new ARRAY_TYPE(2); - - if (ARRAY_TYPE != Float32Array) { - out[0] = 0; - out[1] = 0; - } - - return out; - } - /** - * Creates a new vec2 initialized with values from an existing vector - * - * @param {ReadonlyVec2} a vector to clone - * @returns {vec2} a new 2D vector - */ - - function clone$8(a) { - var out = new ARRAY_TYPE(2); - out[0] = a[0]; - out[1] = a[1]; - return out; - } - /** - * Creates a new vec2 initialized with the given values - * - * @param {Number} x X component - * @param {Number} y Y component - * @returns {vec2} a new 2D vector - */ - - function fromValues$8(x, y) { - var out = new ARRAY_TYPE(2); - out[0] = x; - out[1] = y; - return out; - } - /** - * Copy the values from one vec2 to another - * - * @param {vec2} out the receiving vector - * @param {ReadonlyVec2} a the source vector - * @returns {vec2} out - */ - - function copy$8(out, a) { - out[0] = a[0]; - out[1] = a[1]; - return out; - } - /** - * Set the components of a vec2 to the given values - * - * @param {vec2} out the receiving vector - * @param {Number} x X component - * @param {Number} y Y component - * @returns {vec2} out - */ - - function set$8(out, x, y) { - out[0] = x; - out[1] = y; - return out; - } - /** - * Adds two vec2's - * - * @param {vec2} out the receiving vector - * @param {ReadonlyVec2} a the first operand - * @param {ReadonlyVec2} b the second operand - * @returns {vec2} out - */ - - function add$8(out, a, b) { - out[0] = a[0] + b[0]; - out[1] = a[1] + b[1]; - return out; - } - /** - * Subtracts vector b from vector a - * - * @param {vec2} out the receiving vector - * @param {ReadonlyVec2} a the first operand - * @param {ReadonlyVec2} b the second operand - * @returns {vec2} out - */ - - function subtract$6(out, a, b) { - out[0] = a[0] - b[0]; - out[1] = a[1] - b[1]; - return out; - } - /** - * Multiplies two vec2's - * - * @param {vec2} out the receiving vector - * @param {ReadonlyVec2} a the first operand - * @param {ReadonlyVec2} b the second operand - * @returns {vec2} out - */ - - function multiply$8(out, a, b) { - out[0] = a[0] * b[0]; - out[1] = a[1] * b[1]; - return out; - } - /** - * Divides two vec2's - * - * @param {vec2} out the receiving vector - * @param {ReadonlyVec2} a the first operand - * @param {ReadonlyVec2} b the second operand - * @returns {vec2} out - */ - - function divide$2(out, a, b) { - out[0] = a[0] / b[0]; - out[1] = a[1] / b[1]; - return out; - } - /** - * Math.ceil the components of a vec2 - * - * @param {vec2} out the receiving vector - * @param {ReadonlyVec2} a vector to ceil - * @returns {vec2} out - */ - - function ceil$2(out, a) { - out[0] = Math.ceil(a[0]); - out[1] = Math.ceil(a[1]); - return out; - } - /** - * Math.floor the components of a vec2 - * - * @param {vec2} out the receiving vector - * @param {ReadonlyVec2} a vector to floor - * @returns {vec2} out - */ - - function floor$2(out, a) { - out[0] = Math.floor(a[0]); - out[1] = Math.floor(a[1]); - return out; - } - /** - * Returns the minimum of two vec2's - * - * @param {vec2} out the receiving vector - * @param {ReadonlyVec2} a the first operand - * @param {ReadonlyVec2} b the second operand - * @returns {vec2} out - */ - - function min$2(out, a, b) { - out[0] = Math.min(a[0], b[0]); - out[1] = Math.min(a[1], b[1]); - return out; - } - /** - * Returns the maximum of two vec2's - * - * @param {vec2} out the receiving vector - * @param {ReadonlyVec2} a the first operand - * @param {ReadonlyVec2} b the second operand - * @returns {vec2} out - */ - - function max$2(out, a, b) { - out[0] = Math.max(a[0], b[0]); - out[1] = Math.max(a[1], b[1]); - return out; - } - /** - * Math.round the components of a vec2 - * - * @param {vec2} out the receiving vector - * @param {ReadonlyVec2} a vector to round - * @returns {vec2} out - */ - - function round$2(out, a) { - out[0] = Math.round(a[0]); - out[1] = Math.round(a[1]); - return out; - } - /** - * Scales a vec2 by a scalar number - * - * @param {vec2} out the receiving vector - * @param {ReadonlyVec2} a the vector to scale - * @param {Number} b amount to scale the vector by - * @returns {vec2} out - */ - - function scale$8(out, a, b) { - out[0] = a[0] * b; - out[1] = a[1] * b; - return out; - } - /** - * Adds two vec2's after scaling the second operand by a scalar value - * - * @param {vec2} out the receiving vector - * @param {ReadonlyVec2} a the first operand - * @param {ReadonlyVec2} b the second operand - * @param {Number} scale the amount to scale b by before adding - * @returns {vec2} out - */ - - function scaleAndAdd$2(out, a, b, scale) { - out[0] = a[0] + b[0] * scale; - out[1] = a[1] + b[1] * scale; - return out; - } - /** - * Calculates the euclidian distance between two vec2's - * - * @param {ReadonlyVec2} a the first operand - * @param {ReadonlyVec2} b the second operand - * @returns {Number} distance between a and b - */ - - function distance$2(a, b) { - var x = b[0] - a[0], - y = b[1] - a[1]; - return Math.hypot(x, y); - } - /** - * Calculates the squared euclidian distance between two vec2's - * - * @param {ReadonlyVec2} a the first operand - * @param {ReadonlyVec2} b the second operand - * @returns {Number} squared distance between a and b - */ - - function squaredDistance$2(a, b) { - var x = b[0] - a[0], - y = b[1] - a[1]; - return x * x + y * y; - } - /** - * Calculates the length of a vec2 - * - * @param {ReadonlyVec2} a vector to calculate length of - * @returns {Number} length of a - */ - - function length$4(a) { - var x = a[0], - y = a[1]; - return Math.hypot(x, y); - } - /** - * Calculates the squared length of a vec2 - * - * @param {ReadonlyVec2} a vector to calculate squared length of - * @returns {Number} squared length of a - */ - - function squaredLength$4(a) { - var x = a[0], - y = a[1]; - return x * x + y * y; - } - /** - * Negates the components of a vec2 - * - * @param {vec2} out the receiving vector - * @param {ReadonlyVec2} a vector to negate - * @returns {vec2} out - */ - - function negate$2(out, a) { - out[0] = -a[0]; - out[1] = -a[1]; - return out; - } - /** - * Returns the inverse of the components of a vec2 - * - * @param {vec2} out the receiving vector - * @param {ReadonlyVec2} a vector to invert - * @returns {vec2} out - */ - - function inverse$2(out, a) { - out[0] = 1.0 / a[0]; - out[1] = 1.0 / a[1]; - return out; - } - /** - * Normalize a vec2 - * - * @param {vec2} out the receiving vector - * @param {ReadonlyVec2} a vector to normalize - * @returns {vec2} out - */ - - function normalize$4(out, a) { - var x = a[0], - y = a[1]; - var len = x * x + y * y; - - if (len > 0) { - //TODO: evaluate use of glm_invsqrt here? - len = 1 / Math.sqrt(len); - } - - out[0] = a[0] * len; - out[1] = a[1] * len; - return out; - } - /** - * Calculates the dot product of two vec2's - * - * @param {ReadonlyVec2} a the first operand - * @param {ReadonlyVec2} b the second operand - * @returns {Number} dot product of a and b - */ - - function dot$4(a, b) { - return a[0] * b[0] + a[1] * b[1]; - } - /** - * Computes the cross product of two vec2's - * Note that the cross product must by definition produce a 3D vector - * - * @param {vec3} out the receiving vector - * @param {ReadonlyVec2} a the first operand - * @param {ReadonlyVec2} b the second operand - * @returns {vec3} out - */ - - function cross$2(out, a, b) { - var z = a[0] * b[1] - a[1] * b[0]; - out[0] = out[1] = 0; - out[2] = z; - return out; - } - /** - * Performs a linear interpolation between two vec2's - * - * @param {vec2} out the receiving vector - * @param {ReadonlyVec2} a the first operand - * @param {ReadonlyVec2} b the second operand - * @param {Number} t interpolation amount, in the range [0-1], between the two inputs - * @returns {vec2} out - */ - - function lerp$4(out, a, b, t) { - var ax = a[0], - ay = a[1]; - out[0] = ax + t * (b[0] - ax); - out[1] = ay + t * (b[1] - ay); - return out; - } - /** - * Generates a random vector with the given scale - * - * @param {vec2} out the receiving vector - * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned - * @returns {vec2} out - */ - - function random$3(out, scale) { - scale = scale || 1.0; - var r = RANDOM() * 2.0 * Math.PI; - out[0] = Math.cos(r) * scale; - out[1] = Math.sin(r) * scale; - return out; - } - /** - * Transforms the vec2 with a mat2 - * - * @param {vec2} out the receiving vector - * @param {ReadonlyVec2} a the vector to transform - * @param {ReadonlyMat2} m matrix to transform with - * @returns {vec2} out - */ - - function transformMat2(out, a, m) { - var x = a[0], - y = a[1]; - out[0] = m[0] * x + m[2] * y; - out[1] = m[1] * x + m[3] * y; - return out; - } - /** - * Transforms the vec2 with a mat2d - * - * @param {vec2} out the receiving vector - * @param {ReadonlyVec2} a the vector to transform - * @param {ReadonlyMat2d} m matrix to transform with - * @returns {vec2} out - */ - - function transformMat2d(out, a, m) { - var x = a[0], - y = a[1]; - out[0] = m[0] * x + m[2] * y + m[4]; - out[1] = m[1] * x + m[3] * y + m[5]; - return out; - } - /** - * Transforms the vec2 with a mat3 - * 3rd vector component is implicitly '1' - * - * @param {vec2} out the receiving vector - * @param {ReadonlyVec2} a the vector to transform - * @param {ReadonlyMat3} m matrix to transform with - * @returns {vec2} out - */ - - function transformMat3$1(out, a, m) { - var x = a[0], - y = a[1]; - out[0] = m[0] * x + m[3] * y + m[6]; - out[1] = m[1] * x + m[4] * y + m[7]; - return out; - } - /** - * Transforms the vec2 with a mat4 - * 3rd vector component is implicitly '0' - * 4th vector component is implicitly '1' - * - * @param {vec2} out the receiving vector - * @param {ReadonlyVec2} a the vector to transform - * @param {ReadonlyMat4} m matrix to transform with - * @returns {vec2} out - */ - - function transformMat4$2(out, a, m) { - var x = a[0]; - var y = a[1]; - out[0] = m[0] * x + m[4] * y + m[12]; - out[1] = m[1] * x + m[5] * y + m[13]; - return out; - } - /** - * Rotate a 2D vector - * @param {vec2} out The receiving vec2 - * @param {ReadonlyVec2} a The vec2 point to rotate - * @param {ReadonlyVec2} b The origin of the rotation - * @param {Number} rad The angle of rotation in radians - * @returns {vec2} out - */ - - function rotate$4(out, a, b, rad) { - //Translate point to the origin - var p0 = a[0] - b[0], - p1 = a[1] - b[1], - sinC = Math.sin(rad), - cosC = Math.cos(rad); //perform rotation and translate to correct position - - out[0] = p0 * cosC - p1 * sinC + b[0]; - out[1] = p0 * sinC + p1 * cosC + b[1]; - return out; - } - /** - * Get the angle between two 2D vectors - * @param {ReadonlyVec2} a The first operand - * @param {ReadonlyVec2} b The second operand - * @returns {Number} The angle in radians - */ - - function angle$1(a, b) { - var x1 = a[0], - y1 = a[1], - x2 = b[0], - y2 = b[1], - // mag is the product of the magnitudes of a and b - mag = Math.sqrt(x1 * x1 + y1 * y1) * Math.sqrt(x2 * x2 + y2 * y2), - // mag &&.. short circuits if mag == 0 - cosine = mag && (x1 * x2 + y1 * y2) / mag; // Math.min(Math.max(cosine, -1), 1) clamps the cosine between -1 and 1 - - return Math.acos(Math.min(Math.max(cosine, -1), 1)); - } - /** - * Set the components of a vec2 to zero - * - * @param {vec2} out the receiving vector - * @returns {vec2} out - */ - - function zero$2(out) { - out[0] = 0.0; - out[1] = 0.0; - return out; - } - /** - * Returns a string representation of a vector - * - * @param {ReadonlyVec2} a vector to represent as a string - * @returns {String} string representation of the vector - */ - - function str$8(a) { - return "vec2(" + a[0] + ", " + a[1] + ")"; - } - /** - * Returns whether or not the vectors exactly have the same elements in the same position (when compared with ===) - * - * @param {ReadonlyVec2} a The first vector. - * @param {ReadonlyVec2} b The second vector. - * @returns {Boolean} True if the vectors are equal, false otherwise. - */ - - function exactEquals$8(a, b) { - return a[0] === b[0] && a[1] === b[1]; - } - /** - * Returns whether or not the vectors have approximately the same elements in the same position. - * - * @param {ReadonlyVec2} a The first vector. - * @param {ReadonlyVec2} b The second vector. - * @returns {Boolean} True if the vectors are equal, false otherwise. - */ - - function equals$9(a, b) { - var a0 = a[0], - a1 = a[1]; - var b0 = b[0], - b1 = b[1]; - return Math.abs(a0 - b0) <= EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)); - } - /** - * Alias for {@link vec2.length} - * @function - */ - - var len$4 = length$4; - /** - * Alias for {@link vec2.subtract} - * @function - */ - - var sub$6 = subtract$6; - /** - * Alias for {@link vec2.multiply} - * @function - */ - - var mul$8 = multiply$8; - /** - * Alias for {@link vec2.divide} - * @function - */ - - var div$2 = divide$2; - /** - * Alias for {@link vec2.distance} - * @function - */ - - var dist$2 = distance$2; - /** - * Alias for {@link vec2.squaredDistance} - * @function - */ - - var sqrDist$2 = squaredDistance$2; - /** - * Alias for {@link vec2.squaredLength} - * @function - */ - - var sqrLen$4 = squaredLength$4; - /** - * Perform some operation over an array of vec2s. - * - * @param {Array} a the array of vectors to iterate over - * @param {Number} stride Number of elements between the start of each vec2. If 0 assumes tightly packed - * @param {Number} offset Number of elements to skip at the beginning of the array - * @param {Number} count Number of vec2s to iterate over. If 0 iterates over entire array - * @param {Function} fn Function to call for each vector in the array - * @param {Object} [arg] additional argument to pass to fn - * @returns {Array} a - * @function - */ - - var forEach$2 = function () { - var vec = create$8(); - return function (a, stride, offset, count, fn, arg) { - var i, l; - - if (!stride) { - stride = 2; - } - - if (!offset) { - offset = 0; - } - - if (count) { - l = Math.min(count * stride + offset, a.length); - } else { - l = a.length; - } - - for (i = offset; i < l; i += stride) { - vec[0] = a[i]; - vec[1] = a[i + 1]; - fn(vec, vec, arg); - a[i] = vec[0]; - a[i + 1] = vec[1]; - } - - return a; - }; - }(); - - var vec2 = /*#__PURE__*/Object.freeze({ - __proto__: null, - create: create$8, - clone: clone$8, - fromValues: fromValues$8, - copy: copy$8, - set: set$8, - add: add$8, - subtract: subtract$6, - multiply: multiply$8, - divide: divide$2, - ceil: ceil$2, - floor: floor$2, - min: min$2, - max: max$2, - round: round$2, - scale: scale$8, - scaleAndAdd: scaleAndAdd$2, - distance: distance$2, - squaredDistance: squaredDistance$2, - length: length$4, - squaredLength: squaredLength$4, - negate: negate$2, - inverse: inverse$2, - normalize: normalize$4, - dot: dot$4, - cross: cross$2, - lerp: lerp$4, - random: random$3, - transformMat2: transformMat2, - transformMat2d: transformMat2d, - transformMat3: transformMat3$1, - transformMat4: transformMat4$2, - rotate: rotate$4, - angle: angle$1, - zero: zero$2, - str: str$8, - exactEquals: exactEquals$8, - equals: equals$9, - len: len$4, - sub: sub$6, - mul: mul$8, - div: div$2, - dist: dist$2, - sqrDist: sqrDist$2, - sqrLen: sqrLen$4, - forEach: forEach$2 - }); - - exports.glMatrix = common; - exports.mat2 = mat2; - exports.mat2d = mat2d; - exports.mat3 = mat3; - exports.mat4 = mat4; - exports.quat = quat; - exports.quat2 = quat2; - exports.vec2 = vec2; - exports.vec3 = vec3; - exports.vec4 = vec4; - - Object.defineProperty(exports, '__esModule', { value: true }); + exports.vec4 = vec4; }))); diff --git a/package.json b/package.json index eba37f36..ae355002 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "build-umd": "rollup -c", "build-esm": "cross-env BABEL_ENV=esm babel js -d dist/esm", "build-cjs": "babel js -d dist/cjs", - "build-dts": "tsc --allowJs --declaration --emitDeclarationOnly --outFile ./dist/index.d.ts ./js/index.js ./js/types.d.ts && node ./utils/bundle-dts.js && tsc --noEmit ./dist/index.d.ts", + "build-dts": "tsc --allowJs --declaration --emitDeclarationOnly --outFile ./dist/index.d.ts ./assembly/index.ts ./js/types.d.ts && tsc --noEmit ./dist/index.d.ts", "build": "del dist && npm run update-license-version && npm run build-js && npm run build-umd && npm run build-esm && npm run build-cjs && npm run build-dts && node ./utils/build.js", "prepare": "npm run build", "asbuild:untouched": "asc assembly/index.as.ts --target debug", diff --git a/rollup.config.js b/rollup.config.js index 1f3fb1f0..6f5c71eb 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -5,7 +5,7 @@ import { sizeSnapshot } from 'rollup-plugin-size-snapshot'; const version = require('./package.json').version; const license = require('./utils/license-template'); -const input = './src/index.js'; +const input = './js/index.js'; const name = 'glMatrix'; const bannerPlugin = { diff --git a/utils/build.js b/utils/build.js index 5d28d06a..d664eb3e 100644 --- a/utils/build.js +++ b/utils/build.js @@ -17,7 +17,7 @@ fs.writeFileSync('dist/package.json', JSON.stringify(pkg, null, 2)); copyFileSync('README.md', 'dist/README.md'); copyFileSync('LICENSE.md', 'dist/LICENSE.md'); -const files = fs.readdirSync('src') +const files = fs.readdirSync('js') .filter(file => !file.includes('common') && !file.includes('index')) .forEach(file => { const name = file.endsWith('.js') ? file.slice(0, -3) : file; From a53c4e388595252ecc140f9edd215fac9ef2ff9a Mon Sep 17 00:00:00 2001 From: Huguenin-Elie Steve Date: Sun, 28 Mar 2021 13:05:41 +0200 Subject: [PATCH 11/32] build successfully javascript and webassembly --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ae355002..60834501 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "build-esm": "cross-env BABEL_ENV=esm babel js -d dist/esm", "build-cjs": "babel js -d dist/cjs", "build-dts": "tsc --allowJs --declaration --emitDeclarationOnly --outFile ./dist/index.d.ts ./assembly/index.ts ./js/types.d.ts && tsc --noEmit ./dist/index.d.ts", - "build": "del dist && npm run update-license-version && npm run build-js && npm run build-umd && npm run build-esm && npm run build-cjs && npm run build-dts && node ./utils/build.js", + "build": "del dist && npm run update-license-version && npm run build-js && npm run build-umd && npm run build-esm && npm run build-cjs && npm run build-dts && node ./utils/build.js && npm run asbuild", "prepare": "npm run build", "asbuild:untouched": "asc assembly/index.as.ts --target debug", "asbuild:optimized": "asc assembly/index.as.ts --target release", From 6f18cce3319e4cf9c9addfa0e3ce9f8547198d82 Mon Sep 17 00:00:00 2001 From: Huguenin-Elie Steve Date: Mon, 29 Mar 2021 17:45:18 +0200 Subject: [PATCH 12/32] removed directive for TS typings --- assembly/tsconfig.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/assembly/tsconfig.json b/assembly/tsconfig.json index d0c49237..e020765c 100644 --- a/assembly/tsconfig.json +++ b/assembly/tsconfig.json @@ -1,8 +1,5 @@ { "extends": "assemblyscript/std/portable.json", - "compilerOptions": { - "types": ["types.d.ts"] - }, "include": [ "./**/*.ts" ] From f1b573b235639e971158b3d42e5a713f09aff4ce Mon Sep 17 00:00:00 2001 From: Huguenin-Elie Steve Date: Mon, 29 Mar 2021 18:35:49 +0200 Subject: [PATCH 13/32] another fix to AS100 for expected closure --- assembly/quat.ts | 15 +- assembly/vec2.ts | 5 +- assembly/vec3.ts | 5 +- assembly/vec4.ts | 5 +- build/optimized.wat | 756 ++++++++++++++++++++++++-------------------- build/untouched.wat | 720 +++++++++++++++++++++++------------------ 6 files changed, 829 insertions(+), 677 deletions(-) diff --git a/assembly/quat.ts b/assembly/quat.ts index c882153d..4cce4070 100644 --- a/assembly/quat.ts +++ b/assembly/quat.ts @@ -693,7 +693,7 @@ export function equals(a: ReadonlyQuat, b: ReadonlyQuat): bool { let tmpvec3 = vec3.create(); let xUnitVec3 = vec3.fromValues(1, 0, 0); let yUnitVec3 = vec3.fromValues(0, 1, 0); -export function rotationTo(): (out: quat, a: ReadonlyQuat, b: ReadonlyQuat) => quat { +export const rotationTo = ((): (out: quat, a: ReadonlyQuat, b: ReadonlyQuat) => quat => { return function (out: quat, a: ReadonlyQuat, b: ReadonlyQuat) { let dot = vec3.dot(a, b); @@ -718,8 +718,7 @@ export function rotationTo(): (out: quat, a: ReadonlyQuat, b: ReadonlyQuat) => q return normalize(out, out); } }; -} -rotationTo(); +})(); /** * Performs a spherical linear interpolation with two control points @@ -734,7 +733,7 @@ rotationTo(); */ let temp1 = create(); let temp2 = create(); -export function sqlerp(): (out: quat, a: ReadonlyQuat, b: ReadonlyQuat, c: ReadonlyQuat, d: ReadonlyQuat, t: f64) => quat { +export const sqlerp = ((): (out: quat, a: ReadonlyQuat, b: ReadonlyQuat, c: ReadonlyQuat, d: ReadonlyQuat, t: f64) => quat => { return function (out: quat, a: ReadonlyQuat, b: ReadonlyQuat, c: ReadonlyQuat, d: ReadonlyQuat, t: f64) { slerp(temp1, a, d, t); @@ -743,8 +742,7 @@ export function sqlerp(): (out: quat, a: ReadonlyQuat, b: ReadonlyQuat, c: Reado return out; }; -} -sqlerp(); +})(); /** * Sets the specified quaternion with values corresponding to the given @@ -758,7 +756,7 @@ sqlerp(); * @returns {quat} out */ let matr = mat3.create(); -export function setAxes(): (out: quat, view: vec3.ReadonlyVec3, right: vec3.ReadonlyVec3, up: vec3.ReadonlyVec3) => quat { +export const setAxes = ((): (out: quat, view: vec3.ReadonlyVec3, right: vec3.ReadonlyVec3, up: vec3.ReadonlyVec3) => quat => { return function (out: quat, view: vec3.ReadonlyVec3, right: vec3.ReadonlyVec3, up: vec3.ReadonlyVec3) { matr[0] = right[0]; @@ -775,5 +773,4 @@ export function setAxes(): (out: quat, view: vec3.ReadonlyVec3, right: vec3.Read return normalize(out, fromMat3(out, matr)); }; -} -setAxes(); +})(); diff --git a/assembly/vec2.ts b/assembly/vec2.ts index 2f417707..a138991a 100644 --- a/assembly/vec2.ts +++ b/assembly/vec2.ts @@ -605,7 +605,7 @@ export const sqrLen = squaredLength; * @function */ let vec = create(); -export function forEach(): (a: vec2, stride: i32, offset: i32, count: i32, fn: (a: vec2, b: vec2, arg: IArguments) => void, arg: IArguments) => vec2 { +export const forEach = ((): (a: vec2, stride: i32, offset: i32, count: i32, fn: (a: vec2, b: vec2, arg: IArguments) => void, arg: IArguments) => vec2 => { return function (a: vec2, stride: i32, offset: i32, count: i32, fn: (a: vec2, b: vec2, arg: IArguments) => void, arg: IArguments) { let i: i32, l: i32; @@ -633,5 +633,4 @@ export function forEach(): (a: vec2, stride: i32, offset: i32, count: i32, fn: ( return a; }; -} -forEach(); +})(); diff --git a/assembly/vec3.ts b/assembly/vec3.ts index dd39c315..895a36da 100644 --- a/assembly/vec3.ts +++ b/assembly/vec3.ts @@ -803,7 +803,7 @@ export const sqrLen = squaredLength; * @function */ let vec = create(); -export function forEach(): (a: vec3, stride: i32, offset: i32, count: i32, fn: (a: vec3, b: vec3, arg: IArguments) => void, arg: IArguments) => vec3 { +export const forEach = ((): (a: vec3, stride: i32, offset: i32, count: i32, fn: (a: vec3, b: vec3, arg: IArguments) => void, arg: IArguments) => vec3 => { return function(a: vec3, stride: i32, offset: i32, count: i32, fn: (a: vec3, b: vec3, arg: IArguments) => void, arg: IArguments) { let i: i32, l: i32; @@ -833,5 +833,4 @@ export function forEach(): (a: vec3, stride: i32, offset: i32, count: i32, fn: ( return a; }; -} -forEach(); +})(); diff --git a/assembly/vec4.ts b/assembly/vec4.ts index 3c938a8f..85382ab2 100644 --- a/assembly/vec4.ts +++ b/assembly/vec4.ts @@ -642,7 +642,7 @@ export const sqrLen = squaredLength; * @function */ let vec = create(); -export function forEach(): (a: vec4, stride: i32, offset: i32, count: i32, fn: (a: vec4, b: vec4, arg: IArguments) => void, arg: IArguments) => vec4 { +export const forEach = ((): (a: vec4, stride: i32, offset: i32, count: i32, fn: (a: vec4, b: vec4, arg: IArguments) => void, arg: IArguments) => vec4 => { return function(a: vec4, stride: i32, offset: i32, count: i32, fn: (a: vec4, b: vec4, arg: IArguments) => void, arg: IArguments) { let i: i32, l: i32; @@ -674,5 +674,4 @@ export function forEach(): (a: vec4, stride: i32, offset: i32, count: i32, fn: ( return a; }; -} -forEach(); +})(); diff --git a/build/optimized.wat b/build/optimized.wat index 432dea6c..adab859b 100644 --- a/build/optimized.wat +++ b/build/optimized.wat @@ -95,68 +95,68 @@ (data (i32.const 1948) "<") (data (i32.const 1960) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s") (data (i32.const 2012) "\1c") - (data (i32.const 2024) "\t\00\00\00\08\00\00\00\0b") + (data (i32.const 2024) "\n\00\00\00\08\00\00\00\0b") (data (i32.const 2044) "\1c") - (data (i32.const 2056) "\05\00\00\00\08\00\00\00\0c") + (data (i32.const 2056) "\t\00\00\00\08\00\00\00\0c") (data (i32.const 2076) "\1c") (data (i32.const 2088) "\05\00\00\00\08\00\00\00\0d") (data (i32.const 2108) "\1c") (data (i32.const 2120) "\05\00\00\00\08\00\00\00\0e") (data (i32.const 2140) "\1c") - (data (i32.const 2152) "\06\00\00\00\08\00\00\00\0f") + (data (i32.const 2152) "\05\00\00\00\08\00\00\00\0f") (data (i32.const 2172) "\1c") (data (i32.const 2184) "\06\00\00\00\08\00\00\00\10") (data (i32.const 2204) "\1c") - (data (i32.const 2216) "\07\00\00\00\08\00\00\00\11") + (data (i32.const 2216) "\06\00\00\00\08\00\00\00\11") (data (i32.const 2236) "\1c") (data (i32.const 2248) "\07\00\00\00\08\00\00\00\12") (data (i32.const 2268) "\1c") - (data (i32.const 2280) "\t\00\00\00\08\00\00\00\13") + (data (i32.const 2280) "\07\00\00\00\08\00\00\00\13") (data (i32.const 2300) "\1c") (data (i32.const 2312) "\n\00\00\00\08\00\00\00\14") (data (i32.const 2332) "\1c") - (data (i32.const 2344) "\0b\00\00\00\08\00\00\00\15") + (data (i32.const 2344) "\t\00\00\00\08\00\00\00\15") (data (i32.const 2364) "\1c") - (data (i32.const 2376) "\0c\00\00\00\08\00\00\00\16") + (data (i32.const 2376) "\0b\00\00\00\08\00\00\00\16") (data (i32.const 2396) "\1c") - (data (i32.const 2408) "\0d\00\00\00\08\00\00\00\17") + (data (i32.const 2408) "\0c\00\00\00\08\00\00\00\17") (data (i32.const 2428) "\1c") - (data (i32.const 2440) "\05\00\00\00\08\00\00\00\18") + (data (i32.const 2440) "\0d\00\00\00\08\00\00\00\18") (data (i32.const 2460) "\1c") - (data (i32.const 2472) "\05\00\00\00\08\00\00\00\19") + (data (i32.const 2472) "\0e\00\00\00\08\00\00\00\19") (data (i32.const 2492) "\1c") - (data (i32.const 2504) "\0e\00\00\00\08\00\00\00\1a") + (data (i32.const 2504) "\05\00\00\00\08\00\00\00\1a") (data (i32.const 2524) "\1c") - (data (i32.const 2536) "\06\00\00\00\08\00\00\00\1b") + (data (i32.const 2536) "\05\00\00\00\08\00\00\00\1b") (data (i32.const 2556) "\1c") (data (i32.const 2568) "\0f\00\00\00\08\00\00\00\1c") (data (i32.const 2588) "\1c") - (data (i32.const 2600) "\0c\00\00\00\08\00\00\00\1d") + (data (i32.const 2600) "\06\00\00\00\08\00\00\00\1d") (data (i32.const 2620) "\1c") (data (i32.const 2632) "\10\00\00\00\08\00\00\00\1e") - (data (i32.const 2656) "n\83\f9\a2\00\00\00\00\d1W\'\fc)\15DN\99\95b\db\c0\dd4\f5\abcQ\feA\90C<:n$\b7a\c5\bb\de\ea.I\06\e0\d2MB\1c\eb\1d\fe\1c\92\d1\t\f55\82\e8>\a7)\b1&p\9c\e9\84D\bb.9\d6\919A~_\b4\8b_\84\9c\f49S\83\ff\97\f8\1f;(\f9\bd\8b\11/\ef\0f\98\05\de\cf~6m\1fm\nZf?FO\b7\t\cb\'\c7\ba\'u-\ea_\9e\f79\07={\f1\e5\eb\b1_\fbk\ea\92R\8aF0\03V\08]\8d\1f \bc\cf\f0\abk{\fca\91\e3\a9\1d6\f4\9a_\85\99e\08\1b\e6^\80\d8\ff\8d@h\a0\14W\15\06\061\'sM") - (data (i32.const 2860) "\1c") - (data (i32.const 2872) "\05\00\00\00\08\00\00\00\1f") - (data (i32.const 2892) "\1c") - (data (i32.const 2904) "\11\00\00\00\08\00\00\00 ") + (data (i32.const 2652) "\1c") + (data (i32.const 2664) "\0d\00\00\00\08\00\00\00\1f") + (data (i32.const 2684) "\1c") + (data (i32.const 2696) "\11\00\00\00\08\00\00\00 ") + (data (i32.const 2720) "n\83\f9\a2\00\00\00\00\d1W\'\fc)\15DN\99\95b\db\c0\dd4\f5\abcQ\feA\90C<:n$\b7a\c5\bb\de\ea.I\06\e0\d2MB\1c\eb\1d\fe\1c\92\d1\t\f55\82\e8>\a7)\b1&p\9c\e9\84D\bb.9\d6\919A~_\b4\8b_\84\9c\f49S\83\ff\97\f8\1f;(\f9\bd\8b\11/\ef\0f\98\05\de\cf~6m\1fm\nZf?FO\b7\t\cb\'\c7\ba\'u-\ea_\9e\f79\07={\f1\e5\eb\b1_\fbk\ea\92R\8aF0\03V\08]\8d\1f \bc\cf\f0\abk{\fca\91\e3\a9\1d6\f4\9a_\85\99e\08\1b\e6^\80\d8\ff\8d@h\a0\14W\15\06\061\'sM") (data (i32.const 2924) "\1c") - (data (i32.const 2936) "\12\00\00\00\08\00\00\00!") + (data (i32.const 2936) "\05\00\00\00\08\00\00\00!") (data (i32.const 2956) "\1c") - (data (i32.const 2968) "\05\00\00\00\08\00\00\00\"") + (data (i32.const 2968) "\12\00\00\00\08\00\00\00\"") (data (i32.const 2988) "\1c") - (data (i32.const 3000) "\13\00\00\00\08\00\00\00#") + (data (i32.const 3000) "\14\00\00\00\08\00\00\00#") (data (i32.const 3020) "\1c") - (data (i32.const 3032) "\14\00\00\00\08\00\00\00$") + (data (i32.const 3032) "\13\00\00\00\08\00\00\00$") (data (i32.const 3052) "\1c") - (data (i32.const 3064) "\05\00\00\00\08\00\00\00%") + (data (i32.const 3064) "\16\00\00\00\08\00\00\00%") (data (i32.const 3084) "\1c") - (data (i32.const 3096) "\05\00\00\00\08\00\00\00&") + (data (i32.const 3096) "\15\00\00\00\08\00\00\00&") (data (i32.const 3116) "\1c") (data (i32.const 3128) "\05\00\00\00\08\00\00\00\'") (data (i32.const 3148) "\1c") - (data (i32.const 3160) "\05\00\00\00\08\00\00\00(") + (data (i32.const 3160) "\17\00\00\00\08\00\00\00(") (data (i32.const 3180) "\1c") - (data (i32.const 3192) "\07\00\00\00\08\00\00\00)") + (data (i32.const 3192) "\18\00\00\00\08\00\00\00)") (data (i32.const 3212) "\1c") (data (i32.const 3224) "\05\00\00\00\08\00\00\00*") (data (i32.const 3244) "\1c") @@ -164,80 +164,92 @@ (data (i32.const 3276) "\1c") (data (i32.const 3288) "\05\00\00\00\08\00\00\00,") (data (i32.const 3308) "\1c") - (data (i32.const 3320) "\06\00\00\00\08\00\00\00-") + (data (i32.const 3320) "\05\00\00\00\08\00\00\00-") (data (i32.const 3340) "\1c") - (data (i32.const 3352) "\06\00\00\00\08\00\00\00.") + (data (i32.const 3352) "\07\00\00\00\08\00\00\00.") (data (i32.const 3372) "\1c") - (data (i32.const 3384) "\07\00\00\00\08\00\00\00/") + (data (i32.const 3384) "\05\00\00\00\08\00\00\00/") (data (i32.const 3404) "\1c") - (data (i32.const 3416) "\t\00\00\00\08\00\00\000") + (data (i32.const 3416) "\05\00\00\00\08\00\00\000") (data (i32.const 3436) "\1c") (data (i32.const 3448) "\05\00\00\00\08\00\00\001") (data (i32.const 3468) "\1c") - (data (i32.const 3480) "\05\00\00\00\08\00\00\002") + (data (i32.const 3480) "\06\00\00\00\08\00\00\002") (data (i32.const 3500) "\1c") - (data (i32.const 3512) "\01\00\00\00\n\00\00\00m\00a\00t\002\00(") + (data (i32.const 3512) "\06\00\00\00\08\00\00\003") (data (i32.const 3532) "\1c") - (data (i32.const 3544) "\01\00\00\00\06\00\00\000\00.\000") + (data (i32.const 3544) "\07\00\00\00\08\00\00\004") (data (i32.const 3564) "\1c") - (data (i32.const 3576) "\01\00\00\00\06\00\00\00N\00a\00N") - (data (i32.const 3596) ",") - (data (i32.const 3608) "\01\00\00\00\12\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 3644) ",") - (data (i32.const 3656) "\01\00\00\00\10\00\00\00I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 3752) "\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8_f64) f64.const 0 @@ -20495,7 +20513,7 @@ i32.const 1 global.set $~argumentsLength local.get $1 - i32.const 2256 + i32.const 2288 i32.load call_indirect $0 (type $i32_=>_f64) local.tee $2 @@ -21327,7 +21345,7 @@ i32.lt_s if i32.const 1168 - i32.const 5328 + i32.const 5520 i32.const 108 i32.const 22 call $~lib/builtins/abort @@ -21351,7 +21369,7 @@ i32.gt_u if i32.const 1584 - i32.const 5328 + i32.const 5520 i32.const 14 i32.const 48 call $~lib/builtins/abort @@ -21447,7 +21465,7 @@ i32.ge_u if i32.const 1168 - i32.const 5328 + i32.const 5520 i32.const 92 i32.const 42 call $~lib/builtins/abort @@ -22062,7 +22080,7 @@ i32.const 8 i32.sub i32.load - br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $folding-inner2 $folding-inner0 $folding-inner2 $folding-inner0 $folding-inner0 $folding-inner0 $assembly/imports/IArguments $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $~lib/array/Array<~lib/typedarray/Float64Array> $folding-inner1 $assembly/mat4/Fov $folding-inner1 $invalid + br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $folding-inner2 $folding-inner0 $folding-inner2 $folding-inner0 $folding-inner0 $folding-inner0 $assembly/imports/IArguments $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $~lib/array/Array<~lib/typedarray/Float64Array> $folding-inner1 $assembly/mat4/Fov $folding-inner1 $invalid end return end @@ -22133,7 +22151,7 @@ memory.size i32.const 16 i32.shl - i32.const 22140 + i32.const 22364 i32.sub i32.const 1 i32.shr_u @@ -22149,8 +22167,20 @@ global.set $~lib/rt/itcms/fromSpace call $assembly/vec3/create global.set $assembly/vec3/vec + i32.const 0 + global.set $~argumentsLength + i32.const 2064 + i32.load + call_indirect $0 (type $none_=>_i32) + global.set $assembly/vec3/forEach call $assembly/vec4/create global.set $assembly/vec4/vec + i32.const 0 + global.set $~argumentsLength + i32.const 2352 + i32.load + call_indirect $0 (type $none_=>_i32) + global.set $assembly/vec4/forEach call $assembly/vec3/create global.set $assembly/quat/tmpvec3 f64.const 1 @@ -22163,29 +22193,53 @@ f64.const 0 call $assembly/vec3/fromValues global.set $assembly/quat/yUnitVec3 + i32.const 0 + global.set $~argumentsLength + i32.const 2976 + i32.load + call_indirect $0 (type $none_=>_i32) + global.set $assembly/quat/rotationTo call $assembly/quat/create global.set $assembly/quat/temp1 call $assembly/quat/create global.set $assembly/quat/temp2 + i32.const 0 + global.set $~argumentsLength + i32.const 3040 + i32.load + call_indirect $0 (type $none_=>_i32) + global.set $assembly/quat/sqlerp call $assembly/mat3/create global.set $assembly/quat/matr + i32.const 0 + global.set $~argumentsLength + i32.const 3104 + i32.load + call_indirect $0 (type $none_=>_i32) + global.set $assembly/quat/setAxes call $assembly/vec2/create global.set $assembly/vec2/vec + i32.const 0 + global.set $~argumentsLength + i32.const 3616 + i32.load + call_indirect $0 (type $none_=>_i32) + global.set $assembly/vec2/forEach ) (func $~stack_check global.get $~lib/memory/__stack_pointer - i32.const 5756 + i32.const 5980 i32.lt_s if - i32.const 22160 - i32.const 22208 + i32.const 22384 + i32.const 22432 i32.const 1 i32.const 1 call $~lib/builtins/abort unreachable end ) - (func $assembly/vec3/forEach~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (result i32) + (func $start:assembly/vec3~anonymous|0~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (result i32) (local $6 i32) (local $7 i32) (local $8 i32) @@ -22328,7 +22382,7 @@ global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $assembly/vec4/forEach~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (result i32) + (func $start:assembly/vec4~anonymous|0~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (result i32) (local $6 i32) (local $7 i32) (local $8 i32) @@ -22495,7 +22549,7 @@ global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $assembly/quat/rotationTo~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:assembly/quat~anonymous|0~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 f64) global.get $~lib/memory/__stack_pointer @@ -22645,7 +22699,7 @@ global.set $~argumentsLength local.get $0 local.get $0 - i32.const 2608 + i32.const 2672 i32.load call_indirect $0 (type $i32_i32_=>_i32) local.set $0 @@ -22657,7 +22711,7 @@ global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $assembly/quat/sqlerp~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 f64) (result i32) + (func $start:assembly/quat~anonymous|1~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 f64) (result i32) (local $6 i32) global.get $~lib/memory/__stack_pointer i32.const 12 @@ -22716,7 +22770,7 @@ global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $assembly/quat/setAxes~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:assembly/quat~anonymous|2~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) global.get $~lib/memory/__stack_pointer i32.const 12 @@ -22839,7 +22893,7 @@ global.set $~argumentsLength local.get $1 local.get $0 - i32.const 2608 + i32.const 2672 i32.load call_indirect $0 (type $i32_i32_=>_i32) global.get $~lib/memory/__stack_pointer @@ -22847,7 +22901,7 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $assembly/vec2/forEach~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (result i32) + (func $start:assembly/vec2~anonymous|0~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (result i32) (local $6 i32) (local $7 i32) (local $8 i32) @@ -22999,7 +23053,7 @@ i64.const 0 i64.store offset=56 global.get $~lib/memory/__stack_pointer - i32.const 3520 + i32.const 3712 i32.store offset=56 local.get $0 i32.const 0 @@ -23009,7 +23063,7 @@ global.get $~lib/memory/__stack_pointer local.get $1 i32.store offset=60 - i32.const 3520 + i32.const 3712 local.get $1 call $~lib/string/String.__concat local.set $1 @@ -23017,10 +23071,10 @@ local.get $1 i32.store offset=48 global.get $~lib/memory/__stack_pointer - i32.const 4720 + i32.const 4912 i32.store offset=52 local.get $1 - i32.const 4720 + i32.const 4912 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -23042,10 +23096,10 @@ local.get $1 i32.store offset=32 global.get $~lib/memory/__stack_pointer - i32.const 4720 + i32.const 4912 i32.store offset=36 local.get $1 - i32.const 4720 + i32.const 4912 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -23067,10 +23121,10 @@ local.get $1 i32.store offset=16 global.get $~lib/memory/__stack_pointer - i32.const 4720 + i32.const 4912 i32.store offset=20 local.get $1 - i32.const 4720 + i32.const 4912 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -23092,10 +23146,10 @@ local.get $0 i32.store global.get $~lib/memory/__stack_pointer - i32.const 4752 + i32.const 4944 i32.store offset=4 local.get $0 - i32.const 4752 + i32.const 4944 call $~lib/string/String.__concat global.get $~lib/memory/__stack_pointer i32.const -64 @@ -23147,7 +23201,7 @@ i64.const 0 i64.store offset=88 global.get $~lib/memory/__stack_pointer - i32.const 4784 + i32.const 4976 i32.store offset=88 local.get $0 i32.const 0 @@ -23157,7 +23211,7 @@ global.get $~lib/memory/__stack_pointer local.get $1 i32.store offset=92 - i32.const 4784 + i32.const 4976 local.get $1 call $~lib/string/String.__concat local.set $1 @@ -23165,10 +23219,10 @@ local.get $1 i32.store offset=80 global.get $~lib/memory/__stack_pointer - i32.const 4720 + i32.const 4912 i32.store offset=84 local.get $1 - i32.const 4720 + i32.const 4912 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -23190,10 +23244,10 @@ local.get $1 i32.store offset=64 global.get $~lib/memory/__stack_pointer - i32.const 4720 + i32.const 4912 i32.store offset=68 local.get $1 - i32.const 4720 + i32.const 4912 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -23215,10 +23269,10 @@ local.get $1 i32.store offset=48 global.get $~lib/memory/__stack_pointer - i32.const 4720 + i32.const 4912 i32.store offset=52 local.get $1 - i32.const 4720 + i32.const 4912 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -23240,10 +23294,10 @@ local.get $1 i32.store offset=32 global.get $~lib/memory/__stack_pointer - i32.const 4720 + i32.const 4912 i32.store offset=36 local.get $1 - i32.const 4720 + i32.const 4912 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -23265,10 +23319,10 @@ local.get $1 i32.store offset=16 global.get $~lib/memory/__stack_pointer - i32.const 4720 + i32.const 4912 i32.store offset=20 local.get $1 - i32.const 4720 + i32.const 4912 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -23290,10 +23344,10 @@ local.get $0 i32.store global.get $~lib/memory/__stack_pointer - i32.const 4752 + i32.const 4944 i32.store offset=4 local.get $0 - i32.const 4752 + i32.const 4944 call $~lib/string/String.__concat global.get $~lib/memory/__stack_pointer i32.const 96 @@ -23363,7 +23417,7 @@ i64.const 0 i64.store offset=136 global.get $~lib/memory/__stack_pointer - i32.const 4816 + i32.const 5008 i32.store offset=136 local.get $0 i32.const 0 @@ -23373,7 +23427,7 @@ global.get $~lib/memory/__stack_pointer local.get $1 i32.store offset=140 - i32.const 4816 + i32.const 5008 local.get $1 call $~lib/string/String.__concat local.set $1 @@ -23381,10 +23435,10 @@ local.get $1 i32.store offset=128 global.get $~lib/memory/__stack_pointer - i32.const 4720 + i32.const 4912 i32.store offset=132 local.get $1 - i32.const 4720 + i32.const 4912 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -23406,10 +23460,10 @@ local.get $1 i32.store offset=112 global.get $~lib/memory/__stack_pointer - i32.const 4720 + i32.const 4912 i32.store offset=116 local.get $1 - i32.const 4720 + i32.const 4912 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -23431,10 +23485,10 @@ local.get $1 i32.store offset=96 global.get $~lib/memory/__stack_pointer - i32.const 4720 + i32.const 4912 i32.store offset=100 local.get $1 - i32.const 4720 + i32.const 4912 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -23456,10 +23510,10 @@ local.get $1 i32.store offset=80 global.get $~lib/memory/__stack_pointer - i32.const 4720 + i32.const 4912 i32.store offset=84 local.get $1 - i32.const 4720 + i32.const 4912 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -23481,10 +23535,10 @@ local.get $1 i32.store offset=64 global.get $~lib/memory/__stack_pointer - i32.const 4720 + i32.const 4912 i32.store offset=68 local.get $1 - i32.const 4720 + i32.const 4912 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -23506,10 +23560,10 @@ local.get $1 i32.store offset=48 global.get $~lib/memory/__stack_pointer - i32.const 4720 + i32.const 4912 i32.store offset=52 local.get $1 - i32.const 4720 + i32.const 4912 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -23531,10 +23585,10 @@ local.get $1 i32.store offset=32 global.get $~lib/memory/__stack_pointer - i32.const 4720 + i32.const 4912 i32.store offset=36 local.get $1 - i32.const 4720 + i32.const 4912 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -23556,10 +23610,10 @@ local.get $1 i32.store offset=16 global.get $~lib/memory/__stack_pointer - i32.const 4720 + i32.const 4912 i32.store offset=20 local.get $1 - i32.const 4720 + i32.const 4912 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -23581,10 +23635,10 @@ local.get $0 i32.store global.get $~lib/memory/__stack_pointer - i32.const 4752 + i32.const 4944 i32.store offset=4 local.get $0 - i32.const 4752 + i32.const 4944 call $~lib/string/String.__concat global.get $~lib/memory/__stack_pointer i32.const 144 @@ -23696,7 +23750,7 @@ i64.const 0 i64.store offset=248 global.get $~lib/memory/__stack_pointer - i32.const 4848 + i32.const 5040 i32.store offset=248 local.get $0 i32.const 0 @@ -23706,7 +23760,7 @@ global.get $~lib/memory/__stack_pointer local.get $1 i32.store offset=252 - i32.const 4848 + i32.const 5040 local.get $1 call $~lib/string/String.__concat local.set $1 @@ -23714,10 +23768,10 @@ local.get $1 i32.store offset=240 global.get $~lib/memory/__stack_pointer - i32.const 4720 + i32.const 4912 i32.store offset=244 local.get $1 - i32.const 4720 + i32.const 4912 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -23739,10 +23793,10 @@ local.get $1 i32.store offset=224 global.get $~lib/memory/__stack_pointer - i32.const 4720 + i32.const 4912 i32.store offset=228 local.get $1 - i32.const 4720 + i32.const 4912 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -23764,10 +23818,10 @@ local.get $1 i32.store offset=208 global.get $~lib/memory/__stack_pointer - i32.const 4720 + i32.const 4912 i32.store offset=212 local.get $1 - i32.const 4720 + i32.const 4912 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -23789,10 +23843,10 @@ local.get $1 i32.store offset=192 global.get $~lib/memory/__stack_pointer - i32.const 4720 + i32.const 4912 i32.store offset=196 local.get $1 - i32.const 4720 + i32.const 4912 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -23814,10 +23868,10 @@ local.get $1 i32.store offset=176 global.get $~lib/memory/__stack_pointer - i32.const 4720 + i32.const 4912 i32.store offset=180 local.get $1 - i32.const 4720 + i32.const 4912 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -23839,10 +23893,10 @@ local.get $1 i32.store offset=160 global.get $~lib/memory/__stack_pointer - i32.const 4720 + i32.const 4912 i32.store offset=164 local.get $1 - i32.const 4720 + i32.const 4912 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -23864,10 +23918,10 @@ local.get $1 i32.store offset=144 global.get $~lib/memory/__stack_pointer - i32.const 4720 + i32.const 4912 i32.store offset=148 local.get $1 - i32.const 4720 + i32.const 4912 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -23889,10 +23943,10 @@ local.get $1 i32.store offset=128 global.get $~lib/memory/__stack_pointer - i32.const 4720 + i32.const 4912 i32.store offset=132 local.get $1 - i32.const 4720 + i32.const 4912 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -23914,10 +23968,10 @@ local.get $1 i32.store offset=112 global.get $~lib/memory/__stack_pointer - i32.const 4720 + i32.const 4912 i32.store offset=116 local.get $1 - i32.const 4720 + i32.const 4912 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -23939,10 +23993,10 @@ local.get $1 i32.store offset=96 global.get $~lib/memory/__stack_pointer - i32.const 4720 + i32.const 4912 i32.store offset=100 local.get $1 - i32.const 4720 + i32.const 4912 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -23964,10 +24018,10 @@ local.get $1 i32.store offset=80 global.get $~lib/memory/__stack_pointer - i32.const 4720 + i32.const 4912 i32.store offset=84 local.get $1 - i32.const 4720 + i32.const 4912 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -23989,10 +24043,10 @@ local.get $1 i32.store offset=64 global.get $~lib/memory/__stack_pointer - i32.const 4720 + i32.const 4912 i32.store offset=68 local.get $1 - i32.const 4720 + i32.const 4912 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -24014,10 +24068,10 @@ local.get $1 i32.store offset=48 global.get $~lib/memory/__stack_pointer - i32.const 4720 + i32.const 4912 i32.store offset=52 local.get $1 - i32.const 4720 + i32.const 4912 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -24039,10 +24093,10 @@ local.get $1 i32.store offset=32 global.get $~lib/memory/__stack_pointer - i32.const 4720 + i32.const 4912 i32.store offset=36 local.get $1 - i32.const 4720 + i32.const 4912 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -24064,10 +24118,10 @@ local.get $1 i32.store offset=16 global.get $~lib/memory/__stack_pointer - i32.const 4720 + i32.const 4912 i32.store offset=20 local.get $1 - i32.const 4720 + i32.const 4912 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -24089,10 +24143,10 @@ local.get $0 i32.store global.get $~lib/memory/__stack_pointer - i32.const 4752 + i32.const 4944 i32.store offset=4 local.get $0 - i32.const 4752 + i32.const 4944 call $~lib/string/String.__concat global.get $~lib/memory/__stack_pointer i32.const 256 @@ -24141,7 +24195,7 @@ call $~lib/math/NativeMath.cos local.set $6 local.get $4 - i32.const 4880 + i32.const 5072 i32.eq if local.get $0 @@ -24198,7 +24252,7 @@ call $~lib/typedarray/Float64Array#__set else local.get $4 - i32.const 4912 + i32.const 5104 i32.eq if local.get $0 @@ -24255,7 +24309,7 @@ call $~lib/typedarray/Float64Array#__set else local.get $4 - i32.const 4944 + i32.const 5136 i32.eq if local.get $0 @@ -24312,7 +24366,7 @@ call $~lib/typedarray/Float64Array#__set else local.get $4 - i32.const 4976 + i32.const 5168 i32.eq if local.get $0 @@ -24369,7 +24423,7 @@ call $~lib/typedarray/Float64Array#__set else local.get $4 - i32.const 5008 + i32.const 5200 i32.eq if local.get $0 @@ -24483,12 +24537,12 @@ call $~lib/typedarray/Float64Array#__set else global.get $~lib/memory/__stack_pointer - i32.const 5040 + i32.const 5232 i32.store - i32.const 5040 + i32.const 5232 local.get $4 call $~lib/string/String.__concat - i32.const 5104 + i32.const 5296 i32.const 512 i32.const 10 call $~lib/builtins/abort @@ -24538,7 +24592,7 @@ i64.const 0 i64.store offset=56 global.get $~lib/memory/__stack_pointer - i32.const 5168 + i32.const 5360 i32.store offset=56 local.get $0 i32.const 0 @@ -24548,7 +24602,7 @@ global.get $~lib/memory/__stack_pointer local.get $1 i32.store offset=60 - i32.const 5168 + i32.const 5360 local.get $1 call $~lib/string/String.__concat local.set $1 @@ -24556,10 +24610,10 @@ local.get $1 i32.store offset=48 global.get $~lib/memory/__stack_pointer - i32.const 4720 + i32.const 4912 i32.store offset=52 local.get $1 - i32.const 4720 + i32.const 4912 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -24581,10 +24635,10 @@ local.get $1 i32.store offset=32 global.get $~lib/memory/__stack_pointer - i32.const 4720 + i32.const 4912 i32.store offset=36 local.get $1 - i32.const 4720 + i32.const 4912 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -24606,10 +24660,10 @@ local.get $1 i32.store offset=16 global.get $~lib/memory/__stack_pointer - i32.const 4720 + i32.const 4912 i32.store offset=20 local.get $1 - i32.const 4720 + i32.const 4912 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -24631,10 +24685,10 @@ local.get $0 i32.store global.get $~lib/memory/__stack_pointer - i32.const 4752 + i32.const 4944 i32.store offset=4 local.get $0 - i32.const 4752 + i32.const 4944 call $~lib/string/String.__concat global.get $~lib/memory/__stack_pointer i32.const -64 @@ -24698,7 +24752,7 @@ i64.const 0 i64.store offset=120 global.get $~lib/memory/__stack_pointer - i32.const 5200 + i32.const 5392 i32.store offset=120 local.get $0 i32.const 0 @@ -24708,7 +24762,7 @@ global.get $~lib/memory/__stack_pointer local.get $1 i32.store offset=124 - i32.const 5200 + i32.const 5392 local.get $1 call $~lib/string/String.__concat local.set $1 @@ -24716,10 +24770,10 @@ local.get $1 i32.store offset=112 global.get $~lib/memory/__stack_pointer - i32.const 4720 + i32.const 4912 i32.store offset=116 local.get $1 - i32.const 4720 + i32.const 4912 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -24741,10 +24795,10 @@ local.get $1 i32.store offset=96 global.get $~lib/memory/__stack_pointer - i32.const 4720 + i32.const 4912 i32.store offset=100 local.get $1 - i32.const 4720 + i32.const 4912 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -24766,10 +24820,10 @@ local.get $1 i32.store offset=80 global.get $~lib/memory/__stack_pointer - i32.const 4720 + i32.const 4912 i32.store offset=84 local.get $1 - i32.const 4720 + i32.const 4912 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -24791,10 +24845,10 @@ local.get $1 i32.store offset=64 global.get $~lib/memory/__stack_pointer - i32.const 4720 + i32.const 4912 i32.store offset=68 local.get $1 - i32.const 4720 + i32.const 4912 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -24816,10 +24870,10 @@ local.get $1 i32.store offset=48 global.get $~lib/memory/__stack_pointer - i32.const 4720 + i32.const 4912 i32.store offset=52 local.get $1 - i32.const 4720 + i32.const 4912 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -24841,10 +24895,10 @@ local.get $1 i32.store offset=32 global.get $~lib/memory/__stack_pointer - i32.const 4720 + i32.const 4912 i32.store offset=36 local.get $1 - i32.const 4720 + i32.const 4912 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -24866,10 +24920,10 @@ local.get $1 i32.store offset=16 global.get $~lib/memory/__stack_pointer - i32.const 4720 + i32.const 4912 i32.store offset=20 local.get $1 - i32.const 4720 + i32.const 4912 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -24891,10 +24945,10 @@ local.get $0 i32.store global.get $~lib/memory/__stack_pointer - i32.const 4752 + i32.const 4944 i32.store offset=4 local.get $0 - i32.const 4752 + i32.const 4944 call $~lib/string/String.__concat global.get $~lib/memory/__stack_pointer i32.const 128 @@ -24928,7 +24982,7 @@ i64.const 0 i64.store offset=40 global.get $~lib/memory/__stack_pointer - i32.const 5504 + i32.const 5696 i32.store offset=40 local.get $0 i32.const 0 @@ -24938,7 +24992,7 @@ global.get $~lib/memory/__stack_pointer local.get $1 i32.store offset=44 - i32.const 5504 + i32.const 5696 local.get $1 call $~lib/string/String.__concat local.set $1 @@ -24946,10 +25000,10 @@ local.get $1 i32.store offset=32 global.get $~lib/memory/__stack_pointer - i32.const 4720 + i32.const 4912 i32.store offset=36 local.get $1 - i32.const 4720 + i32.const 4912 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -24971,10 +25025,10 @@ local.get $1 i32.store offset=16 global.get $~lib/memory/__stack_pointer - i32.const 4720 + i32.const 4912 i32.store offset=20 local.get $1 - i32.const 4720 + i32.const 4912 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -24996,10 +25050,10 @@ local.get $0 i32.store global.get $~lib/memory/__stack_pointer - i32.const 4752 + i32.const 4944 i32.store offset=4 local.get $0 - i32.const 4752 + i32.const 4944 call $~lib/string/String.__concat global.get $~lib/memory/__stack_pointer i32.const 48 @@ -25039,7 +25093,7 @@ i64.const 0 i64.store offset=56 global.get $~lib/memory/__stack_pointer - i32.const 5536 + i32.const 5728 i32.store offset=56 local.get $0 i32.const 0 @@ -25049,7 +25103,7 @@ global.get $~lib/memory/__stack_pointer local.get $1 i32.store offset=60 - i32.const 5536 + i32.const 5728 local.get $1 call $~lib/string/String.__concat local.set $1 @@ -25057,10 +25111,10 @@ local.get $1 i32.store offset=48 global.get $~lib/memory/__stack_pointer - i32.const 4720 + i32.const 4912 i32.store offset=52 local.get $1 - i32.const 4720 + i32.const 4912 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -25082,10 +25136,10 @@ local.get $1 i32.store offset=32 global.get $~lib/memory/__stack_pointer - i32.const 4720 + i32.const 4912 i32.store offset=36 local.get $1 - i32.const 4720 + i32.const 4912 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -25107,10 +25161,10 @@ local.get $1 i32.store offset=16 global.get $~lib/memory/__stack_pointer - i32.const 4720 + i32.const 4912 i32.store offset=20 local.get $1 - i32.const 4720 + i32.const 4912 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -25132,10 +25186,10 @@ local.get $0 i32.store global.get $~lib/memory/__stack_pointer - i32.const 4752 + i32.const 4944 i32.store offset=4 local.get $0 - i32.const 4752 + i32.const 4944 call $~lib/string/String.__concat global.get $~lib/memory/__stack_pointer i32.const -64 @@ -26837,16 +26891,16 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.const 3 - i32.const 24 - i32.const 5264 + i32.const 28 + i32.const 5456 call $~lib/rt/__newArray local.tee $4 i32.store global.get $~lib/memory/__stack_pointer i32.const 0 i32.const 3 - i32.const 24 - i32.const 5296 + i32.const 28 + i32.const 5488 call $~lib/rt/__newArray local.tee $5 i32.store offset=4 @@ -26968,16 +27022,16 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.const 3 - i32.const 24 - i32.const 5376 + i32.const 28 + i32.const 5568 call $~lib/rt/__newArray local.tee $4 i32.store global.get $~lib/memory/__stack_pointer i32.const 0 i32.const 3 - i32.const 24 - i32.const 5408 + i32.const 28 + i32.const 5600 call $~lib/rt/__newArray local.tee $5 i32.store offset=4 @@ -27099,16 +27153,16 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.const 3 - i32.const 24 - i32.const 5440 + i32.const 28 + i32.const 5632 call $~lib/rt/__newArray local.tee $4 i32.store global.get $~lib/memory/__stack_pointer i32.const 0 i32.const 3 - i32.const 24 - i32.const 5472 + i32.const 28 + i32.const 5664 call $~lib/rt/__newArray local.tee $5 i32.store offset=4 @@ -27914,7 +27968,7 @@ global.get $~lib/memory/__stack_pointer i32.const 3 i32.const 2 - i32.const 21 + i32.const 25 i32.const 0 call $~lib/rt/__newArray local.tee $3 @@ -30672,7 +30726,7 @@ if global.get $~lib/memory/__stack_pointer i32.const 32 - i32.const 23 + i32.const 27 call $~lib/rt/itcms/__new local.tee $0 i32.store @@ -32275,7 +32329,7 @@ global.set $~argumentsLength local.get $0 local.get $1 - i32.const 2544 + i32.const 2608 i32.load call_indirect $0 (type $i32_i32_=>_f64) local.tee $2 @@ -32502,7 +32556,7 @@ local.get $0 local.get $0 local.get $2 - i32.const 2512 + i32.const 2576 i32.load call_indirect $0 (type $i32_i32_f64_=>_i32) drop @@ -33689,7 +33743,7 @@ i32.const 1 global.set $~argumentsLength local.get $1 - i32.const 2256 + i32.const 2288 i32.load call_indirect $0 (type $i32_=>_f64) local.set $2 @@ -35328,7 +35382,7 @@ i64.const 0 i64.store offset=24 global.get $~lib/memory/__stack_pointer - i32.const 5232 + i32.const 5424 i32.store offset=24 local.get $0 i32.const 0 @@ -35338,7 +35392,7 @@ global.get $~lib/memory/__stack_pointer local.get $1 i32.store offset=28 - i32.const 5232 + i32.const 5424 local.get $1 call $~lib/string/String.__concat local.set $1 @@ -35346,10 +35400,10 @@ local.get $1 i32.store offset=16 global.get $~lib/memory/__stack_pointer - i32.const 4720 + i32.const 4912 i32.store offset=20 local.get $1 - i32.const 4720 + i32.const 4912 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -35371,10 +35425,10 @@ local.get $0 i32.store global.get $~lib/memory/__stack_pointer - i32.const 4752 + i32.const 4944 i32.store offset=4 local.get $0 - i32.const 4752 + i32.const 4944 call $~lib/string/String.__concat global.get $~lib/memory/__stack_pointer i32.const 32 diff --git a/build/untouched.wat b/build/untouched.wat index ddaa33a4..1f80ce72 100644 --- a/build/untouched.wat +++ b/build/untouched.wat @@ -7,8 +7,8 @@ (type $i32_=>_f64 (func (param i32) (result f64))) (type $i32_i32_i32_f64_=>_i32 (func (param i32 i32 i32 f64) (result i32))) (type $i32_i32_=>_f64 (func (param i32 i32) (result f64))) - (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) (type $none_=>_i32 (func (result i32))) + (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) (type $none_=>_none (func)) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) @@ -79,88 +79,94 @@ (data (i32.const 844) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\00~\00l\00i\00b\00/\00r\00t\00.\00t\00s\00\00\00\00\00\00\00\00\00") (data (i32.const 896) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 924) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 988) "\1c\00\00\00\00\00\00\00\00\00\00\00\t\00\00\00\08\00\00\00\0b\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1020) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 988) "\1c\00\00\00\00\00\00\00\00\00\00\00\n\00\00\00\08\00\00\00\0b\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1020) "\1c\00\00\00\00\00\00\00\00\00\00\00\t\00\00\00\08\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 1052) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00\0d\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 1084) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1116) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\00\0f\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1116) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00\0f\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 1148) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1180) "\1c\00\00\00\00\00\00\00\00\00\00\00\07\00\00\00\08\00\00\00\11\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1180) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\00\11\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 1212) "\1c\00\00\00\00\00\00\00\00\00\00\00\07\00\00\00\08\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1244) "\1c\00\00\00\00\00\00\00\00\00\00\00\t\00\00\00\08\00\00\00\13\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1244) "\1c\00\00\00\00\00\00\00\00\00\00\00\07\00\00\00\08\00\00\00\13\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 1276) "\1c\00\00\00\00\00\00\00\00\00\00\00\n\00\00\00\08\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1308) "\1c\00\00\00\00\00\00\00\00\00\00\00\0b\00\00\00\08\00\00\00\15\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1340) "\1c\00\00\00\00\00\00\00\00\00\00\00\0c\00\00\00\08\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1372) "\1c\00\00\00\00\00\00\00\00\00\00\00\0d\00\00\00\08\00\00\00\17\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1404) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00\18\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1436) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00\19\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1468) "\1c\00\00\00\00\00\00\00\00\00\00\00\0e\00\00\00\08\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1500) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\00\1b\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1308) "\1c\00\00\00\00\00\00\00\00\00\00\00\t\00\00\00\08\00\00\00\15\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1340) "\1c\00\00\00\00\00\00\00\00\00\00\00\0b\00\00\00\08\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1372) "\1c\00\00\00\00\00\00\00\00\00\00\00\0c\00\00\00\08\00\00\00\17\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1404) "\1c\00\00\00\00\00\00\00\00\00\00\00\0d\00\00\00\08\00\00\00\18\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1436) "\1c\00\00\00\00\00\00\00\00\00\00\00\0e\00\00\00\08\00\00\00\19\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1468) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1500) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00\1b\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 1532) "\1c\00\00\00\00\00\00\00\00\00\00\00\0f\00\00\00\08\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1564) "\1c\00\00\00\00\00\00\00\00\00\00\00\0c\00\00\00\08\00\00\00\1d\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1564) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\00\1d\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 1596) "\1c\00\00\00\00\00\00\00\00\00\00\00\10\00\00\00\08\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1632) "n\83\f9\a2\00\00\00\00\d1W\'\fc)\15DN\99\95b\db\c0\dd4\f5\abcQ\feA\90C<:n$\b7a\c5\bb\de\ea.I\06\e0\d2MB\1c\eb\1d\fe\1c\92\d1\t\f55\82\e8>\a7)\b1&p\9c\e9\84D\bb.9\d6\919A~_\b4\8b_\84\9c\f49S\83\ff\97\f8\1f;(\f9\bd\8b\11/\ef\0f\98\05\de\cf~6m\1fm\nZf?FO\b7\t\cb\'\c7\ba\'u-\ea_\9e\f79\07={\f1\e5\eb\b1_\fbk\ea\92R\8aF0\03V\08]\8d\1f \bc\cf\f0\abk{\fca\91\e3\a9\1d6\f4\9a_\85\99e\08\1b\e6^\80\d8\ff\8d@h\a0\14W\15\06\061\'sM") - (data (i32.const 1836) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00\1f\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1868) "\1c\00\00\00\00\00\00\00\00\00\00\00\11\00\00\00\08\00\00\00 \00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1900) "\1c\00\00\00\00\00\00\00\00\00\00\00\12\00\00\00\08\00\00\00!\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1932) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1964) "\1c\00\00\00\00\00\00\00\00\00\00\00\13\00\00\00\08\00\00\00#\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1996) "\1c\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\08\00\00\00$\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2028) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00%\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2060) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00&\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1628) "\1c\00\00\00\00\00\00\00\00\00\00\00\0d\00\00\00\08\00\00\00\1f\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1660) "\1c\00\00\00\00\00\00\00\00\00\00\00\11\00\00\00\08\00\00\00 \00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1696) "n\83\f9\a2\00\00\00\00\d1W\'\fc)\15DN\99\95b\db\c0\dd4\f5\abcQ\feA\90C<:n$\b7a\c5\bb\de\ea.I\06\e0\d2MB\1c\eb\1d\fe\1c\92\d1\t\f55\82\e8>\a7)\b1&p\9c\e9\84D\bb.9\d6\919A~_\b4\8b_\84\9c\f49S\83\ff\97\f8\1f;(\f9\bd\8b\11/\ef\0f\98\05\de\cf~6m\1fm\nZf?FO\b7\t\cb\'\c7\ba\'u-\ea_\9e\f79\07={\f1\e5\eb\b1_\fbk\ea\92R\8aF0\03V\08]\8d\1f \bc\cf\f0\abk{\fca\91\e3\a9\1d6\f4\9a_\85\99e\08\1b\e6^\80\d8\ff\8d@h\a0\14W\15\06\061\'sM") + (data (i32.const 1900) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00!\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1932) "\1c\00\00\00\00\00\00\00\00\00\00\00\12\00\00\00\08\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1964) "\1c\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\08\00\00\00#\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1996) "\1c\00\00\00\00\00\00\00\00\00\00\00\13\00\00\00\08\00\00\00$\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2028) "\1c\00\00\00\00\00\00\00\00\00\00\00\16\00\00\00\08\00\00\00%\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2060) "\1c\00\00\00\00\00\00\00\00\00\00\00\15\00\00\00\08\00\00\00&\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 2092) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00\'\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2124) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00(\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2156) "\1c\00\00\00\00\00\00\00\00\00\00\00\07\00\00\00\08\00\00\00)\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2124) "\1c\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\08\00\00\00(\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2156) "\1c\00\00\00\00\00\00\00\00\00\00\00\18\00\00\00\08\00\00\00)\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 2188) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00*\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 2220) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00+\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 2252) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00,\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2284) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\00-\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2316) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\00.\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2348) "\1c\00\00\00\00\00\00\00\00\00\00\00\07\00\00\00\08\00\00\00/\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2380) "\1c\00\00\00\00\00\00\00\00\00\00\00\t\00\00\00\08\00\00\000\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2284) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00-\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2316) "\1c\00\00\00\00\00\00\00\00\00\00\00\07\00\00\00\08\00\00\00.\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2348) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00/\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2380) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\000\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 2412) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\001\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2444) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\002\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2476) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00m\00a\00t\002\00(\00\00\00") - (data (i32.const 2508) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\000\00.\000\00\00\00\00\00\00\00") - (data (i32.const 2540) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00N\00a\00N\00\00\00\00\00\00\00") - (data (i32.const 2572) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\12\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2620) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\00I\00n\00f\00i\00n\00i\00t\00y\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2672) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2728) "\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\9a\ec\ef?\d1f\87\10z^\90\bc\85\7fn\e8\15\e3\ef?\13\f6g5R\d2\8c\be\ef?m{\83]\a6\9a\97<\0f\89\f9lX\b5\ef?\fc\ef\fd\92\1a\b5\8e<\f7Gr+\92\ac\ef?\d1\9c/p=\be><\a2\d1\d32\ec\a3\ef?\0bn\90\894\03j\bc\1b\d3\fe\aff\9b\ef?\0e\bd/*RV\95\bcQ[\12\d0\01\93\ef?U\eaN\8c\ef\80P\bc\cc1l\c0\bd\8a\ef?\16\f4\d5\b9#\c9\91\bc\e0-\a9\ae\9a\82\ef?\afU\\\e9\e3\d3\80\f7\ec\9a<\aa\b9h1\87T\ef?\9d8\86\cb\82\e7\8f\bc\1d\d9\fc\"PM\ef?\8d\c3\a6DAo\8a<\d6\8cb\88;F\ef?}\04\e4\b0\05z\80<\96\dc}\91I?\ef?\94\a8\a8\e3\fd\8e\96<8bunz8\ef?}Ht\f2\18^\87\a9\af\0c\ef?\b6\ab\b0MuM\83<\15\b71\n\fe\06\ef?Lt\ac\e2\01B\86<1\d8L\fcp\01\ef?J\f8\d3]9\dd\8f<\ff\16d\b2\08\fc\ee?\04[\8e;\80\a3\86\bc\f1\9f\92_\c5\f6\ee?hPK\cc\edJ\92\bc\cb\a9:7\a7\f1\ee?\8e-Q\1b\f8\07\99\bcf\d8\05m\ae\ec\ee?\d26\94>\e8\d1q\bc\f7\9f\e54\db\e7\ee?\15\1b\ce\b3\19\19\99\bc\e5\a8\13\c3-\e3\ee?mL*\a7H\9f\85<\"4\12L\a6\de\ee?\8ai(z`\12\93\bc\1c\80\ac\04E\da\ee?[\89\17H\8f\a7X\bc*.\f7!\n\d6\ee?\1b\9aIg\9b,|\bc\97\a8P\d9\f5\d1\ee?\11\ac\c2`\edcC<-\89a`\08\ce\ee?\efd\06;\tf\96Z~d\1fx\bct_\ec\e8u\9f\ee?\b0}\8b\c0J\ee\86\bct\81\a5H\9a\9f\ee?\8a\e6U\1e2\19\86\bc\c9gBV\eb\9f\ee?\d3\d4\t^\cb\9c\90T\'\a4\ee?47;\f1\b6i\93\bc\13\ceL\99\89\a5\ee?\1e\ff\19:\84^\80\bc\ad\c7#F\1a\a7\ee?nWr\d8P\d4\94\bc\ed\92D\9b\d9\a8\ee?\00\8a\0e[g\ad\90<\99f\8a\d9\c7\aa\ee?\b4\ea\f0\c1/\b7\8d<\db\a0*B\e5\ac\ee?\ff\e7\c5\9c`\b6e\bc\8cD\b5\162\af\ee?D_\f3Y\83\f6{<6w\15\99\ae\b1\ee?\83=\1e\a7\1f\t\93\bc\c6\ff\91\0b[\b4\ee?)\1el\8b\b8\a9]\bc\e5\c5\cd\b07\b7\ee?Y\b9\90|\f9#l\bc\0fR\c8\cbD\ba\ee?\aa\f9\f4\"CC\92\bcPN\de\9f\82\bd\ee?K\8ef\d7l\ca\85\bc\ba\07\cap\f1\c0\ee?\'\ce\91+\fc\afq<\90\f0\a3\82\91\c4\ee?\bbs\n\e15\d2m<##\e3\19c\c8\ee?c\"b\"\04\c5\87\bce\e5]{f\cc\ee?\d51\e2\e3\86\1c\8b<3-J\ec\9b\d0\ee?\15\bb\bc\d3\d1\bb\91\bc]%>\b2\03\d5\ee?\d21\ee\9c1\cc\90\b4\07!\d5\82\bc_\9b{3\97|\ef?\c9\0dG;\b9*\89\bc)\a1\f5\14F\86\ef?\d3\88:`\04\b6t<\f6?\8b\e7.\90\ef?qr\9dQ\ec\c5\83<\83L\c7\fbQ\9a\ef?\f0\91\d3\8f\12\f7\8f\bc\da\90\a4\a2\af\a4\ef?}t#\e2\98\ae\8d\bc\f1g\8e-H\af\ef?\08 \aaA\bc\c3\8e<\'Za\ee\1b\ba\ef?2\eb\a9\c3\94+\84<\97\bak7+\c5\ef?\ee\85\d11\a9d\8a<@En[v\d0\ef?\ed\e3;\e4\ba7\8e\bc\14\be\9c\ad\fd\db\ef?\9d\cd\91M;\89w<\d8\90\9e\81\c1\e7\ef?\89\cc`A\c1\05S<\f1q\8f+\c2\f3\ef?") - (data (i32.const 6288) "\9f\de\e0\c3\f04\f7?\00\90\e6y\7f\cc\d7\bf\1f\e9,jx\13\f7?\00\00\0d\c2\eeo\d7\bf\a0\b5\fa\08`\f2\f6?\00\e0Q\13\e3\13\d7\bf}\8c\13\1f\a6\d1\f6?\00x(8[\b8\d6\bf\d1\b4\c5\0bI\b1\f6?\00x\80\90U]\d6\bf\ba\0c/3G\91\f6?\00\00\18v\d0\02\d6\bf#B\"\18\9fq\f6?\00\90\90\86\ca\a8\d5\bf\d9\1e\a5\99OR\f6?\00P\03VCO\d5\bf\c4$\8f\aaV3\f6?\00@k\c37\f6\d4\bf\14\dc\9dk\b3\14\f6?\00P\a8\fd\a7\9d\d4\bfL\\\c6Rd\f6\f5?\00\a8\899\92E\d4\bfO,\91\b5g\d8\f5?\00\b8\b09\f4\ed\d3\bf\de\90[\cb\bc\ba\f5?\00p\8fD\ce\96\d3\bfx\1a\d9\f2a\9d\f5?\00\a0\bd\17\1e@\d3\bf\87VF\12V\80\f5?\00\80F\ef\e2\e9\d2\bf\d3k\e7\ce\97c\f5?\00\e008\1b\94\d2\bf\93\7f\a7\e2%G\f5?\00\88\da\8c\c5>\d2\bf\83E\06B\ff*\f5?\00\90\')\e1\e9\d1\bf\df\bd\b2\db\"\0f\f5?\00\f8H+m\95\d1\bf\d7\de4G\8f\f3\f4?\00\f8\b9\9agA\d1\bf@(\de\cfC\d8\f4?\00\98\ef\94\d0\ed\d0\bf\c8\a3x\c0>\bd\f4?\00\10\db\18\a5\9a\d0\bf\8a%\e0\c3\7f\a2\f4?\00\b8cR\e6G\d0\bf4\84\d4$\05\88\f4?\00\f0\86E\"\eb\cf\bf\0b-\19\1b\cem\f4?\00\b0\17uJG\cf\bfT\189\d3\d9S\f4?\000\10=D\a4\ce\bfZ\84\b4D\':\f4?\00\b0\e9D\0d\02\ce\bf\fb\f8\15A\b5 \f4?\00\f0w)\a2`\cd\bf\b1\f4>\da\82\07\f4?\00\90\95\04\01\c0\cc\bf\8f\feW]\8f\ee\f3?\00\10\89V) \cc\bf\e9L\0b\a0\d9\d5\f3?\00\10\81\8d\17\81\cb\bf+\c1\10\c0`\bd\f3?\00\d0\d3\cc\c9\e2\ca\bf\b8\dau+$\a5\f3?\00\90\12.@E\ca\bf\02\d0\9f\cd\"\8d\f3?\00\f0\1dhw\a8\c9\bf\1cz\84\c5[u\f3?\000Him\0c\c9\bf\e26\adI\ce]\f3?\00\c0E\a6 q\c8\bf@\d4M\98yF\f3?\000\14\b4\8f\d6\c7\bf$\cb\ff\ce\\/\f3?\00pb<\b8<\c7\bfI\0d\a1uw\18\f3?\00`7\9b\9a\a3\c6\bf\909>7\c8\01\f3?\00\a0\b7T1\0b\c6\bfA\f8\95\bbN\eb\f2?\000$v}s\c5\bf\d1\a9\19\02\n\d5\f2?\000\c2\8f{\dc\c4\bf*\fd\b7\a8\f9\be\f2?\00\00\d2Q,F\c4\bf\ab\1b\0cz\1c\a9\f2?\00\00\83\bc\8a\b0\c3\bf0\b5\14`r\93\f2?\00\00Ik\99\1b\c3\bf\f5\a1WW\fa}\f2?\00@\a4\90T\87\c2\bf\bf;\1d\9b\b3h\f2?\00\a0y\f8\b9\f3\c1\bf\bd\f5\8f\83\9dS\f2?\00\a0,%\c8`\c1\bf;\08\c9\aa\b7>\f2?\00 \f7W\7f\ce\c0\bf\b6@\a9+\01*\f2?\00\a0\feI\dc<\c0\bf2A\cc\96y\15\f2?\00\80K\bc\bdW\bf\bf\9b\fc\d2\1d \01\f2?\00@@\96\087\be\bf\0bHMI\f4\ec\f1?\00@\f9>\98\17\bd\bfie\8fR\f5\d8\f1?\00\a0\d8Ng\f9\bb\bf|~W\11#\c5\f1?\00`/ y\dc\ba\bf\e9&\cbt|\b1\f1?\00\80(\e7\c3\c0\b9\bf\b6\1a,\0c\01\9e\f1?\00\c0r\b3F\a6\b8\bf\bdp\b6{\b0\8a\f1?\00\00\ac\b3\01\8d\b7\bf\b6\bc\ef%\8aw\f1?\00\008E\f1t\b6\bf\da1L5\8dd\f1?\00\80\87m\0e^\b5\bf\dd_\'\90\b9Q\f1?\00\e0\a1\de\\H\b4\bfL\d22\a4\0e?\f1?\00\a0jM\d93\b3\bf\da\f9\10r\8b,\f1?\00`\c5\f8y \b2\bf1\b5\ec(0\1a\f1?\00 b\98F\0e\b1\bf\af4\84\da\fb\07\f1?\00\00\d2jl\fa\af\bf\b3kN\0f\ee\f5\f0?\00@wJ\8d\da\ad\bf\ce\9f*]\06\e4\f0?\00\00\85\e4\ec\bc\ab\bf!\a5,cD\d2\f0?\00\c0\12@\89\a1\a9\bf\1a\98\e2|\a7\c0\f0?\00\c0\023X\88\a7\bf\d16\c6\83/\af\f0?\00\80\d6g^q\a5\bf9\13\a0\98\db\9d\f0?\00\80eI\8a\\\a3\bf\df\e7R\af\ab\8c\f0?\00@\15d\e3I\a1\bf\fb(N/\9f{\f0?\00\80\eb\82\c0r\9e\bf\19\8f5\8c\b5j\f0?\00\80RR\f1U\9a\bf,\f9\ec\a5\eeY\f0?\00\80\81\cfb=\96\bf\90,\d1\cdII\f0?\00\00\aa\8c\fb(\92\bf\a9\ad\f0\c6\c68\f0?\00\00\f9 {1\8c\bf\a92y\13e(\f0?\00\00\aa]5\19\84\bfHs\ea\'$\18\f0?\00\00\ec\c2\03\12x\bf\95\b1\14\06\04\08\f0?\00\00$y\t\04`\bf\1a\fa&\f7\1f\e0\ef?\00\00\90\84\f3\efo?t\eaa\c2\1c\a1\ef?\00\00=5A\dc\87?.\99\81\b0\10c\ef?\00\80\c2\c4\a3\ce\93?\cd\ad\ee<\f6%\ef?\00\00\89\14\c1\9f\9b?\e7\13\91\03\c8\e9\ee?\00\00\11\ce\d8\b0\a1?\ab\b1\cbx\80\ae\ee?\00\c0\01\d0[\8a\a5?\9b\0c\9d\a2\1at\ee?\00\80\d8@\83\\\a9?\b5\99\n\83\91:\ee?\00\80W\efj\'\ad?V\9a`\t\e0\01\ee?\00\c0\98\e5\98u\b0?\98\bbw\e5\01\ca\ed?\00 \0d\e3\f5S\b2?\03\91|\0b\f2\92\ed?\00\008\8b\dd.\b4?\ce\\\fbf\ac\\\ed?\00\c0W\87Y\06\b6?\9d\de^\aa,\'\ed?\00\00j5v\da\b7?\cd,k>n\f2\ec?\00`\1cNC\ab\b9?\02y\a7\a2m\be\ec?\00`\0d\bb\c7x\bb?m\087m&\8b\ec?\00 \e72\13C\bd?\04X]\bd\94X\ec?\00`\deq1\n\bf?\8c\9f\bb3\b5&\ec?\00@\91+\15g\c0??\e7\ec\ee\83\f5\eb?\00\b0\92\82\85G\c1?\c1\96\dbu\fd\c4\eb?\000\ca\cdn&\c2?(J\86\0c\1e\95\eb?\00P\c5\a6\d7\03\c3?,>\ef\c5\e2e\eb?\00\103<\c3\df\c3?\8b\88\c9gH7\eb?\00\80zk6\ba\c4?J0\1d!K\t\eb?\00\f0\d1(9\93\c5?~\ef\f2\85\e8\db\ea?\00\f0\18$\cdj\c6?\a2=`1\1d\af\ea?\00\90f\ec\f8@\c7?\a7X\d3?\e6\82\ea?\00\f0\1a\f5\c0\15\c8?\8bs\t\ef@W\ea?\00\80\f6T)\e9\c8?\'K\ab\90*,\ea?\00@\f8\026\bb\c9?\d1\f2\93\13\a0\01\ea?\00\00,\1c\ed\8b\ca?\1b<\db$\9f\d7\e9?\00\d0\01\\Q[\cb?\90\b1\c7\05%\ae\e9?\00\c0\bc\ccg)\cc?/\ce\97\f2.\85\e9?\00`H\d55\f6\cc?uK\a4\ee\ba\\\e9?\00\c0F4\bd\c1\cd?8H\e7\9d\c64\e9?\00\e0\cf\b8\01\8c\ce?\e6Rg/O\0d\e9?\00\90\17\c0\tU\cf?\9d\d7\ff\8eR\e6\e8?\00\b8\1f\12l\0e\d0?|\00\cc\9f\ce\bf\e8?\00\d0\93\0e\b8q\d0?\0e\c3\be\da\c0\99\e8?\00p\86\9ek\d4\d0?\fb\17#\aa\'t\e8?\00\d0K3\876\d1?\08\9a\b3\ac\00O\e8?\00H#g\0d\98\d1?U>e\e8I*\e8?\00\80\cc\e0\ff\f8\d1?`\02\f4\95\01\06\e8?\00hc\d7_Y\d2?)\a3\e0c%\e2\e7?\00\a8\14\t0\b9\d2?\ad\b5\dcw\b3\be\e7?\00`C\10r\18\d3?\c2%\97g\aa\9b\e7?\00\18\ecm&w\d3?W\06\17\f2\07y\e7?\000\af\fbO\d5\d3?\0c\13\d6\db\caV\e7?\00\e0/\e3\ee2\d4?") - (data (i32.const 8336) "k\b6O\01\00\10\e6?<[B\91l\02~<\95\b4M\03\000\e6?A]\00H\ea\bf\8d\f6\05\eb\ff\ef\e6?S-\e2\1a\04\80~\bc\80\97\86\0e\00\10\e7?Ry\tqf\ff{<\12\e9g\fc\ff/\e7?$\87\bd&\e2\00\8c\89<\b9{F\13\000\e9?v\02\98KN\80\7f.\98\dd\ff\af\e9?7\93Z\8a\e0@\87\bcf\fbI\ed\ff\cf\e9?\00\e0\9b\c1\08\ce?O*\00\b0\ea?_?\ff<\04\fdi\bc\d1\1e\ae\d7\ff\cf\ea?\b4p\90\12\e7>\82\bcx\04Q\ee\ff\ef\ea?\a3\de\0e\e0>\06j<[\0de\db\ff\0f\eb?\b9\n\1f8\c8\06ZO\86\d0E\ff\8a<@\16\87\f9\ff\8f\eb?\f9\c3\c2\96w\fe|\f0\0f\00\f0\f4?\1cS\85\0b\89\7f\97<\d1K\dc\12\00\10\f5?6\a4fqe\04`\c9\03\00\b0\f5?\c0\0c\bf\n\08A\9f\bc\bc\19I\1d\00\d0\f5?)G%\fb*\81\98\bc\89z\b8\e7\ff\ef\f5?\04i\ed\80\b7~\94\bc") - (data (i32.const 10396) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00x\00y\00z\00\00\00\00\00\00\00") - (data (i32.const 10428) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00x\00z\00y\00\00\00\00\00\00\00") - (data (i32.const 10460) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00y\00x\00z\00\00\00\00\00\00\00") - (data (i32.const 10492) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00y\00z\00x\00\00\00\00\00\00\00") - (data (i32.const 10524) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00z\00x\00y\00\00\00\00\00\00\00") - (data (i32.const 10556) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00(\00\00\00U\00n\00k\00n\00o\00w\00n\00 \00a\00n\00g\00l\00e\00 \00o\00r\00d\00e\00r\00 \00\00\00\00\00") - (data (i32.const 10620) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00 \00\00\00a\00s\00s\00e\00m\00b\00l\00y\00/\00q\00u\00a\00t\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 10684) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00q\00u\00a\00t\00(\00\00\00") - (data (i32.const 10716) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00q\00u\00a\00t\002\00(\00") - (data (i32.const 10748) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00v\00e\00c\002\00(\00\00\00") - (data (i32.const 10780) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 10812) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 10844) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00\00\00") - (data (i32.const 10892) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 10924) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 10956) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 10988) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 11020) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00v\00e\00c\003\00(\00\00\00") - (data (i32.const 11052) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00v\00e\00c\004\00(\00\00\00") - (data (i32.const 11088) "\19\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\1a\00\00\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\02A\00\00\00\00\00\00\02\t\00\00\00\00\00\00 \00\00\00\00\00\00\00\02\1a\00\00\00\00\00\00") - (table $0 51 funcref) - (elem (i32.const 1) $~lib/math/NativeMath.random $assembly/mat2d/multiply $assembly/mat2d/subtract $assembly/vec3/subtract $assembly/vec3/multiply $assembly/vec3/divide $assembly/vec3/distance $assembly/vec3/squaredDistance $assembly/vec3/length $assembly/vec3/squaredLength $assembly/vec3/forEach~anonymous|0 $assembly/vec4/subtract $assembly/vec4/multiply $assembly/vec4/divide $assembly/vec4/distance $assembly/vec4/squaredDistance $assembly/vec4/length $assembly/vec4/squaredLength $assembly/vec4/forEach~anonymous|0 $assembly/vec4/clone $assembly/vec4/fromValues $assembly/vec4/copy $assembly/vec4/set $assembly/vec4/add $assembly/quat/multiply $assembly/vec4/scale $assembly/vec4/dot $assembly/vec4/lerp $assembly/vec4/normalize $assembly/vec4/exactEquals $assembly/quat/rotationTo~anonymous|0 $assembly/quat/sqlerp~anonymous|0 $assembly/quat/setAxes~anonymous|0 $assembly/quat2/multiply $assembly/mat4/perspectiveNO $assembly/mat4/orthoNO $assembly/mat4/multiply $assembly/mat4/subtract $assembly/mat3/multiply $assembly/mat3/subtract $assembly/vec2/length $assembly/vec2/subtract $assembly/vec2/multiply $assembly/vec2/divide $assembly/vec2/distance $assembly/vec2/squaredDistance $assembly/vec2/squaredLength $assembly/vec2/forEach~anonymous|0 $assembly/mat2/multiply $assembly/mat2/subtract) + (data (i32.const 2444) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\002\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2476) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\003\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2508) "\1c\00\00\00\00\00\00\00\00\00\00\00\07\00\00\00\08\00\00\004\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2540) "\1c\00\00\00\00\00\00\00\00\00\00\00\n\00\00\00\08\00\00\005\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2572) "\1c\00\00\00\00\00\00\00\00\00\00\00\t\00\00\00\08\00\00\006\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2604) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\007\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2636) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\008\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2668) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00m\00a\00t\002\00(\00\00\00") + (data (i32.const 2700) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\000\00.\000\00\00\00\00\00\00\00") + (data (i32.const 2732) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00N\00a\00N\00\00\00\00\00\00\00") + (data (i32.const 2764) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\12\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2812) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\00I\00n\00f\00i\00n\00i\00t\00y\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2864) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2920) "\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\9a\ec\ef?\d1f\87\10z^\90\bc\85\7fn\e8\15\e3\ef?\13\f6g5R\d2\8c\be\ef?m{\83]\a6\9a\97<\0f\89\f9lX\b5\ef?\fc\ef\fd\92\1a\b5\8e<\f7Gr+\92\ac\ef?\d1\9c/p=\be><\a2\d1\d32\ec\a3\ef?\0bn\90\894\03j\bc\1b\d3\fe\aff\9b\ef?\0e\bd/*RV\95\bcQ[\12\d0\01\93\ef?U\eaN\8c\ef\80P\bc\cc1l\c0\bd\8a\ef?\16\f4\d5\b9#\c9\91\bc\e0-\a9\ae\9a\82\ef?\afU\\\e9\e3\d3\80\f7\ec\9a<\aa\b9h1\87T\ef?\9d8\86\cb\82\e7\8f\bc\1d\d9\fc\"PM\ef?\8d\c3\a6DAo\8a<\d6\8cb\88;F\ef?}\04\e4\b0\05z\80<\96\dc}\91I?\ef?\94\a8\a8\e3\fd\8e\96<8bunz8\ef?}Ht\f2\18^\87\a9\af\0c\ef?\b6\ab\b0MuM\83<\15\b71\n\fe\06\ef?Lt\ac\e2\01B\86<1\d8L\fcp\01\ef?J\f8\d3]9\dd\8f<\ff\16d\b2\08\fc\ee?\04[\8e;\80\a3\86\bc\f1\9f\92_\c5\f6\ee?hPK\cc\edJ\92\bc\cb\a9:7\a7\f1\ee?\8e-Q\1b\f8\07\99\bcf\d8\05m\ae\ec\ee?\d26\94>\e8\d1q\bc\f7\9f\e54\db\e7\ee?\15\1b\ce\b3\19\19\99\bc\e5\a8\13\c3-\e3\ee?mL*\a7H\9f\85<\"4\12L\a6\de\ee?\8ai(z`\12\93\bc\1c\80\ac\04E\da\ee?[\89\17H\8f\a7X\bc*.\f7!\n\d6\ee?\1b\9aIg\9b,|\bc\97\a8P\d9\f5\d1\ee?\11\ac\c2`\edcC<-\89a`\08\ce\ee?\efd\06;\tf\96Z~d\1fx\bct_\ec\e8u\9f\ee?\b0}\8b\c0J\ee\86\bct\81\a5H\9a\9f\ee?\8a\e6U\1e2\19\86\bc\c9gBV\eb\9f\ee?\d3\d4\t^\cb\9c\90T\'\a4\ee?47;\f1\b6i\93\bc\13\ceL\99\89\a5\ee?\1e\ff\19:\84^\80\bc\ad\c7#F\1a\a7\ee?nWr\d8P\d4\94\bc\ed\92D\9b\d9\a8\ee?\00\8a\0e[g\ad\90<\99f\8a\d9\c7\aa\ee?\b4\ea\f0\c1/\b7\8d<\db\a0*B\e5\ac\ee?\ff\e7\c5\9c`\b6e\bc\8cD\b5\162\af\ee?D_\f3Y\83\f6{<6w\15\99\ae\b1\ee?\83=\1e\a7\1f\t\93\bc\c6\ff\91\0b[\b4\ee?)\1el\8b\b8\a9]\bc\e5\c5\cd\b07\b7\ee?Y\b9\90|\f9#l\bc\0fR\c8\cbD\ba\ee?\aa\f9\f4\"CC\92\bcPN\de\9f\82\bd\ee?K\8ef\d7l\ca\85\bc\ba\07\cap\f1\c0\ee?\'\ce\91+\fc\afq<\90\f0\a3\82\91\c4\ee?\bbs\n\e15\d2m<##\e3\19c\c8\ee?c\"b\"\04\c5\87\bce\e5]{f\cc\ee?\d51\e2\e3\86\1c\8b<3-J\ec\9b\d0\ee?\15\bb\bc\d3\d1\bb\91\bc]%>\b2\03\d5\ee?\d21\ee\9c1\cc\90\b4\07!\d5\82\bc_\9b{3\97|\ef?\c9\0dG;\b9*\89\bc)\a1\f5\14F\86\ef?\d3\88:`\04\b6t<\f6?\8b\e7.\90\ef?qr\9dQ\ec\c5\83<\83L\c7\fbQ\9a\ef?\f0\91\d3\8f\12\f7\8f\bc\da\90\a4\a2\af\a4\ef?}t#\e2\98\ae\8d\bc\f1g\8e-H\af\ef?\08 \aaA\bc\c3\8e<\'Za\ee\1b\ba\ef?2\eb\a9\c3\94+\84<\97\bak7+\c5\ef?\ee\85\d11\a9d\8a<@En[v\d0\ef?\ed\e3;\e4\ba7\8e\bc\14\be\9c\ad\fd\db\ef?\9d\cd\91M;\89w<\d8\90\9e\81\c1\e7\ef?\89\cc`A\c1\05S<\f1q\8f+\c2\f3\ef?") + (data (i32.const 6480) "\9f\de\e0\c3\f04\f7?\00\90\e6y\7f\cc\d7\bf\1f\e9,jx\13\f7?\00\00\0d\c2\eeo\d7\bf\a0\b5\fa\08`\f2\f6?\00\e0Q\13\e3\13\d7\bf}\8c\13\1f\a6\d1\f6?\00x(8[\b8\d6\bf\d1\b4\c5\0bI\b1\f6?\00x\80\90U]\d6\bf\ba\0c/3G\91\f6?\00\00\18v\d0\02\d6\bf#B\"\18\9fq\f6?\00\90\90\86\ca\a8\d5\bf\d9\1e\a5\99OR\f6?\00P\03VCO\d5\bf\c4$\8f\aaV3\f6?\00@k\c37\f6\d4\bf\14\dc\9dk\b3\14\f6?\00P\a8\fd\a7\9d\d4\bfL\\\c6Rd\f6\f5?\00\a8\899\92E\d4\bfO,\91\b5g\d8\f5?\00\b8\b09\f4\ed\d3\bf\de\90[\cb\bc\ba\f5?\00p\8fD\ce\96\d3\bfx\1a\d9\f2a\9d\f5?\00\a0\bd\17\1e@\d3\bf\87VF\12V\80\f5?\00\80F\ef\e2\e9\d2\bf\d3k\e7\ce\97c\f5?\00\e008\1b\94\d2\bf\93\7f\a7\e2%G\f5?\00\88\da\8c\c5>\d2\bf\83E\06B\ff*\f5?\00\90\')\e1\e9\d1\bf\df\bd\b2\db\"\0f\f5?\00\f8H+m\95\d1\bf\d7\de4G\8f\f3\f4?\00\f8\b9\9agA\d1\bf@(\de\cfC\d8\f4?\00\98\ef\94\d0\ed\d0\bf\c8\a3x\c0>\bd\f4?\00\10\db\18\a5\9a\d0\bf\8a%\e0\c3\7f\a2\f4?\00\b8cR\e6G\d0\bf4\84\d4$\05\88\f4?\00\f0\86E\"\eb\cf\bf\0b-\19\1b\cem\f4?\00\b0\17uJG\cf\bfT\189\d3\d9S\f4?\000\10=D\a4\ce\bfZ\84\b4D\':\f4?\00\b0\e9D\0d\02\ce\bf\fb\f8\15A\b5 \f4?\00\f0w)\a2`\cd\bf\b1\f4>\da\82\07\f4?\00\90\95\04\01\c0\cc\bf\8f\feW]\8f\ee\f3?\00\10\89V) \cc\bf\e9L\0b\a0\d9\d5\f3?\00\10\81\8d\17\81\cb\bf+\c1\10\c0`\bd\f3?\00\d0\d3\cc\c9\e2\ca\bf\b8\dau+$\a5\f3?\00\90\12.@E\ca\bf\02\d0\9f\cd\"\8d\f3?\00\f0\1dhw\a8\c9\bf\1cz\84\c5[u\f3?\000Him\0c\c9\bf\e26\adI\ce]\f3?\00\c0E\a6 q\c8\bf@\d4M\98yF\f3?\000\14\b4\8f\d6\c7\bf$\cb\ff\ce\\/\f3?\00pb<\b8<\c7\bfI\0d\a1uw\18\f3?\00`7\9b\9a\a3\c6\bf\909>7\c8\01\f3?\00\a0\b7T1\0b\c6\bfA\f8\95\bbN\eb\f2?\000$v}s\c5\bf\d1\a9\19\02\n\d5\f2?\000\c2\8f{\dc\c4\bf*\fd\b7\a8\f9\be\f2?\00\00\d2Q,F\c4\bf\ab\1b\0cz\1c\a9\f2?\00\00\83\bc\8a\b0\c3\bf0\b5\14`r\93\f2?\00\00Ik\99\1b\c3\bf\f5\a1WW\fa}\f2?\00@\a4\90T\87\c2\bf\bf;\1d\9b\b3h\f2?\00\a0y\f8\b9\f3\c1\bf\bd\f5\8f\83\9dS\f2?\00\a0,%\c8`\c1\bf;\08\c9\aa\b7>\f2?\00 \f7W\7f\ce\c0\bf\b6@\a9+\01*\f2?\00\a0\feI\dc<\c0\bf2A\cc\96y\15\f2?\00\80K\bc\bdW\bf\bf\9b\fc\d2\1d \01\f2?\00@@\96\087\be\bf\0bHMI\f4\ec\f1?\00@\f9>\98\17\bd\bfie\8fR\f5\d8\f1?\00\a0\d8Ng\f9\bb\bf|~W\11#\c5\f1?\00`/ y\dc\ba\bf\e9&\cbt|\b1\f1?\00\80(\e7\c3\c0\b9\bf\b6\1a,\0c\01\9e\f1?\00\c0r\b3F\a6\b8\bf\bdp\b6{\b0\8a\f1?\00\00\ac\b3\01\8d\b7\bf\b6\bc\ef%\8aw\f1?\00\008E\f1t\b6\bf\da1L5\8dd\f1?\00\80\87m\0e^\b5\bf\dd_\'\90\b9Q\f1?\00\e0\a1\de\\H\b4\bfL\d22\a4\0e?\f1?\00\a0jM\d93\b3\bf\da\f9\10r\8b,\f1?\00`\c5\f8y \b2\bf1\b5\ec(0\1a\f1?\00 b\98F\0e\b1\bf\af4\84\da\fb\07\f1?\00\00\d2jl\fa\af\bf\b3kN\0f\ee\f5\f0?\00@wJ\8d\da\ad\bf\ce\9f*]\06\e4\f0?\00\00\85\e4\ec\bc\ab\bf!\a5,cD\d2\f0?\00\c0\12@\89\a1\a9\bf\1a\98\e2|\a7\c0\f0?\00\c0\023X\88\a7\bf\d16\c6\83/\af\f0?\00\80\d6g^q\a5\bf9\13\a0\98\db\9d\f0?\00\80eI\8a\\\a3\bf\df\e7R\af\ab\8c\f0?\00@\15d\e3I\a1\bf\fb(N/\9f{\f0?\00\80\eb\82\c0r\9e\bf\19\8f5\8c\b5j\f0?\00\80RR\f1U\9a\bf,\f9\ec\a5\eeY\f0?\00\80\81\cfb=\96\bf\90,\d1\cdII\f0?\00\00\aa\8c\fb(\92\bf\a9\ad\f0\c6\c68\f0?\00\00\f9 {1\8c\bf\a92y\13e(\f0?\00\00\aa]5\19\84\bfHs\ea\'$\18\f0?\00\00\ec\c2\03\12x\bf\95\b1\14\06\04\08\f0?\00\00$y\t\04`\bf\1a\fa&\f7\1f\e0\ef?\00\00\90\84\f3\efo?t\eaa\c2\1c\a1\ef?\00\00=5A\dc\87?.\99\81\b0\10c\ef?\00\80\c2\c4\a3\ce\93?\cd\ad\ee<\f6%\ef?\00\00\89\14\c1\9f\9b?\e7\13\91\03\c8\e9\ee?\00\00\11\ce\d8\b0\a1?\ab\b1\cbx\80\ae\ee?\00\c0\01\d0[\8a\a5?\9b\0c\9d\a2\1at\ee?\00\80\d8@\83\\\a9?\b5\99\n\83\91:\ee?\00\80W\efj\'\ad?V\9a`\t\e0\01\ee?\00\c0\98\e5\98u\b0?\98\bbw\e5\01\ca\ed?\00 \0d\e3\f5S\b2?\03\91|\0b\f2\92\ed?\00\008\8b\dd.\b4?\ce\\\fbf\ac\\\ed?\00\c0W\87Y\06\b6?\9d\de^\aa,\'\ed?\00\00j5v\da\b7?\cd,k>n\f2\ec?\00`\1cNC\ab\b9?\02y\a7\a2m\be\ec?\00`\0d\bb\c7x\bb?m\087m&\8b\ec?\00 \e72\13C\bd?\04X]\bd\94X\ec?\00`\deq1\n\bf?\8c\9f\bb3\b5&\ec?\00@\91+\15g\c0??\e7\ec\ee\83\f5\eb?\00\b0\92\82\85G\c1?\c1\96\dbu\fd\c4\eb?\000\ca\cdn&\c2?(J\86\0c\1e\95\eb?\00P\c5\a6\d7\03\c3?,>\ef\c5\e2e\eb?\00\103<\c3\df\c3?\8b\88\c9gH7\eb?\00\80zk6\ba\c4?J0\1d!K\t\eb?\00\f0\d1(9\93\c5?~\ef\f2\85\e8\db\ea?\00\f0\18$\cdj\c6?\a2=`1\1d\af\ea?\00\90f\ec\f8@\c7?\a7X\d3?\e6\82\ea?\00\f0\1a\f5\c0\15\c8?\8bs\t\ef@W\ea?\00\80\f6T)\e9\c8?\'K\ab\90*,\ea?\00@\f8\026\bb\c9?\d1\f2\93\13\a0\01\ea?\00\00,\1c\ed\8b\ca?\1b<\db$\9f\d7\e9?\00\d0\01\\Q[\cb?\90\b1\c7\05%\ae\e9?\00\c0\bc\ccg)\cc?/\ce\97\f2.\85\e9?\00`H\d55\f6\cc?uK\a4\ee\ba\\\e9?\00\c0F4\bd\c1\cd?8H\e7\9d\c64\e9?\00\e0\cf\b8\01\8c\ce?\e6Rg/O\0d\e9?\00\90\17\c0\tU\cf?\9d\d7\ff\8eR\e6\e8?\00\b8\1f\12l\0e\d0?|\00\cc\9f\ce\bf\e8?\00\d0\93\0e\b8q\d0?\0e\c3\be\da\c0\99\e8?\00p\86\9ek\d4\d0?\fb\17#\aa\'t\e8?\00\d0K3\876\d1?\08\9a\b3\ac\00O\e8?\00H#g\0d\98\d1?U>e\e8I*\e8?\00\80\cc\e0\ff\f8\d1?`\02\f4\95\01\06\e8?\00hc\d7_Y\d2?)\a3\e0c%\e2\e7?\00\a8\14\t0\b9\d2?\ad\b5\dcw\b3\be\e7?\00`C\10r\18\d3?\c2%\97g\aa\9b\e7?\00\18\ecm&w\d3?W\06\17\f2\07y\e7?\000\af\fbO\d5\d3?\0c\13\d6\db\caV\e7?\00\e0/\e3\ee2\d4?") + (data (i32.const 8528) "k\b6O\01\00\10\e6?<[B\91l\02~<\95\b4M\03\000\e6?A]\00H\ea\bf\8d\f6\05\eb\ff\ef\e6?S-\e2\1a\04\80~\bc\80\97\86\0e\00\10\e7?Ry\tqf\ff{<\12\e9g\fc\ff/\e7?$\87\bd&\e2\00\8c\89<\b9{F\13\000\e9?v\02\98KN\80\7f.\98\dd\ff\af\e9?7\93Z\8a\e0@\87\bcf\fbI\ed\ff\cf\e9?\00\e0\9b\c1\08\ce?O*\00\b0\ea?_?\ff<\04\fdi\bc\d1\1e\ae\d7\ff\cf\ea?\b4p\90\12\e7>\82\bcx\04Q\ee\ff\ef\ea?\a3\de\0e\e0>\06j<[\0de\db\ff\0f\eb?\b9\n\1f8\c8\06ZO\86\d0E\ff\8a<@\16\87\f9\ff\8f\eb?\f9\c3\c2\96w\fe|\f0\0f\00\f0\f4?\1cS\85\0b\89\7f\97<\d1K\dc\12\00\10\f5?6\a4fqe\04`\c9\03\00\b0\f5?\c0\0c\bf\n\08A\9f\bc\bc\19I\1d\00\d0\f5?)G%\fb*\81\98\bc\89z\b8\e7\ff\ef\f5?\04i\ed\80\b7~\94\bc") + (data (i32.const 10588) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00x\00y\00z\00\00\00\00\00\00\00") + (data (i32.const 10620) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00x\00z\00y\00\00\00\00\00\00\00") + (data (i32.const 10652) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00y\00x\00z\00\00\00\00\00\00\00") + (data (i32.const 10684) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00y\00z\00x\00\00\00\00\00\00\00") + (data (i32.const 10716) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00z\00x\00y\00\00\00\00\00\00\00") + (data (i32.const 10748) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00(\00\00\00U\00n\00k\00n\00o\00w\00n\00 \00a\00n\00g\00l\00e\00 \00o\00r\00d\00e\00r\00 \00\00\00\00\00") + (data (i32.const 10812) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00 \00\00\00a\00s\00s\00e\00m\00b\00l\00y\00/\00q\00u\00a\00t\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 10876) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00q\00u\00a\00t\00(\00\00\00") + (data (i32.const 10908) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00q\00u\00a\00t\002\00(\00") + (data (i32.const 10940) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00v\00e\00c\002\00(\00\00\00") + (data (i32.const 10972) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 11004) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 11036) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00\00\00") + (data (i32.const 11084) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 11116) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 11148) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 11180) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 11212) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00v\00e\00c\003\00(\00\00\00") + (data (i32.const 11244) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00v\00e\00c\004\00(\00\00\00") + (data (i32.const 11280) "\1d\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\1a\00\00\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\02A\00\00\00\00\00\00\02\t\00\00\00\00\00\00 \00\00\00\00\00\00\00\02\1a\00\00\00\00\00\00") + (table $0 57 funcref) + (elem (i32.const 1) $~lib/math/NativeMath.random $assembly/mat2d/multiply $assembly/mat2d/subtract $assembly/vec3/subtract $assembly/vec3/multiply $assembly/vec3/divide $assembly/vec3/distance $assembly/vec3/squaredDistance $assembly/vec3/length $assembly/vec3/squaredLength $start:assembly/vec3~anonymous|0~anonymous|0 $start:assembly/vec3~anonymous|0 $assembly/vec4/subtract $assembly/vec4/multiply $assembly/vec4/divide $assembly/vec4/distance $assembly/vec4/squaredDistance $assembly/vec4/length $assembly/vec4/squaredLength $start:assembly/vec4~anonymous|0~anonymous|0 $start:assembly/vec4~anonymous|0 $assembly/vec4/clone $assembly/vec4/fromValues $assembly/vec4/copy $assembly/vec4/set $assembly/vec4/add $assembly/quat/multiply $assembly/vec4/scale $assembly/vec4/dot $assembly/vec4/lerp $assembly/vec4/normalize $assembly/vec4/exactEquals $start:assembly/quat~anonymous|0~anonymous|0 $start:assembly/quat~anonymous|0 $start:assembly/quat~anonymous|1~anonymous|0 $start:assembly/quat~anonymous|1 $start:assembly/quat~anonymous|2~anonymous|0 $start:assembly/quat~anonymous|2 $assembly/quat2/multiply $assembly/mat4/perspectiveNO $assembly/mat4/orthoNO $assembly/mat4/multiply $assembly/mat4/subtract $assembly/mat3/multiply $assembly/mat3/subtract $assembly/vec2/length $assembly/vec2/subtract $assembly/vec2/multiply $assembly/vec2/divide $assembly/vec2/distance $assembly/vec2/squaredDistance $assembly/vec2/squaredLength $start:assembly/vec2~anonymous|0~anonymous|0 $start:assembly/vec2~anonymous|0 $assembly/mat2/multiply $assembly/mat2/subtract) (global $assembly/common/EPSILON f64 (f64.const 1e-06)) (global $~lib/math/random_seeded (mut i32) (i32.const 0)) (global $~lib/math/random_state0_64 (mut i64) (i64.const 0)) @@ -194,73 +200,79 @@ (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $assembly/vec3/vec (mut i32) (i32.const 0)) (global $~argumentsLength (mut i32) (i32.const 0)) - (global $assembly/vec4/sub i32 (i32.const 1040)) - (global $assembly/vec4/mul i32 (i32.const 1072)) - (global $assembly/vec4/div i32 (i32.const 1104)) - (global $assembly/vec4/dist i32 (i32.const 1136)) - (global $assembly/vec4/sqrDist i32 (i32.const 1168)) - (global $assembly/vec4/len i32 (i32.const 1200)) - (global $assembly/vec4/sqrLen i32 (i32.const 1232)) + (global $assembly/vec3/forEach (mut i32) (i32.const 0)) + (global $assembly/vec4/sub i32 (i32.const 1072)) + (global $assembly/vec4/mul i32 (i32.const 1104)) + (global $assembly/vec4/div i32 (i32.const 1136)) + (global $assembly/vec4/dist i32 (i32.const 1168)) + (global $assembly/vec4/sqrDist i32 (i32.const 1200)) + (global $assembly/vec4/len i32 (i32.const 1232)) + (global $assembly/vec4/sqrLen i32 (i32.const 1264)) (global $assembly/vec4/vec (mut i32) (i32.const 0)) - (global $assembly/quat/clone i32 (i32.const 1296)) - (global $assembly/quat/fromValues i32 (i32.const 1328)) - (global $assembly/quat/copy i32 (i32.const 1360)) - (global $assembly/quat/set i32 (i32.const 1392)) - (global $assembly/quat/add i32 (i32.const 1424)) - (global $assembly/quat/mul i32 (i32.const 1456)) - (global $assembly/quat/scale i32 (i32.const 1488)) - (global $assembly/quat/dot i32 (i32.const 1520)) - (global $assembly/quat/lerp i32 (i32.const 1552)) - (global $assembly/quat/length i32 (i32.const 1200)) - (global $assembly/quat/len i32 (i32.const 1200)) - (global $assembly/quat/squaredLength i32 (i32.const 1232)) - (global $assembly/quat/sqrLen i32 (i32.const 1232)) - (global $assembly/quat/normalize i32 (i32.const 1584)) - (global $assembly/quat/exactEquals i32 (i32.const 1616)) + (global $assembly/vec4/forEach (mut i32) (i32.const 0)) + (global $assembly/quat/clone i32 (i32.const 1360)) + (global $assembly/quat/fromValues i32 (i32.const 1392)) + (global $assembly/quat/copy i32 (i32.const 1424)) + (global $assembly/quat/set i32 (i32.const 1456)) + (global $assembly/quat/add i32 (i32.const 1488)) + (global $assembly/quat/mul i32 (i32.const 1520)) + (global $assembly/quat/scale i32 (i32.const 1552)) + (global $assembly/quat/dot i32 (i32.const 1584)) + (global $assembly/quat/lerp i32 (i32.const 1616)) + (global $assembly/quat/length i32 (i32.const 1232)) + (global $assembly/quat/len i32 (i32.const 1232)) + (global $assembly/quat/squaredLength i32 (i32.const 1264)) + (global $assembly/quat/sqrLen i32 (i32.const 1264)) + (global $assembly/quat/normalize i32 (i32.const 1648)) + (global $assembly/quat/exactEquals i32 (i32.const 1680)) (global $assembly/quat/tmpvec3 (mut i32) (i32.const 0)) (global $assembly/quat/xUnitVec3 (mut i32) (i32.const 0)) (global $assembly/quat/yUnitVec3 (mut i32) (i32.const 0)) (global $~lib/math/rempio2_y0 (mut f64) (f64.const 0)) (global $~lib/math/rempio2_y1 (mut f64) (f64.const 0)) (global $~lib/math/res128_hi (mut i64) (i64.const 0)) + (global $assembly/quat/rotationTo (mut i32) (i32.const 0)) (global $assembly/quat/temp1 (mut i32) (i32.const 0)) (global $assembly/quat/temp2 (mut i32) (i32.const 0)) + (global $assembly/quat/sqlerp (mut i32) (i32.const 0)) (global $assembly/quat/matr (mut i32) (i32.const 0)) - (global $assembly/quat2/getReal i32 (i32.const 1360)) - (global $assembly/quat2/setReal i32 (i32.const 1360)) - (global $assembly/quat2/mul i32 (i32.const 1952)) - (global $assembly/quat2/dot i32 (i32.const 1520)) - (global $assembly/quat2/length i32 (i32.const 1200)) - (global $assembly/quat2/len i32 (i32.const 1200)) - (global $assembly/quat2/squaredLength i32 (i32.const 1232)) - (global $assembly/quat2/sqrLen i32 (i32.const 1232)) - (global $assembly/mat4/perspective i32 (i32.const 1984)) - (global $assembly/mat4/ortho i32 (i32.const 2016)) - (global $assembly/mat4/mul i32 (i32.const 2048)) - (global $assembly/mat4/sub i32 (i32.const 2080)) - (global $assembly/mat3/mul i32 (i32.const 2112)) - (global $assembly/mat3/sub i32 (i32.const 2144)) - (global $assembly/vec2/len i32 (i32.const 2176)) - (global $assembly/vec2/sub i32 (i32.const 2208)) - (global $assembly/vec2/mul i32 (i32.const 2240)) - (global $assembly/vec2/div i32 (i32.const 2272)) - (global $assembly/vec2/dist i32 (i32.const 2304)) - (global $assembly/vec2/sqrDist i32 (i32.const 2336)) - (global $assembly/vec2/sqrLen i32 (i32.const 2368)) + (global $assembly/quat/setAxes (mut i32) (i32.const 0)) + (global $assembly/quat2/getReal i32 (i32.const 1424)) + (global $assembly/quat2/setReal i32 (i32.const 1424)) + (global $assembly/quat2/mul i32 (i32.const 2112)) + (global $assembly/quat2/dot i32 (i32.const 1584)) + (global $assembly/quat2/length i32 (i32.const 1232)) + (global $assembly/quat2/len i32 (i32.const 1232)) + (global $assembly/quat2/squaredLength i32 (i32.const 1264)) + (global $assembly/quat2/sqrLen i32 (i32.const 1264)) + (global $assembly/mat4/perspective i32 (i32.const 2144)) + (global $assembly/mat4/ortho i32 (i32.const 2176)) + (global $assembly/mat4/mul i32 (i32.const 2208)) + (global $assembly/mat4/sub i32 (i32.const 2240)) + (global $assembly/mat3/mul i32 (i32.const 2272)) + (global $assembly/mat3/sub i32 (i32.const 2304)) + (global $assembly/vec2/len i32 (i32.const 2336)) + (global $assembly/vec2/sub i32 (i32.const 2368)) + (global $assembly/vec2/mul i32 (i32.const 2400)) + (global $assembly/vec2/div i32 (i32.const 2432)) + (global $assembly/vec2/dist i32 (i32.const 2464)) + (global $assembly/vec2/sqrDist i32 (i32.const 2496)) + (global $assembly/vec2/sqrLen i32 (i32.const 2528)) (global $assembly/vec2/vec (mut i32) (i32.const 0)) - (global $assembly/mat2/mul i32 (i32.const 2432)) - (global $assembly/mat2/sub i32 (i32.const 2464)) + (global $assembly/vec2/forEach (mut i32) (i32.const 0)) + (global $assembly/mat2/mul i32 (i32.const 2624)) + (global $assembly/mat2/sub i32 (i32.const 2656)) (global $~lib/util/number/_frc_plus (mut i64) (i64.const 0)) (global $~lib/util/number/_frc_minus (mut i64) (i64.const 0)) (global $~lib/util/number/_exp (mut i32) (i32.const 0)) (global $~lib/util/number/_K (mut i32) (i32.const 0)) (global $~lib/util/number/_frc_pow (mut i64) (i64.const 0)) (global $~lib/util/number/_exp_pow (mut i32) (i32.const 0)) - (global $assembly/mat4/Fov i32 (i32.const 23)) - (global $~lib/rt/__rtti_base i32 (i32.const 11088)) - (global $~lib/memory/__data_end i32 (i32.const 11292)) - (global $~lib/memory/__stack_pointer (mut i32) (i32.const 27676)) - (global $~lib/memory/__heap_base i32 (i32.const 27676)) + (global $assembly/mat4/Fov i32 (i32.const 27)) + (global $~lib/rt/__rtti_base i32 (i32.const 11280)) + (global $~lib/memory/__data_end i32 (i32.const 11516)) + (global $~lib/memory/__stack_pointer (mut i32) (i32.const 27900)) + (global $~lib/memory/__heap_base i32 (i32.const 27900)) (export "glMatrix.EPSILON" (global $assembly/common/EPSILON)) (export "glMatrix.RANDOM" (global $assembly/common/RANDOM)) (export "glMatrix.ANGLE_ORDER" (global $assembly/common/ANGLE_ORDER)) @@ -301,9 +313,9 @@ (export "quat.sqrLen" (global $assembly/quat/sqrLen)) (export "quat.normalize" (global $assembly/quat/normalize)) (export "quat.exactEquals" (global $assembly/quat/exactEquals)) - (export "quat.rotationTo" (func $assembly/quat/rotationTo)) - (export "quat.sqlerp" (func $assembly/quat/sqlerp)) - (export "quat.setAxes" (func $assembly/quat/setAxes)) + (export "quat.rotationTo" (global $assembly/quat/rotationTo)) + (export "quat.sqlerp" (global $assembly/quat/sqlerp)) + (export "quat.setAxes" (global $assembly/quat/setAxes)) (export "quat2.create" (func $assembly/quat2/create)) (export "quat2.fromValues" (func $assembly/quat2/fromValues)) (export "quat2.fromRotationTranslationValues" (func $assembly/quat2/fromRotationTranslationValues)) @@ -324,7 +336,7 @@ (export "vec2.dist" (global $assembly/vec2/dist)) (export "vec2.sqrDist" (global $assembly/vec2/sqrDist)) (export "vec2.sqrLen" (global $assembly/vec2/sqrLen)) - (export "vec2.forEach" (func $assembly/vec2/forEach)) + (export "vec2.forEach" (global $assembly/vec2/forEach)) (export "vec3.create" (func $assembly/vec3/create)) (export "vec3.fromValues" (func $assembly/vec3/fromValues)) (export "vec3.sub" (global $assembly/vec3/sub)) @@ -334,7 +346,7 @@ (export "vec3.sqrDist" (global $assembly/vec3/sqrDist)) (export "vec3.len" (global $assembly/vec3/len)) (export "vec3.sqrLen" (global $assembly/vec3/sqrLen)) - (export "vec3.forEach" (func $assembly/vec3/forEach)) + (export "vec3.forEach" (global $assembly/vec3/forEach)) (export "vec4.create" (func $assembly/vec4/create)) (export "vec4.fromValues" (func $assembly/vec4/fromValues)) (export "vec4.sub" (global $assembly/vec4/sub)) @@ -344,7 +356,7 @@ (export "vec4.sqrDist" (global $assembly/vec4/sqrDist)) (export "vec4.len" (global $assembly/vec4/len)) (export "vec4.sqrLen" (global $assembly/vec4/sqrLen)) - (export "vec4.forEach" (func $assembly/vec4/forEach)) + (export "vec4.forEach" (global $assembly/vec4/forEach)) (export "memory" (memory $0)) (export "__setArgumentsLength" (func $~setArgumentsLength)) (export "mat2.clone" (func $export:assembly/mat2/clone)) @@ -3685,7 +3697,7 @@ i32.const 3 i32.shr_u ) - (func $assembly/vec3/forEach (result i32) + (func $start:assembly/vec3~anonymous|0 (result i32) i32.const 1008 ) (func $start:assembly/vec3 @@ -3708,8 +3720,12 @@ global.set $~lib/rt/itcms/fromSpace call $assembly/vec3/create global.set $assembly/vec3/vec - call $assembly/vec3/forEach - drop + i32.const 0 + global.set $~argumentsLength + i32.const 1040 + i32.load + call_indirect $0 (type $none_=>_i32) + global.set $assembly/vec3/forEach ) (func $assembly/vec4/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 @@ -4024,14 +4040,18 @@ f64.mul f64.add ) - (func $assembly/vec4/forEach (result i32) - i32.const 1264 + (func $start:assembly/vec4~anonymous|0 (result i32) + i32.const 1296 ) (func $start:assembly/vec4 call $assembly/vec4/create global.set $assembly/vec4/vec - call $assembly/vec4/forEach - drop + i32.const 0 + global.set $~argumentsLength + i32.const 1328 + i32.load + call_indirect $0 (type $none_=>_i32) + global.set $assembly/vec4/forEach ) (func $assembly/vec4/copy (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -4701,7 +4721,7 @@ i64.const 63 i64.and local.set $4 - i32.const 1632 + i32.const 1696 local.get $3 i64.const 6 i64.shr_s @@ -6144,8 +6164,8 @@ call $~lib/typedarray/Float64Array#__set local.get $0 ) - (func $assembly/quat/rotationTo (result i32) - i32.const 1856 + (func $start:assembly/quat~anonymous|0 (result i32) + i32.const 1920 ) (func $~lib/math/R (param $0 f64) (result f64) (local $1 f64) @@ -6508,8 +6528,8 @@ call $~lib/typedarray/Float64Array#__set local.get $0 ) - (func $assembly/quat/sqlerp (result i32) - i32.const 1888 + (func $start:assembly/quat~anonymous|1 (result i32) + i32.const 1984 ) (func $assembly/quat/fromMat3 (param $0 i32) (param $1 i32) (result i32) (local $2 f64) @@ -6730,8 +6750,8 @@ end local.get $0 ) - (func $assembly/quat/setAxes (result i32) - i32.const 1920 + (func $start:assembly/quat~anonymous|2 (result i32) + i32.const 2048 ) (func $start:assembly/quat call $start:assembly/vec3 @@ -6748,18 +6768,30 @@ f64.const 0 call $assembly/vec3/fromValues global.set $assembly/quat/yUnitVec3 - call $assembly/quat/rotationTo - drop + i32.const 0 + global.set $~argumentsLength + i32.const 1952 + i32.load + call_indirect $0 (type $none_=>_i32) + global.set $assembly/quat/rotationTo call $assembly/quat/create global.set $assembly/quat/temp1 call $assembly/quat/create global.set $assembly/quat/temp2 - call $assembly/quat/sqlerp - drop + i32.const 0 + global.set $~argumentsLength + i32.const 2016 + i32.load + call_indirect $0 (type $none_=>_i32) + global.set $assembly/quat/sqlerp call $assembly/mat3/create global.set $assembly/quat/matr - call $assembly/quat/setAxes - drop + i32.const 0 + global.set $~argumentsLength + i32.const 2080 + i32.load + call_indirect $0 (type $none_=>_i32) + global.set $assembly/quat/setAxes ) (func $assembly/quat2/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 f64) @@ -9098,15 +9130,19 @@ f64.mul f64.add ) - (func $assembly/vec2/forEach (result i32) - i32.const 2400 + (func $start:assembly/vec2~anonymous|0 (result i32) + i32.const 2560 ) (func $start:assembly/vec2 call $start:assembly/mat3 call $assembly/vec2/create global.set $assembly/vec2/vec - call $assembly/vec2/forEach - drop + i32.const 0 + global.set $~argumentsLength + i32.const 2592 + i32.load + call_indirect $0 (type $none_=>_i32) + global.set $assembly/vec2/forEach ) (func $assembly/mat2/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 f64) @@ -10006,7 +10042,7 @@ local.set $22 local.get $18 local.set $21 - i32.const 3600 + i32.const 3792 local.get $13 i32.const 2 i32.shl @@ -10147,7 +10183,7 @@ i32.add global.set $~lib/util/number/_K local.get $10 - i32.const 3600 + i32.const 3792 i32.const 0 local.get $13 i32.sub @@ -11528,14 +11564,14 @@ i32.const 100 i32.rem_u local.set $7 - i32.const 3640 + i32.const 3832 local.get $6 i32.const 2 i32.shl i32.add i64.load32_u local.set $8 - i32.const 3640 + i32.const 3832 local.get $7 i32.const 2 i32.shl @@ -11578,7 +11614,7 @@ i32.const 2 i32.sub local.set $2 - i32.const 3640 + i32.const 3832 local.get $10 i32.const 2 i32.shl @@ -11601,7 +11637,7 @@ i32.const 2 i32.sub local.set $2 - i32.const 3640 + i32.const 3832 local.get $1 i32.const 2 i32.shl @@ -12121,14 +12157,14 @@ i32.shl i32.sub global.set $~lib/util/number/_K - i32.const 2728 + i32.const 2920 local.get $14 i32.const 3 i32.shl i32.add i64.load global.set $~lib/util/number/_frc_pow - i32.const 3424 + i32.const 3616 local.get $14 i32.const 1 i32.shl @@ -24094,7 +24130,7 @@ i64.sub i64.shl local.set $9 - i32.const 4240 + i32.const 4432 local.get $8 i32.const 3 i32.shl @@ -24102,7 +24138,7 @@ i64.load f64.reinterpret_i64 local.set $10 - i32.const 4240 + i32.const 4432 local.get $8 i32.const 3 i32.shl @@ -25125,7 +25161,7 @@ i64.and i64.sub local.set $16 - i32.const 6288 + i32.const 6480 local.get $14 i32.const 1 i32.const 3 @@ -25134,7 +25170,7 @@ i32.add f64.load local.set $11 - i32.const 6288 + i32.const 6480 local.get $14 i32.const 1 i32.const 3 @@ -25146,7 +25182,7 @@ local.get $16 f64.reinterpret_i64 local.set $9 - i32.const 8336 + i32.const 8528 local.get $14 i32.const 1 i32.const 3 @@ -25155,7 +25191,7 @@ i32.add f64.load local.set $8 - i32.const 8336 + i32.const 8528 local.get $14 i32.const 1 i32.const 3 @@ -30528,7 +30564,7 @@ i32.gt_u if i32.const 560 - i32.const 10864 + i32.const 11056 i32.const 14 i32.const 48 call $~lib/builtins/abort @@ -30601,7 +30637,7 @@ i32.lt_s if i32.const 144 - i32.const 10864 + i32.const 11056 i32.const 108 i32.const 22 call $~lib/builtins/abort @@ -30632,7 +30668,7 @@ i32.ge_u if i32.const 144 - i32.const 10864 + i32.const 11056 i32.const 92 i32.const 42 call $~lib/builtins/abort @@ -32170,6 +32206,17 @@ local.get $1 call $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>f64>#__visit ) + (func $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array>#__visit (param $0 i32) (param $1 i32) + local.get $0 + i32.load offset=4 + local.get $1 + call $~lib/rt/itcms/__visit + ) + (func $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array>~visit (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array>#__visit + ) (func $~lib/function/Function<%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array>#__visit (param $0 i32) (param $1 i32) local.get $0 i32.load offset=4 @@ -32258,6 +32305,28 @@ local.get $1 call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>bool>#__visit ) + (func $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>#__visit (param $0 i32) (param $1 i32) + local.get $0 + i32.load offset=4 + local.get $1 + call $~lib/rt/itcms/__visit + ) + (func $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>~visit (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>#__visit + ) + (func $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>#__visit (param $0 i32) (param $1 i32) + local.get $0 + i32.load offset=4 + local.get $1 + call $~lib/rt/itcms/__visit + ) + (func $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>~visit (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>#__visit + ) (func $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>#__visit (param $0 i32) (param $1 i32) local.get $0 i32.load offset=4 @@ -32269,6 +32338,17 @@ local.get $1 call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>#__visit ) + (func $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>#__visit (param $0 i32) (param $1 i32) + local.get $0 + i32.load offset=4 + local.get $1 + call $~lib/rt/itcms/__visit + ) + (func $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>~visit (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>#__visit + ) (func $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>#__visit (param $0 i32) (param $1 i32) local.get $0 i32.load offset=4 @@ -32387,109 +32467,133 @@ block $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array> block $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cusize%29=>~lib/typedarray/Float64Array> block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> - block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> - block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>bool> - block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> - block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> - block $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array> - block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> - block $~lib/function/Function<%28f64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array> - block $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> - block $~lib/function/Function<%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array> - block $assembly/imports/IArguments - block $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>f64> - block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>f64> - block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> - block $~lib/typedarray/Float64Array - block $~lib/function/Function<%28%29=>f64> - block $~lib/arraybuffer/ArrayBufferView - block $~lib/string/String - block $~lib/arraybuffer/ArrayBuffer + block $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> + block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> + block $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> + block $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> + block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>bool> + block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> + block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> + block $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array> + block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> + block $~lib/function/Function<%28f64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array> + block $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> + block $~lib/function/Function<%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array> + block $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array> + block $assembly/imports/IArguments + block $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>f64> + block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>f64> + block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> + block $~lib/typedarray/Float64Array + block $~lib/function/Function<%28%29=>f64> + block $~lib/arraybuffer/ArrayBufferView + block $~lib/string/String + block $~lib/arraybuffer/ArrayBuffer + local.get $0 + i32.const 8 + i32.sub + i32.load + br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/arraybuffer/ArrayBufferView $~lib/function/Function<%28%29=>f64> $~lib/typedarray/Float64Array $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>f64> $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>f64> $assembly/imports/IArguments $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28f64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>bool> $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cusize%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/array/Array<~lib/typedarray/Float64Array> $~lib/array/Array $assembly/mat4/Fov $~lib/array/Array $invalid + end + return + end + return + end + local.get $0 + local.get $1 + call $~lib/arraybuffer/ArrayBufferView~visit + return + end local.get $0 - i32.const 8 - i32.sub - i32.load - br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/arraybuffer/ArrayBufferView $~lib/function/Function<%28%29=>f64> $~lib/typedarray/Float64Array $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>f64> $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>f64> $assembly/imports/IArguments $~lib/function/Function<%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28f64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>bool> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cusize%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/array/Array<~lib/typedarray/Float64Array> $~lib/array/Array $assembly/mat4/Fov $~lib/array/Array $invalid + local.get $1 + call $~lib/function/Function<%28%29=>f64>~visit + return end + local.get $0 + local.get $1 + call $~lib/typedarray/Float64Array~visit return end + local.get $0 + local.get $1 + call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>~visit return end local.get $0 local.get $1 - call $~lib/arraybuffer/ArrayBufferView~visit + call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>f64>~visit return end local.get $0 local.get $1 - call $~lib/function/Function<%28%29=>f64>~visit + call $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>f64>~visit return end - local.get $0 - local.get $1 - call $~lib/typedarray/Float64Array~visit return end local.get $0 local.get $1 - call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>~visit + call $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array>~visit return end local.get $0 local.get $1 - call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>f64>~visit + call $~lib/function/Function<%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array>~visit return end local.get $0 local.get $1 - call $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>f64>~visit + call $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>~visit return end + local.get $0 + local.get $1 + call $~lib/function/Function<%28f64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array>~visit return end local.get $0 local.get $1 - call $~lib/function/Function<%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array>~visit + call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>~visit return end local.get $0 local.get $1 - call $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>~visit + call $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array>~visit return end local.get $0 local.get $1 - call $~lib/function/Function<%28f64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array>~visit + call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>~visit return end local.get $0 local.get $1 - call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>~visit + call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>~visit return end local.get $0 local.get $1 - call $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array>~visit + call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>bool>~visit return end local.get $0 local.get $1 - call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>~visit + call $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>~visit return end local.get $0 local.get $1 - call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>~visit + call $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>~visit return end local.get $0 local.get $1 - call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>bool>~visit + call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>~visit return end local.get $0 local.get $1 - call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>~visit + call $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>~visit return end local.get $0 @@ -32538,15 +32642,15 @@ global.get $~lib/memory/__data_end i32.lt_s if - i32.const 27696 - i32.const 27744 + i32.const 27920 + i32.const 27968 i32.const 1 i32.const 1 call $~lib/builtins/abort unreachable end ) - (func $assembly/vec3/forEach~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (result i32) + (func $start:assembly/vec3~anonymous|0~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (result i32) (local $6 i32) (local $7 i32) (local $8 i32) @@ -32704,7 +32808,7 @@ global.set $~lib/memory/__stack_pointer local.get $9 ) - (func $assembly/vec4/forEach~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (result i32) + (func $start:assembly/vec4~anonymous|0~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (result i32) (local $6 i32) (local $7 i32) (local $8 i32) @@ -32888,7 +32992,7 @@ global.set $~lib/memory/__stack_pointer local.get $9 ) - (func $assembly/quat/rotationTo~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:assembly/quat~anonymous|0~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 f64) (local $4 i32) global.get $~lib/memory/__stack_pointer @@ -33082,7 +33186,7 @@ end unreachable ) - (func $assembly/quat/sqlerp~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 f64) (result i32) + (func $start:assembly/quat~anonymous|1~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 f64) (result i32) (local $6 i32) global.get $~lib/memory/__stack_pointer i32.const 12 @@ -33147,7 +33251,7 @@ global.set $~lib/memory/__stack_pointer local.get $6 ) - (func $assembly/quat/setAxes~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:assembly/quat~anonymous|2~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) global.get $~lib/memory/__stack_pointer i32.const 12 @@ -33288,7 +33392,7 @@ global.set $~lib/memory/__stack_pointer local.get $4 ) - (func $assembly/vec2/forEach~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (result i32) + (func $start:assembly/vec2~anonymous|0~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (result i32) (local $6 i32) (local $7 i32) (local $8 i32) @@ -33451,7 +33555,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store offset=56 - i32.const 2496 + i32.const 2688 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -33473,7 +33577,7 @@ local.get $1 i32.store offset=48 local.get $1 - i32.const 4096 + i32.const 4288 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -33501,7 +33605,7 @@ local.get $1 i32.store offset=32 local.get $1 - i32.const 4096 + i32.const 4288 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -33529,7 +33633,7 @@ local.get $1 i32.store offset=16 local.get $1 - i32.const 4096 + i32.const 4288 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -33557,7 +33661,7 @@ local.get $1 i32.store local.get $1 - i32.const 4128 + i32.const 4320 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -33614,7 +33718,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store offset=88 - i32.const 4160 + i32.const 4352 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -33636,7 +33740,7 @@ local.get $1 i32.store offset=80 local.get $1 - i32.const 4096 + i32.const 4288 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -33664,7 +33768,7 @@ local.get $1 i32.store offset=64 local.get $1 - i32.const 4096 + i32.const 4288 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -33692,7 +33796,7 @@ local.get $1 i32.store offset=48 local.get $1 - i32.const 4096 + i32.const 4288 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -33720,7 +33824,7 @@ local.get $1 i32.store offset=32 local.get $1 - i32.const 4096 + i32.const 4288 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -33748,7 +33852,7 @@ local.get $1 i32.store offset=16 local.get $1 - i32.const 4096 + i32.const 4288 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -33776,7 +33880,7 @@ local.get $1 i32.store local.get $1 - i32.const 4128 + i32.const 4320 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -33851,7 +33955,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store offset=136 - i32.const 4192 + i32.const 4384 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -33873,7 +33977,7 @@ local.get $1 i32.store offset=128 local.get $1 - i32.const 4096 + i32.const 4288 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -33901,7 +34005,7 @@ local.get $1 i32.store offset=112 local.get $1 - i32.const 4096 + i32.const 4288 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -33929,7 +34033,7 @@ local.get $1 i32.store offset=96 local.get $1 - i32.const 4096 + i32.const 4288 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -33957,7 +34061,7 @@ local.get $1 i32.store offset=80 local.get $1 - i32.const 4096 + i32.const 4288 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -33985,7 +34089,7 @@ local.get $1 i32.store offset=64 local.get $1 - i32.const 4096 + i32.const 4288 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34013,7 +34117,7 @@ local.get $1 i32.store offset=48 local.get $1 - i32.const 4096 + i32.const 4288 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34041,7 +34145,7 @@ local.get $1 i32.store offset=32 local.get $1 - i32.const 4096 + i32.const 4288 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34069,7 +34173,7 @@ local.get $1 i32.store offset=16 local.get $1 - i32.const 4096 + i32.const 4288 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34097,7 +34201,7 @@ local.get $1 i32.store local.get $1 - i32.const 4128 + i32.const 4320 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34214,7 +34318,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store offset=248 - i32.const 4224 + i32.const 4416 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34236,7 +34340,7 @@ local.get $1 i32.store offset=240 local.get $1 - i32.const 4096 + i32.const 4288 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34264,7 +34368,7 @@ local.get $1 i32.store offset=224 local.get $1 - i32.const 4096 + i32.const 4288 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34292,7 +34396,7 @@ local.get $1 i32.store offset=208 local.get $1 - i32.const 4096 + i32.const 4288 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34320,7 +34424,7 @@ local.get $1 i32.store offset=192 local.get $1 - i32.const 4096 + i32.const 4288 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34348,7 +34452,7 @@ local.get $1 i32.store offset=176 local.get $1 - i32.const 4096 + i32.const 4288 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34376,7 +34480,7 @@ local.get $1 i32.store offset=160 local.get $1 - i32.const 4096 + i32.const 4288 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34404,7 +34508,7 @@ local.get $1 i32.store offset=144 local.get $1 - i32.const 4096 + i32.const 4288 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34432,7 +34536,7 @@ local.get $1 i32.store offset=128 local.get $1 - i32.const 4096 + i32.const 4288 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34460,7 +34564,7 @@ local.get $1 i32.store offset=112 local.get $1 - i32.const 4096 + i32.const 4288 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34488,7 +34592,7 @@ local.get $1 i32.store offset=96 local.get $1 - i32.const 4096 + i32.const 4288 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34516,7 +34620,7 @@ local.get $1 i32.store offset=80 local.get $1 - i32.const 4096 + i32.const 4288 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34544,7 +34648,7 @@ local.get $1 i32.store offset=64 local.get $1 - i32.const 4096 + i32.const 4288 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34572,7 +34676,7 @@ local.get $1 i32.store offset=48 local.get $1 - i32.const 4096 + i32.const 4288 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34600,7 +34704,7 @@ local.get $1 i32.store offset=32 local.get $1 - i32.const 4096 + i32.const 4288 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34628,7 +34732,7 @@ local.get $1 i32.store offset=16 local.get $1 - i32.const 4096 + i32.const 4288 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34656,7 +34760,7 @@ local.get $1 i32.store local.get $1 - i32.const 4128 + i32.const 4320 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34722,7 +34826,7 @@ call $~lib/math/NativeMath.cos local.set $11 local.get $4 - i32.const 10416 + i32.const 10608 i32.eq if local.get $0 @@ -34783,7 +34887,7 @@ call $~lib/typedarray/Float64Array#__set else local.get $4 - i32.const 10448 + i32.const 10640 i32.eq if local.get $0 @@ -34844,7 +34948,7 @@ call $~lib/typedarray/Float64Array#__set else local.get $4 - i32.const 10480 + i32.const 10672 i32.eq if local.get $0 @@ -34905,7 +35009,7 @@ call $~lib/typedarray/Float64Array#__set else local.get $4 - i32.const 10512 + i32.const 10704 i32.eq if local.get $0 @@ -34966,7 +35070,7 @@ call $~lib/typedarray/Float64Array#__set else local.get $4 - i32.const 10544 + i32.const 10736 i32.eq if local.get $0 @@ -35087,7 +35191,7 @@ f64.add call $~lib/typedarray/Float64Array#__set else - i32.const 10576 + i32.const 10768 local.set $12 global.get $~lib/memory/__stack_pointer local.get $12 @@ -35095,7 +35199,7 @@ local.get $12 local.get $4 call $~lib/string/String.__concat - i32.const 10640 + i32.const 10832 i32.const 512 i32.const 10 call $~lib/builtins/abort @@ -35145,7 +35249,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store offset=56 - i32.const 10704 + i32.const 10896 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35167,7 +35271,7 @@ local.get $1 i32.store offset=48 local.get $1 - i32.const 4096 + i32.const 4288 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35195,7 +35299,7 @@ local.get $1 i32.store offset=32 local.get $1 - i32.const 4096 + i32.const 4288 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35223,7 +35327,7 @@ local.get $1 i32.store offset=16 local.get $1 - i32.const 4096 + i32.const 4288 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35251,7 +35355,7 @@ local.get $1 i32.store local.get $1 - i32.const 4128 + i32.const 4320 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35320,7 +35424,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store offset=120 - i32.const 10736 + i32.const 10928 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35342,7 +35446,7 @@ local.get $1 i32.store offset=112 local.get $1 - i32.const 4096 + i32.const 4288 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35370,7 +35474,7 @@ local.get $1 i32.store offset=96 local.get $1 - i32.const 4096 + i32.const 4288 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35398,7 +35502,7 @@ local.get $1 i32.store offset=80 local.get $1 - i32.const 4096 + i32.const 4288 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35426,7 +35530,7 @@ local.get $1 i32.store offset=64 local.get $1 - i32.const 4096 + i32.const 4288 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35454,7 +35558,7 @@ local.get $1 i32.store offset=48 local.get $1 - i32.const 4096 + i32.const 4288 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35482,7 +35586,7 @@ local.get $1 i32.store offset=32 local.get $1 - i32.const 4096 + i32.const 4288 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35510,7 +35614,7 @@ local.get $1 i32.store offset=16 local.get $1 - i32.const 4096 + i32.const 4288 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35538,7 +35642,7 @@ local.get $1 i32.store local.get $1 - i32.const 4128 + i32.const 4320 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35571,7 +35675,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store offset=24 - i32.const 10768 + i32.const 10960 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35593,7 +35697,7 @@ local.get $1 i32.store offset=16 local.get $1 - i32.const 4096 + i32.const 4288 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35621,7 +35725,7 @@ local.get $1 i32.store local.get $1 - i32.const 4128 + i32.const 4320 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35660,7 +35764,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store offset=40 - i32.const 11040 + i32.const 11232 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35682,7 +35786,7 @@ local.get $1 i32.store offset=32 local.get $1 - i32.const 4096 + i32.const 4288 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35710,7 +35814,7 @@ local.get $1 i32.store offset=16 local.get $1 - i32.const 4096 + i32.const 4288 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35738,7 +35842,7 @@ local.get $1 i32.store local.get $1 - i32.const 4128 + i32.const 4320 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35783,7 +35887,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store offset=56 - i32.const 11072 + i32.const 11264 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35805,7 +35909,7 @@ local.get $1 i32.store offset=48 local.get $1 - i32.const 4096 + i32.const 4288 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35833,7 +35937,7 @@ local.get $1 i32.store offset=32 local.get $1 - i32.const 4096 + i32.const 4288 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35861,7 +35965,7 @@ local.get $1 i32.store offset=16 local.get $1 - i32.const 4096 + i32.const 4288 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35889,7 +35993,7 @@ local.get $1 i32.store local.get $1 - i32.const 4128 + i32.const 4320 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -36498,7 +36602,7 @@ f64.const 0 f64.eq if - i32.const 2528 + i32.const 2720 local.set $3 global.get $~lib/memory/__stack_pointer i32.const 4 @@ -36518,7 +36622,7 @@ local.get $0 f64.ne if - i32.const 2560 + i32.const 2752 local.set $3 global.get $~lib/memory/__stack_pointer i32.const 4 @@ -36527,8 +36631,8 @@ local.get $3 return end - i32.const 2592 - i32.const 2640 + i32.const 2784 + i32.const 2832 local.get $0 f64.const 0 f64.lt @@ -36541,7 +36645,7 @@ local.get $3 return end - i32.const 2672 + i32.const 2864 local.get $0 call $~lib/util/number/dtoa_core i32.const 1 @@ -36554,7 +36658,7 @@ local.tee $2 i32.store local.get $2 - i32.const 2672 + i32.const 2864 local.get $1 call $~lib/memory/memory.copy local.get $2 @@ -36597,7 +36701,7 @@ i32.const 0 i32.eq if - i32.const 4064 + i32.const 4256 local.set $6 global.get $~lib/memory/__stack_pointer i32.const 4 @@ -36733,7 +36837,7 @@ global.get $~lib/memory/__stack_pointer i32.const 3 i32.const 2 - i32.const 21 + i32.const 25 i32.const 0 call $~lib/rt/__newArray local.tee $4 @@ -37077,7 +37181,7 @@ if global.get $~lib/memory/__stack_pointer i32.const 32 - i32.const 23 + i32.const 27 call $~lib/rt/itcms/__new local.tee $0 i32.store @@ -38415,16 +38519,16 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.const 3 - i32.const 24 - i32.const 10800 + i32.const 28 + i32.const 10992 call $~lib/rt/__newArray local.tee $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 0 i32.const 3 - i32.const 24 - i32.const 10832 + i32.const 28 + i32.const 11024 call $~lib/rt/__newArray local.tee $6 i32.store offset=4 @@ -38550,16 +38654,16 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.const 3 - i32.const 24 - i32.const 10912 + i32.const 28 + i32.const 11104 call $~lib/rt/__newArray local.tee $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 0 i32.const 3 - i32.const 24 - i32.const 10944 + i32.const 28 + i32.const 11136 call $~lib/rt/__newArray local.tee $6 i32.store offset=4 @@ -38685,16 +38789,16 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.const 3 - i32.const 24 - i32.const 10976 + i32.const 28 + i32.const 11168 call $~lib/rt/__newArray local.tee $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 0 i32.const 3 - i32.const 24 - i32.const 11008 + i32.const 28 + i32.const 11200 call $~lib/rt/__newArray local.tee $6 i32.store offset=4 From 6ff09f60c7edfb629cfd7e115bee2057cf9db308 Mon Sep 17 00:00:00 2001 From: Huguenin-Elie Steve Date: Mon, 29 Mar 2021 19:18:17 +0200 Subject: [PATCH 14/32] fix AS warnings --- assembly/common.ts | 10 +- assembly/mat4.ts | 12 +- build/optimized.wat | 607 ++++++++++++++++++++++---------------------- build/untouched.wat | 446 ++++++++++++++++---------------- 4 files changed, 550 insertions(+), 525 deletions(-) diff --git a/assembly/common.ts b/assembly/common.ts index 0da08fa6..7e304cfe 100644 --- a/assembly/common.ts +++ b/assembly/common.ts @@ -1,10 +1,10 @@ +import { MathUtil } from "./imports" + /** * Common utilities * @module glMatrix */ -import { MathUtil } from "./imports" - // Configuration Constants export const EPSILON = 0.000001; export type ARRAY_TYPE = Float64Array; @@ -14,10 +14,10 @@ export let ANGLE_ORDER = "zyx"; /** * Sets the type of array used when creating new vectors and matrices * - * @param {Array} type Array type, such as Float32Array or Array + * @param {Object} type Array type, such as Float32Array or Array */ -export function setMatrixArrayType(v: Array): Array { - return changetype>(v); +export function setMatrixArrayType(type: Object): void { + throw new Error("Not implemented yet"); } const degree: f64 = Math.PI / 180; diff --git a/assembly/mat4.ts b/assembly/mat4.ts index 3dc18e44..5c81b60f 100644 --- a/assembly/mat4.ts +++ b/assembly/mat4.ts @@ -1549,6 +1549,8 @@ export function frustum(out: mat4, left: f64, right: f64, bottom: f64, top: f64, * The near/far clip planes correspond to a normalized device coordinate Z range of [-1, 1], * which matches WebGL/OpenGL's clip volume. * Passing null/undefined/no value for far will generate infinite projection matrix. + * + * Read https://www.assemblyscript.org/types.html#type-rules * * @param {mat4} out mat4 frustum matrix will be written into * @param {number} fovy Vertical field of view in radians @@ -1557,7 +1559,7 @@ export function frustum(out: mat4, left: f64, right: f64, bottom: f64, top: f64, * @param {number} far Far bound of the frustum, can be null or Infinity * @returns {mat4} out */ -export function perspectiveNO(out: mat4, fovy: f64, aspect: f64, near: f64, far: usize): mat4 { +export function perspectiveNO(out: mat4, fovy: f64, aspect: f64, near: f64, far: f64): mat4 { const f = 1.0 / Math.tan(fovy / 2); out[0] = f / aspect; out[1] = 0; @@ -1573,7 +1575,7 @@ export function perspectiveNO(out: mat4, fovy: f64, aspect: f64, near: f64, far: out[12] = 0; out[13] = 0; out[15] = 0; - if (far != null && far !== Infinity) { + if (typeof far === "number" && far !== Infinity) { const nf = 1 / (near - far); out[10] = (far + near) * nf; out[14] = 2 * far * near * nf; @@ -1595,6 +1597,8 @@ export const perspective = perspectiveNO; * The near/far clip planes correspond to a normalized device coordinate Z range of [0, 1], * which matches WebGPU/Vulkan/DirectX/Metal's clip volume. * Passing null/undefined/no value for far will generate infinite projection matrix. + * + * Read https://www.assemblyscript.org/types.html#type-rules * * @param {mat4} out mat4 frustum matrix will be written into * @param {number} fovy Vertical field of view in radians @@ -1603,7 +1607,7 @@ export const perspective = perspectiveNO; * @param {number} far Far bound of the frustum, can be null or Infinity * @returns {mat4} out */ -export function perspectiveZO(out: mat4, fovy: f64, aspect: f64, near: f64, far: usize): mat4 { +export function perspectiveZO(out: mat4, fovy: f64, aspect: f64, near: f64, far: f64): mat4 { const f = 1.0 / Math.tan(fovy / 2); out[0] = f / aspect; out[1] = 0; @@ -1619,7 +1623,7 @@ export function perspectiveZO(out: mat4, fovy: f64, aspect: f64, near: f64, far: out[12] = 0; out[13] = 0; out[15] = 0; - if (far != null && far !== Infinity) { + if (typeof far === "number" && far !== Infinity) { const nf = 1 / (near - far); out[10] = far * nf; out[14] = far * near * nf; diff --git a/build/optimized.wat b/build/optimized.wat index adab859b..c8d0552d 100644 --- a/build/optimized.wat +++ b/build/optimized.wat @@ -14,10 +14,10 @@ (type $f64_=>_f64 (func (param f64) (result f64))) (type $i32_f64_f64_f64_f64_f64_f64_=>_i32 (func (param i32 f64 f64 f64 f64 f64 f64) (result i32))) (type $i32_i32_=>_none (func (param i32 i32))) - (type $i32_f64_f64_f64_i32_=>_i32 (func (param i32 f64 f64 f64 i32) (result i32))) + (type $i32_f64_f64_f64_f64_=>_i32 (func (param i32 f64 f64 f64 f64) (result i32))) + (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_i32_i32_f64_=>_i32 (func (param i32 i32 i32 i32 i32 f64) (result i32))) (type $none_=>_none (func)) - (type $i32_=>_none (func (param i32))) (type $i32_f64_=>_none (func (param i32 f64))) (type $i32_i32_i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32 i32) (result i32))) (type $i32_i32_f64_=>_none (func (param i32 i32 f64))) @@ -27,7 +27,7 @@ (type $i32_i32_f64_f64_=>_i32 (func (param i32 i32 f64 f64) (result i32))) (type $i32_f64_i32_=>_i32 (func (param i32 f64 i32) (result i32))) (type $i32_f64_f64_=>_i32 (func (param i32 f64 f64) (result i32))) - (type $i32_f64_f64_f64_f64_=>_i32 (func (param i32 f64 f64 f64 f64) (result i32))) + (type $i32_f64_f64_f64_i32_=>_i32 (func (param i32 f64 f64 f64 i32) (result i32))) (type $f64_f64_=>_i32 (func (param f64 f64) (result i32))) (type $f64_f64_=>_f64 (func (param f64 f64) (result f64))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) @@ -154,100 +154,106 @@ (data (i32.const 3116) "\1c") (data (i32.const 3128) "\05\00\00\00\08\00\00\00\'") (data (i32.const 3148) "\1c") - (data (i32.const 3160) "\17\00\00\00\08\00\00\00(") + (data (i32.const 3160) "\01\00\00\00\0c\00\00\00n\00u\00m\00b\00e\00r") (data (i32.const 3180) "\1c") - (data (i32.const 3192) "\18\00\00\00\08\00\00\00)") + (data (i32.const 3192) "\0e\00\00\00\08\00\00\00(") (data (i32.const 3212) "\1c") - (data (i32.const 3224) "\05\00\00\00\08\00\00\00*") + (data (i32.const 3224) "\17\00\00\00\08\00\00\00)") (data (i32.const 3244) "\1c") - (data (i32.const 3256) "\05\00\00\00\08\00\00\00+") + (data (i32.const 3256) "\05\00\00\00\08\00\00\00*") (data (i32.const 3276) "\1c") - (data (i32.const 3288) "\05\00\00\00\08\00\00\00,") + (data (i32.const 3288) "\05\00\00\00\08\00\00\00+") (data (i32.const 3308) "\1c") - (data (i32.const 3320) "\05\00\00\00\08\00\00\00-") + (data (i32.const 3320) "\05\00\00\00\08\00\00\00,") (data (i32.const 3340) "\1c") - (data (i32.const 3352) "\07\00\00\00\08\00\00\00.") + (data (i32.const 3352) "\05\00\00\00\08\00\00\00-") (data (i32.const 3372) "\1c") - (data (i32.const 3384) "\05\00\00\00\08\00\00\00/") + (data (i32.const 3384) "\07\00\00\00\08\00\00\00.") (data (i32.const 3404) "\1c") - (data (i32.const 3416) "\05\00\00\00\08\00\00\000") + (data (i32.const 3416) "\05\00\00\00\08\00\00\00/") (data (i32.const 3436) "\1c") - (data (i32.const 3448) "\05\00\00\00\08\00\00\001") + (data (i32.const 3448) "\05\00\00\00\08\00\00\000") (data (i32.const 3468) "\1c") - (data (i32.const 3480) "\06\00\00\00\08\00\00\002") + (data (i32.const 3480) "\05\00\00\00\08\00\00\001") (data (i32.const 3500) "\1c") - (data (i32.const 3512) "\06\00\00\00\08\00\00\003") + (data (i32.const 3512) "\06\00\00\00\08\00\00\002") (data (i32.const 3532) "\1c") - (data (i32.const 3544) "\07\00\00\00\08\00\00\004") + (data (i32.const 3544) "\06\00\00\00\08\00\00\003") (data (i32.const 3564) "\1c") - (data (i32.const 3576) "\n\00\00\00\08\00\00\005") + (data (i32.const 3576) "\07\00\00\00\08\00\00\004") (data (i32.const 3596) "\1c") - (data (i32.const 3608) "\t\00\00\00\08\00\00\006") + (data (i32.const 3608) "\n\00\00\00\08\00\00\005") (data (i32.const 3628) "\1c") - (data (i32.const 3640) "\05\00\00\00\08\00\00\007") + (data (i32.const 3640) "\t\00\00\00\08\00\00\006") (data (i32.const 3660) "\1c") - (data (i32.const 3672) "\05\00\00\00\08\00\00\008") + (data (i32.const 3672) "\05\00\00\00\08\00\00\007") (data (i32.const 3692) "\1c") - (data (i32.const 3704) "\01\00\00\00\n\00\00\00m\00a\00t\002\00(") - (data (i32.const 3724) "\1c") - (data (i32.const 3736) "\01\00\00\00\06\00\00\000\00.\000") - (data (i32.const 3756) "\1c") - (data (i32.const 3768) "\01\00\00\00\06\00\00\00N\00a\00N") - (data (i32.const 3788) ",") - (data (i32.const 3800) "\01\00\00\00\12\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 3836) ",") - (data (i32.const 3848) "\01\00\00\00\10\00\00\00I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 3944) "\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8 - block $assembly/imports/IArguments - block $~lib/string/String - block $~lib/arraybuffer/ArrayBuffer - local.get $0 - i32.const 8 - i32.sub - i32.load - br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $folding-inner2 $folding-inner0 $folding-inner2 $folding-inner0 $folding-inner0 $folding-inner0 $assembly/imports/IArguments $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $~lib/array/Array<~lib/typedarray/Float64Array> $folding-inner1 $assembly/mat4/Fov $folding-inner1 $invalid + block $~lib/object/Object + block $assembly/imports/IArguments + block $~lib/string/String + block $~lib/arraybuffer/ArrayBuffer + local.get $0 + i32.const 8 + i32.sub + i32.load + br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $folding-inner2 $folding-inner0 $folding-inner2 $folding-inner0 $folding-inner0 $folding-inner0 $assembly/imports/IArguments $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $~lib/object/Object $~lib/array/Array<~lib/typedarray/Float64Array> $folding-inner1 $assembly/mat4/Fov $folding-inner1 $invalid + end + return end return end @@ -22151,7 +22146,7 @@ memory.size i32.const 16 i32.shl - i32.const 22364 + i32.const 22524 i32.sub i32.const 1 i32.shr_u @@ -22221,18 +22216,18 @@ global.set $assembly/vec2/vec i32.const 0 global.set $~argumentsLength - i32.const 3616 + i32.const 3648 i32.load call_indirect $0 (type $none_=>_i32) global.set $assembly/vec2/forEach ) (func $~stack_check global.get $~lib/memory/__stack_pointer - i32.const 5980 + i32.const 6140 i32.lt_s if - i32.const 22384 - i32.const 22432 + i32.const 22544 + i32.const 22592 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -23053,7 +23048,7 @@ i64.const 0 i64.store offset=56 global.get $~lib/memory/__stack_pointer - i32.const 3712 + i32.const 3872 i32.store offset=56 local.get $0 i32.const 0 @@ -23063,7 +23058,7 @@ global.get $~lib/memory/__stack_pointer local.get $1 i32.store offset=60 - i32.const 3712 + i32.const 3872 local.get $1 call $~lib/string/String.__concat local.set $1 @@ -23071,10 +23066,10 @@ local.get $1 i32.store offset=48 global.get $~lib/memory/__stack_pointer - i32.const 4912 + i32.const 5072 i32.store offset=52 local.get $1 - i32.const 4912 + i32.const 5072 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -23096,10 +23091,10 @@ local.get $1 i32.store offset=32 global.get $~lib/memory/__stack_pointer - i32.const 4912 + i32.const 5072 i32.store offset=36 local.get $1 - i32.const 4912 + i32.const 5072 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -23121,10 +23116,10 @@ local.get $1 i32.store offset=16 global.get $~lib/memory/__stack_pointer - i32.const 4912 + i32.const 5072 i32.store offset=20 local.get $1 - i32.const 4912 + i32.const 5072 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -23146,10 +23141,10 @@ local.get $0 i32.store global.get $~lib/memory/__stack_pointer - i32.const 4944 + i32.const 5104 i32.store offset=4 local.get $0 - i32.const 4944 + i32.const 5104 call $~lib/string/String.__concat global.get $~lib/memory/__stack_pointer i32.const -64 @@ -23201,7 +23196,7 @@ i64.const 0 i64.store offset=88 global.get $~lib/memory/__stack_pointer - i32.const 4976 + i32.const 5136 i32.store offset=88 local.get $0 i32.const 0 @@ -23211,7 +23206,7 @@ global.get $~lib/memory/__stack_pointer local.get $1 i32.store offset=92 - i32.const 4976 + i32.const 5136 local.get $1 call $~lib/string/String.__concat local.set $1 @@ -23219,10 +23214,10 @@ local.get $1 i32.store offset=80 global.get $~lib/memory/__stack_pointer - i32.const 4912 + i32.const 5072 i32.store offset=84 local.get $1 - i32.const 4912 + i32.const 5072 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -23244,10 +23239,10 @@ local.get $1 i32.store offset=64 global.get $~lib/memory/__stack_pointer - i32.const 4912 + i32.const 5072 i32.store offset=68 local.get $1 - i32.const 4912 + i32.const 5072 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -23269,10 +23264,10 @@ local.get $1 i32.store offset=48 global.get $~lib/memory/__stack_pointer - i32.const 4912 + i32.const 5072 i32.store offset=52 local.get $1 - i32.const 4912 + i32.const 5072 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -23294,10 +23289,10 @@ local.get $1 i32.store offset=32 global.get $~lib/memory/__stack_pointer - i32.const 4912 + i32.const 5072 i32.store offset=36 local.get $1 - i32.const 4912 + i32.const 5072 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -23319,10 +23314,10 @@ local.get $1 i32.store offset=16 global.get $~lib/memory/__stack_pointer - i32.const 4912 + i32.const 5072 i32.store offset=20 local.get $1 - i32.const 4912 + i32.const 5072 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -23344,10 +23339,10 @@ local.get $0 i32.store global.get $~lib/memory/__stack_pointer - i32.const 4944 + i32.const 5104 i32.store offset=4 local.get $0 - i32.const 4944 + i32.const 5104 call $~lib/string/String.__concat global.get $~lib/memory/__stack_pointer i32.const 96 @@ -23417,7 +23412,7 @@ i64.const 0 i64.store offset=136 global.get $~lib/memory/__stack_pointer - i32.const 5008 + i32.const 5168 i32.store offset=136 local.get $0 i32.const 0 @@ -23427,7 +23422,7 @@ global.get $~lib/memory/__stack_pointer local.get $1 i32.store offset=140 - i32.const 5008 + i32.const 5168 local.get $1 call $~lib/string/String.__concat local.set $1 @@ -23435,10 +23430,10 @@ local.get $1 i32.store offset=128 global.get $~lib/memory/__stack_pointer - i32.const 4912 + i32.const 5072 i32.store offset=132 local.get $1 - i32.const 4912 + i32.const 5072 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -23460,10 +23455,10 @@ local.get $1 i32.store offset=112 global.get $~lib/memory/__stack_pointer - i32.const 4912 + i32.const 5072 i32.store offset=116 local.get $1 - i32.const 4912 + i32.const 5072 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -23485,10 +23480,10 @@ local.get $1 i32.store offset=96 global.get $~lib/memory/__stack_pointer - i32.const 4912 + i32.const 5072 i32.store offset=100 local.get $1 - i32.const 4912 + i32.const 5072 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -23510,10 +23505,10 @@ local.get $1 i32.store offset=80 global.get $~lib/memory/__stack_pointer - i32.const 4912 + i32.const 5072 i32.store offset=84 local.get $1 - i32.const 4912 + i32.const 5072 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -23535,10 +23530,10 @@ local.get $1 i32.store offset=64 global.get $~lib/memory/__stack_pointer - i32.const 4912 + i32.const 5072 i32.store offset=68 local.get $1 - i32.const 4912 + i32.const 5072 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -23560,10 +23555,10 @@ local.get $1 i32.store offset=48 global.get $~lib/memory/__stack_pointer - i32.const 4912 + i32.const 5072 i32.store offset=52 local.get $1 - i32.const 4912 + i32.const 5072 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -23585,10 +23580,10 @@ local.get $1 i32.store offset=32 global.get $~lib/memory/__stack_pointer - i32.const 4912 + i32.const 5072 i32.store offset=36 local.get $1 - i32.const 4912 + i32.const 5072 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -23610,10 +23605,10 @@ local.get $1 i32.store offset=16 global.get $~lib/memory/__stack_pointer - i32.const 4912 + i32.const 5072 i32.store offset=20 local.get $1 - i32.const 4912 + i32.const 5072 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -23635,10 +23630,10 @@ local.get $0 i32.store global.get $~lib/memory/__stack_pointer - i32.const 4944 + i32.const 5104 i32.store offset=4 local.get $0 - i32.const 4944 + i32.const 5104 call $~lib/string/String.__concat global.get $~lib/memory/__stack_pointer i32.const 144 @@ -23750,7 +23745,7 @@ i64.const 0 i64.store offset=248 global.get $~lib/memory/__stack_pointer - i32.const 5040 + i32.const 5200 i32.store offset=248 local.get $0 i32.const 0 @@ -23760,7 +23755,7 @@ global.get $~lib/memory/__stack_pointer local.get $1 i32.store offset=252 - i32.const 5040 + i32.const 5200 local.get $1 call $~lib/string/String.__concat local.set $1 @@ -23768,10 +23763,10 @@ local.get $1 i32.store offset=240 global.get $~lib/memory/__stack_pointer - i32.const 4912 + i32.const 5072 i32.store offset=244 local.get $1 - i32.const 4912 + i32.const 5072 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -23793,10 +23788,10 @@ local.get $1 i32.store offset=224 global.get $~lib/memory/__stack_pointer - i32.const 4912 + i32.const 5072 i32.store offset=228 local.get $1 - i32.const 4912 + i32.const 5072 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -23818,10 +23813,10 @@ local.get $1 i32.store offset=208 global.get $~lib/memory/__stack_pointer - i32.const 4912 + i32.const 5072 i32.store offset=212 local.get $1 - i32.const 4912 + i32.const 5072 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -23843,10 +23838,10 @@ local.get $1 i32.store offset=192 global.get $~lib/memory/__stack_pointer - i32.const 4912 + i32.const 5072 i32.store offset=196 local.get $1 - i32.const 4912 + i32.const 5072 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -23868,10 +23863,10 @@ local.get $1 i32.store offset=176 global.get $~lib/memory/__stack_pointer - i32.const 4912 + i32.const 5072 i32.store offset=180 local.get $1 - i32.const 4912 + i32.const 5072 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -23893,10 +23888,10 @@ local.get $1 i32.store offset=160 global.get $~lib/memory/__stack_pointer - i32.const 4912 + i32.const 5072 i32.store offset=164 local.get $1 - i32.const 4912 + i32.const 5072 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -23918,10 +23913,10 @@ local.get $1 i32.store offset=144 global.get $~lib/memory/__stack_pointer - i32.const 4912 + i32.const 5072 i32.store offset=148 local.get $1 - i32.const 4912 + i32.const 5072 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -23943,10 +23938,10 @@ local.get $1 i32.store offset=128 global.get $~lib/memory/__stack_pointer - i32.const 4912 + i32.const 5072 i32.store offset=132 local.get $1 - i32.const 4912 + i32.const 5072 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -23968,10 +23963,10 @@ local.get $1 i32.store offset=112 global.get $~lib/memory/__stack_pointer - i32.const 4912 + i32.const 5072 i32.store offset=116 local.get $1 - i32.const 4912 + i32.const 5072 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -23993,10 +23988,10 @@ local.get $1 i32.store offset=96 global.get $~lib/memory/__stack_pointer - i32.const 4912 + i32.const 5072 i32.store offset=100 local.get $1 - i32.const 4912 + i32.const 5072 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -24018,10 +24013,10 @@ local.get $1 i32.store offset=80 global.get $~lib/memory/__stack_pointer - i32.const 4912 + i32.const 5072 i32.store offset=84 local.get $1 - i32.const 4912 + i32.const 5072 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -24043,10 +24038,10 @@ local.get $1 i32.store offset=64 global.get $~lib/memory/__stack_pointer - i32.const 4912 + i32.const 5072 i32.store offset=68 local.get $1 - i32.const 4912 + i32.const 5072 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -24068,10 +24063,10 @@ local.get $1 i32.store offset=48 global.get $~lib/memory/__stack_pointer - i32.const 4912 + i32.const 5072 i32.store offset=52 local.get $1 - i32.const 4912 + i32.const 5072 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -24093,10 +24088,10 @@ local.get $1 i32.store offset=32 global.get $~lib/memory/__stack_pointer - i32.const 4912 + i32.const 5072 i32.store offset=36 local.get $1 - i32.const 4912 + i32.const 5072 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -24118,10 +24113,10 @@ local.get $1 i32.store offset=16 global.get $~lib/memory/__stack_pointer - i32.const 4912 + i32.const 5072 i32.store offset=20 local.get $1 - i32.const 4912 + i32.const 5072 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -24143,10 +24138,10 @@ local.get $0 i32.store global.get $~lib/memory/__stack_pointer - i32.const 4944 + i32.const 5104 i32.store offset=4 local.get $0 - i32.const 4944 + i32.const 5104 call $~lib/string/String.__concat global.get $~lib/memory/__stack_pointer i32.const 256 @@ -24195,7 +24190,7 @@ call $~lib/math/NativeMath.cos local.set $6 local.get $4 - i32.const 5072 + i32.const 5232 i32.eq if local.get $0 @@ -24252,7 +24247,7 @@ call $~lib/typedarray/Float64Array#__set else local.get $4 - i32.const 5104 + i32.const 5264 i32.eq if local.get $0 @@ -24309,7 +24304,7 @@ call $~lib/typedarray/Float64Array#__set else local.get $4 - i32.const 5136 + i32.const 5296 i32.eq if local.get $0 @@ -24366,7 +24361,7 @@ call $~lib/typedarray/Float64Array#__set else local.get $4 - i32.const 5168 + i32.const 5328 i32.eq if local.get $0 @@ -24423,7 +24418,7 @@ call $~lib/typedarray/Float64Array#__set else local.get $4 - i32.const 5200 + i32.const 5360 i32.eq if local.get $0 @@ -24537,12 +24532,12 @@ call $~lib/typedarray/Float64Array#__set else global.get $~lib/memory/__stack_pointer - i32.const 5232 + i32.const 5392 i32.store - i32.const 5232 + i32.const 5392 local.get $4 call $~lib/string/String.__concat - i32.const 5296 + i32.const 5456 i32.const 512 i32.const 10 call $~lib/builtins/abort @@ -24592,7 +24587,7 @@ i64.const 0 i64.store offset=56 global.get $~lib/memory/__stack_pointer - i32.const 5360 + i32.const 5520 i32.store offset=56 local.get $0 i32.const 0 @@ -24602,7 +24597,7 @@ global.get $~lib/memory/__stack_pointer local.get $1 i32.store offset=60 - i32.const 5360 + i32.const 5520 local.get $1 call $~lib/string/String.__concat local.set $1 @@ -24610,10 +24605,10 @@ local.get $1 i32.store offset=48 global.get $~lib/memory/__stack_pointer - i32.const 4912 + i32.const 5072 i32.store offset=52 local.get $1 - i32.const 4912 + i32.const 5072 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -24635,10 +24630,10 @@ local.get $1 i32.store offset=32 global.get $~lib/memory/__stack_pointer - i32.const 4912 + i32.const 5072 i32.store offset=36 local.get $1 - i32.const 4912 + i32.const 5072 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -24660,10 +24655,10 @@ local.get $1 i32.store offset=16 global.get $~lib/memory/__stack_pointer - i32.const 4912 + i32.const 5072 i32.store offset=20 local.get $1 - i32.const 4912 + i32.const 5072 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -24685,10 +24680,10 @@ local.get $0 i32.store global.get $~lib/memory/__stack_pointer - i32.const 4944 + i32.const 5104 i32.store offset=4 local.get $0 - i32.const 4944 + i32.const 5104 call $~lib/string/String.__concat global.get $~lib/memory/__stack_pointer i32.const -64 @@ -24752,7 +24747,7 @@ i64.const 0 i64.store offset=120 global.get $~lib/memory/__stack_pointer - i32.const 5392 + i32.const 5552 i32.store offset=120 local.get $0 i32.const 0 @@ -24762,7 +24757,7 @@ global.get $~lib/memory/__stack_pointer local.get $1 i32.store offset=124 - i32.const 5392 + i32.const 5552 local.get $1 call $~lib/string/String.__concat local.set $1 @@ -24770,10 +24765,10 @@ local.get $1 i32.store offset=112 global.get $~lib/memory/__stack_pointer - i32.const 4912 + i32.const 5072 i32.store offset=116 local.get $1 - i32.const 4912 + i32.const 5072 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -24795,10 +24790,10 @@ local.get $1 i32.store offset=96 global.get $~lib/memory/__stack_pointer - i32.const 4912 + i32.const 5072 i32.store offset=100 local.get $1 - i32.const 4912 + i32.const 5072 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -24820,10 +24815,10 @@ local.get $1 i32.store offset=80 global.get $~lib/memory/__stack_pointer - i32.const 4912 + i32.const 5072 i32.store offset=84 local.get $1 - i32.const 4912 + i32.const 5072 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -24845,10 +24840,10 @@ local.get $1 i32.store offset=64 global.get $~lib/memory/__stack_pointer - i32.const 4912 + i32.const 5072 i32.store offset=68 local.get $1 - i32.const 4912 + i32.const 5072 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -24870,10 +24865,10 @@ local.get $1 i32.store offset=48 global.get $~lib/memory/__stack_pointer - i32.const 4912 + i32.const 5072 i32.store offset=52 local.get $1 - i32.const 4912 + i32.const 5072 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -24895,10 +24890,10 @@ local.get $1 i32.store offset=32 global.get $~lib/memory/__stack_pointer - i32.const 4912 + i32.const 5072 i32.store offset=36 local.get $1 - i32.const 4912 + i32.const 5072 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -24920,10 +24915,10 @@ local.get $1 i32.store offset=16 global.get $~lib/memory/__stack_pointer - i32.const 4912 + i32.const 5072 i32.store offset=20 local.get $1 - i32.const 4912 + i32.const 5072 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -24945,10 +24940,10 @@ local.get $0 i32.store global.get $~lib/memory/__stack_pointer - i32.const 4944 + i32.const 5104 i32.store offset=4 local.get $0 - i32.const 4944 + i32.const 5104 call $~lib/string/String.__concat global.get $~lib/memory/__stack_pointer i32.const 128 @@ -24982,7 +24977,7 @@ i64.const 0 i64.store offset=40 global.get $~lib/memory/__stack_pointer - i32.const 5696 + i32.const 5856 i32.store offset=40 local.get $0 i32.const 0 @@ -24992,7 +24987,7 @@ global.get $~lib/memory/__stack_pointer local.get $1 i32.store offset=44 - i32.const 5696 + i32.const 5856 local.get $1 call $~lib/string/String.__concat local.set $1 @@ -25000,10 +24995,10 @@ local.get $1 i32.store offset=32 global.get $~lib/memory/__stack_pointer - i32.const 4912 + i32.const 5072 i32.store offset=36 local.get $1 - i32.const 4912 + i32.const 5072 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -25025,10 +25020,10 @@ local.get $1 i32.store offset=16 global.get $~lib/memory/__stack_pointer - i32.const 4912 + i32.const 5072 i32.store offset=20 local.get $1 - i32.const 4912 + i32.const 5072 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -25050,10 +25045,10 @@ local.get $0 i32.store global.get $~lib/memory/__stack_pointer - i32.const 4944 + i32.const 5104 i32.store offset=4 local.get $0 - i32.const 4944 + i32.const 5104 call $~lib/string/String.__concat global.get $~lib/memory/__stack_pointer i32.const 48 @@ -25093,7 +25088,7 @@ i64.const 0 i64.store offset=56 global.get $~lib/memory/__stack_pointer - i32.const 5728 + i32.const 5888 i32.store offset=56 local.get $0 i32.const 0 @@ -25103,7 +25098,7 @@ global.get $~lib/memory/__stack_pointer local.get $1 i32.store offset=60 - i32.const 5728 + i32.const 5888 local.get $1 call $~lib/string/String.__concat local.set $1 @@ -25111,10 +25106,10 @@ local.get $1 i32.store offset=48 global.get $~lib/memory/__stack_pointer - i32.const 4912 + i32.const 5072 i32.store offset=52 local.get $1 - i32.const 4912 + i32.const 5072 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -25136,10 +25131,10 @@ local.get $1 i32.store offset=32 global.get $~lib/memory/__stack_pointer - i32.const 4912 + i32.const 5072 i32.store offset=36 local.get $1 - i32.const 4912 + i32.const 5072 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -25161,10 +25156,10 @@ local.get $1 i32.store offset=16 global.get $~lib/memory/__stack_pointer - i32.const 4912 + i32.const 5072 i32.store offset=20 local.get $1 - i32.const 4912 + i32.const 5072 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -25186,10 +25181,10 @@ local.get $0 i32.store global.get $~lib/memory/__stack_pointer - i32.const 4944 + i32.const 5104 i32.store offset=4 local.get $0 - i32.const 4944 + i32.const 5104 call $~lib/string/String.__concat global.get $~lib/memory/__stack_pointer i32.const -64 @@ -26892,7 +26887,7 @@ i32.const 0 i32.const 3 i32.const 28 - i32.const 5456 + i32.const 5616 call $~lib/rt/__newArray local.tee $4 i32.store @@ -26900,7 +26895,7 @@ i32.const 0 i32.const 3 i32.const 28 - i32.const 5488 + i32.const 5648 call $~lib/rt/__newArray local.tee $5 i32.store offset=4 @@ -27023,7 +27018,7 @@ i32.const 0 i32.const 3 i32.const 28 - i32.const 5568 + i32.const 5728 call $~lib/rt/__newArray local.tee $4 i32.store @@ -27031,7 +27026,7 @@ i32.const 0 i32.const 3 i32.const 28 - i32.const 5600 + i32.const 5760 call $~lib/rt/__newArray local.tee $5 i32.store offset=4 @@ -27154,7 +27149,7 @@ i32.const 0 i32.const 3 i32.const 28 - i32.const 5632 + i32.const 5792 call $~lib/rt/__newArray local.tee $4 i32.store @@ -27162,7 +27157,7 @@ i32.const 0 i32.const 3 i32.const 28 - i32.const 5664 + i32.const 5824 call $~lib/rt/__newArray local.tee $5 i32.store offset=4 @@ -27270,6 +27265,22 @@ global.set $~lib/memory/__stack_pointer local.get $0 ) + (func $export:assembly/common/setMatrixArrayType (param $0 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + i32.const 3744 + i32.const 3808 + i32.const 20 + i32.const 3 + call $~lib/builtins/abort + unreachable + ) (func $export:assembly/mat2/clone (param $0 i32) (result i32) global.get $~lib/memory/__stack_pointer i32.const 4 @@ -31811,7 +31822,7 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $export:assembly/mat4/perspectiveNO (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) + (func $export:assembly/mat4/perspectiveNO (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (result i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -31831,7 +31842,7 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $export:assembly/mat4/perspectiveZO (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) + (func $export:assembly/mat4/perspectiveZO (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (result i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -35382,7 +35393,7 @@ i64.const 0 i64.store offset=24 global.get $~lib/memory/__stack_pointer - i32.const 5424 + i32.const 5584 i32.store offset=24 local.get $0 i32.const 0 @@ -35392,7 +35403,7 @@ global.get $~lib/memory/__stack_pointer local.get $1 i32.store offset=28 - i32.const 5424 + i32.const 5584 local.get $1 call $~lib/string/String.__concat local.set $1 @@ -35400,10 +35411,10 @@ local.get $1 i32.store offset=16 global.get $~lib/memory/__stack_pointer - i32.const 4912 + i32.const 5072 i32.store offset=20 local.get $1 - i32.const 4912 + i32.const 5072 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -35425,10 +35436,10 @@ local.get $0 i32.store global.get $~lib/memory/__stack_pointer - i32.const 4944 + i32.const 5104 i32.store offset=4 local.get $0 - i32.const 4944 + i32.const 5104 call $~lib/string/String.__concat global.get $~lib/memory/__stack_pointer i32.const 32 diff --git a/build/untouched.wat b/build/untouched.wat index 1f80ce72..304ae771 100644 --- a/build/untouched.wat +++ b/build/untouched.wat @@ -13,16 +13,16 @@ (type $none_=>_none (func)) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_f64 (func (result f64))) - (type $f64_=>_f64 (func (param f64) (result f64))) (type $i32_=>_none (func (param i32))) + (type $f64_=>_f64 (func (param f64) (result f64))) (type $i32_f64_=>_none (func (param i32 f64))) + (type $i32_f64_f64_f64_f64_=>_i32 (func (param i32 f64 f64 f64 f64) (result i32))) (type $i32_f64_f64_f64_f64_f64_f64_=>_i32 (func (param i32 f64 f64 f64 f64 f64 f64) (result i32))) - (type $i32_f64_f64_f64_i32_=>_i32 (func (param i32 f64 f64 f64 i32) (result i32))) (type $i32_i32_i32_i32_i32_f64_=>_i32 (func (param i32 i32 i32 i32 i32 f64) (result i32))) (type $i32_f64_f64_=>_i32 (func (param i32 f64 f64) (result i32))) - (type $i32_f64_f64_f64_f64_=>_i32 (func (param i32 f64 f64 f64 f64) (result i32))) (type $i32_i32_f64_=>_none (func (param i32 i32 f64))) (type $i32_i32_i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32 i32) (result i32))) + (type $i32_f64_f64_f64_i32_=>_i32 (func (param i32 f64 f64 f64 i32) (result i32))) (type $i32_i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32) (result i32))) (type $i32_i32_f64_i32_=>_i32 (func (param i32 i32 f64 i32) (result i32))) (type $i32_i32_f64_f64_=>_i32 (func (param i32 i32 f64 f64) (result i32))) @@ -109,62 +109,65 @@ (data (i32.const 2028) "\1c\00\00\00\00\00\00\00\00\00\00\00\16\00\00\00\08\00\00\00%\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 2060) "\1c\00\00\00\00\00\00\00\00\00\00\00\15\00\00\00\08\00\00\00&\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 2092) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00\'\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2124) "\1c\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\08\00\00\00(\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2156) "\1c\00\00\00\00\00\00\00\00\00\00\00\18\00\00\00\08\00\00\00)\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2188) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00*\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2220) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00+\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2252) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00,\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2284) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00-\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2316) "\1c\00\00\00\00\00\00\00\00\00\00\00\07\00\00\00\08\00\00\00.\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2348) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00/\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2380) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\000\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2412) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\001\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2444) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\002\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2476) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\003\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2508) "\1c\00\00\00\00\00\00\00\00\00\00\00\07\00\00\00\08\00\00\004\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2540) "\1c\00\00\00\00\00\00\00\00\00\00\00\n\00\00\00\08\00\00\005\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2572) "\1c\00\00\00\00\00\00\00\00\00\00\00\t\00\00\00\08\00\00\006\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2604) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\007\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2636) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\008\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2668) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00m\00a\00t\002\00(\00\00\00") - (data (i32.const 2700) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\000\00.\000\00\00\00\00\00\00\00") - (data (i32.const 2732) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00N\00a\00N\00\00\00\00\00\00\00") - (data (i32.const 2764) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\12\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2812) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\00I\00n\00f\00i\00n\00i\00t\00y\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2864) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2920) "\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\9a\ec\ef?\d1f\87\10z^\90\bc\85\7fn\e8\15\e3\ef?\13\f6g5R\d2\8c\be\ef?m{\83]\a6\9a\97<\0f\89\f9lX\b5\ef?\fc\ef\fd\92\1a\b5\8e<\f7Gr+\92\ac\ef?\d1\9c/p=\be><\a2\d1\d32\ec\a3\ef?\0bn\90\894\03j\bc\1b\d3\fe\aff\9b\ef?\0e\bd/*RV\95\bcQ[\12\d0\01\93\ef?U\eaN\8c\ef\80P\bc\cc1l\c0\bd\8a\ef?\16\f4\d5\b9#\c9\91\bc\e0-\a9\ae\9a\82\ef?\afU\\\e9\e3\d3\80\f7\ec\9a<\aa\b9h1\87T\ef?\9d8\86\cb\82\e7\8f\bc\1d\d9\fc\"PM\ef?\8d\c3\a6DAo\8a<\d6\8cb\88;F\ef?}\04\e4\b0\05z\80<\96\dc}\91I?\ef?\94\a8\a8\e3\fd\8e\96<8bunz8\ef?}Ht\f2\18^\87\a9\af\0c\ef?\b6\ab\b0MuM\83<\15\b71\n\fe\06\ef?Lt\ac\e2\01B\86<1\d8L\fcp\01\ef?J\f8\d3]9\dd\8f<\ff\16d\b2\08\fc\ee?\04[\8e;\80\a3\86\bc\f1\9f\92_\c5\f6\ee?hPK\cc\edJ\92\bc\cb\a9:7\a7\f1\ee?\8e-Q\1b\f8\07\99\bcf\d8\05m\ae\ec\ee?\d26\94>\e8\d1q\bc\f7\9f\e54\db\e7\ee?\15\1b\ce\b3\19\19\99\bc\e5\a8\13\c3-\e3\ee?mL*\a7H\9f\85<\"4\12L\a6\de\ee?\8ai(z`\12\93\bc\1c\80\ac\04E\da\ee?[\89\17H\8f\a7X\bc*.\f7!\n\d6\ee?\1b\9aIg\9b,|\bc\97\a8P\d9\f5\d1\ee?\11\ac\c2`\edcC<-\89a`\08\ce\ee?\efd\06;\tf\96Z~d\1fx\bct_\ec\e8u\9f\ee?\b0}\8b\c0J\ee\86\bct\81\a5H\9a\9f\ee?\8a\e6U\1e2\19\86\bc\c9gBV\eb\9f\ee?\d3\d4\t^\cb\9c\90T\'\a4\ee?47;\f1\b6i\93\bc\13\ceL\99\89\a5\ee?\1e\ff\19:\84^\80\bc\ad\c7#F\1a\a7\ee?nWr\d8P\d4\94\bc\ed\92D\9b\d9\a8\ee?\00\8a\0e[g\ad\90<\99f\8a\d9\c7\aa\ee?\b4\ea\f0\c1/\b7\8d<\db\a0*B\e5\ac\ee?\ff\e7\c5\9c`\b6e\bc\8cD\b5\162\af\ee?D_\f3Y\83\f6{<6w\15\99\ae\b1\ee?\83=\1e\a7\1f\t\93\bc\c6\ff\91\0b[\b4\ee?)\1el\8b\b8\a9]\bc\e5\c5\cd\b07\b7\ee?Y\b9\90|\f9#l\bc\0fR\c8\cbD\ba\ee?\aa\f9\f4\"CC\92\bcPN\de\9f\82\bd\ee?K\8ef\d7l\ca\85\bc\ba\07\cap\f1\c0\ee?\'\ce\91+\fc\afq<\90\f0\a3\82\91\c4\ee?\bbs\n\e15\d2m<##\e3\19c\c8\ee?c\"b\"\04\c5\87\bce\e5]{f\cc\ee?\d51\e2\e3\86\1c\8b<3-J\ec\9b\d0\ee?\15\bb\bc\d3\d1\bb\91\bc]%>\b2\03\d5\ee?\d21\ee\9c1\cc\90\b4\07!\d5\82\bc_\9b{3\97|\ef?\c9\0dG;\b9*\89\bc)\a1\f5\14F\86\ef?\d3\88:`\04\b6t<\f6?\8b\e7.\90\ef?qr\9dQ\ec\c5\83<\83L\c7\fbQ\9a\ef?\f0\91\d3\8f\12\f7\8f\bc\da\90\a4\a2\af\a4\ef?}t#\e2\98\ae\8d\bc\f1g\8e-H\af\ef?\08 \aaA\bc\c3\8e<\'Za\ee\1b\ba\ef?2\eb\a9\c3\94+\84<\97\bak7+\c5\ef?\ee\85\d11\a9d\8a<@En[v\d0\ef?\ed\e3;\e4\ba7\8e\bc\14\be\9c\ad\fd\db\ef?\9d\cd\91M;\89w<\d8\90\9e\81\c1\e7\ef?\89\cc`A\c1\05S<\f1q\8f+\c2\f3\ef?") - (data (i32.const 6480) "\9f\de\e0\c3\f04\f7?\00\90\e6y\7f\cc\d7\bf\1f\e9,jx\13\f7?\00\00\0d\c2\eeo\d7\bf\a0\b5\fa\08`\f2\f6?\00\e0Q\13\e3\13\d7\bf}\8c\13\1f\a6\d1\f6?\00x(8[\b8\d6\bf\d1\b4\c5\0bI\b1\f6?\00x\80\90U]\d6\bf\ba\0c/3G\91\f6?\00\00\18v\d0\02\d6\bf#B\"\18\9fq\f6?\00\90\90\86\ca\a8\d5\bf\d9\1e\a5\99OR\f6?\00P\03VCO\d5\bf\c4$\8f\aaV3\f6?\00@k\c37\f6\d4\bf\14\dc\9dk\b3\14\f6?\00P\a8\fd\a7\9d\d4\bfL\\\c6Rd\f6\f5?\00\a8\899\92E\d4\bfO,\91\b5g\d8\f5?\00\b8\b09\f4\ed\d3\bf\de\90[\cb\bc\ba\f5?\00p\8fD\ce\96\d3\bfx\1a\d9\f2a\9d\f5?\00\a0\bd\17\1e@\d3\bf\87VF\12V\80\f5?\00\80F\ef\e2\e9\d2\bf\d3k\e7\ce\97c\f5?\00\e008\1b\94\d2\bf\93\7f\a7\e2%G\f5?\00\88\da\8c\c5>\d2\bf\83E\06B\ff*\f5?\00\90\')\e1\e9\d1\bf\df\bd\b2\db\"\0f\f5?\00\f8H+m\95\d1\bf\d7\de4G\8f\f3\f4?\00\f8\b9\9agA\d1\bf@(\de\cfC\d8\f4?\00\98\ef\94\d0\ed\d0\bf\c8\a3x\c0>\bd\f4?\00\10\db\18\a5\9a\d0\bf\8a%\e0\c3\7f\a2\f4?\00\b8cR\e6G\d0\bf4\84\d4$\05\88\f4?\00\f0\86E\"\eb\cf\bf\0b-\19\1b\cem\f4?\00\b0\17uJG\cf\bfT\189\d3\d9S\f4?\000\10=D\a4\ce\bfZ\84\b4D\':\f4?\00\b0\e9D\0d\02\ce\bf\fb\f8\15A\b5 \f4?\00\f0w)\a2`\cd\bf\b1\f4>\da\82\07\f4?\00\90\95\04\01\c0\cc\bf\8f\feW]\8f\ee\f3?\00\10\89V) \cc\bf\e9L\0b\a0\d9\d5\f3?\00\10\81\8d\17\81\cb\bf+\c1\10\c0`\bd\f3?\00\d0\d3\cc\c9\e2\ca\bf\b8\dau+$\a5\f3?\00\90\12.@E\ca\bf\02\d0\9f\cd\"\8d\f3?\00\f0\1dhw\a8\c9\bf\1cz\84\c5[u\f3?\000Him\0c\c9\bf\e26\adI\ce]\f3?\00\c0E\a6 q\c8\bf@\d4M\98yF\f3?\000\14\b4\8f\d6\c7\bf$\cb\ff\ce\\/\f3?\00pb<\b8<\c7\bfI\0d\a1uw\18\f3?\00`7\9b\9a\a3\c6\bf\909>7\c8\01\f3?\00\a0\b7T1\0b\c6\bfA\f8\95\bbN\eb\f2?\000$v}s\c5\bf\d1\a9\19\02\n\d5\f2?\000\c2\8f{\dc\c4\bf*\fd\b7\a8\f9\be\f2?\00\00\d2Q,F\c4\bf\ab\1b\0cz\1c\a9\f2?\00\00\83\bc\8a\b0\c3\bf0\b5\14`r\93\f2?\00\00Ik\99\1b\c3\bf\f5\a1WW\fa}\f2?\00@\a4\90T\87\c2\bf\bf;\1d\9b\b3h\f2?\00\a0y\f8\b9\f3\c1\bf\bd\f5\8f\83\9dS\f2?\00\a0,%\c8`\c1\bf;\08\c9\aa\b7>\f2?\00 \f7W\7f\ce\c0\bf\b6@\a9+\01*\f2?\00\a0\feI\dc<\c0\bf2A\cc\96y\15\f2?\00\80K\bc\bdW\bf\bf\9b\fc\d2\1d \01\f2?\00@@\96\087\be\bf\0bHMI\f4\ec\f1?\00@\f9>\98\17\bd\bfie\8fR\f5\d8\f1?\00\a0\d8Ng\f9\bb\bf|~W\11#\c5\f1?\00`/ y\dc\ba\bf\e9&\cbt|\b1\f1?\00\80(\e7\c3\c0\b9\bf\b6\1a,\0c\01\9e\f1?\00\c0r\b3F\a6\b8\bf\bdp\b6{\b0\8a\f1?\00\00\ac\b3\01\8d\b7\bf\b6\bc\ef%\8aw\f1?\00\008E\f1t\b6\bf\da1L5\8dd\f1?\00\80\87m\0e^\b5\bf\dd_\'\90\b9Q\f1?\00\e0\a1\de\\H\b4\bfL\d22\a4\0e?\f1?\00\a0jM\d93\b3\bf\da\f9\10r\8b,\f1?\00`\c5\f8y \b2\bf1\b5\ec(0\1a\f1?\00 b\98F\0e\b1\bf\af4\84\da\fb\07\f1?\00\00\d2jl\fa\af\bf\b3kN\0f\ee\f5\f0?\00@wJ\8d\da\ad\bf\ce\9f*]\06\e4\f0?\00\00\85\e4\ec\bc\ab\bf!\a5,cD\d2\f0?\00\c0\12@\89\a1\a9\bf\1a\98\e2|\a7\c0\f0?\00\c0\023X\88\a7\bf\d16\c6\83/\af\f0?\00\80\d6g^q\a5\bf9\13\a0\98\db\9d\f0?\00\80eI\8a\\\a3\bf\df\e7R\af\ab\8c\f0?\00@\15d\e3I\a1\bf\fb(N/\9f{\f0?\00\80\eb\82\c0r\9e\bf\19\8f5\8c\b5j\f0?\00\80RR\f1U\9a\bf,\f9\ec\a5\eeY\f0?\00\80\81\cfb=\96\bf\90,\d1\cdII\f0?\00\00\aa\8c\fb(\92\bf\a9\ad\f0\c6\c68\f0?\00\00\f9 {1\8c\bf\a92y\13e(\f0?\00\00\aa]5\19\84\bfHs\ea\'$\18\f0?\00\00\ec\c2\03\12x\bf\95\b1\14\06\04\08\f0?\00\00$y\t\04`\bf\1a\fa&\f7\1f\e0\ef?\00\00\90\84\f3\efo?t\eaa\c2\1c\a1\ef?\00\00=5A\dc\87?.\99\81\b0\10c\ef?\00\80\c2\c4\a3\ce\93?\cd\ad\ee<\f6%\ef?\00\00\89\14\c1\9f\9b?\e7\13\91\03\c8\e9\ee?\00\00\11\ce\d8\b0\a1?\ab\b1\cbx\80\ae\ee?\00\c0\01\d0[\8a\a5?\9b\0c\9d\a2\1at\ee?\00\80\d8@\83\\\a9?\b5\99\n\83\91:\ee?\00\80W\efj\'\ad?V\9a`\t\e0\01\ee?\00\c0\98\e5\98u\b0?\98\bbw\e5\01\ca\ed?\00 \0d\e3\f5S\b2?\03\91|\0b\f2\92\ed?\00\008\8b\dd.\b4?\ce\\\fbf\ac\\\ed?\00\c0W\87Y\06\b6?\9d\de^\aa,\'\ed?\00\00j5v\da\b7?\cd,k>n\f2\ec?\00`\1cNC\ab\b9?\02y\a7\a2m\be\ec?\00`\0d\bb\c7x\bb?m\087m&\8b\ec?\00 \e72\13C\bd?\04X]\bd\94X\ec?\00`\deq1\n\bf?\8c\9f\bb3\b5&\ec?\00@\91+\15g\c0??\e7\ec\ee\83\f5\eb?\00\b0\92\82\85G\c1?\c1\96\dbu\fd\c4\eb?\000\ca\cdn&\c2?(J\86\0c\1e\95\eb?\00P\c5\a6\d7\03\c3?,>\ef\c5\e2e\eb?\00\103<\c3\df\c3?\8b\88\c9gH7\eb?\00\80zk6\ba\c4?J0\1d!K\t\eb?\00\f0\d1(9\93\c5?~\ef\f2\85\e8\db\ea?\00\f0\18$\cdj\c6?\a2=`1\1d\af\ea?\00\90f\ec\f8@\c7?\a7X\d3?\e6\82\ea?\00\f0\1a\f5\c0\15\c8?\8bs\t\ef@W\ea?\00\80\f6T)\e9\c8?\'K\ab\90*,\ea?\00@\f8\026\bb\c9?\d1\f2\93\13\a0\01\ea?\00\00,\1c\ed\8b\ca?\1b<\db$\9f\d7\e9?\00\d0\01\\Q[\cb?\90\b1\c7\05%\ae\e9?\00\c0\bc\ccg)\cc?/\ce\97\f2.\85\e9?\00`H\d55\f6\cc?uK\a4\ee\ba\\\e9?\00\c0F4\bd\c1\cd?8H\e7\9d\c64\e9?\00\e0\cf\b8\01\8c\ce?\e6Rg/O\0d\e9?\00\90\17\c0\tU\cf?\9d\d7\ff\8eR\e6\e8?\00\b8\1f\12l\0e\d0?|\00\cc\9f\ce\bf\e8?\00\d0\93\0e\b8q\d0?\0e\c3\be\da\c0\99\e8?\00p\86\9ek\d4\d0?\fb\17#\aa\'t\e8?\00\d0K3\876\d1?\08\9a\b3\ac\00O\e8?\00H#g\0d\98\d1?U>e\e8I*\e8?\00\80\cc\e0\ff\f8\d1?`\02\f4\95\01\06\e8?\00hc\d7_Y\d2?)\a3\e0c%\e2\e7?\00\a8\14\t0\b9\d2?\ad\b5\dcw\b3\be\e7?\00`C\10r\18\d3?\c2%\97g\aa\9b\e7?\00\18\ecm&w\d3?W\06\17\f2\07y\e7?\000\af\fbO\d5\d3?\0c\13\d6\db\caV\e7?\00\e0/\e3\ee2\d4?") - (data (i32.const 8528) "k\b6O\01\00\10\e6?<[B\91l\02~<\95\b4M\03\000\e6?A]\00H\ea\bf\8d\f6\05\eb\ff\ef\e6?S-\e2\1a\04\80~\bc\80\97\86\0e\00\10\e7?Ry\tqf\ff{<\12\e9g\fc\ff/\e7?$\87\bd&\e2\00\8c\89<\b9{F\13\000\e9?v\02\98KN\80\7f.\98\dd\ff\af\e9?7\93Z\8a\e0@\87\bcf\fbI\ed\ff\cf\e9?\00\e0\9b\c1\08\ce?O*\00\b0\ea?_?\ff<\04\fdi\bc\d1\1e\ae\d7\ff\cf\ea?\b4p\90\12\e7>\82\bcx\04Q\ee\ff\ef\ea?\a3\de\0e\e0>\06j<[\0de\db\ff\0f\eb?\b9\n\1f8\c8\06ZO\86\d0E\ff\8a<@\16\87\f9\ff\8f\eb?\f9\c3\c2\96w\fe|\f0\0f\00\f0\f4?\1cS\85\0b\89\7f\97<\d1K\dc\12\00\10\f5?6\a4fqe\04`\c9\03\00\b0\f5?\c0\0c\bf\n\08A\9f\bc\bc\19I\1d\00\d0\f5?)G%\fb*\81\98\bc\89z\b8\e7\ff\ef\f5?\04i\ed\80\b7~\94\bc") - (data (i32.const 10588) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00x\00y\00z\00\00\00\00\00\00\00") - (data (i32.const 10620) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00x\00z\00y\00\00\00\00\00\00\00") - (data (i32.const 10652) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00y\00x\00z\00\00\00\00\00\00\00") - (data (i32.const 10684) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00y\00z\00x\00\00\00\00\00\00\00") - (data (i32.const 10716) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00z\00x\00y\00\00\00\00\00\00\00") - (data (i32.const 10748) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00(\00\00\00U\00n\00k\00n\00o\00w\00n\00 \00a\00n\00g\00l\00e\00 \00o\00r\00d\00e\00r\00 \00\00\00\00\00") - (data (i32.const 10812) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00 \00\00\00a\00s\00s\00e\00m\00b\00l\00y\00/\00q\00u\00a\00t\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 10876) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00q\00u\00a\00t\00(\00\00\00") - (data (i32.const 10908) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00q\00u\00a\00t\002\00(\00") - (data (i32.const 10940) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00v\00e\00c\002\00(\00\00\00") - (data (i32.const 10972) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 11004) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 11036) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00\00\00") - (data (i32.const 11084) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 11116) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 11148) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 11180) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 11212) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00v\00e\00c\003\00(\00\00\00") - (data (i32.const 11244) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00v\00e\00c\004\00(\00\00\00") - (data (i32.const 11280) "\1d\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\1a\00\00\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\02A\00\00\00\00\00\00\02\t\00\00\00\00\00\00 \00\00\00\00\00\00\00\02\1a\00\00\00\00\00\00") + (data (i32.const 2124) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00n\00u\00m\00b\00e\00r\00") + (data (i32.const 2156) "\1c\00\00\00\00\00\00\00\00\00\00\00\0e\00\00\00\08\00\00\00(\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2188) "\1c\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\08\00\00\00)\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2220) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00*\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2252) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00+\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2284) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00,\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2316) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00-\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2348) "\1c\00\00\00\00\00\00\00\00\00\00\00\07\00\00\00\08\00\00\00.\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2380) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00/\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2412) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\000\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2444) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\001\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2476) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\002\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2508) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\003\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2540) "\1c\00\00\00\00\00\00\00\00\00\00\00\07\00\00\00\08\00\00\004\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2572) "\1c\00\00\00\00\00\00\00\00\00\00\00\n\00\00\00\08\00\00\005\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2604) "\1c\00\00\00\00\00\00\00\00\00\00\00\t\00\00\00\08\00\00\006\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2636) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\007\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2668) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\008\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2700) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00&\00\00\00N\00o\00t\00 \00i\00m\00p\00l\00e\00m\00e\00n\00t\00e\00d\00 \00y\00e\00t\00\00\00\00\00\00\00") + (data (i32.const 2764) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00$\00\00\00a\00s\00s\00e\00m\00b\00l\00y\00/\00c\00o\00m\00m\00o\00n\00.\00t\00s\00\00\00\00\00\00\00\00\00") + (data (i32.const 2828) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00m\00a\00t\002\00(\00\00\00") + (data (i32.const 2860) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\000\00.\000\00\00\00\00\00\00\00") + (data (i32.const 2892) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00N\00a\00N\00\00\00\00\00\00\00") + (data (i32.const 2924) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\12\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2972) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\00I\00n\00f\00i\00n\00i\00t\00y\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 3024) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 3080) "\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\9a\ec\ef?\d1f\87\10z^\90\bc\85\7fn\e8\15\e3\ef?\13\f6g5R\d2\8c\be\ef?m{\83]\a6\9a\97<\0f\89\f9lX\b5\ef?\fc\ef\fd\92\1a\b5\8e<\f7Gr+\92\ac\ef?\d1\9c/p=\be><\a2\d1\d32\ec\a3\ef?\0bn\90\894\03j\bc\1b\d3\fe\aff\9b\ef?\0e\bd/*RV\95\bcQ[\12\d0\01\93\ef?U\eaN\8c\ef\80P\bc\cc1l\c0\bd\8a\ef?\16\f4\d5\b9#\c9\91\bc\e0-\a9\ae\9a\82\ef?\afU\\\e9\e3\d3\80\f7\ec\9a<\aa\b9h1\87T\ef?\9d8\86\cb\82\e7\8f\bc\1d\d9\fc\"PM\ef?\8d\c3\a6DAo\8a<\d6\8cb\88;F\ef?}\04\e4\b0\05z\80<\96\dc}\91I?\ef?\94\a8\a8\e3\fd\8e\96<8bunz8\ef?}Ht\f2\18^\87\a9\af\0c\ef?\b6\ab\b0MuM\83<\15\b71\n\fe\06\ef?Lt\ac\e2\01B\86<1\d8L\fcp\01\ef?J\f8\d3]9\dd\8f<\ff\16d\b2\08\fc\ee?\04[\8e;\80\a3\86\bc\f1\9f\92_\c5\f6\ee?hPK\cc\edJ\92\bc\cb\a9:7\a7\f1\ee?\8e-Q\1b\f8\07\99\bcf\d8\05m\ae\ec\ee?\d26\94>\e8\d1q\bc\f7\9f\e54\db\e7\ee?\15\1b\ce\b3\19\19\99\bc\e5\a8\13\c3-\e3\ee?mL*\a7H\9f\85<\"4\12L\a6\de\ee?\8ai(z`\12\93\bc\1c\80\ac\04E\da\ee?[\89\17H\8f\a7X\bc*.\f7!\n\d6\ee?\1b\9aIg\9b,|\bc\97\a8P\d9\f5\d1\ee?\11\ac\c2`\edcC<-\89a`\08\ce\ee?\efd\06;\tf\96Z~d\1fx\bct_\ec\e8u\9f\ee?\b0}\8b\c0J\ee\86\bct\81\a5H\9a\9f\ee?\8a\e6U\1e2\19\86\bc\c9gBV\eb\9f\ee?\d3\d4\t^\cb\9c\90T\'\a4\ee?47;\f1\b6i\93\bc\13\ceL\99\89\a5\ee?\1e\ff\19:\84^\80\bc\ad\c7#F\1a\a7\ee?nWr\d8P\d4\94\bc\ed\92D\9b\d9\a8\ee?\00\8a\0e[g\ad\90<\99f\8a\d9\c7\aa\ee?\b4\ea\f0\c1/\b7\8d<\db\a0*B\e5\ac\ee?\ff\e7\c5\9c`\b6e\bc\8cD\b5\162\af\ee?D_\f3Y\83\f6{<6w\15\99\ae\b1\ee?\83=\1e\a7\1f\t\93\bc\c6\ff\91\0b[\b4\ee?)\1el\8b\b8\a9]\bc\e5\c5\cd\b07\b7\ee?Y\b9\90|\f9#l\bc\0fR\c8\cbD\ba\ee?\aa\f9\f4\"CC\92\bcPN\de\9f\82\bd\ee?K\8ef\d7l\ca\85\bc\ba\07\cap\f1\c0\ee?\'\ce\91+\fc\afq<\90\f0\a3\82\91\c4\ee?\bbs\n\e15\d2m<##\e3\19c\c8\ee?c\"b\"\04\c5\87\bce\e5]{f\cc\ee?\d51\e2\e3\86\1c\8b<3-J\ec\9b\d0\ee?\15\bb\bc\d3\d1\bb\91\bc]%>\b2\03\d5\ee?\d21\ee\9c1\cc\90\b4\07!\d5\82\bc_\9b{3\97|\ef?\c9\0dG;\b9*\89\bc)\a1\f5\14F\86\ef?\d3\88:`\04\b6t<\f6?\8b\e7.\90\ef?qr\9dQ\ec\c5\83<\83L\c7\fbQ\9a\ef?\f0\91\d3\8f\12\f7\8f\bc\da\90\a4\a2\af\a4\ef?}t#\e2\98\ae\8d\bc\f1g\8e-H\af\ef?\08 \aaA\bc\c3\8e<\'Za\ee\1b\ba\ef?2\eb\a9\c3\94+\84<\97\bak7+\c5\ef?\ee\85\d11\a9d\8a<@En[v\d0\ef?\ed\e3;\e4\ba7\8e\bc\14\be\9c\ad\fd\db\ef?\9d\cd\91M;\89w<\d8\90\9e\81\c1\e7\ef?\89\cc`A\c1\05S<\f1q\8f+\c2\f3\ef?") + (data (i32.const 6640) "\9f\de\e0\c3\f04\f7?\00\90\e6y\7f\cc\d7\bf\1f\e9,jx\13\f7?\00\00\0d\c2\eeo\d7\bf\a0\b5\fa\08`\f2\f6?\00\e0Q\13\e3\13\d7\bf}\8c\13\1f\a6\d1\f6?\00x(8[\b8\d6\bf\d1\b4\c5\0bI\b1\f6?\00x\80\90U]\d6\bf\ba\0c/3G\91\f6?\00\00\18v\d0\02\d6\bf#B\"\18\9fq\f6?\00\90\90\86\ca\a8\d5\bf\d9\1e\a5\99OR\f6?\00P\03VCO\d5\bf\c4$\8f\aaV3\f6?\00@k\c37\f6\d4\bf\14\dc\9dk\b3\14\f6?\00P\a8\fd\a7\9d\d4\bfL\\\c6Rd\f6\f5?\00\a8\899\92E\d4\bfO,\91\b5g\d8\f5?\00\b8\b09\f4\ed\d3\bf\de\90[\cb\bc\ba\f5?\00p\8fD\ce\96\d3\bfx\1a\d9\f2a\9d\f5?\00\a0\bd\17\1e@\d3\bf\87VF\12V\80\f5?\00\80F\ef\e2\e9\d2\bf\d3k\e7\ce\97c\f5?\00\e008\1b\94\d2\bf\93\7f\a7\e2%G\f5?\00\88\da\8c\c5>\d2\bf\83E\06B\ff*\f5?\00\90\')\e1\e9\d1\bf\df\bd\b2\db\"\0f\f5?\00\f8H+m\95\d1\bf\d7\de4G\8f\f3\f4?\00\f8\b9\9agA\d1\bf@(\de\cfC\d8\f4?\00\98\ef\94\d0\ed\d0\bf\c8\a3x\c0>\bd\f4?\00\10\db\18\a5\9a\d0\bf\8a%\e0\c3\7f\a2\f4?\00\b8cR\e6G\d0\bf4\84\d4$\05\88\f4?\00\f0\86E\"\eb\cf\bf\0b-\19\1b\cem\f4?\00\b0\17uJG\cf\bfT\189\d3\d9S\f4?\000\10=D\a4\ce\bfZ\84\b4D\':\f4?\00\b0\e9D\0d\02\ce\bf\fb\f8\15A\b5 \f4?\00\f0w)\a2`\cd\bf\b1\f4>\da\82\07\f4?\00\90\95\04\01\c0\cc\bf\8f\feW]\8f\ee\f3?\00\10\89V) \cc\bf\e9L\0b\a0\d9\d5\f3?\00\10\81\8d\17\81\cb\bf+\c1\10\c0`\bd\f3?\00\d0\d3\cc\c9\e2\ca\bf\b8\dau+$\a5\f3?\00\90\12.@E\ca\bf\02\d0\9f\cd\"\8d\f3?\00\f0\1dhw\a8\c9\bf\1cz\84\c5[u\f3?\000Him\0c\c9\bf\e26\adI\ce]\f3?\00\c0E\a6 q\c8\bf@\d4M\98yF\f3?\000\14\b4\8f\d6\c7\bf$\cb\ff\ce\\/\f3?\00pb<\b8<\c7\bfI\0d\a1uw\18\f3?\00`7\9b\9a\a3\c6\bf\909>7\c8\01\f3?\00\a0\b7T1\0b\c6\bfA\f8\95\bbN\eb\f2?\000$v}s\c5\bf\d1\a9\19\02\n\d5\f2?\000\c2\8f{\dc\c4\bf*\fd\b7\a8\f9\be\f2?\00\00\d2Q,F\c4\bf\ab\1b\0cz\1c\a9\f2?\00\00\83\bc\8a\b0\c3\bf0\b5\14`r\93\f2?\00\00Ik\99\1b\c3\bf\f5\a1WW\fa}\f2?\00@\a4\90T\87\c2\bf\bf;\1d\9b\b3h\f2?\00\a0y\f8\b9\f3\c1\bf\bd\f5\8f\83\9dS\f2?\00\a0,%\c8`\c1\bf;\08\c9\aa\b7>\f2?\00 \f7W\7f\ce\c0\bf\b6@\a9+\01*\f2?\00\a0\feI\dc<\c0\bf2A\cc\96y\15\f2?\00\80K\bc\bdW\bf\bf\9b\fc\d2\1d \01\f2?\00@@\96\087\be\bf\0bHMI\f4\ec\f1?\00@\f9>\98\17\bd\bfie\8fR\f5\d8\f1?\00\a0\d8Ng\f9\bb\bf|~W\11#\c5\f1?\00`/ y\dc\ba\bf\e9&\cbt|\b1\f1?\00\80(\e7\c3\c0\b9\bf\b6\1a,\0c\01\9e\f1?\00\c0r\b3F\a6\b8\bf\bdp\b6{\b0\8a\f1?\00\00\ac\b3\01\8d\b7\bf\b6\bc\ef%\8aw\f1?\00\008E\f1t\b6\bf\da1L5\8dd\f1?\00\80\87m\0e^\b5\bf\dd_\'\90\b9Q\f1?\00\e0\a1\de\\H\b4\bfL\d22\a4\0e?\f1?\00\a0jM\d93\b3\bf\da\f9\10r\8b,\f1?\00`\c5\f8y \b2\bf1\b5\ec(0\1a\f1?\00 b\98F\0e\b1\bf\af4\84\da\fb\07\f1?\00\00\d2jl\fa\af\bf\b3kN\0f\ee\f5\f0?\00@wJ\8d\da\ad\bf\ce\9f*]\06\e4\f0?\00\00\85\e4\ec\bc\ab\bf!\a5,cD\d2\f0?\00\c0\12@\89\a1\a9\bf\1a\98\e2|\a7\c0\f0?\00\c0\023X\88\a7\bf\d16\c6\83/\af\f0?\00\80\d6g^q\a5\bf9\13\a0\98\db\9d\f0?\00\80eI\8a\\\a3\bf\df\e7R\af\ab\8c\f0?\00@\15d\e3I\a1\bf\fb(N/\9f{\f0?\00\80\eb\82\c0r\9e\bf\19\8f5\8c\b5j\f0?\00\80RR\f1U\9a\bf,\f9\ec\a5\eeY\f0?\00\80\81\cfb=\96\bf\90,\d1\cdII\f0?\00\00\aa\8c\fb(\92\bf\a9\ad\f0\c6\c68\f0?\00\00\f9 {1\8c\bf\a92y\13e(\f0?\00\00\aa]5\19\84\bfHs\ea\'$\18\f0?\00\00\ec\c2\03\12x\bf\95\b1\14\06\04\08\f0?\00\00$y\t\04`\bf\1a\fa&\f7\1f\e0\ef?\00\00\90\84\f3\efo?t\eaa\c2\1c\a1\ef?\00\00=5A\dc\87?.\99\81\b0\10c\ef?\00\80\c2\c4\a3\ce\93?\cd\ad\ee<\f6%\ef?\00\00\89\14\c1\9f\9b?\e7\13\91\03\c8\e9\ee?\00\00\11\ce\d8\b0\a1?\ab\b1\cbx\80\ae\ee?\00\c0\01\d0[\8a\a5?\9b\0c\9d\a2\1at\ee?\00\80\d8@\83\\\a9?\b5\99\n\83\91:\ee?\00\80W\efj\'\ad?V\9a`\t\e0\01\ee?\00\c0\98\e5\98u\b0?\98\bbw\e5\01\ca\ed?\00 \0d\e3\f5S\b2?\03\91|\0b\f2\92\ed?\00\008\8b\dd.\b4?\ce\\\fbf\ac\\\ed?\00\c0W\87Y\06\b6?\9d\de^\aa,\'\ed?\00\00j5v\da\b7?\cd,k>n\f2\ec?\00`\1cNC\ab\b9?\02y\a7\a2m\be\ec?\00`\0d\bb\c7x\bb?m\087m&\8b\ec?\00 \e72\13C\bd?\04X]\bd\94X\ec?\00`\deq1\n\bf?\8c\9f\bb3\b5&\ec?\00@\91+\15g\c0??\e7\ec\ee\83\f5\eb?\00\b0\92\82\85G\c1?\c1\96\dbu\fd\c4\eb?\000\ca\cdn&\c2?(J\86\0c\1e\95\eb?\00P\c5\a6\d7\03\c3?,>\ef\c5\e2e\eb?\00\103<\c3\df\c3?\8b\88\c9gH7\eb?\00\80zk6\ba\c4?J0\1d!K\t\eb?\00\f0\d1(9\93\c5?~\ef\f2\85\e8\db\ea?\00\f0\18$\cdj\c6?\a2=`1\1d\af\ea?\00\90f\ec\f8@\c7?\a7X\d3?\e6\82\ea?\00\f0\1a\f5\c0\15\c8?\8bs\t\ef@W\ea?\00\80\f6T)\e9\c8?\'K\ab\90*,\ea?\00@\f8\026\bb\c9?\d1\f2\93\13\a0\01\ea?\00\00,\1c\ed\8b\ca?\1b<\db$\9f\d7\e9?\00\d0\01\\Q[\cb?\90\b1\c7\05%\ae\e9?\00\c0\bc\ccg)\cc?/\ce\97\f2.\85\e9?\00`H\d55\f6\cc?uK\a4\ee\ba\\\e9?\00\c0F4\bd\c1\cd?8H\e7\9d\c64\e9?\00\e0\cf\b8\01\8c\ce?\e6Rg/O\0d\e9?\00\90\17\c0\tU\cf?\9d\d7\ff\8eR\e6\e8?\00\b8\1f\12l\0e\d0?|\00\cc\9f\ce\bf\e8?\00\d0\93\0e\b8q\d0?\0e\c3\be\da\c0\99\e8?\00p\86\9ek\d4\d0?\fb\17#\aa\'t\e8?\00\d0K3\876\d1?\08\9a\b3\ac\00O\e8?\00H#g\0d\98\d1?U>e\e8I*\e8?\00\80\cc\e0\ff\f8\d1?`\02\f4\95\01\06\e8?\00hc\d7_Y\d2?)\a3\e0c%\e2\e7?\00\a8\14\t0\b9\d2?\ad\b5\dcw\b3\be\e7?\00`C\10r\18\d3?\c2%\97g\aa\9b\e7?\00\18\ecm&w\d3?W\06\17\f2\07y\e7?\000\af\fbO\d5\d3?\0c\13\d6\db\caV\e7?\00\e0/\e3\ee2\d4?") + (data (i32.const 8688) "k\b6O\01\00\10\e6?<[B\91l\02~<\95\b4M\03\000\e6?A]\00H\ea\bf\8d\f6\05\eb\ff\ef\e6?S-\e2\1a\04\80~\bc\80\97\86\0e\00\10\e7?Ry\tqf\ff{<\12\e9g\fc\ff/\e7?$\87\bd&\e2\00\8c\89<\b9{F\13\000\e9?v\02\98KN\80\7f.\98\dd\ff\af\e9?7\93Z\8a\e0@\87\bcf\fbI\ed\ff\cf\e9?\00\e0\9b\c1\08\ce?O*\00\b0\ea?_?\ff<\04\fdi\bc\d1\1e\ae\d7\ff\cf\ea?\b4p\90\12\e7>\82\bcx\04Q\ee\ff\ef\ea?\a3\de\0e\e0>\06j<[\0de\db\ff\0f\eb?\b9\n\1f8\c8\06ZO\86\d0E\ff\8a<@\16\87\f9\ff\8f\eb?\f9\c3\c2\96w\fe|\f0\0f\00\f0\f4?\1cS\85\0b\89\7f\97<\d1K\dc\12\00\10\f5?6\a4fqe\04`\c9\03\00\b0\f5?\c0\0c\bf\n\08A\9f\bc\bc\19I\1d\00\d0\f5?)G%\fb*\81\98\bc\89z\b8\e7\ff\ef\f5?\04i\ed\80\b7~\94\bc") + (data (i32.const 10748) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00x\00y\00z\00\00\00\00\00\00\00") + (data (i32.const 10780) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00x\00z\00y\00\00\00\00\00\00\00") + (data (i32.const 10812) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00y\00x\00z\00\00\00\00\00\00\00") + (data (i32.const 10844) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00y\00z\00x\00\00\00\00\00\00\00") + (data (i32.const 10876) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00z\00x\00y\00\00\00\00\00\00\00") + (data (i32.const 10908) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00(\00\00\00U\00n\00k\00n\00o\00w\00n\00 \00a\00n\00g\00l\00e\00 \00o\00r\00d\00e\00r\00 \00\00\00\00\00") + (data (i32.const 10972) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00 \00\00\00a\00s\00s\00e\00m\00b\00l\00y\00/\00q\00u\00a\00t\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 11036) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00q\00u\00a\00t\00(\00\00\00") + (data (i32.const 11068) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00q\00u\00a\00t\002\00(\00") + (data (i32.const 11100) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00v\00e\00c\002\00(\00\00\00") + (data (i32.const 11132) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 11164) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 11196) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00\00\00") + (data (i32.const 11244) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 11276) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 11308) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 11340) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 11372) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00v\00e\00c\003\00(\00\00\00") + (data (i32.const 11404) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00v\00e\00c\004\00(\00\00\00") + (data (i32.const 11440) "\1d\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\1a\00\00\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00 \00\00\00\00\00\00\00\02A\00\00\00\00\00\00\02\t\00\00\00\00\00\00 \00\00\00\00\00\00\00\02\1a\00\00\00\00\00\00") (table $0 57 funcref) (elem (i32.const 1) $~lib/math/NativeMath.random $assembly/mat2d/multiply $assembly/mat2d/subtract $assembly/vec3/subtract $assembly/vec3/multiply $assembly/vec3/divide $assembly/vec3/distance $assembly/vec3/squaredDistance $assembly/vec3/length $assembly/vec3/squaredLength $start:assembly/vec3~anonymous|0~anonymous|0 $start:assembly/vec3~anonymous|0 $assembly/vec4/subtract $assembly/vec4/multiply $assembly/vec4/divide $assembly/vec4/distance $assembly/vec4/squaredDistance $assembly/vec4/length $assembly/vec4/squaredLength $start:assembly/vec4~anonymous|0~anonymous|0 $start:assembly/vec4~anonymous|0 $assembly/vec4/clone $assembly/vec4/fromValues $assembly/vec4/copy $assembly/vec4/set $assembly/vec4/add $assembly/quat/multiply $assembly/vec4/scale $assembly/vec4/dot $assembly/vec4/lerp $assembly/vec4/normalize $assembly/vec4/exactEquals $start:assembly/quat~anonymous|0~anonymous|0 $start:assembly/quat~anonymous|0 $start:assembly/quat~anonymous|1~anonymous|0 $start:assembly/quat~anonymous|1 $start:assembly/quat~anonymous|2~anonymous|0 $start:assembly/quat~anonymous|2 $assembly/quat2/multiply $assembly/mat4/perspectiveNO $assembly/mat4/orthoNO $assembly/mat4/multiply $assembly/mat4/subtract $assembly/mat3/multiply $assembly/mat3/subtract $assembly/vec2/length $assembly/vec2/subtract $assembly/vec2/multiply $assembly/vec2/divide $assembly/vec2/distance $assembly/vec2/squaredDistance $assembly/vec2/squaredLength $start:assembly/vec2~anonymous|0~anonymous|0 $start:assembly/vec2~anonymous|0 $assembly/mat2/multiply $assembly/mat2/subtract) (global $assembly/common/EPSILON f64 (f64.const 1e-06)) @@ -245,23 +248,23 @@ (global $assembly/quat2/len i32 (i32.const 1232)) (global $assembly/quat2/squaredLength i32 (i32.const 1264)) (global $assembly/quat2/sqrLen i32 (i32.const 1264)) - (global $assembly/mat4/perspective i32 (i32.const 2144)) - (global $assembly/mat4/ortho i32 (i32.const 2176)) - (global $assembly/mat4/mul i32 (i32.const 2208)) - (global $assembly/mat4/sub i32 (i32.const 2240)) - (global $assembly/mat3/mul i32 (i32.const 2272)) - (global $assembly/mat3/sub i32 (i32.const 2304)) - (global $assembly/vec2/len i32 (i32.const 2336)) - (global $assembly/vec2/sub i32 (i32.const 2368)) - (global $assembly/vec2/mul i32 (i32.const 2400)) - (global $assembly/vec2/div i32 (i32.const 2432)) - (global $assembly/vec2/dist i32 (i32.const 2464)) - (global $assembly/vec2/sqrDist i32 (i32.const 2496)) - (global $assembly/vec2/sqrLen i32 (i32.const 2528)) + (global $assembly/mat4/perspective i32 (i32.const 2176)) + (global $assembly/mat4/ortho i32 (i32.const 2208)) + (global $assembly/mat4/mul i32 (i32.const 2240)) + (global $assembly/mat4/sub i32 (i32.const 2272)) + (global $assembly/mat3/mul i32 (i32.const 2304)) + (global $assembly/mat3/sub i32 (i32.const 2336)) + (global $assembly/vec2/len i32 (i32.const 2368)) + (global $assembly/vec2/sub i32 (i32.const 2400)) + (global $assembly/vec2/mul i32 (i32.const 2432)) + (global $assembly/vec2/div i32 (i32.const 2464)) + (global $assembly/vec2/dist i32 (i32.const 2496)) + (global $assembly/vec2/sqrDist i32 (i32.const 2528)) + (global $assembly/vec2/sqrLen i32 (i32.const 2560)) (global $assembly/vec2/vec (mut i32) (i32.const 0)) (global $assembly/vec2/forEach (mut i32) (i32.const 0)) - (global $assembly/mat2/mul i32 (i32.const 2624)) - (global $assembly/mat2/sub i32 (i32.const 2656)) + (global $assembly/mat2/mul i32 (i32.const 2656)) + (global $assembly/mat2/sub i32 (i32.const 2688)) (global $~lib/util/number/_frc_plus (mut i64) (i64.const 0)) (global $~lib/util/number/_frc_minus (mut i64) (i64.const 0)) (global $~lib/util/number/_exp (mut i32) (i32.const 0)) @@ -269,10 +272,10 @@ (global $~lib/util/number/_frc_pow (mut i64) (i64.const 0)) (global $~lib/util/number/_exp_pow (mut i32) (i32.const 0)) (global $assembly/mat4/Fov i32 (i32.const 27)) - (global $~lib/rt/__rtti_base i32 (i32.const 11280)) - (global $~lib/memory/__data_end i32 (i32.const 11516)) - (global $~lib/memory/__stack_pointer (mut i32) (i32.const 27900)) - (global $~lib/memory/__heap_base i32 (i32.const 27900)) + (global $~lib/rt/__rtti_base i32 (i32.const 11440)) + (global $~lib/memory/__data_end i32 (i32.const 11676)) + (global $~lib/memory/__stack_pointer (mut i32) (i32.const 28060)) + (global $~lib/memory/__heap_base i32 (i32.const 28060)) (export "glMatrix.EPSILON" (global $assembly/common/EPSILON)) (export "glMatrix.RANDOM" (global $assembly/common/RANDOM)) (export "glMatrix.ANGLE_ORDER" (global $assembly/common/ANGLE_ORDER)) @@ -359,6 +362,7 @@ (export "vec4.forEach" (global $assembly/vec4/forEach)) (export "memory" (memory $0)) (export "__setArgumentsLength" (func $~setArgumentsLength)) + (export "glMatrix.setMatrixArrayType" (func $export:assembly/common/setMatrixArrayType)) (export "mat2.clone" (func $export:assembly/mat2/clone)) (export "mat2.copy" (func $export:assembly/mat2/copy)) (export "mat2.identity" (func $export:assembly/mat2/identity)) @@ -7613,7 +7617,7 @@ i32.sub call $~lib/math/tan_kern ) - (func $assembly/mat4/perspectiveNO (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) + (func $assembly/mat4/perspectiveNO (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (result i32) (local $5 f64) (local $6 f64) f64.const 1 @@ -7682,11 +7686,12 @@ f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $4 - i32.const 0 - i32.ne + drop + i32.const 2144 + i32.const 2144 + i32.eq if (result i32) local.get $4 - f64.convert_i32_u f64.const inf f64.ne else @@ -7697,14 +7702,12 @@ f64.convert_i32_s local.get $3 local.get $4 - f64.convert_i32_u f64.sub f64.div local.set $6 local.get $0 i32.const 10 local.get $4 - f64.convert_i32_u local.get $3 f64.add local.get $6 @@ -7714,7 +7717,6 @@ i32.const 14 f64.const 2 local.get $4 - f64.convert_i32_u f64.mul local.get $3 f64.mul @@ -9131,7 +9133,7 @@ f64.add ) (func $start:assembly/vec2~anonymous|0 (result i32) - i32.const 2560 + i32.const 2592 ) (func $start:assembly/vec2 call $start:assembly/mat3 @@ -9139,7 +9141,7 @@ global.set $assembly/vec2/vec i32.const 0 global.set $~argumentsLength - i32.const 2592 + i32.const 2624 i32.load call_indirect $0 (type $none_=>_i32) global.set $assembly/vec2/forEach @@ -9276,6 +9278,14 @@ (func $start:assembly/index.as call $start:assembly/mat2 ) + (func $assembly/common/setMatrixArrayType (param $0 i32) + i32.const 2720 + i32.const 2784 + i32.const 20 + i32.const 3 + call $~lib/builtins/abort + unreachable + ) (func $assembly/common/toRadian (param $0 f64) (result f64) local.get $0 global.get $assembly/common/degree @@ -10042,7 +10052,7 @@ local.set $22 local.get $18 local.set $21 - i32.const 3792 + i32.const 3952 local.get $13 i32.const 2 i32.shl @@ -10183,7 +10193,7 @@ i32.add global.set $~lib/util/number/_K local.get $10 - i32.const 3792 + i32.const 3952 i32.const 0 local.get $13 i32.sub @@ -11564,14 +11574,14 @@ i32.const 100 i32.rem_u local.set $7 - i32.const 3832 + i32.const 3992 local.get $6 i32.const 2 i32.shl i32.add i64.load32_u local.set $8 - i32.const 3832 + i32.const 3992 local.get $7 i32.const 2 i32.shl @@ -11614,7 +11624,7 @@ i32.const 2 i32.sub local.set $2 - i32.const 3832 + i32.const 3992 local.get $10 i32.const 2 i32.shl @@ -11637,7 +11647,7 @@ i32.const 2 i32.sub local.set $2 - i32.const 3832 + i32.const 3992 local.get $1 i32.const 2 i32.shl @@ -12157,14 +12167,14 @@ i32.shl i32.sub global.set $~lib/util/number/_K - i32.const 2920 + i32.const 3080 local.get $14 i32.const 3 i32.shl i32.add i64.load global.set $~lib/util/number/_frc_pow - i32.const 3616 + i32.const 3776 local.get $14 i32.const 1 i32.shl @@ -21401,7 +21411,7 @@ call $~lib/typedarray/Float64Array#__set local.get $0 ) - (func $assembly/mat4/perspectiveZO (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) + (func $assembly/mat4/perspectiveZO (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (result i32) (local $5 f64) (local $6 f64) f64.const 1 @@ -21470,11 +21480,12 @@ f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $4 - i32.const 0 - i32.ne + drop + i32.const 2144 + i32.const 2144 + i32.eq if (result i32) local.get $4 - f64.convert_i32_u f64.const inf f64.ne else @@ -21485,21 +21496,18 @@ f64.convert_i32_s local.get $3 local.get $4 - f64.convert_i32_u f64.sub f64.div local.set $6 local.get $0 i32.const 10 local.get $4 - f64.convert_i32_u local.get $6 f64.mul call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 14 local.get $4 - f64.convert_i32_u local.get $3 f64.mul local.get $6 @@ -24130,7 +24138,7 @@ i64.sub i64.shl local.set $9 - i32.const 4432 + i32.const 4592 local.get $8 i32.const 3 i32.shl @@ -24138,7 +24146,7 @@ i64.load f64.reinterpret_i64 local.set $10 - i32.const 4432 + i32.const 4592 local.get $8 i32.const 3 i32.shl @@ -25161,7 +25169,7 @@ i64.and i64.sub local.set $16 - i32.const 6480 + i32.const 6640 local.get $14 i32.const 1 i32.const 3 @@ -25170,7 +25178,7 @@ i32.add f64.load local.set $11 - i32.const 6480 + i32.const 6640 local.get $14 i32.const 1 i32.const 3 @@ -25182,7 +25190,7 @@ local.get $16 f64.reinterpret_i64 local.set $9 - i32.const 8528 + i32.const 8688 local.get $14 i32.const 1 i32.const 3 @@ -25191,7 +25199,7 @@ i32.add f64.load local.set $8 - i32.const 8528 + i32.const 8688 local.get $14 i32.const 1 i32.const 3 @@ -30564,7 +30572,7 @@ i32.gt_u if i32.const 560 - i32.const 11056 + i32.const 11216 i32.const 14 i32.const 48 call $~lib/builtins/abort @@ -30637,7 +30645,7 @@ i32.lt_s if i32.const 144 - i32.const 11056 + i32.const 11216 i32.const 108 i32.const 22 call $~lib/builtins/abort @@ -30668,7 +30676,7 @@ i32.ge_u if i32.const 144 - i32.const 11056 + i32.const 11216 i32.const 92 i32.const 42 call $~lib/builtins/abort @@ -32360,17 +32368,6 @@ local.get $1 call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>#__visit ) - (func $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cusize%29=>~lib/typedarray/Float64Array>#__visit (param $0 i32) (param $1 i32) - local.get $0 - i32.load offset=4 - local.get $1 - call $~lib/rt/itcms/__visit - ) - (func $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cusize%29=>~lib/typedarray/Float64Array>~visit (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - call $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cusize%29=>~lib/typedarray/Float64Array>#__visit - ) (func $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array>#__visit (param $0 i32) (param $1 i32) local.get $0 i32.load offset=4 @@ -32464,8 +32461,8 @@ block $assembly/mat4/Fov block $~lib/array/Array block $~lib/array/Array<~lib/typedarray/Float64Array> - block $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array> - block $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cusize%29=>~lib/typedarray/Float64Array> + block $~lib/object/Object + block $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array> block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> block $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> @@ -32493,7 +32490,7 @@ i32.const 8 i32.sub i32.load - br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/arraybuffer/ArrayBufferView $~lib/function/Function<%28%29=>f64> $~lib/typedarray/Float64Array $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>f64> $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>f64> $assembly/imports/IArguments $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28f64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>bool> $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cusize%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/array/Array<~lib/typedarray/Float64Array> $~lib/array/Array $assembly/mat4/Fov $~lib/array/Array $invalid + br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/arraybuffer/ArrayBufferView $~lib/function/Function<%28%29=>f64> $~lib/typedarray/Float64Array $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>f64> $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>f64> $assembly/imports/IArguments $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28f64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>bool> $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/object/Object $~lib/array/Array<~lib/typedarray/Float64Array> $~lib/array/Array $assembly/mat4/Fov $~lib/array/Array $invalid end return end @@ -32603,12 +32600,9 @@ end local.get $0 local.get $1 - call $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cusize%29=>~lib/typedarray/Float64Array>~visit + call $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array>~visit return end - local.get $0 - local.get $1 - call $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array>~visit return end local.get $0 @@ -32642,8 +32636,8 @@ global.get $~lib/memory/__data_end i32.lt_s if - i32.const 27920 - i32.const 27968 + i32.const 28080 + i32.const 28128 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -33555,7 +33549,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store offset=56 - i32.const 2688 + i32.const 2848 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -33577,7 +33571,7 @@ local.get $1 i32.store offset=48 local.get $1 - i32.const 4288 + i32.const 4448 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -33605,7 +33599,7 @@ local.get $1 i32.store offset=32 local.get $1 - i32.const 4288 + i32.const 4448 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -33633,7 +33627,7 @@ local.get $1 i32.store offset=16 local.get $1 - i32.const 4288 + i32.const 4448 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -33661,7 +33655,7 @@ local.get $1 i32.store local.get $1 - i32.const 4320 + i32.const 4480 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -33718,7 +33712,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store offset=88 - i32.const 4352 + i32.const 4512 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -33740,7 +33734,7 @@ local.get $1 i32.store offset=80 local.get $1 - i32.const 4288 + i32.const 4448 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -33768,7 +33762,7 @@ local.get $1 i32.store offset=64 local.get $1 - i32.const 4288 + i32.const 4448 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -33796,7 +33790,7 @@ local.get $1 i32.store offset=48 local.get $1 - i32.const 4288 + i32.const 4448 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -33824,7 +33818,7 @@ local.get $1 i32.store offset=32 local.get $1 - i32.const 4288 + i32.const 4448 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -33852,7 +33846,7 @@ local.get $1 i32.store offset=16 local.get $1 - i32.const 4288 + i32.const 4448 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -33880,7 +33874,7 @@ local.get $1 i32.store local.get $1 - i32.const 4320 + i32.const 4480 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -33955,7 +33949,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store offset=136 - i32.const 4384 + i32.const 4544 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -33977,7 +33971,7 @@ local.get $1 i32.store offset=128 local.get $1 - i32.const 4288 + i32.const 4448 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34005,7 +33999,7 @@ local.get $1 i32.store offset=112 local.get $1 - i32.const 4288 + i32.const 4448 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34033,7 +34027,7 @@ local.get $1 i32.store offset=96 local.get $1 - i32.const 4288 + i32.const 4448 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34061,7 +34055,7 @@ local.get $1 i32.store offset=80 local.get $1 - i32.const 4288 + i32.const 4448 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34089,7 +34083,7 @@ local.get $1 i32.store offset=64 local.get $1 - i32.const 4288 + i32.const 4448 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34117,7 +34111,7 @@ local.get $1 i32.store offset=48 local.get $1 - i32.const 4288 + i32.const 4448 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34145,7 +34139,7 @@ local.get $1 i32.store offset=32 local.get $1 - i32.const 4288 + i32.const 4448 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34173,7 +34167,7 @@ local.get $1 i32.store offset=16 local.get $1 - i32.const 4288 + i32.const 4448 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34201,7 +34195,7 @@ local.get $1 i32.store local.get $1 - i32.const 4320 + i32.const 4480 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34318,7 +34312,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store offset=248 - i32.const 4416 + i32.const 4576 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34340,7 +34334,7 @@ local.get $1 i32.store offset=240 local.get $1 - i32.const 4288 + i32.const 4448 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34368,7 +34362,7 @@ local.get $1 i32.store offset=224 local.get $1 - i32.const 4288 + i32.const 4448 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34396,7 +34390,7 @@ local.get $1 i32.store offset=208 local.get $1 - i32.const 4288 + i32.const 4448 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34424,7 +34418,7 @@ local.get $1 i32.store offset=192 local.get $1 - i32.const 4288 + i32.const 4448 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34452,7 +34446,7 @@ local.get $1 i32.store offset=176 local.get $1 - i32.const 4288 + i32.const 4448 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34480,7 +34474,7 @@ local.get $1 i32.store offset=160 local.get $1 - i32.const 4288 + i32.const 4448 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34508,7 +34502,7 @@ local.get $1 i32.store offset=144 local.get $1 - i32.const 4288 + i32.const 4448 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34536,7 +34530,7 @@ local.get $1 i32.store offset=128 local.get $1 - i32.const 4288 + i32.const 4448 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34564,7 +34558,7 @@ local.get $1 i32.store offset=112 local.get $1 - i32.const 4288 + i32.const 4448 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34592,7 +34586,7 @@ local.get $1 i32.store offset=96 local.get $1 - i32.const 4288 + i32.const 4448 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34620,7 +34614,7 @@ local.get $1 i32.store offset=80 local.get $1 - i32.const 4288 + i32.const 4448 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34648,7 +34642,7 @@ local.get $1 i32.store offset=64 local.get $1 - i32.const 4288 + i32.const 4448 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34676,7 +34670,7 @@ local.get $1 i32.store offset=48 local.get $1 - i32.const 4288 + i32.const 4448 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34704,7 +34698,7 @@ local.get $1 i32.store offset=32 local.get $1 - i32.const 4288 + i32.const 4448 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34732,7 +34726,7 @@ local.get $1 i32.store offset=16 local.get $1 - i32.const 4288 + i32.const 4448 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34760,7 +34754,7 @@ local.get $1 i32.store local.get $1 - i32.const 4320 + i32.const 4480 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34826,7 +34820,7 @@ call $~lib/math/NativeMath.cos local.set $11 local.get $4 - i32.const 10608 + i32.const 10768 i32.eq if local.get $0 @@ -34887,7 +34881,7 @@ call $~lib/typedarray/Float64Array#__set else local.get $4 - i32.const 10640 + i32.const 10800 i32.eq if local.get $0 @@ -34948,7 +34942,7 @@ call $~lib/typedarray/Float64Array#__set else local.get $4 - i32.const 10672 + i32.const 10832 i32.eq if local.get $0 @@ -35009,7 +35003,7 @@ call $~lib/typedarray/Float64Array#__set else local.get $4 - i32.const 10704 + i32.const 10864 i32.eq if local.get $0 @@ -35070,7 +35064,7 @@ call $~lib/typedarray/Float64Array#__set else local.get $4 - i32.const 10736 + i32.const 10896 i32.eq if local.get $0 @@ -35191,7 +35185,7 @@ f64.add call $~lib/typedarray/Float64Array#__set else - i32.const 10768 + i32.const 10928 local.set $12 global.get $~lib/memory/__stack_pointer local.get $12 @@ -35199,7 +35193,7 @@ local.get $12 local.get $4 call $~lib/string/String.__concat - i32.const 10832 + i32.const 10992 i32.const 512 i32.const 10 call $~lib/builtins/abort @@ -35249,7 +35243,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store offset=56 - i32.const 10896 + i32.const 11056 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35271,7 +35265,7 @@ local.get $1 i32.store offset=48 local.get $1 - i32.const 4288 + i32.const 4448 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35299,7 +35293,7 @@ local.get $1 i32.store offset=32 local.get $1 - i32.const 4288 + i32.const 4448 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35327,7 +35321,7 @@ local.get $1 i32.store offset=16 local.get $1 - i32.const 4288 + i32.const 4448 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35355,7 +35349,7 @@ local.get $1 i32.store local.get $1 - i32.const 4320 + i32.const 4480 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35424,7 +35418,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store offset=120 - i32.const 10928 + i32.const 11088 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35446,7 +35440,7 @@ local.get $1 i32.store offset=112 local.get $1 - i32.const 4288 + i32.const 4448 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35474,7 +35468,7 @@ local.get $1 i32.store offset=96 local.get $1 - i32.const 4288 + i32.const 4448 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35502,7 +35496,7 @@ local.get $1 i32.store offset=80 local.get $1 - i32.const 4288 + i32.const 4448 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35530,7 +35524,7 @@ local.get $1 i32.store offset=64 local.get $1 - i32.const 4288 + i32.const 4448 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35558,7 +35552,7 @@ local.get $1 i32.store offset=48 local.get $1 - i32.const 4288 + i32.const 4448 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35586,7 +35580,7 @@ local.get $1 i32.store offset=32 local.get $1 - i32.const 4288 + i32.const 4448 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35614,7 +35608,7 @@ local.get $1 i32.store offset=16 local.get $1 - i32.const 4288 + i32.const 4448 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35642,7 +35636,7 @@ local.get $1 i32.store local.get $1 - i32.const 4320 + i32.const 4480 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35675,7 +35669,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store offset=24 - i32.const 10960 + i32.const 11120 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35697,7 +35691,7 @@ local.get $1 i32.store offset=16 local.get $1 - i32.const 4288 + i32.const 4448 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35725,7 +35719,7 @@ local.get $1 i32.store local.get $1 - i32.const 4320 + i32.const 4480 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35764,7 +35758,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store offset=40 - i32.const 11232 + i32.const 11392 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35786,7 +35780,7 @@ local.get $1 i32.store offset=32 local.get $1 - i32.const 4288 + i32.const 4448 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35814,7 +35808,7 @@ local.get $1 i32.store offset=16 local.get $1 - i32.const 4288 + i32.const 4448 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35842,7 +35836,7 @@ local.get $1 i32.store local.get $1 - i32.const 4320 + i32.const 4480 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35887,7 +35881,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store offset=56 - i32.const 11264 + i32.const 11424 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35909,7 +35903,7 @@ local.get $1 i32.store offset=48 local.get $1 - i32.const 4288 + i32.const 4448 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35937,7 +35931,7 @@ local.get $1 i32.store offset=32 local.get $1 - i32.const 4288 + i32.const 4448 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35965,7 +35959,7 @@ local.get $1 i32.store offset=16 local.get $1 - i32.const 4288 + i32.const 4448 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35993,7 +35987,7 @@ local.get $1 i32.store local.get $1 - i32.const 4320 + i32.const 4480 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -36602,7 +36596,7 @@ f64.const 0 f64.eq if - i32.const 2720 + i32.const 2880 local.set $3 global.get $~lib/memory/__stack_pointer i32.const 4 @@ -36622,7 +36616,7 @@ local.get $0 f64.ne if - i32.const 2752 + i32.const 2912 local.set $3 global.get $~lib/memory/__stack_pointer i32.const 4 @@ -36631,8 +36625,8 @@ local.get $3 return end - i32.const 2784 - i32.const 2832 + i32.const 2944 + i32.const 2992 local.get $0 f64.const 0 f64.lt @@ -36645,7 +36639,7 @@ local.get $3 return end - i32.const 2864 + i32.const 3024 local.get $0 call $~lib/util/number/dtoa_core i32.const 1 @@ -36658,7 +36652,7 @@ local.tee $2 i32.store local.get $2 - i32.const 2864 + i32.const 3024 local.get $1 call $~lib/memory/memory.copy local.get $2 @@ -36701,7 +36695,7 @@ i32.const 0 i32.eq if - i32.const 4256 + i32.const 4416 local.set $6 global.get $~lib/memory/__stack_pointer i32.const 4 @@ -38520,7 +38514,7 @@ i32.const 0 i32.const 3 i32.const 28 - i32.const 10992 + i32.const 11152 call $~lib/rt/__newArray local.tee $5 i32.store @@ -38528,7 +38522,7 @@ i32.const 0 i32.const 3 i32.const 28 - i32.const 11024 + i32.const 11184 call $~lib/rt/__newArray local.tee $6 i32.store offset=4 @@ -38655,7 +38649,7 @@ i32.const 0 i32.const 3 i32.const 28 - i32.const 11104 + i32.const 11264 call $~lib/rt/__newArray local.tee $5 i32.store @@ -38663,7 +38657,7 @@ i32.const 0 i32.const 3 i32.const 28 - i32.const 11136 + i32.const 11296 call $~lib/rt/__newArray local.tee $6 i32.store offset=4 @@ -38790,7 +38784,7 @@ i32.const 0 i32.const 3 i32.const 28 - i32.const 11168 + i32.const 11328 call $~lib/rt/__newArray local.tee $5 i32.store @@ -38798,7 +38792,7 @@ i32.const 0 i32.const 3 i32.const 28 - i32.const 11200 + i32.const 11360 call $~lib/rt/__newArray local.tee $6 i32.store offset=4 @@ -38946,6 +38940,22 @@ global.set $~lib/memory/__stack_pointer local.get $5 ) + (func $export:assembly/common/setMatrixArrayType (param $0 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/common/setMatrixArrayType + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) (func $export:assembly/mat2/clone (param $0 i32) (result i32) (local $1 i32) global.get $~lib/memory/__stack_pointer @@ -41522,7 +41532,7 @@ global.set $~lib/memory/__stack_pointer local.get $7 ) - (func $export:assembly/mat4/perspectiveNO (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) + (func $export:assembly/mat4/perspectiveNO (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (result i32) (local $5 i32) global.get $~lib/memory/__stack_pointer i32.const 4 @@ -41545,7 +41555,7 @@ global.set $~lib/memory/__stack_pointer local.get $5 ) - (func $export:assembly/mat4/perspectiveZO (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) + (func $export:assembly/mat4/perspectiveZO (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (result i32) (local $5 i32) global.get $~lib/memory/__stack_pointer i32.const 4 From 6deca796b3fc36f4684e41e789de229bf1c4b717 Mon Sep 17 00:00:00 2001 From: Huguenin-Elie Steve Date: Mon, 29 Mar 2021 20:27:33 +0200 Subject: [PATCH 15/32] optimize MathUtil library --- assembly/imports.ts | 8 ++------ assembly/mathutil.ts | 12 ++++++++++++ build/optimized.wat | 7 ++----- build/untouched.wat | 7 ++----- 4 files changed, 18 insertions(+), 16 deletions(-) create mode 100644 assembly/mathutil.ts diff --git a/assembly/imports.ts b/assembly/imports.ts index 478d8e01..d72a69c2 100644 --- a/assembly/imports.ts +++ b/assembly/imports.ts @@ -5,13 +5,9 @@ // prettier-ignore export declare namespace MathUtil { - // @ts-ignore decorator - @external("Math", "min") - function min(a: i32, b: i32, c?: i32): i32; + function min(a: i32, b: i32): i32; - // @ts-ignore decorator - @external("Math", "max") - function max(a: f64, b: f64, c?: f64): f64; + function max(a: f64, b: f64, c: f64): f64; // @ts-ignore decorator @external("Math", "hypot") diff --git a/assembly/mathutil.ts b/assembly/mathutil.ts new file mode 100644 index 00000000..ee9afc96 --- /dev/null +++ b/assembly/mathutil.ts @@ -0,0 +1,12 @@ +/// + +export namespace MathUtil { + function min(a: i32, b: i32): i32 { + return a < b ? a : b; + } + + function max(a: f64, b: f64, c: f64): f64 { + const q = Math.max(b, c) + return Math.max(a, q); + } +} diff --git a/build/optimized.wat b/build/optimized.wat index c8d0552d..b3d46166 100644 --- a/build/optimized.wat +++ b/build/optimized.wat @@ -51,8 +51,8 @@ (import "env" "seed" (func $~lib/builtins/seed (result f64))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "Math" "hypot" (func $assembly/imports/MathUtil.hypot (param f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64) (result f64))) - (import "Math" "min" (func $assembly/imports/MathUtil.min (param i32 i32 i32) (result i32))) - (import "Math" "max" (func $assembly/imports/MathUtil.max (param f64 f64 f64) (result f64))) + (import "imports" "MathUtil.min" (func $assembly/imports/MathUtil.min (param i32 i32) (result i32))) + (import "imports" "MathUtil.max" (func $assembly/imports/MathUtil.max (param f64 f64 f64) (result f64))) (memory $0 1) (data (i32.const 1036) ",") (data (i32.const 1048) "\01\00\00\00\18\00\00\00~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s") @@ -22268,7 +22268,6 @@ i32.load offset=8 i32.const 3 i32.shr_u - i32.const 0 call $assembly/imports/MathUtil.min else local.get $0 @@ -22412,7 +22411,6 @@ i32.load offset=8 i32.const 3 i32.shr_u - i32.const 0 call $assembly/imports/MathUtil.min else local.get $0 @@ -22929,7 +22927,6 @@ i32.load offset=8 i32.const 3 i32.shr_u - i32.const 0 call $assembly/imports/MathUtil.min else local.get $0 diff --git a/build/untouched.wat b/build/untouched.wat index 304ae771..8fc8c7f7 100644 --- a/build/untouched.wat +++ b/build/untouched.wat @@ -53,8 +53,8 @@ (import "env" "seed" (func $~lib/builtins/seed (result f64))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "Math" "hypot" (func $assembly/imports/MathUtil.hypot (param f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64) (result f64))) - (import "Math" "min" (func $assembly/imports/MathUtil.min (param i32 i32 i32) (result i32))) - (import "Math" "max" (func $assembly/imports/MathUtil.max (param f64 f64 f64) (result f64))) + (import "imports" "MathUtil.min" (func $assembly/imports/MathUtil.min (param i32 i32) (result i32))) + (import "imports" "MathUtil.max" (func $assembly/imports/MathUtil.max (param f64 f64 f64) (result f64))) (memory $0 1) (data (i32.const 12) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\18\00\00\00~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s\00\00\00\00\00") (data (i32.const 60) "\1c\00\00\00\00\00\00\00\00\00\00\00\03\00\00\00\08\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00") @@ -32678,7 +32678,6 @@ i32.add local.get $0 call $~lib/typedarray/Float64Array#get:length - i32.const 0 call $assembly/imports/MathUtil.min local.set $7 else @@ -32836,7 +32835,6 @@ i32.add local.get $0 call $~lib/typedarray/Float64Array#get:length - i32.const 0 call $assembly/imports/MathUtil.min local.set $7 else @@ -33420,7 +33418,6 @@ i32.add local.get $0 call $~lib/typedarray/Float64Array#get:length - i32.const 0 call $assembly/imports/MathUtil.min local.set $7 else From dc5e7daec1779c1cc440dee214a63878e324f8d0 Mon Sep 17 00:00:00 2001 From: Steve Huguenin-Elie Date: Tue, 30 Mar 2021 00:06:02 +0200 Subject: [PATCH 16/32] optimize build for speed - disable size optimization - disable assertions in production Co-authored-by: Max Graey --- asconfig.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/asconfig.json b/asconfig.json index 64054051..ad6de144 100644 --- a/asconfig.json +++ b/asconfig.json @@ -11,10 +11,10 @@ "textFile": "build/optimized.wat", "sourceMap": true, "optimizeLevel": 3, - "shrinkLevel": 1, + "shrinkLevel": 0, "converge": false, - "noAssert": false + "noAssert": true } }, "options": {} -} \ No newline at end of file +} From cca26fa929ebd79b69b71d5cefd288a1a2bca07d Mon Sep 17 00:00:00 2001 From: Huguenin-Elie Steve Date: Tue, 30 Mar 2021 01:39:49 +0200 Subject: [PATCH 17/32] fix modules in dist/index.d.ts --- assembly/imports.ts | 4 + assembly/index.d.ts | 69 + build/optimized.wat | 46855 +++++++++++++++++++++++------------------- js/types.d.ts | 94 - package.json | 2 +- utils/bundle-dts.js | 10 +- 6 files changed, 25676 insertions(+), 21358 deletions(-) create mode 100644 assembly/index.d.ts delete mode 100644 js/types.d.ts diff --git a/assembly/imports.ts b/assembly/imports.ts index d72a69c2..3242bd5a 100644 --- a/assembly/imports.ts +++ b/assembly/imports.ts @@ -4,6 +4,10 @@ // @ts-ignore // prettier-ignore +/** + * JS Importations + * @module glMatrix + */ export declare namespace MathUtil { function min(a: i32, b: i32): i32; diff --git a/assembly/index.d.ts b/assembly/index.d.ts new file mode 100644 index 00000000..52fcd586 --- /dev/null +++ b/assembly/index.d.ts @@ -0,0 +1,69 @@ +/// + +declare type IndexedCollection = Float64Array; + +// prettier-ignore +declare type mat2 = + IndexedCollection; + +// prettier-ignore +declare type mat2d = + IndexedCollection; + +// prettier-ignore +declare type mat3 = + IndexedCollection; + +// prettier-ignore +declare type mat4 = + IndexedCollection; + +declare type quat = IndexedCollection; + +// prettier-ignore +declare type quat2 = + IndexedCollection; + +declare type vec2 = IndexedCollection; +declare type vec3 = IndexedCollection; +declare type vec4 = IndexedCollection; + +// prettier-ignore +declare type ReadonlyMat2 = + IndexedCollection; + +// prettier-ignore +declare type ReadonlyMat2d = + IndexedCollection; + +// prettier-ignore +declare type ReadonlyMat3 = + IndexedCollection; + +// prettier-ignore +declare type ReadonlyMat4 = + IndexedCollection; + +// prettier-ignore +declare type ReadonlyQuat = + IndexedCollection; + +// prettier-ignore +declare type ReadonlyQuat2 = + IndexedCollection; + +declare type ReadonlyVec2 = IndexedCollection; +declare type ReadonlyVec3 = IndexedCollection; +declare type ReadonlyVec4 = + IndexedCollection; + +declare class Fov { + upDegrees: f64; + downDegrees: f64; + leftDegrees: f64; + rightDegrees: f64; + [key: string]: f64; +} + +declare interface IArguments { +} diff --git a/build/optimized.wat b/build/optimized.wat index b3d46166..ffe358b0 100644 --- a/build/optimized.wat +++ b/build/optimized.wat @@ -4,34 +4,33 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_f64_=>_i32 (func (param i32 i32 f64) (result i32))) (type $i32_=>_f64 (func (param i32) (result f64))) - (type $i32_i32_i32_f64_=>_i32 (func (param i32 i32 i32 f64) (result i32))) (type $i32_i32_=>_f64 (func (param i32 i32) (result f64))) (type $none_=>_i32 (func (result i32))) - (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) + (type $i32_i32_i32_f64_=>_i32 (func (param i32 i32 i32 f64) (result i32))) (type $none_=>_f64 (func (result f64))) - (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) + (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) + (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) (type $f64_=>_f64 (func (param f64) (result f64))) - (type $i32_f64_f64_f64_f64_f64_f64_=>_i32 (func (param i32 f64 f64 f64 f64 f64 f64) (result i32))) - (type $i32_i32_=>_none (func (param i32 i32))) - (type $i32_f64_f64_f64_f64_=>_i32 (func (param i32 f64 f64 f64 f64) (result i32))) (type $i32_=>_none (func (param i32))) - (type $i32_i32_i32_i32_i32_f64_=>_i32 (func (param i32 i32 i32 i32 i32 f64) (result i32))) - (type $none_=>_none (func)) + (type $i32_f64_f64_f64_f64_=>_i32 (func (param i32 f64 f64 f64 f64) (result i32))) + (type $i32_f64_f64_f64_f64_f64_f64_=>_i32 (func (param i32 f64 f64 f64 f64 f64 f64) (result i32))) (type $i32_f64_=>_none (func (param i32 f64))) + (type $none_=>_none (func)) + (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_i32_i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32 i32) (result i32))) + (type $i32_i32_i32_i32_i32_f64_=>_i32 (func (param i32 i32 i32 i32 i32 f64) (result i32))) (type $i32_i32_f64_=>_none (func (param i32 i32 f64))) (type $f64_=>_i32 (func (param f64) (result i32))) (type $i32_i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32) (result i32))) (type $i32_i32_f64_i32_=>_i32 (func (param i32 i32 f64 i32) (result i32))) - (type $i32_i32_f64_f64_=>_i32 (func (param i32 i32 f64 f64) (result i32))) - (type $i32_f64_i32_=>_i32 (func (param i32 f64 i32) (result i32))) (type $i32_f64_f64_=>_i32 (func (param i32 f64 f64) (result i32))) (type $i32_f64_f64_f64_i32_=>_i32 (func (param i32 f64 f64 f64 i32) (result i32))) (type $f64_f64_=>_i32 (func (param f64 f64) (result i32))) - (type $f64_f64_=>_f64 (func (param f64 f64) (result f64))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i64_=>_i32 (func (param i64) (result i32))) + (type $i32_i32_f64_f64_=>_i32 (func (param i32 i32 f64 f64) (result i32))) + (type $i32_f64_i32_=>_i32 (func (param i32 f64 i32) (result i32))) (type $i32_f64_f64_f64_=>_i32 (func (param i32 f64 f64 f64) (result i32))) (type $i32_f64_f64_f64_f64_f64_f64_f64_f64_=>_i32 (func (param i32 f64 f64 f64 f64 f64 f64 f64 f64) (result i32))) (type $i32_f64_f64_f64_f64_f64_f64_f64_f64_f64_=>_i32 (func (param i32 f64 f64 f64 f64 f64 f64 f64 f64 f64) (result i32))) @@ -44,7 +43,6 @@ (type $f64_f64_f64_f64_f64_f64_f64_f64_=>_i32 (func (param f64 f64 f64 f64 f64 f64 f64 f64) (result i32))) (type $f64_f64_f64_f64_f64_f64_f64_f64_f64_=>_i32 (func (param f64 f64 f64 f64 f64 f64 f64 f64 f64) (result i32))) (type $f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_=>_i32 (func (param f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64) (result i32))) - (type $i64_=>_i64 (func (param i64) (result i64))) (type $f64_f64_i32_=>_f64 (func (param f64 f64 i32) (result f64))) (type $f64_f64_f64_=>_f64 (func (param f64 f64 f64) (result f64))) (type $f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_=>_f64 (func (param f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64) (result f64))) @@ -54,225 +52,225 @@ (import "imports" "MathUtil.min" (func $assembly/imports/MathUtil.min (param i32 i32) (result i32))) (import "imports" "MathUtil.max" (func $assembly/imports/MathUtil.max (param f64 f64 f64) (result f64))) (memory $0 1) - (data (i32.const 1036) ",") - (data (i32.const 1048) "\01\00\00\00\18\00\00\00~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s") - (data (i32.const 1084) "\1c") - (data (i32.const 1096) "\03\00\00\00\08\00\00\00\01") - (data (i32.const 1116) "\1c") - (data (i32.const 1128) "\01\00\00\00\06\00\00\00z\00y\00x") - (data (i32.const 1148) "<") - (data (i32.const 1160) "\01\00\00\00$\00\00\00I\00n\00d\00e\00x\00 \00o\00u\00t\00 \00o\00f\00 \00r\00a\00n\00g\00e") - (data (i32.const 1212) "<") - (data (i32.const 1224) "\01\00\00\00$\00\00\00~\00l\00i\00b\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 1276) "\1c") - (data (i32.const 1288) "\05\00\00\00\08\00\00\00\02") - (data (i32.const 1308) "\1c") - (data (i32.const 1320) "\05\00\00\00\08\00\00\00\03") - (data (i32.const 1340) "\1c") - (data (i32.const 1352) "\05\00\00\00\08\00\00\00\04") - (data (i32.const 1372) "\1c") - (data (i32.const 1384) "\05\00\00\00\08\00\00\00\05") - (data (i32.const 1404) "\1c") - (data (i32.const 1416) "\05\00\00\00\08\00\00\00\06") - (data (i32.const 1436) "\1c") - (data (i32.const 1448) "\06\00\00\00\08\00\00\00\07") - (data (i32.const 1468) "\1c") - (data (i32.const 1480) "\06\00\00\00\08\00\00\00\08") - (data (i32.const 1500) "\1c") - (data (i32.const 1512) "\07\00\00\00\08\00\00\00\t") - (data (i32.const 1532) "\1c") - (data (i32.const 1544) "\07\00\00\00\08\00\00\00\n") - (data (i32.const 1564) ",") - (data (i32.const 1576) "\01\00\00\00\1c\00\00\00I\00n\00v\00a\00l\00i\00d\00 \00l\00e\00n\00g\00t\00h") - (data (i32.const 1612) "<") - (data (i32.const 1624) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 1676) "<") - (data (i32.const 1688) "\01\00\00\00(\00\00\00A\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e") - (data (i32.const 1740) "<") - (data (i32.const 1752) "\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00r\00t\00/\00i\00t\00c\00m\00s\00.\00t\00s") - (data (i32.const 1868) ",") - (data (i32.const 1880) "\01\00\00\00\14\00\00\00~\00l\00i\00b\00/\00r\00t\00.\00t\00s") - (data (i32.const 1948) "<") - (data (i32.const 1960) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s") - (data (i32.const 2012) "\1c") - (data (i32.const 2024) "\n\00\00\00\08\00\00\00\0b") - (data (i32.const 2044) "\1c") - (data (i32.const 2056) "\t\00\00\00\08\00\00\00\0c") - (data (i32.const 2076) "\1c") - (data (i32.const 2088) "\05\00\00\00\08\00\00\00\0d") - (data (i32.const 2108) "\1c") - (data (i32.const 2120) "\05\00\00\00\08\00\00\00\0e") - (data (i32.const 2140) "\1c") - (data (i32.const 2152) "\05\00\00\00\08\00\00\00\0f") - (data (i32.const 2172) "\1c") - (data (i32.const 2184) "\06\00\00\00\08\00\00\00\10") - (data (i32.const 2204) "\1c") - (data (i32.const 2216) "\06\00\00\00\08\00\00\00\11") - (data (i32.const 2236) "\1c") - (data (i32.const 2248) "\07\00\00\00\08\00\00\00\12") - (data (i32.const 2268) "\1c") - (data (i32.const 2280) "\07\00\00\00\08\00\00\00\13") - (data (i32.const 2300) "\1c") - (data (i32.const 2312) "\n\00\00\00\08\00\00\00\14") - (data (i32.const 2332) "\1c") - (data (i32.const 2344) "\t\00\00\00\08\00\00\00\15") - (data (i32.const 2364) "\1c") - (data (i32.const 2376) "\0b\00\00\00\08\00\00\00\16") - (data (i32.const 2396) "\1c") - (data (i32.const 2408) "\0c\00\00\00\08\00\00\00\17") - (data (i32.const 2428) "\1c") - (data (i32.const 2440) "\0d\00\00\00\08\00\00\00\18") - (data (i32.const 2460) "\1c") - (data (i32.const 2472) "\0e\00\00\00\08\00\00\00\19") - (data (i32.const 2492) "\1c") - (data (i32.const 2504) "\05\00\00\00\08\00\00\00\1a") - (data (i32.const 2524) "\1c") - (data (i32.const 2536) "\05\00\00\00\08\00\00\00\1b") - (data (i32.const 2556) "\1c") - (data (i32.const 2568) "\0f\00\00\00\08\00\00\00\1c") - (data (i32.const 2588) "\1c") - (data (i32.const 2600) "\06\00\00\00\08\00\00\00\1d") - (data (i32.const 2620) "\1c") - (data (i32.const 2632) "\10\00\00\00\08\00\00\00\1e") - (data (i32.const 2652) "\1c") - (data (i32.const 2664) "\0d\00\00\00\08\00\00\00\1f") - (data (i32.const 2684) "\1c") - (data (i32.const 2696) "\11\00\00\00\08\00\00\00 ") - (data (i32.const 2720) "n\83\f9\a2\00\00\00\00\d1W\'\fc)\15DN\99\95b\db\c0\dd4\f5\abcQ\feA\90C<:n$\b7a\c5\bb\de\ea.I\06\e0\d2MB\1c\eb\1d\fe\1c\92\d1\t\f55\82\e8>\a7)\b1&p\9c\e9\84D\bb.9\d6\919A~_\b4\8b_\84\9c\f49S\83\ff\97\f8\1f;(\f9\bd\8b\11/\ef\0f\98\05\de\cf~6m\1fm\nZf?FO\b7\t\cb\'\c7\ba\'u-\ea_\9e\f79\07={\f1\e5\eb\b1_\fbk\ea\92R\8aF0\03V\08]\8d\1f \bc\cf\f0\abk{\fca\91\e3\a9\1d6\f4\9a_\85\99e\08\1b\e6^\80\d8\ff\8d@h\a0\14W\15\06\061\'sM") - (data (i32.const 2924) "\1c") - (data (i32.const 2936) "\05\00\00\00\08\00\00\00!") - (data (i32.const 2956) "\1c") - (data (i32.const 2968) "\12\00\00\00\08\00\00\00\"") - (data (i32.const 2988) "\1c") - (data (i32.const 3000) "\14\00\00\00\08\00\00\00#") - (data (i32.const 3020) "\1c") - (data (i32.const 3032) "\13\00\00\00\08\00\00\00$") - (data (i32.const 3052) "\1c") - (data (i32.const 3064) "\16\00\00\00\08\00\00\00%") - (data (i32.const 3084) "\1c") - (data (i32.const 3096) "\15\00\00\00\08\00\00\00&") - (data (i32.const 3116) "\1c") - (data (i32.const 3128) "\05\00\00\00\08\00\00\00\'") - (data (i32.const 3148) "\1c") - (data (i32.const 3160) "\01\00\00\00\0c\00\00\00n\00u\00m\00b\00e\00r") - (data (i32.const 3180) "\1c") - (data (i32.const 3192) "\0e\00\00\00\08\00\00\00(") - (data (i32.const 3212) "\1c") - (data (i32.const 3224) "\17\00\00\00\08\00\00\00)") - (data (i32.const 3244) "\1c") - (data (i32.const 3256) "\05\00\00\00\08\00\00\00*") - (data (i32.const 3276) "\1c") - (data (i32.const 3288) "\05\00\00\00\08\00\00\00+") - (data (i32.const 3308) "\1c") - (data (i32.const 3320) "\05\00\00\00\08\00\00\00,") - (data (i32.const 3340) "\1c") - (data (i32.const 3352) "\05\00\00\00\08\00\00\00-") - (data (i32.const 3372) "\1c") - (data (i32.const 3384) "\07\00\00\00\08\00\00\00.") - (data (i32.const 3404) "\1c") - (data (i32.const 3416) "\05\00\00\00\08\00\00\00/") - (data (i32.const 3436) "\1c") - (data (i32.const 3448) "\05\00\00\00\08\00\00\000") - (data (i32.const 3468) "\1c") - (data (i32.const 3480) "\05\00\00\00\08\00\00\001") - (data (i32.const 3500) "\1c") - (data (i32.const 3512) "\06\00\00\00\08\00\00\002") - (data (i32.const 3532) "\1c") - (data (i32.const 3544) "\06\00\00\00\08\00\00\003") - (data (i32.const 3564) "\1c") - (data (i32.const 3576) "\07\00\00\00\08\00\00\004") - (data (i32.const 3596) "\1c") - (data (i32.const 3608) "\n\00\00\00\08\00\00\005") - (data (i32.const 3628) "\1c") - (data (i32.const 3640) "\t\00\00\00\08\00\00\006") - (data (i32.const 3660) "\1c") - (data (i32.const 3672) "\05\00\00\00\08\00\00\007") - (data (i32.const 3692) "\1c") - (data (i32.const 3704) "\05\00\00\00\08\00\00\008") - (data (i32.const 3724) "<") - (data (i32.const 3736) "\01\00\00\00&\00\00\00N\00o\00t\00 \00i\00m\00p\00l\00e\00m\00e\00n\00t\00e\00d\00 \00y\00e\00t") - (data (i32.const 3788) "<") - (data (i32.const 3800) "\01\00\00\00$\00\00\00a\00s\00s\00e\00m\00b\00l\00y\00/\00c\00o\00m\00m\00o\00n\00.\00t\00s") - (data (i32.const 3852) "\1c") - (data (i32.const 3864) "\01\00\00\00\n\00\00\00m\00a\00t\002\00(") - (data (i32.const 3884) "\1c") - (data (i32.const 3896) "\01\00\00\00\06\00\00\000\00.\000") - (data (i32.const 3916) "\1c") - (data (i32.const 3928) "\01\00\00\00\06\00\00\00N\00a\00N") + (data (i32.const 1036) "\1c") + (data (i32.const 1048) "\03\00\00\00\08\00\00\00\01") + (data (i32.const 1068) "\1c") + (data (i32.const 1080) "\01\00\00\00\06\00\00\00z\00y\00x") + (data (i32.const 1100) "<") + (data (i32.const 1112) "\01\00\00\00$\00\00\00I\00n\00d\00e\00x\00 \00o\00u\00t\00 \00o\00f\00 \00r\00a\00n\00g\00e") + (data (i32.const 1164) "<") + (data (i32.const 1176) "\01\00\00\00$\00\00\00~\00l\00i\00b\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 1228) "\1c") + (data (i32.const 1240) "\05\00\00\00\08\00\00\00\02") + (data (i32.const 1260) "\1c") + (data (i32.const 1272) "\05\00\00\00\08\00\00\00\03") + (data (i32.const 1292) "\1c") + (data (i32.const 1304) "\05\00\00\00\08\00\00\00\04") + (data (i32.const 1324) "\1c") + (data (i32.const 1336) "\05\00\00\00\08\00\00\00\05") + (data (i32.const 1356) "\1c") + (data (i32.const 1368) "\05\00\00\00\08\00\00\00\06") + (data (i32.const 1388) "\1c") + (data (i32.const 1400) "\06\00\00\00\08\00\00\00\07") + (data (i32.const 1420) "\1c") + (data (i32.const 1432) "\06\00\00\00\08\00\00\00\08") + (data (i32.const 1452) "\1c") + (data (i32.const 1464) "\07\00\00\00\08\00\00\00\t") + (data (i32.const 1484) "\1c") + (data (i32.const 1496) "\07\00\00\00\08\00\00\00\n") + (data (i32.const 1516) ",") + (data (i32.const 1528) "\01\00\00\00\1c\00\00\00I\00n\00v\00a\00l\00i\00d\00 \00l\00e\00n\00g\00t\00h") + (data (i32.const 1564) "<") + (data (i32.const 1576) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 1628) "<") + (data (i32.const 1640) "\01\00\00\00(\00\00\00A\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e") + (data (i32.const 1692) "<") + (data (i32.const 1704) "\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00r\00t\00/\00i\00t\00c\00m\00s\00.\00t\00s") + (data (i32.const 1820) ",") + (data (i32.const 1832) "\01\00\00\00\14\00\00\00~\00l\00i\00b\00/\00r\00t\00.\00t\00s") + (data (i32.const 1900) "<") + (data (i32.const 1912) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s") + (data (i32.const 1964) "\1c") + (data (i32.const 1976) "\n\00\00\00\08\00\00\00\0b") + (data (i32.const 1996) "\1c") + (data (i32.const 2008) "\t\00\00\00\08\00\00\00\0c") + (data (i32.const 2028) "\1c") + (data (i32.const 2040) "\05\00\00\00\08\00\00\00\0d") + (data (i32.const 2060) "\1c") + (data (i32.const 2072) "\05\00\00\00\08\00\00\00\0e") + (data (i32.const 2092) "\1c") + (data (i32.const 2104) "\05\00\00\00\08\00\00\00\0f") + (data (i32.const 2124) "\1c") + (data (i32.const 2136) "\06\00\00\00\08\00\00\00\10") + (data (i32.const 2156) "\1c") + (data (i32.const 2168) "\06\00\00\00\08\00\00\00\11") + (data (i32.const 2188) "\1c") + (data (i32.const 2200) "\07\00\00\00\08\00\00\00\12") + (data (i32.const 2220) "\1c") + (data (i32.const 2232) "\07\00\00\00\08\00\00\00\13") + (data (i32.const 2252) "\1c") + (data (i32.const 2264) "\n\00\00\00\08\00\00\00\14") + (data (i32.const 2284) "\1c") + (data (i32.const 2296) "\t\00\00\00\08\00\00\00\15") + (data (i32.const 2316) "\1c") + (data (i32.const 2328) "\0b\00\00\00\08\00\00\00\16") + (data (i32.const 2348) "\1c") + (data (i32.const 2360) "\0c\00\00\00\08\00\00\00\17") + (data (i32.const 2380) "\1c") + (data (i32.const 2392) "\0d\00\00\00\08\00\00\00\18") + (data (i32.const 2412) "\1c") + (data (i32.const 2424) "\0e\00\00\00\08\00\00\00\19") + (data (i32.const 2444) "\1c") + (data (i32.const 2456) "\05\00\00\00\08\00\00\00\1a") + (data (i32.const 2476) "\1c") + (data (i32.const 2488) "\05\00\00\00\08\00\00\00\1b") + (data (i32.const 2508) "\1c") + (data (i32.const 2520) "\0f\00\00\00\08\00\00\00\1c") + (data (i32.const 2540) "\1c") + (data (i32.const 2552) "\06\00\00\00\08\00\00\00\1d") + (data (i32.const 2572) "\1c") + (data (i32.const 2584) "\10\00\00\00\08\00\00\00\1e") + (data (i32.const 2604) "\1c") + (data (i32.const 2616) "\0d\00\00\00\08\00\00\00\1f") + (data (i32.const 2636) "\1c") + (data (i32.const 2648) "\11\00\00\00\08\00\00\00 ") + (data (i32.const 2672) "n\83\f9\a2\00\00\00\00\d1W\'\fc)\15DN\99\95b\db\c0\dd4\f5\abcQ\feA\90C<:n$\b7a\c5\bb\de\ea.I\06\e0\d2MB\1c\eb\1d\fe\1c\92\d1\t\f55\82\e8>\a7)\b1&p\9c\e9\84D\bb.9\d6\919A~_\b4\8b_\84\9c\f49S\83\ff\97\f8\1f;(\f9\bd\8b\11/\ef\0f\98\05\de\cf~6m\1fm\nZf?FO\b7\t\cb\'\c7\ba\'u-\ea_\9e\f79\07={\f1\e5\eb\b1_\fbk\ea\92R\8aF0\03V\08]\8d\1f \bc\cf\f0\abk{\fca\91\e3\a9\1d6\f4\9a_\85\99e\08\1b\e6^\80\d8\ff\8d@h\a0\14W\15\06\061\'sM") + (data (i32.const 2876) "\1c") + (data (i32.const 2888) "\05\00\00\00\08\00\00\00!") + (data (i32.const 2908) "\1c") + (data (i32.const 2920) "\12\00\00\00\08\00\00\00\"") + (data (i32.const 2940) "\1c") + (data (i32.const 2952) "\14\00\00\00\08\00\00\00#") + (data (i32.const 2972) "\1c") + (data (i32.const 2984) "\13\00\00\00\08\00\00\00$") + (data (i32.const 3004) "\1c") + (data (i32.const 3016) "\16\00\00\00\08\00\00\00%") + (data (i32.const 3036) "\1c") + (data (i32.const 3048) "\15\00\00\00\08\00\00\00&") + (data (i32.const 3068) "\1c") + (data (i32.const 3080) "\05\00\00\00\08\00\00\00\'") + (data (i32.const 3100) "\1c") + (data (i32.const 3112) "\01\00\00\00\0c\00\00\00n\00u\00m\00b\00e\00r") + (data (i32.const 3132) "\1c") + (data (i32.const 3144) "\0e\00\00\00\08\00\00\00(") + (data (i32.const 3164) "\1c") + (data (i32.const 3176) "\17\00\00\00\08\00\00\00)") + (data (i32.const 3196) "\1c") + (data (i32.const 3208) "\05\00\00\00\08\00\00\00*") + (data (i32.const 3228) "\1c") + (data (i32.const 3240) "\05\00\00\00\08\00\00\00+") + (data (i32.const 3260) "\1c") + (data (i32.const 3272) "\05\00\00\00\08\00\00\00,") + (data (i32.const 3292) "\1c") + (data (i32.const 3304) "\05\00\00\00\08\00\00\00-") + (data (i32.const 3324) "\1c") + (data (i32.const 3336) "\07\00\00\00\08\00\00\00.") + (data (i32.const 3356) "\1c") + (data (i32.const 3368) "\05\00\00\00\08\00\00\00/") + (data (i32.const 3388) "\1c") + (data (i32.const 3400) "\05\00\00\00\08\00\00\000") + (data (i32.const 3420) "\1c") + (data (i32.const 3432) "\05\00\00\00\08\00\00\001") + (data (i32.const 3452) "\1c") + (data (i32.const 3464) "\06\00\00\00\08\00\00\002") + (data (i32.const 3484) "\1c") + (data (i32.const 3496) "\06\00\00\00\08\00\00\003") + (data (i32.const 3516) "\1c") + (data (i32.const 3528) "\07\00\00\00\08\00\00\004") + (data (i32.const 3548) "\1c") + (data (i32.const 3560) "\n\00\00\00\08\00\00\005") + (data (i32.const 3580) "\1c") + (data (i32.const 3592) "\t\00\00\00\08\00\00\006") + (data (i32.const 3612) "\1c") + (data (i32.const 3624) "\05\00\00\00\08\00\00\007") + (data (i32.const 3644) "\1c") + (data (i32.const 3656) "\05\00\00\00\08\00\00\008") + (data (i32.const 3676) "<") + (data (i32.const 3688) "\01\00\00\00&\00\00\00N\00o\00t\00 \00i\00m\00p\00l\00e\00m\00e\00n\00t\00e\00d\00 \00y\00e\00t") + (data (i32.const 3740) "<") + (data (i32.const 3752) "\01\00\00\00$\00\00\00a\00s\00s\00e\00m\00b\00l\00y\00/\00c\00o\00m\00m\00o\00n\00.\00t\00s") + (data (i32.const 3804) "\1c") + (data (i32.const 3816) "\01\00\00\00\n\00\00\00m\00a\00t\002\00(") + (data (i32.const 3836) "\1c") + (data (i32.const 3848) "\01\00\00\00\06\00\00\000\00.\000") + (data (i32.const 3868) "\1c") + (data (i32.const 3880) "\01\00\00\00\06\00\00\00N\00a\00N") + (data (i32.const 3900) ",") + (data (i32.const 3912) "\01\00\00\00\12\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y") (data (i32.const 3948) ",") - (data (i32.const 3960) "\01\00\00\00\12\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 3996) ",") - (data (i32.const 4008) "\01\00\00\00\10\00\00\00I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 4104) "\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\9a\ec\ef?\d1f\87\10z^\90\bc\85\7fn\e8\15\e3\ef?\13\f6g5R\d2\8c\be\ef?m{\83]\a6\9a\97<\0f\89\f9lX\b5\ef?\fc\ef\fd\92\1a\b5\8e<\f7Gr+\92\ac\ef?\d1\9c/p=\be><\a2\d1\d32\ec\a3\ef?\0bn\90\894\03j\bc\1b\d3\fe\aff\9b\ef?\0e\bd/*RV\95\bcQ[\12\d0\01\93\ef?U\eaN\8c\ef\80P\bc\cc1l\c0\bd\8a\ef?\16\f4\d5\b9#\c9\91\bc\e0-\a9\ae\9a\82\ef?\afU\\\e9\e3\d3\80\f7\ec\9a<\aa\b9h1\87T\ef?\9d8\86\cb\82\e7\8f\bc\1d\d9\fc\"PM\ef?\8d\c3\a6DAo\8a<\d6\8cb\88;F\ef?}\04\e4\b0\05z\80<\96\dc}\91I?\ef?\94\a8\a8\e3\fd\8e\96<8bunz8\ef?}Ht\f2\18^\87\a9\af\0c\ef?\b6\ab\b0MuM\83<\15\b71\n\fe\06\ef?Lt\ac\e2\01B\86<1\d8L\fcp\01\ef?J\f8\d3]9\dd\8f<\ff\16d\b2\08\fc\ee?\04[\8e;\80\a3\86\bc\f1\9f\92_\c5\f6\ee?hPK\cc\edJ\92\bc\cb\a9:7\a7\f1\ee?\8e-Q\1b\f8\07\99\bcf\d8\05m\ae\ec\ee?\d26\94>\e8\d1q\bc\f7\9f\e54\db\e7\ee?\15\1b\ce\b3\19\19\99\bc\e5\a8\13\c3-\e3\ee?mL*\a7H\9f\85<\"4\12L\a6\de\ee?\8ai(z`\12\93\bc\1c\80\ac\04E\da\ee?[\89\17H\8f\a7X\bc*.\f7!\n\d6\ee?\1b\9aIg\9b,|\bc\97\a8P\d9\f5\d1\ee?\11\ac\c2`\edcC<-\89a`\08\ce\ee?\efd\06;\tf\96Z~d\1fx\bct_\ec\e8u\9f\ee?\b0}\8b\c0J\ee\86\bct\81\a5H\9a\9f\ee?\8a\e6U\1e2\19\86\bc\c9gBV\eb\9f\ee?\d3\d4\t^\cb\9c\90T\'\a4\ee?47;\f1\b6i\93\bc\13\ceL\99\89\a5\ee?\1e\ff\19:\84^\80\bc\ad\c7#F\1a\a7\ee?nWr\d8P\d4\94\bc\ed\92D\9b\d9\a8\ee?\00\8a\0e[g\ad\90<\99f\8a\d9\c7\aa\ee?\b4\ea\f0\c1/\b7\8d<\db\a0*B\e5\ac\ee?\ff\e7\c5\9c`\b6e\bc\8cD\b5\162\af\ee?D_\f3Y\83\f6{<6w\15\99\ae\b1\ee?\83=\1e\a7\1f\t\93\bc\c6\ff\91\0b[\b4\ee?)\1el\8b\b8\a9]\bc\e5\c5\cd\b07\b7\ee?Y\b9\90|\f9#l\bc\0fR\c8\cbD\ba\ee?\aa\f9\f4\"CC\92\bcPN\de\9f\82\bd\ee?K\8ef\d7l\ca\85\bc\ba\07\cap\f1\c0\ee?\'\ce\91+\fc\afq<\90\f0\a3\82\91\c4\ee?\bbs\n\e15\d2m<##\e3\19c\c8\ee?c\"b\"\04\c5\87\bce\e5]{f\cc\ee?\d51\e2\e3\86\1c\8b<3-J\ec\9b\d0\ee?\15\bb\bc\d3\d1\bb\91\bc]%>\b2\03\d5\ee?\d21\ee\9c1\cc\90\b4\07!\d5\82\bc_\9b{3\97|\ef?\c9\0dG;\b9*\89\bc)\a1\f5\14F\86\ef?\d3\88:`\04\b6t<\f6?\8b\e7.\90\ef?qr\9dQ\ec\c5\83<\83L\c7\fbQ\9a\ef?\f0\91\d3\8f\12\f7\8f\bc\da\90\a4\a2\af\a4\ef?}t#\e2\98\ae\8d\bc\f1g\8e-H\af\ef?\08 \aaA\bc\c3\8e<\'Za\ee\1b\ba\ef?2\eb\a9\c3\94+\84<\97\bak7+\c5\ef?\ee\85\d11\a9d\8a<@En[v\d0\ef?\ed\e3;\e4\ba7\8e\bc\14\be\9c\ad\fd\db\ef?\9d\cd\91M;\89w<\d8\90\9e\81\c1\e7\ef?\89\cc`A\c1\05S<\f1q\8f+\c2\f3\ef?") + (data (i32.const 7616) "\9f\de\e0\c3\f04\f7?\00\90\e6y\7f\cc\d7\bf\1f\e9,jx\13\f7?\00\00\0d\c2\eeo\d7\bf\a0\b5\fa\08`\f2\f6?\00\e0Q\13\e3\13\d7\bf}\8c\13\1f\a6\d1\f6?\00x(8[\b8\d6\bf\d1\b4\c5\0bI\b1\f6?\00x\80\90U]\d6\bf\ba\0c/3G\91\f6?\00\00\18v\d0\02\d6\bf#B\"\18\9fq\f6?\00\90\90\86\ca\a8\d5\bf\d9\1e\a5\99OR\f6?\00P\03VCO\d5\bf\c4$\8f\aaV3\f6?\00@k\c37\f6\d4\bf\14\dc\9dk\b3\14\f6?\00P\a8\fd\a7\9d\d4\bfL\\\c6Rd\f6\f5?\00\a8\899\92E\d4\bfO,\91\b5g\d8\f5?\00\b8\b09\f4\ed\d3\bf\de\90[\cb\bc\ba\f5?\00p\8fD\ce\96\d3\bfx\1a\d9\f2a\9d\f5?\00\a0\bd\17\1e@\d3\bf\87VF\12V\80\f5?\00\80F\ef\e2\e9\d2\bf\d3k\e7\ce\97c\f5?\00\e008\1b\94\d2\bf\93\7f\a7\e2%G\f5?\00\88\da\8c\c5>\d2\bf\83E\06B\ff*\f5?\00\90\')\e1\e9\d1\bf\df\bd\b2\db\"\0f\f5?\00\f8H+m\95\d1\bf\d7\de4G\8f\f3\f4?\00\f8\b9\9agA\d1\bf@(\de\cfC\d8\f4?\00\98\ef\94\d0\ed\d0\bf\c8\a3x\c0>\bd\f4?\00\10\db\18\a5\9a\d0\bf\8a%\e0\c3\7f\a2\f4?\00\b8cR\e6G\d0\bf4\84\d4$\05\88\f4?\00\f0\86E\"\eb\cf\bf\0b-\19\1b\cem\f4?\00\b0\17uJG\cf\bfT\189\d3\d9S\f4?\000\10=D\a4\ce\bfZ\84\b4D\':\f4?\00\b0\e9D\0d\02\ce\bf\fb\f8\15A\b5 \f4?\00\f0w)\a2`\cd\bf\b1\f4>\da\82\07\f4?\00\90\95\04\01\c0\cc\bf\8f\feW]\8f\ee\f3?\00\10\89V) \cc\bf\e9L\0b\a0\d9\d5\f3?\00\10\81\8d\17\81\cb\bf+\c1\10\c0`\bd\f3?\00\d0\d3\cc\c9\e2\ca\bf\b8\dau+$\a5\f3?\00\90\12.@E\ca\bf\02\d0\9f\cd\"\8d\f3?\00\f0\1dhw\a8\c9\bf\1cz\84\c5[u\f3?\000Him\0c\c9\bf\e26\adI\ce]\f3?\00\c0E\a6 q\c8\bf@\d4M\98yF\f3?\000\14\b4\8f\d6\c7\bf$\cb\ff\ce\\/\f3?\00pb<\b8<\c7\bfI\0d\a1uw\18\f3?\00`7\9b\9a\a3\c6\bf\909>7\c8\01\f3?\00\a0\b7T1\0b\c6\bfA\f8\95\bbN\eb\f2?\000$v}s\c5\bf\d1\a9\19\02\n\d5\f2?\000\c2\8f{\dc\c4\bf*\fd\b7\a8\f9\be\f2?\00\00\d2Q,F\c4\bf\ab\1b\0cz\1c\a9\f2?\00\00\83\bc\8a\b0\c3\bf0\b5\14`r\93\f2?\00\00Ik\99\1b\c3\bf\f5\a1WW\fa}\f2?\00@\a4\90T\87\c2\bf\bf;\1d\9b\b3h\f2?\00\a0y\f8\b9\f3\c1\bf\bd\f5\8f\83\9dS\f2?\00\a0,%\c8`\c1\bf;\08\c9\aa\b7>\f2?\00 \f7W\7f\ce\c0\bf\b6@\a9+\01*\f2?\00\a0\feI\dc<\c0\bf2A\cc\96y\15\f2?\00\80K\bc\bdW\bf\bf\9b\fc\d2\1d \01\f2?\00@@\96\087\be\bf\0bHMI\f4\ec\f1?\00@\f9>\98\17\bd\bfie\8fR\f5\d8\f1?\00\a0\d8Ng\f9\bb\bf|~W\11#\c5\f1?\00`/ y\dc\ba\bf\e9&\cbt|\b1\f1?\00\80(\e7\c3\c0\b9\bf\b6\1a,\0c\01\9e\f1?\00\c0r\b3F\a6\b8\bf\bdp\b6{\b0\8a\f1?\00\00\ac\b3\01\8d\b7\bf\b6\bc\ef%\8aw\f1?\00\008E\f1t\b6\bf\da1L5\8dd\f1?\00\80\87m\0e^\b5\bf\dd_\'\90\b9Q\f1?\00\e0\a1\de\\H\b4\bfL\d22\a4\0e?\f1?\00\a0jM\d93\b3\bf\da\f9\10r\8b,\f1?\00`\c5\f8y \b2\bf1\b5\ec(0\1a\f1?\00 b\98F\0e\b1\bf\af4\84\da\fb\07\f1?\00\00\d2jl\fa\af\bf\b3kN\0f\ee\f5\f0?\00@wJ\8d\da\ad\bf\ce\9f*]\06\e4\f0?\00\00\85\e4\ec\bc\ab\bf!\a5,cD\d2\f0?\00\c0\12@\89\a1\a9\bf\1a\98\e2|\a7\c0\f0?\00\c0\023X\88\a7\bf\d16\c6\83/\af\f0?\00\80\d6g^q\a5\bf9\13\a0\98\db\9d\f0?\00\80eI\8a\\\a3\bf\df\e7R\af\ab\8c\f0?\00@\15d\e3I\a1\bf\fb(N/\9f{\f0?\00\80\eb\82\c0r\9e\bf\19\8f5\8c\b5j\f0?\00\80RR\f1U\9a\bf,\f9\ec\a5\eeY\f0?\00\80\81\cfb=\96\bf\90,\d1\cdII\f0?\00\00\aa\8c\fb(\92\bf\a9\ad\f0\c6\c68\f0?\00\00\f9 {1\8c\bf\a92y\13e(\f0?\00\00\aa]5\19\84\bfHs\ea\'$\18\f0?\00\00\ec\c2\03\12x\bf\95\b1\14\06\04\08\f0?\00\00$y\t\04`\bf\1a\fa&\f7\1f\e0\ef?\00\00\90\84\f3\efo?t\eaa\c2\1c\a1\ef?\00\00=5A\dc\87?.\99\81\b0\10c\ef?\00\80\c2\c4\a3\ce\93?\cd\ad\ee<\f6%\ef?\00\00\89\14\c1\9f\9b?\e7\13\91\03\c8\e9\ee?\00\00\11\ce\d8\b0\a1?\ab\b1\cbx\80\ae\ee?\00\c0\01\d0[\8a\a5?\9b\0c\9d\a2\1at\ee?\00\80\d8@\83\\\a9?\b5\99\n\83\91:\ee?\00\80W\efj\'\ad?V\9a`\t\e0\01\ee?\00\c0\98\e5\98u\b0?\98\bbw\e5\01\ca\ed?\00 \0d\e3\f5S\b2?\03\91|\0b\f2\92\ed?\00\008\8b\dd.\b4?\ce\\\fbf\ac\\\ed?\00\c0W\87Y\06\b6?\9d\de^\aa,\'\ed?\00\00j5v\da\b7?\cd,k>n\f2\ec?\00`\1cNC\ab\b9?\02y\a7\a2m\be\ec?\00`\0d\bb\c7x\bb?m\087m&\8b\ec?\00 \e72\13C\bd?\04X]\bd\94X\ec?\00`\deq1\n\bf?\8c\9f\bb3\b5&\ec?\00@\91+\15g\c0??\e7\ec\ee\83\f5\eb?\00\b0\92\82\85G\c1?\c1\96\dbu\fd\c4\eb?\000\ca\cdn&\c2?(J\86\0c\1e\95\eb?\00P\c5\a6\d7\03\c3?,>\ef\c5\e2e\eb?\00\103<\c3\df\c3?\8b\88\c9gH7\eb?\00\80zk6\ba\c4?J0\1d!K\t\eb?\00\f0\d1(9\93\c5?~\ef\f2\85\e8\db\ea?\00\f0\18$\cdj\c6?\a2=`1\1d\af\ea?\00\90f\ec\f8@\c7?\a7X\d3?\e6\82\ea?\00\f0\1a\f5\c0\15\c8?\8bs\t\ef@W\ea?\00\80\f6T)\e9\c8?\'K\ab\90*,\ea?\00@\f8\026\bb\c9?\d1\f2\93\13\a0\01\ea?\00\00,\1c\ed\8b\ca?\1b<\db$\9f\d7\e9?\00\d0\01\\Q[\cb?\90\b1\c7\05%\ae\e9?\00\c0\bc\ccg)\cc?/\ce\97\f2.\85\e9?\00`H\d55\f6\cc?uK\a4\ee\ba\\\e9?\00\c0F4\bd\c1\cd?8H\e7\9d\c64\e9?\00\e0\cf\b8\01\8c\ce?\e6Rg/O\0d\e9?\00\90\17\c0\tU\cf?\9d\d7\ff\8eR\e6\e8?\00\b8\1f\12l\0e\d0?|\00\cc\9f\ce\bf\e8?\00\d0\93\0e\b8q\d0?\0e\c3\be\da\c0\99\e8?\00p\86\9ek\d4\d0?\fb\17#\aa\'t\e8?\00\d0K3\876\d1?\08\9a\b3\ac\00O\e8?\00H#g\0d\98\d1?U>e\e8I*\e8?\00\80\cc\e0\ff\f8\d1?`\02\f4\95\01\06\e8?\00hc\d7_Y\d2?)\a3\e0c%\e2\e7?\00\a8\14\t0\b9\d2?\ad\b5\dcw\b3\be\e7?\00`C\10r\18\d3?\c2%\97g\aa\9b\e7?\00\18\ecm&w\d3?W\06\17\f2\07y\e7?\000\af\fbO\d5\d3?\0c\13\d6\db\caV\e7?\00\e0/\e3\ee2\d4?") + (data (i32.const 9664) "k\b6O\01\00\10\e6?<[B\91l\02~<\95\b4M\03\000\e6?A]\00H\ea\bf\8d\f6\05\eb\ff\ef\e6?S-\e2\1a\04\80~\bc\80\97\86\0e\00\10\e7?Ry\tqf\ff{<\12\e9g\fc\ff/\e7?$\87\bd&\e2\00\8c\89<\b9{F\13\000\e9?v\02\98KN\80\7f.\98\dd\ff\af\e9?7\93Z\8a\e0@\87\bcf\fbI\ed\ff\cf\e9?\00\e0\9b\c1\08\ce?O*\00\b0\ea?_?\ff<\04\fdi\bc\d1\1e\ae\d7\ff\cf\ea?\b4p\90\12\e7>\82\bcx\04Q\ee\ff\ef\ea?\a3\de\0e\e0>\06j<[\0de\db\ff\0f\eb?\b9\n\1f8\c8\06ZO\86\d0E\ff\8a<@\16\87\f9\ff\8f\eb?\f9\c3\c2\96w\fe|\f0\0f\00\f0\f4?\1cS\85\0b\89\7f\97<\d1K\dc\12\00\10\f5?6\a4fqe\04`\c9\03\00\b0\f5?\c0\0c\bf\n\08A\9f\bc\bc\19I\1d\00\d0\f5?)G%\fb*\81\98\bc\89z\b8\e7\ff\ef\f5?\04i\ed\80\b7~\94\bc") + (data (i32.const 11724) "\1c") + (data (i32.const 11736) "\01\00\00\00\06\00\00\00x\00y\00z") + (data (i32.const 11756) "\1c") + (data (i32.const 11768) "\01\00\00\00\06\00\00\00x\00z\00y") + (data (i32.const 11788) "\1c") + (data (i32.const 11800) "\01\00\00\00\06\00\00\00y\00x\00z") + (data (i32.const 11820) "\1c") + (data (i32.const 11832) "\01\00\00\00\06\00\00\00y\00z\00x") + (data (i32.const 11852) "\1c") + (data (i32.const 11864) "\01\00\00\00\06\00\00\00z\00x\00y") + (data (i32.const 11884) "<") + (data (i32.const 11896) "\01\00\00\00(\00\00\00U\00n\00k\00n\00o\00w\00n\00 \00a\00n\00g\00l\00e\00 \00o\00r\00d\00e\00r\00 ") + (data (i32.const 11948) "<") + (data (i32.const 11960) "\01\00\00\00 \00\00\00a\00s\00s\00e\00m\00b\00l\00y\00/\00q\00u\00a\00t\00.\00t\00s") + (data (i32.const 12012) "\1c") + (data (i32.const 12024) "\01\00\00\00\n\00\00\00q\00u\00a\00t\00(") + (data (i32.const 12044) "\1c") + (data (i32.const 12056) "\01\00\00\00\0c\00\00\00q\00u\00a\00t\002\00(") + (data (i32.const 12076) "\1c") + (data (i32.const 12088) "\01\00\00\00\n\00\00\00v\00e\00c\002\00(") + (data (i32.const 12108) "\1c") + (data (i32.const 12140) "\1c") + (data (i32.const 12172) ",") + (data (i32.const 12184) "\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 12220) "\1c") + (data (i32.const 12252) "\1c") + (data (i32.const 12284) "\1c") + (data (i32.const 12316) "\1c") + (data (i32.const 12348) "\1c") + (data (i32.const 12360) "\01\00\00\00\n\00\00\00v\00e\00c\003\00(") + (data (i32.const 12380) "\1c") + (data (i32.const 12392) "\01\00\00\00\n\00\00\00v\00e\00c\004\00(") + (data (i32.const 12416) "\1d\00\00\00 \00\00\00\00\00\00\00 ") + (data (i32.const 12452) "\01\1a\00\00\02") + (data (i32.const 12484) " ") + (data (i32.const 12612) " \00\00\00\00\00\00\00\02A\00\00\00\00\00\00\02\t\00\00\00\00\00\00 \00\00\00\00\00\00\00\02\1a") (table $0 57 funcref) (elem (i32.const 1) $~lib/math/NativeMath.random $assembly/mat2d/multiply $assembly/mat2d/subtract $assembly/vec3/subtract $assembly/vec3/multiply $assembly/vec3/divide $assembly/vec3/distance $assembly/vec3/squaredDistance $assembly/vec3/length $assembly/vec3/squaredLength $start:assembly/vec3~anonymous|0~anonymous|0 $start:assembly/vec3~anonymous|0 $assembly/vec4/subtract $assembly/vec4/multiply $assembly/vec4/divide $assembly/vec4/distance $assembly/vec4/squaredDistance $assembly/vec4/length $assembly/vec4/squaredLength $start:assembly/vec4~anonymous|0~anonymous|0 $start:assembly/vec4~anonymous|0 $assembly/vec4/clone $assembly/vec4/fromValues $assembly/vec4/copy $assembly/vec4/set $assembly/vec4/add $assembly/quat/multiply $assembly/vec4/scale $assembly/vec4/dot $assembly/vec4/lerp $assembly/vec4/normalize $assembly/vec4/exactEquals $start:assembly/quat~anonymous|0~anonymous|0 $start:assembly/quat~anonymous|0 $start:assembly/quat~anonymous|1~anonymous|0 $start:assembly/quat~anonymous|1 $start:assembly/quat~anonymous|2~anonymous|0 $start:assembly/quat~anonymous|2 $assembly/quat2/multiply $assembly/mat4/perspectiveNO $assembly/mat4/orthoNO $assembly/mat4/multiply $assembly/mat4/subtract $assembly/mat3/multiply $assembly/mat3/subtract $assembly/vec2/length $assembly/vec2/subtract $assembly/vec2/multiply $assembly/vec2/divide $assembly/vec2/distance $assembly/vec2/squaredDistance $assembly/vec2/squaredLength $start:assembly/vec2~anonymous|0~anonymous|0 $start:assembly/vec2~anonymous|0 $assembly/mat2/multiply $assembly/vec4/subtract) (global $assembly/common/EPSILON f64 (f64.const 1e-06)) (global $~lib/math/random_seeded (mut i32) (i32.const 0)) (global $~lib/math/random_state0_64 (mut i64) (i64.const 0)) (global $~lib/math/random_state1_64 (mut i64) (i64.const 0)) - (global $~lib/math/random_state0_32 (mut i32) (i32.const 0)) - (global $~lib/math/random_state1_32 (mut i32) (i32.const 0)) - (global $assembly/common/RANDOM (mut i32) (i32.const 1104)) - (global $assembly/common/ANGLE_ORDER (mut i32) (i32.const 1136)) - (global $assembly/mat2d/mul i32 (i32.const 1296)) - (global $assembly/mat2d/sub i32 (i32.const 1328)) - (global $assembly/vec3/sub i32 (i32.const 1360)) - (global $assembly/vec3/mul i32 (i32.const 1392)) - (global $assembly/vec3/div i32 (i32.const 1424)) - (global $assembly/vec3/dist i32 (i32.const 1456)) - (global $assembly/vec3/sqrDist i32 (i32.const 1488)) - (global $assembly/vec3/len i32 (i32.const 1520)) - (global $assembly/vec3/sqrLen i32 (i32.const 1552)) + (global $assembly/common/RANDOM (mut i32) (i32.const 1056)) + (global $assembly/common/ANGLE_ORDER (mut i32) (i32.const 1088)) + (global $assembly/mat2d/mul i32 (i32.const 1248)) + (global $assembly/mat2d/sub i32 (i32.const 1280)) + (global $assembly/vec3/sub i32 (i32.const 1312)) + (global $assembly/vec3/mul i32 (i32.const 1344)) + (global $assembly/vec3/div i32 (i32.const 1376)) + (global $assembly/vec3/dist i32 (i32.const 1408)) + (global $assembly/vec3/sqrDist i32 (i32.const 1440)) + (global $assembly/vec3/len i32 (i32.const 1472)) + (global $assembly/vec3/sqrLen i32 (i32.const 1504)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) @@ -286,30 +284,30 @@ (global $assembly/vec3/vec (mut i32) (i32.const 0)) (global $~argumentsLength (mut i32) (i32.const 0)) (global $assembly/vec3/forEach (mut i32) (i32.const 0)) - (global $assembly/vec4/sub i32 (i32.const 2096)) - (global $assembly/vec4/mul i32 (i32.const 2128)) - (global $assembly/vec4/div i32 (i32.const 2160)) - (global $assembly/vec4/dist i32 (i32.const 2192)) - (global $assembly/vec4/sqrDist i32 (i32.const 2224)) - (global $assembly/vec4/len i32 (i32.const 2256)) - (global $assembly/vec4/sqrLen i32 (i32.const 2288)) + (global $assembly/vec4/sub i32 (i32.const 2048)) + (global $assembly/vec4/mul i32 (i32.const 2080)) + (global $assembly/vec4/div i32 (i32.const 2112)) + (global $assembly/vec4/dist i32 (i32.const 2144)) + (global $assembly/vec4/sqrDist i32 (i32.const 2176)) + (global $assembly/vec4/len i32 (i32.const 2208)) + (global $assembly/vec4/sqrLen i32 (i32.const 2240)) (global $assembly/vec4/vec (mut i32) (i32.const 0)) (global $assembly/vec4/forEach (mut i32) (i32.const 0)) - (global $assembly/quat/clone i32 (i32.const 2384)) - (global $assembly/quat/fromValues i32 (i32.const 2416)) - (global $assembly/quat/copy i32 (i32.const 2448)) - (global $assembly/quat/set i32 (i32.const 2480)) - (global $assembly/quat/add i32 (i32.const 2512)) - (global $assembly/quat/mul i32 (i32.const 2544)) - (global $assembly/quat/scale i32 (i32.const 2576)) - (global $assembly/quat/dot i32 (i32.const 2608)) - (global $assembly/quat/lerp i32 (i32.const 2640)) - (global $assembly/quat/length i32 (i32.const 2256)) - (global $assembly/quat/len i32 (i32.const 2256)) - (global $assembly/quat/squaredLength i32 (i32.const 2288)) - (global $assembly/quat/sqrLen i32 (i32.const 2288)) - (global $assembly/quat/normalize i32 (i32.const 2672)) - (global $assembly/quat/exactEquals i32 (i32.const 2704)) + (global $assembly/quat/clone i32 (i32.const 2336)) + (global $assembly/quat/fromValues i32 (i32.const 2368)) + (global $assembly/quat/copy i32 (i32.const 2400)) + (global $assembly/quat/set i32 (i32.const 2432)) + (global $assembly/quat/add i32 (i32.const 2464)) + (global $assembly/quat/mul i32 (i32.const 2496)) + (global $assembly/quat/scale i32 (i32.const 2528)) + (global $assembly/quat/dot i32 (i32.const 2560)) + (global $assembly/quat/lerp i32 (i32.const 2592)) + (global $assembly/quat/length i32 (i32.const 2208)) + (global $assembly/quat/len i32 (i32.const 2208)) + (global $assembly/quat/squaredLength i32 (i32.const 2240)) + (global $assembly/quat/sqrLen i32 (i32.const 2240)) + (global $assembly/quat/normalize i32 (i32.const 2624)) + (global $assembly/quat/exactEquals i32 (i32.const 2656)) (global $assembly/quat/tmpvec3 (mut i32) (i32.const 0)) (global $assembly/quat/xUnitVec3 (mut i32) (i32.const 0)) (global $assembly/quat/yUnitVec3 (mut i32) (i32.const 0)) @@ -322,31 +320,31 @@ (global $assembly/quat/sqlerp (mut i32) (i32.const 0)) (global $assembly/quat/matr (mut i32) (i32.const 0)) (global $assembly/quat/setAxes (mut i32) (i32.const 0)) - (global $assembly/quat2/getReal i32 (i32.const 2448)) - (global $assembly/quat2/setReal i32 (i32.const 2448)) - (global $assembly/quat2/mul i32 (i32.const 3136)) - (global $assembly/quat2/dot i32 (i32.const 2608)) - (global $assembly/quat2/length i32 (i32.const 2256)) - (global $assembly/quat2/len i32 (i32.const 2256)) - (global $assembly/quat2/squaredLength i32 (i32.const 2288)) - (global $assembly/quat2/sqrLen i32 (i32.const 2288)) - (global $assembly/mat4/perspective i32 (i32.const 3200)) - (global $assembly/mat4/ortho i32 (i32.const 3232)) - (global $assembly/mat4/mul i32 (i32.const 3264)) - (global $assembly/mat4/sub i32 (i32.const 3296)) - (global $assembly/mat3/mul i32 (i32.const 3328)) - (global $assembly/mat3/sub i32 (i32.const 3360)) - (global $assembly/vec2/len i32 (i32.const 3392)) - (global $assembly/vec2/sub i32 (i32.const 3424)) - (global $assembly/vec2/mul i32 (i32.const 3456)) - (global $assembly/vec2/div i32 (i32.const 3488)) - (global $assembly/vec2/dist i32 (i32.const 3520)) - (global $assembly/vec2/sqrDist i32 (i32.const 3552)) - (global $assembly/vec2/sqrLen i32 (i32.const 3584)) + (global $assembly/quat2/getReal i32 (i32.const 2400)) + (global $assembly/quat2/setReal i32 (i32.const 2400)) + (global $assembly/quat2/mul i32 (i32.const 3088)) + (global $assembly/quat2/dot i32 (i32.const 2560)) + (global $assembly/quat2/length i32 (i32.const 2208)) + (global $assembly/quat2/len i32 (i32.const 2208)) + (global $assembly/quat2/squaredLength i32 (i32.const 2240)) + (global $assembly/quat2/sqrLen i32 (i32.const 2240)) + (global $assembly/mat4/perspective i32 (i32.const 3152)) + (global $assembly/mat4/ortho i32 (i32.const 3184)) + (global $assembly/mat4/mul i32 (i32.const 3216)) + (global $assembly/mat4/sub i32 (i32.const 3248)) + (global $assembly/mat3/mul i32 (i32.const 3280)) + (global $assembly/mat3/sub i32 (i32.const 3312)) + (global $assembly/vec2/len i32 (i32.const 3344)) + (global $assembly/vec2/sub i32 (i32.const 3376)) + (global $assembly/vec2/mul i32 (i32.const 3408)) + (global $assembly/vec2/div i32 (i32.const 3440)) + (global $assembly/vec2/dist i32 (i32.const 3472)) + (global $assembly/vec2/sqrDist i32 (i32.const 3504)) + (global $assembly/vec2/sqrLen i32 (i32.const 3536)) (global $assembly/vec2/vec (mut i32) (i32.const 0)) (global $assembly/vec2/forEach (mut i32) (i32.const 0)) - (global $assembly/mat2/mul i32 (i32.const 3680)) - (global $assembly/mat2/sub i32 (i32.const 3712)) + (global $assembly/mat2/mul i32 (i32.const 3632)) + (global $assembly/mat2/sub i32 (i32.const 3664)) (global $~lib/util/number/_frc_plus (mut i64) (i64.const 0)) (global $~lib/util/number/_frc_minus (mut i64) (i64.const 0)) (global $~lib/util/number/_exp (mut i32) (i32.const 0)) @@ -354,7 +352,7 @@ (global $~lib/util/number/_frc_pow (mut i64) (i64.const 0)) (global $~lib/util/number/_exp_pow (mut i32) (i32.const 0)) (global $assembly/mat4/Fov i32 (i32.const 27)) - (global $~lib/memory/__stack_pointer (mut i32) (i32.const 22524)) + (global $~lib/memory/__stack_pointer (mut i32) (i32.const 29036)) (export "glMatrix.EPSILON" (global $assembly/common/EPSILON)) (export "glMatrix.RANDOM" (global $assembly/common/RANDOM)) (export "glMatrix.ANGLE_ORDER" (global $assembly/common/ANGLE_ORDER)) @@ -722,134 +720,85 @@ (export "vec4.exactEquals" (func $export:assembly/mat2/exactEquals)) (export "vec4.equals" (func $export:assembly/mat2/equals)) (start $~start) - (func $~lib/math/murmurHash3 (param $0 i64) (result i64) - local.get $0 - local.get $0 - i64.const 33 - i64.shr_u - i64.xor - i64.const -49064778989728563 - i64.mul - local.tee $0 - local.get $0 - i64.const 33 - i64.shr_u - i64.xor - i64.const -4265267296055464877 - i64.mul - local.tee $0 - local.get $0 - i64.const 33 - i64.shr_u - i64.xor - ) - (func $~lib/math/splitMix32 (param $0 i32) (result i32) - local.get $0 - i32.const 1831565813 - i32.add - local.tee $0 - local.get $0 - i32.const 15 - i32.shr_u - i32.xor - local.get $0 - i32.const 1 - i32.or - i32.mul - local.tee $0 - local.get $0 - local.get $0 - i32.const 61 - i32.or - local.get $0 - local.get $0 - i32.const 7 - i32.shr_u - i32.xor - i32.mul - i32.add - i32.xor - local.tee $0 - local.get $0 - i32.const 14 - i32.shr_u - i32.xor - ) (func $~lib/math/NativeMath.random (result f64) (local $0 i64) (local $1 i64) + (local $2 i32) global.get $~lib/math/random_seeded i32.eqz if call $~lib/builtins/seed i64.reinterpret_f64 - local.set $0 + local.set $1 i32.const 1 global.set $~lib/math/random_seeded + local.get $1 + local.get $1 + i64.const 33 + i64.shr_u + i64.xor + i64.const -49064778989728563 + i64.mul + local.tee $0 local.get $0 - call $~lib/math/murmurHash3 + i64.const 33 + i64.shr_u + i64.xor + i64.const -4265267296055464877 + i64.mul + local.tee $0 + local.get $0 + i64.const 33 + i64.shr_u + i64.xor global.set $~lib/math/random_state0_64 global.get $~lib/math/random_state0_64 i64.const -1 i64.xor - call $~lib/math/murmurHash3 - global.set $~lib/math/random_state1_64 + local.tee $0 local.get $0 - i32.wrap_i64 - call $~lib/math/splitMix32 - global.set $~lib/math/random_state0_32 - global.get $~lib/math/random_state0_32 - call $~lib/math/splitMix32 - global.set $~lib/math/random_state1_32 - global.get $~lib/math/random_state1_32 - i32.const 0 - i32.ne - i32.const 0 - global.get $~lib/math/random_state0_32 - i32.const 0 - global.get $~lib/math/random_state1_64 - i64.const 0 - i64.ne - i32.const 0 - global.get $~lib/math/random_state0_64 - i64.const 0 - i64.ne - select - select - select - i32.eqz - if - i32.const 0 - i32.const 1056 - i32.const 1399 - i32.const 5 - call $~lib/builtins/abort - unreachable - end + i64.const 33 + i64.shr_u + i64.xor + i64.const -49064778989728563 + i64.mul + local.tee $0 + local.get $0 + i64.const 33 + i64.shr_u + i64.xor + i64.const -4265267296055464877 + i64.mul + local.tee $0 + local.get $0 + i64.const 33 + i64.shr_u + i64.xor + global.set $~lib/math/random_state1_64 end global.get $~lib/math/random_state0_64 - local.set $1 + local.set $0 global.get $~lib/math/random_state1_64 - local.tee $0 + local.tee $1 global.set $~lib/math/random_state0_64 - local.get $0 - local.get $1 local.get $1 + local.get $0 + local.get $0 i64.const 23 i64.shl i64.xor - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 i64.const 17 i64.shr_u i64.xor i64.xor - local.get $0 + local.get $1 i64.const 26 i64.shr_u i64.xor global.set $~lib/math/random_state1_64 - local.get $0 + local.get $1 i64.const 12 i64.shr_u i64.const 4607182418800017408 @@ -866,8 +815,8 @@ i32.shr_u i32.ge_u if - i32.const 1168 - i32.const 1232 + i32.const 1120 + i32.const 1184 i32.const 1374 i32.const 64 call $~lib/builtins/abort @@ -889,8 +838,8 @@ i32.shr_u i32.ge_u if - i32.const 1168 - i32.const 1232 + i32.const 1120 + i32.const 1184 i32.const 1385 i32.const 64 call $~lib/builtins/abort @@ -1314,23 +1263,14 @@ f64.mul f64.add ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 - i32.store offset=4 - local.get $0 - local.get $0 - i32.store offset=8 - local.get $0 - ) (func $~lib/rt/itcms/visitRoots (local $0 i32) (local $1 i32) - i32.const 1168 + i32.const 1120 call $~lib/rt/itcms/__visit - i32.const 1584 + i32.const 1536 call $~lib/rt/itcms/__visit - i32.const 1696 + i32.const 1648 call $~lib/rt/itcms/__visit global.get $assembly/common/ANGLE_ORDER local.tee $0 @@ -1405,18 +1345,7 @@ if local.get $0 i32.load offset=4 - i32.const 3 - i32.and - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1760 - i32.const 159 - i32.const 16 - call $~lib/builtins/abort - unreachable - end + drop local.get $0 i32.const 20 i32.add @@ -1430,66 +1359,16 @@ end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 - i32.load offset=4 - i32.const -4 - i32.and - i32.or - i32.store offset=4 - ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 - i32.load offset=4 - i32.const 3 - i32.and - i32.or - i32.store offset=4 - ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 - i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 - i32.or - i32.store offset=4 - local.get $0 - local.get $3 - i32.store offset=8 - local.get $3 - local.get $0 - call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 - i32.store offset=8 - ) (func $~lib/rt/itcms/Object#makeGray (param $0 i32) (local $1 i32) (local $2 i32) + (local $3 i32) local.get $0 global.get $~lib/rt/itcms/iter i32.eq if local.get $0 i32.load offset=8 - local.tee $1 - i32.eqz - if - i32.const 0 - i32.const 1760 - i32.const 147 - i32.const 30 - call $~lib/builtins/abort - unreachable - end - local.get $1 global.set $~lib/rt/itcms/iter end block $__inlined_func$~lib/rt/itcms/Object#unlink @@ -1500,45 +1379,27 @@ local.tee $1 i32.eqz if - i32.const 0 - local.get $0 - i32.const 22524 - i32.lt_u local.get $0 i32.load offset=8 - select - i32.eqz - if - i32.const 0 - i32.const 1760 - i32.const 127 - i32.const 18 - call $~lib/builtins/abort - unreachable - end + drop br $__inlined_func$~lib/rt/itcms/Object#unlink end + local.get $1 local.get $0 i32.load offset=8 local.tee $2 - i32.eqz - if - i32.const 0 - i32.const 1760 - i32.const 131 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 i32.store offset=8 local.get $2 local.get $1 - call $~lib/rt/itcms/Object#set:next + local.get $2 + i32.load offset=4 + i32.const 3 + i32.and + i32.or + i32.store offset=4 end - local.get $0 global.get $~lib/rt/itcms/toSpace + local.set $2 local.get $0 i32.load offset=12 local.tee $1 @@ -1548,12 +1409,12 @@ i32.const 1 else local.get $1 - i32.const 5904 + i32.const 12416 i32.load i32.gt_u if - i32.const 1168 - i32.const 1888 + i32.const 1120 + i32.const 1840 i32.const 22 i32.const 28 call $~lib/builtins/abort @@ -1562,7 +1423,7 @@ local.get $1 i32.const 3 i32.shl - i32.const 5908 + i32.const 12420 i32.add i32.load i32.const 32 @@ -1574,7 +1435,29 @@ else i32.const 2 end - call $~lib/rt/itcms/Object#linkTo + local.set $3 + local.get $2 + i32.load offset=8 + local.set $1 + local.get $0 + local.get $2 + local.get $3 + i32.or + i32.store offset=4 + local.get $0 + local.get $1 + i32.store offset=8 + local.get $1 + local.get $0 + local.get $1 + i32.load offset=4 + i32.const 3 + i32.and + i32.or + i32.store offset=4 + local.get $2 + local.get $0 + i32.store offset=8 ) (func $~lib/rt/itcms/__visit (param $0 i32) local.get $0 @@ -1607,102 +1490,55 @@ (local $5 i32) local.get $1 i32.load - local.tee $2 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 1968 - i32.const 273 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $2 i32.const -4 i32.and local.tee $2 - i32.const 1073741820 - i32.lt_u - i32.const 0 - local.get $2 - i32.const 12 - i32.ge_u - select - i32.eqz - if - i32.const 0 - i32.const 1968 - i32.const 275 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $2 i32.const 256 i32.lt_u if local.get $2 i32.const 4 i32.shr_u - local.set $2 + local.set $3 else local.get $2 i32.const 31 local.get $2 i32.clz i32.sub - local.tee $3 + local.tee $2 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor - local.set $2 - local.get $3 + local.set $3 + local.get $2 i32.const 7 i32.sub - local.set $3 - end - local.get $2 - i32.const 16 - i32.lt_u - i32.const 0 - local.get $3 - i32.const 23 - i32.lt_u - select - i32.eqz - if - i32.const 0 - i32.const 1968 - i32.const 288 - i32.const 14 - call $~lib/builtins/abort - unreachable + local.set $4 end local.get $1 i32.load offset=8 - local.set $4 + local.set $2 local.get $1 i32.load offset=4 local.tee $5 if local.get $5 - local.get $4 + local.get $2 i32.store offset=8 end - local.get $4 + local.get $2 if - local.get $4 + local.get $2 local.get $5 i32.store offset=4 end local.get $1 local.get $0 - local.get $2 local.get $3 + local.get $4 i32.const 4 i32.shl i32.add @@ -1713,32 +1549,32 @@ i32.eq if local.get $0 - local.get $2 local.get $3 + local.get $4 i32.const 4 i32.shl i32.add i32.const 2 i32.shl i32.add - local.get $4 + local.get $2 i32.store offset=96 - local.get $4 + local.get $2 i32.eqz if local.get $0 - local.get $3 + local.get $4 i32.const 2 i32.shl i32.add - local.tee $4 + local.tee $2 i32.load offset=4 i32.const -2 - local.get $2 + local.get $3 i32.rotl i32.and local.set $1 - local.get $4 + local.get $2 local.get $1 i32.store offset=4 local.get $1 @@ -1748,7 +1584,7 @@ local.get $0 i32.load i32.const -2 - local.get $3 + local.get $4 i32.rotl i32.and i32.store @@ -1765,29 +1601,8 @@ (local $7 i32) (local $8 i32) local.get $1 - i32.eqz - if - i32.const 0 - i32.const 1968 - i32.const 201 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 i32.load - local.tee $4 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 1968 - i32.const 203 - i32.const 14 - call $~lib/builtins/abort - unreachable - end + local.set $4 local.get $1 i32.const 4 i32.add @@ -1850,18 +1665,6 @@ local.tee $3 i32.load local.tee $7 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 1968 - i32.const 224 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - local.get $7 i32.const -4 i32.and i32.const 4 @@ -1873,7 +1676,7 @@ local.tee $8 i32.const 1073741820 i32.lt_u - if (result i32) + if local.get $0 local.get $3 call $~lib/rt/tlsf/removeBlock @@ -1886,57 +1689,23 @@ local.tee $4 i32.store local.get $3 - else - local.get $1 + local.set $1 end - local.set $1 end local.get $5 local.get $2 i32.const 2 i32.or i32.store - local.get $4 - i32.const -4 - i32.and - local.tee $3 - i32.const 1073741820 - i32.lt_u - i32.const 0 - local.get $3 - i32.const 12 - i32.ge_u - select - i32.eqz - if - i32.const 0 - i32.const 1968 - i32.const 239 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $5 - local.get $3 - local.get $1 - i32.const 4 - i32.add - i32.add - i32.ne - if - i32.const 0 - i32.const 1968 - i32.const 240 - i32.const 14 - call $~lib/builtins/abort - unreachable - end local.get $5 i32.const 4 i32.sub local.get $1 i32.store - local.get $3 + local.get $4 + i32.const -4 + i32.and + local.tee $3 i32.const 256 i32.lt_u if @@ -1962,23 +1731,6 @@ i32.sub local.set $6 end - local.get $3 - i32.const 16 - i32.lt_u - i32.const 0 - local.get $6 - i32.const 23 - i32.lt_u - select - i32.eqz - if - i32.const 0 - i32.const 1968 - i32.const 256 - i32.const 14 - call $~lib/builtins/abort - unreachable - end local.get $0 local.get $3 local.get $6 @@ -2037,18 +1789,6 @@ ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) - (local $4 i32) - local.get $1 - local.get $2 - i32.gt_u - if - i32.const 0 - i32.const 1968 - i32.const 381 - i32.const 14 - call $~lib/builtins/abort - unreachable - end local.get $1 i32.const 19 i32.add @@ -2064,19 +1804,6 @@ i32.load offset=1568 local.tee $2 if - local.get $1 - local.get $2 - i32.const 4 - i32.add - i32.lt_u - if - i32.const 0 - i32.const 1968 - i32.const 388 - i32.const 16 - call $~lib/builtins/abort - unreachable - end local.get $2 local.get $1 i32.const 16 @@ -2085,26 +1812,12 @@ if local.get $2 i32.load - local.set $4 + local.set $3 local.get $1 i32.const 16 i32.sub local.set $1 end - else - local.get $1 - local.get $0 - i32.const 1572 - i32.add - i32.lt_u - if - i32.const 0 - i32.const 1968 - i32.const 401 - i32.const 5 - call $~lib/builtins/abort - unreachable - end end local.get $1 i32.sub @@ -2115,7 +1828,7 @@ return end local.get $1 - local.get $4 + local.get $3 i32.const 2 i32.and local.get $2 @@ -2167,10 +1880,10 @@ if unreachable end - i32.const 22528 + i32.const 29040 i32.const 0 i32.store - i32.const 24096 + i32.const 30608 i32.const 0 i32.store loop $for-loop|0 @@ -2181,7 +1894,7 @@ local.get $1 i32.const 2 i32.shl - i32.const 22528 + i32.const 29040 i32.add i32.const 0 i32.store offset=4 @@ -2199,7 +1912,7 @@ i32.add i32.const 2 i32.shl - i32.const 22528 + i32.const 29040 i32.add i32.const 0 i32.store offset=96 @@ -2217,19 +1930,18 @@ br $for-loop|0 end end - i32.const 22528 - i32.const 24100 + i32.const 29040 + i32.const 30612 memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory - i32.const 22528 + i32.const 29040 global.set $~lib/rt/tlsf/ROOT ) (func $~lib/rt/itcms/step (result i32) (local $0 i32) (local $1 i32) - (local $2 i32) block $folding-inner0 block $break|0 block $case2|0 @@ -2271,7 +1983,12 @@ if local.get $0 local.get $1 - call $~lib/rt/itcms/Object#set:color + local.get $0 + i32.load offset=4 + i32.const -4 + i32.and + i32.or + i32.store offset=4 i32.const 0 global.set $~lib/rt/itcms/visitCount local.get $0 @@ -2302,7 +2019,7 @@ local.set $0 loop $while-continue|0 local.get $0 - i32.const 22524 + i32.const 29036 i32.lt_u if local.get $0 @@ -2334,7 +2051,12 @@ if local.get $0 local.get $1 - call $~lib/rt/itcms/Object#set:color + local.get $0 + i32.load offset=4 + i32.const -4 + i32.and + i32.or + i32.store offset=4 local.get $0 i32.const 20 i32.add @@ -2376,23 +2098,11 @@ i32.const -4 i32.and global.set $~lib/rt/itcms/iter - global.get $~lib/rt/itcms/white - i32.eqz local.get $0 i32.load offset=4 - i32.const 3 - i32.and - i32.ne - if - i32.const 0 - i32.const 1760 - i32.const 228 - i32.const 20 - call $~lib/builtins/abort - unreachable - end + drop local.get $0 - i32.const 22524 + i32.const 29036 i32.lt_u if local.get $0 @@ -2414,8 +2124,8 @@ local.get $0 i32.const 4 i32.add - local.tee $1 - i32.const 22524 + local.tee $0 + i32.const 29036 i32.ge_u if global.get $~lib/rt/tlsf/ROOT @@ -2423,42 +2133,32 @@ if call $~lib/rt/tlsf/initialize end - global.get $~lib/rt/tlsf/ROOT - local.get $1 + local.get $0 i32.const 4 i32.sub - local.set $0 - local.get $1 + local.set $1 + local.get $0 i32.const 15 i32.and i32.eqz i32.const 0 - local.get $1 + local.get $0 select - if (result i32) - local.get $0 - i32.load - i32.const 1 - i32.and - i32.eqz - else - i32.const 0 - end - i32.eqz if - i32.const 0 - i32.const 1968 - i32.const 565 - i32.const 3 - call $~lib/builtins/abort - unreachable + local.get $1 + i32.load + drop end - local.get $0 - local.get $0 + local.get $1 + local.tee $0 i32.load i32.const 1 i32.or + local.set $1 + local.get $0 + local.get $1 i32.store + global.get $~lib/rt/tlsf/ROOT local.get $0 call $~lib/rt/tlsf/insertBlock end @@ -2467,10 +2167,12 @@ return end global.get $~lib/rt/itcms/toSpace - global.get $~lib/rt/itcms/toSpace + local.tee $0 + local.get $0 i32.store offset=4 global.get $~lib/rt/itcms/toSpace - global.get $~lib/rt/itcms/toSpace + local.tee $0 + local.get $0 i32.store offset=8 i32.const 0 global.set $~lib/rt/itcms/state @@ -2491,28 +2193,28 @@ i32.shr_u local.set $1 else - i32.const 31 - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.add - i32.const 1 - i32.sub - local.get $1 local.get $1 i32.const 536870910 i32.lt_u - select - local.tee $1 + if + local.get $1 + i32.const 1 + i32.const 27 + local.get $1 + i32.clz + i32.sub + i32.shl + i32.add + i32.const 1 + i32.sub + local.set $1 + end + local.get $1 + i32.const 31 + local.get $1 i32.clz i32.sub - local.set $2 - local.get $1 - local.get $2 + local.tee $2 i32.const 4 i32.sub i32.shr_u @@ -2524,23 +2226,6 @@ i32.sub local.set $2 end - local.get $1 - i32.const 16 - i32.lt_u - i32.const 0 - local.get $2 - i32.const 23 - i32.lt_u - select - i32.eqz - if - i32.const 0 - i32.const 1968 - i32.const 334 - i32.const 14 - call $~lib/builtins/abort - unreachable - end local.get $0 local.get $2 i32.const 2 @@ -2579,26 +2264,15 @@ local.get $1 i32.ctz local.tee $1 + i32.const 4 + i32.shl + local.get $0 + local.get $1 i32.const 2 i32.shl i32.add i32.load offset=4 - local.tee $2 - i32.eqz - if - i32.const 0 - i32.const 1968 - i32.const 347 - i32.const 18 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $2 i32.ctz - local.get $1 - i32.const 4 - i32.shl i32.add i32.const 2 i32.shl @@ -2609,205 +2283,6 @@ end end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $1 - i32.const 1073741820 - i32.ge_u - if - i32.const 1696 - i32.const 1968 - i32.const 462 - i32.const 30 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 12 - local.get $1 - i32.const 19 - i32.add - i32.const -16 - i32.and - i32.const 4 - i32.sub - local.get $1 - i32.const 12 - i32.le_u - select - local.tee $2 - call $~lib/rt/tlsf/searchBlock - local.tee $1 - i32.eqz - if - i32.const 4 - memory.size - local.tee $1 - i32.const 16 - i32.shl - i32.const 4 - i32.sub - local.get $0 - i32.load offset=1568 - i32.ne - i32.shl - local.get $2 - i32.const 1 - i32.const 27 - local.get $2 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.get $2 - local.get $2 - i32.const 536870910 - i32.lt_u - select - i32.add - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.set $3 - local.get $1 - local.get $3 - local.get $1 - local.get $3 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $3 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $1 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - local.get $0 - local.get $2 - call $~lib/rt/tlsf/searchBlock - local.tee $1 - i32.eqz - if - i32.const 0 - i32.const 1968 - i32.const 500 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - end - local.get $2 - local.get $1 - i32.load - i32.const -4 - i32.and - i32.gt_u - if - i32.const 0 - i32.const 1968 - i32.const 502 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - call $~lib/rt/tlsf/removeBlock - local.get $1 - i32.load - local.set $3 - local.get $2 - i32.const 4 - i32.add - i32.const 15 - i32.and - if - i32.const 0 - i32.const 1968 - i32.const 361 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const -4 - i32.and - local.get $2 - i32.sub - local.tee $4 - i32.const 16 - i32.ge_u - if - local.get $1 - local.get $2 - local.get $3 - i32.const 2 - i32.and - i32.or - i32.store - local.get $2 - local.get $1 - i32.const 4 - i32.add - i32.add - local.tee $2 - local.get $4 - i32.const 4 - i32.sub - i32.const 1 - i32.or - i32.store - local.get $0 - local.get $2 - call $~lib/rt/tlsf/insertBlock - else - local.get $1 - local.get $3 - i32.const -2 - i32.and - i32.store - local.get $1 - i32.const 4 - i32.add - local.tee $0 - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.get $0 - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - i32.load - i32.const -3 - i32.and - i32.store - end - local.get $1 - ) (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 @@ -2968,12 +2443,16 @@ ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) local.get $0 i32.const 1073741804 i32.ge_u if - i32.const 1696 - i32.const 1760 + i32.const 1648 + i32.const 1712 i32.const 260 i32.const 31 call $~lib/builtins/abort @@ -2985,12 +2464,12 @@ if block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 - local.set $2 + local.set $3 loop $do-continue|0 - local.get $2 + local.get $3 call $~lib/rt/itcms/step i32.sub - local.set $2 + local.set $3 global.get $~lib/rt/itcms/state i32.eqz if @@ -3006,13 +2485,14 @@ global.set $~lib/rt/itcms/threshold br $__inlined_func$~lib/rt/itcms/interrupt end - local.get $2 + local.get $3 i32.const 0 i32.gt_s br_if $do-continue|0 end global.get $~lib/rt/itcms/total - global.get $~lib/rt/itcms/total + local.tee $3 + local.get $3 global.get $~lib/rt/itcms/threshold i32.sub i32.const 1024 @@ -3033,91 +2513,260 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT + local.set $3 local.get $2 - call $~lib/rt/tlsf/allocateBlock - local.tee $2 - local.get $1 - i32.store offset=12 - local.get $2 - local.get $0 - i32.store offset=16 - local.get $2 - global.get $~lib/rt/itcms/fromSpace - global.get $~lib/rt/itcms/white - call $~lib/rt/itcms/Object#linkTo - global.get $~lib/rt/itcms/total - local.get $2 - i32.load - i32.const -4 - i32.and - i32.const 4 - i32.add - i32.add - global.set $~lib/rt/itcms/total - local.get $2 - i32.const 20 - i32.add - local.tee $1 - local.get $0 - call $~lib/memory/memory.fill - local.get $1 - ) - (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - local.get $1 - i32.eqz - if - return - end - local.get $0 - i32.eqz + i32.const 1073741820 + i32.ge_u if - i32.const 0 - i32.const 1760 - i32.const 294 - i32.const 14 + i32.const 1648 + i32.const 1920 + i32.const 462 + i32.const 30 call $~lib/builtins/abort unreachable end - global.get $~lib/rt/itcms/white - local.get $1 - i32.const 20 - i32.sub - local.tee $1 - i32.load offset=4 - i32.const 3 - i32.and - i32.eq - if - local.get $0 - i32.const 20 - i32.sub - local.tee $0 - i32.load offset=4 - i32.const 3 + local.get $3 + local.tee $4 + local.get $2 + i32.const 12 + i32.le_u + if (result i32) + i32.const 12 + else + local.get $2 + i32.const 19 + i32.add + i32.const -16 i32.and - local.tee $3 - local.set $4 + i32.const 4 + i32.sub + end + local.tee $3 + call $~lib/rt/tlsf/searchBlock + local.tee $2 + i32.eqz + if local.get $3 - global.get $~lib/rt/itcms/white - i32.eqz - i32.eq - if - local.get $2 - if - local.get $0 - call $~lib/rt/itcms/Object#makeGray - else - local.get $1 - call $~lib/rt/itcms/Object#makeGray - end - else - global.get $~lib/rt/itcms/state - i32.const 1 + i32.const 536870910 + i32.lt_u + if (result i32) + local.get $3 + i32.const 1 + i32.const 27 + local.get $3 + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + i32.add + else + local.get $3 + end + i32.const 4 + memory.size + local.tee $2 + i32.const 16 + i32.shl + i32.const 4 + i32.sub + local.get $4 + i32.load offset=1568 + i32.ne + i32.shl + i32.add + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.set $5 + local.get $2 + local.get $5 + local.get $2 + local.get $5 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $5 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $4 + local.get $2 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + local.get $4 + local.get $3 + call $~lib/rt/tlsf/searchBlock + local.set $2 + end + local.get $2 + i32.load + drop + local.get $4 + local.get $2 + call $~lib/rt/tlsf/removeBlock + local.get $2 + i32.load + local.tee $5 + i32.const -4 + i32.and + local.get $3 + i32.sub + local.tee $6 + i32.const 16 + i32.ge_u + if + local.get $2 + local.get $3 + local.get $5 + i32.const 2 + i32.and + i32.or + i32.store + local.get $3 + local.get $2 + i32.const 4 + i32.add + i32.add + local.tee $3 + local.get $6 + i32.const 4 + i32.sub + i32.const 1 + i32.or + i32.store + local.get $4 + local.get $3 + call $~lib/rt/tlsf/insertBlock + else + local.get $2 + local.get $5 + i32.const -2 + i32.and + i32.store + local.get $2 + i32.const 4 + i32.add + local.tee $3 + local.get $2 + i32.load + i32.const -4 + i32.and + i32.add + local.get $3 + local.get $2 + i32.load + i32.const -4 + i32.and + i32.add + i32.load + i32.const -3 + i32.and + i32.store + end + local.get $2 + local.get $1 + i32.store offset=12 + local.get $2 + local.get $0 + i32.store offset=16 + global.get $~lib/rt/itcms/fromSpace + local.tee $3 + i32.load offset=8 + local.set $1 + local.get $2 + local.get $3 + global.get $~lib/rt/itcms/white + i32.or + i32.store offset=4 + local.get $2 + local.get $1 + i32.store offset=8 + local.get $1 + local.get $2 + local.get $1 + i32.load offset=4 + i32.const 3 + i32.and + i32.or + i32.store offset=4 + local.get $3 + local.get $2 + i32.store offset=8 + global.get $~lib/rt/itcms/total + local.get $2 + i32.load + i32.const -4 + i32.and + i32.const 4 + i32.add + i32.add + global.set $~lib/rt/itcms/total + local.get $2 + i32.const 20 + i32.add + local.tee $1 + local.get $0 + call $~lib/memory/memory.fill + local.get $1 + ) + (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + local.get $1 + i32.eqz + if + return + end + global.get $~lib/rt/itcms/white + local.get $1 + i32.const 20 + i32.sub + local.tee $1 + i32.load offset=4 + i32.const 3 + i32.and + i32.eq + if + local.get $0 + i32.const 20 + i32.sub + local.tee $0 + i32.load offset=4 + i32.const 3 + i32.and + local.tee $3 + global.get $~lib/rt/itcms/white + i32.eqz + i32.eq + if + local.get $2 + if + local.get $0 + call $~lib/rt/itcms/Object#makeGray + else + local.get $1 + call $~lib/rt/itcms/Object#makeGray + end + else + global.get $~lib/rt/itcms/state + i32.const 1 i32.eq i32.const 0 - local.get $4 + local.get $3 i32.const 3 i32.eq select @@ -3128,17 +2777,8 @@ end end ) - (func $~lib/arraybuffer/ArrayBufferView#set:buffer (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - i32.store - local.get $0 - local.get $1 - i32.const 0 - call $~lib/rt/itcms/__link - ) (func $start:assembly/vec3~anonymous|0 (result i32) - i32.const 2032 + i32.const 1984 ) (func $assembly/vec4/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 @@ -3416,7 +3056,7 @@ f64.add ) (func $start:assembly/vec4~anonymous|0 (result i32) - i32.const 2320 + i32.const 2272 ) (func $assembly/vec4/copy (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -4042,7 +3682,7 @@ i32.wrap_i64 i32.const 3 i32.shl - i32.const 2720 + i32.const 2672 i32.add local.tee $7 i64.load @@ -4310,7 +3950,8 @@ (local $4 f64) (local $5 i32) (local $6 i32) - (local $7 f64) + (local $7 i32) + (local $8 f64) local.get $0 i64.reinterpret_f64 local.tee $2 @@ -4387,11 +4028,89 @@ i32.wrap_i64 i32.const 2147483647 i32.and - local.tee $5 - i32.const 1094263291 + local.tee $7 + i32.const 1073928572 i32.lt_u if + i32.const 1 + local.set $5 + local.get $6 + if (result f64) + local.get $0 + f64.const 1.5707963267341256 + f64.add + local.set $0 + i32.const -1 + local.set $5 + local.get $7 + i32.const 1073291771 + i32.ne + if (result f64) + local.get $0 + local.get $0 + f64.const 6.077100506506192e-11 + f64.add + local.tee $0 + f64.sub + f64.const 6.077100506506192e-11 + f64.add + else + local.get $0 + f64.const 6.077100506303966e-11 + f64.add + local.tee $3 + f64.const 2.0222662487959506e-21 + f64.add + local.set $0 + local.get $3 + local.get $0 + f64.sub + f64.const 2.0222662487959506e-21 + f64.add + end + else + local.get $0 + f64.const 1.5707963267341256 + f64.sub + local.set $0 + local.get $7 + i32.const 1073291771 + i32.ne + if (result f64) + local.get $0 + local.get $0 + f64.const 6.077100506506192e-11 + f64.sub + local.tee $0 + f64.sub + f64.const 6.077100506506192e-11 + f64.sub + else + local.get $0 + f64.const 6.077100506303966e-11 + f64.sub + local.tee $3 + f64.const 2.0222662487959506e-21 + f64.sub + local.set $0 + local.get $3 + local.get $0 + f64.sub + f64.const 2.0222662487959506e-21 + f64.sub + end + end + local.get $0 + global.set $~lib/math/rempio2_y0 + global.set $~lib/math/rempio2_y1 local.get $5 + br $~lib/math/rempio2|inlined.0 + end + local.get $7 + i32.const 1094263291 + i32.lt_u + if + local.get $7 i32.const 20 i32.shr_u local.tee $6 @@ -4519,9 +4238,9 @@ f64.mul local.tee $1 f64.sub - local.tee $7 + local.tee $8 f64.const 1 - local.get $7 + local.get $8 f64.sub local.get $1 f64.sub @@ -4622,7 +4341,8 @@ (local $4 f64) (local $5 i32) (local $6 i32) - (local $7 f64) + (local $7 i32) + (local $8 f64) local.get $0 i64.reinterpret_f64 local.tee $2 @@ -4716,11 +4436,89 @@ i32.wrap_i64 i32.const 2147483647 i32.and - local.tee $5 - i32.const 1094263291 + local.tee $7 + i32.const 1073928572 i32.lt_u if + i32.const 1 + local.set $5 + local.get $6 + if (result f64) + local.get $0 + f64.const 1.5707963267341256 + f64.add + local.set $0 + i32.const -1 + local.set $5 + local.get $7 + i32.const 1073291771 + i32.ne + if (result f64) + local.get $0 + local.get $0 + f64.const 6.077100506506192e-11 + f64.add + local.tee $0 + f64.sub + f64.const 6.077100506506192e-11 + f64.add + else + local.get $0 + f64.const 6.077100506303966e-11 + f64.add + local.tee $3 + f64.const 2.0222662487959506e-21 + f64.add + local.set $0 + local.get $3 + local.get $0 + f64.sub + f64.const 2.0222662487959506e-21 + f64.add + end + else + local.get $0 + f64.const 1.5707963267341256 + f64.sub + local.set $0 + local.get $7 + i32.const 1073291771 + i32.ne + if (result f64) + local.get $0 + local.get $0 + f64.const 6.077100506506192e-11 + f64.sub + local.tee $0 + f64.sub + f64.const 6.077100506506192e-11 + f64.sub + else + local.get $0 + f64.const 6.077100506303966e-11 + f64.sub + local.tee $3 + f64.const 2.0222662487959506e-21 + f64.sub + local.set $0 + local.get $3 + local.get $0 + f64.sub + f64.const 2.0222662487959506e-21 + f64.sub + end + end + local.get $0 + global.set $~lib/math/rempio2_y0 + global.set $~lib/math/rempio2_y1 local.get $5 + br $~lib/math/rempio2|inlined.1 + end + local.get $7 + i32.const 1094263291 + i32.lt_u + if + local.get $7 i32.const 20 i32.shr_u local.tee $6 @@ -4893,9 +4691,9 @@ f64.mul local.tee $1 f64.sub - local.tee $7 + local.tee $8 f64.const 1 - local.get $7 + local.get $8 f64.sub local.get $1 f64.sub @@ -4985,50 +4783,7 @@ local.get $0 ) (func $start:assembly/quat~anonymous|0 (result i32) - i32.const 2944 - ) - (func $~lib/math/R (param $0 f64) (result f64) - local.get $0 - local.get $0 - local.get $0 - local.get $0 - local.get $0 - local.get $0 - f64.const 3.479331075960212e-05 - f64.mul - f64.const 7.915349942898145e-04 - f64.add - f64.mul - f64.const -0.04005553450067941 - f64.add - f64.mul - f64.const 0.20121253213486293 - f64.add - f64.mul - f64.const -0.3255658186224009 - f64.add - f64.mul - f64.const 0.16666666666666666 - f64.add - f64.mul - local.get $0 - local.get $0 - local.get $0 - local.get $0 - f64.const 0.07703815055590194 - f64.mul - f64.const -0.6882839716054533 - f64.add - f64.mul - f64.const 2.0209457602335057 - f64.add - f64.mul - f64.const -2.403394911734414 - f64.add - f64.mul - f64.const 1 - f64.add - f64.div + i32.const 2896 ) (func $~lib/math/NativeMath.acos (param $0 f64) (result f64) (local $1 f64) @@ -5091,7 +4846,47 @@ local.get $0 local.get $0 f64.mul - call $~lib/math/R + local.tee $0 + local.get $0 + local.get $0 + local.get $0 + local.get $0 + local.get $0 + f64.const 3.479331075960212e-05 + f64.mul + f64.const 7.915349942898145e-04 + f64.add + f64.mul + f64.const -0.04005553450067941 + f64.add + f64.mul + f64.const 0.20121253213486293 + f64.add + f64.mul + f64.const -0.3255658186224009 + f64.add + f64.mul + f64.const 0.16666666666666666 + f64.add + f64.mul + local.get $0 + local.get $0 + local.get $0 + local.get $0 + f64.const 0.07703815055590194 + f64.mul + f64.const -0.6882839716054533 + f64.add + f64.mul + f64.const 2.0209457602335057 + f64.add + f64.mul + f64.const -2.403394911734414 + f64.add + f64.mul + f64.const 1 + f64.add + f64.div f64.mul f64.sub f64.sub @@ -5102,18 +4897,59 @@ i32.const 31 i32.shr_u if - f64.const 1.5707963267948966 local.get $0 f64.const 0.5 f64.mul f64.const 0.5 f64.add local.tee $0 - f64.sqrt - local.tee $1 local.get $0 - call $~lib/math/R + local.get $0 + local.get $0 + local.get $0 + local.get $0 + f64.const 3.479331075960212e-05 + f64.mul + f64.const 7.915349942898145e-04 + f64.add + f64.mul + f64.const -0.04005553450067941 + f64.add + f64.mul + f64.const 0.20121253213486293 + f64.add + f64.mul + f64.const -0.3255658186224009 + f64.add + f64.mul + f64.const 0.16666666666666666 + f64.add + f64.mul + local.get $0 + local.get $0 + local.get $0 + local.get $0 + f64.const 0.07703815055590194 + f64.mul + f64.const -0.6882839716054533 + f64.add + f64.mul + f64.const 2.0209457602335057 + f64.add + f64.mul + f64.const -2.403394911734414 + f64.add + f64.mul + f64.const 1 + f64.add + f64.div + local.set $1 + f64.const 1.5707963267948966 + local.get $0 + f64.sqrt + local.tee $0 local.get $1 + local.get $0 f64.mul f64.const 6.123233995736766e-17 f64.sub @@ -5129,25 +4965,64 @@ f64.const 0.5 f64.mul f64.sub - local.tee $1 + local.tee $0 f64.sqrt local.tee $4 i64.reinterpret_f64 i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $0 - local.get $1 - call $~lib/math/R - local.get $4 + local.tee $1 + local.get $0 + local.get $0 + local.get $0 + local.get $0 + local.get $0 + local.get $0 + f64.const 3.479331075960212e-05 f64.mul - local.get $1 + f64.const 7.915349942898145e-04 + f64.add + f64.mul + f64.const -0.04005553450067941 + f64.add + f64.mul + f64.const 0.20121253213486293 + f64.add + f64.mul + f64.const -0.3255658186224009 + f64.add + f64.mul + f64.const 0.16666666666666666 + f64.add + f64.mul + local.get $0 + local.get $0 local.get $0 local.get $0 + f64.const 0.07703815055590194 f64.mul - f64.sub + f64.const -0.6882839716054533 + f64.add + f64.mul + f64.const 2.0209457602335057 + f64.add + f64.mul + f64.const -2.403394911734414 + f64.add + f64.mul + f64.const 1 + f64.add + f64.div local.get $4 + f64.mul local.get $0 + local.get $1 + local.get $1 + f64.mul + f64.sub + local.get $4 + local.get $1 f64.add f64.div f64.add @@ -5307,7 +5182,7 @@ local.get $0 ) (func $start:assembly/quat~anonymous|1 (result i32) - i32.const 3008 + i32.const 2960 ) (func $assembly/quat/fromMat3 (param $0 i32) (param $1 i32) (result i32) (local $2 f64) @@ -5503,7 +5378,7 @@ local.get $0 ) (func $start:assembly/quat~anonymous|2 (result i32) - i32.const 3072 + i32.const 3024 ) (func $assembly/quat2/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 f64) @@ -5982,6 +5857,7 @@ (local $4 i32) (local $5 f64) (local $6 i32) + (local $7 i32) local.get $0 i64.reinterpret_f64 local.tee $2 @@ -6028,11 +5904,89 @@ i32.wrap_i64 i32.const 2147483647 i32.and - local.tee $4 - i32.const 1094263291 + local.tee $7 + i32.const 1073928572 i32.lt_u if + i32.const 1 + local.set $4 + local.get $6 + if (result f64) + local.get $0 + f64.const 1.5707963267341256 + f64.add + local.set $0 + i32.const -1 + local.set $4 + local.get $7 + i32.const 1073291771 + i32.ne + if (result f64) + local.get $0 + local.get $0 + f64.const 6.077100506506192e-11 + f64.add + local.tee $0 + f64.sub + f64.const 6.077100506506192e-11 + f64.add + else + local.get $0 + f64.const 6.077100506303966e-11 + f64.add + local.tee $3 + f64.const 2.0222662487959506e-21 + f64.add + local.set $0 + local.get $3 + local.get $0 + f64.sub + f64.const 2.0222662487959506e-21 + f64.add + end + else + local.get $0 + f64.const 1.5707963267341256 + f64.sub + local.set $0 + local.get $7 + i32.const 1073291771 + i32.ne + if (result f64) + local.get $0 + local.get $0 + f64.const 6.077100506506192e-11 + f64.sub + local.tee $0 + f64.sub + f64.const 6.077100506506192e-11 + f64.sub + else + local.get $0 + f64.const 6.077100506303966e-11 + f64.sub + local.tee $3 + f64.const 2.0222662487959506e-21 + f64.sub + local.set $0 + local.get $3 + local.get $0 + f64.sub + f64.const 2.0222662487959506e-21 + f64.sub + end + end + local.get $0 + global.set $~lib/math/rempio2_y0 + global.set $~lib/math/rempio2_y1 local.get $4 + br $~lib/math/rempio2|inlined.2 + end + local.get $7 + i32.const 1094263291 + i32.lt_u + if + local.get $7 i32.const 20 i32.shr_u local.tee $6 @@ -6041,15 +5995,15 @@ f64.const 0.6366197723675814 f64.mul f64.nearest - local.tee $5 + local.tee $3 f64.const 1.5707963267341256 f64.mul f64.sub local.tee $0 - local.get $5 + local.get $3 f64.const 6.077100506506192e-11 f64.mul - local.tee $3 + local.tee $5 f64.sub local.tee $1 i64.reinterpret_f64 @@ -6064,25 +6018,25 @@ i32.const 16 i32.gt_u if - local.get $5 + local.get $3 f64.const 2.0222662487959506e-21 f64.mul local.get $0 local.get $0 - local.get $5 + local.get $3 f64.const 6.077100506303966e-11 f64.mul - local.tee $3 + local.tee $5 f64.sub local.tee $0 f64.sub - local.get $3 + local.get $5 f64.sub f64.sub - local.set $3 + local.set $5 local.get $6 local.get $0 - local.get $3 + local.get $5 f64.sub local.tee $1 i64.reinterpret_f64 @@ -6097,24 +6051,24 @@ i32.const 49 i32.gt_u if (result f64) - local.get $5 + local.get $3 f64.const 8.4784276603689e-32 f64.mul local.get $0 local.get $0 - local.get $5 + local.get $3 f64.const 2.0222662487111665e-21 f64.mul - local.tee $3 + local.tee $5 f64.sub local.tee $0 f64.sub - local.get $3 + local.get $5 f64.sub f64.sub - local.set $3 + local.set $5 local.get $0 - local.get $3 + local.get $5 f64.sub else local.get $1 @@ -6126,10 +6080,10 @@ local.get $0 local.get $1 f64.sub - local.get $3 + local.get $5 f64.sub global.set $~lib/math/rempio2_y1 - local.get $5 + local.get $3 i32.trunc_f64_s br $~lib/math/rempio2|inlined.2 end @@ -7261,184 +7215,181 @@ call $~lib/typedarray/Float64Array#__set local.get $0 ) - (func $~lib/math/NativeMath.hypot (param $0 f64) (param $1 f64) (result f64) + (func $assembly/vec2/length (param $0 i32) (result f64) + (local $1 i64) (local $2 i64) (local $3 i64) - (local $4 i64) + (local $4 f64) (local $5 f64) - (local $6 i32) + (local $6 f64) (local $7 f64) - (local $8 i32) - (local $9 f64) + (local $8 f64) + (local $9 i32) (local $10 f64) (local $11 f64) - local.get $1 + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get i64.reinterpret_f64 i64.const 9223372036854775807 i64.and - local.tee $2 - local.get $0 + local.tee $1 + local.get $4 i64.reinterpret_f64 i64.const 9223372036854775807 i64.and - local.tee $3 + local.tee $2 i64.gt_u if - local.get $3 local.get $2 - local.set $3 + local.get $1 local.set $2 + local.set $1 end local.get $2 - f64.reinterpret_i64 - local.set $1 - local.get $2 i64.const 52 i64.shr_u i32.wrap_i64 - local.tee $6 - i32.const 2047 - i32.eq - if - local.get $1 - return - end - local.get $3 - f64.reinterpret_i64 local.set $0 - i32.const 1 - local.get $2 - i64.eqz - local.get $3 - i64.const 52 - i64.shr_u - i32.wrap_i64 - local.tee $8 - i32.const 2047 - i32.eq - select - if - local.get $0 - return - end - local.get $8 - local.get $6 - i32.sub - i32.const 64 - i32.gt_s - if - local.get $0 + local.get $1 + f64.reinterpret_i64 + local.set $5 + block $__inlined_func$~lib/math/NativeMath.hypot (result f64) + local.get $5 local.get $1 - f64.add - return - end - f64.const 1 - local.set $7 - local.get $8 - i32.const 1533 - i32.gt_u - if (result f64) - f64.const 5260135901548373507240989e186 - local.set $7 + i64.const 52 + i64.shr_u + i32.wrap_i64 + local.tee $9 + i32.const 2047 + i32.eq + br_if $__inlined_func$~lib/math/NativeMath.hypot + drop + local.get $2 + f64.reinterpret_i64 + local.tee $4 + i32.const 1 local.get $1 - f64.const 1.90109156629516e-211 - f64.mul - local.set $1 + i64.eqz local.get $0 - f64.const 1.90109156629516e-211 - f64.mul - else - local.get $6 - i32.const 573 - i32.lt_u + i32.const 2047 + i32.eq + select + br_if $__inlined_func$~lib/math/NativeMath.hypot + drop + local.get $4 + local.get $5 + f64.add + local.get $0 + local.get $9 + i32.sub + i32.const 64 + i32.gt_s + br_if $__inlined_func$~lib/math/NativeMath.hypot + drop + f64.const 1 + local.set $8 + local.get $0 + i32.const 1533 + i32.gt_u if (result f64) - f64.const 1.90109156629516e-211 - local.set $7 - local.get $1 f64.const 5260135901548373507240989e186 + local.set $8 + local.get $5 + f64.const 1.90109156629516e-211 f64.mul - local.set $1 - local.get $0 - f64.const 5260135901548373507240989e186 + local.set $5 + local.get $4 + f64.const 1.90109156629516e-211 f64.mul else - local.get $0 + local.get $9 + i32.const 573 + i32.lt_u + if (result f64) + f64.const 1.90109156629516e-211 + local.set $8 + local.get $5 + f64.const 5260135901548373507240989e186 + f64.mul + local.set $5 + local.get $4 + f64.const 5260135901548373507240989e186 + f64.mul + else + local.get $4 + end end + local.set $4 + local.get $5 + local.get $5 + local.get $5 + f64.const 134217729 + f64.mul + local.tee $6 + f64.sub + local.get $6 + f64.add + local.tee $6 + f64.sub + local.set $10 + local.get $4 + local.get $4 + local.get $4 + f64.const 134217729 + f64.mul + local.tee $7 + f64.sub + local.get $7 + f64.add + local.tee $7 + f64.sub + local.set $11 + local.get $8 + local.get $6 + local.get $6 + f64.mul + local.get $5 + local.get $5 + f64.mul + local.tee $5 + f64.sub + local.get $6 + local.get $6 + f64.add + local.get $10 + f64.add + local.get $10 + f64.mul + f64.add + local.get $7 + local.get $7 + f64.mul + local.get $4 + local.get $4 + f64.mul + local.tee $4 + f64.sub + local.get $7 + local.get $7 + f64.add + local.get $11 + f64.add + local.get $11 + f64.mul + f64.add + f64.add + local.get $5 + f64.add + local.get $4 + f64.add + f64.sqrt + f64.mul end - local.set $0 - local.get $1 - local.get $1 - local.get $1 - f64.const 134217729 - f64.mul - local.tee $11 - f64.sub - local.get $11 - f64.add - local.tee $10 - f64.sub - local.set $5 - local.get $0 - local.get $0 - local.get $0 - f64.const 134217729 - f64.mul - local.tee $11 - f64.sub - local.get $11 - f64.add - local.tee $9 - f64.sub - local.set $11 - local.get $7 - local.get $10 - local.get $10 - f64.mul - local.get $1 - local.get $1 - f64.mul - local.tee $1 - f64.sub - local.get $10 - local.get $10 - f64.add - local.get $5 - f64.add - local.get $5 - f64.mul - f64.add - local.get $9 - local.get $9 - f64.mul - local.get $0 - local.get $0 - f64.mul - local.tee $0 - f64.sub - local.get $9 - local.get $9 - f64.add - local.get $11 - f64.add - local.get $11 - f64.mul - f64.add - f64.add - local.get $1 - f64.add - local.get $0 - f64.add - f64.sqrt - f64.mul - ) - (func $assembly/vec2/length (param $0 i32) (result f64) - local.get $0 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.get $0 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - call $~lib/math/NativeMath.hypot ) (func $assembly/vec2/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 @@ -7581,7 +7532,7 @@ f64.add ) (func $start:assembly/vec2~anonymous|0 (result i32) - i32.const 3616 + i32.const 3568 ) (func $assembly/mat2/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 f64) @@ -7686,48 +7637,6 @@ f64.mul f64.le ) - (func $~lib/util/number/decimalCount32 (param $0 i32) (result i32) - local.get $0 - i32.const 10 - i32.ge_u - i32.const 1 - i32.add - local.get $0 - i32.const 10000 - i32.ge_u - i32.const 3 - i32.add - local.get $0 - i32.const 1000 - i32.ge_u - i32.add - local.get $0 - i32.const 100 - i32.lt_u - select - local.get $0 - i32.const 1000000 - i32.ge_u - i32.const 6 - i32.add - local.get $0 - i32.const 1000000000 - i32.ge_u - i32.const 8 - i32.add - local.get $0 - i32.const 100000000 - i32.ge_u - i32.add - local.get $0 - i32.const 10000000 - i32.lt_u - select - local.get $0 - i32.const 100000 - i32.lt_u - select - ) (func $~lib/util/number/genDigits (param $0 i64) (param $1 i32) (param $2 i64) (param $3 i32) (param $4 i64) (param $5 i32) (result i32) (local $6 i64) (local $7 i32) @@ -7746,6 +7655,7 @@ i32.sub local.tee $9 i64.extend_i32_s + local.tee $0 i64.shl local.tee $10 i64.const 1 @@ -7754,12 +7664,57 @@ i64.and local.set $6 local.get $2 - local.get $9 - i64.extend_i32_s + local.get $0 i64.shr_u i32.wrap_i64 local.tee $1 - call $~lib/util/number/decimalCount32 + local.set $3 + local.get $1 + i32.const 100000 + i32.lt_u + if (result i32) + local.get $3 + i32.const 100 + i32.lt_u + if (result i32) + local.get $3 + i32.const 10 + i32.ge_u + i32.const 1 + i32.add + else + local.get $3 + i32.const 10000 + i32.ge_u + i32.const 3 + i32.add + local.get $3 + i32.const 1000 + i32.ge_u + i32.add + end + else + local.get $3 + i32.const 10000000 + i32.lt_u + if (result i32) + local.get $3 + i32.const 1000000 + i32.ge_u + i32.const 6 + i32.add + else + local.get $3 + i32.const 1000000000 + i32.ge_u + i32.const 8 + i32.add + local.get $3 + i32.const 100000000 + i32.ge_u + i32.add + end + end local.set $7 loop $while-continue|0 local.get $7 @@ -7889,7 +7844,7 @@ local.get $5 i32.const 1 i32.shl - i32.const 4048 + i32.const 4000 i32.add local.get $3 i32.const 65535 @@ -7924,7 +7879,7 @@ local.get $7 i32.const 2 i32.shl - i32.const 4976 + i32.const 4928 i32.add i64.load32_u local.get $9 @@ -7934,28 +7889,12 @@ local.get $5 i32.const 1 i32.shl - i32.const 4046 + i32.const 3998 i32.add - local.tee $3 + local.tee $7 i32.load16_u - local.set $1 + local.set $3 loop $while-continue|3 - i32.const 1 - local.get $8 - local.get $0 - i64.sub - local.get $0 - local.get $2 - i64.add - local.tee $6 - local.get $8 - i64.sub - i64.gt_u - local.get $6 - local.get $8 - i64.lt_u - select - i32.const 0 local.get $2 local.get $4 local.get $0 @@ -7966,12 +7905,30 @@ local.get $8 i64.lt_u select - select + if (result i32) + i32.const 1 + local.get $8 + local.get $0 + i64.sub + local.get $0 + local.get $2 + i64.add + local.tee $6 + local.get $8 + i64.sub + i64.gt_u + local.get $6 + local.get $8 + i64.lt_u + select + else + i32.const 0 + end if - local.get $1 + local.get $3 i32.const 1 i32.sub - local.set $1 + local.set $3 local.get $0 local.get $2 i64.add @@ -7979,8 +7936,8 @@ br $while-continue|3 end end + local.get $7 local.get $3 - local.get $1 i32.store16 local.get $5 return @@ -8012,7 +7969,7 @@ local.get $5 i32.const 1 i32.shl - i32.const 4048 + i32.const 4000 i32.add local.get $6 i32.wrap_i64 @@ -8050,7 +8007,7 @@ i32.sub i32.const 2 i32.shl - i32.const 4976 + i32.const 4928 i32.add i64.load32_u i64.mul @@ -8058,28 +8015,12 @@ local.get $5 i32.const 1 i32.shl - i32.const 4046 + i32.const 3998 i32.add - local.tee $3 + local.tee $7 i32.load16_u - local.set $1 + local.set $3 loop $while-continue|6 - i32.const 1 - local.get $2 - local.get $0 - i64.sub - local.get $0 - local.get $10 - i64.add - local.tee $6 - local.get $2 - i64.sub - i64.gt_u - local.get $2 - local.get $6 - i64.gt_u - select - i32.const 0 local.get $10 local.get $4 local.get $0 @@ -8090,12 +8031,30 @@ local.get $2 i64.lt_u select - select + if (result i32) + i32.const 1 + local.get $2 + local.get $0 + i64.sub + local.get $0 + local.get $10 + i64.add + local.tee $6 + local.get $2 + i64.sub + i64.gt_u + local.get $2 + local.get $6 + i64.gt_u + select + else + i32.const 0 + end if - local.get $1 + local.get $3 i32.const 1 i32.sub - local.set $1 + local.set $3 local.get $0 local.get $10 i64.add @@ -8103,468 +8062,1421 @@ br $while-continue|6 end end + local.get $7 local.get $3 - local.get $1 i32.store16 local.get $5 ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $2 - local.set $4 - local.get $0 - local.get $1 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 - local.get $0 + (local $5 i32) + loop $while-continue|0 local.get $1 - i32.lt_u + i32.const 3 + i32.and + i32.const 0 + local.get $2 + select if - local.get $1 - i32.const 7 - i32.and local.get $0 - i32.const 7 - i32.and - i32.eq + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $3 + local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|0 + end + end + local.get $0 + i32.const 3 + i32.and + i32.eqz + if + loop $while-continue|1 + local.get $2 + i32.const 16 + i32.ge_u if - loop $while-continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.set $4 + local.get $0 + local.get $1 + i32.load + i32.store + local.get $0 + local.get $1 + i32.load offset=4 + i32.store offset=4 + local.get $0 + local.get $1 + i32.load offset=8 + i32.store offset=8 + local.get $0 + local.get $1 + i32.load offset=12 + i32.store offset=12 + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + br $while-continue|1 + end + end + local.get $2 + i32.const 8 + i32.and + if + local.get $0 + local.get $1 + i32.load + i32.store + local.get $0 + local.get $1 + i32.load offset=4 + i32.store offset=4 + local.get $1 + i32.const 8 + i32.add + local.set $1 + local.get $0 + i32.const 8 + i32.add + local.set $0 + end + local.get $2 + i32.const 4 + i32.and + if + local.get $0 + local.get $1 + i32.load + i32.store + local.get $1 + i32.const 4 + i32.add + local.set $1 + local.get $0 + i32.const 4 + i32.add + local.set $0 + end + local.get $2 + i32.const 2 + i32.and + if + local.get $0 + local.get $1 + i32.load16_u + i32.store16 + local.get $1 + i32.const 2 + i32.add + local.set $1 + local.get $0 + i32.const 2 + i32.add + local.set $0 + end + local.get $2 + i32.const 1 + i32.and + if + local.get $0 + local.get $1 + i32.load8_u + i32.store8 + end + return + end + local.get $2 + i32.const 32 + i32.ge_u + if + block $break|2 + block $case2|2 + block $case1|2 + block $case0|2 local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 + i32.const 3 + i32.and i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $4 - i32.const 8 - i32.ge_u - if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $4 - i32.const 8 i32.sub - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $while-continue|1 + br_table $case0|2 $case1|2 $case2|2 $break|2 end - end - end - loop $while-continue|2 - local.get $4 - if + local.get $1 + i32.load + local.set $5 + local.get $0 + local.get $1 + i32.load8_u + i32.store8 local.get $0 - local.tee $2 i32.const 1 i32.add - local.set $0 + local.tee $0 local.get $1 - local.tee $3 i32.const 1 i32.add - local.set $1 - local.get $2 - local.get $3 + local.tee $1 i32.load8_u i32.store8 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - br $while-continue|2 - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 local.get $0 - local.get $4 + local.tee $4 + i32.const 2 i32.add - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 + local.set $0 + local.get $1 + local.tee $3 + i32.const 2 + i32.add + local.set $1 + local.get $4 + local.get $3 + i32.load8_u offset=1 + i32.store8 offset=1 + local.get $2 + i32.const 3 + i32.sub + local.set $2 + loop $while-continue|3 + local.get $2 + i32.const 17 + i32.ge_u + if + local.get $0 + local.get $1 + i32.load offset=1 + local.tee $3 + i32.const 8 + i32.shl + local.get $5 + i32.const 24 + i32.shr_u + i32.or + i32.store + local.get $0 + local.get $3 + i32.const 24 + i32.shr_u + local.get $1 + i32.load offset=5 + local.tee $3 + i32.const 8 + i32.shl + i32.or + i32.store offset=4 + local.get $0 + local.get $3 + i32.const 24 + i32.shr_u + local.get $1 + i32.load offset=9 + local.tee $3 + i32.const 8 + i32.shl + i32.or + i32.store offset=8 + local.get $0 + local.get $1 + i32.load offset=13 + local.tee $5 + i32.const 8 + i32.shl + local.get $3 + i32.const 24 + i32.shr_u + i32.or + i32.store offset=12 + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + br $while-continue|3 + end end + br $break|2 end + local.get $1 + i32.load + local.set $5 + local.get $0 + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + local.tee $4 + i32.const 2 + i32.add + local.set $0 + local.get $1 + local.tee $3 + i32.const 2 + i32.add + local.set $1 + local.get $4 + local.get $3 + i32.load8_u offset=1 + i32.store8 offset=1 + local.get $2 + i32.const 2 + i32.sub + local.set $2 loop $while-continue|4 - local.get $4 - i32.const 8 + local.get $2 + i32.const 18 i32.ge_u if - local.get $4 - i32.const 8 - i32.sub - local.tee $4 local.get $0 - i32.add local.get $1 - local.get $4 + i32.load offset=2 + local.tee $3 + i32.const 16 + i32.shl + local.get $5 + i32.const 16 + i32.shr_u + i32.or + i32.store + local.get $0 + local.get $3 + i32.const 16 + i32.shr_u + local.get $1 + i32.load offset=6 + local.tee $3 + i32.const 16 + i32.shl + i32.or + i32.store offset=4 + local.get $0 + local.get $3 + i32.const 16 + i32.shr_u + local.get $1 + i32.load offset=10 + local.tee $3 + i32.const 16 + i32.shl + i32.or + i32.store offset=8 + local.get $0 + local.get $1 + i32.load offset=14 + local.tee $5 + i32.const 16 + i32.shl + local.get $3 + i32.const 16 + i32.shr_u + i32.or + i32.store offset=12 + local.get $1 + i32.const 16 i32.add - i64.load - i64.store + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 br $while-continue|4 end end + br $break|2 end + local.get $1 + i32.load + local.set $5 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $3 + local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 loop $while-continue|5 - local.get $4 + local.get $2 + i32.const 19 + i32.ge_u if - local.get $4 - i32.const 1 - i32.sub - local.tee $4 local.get $0 - i32.add local.get $1 - local.get $4 + i32.load offset=3 + local.tee $3 + i32.const 24 + i32.shl + local.get $5 + i32.const 8 + i32.shr_u + i32.or + i32.store + local.get $0 + local.get $3 + i32.const 8 + i32.shr_u + local.get $1 + i32.load offset=7 + local.tee $3 + i32.const 24 + i32.shl + i32.or + i32.store offset=4 + local.get $0 + local.get $3 + i32.const 8 + i32.shr_u + local.get $1 + i32.load offset=11 + local.tee $3 + i32.const 24 + i32.shl + i32.or + i32.store offset=8 + local.get $0 + local.get $1 + i32.load offset=15 + local.tee $5 + i32.const 24 + i32.shl + local.get $3 + i32.const 8 + i32.shr_u + i32.or + i32.store offset=12 + local.get $1 + i32.const 16 i32.add - i32.load8_u - i32.store8 + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 br $while-continue|5 end end end end - ) - (func $~lib/util/number/utoa_dec_simple (param $0 i32) (param $1 i32) (param $2 i32) - loop $do-continue|0 + local.get $2 + i32.const 16 + i32.and + if + local.get $0 + local.get $1 + i32.load8_u + i32.store8 local.get $0 - local.get $2 i32.const 1 - i32.sub - local.tee $2 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 i32.const 1 - i32.shl i32.add + local.tee $0 local.get $1 - i32.const 10 - i32.rem_u - i32.const 48 + i32.const 1 i32.add - i32.store16 + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 local.get $1 - i32.const 10 - i32.div_u + i32.const 1 + i32.add local.tee $1 - br_if $do-continue|0 - end - ) - (func $~lib/util/number/prettify (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - local.get $2 - i32.eqz - if + i32.load8_u + i32.store8 local.get $0 + i32.const 1 + i32.add + local.tee $0 local.get $1 i32.const 1 - i32.shl i32.add - i32.const 3145774 - i32.store + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 local.get $1 - i32.const 2 + i32.const 1 i32.add - return + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + local.tee $4 + i32.const 2 + i32.add + local.set $0 + local.get $1 + local.tee $3 + i32.const 2 + i32.add + local.set $1 + local.get $4 + local.get $3 + i32.load8_u offset=1 + i32.store8 offset=1 end - local.get $1 local.get $2 - i32.add - local.tee $3 - i32.const 21 - i32.le_s - i32.const 0 - local.get $1 - local.get $3 - i32.le_s - select - if (result i32) - loop $for-loop|0 - local.get $1 - local.get $3 - i32.lt_s - if - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.const 48 - i32.store16 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end + i32.const 8 + i32.and + if + local.get $0 + local.get $1 + i32.load8_u + i32.store8 local.get $0 - local.get $3 i32.const 1 - i32.shl i32.add - i32.const 3145774 - i32.store + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + local.tee $4 + i32.const 2 + i32.add + local.set $0 + local.get $1 + local.tee $3 + i32.const 2 + i32.add + local.set $1 + local.get $4 local.get $3 + i32.load8_u offset=1 + i32.store8 offset=1 + end + local.get $2 + i32.const 4 + i32.and + if + local.get $0 + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + local.tee $4 i32.const 2 i32.add - else + local.set $0 + local.get $1 + local.tee $3 + i32.const 2 + i32.add + local.set $1 + local.get $4 local.get $3 - i32.const 21 - i32.le_s - i32.const 0 + i32.load8_u offset=1 + i32.store8 offset=1 + end + local.get $2 + i32.const 2 + i32.and + if + local.get $0 + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + local.tee $4 + i32.const 2 + i32.add + local.set $0 + local.get $1 + local.tee $3 + i32.const 2 + i32.add + local.set $1 + local.get $4 local.get $3 + i32.load8_u offset=1 + i32.store8 offset=1 + end + local.get $2 + i32.const 1 + i32.and + if + local.get $0 + local.get $1 + i32.load8_u + i32.store8 + end + ) + (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + block $~lib/util/memory/memmove|inlined.0 + local.get $2 + local.set $4 + local.get $0 + local.get $1 + i32.eq + br_if $~lib/util/memory/memmove|inlined.0 + local.get $1 + local.get $0 + i32.sub + local.get $4 + i32.sub i32.const 0 - i32.gt_s - select - if (result i32) - local.get $0 - local.get $3 - i32.const 1 - i32.shl - i32.add - local.tee $0 - i32.const 2 - i32.add - local.get $0 - i32.const 0 - local.get $2 - i32.sub - i32.const 1 - i32.shl - call $~lib/memory/memory.copy + local.get $4 + i32.const 1 + i32.shl + i32.sub + i32.le_u + if local.get $0 - i32.const 46 - i32.store16 local.get $1 - i32.const 1 - i32.add - else - local.get $3 - i32.const 0 - i32.le_s - i32.const 0 - local.get $3 - i32.const -6 - i32.gt_s - select - if (result i32) - local.get $0 - i32.const 2 - local.get $3 - i32.sub - local.tee $3 - i32.const 1 - i32.shl - i32.add - local.get $0 - local.get $1 - i32.const 1 - i32.shl - call $~lib/memory/memory.copy - local.get $0 - i32.const 3014704 - i32.store - i32.const 2 - local.set $2 - loop $for-loop|1 - local.get $2 - local.get $3 - i32.lt_s + local.get $4 + call $~lib/util/memory/memcpy + br $~lib/util/memory/memmove|inlined.0 + end + local.get $0 + local.get $1 + i32.lt_u + if + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|0 + local.get $0 + i32.const 7 + i32.and if + local.get $4 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $4 + i32.const 1 + i32.sub + local.set $4 local.get $0 - local.get $2 + local.tee $2 i32.const 1 - i32.shl i32.add - i32.const 48 - i32.store16 - local.get $2 + local.set $0 + local.get $1 + local.tee $3 i32.const 1 i32.add - local.set $2 - br $for-loop|1 + local.set $1 + local.get $2 + local.get $3 + i32.load8_u + i32.store8 + br $while-continue|0 end end - local.get $1 - local.get $3 - i32.add - else - local.get $1 - i32.const 1 - i32.eq - if (result i32) - local.get $0 - i32.const 101 - i32.store16 offset=2 - local.get $0 - local.tee $1 - i32.const 4 - i32.add - local.get $3 - i32.const 1 - i32.sub - local.tee $0 - i32.const 0 - i32.lt_s - local.tee $2 + loop $while-continue|1 + local.get $4 + i32.const 8 + i32.ge_u if - i32.const 0 local.get $0 + local.get $1 + i64.load + i64.store + local.get $4 + i32.const 8 i32.sub + local.set $4 + local.get $0 + i32.const 8 + i32.add local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + br $while-continue|1 end + end + end + loop $while-continue|2 + local.get $4 + if local.get $0 - local.get $0 - call $~lib/util/number/decimalCount32 + local.tee $2 i32.const 1 i32.add - local.tee $0 - call $~lib/util/number/utoa_dec_simple - local.get $1 - i32.const 45 - i32.const 43 - local.get $2 - select - i32.store16 offset=4 - local.get $0 - i32.const 2 - i32.add - else - local.get $0 - i32.const 4 - i32.add - local.get $0 - i32.const 2 - i32.add + local.set $0 local.get $1 - i32.const 1 - i32.shl - local.tee $2 - i32.const 2 - i32.sub - call $~lib/memory/memory.copy - local.get $0 - i32.const 46 - i32.store16 offset=2 - local.get $0 - local.get $2 - i32.add - local.tee $0 - i32.const 101 - i32.store16 offset=2 - local.get $0 - local.tee $2 - i32.const 4 - i32.add - local.get $3 - i32.const 1 - i32.sub - local.tee $0 - i32.const 0 - i32.lt_s local.tee $3 - if - i32.const 0 - local.get $0 - i32.sub - local.set $0 - end - local.get $0 - local.get $0 - call $~lib/util/number/decimalCount32 i32.const 1 i32.add - local.tee $0 - call $~lib/util/number/utoa_dec_simple + local.set $1 local.get $2 - i32.const 45 - i32.const 43 local.get $3 - select - i32.store16 offset=4 - local.get $0 - local.get $1 - i32.add - i32.const 2 - i32.add + i32.load8_u + i32.store8 + local.get $4 + i32.const 1 + i32.sub + local.set $4 + br $while-continue|2 end end - end - end - ) - (func $~lib/util/number/dtoa_core (param $0 f64) (result i32) - (local $1 i64) - (local $2 i32) - (local $3 i64) - (local $4 i64) - (local $5 i64) + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|3 + local.get $0 + local.get $4 + i32.add + i32.const 7 + i32.and + if + local.get $4 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $4 + i32.const 1 + i32.sub + local.tee $4 + local.get $0 + i32.add + local.get $1 + local.get $4 + i32.add + i32.load8_u + i32.store8 + br $while-continue|3 + end + end + loop $while-continue|4 + local.get $4 + i32.const 8 + i32.ge_u + if + local.get $4 + i32.const 8 + i32.sub + local.tee $4 + local.get $0 + i32.add + local.get $1 + local.get $4 + i32.add + i64.load + i64.store + br $while-continue|4 + end + end + end + loop $while-continue|5 + local.get $4 + if + local.get $4 + i32.const 1 + i32.sub + local.tee $4 + local.get $0 + i32.add + local.get $1 + local.get $4 + i32.add + i32.load8_u + i32.store8 + br $while-continue|5 + end + end + end + end + ) + (func $~lib/util/number/utoa32_dec_lut (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + loop $while-continue|0 + local.get $1 + i32.const 10000 + i32.ge_u + if + local.get $1 + i32.const 10000 + i32.rem_u + local.set $3 + local.get $1 + i32.const 10000 + i32.div_u + local.set $1 + local.get $0 + local.get $2 + i32.const 4 + i32.sub + local.tee $2 + i32.const 1 + i32.shl + i32.add + local.get $3 + i32.const 100 + i32.div_u + i32.const 2 + i32.shl + i32.const 4968 + i32.add + i64.load32_u + local.get $3 + i32.const 100 + i32.rem_u + i32.const 2 + i32.shl + i32.const 4968 + i32.add + i64.load32_u + i64.const 32 + i64.shl + i64.or + i64.store + br $while-continue|0 + end + end + local.get $1 + i32.const 100 + i32.ge_u + if + local.get $0 + local.get $2 + i32.const 2 + i32.sub + local.tee $2 + i32.const 1 + i32.shl + i32.add + local.get $1 + i32.const 100 + i32.rem_u + i32.const 2 + i32.shl + i32.const 4968 + i32.add + i32.load + i32.store + local.get $1 + i32.const 100 + i32.div_u + local.set $1 + end + local.get $1 + i32.const 10 + i32.ge_u + if + local.get $0 + local.get $2 + i32.const 2 + i32.sub + i32.const 1 + i32.shl + i32.add + local.get $1 + i32.const 2 + i32.shl + i32.const 4968 + i32.add + i32.load + i32.store + else + local.get $0 + local.get $2 + i32.const 1 + i32.sub + i32.const 1 + i32.shl + i32.add + local.get $1 + i32.const 48 + i32.add + i32.store16 + end + ) + (func $~lib/util/number/prettify (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) (local $6 i32) + local.get $2 + i32.eqz + if + local.get $0 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.const 3145774 + i32.store + local.get $1 + i32.const 2 + i32.add + return + end + local.get $1 + local.get $2 + i32.add + local.tee $4 + i32.const 21 + i32.le_s + i32.const 0 + local.get $1 + local.get $4 + i32.le_s + select + if (result i32) + loop $for-loop|0 + local.get $1 + local.get $4 + i32.lt_s + if + local.get $0 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.const 48 + i32.store16 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|0 + end + end + local.get $0 + local.get $4 + i32.const 1 + i32.shl + i32.add + i32.const 3145774 + i32.store + local.get $4 + i32.const 2 + i32.add + else + local.get $4 + i32.const 21 + i32.le_s + i32.const 0 + local.get $4 + i32.const 0 + i32.gt_s + select + if (result i32) + local.get $0 + local.get $4 + i32.const 1 + i32.shl + i32.add + local.tee $0 + i32.const 2 + i32.add + local.get $0 + i32.const 0 + local.get $2 + i32.sub + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $0 + i32.const 46 + i32.store16 + local.get $1 + i32.const 1 + i32.add + else + local.get $4 + i32.const 0 + i32.le_s + i32.const 0 + local.get $4 + i32.const -6 + i32.gt_s + select + if (result i32) + local.get $0 + i32.const 2 + local.get $4 + i32.sub + local.tee $5 + i32.const 1 + i32.shl + i32.add + local.get $0 + local.get $1 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $0 + i32.const 3014704 + i32.store + i32.const 2 + local.set $2 + loop $for-loop|1 + local.get $2 + local.get $5 + i32.lt_s + if + local.get $0 + local.get $2 + i32.const 1 + i32.shl + i32.add + i32.const 48 + i32.store16 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|1 + end + end + local.get $1 + local.get $5 + i32.add + else + local.get $1 + i32.const 1 + i32.eq + if (result i32) + local.get $0 + i32.const 101 + i32.store16 offset=2 + local.get $0 + local.tee $3 + i32.const 4 + i32.add + local.get $4 + i32.const 1 + i32.sub + local.tee $0 + i32.const 0 + i32.lt_s + local.tee $2 + if + i32.const 0 + local.get $0 + i32.sub + local.set $0 + end + local.get $0 + local.tee $1 + i32.const 100000 + i32.lt_u + if (result i32) + local.get $1 + i32.const 100 + i32.lt_u + if (result i32) + local.get $1 + i32.const 10 + i32.ge_u + i32.const 1 + i32.add + else + local.get $1 + i32.const 10000 + i32.ge_u + i32.const 3 + i32.add + local.get $1 + i32.const 1000 + i32.ge_u + i32.add + end + else + local.get $1 + i32.const 10000000 + i32.lt_u + if (result i32) + local.get $1 + i32.const 1000000 + i32.ge_u + i32.const 6 + i32.add + else + local.get $1 + i32.const 1000000000 + i32.ge_u + i32.const 8 + i32.add + local.get $1 + i32.const 100000000 + i32.ge_u + i32.add + end + end + local.set $1 + local.get $0 + local.get $1 + i32.const 1 + i32.add + local.tee $0 + call $~lib/util/number/utoa32_dec_lut + local.get $3 + i32.const 45 + i32.const 43 + local.get $2 + select + i32.store16 offset=4 + local.get $0 + i32.const 2 + i32.add + else + local.get $0 + i32.const 4 + i32.add + local.get $0 + i32.const 2 + i32.add + local.get $1 + i32.const 1 + i32.shl + local.tee $2 + i32.const 2 + i32.sub + call $~lib/memory/memory.copy + local.get $0 + i32.const 46 + i32.store16 offset=2 + local.get $0 + local.get $2 + i32.add + local.tee $0 + i32.const 101 + i32.store16 offset=2 + local.get $0 + local.tee $3 + i32.const 4 + i32.add + local.get $4 + i32.const 1 + i32.sub + local.tee $0 + i32.const 0 + i32.lt_s + local.tee $5 + if + i32.const 0 + local.get $0 + i32.sub + local.set $0 + end + local.get $0 + local.tee $2 + i32.const 100000 + i32.lt_u + if (result i32) + local.get $2 + i32.const 100 + i32.lt_u + if (result i32) + local.get $2 + i32.const 10 + i32.ge_u + i32.const 1 + i32.add + else + local.get $2 + i32.const 10000 + i32.ge_u + i32.const 3 + i32.add + local.get $2 + i32.const 1000 + i32.ge_u + i32.add + end + else + local.get $2 + i32.const 10000000 + i32.lt_u + if (result i32) + local.get $2 + i32.const 1000000 + i32.ge_u + i32.const 6 + i32.add + else + local.get $2 + i32.const 1000000000 + i32.ge_u + i32.const 8 + i32.add + local.get $2 + i32.const 100000000 + i32.ge_u + i32.add + end + end + local.set $2 + local.get $0 + local.get $2 + i32.const 1 + i32.add + local.tee $0 + call $~lib/util/number/utoa32_dec_lut + local.get $3 + i32.const 45 + i32.const 43 + local.get $5 + select + i32.store16 offset=4 + local.get $0 + local.get $1 + i32.add + i32.const 2 + i32.add + end + end + end + end + ) + (func $~lib/util/number/dtoa_core (param $0 f64) (result i32) + (local $1 i64) + (local $2 i64) + (local $3 i64) + (local $4 i32) + (local $5 i32) + (local $6 i64) (local $7 i32) (local $8 i32) - (local $9 i64) + (local $9 i32) (local $10 i64) (local $11 i64) + (local $12 i64) local.get $0 f64.const 0 f64.lt local.tee $8 if (result f64) - i32.const 4048 + i32.const 4000 i32.const 45 i32.store16 local.get $0 @@ -8573,19 +9485,19 @@ local.get $0 end i64.reinterpret_f64 - local.tee $3 + local.tee $2 i64.const 9218868437227405312 i64.and i64.const 52 i64.shr_u i32.wrap_i64 - local.tee $6 + local.tee $7 i32.const 0 i32.ne i64.extend_i32_u i64.const 52 i64.shl - local.get $3 + local.get $2 i64.const 4503599627370495 i64.and i64.add @@ -8594,51 +9506,52 @@ i64.shl i64.const 1 i64.add - local.tee $3 + local.tee $2 i64.clz i32.wrap_i64 - local.set $2 - local.get $3 + local.set $4 local.get $2 + local.get $4 i64.extend_i32_s i64.shl global.set $~lib/util/number/_frc_plus - local.get $6 + local.get $7 i32.const 1 - local.get $6 + local.get $7 select i32.const 1075 i32.sub - local.tee $6 + local.tee $7 i32.const 1 i32.sub - local.get $2 + local.get $4 i32.sub - local.set $2 + local.set $4 local.get $1 local.get $1 i64.const 4503599627370496 i64.eq i32.const 1 i32.add - local.tee $7 + local.tee $5 i64.extend_i32_s i64.shl i64.const 1 i64.sub - local.get $6 local.get $7 + local.get $5 i32.sub - local.get $2 + local.get $4 i32.sub i64.extend_i32_s i64.shl global.set $~lib/util/number/_frc_minus - local.get $2 + local.get $4 global.set $~lib/util/number/_exp i32.const 348 i32.const -61 global.get $~lib/util/number/_exp + local.tee $4 i32.sub f64.convert_i32_s f64.const 0.30102999566398114 @@ -8647,9 +9560,9 @@ f64.add local.tee $0 i32.trunc_f64_s - local.tee $2 + local.tee $5 local.get $0 - local.get $2 + local.get $5 f64.convert_i32_s f64.ne i32.add @@ -8657,71 +9570,71 @@ i32.shr_s i32.const 1 i32.add - local.tee $2 + local.tee $5 i32.const 3 i32.shl - local.tee $7 + local.tee $9 i32.sub global.set $~lib/util/number/_K - local.get $7 - i32.const 4104 + local.get $9 + i32.const 4056 i32.add i64.load global.set $~lib/util/number/_frc_pow - local.get $2 + local.get $5 i32.const 1 i32.shl - i32.const 4800 + i32.const 4752 i32.add i32.load16_s global.set $~lib/util/number/_exp_pow global.get $~lib/util/number/_frc_pow - local.tee $4 + local.tee $3 i64.const 32 i64.shr_u - local.set $3 - local.get $4 + local.set $2 + local.get $3 i64.const 4294967295 i64.and - local.tee $4 + local.tee $3 global.get $~lib/util/number/_frc_plus - local.tee $5 + local.tee $6 i64.const 32 i64.shr_u - local.tee $10 + local.tee $11 i64.mul - local.get $4 - local.get $5 + local.get $3 + local.get $6 i64.const 4294967295 i64.and - local.tee $11 + local.tee $12 i64.mul i64.const 32 i64.shr_u i64.add - local.set $5 + local.set $6 local.get $8 i32.const 1 i32.shl - i32.const 4048 + i32.const 4000 i32.add - local.get $3 + local.get $2 local.get $1 local.get $1 i64.clz i32.wrap_i64 - local.tee $2 + local.tee $5 i64.extend_i32_s i64.shl local.tee $1 i64.const 32 i64.shr_u - local.tee $9 + local.tee $10 i64.mul - local.get $4 - local.get $9 + local.get $3 + local.get $10 i64.mul - local.get $4 + local.get $3 local.get $1 i64.const 4294967295 i64.and @@ -8730,14 +9643,14 @@ i64.const 32 i64.shr_u i64.add - local.tee $9 + local.tee $10 i64.const 32 i64.shr_u i64.add local.get $1 - local.get $3 + local.get $2 i64.mul - local.get $9 + local.get $10 i64.const 4294967295 i64.and i64.add @@ -8747,24 +9660,24 @@ i64.shr_u i64.add global.get $~lib/util/number/_exp_pow - local.tee $7 - local.get $6 - local.get $2 + local.tee $9 + local.get $7 + local.get $5 i32.sub i32.add i32.const -64 i32.sub - local.get $3 - local.get $10 + local.get $2 + local.get $11 i64.mul - local.get $5 + local.get $6 i64.const 32 i64.shr_u i64.add - local.get $3 - local.get $11 + local.get $2 + local.get $12 i64.mul - local.get $5 + local.get $6 i64.const 4294967295 i64.and i64.add @@ -8776,27 +9689,27 @@ i64.const 1 i64.sub local.tee $1 - local.get $7 - global.get $~lib/util/number/_exp + local.get $4 + local.get $9 i32.add i32.const -64 i32.sub local.get $1 - local.get $3 + local.get $2 global.get $~lib/util/number/_frc_minus local.tee $1 i64.const 32 i64.shr_u - local.tee $5 + local.tee $6 i64.mul - local.get $4 - local.get $5 + local.get $3 + local.get $6 i64.mul - local.get $4 + local.get $3 local.get $1 i64.const 4294967295 i64.and - local.tee $4 + local.tee $3 i64.mul i64.const 32 i64.shr_u @@ -8805,8 +9718,8 @@ i64.const 32 i64.shr_u i64.add + local.get $2 local.get $3 - local.get $4 i64.mul local.get $1 i64.const 4294967295 @@ -8836,7 +9749,17 @@ i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer i32.const 0 i32.store @@ -8849,7 +9772,7 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - i32.const 3904 + i32.const 3856 local.set $1 br $__inlined_func$~lib/util/number/dtoa end @@ -8867,7 +9790,7 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - i32.const 3936 + i32.const 3888 local.set $1 br $__inlined_func$~lib/util/number/dtoa end @@ -8875,8 +9798,8 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer + i32.const 3920 i32.const 3968 - i32.const 4016 local.get $0 f64.const 0 f64.lt @@ -8896,7 +9819,7 @@ local.tee $1 i32.store local.get $1 - i32.const 4048 + i32.const 4000 local.get $2 call $~lib/memory/memory.copy global.get $~lib/memory/__stack_pointer @@ -8914,12 +9837,22 @@ i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer i32.const 0 i32.store block $__inlined_func$~lib/string/String#concat - local.get $1 + local.get $0 i32.const 20 i32.sub i32.load offset=16 @@ -8927,9 +9860,8 @@ i32.shr_u i32.const 1 i32.shl - local.tee $4 - local.get $0 - local.tee $2 + local.tee $3 + local.get $1 i32.const 20 i32.sub i32.load offset=16 @@ -8937,30 +9869,30 @@ i32.shr_u i32.const 1 i32.shl - local.tee $3 + local.tee $4 i32.add - local.tee $0 + local.tee $2 i32.eqz if global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - i32.const 5040 - local.set $0 + i32.const 5392 + local.set $2 br $__inlined_func$~lib/string/String#concat end global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $2 i32.const 1 call $~lib/rt/itcms/__new - local.tee $0 + local.tee $2 i32.store - local.get $0 local.get $2 + local.get $0 local.get $3 call $~lib/memory/memory.copy - local.get $0 + local.get $2 local.get $3 i32.add local.get $1 @@ -8971,7 +9903,7 @@ i32.add global.set $~lib/memory/__stack_pointer end - local.get $0 + local.get $2 ) (func $~lib/array/Array<~lib/typedarray/Float64Array>#__uset (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 @@ -8987,7 +9919,7 @@ i32.const 1 call $~lib/rt/itcms/__link ) - (func $assembly/mat2/equals (param $0 i32) (param $1 i32) (result i32) + (func $assembly/mat3/normalFromMat4 (param $0 i32) (param $1 i32) (result i32) (local $2 f64) (local $3 f64) (local $4 f64) @@ -8996,142 +9928,193 @@ (local $7 f64) (local $8 f64) (local $9 f64) - local.get $0 + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 f64) + (local $16 f64) + (local $17 f64) + (local $18 f64) + (local $19 f64) + (local $20 f64) + (local $21 f64) + (local $22 f64) + (local $23 f64) + (local $24 f64) + (local $25 f64) + (local $26 f64) + local.get $1 i32.const 0 call $~lib/typedarray/Float64Array#__get - local.set $2 - local.get $0 + local.set $8 + local.get $1 i32.const 1 call $~lib/typedarray/Float64Array#__get - local.set $3 - local.get $0 + local.set $9 + local.get $1 i32.const 2 call $~lib/typedarray/Float64Array#__get - local.set $4 - local.get $0 + local.set $10 + local.get $1 i32.const 3 call $~lib/typedarray/Float64Array#__get - local.set $5 + local.set $4 local.get $1 - i32.const 0 + i32.const 4 call $~lib/typedarray/Float64Array#__get - local.set $6 + local.set $11 local.get $1 - i32.const 1 + i32.const 5 call $~lib/typedarray/Float64Array#__get - local.set $7 + local.set $12 local.get $1 - i32.const 2 + i32.const 6 call $~lib/typedarray/Float64Array#__get - local.set $8 + local.set $13 local.get $1 - i32.const 3 + i32.const 7 call $~lib/typedarray/Float64Array#__get - local.set $9 - local.get $2 - local.get $6 - f64.sub - f64.abs - f64.const 1 - local.get $2 - f64.abs - local.get $6 - f64.abs - call $assembly/imports/MathUtil.max - f64.const 1e-06 - f64.mul - f64.le - if (result i32) - local.get $3 - local.get $7 - f64.sub - f64.abs - f64.const 1 - local.get $3 - f64.abs - local.get $7 - f64.abs - call $assembly/imports/MathUtil.max - f64.const 1e-06 - f64.mul - f64.le - else - i32.const 0 - end - if (result i32) - local.get $4 - local.get $8 - f64.sub - f64.abs - f64.const 1 - local.get $4 - f64.abs - local.get $8 - f64.abs - call $assembly/imports/MathUtil.max - f64.const 1e-06 - f64.mul - f64.le - else - i32.const 0 - end - if (result i32) - local.get $5 - local.get $9 - f64.sub - f64.abs - f64.const 1 - local.get $5 - f64.abs - local.get $9 - f64.abs - call $assembly/imports/MathUtil.max - f64.const 1e-06 - f64.mul - f64.le - else - i32.const 0 - end - ) - (func $assembly/mat2d/invert (param $0 i32) (param $1 i32) (result i32) - (local $2 f64) - (local $3 f64) - (local $4 f64) - (local $5 f64) - (local $6 f64) - (local $7 f64) - (local $8 f64) + local.set $5 local.get $1 - i32.const 0 + i32.const 8 call $~lib/typedarray/Float64Array#__get - local.set $3 + local.set $2 local.get $1 - i32.const 1 + i32.const 9 call $~lib/typedarray/Float64Array#__get - local.set $4 + local.set $6 local.get $1 - i32.const 2 + i32.const 10 call $~lib/typedarray/Float64Array#__get - local.set $5 + local.set $7 local.get $1 - i32.const 3 + i32.const 11 call $~lib/typedarray/Float64Array#__get - local.set $6 + local.set $3 local.get $1 - i32.const 4 + i32.const 12 call $~lib/typedarray/Float64Array#__get - local.set $7 + local.set $14 local.get $1 - i32.const 5 + i32.const 13 call $~lib/typedarray/Float64Array#__get - local.set $8 + local.set $15 + local.get $1 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + local.set $16 + local.get $8 + local.get $12 + f64.mul + local.get $9 + local.get $11 + f64.mul + f64.sub + local.tee $24 + local.get $7 + local.get $1 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + local.tee $17 + f64.mul + local.get $3 + local.get $16 + f64.mul + f64.sub + local.tee $18 + f64.mul + local.get $8 + local.get $13 + f64.mul + local.get $10 + local.get $11 + f64.mul + f64.sub + local.tee $25 + local.get $6 + local.get $17 + f64.mul local.get $3 + local.get $15 + f64.mul + f64.sub + local.tee $19 + f64.mul + f64.sub + local.get $8 + local.get $5 + f64.mul + local.get $4 + local.get $11 + f64.mul + f64.sub + local.tee $20 local.get $6 + local.get $16 + f64.mul + local.get $7 + local.get $15 + f64.mul + f64.sub + local.tee $21 + f64.mul + f64.add + local.get $9 + local.get $13 + f64.mul + local.get $10 + local.get $12 + f64.mul + f64.sub + local.tee $26 + local.get $2 + local.get $17 + f64.mul + local.get $3 + local.get $14 + f64.mul + f64.sub + local.tee $3 + f64.mul + f64.add + local.get $9 + local.get $5 f64.mul local.get $4 + local.get $12 + f64.mul + f64.sub + local.tee $22 + local.get $2 + local.get $16 + f64.mul + local.get $7 + local.get $14 + f64.mul + f64.sub + local.tee $7 + f64.mul + f64.sub + local.get $10 local.get $5 f64.mul + local.get $4 + local.get $13 + f64.mul + f64.sub + local.tee $23 + local.get $2 + local.get $15 + f64.mul + local.get $6 + local.get $14 + f64.mul f64.sub + local.tee $6 + f64.mul + f64.add local.tee $2 i64.reinterpret_f64 i64.const 1 @@ -9146,7 +10129,17 @@ end local.get $0 i32.const 0 - local.get $6 + local.get $12 + local.get $18 + f64.mul + local.get $13 + local.get $19 + f64.mul + f64.sub + local.get $5 + local.get $21 + f64.mul + f64.add f64.const 1 local.get $2 f64.div @@ -9155,51 +10148,136 @@ call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 - local.get $4 - f64.neg + local.get $13 + local.get $3 + f64.mul + local.get $11 + local.get $18 + f64.mul + f64.sub + local.get $5 + local.get $7 + f64.mul + f64.sub local.get $2 f64.mul call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 + local.get $11 + local.get $19 + f64.mul + local.get $12 + local.get $3 + f64.mul + f64.sub local.get $5 - f64.neg + local.get $6 + f64.mul + f64.add local.get $2 f64.mul call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 3 - local.get $3 + local.get $10 + local.get $19 + f64.mul + local.get $9 + local.get $18 + f64.mul + f64.sub + local.get $4 + local.get $21 + f64.mul + f64.sub local.get $2 f64.mul call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 4 - local.get $5 local.get $8 + local.get $18 f64.mul - local.get $6 - local.get $7 + local.get $10 + local.get $3 f64.mul f64.sub + local.get $4 + local.get $7 + f64.mul + f64.add local.get $2 f64.mul call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 5 - local.get $4 - local.get $7 - f64.mul + local.get $9 local.get $3 + f64.mul local.get $8 + local.get $19 + f64.mul + f64.sub + local.get $4 + local.get $6 + f64.mul + f64.sub + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $15 + local.get $23 + f64.mul + local.get $16 + local.get $22 + f64.mul + f64.sub + local.get $17 + local.get $26 + f64.mul + f64.add + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $16 + local.get $20 + f64.mul + local.get $14 + local.get $23 + f64.mul + f64.sub + local.get $17 + local.get $25 f64.mul f64.sub local.get $2 f64.mul call $~lib/typedarray/Float64Array#__set local.get $0 + i32.const 8 + local.get $14 + local.get $22 + f64.mul + local.get $15 + local.get $20 + f64.mul + f64.sub + local.get $17 + local.get $24 + f64.mul + f64.add + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 ) - (func $assembly/mat2d/rotate (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (func $assembly/mat3/equals (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) (local $3 f64) (local $4 f64) (local $5 f64) @@ -9207,156 +10285,96 @@ (local $7 f64) (local $8 f64) (local $9 f64) - local.get $1 + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 f64) + (local $16 f64) + (local $17 f64) + (local $18 f64) + (local $19 f64) + local.get $0 i32.const 0 call $~lib/typedarray/Float64Array#__get - local.set $4 - local.get $1 + local.set $2 + local.get $0 i32.const 1 call $~lib/typedarray/Float64Array#__get - local.set $5 - local.get $1 + local.set $3 + local.get $0 i32.const 2 call $~lib/typedarray/Float64Array#__get - local.set $6 - local.get $1 + local.set $4 + local.get $0 i32.const 3 call $~lib/typedarray/Float64Array#__get - local.set $7 - local.get $1 + local.set $5 + local.get $0 i32.const 4 call $~lib/typedarray/Float64Array#__get - local.set $8 - local.get $1 - i32.const 5 - call $~lib/typedarray/Float64Array#__get - local.set $9 - local.get $2 - call $~lib/math/NativeMath.sin - local.set $3 - local.get $0 - i32.const 0 - local.get $4 - local.get $2 - call $~lib/math/NativeMath.cos - local.tee $2 - f64.mul - local.get $6 - local.get $3 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - local.get $5 - local.get $2 - f64.mul - local.get $7 - local.get $3 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - local.get $4 - local.get $3 - f64.neg - f64.mul - local.get $6 - local.get $2 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - local.get $5 - local.get $3 - f64.neg - f64.mul - local.get $7 - local.get $2 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 4 - local.get $8 - call $~lib/typedarray/Float64Array#__set + local.set $6 local.get $0 i32.const 5 - local.get $9 - call $~lib/typedarray/Float64Array#__set - local.get $0 - ) - (func $assembly/mat2d/equals (param $0 i32) (param $1 i32) (result i32) - (local $2 f64) - (local $3 f64) - (local $4 f64) - (local $5 f64) - (local $6 f64) - (local $7 f64) - (local $8 f64) - (local $9 f64) - (local $10 f64) - (local $11 f64) - (local $12 f64) - (local $13 f64) - local.get $0 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.set $2 - local.get $0 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.set $3 - local.get $0 - i32.const 2 call $~lib/typedarray/Float64Array#__get - local.set $4 + local.set $7 local.get $0 - i32.const 3 + i32.const 6 call $~lib/typedarray/Float64Array#__get - local.set $5 + local.set $8 local.get $0 - i32.const 4 + i32.const 7 call $~lib/typedarray/Float64Array#__get - local.set $6 + local.set $9 local.get $0 - i32.const 5 + i32.const 8 call $~lib/typedarray/Float64Array#__get - local.set $7 + local.set $10 local.get $1 i32.const 0 call $~lib/typedarray/Float64Array#__get - local.set $8 + local.set $11 local.get $1 i32.const 1 call $~lib/typedarray/Float64Array#__get - local.set $9 + local.set $12 local.get $1 i32.const 2 call $~lib/typedarray/Float64Array#__get - local.set $10 + local.set $13 local.get $1 i32.const 3 call $~lib/typedarray/Float64Array#__get - local.set $11 + local.set $14 local.get $1 i32.const 4 call $~lib/typedarray/Float64Array#__get - local.set $12 + local.set $15 local.get $1 i32.const 5 call $~lib/typedarray/Float64Array#__get - local.set $13 + local.set $16 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $17 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $18 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.set $19 local.get $2 - local.get $8 + local.get $11 f64.sub f64.abs f64.const 1 local.get $2 f64.abs - local.get $8 + local.get $11 f64.abs call $assembly/imports/MathUtil.max f64.const 1e-06 @@ -9364,13 +10382,13 @@ f64.le if (result i32) local.get $3 - local.get $9 + local.get $12 f64.sub f64.abs f64.const 1 local.get $3 f64.abs - local.get $9 + local.get $12 f64.abs call $assembly/imports/MathUtil.max f64.const 1e-06 @@ -9381,13 +10399,13 @@ end if (result i32) local.get $4 - local.get $10 + local.get $13 f64.sub f64.abs f64.const 1 local.get $4 f64.abs - local.get $10 + local.get $13 f64.abs call $assembly/imports/MathUtil.max f64.const 1e-06 @@ -9398,13 +10416,13 @@ end if (result i32) local.get $5 - local.get $11 + local.get $14 f64.sub f64.abs f64.const 1 local.get $5 f64.abs - local.get $11 + local.get $14 f64.abs call $assembly/imports/MathUtil.max f64.const 1e-06 @@ -9415,13 +10433,13 @@ end if (result i32) local.get $6 - local.get $12 + local.get $15 f64.sub f64.abs f64.const 1 local.get $6 f64.abs - local.get $12 + local.get $15 f64.abs call $assembly/imports/MathUtil.max f64.const 1e-06 @@ -9432,13 +10450,13 @@ end if (result i32) local.get $7 - local.get $13 + local.get $16 f64.sub f64.abs f64.const 1 local.get $7 f64.abs - local.get $13 + local.get $16 f64.abs call $assembly/imports/MathUtil.max f64.const 1e-06 @@ -9447,116 +10465,126 @@ else i32.const 0 end - ) - (func $assembly/mat3/transpose (param $0 i32) (param $1 i32) (result i32) - (local $2 f64) - (local $3 f64) - (local $4 f64) - local.get $0 - local.get $1 - i32.eq - if - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.set $2 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.set $3 - local.get $1 - i32.const 5 - call $~lib/typedarray/Float64Array#__get - local.set $4 - local.get $0 - i32.const 1 - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - local.get $1 - i32.const 6 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - local.get $2 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 5 - local.get $1 - i32.const 7 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 6 - local.get $3 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 7 - local.get $4 - call $~lib/typedarray/Float64Array#__set + if (result i32) + local.get $8 + local.get $17 + f64.sub + f64.abs + f64.const 1 + local.get $8 + f64.abs + local.get $17 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le else - local.get $0 i32.const 0 - local.get $1 + end + if (result i32) + local.get $9 + local.get $18 + f64.sub + f64.abs + f64.const 1 + local.get $9 + f64.abs + local.get $18 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $10 + local.get $19 + f64.sub + f64.abs + f64.const 1 + local.get $10 + f64.abs + local.get $19 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else i32.const 0 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - local.get $1 - i32.const 6 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 4 - local.get $1 - i32.const 4 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 5 - local.get $1 - i32.const 7 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 6 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 7 - local.get $1 - i32.const 5 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 8 - local.get $1 - i32.const 8 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set end + ) + (func $assembly/mat4/identity (param $0 i32) (result i32) + local.get $0 + i32.const 0 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + f64.const 1 + call $~lib/typedarray/Float64Array#__set local.get $0 ) - (func $assembly/mat3/invert (param $0 i32) (param $1 i32) (result i32) + (func $assembly/mat4/invert (param $0 i32) (param $1 i32) (result i32) (local $2 f64) (local $3 f64) (local $4 f64) @@ -9570,6 +10598,22 @@ (local $12 f64) (local $13 f64) (local $14 f64) + (local $15 f64) + (local $16 f64) + (local $17 f64) + (local $18 f64) + (local $19 f64) + (local $20 f64) + (local $21 f64) + (local $22 f64) + (local $23 f64) + (local $24 f64) + (local $25 f64) + (local $26 f64) + (local $27 f64) + (local $28 f64) + (local $29 f64) + (local $30 f64) local.get $1 i32.const 0 call $~lib/typedarray/Float64Array#__get @@ -9602,43 +10646,145 @@ i32.const 7 call $~lib/typedarray/Float64Array#__get local.set $10 - local.get $3 local.get $1 i32.const 8 call $~lib/typedarray/Float64Array#__get - local.tee $11 + local.set $11 + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.set $12 + local.get $1 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.set $13 + local.get $1 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.set $14 + local.get $1 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + local.set $15 + local.get $1 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + local.set $16 + local.get $1 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + local.set $17 + local.get $3 + local.get $8 + f64.mul + local.get $4 local.get $7 f64.mul - local.get $8 + f64.sub + local.tee $19 + local.get $13 + local.get $1 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + local.tee $18 + f64.mul + local.get $14 + local.get $17 + f64.mul + f64.sub + local.tee $20 + f64.mul + local.get $3 + local.get $9 + f64.mul + local.get $5 + local.get $7 + f64.mul + f64.sub + local.tee $21 + local.get $12 + local.get $18 + f64.mul + local.get $14 + local.get $16 + f64.mul + f64.sub + local.tee $22 + f64.mul + f64.sub + local.get $3 local.get $10 f64.mul + local.get $6 + local.get $7 + f64.mul f64.sub - local.tee $2 + local.tee $23 + local.get $12 + local.get $17 + f64.mul + local.get $13 + local.get $16 + f64.mul + f64.sub + local.tee $24 f64.mul + f64.add local.get $4 - local.get $11 - f64.neg - local.get $6 + local.get $9 f64.mul + local.get $5 local.get $8 - local.get $9 f64.mul - f64.add - local.tee $12 + f64.sub + local.tee $25 + local.get $11 + local.get $18 + f64.mul + local.get $14 + local.get $15 + f64.mul + f64.sub + local.tee $26 f64.mul f64.add - local.get $5 + local.get $4 local.get $10 + f64.mul local.get $6 + local.get $8 f64.mul - local.get $7 + f64.sub + local.tee $27 + local.get $11 + local.get $17 + f64.mul + local.get $13 + local.get $15 + f64.mul + f64.sub + local.tee $28 + f64.mul + f64.sub + local.get $5 + local.get $10 + f64.mul + local.get $6 local.get $9 f64.mul f64.sub - local.tee $13 + local.tee $29 + local.get $11 + local.get $16 + f64.mul + local.get $12 + local.get $15 + f64.mul + f64.sub + local.tee $30 f64.mul f64.add - local.tee $14 + local.tee $2 i64.reinterpret_f64 i64.const 1 i64.shl @@ -9652,51 +10798,82 @@ end local.get $0 i32.const 0 - local.get $2 - f64.const 1 - local.get $14 - f64.div - local.tee $2 + local.get $8 + local.get $20 + f64.mul + local.get $9 + local.get $22 + f64.mul + f64.sub + local.get $10 + local.get $24 + f64.mul + f64.add + f64.const 1 + local.get $2 + f64.div + local.tee $2 f64.mul call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 - local.get $11 - f64.neg + local.get $5 + local.get $22 + f64.mul local.get $4 + local.get $20 f64.mul - local.get $5 - local.get $10 + f64.sub + local.get $6 + local.get $24 f64.mul - f64.add + f64.sub local.get $2 f64.mul call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 - local.get $8 - local.get $4 + local.get $16 + local.get $29 f64.mul - local.get $5 - local.get $7 + local.get $17 + local.get $27 f64.mul f64.sub + local.get $18 + local.get $25 + f64.mul + f64.add local.get $2 f64.mul call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 3 + local.get $13 + local.get $27 + f64.mul local.get $12 + local.get $29 + f64.mul + f64.sub + local.get $14 + local.get $25 + f64.mul + f64.sub local.get $2 f64.mul call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 4 - local.get $11 - local.get $3 - f64.mul - local.get $5 local.get $9 + local.get $26 + f64.mul + local.get $7 + local.get $20 + f64.mul + f64.sub + local.get $10 + local.get $28 f64.mul f64.sub local.get $2 @@ -9704,12 +10881,15 @@ call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 5 - local.get $8 - f64.neg local.get $3 + local.get $20 f64.mul local.get $5 + local.get $26 + f64.mul + f64.sub local.get $6 + local.get $28 f64.mul f64.add local.get $2 @@ -9717,18 +10897,31 @@ call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 6 - local.get $13 + local.get $17 + local.get $23 + f64.mul + local.get $15 + local.get $29 + f64.mul + f64.sub + local.get $18 + local.get $21 + f64.mul + f64.sub local.get $2 f64.mul call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 7 - local.get $10 - f64.neg - local.get $3 + local.get $11 + local.get $29 f64.mul - local.get $4 - local.get $9 + local.get $13 + local.get $23 + f64.mul + f64.sub + local.get $14 + local.get $21 f64.mul f64.add local.get $2 @@ -9737,155 +10930,135 @@ local.get $0 i32.const 8 local.get $7 - local.get $3 + local.get $22 f64.mul - local.get $4 - local.get $6 + local.get $8 + local.get $26 f64.mul f64.sub + local.get $10 + local.get $30 + f64.mul + f64.add local.get $2 f64.mul call $~lib/typedarray/Float64Array#__set local.get $0 - ) - (func $assembly/mat3/adjoint (param $0 i32) (param $1 i32) (result i32) - (local $2 f64) - (local $3 f64) - (local $4 f64) - (local $5 f64) - (local $6 f64) - (local $7 f64) - (local $8 f64) - (local $9 f64) - (local $10 f64) - local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.set $2 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.set $3 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.set $4 - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.set $5 - local.get $1 - i32.const 4 - call $~lib/typedarray/Float64Array#__get - local.set $6 - local.get $1 - i32.const 5 - call $~lib/typedarray/Float64Array#__get - local.set $7 - local.get $1 - i32.const 6 - call $~lib/typedarray/Float64Array#__get - local.set $8 - local.get $1 - i32.const 7 - call $~lib/typedarray/Float64Array#__get - local.set $9 - local.get $0 - i32.const 0 - local.get $6 - local.get $1 - i32.const 8 - call $~lib/typedarray/Float64Array#__get - local.tee $10 + i32.const 9 + local.get $4 + local.get $26 f64.mul - local.get $7 - local.get $9 + local.get $3 + local.get $22 + f64.mul + f64.sub + local.get $6 + local.get $30 f64.mul f64.sub + local.get $2 + f64.mul call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 1 - local.get $4 - local.get $9 + i32.const 10 + local.get $15 + local.get $27 f64.mul - local.get $3 - local.get $10 + local.get $16 + local.get $23 f64.mul f64.sub + local.get $18 + local.get $19 + f64.mul + f64.add + local.get $2 + f64.mul call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 2 - local.get $3 - local.get $7 + i32.const 11 + local.get $12 + local.get $23 f64.mul - local.get $4 - local.get $6 + local.get $11 + local.get $27 + f64.mul + f64.sub + local.get $14 + local.get $19 f64.mul f64.sub + local.get $2 + f64.mul call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 3 - local.get $7 + i32.const 12 local.get $8 + local.get $28 f64.mul - local.get $5 - local.get $10 + local.get $7 + local.get $24 + f64.mul + f64.sub + local.get $9 + local.get $30 f64.mul f64.sub + local.get $2 + f64.mul call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 4 - local.get $2 - local.get $10 + i32.const 13 + local.get $3 + local.get $24 f64.mul local.get $4 - local.get $8 + local.get $28 f64.mul f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 5 - local.get $4 local.get $5 + local.get $30 f64.mul + f64.add local.get $2 - local.get $7 f64.mul - f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 6 - local.get $5 - local.get $9 + i32.const 14 + local.get $16 + local.get $21 f64.mul - local.get $6 - local.get $8 + local.get $15 + local.get $25 f64.mul f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 7 - local.get $3 - local.get $8 + local.get $17 + local.get $19 f64.mul + f64.sub local.get $2 - local.get $9 f64.mul - f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 8 - local.get $2 - local.get $6 + i32.const 15 + local.get $11 + local.get $25 f64.mul - local.get $3 - local.get $5 + local.get $12 + local.get $21 f64.mul f64.sub + local.get $13 + local.get $19 + f64.mul + f64.add + local.get $2 + f64.mul call $~lib/typedarray/Float64Array#__set local.get $0 ) - (func $assembly/mat3/translate (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $assembly/mat4/adjoint (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) (local $3 f64) (local $4 f64) (local $5 f64) @@ -9897,6 +11070,19 @@ (local $11 f64) (local $12 f64) (local $13 f64) + (local $14 f64) + (local $15 f64) + (local $16 f64) + (local $17 f64) + (local $18 f64) + (local $19 f64) + (local $20 f64) + (local $21 f64) + (local $22 f64) + (local $23 f64) + (local $24 f64) + (local $25 f64) + (local $26 f64) local.get $1 i32.const 0 call $~lib/typedarray/Float64Array#__get @@ -9912,911 +11098,665 @@ local.get $1 i32.const 3 call $~lib/typedarray/Float64Array#__get - local.set $8 + local.set $2 local.get $1 i32.const 4 call $~lib/typedarray/Float64Array#__get - local.set $9 + local.set $8 local.get $1 i32.const 5 call $~lib/typedarray/Float64Array#__get - local.set $10 + local.set $9 local.get $1 i32.const 6 call $~lib/typedarray/Float64Array#__get - local.set $11 + local.set $10 local.get $1 i32.const 7 call $~lib/typedarray/Float64Array#__get - local.set $12 + local.set $3 local.get $1 i32.const 8 call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.set $12 + local.get $1 + i32.const 10 + call $~lib/typedarray/Float64Array#__get local.set $13 - local.get $2 - i32.const 0 + local.get $1 + i32.const 11 call $~lib/typedarray/Float64Array#__get - local.set $3 - local.get $2 - i32.const 1 + local.set $14 + local.get $1 + i32.const 12 call $~lib/typedarray/Float64Array#__get - local.set $4 + local.set $15 + local.get $1 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + local.set $16 + local.get $1 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + local.set $17 local.get $0 i32.const 0 - local.get $5 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - local.get $6 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - local.get $7 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - local.get $8 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 4 local.get $9 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 5 + local.get $13 + local.get $1 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + local.tee $18 + f64.mul + local.get $14 + local.get $17 + f64.mul + f64.sub + local.tee $4 + f64.mul local.get $10 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 6 - local.get $3 - local.get $5 + local.get $12 + local.get $18 f64.mul - local.get $4 - local.get $8 + local.get $14 + local.get $16 f64.mul - f64.add - local.get $11 - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 7 + f64.sub + local.tee $19 + f64.mul + f64.sub local.get $3 - local.get $6 + local.get $12 + local.get $17 f64.mul - local.get $4 - local.get $9 + local.get $13 + local.get $16 + f64.mul + f64.sub + local.tee $20 f64.mul - f64.add - local.get $12 f64.add call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 8 - local.get $3 + i32.const 1 local.get $7 + local.get $19 f64.mul + local.get $6 local.get $4 - local.get $10 f64.mul - f64.add - local.get $13 - f64.add + f64.sub + local.get $2 + local.get $20 + f64.mul + f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 - ) - (func $assembly/mat3/rotate (param $0 i32) (param $1 i32) (param $2 f64) (result i32) - (local $3 f64) - (local $4 f64) - (local $5 f64) - (local $6 f64) - (local $7 f64) - (local $8 f64) - (local $9 f64) - (local $10 f64) - (local $11 f64) - (local $12 f64) - local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.set $4 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.set $5 - local.get $1 i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.set $6 - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.set $7 - local.get $1 - i32.const 4 - call $~lib/typedarray/Float64Array#__get - local.set $8 - local.get $1 - i32.const 5 - call $~lib/typedarray/Float64Array#__get - local.set $9 - local.get $1 - i32.const 6 - call $~lib/typedarray/Float64Array#__get - local.set $10 - local.get $1 - i32.const 7 - call $~lib/typedarray/Float64Array#__get - local.set $11 - local.get $1 - i32.const 8 - call $~lib/typedarray/Float64Array#__get - local.set $12 - local.get $2 - call $~lib/math/NativeMath.sin - local.set $3 - local.get $0 - i32.const 0 - local.get $2 - call $~lib/math/NativeMath.cos - local.tee $2 - local.get $4 - f64.mul - local.get $3 + local.get $16 local.get $7 + local.get $3 f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 local.get $2 - local.get $5 + local.get $10 + f64.mul + f64.sub + local.tee $21 f64.mul + local.get $17 + local.get $6 local.get $3 - local.get $8 f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 local.get $2 + local.get $9 + f64.mul + f64.sub + local.tee $22 + f64.mul + f64.sub + local.get $18 local.get $6 + local.get $10 f64.mul - local.get $3 + local.get $7 local.get $9 f64.mul + f64.sub + local.tee $23 + f64.mul f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 3 - local.get $2 - local.get $7 + local.get $13 + local.get $22 f64.mul - local.get $3 - local.get $4 + local.get $12 + local.get $21 + f64.mul + f64.sub + local.get $14 + local.get $23 f64.mul f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 4 - local.get $2 - local.get $8 + local.get $10 + local.get $11 + local.get $18 f64.mul - local.get $3 - local.get $5 + local.get $14 + local.get $15 f64.mul f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 5 - local.get $2 - local.get $9 + local.tee $24 f64.mul - local.get $3 - local.get $6 + local.get $8 + local.get $4 f64.mul f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 6 - local.get $10 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 7 - local.get $11 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 8 - local.get $12 - call $~lib/typedarray/Float64Array#__set - local.get $0 - ) - (func $assembly/mat3/fromQuat (param $0 i32) (param $1 i32) (result i32) - (local $2 f64) - (local $3 f64) - (local $4 f64) - (local $5 f64) - (local $6 f64) - (local $7 f64) - (local $8 f64) - (local $9 f64) - (local $10 f64) - (local $11 f64) - (local $12 f64) - local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.set $4 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.set $2 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.tee $3 local.get $3 - f64.add - local.set $5 - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.set $6 - local.get $0 - i32.const 0 - f64.const 1 - local.get $2 - local.get $2 - local.get $2 - f64.add - local.tee $7 + local.get $11 + local.get $17 f64.mul - local.tee $8 - f64.sub - local.get $3 - local.get $5 + local.get $13 + local.get $15 f64.mul - local.tee $9 f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - local.get $2 - local.get $4 - local.get $4 - f64.add - local.tee $2 - f64.mul - local.tee $10 - local.get $6 - local.get $5 + local.tee $25 f64.mul - local.tee $5 f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 6 - local.get $3 - local.get $2 - f64.mul - local.tee $11 - local.get $6 - local.get $7 - f64.mul - local.tee $12 - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - local.get $10 + i32.const 5 local.get $5 - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 4 - f64.const 1 local.get $4 - local.get $2 f64.mul - f64.sub - local.tee $4 - local.get $9 - f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 7 - local.get $3 local.get $7 + local.get $24 f64.mul - local.tee $3 - local.get $6 - local.get $2 - f64.mul - local.tee $2 - f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - local.get $11 - local.get $12 f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 5 - local.get $3 local.get $2 + local.get $25 + f64.mul f64.add call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 8 - local.get $4 - local.get $8 - f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - ) - (func $assembly/mat3/normalFromMat4 (param $0 i32) (param $1 i32) (result i32) - (local $2 f64) - (local $3 f64) - (local $4 f64) - (local $5 f64) - (local $6 f64) - (local $7 f64) - (local $8 f64) - (local $9 f64) - (local $10 f64) - (local $11 f64) - (local $12 f64) - (local $13 f64) - (local $14 f64) - (local $15 f64) - (local $16 f64) - (local $17 f64) - (local $18 f64) - (local $19 f64) - (local $20 f64) - (local $21 f64) - (local $22 f64) - (local $23 f64) - (local $24 f64) - (local $25 f64) - (local $26 f64) - local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.set $8 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.set $9 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.set $10 - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.set $4 - local.get $1 - i32.const 4 - call $~lib/typedarray/Float64Array#__get - local.set $11 - local.get $1 - i32.const 5 - call $~lib/typedarray/Float64Array#__get - local.set $12 - local.get $1 i32.const 6 - call $~lib/typedarray/Float64Array#__get - local.set $13 - local.get $1 - i32.const 7 - call $~lib/typedarray/Float64Array#__get - local.set $5 - local.get $1 - i32.const 8 - call $~lib/typedarray/Float64Array#__get - local.set $2 - local.get $1 - i32.const 9 - call $~lib/typedarray/Float64Array#__get - local.set $6 - local.get $1 - i32.const 10 - call $~lib/typedarray/Float64Array#__get - local.set $7 - local.get $1 - i32.const 11 - call $~lib/typedarray/Float64Array#__get - local.set $3 - local.get $1 - i32.const 12 - call $~lib/typedarray/Float64Array#__get - local.set $14 - local.get $1 - i32.const 13 - call $~lib/typedarray/Float64Array#__get - local.set $15 - local.get $1 - i32.const 14 - call $~lib/typedarray/Float64Array#__get - local.set $16 - local.get $8 - local.get $12 - f64.mul - local.get $9 - local.get $11 - f64.mul - f64.sub - local.tee $24 - local.get $7 - local.get $1 - i32.const 15 - call $~lib/typedarray/Float64Array#__get - local.tee $17 - f64.mul + local.get $17 + local.get $5 local.get $3 - local.get $16 - f64.mul - f64.sub - local.tee $18 f64.mul + local.get $2 local.get $8 - local.get $13 - f64.mul - local.get $10 - local.get $11 f64.mul f64.sub - local.tee $25 - local.get $6 - local.get $17 + local.tee $4 f64.mul - local.get $3 local.get $15 + local.get $21 f64.mul f64.sub - local.tee $19 - f64.mul - f64.sub - local.get $8 + local.get $18 local.get $5 + local.get $10 f64.mul - local.get $4 - local.get $11 + local.get $7 + local.get $8 f64.mul f64.sub - local.tee $20 - local.get $6 - local.get $16 - f64.mul - local.get $7 - local.get $15 + local.tee $26 f64.mul f64.sub - local.tee $21 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $11 + local.get $21 f64.mul - f64.add - local.get $9 local.get $13 - f64.mul - local.get $10 - local.get $12 + local.get $4 f64.mul f64.sub - local.tee $26 - local.get $2 - local.get $17 - f64.mul - local.get $3 local.get $14 - f64.mul - f64.sub - local.tee $3 + local.get $26 f64.mul f64.add - local.get $9 - local.get $5 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $8 + local.get $19 f64.mul - local.get $4 - local.get $12 + local.get $9 + local.get $24 f64.mul f64.sub - local.tee $22 - local.get $2 + local.get $3 + local.get $11 local.get $16 f64.mul - local.get $7 - local.get $14 - f64.mul - f64.sub - local.tee $7 - f64.mul - f64.sub - local.get $10 - local.get $5 - f64.mul - local.get $4 - local.get $13 - f64.mul - f64.sub - local.tee $23 - local.get $2 + local.get $12 local.get $15 f64.mul - local.get $6 - local.get $14 - f64.mul f64.sub - local.tee $6 + local.tee $3 f64.mul f64.add - local.tee $2 - i64.reinterpret_f64 - i64.const 1 - i64.shl - i64.const 2 - i64.sub - i64.const -9007199254740994 - i64.gt_u - if - i32.const 0 - return - end + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 0 - local.get $12 - local.get $18 + i32.const 9 + local.get $6 + local.get $24 f64.mul - local.get $13 + local.get $5 local.get $19 f64.mul f64.sub - local.get $5 - local.get $21 - f64.mul - f64.add - f64.const 1 local.get $2 - f64.div - local.tee $2 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - local.get $13 local.get $3 f64.mul - local.get $11 - local.get $18 - f64.mul - f64.sub - local.get $5 - local.get $7 - f64.mul f64.sub - local.get $2 - f64.mul call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 2 - local.get $11 - local.get $19 + i32.const 10 + local.get $15 + local.get $22 f64.mul - local.get $12 - local.get $3 + local.get $16 + local.get $4 f64.mul f64.sub + local.get $18 local.get $5 - local.get $6 - f64.mul - f64.add - local.get $2 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - local.get $10 - local.get $19 - f64.mul local.get $9 - local.get $18 f64.mul - f64.sub - local.get $4 - local.get $21 + local.get $6 + local.get $8 f64.mul f64.sub - local.get $2 + local.tee $2 f64.mul + f64.add call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 4 - local.get $8 - local.get $18 + i32.const 11 + local.get $12 + local.get $4 f64.mul - local.get $10 - local.get $3 + local.get $11 + local.get $22 f64.mul f64.sub - local.get $4 - local.get $7 - f64.mul - f64.add + local.get $14 local.get $2 f64.mul + f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 5 + i32.const 12 local.get $9 - local.get $3 + local.get $25 f64.mul local.get $8 - local.get $19 + local.get $20 f64.mul f64.sub - local.get $4 - local.get $6 + local.get $10 + local.get $3 f64.mul f64.sub - local.get $2 - f64.mul call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 6 - local.get $15 - local.get $23 + i32.const 13 + local.get $5 + local.get $20 f64.mul - local.get $16 - local.get $22 + local.get $6 + local.get $25 f64.mul f64.sub - local.get $17 - local.get $26 + local.get $7 + local.get $3 f64.mul f64.add - local.get $2 - f64.mul call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 7 + i32.const 14 local.get $16 - local.get $20 + local.get $26 f64.mul - local.get $14 + local.get $15 local.get $23 f64.mul f64.sub local.get $17 - local.get $25 - f64.mul - f64.sub local.get $2 f64.mul + f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 8 - local.get $14 - local.get $22 + i32.const 15 + local.get $11 + local.get $23 f64.mul - local.get $15 - local.get $20 + local.get $12 + local.get $26 f64.mul f64.sub - local.get $17 - local.get $24 - f64.mul - f64.add + local.get $13 local.get $2 f64.mul + f64.add call $~lib/typedarray/Float64Array#__set local.get $0 ) - (func $assembly/mat3/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - i32.const 0 - local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get + (func $assembly/mat4/translate (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 f64) + (local $16 f64) + (local $17 f64) local.get $2 i32.const 0 call $~lib/typedarray/Float64Array#__get - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get + local.set $3 local.get $2 i32.const 1 call $~lib/typedarray/Float64Array#__get - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get + local.set $4 local.get $2 i32.const 2 call $~lib/typedarray/Float64Array#__get - f64.add - call $~lib/typedarray/Float64Array#__set + local.set $5 local.get $0 - i32.const 3 local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 4 - local.get $1 - i32.const 4 - call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 4 - call $~lib/typedarray/Float64Array#__get - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 5 - local.get $1 - i32.const 5 - call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 5 - call $~lib/typedarray/Float64Array#__get - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 6 - local.get $1 - i32.const 6 - call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 6 - call $~lib/typedarray/Float64Array#__get - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 7 - local.get $1 - i32.const 7 - call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 7 - call $~lib/typedarray/Float64Array#__get - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 8 - local.get $1 - i32.const 8 - call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 8 - call $~lib/typedarray/Float64Array#__get - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - ) - (func $assembly/mat3/multiplyScalarAndAdd (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) - local.get $0 - i32.const 0 - local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.get $3 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.get $3 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.get $3 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.get $3 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 4 - local.get $1 - i32.const 4 - call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 4 - call $~lib/typedarray/Float64Array#__get - local.get $3 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 5 - local.get $1 - i32.const 5 - call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 5 - call $~lib/typedarray/Float64Array#__get - local.get $3 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 6 - local.get $1 - i32.const 6 - call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 6 - call $~lib/typedarray/Float64Array#__get - local.get $3 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 7 - local.get $1 - i32.const 7 - call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 7 - call $~lib/typedarray/Float64Array#__get - local.get $3 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 8 - local.get $1 - i32.const 8 - call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 8 - call $~lib/typedarray/Float64Array#__get - local.get $3 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set + i32.eq + if + local.get $0 + i32.const 12 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + f64.add + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.mul + f64.add + local.get $1 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + f64.add + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.mul + f64.add + local.get $1 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + f64.add + local.get $1 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.mul + f64.add + local.get $1 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + f64.add + local.get $1 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.mul + f64.add + local.get $1 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + else + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $12 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $13 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.set $14 + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.set $15 + local.get $1 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.set $16 + local.get $1 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.set $17 + local.get $0 + i32.const 0 + local.get $6 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $7 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $8 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $9 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $10 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $11 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $12 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $13 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $14 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $15 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + local.get $16 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + local.get $17 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + local.get $6 + local.get $3 + f64.mul + local.get $10 + local.get $4 + f64.mul + f64.add + local.get $14 + local.get $5 + f64.mul + f64.add + local.get $1 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $7 + local.get $3 + f64.mul + local.get $11 + local.get $4 + f64.mul + f64.add + local.get $15 + local.get $5 + f64.mul + f64.add + local.get $1 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $8 + local.get $3 + f64.mul + local.get $12 + local.get $4 + f64.mul + f64.add + local.get $16 + local.get $5 + f64.mul + f64.add + local.get $1 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + local.get $9 + local.get $3 + f64.mul + local.get $13 + local.get $4 + f64.mul + f64.add + local.get $17 + local.get $5 + f64.mul + f64.add + local.get $1 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + end local.get $0 ) - (func $assembly/mat3/equals (param $0 i32) (param $1 i32) (result i32) - (local $2 f64) - (local $3 f64) + (func $assembly/mat4/rotate (param $0 i32) (param $1 i32) (param $2 f64) (param $3 i32) (result i32) (local $4 f64) (local $5 f64) (local $6 f64) @@ -10833,355 +11773,491 @@ (local $17 f64) (local $18 f64) (local $19 f64) - local.get $0 + (local $20 f64) + (local $21 f64) + (local $22 f64) + (local $23 f64) + (local $24 f64) + (local $25 f64) + local.get $3 i32.const 0 call $~lib/typedarray/Float64Array#__get - local.set $2 - local.get $0 + local.tee $4 + local.get $3 i32.const 1 call $~lib/typedarray/Float64Array#__get - local.set $3 - local.get $0 + local.tee $7 + local.get $3 i32.const 2 call $~lib/typedarray/Float64Array#__get - local.set $4 - local.get $0 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.set $5 - local.get $0 - i32.const 4 - call $~lib/typedarray/Float64Array#__get - local.set $6 - local.get $0 - i32.const 5 - call $~lib/typedarray/Float64Array#__get - local.set $7 - local.get $0 - i32.const 6 - call $~lib/typedarray/Float64Array#__get - local.set $8 - local.get $0 - i32.const 7 - call $~lib/typedarray/Float64Array#__get - local.set $9 - local.get $0 - i32.const 8 - call $~lib/typedarray/Float64Array#__get - local.set $10 + local.tee $6 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $assembly/imports/MathUtil.hypot + local.tee $5 + f64.const 1e-06 + f64.lt + if + i32.const 0 + return + end + local.get $2 + call $~lib/math/NativeMath.sin + local.set $11 + local.get $2 + call $~lib/math/NativeMath.cos + local.set $12 local.get $1 i32.const 0 call $~lib/typedarray/Float64Array#__get - local.set $11 + local.set $8 local.get $1 i32.const 1 call $~lib/typedarray/Float64Array#__get - local.set $12 + local.set $13 local.get $1 i32.const 2 call $~lib/typedarray/Float64Array#__get - local.set $13 + local.set $14 local.get $1 i32.const 3 call $~lib/typedarray/Float64Array#__get - local.set $14 + local.set $15 local.get $1 i32.const 4 call $~lib/typedarray/Float64Array#__get - local.set $15 + local.set $16 local.get $1 i32.const 5 call $~lib/typedarray/Float64Array#__get - local.set $16 + local.set $17 local.get $1 i32.const 6 call $~lib/typedarray/Float64Array#__get - local.set $17 + local.set $18 local.get $1 i32.const 7 call $~lib/typedarray/Float64Array#__get - local.set $18 + local.set $19 local.get $1 i32.const 8 call $~lib/typedarray/Float64Array#__get - local.set $19 + local.set $20 + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.set $21 + local.get $1 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.set $22 + local.get $1 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.set $23 + local.get $0 + i32.const 0 + local.get $8 + local.get $4 + f64.const 1 + local.get $5 + f64.div + local.tee $5 + f64.mul + local.tee $4 + local.get $4 + f64.mul + f64.const 1 + local.get $12 + f64.sub + local.tee $2 + f64.mul + local.get $12 + f64.add + local.tee $9 + f64.mul + local.get $16 + local.get $7 + local.get $5 + f64.mul + local.tee $7 + local.get $4 + f64.mul local.get $2 + f64.mul + local.get $6 + local.get $5 + f64.mul + local.tee $5 local.get $11 - f64.sub - f64.abs - f64.const 1 + f64.mul + local.tee $24 + f64.add + local.tee $6 + f64.mul + f64.add + local.get $20 + local.get $5 + local.get $4 + f64.mul local.get $2 - f64.abs + f64.mul + local.get $7 local.get $11 - f64.abs - call $assembly/imports/MathUtil.max - f64.const 1e-06 f64.mul - f64.le - if (result i32) - local.get $3 - local.get $12 - f64.sub - f64.abs - f64.const 1 - local.get $3 - f64.abs - local.get $12 - f64.abs - call $assembly/imports/MathUtil.max - f64.const 1e-06 - f64.mul - f64.le - else - i32.const 0 - end - if (result i32) - local.get $4 - local.get $13 - f64.sub - f64.abs - f64.const 1 - local.get $4 - f64.abs - local.get $13 - f64.abs - call $assembly/imports/MathUtil.max - f64.const 1e-06 - f64.mul - f64.le - else - i32.const 0 - end - if (result i32) - local.get $5 - local.get $14 - f64.sub - f64.abs - f64.const 1 - local.get $5 - f64.abs - local.get $14 - f64.abs - call $assembly/imports/MathUtil.max - f64.const 1e-06 - f64.mul - f64.le - else - i32.const 0 - end - if (result i32) - local.get $6 - local.get $15 - f64.sub - f64.abs - f64.const 1 - local.get $6 - f64.abs - local.get $15 - f64.abs - call $assembly/imports/MathUtil.max - f64.const 1e-06 - f64.mul - f64.le - else - i32.const 0 - end - if (result i32) - local.get $7 - local.get $16 - f64.sub - f64.abs - f64.const 1 - local.get $7 - f64.abs - local.get $16 - f64.abs - call $assembly/imports/MathUtil.max - f64.const 1e-06 - f64.mul - f64.le - else - i32.const 0 - end - if (result i32) - local.get $8 - local.get $17 - f64.sub - f64.abs - f64.const 1 - local.get $8 - f64.abs - local.get $17 - f64.abs - call $assembly/imports/MathUtil.max - f64.const 1e-06 - f64.mul - f64.le - else - i32.const 0 - end - if (result i32) - local.get $9 - local.get $18 - f64.sub - f64.abs - f64.const 1 - local.get $9 - f64.abs - local.get $18 - f64.abs - call $assembly/imports/MathUtil.max - f64.const 1e-06 - f64.mul - f64.le - else - i32.const 0 - end - if (result i32) - local.get $10 - local.get $19 - f64.sub - f64.abs - f64.const 1 - local.get $10 - f64.abs - local.get $19 - f64.abs - call $assembly/imports/MathUtil.max - f64.const 1e-06 - f64.mul - f64.le - else - i32.const 0 - end - ) - (func $assembly/mat4/copy (param $0 i32) (param $1 i32) (result i32) - local.get $0 - i32.const 0 - local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get + local.tee $25 + f64.sub + local.tee $10 + f64.mul + f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get + local.get $13 + local.get $9 + f64.mul + local.get $17 + local.get $6 + f64.mul + f64.add + local.get $21 + local.get $10 + f64.mul + f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get + local.get $14 + local.get $9 + f64.mul + local.get $18 + local.get $6 + f64.mul + f64.add + local.get $22 + local.get $10 + f64.mul + f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 3 - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get + local.get $15 + local.get $9 + f64.mul + local.get $19 + local.get $6 + f64.mul + f64.add + local.get $23 + local.get $10 + f64.mul + f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 4 - local.get $1 - i32.const 4 - call $~lib/typedarray/Float64Array#__get + local.get $8 + local.get $4 + local.get $7 + f64.mul + local.get $2 + f64.mul + local.get $24 + f64.sub + local.tee $9 + f64.mul + local.get $16 + local.get $7 + local.get $7 + f64.mul + local.get $2 + f64.mul + local.get $12 + f64.add + local.tee $6 + f64.mul + f64.add + local.get $20 + local.get $5 + local.get $7 + f64.mul + local.get $2 + f64.mul + local.get $4 + local.get $11 + f64.mul + local.tee $11 + f64.add + local.tee $10 + f64.mul + f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 5 - local.get $1 - i32.const 5 - call $~lib/typedarray/Float64Array#__get + local.get $13 + local.get $9 + f64.mul + local.get $17 + local.get $6 + f64.mul + f64.add + local.get $21 + local.get $10 + f64.mul + f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 6 - local.get $1 - i32.const 6 - call $~lib/typedarray/Float64Array#__get + local.get $14 + local.get $9 + f64.mul + local.get $18 + local.get $6 + f64.mul + f64.add + local.get $22 + local.get $10 + f64.mul + f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 7 - local.get $1 - i32.const 7 - call $~lib/typedarray/Float64Array#__get + local.get $15 + local.get $9 + f64.mul + local.get $19 + local.get $6 + f64.mul + f64.add + local.get $23 + local.get $10 + f64.mul + f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 8 - local.get $1 - i32.const 8 - call $~lib/typedarray/Float64Array#__get + local.get $8 + local.get $4 + local.get $5 + f64.mul + local.get $2 + f64.mul + local.get $25 + f64.add + local.tee $8 + f64.mul + local.get $16 + local.get $7 + local.get $5 + f64.mul + local.get $2 + f64.mul + local.get $11 + f64.sub + local.tee $4 + f64.mul + f64.add + local.get $20 + local.get $5 + local.get $5 + f64.mul + local.get $2 + f64.mul + local.get $12 + f64.add + local.tee $2 + f64.mul + f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 9 - local.get $1 - i32.const 9 - call $~lib/typedarray/Float64Array#__get + local.get $13 + local.get $8 + f64.mul + local.get $17 + local.get $4 + f64.mul + f64.add + local.get $21 + local.get $2 + f64.mul + f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 10 - local.get $1 - i32.const 10 - call $~lib/typedarray/Float64Array#__get + local.get $14 + local.get $8 + f64.mul + local.get $18 + local.get $4 + f64.mul + f64.add + local.get $22 + local.get $2 + f64.mul + f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 11 - local.get $1 - i32.const 11 - call $~lib/typedarray/Float64Array#__get + local.get $15 + local.get $8 + f64.mul + local.get $19 + local.get $4 + f64.mul + f64.add + local.get $23 + local.get $2 + f64.mul + f64.add call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 12 local.get $1 - i32.const 12 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set + i32.ne + if + local.get $0 + i32.const 12 + local.get $1 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $1 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $1 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + local.get $1 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + end local.get $0 - i32.const 13 + ) + (func $assembly/mat4/fromRotationTranslation (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) local.get $1 - i32.const 13 + i32.const 0 call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 14 + local.set $3 local.get $1 - i32.const 14 + i32.const 1 call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 15 + local.set $4 local.get $1 - i32.const 15 + i32.const 2 call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - ) - (func $assembly/mat4/identity (param $0 i32) (result i32) + local.tee $5 + local.get $5 + f64.add + local.set $6 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $8 local.get $0 i32.const 0 f64.const 1 + local.get $4 + local.get $4 + local.get $4 + f64.add + local.tee $7 + f64.mul + local.tee $10 + local.get $5 + local.get $6 + f64.mul + local.tee $5 + f64.add + f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 - f64.const 0 + local.get $3 + local.get $7 + f64.mul + local.tee $9 + local.get $8 + local.get $6 + f64.mul + local.tee $11 + f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 - f64.const 0 - call $~lib/typedarray/Float64Array#__set + local.get $3 + local.get $6 + f64.mul + local.tee $12 + local.get $8 + local.get $7 + f64.mul + local.tee $7 + f64.sub + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 3 f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 4 - f64.const 0 + local.get $9 + local.get $11 + f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 5 f64.const 1 + local.get $3 + local.get $3 + local.get $3 + f64.add + local.tee $3 + f64.mul + local.tee $9 + local.get $5 + f64.add + f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 6 - f64.const 0 + local.get $4 + local.get $6 + f64.mul + local.tee $4 + local.get $8 + local.get $3 + f64.mul + local.tee $3 + f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 7 @@ -11189,15 +12265,23 @@ call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 8 - f64.const 0 + local.get $12 + local.get $7 + f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 9 - f64.const 0 + local.get $4 + local.get $3 + f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 10 f64.const 1 + local.get $9 + local.get $10 + f64.add + f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 11 @@ -11205,15 +12289,21 @@ call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 12 - f64.const 0 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 13 - f64.const 0 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 14 - f64.const 0 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 15 @@ -11221,202 +12311,28 @@ call $~lib/typedarray/Float64Array#__set local.get $0 ) - (func $assembly/mat4/transpose (param $0 i32) (param $1 i32) (result i32) - (local $2 f64) - (local $3 f64) - (local $4 f64) - (local $5 f64) - (local $6 f64) - (local $7 f64) + (func $assembly/mat4/getTranslation (param $0 i32) (param $1 i32) (result i32) local.get $0 + i32.const 0 local.get $1 - i32.eq - if - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.set $2 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.set $3 - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.set $4 - local.get $1 - i32.const 6 - call $~lib/typedarray/Float64Array#__get - local.set $5 - local.get $1 - i32.const 7 - call $~lib/typedarray/Float64Array#__get - local.set $6 - local.get $1 - i32.const 11 - call $~lib/typedarray/Float64Array#__get - local.set $7 - local.get $0 - i32.const 1 - local.get $1 - i32.const 4 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - local.get $1 - i32.const 8 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - local.get $1 - i32.const 12 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 4 - local.get $2 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 6 - local.get $1 - i32.const 9 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 7 - local.get $1 - i32.const 13 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 8 - local.get $3 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 9 - local.get $5 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 11 - local.get $1 - i32.const 14 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 12 - local.get $4 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 13 - local.get $6 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 14 - local.get $7 - call $~lib/typedarray/Float64Array#__set - else - local.get $0 - i32.const 0 - local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - local.get $1 - i32.const 4 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - local.get $1 - i32.const 8 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - local.get $1 - i32.const 12 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 4 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 5 - local.get $1 - i32.const 5 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 6 - local.get $1 - i32.const 9 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 7 - local.get $1 - i32.const 13 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 8 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 9 - local.get $1 - i32.const 6 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 10 - local.get $1 - i32.const 10 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 11 - local.get $1 - i32.const 14 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 12 - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 13 - local.get $1 - i32.const 7 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 14 - local.get $1 - i32.const 11 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 15 - local.get $1 - i32.const 15 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - end + i32.const 12 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set local.get $0 ) - (func $assembly/mat4/invert (param $0 i32) (param $1 i32) (result i32) + (func $assembly/mat4/getScaling (param $0 i32) (param $1 i32) (result i32) (local $2 f64) (local $3 f64) (local $4 f64) @@ -11426,472 +12342,731 @@ (local $8 f64) (local $9 f64) (local $10 f64) - (local $11 f64) - (local $12 f64) - (local $13 f64) - (local $14 f64) - (local $15 f64) - (local $16 f64) - (local $17 f64) - (local $18 f64) - (local $19 f64) - (local $20 f64) - (local $21 f64) - (local $22 f64) - (local $23 f64) - (local $24 f64) - (local $25 f64) - (local $26 f64) - (local $27 f64) - (local $28 f64) - (local $29 f64) - (local $30 f64) local.get $1 i32.const 0 call $~lib/typedarray/Float64Array#__get - local.set $3 + local.set $2 local.get $1 i32.const 1 call $~lib/typedarray/Float64Array#__get - local.set $4 + local.set $3 local.get $1 i32.const 2 call $~lib/typedarray/Float64Array#__get - local.set $5 - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.set $6 + local.set $4 local.get $1 i32.const 4 call $~lib/typedarray/Float64Array#__get - local.set $7 + local.set $5 local.get $1 i32.const 5 call $~lib/typedarray/Float64Array#__get - local.set $8 + local.set $6 local.get $1 i32.const 6 call $~lib/typedarray/Float64Array#__get - local.set $9 - local.get $1 - i32.const 7 - call $~lib/typedarray/Float64Array#__get - local.set $10 + local.set $7 local.get $1 i32.const 8 call $~lib/typedarray/Float64Array#__get - local.set $11 + local.set $8 local.get $1 i32.const 9 call $~lib/typedarray/Float64Array#__get - local.set $12 + local.set $9 local.get $1 i32.const 10 call $~lib/typedarray/Float64Array#__get - local.set $13 - local.get $1 - i32.const 11 - call $~lib/typedarray/Float64Array#__get - local.set $14 + local.set $10 + local.get $0 + i32.const 0 + local.get $2 + local.get $3 + local.get $4 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $assembly/imports/MathUtil.hypot + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $5 + local.get $6 + local.get $7 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $assembly/imports/MathUtil.hypot + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $8 + local.get $9 + local.get $10 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $assembly/imports/MathUtil.hypot + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/mat4/decompose (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 f64) local.get $1 + i32.const 0 + local.get $3 i32.const 12 call $~lib/typedarray/Float64Array#__get - local.set $15 + call $~lib/typedarray/Float64Array#__set local.get $1 + i32.const 1 + local.get $3 i32.const 13 call $~lib/typedarray/Float64Array#__get - local.set $16 + call $~lib/typedarray/Float64Array#__set local.get $1 + i32.const 2 + local.get $3 i32.const 14 call $~lib/typedarray/Float64Array#__get - local.set $17 + call $~lib/typedarray/Float64Array#__set local.get $3 - local.get $8 - f64.mul - local.get $4 - local.get $7 - f64.mul - f64.sub - local.tee $19 - local.get $13 - local.get $1 - i32.const 15 + i32.const 0 call $~lib/typedarray/Float64Array#__get - local.tee $18 - f64.mul - local.get $14 - local.get $17 - f64.mul - f64.sub - local.tee $20 - f64.mul + local.set $6 local.get $3 - local.get $9 - f64.mul - local.get $5 - local.get $7 - f64.mul - f64.sub - local.tee $21 - local.get $12 - local.get $18 - f64.mul - local.get $14 - local.get $16 - f64.mul - f64.sub - local.tee $22 - f64.mul - f64.sub + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $5 local.get $3 - local.get $10 - f64.mul + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $3 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $3 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $12 + local.get $3 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $3 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $3 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $3 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.set $14 + local.get $2 + i32.const 0 local.get $6 + local.get $5 local.get $7 - f64.mul - f64.sub - local.tee $23 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $assembly/imports/MathUtil.hypot + call $~lib/typedarray/Float64Array#__set + local.get $2 + i32.const 1 + local.get $8 local.get $12 - local.get $17 - f64.mul - local.get $13 - local.get $16 - f64.mul - f64.sub - local.tee $24 - f64.mul - f64.add - local.get $4 local.get $9 - f64.mul - local.get $5 - local.get $8 - f64.mul - f64.sub - local.tee $25 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $assembly/imports/MathUtil.hypot + call $~lib/typedarray/Float64Array#__set + local.get $2 + i32.const 2 + local.get $10 local.get $11 - local.get $18 - f64.mul local.get $14 - local.get $15 - f64.mul - f64.sub - local.tee $26 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $assembly/imports/MathUtil.hypot + call $~lib/typedarray/Float64Array#__set + f64.const 1 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.div + local.set $4 + local.get $5 + f64.const 1 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.div + local.tee $5 f64.mul - f64.add - local.get $4 - local.get $10 + local.set $13 + local.get $7 + f64.const 1 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.div + local.tee $15 f64.mul - local.get $6 + local.set $7 local.get $8 + local.get $4 f64.mul - f64.sub - local.tee $27 - local.get $11 - local.get $17 - f64.mul - local.get $13 + local.set $8 + local.get $9 local.get $15 f64.mul - f64.sub - local.tee $28 + local.set $9 + local.get $10 + local.get $4 f64.mul - f64.sub + local.set $10 + local.get $11 local.get $5 - local.get $10 f64.mul + local.set $11 local.get $6 - local.get $9 - f64.mul - f64.sub - local.tee $29 - local.get $11 - local.get $16 + local.get $4 f64.mul + local.tee $4 local.get $12 - local.get $15 + local.get $5 f64.mul - f64.sub - local.tee $30 + local.tee $6 + f64.add + local.get $14 + local.get $15 f64.mul + local.tee $5 f64.add - local.tee $2 - i64.reinterpret_f64 - i64.const 1 - i64.shl - i64.const 2 - i64.sub - i64.const -9007199254740994 - i64.gt_u + local.tee $12 + f64.const 0 + f64.gt if + local.get $0 + i32.const 3 + local.get $12 + f64.const 1 + f64.add + f64.sqrt + local.tee $4 + local.get $4 + f64.add + local.tee $4 + f64.const 0.25 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 i32.const 0 - return + local.get $9 + local.get $11 + f64.sub + local.get $4 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $10 + local.get $7 + f64.sub + local.get $4 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $13 + local.get $8 + f64.sub + local.get $4 + f64.div + call $~lib/typedarray/Float64Array#__set + else + local.get $4 + local.get $5 + f64.gt + i32.const 0 + local.get $4 + local.get $6 + f64.gt + select + if + local.get $0 + i32.const 3 + local.get $9 + local.get $11 + f64.sub + local.get $4 + f64.const 1 + f64.add + local.get $6 + f64.sub + local.get $5 + f64.sub + f64.sqrt + local.tee $4 + local.get $4 + f64.add + local.tee $4 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 0 + local.get $4 + f64.const 0.25 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $13 + local.get $8 + f64.add + local.get $4 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $10 + local.get $7 + f64.add + local.get $4 + f64.div + call $~lib/typedarray/Float64Array#__set + else + local.get $5 + local.get $6 + f64.lt + if + local.get $0 + i32.const 3 + local.get $10 + local.get $7 + f64.sub + local.get $6 + f64.const 1 + f64.add + local.get $4 + f64.sub + local.get $5 + f64.sub + f64.sqrt + local.tee $4 + local.get $4 + f64.add + local.tee $4 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 0 + local.get $13 + local.get $8 + f64.add + local.get $4 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $4 + f64.const 0.25 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $9 + local.get $11 + f64.add + local.get $4 + f64.div + call $~lib/typedarray/Float64Array#__set + else + local.get $0 + i32.const 3 + local.get $13 + local.get $8 + f64.sub + local.get $5 + f64.const 1 + f64.add + local.get $4 + f64.sub + local.get $6 + f64.sub + f64.sqrt + local.tee $4 + local.get $4 + f64.add + local.tee $4 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 0 + local.get $10 + local.get $7 + f64.add + local.get $4 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $9 + local.get $11 + f64.add + local.get $4 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $4 + f64.const 0.25 + f64.mul + call $~lib/typedarray/Float64Array#__set + end + end end local.get $0 + ) + (func $assembly/mat4/fromRotationTranslationScaleOrigin (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 f64) + (local $16 f64) + (local $17 f64) + (local $18 f64) + (local $19 f64) + (local $20 f64) + (local $21 f64) + (local $22 f64) + local.get $1 i32.const 0 - local.get $8 - local.get $20 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.tee $7 + local.get $7 + f64.add + local.set $8 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $3 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $3 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $15 + local.get $3 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $16 + local.get $4 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $4 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $12 + local.get $4 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $13 + local.get $0 + i32.const 0 + f64.const 1 + local.get $6 + local.get $6 + local.get $6 + f64.add + local.tee $14 f64.mul - local.get $9 - local.get $22 + local.tee $19 + local.get $7 + local.get $8 f64.mul + local.tee $7 + f64.add f64.sub local.get $10 - local.get $24 - f64.mul - f64.add - f64.const 1 - local.get $2 - f64.div - local.tee $2 f64.mul + local.tee $20 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 local.get $5 - local.get $22 - f64.mul - local.get $4 - local.get $20 + local.get $14 f64.mul - f64.sub - local.get $6 - local.get $24 + local.tee $17 + local.get $9 + local.get $8 f64.mul - f64.sub - local.get $2 + local.tee $18 + f64.add + local.get $10 f64.mul + local.tee $21 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 - local.get $16 - local.get $29 + local.get $5 + local.get $8 f64.mul - local.get $17 - local.get $27 + local.tee $22 + local.get $9 + local.get $14 f64.mul + local.tee $14 f64.sub - local.get $18 - local.get $25 - f64.mul - f64.add - local.get $2 + local.get $10 f64.mul + local.tee $10 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 3 - local.get $13 - local.get $27 - f64.mul - local.get $12 - local.get $29 - f64.mul - f64.sub - local.get $14 - local.get $25 - f64.mul - f64.sub - local.get $2 - f64.mul + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 4 - local.get $9 - local.get $26 - f64.mul - local.get $7 - local.get $20 - f64.mul - f64.sub - local.get $10 - local.get $28 - f64.mul + local.get $17 + local.get $18 f64.sub - local.get $2 + local.get $15 f64.mul + local.tee $17 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 5 - local.get $3 - local.get $20 - f64.mul + f64.const 1 local.get $5 - local.get $26 - f64.mul - f64.sub - local.get $6 - local.get $28 + local.get $5 + local.get $5 + f64.add + local.tee $5 f64.mul + local.tee $18 + local.get $7 f64.add - local.get $2 + f64.sub + local.get $15 f64.mul + local.tee $7 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 6 - local.get $17 - local.get $23 - f64.mul - local.get $15 - local.get $29 + local.get $6 + local.get $8 f64.mul - f64.sub - local.get $18 - local.get $21 + local.tee $6 + local.get $9 + local.get $5 f64.mul - f64.sub - local.get $2 + local.tee $5 + f64.add + local.get $15 f64.mul + local.tee $8 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 7 - local.get $11 - local.get $29 - f64.mul - local.get $13 - local.get $23 - f64.mul - f64.sub - local.get $14 - local.get $21 - f64.mul - f64.add - local.get $2 - f64.mul + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 8 - local.get $7 local.get $22 - f64.mul - local.get $8 - local.get $26 - f64.mul - f64.sub - local.get $10 - local.get $30 - f64.mul + local.get $14 f64.add - local.get $2 + local.get $16 f64.mul + local.tee $9 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 9 - local.get $4 - local.get $26 - f64.mul - local.get $3 - local.get $22 - f64.mul - f64.sub - local.get $6 - local.get $30 - f64.mul - f64.sub - local.get $2 + local.get $6 + local.get $5 + f64.sub + local.get $16 f64.mul + local.tee $5 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 10 - local.get $15 - local.get $27 - f64.mul - local.get $16 - local.get $23 - f64.mul - f64.sub + f64.const 1 local.get $18 local.get $19 - f64.mul f64.add - local.get $2 + f64.sub + local.get $16 f64.mul + local.tee $6 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 11 - local.get $12 - local.get $23 - f64.mul - local.get $11 - local.get $27 - f64.mul - f64.sub - local.get $14 - local.get $19 - f64.mul - f64.sub - local.get $2 - f64.mul + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 12 - local.get $8 - local.get $28 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $11 + f64.add + local.get $20 + local.get $11 f64.mul - local.get $7 - local.get $24 + local.get $17 + local.get $12 f64.mul - f64.sub + f64.add local.get $9 - local.get $30 + local.get $13 f64.mul + f64.add f64.sub - local.get $2 - f64.mul call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 13 - local.get $3 - local.get $24 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $12 + f64.add + local.get $21 + local.get $11 f64.mul - local.get $4 - local.get $28 + local.get $7 + local.get $12 f64.mul - f64.sub + f64.add local.get $5 - local.get $30 + local.get $13 f64.mul f64.add - local.get $2 - f64.mul + f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 14 - local.get $16 - local.get $21 - f64.mul - local.get $15 - local.get $25 - f64.mul - f64.sub - local.get $17 - local.get $19 - f64.mul - f64.sub local.get $2 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 15 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $13 + f64.add + local.get $10 local.get $11 - local.get $25 f64.mul + local.get $8 local.get $12 - local.get $21 f64.mul - f64.sub + f64.add + local.get $6 local.get $13 - local.get $19 f64.mul f64.add - local.get $2 - f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + f64.const 1 call $~lib/typedarray/Float64Array#__set local.get $0 ) - (func $assembly/mat4/adjoint (param $0 i32) (param $1 i32) (result i32) - (local $2 f64) - (local $3 f64) + (func $assembly/mat4/lookAt (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 f64) (local $5 f64) (local $6 f64) @@ -11905,393 +13080,344 @@ (local $14 f64) (local $15 f64) (local $16 f64) - (local $17 f64) - (local $18 f64) - (local $19 f64) - (local $20 f64) - (local $21 f64) - (local $22 f64) - (local $23 f64) - (local $24 f64) - (local $25 f64) - (local $26 f64) local.get $1 i32.const 0 call $~lib/typedarray/Float64Array#__get - local.set $5 + local.set $13 local.get $1 i32.const 1 call $~lib/typedarray/Float64Array#__get - local.set $6 + local.set $14 local.get $1 i32.const 2 call $~lib/typedarray/Float64Array#__get - local.set $7 - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.set $2 - local.get $1 - i32.const 4 - call $~lib/typedarray/Float64Array#__get - local.set $8 - local.get $1 - i32.const 5 - call $~lib/typedarray/Float64Array#__get - local.set $9 - local.get $1 - i32.const 6 - call $~lib/typedarray/Float64Array#__get - local.set $10 - local.get $1 - i32.const 7 + local.set $15 + local.get $3 + i32.const 0 call $~lib/typedarray/Float64Array#__get - local.set $3 - local.get $1 - i32.const 8 + local.set $5 + local.get $3 + i32.const 1 call $~lib/typedarray/Float64Array#__get local.set $11 - local.get $1 - i32.const 9 - call $~lib/typedarray/Float64Array#__get - local.set $12 - local.get $1 - i32.const 10 - call $~lib/typedarray/Float64Array#__get - local.set $13 - local.get $1 - i32.const 11 - call $~lib/typedarray/Float64Array#__get - local.set $14 - local.get $1 - i32.const 12 - call $~lib/typedarray/Float64Array#__get - local.set $15 - local.get $1 - i32.const 13 - call $~lib/typedarray/Float64Array#__get - local.set $16 - local.get $1 - i32.const 14 + local.get $3 + i32.const 2 call $~lib/typedarray/Float64Array#__get - local.set $17 - local.get $0 + local.set $6 + local.get $2 i32.const 0 - local.get $9 - local.get $13 - local.get $1 - i32.const 15 call $~lib/typedarray/Float64Array#__get - local.tee $18 - f64.mul - local.get $14 - local.get $17 - f64.mul - f64.sub - local.tee $4 - f64.mul - local.get $10 - local.get $12 - local.get $18 - f64.mul - local.get $14 - local.get $16 - f64.mul - f64.sub - local.tee $19 - f64.mul - f64.sub - local.get $3 - local.get $12 - local.get $17 - f64.mul - local.get $13 - local.get $16 - f64.mul - f64.sub - local.tee $20 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 + local.set $7 + local.get $2 i32.const 1 - local.get $7 - local.get $19 - f64.mul - local.get $6 - local.get $4 - f64.mul - f64.sub + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $15 local.get $2 - local.get $20 - f64.mul - f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 i32.const 2 - local.get $16 - local.get $7 - local.get $3 - f64.mul - local.get $2 - local.get $10 - f64.mul - f64.sub - local.tee $21 - f64.mul - local.get $17 - local.get $6 - local.get $3 - f64.mul - local.get $2 - local.get $9 - f64.mul + call $~lib/typedarray/Float64Array#__get + local.tee $4 f64.sub - local.tee $22 - f64.mul + f64.abs + f64.const 1e-06 + f64.lt + i32.const 0 + local.get $14 + local.get $8 f64.sub - local.get $18 - local.get $6 - local.get $10 - f64.mul + f64.abs + f64.const 1e-06 + f64.lt + i32.const 0 + local.get $13 local.get $7 - local.get $9 - f64.mul f64.sub - local.tee $23 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 + f64.abs + f64.const 1e-06 + f64.lt + select + select + if + local.get $0 + call $assembly/mat4/identity + return + end + f64.const 1 local.get $13 - local.get $22 - f64.mul - local.get $12 - local.get $21 - f64.mul + local.get $7 f64.sub + local.tee $9 local.get $14 - local.get $23 - f64.mul + local.get $8 f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 4 - local.get $10 - local.get $11 - local.get $18 - f64.mul - local.get $14 + local.tee $8 local.get $15 - f64.mul - f64.sub - local.tee $24 - f64.mul - local.get $8 local.get $4 - f64.mul f64.sub - local.get $3 + local.tee $7 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $assembly/imports/MathUtil.hypot + f64.div + local.set $4 local.get $11 - local.get $17 - f64.mul - local.get $13 - local.get $15 + local.get $7 + local.get $4 f64.mul - f64.sub - local.tee $25 + local.tee $7 f64.mul - f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 5 - local.get $5 + local.get $6 + local.get $8 local.get $4 f64.mul - local.get $7 - local.get $24 + local.tee $8 f64.mul f64.sub - local.get $2 - local.get $25 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 6 - local.get $17 - local.get $5 - local.get $3 - f64.mul - local.get $2 - local.get $8 + local.tee $12 + local.get $6 + local.get $9 + local.get $4 f64.mul - f64.sub local.tee $4 f64.mul - local.get $15 - local.get $21 - f64.mul - f64.sub - local.get $18 local.get $5 - local.get $10 - f64.mul local.get $7 - local.get $8 f64.mul f64.sub - local.tee $26 + local.tee $9 + local.get $5 + local.get $8 f64.mul - f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 7 local.get $11 - local.get $21 - f64.mul - local.get $13 local.get $4 f64.mul f64.sub - local.get $14 - local.get $26 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 8 + local.tee $10 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $assembly/imports/MathUtil.hypot + local.tee $5 + i64.reinterpret_f64 + i64.const 1 + i64.shl + i64.const 2 + i64.sub + i64.const -9007199254740994 + i64.gt_u + if (result f64) + f64.const 0 + local.set $5 + f64.const 0 + local.set $11 + f64.const 0 + else + local.get $12 + f64.const 1 + local.get $5 + f64.div + local.tee $6 + f64.mul + local.set $5 + local.get $9 + local.get $6 + f64.mul + local.set $11 + local.get $10 + local.get $6 + f64.mul + end + local.set $6 local.get $8 - local.get $19 - f64.mul - local.get $9 - local.get $24 + local.get $6 f64.mul - f64.sub - local.get $3 + local.get $7 local.get $11 - local.get $16 - f64.mul - local.get $12 - local.get $15 f64.mul f64.sub - local.tee $3 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 9 - local.get $6 - local.get $24 - f64.mul + local.tee $9 + local.get $7 local.get $5 - local.get $19 - f64.mul - f64.sub - local.get $2 - local.get $3 - f64.mul - f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 10 - local.get $15 - local.get $22 f64.mul - local.get $16 local.get $4 - f64.mul - f64.sub - local.get $18 - local.get $5 - local.get $9 - f64.mul local.get $6 - local.get $8 f64.mul f64.sub - local.tee $2 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 11 - local.get $12 + local.tee $12 local.get $4 - f64.mul local.get $11 - local.get $22 - f64.mul - f64.sub - local.get $14 - local.get $2 - f64.mul - f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 12 - local.get $9 - local.get $25 f64.mul local.get $8 - local.get $20 + local.get $5 f64.mul f64.sub + local.tee $16 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $assembly/imports/MathUtil.hypot + local.tee $10 + i64.reinterpret_f64 + i64.const 1 + i64.shl + i64.const 2 + i64.sub + i64.const -9007199254740994 + i64.gt_u + if (result f64) + f64.const 0 + local.set $9 + f64.const 0 + local.set $12 + f64.const 0 + else + local.get $9 + f64.const 1 + local.get $10 + f64.div + local.tee $10 + f64.mul + local.set $9 + local.get $12 + local.get $10 + f64.mul + local.set $12 + local.get $16 + local.get $10 + f64.mul + end + local.set $10 + local.get $0 + i32.const 0 + local.get $5 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $9 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $4 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $11 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $12 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $8 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $6 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 local.get $10 - local.get $3 - f64.mul - f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 13 + i32.const 10 + local.get $7 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 local.get $5 - local.get $20 + local.get $13 f64.mul - local.get $6 - local.get $25 + local.get $11 + local.get $14 f64.mul - f64.sub - local.get $7 - local.get $3 + f64.add + local.get $6 + local.get $15 f64.mul f64.add + f64.neg call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 14 - local.get $16 - local.get $26 + i32.const 13 + local.get $9 + local.get $13 f64.mul - local.get $15 - local.get $23 + local.get $12 + local.get $14 f64.mul - f64.sub - local.get $17 - local.get $2 + f64.add + local.get $10 + local.get $15 f64.mul - f64.sub + f64.add + f64.neg call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 15 - local.get $11 - local.get $23 + i32.const 14 + local.get $4 + local.get $13 f64.mul - local.get $12 - local.get $26 + local.get $8 + local.get $14 f64.mul - f64.sub - local.get $13 - local.get $2 + f64.add + local.get $7 + local.get $15 f64.mul f64.add + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + f64.const 1 call $~lib/typedarray/Float64Array#__set local.get $0 ) - (func $assembly/mat4/determinant (param $0 i32) (result f64) - (local $1 f64) - (local $2 f64) - (local $3 f64) + (func $assembly/mat4/targetTo (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 f64) (local $5 f64) (local $6 f64) @@ -12302,168 +13428,216 @@ (local $11 f64) (local $12 f64) (local $13 f64) - (local $14 f64) - (local $15 f64) - (local $16 f64) - (local $17 f64) - local.get $0 + local.get $1 i32.const 0 call $~lib/typedarray/Float64Array#__get - local.set $1 - local.get $0 + local.set $8 + local.get $1 i32.const 1 call $~lib/typedarray/Float64Array#__get - local.set $5 - local.get $0 + local.set $7 + local.get $1 i32.const 2 call $~lib/typedarray/Float64Array#__get - local.set $2 - local.get $0 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.set $13 - local.get $0 - i32.const 4 - call $~lib/typedarray/Float64Array#__get local.set $6 - local.get $0 - i32.const 5 - call $~lib/typedarray/Float64Array#__get - local.set $7 - local.get $0 - i32.const 6 - call $~lib/typedarray/Float64Array#__get - local.set $8 - local.get $0 - i32.const 7 - call $~lib/typedarray/Float64Array#__get - local.get $0 - i32.const 8 + local.get $3 + i32.const 0 call $~lib/typedarray/Float64Array#__get - local.set $3 - local.get $0 - i32.const 9 + local.set $12 + local.get $3 + i32.const 1 call $~lib/typedarray/Float64Array#__get local.set $9 - local.get $0 - i32.const 10 - call $~lib/typedarray/Float64Array#__get - local.set $10 - local.get $0 - i32.const 11 - call $~lib/typedarray/Float64Array#__get - local.set $14 - local.get $0 - i32.const 12 + local.get $3 + i32.const 2 call $~lib/typedarray/Float64Array#__get - local.set $11 - local.get $0 - i32.const 13 + local.set $5 + local.get $8 + local.get $2 + i32.const 0 call $~lib/typedarray/Float64Array#__get - local.set $12 - local.get $1 - local.get $9 - local.get $0 - i32.const 14 + f64.sub + local.tee $11 + local.get $11 + f64.mul + local.get $7 + local.get $2 + i32.const 1 call $~lib/typedarray/Float64Array#__get + f64.sub local.tee $4 + local.get $4 f64.mul + f64.add + local.get $6 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.sub + local.tee $10 local.get $10 - local.get $12 f64.mul - f64.sub - local.tee $15 + f64.add + local.tee $13 + f64.const 0 + f64.gt + if + local.get $11 + f64.const 1 + local.get $13 + f64.sqrt + f64.div + local.tee $13 + f64.mul + local.set $11 + local.get $10 + local.get $13 + f64.mul + local.set $10 + local.get $4 + local.get $13 + f64.mul + local.set $4 + end + local.get $9 + local.get $10 f64.mul local.get $5 - local.get $3 local.get $4 f64.mul - local.get $10 + f64.sub + local.tee $13 + local.get $13 + f64.mul + local.get $5 local.get $11 f64.mul - f64.sub - local.tee $16 + local.get $12 + local.get $10 f64.mul f64.sub - local.get $2 - local.get $3 + local.tee $5 + local.get $5 + f64.mul + f64.add local.get $12 + local.get $4 f64.mul local.get $9 local.get $11 f64.mul f64.sub - local.tee $17 + local.tee $12 + local.get $12 f64.mul f64.add - f64.mul + local.tee $9 + f64.const 0 + f64.gt + if + local.get $13 + f64.const 1 + local.get $9 + f64.sqrt + f64.div + local.tee $9 + f64.mul + local.set $13 + local.get $12 + local.get $9 + f64.mul + local.set $12 + local.get $5 + local.get $9 + f64.mul + local.set $5 + end + local.get $0 + i32.const 0 local.get $13 - local.get $6 - local.get $15 - f64.mul - local.get $7 - local.get $16 - f64.mul - f64.sub - local.get $8 - local.get $17 - f64.mul - f64.add - f64.mul - f64.sub + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 15 - call $~lib/typedarray/Float64Array#__get - local.get $3 + i32.const 1 local.get $5 - local.get $8 - f64.mul - local.get $2 - local.get $7 - f64.mul - f64.sub - local.tee $3 - f64.mul - local.get $9 - local.get $1 - local.get $8 - f64.mul - local.get $2 - local.get $6 - f64.mul - f64.sub - local.tee $2 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $12 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $4 + local.get $12 f64.mul - f64.sub local.get $10 - local.get $1 - local.get $7 - f64.mul local.get $5 - local.get $6 f64.mul f64.sub - local.tee $1 - f64.mul - f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $10 + local.get $13 f64.mul - f64.add - local.get $14 local.get $11 - local.get $3 - f64.mul local.get $12 - local.get $2 f64.mul f64.sub - local.get $4 - local.get $1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $11 + local.get $5 f64.mul - f64.add + local.get $4 + local.get $13 f64.mul f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $11 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $4 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + local.get $10 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + local.get $8 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $7 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $6 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 ) - (func $assembly/mat4/translate (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $assembly/mat4/equals (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) (local $3 f64) (local $4 f64) (local $5 f64) @@ -12479,1393 +13653,1868 @@ (local $15 f64) (local $16 f64) (local $17 f64) - local.get $2 + (local $18 f64) + (local $19 f64) + (local $20 f64) + (local $21 f64) + (local $22 f64) + (local $23 f64) + (local $24 f64) + (local $25 f64) + (local $26 f64) + (local $27 f64) + (local $28 f64) + (local $29 f64) + (local $30 f64) + (local $31 f64) + (local $32 f64) + (local $33 f64) + local.get $0 i32.const 0 call $~lib/typedarray/Float64Array#__get - local.set $3 - local.get $2 + local.set $2 + local.get $0 i32.const 1 call $~lib/typedarray/Float64Array#__get - local.set $4 - local.get $2 + local.set $3 + local.get $0 i32.const 2 call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get local.set $5 local.get $0 - local.get $1 - i32.eq - if - local.get $0 - i32.const 12 - local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.get $3 - f64.mul - local.get $1 - i32.const 4 - call $~lib/typedarray/Float64Array#__get - local.get $4 - f64.mul - f64.add - local.get $1 - i32.const 8 - call $~lib/typedarray/Float64Array#__get - local.get $5 - f64.mul - f64.add - local.get $1 - i32.const 12 - call $~lib/typedarray/Float64Array#__get - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 13 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.get $3 - f64.mul - local.get $1 - i32.const 5 - call $~lib/typedarray/Float64Array#__get - local.get $4 - f64.mul - f64.add - local.get $1 - i32.const 9 - call $~lib/typedarray/Float64Array#__get - local.get $5 - f64.mul - f64.add - local.get $1 - i32.const 13 - call $~lib/typedarray/Float64Array#__get - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 14 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.get $3 - f64.mul - local.get $1 - i32.const 6 - call $~lib/typedarray/Float64Array#__get - local.get $4 - f64.mul - f64.add - local.get $1 - i32.const 10 - call $~lib/typedarray/Float64Array#__get - local.get $5 - f64.mul - f64.add - local.get $1 - i32.const 14 - call $~lib/typedarray/Float64Array#__get - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 15 - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.get $3 - f64.mul - local.get $1 - i32.const 7 - call $~lib/typedarray/Float64Array#__get - local.get $4 - f64.mul - f64.add - local.get $1 - i32.const 11 - call $~lib/typedarray/Float64Array#__get - local.get $5 - f64.mul - f64.add - local.get $1 - i32.const 15 - call $~lib/typedarray/Float64Array#__get - f64.add - call $~lib/typedarray/Float64Array#__set - else - local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.set $6 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.set $7 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.set $8 - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.set $9 - local.get $1 - i32.const 4 - call $~lib/typedarray/Float64Array#__get - local.set $10 - local.get $1 - i32.const 5 - call $~lib/typedarray/Float64Array#__get - local.set $11 - local.get $1 - i32.const 6 - call $~lib/typedarray/Float64Array#__get - local.set $12 - local.get $1 - i32.const 7 - call $~lib/typedarray/Float64Array#__get - local.set $13 - local.get $1 - i32.const 8 - call $~lib/typedarray/Float64Array#__get - local.set $14 - local.get $1 - i32.const 9 - call $~lib/typedarray/Float64Array#__get - local.set $15 - local.get $1 - i32.const 10 - call $~lib/typedarray/Float64Array#__get - local.set $16 - local.get $1 - i32.const 11 - call $~lib/typedarray/Float64Array#__get - local.set $17 - local.get $0 - i32.const 0 - local.get $6 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - local.get $7 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - local.get $8 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - local.get $9 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 4 - local.get $10 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 5 - local.get $11 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 6 - local.get $12 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 7 - local.get $13 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 8 - local.get $14 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 9 - local.get $15 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 10 - local.get $16 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 11 - local.get $17 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 12 - local.get $6 - local.get $3 - f64.mul - local.get $10 - local.get $4 - f64.mul - f64.add - local.get $14 - local.get $5 - f64.mul - f64.add - local.get $1 - i32.const 12 - call $~lib/typedarray/Float64Array#__get - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 13 - local.get $7 - local.get $3 - f64.mul - local.get $11 - local.get $4 - f64.mul - f64.add - local.get $15 - local.get $5 - f64.mul - f64.add - local.get $1 - i32.const 13 - call $~lib/typedarray/Float64Array#__get - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 14 - local.get $8 - local.get $3 - f64.mul - local.get $12 - local.get $4 - f64.mul - f64.add - local.get $16 - local.get $5 - f64.mul - f64.add - local.get $1 - i32.const 14 - call $~lib/typedarray/Float64Array#__get - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 15 - local.get $9 - local.get $3 - f64.mul - local.get $13 - local.get $4 - f64.mul - f64.add - local.get $17 - local.get $5 - f64.mul - f64.add - local.get $1 - i32.const 15 - call $~lib/typedarray/Float64Array#__get - f64.add - call $~lib/typedarray/Float64Array#__set - end - local.get $0 - ) - (func $assembly/mat4/scale (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 f64) - (local $4 f64) - (local $5 f64) - local.get $2 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.set $3 - local.get $2 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.set $4 - local.get $2 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.set $5 - local.get $0 - i32.const 0 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $0 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $0 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $0 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $0 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $0 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $0 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.set $12 + local.get $0 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.set $13 + local.get $0 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + local.set $14 + local.get $0 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + local.set $15 + local.get $0 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + local.set $16 + local.get $0 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + local.set $17 local.get $1 i32.const 0 call $~lib/typedarray/Float64Array#__get - local.get $3 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 + local.set $18 local.get $1 i32.const 1 call $~lib/typedarray/Float64Array#__get - local.get $3 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 + local.set $19 local.get $1 i32.const 2 call $~lib/typedarray/Float64Array#__get - local.get $3 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 + local.set $20 local.get $1 i32.const 3 call $~lib/typedarray/Float64Array#__get - local.get $3 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 4 + local.set $21 local.get $1 i32.const 4 call $~lib/typedarray/Float64Array#__get - local.get $4 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 5 + local.set $22 local.get $1 i32.const 5 call $~lib/typedarray/Float64Array#__get - local.get $4 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 6 + local.set $23 local.get $1 i32.const 6 call $~lib/typedarray/Float64Array#__get - local.get $4 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 7 + local.set $24 local.get $1 i32.const 7 call $~lib/typedarray/Float64Array#__get - local.get $4 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 8 + local.set $25 local.get $1 i32.const 8 call $~lib/typedarray/Float64Array#__get - local.get $5 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 9 + local.set $26 local.get $1 i32.const 9 call $~lib/typedarray/Float64Array#__get - local.get $5 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 10 + local.set $27 local.get $1 i32.const 10 call $~lib/typedarray/Float64Array#__get - local.get $5 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 11 + local.set $28 local.get $1 i32.const 11 call $~lib/typedarray/Float64Array#__get - local.get $5 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 12 + local.set $29 local.get $1 i32.const 12 call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 13 + local.set $30 local.get $1 i32.const 13 call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 14 + local.set $31 local.get $1 i32.const 14 call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 15 + local.set $32 local.get $1 i32.const 15 call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - ) - (func $assembly/mat4/rotate (param $0 i32) (param $1 i32) (param $2 f64) (param $3 i32) (result i32) - (local $4 f64) - (local $5 f64) - (local $6 f64) - (local $7 f64) - (local $8 f64) - (local $9 f64) - (local $10 f64) - (local $11 f64) - (local $12 f64) - (local $13 f64) - (local $14 f64) - (local $15 f64) - (local $16 f64) - (local $17 f64) - (local $18 f64) - (local $19 f64) - (local $20 f64) - (local $21 f64) - (local $22 f64) - (local $23 f64) - (local $24 f64) - (local $25 f64) - local.get $3 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.tee $4 - local.get $3 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.tee $7 - local.get $3 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.tee $6 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $assembly/imports/MathUtil.hypot - local.tee $5 - f64.const 1e-06 - f64.lt - if - i32.const 0 - return - end - local.get $2 - call $~lib/math/NativeMath.sin - local.set $11 + local.set $33 local.get $2 - call $~lib/math/NativeMath.cos - local.set $12 - local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.set $8 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.set $13 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.set $14 - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.set $15 - local.get $1 - i32.const 4 - call $~lib/typedarray/Float64Array#__get - local.set $16 - local.get $1 - i32.const 5 - call $~lib/typedarray/Float64Array#__get - local.set $17 - local.get $1 - i32.const 6 - call $~lib/typedarray/Float64Array#__get - local.set $18 - local.get $1 - i32.const 7 - call $~lib/typedarray/Float64Array#__get - local.set $19 - local.get $1 - i32.const 8 - call $~lib/typedarray/Float64Array#__get - local.set $20 - local.get $1 - i32.const 9 - call $~lib/typedarray/Float64Array#__get - local.set $21 - local.get $1 - i32.const 10 - call $~lib/typedarray/Float64Array#__get - local.set $22 - local.get $1 - i32.const 11 - call $~lib/typedarray/Float64Array#__get - local.set $23 - local.get $0 - i32.const 0 - local.get $8 - local.get $4 - f64.const 1 - local.get $5 - f64.div - local.tee $5 - f64.mul - local.tee $4 - local.get $4 - f64.mul - f64.const 1 - local.get $12 + local.get $18 f64.sub - local.tee $2 - f64.mul - local.get $12 - f64.add - local.tee $9 - f64.mul - local.get $16 - local.get $7 - local.get $5 - f64.mul - local.tee $7 - local.get $4 - f64.mul + f64.abs + f64.const 1 local.get $2 + f64.abs + local.get $18 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 f64.mul - local.get $6 - local.get $5 - f64.mul - local.tee $5 - local.get $11 - f64.mul - local.tee $24 - f64.add - local.tee $6 + f64.le + if (result i32) + local.get $3 + local.get $19 + f64.sub + f64.abs + f64.const 1 + local.get $3 + f64.abs + local.get $19 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $4 + local.get $20 + f64.sub + f64.abs + f64.const 1 + local.get $4 + f64.abs + local.get $20 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $5 + local.get $21 + f64.sub + f64.abs + f64.const 1 + local.get $5 + f64.abs + local.get $21 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $6 + local.get $22 + f64.sub + f64.abs + f64.const 1 + local.get $6 + f64.abs + local.get $22 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $7 + local.get $23 + f64.sub + f64.abs + f64.const 1 + local.get $7 + f64.abs + local.get $23 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $8 + local.get $24 + f64.sub + f64.abs + f64.const 1 + local.get $8 + f64.abs + local.get $24 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $9 + local.get $25 + f64.sub + f64.abs + f64.const 1 + local.get $9 + f64.abs + local.get $25 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $10 + local.get $26 + f64.sub + f64.abs + f64.const 1 + local.get $10 + f64.abs + local.get $26 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $11 + local.get $27 + f64.sub + f64.abs + f64.const 1 + local.get $11 + f64.abs + local.get $27 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $12 + local.get $28 + f64.sub + f64.abs + f64.const 1 + local.get $12 + f64.abs + local.get $28 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $13 + local.get $29 + f64.sub + f64.abs + f64.const 1 + local.get $13 + f64.abs + local.get $29 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $14 + local.get $30 + f64.sub + f64.abs + f64.const 1 + local.get $14 + f64.abs + local.get $30 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $15 + local.get $31 + f64.sub + f64.abs + f64.const 1 + local.get $15 + f64.abs + local.get $31 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $16 + local.get $32 + f64.sub + f64.abs + f64.const 1 + local.get $16 + f64.abs + local.get $32 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $17 + local.get $33 + f64.sub + f64.abs + f64.const 1 + local.get $17 + f64.abs + local.get $33 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + ) + (func $assembly/quat/rotateX (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $2 + f64.const 0.5 f64.mul - f64.add - local.get $20 - local.get $5 + local.tee $3 + call $~lib/math/NativeMath.sin + local.set $2 + local.get $0 + i32.const 0 local.get $4 - f64.mul - local.get $2 + local.get $3 + call $~lib/math/NativeMath.cos + local.tee $3 f64.mul local.get $7 - local.get $11 - f64.mul - local.tee $25 - f64.sub - local.tee $10 + local.get $2 f64.mul f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 - local.get $13 - local.get $9 + local.get $5 + local.get $3 f64.mul - local.get $17 local.get $6 - f64.mul - f64.add - local.get $21 - local.get $10 + local.get $2 f64.mul f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 - local.get $14 - local.get $9 - f64.mul - local.get $18 local.get $6 + local.get $3 f64.mul - f64.add - local.get $22 - local.get $10 + local.get $5 + local.get $2 f64.mul - f64.add + f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 3 - local.get $15 - local.get $9 - f64.mul - local.get $19 - local.get $6 + local.get $7 + local.get $3 f64.mul - f64.add - local.get $23 - local.get $10 + local.get $4 + local.get $2 f64.mul - f64.add + f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 4 - local.get $8 + ) + (func $assembly/quat/rotateY (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $2 + f64.const 0.5 + f64.mul + local.tee $3 + call $~lib/math/NativeMath.sin + local.set $2 + local.get $0 + i32.const 0 local.get $4 - local.get $7 + local.get $3 + call $~lib/math/NativeMath.cos + local.tee $3 f64.mul + local.get $6 local.get $2 f64.mul - local.get $24 f64.sub - local.tee $9 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $5 + local.get $3 f64.mul - local.get $16 local.get $7 - local.get $7 - f64.mul local.get $2 f64.mul - local.get $12 - f64.add - local.tee $6 - f64.mul f64.add - local.get $20 - local.get $5 - local.get $7 - f64.mul - local.get $2 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $6 + local.get $3 f64.mul local.get $4 - local.get $11 - f64.mul - local.tee $11 - f64.add - local.tee $10 + local.get $2 f64.mul f64.add call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 5 - local.get $13 - local.get $9 - f64.mul - local.get $17 - local.get $6 + i32.const 3 + local.get $7 + local.get $3 f64.mul - f64.add - local.get $21 - local.get $10 + local.get $5 + local.get $2 f64.mul - f64.add + f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 6 - local.get $14 - local.get $9 + ) + (func $assembly/quat/rotateZ (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $2 + f64.const 0.5 f64.mul - local.get $18 - local.get $6 + local.tee $3 + call $~lib/math/NativeMath.sin + local.set $2 + local.get $0 + i32.const 0 + local.get $4 + local.get $3 + call $~lib/math/NativeMath.cos + local.tee $3 f64.mul - f64.add - local.get $22 - local.get $10 + local.get $5 + local.get $2 f64.mul f64.add call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 7 - local.get $15 - local.get $9 - f64.mul - local.get $19 - local.get $6 + i32.const 1 + local.get $5 + local.get $3 f64.mul - f64.add - local.get $23 - local.get $10 + local.get $4 + local.get $2 f64.mul - f64.add + f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 8 - local.get $8 - local.get $4 - local.get $5 + i32.const 2 + local.get $6 + local.get $3 f64.mul + local.get $7 local.get $2 f64.mul - local.get $25 f64.add - local.tee $8 - f64.mul - local.get $16 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 local.get $7 - local.get $5 + local.get $3 f64.mul + local.get $6 local.get $2 f64.mul - local.get $11 f64.sub - local.tee $4 - f64.mul - f64.add - local.get $20 - local.get $5 - local.get $5 - f64.mul - local.get $2 - f64.mul - local.get $12 - f64.add - local.tee $2 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 9 - local.get $13 - local.get $8 - f64.mul - local.get $17 - local.get $4 - f64.mul - f64.add - local.get $21 - local.get $2 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 10 - local.get $14 - local.get $8 - f64.mul - local.get $18 - local.get $4 - f64.mul - f64.add - local.get $22 - local.get $2 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 11 - local.get $15 - local.get $8 - f64.mul - local.get $19 - local.get $4 - f64.mul - f64.add - local.get $23 - local.get $2 - f64.mul - f64.add call $~lib/typedarray/Float64Array#__set local.get $0 - local.get $1 - i32.ne - if - local.get $0 - i32.const 12 - local.get $1 - i32.const 12 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 13 - local.get $1 - i32.const 13 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 14 - local.get $1 - i32.const 14 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 15 - local.get $1 - i32.const 15 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - end - local.get $0 ) - (func $assembly/mat4/rotateX (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (func $assembly/quat/exp (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) (local $3 f64) (local $4 f64) - (local $5 f64) + (local $5 i64) (local $6 f64) (local $7 f64) (local $8 f64) - (local $9 f64) + (local $9 i64) (local $10 f64) - (local $11 f64) - local.get $2 - call $~lib/math/NativeMath.sin - local.set $3 - local.get $2 - call $~lib/math/NativeMath.cos - local.set $2 - local.get $1 - i32.const 4 - call $~lib/typedarray/Float64Array#__get - local.set $4 - local.get $1 - i32.const 5 - call $~lib/typedarray/Float64Array#__get - local.set $5 + (local $11 i32) + (local $12 f64) local.get $1 - i32.const 6 + i32.const 0 call $~lib/typedarray/Float64Array#__get - local.set $6 local.get $1 - i32.const 7 + i32.const 1 call $~lib/typedarray/Float64Array#__get local.set $7 local.get $1 - i32.const 8 + i32.const 2 call $~lib/typedarray/Float64Array#__get local.set $8 - local.get $1 - i32.const 9 - call $~lib/typedarray/Float64Array#__get - local.set $9 - local.get $1 - i32.const 10 - call $~lib/typedarray/Float64Array#__get - local.set $10 - local.get $1 - i32.const 11 - call $~lib/typedarray/Float64Array#__get - local.set $11 - local.get $0 - local.get $1 - i32.ne - if - local.get $0 - i32.const 0 - local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 + block $~lib/util/math/exp_lut|inlined.0 (result f64) local.get $1 i32.const 3 call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 12 - local.get $1 - i32.const 12 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 13 - local.get $1 - i32.const 13 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 14 - local.get $1 - i32.const 14 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 15 + local.tee $3 + i64.reinterpret_f64 + local.tee $5 + i64.const 52 + i64.shr_u + i64.const 2047 + i64.and + i32.wrap_i64 + local.tee $1 + i32.const 969 + i32.sub + i32.const 63 + i32.ge_u + if + f64.const 1 + local.get $1 + i32.const 969 + i32.sub + i32.const -2147483648 + i32.ge_u + br_if $~lib/util/math/exp_lut|inlined.0 + drop + local.get $1 + i32.const 1033 + i32.ge_u + if + f64.const 0 + local.get $5 + i64.const -4503599627370496 + i64.eq + br_if $~lib/util/math/exp_lut|inlined.0 + drop + local.get $3 + f64.const 1 + f64.add + local.get $1 + i32.const 2047 + i32.ge_u + br_if $~lib/util/math/exp_lut|inlined.0 + drop + f64.const 0 + f64.const inf + local.get $5 + i64.const 63 + i64.shr_u + i32.wrap_i64 + select + br $~lib/util/math/exp_lut|inlined.0 + end + i32.const 0 + local.set $1 + end + local.get $3 + f64.const 184.6649652337873 + f64.mul + f64.const 6755399441055744 + f64.add + local.tee $2 + i64.reinterpret_f64 + local.tee $9 + i64.const 127 + i64.and + i64.const 1 + i64.shl + i32.wrap_i64 + i32.const 3 + i32.shl + i32.const 5568 + i32.add + local.tee $11 + i64.load offset=8 + local.get $9 + i64.const 45 + i64.shl + i64.add + local.set $5 + local.get $3 + local.get $2 + f64.const 6755399441055744 + f64.sub + local.tee $2 + f64.const -0.005415212348111709 + f64.mul + f64.add + local.get $2 + f64.const -1.2864023111638346e-14 + f64.mul + f64.add + local.tee $2 + local.get $2 + f64.mul + local.set $3 + local.get $11 + i64.load + f64.reinterpret_i64 + local.get $2 + f64.add + local.get $3 + local.get $2 + f64.const 0.16666666666665886 + f64.mul + f64.const 0.49999999999996786 + f64.add + f64.mul + f64.add + local.get $3 + local.get $3 + f64.mul + local.get $2 + f64.const 0.008333335853059549 + f64.mul + f64.const 0.0416666808410674 + f64.add + f64.mul + f64.add + local.set $3 local.get $1 - i32.const 15 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set + i32.eqz + if + block $~lib/util/math/specialcase|inlined.0 (result f64) + local.get $9 + i64.const 2147483648 + i64.and + i64.eqz + if + local.get $5 + i64.const 4544132024016830464 + i64.sub + f64.reinterpret_i64 + local.tee $2 + local.get $2 + local.get $3 + f64.mul + f64.add + f64.const 5486124068793688683255936e279 + f64.mul + br $~lib/util/math/specialcase|inlined.0 + end + local.get $5 + i64.const 4602678819172646912 + i64.add + local.tee $5 + f64.reinterpret_i64 + local.tee $6 + local.get $6 + local.get $3 + f64.mul + f64.add + local.tee $2 + f64.abs + f64.const 1 + f64.lt + if (result f64) + f64.const 1 + local.get $2 + f64.copysign + local.tee $10 + local.get $2 + f64.add + local.tee $12 + local.get $10 + local.get $12 + f64.sub + local.get $2 + f64.add + local.get $6 + local.get $2 + f64.sub + local.get $6 + local.get $3 + f64.mul + f64.add + f64.add + f64.add + local.get $10 + f64.sub + local.tee $2 + f64.const 0 + f64.eq + if (result f64) + local.get $5 + i64.const -9223372036854775808 + i64.and + f64.reinterpret_i64 + else + local.get $2 + end + else + local.get $2 + end + f64.const 2.2250738585072014e-308 + f64.mul + end + br $~lib/util/math/exp_lut|inlined.0 + end + local.get $5 + f64.reinterpret_i64 + local.tee $2 + local.get $2 + local.get $3 + f64.mul + f64.add end - local.get $0 - i32.const 4 - local.get $4 - local.get $2 - f64.mul - local.get $8 + local.set $2 + local.tee $3 local.get $3 f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 5 - local.get $5 - local.get $2 + local.get $7 + local.get $7 f64.mul - local.get $9 - local.get $3 + f64.add + local.get $8 + local.get $8 f64.mul f64.add - call $~lib/typedarray/Float64Array#__set + f64.sqrt + local.tee $6 + f64.const 0 + f64.gt + if (result f64) + local.get $2 + local.get $6 + call $~lib/math/NativeMath.sin + f64.mul + local.get $6 + f64.div + else + f64.const 0 + end + local.set $4 local.get $0 - i32.const 6 - local.get $6 - local.get $2 - f64.mul - local.get $10 + i32.const 0 local.get $3 + local.get $4 f64.mul - f64.add call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 7 + i32.const 1 local.get $7 - local.get $2 - f64.mul - local.get $11 - local.get $3 + local.get $4 f64.mul - f64.add call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 8 + i32.const 2 local.get $8 - local.get $2 - f64.mul local.get $4 - local.get $3 f64.mul - f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 9 - local.get $9 - local.get $2 - f64.mul - local.get $5 - local.get $3 - f64.mul - f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 10 - local.get $10 + i32.const 3 local.get $2 - f64.mul local.get $6 - local.get $3 - f64.mul - f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 11 - local.get $11 - local.get $2 - f64.mul - local.get $7 - local.get $3 + call $~lib/math/NativeMath.cos f64.mul - f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 ) - (func $assembly/mat4/rotateY (param $0 i32) (param $1 i32) (param $2 f64) (result i32) - (local $3 f64) - (local $4 f64) + (func $~lib/math/NativeMath.atan (param $0 f64) (result f64) + (local $1 f64) + (local $2 f64) + (local $3 i32) + (local $4 i32) (local $5 f64) - (local $6 f64) - (local $7 f64) - (local $8 f64) - (local $9 f64) - (local $10 f64) - (local $11 f64) - local.get $2 - call $~lib/math/NativeMath.sin - local.set $3 - local.get $2 - call $~lib/math/NativeMath.cos - local.set $2 - local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.set $4 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.set $5 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.set $6 - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.set $7 - local.get $1 - i32.const 8 - call $~lib/typedarray/Float64Array#__get - local.set $8 - local.get $1 - i32.const 9 - call $~lib/typedarray/Float64Array#__get - local.set $9 - local.get $1 - i32.const 10 - call $~lib/typedarray/Float64Array#__get - local.set $10 - local.get $1 - i32.const 11 - call $~lib/typedarray/Float64Array#__get - local.set $11 local.get $0 - local.get $1 - i32.ne + local.set $1 + local.get $0 + i64.reinterpret_f64 + i64.const 32 + i64.shr_u + i32.wrap_i64 + i32.const 2147483647 + i32.and + local.tee $3 + i32.const 1141899264 + i32.ge_u if local.get $0 - i32.const 4 - local.get $1 - i32.const 4 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 5 - local.get $1 - i32.const 5 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 6 - local.get $1 - i32.const 6 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 7 - local.get $1 - i32.const 7 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 12 + f64.ne + if + local.get $0 + return + end + f64.const 1.5707963267948966 local.get $1 - i32.const 12 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set + f64.copysign + return + end + local.get $3 + i32.const 1071382528 + i32.lt_u + if + local.get $3 + i32.const 1044381696 + i32.lt_u + if + local.get $0 + return + end + i32.const -1 + local.set $4 + else local.get $0 - i32.const 13 - local.get $1 - i32.const 13 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 14 - local.get $1 - i32.const 14 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 15 - local.get $1 - i32.const 15 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set + f64.abs + local.set $0 + local.get $3 + i32.const 1072889856 + i32.lt_u + if (result f64) + local.get $3 + i32.const 1072037888 + i32.lt_u + if (result f64) + local.get $0 + local.get $0 + f64.add + f64.const 1 + f64.sub + local.get $0 + f64.const 2 + f64.add + f64.div + else + i32.const 1 + local.set $4 + local.get $0 + f64.const 1 + f64.sub + local.get $0 + f64.const 1 + f64.add + f64.div + end + else + local.get $3 + i32.const 1073971200 + i32.lt_u + if (result f64) + i32.const 2 + local.set $4 + local.get $0 + f64.const 1.5 + f64.sub + local.get $0 + f64.const 1.5 + f64.mul + f64.const 1 + f64.add + f64.div + else + i32.const 3 + local.set $4 + f64.const -1 + local.get $0 + f64.div + end + end + local.set $0 end local.get $0 - i32.const 0 - local.get $4 - local.get $2 + local.get $0 f64.mul - local.get $8 - local.get $3 + local.tee $5 + local.get $5 f64.mul - f64.sub - call $~lib/typedarray/Float64Array#__set + local.set $2 local.get $0 - i32.const 1 local.get $5 local.get $2 - f64.mul - local.get $9 - local.get $3 - f64.mul - f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - local.get $6 local.get $2 - f64.mul - local.get $10 - local.get $3 - f64.mul - f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - local.get $7 local.get $2 + local.get $2 + local.get $2 + f64.const 0.016285820115365782 f64.mul - local.get $11 - local.get $3 + f64.const 0.049768779946159324 + f64.add f64.mul - f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 8 - local.get $4 - local.get $3 + f64.const 0.06661073137387531 + f64.add f64.mul - local.get $8 - local.get $2 + f64.const 0.09090887133436507 + f64.add f64.mul + f64.const 0.14285714272503466 f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 9 - local.get $5 - local.get $3 f64.mul - local.get $9 + f64.const 0.3333333333333293 + f64.add + f64.mul + local.get $2 + local.get $2 + local.get $2 local.get $2 + local.get $2 + f64.const -0.036531572744216916 f64.mul + f64.const -0.058335701337905735 f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 10 - local.get $6 - local.get $3 f64.mul - local.get $10 - local.get $2 + f64.const -0.0769187620504483 + f64.add f64.mul + f64.const -0.11111110405462356 f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 11 - local.get $7 - local.get $3 f64.mul - local.get $11 - local.get $2 + f64.const -0.19999999999876483 + f64.add f64.mul f64.add - call $~lib/typedarray/Float64Array#__set + f64.mul + local.set $2 + local.get $4 + i32.const 0 + i32.lt_s + if + local.get $0 + local.get $2 + f64.sub + return + end + block $break|0 + block $case4|0 + block $case3|0 + block $case2|0 + block $case1|0 + block $case0|0 + local.get $4 + br_table $case0|0 $case1|0 $case2|0 $case3|0 $case4|0 + end + f64.const 0.4636476090008061 + local.get $2 + f64.const 2.2698777452961687e-17 + f64.sub + local.get $0 + f64.sub + f64.sub + local.set $0 + br $break|0 + end + f64.const 0.7853981633974483 + local.get $2 + f64.const 3.061616997868383e-17 + f64.sub + local.get $0 + f64.sub + f64.sub + local.set $0 + br $break|0 + end + f64.const 0.982793723247329 + local.get $2 + f64.const 1.3903311031230998e-17 + f64.sub + local.get $0 + f64.sub + f64.sub + local.set $0 + br $break|0 + end + f64.const 1.5707963267948966 + local.get $2 + f64.const 6.123233995736766e-17 + f64.sub + local.get $0 + f64.sub + f64.sub + local.set $0 + br $break|0 + end + unreachable + end local.get $0 + local.get $1 + f64.copysign ) - (func $assembly/mat4/rotateZ (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (func $~lib/math/NativeMath.log (param $0 f64) (result f64) + (local $1 i64) + (local $2 f64) (local $3 f64) - (local $4 f64) + (local $4 i32) (local $5 f64) - (local $6 f64) + (local $6 i64) + (local $7 i32) + block $~lib/util/math/log_lut|inlined.0 (result f64) + local.get $0 + i64.reinterpret_f64 + local.tee $1 + i64.const 4606619468846596096 + i64.sub + i64.const 854320534781952 + i64.lt_u + if + local.get $0 + f64.const 1 + f64.sub + local.tee $0 + local.get $0 + f64.mul + local.tee $2 + local.get $0 + f64.mul + local.tee $3 + local.get $0 + f64.const -0.24999999999998432 + f64.mul + f64.const 0.3333333333333352 + f64.add + local.get $2 + f64.const 0.19999999999320328 + f64.mul + f64.add + local.get $3 + local.get $0 + f64.const 0.14285715076560868 + f64.mul + f64.const -0.16666666669929706 + f64.add + local.get $2 + f64.const -0.12499997863982555 + f64.mul + f64.add + local.get $3 + local.get $0 + f64.const -0.10000486757818193 + f64.mul + f64.const 0.11110712032936046 + f64.add + local.get $2 + f64.const 0.09181994006195467 + f64.mul + f64.add + local.get $3 + f64.const -0.08328363062289341 + f64.mul + f64.add + f64.mul + f64.add + f64.mul + f64.add + f64.mul + local.get $0 + local.get $0 + local.get $0 + local.get $0 + f64.const 134217728 + f64.mul + local.tee $2 + f64.add + local.get $2 + f64.sub + local.tee $2 + local.get $2 + f64.mul + f64.const -0.5 + f64.mul + local.tee $3 + f64.add + local.tee $5 + f64.sub + local.get $3 + f64.add + local.get $0 + local.get $2 + f64.sub + f64.const -0.5 + f64.mul + local.get $2 + local.get $0 + f64.add + f64.mul + f64.add + f64.add + local.get $5 + f64.add + br $~lib/util/math/log_lut|inlined.0 + end + local.get $1 + i64.const 48 + i64.shr_u + i32.wrap_i64 + local.tee $4 + i32.const 16 + i32.sub + i32.const 32736 + i32.ge_u + if + f64.const -1 + local.get $0 + local.get $0 + f64.mul + f64.div + local.get $1 + i64.const 1 + i64.shl + i64.eqz + br_if $~lib/util/math/log_lut|inlined.0 + drop + local.get $0 + local.get $1 + i64.const 9218868437227405312 + i64.eq + br_if $~lib/util/math/log_lut|inlined.0 + drop + local.get $0 + local.get $0 + f64.sub + local.tee $2 + local.get $2 + f64.div + i32.const 1 + local.get $4 + i32.const 32752 + i32.and + i32.const 32752 + i32.eq + local.get $4 + i32.const 32768 + i32.and + select + br_if $~lib/util/math/log_lut|inlined.0 + drop + local.get $0 + f64.const 4503599627370496 + f64.mul + i64.reinterpret_f64 + i64.const 234187180623265792 + i64.sub + local.set $1 + end + local.get $1 + i64.const 4604367669032910848 + i64.sub + local.tee $6 + i64.const 45 + i64.shr_u + i64.const 127 + i64.and + i32.wrap_i64 + i32.const 4 + i32.shl + local.tee $7 + i32.const 9664 + i32.add + local.set $4 + local.get $1 + local.get $6 + i64.const -4503599627370496 + i64.and + i64.sub + f64.reinterpret_i64 + local.get $4 + f64.load + f64.sub + local.get $4 + f64.load offset=8 + f64.sub + local.get $7 + i32.const 7616 + i32.add + local.tee $4 + f64.load + f64.mul + local.set $0 + local.get $6 + i64.const 52 + i64.shr_s + f64.convert_i64_s + local.tee $3 + f64.const 0.6931471805598903 + f64.mul + local.get $4 + f64.load offset=8 + f64.add + local.tee $5 + local.get $0 + f64.add + local.set $2 + local.get $5 + local.get $2 + f64.sub + local.get $0 + f64.add + local.get $3 + f64.const 5.497923018708371e-14 + f64.mul + f64.add + local.get $0 + local.get $0 + f64.mul + local.tee $3 + f64.const -0.5000000000000001 + f64.mul + f64.add + local.get $0 + local.get $3 + f64.mul + local.get $0 + f64.const -0.2499999999622955 + f64.mul + f64.const 0.33333333331825593 + f64.add + local.get $3 + local.get $0 + f64.const -0.16667054827627667 + f64.mul + f64.const 0.20000304511814496 + f64.add + f64.mul + f64.add + f64.mul + f64.add + local.get $2 + f64.add + end + ) + (func $assembly/quat/ln (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 i32) + (local $6 i32) (local $7 f64) (local $8 f64) (local $9 f64) - (local $10 f64) - (local $11 f64) - local.get $2 - call $~lib/math/NativeMath.sin - local.set $3 - local.get $2 - call $~lib/math/NativeMath.cos - local.set $2 + (local $10 i64) + (local $11 i32) + (local $12 i32) local.get $1 i32.const 0 call $~lib/typedarray/Float64Array#__get - local.set $4 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.set $5 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.set $6 - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get local.set $7 local.get $1 - i32.const 4 + i32.const 1 call $~lib/typedarray/Float64Array#__get local.set $8 local.get $1 - i32.const 5 + i32.const 2 call $~lib/typedarray/Float64Array#__get local.set $9 local.get $1 - i32.const 6 - call $~lib/typedarray/Float64Array#__get - local.set $10 - local.get $1 - i32.const 7 + i32.const 3 call $~lib/typedarray/Float64Array#__get - local.set $11 - local.get $0 - local.get $1 - i32.ne - if - local.get $0 - i32.const 8 - local.get $1 - i32.const 8 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 9 - local.get $1 - i32.const 9 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 10 - local.get $1 - i32.const 10 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 11 - local.get $1 - i32.const 11 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 12 - local.get $1 - i32.const 12 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 13 - local.get $1 - i32.const 13 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 14 - local.get $1 - i32.const 14 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 15 - local.get $1 - i32.const 15 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - end + local.set $4 local.get $0 + local.tee $1 i32.const 0 - local.get $4 - local.get $2 + local.get $7 + local.get $7 + local.get $7 f64.mul local.get $8 - local.get $3 + local.get $8 f64.mul f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - local.get $5 - local.get $2 - f64.mul local.get $9 - local.get $3 + local.get $9 f64.mul f64.add + f64.sqrt + local.tee $3 + f64.const 0 + f64.gt + if (result f64) + block $__inlined_func$~lib/math/NativeMath.atan2 + i32.const 1 + local.get $3 + local.tee $2 + local.get $2 + f64.ne + local.get $4 + local.get $4 + f64.ne + select + if + local.get $4 + local.get $2 + f64.add + local.set $2 + br $__inlined_func$~lib/math/NativeMath.atan2 + end + local.get $2 + i64.reinterpret_f64 + local.tee $10 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.set $11 + local.get $10 + i32.wrap_i64 + local.get $4 + i64.reinterpret_f64 + local.tee $10 + i32.wrap_i64 + local.tee $12 + local.get $10 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.tee $5 + i32.const 1072693248 + i32.sub + i32.or + i32.eqz + if + local.get $2 + call $~lib/math/NativeMath.atan + local.set $2 + br $__inlined_func$~lib/math/NativeMath.atan2 + end + local.get $5 + i32.const 30 + i32.shr_u + i32.const 2 + i32.and + local.get $11 + i32.const 31 + i32.shr_u + i32.or + local.set $0 + local.get $5 + i32.const 2147483647 + i32.and + local.set $5 + local.get $11 + i32.const 2147483647 + i32.and + local.tee $6 + i32.or + i32.eqz + if + block $break|0 + block $case3|0 + block $case2|0 + local.get $0 + i32.eqz + br_if $__inlined_func$~lib/math/NativeMath.atan2 + block $tablify|0 + local.get $0 + i32.const 1 + i32.sub + br_table $__inlined_func$~lib/math/NativeMath.atan2 $case2|0 $case3|0 $tablify|0 + end + br $break|0 + end + f64.const 3.141592653589793 + local.set $2 + br $__inlined_func$~lib/math/NativeMath.atan2 + end + f64.const -3.141592653589793 + local.set $2 + br $__inlined_func$~lib/math/NativeMath.atan2 + end + end + block $folding-inner0 + local.get $5 + local.get $12 + i32.or + i32.eqz + br_if $folding-inner0 + local.get $5 + i32.const 2146435072 + i32.eq + if + local.get $6 + i32.const 2146435072 + i32.eq + if (result f64) + f64.const 2.356194490192345 + f64.const 0.7853981633974483 + local.get $0 + i32.const 2 + i32.and + select + else + f64.const 3.141592653589793 + f64.const 0 + local.get $0 + i32.const 2 + i32.and + select + end + local.tee $2 + f64.neg + local.get $2 + local.get $0 + i32.const 1 + i32.and + select + local.set $2 + br $__inlined_func$~lib/math/NativeMath.atan2 + end + i32.const 1 + local.get $6 + i32.const 2146435072 + i32.eq + local.get $6 + local.get $5 + i32.const 67108864 + i32.add + i32.gt_u + select + br_if $folding-inner0 + local.get $5 + local.get $6 + i32.const 67108864 + i32.add + i32.gt_u + i32.const 0 + local.get $0 + i32.const 2 + i32.and + select + if (result f64) + f64.const 0 + else + local.get $2 + local.get $4 + f64.div + f64.abs + call $~lib/math/NativeMath.atan + end + local.set $2 + block $break|1 + block $case3|1 + block $case2|1 + block $case1|1 + local.get $0 + if + local.get $0 + i32.const 1 + i32.sub + br_table $case1|1 $case2|1 $case3|1 $break|1 + end + br $__inlined_func$~lib/math/NativeMath.atan2 + end + local.get $2 + f64.neg + local.set $2 + br $__inlined_func$~lib/math/NativeMath.atan2 + end + f64.const 3.141592653589793 + local.get $2 + f64.const 1.2246467991473532e-16 + f64.sub + f64.sub + local.set $2 + br $__inlined_func$~lib/math/NativeMath.atan2 + end + local.get $2 + f64.const 1.2246467991473532e-16 + f64.sub + f64.const 3.141592653589793 + f64.sub + local.set $2 + br $__inlined_func$~lib/math/NativeMath.atan2 + end + unreachable + end + f64.const -1.5707963267948966 + f64.const 1.5707963267948966 + local.get $0 + i32.const 1 + i32.and + select + local.set $2 + end + local.get $2 + local.get $3 + f64.div + else + f64.const 0 + end + local.tee $2 + f64.mul call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - local.get $6 + local.get $1 + i32.const 1 + local.get $8 local.get $2 f64.mul - local.get $10 - local.get $3 + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 2 + local.get $9 + local.get $2 f64.mul - f64.add call $~lib/typedarray/Float64Array#__set - local.get $0 + local.get $1 i32.const 3 local.get $7 - local.get $2 + local.get $7 f64.mul - local.get $11 - local.get $3 + local.get $8 + local.get $8 + f64.mul + f64.add + local.get $9 + local.get $9 + f64.mul + f64.add + local.get $4 + local.get $4 f64.mul f64.add + call $~lib/math/NativeMath.log + f64.const 0.5 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $1 + ) + (func $assembly/quat2/fromRotationTranslation (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.const 0.5 + f64.mul + local.set $3 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.const 0.5 + f64.mul + local.set $4 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.const 0.5 + f64.mul + local.set $5 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $0 + i32.const 0 + local.get $6 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 4 + i32.const 1 + local.get $7 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 local.get $8 - local.get $2 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $9 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $3 + local.get $9 f64.mul local.get $4 - local.get $3 + local.get $8 + f64.mul + f64.add + local.get $5 + local.get $7 f64.mul f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 5 + local.get $4 local.get $9 - local.get $2 f64.mul local.get $5 + local.get $6 + f64.mul + f64.add local.get $3 + local.get $8 f64.mul f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 6 - local.get $10 - local.get $2 + local.get $5 + local.get $9 f64.mul - local.get $6 local.get $3 + local.get $7 + f64.mul + f64.add + local.get $4 + local.get $6 f64.mul f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 7 - local.get $11 - local.get $2 + local.get $3 + f64.neg + local.get $6 f64.mul + local.get $4 local.get $7 - local.get $3 + f64.mul + f64.sub + local.get $5 + local.get $8 f64.mul f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 ) - (func $assembly/mat4/fromRotation (param $0 i32) (param $1 f64) (param $2 i32) (result i32) - (local $3 f64) + (func $assembly/quat2/copy (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) + (func $assembly/quat2/rotateAroundAxis (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) (local $4 f64) (local $5 f64) (local $6 f64) (local $7 f64) (local $8 f64) (local $9 f64) + (local $10 f64) + local.get $3 + f64.abs + f64.const 1e-06 + f64.lt + if + local.get $0 + local.get $1 + call $assembly/quat2/copy + return + end local.get $2 i32.const 0 call $~lib/typedarray/Float64Array#__get - local.tee $4 local.get $2 i32.const 1 call $~lib/typedarray/Float64Array#__get - local.tee $5 local.get $2 i32.const 2 call $~lib/typedarray/Float64Array#__get - local.tee $7 f64.const 0 f64.const 0 f64.const 0 @@ -13880,5343 +15529,4145 @@ f64.const 0 f64.const 0 call $assembly/imports/MathUtil.hypot - local.tee $3 - f64.const 1e-06 - f64.lt - if - i32.const 0 - return - end - local.get $1 + local.set $4 + local.get $3 + f64.const 0.5 + f64.mul + local.tee $5 call $~lib/math/NativeMath.sin - local.set $6 - local.get $0 + local.tee $6 + local.get $2 i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.mul local.get $4 - f64.const 1 - local.get $3 f64.div - local.tee $3 + local.set $3 + local.get $6 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get f64.mul - local.tee $4 local.get $4 + f64.div + local.set $9 + local.get $6 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get f64.mul - f64.const 1 - local.get $1 + local.get $4 + f64.div + local.set $4 + local.get $5 call $~lib/math/NativeMath.cos - local.tee $8 - f64.sub - local.tee $1 - f64.mul - local.get $8 - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 + local.set $6 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $0 + i32.const 0 local.get $5 + local.get $6 + f64.mul + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.tee $10 local.get $3 f64.mul - local.tee $5 + f64.add + local.get $7 local.get $4 f64.mul - local.get $1 + f64.add + local.get $8 + local.get $9 f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 local.get $7 - local.get $3 - f64.mul - local.tee $3 local.get $6 f64.mul - local.tee $7 + local.get $10 + local.get $9 + f64.mul f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 + local.get $8 local.get $3 - local.get $4 - f64.mul - local.get $1 f64.mul + f64.add local.get $5 - local.get $6 + local.get $4 f64.mul - local.tee $9 f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 3 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 4 + i32.const 2 + local.get $8 + local.get $6 + f64.mul + local.get $10 local.get $4 - local.get $5 f64.mul - local.get $1 + f64.add + local.get $5 + local.get $9 f64.mul + f64.add local.get $7 + local.get $3 + f64.mul f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 5 - local.get $5 + i32.const 3 + local.get $10 + local.get $6 + f64.mul local.get $5 + local.get $3 f64.mul - local.get $1 + f64.sub + local.get $7 + local.get $9 f64.mul + f64.sub local.get $8 - f64.add + local.get $4 + f64.mul + f64.sub call $~lib/typedarray/Float64Array#__set - local.get $0 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 i32.const 6 - local.get $3 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $0 + i32.const 4 local.get $5 + local.get $6 f64.mul local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.tee $10 + local.get $3 f64.mul - local.get $4 - local.get $6 - f64.mul - local.tee $6 f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 7 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 8 + local.get $7 local.get $4 - local.get $3 f64.mul - local.get $1 - f64.mul - local.get $9 f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 9 - local.get $5 - local.get $3 - f64.mul - local.get $1 + local.get $8 + local.get $9 f64.mul - local.get $6 f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 10 - local.get $3 - local.get $3 + i32.const 5 + local.get $7 + local.get $6 f64.mul - local.get $1 + local.get $10 + local.get $9 f64.mul + f64.add local.get $8 + local.get $3 + f64.mul f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 11 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 12 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 13 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 14 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 15 - f64.const 1 - call $~lib/typedarray/Float64Array#__set - local.get $0 - ) - (func $assembly/mat4/fromRotationTranslation (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 f64) - (local $4 f64) - (local $5 f64) - (local $6 f64) - (local $7 f64) - (local $8 f64) - (local $9 f64) - (local $10 f64) - (local $11 f64) - (local $12 f64) - local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.set $3 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.set $4 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.tee $5 local.get $5 - f64.add - local.set $6 - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.set $8 - local.get $0 - i32.const 0 - f64.const 1 local.get $4 - local.get $4 - local.get $4 - f64.add - local.tee $7 f64.mul - local.tee $10 - local.get $5 - local.get $6 - f64.mul - local.tee $5 - f64.add f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 1 - local.get $3 - local.get $7 - f64.mul - local.tee $9 + i32.const 6 local.get $8 local.get $6 f64.mul - local.tee $11 + local.get $10 + local.get $4 + f64.mul f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - local.get $3 - local.get $6 + local.get $5 + local.get $9 f64.mul - local.tee $12 - local.get $8 + f64.add local.get $7 - f64.mul - local.tee $7 - f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 4 - local.get $9 - local.get $11 - f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 5 - f64.const 1 - local.get $3 local.get $3 - local.get $3 - f64.add - local.tee $3 f64.mul - local.tee $9 - local.get $5 - f64.add f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 6 - local.get $4 + i32.const 7 + local.get $10 local.get $6 f64.mul - local.tee $4 - local.get $8 + local.get $5 local.get $3 f64.mul - local.tee $3 - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 7 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 8 - local.get $12 - local.get $7 - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 9 - local.get $4 - local.get $3 f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 10 - f64.const 1 + local.get $7 local.get $9 - local.get $10 - f64.add + f64.mul + f64.sub + local.get $8 + local.get $4 + f64.mul f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 11 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 12 - local.get $2 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set + ) + (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 f64) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + local.get $1 local.get $0 - i32.const 13 - local.get $2 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set + i32.load offset=12 + i32.ge_u + if + local.get $1 + i32.const 0 + i32.lt_s + if + i32.const 1120 + i32.const 12192 + i32.const 108 + i32.const 22 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 1 + i32.add + local.tee $8 + local.tee $3 + local.get $0 + i32.load offset=8 + local.tee $5 + i32.const 3 + i32.shr_u + i32.gt_u + if + local.get $3 + i32.const 134217727 + i32.gt_u + if + i32.const 1536 + i32.const 12192 + i32.const 14 + i32.const 48 + call $~lib/builtins/abort + unreachable + end + block $__inlined_func$~lib/rt/itcms/__renew (result i32) + local.get $3 + i32.const 3 + i32.shl + local.tee $6 + local.tee $3 + local.get $0 + i32.load + local.tee $9 + local.tee $7 + i32.const 20 + i32.sub + local.tee $4 + i32.load + i32.const -4 + i32.and + i32.const 16 + i32.sub + i32.le_u + if + local.get $4 + local.get $3 + i32.store offset=16 + local.get $7 + br $__inlined_func$~lib/rt/itcms/__renew + end + local.get $3 + local.get $4 + i32.load offset=12 + call $~lib/rt/itcms/__new + local.tee $10 + local.get $7 + local.get $3 + local.get $4 + i32.load offset=16 + local.tee $4 + local.get $3 + local.get $4 + i32.lt_u + select + call $~lib/memory/memory.copy + local.get $10 + end + local.tee $3 + local.get $5 + i32.add + local.get $6 + local.get $5 + i32.sub + call $~lib/memory/memory.fill + local.get $3 + local.get $9 + i32.ne + if + local.get $0 + local.get $3 + i32.store + local.get $0 + local.get $3 + i32.store offset=4 + local.get $0 + local.get $3 + i32.const 0 + call $~lib/rt/itcms/__link + end + local.get $0 + local.get $6 + i32.store offset=8 + end + local.get $0 + local.get $8 + i32.store offset=12 + end local.get $0 - i32.const 14 + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add local.get $2 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 15 - f64.const 1 - call $~lib/typedarray/Float64Array#__set - local.get $0 + f64.store ) - (func $assembly/mat4/getTranslation (param $0 i32) (param $1 i32) (result i32) - local.get $0 - i32.const 0 + (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result f64) local.get $1 - i32.const 12 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 1 - local.get $1 - i32.const 13 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set + i32.load offset=12 + i32.ge_u + if + i32.const 1120 + i32.const 12192 + i32.const 92 + i32.const 42 + call $~lib/builtins/abort + unreachable + end local.get $0 - i32.const 2 + i32.load offset=4 local.get $1 - i32.const 14 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 + i32.const 3 + i32.shl + i32.add + f64.load ) - (func $assembly/mat4/getScaling (param $0 i32) (param $1 i32) (result i32) - (local $2 f64) - (local $3 f64) - (local $4 f64) - (local $5 f64) - (local $6 f64) - (local $7 f64) - (local $8 f64) - (local $9 f64) - (local $10 f64) - local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.set $2 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.set $3 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.set $4 - local.get $1 - i32.const 4 - call $~lib/typedarray/Float64Array#__get - local.set $5 - local.get $1 - i32.const 5 - call $~lib/typedarray/Float64Array#__get - local.set $6 - local.get $1 - i32.const 6 - call $~lib/typedarray/Float64Array#__get - local.set $7 - local.get $1 - i32.const 8 - call $~lib/typedarray/Float64Array#__get - local.set $8 - local.get $1 - i32.const 9 - call $~lib/typedarray/Float64Array#__get - local.set $9 - local.get $1 - i32.const 10 - call $~lib/typedarray/Float64Array#__get - local.set $10 + (func $~lib/rt/__visit_members (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + block $folding-inner2 + block $folding-inner1 + block $folding-inner0 + block $invalid + block $assembly/mat4/Fov + block $~lib/array/Array<~lib/typedarray/Float64Array> + block $~lib/object/Object + block $assembly/imports/IArguments + block $~lib/string/String + block $~lib/arraybuffer/ArrayBuffer + local.get $0 + i32.const 8 + i32.sub + i32.load + br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $folding-inner2 $folding-inner0 $folding-inner2 $folding-inner0 $folding-inner0 $folding-inner0 $assembly/imports/IArguments $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $~lib/object/Object $~lib/array/Array<~lib/typedarray/Float64Array> $folding-inner1 $assembly/mat4/Fov $folding-inner1 $invalid + end + return + end + return + end + return + end + return + end + local.get $0 + i32.load offset=4 + local.tee $1 + local.get $0 + i32.load offset=12 + i32.const 2 + i32.shl + i32.add + local.set $2 + loop $while-continue|0 + local.get $1 + local.get $2 + i32.lt_u + if + local.get $1 + i32.load + local.tee $3 + if + local.get $3 + call $~lib/rt/itcms/__visit + end + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $while-continue|0 + end + end + local.get $0 + i32.load + call $~lib/rt/itcms/__visit + return + end + return + end + unreachable + end + local.get $0 + i32.load offset=4 + call $~lib/rt/itcms/__visit + return + end + local.get $0 + i32.load + call $~lib/rt/itcms/__visit + return + end local.get $0 - i32.const 0 - local.get $2 - local.get $3 - local.get $4 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $assembly/imports/MathUtil.hypot - call $~lib/typedarray/Float64Array#__set + i32.load + local.tee $0 + if + local.get $0 + call $~lib/rt/itcms/__visit + end + ) + (func $~setArgumentsLength (param $0 i32) local.get $0 + global.set $~argumentsLength + ) + (func $~start + memory.size + i32.const 16 + i32.shl + i32.const 29036 + i32.sub i32.const 1 - local.get $5 - local.get $6 - local.get $7 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $assembly/imports/MathUtil.hypot - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - local.get $8 - local.get $9 - local.get $10 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 + i32.shr_u + global.set $~lib/rt/itcms/threshold + i32.const 1764 + i32.const 1760 + i32.store + i32.const 1768 + i32.const 1760 + i32.store + i32.const 1760 + global.set $~lib/rt/itcms/pinSpace + i32.const 1796 + i32.const 1792 + i32.store + i32.const 1800 + i32.const 1792 + i32.store + i32.const 1792 + global.set $~lib/rt/itcms/toSpace + i32.const 1876 + i32.const 1872 + i32.store + i32.const 1880 + i32.const 1872 + i32.store + i32.const 1872 + global.set $~lib/rt/itcms/fromSpace + call $assembly/vec3/create + global.set $assembly/vec3/vec + i32.const 0 + global.set $~argumentsLength + i32.const 2016 + i32.load + call_indirect $0 (type $none_=>_i32) + global.set $assembly/vec3/forEach + call $assembly/vec4/create + global.set $assembly/vec4/vec + i32.const 0 + global.set $~argumentsLength + i32.const 2304 + i32.load + call_indirect $0 (type $none_=>_i32) + global.set $assembly/vec4/forEach + call $assembly/vec3/create + global.set $assembly/quat/tmpvec3 + f64.const 1 f64.const 0 f64.const 0 + call $assembly/vec3/fromValues + global.set $assembly/quat/xUnitVec3 f64.const 0 + f64.const 1 f64.const 0 - call $assembly/imports/MathUtil.hypot - call $~lib/typedarray/Float64Array#__set - local.get $0 - ) - (func $assembly/mat4/decompose (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - (local $4 f64) - (local $5 f64) - (local $6 f64) - (local $7 f64) - (local $8 f64) - (local $9 f64) - (local $10 f64) - (local $11 f64) - (local $12 f64) - (local $13 f64) - (local $14 f64) - (local $15 f64) - local.get $1 + call $assembly/vec3/fromValues + global.set $assembly/quat/yUnitVec3 i32.const 0 - local.get $3 - i32.const 12 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set + global.set $~argumentsLength + i32.const 2928 + i32.load + call_indirect $0 (type $none_=>_i32) + global.set $assembly/quat/rotationTo + call $assembly/quat/create + global.set $assembly/quat/temp1 + call $assembly/quat/create + global.set $assembly/quat/temp2 + i32.const 0 + global.set $~argumentsLength + i32.const 2992 + i32.load + call_indirect $0 (type $none_=>_i32) + global.set $assembly/quat/sqlerp + call $assembly/mat3/create + global.set $assembly/quat/matr + i32.const 0 + global.set $~argumentsLength + i32.const 3056 + i32.load + call_indirect $0 (type $none_=>_i32) + global.set $assembly/quat/setAxes + call $assembly/vec2/create + global.set $assembly/vec2/vec + i32.const 0 + global.set $~argumentsLength + i32.const 3600 + i32.load + call_indirect $0 (type $none_=>_i32) + global.set $assembly/vec2/forEach + ) + (func $start:assembly/vec3~anonymous|0~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (result i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store local.get $1 - i32.const 1 - local.get $3 - i32.const 13 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set + i32.const 3 local.get $1 - i32.const 2 - local.get $3 - i32.const 14 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $3 - i32.const 0 - call $~lib/typedarray/Float64Array#__get + select local.set $6 - local.get $3 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.set $5 - local.get $3 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.set $7 - local.get $3 - i32.const 4 - call $~lib/typedarray/Float64Array#__get - local.set $8 - local.get $3 - i32.const 5 - call $~lib/typedarray/Float64Array#__get - local.set $12 - local.get $3 - i32.const 6 - call $~lib/typedarray/Float64Array#__get - local.set $9 - local.get $3 - i32.const 8 - call $~lib/typedarray/Float64Array#__get - local.set $10 - local.get $3 - i32.const 9 - call $~lib/typedarray/Float64Array#__get - local.set $11 - local.get $3 - i32.const 10 - call $~lib/typedarray/Float64Array#__get - local.set $14 - local.get $2 - i32.const 0 - local.get $6 - local.get $5 - local.get $7 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $assembly/imports/MathUtil.hypot - call $~lib/typedarray/Float64Array#__set - local.get $2 - i32.const 1 - local.get $8 - local.get $12 - local.get $9 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $assembly/imports/MathUtil.hypot - call $~lib/typedarray/Float64Array#__set - local.get $2 - i32.const 2 - local.get $10 - local.get $11 - local.get $14 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $assembly/imports/MathUtil.hypot - call $~lib/typedarray/Float64Array#__set - f64.const 1 local.get $2 i32.const 0 - call $~lib/typedarray/Float64Array#__get - f64.div - local.set $4 - local.get $5 - f64.const 1 - local.get $2 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - f64.div - local.tee $5 - f64.mul - local.set $13 - local.get $7 - f64.const 1 local.get $2 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - f64.div - local.tee $15 - f64.mul - local.set $7 - local.get $8 - local.get $4 - f64.mul - local.set $8 - local.get $9 - local.get $15 - f64.mul - local.set $9 - local.get $10 - local.get $4 - f64.mul - local.set $10 - local.get $11 - local.get $5 - f64.mul - local.set $11 - local.get $6 - local.get $4 - f64.mul - local.tee $4 - local.get $12 - local.get $5 - f64.mul - local.tee $6 - f64.add - local.get $14 - local.get $15 - f64.mul - local.tee $5 - f64.add - local.tee $12 - f64.const 0 - f64.gt - if + select + local.set $2 + local.get $3 + if (result i32) + local.get $2 + local.get $3 + local.get $6 + i32.mul + i32.add local.get $0 + i32.load offset=8 i32.const 3 - local.get $12 - f64.const 1 - f64.add - f64.sqrt - local.tee $4 - local.get $4 - f64.add - local.tee $4 - f64.const 0.25 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 0 - local.get $9 - local.get $11 - f64.sub - local.get $4 - f64.div - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - local.get $10 - local.get $7 - f64.sub - local.get $4 - f64.div - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - local.get $13 - local.get $8 - f64.sub - local.get $4 - f64.div - call $~lib/typedarray/Float64Array#__set + i32.shr_u + call $assembly/imports/MathUtil.min else - local.get $4 - local.get $5 - f64.gt - i32.const 0 - local.get $4 - local.get $6 - f64.gt - select + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + end + local.set $1 + loop $for-loop|0 + local.get $1 + local.get $2 + i32.gt_s if + global.get $~lib/memory/__stack_pointer + global.get $assembly/vec3/vec + local.tee $3 + i32.store + local.get $3 + i32.const 0 local.get $0 - i32.const 3 + local.get $2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + global.get $assembly/vec3/vec + local.tee $3 + i32.store + local.get $3 + i32.const 1 + local.get $0 + local.get $2 + i32.const 1 + i32.add + local.tee $7 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + global.get $assembly/vec3/vec + local.tee $3 + i32.store + local.get $3 + i32.const 2 + local.get $0 + local.get $2 + i32.const 2 + i32.add + local.tee $8 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + local.tee $9 + global.get $assembly/vec3/vec + local.tee $3 + i32.store local.get $9 - local.get $11 - f64.sub - local.get $4 - f64.const 1 - f64.add - local.get $6 - f64.sub + local.get $3 + i32.store offset=4 + i32.const 3 + global.set $~argumentsLength + local.get $3 + local.get $3 local.get $5 - f64.sub - f64.sqrt - local.tee $4 local.get $4 - f64.add - local.tee $4 - f64.div - call $~lib/typedarray/Float64Array#__set + i32.load + call_indirect $0 (type $i32_i32_i32_=>_none) + global.get $~lib/memory/__stack_pointer + global.get $assembly/vec3/vec + local.tee $3 + i32.store local.get $0 + local.get $2 + local.get $3 i32.const 0 - local.get $4 - f64.const 0.25 - f64.mul + call $~lib/typedarray/Float64Array#__get call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + global.get $assembly/vec3/vec + local.tee $3 + i32.store local.get $0 + local.get $7 + local.get $3 i32.const 1 - local.get $13 - local.get $8 - f64.add - local.get $4 - f64.div + call $~lib/typedarray/Float64Array#__get call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + global.get $assembly/vec3/vec + local.tee $3 + i32.store local.get $0 + local.get $8 + local.get $3 i32.const 2 - local.get $10 - local.get $7 - f64.add - local.get $4 - f64.div + call $~lib/typedarray/Float64Array#__get call $~lib/typedarray/Float64Array#__set - else - local.get $5 + local.get $2 local.get $6 - f64.lt - if - local.get $0 - i32.const 3 - local.get $10 - local.get $7 - f64.sub - local.get $6 - f64.const 1 - f64.add - local.get $4 - f64.sub - local.get $5 - f64.sub - f64.sqrt - local.tee $4 - local.get $4 - f64.add - local.tee $4 - f64.div - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 0 - local.get $13 - local.get $8 - f64.add - local.get $4 - f64.div - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - local.get $4 - f64.const 0.25 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - local.get $9 - local.get $11 - f64.add - local.get $4 - f64.div - call $~lib/typedarray/Float64Array#__set - else - local.get $0 - i32.const 3 - local.get $13 - local.get $8 - f64.sub - local.get $5 - f64.const 1 - f64.add - local.get $4 - f64.sub - local.get $6 - f64.sub - f64.sqrt - local.tee $4 - local.get $4 - f64.add - local.tee $4 - f64.div - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 0 - local.get $10 - local.get $7 - f64.add - local.get $4 - f64.div - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - local.get $9 - local.get $11 - f64.add - local.get $4 - f64.div - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - local.get $4 - f64.const 0.25 - f64.mul - call $~lib/typedarray/Float64Array#__set - end + i32.add + local.set $2 + br $for-loop|0 end end + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $assembly/mat4/fromRotationTranslationScale (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - (local $4 f64) - (local $5 f64) - (local $6 f64) - (local $7 f64) - (local $8 f64) - (local $9 f64) - (local $10 f64) - (local $11 f64) - (local $12 f64) - (local $13 f64) - (local $14 f64) - (local $15 f64) - (local $16 f64) - local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.set $4 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.set $5 + (func $start:assembly/vec4~anonymous|0~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (result i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.tee $7 - local.get $7 - f64.add - local.set $8 + i32.const 4 local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.set $10 - local.get $3 - i32.const 0 - call $~lib/typedarray/Float64Array#__get + select local.set $6 - local.get $3 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.set $11 - local.get $3 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.set $12 - local.get $0 - i32.const 0 - f64.const 1 - local.get $5 - local.get $5 - local.get $5 - f64.add - local.tee $9 - f64.mul - local.tee $13 - local.get $7 - local.get $8 - f64.mul - local.tee $7 - f64.add - f64.sub - local.get $6 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - local.get $4 - local.get $9 - f64.mul - local.tee $14 - local.get $10 - local.get $8 - f64.mul - local.tee $15 - f64.add - local.get $6 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - local.get $4 - local.get $8 - f64.mul - local.tee $16 - local.get $10 - local.get $9 - f64.mul - local.tee $9 - f64.sub - local.get $6 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 4 - local.get $14 - local.get $15 - f64.sub - local.get $11 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 5 - f64.const 1 - local.get $4 - local.get $4 - local.get $4 - f64.add - local.tee $4 - f64.mul - local.tee $6 - local.get $7 - f64.add - f64.sub - local.get $11 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 6 - local.get $5 - local.get $8 - f64.mul - local.tee $5 - local.get $10 - local.get $4 - f64.mul - local.tee $4 - f64.add - local.get $11 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 7 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 8 - local.get $16 - local.get $9 - f64.add - local.get $12 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 9 - local.get $5 - local.get $4 - f64.sub - local.get $12 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 10 - f64.const 1 - local.get $6 - local.get $13 - f64.add - f64.sub - local.get $12 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 11 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 12 local.get $2 i32.const 0 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 13 - local.get $2 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 14 local.get $2 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 15 - f64.const 1 - call $~lib/typedarray/Float64Array#__set + select + local.set $2 + local.get $3 + if (result i32) + local.get $2 + local.get $3 + local.get $6 + i32.mul + i32.add + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + call $assembly/imports/MathUtil.min + else + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + end + local.set $1 + loop $for-loop|0 + local.get $1 + local.get $2 + i32.gt_s + if + global.get $~lib/memory/__stack_pointer + global.get $assembly/vec4/vec + local.tee $3 + i32.store + local.get $3 + i32.const 0 + local.get $0 + local.get $2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + global.get $assembly/vec4/vec + local.tee $3 + i32.store + local.get $3 + i32.const 1 + local.get $0 + local.get $2 + i32.const 1 + i32.add + local.tee $7 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + global.get $assembly/vec4/vec + local.tee $3 + i32.store + local.get $3 + i32.const 2 + local.get $0 + local.get $2 + i32.const 2 + i32.add + local.tee $8 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + global.get $assembly/vec4/vec + local.tee $3 + i32.store + local.get $3 + i32.const 3 + local.get $0 + local.get $2 + i32.const 3 + i32.add + local.tee $9 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + local.tee $10 + global.get $assembly/vec4/vec + local.tee $3 + i32.store + local.get $10 + local.get $3 + i32.store offset=4 + i32.const 3 + global.set $~argumentsLength + local.get $3 + local.get $3 + local.get $5 + local.get $4 + i32.load + call_indirect $0 (type $i32_i32_i32_=>_none) + global.get $~lib/memory/__stack_pointer + global.get $assembly/vec4/vec + local.tee $3 + i32.store + local.get $0 + local.get $2 + local.get $3 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + global.get $assembly/vec4/vec + local.tee $3 + i32.store + local.get $0 + local.get $7 + local.get $3 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + global.get $assembly/vec4/vec + local.tee $3 + i32.store + local.get $0 + local.get $8 + local.get $3 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + global.get $assembly/vec4/vec + local.tee $3 + i32.store + local.get $0 + local.get $9 + local.get $3 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $2 + local.get $6 + i32.add + local.set $2 + br $for-loop|0 + end + end + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $assembly/mat4/fromRotationTranslationScaleOrigin (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) - (local $5 f64) - (local $6 f64) - (local $7 f64) - (local $8 f64) - (local $9 f64) - (local $10 f64) - (local $11 f64) - (local $12 f64) - (local $13 f64) - (local $14 f64) - (local $15 f64) - (local $16 f64) - (local $17 f64) - (local $18 f64) - (local $19 f64) - (local $20 f64) - (local $21 f64) - (local $22 f64) - local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.set $5 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.set $6 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.tee $7 - local.get $7 - f64.add - local.set $8 + (func $start:assembly/quat~anonymous|0~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 f64) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.set $9 - local.get $3 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.set $10 - local.get $3 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.set $15 - local.get $3 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.set $16 - local.get $4 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.set $11 - local.get $4 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.set $12 - local.get $4 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.set $13 - local.get $0 - i32.const 0 - f64.const 1 - local.get $6 - local.get $6 - local.get $6 - f64.add - local.tee $14 - f64.mul - local.tee $19 - local.get $7 - local.get $8 - f64.mul - local.tee $7 - f64.add - f64.sub - local.get $10 - f64.mul - local.tee $20 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - local.get $5 - local.get $14 - f64.mul - local.tee $17 - local.get $9 - local.get $8 - f64.mul - local.tee $18 - f64.add - local.get $10 - f64.mul - local.tee $21 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - local.get $5 - local.get $8 - f64.mul - local.tee $22 - local.get $9 - local.get $14 - f64.mul - local.tee $14 - f64.sub - local.get $10 - f64.mul - local.tee $10 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 4 - local.get $17 - local.get $18 - f64.sub - local.get $15 - f64.mul - local.tee $17 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 5 - f64.const 1 - local.get $5 - local.get $5 - local.get $5 - f64.add - local.tee $5 - f64.mul - local.tee $18 - local.get $7 - f64.add - f64.sub - local.get $15 - f64.mul - local.tee $7 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 6 - local.get $6 - local.get $8 - f64.mul - local.tee $6 - local.get $9 - local.get $5 - f64.mul - local.tee $5 - f64.add - local.get $15 - f64.mul - local.tee $8 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 7 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 8 - local.get $22 - local.get $14 - f64.add - local.get $16 - f64.mul - local.tee $9 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 9 - local.get $6 - local.get $5 - f64.sub - local.get $16 - f64.mul - local.tee $5 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 10 - f64.const 1 - local.get $18 - local.get $19 - f64.add - f64.sub - local.get $16 - f64.mul - local.tee $6 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 11 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 12 - local.get $2 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.get $11 - f64.add - local.get $20 - local.get $11 - f64.mul - local.get $17 - local.get $12 - f64.mul - f64.add - local.get $9 - local.get $13 - f64.mul - f64.add - f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 13 - local.get $2 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.get $12 - f64.add - local.get $21 - local.get $11 - f64.mul - local.get $7 - local.get $12 - f64.mul - f64.add - local.get $5 - local.get $13 - f64.mul - f64.add - f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 14 - local.get $2 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.get $13 - f64.add - local.get $10 - local.get $11 - f64.mul - local.get $8 - local.get $12 - f64.mul - f64.add - local.get $6 - local.get $13 - f64.mul - f64.add - f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 15 - f64.const 1 - call $~lib/typedarray/Float64Array#__set - local.get $0 - ) - (func $assembly/mat4/fromQuat (param $0 i32) (param $1 i32) (result i32) - (local $2 f64) - (local $3 f64) - (local $4 f64) - (local $5 f64) - (local $6 f64) - (local $7 f64) - (local $8 f64) - (local $9 f64) - (local $10 f64) - (local $11 f64) - (local $12 f64) - local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.set $4 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.set $2 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.tee $3 - local.get $3 - f64.add - local.set $5 - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.set $6 - local.get $0 - i32.const 0 - f64.const 1 - local.get $2 - local.get $2 - local.get $2 - f64.add - local.tee $7 - f64.mul - local.tee $8 - f64.sub - local.get $3 - local.get $5 - f64.mul - local.tee $9 - f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - local.get $2 - local.get $4 - local.get $4 - f64.add - local.tee $2 - f64.mul - local.tee $10 - local.get $6 - local.get $5 - f64.mul - local.tee $5 - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - local.get $3 - local.get $2 - f64.mul - local.tee $11 - local.get $6 - local.get $7 - f64.mul - local.tee $12 - f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 4 - local.get $10 - local.get $5 - f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 5 - f64.const 1 - local.get $4 local.get $2 - f64.mul - f64.sub + call $assembly/vec3/dot local.tee $4 - local.get $9 - f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 6 - local.get $3 - local.get $7 - f64.mul - local.tee $3 - local.get $6 - local.get $2 - f64.mul - local.tee $2 - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 7 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 8 - local.get $11 - local.get $12 - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 9 - local.get $3 - local.get $2 - f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 10 - local.get $4 - local.get $8 - f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 11 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 12 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 13 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 14 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 15 - f64.const 1 - call $~lib/typedarray/Float64Array#__set - local.get $0 - ) - (func $assembly/mat4/frustum (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (result i32) - (local $7 f64) - (local $8 f64) - local.get $0 - i32.const 0 - local.get $5 - local.get $5 - f64.add - local.tee $7 - f64.const 1 - local.get $2 - local.get $1 - f64.sub - f64.div - local.tee $8 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 4 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 5 - local.get $7 - f64.const 1 - local.get $4 - local.get $3 - f64.sub - f64.div - local.tee $7 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 6 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 7 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 8 - local.get $2 - local.get $1 - f64.add - local.get $8 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 9 - local.get $4 - local.get $3 - f64.add - local.get $7 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 10 - local.get $6 - local.get $5 - f64.add - f64.const 1 - local.get $5 - local.get $6 - f64.sub - f64.div - local.tee $1 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 11 - f64.const -1 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 12 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 13 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 14 - local.get $6 - local.get $5 - f64.mul - local.tee $2 - local.get $2 - f64.add - local.get $1 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 15 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - ) - (func $assembly/mat4/perspectiveZO (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (result i32) - local.get $0 - i32.const 0 - f64.const 1 - local.get $1 - f64.const 0.5 - f64.mul - call $~lib/math/NativeMath.tan - f64.div - local.tee $1 - local.get $2 - f64.div - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 4 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 5 - local.get $1 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 6 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 7 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 8 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 9 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 11 - f64.const -1 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 12 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 13 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 15 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $4 - f64.const inf - f64.ne + f64.const -0.999999 + f64.lt if - local.get $0 - i32.const 10 - local.get $4 - f64.const 1 - local.get $3 - local.get $4 - f64.sub - f64.div - local.tee $1 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 14 - local.get $4 + global.get $~lib/memory/__stack_pointer + local.tee $2 + global.get $assembly/quat/tmpvec3 + local.tee $3 + i32.store + local.get $2 + global.get $assembly/quat/xUnitVec3 + local.tee $2 + i32.store offset=4 local.get $3 - f64.mul + local.get $2 local.get $1 - f64.mul - call $~lib/typedarray/Float64Array#__set - else - local.get $0 - i32.const 10 - f64.const -1 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 14 - local.get $3 - f64.neg - call $~lib/typedarray/Float64Array#__set - end - local.get $0 - ) - (func $assembly/mat4/perspectiveFromFieldOfView (param $0 i32) (param $1 i32) (param $2 f64) (param $3 f64) (result i32) - (local $4 f64) - (local $5 f64) - (local $6 f64) - (local $7 f64) - (local $8 f64) - (local $9 f64) - local.get $1 - f64.load - f64.const 3.141592653589793 - f64.mul - f64.const 180 - f64.div - call $~lib/math/NativeMath.tan - local.set $4 - local.get $1 - f64.load offset=8 - f64.const 3.141592653589793 - f64.mul - f64.const 180 - f64.div - call $~lib/math/NativeMath.tan - local.set $5 - local.get $0 - i32.const 0 - f64.const 2 - local.get $1 - f64.load offset=16 - f64.const 3.141592653589793 - f64.mul - f64.const 180 - f64.div - call $~lib/math/NativeMath.tan - local.tee $6 - local.get $1 - f64.load offset=24 - f64.const 3.141592653589793 - f64.mul - f64.const 180 - f64.div - call $~lib/math/NativeMath.tan - local.tee $7 - f64.add - f64.div - local.tee $8 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 4 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 5 - f64.const 2 - local.get $4 - local.get $5 - f64.add - f64.div - local.tee $9 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 6 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 7 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 8 - local.get $6 - local.get $7 - f64.sub - local.get $8 - f64.mul - f64.const 0.5 - f64.mul - f64.neg - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 9 - local.get $4 - local.get $5 - f64.sub - local.get $9 - f64.mul - f64.const 0.5 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 10 - local.get $3 - local.get $2 - local.get $3 - f64.sub - local.tee $4 - f64.div - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 11 - f64.const -1 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 12 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 13 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 14 - local.get $3 - local.get $2 - f64.mul - local.get $4 - f64.div - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 15 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - ) - (func $assembly/mat4/orthoZO (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (result i32) - (local $7 f64) - (local $8 f64) - local.get $0 - i32.const 0 - f64.const 1 - local.get $1 - local.get $2 - f64.sub - f64.div - local.tee $7 - f64.const -2 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 4 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 5 - f64.const 1 - local.get $3 - local.get $4 - f64.sub - f64.div - local.tee $8 - f64.const -2 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 6 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 7 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 8 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 9 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 10 - f64.const 1 - local.get $5 - local.get $6 - f64.sub - f64.div - local.tee $6 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 11 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 12 - local.get $1 - local.get $2 - f64.add - local.get $7 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 13 - local.get $4 - local.get $3 - f64.add - local.get $8 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 14 - local.get $5 - local.get $6 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 15 - f64.const 1 - call $~lib/typedarray/Float64Array#__set - local.get $0 - ) - (func $assembly/mat4/lookAt (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - (local $4 f64) - (local $5 f64) - (local $6 f64) - (local $7 f64) - (local $8 f64) - (local $9 f64) - (local $10 f64) - (local $11 f64) - (local $12 f64) - (local $13 f64) - (local $14 f64) - (local $15 f64) - (local $16 f64) - local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.set $13 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.set $14 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.set $15 - local.get $3 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.set $5 - local.get $3 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.set $11 - local.get $3 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.set $6 - local.get $2 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.set $7 - local.get $2 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.set $8 - local.get $15 - local.get $2 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.tee $4 - f64.sub - f64.abs - f64.const 1e-06 - f64.lt - i32.const 0 - local.get $14 - local.get $8 - f64.sub - f64.abs - f64.const 1e-06 - f64.lt - i32.const 0 - local.get $13 - local.get $7 - f64.sub - f64.abs - f64.const 1e-06 - f64.lt - select - select - if + call $assembly/vec3/cross + drop + global.get $~lib/memory/__stack_pointer + global.get $assembly/quat/tmpvec3 + local.tee $2 + i32.store + i32.const 1 + global.set $~argumentsLength + local.get $2 + i32.const 1472 + i32.load + call_indirect $0 (type $i32_=>_f64) + f64.const 1e-06 + f64.lt + if + global.get $~lib/memory/__stack_pointer + local.tee $2 + global.get $assembly/quat/tmpvec3 + local.tee $3 + i32.store + local.get $2 + global.get $assembly/quat/yUnitVec3 + local.tee $2 + i32.store offset=4 + local.get $3 + local.get $2 + local.get $1 + call $assembly/vec3/cross + drop + end + global.get $~lib/memory/__stack_pointer + local.tee $2 + global.get $assembly/quat/tmpvec3 + local.tee $1 + i32.store + local.get $2 + local.get $1 + i32.store offset=4 + local.get $1 + local.get $1 + call $assembly/vec3/normalize + drop + global.get $~lib/memory/__stack_pointer + global.get $assembly/quat/tmpvec3 + local.tee $1 + i32.store offset=4 local.get $0 - call $assembly/mat4/identity - return - end - f64.const 1 - local.get $13 - local.get $7 - f64.sub - local.tee $9 - local.get $14 - local.get $8 - f64.sub - local.tee $8 - local.get $15 - local.get $4 - f64.sub - local.tee $7 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $assembly/imports/MathUtil.hypot - f64.div - local.set $4 - local.get $11 - local.get $7 - local.get $4 - f64.mul - local.tee $7 - f64.mul - local.get $6 - local.get $8 - local.get $4 - f64.mul - local.tee $8 - f64.mul - f64.sub - local.tee $12 - local.get $6 - local.get $9 - local.get $4 - f64.mul - local.tee $4 - f64.mul - local.get $5 - local.get $7 - f64.mul - f64.sub - local.tee $9 - local.get $5 - local.get $8 - f64.mul - local.get $11 - local.get $4 - f64.mul - f64.sub - local.tee $10 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $assembly/imports/MathUtil.hypot - local.tee $5 - i64.reinterpret_f64 - i64.const 1 - i64.shl - i64.const 2 - i64.sub - i64.const -9007199254740994 - i64.gt_u - if (result f64) - f64.const 0 - local.set $5 - f64.const 0 - local.set $11 - f64.const 0 - else - local.get $12 - f64.const 1 - local.get $5 - f64.div - local.tee $6 - f64.mul - local.set $5 - local.get $9 - local.get $6 - f64.mul - local.set $11 - local.get $10 - local.get $6 - f64.mul - end - local.set $6 - local.get $8 - local.get $6 - f64.mul - local.get $7 - local.get $11 - f64.mul - f64.sub - local.tee $9 - local.get $7 - local.get $5 - f64.mul - local.get $4 - local.get $6 - f64.mul - f64.sub - local.tee $12 - local.get $4 - local.get $11 - f64.mul - local.get $8 - local.get $5 - f64.mul - f64.sub - local.tee $16 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $assembly/imports/MathUtil.hypot - local.tee $10 - i64.reinterpret_f64 - i64.const 1 - i64.shl - i64.const 2 - i64.sub - i64.const -9007199254740994 - i64.gt_u - if (result f64) - f64.const 0 - local.set $9 - f64.const 0 - local.set $12 - f64.const 0 + local.get $1 + f64.const 3.141592653589793 + call $assembly/quat/setAxisAngle + drop else - local.get $9 - f64.const 1 - local.get $10 - f64.div - local.tee $10 - f64.mul - local.set $9 - local.get $12 - local.get $10 - f64.mul - local.set $12 - local.get $16 - local.get $10 - f64.mul - end - local.set $10 - local.get $0 - i32.const 0 - local.get $5 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - local.get $9 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - local.get $4 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 4 - local.get $11 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 5 - local.get $12 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 6 - local.get $8 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 7 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 8 - local.get $6 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 9 - local.get $10 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 10 - local.get $7 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 11 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 12 - local.get $5 - local.get $13 - f64.mul - local.get $11 - local.get $14 - f64.mul - f64.add - local.get $6 - local.get $15 - f64.mul - f64.add - f64.neg - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 13 - local.get $9 - local.get $13 - f64.mul - local.get $12 - local.get $14 - f64.mul - f64.add - local.get $10 - local.get $15 - f64.mul - f64.add - f64.neg - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 14 - local.get $4 - local.get $13 - f64.mul - local.get $8 - local.get $14 - f64.mul - f64.add - local.get $7 - local.get $15 - f64.mul - f64.add - f64.neg - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 15 - f64.const 1 - call $~lib/typedarray/Float64Array#__set - local.get $0 - ) - (func $assembly/mat4/targetTo (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - (local $4 f64) - (local $5 f64) - (local $6 f64) - (local $7 f64) - (local $8 f64) - (local $9 f64) - (local $10 f64) - (local $11 f64) - (local $12 f64) - (local $13 f64) - local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.set $8 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.set $7 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.set $6 - local.get $3 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.set $12 - local.get $3 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.set $9 - local.get $3 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.set $5 - local.get $8 - local.get $2 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - f64.sub - local.tee $11 - local.get $11 - f64.mul - local.get $7 - local.get $2 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - f64.sub - local.tee $4 - local.get $4 - f64.mul - f64.add - local.get $6 - local.get $2 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - f64.sub - local.tee $10 - local.get $10 - f64.mul - f64.add - local.tee $13 - f64.const 0 - f64.gt - if - local.get $11 - f64.const 1 - local.get $13 - f64.sqrt - f64.div - local.tee $13 - f64.mul - local.set $11 - local.get $10 - local.get $13 - f64.mul - local.set $10 local.get $4 - local.get $13 - f64.mul - local.set $4 - end - local.get $9 - local.get $10 - f64.mul - local.get $5 - local.get $4 - f64.mul - f64.sub - local.tee $13 - local.get $13 - f64.mul - local.get $5 - local.get $11 - f64.mul - local.get $12 - local.get $10 - f64.mul - f64.sub - local.tee $5 - local.get $5 - f64.mul - f64.add - local.get $12 - local.get $4 - f64.mul - local.get $9 - local.get $11 - f64.mul - f64.sub - local.tee $12 - local.get $12 - f64.mul - f64.add - local.tee $9 - f64.const 0 - f64.gt - if - local.get $13 - f64.const 1 - local.get $9 - f64.sqrt - f64.div - local.tee $9 - f64.mul - local.set $13 - local.get $12 - local.get $9 - f64.mul - local.set $12 - local.get $5 - local.get $9 - f64.mul - local.set $5 - end - local.get $0 - i32.const 0 - local.get $13 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - local.get $5 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - local.get $12 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 4 - local.get $4 - local.get $12 - f64.mul - local.get $10 - local.get $5 - f64.mul - f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 5 - local.get $10 - local.get $13 - f64.mul - local.get $11 - local.get $12 - f64.mul - f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 6 - local.get $11 - local.get $5 - f64.mul - local.get $4 - local.get $13 - f64.mul - f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 7 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 + f64.const 0.999999 + f64.gt + if + local.get $0 + i32.const 0 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + else + global.get $~lib/memory/__stack_pointer + global.get $assembly/quat/tmpvec3 + local.tee $3 + i32.store + local.get $3 + local.get $1 + local.get $2 + call $assembly/vec3/cross + drop + global.get $~lib/memory/__stack_pointer + global.get $assembly/quat/tmpvec3 + local.tee $1 + i32.store + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + global.get $assembly/quat/tmpvec3 + local.tee $1 + i32.store + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + global.get $assembly/quat/tmpvec3 + local.tee $1 + i32.store + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $4 + f64.const 1 + f64.add + call $~lib/typedarray/Float64Array#__set + i32.const 2 + global.set $~argumentsLength + local.get $0 + local.get $0 + i32.const 2624 + i32.load + call_indirect $0 (type $i32_i32_=>_i32) + local.set $0 + end + end + global.get $~lib/memory/__stack_pointer i32.const 8 - local.get $11 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 9 - local.get $4 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 10 - local.get $10 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 11 - f64.const 0 - call $~lib/typedarray/Float64Array#__set + i32.add + global.set $~lib/memory/__stack_pointer local.get $0 + ) + (func $start:assembly/quat~anonymous|1~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 f64) (result i32) + (local $6 i32) + global.get $~lib/memory/__stack_pointer i32.const 12 - local.get $8 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 13 - local.get $7 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 14 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $6 + i64.const 0 + i64.store local.get $6 - call $~lib/typedarray/Float64Array#__set + i32.const 0 + i32.store offset=8 + local.get $6 + global.get $assembly/quat/temp1 + local.tee $6 + i32.store + local.get $6 + local.get $1 + local.get $4 + local.get $5 + call $assembly/quat/slerp + drop + global.get $~lib/memory/__stack_pointer + global.get $assembly/quat/temp2 + local.tee $1 + i32.store + local.get $1 + local.get $2 + local.get $3 + local.get $5 + call $assembly/quat/slerp + drop + global.get $~lib/memory/__stack_pointer + local.tee $1 + global.get $assembly/quat/temp1 + local.tee $2 + i32.store offset=4 + local.get $1 + global.get $assembly/quat/temp2 + local.tee $1 + i32.store offset=8 local.get $0 - i32.const 15 + local.get $2 + local.get $1 + local.get $5 + local.get $5 + f64.add f64.const 1 - call $~lib/typedarray/Float64Array#__set + local.get $5 + f64.sub + f64.mul + call $assembly/quat/slerp + drop + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $assembly/mat4/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $start:assembly/quat~anonymous|2~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $4 + i64.const 0 + i64.store + local.get $4 i32.const 0 - local.get $1 + i32.store offset=8 + local.get $4 + global.get $assembly/quat/matr + local.tee $4 + i32.store + local.get $4 i32.const 0 - call $~lib/typedarray/Float64Array#__get local.get $2 i32.const 0 call $~lib/typedarray/Float64Array#__get - f64.add call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get + global.get $~lib/memory/__stack_pointer + global.get $assembly/quat/matr + local.tee $4 + i32.store + local.get $4 + i32.const 3 local.get $2 i32.const 1 call $~lib/typedarray/Float64Array#__get - f64.add call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get + global.get $~lib/memory/__stack_pointer + global.get $assembly/quat/matr + local.tee $4 + i32.store + local.get $4 + i32.const 6 local.get $2 i32.const 2 call $~lib/typedarray/Float64Array#__get - f64.add call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get + global.get $~lib/memory/__stack_pointer + global.get $assembly/quat/matr + local.tee $2 + i32.store local.get $2 - i32.const 3 + i32.const 1 + local.get $3 + i32.const 0 call $~lib/typedarray/Float64Array#__get - f64.add call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 4 - local.get $1 - i32.const 4 - call $~lib/typedarray/Float64Array#__get + global.get $~lib/memory/__stack_pointer + global.get $assembly/quat/matr + local.tee $2 + i32.store local.get $2 i32.const 4 + local.get $3 + i32.const 1 call $~lib/typedarray/Float64Array#__get - f64.add call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 5 - local.get $1 - i32.const 5 - call $~lib/typedarray/Float64Array#__get + global.get $~lib/memory/__stack_pointer + global.get $assembly/quat/matr + local.tee $2 + i32.store local.get $2 - i32.const 5 + i32.const 7 + local.get $3 + i32.const 2 call $~lib/typedarray/Float64Array#__get - f64.add call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 6 - local.get $1 - i32.const 6 - call $~lib/typedarray/Float64Array#__get + global.get $~lib/memory/__stack_pointer + global.get $assembly/quat/matr + local.tee $2 + i32.store local.get $2 - i32.const 6 - call $~lib/typedarray/Float64Array#__get - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 7 + i32.const 2 local.get $1 - i32.const 7 - call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 7 + i32.const 0 call $~lib/typedarray/Float64Array#__get - f64.add + f64.neg call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 8 + global.get $~lib/memory/__stack_pointer + global.get $assembly/quat/matr + local.tee $2 + i32.store + local.get $2 + i32.const 5 local.get $1 - i32.const 8 + i32.const 1 call $~lib/typedarray/Float64Array#__get + f64.neg + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + global.get $assembly/quat/matr + local.tee $2 + i32.store local.get $2 i32.const 8 - call $~lib/typedarray/Float64Array#__get - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 9 local.get $1 - i32.const 9 - call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 9 + i32.const 2 call $~lib/typedarray/Float64Array#__get - f64.add + f64.neg call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + global.get $assembly/quat/matr + local.tee $1 + i32.store offset=8 local.get $0 - i32.const 10 local.get $1 - i32.const 10 - call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 10 - call $~lib/typedarray/Float64Array#__get - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 11 + call $assembly/quat/fromMat3 + local.set $1 + global.get $~lib/memory/__stack_pointer local.get $1 - i32.const 11 - call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 11 - call $~lib/typedarray/Float64Array#__get - f64.add - call $~lib/typedarray/Float64Array#__set + i32.store offset=4 + i32.const 2 + global.set $~argumentsLength local.get $0 - i32.const 12 local.get $1 + i32.const 2624 + i32.load + call_indirect $0 (type $i32_i32_=>_i32) + global.get $~lib/memory/__stack_pointer i32.const 12 - call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 12 - call $~lib/typedarray/Float64Array#__get - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 13 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $start:assembly/vec2~anonymous|0~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (result i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store local.get $1 - i32.const 13 - call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 13 - call $~lib/typedarray/Float64Array#__get - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 14 + i32.const 2 local.get $1 - i32.const 14 - call $~lib/typedarray/Float64Array#__get + select + local.set $6 local.get $2 - i32.const 14 - call $~lib/typedarray/Float64Array#__get - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 15 - local.get $1 - i32.const 15 - call $~lib/typedarray/Float64Array#__get + i32.const 0 local.get $2 - i32.const 15 - call $~lib/typedarray/Float64Array#__get - f64.add - call $~lib/typedarray/Float64Array#__set + select + local.set $2 + local.get $3 + if (result i32) + local.get $2 + local.get $3 + local.get $6 + i32.mul + i32.add + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + call $assembly/imports/MathUtil.min + else + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + end + local.set $1 + loop $for-loop|0 + local.get $1 + local.get $2 + i32.gt_s + if + global.get $~lib/memory/__stack_pointer + global.get $assembly/vec2/vec + local.tee $3 + i32.store + local.get $3 + i32.const 0 + local.get $0 + local.get $2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + global.get $assembly/vec2/vec + local.tee $3 + i32.store + local.get $3 + i32.const 1 + local.get $0 + local.get $2 + i32.const 1 + i32.add + local.tee $7 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + local.tee $8 + global.get $assembly/vec2/vec + local.tee $3 + i32.store + local.get $8 + local.get $3 + i32.store offset=4 + i32.const 3 + global.set $~argumentsLength + local.get $3 + local.get $3 + local.get $5 + local.get $4 + i32.load + call_indirect $0 (type $i32_i32_i32_=>_none) + global.get $~lib/memory/__stack_pointer + global.get $assembly/vec2/vec + local.tee $3 + i32.store + local.get $0 + local.get $2 + local.get $3 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + global.get $assembly/vec2/vec + local.tee $3 + i32.store + local.get $0 + local.get $7 + local.get $3 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $2 + local.get $6 + i32.add + local.set $2 + br $for-loop|0 + end + end + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $assembly/mat4/multiplyScalar (param $0 i32) (param $1 i32) (param $2 f64) (result i32) - local.get $0 - i32.const 0 + (func $assembly/mat2d/str (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 96 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $1 + i64.const 0 + i64.store local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.get $2 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 + i64.const 0 + i64.store offset=8 local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.get $2 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 + i64.const 0 + i64.store offset=16 local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.get $2 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 + i64.const 0 + i64.store offset=24 local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.get $2 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 4 + i64.const 0 + i64.store offset=32 local.get $1 - i32.const 4 - call $~lib/typedarray/Float64Array#__get - local.get $2 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 5 + i64.const 0 + i64.store offset=40 + local.get $1 + i64.const 0 + i64.store offset=48 + local.get $1 + i64.const 0 + i64.store offset=56 + local.get $1 + i64.const 0 + i64.store offset=64 + local.get $1 + i64.const 0 + i64.store offset=72 + local.get $1 + i64.const 0 + i64.store offset=80 local.get $1 - i32.const 5 - call $~lib/typedarray/Float64Array#__get - local.get $2 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 6 + i64.const 0 + i64.store offset=88 local.get $1 - i32.const 6 - call $~lib/typedarray/Float64Array#__get - local.get $2 - f64.mul - call $~lib/typedarray/Float64Array#__set + i32.const 5488 + i32.store offset=88 local.get $0 - i32.const 7 - local.get $1 - i32.const 7 + i32.const 0 call $~lib/typedarray/Float64Array#__get - local.get $2 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 8 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer local.get $1 - i32.const 8 - call $~lib/typedarray/Float64Array#__get - local.get $2 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 9 + i32.store offset=92 + i32.const 5488 local.get $1 - i32.const 9 - call $~lib/typedarray/Float64Array#__get - local.get $2 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 10 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $1 - i32.const 10 - call $~lib/typedarray/Float64Array#__get + i32.store offset=80 local.get $2 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 11 + i32.const 5424 + i32.store offset=84 local.get $1 - i32.const 11 - call $~lib/typedarray/Float64Array#__get - local.get $2 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 12 + i32.const 5424 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer local.get $1 - i32.const 12 - call $~lib/typedarray/Float64Array#__get - local.get $2 - f64.mul - call $~lib/typedarray/Float64Array#__set + i32.store offset=72 local.get $0 - i32.const 13 - local.get $1 - i32.const 13 + i32.const 1 call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer local.get $2 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 14 + i32.store offset=76 local.get $1 - i32.const 14 - call $~lib/typedarray/Float64Array#__get local.get $2 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 15 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $1 - i32.const 15 - call $~lib/typedarray/Float64Array#__get + i32.store offset=64 local.get $2 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - ) - (func $assembly/mat4/multiplyScalarAndAdd (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) - local.get $0 - i32.const 0 + i32.const 5424 + i32.store offset=68 local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.get $3 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 + i32.const 5424 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.get $3 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set + i32.store offset=56 local.get $0 i32.const 2 - local.get $1 - i32.const 2 call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer local.get $2 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.get $3 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 + i32.store offset=60 local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get local.get $2 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.get $3 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 4 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $1 - i32.const 4 - call $~lib/typedarray/Float64Array#__get + i32.store offset=48 local.get $2 - i32.const 4 - call $~lib/typedarray/Float64Array#__get - local.get $3 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 5 + i32.const 5424 + i32.store offset=52 local.get $1 - i32.const 5 - call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 5 - call $~lib/typedarray/Float64Array#__get - local.get $3 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 6 + i32.const 5424 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer local.get $1 - i32.const 6 - call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 6 - call $~lib/typedarray/Float64Array#__get - local.get $3 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set + i32.store offset=40 local.get $0 - i32.const 7 - local.get $1 - i32.const 7 + i32.const 3 call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer local.get $2 - i32.const 7 - call $~lib/typedarray/Float64Array#__get - local.get $3 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 8 + i32.store offset=44 local.get $1 - i32.const 8 - call $~lib/typedarray/Float64Array#__get local.get $2 - i32.const 8 - call $~lib/typedarray/Float64Array#__get - local.get $3 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 9 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $1 - i32.const 9 - call $~lib/typedarray/Float64Array#__get + i32.store offset=32 local.get $2 - i32.const 9 - call $~lib/typedarray/Float64Array#__get - local.get $3 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 10 + i32.const 5424 + i32.store offset=36 local.get $1 - i32.const 10 - call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 10 - call $~lib/typedarray/Float64Array#__get - local.get $3 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 11 + i32.const 5424 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer local.get $1 - i32.const 11 - call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 11 - call $~lib/typedarray/Float64Array#__get - local.get $3 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set + i32.store offset=24 local.get $0 - i32.const 12 - local.get $1 - i32.const 12 + i32.const 4 call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer local.get $2 - i32.const 12 - call $~lib/typedarray/Float64Array#__get - local.get $3 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 13 + i32.store offset=28 local.get $1 - i32.const 13 - call $~lib/typedarray/Float64Array#__get local.get $2 - i32.const 13 - call $~lib/typedarray/Float64Array#__get - local.get $3 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 14 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $1 - i32.const 14 - call $~lib/typedarray/Float64Array#__get + i32.store offset=16 local.get $2 - i32.const 14 + i32.const 5424 + i32.store offset=20 + local.get $1 + i32.const 5424 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=8 + local.get $0 + i32.const 5 call $~lib/typedarray/Float64Array#__get - local.get $3 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set + call $~lib/number/F64#toString + local.set $0 + global.get $~lib/memory/__stack_pointer local.get $0 - i32.const 15 + i32.store offset=12 local.get $1 - i32.const 15 - call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 15 - call $~lib/typedarray/Float64Array#__get - local.get $3 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set local.get $0 - ) - (func $assembly/mat4/exactEquals (param $0 i32) (param $1 i32) (result i32) + call $~lib/string/String.__concat + local.set $0 + global.get $~lib/memory/__stack_pointer + local.tee $1 local.get $0 - i32.const 0 - call $~lib/typedarray/Float64Array#__get + i32.store local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - f64.eq - if (result i32) - local.get $0 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - f64.eq - else - i32.const 0 - end - if (result i32) - local.get $0 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - f64.eq - else - i32.const 0 - end - if (result i32) - local.get $0 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - f64.eq - else - i32.const 0 - end - if (result i32) - local.get $0 - i32.const 4 - call $~lib/typedarray/Float64Array#__get - local.get $1 - i32.const 4 - call $~lib/typedarray/Float64Array#__get - f64.eq - else - i32.const 0 - end - if (result i32) - local.get $0 - i32.const 5 - call $~lib/typedarray/Float64Array#__get - local.get $1 - i32.const 5 - call $~lib/typedarray/Float64Array#__get - f64.eq - else - i32.const 0 - end - if (result i32) - local.get $0 - i32.const 6 - call $~lib/typedarray/Float64Array#__get - local.get $1 - i32.const 6 - call $~lib/typedarray/Float64Array#__get - f64.eq - else - i32.const 0 - end - if (result i32) - local.get $0 - i32.const 7 - call $~lib/typedarray/Float64Array#__get - local.get $1 - i32.const 7 - call $~lib/typedarray/Float64Array#__get - f64.eq - else - i32.const 0 - end - if (result i32) - local.get $0 - i32.const 8 - call $~lib/typedarray/Float64Array#__get - local.get $1 - i32.const 8 - call $~lib/typedarray/Float64Array#__get - f64.eq - else - i32.const 0 - end - if (result i32) - local.get $0 - i32.const 9 - call $~lib/typedarray/Float64Array#__get - local.get $1 - i32.const 9 - call $~lib/typedarray/Float64Array#__get - f64.eq - else - i32.const 0 - end - if (result i32) - local.get $0 - i32.const 10 - call $~lib/typedarray/Float64Array#__get - local.get $1 - i32.const 10 - call $~lib/typedarray/Float64Array#__get - f64.eq - else - i32.const 0 - end - if (result i32) - local.get $0 - i32.const 11 - call $~lib/typedarray/Float64Array#__get - local.get $1 - i32.const 11 - call $~lib/typedarray/Float64Array#__get - f64.eq - else - i32.const 0 - end - if (result i32) - local.get $0 - i32.const 12 - call $~lib/typedarray/Float64Array#__get - local.get $1 - i32.const 12 - call $~lib/typedarray/Float64Array#__get - f64.eq - else - i32.const 0 - end - if (result i32) - local.get $0 - i32.const 13 - call $~lib/typedarray/Float64Array#__get - local.get $1 - i32.const 13 - call $~lib/typedarray/Float64Array#__get - f64.eq - else - i32.const 0 - end - if (result i32) - local.get $0 - i32.const 14 - call $~lib/typedarray/Float64Array#__get - local.get $1 - i32.const 14 - call $~lib/typedarray/Float64Array#__get - f64.eq - else - i32.const 0 - end - if (result i32) - local.get $0 - i32.const 15 - call $~lib/typedarray/Float64Array#__get - local.get $1 - i32.const 15 - call $~lib/typedarray/Float64Array#__get - f64.eq - else - i32.const 0 + i32.const 5456 + i32.store offset=4 + local.get $0 + i32.const 5456 + call $~lib/string/String.__concat + global.get $~lib/memory/__stack_pointer + i32.const 96 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $assembly/mat3/str (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 144 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable end - ) - (func $assembly/mat4/equals (param $0 i32) (param $1 i32) (result i32) - (local $2 f64) - (local $3 f64) - (local $4 f64) - (local $5 f64) - (local $6 f64) - (local $7 f64) - (local $8 f64) - (local $9 f64) - (local $10 f64) - (local $11 f64) - (local $12 f64) - (local $13 f64) - (local $14 f64) - (local $15 f64) - (local $16 f64) - (local $17 f64) - (local $18 f64) - (local $19 f64) - (local $20 f64) - (local $21 f64) - (local $22 f64) - (local $23 f64) - (local $24 f64) - (local $25 f64) - (local $26 f64) - (local $27 f64) - (local $28 f64) - (local $29 f64) - (local $30 f64) - (local $31 f64) - (local $32 f64) - (local $33 f64) + global.get $~lib/memory/__stack_pointer + local.tee $1 + i64.const 0 + i64.store + local.get $1 + i64.const 0 + i64.store offset=8 + local.get $1 + i64.const 0 + i64.store offset=16 + local.get $1 + i64.const 0 + i64.store offset=24 + local.get $1 + i64.const 0 + i64.store offset=32 + local.get $1 + i64.const 0 + i64.store offset=40 + local.get $1 + i64.const 0 + i64.store offset=48 + local.get $1 + i64.const 0 + i64.store offset=56 + local.get $1 + i64.const 0 + i64.store offset=64 + local.get $1 + i64.const 0 + i64.store offset=72 + local.get $1 + i64.const 0 + i64.store offset=80 + local.get $1 + i64.const 0 + i64.store offset=88 + local.get $1 + i64.const 0 + i64.store offset=96 + local.get $1 + i64.const 0 + i64.store offset=104 + local.get $1 + i64.const 0 + i64.store offset=112 + local.get $1 + i64.const 0 + i64.store offset=120 + local.get $1 + i64.const 0 + i64.store offset=128 + local.get $1 + i64.const 0 + i64.store offset=136 + local.get $1 + i32.const 5520 + i32.store offset=136 local.get $0 i32.const 0 call $~lib/typedarray/Float64Array#__get - local.set $2 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=140 + i32.const 5520 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.tee $2 + local.get $1 + i32.store offset=128 + local.get $2 + i32.const 5424 + i32.store offset=132 + local.get $1 + i32.const 5424 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=120 local.get $0 i32.const 1 call $~lib/typedarray/Float64Array#__get - local.set $3 + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=124 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.tee $2 + local.get $1 + i32.store offset=112 + local.get $2 + i32.const 5424 + i32.store offset=116 + local.get $1 + i32.const 5424 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=104 local.get $0 i32.const 2 call $~lib/typedarray/Float64Array#__get - local.set $4 + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=108 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.tee $2 + local.get $1 + i32.store offset=96 + local.get $2 + i32.const 5424 + i32.store offset=100 + local.get $1 + i32.const 5424 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=88 local.get $0 i32.const 3 call $~lib/typedarray/Float64Array#__get - local.set $5 + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=92 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.tee $2 + local.get $1 + i32.store offset=80 + local.get $2 + i32.const 5424 + i32.store offset=84 + local.get $1 + i32.const 5424 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=72 local.get $0 i32.const 4 call $~lib/typedarray/Float64Array#__get - local.set $6 + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=76 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.tee $2 + local.get $1 + i32.store offset=64 + local.get $2 + i32.const 5424 + i32.store offset=68 + local.get $1 + i32.const 5424 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=56 local.get $0 i32.const 5 call $~lib/typedarray/Float64Array#__get - local.set $7 + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=60 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.tee $2 + local.get $1 + i32.store offset=48 + local.get $2 + i32.const 5424 + i32.store offset=52 + local.get $1 + i32.const 5424 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=40 local.get $0 i32.const 6 call $~lib/typedarray/Float64Array#__get - local.set $8 + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=44 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.tee $2 + local.get $1 + i32.store offset=32 + local.get $2 + i32.const 5424 + i32.store offset=36 + local.get $1 + i32.const 5424 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=24 local.get $0 i32.const 7 call $~lib/typedarray/Float64Array#__get - local.set $9 + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=28 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.tee $2 + local.get $1 + i32.store offset=16 + local.get $2 + i32.const 5424 + i32.store offset=20 + local.get $1 + i32.const 5424 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=8 local.get $0 i32.const 8 call $~lib/typedarray/Float64Array#__get - local.set $10 + call $~lib/number/F64#toString + local.set $0 + global.get $~lib/memory/__stack_pointer local.get $0 - i32.const 9 - call $~lib/typedarray/Float64Array#__get - local.set $11 + i32.store offset=12 + local.get $1 local.get $0 - i32.const 10 - call $~lib/typedarray/Float64Array#__get - local.set $12 + call $~lib/string/String.__concat + local.set $0 + global.get $~lib/memory/__stack_pointer + local.tee $1 local.get $0 - i32.const 11 - call $~lib/typedarray/Float64Array#__get - local.set $13 + i32.store + local.get $1 + i32.const 5456 + i32.store offset=4 local.get $0 - i32.const 12 - call $~lib/typedarray/Float64Array#__get - local.set $14 + i32.const 5456 + call $~lib/string/String.__concat + global.get $~lib/memory/__stack_pointer + i32.const 144 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $assembly/mat4/str (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 256 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $1 + i64.const 0 + i64.store + local.get $1 + i64.const 0 + i64.store offset=8 + local.get $1 + i64.const 0 + i64.store offset=16 + local.get $1 + i64.const 0 + i64.store offset=24 + local.get $1 + i64.const 0 + i64.store offset=32 + local.get $1 + i64.const 0 + i64.store offset=40 + local.get $1 + i64.const 0 + i64.store offset=48 + local.get $1 + i64.const 0 + i64.store offset=56 + local.get $1 + i64.const 0 + i64.store offset=64 + local.get $1 + i64.const 0 + i64.store offset=72 + local.get $1 + i64.const 0 + i64.store offset=80 + local.get $1 + i64.const 0 + i64.store offset=88 + local.get $1 + i64.const 0 + i64.store offset=96 + local.get $1 + i64.const 0 + i64.store offset=104 + local.get $1 + i64.const 0 + i64.store offset=112 + local.get $1 + i64.const 0 + i64.store offset=120 + local.get $1 + i64.const 0 + i64.store offset=128 + local.get $1 + i64.const 0 + i64.store offset=136 + local.get $1 + i64.const 0 + i64.store offset=144 + local.get $1 + i64.const 0 + i64.store offset=152 + local.get $1 + i64.const 0 + i64.store offset=160 + local.get $1 + i64.const 0 + i64.store offset=168 + local.get $1 + i64.const 0 + i64.store offset=176 + local.get $1 + i64.const 0 + i64.store offset=184 + local.get $1 + i64.const 0 + i64.store offset=192 + local.get $1 + i64.const 0 + i64.store offset=200 + local.get $1 + i64.const 0 + i64.store offset=208 + local.get $1 + i64.const 0 + i64.store offset=216 + local.get $1 + i64.const 0 + i64.store offset=224 + local.get $1 + i64.const 0 + i64.store offset=232 + local.get $1 + i64.const 0 + i64.store offset=240 + local.get $1 + i64.const 0 + i64.store offset=248 + local.get $1 + i32.const 5552 + i32.store offset=248 local.get $0 - i32.const 13 + i32.const 0 call $~lib/typedarray/Float64Array#__get - local.set $15 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=252 + i32.const 5552 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.tee $2 + local.get $1 + i32.store offset=240 + local.get $2 + i32.const 5424 + i32.store offset=244 + local.get $1 + i32.const 5424 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=232 local.get $0 - i32.const 14 + i32.const 1 call $~lib/typedarray/Float64Array#__get - local.set $16 + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=236 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.tee $2 + local.get $1 + i32.store offset=224 + local.get $2 + i32.const 5424 + i32.store offset=228 + local.get $1 + i32.const 5424 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=216 local.get $0 - i32.const 15 + i32.const 2 call $~lib/typedarray/Float64Array#__get - local.set $17 + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=220 local.get $1 - i32.const 0 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.tee $2 + local.get $1 + i32.store offset=208 + local.get $2 + i32.const 5424 + i32.store offset=212 + local.get $1 + i32.const 5424 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=200 + local.get $0 + i32.const 3 call $~lib/typedarray/Float64Array#__get - local.set $18 + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=204 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.tee $2 + local.get $1 + i32.store offset=192 + local.get $2 + i32.const 5424 + i32.store offset=196 + local.get $1 + i32.const 5424 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer local.get $1 - i32.const 1 + i32.store offset=184 + local.get $0 + i32.const 4 call $~lib/typedarray/Float64Array#__get - local.set $19 + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=188 local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.set $20 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.set $21 + i32.store offset=176 + local.get $2 + i32.const 5424 + i32.store offset=180 local.get $1 - i32.const 4 - call $~lib/typedarray/Float64Array#__get - local.set $22 + i32.const 5424 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer local.get $1 + i32.store offset=168 + local.get $0 i32.const 5 call $~lib/typedarray/Float64Array#__get - local.set $23 + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=172 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.tee $2 + local.get $1 + i32.store offset=160 + local.get $2 + i32.const 5424 + i32.store offset=164 local.get $1 + i32.const 5424 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=152 + local.get $0 i32.const 6 call $~lib/typedarray/Float64Array#__get - local.set $24 + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=156 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.tee $2 + local.get $1 + i32.store offset=144 + local.get $2 + i32.const 5424 + i32.store offset=148 + local.get $1 + i32.const 5424 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer local.get $1 + i32.store offset=136 + local.get $0 i32.const 7 call $~lib/typedarray/Float64Array#__get - local.set $25 + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=140 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.tee $2 + local.get $1 + i32.store offset=128 + local.get $2 + i32.const 5424 + i32.store offset=132 + local.get $1 + i32.const 5424 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer local.get $1 + i32.store offset=120 + local.get $0 i32.const 8 call $~lib/typedarray/Float64Array#__get - local.set $26 + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=124 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.tee $2 + local.get $1 + i32.store offset=112 + local.get $2 + i32.const 5424 + i32.store offset=116 + local.get $1 + i32.const 5424 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer local.get $1 + i32.store offset=104 + local.get $0 i32.const 9 call $~lib/typedarray/Float64Array#__get - local.set $27 + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=108 local.get $1 - i32.const 10 - call $~lib/typedarray/Float64Array#__get - local.set $28 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $1 - i32.const 11 - call $~lib/typedarray/Float64Array#__get - local.set $29 + i32.store offset=96 + local.get $2 + i32.const 5424 + i32.store offset=100 local.get $1 - i32.const 12 - call $~lib/typedarray/Float64Array#__get - local.set $30 + i32.const 5424 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer local.get $1 - i32.const 13 + i32.store offset=88 + local.get $0 + i32.const 10 call $~lib/typedarray/Float64Array#__get - local.set $31 + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=92 local.get $1 - i32.const 14 - call $~lib/typedarray/Float64Array#__get - local.set $32 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $1 - i32.const 15 + i32.store offset=80 + local.get $2 + i32.const 5424 + i32.store offset=84 + local.get $1 + i32.const 5424 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=72 + local.get $0 + i32.const 11 call $~lib/typedarray/Float64Array#__get - local.set $33 + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer local.get $2 - local.get $18 - f64.sub - f64.abs - f64.const 1 + i32.store offset=76 + local.get $1 local.get $2 - f64.abs - local.get $18 - f64.abs - call $assembly/imports/MathUtil.max - f64.const 1e-06 - f64.mul - f64.le - if (result i32) - local.get $3 - local.get $19 - f64.sub - f64.abs - f64.const 1 - local.get $3 - f64.abs - local.get $19 - f64.abs - call $assembly/imports/MathUtil.max - f64.const 1e-06 - f64.mul - f64.le - else - i32.const 0 - end - if (result i32) - local.get $4 - local.get $20 - f64.sub - f64.abs - f64.const 1 - local.get $4 - f64.abs - local.get $20 - f64.abs - call $assembly/imports/MathUtil.max - f64.const 1e-06 - f64.mul - f64.le - else - i32.const 0 - end - if (result i32) - local.get $5 - local.get $21 - f64.sub - f64.abs - f64.const 1 - local.get $5 - f64.abs - local.get $21 - f64.abs - call $assembly/imports/MathUtil.max - f64.const 1e-06 - f64.mul - f64.le - else - i32.const 0 - end - if (result i32) - local.get $6 - local.get $22 - f64.sub - f64.abs - f64.const 1 - local.get $6 - f64.abs - local.get $22 - f64.abs - call $assembly/imports/MathUtil.max - f64.const 1e-06 - f64.mul - f64.le - else - i32.const 0 - end - if (result i32) - local.get $7 - local.get $23 - f64.sub - f64.abs - f64.const 1 - local.get $7 - f64.abs - local.get $23 - f64.abs - call $assembly/imports/MathUtil.max - f64.const 1e-06 - f64.mul - f64.le - else - i32.const 0 - end - if (result i32) - local.get $8 - local.get $24 - f64.sub - f64.abs - f64.const 1 - local.get $8 - f64.abs - local.get $24 - f64.abs - call $assembly/imports/MathUtil.max - f64.const 1e-06 - f64.mul - f64.le - else - i32.const 0 - end - if (result i32) - local.get $9 - local.get $25 - f64.sub - f64.abs - f64.const 1 - local.get $9 - f64.abs - local.get $25 - f64.abs - call $assembly/imports/MathUtil.max - f64.const 1e-06 - f64.mul - f64.le - else - i32.const 0 - end - if (result i32) - local.get $10 - local.get $26 - f64.sub - f64.abs - f64.const 1 - local.get $10 - f64.abs - local.get $26 - f64.abs - call $assembly/imports/MathUtil.max - f64.const 1e-06 - f64.mul - f64.le - else - i32.const 0 - end - if (result i32) - local.get $11 - local.get $27 - f64.sub - f64.abs - f64.const 1 - local.get $11 - f64.abs - local.get $27 - f64.abs - call $assembly/imports/MathUtil.max - f64.const 1e-06 - f64.mul - f64.le - else - i32.const 0 - end - if (result i32) - local.get $12 - local.get $28 - f64.sub - f64.abs - f64.const 1 - local.get $12 - f64.abs - local.get $28 - f64.abs - call $assembly/imports/MathUtil.max - f64.const 1e-06 - f64.mul - f64.le - else - i32.const 0 - end - if (result i32) - local.get $13 - local.get $29 - f64.sub - f64.abs - f64.const 1 - local.get $13 - f64.abs - local.get $29 - f64.abs - call $assembly/imports/MathUtil.max - f64.const 1e-06 - f64.mul - f64.le - else - i32.const 0 - end - if (result i32) - local.get $14 - local.get $30 - f64.sub - f64.abs - f64.const 1 - local.get $14 - f64.abs - local.get $30 - f64.abs - call $assembly/imports/MathUtil.max - f64.const 1e-06 - f64.mul - f64.le - else - i32.const 0 - end - if (result i32) - local.get $15 - local.get $31 - f64.sub - f64.abs - f64.const 1 - local.get $15 - f64.abs - local.get $31 - f64.abs - call $assembly/imports/MathUtil.max - f64.const 1e-06 - f64.mul - f64.le - else - i32.const 0 - end - if (result i32) - local.get $16 - local.get $32 - f64.sub - f64.abs - f64.const 1 - local.get $16 - f64.abs - local.get $32 - f64.abs - call $assembly/imports/MathUtil.max - f64.const 1e-06 - f64.mul - f64.le - else - i32.const 0 - end - if (result i32) - local.get $17 - local.get $33 - f64.sub - f64.abs - f64.const 1 - local.get $17 - f64.abs - local.get $33 - f64.abs - call $assembly/imports/MathUtil.max - f64.const 1e-06 - f64.mul - f64.le - else - i32.const 0 - end - ) - (func $assembly/quat/rotateX (param $0 i32) (param $1 i32) (param $2 f64) (result i32) - (local $3 f64) - (local $4 f64) - (local $5 f64) - (local $6 f64) - (local $7 f64) + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.set $4 + i32.store offset=64 + local.get $2 + i32.const 5424 + i32.store offset=68 local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.set $5 + i32.const 5424 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer local.get $1 - i32.const 2 + i32.store offset=56 + local.get $0 + i32.const 12 call $~lib/typedarray/Float64Array#__get - local.set $6 + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=60 local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.set $7 local.get $2 - f64.const 0.5 - f64.mul - local.tee $3 - call $~lib/math/NativeMath.sin - local.set $2 - local.get $0 - i32.const 0 - local.get $4 - local.get $3 - call $~lib/math/NativeMath.cos - local.tee $3 - f64.mul - local.get $7 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.tee $2 + local.get $1 + i32.store offset=48 local.get $2 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set + i32.const 5424 + i32.store offset=52 + local.get $1 + i32.const 5424 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=40 local.get $0 - i32.const 1 - local.get $5 - local.get $3 - f64.mul - local.get $6 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer local.get $2 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - local.get $6 - local.get $3 - f64.mul - local.get $5 + i32.store offset=44 + local.get $1 local.get $2 - f64.mul - f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - local.get $7 - local.get $3 - f64.mul - local.get $4 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.tee $2 + local.get $1 + i32.store offset=32 local.get $2 - f64.mul - f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - ) - (func $assembly/quat/rotateY (param $0 i32) (param $1 i32) (param $2 f64) (result i32) - (local $3 f64) - (local $4 f64) - (local $5 f64) - (local $6 f64) - (local $7 f64) + i32.const 5424 + i32.store offset=36 local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.set $4 + i32.const 5424 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer local.get $1 - i32.const 1 + i32.store offset=24 + local.get $0 + i32.const 14 call $~lib/typedarray/Float64Array#__get - local.set $5 + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=28 local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.set $6 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.set $7 + i32.store offset=16 local.get $2 - f64.const 0.5 - f64.mul - local.tee $3 - call $~lib/math/NativeMath.sin - local.set $2 + i32.const 5424 + i32.store offset=20 + local.get $1 + i32.const 5424 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=8 local.get $0 - i32.const 0 - local.get $4 - local.get $3 - call $~lib/math/NativeMath.cos - local.tee $3 - f64.mul - local.get $6 - local.get $2 - f64.mul - f64.sub - call $~lib/typedarray/Float64Array#__set + i32.const 15 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $0 + global.get $~lib/memory/__stack_pointer local.get $0 - i32.const 1 - local.get $5 - local.get $3 - f64.mul - local.get $7 - local.get $2 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set + i32.store offset=12 + local.get $1 local.get $0 - i32.const 2 - local.get $6 - local.get $3 - f64.mul - local.get $4 - local.get $2 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set + call $~lib/string/String.__concat + local.set $0 + global.get $~lib/memory/__stack_pointer + local.tee $1 local.get $0 - i32.const 3 - local.get $7 - local.get $3 - f64.mul - local.get $5 - local.get $2 - f64.mul - f64.sub - call $~lib/typedarray/Float64Array#__set + i32.store + local.get $1 + i32.const 5456 + i32.store offset=4 local.get $0 + i32.const 5456 + call $~lib/string/String.__concat + global.get $~lib/memory/__stack_pointer + i32.const 256 + i32.add + global.set $~lib/memory/__stack_pointer ) - (func $assembly/quat/rotateZ (param $0 i32) (param $1 i32) (param $2 f64) (result i32) - (local $3 f64) - (local $4 f64) + (func $assembly/quat/fromEuler (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) (local $5 f64) (local $6 f64) (local $7 f64) - local.get $1 + (local $8 f64) + (local $9 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.set $4 + i32.store local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get + f64.const 0.008726646259971648 + f64.mul + local.tee $1 + call $~lib/math/NativeMath.sin local.set $5 local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get + call $~lib/math/NativeMath.cos local.set $6 - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.set $7 local.get $2 - f64.const 0.5 + f64.const 0.008726646259971648 f64.mul - local.tee $3 + local.tee $1 call $~lib/math/NativeMath.sin - local.set $2 - local.get $0 - i32.const 0 - local.get $4 - local.get $3 + local.set $7 + local.get $1 call $~lib/math/NativeMath.cos - local.tee $3 - f64.mul - local.get $5 - local.get $2 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - local.get $5 - local.get $3 - f64.mul - local.get $4 - local.get $2 - f64.mul - f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - local.get $6 - local.get $3 - f64.mul - local.get $7 - local.get $2 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - local.get $7 + local.set $8 local.get $3 + f64.const 0.008726646259971648 f64.mul - local.get $6 + local.tee $2 + call $~lib/math/NativeMath.sin + local.set $1 local.get $2 - f64.mul - f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - ) - (func $~lib/math/NativeMath.exp (param $0 f64) (result f64) - (local $1 f64) - (local $2 i32) - (local $3 i32) - (local $4 f64) - (local $5 f64) - (local $6 i32) - (local $7 f64) - local.get $0 - i64.reinterpret_f64 - i64.const 32 - i64.shr_u - i32.wrap_i64 - local.tee $3 - i32.const 31 - i32.shr_u - local.set $6 - local.get $3 - i32.const 2147483647 - i32.and - local.tee $3 - i32.const 1082532651 - i32.ge_u + call $~lib/math/NativeMath.cos + local.set $2 + local.get $4 + i32.const 11744 + i32.eq if local.get $0 + i32.const 0 + local.get $5 + local.get $8 + f64.mul + local.tee $3 + local.get $2 + f64.mul + local.get $6 + local.get $7 + f64.mul + local.tee $9 + local.get $1 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set local.get $0 - f64.ne - if - local.get $0 - return - end - local.get $0 - f64.const 709.782712893384 - f64.gt - if - local.get $0 - f64.const 8988465674311579538646525e283 - f64.mul - return - end - local.get $0 - f64.const -745.1332191019411 - f64.lt - if - f64.const 0 - return - end - end - local.get $3 - i32.const 1071001154 - i32.gt_u - if - local.get $0 + i32.const 1 + local.get $9 + local.get $2 + f64.mul local.get $3 - i32.const 1072734898 - i32.ge_u - if (result i32) - local.get $0 - f64.const 1.4426950408889634 - f64.mul - f64.const 0.5 - local.get $0 - f64.copysign - f64.add - i32.trunc_f64_s - else - i32.const 1 - local.get $6 - i32.const 1 - i32.shl - i32.sub - end - local.tee $2 - f64.convert_i32_s - f64.const 0.6931471803691238 + local.get $1 f64.mul f64.sub - local.tee $1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $6 + local.get $8 + f64.mul + local.tee $3 + local.get $1 + f64.mul + local.get $5 + local.get $7 + f64.mul + local.tee $5 local.get $2 - f64.convert_i32_s - f64.const 1.9082149292705877e-10 f64.mul - local.tee $7 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $3 + local.get $2 + f64.mul + local.get $5 + local.get $1 + f64.mul f64.sub - local.set $0 + call $~lib/typedarray/Float64Array#__set else - local.get $3 - i32.const 1043333120 - i32.le_u + local.get $4 + i32.const 11776 + i32.eq if local.get $0 - f64.const 1 - f64.add - return - end - local.get $0 - local.set $1 - end - local.get $0 - local.get $0 - f64.mul - local.tee $4 - local.get $4 - f64.mul - local.set $5 - local.get $0 - local.get $0 - local.get $4 - f64.const 0.16666666666666602 - f64.mul - local.get $5 - local.get $4 - f64.const 6.613756321437934e-05 - f64.mul - f64.const -2.7777777777015593e-03 - f64.add - local.get $5 - local.get $4 - f64.const 4.1381367970572385e-08 - f64.mul - f64.const -1.6533902205465252e-06 - f64.add - f64.mul - f64.add - f64.mul - f64.add - f64.sub - local.tee $0 - f64.mul - f64.const 2 - local.get $0 - f64.sub - f64.div - local.get $7 - f64.sub - local.get $1 - f64.add - f64.const 1 - f64.add - local.set $0 - local.get $2 - if (result f64) - local.get $2 - i32.const 1023 - i32.gt_s - if (result f64) + i32.const 0 + local.get $5 + local.get $8 + f64.mul + local.tee $3 + local.get $2 + f64.mul + local.get $6 + local.get $7 + f64.mul + local.tee $9 + local.get $1 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $9 + local.get $2 + f64.mul + local.get $3 + local.get $1 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set local.get $0 - f64.const 8988465674311579538646525e283 + i32.const 2 + local.get $6 + local.get $8 f64.mul - local.set $0 + local.tee $3 + local.get $1 + f64.mul + local.get $5 + local.get $7 + f64.mul + local.tee $5 local.get $2 - i32.const 1023 - i32.sub - local.tee $2 - i32.const 1023 - i32.gt_s - if (result f64) - local.get $2 - i32.const 1023 - i32.sub - local.tee $2 - i32.const 1023 - local.get $2 - i32.const 1023 - i32.lt_s - select - local.set $2 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $3 + local.get $2 + f64.mul + local.get $5 + local.get $1 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + else + local.get $4 + i32.const 11808 + i32.eq + if local.get $0 - f64.const 8988465674311579538646525e283 + i32.const 0 + local.get $5 + local.get $8 f64.mul - else + local.tee $3 + local.get $2 + f64.mul + local.get $6 + local.get $7 + f64.mul + local.tee $9 + local.get $1 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set local.get $0 - end - else - local.get $2 - i32.const -1022 - i32.lt_s - if (result f64) + i32.const 1 + local.get $9 + local.get $2 + f64.mul + local.get $3 + local.get $1 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set local.get $0 - f64.const 2.004168360008973e-292 + i32.const 2 + local.get $6 + local.get $8 f64.mul - local.set $0 + local.tee $3 + local.get $1 + f64.mul + local.get $5 + local.get $7 + f64.mul + local.tee $5 local.get $2 - i32.const 969 - i32.add - local.tee $2 - i32.const -1022 - i32.lt_s - if (result f64) + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $3 + local.get $2 + f64.mul + local.get $5 + local.get $1 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + else + local.get $4 + i32.const 11840 + i32.eq + if + local.get $0 + i32.const 0 + local.get $5 + local.get $8 + f64.mul + local.tee $3 local.get $2 - i32.const 969 - i32.add - local.tee $2 - i32.const -1022 + f64.mul + local.get $6 + local.get $7 + f64.mul + local.tee $9 + local.get $1 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $9 local.get $2 - i32.const -1022 - i32.gt_s - select - local.set $2 + f64.mul + local.get $3 + local.get $1 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set local.get $0 - f64.const 2.004168360008973e-292 + i32.const 2 + local.get $6 + local.get $8 f64.mul - else + local.tee $3 + local.get $1 + f64.mul + local.get $5 + local.get $7 + f64.mul + local.tee $5 + local.get $2 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set local.get $0 + i32.const 3 + local.get $3 + local.get $2 + f64.mul + local.get $5 + local.get $1 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + else + local.get $4 + i32.const 11872 + i32.eq + if + local.get $0 + i32.const 0 + local.get $5 + local.get $8 + f64.mul + local.tee $3 + local.get $2 + f64.mul + local.get $6 + local.get $7 + f64.mul + local.tee $9 + local.get $1 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $9 + local.get $2 + f64.mul + local.get $3 + local.get $1 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $6 + local.get $8 + f64.mul + local.tee $3 + local.get $1 + f64.mul + local.get $5 + local.get $7 + f64.mul + local.tee $5 + local.get $2 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $3 + local.get $2 + f64.mul + local.get $5 + local.get $1 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + else + local.get $4 + i32.const 1088 + i32.eq + if + local.get $0 + i32.const 0 + local.get $5 + local.get $8 + f64.mul + local.tee $3 + local.get $2 + f64.mul + local.get $6 + local.get $7 + f64.mul + local.tee $9 + local.get $1 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $9 + local.get $2 + f64.mul + local.get $3 + local.get $1 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $6 + local.get $8 + f64.mul + local.tee $3 + local.get $1 + f64.mul + local.get $5 + local.get $7 + f64.mul + local.tee $5 + local.get $2 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $3 + local.get $2 + f64.mul + local.get $5 + local.get $1 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + else + global.get $~lib/memory/__stack_pointer + i32.const 11904 + i32.store + i32.const 11904 + local.get $4 + call $~lib/string/String.__concat + i32.const 11968 + i32.const 512 + i32.const 10 + call $~lib/builtins/abort + unreachable + end + end end - else - local.get $0 end end - local.get $2 - i64.extend_i32_s - i64.const 1023 - i64.add - i64.const 52 - i64.shl - f64.reinterpret_i64 - f64.mul - else - local.get $0 end + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 ) - (func $assembly/quat/exp (param $0 i32) (param $1 i32) (result i32) - (local $2 f64) - (local $3 f64) - (local $4 f64) - (local $5 f64) - (local $6 f64) + (func $assembly/quat2/str (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 128 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $1 + i64.const 0 + i64.store + local.get $1 + i64.const 0 + i64.store offset=8 + local.get $1 + i64.const 0 + i64.store offset=16 + local.get $1 + i64.const 0 + i64.store offset=24 + local.get $1 + i64.const 0 + i64.store offset=32 + local.get $1 + i64.const 0 + i64.store offset=40 + local.get $1 + i64.const 0 + i64.store offset=48 + local.get $1 + i64.const 0 + i64.store offset=56 + local.get $1 + i64.const 0 + i64.store offset=64 + local.get $1 + i64.const 0 + i64.store offset=72 + local.get $1 + i64.const 0 + i64.store offset=80 + local.get $1 + i64.const 0 + i64.store offset=88 local.get $1 + i64.const 0 + i64.store offset=96 + local.get $1 + i64.const 0 + i64.store offset=104 + local.get $1 + i64.const 0 + i64.store offset=112 + local.get $1 + i64.const 0 + i64.store offset=120 + local.get $1 + i32.const 12064 + i32.store offset=120 + local.get $0 i32.const 0 call $~lib/typedarray/Float64Array#__get - local.set $2 + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=124 + i32.const 12064 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.tee $2 + local.get $1 + i32.store offset=112 + local.get $2 + i32.const 5424 + i32.store offset=116 + local.get $1 + i32.const 5424 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer local.get $1 + i32.store offset=104 + local.get $0 i32.const 1 call $~lib/typedarray/Float64Array#__get - local.set $3 + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=108 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.tee $2 + local.get $1 + i32.store offset=96 + local.get $2 + i32.const 5424 + i32.store offset=100 + local.get $1 + i32.const 5424 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer local.get $1 + i32.store offset=88 + local.get $0 i32.const 2 call $~lib/typedarray/Float64Array#__get - local.set $4 + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=92 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.tee $2 + local.get $1 + i32.store offset=80 + local.get $2 + i32.const 5424 + i32.store offset=84 + local.get $1 + i32.const 5424 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer local.get $1 + i32.store offset=72 + local.get $0 i32.const 3 call $~lib/typedarray/Float64Array#__get - call $~lib/math/NativeMath.exp - local.set $5 - local.get $0 - i32.const 0 - local.get $2 + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer local.get $2 + i32.store offset=76 + local.get $1 local.get $2 - f64.mul - local.get $3 - local.get $3 - f64.mul - f64.add - local.get $4 - local.get $4 - f64.mul - f64.add - f64.sqrt + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer local.tee $2 - f64.const 0 - f64.gt - if (result f64) - local.get $5 - local.get $2 - call $~lib/math/NativeMath.sin - f64.mul - local.get $2 - f64.div - else - f64.const 0 - end - local.tee $6 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - local.get $3 - local.get $6 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - local.get $4 - local.get $6 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - local.get $5 + local.get $1 + i32.store offset=64 local.get $2 - call $~lib/math/NativeMath.cos - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - ) - (func $~lib/math/NativeMath.atan (param $0 f64) (result f64) - (local $1 f64) - (local $2 f64) - (local $3 i32) - (local $4 i32) - (local $5 f64) - local.get $0 + i32.const 5424 + i32.store offset=68 + local.get $1 + i32.const 5424 + call $~lib/string/String.__concat local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=56 local.get $0 - i64.reinterpret_f64 - i64.const 32 - i64.shr_u - i32.wrap_i64 - i32.const 2147483647 - i32.and - local.tee $3 - i32.const 1141899264 - i32.ge_u - if - local.get $0 - local.get $0 - f64.ne - if - local.get $0 - return - end - f64.const 1.5707963267948966 - local.get $1 - f64.copysign - return - end - local.get $3 - i32.const 1071382528 - i32.lt_u - if - local.get $3 - i32.const 1044381696 - i32.lt_u - if - local.get $0 - return - end - i32.const -1 - local.set $4 - else - local.get $0 - f64.abs - local.set $0 - local.get $3 - i32.const 1072889856 - i32.lt_u - if (result f64) - local.get $3 - i32.const 1072037888 - i32.lt_u - if (result f64) - local.get $0 - local.get $0 - f64.add - f64.const 1 - f64.sub - local.get $0 - f64.const 2 - f64.add - f64.div - else - i32.const 1 - local.set $4 - local.get $0 - f64.const 1 - f64.sub - local.get $0 - f64.const 1 - f64.add - f64.div - end - else - local.get $3 - i32.const 1073971200 - i32.lt_u - if (result f64) - i32.const 2 - local.set $4 - local.get $0 - f64.const 1.5 - f64.sub - local.get $0 - f64.const 1.5 - f64.mul - f64.const 1 - f64.add - f64.div - else - i32.const 3 - local.set $4 - f64.const -1 - local.get $0 - f64.div - end - end - local.set $0 - end - local.get $0 - local.get $0 - f64.mul - local.tee $5 - local.get $5 - f64.mul - local.set $2 - local.get $0 - local.get $5 - local.get $2 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer local.get $2 + i32.store offset=60 + local.get $1 local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.tee $2 + local.get $1 + i32.store offset=48 local.get $2 + i32.const 5424 + i32.store offset=52 + local.get $1 + i32.const 5424 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=40 + local.get $0 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer local.get $2 - f64.const 0.016285820115365782 - f64.mul - f64.const 0.049768779946159324 - f64.add - f64.mul - f64.const 0.06661073137387531 - f64.add - f64.mul - f64.const 0.09090887133436507 - f64.add - f64.mul - f64.const 0.14285714272503466 - f64.add - f64.mul - f64.const 0.3333333333333293 - f64.add - f64.mul + i32.store offset=44 + local.get $1 local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.tee $2 + local.get $1 + i32.store offset=32 local.get $2 + i32.const 5424 + i32.store offset=36 + local.get $1 + i32.const 5424 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=24 + local.get $0 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer local.get $2 + i32.store offset=28 + local.get $1 local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.tee $2 + local.get $1 + i32.store offset=16 local.get $2 - f64.const -0.036531572744216916 - f64.mul - f64.const -0.058335701337905735 - f64.add - f64.mul - f64.const -0.0769187620504483 - f64.add - f64.mul - f64.const -0.11111110405462356 - f64.add - f64.mul - f64.const -0.19999999999876483 - f64.add - f64.mul - f64.add - f64.mul - local.set $2 - local.get $4 - i32.const 0 - i32.lt_s - if - local.get $0 - local.get $2 - f64.sub - return - end - block $break|0 - block $case4|0 - block $case3|0 - block $case2|0 - block $case1|0 - block $case0|0 - local.get $4 - br_table $case0|0 $case1|0 $case2|0 $case3|0 $case4|0 - end - f64.const 0.4636476090008061 - local.get $2 - f64.const 2.2698777452961687e-17 - f64.sub - local.get $0 - f64.sub - f64.sub - local.set $0 - br $break|0 - end - f64.const 0.7853981633974483 - local.get $2 - f64.const 3.061616997868383e-17 - f64.sub - local.get $0 - f64.sub - f64.sub - local.set $0 - br $break|0 - end - f64.const 0.982793723247329 - local.get $2 - f64.const 1.3903311031230998e-17 - f64.sub - local.get $0 - f64.sub - f64.sub - local.set $0 - br $break|0 - end - f64.const 1.5707963267948966 - local.get $2 - f64.const 6.123233995736766e-17 - f64.sub - local.get $0 - f64.sub - f64.sub - local.set $0 - br $break|0 - end - unreachable - end - local.get $0 + i32.const 5424 + i32.store offset=20 local.get $1 - f64.copysign - ) - (func $~lib/math/NativeMath.atan2 (param $0 f64) (param $1 f64) (result f64) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i64) - (local $7 i32) - i32.const 1 + i32.const 5424 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=8 local.get $0 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $0 + global.get $~lib/memory/__stack_pointer local.get $0 - f64.ne - local.get $1 + i32.store offset=12 local.get $1 - f64.ne - select - if - local.get $1 - local.get $0 - f64.add - return - end local.get $0 - i64.reinterpret_f64 - local.tee $6 - i64.const 32 - i64.shr_u - i32.wrap_i64 - local.set $4 - local.get $6 - i32.wrap_i64 - local.set $3 + call $~lib/string/String.__concat + local.set $0 + global.get $~lib/memory/__stack_pointer + local.tee $1 + local.get $0 + i32.store local.get $1 - i64.reinterpret_f64 - local.tee $6 - i32.wrap_i64 - local.tee $7 - local.get $6 - i64.const 32 - i64.shr_u - i32.wrap_i64 - local.tee $5 - i32.const 1072693248 + i32.const 5456 + i32.store offset=4 + local.get $0 + i32.const 5456 + call $~lib/string/String.__concat + global.get $~lib/memory/__stack_pointer + i32.const 128 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $~lib/typedarray/Float64Array#constructor (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 i32.sub - i32.or - i32.eqz - if - local.get $0 - call $~lib/math/NativeMath.atan - return - end - local.get $5 - i32.const 30 - i32.shr_u - i32.const 2 - i32.and - local.get $4 - i32.const 31 - i32.shr_u - i32.or - local.set $2 - local.get $5 - i32.const 2147483647 - i32.and - local.set $5 - local.get $4 - i32.const 2147483647 - i32.and - local.tee $4 - local.get $3 - i32.or - i32.eqz - if - block $break|0 - block $case3|0 - block $case2|0 - block $case0|0 - local.get $2 - i32.eqz - br_if $case0|0 - block $tablify|0 - local.get $2 - i32.const 1 - i32.sub - br_table $case0|0 $case2|0 $case3|0 $tablify|0 - end - br $break|0 - end - local.get $0 - return - end - f64.const 3.141592653589793 - return - end - f64.const -3.141592653589793 - return - end - end + global.set $~lib/memory/__stack_pointer block $folding-inner0 - local.get $5 - local.get $7 - i32.or - i32.eqz + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s br_if $folding-inner0 - local.get $5 - i32.const 2146435072 - i32.eq + global.get $~lib/memory/__stack_pointer + local.tee $1 + i32.const 0 + i32.store + local.get $1 + i32.const 12 + i32.const 4 + call $~lib/rt/itcms/__new + local.tee $1 + i32.store + global.get $~lib/memory/__stack_pointer + local.tee $3 + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + local.get $1 + i32.eqz if - f64.const 2.356194490192345 - f64.const 0.7853981633974483 - local.get $2 - i32.const 2 - i32.and - select - f64.const 3.141592653589793 - f64.const 0 - local.get $2 + global.get $~lib/memory/__stack_pointer + i32.const 12 i32.const 2 - i32.and - select - local.get $4 - i32.const 2146435072 - i32.eq - select - local.tee $0 - f64.neg - local.get $0 - local.get $2 - i32.const 1 - i32.and - select - return + call $~lib/rt/itcms/__new + local.tee $1 + i32.store end - i32.const 1 - local.get $4 - i32.const 2146435072 - i32.eq - local.get $4 - local.get $5 - i32.const 67108864 - i32.add - i32.gt_u - select - br_if $folding-inner0 - local.get $5 - local.get $4 - i32.const 67108864 - i32.add - i32.gt_u + local.get $1 i32.const 0 - local.get $2 - i32.const 2 - i32.and - select - if (result f64) - f64.const 0 - else - local.get $0 - local.get $1 - f64.div - f64.abs - call $~lib/math/NativeMath.atan - end - local.set $0 - block $break|1 - block $case3|1 - block $case2|1 - block $case1|1 - local.get $2 - local.tee $3 - if - local.get $3 - i32.const 1 - i32.sub - br_table $case1|1 $case2|1 $case3|1 $break|1 - end - local.get $0 - return - end - local.get $0 - f64.neg - return - end - f64.const 3.141592653589793 - local.get $0 - f64.const 1.2246467991473532e-16 - f64.sub - f64.sub - return - end - local.get $0 - f64.const 1.2246467991473532e-16 - f64.sub - f64.const 3.141592653589793 - f64.sub - return - end - unreachable - end - f64.const -1.5707963267948966 - f64.const 1.5707963267948966 - local.get $2 - i32.const 1 - i32.and - select - ) - (func $~lib/math/NativeMath.log (param $0 f64) (result f64) - (local $1 i32) - (local $2 i64) - (local $3 f64) - (local $4 f64) - (local $5 i32) - i32.const 1 - local.get $0 - i64.reinterpret_f64 - local.tee $2 - i64.const 32 - i64.shr_u - i32.wrap_i64 - local.tee $1 - i32.const 31 - i32.shr_u - local.get $1 - i32.const 1048576 - i32.lt_u - select - if - local.get $2 - i64.const 1 - i64.shl - i64.eqz - if - f64.const -1 - local.get $0 - local.get $0 - f64.mul - f64.div - return - end + i32.store local.get $1 - i32.const 31 - i32.shr_u + i32.const 0 + i32.const 0 + call $~lib/rt/itcms/__link + local.get $1 + i32.const 0 + i32.store offset=4 + local.get $1 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 134217727 + i32.gt_u if - local.get $0 - local.get $0 - f64.sub - f64.const 0 - f64.div - return + i32.const 1536 + i32.const 1584 + i32.const 18 + i32.const 57 + call $~lib/builtins/abort + unreachable end - i32.const -54 - local.set $5 + global.get $~lib/memory/__stack_pointer local.get $0 - f64.const 18014398509481984 - f64.mul - i64.reinterpret_f64 + i32.const 3 + i32.shl + local.tee $0 + i32.const 0 + call $~lib/rt/itcms/__new local.tee $2 - i64.const 32 - i64.shr_u - i32.wrap_i64 - local.set $1 - else + i32.store offset=4 + local.get $2 + local.get $0 + call $~lib/memory/memory.fill local.get $1 - i32.const 2146435072 - i32.ge_u - if - local.get $0 - return - else - local.get $2 - i64.const 32 - i64.shl - i64.eqz - i32.const 0 - local.get $1 - i32.const 1072693248 - i32.eq - select - if - f64.const 0 - return - end - end - end - local.get $2 - i64.const 4294967295 - i64.and - local.get $1 - i32.const 614242 - i32.add - local.tee $1 - i32.const 1048575 - i32.and - i32.const 1072079006 - i32.add - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - f64.reinterpret_i64 - f64.const 1 - f64.sub - local.tee $3 - local.get $3 - f64.const 2 - f64.add - f64.div - local.tee $4 - local.get $4 - f64.mul - local.set $0 - local.get $4 - local.get $3 - f64.const 0.5 - f64.mul - local.get $3 - f64.mul - local.tee $4 + local.get $2 + i32.store + local.get $1 + local.get $2 + i32.const 0 + call $~lib/rt/itcms/__link + local.get $1 + local.get $2 + i32.store offset=4 + local.get $1 + local.get $0 + i32.store offset=8 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + local.get $1 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + return + end + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + ) + (func $assembly/vec3/create (result i32) + (local $0 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $0 + i32.const 0 + i32.store + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + local.tee $0 + i32.store local.get $0 + i32.const 0 + f64.const 0 + call $~lib/typedarray/Float64Array#__set local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set local.get $0 - f64.mul + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $assembly/vec4/create (result i32) + (local $0 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer local.tee $0 + i32.const 0 + i32.store local.get $0 + i32.const 4 + call $~lib/typedarray/Float64Array#constructor + local.tee $0 + i32.store local.get $0 - f64.const 0.14798198605116586 - f64.mul - f64.const 0.1818357216161805 - f64.add - f64.mul - f64.const 0.2857142874366239 - f64.add - f64.mul - f64.const 0.6666666666666735 - f64.add - f64.mul + i32.const 0 + f64.const 0 + call $~lib/typedarray/Float64Array#__set local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set local.get $0 - f64.const 0.15313837699209373 - f64.mul - f64.const 0.22222198432149784 - f64.add - f64.mul - f64.const 0.3999999999940942 - f64.add - f64.mul - f64.add - f64.add - f64.mul - local.get $5 - local.get $1 - i32.const 20 - i32.shr_s - i32.const 1023 - i32.sub + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 i32.add - f64.convert_i32_s - local.tee $0 - f64.const 1.9082149292705877e-10 - f64.mul - f64.add - local.get $4 - f64.sub - local.get $3 - f64.add + global.set $~lib/memory/__stack_pointer local.get $0 - f64.const 0.6931471803691238 - f64.mul - f64.add ) - (func $assembly/quat/ln (param $0 i32) (param $1 i32) (result i32) - (local $2 f64) - (local $3 f64) - (local $4 f64) - (local $5 f64) - (local $6 f64) + (func $assembly/vec4/clone (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $1 + i32.const 0 + i32.store + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#constructor + local.tee $1 + i32.store local.get $1 i32.const 0 + local.get $0 + i32.const 0 call $~lib/typedarray/Float64Array#__get - local.set $2 + call $~lib/typedarray/Float64Array#__set local.get $1 i32.const 1 + local.get $0 + i32.const 1 call $~lib/typedarray/Float64Array#__get - local.set $3 + call $~lib/typedarray/Float64Array#__set local.get $1 i32.const 2 + local.get $0 + i32.const 2 call $~lib/typedarray/Float64Array#__get - local.set $4 + call $~lib/typedarray/Float64Array#__set local.get $1 i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.set $6 local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $assembly/vec4/fromValues (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) + (local $4 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $4 i32.const 0 - local.get $2 - local.get $2 - local.get $2 - f64.mul - local.get $3 - local.get $3 - f64.mul - f64.add + i32.store local.get $4 + i32.const 4 + call $~lib/typedarray/Float64Array#constructor + local.tee $4 + i32.store local.get $4 - f64.mul - f64.add - f64.sqrt - local.tee $5 - f64.const 0 - f64.gt - if (result f64) - local.get $5 - local.get $6 - call $~lib/math/NativeMath.atan2 - local.get $5 - f64.div - else - f64.const 0 - end - local.tee $5 - f64.mul - call $~lib/typedarray/Float64Array#__set + i32.const 0 local.get $0 + call $~lib/typedarray/Float64Array#__set + local.get $4 i32.const 1 - local.get $3 - local.get $5 - f64.mul + local.get $1 call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 local.get $4 - local.get $5 - f64.mul + i32.const 2 + local.get $2 call $~lib/typedarray/Float64Array#__set - local.get $0 + local.get $4 i32.const 3 - local.get $2 - local.get $2 - f64.mul - local.get $3 local.get $3 - f64.mul - f64.add - local.get $4 - local.get $4 - f64.mul - f64.add - local.get $6 - local.get $6 - f64.mul - f64.add - call $~lib/math/NativeMath.log - f64.const 0.5 - f64.mul call $~lib/typedarray/Float64Array#__set - local.get $0 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $4 ) - (func $assembly/quat2/fromRotationTranslation (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 f64) - (local $4 f64) - (local $5 f64) - (local $6 f64) - (local $7 f64) - (local $8 f64) - (local $9 f64) - local.get $2 + (func $assembly/vec3/fromValues (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $3 i32.const 0 - call $~lib/typedarray/Float64Array#__get - f64.const 0.5 - f64.mul - local.set $3 - local.get $2 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - f64.const 0.5 - f64.mul - local.set $4 - local.get $2 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - f64.const 0.5 - f64.mul - local.set $5 - local.get $1 + i32.store + local.get $3 + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + local.tee $3 + i32.store + local.get $3 i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.set $6 - local.get $1 + local.get $0 + call $~lib/typedarray/Float64Array#__set + local.get $3 i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.set $7 local.get $1 + call $~lib/typedarray/Float64Array#__set + local.get $3 i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.set $8 - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.set $9 + local.get $2 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $assembly/quat/create (result i32) + (local $0 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $0 + i32.const 0 + i32.store + local.get $0 + i32.const 4 + call $~lib/typedarray/Float64Array#constructor + local.tee $0 + i32.store local.get $0 i32.const 0 - local.get $6 + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 - local.get $7 + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 - local.get $8 + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 3 - local.get $9 + f64.const 1 call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer local.get $0 + ) + (func $assembly/mat3/create (result i32) + (local $0 i32) + global.get $~lib/memory/__stack_pointer i32.const 4 - local.get $3 - local.get $9 - f64.mul - local.get $4 - local.get $8 - f64.mul - f64.add - local.get $5 - local.get $7 - f64.mul - f64.sub + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $0 + i32.const 0 + i32.store + local.get $0 + i32.const 9 + call $~lib/typedarray/Float64Array#constructor + local.tee $0 + i32.store + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 5 - local.get $4 - local.get $9 - f64.mul - local.get $5 - local.get $6 - f64.mul - f64.add - local.get $3 - local.get $8 - f64.mul - f64.sub + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 0 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $assembly/vec2/create (result i32) + (local $0 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $0 + i32.const 0 + i32.store + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#constructor + local.tee $0 + i32.store + local.get $0 + i32.const 0 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $assembly/mat2/create (result i32) + (local $0 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $0 + i32.const 0 + i32.store + local.get $0 + i32.const 4 + call $~lib/typedarray/Float64Array#constructor + local.tee $0 + i32.store + local.get $0 + i32.const 1 + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 6 - local.get $5 - local.get $9 - f64.mul - local.get $3 - local.get $7 - f64.mul - f64.add - local.get $4 - local.get $6 - f64.mul - f64.sub + i32.const 2 + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 7 - local.get $3 - f64.neg - local.get $6 - f64.mul - local.get $4 - local.get $7 - f64.mul - f64.sub - local.get $5 - local.get $8 - f64.mul - f64.sub + i32.const 0 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 1 call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $assembly/quat2/copy (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/__newArray (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $5 + i32.const 0 + i32.store local.get $0 + local.get $1 + i32.shl + local.tee $4 + local.set $6 + local.get $4 + i32.const 0 + call $~lib/rt/itcms/__new + local.set $1 + local.get $3 + if + local.get $1 + local.get $3 + local.get $6 + call $~lib/memory/memory.copy + end + local.get $5 + local.get $1 + i32.store + i32.const 16 + local.get $2 + call $~lib/rt/itcms/__new + local.tee $2 + local.get $1 + i32.store + local.get $2 + local.get $1 i32.const 0 + call $~lib/rt/itcms/__link + local.get $2 local.get $1 + i32.store offset=4 + local.get $2 + local.get $4 + i32.store offset=8 + local.get $2 + local.get $0 + i32.store offset=12 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $assembly/mat2d/create (result i32) + (local $0 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $0 i32.const 0 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set + i32.store + local.get $0 + i32.const 6 + call $~lib/typedarray/Float64Array#constructor + local.tee $0 + i32.store local.get $0 i32.const 1 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 4 - local.get $1 - i32.const 4 - call $~lib/typedarray/Float64Array#__get + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 5 - local.get $1 - i32.const 5 - call $~lib/typedarray/Float64Array#__get + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 6 - local.get $1 - i32.const 6 - call $~lib/typedarray/Float64Array#__get + i32.const 0 + f64.const 1 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 7 - local.get $1 - i32.const 7 - call $~lib/typedarray/Float64Array#__get + i32.const 3 + f64.const 1 call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $assembly/quat2/getTranslation (param $0 i32) (param $1 i32) (result i32) - (local $2 f64) - (local $3 f64) - (local $4 f64) - (local $5 f64) - (local $6 f64) - (local $7 f64) - (local $8 f64) - (local $9 f64) - (local $10 f64) - local.get $1 + (func $assembly/mat2d/fromValues (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (result i32) + (local $6 i32) + global.get $~lib/memory/__stack_pointer i32.const 4 - call $~lib/typedarray/Float64Array#__get - local.set $2 - local.get $1 - i32.const 5 - call $~lib/typedarray/Float64Array#__get - local.set $3 - local.get $1 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $6 + i32.const 0 + i32.store + local.get $6 i32.const 6 - call $~lib/typedarray/Float64Array#__get - local.set $4 - local.get $1 - i32.const 7 - call $~lib/typedarray/Float64Array#__get - local.set $5 - local.get $1 + call $~lib/typedarray/Float64Array#constructor + local.tee $6 + i32.store + local.get $6 i32.const 0 - call $~lib/typedarray/Float64Array#__get - f64.neg - local.set $6 - local.get $1 + local.get $0 + call $~lib/typedarray/Float64Array#__set + local.get $6 i32.const 1 - call $~lib/typedarray/Float64Array#__get - f64.neg - local.set $7 local.get $1 + call $~lib/typedarray/Float64Array#__set + local.get $6 i32.const 2 - call $~lib/typedarray/Float64Array#__get - f64.neg - local.set $8 - local.get $0 - i32.const 0 local.get $2 - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.tee $10 - f64.mul - local.get $5 + call $~lib/typedarray/Float64Array#__set local.get $6 - f64.mul - f64.add + i32.const 3 local.get $3 - local.get $8 - f64.mul - f64.add - local.get $4 - local.get $7 - f64.mul - f64.sub - local.tee $9 - local.get $9 - f64.add call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - local.get $3 - local.get $10 - f64.mul - local.get $5 - local.get $7 - f64.mul - f64.add - local.get $4 local.get $6 - f64.mul - f64.add - local.get $2 - local.get $8 - f64.mul - f64.sub - local.tee $9 - local.get $9 - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 + i32.const 4 local.get $4 - local.get $10 - f64.mul - local.get $5 - local.get $8 - f64.mul - f64.add - local.get $2 - local.get $7 - f64.mul - f64.add - local.get $3 + call $~lib/typedarray/Float64Array#__set local.get $6 - f64.mul - f64.sub - local.tee $2 - local.get $2 - f64.add + i32.const 5 + local.get $5 call $~lib/typedarray/Float64Array#__set - local.get $0 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $6 ) - (func $assembly/quat2/translate (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 f64) - (local $4 f64) - (local $5 f64) - (local $6 f64) - (local $7 f64) - (local $8 f64) - (local $9 f64) - (local $10 f64) - (local $11 f64) - (local $12 f64) - (local $13 f64) - local.get $1 + (func $assembly/mat3/fromValues (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (param $7 f64) (param $8 f64) (result i32) + (local $9 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $9 i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.set $3 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.set $4 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.set $5 - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.set $6 - local.get $2 + i32.store + local.get $9 + i32.const 9 + call $~lib/typedarray/Float64Array#constructor + local.tee $9 + i32.store + local.get $9 i32.const 0 - call $~lib/typedarray/Float64Array#__get - f64.const 0.5 - f64.mul - local.set $7 - local.get $2 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - f64.const 0.5 - f64.mul - local.set $8 - local.get $2 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - f64.const 0.5 - f64.mul - local.set $9 - local.get $1 - i32.const 4 - call $~lib/typedarray/Float64Array#__get - local.set $10 - local.get $1 - i32.const 5 - call $~lib/typedarray/Float64Array#__get - local.set $11 - local.get $1 - i32.const 6 - call $~lib/typedarray/Float64Array#__get - local.set $12 - local.get $1 - i32.const 7 - call $~lib/typedarray/Float64Array#__get - local.set $13 local.get $0 - i32.const 0 - local.get $3 call $~lib/typedarray/Float64Array#__set - local.get $0 + local.get $9 i32.const 1 - local.get $4 + local.get $1 call $~lib/typedarray/Float64Array#__set - local.get $0 + local.get $9 i32.const 2 - local.get $5 + local.get $2 call $~lib/typedarray/Float64Array#__set - local.get $0 + local.get $9 i32.const 3 - local.get $6 + local.get $3 call $~lib/typedarray/Float64Array#__set - local.get $0 + local.get $9 i32.const 4 - local.get $6 - local.get $7 - f64.mul local.get $4 - local.get $9 - f64.mul - f64.add - local.get $5 - local.get $8 - f64.mul - f64.sub - local.get $10 - f64.add call $~lib/typedarray/Float64Array#__set - local.get $0 + local.get $9 i32.const 5 - local.get $6 - local.get $8 - f64.mul local.get $5 - local.get $7 - f64.mul - f64.add - local.get $3 - local.get $9 - f64.mul - f64.sub - local.get $11 - f64.add call $~lib/typedarray/Float64Array#__set - local.get $0 + local.get $9 i32.const 6 local.get $6 - local.get $9 - f64.mul - local.get $3 - local.get $8 - f64.mul - f64.add - local.get $4 - local.get $7 - f64.mul - f64.sub - local.get $12 - f64.add call $~lib/typedarray/Float64Array#__set - local.get $0 + local.get $9 i32.const 7 - local.get $3 - f64.neg local.get $7 - f64.mul - local.get $4 - local.get $8 - f64.mul - f64.sub - local.get $5 + call $~lib/typedarray/Float64Array#__set local.get $9 - f64.mul - f64.sub - local.get $13 - f64.add + i32.const 8 + local.get $8 call $~lib/typedarray/Float64Array#__set - local.get $0 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $9 ) - (func $assembly/quat2/rotateX (param $0 i32) (param $1 i32) (param $2 f64) (result i32) - (local $3 f64) - (local $4 f64) - (local $5 f64) - (local $6 f64) - (local $7 f64) - (local $8 f64) - (local $9 f64) - (local $10 f64) - (local $11 f64) - (local $12 f64) - (local $13 f64) - (local $14 f64) - (local $15 f64) - (local $16 f64) - local.get $1 + (func $assembly/mat4/create (result i32) + (local $0 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $0 i32.const 0 - call $~lib/typedarray/Float64Array#__get - f64.neg - local.set $3 - local.get $1 + i32.store + local.get $0 + i32.const 16 + call $~lib/typedarray/Float64Array#constructor + local.tee $0 + i32.store + local.get $0 i32.const 1 - call $~lib/typedarray/Float64Array#__get - f64.neg - local.set $4 - local.get $1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 i32.const 2 - call $~lib/typedarray/Float64Array#__get - f64.neg - local.set $5 - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.set $6 - local.get $1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 i32.const 4 - call $~lib/typedarray/Float64Array#__get - local.set $7 - local.get $1 - i32.const 5 - call $~lib/typedarray/Float64Array#__get - local.set $8 - local.get $1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 i32.const 6 - call $~lib/typedarray/Float64Array#__get - local.set $9 - local.get $1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 i32.const 7 - call $~lib/typedarray/Float64Array#__get - local.set $10 + f64.const 0 + call $~lib/typedarray/Float64Array#__set local.get $0 - local.get $1 - local.get $2 - call $assembly/quat/rotateX - drop + i32.const 8 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + f64.const 0 + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.set $2 + f64.const 1 + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.set $11 + i32.const 5 + f64.const 1 + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.set $12 + i32.const 10 + f64.const 1 + call $~lib/typedarray/Float64Array#__set local.get $0 + i32.const 15 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer i32.const 4 - local.get $7 - local.get $6 - f64.mul - local.get $10 - local.get $3 - f64.mul - f64.add - local.get $8 - local.get $5 - f64.mul - f64.add - local.get $9 - local.get $4 - f64.mul - f64.sub - local.tee $13 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $assembly/mat4/fromValues (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (param $7 f64) (param $8 f64) (param $9 f64) (param $10 f64) (param $11 f64) (param $12 f64) (param $13 f64) (param $14 f64) (param $15 f64) (result i32) + (local $16 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $16 + i32.const 0 + i32.store + local.get $16 + i32.const 16 + call $~lib/typedarray/Float64Array#constructor + local.tee $16 + i32.store + local.get $16 + i32.const 0 local.get $0 + call $~lib/typedarray/Float64Array#__set + local.get $16 + i32.const 1 + local.get $1 + call $~lib/typedarray/Float64Array#__set + local.get $16 + i32.const 2 + local.get $2 + call $~lib/typedarray/Float64Array#__set + local.get $16 i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.tee $14 - f64.mul - local.get $10 - local.get $6 - f64.mul - local.get $7 local.get $3 - f64.mul - f64.sub - local.get $8 + call $~lib/typedarray/Float64Array#__set + local.get $16 + i32.const 4 local.get $4 - f64.mul - f64.sub - local.get $9 + call $~lib/typedarray/Float64Array#__set + local.get $16 + i32.const 5 local.get $5 - f64.mul - f64.sub - local.tee $15 - local.get $2 - f64.mul - f64.add - local.get $8 + call $~lib/typedarray/Float64Array#__set + local.get $16 + i32.const 6 local.get $6 - f64.mul - local.get $10 - local.get $4 - f64.mul - f64.add - local.get $9 - local.get $3 - f64.mul - f64.add + call $~lib/typedarray/Float64Array#__set + local.get $16 + i32.const 7 local.get $7 - local.get $5 - f64.mul - f64.sub - local.tee $16 - local.get $12 - f64.mul - f64.add + call $~lib/typedarray/Float64Array#__set + local.get $16 + i32.const 8 + local.get $8 + call $~lib/typedarray/Float64Array#__set + local.get $16 + i32.const 9 local.get $9 - local.get $6 - f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $16 + i32.const 10 local.get $10 - local.get $5 - f64.mul - f64.add - local.get $7 - local.get $4 - f64.mul - f64.add - local.get $8 - local.get $3 - f64.mul - f64.sub - local.tee $3 - local.get $11 - f64.mul - f64.sub call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 5 local.get $16 - local.get $14 - f64.mul - local.get $15 + i32.const 11 local.get $11 - f64.mul - f64.add - local.get $3 - local.get $2 - f64.mul - f64.add - local.get $13 - local.get $12 - f64.mul - f64.sub call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 6 - local.get $3 - local.get $14 - f64.mul - local.get $15 + local.get $16 + i32.const 12 local.get $12 - f64.mul - f64.add - local.get $13 - local.get $11 - f64.mul - f64.add + call $~lib/typedarray/Float64Array#__set local.get $16 - local.get $2 - f64.mul - f64.sub + i32.const 13 + local.get $13 call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 7 - local.get $15 + local.get $16 + i32.const 14 local.get $14 - f64.mul - local.get $13 - local.get $2 - f64.mul - f64.sub + call $~lib/typedarray/Float64Array#__set local.get $16 - local.get $11 - f64.mul - f64.sub - local.get $3 - local.get $12 - f64.mul - f64.sub + i32.const 15 + local.get $15 call $~lib/typedarray/Float64Array#__set - local.get $0 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $16 ) - (func $assembly/quat2/rotateY (param $0 i32) (param $1 i32) (param $2 f64) (result i32) - (local $3 f64) + (func $assembly/mat4/fromQuat2 (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 i32) (local $4 f64) (local $5 f64) (local $6 f64) @@ -19226,15 +19677,35 @@ (local $10 f64) (local $11 f64) (local $12 f64) - (local $13 f64) - (local $14 f64) - (local $15 f64) - (local $16 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $3 + i32.const 0 + i32.store + local.get $3 + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + local.tee $3 + i32.store local.get $1 i32.const 0 call $~lib/typedarray/Float64Array#__get f64.neg - local.set $3 + local.set $2 local.get $1 i32.const 1 call $~lib/typedarray/Float64Array#__get @@ -19252,177 +19723,188 @@ local.get $1 i32.const 4 call $~lib/typedarray/Float64Array#__get - local.set $7 - local.get $1 - i32.const 5 - call $~lib/typedarray/Float64Array#__get local.set $8 local.get $1 - i32.const 6 + i32.const 5 call $~lib/typedarray/Float64Array#__get local.set $9 local.get $1 - i32.const 7 + i32.const 6 call $~lib/typedarray/Float64Array#__get local.set $10 - local.get $0 local.get $1 - local.get $2 - call $assembly/quat/rotateY - drop - local.get $0 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.set $2 - local.get $0 - i32.const 1 + i32.const 7 call $~lib/typedarray/Float64Array#__get local.set $11 - local.get $0 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.set $12 - local.get $0 - i32.const 4 - local.get $7 - local.get $6 - f64.mul - local.get $10 - local.get $3 - f64.mul - f64.add - local.get $8 - local.get $5 - f64.mul - f64.add - local.get $9 - local.get $4 - f64.mul - f64.sub - local.tee $13 - local.get $0 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.tee $14 - f64.mul - local.get $10 - local.get $6 - f64.mul - local.get $7 - local.get $3 - f64.mul - f64.sub - local.get $8 - local.get $4 - f64.mul - f64.sub - local.get $9 - local.get $5 - f64.mul - f64.sub - local.tee $15 + local.get $2 local.get $2 f64.mul - f64.add - local.get $8 - local.get $6 - f64.mul - local.get $10 + local.get $4 local.get $4 f64.mul f64.add - local.get $9 - local.get $3 - f64.mul - f64.add - local.get $7 local.get $5 - f64.mul - f64.sub - local.tee $16 - local.get $12 - f64.mul - f64.add - local.get $9 - local.get $6 - f64.mul - local.get $10 local.get $5 f64.mul f64.add - local.get $7 - local.get $4 - f64.mul - f64.add - local.get $8 - local.get $3 - f64.mul - f64.sub - local.tee $3 - local.get $11 - f64.mul - f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 5 - local.get $16 - local.get $14 - f64.mul - local.get $15 - local.get $11 - f64.mul - f64.add - local.get $3 - local.get $2 - f64.mul - f64.add - local.get $13 - local.get $12 - f64.mul - f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 6 - local.get $3 - local.get $14 - f64.mul - local.get $15 - local.get $12 - f64.mul - f64.add - local.get $13 - local.get $11 + local.get $6 + local.get $6 f64.mul f64.add - local.get $16 - local.get $2 - f64.mul - f64.sub - call $~lib/typedarray/Float64Array#__set + local.tee $7 + f64.const 0 + f64.gt + if + local.get $3 + i32.const 0 + local.get $8 + local.get $6 + f64.mul + local.get $11 + local.get $2 + f64.mul + f64.add + local.get $9 + local.get $5 + f64.mul + f64.add + local.get $10 + local.get $4 + f64.mul + f64.sub + local.tee $12 + local.get $12 + f64.add + local.get $7 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $3 + i32.const 1 + local.get $9 + local.get $6 + f64.mul + local.get $11 + local.get $4 + f64.mul + f64.add + local.get $10 + local.get $2 + f64.mul + f64.add + local.get $8 + local.get $5 + f64.mul + f64.sub + local.tee $12 + local.get $12 + f64.add + local.get $7 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $3 + i32.const 2 + local.get $10 + local.get $6 + f64.mul + local.get $11 + local.get $5 + f64.mul + f64.add + local.get $8 + local.get $4 + f64.mul + f64.add + local.get $9 + local.get $2 + f64.mul + f64.sub + local.tee $2 + local.get $2 + f64.add + local.get $7 + f64.div + call $~lib/typedarray/Float64Array#__set + else + local.get $3 + i32.const 0 + local.get $8 + local.get $6 + f64.mul + local.get $11 + local.get $2 + f64.mul + f64.add + local.get $9 + local.get $5 + f64.mul + f64.add + local.get $10 + local.get $4 + f64.mul + f64.sub + local.tee $7 + local.get $7 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $3 + i32.const 1 + local.get $9 + local.get $6 + f64.mul + local.get $11 + local.get $4 + f64.mul + f64.add + local.get $10 + local.get $2 + f64.mul + f64.add + local.get $8 + local.get $5 + f64.mul + f64.sub + local.tee $7 + local.get $7 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $3 + i32.const 2 + local.get $10 + local.get $6 + f64.mul + local.get $11 + local.get $5 + f64.mul + f64.add + local.get $8 + local.get $4 + f64.mul + f64.add + local.get $9 + local.get $2 + f64.mul + f64.sub + local.tee $2 + local.get $2 + f64.add + call $~lib/typedarray/Float64Array#__set + end local.get $0 - i32.const 7 - local.get $15 - local.get $14 - f64.mul - local.get $13 - local.get $2 - f64.mul - f64.sub - local.get $16 - local.get $11 - f64.mul - f64.sub + local.get $1 local.get $3 - local.get $12 - f64.mul - f64.sub - call $~lib/typedarray/Float64Array#__set + call $assembly/mat4/fromRotationTranslation + drop + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $assembly/quat2/rotateZ (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (func $assembly/mat4/getRotation (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) (local $3 f64) (local $4 f64) - (local $5 f64) + (local $5 i32) (local $6 f64) (local $7 f64) (local $8 f64) @@ -19430,3111 +19912,2390 @@ (local $10 f64) (local $11 f64) (local $12 f64) - (local $13 f64) - (local $14 f64) - (local $15 f64) - (local $16 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $5 + i32.const 0 + i32.store + local.get $5 + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + local.tee $5 + i32.store + local.get $5 local.get $1 + call $assembly/mat4/getScaling + drop + f64.const 1 + local.get $5 i32.const 0 call $~lib/typedarray/Float64Array#__get - f64.neg + f64.div local.set $3 - local.get $1 + f64.const 1 + local.get $5 i32.const 1 call $~lib/typedarray/Float64Array#__get - f64.neg + f64.div local.set $4 - local.get $1 + f64.const 1 + local.get $5 i32.const 2 call $~lib/typedarray/Float64Array#__get - f64.neg - local.set $5 - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.set $6 - local.get $1 - i32.const 4 - call $~lib/typedarray/Float64Array#__get + f64.div local.set $7 local.get $1 - i32.const 5 - call $~lib/typedarray/Float64Array#__get - local.set $8 - local.get $1 - i32.const 6 - call $~lib/typedarray/Float64Array#__get - local.set $9 - local.get $1 - i32.const 7 - call $~lib/typedarray/Float64Array#__get - local.set $10 - local.get $0 - local.get $1 - local.get $2 - call $assembly/quat/rotateZ - drop - local.get $0 i32.const 0 call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul local.set $2 - local.get $0 + local.get $1 i32.const 1 call $~lib/typedarray/Float64Array#__get - local.set $11 - local.get $0 + local.get $4 + f64.mul + local.set $8 + local.get $1 i32.const 2 call $~lib/typedarray/Float64Array#__get - local.set $12 - local.get $0 - i32.const 4 local.get $7 - local.get $6 f64.mul - local.get $10 + local.set $9 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get local.get $3 f64.mul - f64.add - local.get $8 - local.get $5 - f64.mul - f64.add - local.get $9 + local.set $10 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get local.get $4 f64.mul - f64.sub - local.tee $13 - local.get $0 - i32.const 3 + local.set $6 + local.get $1 + i32.const 6 call $~lib/typedarray/Float64Array#__get - local.tee $14 - f64.mul - local.get $10 - local.get $6 - f64.mul local.get $7 + f64.mul + local.set $11 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get local.get $3 f64.mul - f64.sub - local.get $8 + local.set $12 + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#__get local.get $4 f64.mul - f64.sub - local.get $9 - local.get $5 - f64.mul - f64.sub - local.tee $15 + local.set $4 local.get $2 - f64.mul - f64.add - local.get $8 - local.get $6 - f64.mul - local.get $10 - local.get $4 - f64.mul - f64.add - local.get $9 - local.get $3 - f64.mul - f64.add - local.get $7 - local.get $5 - f64.mul - f64.sub - local.tee $16 - local.get $12 - f64.mul - f64.add - local.get $9 local.get $6 - f64.mul - local.get $10 - local.get $5 - f64.mul f64.add + local.get $1 + i32.const 10 + call $~lib/typedarray/Float64Array#__get local.get $7 - local.get $4 - f64.mul - f64.add - local.get $8 - local.get $3 f64.mul - f64.sub local.tee $3 - local.get $11 - f64.mul - f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 5 - local.get $16 - local.get $14 - f64.mul - local.get $15 - local.get $11 - f64.mul - f64.add - local.get $3 - local.get $2 - f64.mul - f64.add - local.get $13 - local.get $12 - f64.mul - f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 6 - local.get $3 - local.get $14 - f64.mul - local.get $15 - local.get $12 - f64.mul f64.add - local.get $13 - local.get $11 - f64.mul - f64.add - local.get $16 - local.get $2 - f64.mul - f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 7 - local.get $15 - local.get $14 - f64.mul - local.get $13 - local.get $2 - f64.mul - f64.sub - local.get $16 - local.get $11 - f64.mul - f64.sub - local.get $3 - local.get $12 - f64.mul - f64.sub - call $~lib/typedarray/Float64Array#__set + local.tee $7 + f64.const 0 + f64.gt + if + local.get $0 + i32.const 3 + local.get $7 + f64.const 1 + f64.add + f64.sqrt + local.tee $2 + local.get $2 + f64.add + local.tee $2 + f64.const 0.25 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 0 + local.get $11 + local.get $4 + f64.sub + local.get $2 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $12 + local.get $9 + f64.sub + local.get $2 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $8 + local.get $10 + f64.sub + local.get $2 + f64.div + call $~lib/typedarray/Float64Array#__set + else + local.get $2 + local.get $3 + f64.gt + i32.const 0 + local.get $2 + local.get $6 + f64.gt + select + if + local.get $0 + i32.const 3 + local.get $11 + local.get $4 + f64.sub + local.get $2 + f64.const 1 + f64.add + local.get $6 + f64.sub + local.get $3 + f64.sub + f64.sqrt + local.tee $2 + local.get $2 + f64.add + local.tee $2 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 0 + local.get $2 + f64.const 0.25 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $8 + local.get $10 + f64.add + local.get $2 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $12 + local.get $9 + f64.add + local.get $2 + f64.div + call $~lib/typedarray/Float64Array#__set + else + local.get $3 + local.get $6 + f64.lt + if + local.get $0 + i32.const 3 + local.get $12 + local.get $9 + f64.sub + local.get $6 + f64.const 1 + f64.add + local.get $2 + f64.sub + local.get $3 + f64.sub + f64.sqrt + local.tee $2 + local.get $2 + f64.add + local.tee $2 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 0 + local.get $8 + local.get $10 + f64.add + local.get $2 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $2 + f64.const 0.25 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $11 + local.get $4 + f64.add + local.get $2 + f64.div + call $~lib/typedarray/Float64Array#__set + else + local.get $0 + i32.const 3 + local.get $8 + local.get $10 + f64.sub + local.get $3 + f64.const 1 + f64.add + local.get $2 + f64.sub + local.get $6 + f64.sub + f64.sqrt + local.tee $2 + local.get $2 + f64.add + local.tee $2 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 0 + local.get $12 + local.get $9 + f64.add + local.get $2 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $11 + local.get $4 + f64.add + local.get $2 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $2 + f64.const 0.25 + f64.mul + call $~lib/typedarray/Float64Array#__set + end + end + end + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $assembly/quat2/rotateByQuatAppend (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 f64) - (local $4 f64) - (local $5 f64) - (local $6 f64) - (local $7 f64) - (local $8 f64) - (local $9 f64) - (local $10 f64) - local.get $2 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.set $6 - local.get $2 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.set $7 - local.get $2 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.set $8 - local.get $2 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.set $9 - local.get $1 + (func $assembly/quat2/create (result i32) + (local $0 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $0 i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.set $3 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.set $4 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.set $5 + i32.store + local.get $0 + i32.const 8 + call $~lib/typedarray/Float64Array#constructor + local.tee $0 + i32.store local.get $0 i32.const 0 - local.get $3 - local.get $9 - f64.mul - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.tee $10 - local.get $6 - f64.mul - f64.add - local.get $4 - local.get $8 - f64.mul - f64.add - local.get $5 - local.get $7 - f64.mul - f64.sub + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 - local.get $4 - local.get $9 - f64.mul - local.get $10 - local.get $7 - f64.mul - f64.add - local.get $5 - local.get $6 - f64.mul - f64.add - local.get $3 - local.get $8 - f64.mul - f64.sub + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 - local.get $5 - local.get $9 - f64.mul - local.get $10 - local.get $8 - f64.mul - f64.add - local.get $3 - local.get $7 - f64.mul - f64.add - local.get $4 - local.get $6 - f64.mul - f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - local.get $10 - local.get $9 - f64.mul - local.get $3 - local.get $6 - f64.mul - f64.sub - local.get $4 - local.get $7 - f64.mul - f64.sub - local.get $5 - local.get $8 - f64.mul - f64.sub + f64.const 0 call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 4 - call $~lib/typedarray/Float64Array#__get - local.set $3 - local.get $1 - i32.const 5 - call $~lib/typedarray/Float64Array#__get - local.set $4 - local.get $1 - i32.const 6 - call $~lib/typedarray/Float64Array#__get - local.set $5 local.get $0 i32.const 4 - local.get $3 - local.get $9 - f64.mul - local.get $1 - i32.const 7 - call $~lib/typedarray/Float64Array#__get - local.tee $10 - local.get $6 - f64.mul - f64.add - local.get $4 - local.get $8 - f64.mul - f64.add - local.get $5 - local.get $7 - f64.mul - f64.sub + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 5 - local.get $4 - local.get $9 - f64.mul - local.get $10 - local.get $7 - f64.mul - f64.add - local.get $5 - local.get $6 - f64.mul - f64.add - local.get $3 - local.get $8 - f64.mul - f64.sub + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 6 - local.get $5 - local.get $9 - f64.mul - local.get $10 - local.get $8 - f64.mul - f64.add - local.get $3 - local.get $7 - f64.mul - f64.add - local.get $4 - local.get $6 - f64.mul - f64.sub + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 7 - local.get $10 - local.get $9 - f64.mul - local.get $3 - local.get $6 - f64.mul - f64.sub - local.get $4 - local.get $7 - f64.mul - f64.sub - local.get $5 - local.get $8 - f64.mul - f64.sub + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 - ) - (func $assembly/quat2/rotateByQuatPrepend (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 f64) - (local $4 f64) - (local $5 f64) - (local $6 f64) - (local $7 f64) - (local $8 f64) - (local $9 f64) - (local $10 f64) - local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.set $6 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.set $7 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.set $8 - local.get $1 i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.set $9 - local.get $2 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.set $3 - local.get $2 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.set $4 - local.get $2 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.set $5 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer local.get $0 + ) + (func $assembly/quat2/fromValues (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (param $7 f64) (result i32) + (local $8 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $8 i32.const 0 - local.get $6 - local.get $2 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.tee $10 - f64.mul - local.get $9 - local.get $3 - f64.mul - f64.add - local.get $7 - local.get $5 - f64.mul - f64.add + i32.store local.get $8 - local.get $4 - f64.mul - f64.sub - call $~lib/typedarray/Float64Array#__set + i32.const 8 + call $~lib/typedarray/Float64Array#constructor + local.tee $8 + i32.store + local.get $8 + i32.const 0 local.get $0 - i32.const 1 - local.get $7 - local.get $10 - f64.mul - local.get $9 - local.get $4 - f64.mul - f64.add + call $~lib/typedarray/Float64Array#__set local.get $8 - local.get $3 - f64.mul - f64.add - local.get $6 - local.get $5 - f64.mul - f64.sub + i32.const 1 + local.get $1 call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 local.get $8 - local.get $10 - f64.mul - local.get $9 - local.get $5 - f64.mul - f64.add - local.get $6 - local.get $4 - f64.mul - f64.add - local.get $7 - local.get $3 - f64.mul - f64.sub + i32.const 2 + local.get $2 call $~lib/typedarray/Float64Array#__set - local.get $0 + local.get $8 i32.const 3 - local.get $9 - local.get $10 - f64.mul - local.get $6 local.get $3 - f64.mul - f64.sub - local.get $7 - local.get $4 - f64.mul - f64.sub - local.get $8 - local.get $5 - f64.mul - f64.sub call $~lib/typedarray/Float64Array#__set - local.get $2 - i32.const 4 - call $~lib/typedarray/Float64Array#__get - local.set $3 - local.get $2 - i32.const 5 - call $~lib/typedarray/Float64Array#__get - local.set $4 - local.get $2 - i32.const 6 - call $~lib/typedarray/Float64Array#__get - local.set $5 - local.get $0 - i32.const 4 - local.get $6 - local.get $2 - i32.const 7 - call $~lib/typedarray/Float64Array#__get - local.tee $10 - f64.mul - local.get $9 - local.get $3 - f64.mul - f64.add - local.get $7 - local.get $5 - f64.mul - f64.add local.get $8 + i32.const 4 local.get $4 - f64.mul - f64.sub call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 5 - local.get $7 - local.get $10 - f64.mul - local.get $9 - local.get $4 - f64.mul - f64.add local.get $8 - local.get $3 - f64.mul - f64.add - local.get $6 + i32.const 5 local.get $5 - f64.mul - f64.sub call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 6 local.get $8 - local.get $10 - f64.mul - local.get $9 - local.get $5 - f64.mul - f64.add + i32.const 6 local.get $6 - local.get $4 - f64.mul - f64.add - local.get $7 - local.get $3 - f64.mul - f64.sub call $~lib/typedarray/Float64Array#__set - local.get $0 + local.get $8 i32.const 7 - local.get $9 - local.get $10 - f64.mul - local.get $6 - local.get $3 - f64.mul - f64.sub local.get $7 - local.get $4 - f64.mul - f64.sub - local.get $8 - local.get $5 - f64.mul - f64.sub call $~lib/typedarray/Float64Array#__set - local.get $0 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $8 ) - (func $assembly/quat2/rotateAroundAxis (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) - (local $4 f64) - (local $5 f64) - (local $6 f64) - (local $7 f64) - (local $8 f64) - (local $9 f64) - (local $10 f64) - local.get $3 - f64.abs - f64.const 1e-06 - f64.lt + (func $assembly/quat2/fromRotationTranslationValues (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (result i32) + (local $7 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s if - local.get $0 - local.get $1 - call $assembly/quat2/copy - return + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable end - local.get $2 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $assembly/imports/MathUtil.hypot - local.set $4 - local.get $3 - f64.const 0.5 - f64.mul - local.tee $5 - call $~lib/math/NativeMath.sin - local.tee $6 - local.get $2 + global.get $~lib/memory/__stack_pointer + local.tee $7 i32.const 0 - call $~lib/typedarray/Float64Array#__get - f64.mul - local.get $4 - f64.div - local.set $3 - local.get $6 - local.get $2 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - f64.mul - local.get $4 - f64.div - local.set $9 - local.get $6 - local.get $2 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - f64.mul - local.get $4 - f64.div - local.set $4 - local.get $5 - call $~lib/math/NativeMath.cos - local.set $6 - local.get $1 + i32.store + local.get $7 + i32.const 8 + call $~lib/typedarray/Float64Array#constructor + local.tee $7 + i32.store + local.get $7 i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.set $5 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.set $7 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.set $8 local.get $0 - i32.const 0 - local.get $5 - local.get $6 - f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $7 + i32.const 1 local.get $1 + call $~lib/typedarray/Float64Array#__set + local.get $7 + i32.const 2 + local.get $2 + call $~lib/typedarray/Float64Array#__set + local.get $7 i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.tee $10 local.get $3 - f64.mul - f64.add - local.get $7 - local.get $4 - f64.mul - f64.add - local.get $8 - local.get $9 - f64.mul - f64.sub call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 local.get $7 - local.get $6 - f64.mul - local.get $10 - local.get $9 + i32.const 4 + local.get $4 + f64.const 0.5 f64.mul - f64.add - local.get $8 + local.tee $4 local.get $3 f64.mul - f64.add local.get $5 - local.get $4 - f64.mul - f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - local.get $8 - local.get $6 - f64.mul - local.get $10 - local.get $4 + f64.const 0.5 f64.mul - f64.add - local.get $5 - local.get $9 + local.tee $5 + local.get $2 f64.mul f64.add - local.get $7 - local.get $3 - f64.mul - f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - local.get $10 local.get $6 + f64.const 0.5 f64.mul - local.get $5 - local.get $3 - f64.mul - f64.sub - local.get $7 - local.get $9 - f64.mul - f64.sub - local.get $8 - local.get $4 + local.tee $6 + local.get $1 f64.mul f64.sub call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 4 - call $~lib/typedarray/Float64Array#__get - local.set $5 - local.get $1 + local.get $7 i32.const 5 - call $~lib/typedarray/Float64Array#__get - local.set $7 - local.get $1 - i32.const 6 - call $~lib/typedarray/Float64Array#__get - local.set $8 - local.get $0 - i32.const 4 local.get $5 - local.get $6 - f64.mul - local.get $1 - i32.const 7 - call $~lib/typedarray/Float64Array#__get - local.tee $10 local.get $3 f64.mul - f64.add - local.get $7 - local.get $4 - f64.mul - f64.add - local.get $8 - local.get $9 - f64.mul - f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 5 - local.get $7 local.get $6 - f64.mul - local.get $10 - local.get $9 - f64.mul - f64.add - local.get $8 - local.get $3 + local.get $0 f64.mul f64.add - local.get $5 local.get $4 + local.get $2 f64.mul f64.sub call $~lib/typedarray/Float64Array#__set - local.get $0 + local.get $7 i32.const 6 - local.get $8 local.get $6 + local.get $3 f64.mul - local.get $10 local.get $4 + local.get $1 f64.mul f64.add local.get $5 - local.get $9 - f64.mul - f64.add - local.get $7 - local.get $3 + local.get $0 f64.mul f64.sub call $~lib/typedarray/Float64Array#__set - local.get $0 + local.get $7 i32.const 7 - local.get $10 - local.get $6 + local.get $4 + f64.neg + local.get $0 f64.mul local.get $5 - local.get $3 - f64.mul - f64.sub - local.get $7 - local.get $9 + local.get $1 f64.mul f64.sub - local.get $8 - local.get $4 + local.get $6 + local.get $2 f64.mul f64.sub call $~lib/typedarray/Float64Array#__set - local.get $0 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $7 ) - (func $assembly/quat2/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - i32.const 0 - local.get $1 + (func $assembly/vec2/fromValues (param $0 f64) (param $1 f64) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $2 i32.const 0 - call $~lib/typedarray/Float64Array#__get + i32.store + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#constructor + local.tee $2 + i32.store local.get $2 i32.const 0 - call $~lib/typedarray/Float64Array#__get - f64.add - call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 1 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set local.get $2 i32.const 1 - call $~lib/typedarray/Float64Array#__get - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - f64.add call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer local.get $2 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 + ) + (func $export:assembly/common/setMatrixArrayType (param $0 i32) + global.get $~lib/memory/__stack_pointer i32.const 4 - local.get $1 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + i32.const 3696 + i32.const 3760 + i32.const 20 + i32.const 3 + call $~lib/builtins/abort + unreachable + ) + (func $export:assembly/mat2/clone (param $0 i32) (result i32) + global.get $~lib/memory/__stack_pointer i32.const 4 - call $~lib/typedarray/Float64Array#__get - local.get $2 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/vec4/clone + global.get $~lib/memory/__stack_pointer i32.const 4 - call $~lib/typedarray/Float64Array#__get - f64.add - call $~lib/typedarray/Float64Array#__set + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat2/copy (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $0 - i32.const 5 - local.get $1 - i32.const 5 - call $~lib/typedarray/Float64Array#__get + i32.store local.get $2 - i32.const 5 - call $~lib/typedarray/Float64Array#__get - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 6 local.get $1 - i32.const 6 - call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 6 - call $~lib/typedarray/Float64Array#__get - f64.add - call $~lib/typedarray/Float64Array#__set + i32.store offset=4 local.get $0 - i32.const 7 local.get $1 - i32.const 7 - call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 7 - call $~lib/typedarray/Float64Array#__get - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 + call $assembly/vec4/copy + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer ) - (func $assembly/quat2/lerp (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) - (local $4 f64) - i32.const 2 - global.set $~argumentsLength - f64.const 1 - local.get $3 - f64.sub - local.set $4 - local.get $3 - f64.neg - local.get $3 - local.get $1 - local.get $2 - i32.const 2608 - i32.load - call_indirect $0 (type $i32_i32_=>_f64) - f64.const 0 - f64.lt - select - local.set $3 + (func $export:assembly/mat2/identity (param $0 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store local.get $0 i32.const 0 - local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.get $4 - f64.mul - local.get $2 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.get $3 - f64.mul - f64.add + f64.const 1 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.get $4 - f64.mul - local.get $2 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.get $3 - f64.mul - f64.add + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.get $4 - f64.mul - local.get $2 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.get $3 - f64.mul - f64.add + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 3 - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.get $4 - f64.mul - local.get $2 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.get $3 - f64.mul - f64.add + f64.const 1 call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 4 - local.get $1 + global.get $~lib/memory/__stack_pointer i32.const 4 - call $~lib/typedarray/Float64Array#__get - local.get $4 - f64.mul - local.get $2 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat2/set (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (result i32) + global.get $~lib/memory/__stack_pointer i32.const 4 - call $~lib/typedarray/Float64Array#__get - local.get $3 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store local.get $0 - i32.const 5 local.get $1 - i32.const 5 - call $~lib/typedarray/Float64Array#__get - local.get $4 - f64.mul local.get $2 - i32.const 5 - call $~lib/typedarray/Float64Array#__get local.get $3 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 6 - local.get $1 - i32.const 6 - call $~lib/typedarray/Float64Array#__get local.get $4 - f64.mul + call $assembly/vec4/set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat2/transpose (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 f64) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $2 + local.get $0 + i32.store local.get $2 - i32.const 6 - call $~lib/typedarray/Float64Array#__get - local.get $3 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.store offset=4 local.get $0 - i32.const 7 local.get $1 - i32.const 7 - call $~lib/typedarray/Float64Array#__get - local.get $4 - f64.mul - local.get $2 - i32.const 7 - call $~lib/typedarray/Float64Array#__get - local.get $3 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set + i32.eq + if + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $0 + i32.const 1 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $3 + call $~lib/typedarray/Float64Array#__set + else + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + end + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $assembly/quat2/normalize (param $0 i32) (param $1 i32) (result i32) + (func $export:assembly/mat2/invert (param $0 i32) (param $1 i32) (result i32) (local $2 f64) - (local $3 f64) + (local $3 i32) (local $4 f64) (local $5 f64) (local $6 f64) (local $7 f64) - (local $8 f64) - (local $9 f64) - (local $10 f64) - i32.const 1 - global.set $~argumentsLength - local.get $1 - i32.const 2288 - i32.load - call_indirect $0 (type $i32_=>_f64) - local.tee $2 - f64.const 0 - f64.gt + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $3 + local.get $0 + i32.store + local.get $3 + local.get $1 + i32.store offset=4 + block $__inlined_func$assembly/mat2/invert (result i32) local.get $1 i32.const 0 call $~lib/typedarray/Float64Array#__get - local.get $2 - f64.sqrt - local.tee $2 - f64.div - local.set $3 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.get $2 - f64.div local.set $4 local.get $1 - i32.const 2 + i32.const 1 call $~lib/typedarray/Float64Array#__get - local.get $2 - f64.div local.set $5 local.get $1 - i32.const 3 + i32.const 2 call $~lib/typedarray/Float64Array#__get - local.get $2 - f64.div local.set $6 - local.get $1 - i32.const 4 - call $~lib/typedarray/Float64Array#__get - local.set $7 - local.get $1 - i32.const 5 - call $~lib/typedarray/Float64Array#__get - local.set $8 - local.get $1 - i32.const 6 - call $~lib/typedarray/Float64Array#__get - local.set $9 - local.get $1 - i32.const 7 - call $~lib/typedarray/Float64Array#__get - local.set $10 - local.get $0 i32.const 0 - local.get $3 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 local.get $4 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - local.get $5 - call $~lib/typedarray/Float64Array#__set - local.get $0 + local.get $1 i32.const 3 - local.get $6 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 4 - local.get $7 - local.get $3 - local.get $3 - local.get $7 - f64.mul - local.get $4 - local.get $8 - f64.mul - f64.add - local.get $5 - local.get $9 + call $~lib/typedarray/Float64Array#__get + local.tee $2 f64.mul - f64.add local.get $6 - local.get $10 - f64.mul - f64.add - local.tee $3 + local.get $5 f64.mul f64.sub - local.get $2 - f64.div - call $~lib/typedarray/Float64Array#__set + local.tee $7 + i64.reinterpret_f64 + i64.const 1 + i64.shl + i64.const 2 + i64.sub + i64.const -9007199254740994 + i64.gt_u + br_if $__inlined_func$assembly/mat2/invert + drop local.get $0 - i32.const 5 - local.get $8 - local.get $4 - local.get $3 - f64.mul - f64.sub + i32.const 0 local.get $2 + f64.const 1 + local.get $7 f64.div + local.tee $2 + f64.mul call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 6 - local.get $9 + i32.const 1 local.get $5 - local.get $3 - f64.mul - f64.sub + f64.neg local.get $2 - f64.div + f64.mul call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 7 - local.get $10 + i32.const 2 local.get $6 - local.get $3 + f64.neg + local.get $2 f64.mul - f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $4 local.get $2 - f64.div + f64.mul call $~lib/typedarray/Float64Array#__set + local.get $0 end - local.get $0 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer ) - (func $assembly/quat2/equals (param $0 i32) (param $1 i32) (result i32) - (local $2 f64) + (func $export:assembly/mat2/adjoint (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) (local $3 f64) - (local $4 f64) - (local $5 f64) - (local $6 f64) - (local $7 f64) - (local $8 f64) - (local $9 f64) - (local $10 f64) - (local $11 f64) - (local $12 f64) - (local $13 f64) - (local $14 f64) - (local $15 f64) - (local $16 f64) - (local $17 f64) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $0 + i32.store + local.get $2 + local.get $1 + i32.store offset=4 + local.get $1 i32.const 0 call $~lib/typedarray/Float64Array#__get - local.set $2 + local.set $3 local.get $0 + i32.const 0 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 i32.const 1 call $~lib/typedarray/Float64Array#__get - local.set $3 + f64.neg + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 + local.get $1 + i32.const 2 call $~lib/typedarray/Float64Array#__get - local.set $4 + f64.neg + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.set $5 + local.get $3 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer local.get $0 + ) + (func $export:assembly/mat2/determinant (param $0 i32) (result f64) + (local $1 f64) + global.get $~lib/memory/__stack_pointer i32.const 4 - call $~lib/typedarray/Float64Array#__get - local.set $6 - local.get $0 - i32.const 5 - call $~lib/typedarray/Float64Array#__get - local.set $7 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer local.get $0 - i32.const 6 - call $~lib/typedarray/Float64Array#__get - local.set $8 + i32.store local.get $0 - i32.const 7 - call $~lib/typedarray/Float64Array#__get - local.set $9 - local.get $1 i32.const 0 call $~lib/typedarray/Float64Array#__get - local.set $10 - local.get $1 - i32.const 1 + local.get $0 + i32.const 3 call $~lib/typedarray/Float64Array#__get - local.set $11 - local.get $1 + f64.mul + local.get $0 i32.const 2 call $~lib/typedarray/Float64Array#__get - local.set $12 - local.get $1 - i32.const 3 + local.get $0 + i32.const 1 call $~lib/typedarray/Float64Array#__get - local.set $13 - local.get $1 + f64.mul + f64.sub + global.get $~lib/memory/__stack_pointer i32.const 4 - call $~lib/typedarray/Float64Array#__get - local.set $14 - local.get $1 - i32.const 5 - call $~lib/typedarray/Float64Array#__get - local.set $15 - local.get $1 - i32.const 6 - call $~lib/typedarray/Float64Array#__get - local.set $16 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat2/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $3 + local.get $0 + i32.store + local.get $3 local.get $1 - i32.const 7 - call $~lib/typedarray/Float64Array#__get - local.set $17 + i32.store offset=4 + local.get $3 local.get $2 - local.get $10 - f64.sub - f64.abs - f64.const 1 + i32.store offset=8 + local.get $0 + local.get $1 local.get $2 - f64.abs - local.get $10 - f64.abs - call $assembly/imports/MathUtil.max - f64.const 1e-06 - f64.mul - f64.le - if (result i32) - local.get $3 - local.get $11 - f64.sub - f64.abs - f64.const 1 - local.get $3 - f64.abs - local.get $11 - f64.abs - call $assembly/imports/MathUtil.max - f64.const 1e-06 - f64.mul - f64.le - else - i32.const 0 - end - if (result i32) - local.get $4 - local.get $12 - f64.sub - f64.abs - f64.const 1 - local.get $4 - f64.abs - local.get $12 - f64.abs - call $assembly/imports/MathUtil.max - f64.const 1e-06 - f64.mul - f64.le - else - i32.const 0 - end - if (result i32) - local.get $5 - local.get $13 - f64.sub - f64.abs - f64.const 1 - local.get $5 - f64.abs - local.get $13 - f64.abs - call $assembly/imports/MathUtil.max - f64.const 1e-06 - f64.mul - f64.le - else - i32.const 0 - end - if (result i32) - local.get $6 - local.get $14 - f64.sub - f64.abs - f64.const 1 - local.get $6 - f64.abs - local.get $14 - f64.abs - call $assembly/imports/MathUtil.max - f64.const 1e-06 - f64.mul - f64.le - else - i32.const 0 - end - if (result i32) - local.get $7 - local.get $15 - f64.sub - f64.abs - f64.const 1 - local.get $7 - f64.abs - local.get $15 - f64.abs - call $assembly/imports/MathUtil.max - f64.const 1e-06 - f64.mul - f64.le - else - i32.const 0 - end - if (result i32) - local.get $8 - local.get $16 - f64.sub - f64.abs - f64.const 1 - local.get $8 - f64.abs - local.get $16 - f64.abs - call $assembly/imports/MathUtil.max - f64.const 1e-06 - f64.mul - f64.le - else - i32.const 0 - end - if (result i32) - local.get $9 - local.get $17 - f64.sub - f64.abs - f64.const 1 - local.get $9 - f64.abs - local.get $17 - f64.abs - call $assembly/imports/MathUtil.max - f64.const 1e-06 - f64.mul - f64.le - else - i32.const 0 - end + call $assembly/mat2/multiply + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer ) - (func $assembly/vec3/hermite (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 f64) (result i32) + (func $export:assembly/mat2/rotate (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) (local $6 f64) (local $7 f64) - (local $8 f64) - (local $9 f64) + (local $8 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $8 local.get $0 - i32.const 0 + i32.store + local.get $8 + local.get $1 + i32.store offset=4 local.get $1 i32.const 0 call $~lib/typedarray/Float64Array#__get - local.get $5 - local.get $5 - f64.mul - local.tee $6 - local.get $5 - local.get $5 - f64.add - local.tee $9 - f64.const 3 - f64.sub - f64.mul - f64.const 1 - f64.add - local.tee $7 - f64.mul - local.get $2 - i32.const 0 + local.set $4 + local.get $1 + i32.const 1 call $~lib/typedarray/Float64Array#__get - local.get $6 - local.get $5 - f64.const 2 - f64.sub - f64.mul - local.get $5 - f64.add - local.tee $8 - f64.mul - f64.add - local.get $3 - i32.const 0 + local.set $5 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 3 call $~lib/typedarray/Float64Array#__get - local.get $6 - local.get $5 - f64.const 1 - f64.sub - f64.mul - local.tee $5 - f64.mul - f64.add - local.get $4 + local.set $7 + local.get $2 + call $~lib/math/NativeMath.sin + local.set $3 + local.get $0 i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.get $6 - f64.const 3 - local.get $9 - f64.sub + local.get $4 + local.get $2 + call $~lib/math/NativeMath.cos + local.tee $2 f64.mul - local.tee $6 + local.get $6 + local.get $3 f64.mul f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.get $7 - f64.mul + local.get $5 local.get $2 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.get $8 f64.mul - f64.add + local.get $7 local.get $3 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.get $5 - f64.mul - f64.add - local.get $4 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.get $6 f64.mul f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.get $7 + local.get $4 + local.get $3 + f64.neg + local.tee $3 f64.mul + local.get $6 local.get $2 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.get $8 f64.mul f64.add - local.get $3 - i32.const 2 - call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 local.get $5 + local.get $3 f64.mul - f64.add - local.get $4 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.get $6 + local.get $7 + local.get $2 f64.mul f64.add call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $assembly/vec3/bezier (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 f64) (result i32) + (func $export:assembly/mat2/scale (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 f64) + (local $5 f64) (local $6 f64) (local $7 f64) (local $8 f64) (local $9 f64) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $3 local.get $0 - i32.const 0 + i32.store + local.get $3 local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - f64.const 1 - local.get $5 - f64.sub - local.tee $6 - local.get $6 - f64.mul - local.tee $7 - local.get $6 - f64.mul - local.tee $8 - f64.mul + i32.store offset=4 + local.get $3 local.get $2 + i32.store offset=8 + local.get $1 i32.const 0 call $~lib/typedarray/Float64Array#__get - local.get $5 - f64.const 3 - f64.mul - local.get $7 - f64.mul - local.tee $7 - f64.mul - f64.add - local.get $3 - i32.const 0 + local.set $6 + local.get $1 + i32.const 1 call $~lib/typedarray/Float64Array#__get - local.get $5 - local.get $5 - f64.mul - local.tee $9 - f64.const 3 - f64.mul - local.get $6 - f64.mul - local.tee $6 - f64.mul - f64.add - local.get $4 - i32.const 0 + local.set $7 + local.get $1 + i32.const 2 call $~lib/typedarray/Float64Array#__get - local.get $9 - local.get $5 - f64.mul - local.tee $5 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 + local.set $8 local.get $1 - i32.const 1 + i32.const 3 call $~lib/typedarray/Float64Array#__get - local.get $8 - f64.mul + local.set $9 local.get $2 - i32.const 1 + i32.const 0 call $~lib/typedarray/Float64Array#__get - local.get $7 - f64.mul - f64.add - local.get $3 + local.set $4 + local.get $2 i32.const 1 call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $0 + i32.const 0 local.get $6 - f64.mul - f64.add local.get $4 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.get $5 f64.mul - f64.add call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 2 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.get $8 - f64.mul - local.get $2 - i32.const 2 - call $~lib/typedarray/Float64Array#__get + i32.const 1 local.get $7 + local.get $4 f64.mul - f64.add - local.get $3 + call $~lib/typedarray/Float64Array#__set + local.get $0 i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.get $6 + local.get $8 + local.get $5 f64.mul - f64.add - local.get $4 - i32.const 2 - call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $9 local.get $5 f64.mul - f64.add call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $assembly/vec3/transformMat4 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 f64) - (local $4 f64) - (local $5 f64) - (local $6 f64) + (func $export:assembly/mat2/fromRotation (param $0 i32) (param $1 f64) (result i32) + (local $2 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store local.get $1 + call $~lib/math/NativeMath.sin + local.set $2 + local.get $0 i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.set $4 local.get $1 + call $~lib/math/NativeMath.cos + local.tee $1 + call $~lib/typedarray/Float64Array#__set + local.get $0 i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.set $5 - local.get $1 + local.get $2 + call $~lib/typedarray/Float64Array#__set + local.get $0 i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.set $6 local.get $2 + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.get $4 - f64.mul - local.get $2 - i32.const 7 - call $~lib/typedarray/Float64Array#__get - local.get $5 - f64.mul - f64.add - local.get $2 - i32.const 11 - call $~lib/typedarray/Float64Array#__get - local.get $6 - f64.mul - f64.add + local.get $1 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat2/fromScaling (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $2 + local.get $0 + i32.store local.get $2 - i32.const 15 - call $~lib/typedarray/Float64Array#__get - f64.add - local.tee $3 - f64.const 1 - local.get $3 - i64.reinterpret_f64 - i64.const 1 - i64.shl - i64.const 2 - i64.sub - i64.const -9007199254740994 - i64.le_u - select - local.set $3 + local.get $1 + i32.store offset=4 local.get $0 i32.const 0 - local.get $2 + local.get $1 i32.const 0 call $~lib/typedarray/Float64Array#__get - local.get $4 - f64.mul - local.get $2 - i32.const 4 - call $~lib/typedarray/Float64Array#__get - local.get $5 - f64.mul - f64.add - local.get $2 - i32.const 8 - call $~lib/typedarray/Float64Array#__get - local.get $6 - f64.mul - f64.add - local.get $2 - i32.const 12 - call $~lib/typedarray/Float64Array#__get - f64.add - local.get $3 - f64.div call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 - local.get $2 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.get $4 - f64.mul - local.get $2 - i32.const 5 - call $~lib/typedarray/Float64Array#__get - local.get $5 - f64.mul - f64.add - local.get $2 - i32.const 9 - call $~lib/typedarray/Float64Array#__get - local.get $6 - f64.mul - f64.add - local.get $2 - i32.const 13 - call $~lib/typedarray/Float64Array#__get - f64.add - local.get $3 - f64.div + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 - local.get $2 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.get $4 - f64.mul - local.get $2 - i32.const 6 - call $~lib/typedarray/Float64Array#__get - local.get $5 - f64.mul - f64.add - local.get $2 - i32.const 10 - call $~lib/typedarray/Float64Array#__get - local.get $6 - f64.mul - f64.add - local.get $2 - i32.const 14 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 1 call $~lib/typedarray/Float64Array#__get - f64.add - local.get $3 - f64.div call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $assembly/vec3/transformQuat (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 f64) - (local $4 f64) - (local $5 f64) - (local $6 f64) - (local $7 f64) - (local $8 f64) - (local $9 f64) - (local $10 f64) - (local $11 f64) - (local $12 f64) - local.get $2 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.set $3 - local.get $2 + (func $export:assembly/mat2/str (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + block $folding-inner0 + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + local.tee $1 + local.get $0 + i32.store + local.get $1 + i32.const -64 + i32.add + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + local.tee $1 + i64.const 0 + i64.store + local.get $1 + i64.const 0 + i64.store offset=8 + local.get $1 + i64.const 0 + i64.store offset=16 + local.get $1 + i64.const 0 + i64.store offset=24 + local.get $1 + i64.const 0 + i64.store offset=32 + local.get $1 + i64.const 0 + i64.store offset=40 + local.get $1 + i64.const 0 + i64.store offset=48 + local.get $1 + i64.const 0 + i64.store offset=56 + local.get $1 + i32.const 3824 + i32.store offset=56 + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=60 + i32.const 3824 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.tee $2 + local.get $1 + i32.store offset=48 + local.get $2 + i32.const 5424 + i32.store offset=52 + local.get $1 + i32.const 5424 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=40 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=44 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.tee $2 + local.get $1 + i32.store offset=32 + local.get $2 + i32.const 5424 + i32.store offset=36 + local.get $1 + i32.const 5424 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=24 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=28 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.tee $2 + local.get $1 + i32.store offset=16 + local.get $2 + i32.const 5424 + i32.store offset=20 + local.get $1 + i32.const 5424 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=8 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=12 + local.get $1 + local.get $0 + call $~lib/string/String.__concat + local.set $0 + global.get $~lib/memory/__stack_pointer + local.tee $1 + local.get $0 + i32.store + local.get $1 + i32.const 5456 + i32.store offset=4 + local.get $0 + i32.const 5456 + call $~lib/string/String.__concat + global.get $~lib/memory/__stack_pointer + i32.const -64 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + return + end + i32.const 29056 + i32.const 29104 i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.set $7 - local.get $2 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.set $4 - local.get $2 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.set $6 - local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.set $5 - local.get $1 i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.set $8 + call $~lib/builtins/abort + unreachable + ) + (func $export:assembly/mat2/frob (param $0 i32) (result f64) + (local $1 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store local.get $0 i32.const 0 - local.get $5 - local.get $7 - local.get $1 - i32.const 2 call $~lib/typedarray/Float64Array#__get - local.tee $9 - f64.mul - local.get $4 - local.get $8 - f64.mul - f64.sub - local.tee $10 - local.get $6 - local.get $6 - f64.add - local.tee $6 - f64.mul - f64.add - local.get $7 - local.get $3 - local.get $8 - f64.mul - local.get $7 - local.get $5 - f64.mul - f64.sub - local.tee $11 - f64.mul - local.get $4 - local.get $4 - local.get $5 - f64.mul - local.get $3 - local.get $9 - f64.mul - f64.sub - local.tee $5 - f64.mul - f64.sub - local.tee $12 - local.get $12 - f64.add - f64.add - call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 - local.get $8 - local.get $5 - local.get $6 - f64.mul - f64.add - local.get $4 - local.get $10 - f64.mul - local.get $3 - local.get $11 - f64.mul - f64.sub - local.tee $4 - local.get $4 - f64.add - f64.add - call $~lib/typedarray/Float64Array#__set + call $~lib/typedarray/Float64Array#__get local.get $0 i32.const 2 - local.get $9 - local.get $11 - local.get $6 - f64.mul - f64.add - local.get $3 - local.get $5 - f64.mul - local.get $7 - local.get $10 - f64.mul - f64.sub - local.tee $3 - local.get $3 - f64.add - f64.add - call $~lib/typedarray/Float64Array#__set + call $~lib/typedarray/Float64Array#__get local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $assembly/imports/MathUtil.hypot + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer ) - (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 f64) - (local $3 i32) + (func $export:assembly/mat2/LDU (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - local.get $1 - local.get $0 - i32.load offset=12 - i32.ge_u - if - local.get $1 - i32.const 0 + global.get $~lib/memory/__stack_pointer + i32.const 16 + i32.sub + global.set $~lib/memory/__stack_pointer + block $folding-inner0 + global.get $~lib/memory/__stack_pointer + i32.const 12652 i32.lt_s - if - i32.const 1168 - i32.const 5680 - i32.const 108 - i32.const 22 - call $~lib/builtins/abort - unreachable - end + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + local.tee $4 + local.get $0 + i32.store + local.get $4 local.get $1 + i32.store offset=4 + local.get $4 + local.get $2 + i32.store offset=8 + local.get $4 + local.get $3 + i32.store offset=12 + local.get $4 + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + local.get $0 + i32.const 2 + local.get $3 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $3 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $2 + i32.const 0 + local.get $3 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $2 i32.const 1 - i32.add - local.tee $7 - local.set $4 - local.get $7 + local.get $3 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $2 + i32.const 3 + local.get $3 + i32.const 3 + call $~lib/typedarray/Float64Array#__get local.get $0 - i32.load offset=8 - local.tee $8 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer i32.const 3 - i32.shr_u - i32.gt_u - if - local.get $4 - i32.const 134217727 - i32.gt_u - if - i32.const 1584 - i32.const 5680 - i32.const 14 - i32.const 48 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load - local.tee $9 - local.set $3 - block $__inlined_func$~lib/rt/itcms/__renew - local.get $4 - i32.const 3 - i32.shl - local.tee $10 - local.tee $5 - local.get $9 - i32.const 20 - i32.sub - local.tee $6 - i32.load - i32.const -4 - i32.and - i32.const 16 - i32.sub - i32.le_u - if - local.get $6 - local.get $5 - i32.store offset=16 - br $__inlined_func$~lib/rt/itcms/__renew - end - local.get $5 - local.get $6 - i32.load offset=12 - call $~lib/rt/itcms/__new - local.tee $4 - local.get $3 - local.get $5 - local.get $6 - i32.load offset=16 - local.tee $3 - local.get $3 - local.get $5 - i32.gt_u - select - call $~lib/memory/memory.copy - local.get $4 - local.set $3 - end - local.get $3 - local.get $8 - i32.add - local.get $10 - local.get $8 - i32.sub - call $~lib/memory/memory.fill - local.get $3 - local.get $9 - i32.ne - if - local.get $0 - local.get $3 - i32.store - local.get $0 - local.get $3 - i32.store offset=4 - local.get $0 - local.get $3 - i32.const 0 - call $~lib/rt/itcms/__link - end - local.get $0 - local.get $10 - i32.store offset=8 - end + i32.const 2 + i32.const 25 + i32.const 0 + call $~lib/rt/__newArray + local.tee $3 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $3 + i32.load offset=4 + i32.store offset=4 + local.get $3 + i32.const 0 local.get $0 - local.get $7 - i32.store offset=12 + call $~lib/array/Array<~lib/typedarray/Float64Array>#__uset + local.get $3 + i32.const 1 + local.get $1 + call $~lib/array/Array<~lib/typedarray/Float64Array>#__uset + local.get $3 + i32.const 2 + local.get $2 + call $~lib/array/Array<~lib/typedarray/Float64Array>#__uset + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 16 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + return + end + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + ) + (func $export:assembly/mat2/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable end + global.get $~lib/memory/__stack_pointer + local.tee $3 local.get $0 - i32.load offset=4 + i32.store + local.get $3 local.get $1 - i32.const 3 - i32.shl - i32.add + i32.store offset=4 + local.get $3 local.get $2 - f64.store + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/vec4/add + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result f64) + (func $export:assembly/mat2/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $3 + local.get $0 + i32.store + local.get $3 local.get $1 + i32.store offset=4 + local.get $3 + local.get $2 + i32.store offset=8 local.get $0 - i32.load offset=12 - i32.ge_u + local.get $1 + local.get $2 + call $assembly/vec4/subtract + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat2/exactEquals (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s if - i32.const 1168 - i32.const 5680 - i32.const 92 - i32.const 42 + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 call $~lib/builtins/abort unreachable end + global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $0 - i32.load offset=4 + i32.store + local.get $2 local.get $1 - i32.const 3 - i32.shl + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/vec4/exactEquals + global.get $~lib/memory/__stack_pointer + i32.const 8 i32.add - f64.load + global.set $~lib/memory/__stack_pointer ) - (func $assembly/vec4/cross (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $export:assembly/mat2/equals (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) (local $4 f64) (local $5 f64) (local $6 f64) (local $7 f64) (local $8 f64) (local $9 f64) - (local $10 f64) - (local $11 f64) - (local $12 f64) - (local $13 f64) - local.get $2 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.get $3 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - f64.mul - local.get $2 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.get $3 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - f64.mul - f64.sub - local.set $5 - local.get $2 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.get $3 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - f64.mul - local.get $2 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.get $3 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - f64.mul - f64.sub - local.set $6 - local.get $2 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.get $3 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - f64.mul - local.get $2 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.get $3 + (local $10 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $10 + local.get $0 + i32.store + local.get $10 + local.get $1 + i32.store offset=4 + local.get $0 i32.const 0 call $~lib/typedarray/Float64Array#__get - f64.mul - f64.sub - local.set $7 - local.get $2 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.get $3 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - f64.mul - local.get $2 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.get $3 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - f64.mul - f64.sub - local.set $8 - local.get $2 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.get $3 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - f64.mul - local.get $2 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.get $3 + local.set $2 + local.get $0 i32.const 1 call $~lib/typedarray/Float64Array#__get - f64.mul - f64.sub - local.set $9 - local.get $2 + local.set $3 + local.get $0 i32.const 2 call $~lib/typedarray/Float64Array#__get - local.get $3 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - f64.mul - local.get $2 + local.set $4 + local.get $0 i32.const 3 call $~lib/typedarray/Float64Array#__get - local.get $3 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - f64.mul - f64.sub - local.set $10 + local.set $5 local.get $1 i32.const 0 call $~lib/typedarray/Float64Array#__get - local.set $4 - local.get $0 - i32.const 0 + local.set $6 local.get $1 i32.const 1 call $~lib/typedarray/Float64Array#__get - local.tee $11 - local.get $10 - f64.mul + local.set $7 local.get $1 i32.const 2 call $~lib/typedarray/Float64Array#__get - local.tee $12 - local.get $9 - f64.mul - f64.sub + local.set $8 local.get $1 i32.const 3 call $~lib/typedarray/Float64Array#__get - local.tee $13 - local.get $8 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - local.get $4 - local.get $10 - f64.mul - f64.neg - local.get $12 - local.get $7 - f64.mul - f64.add - local.get $13 + local.set $9 + local.get $2 local.get $6 - f64.mul - f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - local.get $4 - local.get $9 - f64.mul - local.get $11 - local.get $7 - f64.mul f64.sub - local.get $13 - local.get $5 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - local.get $4 - local.get $8 - f64.mul - f64.neg - local.get $11 + f64.abs + f64.const 1 + local.get $2 + f64.abs local.get $6 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 f64.mul - f64.add - local.get $12 - local.get $5 - f64.mul - f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - ) - (func $assembly/vec4/random (param $0 i32) (param $1 f64) (result i32) - (local $2 f64) - (local $3 f64) - (local $4 f64) - (local $5 f64) - (local $6 f64) - (local $7 f64) - local.get $1 - f64.const 1 - local.get $1 - i64.reinterpret_f64 - i64.const 1 - i64.shl - i64.const 2 - i64.sub - i64.const -9007199254740994 - i64.le_u - select - local.set $1 - loop $do-continue|0 - i32.const 0 - global.set $~argumentsLength - global.get $assembly/common/RANDOM - i32.load - call_indirect $0 (type $none_=>_f64) - local.tee $2 - local.get $2 - f64.add - f64.const 1 - f64.sub - local.set $2 - i32.const 0 - global.set $~argumentsLength - local.get $2 - local.get $2 - f64.mul - global.get $assembly/common/RANDOM - i32.load - call_indirect $0 (type $none_=>_f64) - local.tee $3 + f64.le + if (result i32) local.get $3 - f64.add - f64.const 1 + local.get $7 f64.sub - local.tee $5 - local.get $5 - f64.mul - f64.add - local.tee $6 - f64.const 1 - f64.ge - br_if $do-continue|0 - end - loop $do-continue|1 - i32.const 0 - global.set $~argumentsLength - global.get $assembly/common/RANDOM - i32.load - call_indirect $0 (type $none_=>_f64) - local.tee $3 - local.get $3 - f64.add + f64.abs f64.const 1 - f64.sub - local.set $3 - i32.const 0 - global.set $~argumentsLength - local.get $3 local.get $3 + f64.abs + local.get $7 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 f64.mul - global.get $assembly/common/RANDOM - i32.load - call_indirect $0 (type $none_=>_f64) - local.tee $4 + f64.le + else + i32.const 0 + end + if (result i32) local.get $4 - f64.add - f64.const 1 + local.get $8 f64.sub - local.tee $4 + f64.abs + f64.const 1 local.get $4 + f64.abs + local.get $8 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 f64.mul - f64.add - local.tee $7 + f64.le + else + i32.const 0 + end + if (result i32) + local.get $5 + local.get $9 + f64.sub + f64.abs f64.const 1 - f64.ge - br_if $do-continue|1 + local.get $5 + f64.abs + local.get $9 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 end + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat2/multiplyScalar (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $3 local.get $0 - i32.const 0 - local.get $1 - local.get $2 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 + i32.store + local.get $3 local.get $1 - local.get $5 - f64.mul - call $~lib/typedarray/Float64Array#__set + i32.store offset=4 local.get $0 - i32.const 2 local.get $1 - local.get $3 - f64.mul - f64.const 1 - local.get $6 - f64.sub - local.get $7 - f64.div - f64.sqrt - local.tee $2 - f64.mul - call $~lib/typedarray/Float64Array#__set + local.get $2 + call $assembly/vec4/scale + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat2/multiplyScalarAndAdd (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + (local $4 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $4 local.get $0 - i32.const 3 + i32.store + local.get $4 local.get $1 + i32.store offset=4 local.get $4 - f64.mul local.get $2 - f64.mul - call $~lib/typedarray/Float64Array#__set + i32.store offset=8 local.get $0 - ) - (func $assembly/vec4/transformMat4 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 f64) - (local $4 f64) - (local $5 f64) - (local $6 f64) - local.get $1 i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.set $3 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.set $4 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.set $5 local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.set $6 - local.get $0 i32.const 0 + call $~lib/typedarray/Float64Array#__get local.get $2 i32.const 0 call $~lib/typedarray/Float64Array#__get local.get $3 f64.mul - local.get $2 - i32.const 4 - call $~lib/typedarray/Float64Array#__get - local.get $4 - f64.mul - f64.add - local.get $2 - i32.const 8 - call $~lib/typedarray/Float64Array#__get - local.get $5 - f64.mul - f64.add - local.get $2 - i32.const 12 - call $~lib/typedarray/Float64Array#__get - local.get $6 - f64.mul f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 - local.get $2 + local.get $1 i32.const 1 call $~lib/typedarray/Float64Array#__get - local.get $3 - f64.mul - local.get $2 - i32.const 5 - call $~lib/typedarray/Float64Array#__get - local.get $4 - f64.mul - f64.add - local.get $2 - i32.const 9 - call $~lib/typedarray/Float64Array#__get - local.get $5 - f64.mul - f64.add local.get $2 - i32.const 13 + i32.const 1 call $~lib/typedarray/Float64Array#__get - local.get $6 + local.get $3 f64.mul f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 - local.get $2 + local.get $1 i32.const 2 call $~lib/typedarray/Float64Array#__get - local.get $3 - f64.mul - local.get $2 - i32.const 6 - call $~lib/typedarray/Float64Array#__get - local.get $4 - f64.mul - f64.add - local.get $2 - i32.const 10 - call $~lib/typedarray/Float64Array#__get - local.get $5 - f64.mul - f64.add local.get $2 - i32.const 14 + i32.const 2 call $~lib/typedarray/Float64Array#__get - local.get $6 + local.get $3 f64.mul f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 3 - local.get $2 + local.get $1 i32.const 3 call $~lib/typedarray/Float64Array#__get - local.get $3 - f64.mul - local.get $2 - i32.const 7 - call $~lib/typedarray/Float64Array#__get - local.get $4 - f64.mul - f64.add local.get $2 - i32.const 11 + i32.const 3 call $~lib/typedarray/Float64Array#__get - local.get $5 + local.get $3 f64.mul f64.add + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat2d/clone (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + block $folding-inner0 + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + local.tee $1 + local.get $0 + i32.store + local.get $1 + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + local.tee $1 + i32.const 0 + i32.store + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#constructor + local.tee $1 + i32.store + local.get $1 + i32.const 0 + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 1 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 2 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 3 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 4 + local.get $0 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 5 + local.get $0 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + return + end + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + ) + (func $export:assembly/mat2d/copy (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $2 + local.get $0 + i32.store local.get $2 - i32.const 15 - call $~lib/typedarray/Float64Array#__get - local.get $6 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.store offset=4 local.get $0 - ) - (func $assembly/vec4/transformQuat (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 f64) - (local $4 f64) - (local $5 f64) - (local $6 f64) - (local $7 f64) - (local $8 f64) - (local $9 f64) - (local $10 f64) - (local $11 f64) - (local $12 f64) + i32.const 0 local.get $1 i32.const 0 call $~lib/typedarray/Float64Array#__get - local.set $3 - local.get $1 + call $~lib/typedarray/Float64Array#__set + local.get $0 i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.set $8 local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.set $9 - local.get $2 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.set $4 - local.get $2 i32.const 1 call $~lib/typedarray/Float64Array#__get - local.set $5 - local.get $2 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 i32.const 2 call $~lib/typedarray/Float64Array#__get - local.set $6 + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 0 - local.get $2 + i32.const 3 + local.get $1 i32.const 3 call $~lib/typedarray/Float64Array#__get - local.tee $7 - local.get $3 - f64.mul - local.get $5 - local.get $9 - f64.mul - f64.add - local.get $6 - local.get $8 - f64.mul - f64.sub - local.tee $10 - local.get $7 - f64.mul - local.get $4 - f64.neg - local.get $3 - f64.mul - local.get $5 - local.get $8 - f64.mul - f64.sub - local.get $6 - local.get $9 - f64.mul - f64.sub - local.tee $11 - local.get $4 - f64.neg - f64.mul - f64.add - local.get $7 - local.get $8 - f64.mul - local.get $6 - local.get $3 - f64.mul - f64.add - local.get $4 - local.get $9 - f64.mul - f64.sub - local.tee $12 - local.get $6 - f64.neg - f64.mul - f64.add - local.get $7 - local.get $9 - f64.mul - local.get $4 - local.get $8 - f64.mul - f64.add - local.get $5 - local.get $3 - f64.mul - f64.sub - local.tee $3 - local.get $5 - f64.neg - f64.mul - f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - local.get $12 - local.get $7 - f64.mul - local.get $11 - local.get $5 - f64.neg - f64.mul - f64.add - local.get $3 - local.get $4 - f64.neg - f64.mul - f64.add - local.get $10 - local.get $6 - f64.neg - f64.mul - f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 2 - local.get $3 - local.get $7 - f64.mul - local.get $11 - local.get $6 - f64.neg - f64.mul - f64.add - local.get $10 - local.get $5 - f64.neg - f64.mul - f64.add - local.get $12 - local.get $4 - f64.neg - f64.mul - f64.sub + i32.const 4 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 3 + i32.const 5 local.get $1 - i32.const 3 + i32.const 5 call $~lib/typedarray/Float64Array#__get call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $~lib/rt/__visit_members (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - block $folding-inner2 - block $folding-inner1 - block $folding-inner0 - block $invalid - block $assembly/mat4/Fov - block $~lib/array/Array<~lib/typedarray/Float64Array> - block $~lib/object/Object - block $assembly/imports/IArguments - block $~lib/string/String - block $~lib/arraybuffer/ArrayBuffer - local.get $0 - i32.const 8 - i32.sub - i32.load - br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $folding-inner2 $folding-inner0 $folding-inner2 $folding-inner0 $folding-inner0 $folding-inner0 $assembly/imports/IArguments $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $~lib/object/Object $~lib/array/Array<~lib/typedarray/Float64Array> $folding-inner1 $assembly/mat4/Fov $folding-inner1 $invalid - end - return - end - return - end - return - end - return - end - local.get $0 - i32.load offset=4 - local.tee $1 - local.get $0 - i32.load offset=12 - i32.const 2 - i32.shl - i32.add - local.set $2 - loop $while-continue|0 - local.get $1 - local.get $2 - i32.lt_u - if - local.get $1 - i32.load - local.tee $3 - if - local.get $3 - call $~lib/rt/itcms/__visit - end - local.get $1 - i32.const 4 - i32.add - local.set $1 - br $while-continue|0 - end - end - local.get $0 - i32.load - call $~lib/rt/itcms/__visit - return - end - return - end - unreachable - end - local.get $0 - i32.load offset=4 - call $~lib/rt/itcms/__visit - return - end - local.get $0 - i32.load - call $~lib/rt/itcms/__visit - return - end - local.get $0 - i32.load - local.tee $0 + (func $export:assembly/mat2d/identity (param $0 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s if - local.get $0 - call $~lib/rt/itcms/__visit + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable end - ) - (func $~setArgumentsLength (param $0 i32) + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store local.get $0 - global.set $~argumentsLength - ) - (func $~start - memory.size - i32.const 16 - i32.shl - i32.const 22524 - i32.sub - i32.const 1 - i32.shr_u - global.set $~lib/rt/itcms/threshold - i32.const 1808 - call $~lib/rt/itcms/initLazy - global.set $~lib/rt/itcms/pinSpace - i32.const 1840 - call $~lib/rt/itcms/initLazy - global.set $~lib/rt/itcms/toSpace - i32.const 1920 - call $~lib/rt/itcms/initLazy - global.set $~lib/rt/itcms/fromSpace - call $assembly/vec3/create - global.set $assembly/vec3/vec - i32.const 0 - global.set $~argumentsLength - i32.const 2064 - i32.load - call_indirect $0 (type $none_=>_i32) - global.set $assembly/vec3/forEach - call $assembly/vec4/create - global.set $assembly/vec4/vec i32.const 0 - global.set $~argumentsLength - i32.const 2352 - i32.load - call_indirect $0 (type $none_=>_i32) - global.set $assembly/vec4/forEach - call $assembly/vec3/create - global.set $assembly/quat/tmpvec3 f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 f64.const 0 - call $assembly/vec3/fromValues - global.set $assembly/quat/xUnitVec3 - f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 f64.const 0 - call $assembly/vec3/fromValues - global.set $assembly/quat/yUnitVec3 - i32.const 0 - global.set $~argumentsLength - i32.const 2976 - i32.load - call_indirect $0 (type $none_=>_i32) - global.set $assembly/quat/rotationTo - call $assembly/quat/create - global.set $assembly/quat/temp1 - call $assembly/quat/create - global.set $assembly/quat/temp2 - i32.const 0 - global.set $~argumentsLength - i32.const 3040 - i32.load - call_indirect $0 (type $none_=>_i32) - global.set $assembly/quat/sqlerp - call $assembly/mat3/create - global.set $assembly/quat/matr - i32.const 0 - global.set $~argumentsLength - i32.const 3104 - i32.load - call_indirect $0 (type $none_=>_i32) - global.set $assembly/quat/setAxes - call $assembly/vec2/create - global.set $assembly/vec2/vec - i32.const 0 - global.set $~argumentsLength - i32.const 3648 - i32.load - call_indirect $0 (type $none_=>_i32) - global.set $assembly/vec2/forEach + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 ) - (func $~stack_check + (func $export:assembly/mat2d/set (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 6140 + i32.const 12652 i32.lt_s if - i32.const 22544 - i32.const 22592 + i32.const 29056 + i32.const 29104 i32.const 1 i32.const 1 call $~lib/builtins/abort unreachable end - ) - (func $start:assembly/vec3~anonymous|0~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (result i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - local.get $1 - i32.const 3 - local.get $1 - select - local.set $8 - local.get $2 + local.get $0 + i32.store + local.get $0 i32.const 0 + local.get $1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 local.get $2 - select - local.set $2 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 local.get $3 - if (result i32) - local.get $2 - local.get $3 - local.get $8 - i32.mul - i32.add - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - call $assembly/imports/MathUtil.min - else - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - end - local.set $1 - loop $for-loop|0 - local.get $1 - local.get $2 - i32.gt_s - if - global.get $~lib/memory/__stack_pointer - global.get $assembly/vec3/vec - local.tee $3 - i32.store - local.get $3 - i32.const 0 - local.get $0 - local.get $2 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - global.get $~lib/memory/__stack_pointer - global.get $assembly/vec3/vec - local.tee $3 - i32.store - local.get $3 - i32.const 1 - local.get $0 - local.get $2 - i32.const 1 - i32.add - local.tee $3 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - global.get $~lib/memory/__stack_pointer - global.get $assembly/vec3/vec - local.tee $7 - i32.store - local.get $7 - i32.const 2 - local.get $0 - local.get $2 - i32.const 2 - i32.add - local.tee $7 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - global.get $~lib/memory/__stack_pointer - global.get $assembly/vec3/vec - local.tee $6 - i32.store - global.get $~lib/memory/__stack_pointer - global.get $assembly/vec3/vec - local.tee $9 - i32.store offset=4 - i32.const 3 - global.set $~argumentsLength - local.get $6 - local.get $9 - local.get $5 - local.get $4 - i32.load - call_indirect $0 (type $i32_i32_i32_=>_none) - global.get $~lib/memory/__stack_pointer - global.get $assembly/vec3/vec - local.tee $6 - i32.store - local.get $0 - local.get $2 - local.get $6 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - global.get $~lib/memory/__stack_pointer - global.get $assembly/vec3/vec - local.tee $6 - i32.store - local.get $0 - local.get $3 - local.get $6 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - global.get $~lib/memory/__stack_pointer - global.get $assembly/vec3/vec - local.tee $3 - i32.store - local.get $0 - local.get $7 - local.get $3 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $2 - local.get $8 - i32.add - local.set $2 - br $for-loop|0 - end - end + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $4 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $5 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $6 + call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 4 i32.add global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $start:assembly/vec4~anonymous|0~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (result i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) + (func $export:assembly/mat2d/invert (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) (local $9 i32) - (local $10 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $9 + local.get $0 + i32.store + local.get $9 local.get $1 - i32.const 4 + i32.store offset=4 local.get $1 - select - local.set $9 - local.get $2 i32.const 0 - local.get $2 - select - local.set $2 - local.get $3 - if (result i32) - local.get $2 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $8 + block $__inlined_func$assembly/mat2d/invert local.get $3 - local.get $9 - i32.mul - i32.add + local.get $6 + f64.mul + local.get $4 + local.get $5 + f64.mul + f64.sub + local.tee $2 + i64.reinterpret_f64 + i64.const 1 + i64.shl + i64.const 2 + i64.sub + i64.const -9007199254740994 + i64.gt_u + if + i32.const 0 + local.set $0 + br $__inlined_func$assembly/mat2d/invert + end local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - call $assembly/imports/MathUtil.min - else + i32.const 0 + local.get $6 + f64.const 1 + local.get $2 + f64.div + local.tee $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $4 + f64.neg + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $5 + f64.neg + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.load offset=8 i32.const 3 - i32.shr_u - end - local.set $1 - loop $for-loop|0 - local.get $1 + local.get $3 local.get $2 - i32.gt_s - if - global.get $~lib/memory/__stack_pointer - global.get $assembly/vec4/vec - local.tee $3 - i32.store - local.get $3 - i32.const 0 - local.get $0 - local.get $2 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - global.get $~lib/memory/__stack_pointer - global.get $assembly/vec4/vec - local.tee $3 - i32.store - local.get $3 - i32.const 1 - local.get $0 - local.get $2 - i32.const 1 - i32.add - local.tee $3 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - global.get $~lib/memory/__stack_pointer - global.get $assembly/vec4/vec - local.tee $7 - i32.store - local.get $7 - i32.const 2 - local.get $0 - local.get $2 - i32.const 2 - i32.add - local.tee $7 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - global.get $~lib/memory/__stack_pointer - global.get $assembly/vec4/vec - local.tee $8 - i32.store - local.get $8 - i32.const 3 - local.get $0 - local.get $2 - i32.const 3 - i32.add - local.tee $8 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - global.get $~lib/memory/__stack_pointer - global.get $assembly/vec4/vec - local.tee $6 - i32.store - global.get $~lib/memory/__stack_pointer - global.get $assembly/vec4/vec - local.tee $10 - i32.store offset=4 - i32.const 3 - global.set $~argumentsLength - local.get $6 - local.get $10 - local.get $5 - local.get $4 - i32.load - call_indirect $0 (type $i32_i32_i32_=>_none) - global.get $~lib/memory/__stack_pointer - global.get $assembly/vec4/vec - local.tee $6 - i32.store - local.get $0 - local.get $2 - local.get $6 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - global.get $~lib/memory/__stack_pointer - global.get $assembly/vec4/vec - local.tee $6 - i32.store - local.get $0 - local.get $3 - local.get $6 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - global.get $~lib/memory/__stack_pointer - global.get $assembly/vec4/vec - local.tee $3 - i32.store - local.get $0 - local.get $7 - local.get $3 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - global.get $~lib/memory/__stack_pointer - global.get $assembly/vec4/vec - local.tee $3 - i32.store - local.get $0 - local.get $8 - local.get $3 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $2 - local.get $9 - i32.add - local.set $2 - br $for-loop|0 - end + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $5 + local.get $8 + f64.mul + local.get $6 + local.get $7 + f64.mul + f64.sub + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $4 + local.get $7 + f64.mul + local.get $3 + local.get $8 + f64.mul + f64.sub + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set end global.get $~lib/memory/__stack_pointer i32.const 8 @@ -22542,2945 +22303,2743 @@ global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $start:assembly/quat~anonymous|0~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $export:assembly/mat2d/determinant (param $0 i32) (result f64) + (local $1 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.mul + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.sub + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat2d/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 f64) global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $3 + local.get $0 + i32.store + local.get $3 local.get $1 + i32.store offset=4 + local.get $3 local.get $2 - call $assembly/vec3/dot - local.tee $4 - f64.const -0.999999 - f64.lt + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + call $assembly/mat2d/multiply + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat2d/rotate (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 i32) + (local $9 f64) + (local $10 f64) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s if - global.get $~lib/memory/__stack_pointer - global.get $assembly/quat/tmpvec3 - local.tee $2 - i32.store - local.get $2 - global.get $~lib/memory/__stack_pointer - global.get $assembly/quat/xUnitVec3 - local.tee $2 - i32.store offset=4 - local.get $2 - local.get $1 - call $assembly/vec3/cross - drop - global.get $~lib/memory/__stack_pointer - global.get $assembly/quat/tmpvec3 - local.tee $2 - i32.store + i32.const 29056 + i32.const 29104 i32.const 1 - global.set $~argumentsLength - local.get $2 - i32.const 1520 - i32.load - call_indirect $0 (type $i32_=>_f64) - f64.const 1e-06 - f64.lt - if - global.get $~lib/memory/__stack_pointer - global.get $assembly/quat/tmpvec3 - local.tee $2 - i32.store - local.get $2 - global.get $~lib/memory/__stack_pointer - global.get $assembly/quat/yUnitVec3 - local.tee $2 - i32.store offset=4 - local.get $2 - local.get $1 - call $assembly/vec3/cross - drop - end - global.get $~lib/memory/__stack_pointer - global.get $assembly/quat/tmpvec3 - local.tee $1 - i32.store - local.get $1 - global.get $~lib/memory/__stack_pointer - global.get $assembly/quat/tmpvec3 - local.tee $1 - i32.store offset=4 - local.get $1 - call $assembly/vec3/normalize - drop - global.get $~lib/memory/__stack_pointer - global.get $assembly/quat/tmpvec3 - local.tee $1 - i32.store offset=4 - local.get $0 - local.get $1 - f64.const 3.141592653589793 - call $assembly/quat/setAxisAngle - drop - else - local.get $4 - f64.const 0.999999 - f64.gt - if - local.get $0 - i32.const 0 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - f64.const 1 - call $~lib/typedarray/Float64Array#__set - else - global.get $~lib/memory/__stack_pointer - global.get $assembly/quat/tmpvec3 - local.tee $3 - i32.store - local.get $3 - local.get $1 - local.get $2 - call $assembly/vec3/cross - drop - global.get $~lib/memory/__stack_pointer - global.get $assembly/quat/tmpvec3 - local.tee $1 - i32.store - local.get $0 - i32.const 0 - local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - global.get $~lib/memory/__stack_pointer - global.get $assembly/quat/tmpvec3 - local.tee $1 - i32.store - local.get $0 - i32.const 1 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - global.get $~lib/memory/__stack_pointer - global.get $assembly/quat/tmpvec3 - local.tee $1 - i32.store - local.get $0 - i32.const 2 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - local.get $4 - f64.const 1 - f64.add - call $~lib/typedarray/Float64Array#__set - i32.const 2 - global.set $~argumentsLength - local.get $0 - local.get $0 - i32.const 2672 - i32.load - call_indirect $0 (type $i32_i32_=>_i32) - local.set $0 - end + i32.const 1 + call $~lib/builtins/abort + unreachable end global.get $~lib/memory/__stack_pointer + local.tee $8 + local.get $0 + i32.store + local.get $8 + local.get $1 + i32.store offset=4 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $2 + call $~lib/math/NativeMath.sin + local.set $3 + local.get $0 + i32.const 0 + local.get $4 + local.get $2 + call $~lib/math/NativeMath.cos + local.tee $2 + f64.mul + local.get $6 + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $5 + local.get $2 + f64.mul + local.get $7 + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $4 + local.get $3 + f64.neg + local.tee $3 + f64.mul + local.get $6 + local.get $2 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $5 + local.get $3 + f64.mul + local.get $7 + local.get $2 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $9 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $10 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $start:assembly/quat~anonymous|1~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 f64) (result i32) - (local $6 i32) + (func $export:assembly/mat2d/scale (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store offset=8 global.get $~lib/memory/__stack_pointer - global.get $assembly/quat/temp1 - local.tee $6 - i32.store - local.get $6 - local.get $1 - local.get $4 - local.get $5 - call $assembly/quat/slerp - drop + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer - global.get $assembly/quat/temp2 - local.tee $1 + local.tee $3 + local.get $0 i32.store - local.get $1 - local.get $2 local.get $3 - local.get $5 - call $assembly/quat/slerp - drop - global.get $~lib/memory/__stack_pointer - global.get $assembly/quat/temp1 - local.tee $1 + local.get $1 i32.store offset=4 - global.get $~lib/memory/__stack_pointer - global.get $assembly/quat/temp2 - local.tee $2 + local.get $3 + local.get $2 i32.store offset=8 - local.get $0 local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $11 local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $0 + i32.const 0 + local.get $6 + local.get $4 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $7 + local.get $4 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $8 local.get $5 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $9 local.get $5 - f64.add - f64.const 1 - local.get $5 - f64.sub f64.mul - call $assembly/quat/slerp - drop + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $10 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $11 + call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer i32.const 12 i32.add global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $start:assembly/quat~anonymous|2~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - (local $4 i32) + (func $export:assembly/mat2d/translate (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store offset=8 + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer - global.get $assembly/quat/matr - local.tee $4 + local.tee $3 + local.get $0 i32.store - local.get $4 - i32.const 0 + local.get $3 + local.get $1 + i32.store offset=4 + local.get $3 local.get $2 + i32.store offset=8 + local.get $1 i32.const 0 call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - global.get $~lib/memory/__stack_pointer - global.get $assembly/quat/matr - local.tee $4 - i32.store - local.get $4 - i32.const 3 - local.get $2 + local.set $4 + local.get $1 i32.const 1 call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - global.get $~lib/memory/__stack_pointer - global.get $assembly/quat/matr - local.tee $4 - i32.store - local.get $4 - i32.const 6 - local.get $2 + local.set $5 + local.get $1 i32.const 2 call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - global.get $~lib/memory/__stack_pointer - global.get $assembly/quat/matr - local.tee $2 - i32.store + local.set $6 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $11 local.get $2 - i32.const 1 - local.get $3 i32.const 0 call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - global.get $~lib/memory/__stack_pointer - global.get $assembly/quat/matr - local.tee $2 - i32.store + local.set $8 local.get $2 - i32.const 4 - local.get $3 i32.const 1 call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $0 + i32.const 0 + local.get $4 call $~lib/typedarray/Float64Array#__set - global.get $~lib/memory/__stack_pointer - global.get $assembly/quat/matr - local.tee $2 - i32.store - local.get $2 - i32.const 7 - local.get $3 + local.get $0 + i32.const 1 + local.get $5 + call $~lib/typedarray/Float64Array#__set + local.get $0 i32.const 2 - call $~lib/typedarray/Float64Array#__get + local.get $6 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $7 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $4 + local.get $8 + f64.mul + local.get $6 + local.get $9 + f64.mul + f64.add + local.get $10 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $5 + local.get $8 + f64.mul + local.get $7 + local.get $9 + f64.mul + f64.add + local.get $11 + f64.add call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - global.get $assembly/quat/matr - local.tee $2 + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat2d/fromRotation (param $0 i32) (param $1 f64) (result i32) + (local $2 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.get $0 i32.store - local.get $2 - i32.const 2 local.get $1 + call $~lib/math/NativeMath.sin + local.set $2 + local.get $0 i32.const 0 - call $~lib/typedarray/Float64Array#__get - f64.neg - call $~lib/typedarray/Float64Array#__set - global.get $~lib/memory/__stack_pointer - global.get $assembly/quat/matr - local.tee $2 - i32.store - local.get $2 - i32.const 5 local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - f64.neg + call $~lib/math/NativeMath.cos + local.tee $1 call $~lib/typedarray/Float64Array#__set - global.get $~lib/memory/__stack_pointer - global.get $assembly/quat/matr - local.tee $2 - i32.store + local.get $0 + i32.const 1 local.get $2 - i32.const 8 - local.get $1 + call $~lib/typedarray/Float64Array#__set + local.get $0 i32.const 2 - call $~lib/typedarray/Float64Array#__get + local.get $2 f64.neg call $~lib/typedarray/Float64Array#__set local.get $0 - local.set $1 - global.get $~lib/memory/__stack_pointer - global.get $assembly/quat/matr - local.tee $0 - i32.store offset=8 + i32.const 3 local.get $1 + call $~lib/typedarray/Float64Array#__set local.get $0 - call $assembly/quat/fromMat3 - local.set $0 - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store offset=4 - i32.const 2 - global.set $~argumentsLength - local.get $1 + i32.const 4 + f64.const 0 + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 2672 - i32.load - call_indirect $0 (type $i32_i32_=>_i32) + i32.const 5 + f64.const 0 + call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - i32.const 12 + i32.const 4 i32.add global.set $~lib/memory/__stack_pointer + local.get $0 ) - (func $start:assembly/vec2~anonymous|0~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (result i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) + (func $export:assembly/mat2d/fromScaling (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $2 + local.get $0 + i32.store + local.get $2 local.get $1 - i32.const 2 + i32.store offset=4 + local.get $0 + i32.const 0 local.get $1 - select - local.set $7 - local.get $2 i32.const 0 - local.get $2 - select - local.set $2 - local.get $3 - if (result i32) - local.get $2 - local.get $3 - local.get $7 - i32.mul - i32.add - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - call $assembly/imports/MathUtil.min - else - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - end - local.set $1 - loop $for-loop|0 - local.get $1 - local.get $2 - i32.gt_s - if - global.get $~lib/memory/__stack_pointer - global.get $assembly/vec2/vec - local.tee $3 - i32.store - local.get $3 - i32.const 0 - local.get $0 - local.get $2 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - global.get $~lib/memory/__stack_pointer - global.get $assembly/vec2/vec - local.tee $3 - i32.store - local.get $3 - i32.const 1 - local.get $0 - local.get $2 - i32.const 1 - i32.add - local.tee $3 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - global.get $~lib/memory/__stack_pointer - global.get $assembly/vec2/vec - local.tee $6 - i32.store - global.get $~lib/memory/__stack_pointer - global.get $assembly/vec2/vec - local.tee $8 - i32.store offset=4 - i32.const 3 - global.set $~argumentsLength - local.get $6 - local.get $8 - local.get $5 - local.get $4 - i32.load - call_indirect $0 (type $i32_i32_i32_=>_none) - global.get $~lib/memory/__stack_pointer - global.get $assembly/vec2/vec - local.tee $6 - i32.store - local.get $0 - local.get $2 - local.get $6 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - global.get $~lib/memory/__stack_pointer - global.get $assembly/vec2/vec - local.tee $6 - i32.store - local.get $0 - local.get $3 - local.get $6 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $2 - local.get $7 - i32.add - local.set $2 - br $for-loop|0 - end - end + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 0 + call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $assembly/mat2/str (param $0 i32) (result i32) - (local $1 i32) + (func $export:assembly/mat2d/fromTranslation (param $0 i32) (param $1 i32) (result i32) (local $2 i32) global.get $~lib/memory/__stack_pointer - i32.const -64 - i32.add + i32.const 8 + i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=16 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=24 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=32 global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=40 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=48 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=56 + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer - i32.const 3872 - i32.store offset=56 + local.tee $2 local.get $0 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - call $~lib/number/F64#toString - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=60 - i32.const 3872 - local.get $1 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=48 - global.get $~lib/memory/__stack_pointer - i32.const 5072 - i32.store offset=52 - local.get $1 - i32.const 5072 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer + i32.store + local.get $2 local.get $1 - i32.store offset=40 + i32.store offset=4 + local.get $0 + i32.const 0 + f64.const 1 + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 - call $~lib/typedarray/Float64Array#__get - call $~lib/number/F64#toString - local.set $2 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=44 - local.get $1 - local.get $2 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=32 - global.get $~lib/memory/__stack_pointer - i32.const 5072 - i32.store offset=36 - local.get $1 - i32.const 5072 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=24 + f64.const 0 + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 - call $~lib/typedarray/Float64Array#__get - call $~lib/number/F64#toString - local.set $2 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=28 - local.get $1 - local.get $2 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=16 - global.get $~lib/memory/__stack_pointer - i32.const 5072 - i32.store offset=20 - local.get $1 - i32.const 5072 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=8 + f64.const 0 + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 3 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 0 call $~lib/typedarray/Float64Array#__get - call $~lib/number/F64#toString - local.set $0 - global.get $~lib/memory/__stack_pointer + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.store offset=12 + i32.const 5 local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer local.get $0 - call $~lib/string/String.__concat - local.set $0 + ) + (func $export:assembly/mat2d/str (param $0 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer local.get $0 i32.store - global.get $~lib/memory/__stack_pointer - i32.const 5104 - i32.store offset=4 local.get $0 - i32.const 5104 - call $~lib/string/String.__concat + call $assembly/mat2d/str global.get $~lib/memory/__stack_pointer - i32.const -64 - i32.sub + i32.const 4 + i32.add global.set $~lib/memory/__stack_pointer ) - (func $assembly/mat2d/str (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) + (func $export:assembly/mat2d/frob (param $0 i32) (result f64) + (local $1 f64) global.get $~lib/memory/__stack_pointer - i32.const 96 + i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=16 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=24 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=32 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=40 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=48 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=56 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=64 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=72 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=80 global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=88 + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer - i32.const 5136 - i32.store offset=88 + local.get $0 + i32.store local.get $0 i32.const 0 call $~lib/typedarray/Float64Array#__get - call $~lib/number/F64#toString - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=92 - i32.const 5136 - local.get $1 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=80 - global.get $~lib/memory/__stack_pointer - i32.const 5072 - i32.store offset=84 - local.get $1 - i32.const 5072 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=72 local.get $0 i32.const 1 call $~lib/typedarray/Float64Array#__get - call $~lib/number/F64#toString - local.set $2 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=76 - local.get $1 - local.get $2 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=64 - global.get $~lib/memory/__stack_pointer - i32.const 5072 - i32.store offset=68 - local.get $1 - i32.const 5072 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=56 local.get $0 i32.const 2 call $~lib/typedarray/Float64Array#__get - call $~lib/number/F64#toString - local.set $2 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + f64.const 1 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $assembly/imports/MathUtil.hypot global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=60 - local.get $1 - local.get $2 - call $~lib/string/String.__concat - local.set $1 + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat2d/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=48 + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 5072 - i32.store offset=52 - local.get $1 - i32.const 5072 - call $~lib/string/String.__concat - local.set $1 + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer + local.tee $3 + local.get $0 + i32.store + local.get $3 local.get $1 - i32.store offset=40 + i32.store offset=4 + local.get $3 + local.get $2 + i32.store offset=8 local.get $0 - i32.const 3 + i32.const 0 + local.get $1 + i32.const 0 call $~lib/typedarray/Float64Array#__get - call $~lib/number/F64#toString - local.set $2 - global.get $~lib/memory/__stack_pointer local.get $2 - i32.store offset=44 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get local.get $2 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=32 - global.get $~lib/memory/__stack_pointer - i32.const 5072 - i32.store offset=36 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 local.get $1 - i32.const 5072 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 local.get $1 - i32.store offset=24 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 4 + local.get $1 + i32.const 4 call $~lib/typedarray/Float64Array#__get - call $~lib/number/F64#toString - local.set $2 - global.get $~lib/memory/__stack_pointer local.get $2 - i32.store offset=28 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get local.get $2 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=16 - global.get $~lib/memory/__stack_pointer - i32.const 5072 - i32.store offset=20 - local.get $1 - i32.const 5072 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=8 - local.get $0 i32.const 5 call $~lib/typedarray/Float64Array#__get - call $~lib/number/F64#toString - local.set $0 + f64.add + call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer local.get $0 - i32.store offset=12 - local.get $1 - local.get $0 - call $~lib/string/String.__concat - local.set $0 + ) + (func $export:assembly/mat2d/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer + local.tee $3 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer - i32.const 5104 + local.get $3 + local.get $1 i32.store offset=4 + local.get $3 + local.get $2 + i32.store offset=8 local.get $0 - i32.const 5104 - call $~lib/string/String.__concat + local.get $1 + local.get $2 + call $assembly/mat2d/subtract global.get $~lib/memory/__stack_pointer - i32.const 96 + i32.const 12 i32.add global.set $~lib/memory/__stack_pointer ) - (func $assembly/mat3/str (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) + (func $export:assembly/mat2d/multiplyScalar (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 i32) global.get $~lib/memory/__stack_pointer - i32.const 144 + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=16 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=24 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=32 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=40 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=48 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=56 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=64 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=72 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=80 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=88 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=96 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=104 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=112 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=120 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=128 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=136 - global.get $~lib/memory/__stack_pointer - i32.const 5168 - i32.store offset=136 - local.get $0 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - call $~lib/number/F64#toString - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=140 - i32.const 5168 - local.get $1 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=128 global.get $~lib/memory/__stack_pointer - i32.const 5072 - i32.store offset=132 - local.get $1 - i32.const 5072 - call $~lib/string/String.__concat - local.set $1 + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer + local.tee $3 + local.get $0 + i32.store + local.get $3 local.get $1 - i32.store offset=120 + i32.store offset=4 local.get $0 - i32.const 1 + i32.const 0 + local.get $1 + i32.const 0 call $~lib/typedarray/Float64Array#__get - call $~lib/number/F64#toString - local.set $2 - global.get $~lib/memory/__stack_pointer local.get $2 - i32.store offset=124 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get local.get $2 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=112 - global.get $~lib/memory/__stack_pointer - i32.const 5072 - i32.store offset=116 - local.get $1 - i32.const 5072 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=104 + f64.mul + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 - call $~lib/typedarray/Float64Array#__get - call $~lib/number/F64#toString - local.set $2 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=108 local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get local.get $2 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=96 - global.get $~lib/memory/__stack_pointer - i32.const 5072 - i32.store offset=100 - local.get $1 - i32.const 5072 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=88 + f64.mul + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 3 - call $~lib/typedarray/Float64Array#__get - call $~lib/number/F64#toString - local.set $2 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=92 local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get local.get $2 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=80 - global.get $~lib/memory/__stack_pointer - i32.const 5072 - i32.store offset=84 - local.get $1 - i32.const 5072 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=72 + f64.mul + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 4 - call $~lib/typedarray/Float64Array#__get - call $~lib/number/F64#toString - local.set $2 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=76 local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get local.get $2 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=64 - global.get $~lib/memory/__stack_pointer - i32.const 5072 - i32.store offset=68 - local.get $1 - i32.const 5072 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=56 + f64.mul + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 5 - call $~lib/typedarray/Float64Array#__get - call $~lib/number/F64#toString - local.set $2 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=60 local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get local.get $2 - call $~lib/string/String.__concat - local.set $1 + f64.mul + call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=48 + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat2d/multiplyScalarAndAdd (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + (local $4 i32) global.get $~lib/memory/__stack_pointer - i32.const 5072 - i32.store offset=52 - local.get $1 - i32.const 5072 - call $~lib/string/String.__concat - local.set $1 + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer + local.tee $4 + local.get $0 + i32.store + local.get $4 local.get $1 - i32.store offset=40 + i32.store offset=4 + local.get $4 + local.get $2 + i32.store offset=8 local.get $0 - i32.const 6 + i32.const 0 + local.get $1 + i32.const 0 call $~lib/typedarray/Float64Array#__get - call $~lib/number/F64#toString - local.set $2 - global.get $~lib/memory/__stack_pointer local.get $2 - i32.store offset=44 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get local.get $2 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=32 - global.get $~lib/memory/__stack_pointer - i32.const 5072 - i32.store offset=36 - local.get $1 - i32.const 5072 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=24 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 7 + i32.const 2 + local.get $1 + i32.const 2 call $~lib/typedarray/Float64Array#__get - call $~lib/number/F64#toString - local.set $2 - global.get $~lib/memory/__stack_pointer local.get $2 - i32.store offset=28 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get local.get $2 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=16 - global.get $~lib/memory/__stack_pointer - i32.const 5072 - i32.store offset=20 - local.get $1 - i32.const 5072 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=8 - local.get $0 - i32.const 8 + i32.const 3 call $~lib/typedarray/Float64Array#__get - call $~lib/number/F64#toString - local.set $0 - global.get $~lib/memory/__stack_pointer + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.store offset=12 + i32.const 4 local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set local.get $0 - call $~lib/string/String.__concat - local.set $0 - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer - i32.const 5104 - i32.store offset=4 - local.get $0 - i32.const 5104 - call $~lib/string/String.__concat + i32.const 5 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - i32.const 144 + i32.const 12 i32.add global.set $~lib/memory/__stack_pointer + local.get $0 ) - (func $assembly/mat4/str (param $0 i32) (result i32) - (local $1 i32) + (func $export:assembly/mat2d/exactEquals (param $0 i32) (param $1 i32) (result i32) (local $2 i32) global.get $~lib/memory/__stack_pointer - i32.const 256 + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=16 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=24 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=32 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=40 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=48 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=56 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=64 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=72 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=80 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=88 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=96 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=104 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=112 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=120 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=128 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=136 global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=144 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=152 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=160 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=168 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=176 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=184 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=192 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=200 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=208 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=216 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=224 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=232 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=240 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=248 + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer - i32.const 5200 - i32.store offset=248 + local.tee $2 local.get $0 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - call $~lib/number/F64#toString - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=252 - i32.const 5200 - local.get $1 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=240 - global.get $~lib/memory/__stack_pointer - i32.const 5072 - i32.store offset=244 - local.get $1 - i32.const 5072 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer + i32.store + local.get $2 local.get $1 - i32.store offset=232 + i32.store offset=4 local.get $0 - i32.const 1 + i32.const 0 call $~lib/typedarray/Float64Array#__get - call $~lib/number/F64#toString - local.set $2 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=236 local.get $1 - local.get $2 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=224 - global.get $~lib/memory/__stack_pointer - i32.const 5072 - i32.store offset=228 - local.get $1 - i32.const 5072 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=216 - local.get $0 - i32.const 2 + i32.const 0 call $~lib/typedarray/Float64Array#__get - call $~lib/number/F64#toString - local.set $2 + f64.eq + if (result i32) + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=220 - local.get $1 - local.get $2 - call $~lib/string/String.__concat - local.set $1 + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat2d/equals (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 i32) global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=208 + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 5072 - i32.store offset=212 - local.get $1 - i32.const 5072 - call $~lib/string/String.__concat - local.set $1 + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer + local.tee $14 + local.get $0 + i32.store + local.get $14 local.get $1 - i32.store offset=200 + i32.store offset=4 local.get $0 - i32.const 3 + i32.const 0 call $~lib/typedarray/Float64Array#__get - call $~lib/number/F64#toString local.set $2 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=204 - local.get $1 - local.get $2 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=192 - global.get $~lib/memory/__stack_pointer - i32.const 5072 - i32.store offset=196 - local.get $1 - i32.const 5072 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=184 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $5 local.get $0 i32.const 4 call $~lib/typedarray/Float64Array#__get - call $~lib/number/F64#toString - local.set $2 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=188 - local.get $1 - local.get $2 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=176 - global.get $~lib/memory/__stack_pointer - i32.const 5072 - i32.store offset=180 - local.get $1 - i32.const 5072 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=168 + local.set $6 local.get $0 i32.const 5 call $~lib/typedarray/Float64Array#__get - call $~lib/number/F64#toString - local.set $2 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=172 - local.get $1 - local.get $2 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=160 - global.get $~lib/memory/__stack_pointer - i32.const 5072 - i32.store offset=164 + local.set $7 local.get $1 - i32.const 5072 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $8 local.get $1 - i32.store offset=152 - local.get $0 - i32.const 6 + i32.const 1 call $~lib/typedarray/Float64Array#__get - call $~lib/number/F64#toString - local.set $2 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=156 + local.set $9 local.get $1 - local.get $2 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $10 local.get $1 - i32.store offset=144 - global.get $~lib/memory/__stack_pointer - i32.const 5072 - i32.store offset=148 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $11 local.get $1 - i32.const 5072 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $12 local.get $1 - i32.store offset=136 - local.get $0 - i32.const 7 + i32.const 5 call $~lib/typedarray/Float64Array#__get - call $~lib/number/F64#toString - local.set $2 - global.get $~lib/memory/__stack_pointer + local.set $13 local.get $2 - i32.store offset=140 - local.get $1 + local.get $8 + f64.sub + f64.abs + f64.const 1 local.get $2 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=128 - global.get $~lib/memory/__stack_pointer - i32.const 5072 - i32.store offset=132 - local.get $1 - i32.const 5072 - call $~lib/string/String.__concat - local.set $1 + f64.abs + local.get $8 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + if (result i32) + local.get $3 + local.get $9 + f64.sub + f64.abs + f64.const 1 + local.get $3 + f64.abs + local.get $9 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $4 + local.get $10 + f64.sub + f64.abs + f64.const 1 + local.get $4 + f64.abs + local.get $10 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $5 + local.get $11 + f64.sub + f64.abs + f64.const 1 + local.get $5 + f64.abs + local.get $11 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $6 + local.get $12 + f64.sub + f64.abs + f64.const 1 + local.get $6 + f64.abs + local.get $12 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $7 + local.get $13 + f64.sub + f64.abs + f64.const 1 + local.get $7 + f64.abs + local.get $13 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=120 - local.get $0 i32.const 8 - call $~lib/typedarray/Float64Array#__get - call $~lib/number/F64#toString - local.set $2 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=124 - local.get $1 - local.get $2 - call $~lib/string/String.__concat - local.set $1 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat3/fromMat4 (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=112 + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 5072 - i32.store offset=116 - local.get $1 - i32.const 5072 - call $~lib/string/String.__concat - local.set $1 + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=104 + local.tee $2 local.get $0 - i32.const 9 - call $~lib/typedarray/Float64Array#__get - call $~lib/number/F64#toString - local.set $2 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=108 - local.get $1 + i32.store local.get $2 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=96 - global.get $~lib/memory/__stack_pointer - i32.const 5072 - i32.store offset=100 - local.get $1 - i32.const 5072 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer local.get $1 - i32.store offset=88 + i32.store offset=4 local.get $0 - i32.const 10 - call $~lib/typedarray/Float64Array#__get - call $~lib/number/F64#toString - local.set $2 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=92 - local.get $1 - local.get $2 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=80 - global.get $~lib/memory/__stack_pointer - i32.const 5072 - i32.store offset=84 - local.get $1 - i32.const 5072 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer + i32.const 0 local.get $1 - i32.store offset=72 - local.get $0 - i32.const 11 + i32.const 0 call $~lib/typedarray/Float64Array#__get - call $~lib/number/F64#toString - local.set $2 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=76 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 local.get $1 - local.get $2 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 local.get $1 - i32.store offset=64 - global.get $~lib/memory/__stack_pointer - i32.const 5072 - i32.store offset=68 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 local.get $1 - i32.const 5072 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer + i32.const 4 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 local.get $1 - i32.store offset=56 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 12 + i32.const 5 + local.get $1 + i32.const 6 call $~lib/typedarray/Float64Array#__get - call $~lib/number/F64#toString - local.set $2 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=60 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 local.get $1 - local.get $2 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer + i32.const 8 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 local.get $1 - i32.store offset=48 - global.get $~lib/memory/__stack_pointer - i32.const 5072 - i32.store offset=52 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 local.get $1 - i32.const 5072 - call $~lib/string/String.__concat - local.set $1 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=40 + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer local.get $0 - i32.const 13 - call $~lib/typedarray/Float64Array#__get - call $~lib/number/F64#toString - local.set $2 + ) + (func $export:assembly/mat3/clone (param $0 i32) (result i32) + (local $1 i32) global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=44 - local.get $1 - local.get $2 - call $~lib/string/String.__concat - local.set $1 + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + block $folding-inner0 + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + local.tee $1 + local.get $0 + i32.store + local.get $1 + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + local.tee $1 + i32.const 0 + i32.store + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#constructor + local.tee $1 + i32.store + local.get $1 + i32.const 0 + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 1 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 2 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 3 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 4 + local.get $0 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 5 + local.get $0 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 6 + local.get $0 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 7 + local.get $0 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 8 + local.get $0 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + return + end + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + ) + (func $export:assembly/mat3/copy (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=32 + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 5072 - i32.store offset=36 - local.get $1 - i32.const 5072 - call $~lib/string/String.__concat - local.set $1 + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=24 + local.tee $2 local.get $0 - i32.const 14 - call $~lib/typedarray/Float64Array#__get - call $~lib/number/F64#toString - local.set $2 - global.get $~lib/memory/__stack_pointer + i32.store local.get $2 - i32.store offset=28 local.get $1 - local.get $2 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer + i32.store offset=4 + local.get $0 + i32.const 0 local.get $1 - i32.store offset=16 - global.get $~lib/memory/__stack_pointer - i32.const 5072 - i32.store offset=20 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 local.get $1 - i32.const 5072 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 local.get $1 - i32.store offset=8 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 15 + i32.const 3 + local.get $1 + i32.const 3 call $~lib/typedarray/Float64Array#__get - call $~lib/number/F64#toString - local.set $0 - global.get $~lib/memory/__stack_pointer + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.store offset=12 + i32.const 4 local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set local.get $0 - call $~lib/string/String.__concat - local.set $0 - global.get $~lib/memory/__stack_pointer + i32.const 5 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer - i32.const 5104 - i32.store offset=4 + i32.const 6 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 5104 - call $~lib/string/String.__concat + i32.const 7 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - i32.const 256 + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer + local.get $0 ) - (func $assembly/quat/fromEuler (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) - (local $5 f64) - (local $6 f64) - (local $7 f64) - (local $8 f64) - (local $9 f64) + (func $export:assembly/mat3/set (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (param $7 f64) (param $8 f64) (param $9 f64) (result i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer - i32.const 0 + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.get $0 i32.store + local.get $0 + i32.const 0 local.get $1 - f64.const 0.008726646259971648 - f64.mul - local.tee $5 - call $~lib/math/NativeMath.sin - local.set $1 - local.get $5 - call $~lib/math/NativeMath.cos - local.set $5 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 local.get $2 - f64.const 0.008726646259971648 - f64.mul - local.tee $7 - call $~lib/math/NativeMath.sin - local.set $2 - local.get $7 - call $~lib/math/NativeMath.cos - local.set $7 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 local.get $3 - f64.const 0.008726646259971648 - f64.mul - local.tee $6 - call $~lib/math/NativeMath.sin - local.set $3 - local.get $6 - call $~lib/math/NativeMath.cos - local.set $6 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 local.get $4 - i32.const 5232 - i32.eq + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $5 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $6 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $7 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $8 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $9 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat3/identity (param $0 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s if - local.get $0 - i32.const 0 - local.get $1 - local.get $7 - f64.mul - local.tee $8 - local.get $6 - f64.mul - local.get $5 - local.get $2 - f64.mul - local.tee $9 - local.get $3 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - local.get $9 - local.get $6 - f64.mul - local.get $8 - local.get $3 - f64.mul - f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - local.get $5 - local.get $7 - f64.mul - local.tee $5 - local.get $3 - f64.mul - local.get $1 - local.get $2 - f64.mul - local.tee $1 - local.get $6 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - local.get $5 - local.get $6 - f64.mul - local.get $1 - local.get $3 - f64.mul - f64.sub - call $~lib/typedarray/Float64Array#__set - else - local.get $4 - i32.const 5264 - i32.eq - if - local.get $0 - i32.const 0 - local.get $1 - local.get $7 - f64.mul - local.tee $8 - local.get $6 - f64.mul - local.get $5 - local.get $2 - f64.mul - local.tee $9 - local.get $3 - f64.mul - f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - local.get $9 - local.get $6 - f64.mul - local.get $8 - local.get $3 - f64.mul - f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - local.get $5 - local.get $7 - f64.mul - local.tee $5 - local.get $3 - f64.mul - local.get $1 - local.get $2 - f64.mul - local.tee $1 - local.get $6 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - local.get $5 - local.get $6 - f64.mul - local.get $1 - local.get $3 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - else - local.get $4 - i32.const 5296 - i32.eq - if - local.get $0 - i32.const 0 - local.get $1 - local.get $7 - f64.mul - local.tee $8 - local.get $6 - f64.mul - local.get $5 - local.get $2 - f64.mul - local.tee $9 - local.get $3 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - local.get $9 - local.get $6 - f64.mul - local.get $8 - local.get $3 - f64.mul - f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - local.get $5 - local.get $7 - f64.mul - local.tee $5 - local.get $3 - f64.mul - local.get $1 - local.get $2 - f64.mul - local.tee $1 - local.get $6 - f64.mul - f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - local.get $5 - local.get $6 - f64.mul - local.get $1 - local.get $3 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - else - local.get $4 - i32.const 5328 - i32.eq - if - local.get $0 - i32.const 0 - local.get $1 - local.get $7 - f64.mul - local.tee $8 - local.get $6 - f64.mul - local.get $5 - local.get $2 - f64.mul - local.tee $9 - local.get $3 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - local.get $9 - local.get $6 - f64.mul - local.get $8 - local.get $3 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - local.get $5 - local.get $7 - f64.mul - local.tee $5 - local.get $3 - f64.mul - local.get $1 - local.get $2 - f64.mul - local.tee $1 - local.get $6 - f64.mul - f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - local.get $5 - local.get $6 - f64.mul - local.get $1 - local.get $3 - f64.mul - f64.sub - call $~lib/typedarray/Float64Array#__set - else - local.get $4 - i32.const 5360 - i32.eq - if - local.get $0 - i32.const 0 - local.get $1 - local.get $7 - f64.mul - local.tee $8 - local.get $6 - f64.mul - local.get $5 - local.get $2 - f64.mul - local.tee $9 - local.get $3 - f64.mul - f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - local.get $9 - local.get $6 - f64.mul - local.get $8 - local.get $3 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - local.get $5 - local.get $7 - f64.mul - local.tee $5 - local.get $3 - f64.mul - local.get $1 - local.get $2 - f64.mul - local.tee $1 - local.get $6 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - local.get $5 - local.get $6 - f64.mul - local.get $1 - local.get $3 - f64.mul - f64.sub - call $~lib/typedarray/Float64Array#__set - else - local.get $4 - i32.const 1136 - i32.eq - if - local.get $0 - i32.const 0 - local.get $1 - local.get $7 - f64.mul - local.tee $8 - local.get $6 - f64.mul - local.get $5 - local.get $2 - f64.mul - local.tee $9 - local.get $3 - f64.mul - f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - local.get $9 - local.get $6 - f64.mul - local.get $8 - local.get $3 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - local.get $5 - local.get $7 - f64.mul - local.tee $5 - local.get $3 - f64.mul - local.get $1 - local.get $2 - f64.mul - local.tee $1 - local.get $6 - f64.mul - f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - local.get $5 - local.get $6 - f64.mul - local.get $1 - local.get $3 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - else - global.get $~lib/memory/__stack_pointer - i32.const 5392 - i32.store - i32.const 5392 - local.get $4 - call $~lib/string/String.__concat - i32.const 5456 - i32.const 512 - i32.const 10 - call $~lib/builtins/abort - unreachable - end - end - end - end - end + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable end global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + i32.const 0 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $assembly/quat/str (param $0 i32) (result i32) - (local $1 i32) + (func $export:assembly/mat3/transpose (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) global.get $~lib/memory/__stack_pointer - i32.const -64 - i32.add + i32.const 8 + i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=16 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=24 global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=32 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=40 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=48 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=56 + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer - i32.const 5520 - i32.store offset=56 + local.tee $2 local.get $0 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - call $~lib/number/F64#toString - local.set $1 - global.get $~lib/memory/__stack_pointer + i32.store + local.get $2 local.get $1 - i32.store offset=60 - i32.const 5520 + i32.store offset=4 + local.get $0 local.get $1 - call $~lib/string/String.__concat - local.set $1 + i32.eq + if + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $0 + i32.const 1 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $3 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $4 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $5 + call $~lib/typedarray/Float64Array#__set + else + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + end global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=48 + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat3/invert (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 i32) + (local $13 f64) + (local $14 f64) + (local $15 f64) global.get $~lib/memory/__stack_pointer - i32.const 5072 - i32.store offset=52 - local.get $1 - i32.const 5072 - call $~lib/string/String.__concat - local.set $1 + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=40 - local.get $0 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - call $~lib/number/F64#toString - local.set $2 + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=44 + local.tee $12 + local.get $0 + i32.store + local.get $12 local.get $1 - local.get $2 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer + i32.store offset=4 local.get $1 - i32.store offset=32 - global.get $~lib/memory/__stack_pointer - i32.const 5072 - i32.store offset=36 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 local.get $1 - i32.const 5072 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 local.get $1 - i32.store offset=24 - local.get $0 i32.const 2 call $~lib/typedarray/Float64Array#__get - call $~lib/number/F64#toString - local.set $2 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=28 + local.set $5 local.get $1 - local.get $2 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $6 local.get $1 - i32.store offset=16 - global.get $~lib/memory/__stack_pointer - i32.const 5072 - i32.store offset=20 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $7 local.get $1 - i32.const 5072 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $8 local.get $1 - i32.store offset=8 - local.get $0 - i32.const 3 + i32.const 6 call $~lib/typedarray/Float64Array#__get - call $~lib/number/F64#toString - local.set $0 - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store offset=12 + local.set $9 local.get $1 - local.get $0 - call $~lib/string/String.__concat - local.set $0 - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer - i32.const 5104 - i32.store offset=4 - local.get $0 - i32.const 5104 - call $~lib/string/String.__concat - global.get $~lib/memory/__stack_pointer - i32.const -64 - i32.sub - global.set $~lib/memory/__stack_pointer - ) - (func $assembly/quat2/str (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - global.get $~lib/memory/__stack_pointer - i32.const 128 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=16 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=24 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=32 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=40 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=48 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=56 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=64 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=72 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=80 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=88 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=96 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=104 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=112 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=120 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $10 + block $__inlined_func$assembly/mat3/invert + local.get $3 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.tee $11 + local.get $7 + f64.mul + local.get $8 + local.get $10 + f64.mul + f64.sub + local.tee $2 + f64.mul + local.get $4 + local.get $11 + f64.neg + local.get $6 + f64.mul + local.get $8 + local.get $9 + f64.mul + f64.add + local.tee $13 + f64.mul + f64.add + local.get $5 + local.get $10 + local.get $6 + f64.mul + local.get $7 + local.get $9 + f64.mul + f64.sub + local.tee $14 + f64.mul + f64.add + local.tee $15 + i64.reinterpret_f64 + i64.const 1 + i64.shl + i64.const 2 + i64.sub + i64.const -9007199254740994 + i64.gt_u + if + i32.const 0 + local.set $0 + br $__inlined_func$assembly/mat3/invert + end + local.get $0 + i32.const 0 + local.get $2 + f64.const 1 + local.get $15 + f64.div + local.tee $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $11 + f64.neg + local.get $4 + f64.mul + local.get $5 + local.get $10 + f64.mul + f64.add + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $8 + local.get $4 + f64.mul + local.get $5 + local.get $7 + f64.mul + f64.sub + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $13 + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $11 + local.get $3 + f64.mul + local.get $5 + local.get $9 + f64.mul + f64.sub + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $8 + f64.neg + local.get $3 + f64.mul + local.get $5 + local.get $6 + f64.mul + f64.add + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $14 + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $10 + f64.neg + local.get $3 + f64.mul + local.get $4 + local.get $9 + f64.mul + f64.add + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $7 + local.get $3 + f64.mul + local.get $4 + local.get $6 + f64.mul + f64.sub + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + end global.get $~lib/memory/__stack_pointer - i32.const 5552 - i32.store offset=120 + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer local.get $0 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - call $~lib/number/F64#toString - local.set $1 + ) + (func $export:assembly/mat3/adjoint (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 i32) global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=124 - i32.const 5552 - local.get $1 - call $~lib/string/String.__concat - local.set $1 + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=112 + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer - i32.const 5072 - i32.store offset=116 + local.tee $11 + local.get $0 + i32.store + local.get $11 local.get $1 - i32.const 5072 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer + i32.store offset=4 local.get $1 - i32.store offset=104 - local.get $0 - i32.const 1 + i32.const 0 call $~lib/typedarray/Float64Array#__get - call $~lib/number/F64#toString local.set $2 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=108 - local.get $1 - local.get $2 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=96 - global.get $~lib/memory/__stack_pointer - i32.const 5072 - i32.store offset=100 local.get $1 - i32.const 5072 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $3 local.get $1 - i32.store offset=88 - local.get $0 i32.const 2 call $~lib/typedarray/Float64Array#__get - call $~lib/number/F64#toString - local.set $2 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=92 - local.get $1 - local.get $2 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=80 - global.get $~lib/memory/__stack_pointer - i32.const 5072 - i32.store offset=84 - local.get $1 - i32.const 5072 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer + local.set $4 local.get $1 - i32.store offset=72 - local.get $0 i32.const 3 call $~lib/typedarray/Float64Array#__get - call $~lib/number/F64#toString - local.set $2 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=76 - local.get $1 - local.get $2 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=64 - global.get $~lib/memory/__stack_pointer - i32.const 5072 - i32.store offset=68 - local.get $1 - i32.const 5072 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer + local.set $5 local.get $1 - i32.store offset=56 - local.get $0 i32.const 4 call $~lib/typedarray/Float64Array#__get - call $~lib/number/F64#toString - local.set $2 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=60 - local.get $1 - local.get $2 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=48 - global.get $~lib/memory/__stack_pointer - i32.const 5072 - i32.store offset=52 - local.get $1 - i32.const 5072 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer + local.set $6 local.get $1 - i32.store offset=40 - local.get $0 i32.const 5 call $~lib/typedarray/Float64Array#__get - call $~lib/number/F64#toString - local.set $2 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=44 - local.get $1 - local.get $2 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=32 - global.get $~lib/memory/__stack_pointer - i32.const 5072 - i32.store offset=36 - local.get $1 - i32.const 5072 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer + local.set $7 local.get $1 - i32.store offset=24 - local.get $0 i32.const 6 call $~lib/typedarray/Float64Array#__get - call $~lib/number/F64#toString - local.set $2 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=28 - local.get $1 - local.get $2 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=16 - global.get $~lib/memory/__stack_pointer - i32.const 5072 - i32.store offset=20 - local.get $1 - i32.const 5072 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer + local.set $8 local.get $1 - i32.store offset=8 - local.get $0 i32.const 7 call $~lib/typedarray/Float64Array#__get - call $~lib/number/F64#toString - local.set $0 - global.get $~lib/memory/__stack_pointer + local.set $9 local.get $0 - i32.store offset=12 + i32.const 0 + local.get $6 local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.tee $10 + f64.mul + local.get $7 + local.get $9 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set local.get $0 - call $~lib/string/String.__concat - local.set $0 - global.get $~lib/memory/__stack_pointer + i32.const 1 + local.get $4 + local.get $9 + f64.mul + local.get $3 + local.get $10 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer - i32.const 5104 - i32.store offset=4 + i32.const 2 + local.get $3 + local.get $7 + f64.mul + local.get $4 + local.get $6 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 5104 - call $~lib/string/String.__concat + i32.const 3 + local.get $7 + local.get $8 + f64.mul + local.get $5 + local.get $10 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $2 + local.get $10 + f64.mul + local.get $4 + local.get $8 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $4 + local.get $5 + f64.mul + local.get $2 + local.get $7 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $5 + local.get $9 + f64.mul + local.get $6 + local.get $8 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $3 + local.get $8 + f64.mul + local.get $2 + local.get $9 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $2 + local.get $6 + f64.mul + local.get $3 + local.get $5 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - i32.const 128 + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer + local.get $0 ) - (func $assembly/vec3/str (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) + (func $export:assembly/mat3/determinant (param $0 i32) (result f64) + (local $1 f64) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) global.get $~lib/memory/__stack_pointer - i32.const 48 + i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=16 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=24 global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=32 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=40 + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer - i32.const 5856 - i32.store offset=40 + local.get $0 + i32.store local.get $0 i32.const 0 call $~lib/typedarray/Float64Array#__get - call $~lib/number/F64#toString - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=44 - i32.const 5856 - local.get $1 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=32 - global.get $~lib/memory/__stack_pointer - i32.const 5072 - i32.store offset=36 - local.get $1 - i32.const 5072 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=24 local.get $0 i32.const 1 call $~lib/typedarray/Float64Array#__get - call $~lib/number/F64#toString - local.set $2 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=28 - local.get $1 - local.get $2 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=16 - global.get $~lib/memory/__stack_pointer - i32.const 5072 - i32.store offset=20 - local.get $1 - i32.const 5072 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=8 + local.set $8 local.get $0 i32.const 2 call $~lib/typedarray/Float64Array#__get - call $~lib/number/F64#toString - local.set $0 - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store offset=12 - local.get $1 + local.set $9 local.get $0 - call $~lib/string/String.__concat - local.set $0 - global.get $~lib/memory/__stack_pointer + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $1 local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer - i32.const 5104 - i32.store offset=4 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $2 local.get $0 - i32.const 5104 - call $~lib/string/String.__concat - global.get $~lib/memory/__stack_pointer - i32.const 48 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $assembly/vec4/str (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - global.get $~lib/memory/__stack_pointer - i32.const -64 - i32.add - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=16 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=24 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=32 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=40 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=48 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=56 - global.get $~lib/memory/__stack_pointer - i32.const 5888 - i32.store offset=56 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $3 local.get $0 - i32.const 0 + i32.const 6 call $~lib/typedarray/Float64Array#__get - call $~lib/number/F64#toString - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=60 - i32.const 5888 - local.get $1 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=48 - global.get $~lib/memory/__stack_pointer - i32.const 5072 - i32.store offset=52 - local.get $1 - i32.const 5072 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=40 + local.set $4 local.get $0 - i32.const 1 + i32.const 7 call $~lib/typedarray/Float64Array#__get - call $~lib/number/F64#toString - local.set $2 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=44 - local.get $1 - local.get $2 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=32 - global.get $~lib/memory/__stack_pointer - i32.const 5072 - i32.store offset=36 - local.get $1 - i32.const 5072 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=24 + local.set $5 local.get $0 - i32.const 2 + i32.const 8 call $~lib/typedarray/Float64Array#__get - call $~lib/number/F64#toString - local.set $2 + local.set $6 global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $6 local.get $2 - i32.store offset=28 - local.get $1 - local.get $2 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer + f64.mul + local.get $3 + local.get $5 + f64.mul + f64.sub + f64.mul + local.get $8 + local.get $6 + f64.neg local.get $1 - i32.store offset=16 - global.get $~lib/memory/__stack_pointer - i32.const 5072 - i32.store offset=20 + f64.mul + local.get $3 + local.get $4 + f64.mul + f64.add + f64.mul + f64.add + local.get $9 + local.get $5 local.get $1 - i32.const 5072 - call $~lib/string/String.__concat - local.set $1 + f64.mul + local.get $2 + local.get $4 + f64.mul + f64.sub + f64.mul + f64.add + ) + (func $export:assembly/mat3/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=8 - local.get $0 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - call $~lib/number/F64#toString - local.set $0 + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store offset=12 - local.get $1 - local.get $0 - call $~lib/string/String.__concat - local.set $0 + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer + local.tee $3 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer - i32.const 5104 + local.get $3 + local.get $1 i32.store offset=4 + local.get $3 + local.get $2 + i32.store offset=8 local.get $0 - i32.const 5104 - call $~lib/string/String.__concat + local.get $1 + local.get $2 + call $assembly/mat3/multiply global.get $~lib/memory/__stack_pointer - i32.const -64 - i32.sub + i32.const 12 + i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/typedarray/Float64Array#constructor (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store + (func $export:assembly/mat3/translate (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 i32) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) global.get $~lib/memory/__stack_pointer i32.const 12 - i32.const 4 - call $~lib/rt/itcms/__new - local.tee $1 - i32.store - global.get $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - local.get $1 - i32.eqz - if - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.const 2 - call $~lib/rt/itcms/__new - local.tee $1 - i32.store - end - local.get $1 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#set:buffer - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $0 - i32.const 134217727 - i32.gt_u + i32.const 12652 + i32.lt_s if - i32.const 1584 - i32.const 1632 - i32.const 18 - i32.const 57 + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 call $~lib/builtins/abort unreachable end global.get $~lib/memory/__stack_pointer + local.tee $5 local.get $0 - i32.const 3 - i32.shl - local.tee $0 - i32.const 0 - call $~lib/rt/itcms/__new - local.tee $2 + i32.store + local.get $5 + local.get $1 i32.store offset=4 + local.get $5 local.get $2 - local.get $0 - call $~lib/memory/memory.fill + i32.store offset=8 local.get $1 - local.get $2 - call $~lib/arraybuffer/ArrayBufferView#set:buffer + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $6 local.get $1 - local.get $2 - i32.store offset=4 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $7 local.get $1 - local.get $0 - i32.store offset=8 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $8 local.get $1 - i32.store - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $9 local.get $1 - ) - (func $assembly/vec3/create (result i32) - (local $0 i32) - global.get $~lib/memory/__stack_pointer i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $12 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $13 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.set $14 + local.get $2 i32.const 0 - i32.store - global.get $~lib/memory/__stack_pointer - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - local.tee $0 - i32.store + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 local.get $0 i32.const 0 - f64.const 0 + local.get $6 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 - f64.const 0 + local.get $7 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 - f64.const 0 + local.get $8 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $9 call $~lib/typedarray/Float64Array#__set - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer local.get $0 - ) - (func $assembly/vec4/create (result i32) - (local $0 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - global.get $~lib/memory/__stack_pointer i32.const 4 - call $~lib/typedarray/Float64Array#constructor - local.tee $0 - i32.store + local.get $10 + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 0 - f64.const 0 + i32.const 5 + local.get $11 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 1 - f64.const 0 + i32.const 6 + local.get $3 + local.get $6 + f64.mul + local.get $4 + local.get $9 + f64.mul + f64.add + local.get $12 + f64.add call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 2 - f64.const 0 + i32.const 7 + local.get $3 + local.get $7 + f64.mul + local.get $4 + local.get $10 + f64.mul + f64.add + local.get $13 + f64.add call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 3 - f64.const 0 + i32.const 8 + local.get $3 + local.get $8 + f64.mul + local.get $4 + local.get $11 + f64.mul + f64.add + local.get $14 + f64.add call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 12 i32.add global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $assembly/vec4/clone (param $0 i32) (result i32) - (local $1 i32) + (func $export:assembly/mat3/rotate (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 i32) + (local $11 f64) + (local $12 f64) + (local $13 f64) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer - i32.const 4 - call $~lib/typedarray/Float64Array#constructor - local.tee $1 + local.tee $10 + local.get $0 i32.store + local.get $10 + local.get $1 + i32.store offset=4 local.get $1 - i32.const 0 - local.get $0 i32.const 0 call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set + local.set $4 local.get $1 i32.const 1 - local.get $0 - i32.const 1 call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set + local.set $5 local.get $1 i32.const 2 - local.get $0 - i32.const 2 call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set + local.set $6 local.get $1 i32.const 3 - local.get $0 - i32.const 3 call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer + local.set $7 local.get $1 - ) - (func $assembly/vec4/fromValues (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) - (local $4 i32) - global.get $~lib/memory/__stack_pointer i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $12 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.set $13 + local.get $2 + call $~lib/math/NativeMath.sin + local.set $3 + local.get $0 i32.const 0 - i32.store - global.get $~lib/memory/__stack_pointer - i32.const 4 - call $~lib/typedarray/Float64Array#constructor - local.tee $4 - i32.store + local.get $2 + call $~lib/math/NativeMath.cos + local.tee $2 local.get $4 - i32.const 0 - local.get $0 + f64.mul + local.get $3 + local.get $7 + f64.mul + f64.add call $~lib/typedarray/Float64Array#__set - local.get $4 + local.get $0 i32.const 1 - local.get $1 + local.get $2 + local.get $5 + f64.mul + local.get $3 + local.get $8 + f64.mul + f64.add call $~lib/typedarray/Float64Array#__set - local.get $4 + local.get $0 i32.const 2 local.get $2 + local.get $6 + f64.mul + local.get $3 + local.get $9 + f64.mul + f64.add call $~lib/typedarray/Float64Array#__set - local.get $4 + local.get $0 i32.const 3 + local.get $2 + local.get $7 + f64.mul local.get $3 + local.get $4 + f64.mul + f64.sub call $~lib/typedarray/Float64Array#__set - global.get $~lib/memory/__stack_pointer + local.get $0 i32.const 4 + local.get $2 + local.get $8 + f64.mul + local.get $3 + local.get $5 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $2 + local.get $9 + f64.mul + local.get $3 + local.get $6 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $11 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $12 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $13 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $4 + local.get $0 ) - (func $assembly/vec3/fromValues (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - (local $3 i32) + (func $export:assembly/mat3/scale (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 i32) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - local.tee $3 + local.tee $5 + local.get $0 i32.store - local.get $3 + local.get $5 + local.get $1 + i32.store offset=4 + local.get $5 + local.get $2 + i32.store offset=8 + local.get $2 i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 local.get $0 - call $~lib/typedarray/Float64Array#__set + i32.const 0 local.get $3 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 i32.const 1 + local.get $3 local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.mul call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 local.get $3 + local.get $1 i32.const 2 - local.get $2 + call $~lib/typedarray/Float64Array#__get + f64.mul call $~lib/typedarray/Float64Array#__set - global.get $~lib/memory/__stack_pointer + local.get $0 + i32.const 3 + local.get $4 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $4 + local.get $1 i32.const 4 + call $~lib/typedarray/Float64Array#__get + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $4 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 12 i32.add global.set $~lib/memory/__stack_pointer - local.get $3 + local.get $0 ) - (func $assembly/quat/create (result i32) - (local $0 i32) + (func $export:assembly/mat3/fromTranslation (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer - i32.const 4 - call $~lib/typedarray/Float64Array#constructor - local.tee $0 + local.tee $2 + local.get $0 i32.store + local.get $2 + local.get $1 + i32.store offset=4 local.get $0 i32.const 0 - f64.const 0 + f64.const 1 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 @@ -25492,32 +25051,70 @@ call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 f64.const 1 call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $assembly/mat3/create (result i32) - (local $0 i32) + (func $export:assembly/mat3/fromRotation (param $0 i32) (param $1 f64) (result i32) + (local $2 f64) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer - i32.const 9 - call $~lib/typedarray/Float64Array#constructor - local.tee $0 + local.get $0 i32.store + local.get $1 + call $~lib/math/NativeMath.sin + local.set $2 + local.get $0 + i32.const 0 + local.get $1 + call $~lib/math/NativeMath.cos + local.tee $1 + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 - f64.const 0 + local.get $2 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 @@ -25525,7 +25122,12 @@ call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 3 - f64.const 0 + local.get $2 + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 5 @@ -25540,14 +25142,6 @@ f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 0 - f64.const 1 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 4 - f64.const 1 - call $~lib/typedarray/Float64Array#__set - local.get $0 i32.const 8 f64.const 1 call $~lib/typedarray/Float64Array#__set @@ -25557,1573 +25151,1609 @@ global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $assembly/vec2/create (result i32) - (local $0 i32) + (func $export:assembly/mat3/fromScaling (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer - i32.const 2 - call $~lib/typedarray/Float64Array#constructor - local.tee $0 + local.tee $2 + local.get $0 i32.store + local.get $2 + local.get $1 + i32.store offset=4 local.get $0 i32.const 0 - f64.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 f64.const 0 call $~lib/typedarray/Float64Array#__set - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer local.get $0 - ) - (func $assembly/mat2/create (result i32) - (local $0 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - global.get $~lib/memory/__stack_pointer - i32.const 4 - call $~lib/typedarray/Float64Array#constructor - local.tee $0 - i32.store + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set local.get $0 + i32.const 4 + local.get $1 i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 2 + i32.const 6 f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 0 - f64.const 1 + i32.const 7 + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 3 + i32.const 8 f64.const 1 call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $~lib/rt/__newArray (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - (local $4 i32) - (local $5 i32) + (func $export:assembly/mat3/fromMat2d (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - global.get $~lib/memory/__stack_pointer - local.get $0 - local.get $1 - i32.shl - local.tee $4 - local.set $5 - local.get $4 - i32.const 0 - call $~lib/rt/itcms/__new - local.set $1 - local.get $3 + i32.const 12652 + i32.lt_s if - local.get $1 - local.get $3 - local.get $5 - call $~lib/memory/memory.copy + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable end - local.get $1 - local.tee $3 + global.get $~lib/memory/__stack_pointer + local.tee $2 + local.get $0 i32.store - i32.const 16 local.get $2 - call $~lib/rt/itcms/__new - local.tee $1 - local.get $3 - i32.store - local.get $1 - local.get $3 - i32.const 0 - call $~lib/rt/itcms/__link local.get $1 - local.get $3 i32.store offset=4 - local.get $1 - local.get $4 - i32.store offset=8 - local.get $1 local.get $0 - i32.store offset=12 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer + i32.const 0 local.get $1 - ) - (func $assembly/mat2d/create (result i32) - (local $0 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store - global.get $~lib/memory/__stack_pointer - i32.const 6 - call $~lib/typedarray/Float64Array#constructor - local.tee $0 - i32.store + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 - f64.const 0 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 + i32.const 3 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 i32.const 4 - f64.const 0 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 5 f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 0 - f64.const 1 + i32.const 6 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 3 + i32.const 7 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 f64.const 1 call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $assembly/mat2d/fromValues (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (result i32) - (local $6 i32) + (func $export:assembly/mat3/fromQuat (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 i32) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer - i32.const 6 - call $~lib/typedarray/Float64Array#constructor - local.tee $6 + local.tee $8 + local.get $0 i32.store - local.get $6 + local.get $8 + local.get $1 + i32.store offset=4 + local.get $1 i32.const 0 - local.get $0 - call $~lib/typedarray/Float64Array#__set - local.get $6 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $2 local.get $1 - call $~lib/typedarray/Float64Array#__set - local.get $6 i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $0 + i32.const 0 + f64.const 1 local.get $2 + local.get $2 + local.get $2 + f64.add + local.tee $7 + f64.mul + local.tee $9 + f64.sub + local.get $3 + local.get $3 + local.get $3 + f64.add + local.tee $6 + f64.mul + local.tee $10 + f64.sub call $~lib/typedarray/Float64Array#__set - local.get $6 + local.get $0 i32.const 3 + local.get $2 + local.get $4 + local.get $4 + f64.add + local.tee $2 + f64.mul + local.tee $11 + local.get $5 + local.get $6 + f64.mul + local.tee $6 + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 local.get $3 + local.get $2 + f64.mul + local.tee $12 + local.get $5 + local.get $7 + f64.mul + local.tee $13 + f64.add call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $11 local.get $6 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 i32.const 4 + f64.const 1 local.get $4 + local.get $2 + f64.mul + f64.sub + local.tee $4 + local.get $10 + f64.sub call $~lib/typedarray/Float64Array#__set - local.get $6 - i32.const 5 + local.get $0 + i32.const 7 + local.get $3 + local.get $7 + f64.mul + local.tee $3 local.get $5 + local.get $2 + f64.mul + local.tee $2 + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $12 + local.get $13 + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $3 + local.get $2 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $4 + local.get $9 + f64.sub call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $6 + local.get $0 ) - (func $assembly/mat3/fromValues (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (param $7 f64) (param $8 f64) (result i32) - (local $9 i32) + (func $export:assembly/mat3/normalFromMat4 (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer - i32.const 0 + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $2 + local.get $0 i32.store + local.get $2 + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat3/normalFromMat4 global.get $~lib/memory/__stack_pointer - i32.const 9 - call $~lib/typedarray/Float64Array#constructor - local.tee $9 + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat3/projection (param $0 i32) (param $1 f64) (param $2 f64) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.get $0 i32.store - local.get $9 - i32.const 0 local.get $0 + i32.const 0 + f64.const 2 + local.get $1 + f64.div call $~lib/typedarray/Float64Array#__set - local.get $9 + local.get $0 i32.const 1 - local.get $1 + f64.const 0 call $~lib/typedarray/Float64Array#__set - local.get $9 + local.get $0 i32.const 2 - local.get $2 + f64.const 0 call $~lib/typedarray/Float64Array#__set - local.get $9 + local.get $0 i32.const 3 - local.get $3 + f64.const 0 call $~lib/typedarray/Float64Array#__set - local.get $9 + local.get $0 i32.const 4 - local.get $4 + f64.const -2 + local.get $2 + f64.div call $~lib/typedarray/Float64Array#__set - local.get $9 + local.get $0 i32.const 5 - local.get $5 + f64.const 0 call $~lib/typedarray/Float64Array#__set - local.get $9 + local.get $0 i32.const 6 - local.get $6 + f64.const -1 call $~lib/typedarray/Float64Array#__set - local.get $9 + local.get $0 i32.const 7 - local.get $7 + f64.const 1 call $~lib/typedarray/Float64Array#__set - local.get $9 + local.get $0 i32.const 8 - local.get $8 + f64.const 1 call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $9 + local.get $0 ) - (func $assembly/mat4/create (result i32) - (local $0 i32) + (func $export:assembly/mat3/str (param $0 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/mat3/str + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat3/frob (param $0 i32) (result f64) + (local $1 f64) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer - i32.const 16 - call $~lib/typedarray/Float64Array#constructor - local.tee $0 + local.get $0 i32.store local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $0 i32.const 1 - f64.const 0 - call $~lib/typedarray/Float64Array#__set + call $~lib/typedarray/Float64Array#__get local.get $0 i32.const 2 - f64.const 0 - call $~lib/typedarray/Float64Array#__set + call $~lib/typedarray/Float64Array#__get local.get $0 i32.const 3 - f64.const 0 - call $~lib/typedarray/Float64Array#__set + call $~lib/typedarray/Float64Array#__get local.get $0 i32.const 4 - f64.const 0 - call $~lib/typedarray/Float64Array#__set + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 5 + call $~lib/typedarray/Float64Array#__get local.get $0 i32.const 6 - f64.const 0 - call $~lib/typedarray/Float64Array#__set + call $~lib/typedarray/Float64Array#__get local.get $0 i32.const 7 - f64.const 0 - call $~lib/typedarray/Float64Array#__set + call $~lib/typedarray/Float64Array#__get local.get $0 i32.const 8 + call $~lib/typedarray/Float64Array#__get f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 9 f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 11 f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 12 f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 13 f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 14 f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 0 - f64.const 1 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 5 - f64.const 1 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 10 - f64.const 1 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 15 - f64.const 1 - call $~lib/typedarray/Float64Array#__set + f64.const 0 + call $assembly/imports/MathUtil.hypot global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $0 ) - (func $assembly/mat4/clone (param $0 i32) (result i32) - (local $1 i32) + (func $export:assembly/mat3/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer - i32.const 16 - call $~lib/typedarray/Float64Array#constructor - local.tee $1 + local.tee $3 + local.get $0 i32.store + local.get $3 local.get $1 - i32.const 0 + i32.store offset=4 + local.get $3 + local.get $2 + i32.store offset=8 local.get $0 i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 call $~lib/typedarray/Float64Array#__get + f64.add call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 local.get $1 i32.const 1 - local.get $0 + call $~lib/typedarray/Float64Array#__get + local.get $2 i32.const 1 call $~lib/typedarray/Float64Array#__get + f64.add call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 local.get $1 i32.const 2 - local.get $0 + call $~lib/typedarray/Float64Array#__get + local.get $2 i32.const 2 call $~lib/typedarray/Float64Array#__get + f64.add call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 local.get $1 i32.const 3 - local.get $0 + call $~lib/typedarray/Float64Array#__get + local.get $2 i32.const 3 call $~lib/typedarray/Float64Array#__get + f64.add call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 local.get $1 i32.const 4 - local.get $0 + call $~lib/typedarray/Float64Array#__get + local.get $2 i32.const 4 call $~lib/typedarray/Float64Array#__get + f64.add call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 local.get $1 i32.const 5 - local.get $0 + call $~lib/typedarray/Float64Array#__get + local.get $2 i32.const 5 call $~lib/typedarray/Float64Array#__get + f64.add call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 6 local.get $0 i32.const 6 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 7 - local.get $0 - i32.const 7 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set local.get $1 - i32.const 8 - local.get $0 - i32.const 8 + i32.const 6 call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 9 - local.get $0 - i32.const 9 + local.get $2 + i32.const 6 call $~lib/typedarray/Float64Array#__get + f64.add call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 10 local.get $0 - i32.const 10 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set + i32.const 7 local.get $1 - i32.const 11 - local.get $0 - i32.const 11 + i32.const 7 call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 12 - local.get $0 - i32.const 12 + local.get $2 + i32.const 7 call $~lib/typedarray/Float64Array#__get + f64.add call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 13 local.get $0 - i32.const 13 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set + i32.const 8 local.get $1 - i32.const 14 - local.get $0 - i32.const 14 + i32.const 8 call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 15 - local.get $0 - i32.const 15 + local.get $2 + i32.const 8 call $~lib/typedarray/Float64Array#__get + f64.add call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 12 i32.add global.set $~lib/memory/__stack_pointer - local.get $1 + local.get $0 ) - (func $assembly/mat4/fromValues (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (param $7 f64) (param $8 f64) (param $9 f64) (param $10 f64) (param $11 f64) (param $12 f64) (param $13 f64) (param $14 f64) (param $15 f64) (result i32) - (local $16 i32) + (func $export:assembly/mat3/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer - i32.const 16 - call $~lib/typedarray/Float64Array#constructor - local.tee $16 + local.tee $3 + local.get $0 i32.store - local.get $16 - i32.const 0 + local.get $3 + local.get $1 + i32.store offset=4 + local.get $3 + local.get $2 + i32.store offset=8 local.get $0 - call $~lib/typedarray/Float64Array#__set - local.get $16 - i32.const 1 local.get $1 - call $~lib/typedarray/Float64Array#__set - local.get $16 - i32.const 2 local.get $2 - call $~lib/typedarray/Float64Array#__set - local.get $16 - i32.const 3 - local.get $3 - call $~lib/typedarray/Float64Array#__set - local.get $16 - i32.const 4 - local.get $4 - call $~lib/typedarray/Float64Array#__set - local.get $16 - i32.const 5 - local.get $5 - call $~lib/typedarray/Float64Array#__set - local.get $16 - i32.const 6 - local.get $6 - call $~lib/typedarray/Float64Array#__set - local.get $16 - i32.const 7 - local.get $7 - call $~lib/typedarray/Float64Array#__set - local.get $16 - i32.const 8 - local.get $8 - call $~lib/typedarray/Float64Array#__set - local.get $16 - i32.const 9 - local.get $9 - call $~lib/typedarray/Float64Array#__set - local.get $16 - i32.const 10 - local.get $10 - call $~lib/typedarray/Float64Array#__set - local.get $16 - i32.const 11 - local.get $11 - call $~lib/typedarray/Float64Array#__set - local.get $16 - i32.const 12 - local.get $12 - call $~lib/typedarray/Float64Array#__set - local.get $16 - i32.const 13 - local.get $13 - call $~lib/typedarray/Float64Array#__set - local.get $16 - i32.const 14 - local.get $14 - call $~lib/typedarray/Float64Array#__set - local.get $16 - i32.const 15 - local.get $15 - call $~lib/typedarray/Float64Array#__set + call $assembly/mat3/subtract global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 12 i32.add global.set $~lib/memory/__stack_pointer - local.get $16 ) - (func $assembly/mat4/fromQuat2 (param $0 i32) (param $1 i32) (result i32) - (local $2 f64) - (local $3 f64) - (local $4 f64) - (local $5 f64) - (local $6 i32) - (local $7 f64) - (local $8 f64) - (local $9 f64) - (local $10 f64) - (local $11 f64) - (local $12 f64) + (func $export:assembly/mat3/multiplyScalar (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 i32) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - local.tee $6 + local.tee $3 + local.get $0 i32.store + local.get $3 + local.get $1 + i32.store offset=4 + local.get $0 + i32.const 0 local.get $1 i32.const 0 call $~lib/typedarray/Float64Array#__get - f64.neg - local.set $2 + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 local.get $1 i32.const 1 call $~lib/typedarray/Float64Array#__get - f64.neg - local.set $3 - local.get $1 + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 i32.const 2 - call $~lib/typedarray/Float64Array#__get - f64.neg - local.set $4 - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.set $5 - local.get $1 - i32.const 4 - call $~lib/typedarray/Float64Array#__get - local.set $8 - local.get $1 - i32.const 5 - call $~lib/typedarray/Float64Array#__get - local.set $9 local.get $1 - i32.const 6 - call $~lib/typedarray/Float64Array#__get - local.set $10 - local.get $1 - i32.const 7 + i32.const 2 call $~lib/typedarray/Float64Array#__get - local.set $11 - local.get $2 local.get $2 f64.mul - local.get $3 - local.get $3 - f64.mul - f64.add - local.get $4 - local.get $4 - f64.mul - f64.add - local.get $5 - local.get $5 - f64.mul - f64.add - local.tee $7 - f64.const 0 - f64.gt - if - local.get $6 - i32.const 0 - local.get $8 - local.get $5 - f64.mul - local.get $11 - local.get $2 - f64.mul - f64.add - local.get $9 - local.get $4 - f64.mul - f64.add - local.get $10 - local.get $3 - f64.mul - f64.sub - local.tee $12 - local.get $12 - f64.add - local.get $7 - f64.div - call $~lib/typedarray/Float64Array#__set - local.get $6 - i32.const 1 - local.get $9 - local.get $5 - f64.mul - local.get $11 - local.get $3 - f64.mul - f64.add - local.get $10 - local.get $2 - f64.mul - f64.add - local.get $8 - local.get $4 - f64.mul - f64.sub - local.tee $12 - local.get $12 - f64.add - local.get $7 - f64.div - call $~lib/typedarray/Float64Array#__set - local.get $6 - i32.const 2 - local.get $10 - local.get $5 - f64.mul - local.get $11 - local.get $4 - f64.mul - f64.add - local.get $8 - local.get $3 - f64.mul - f64.add - local.get $9 - local.get $2 - f64.mul - f64.sub - local.tee $2 - local.get $2 - f64.add - local.get $7 - f64.div - call $~lib/typedarray/Float64Array#__set - else - local.get $6 - i32.const 0 - local.get $8 - local.get $5 - f64.mul - local.get $11 - local.get $2 - f64.mul - f64.add - local.get $9 - local.get $4 - f64.mul - f64.add - local.get $10 - local.get $3 - f64.mul - f64.sub - local.tee $7 - local.get $7 - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $6 - i32.const 1 - local.get $9 - local.get $5 - f64.mul - local.get $11 - local.get $3 - f64.mul - f64.add - local.get $10 - local.get $2 - f64.mul - f64.add - local.get $8 - local.get $4 - f64.mul - f64.sub - local.tee $7 - local.get $7 - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $6 - i32.const 2 - local.get $10 - local.get $5 - f64.mul - local.get $11 - local.get $4 - f64.mul - f64.add - local.get $8 - local.get $3 - f64.mul - f64.add - local.get $9 - local.get $2 - f64.mul - f64.sub - local.tee $2 - local.get $2 - f64.add - call $~lib/typedarray/Float64Array#__set - end + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set local.get $0 + i32.const 4 local.get $1 - local.get $6 - call $assembly/mat4/fromRotationTranslation - drop - global.get $~lib/memory/__stack_pointer i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $assembly/mat4/getRotation (param $0 i32) (param $1 i32) (result i32) - (local $2 f64) - (local $3 f64) - (local $4 f64) - (local $5 f64) - (local $6 f64) - (local $7 i32) - (local $8 f64) - (local $9 f64) - (local $10 f64) - (local $11 f64) - (local $12 f64) + (func $export:assembly/mat3/multiplyScalarAndAdd (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + (local $4 i32) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - local.tee $7 + local.tee $4 + local.get $0 i32.store - local.get $7 + local.get $4 local.get $1 - call $assembly/mat4/getScaling - drop - f64.const 1 - local.get $7 + i32.store offset=4 + local.get $4 + local.get $2 + i32.store offset=8 + local.get $0 i32.const 0 - call $~lib/typedarray/Float64Array#__get - f64.div - local.set $3 - f64.const 1 - local.get $7 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - f64.div - local.set $4 - f64.const 1 - local.get $7 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - f64.div - local.set $6 local.get $1 i32.const 0 call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get local.get $3 f64.mul - local.set $2 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 local.get $1 i32.const 1 call $~lib/typedarray/Float64Array#__get - local.get $4 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $3 f64.mul - local.set $8 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 local.get $1 i32.const 2 call $~lib/typedarray/Float64Array#__get - local.get $6 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $3 f64.mul - local.set $9 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 local.get $1 i32.const 4 call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 4 + call $~lib/typedarray/Float64Array#__get local.get $3 f64.mul - local.set $10 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 local.get $1 i32.const 5 call $~lib/typedarray/Float64Array#__get - local.get $4 + local.get $2 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $3 f64.mul - local.set $5 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 local.get $1 i32.const 6 call $~lib/typedarray/Float64Array#__get - local.get $6 - f64.mul - local.set $11 - local.get $1 - i32.const 8 + local.get $2 + i32.const 6 call $~lib/typedarray/Float64Array#__get local.get $3 f64.mul - local.set $12 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 local.get $1 - i32.const 9 + i32.const 7 call $~lib/typedarray/Float64Array#__get - local.get $4 - f64.mul - local.set $4 local.get $2 - local.get $5 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 local.get $1 - i32.const 10 + i32.const 8 call $~lib/typedarray/Float64Array#__get - local.get $6 + local.get $2 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.get $3 f64.mul - local.tee $3 f64.add - local.tee $6 - f64.const 0 - f64.gt + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat3/exactEquals (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $2 + local.get $0 + i32.store + local.get $2 + local.get $1 + i32.store offset=4 + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.eq + if (result i32) + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) local.get $0 i32.const 3 - local.get $6 - f64.const 1 - f64.add - f64.sqrt - local.tee $2 - local.get $2 - f64.add - local.tee $2 - f64.const 0.25 - f64.mul - call $~lib/typedarray/Float64Array#__set + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) local.get $0 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + f64.eq + else i32.const 0 - local.get $11 - local.get $4 - f64.sub - local.get $2 - f64.div - call $~lib/typedarray/Float64Array#__set + end + if (result i32) local.get $0 - i32.const 1 - local.get $12 - local.get $9 - f64.sub - local.get $2 - f64.div - call $~lib/typedarray/Float64Array#__set + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) local.get $0 - i32.const 2 - local.get $8 - local.get $10 - f64.sub - local.get $2 - f64.div - call $~lib/typedarray/Float64Array#__set + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + f64.eq else - local.get $2 - local.get $3 - f64.gt i32.const 0 - local.get $2 - local.get $5 - f64.gt - select - if - local.get $0 - i32.const 3 - local.get $11 - local.get $4 - f64.sub - local.get $2 - f64.const 1 - f64.add - local.get $5 - f64.sub - local.get $3 - f64.sub - f64.sqrt - local.tee $2 - local.get $2 - f64.add - local.tee $2 - f64.div - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 0 - local.get $2 - f64.const 0.25 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - local.get $8 - local.get $10 - f64.add - local.get $2 - f64.div - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - local.get $12 - local.get $9 - f64.add - local.get $2 - f64.div - call $~lib/typedarray/Float64Array#__set - else - local.get $3 - local.get $5 - f64.lt - if - local.get $0 - i32.const 3 - local.get $12 - local.get $9 - f64.sub - local.get $5 - f64.const 1 - f64.add - local.get $2 - f64.sub - local.get $3 - f64.sub - f64.sqrt - local.tee $2 - local.get $2 - f64.add - local.tee $2 - f64.div - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 0 - local.get $8 - local.get $10 - f64.add - local.get $2 - f64.div - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - local.get $2 - f64.const 0.25 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - local.get $11 - local.get $4 - f64.add - local.get $2 - f64.div - call $~lib/typedarray/Float64Array#__set - else - local.get $0 - i32.const 3 - local.get $8 - local.get $10 - f64.sub - local.get $3 - f64.const 1 - f64.add - local.get $2 - f64.sub - local.get $5 - f64.sub - f64.sqrt - local.tee $2 - local.get $2 - f64.add - local.tee $2 - f64.div - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 0 - local.get $12 - local.get $9 - f64.add - local.get $2 - f64.div - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - local.get $11 - local.get $4 - f64.add - local.get $2 - f64.div - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - local.get $2 - f64.const 0.25 - f64.mul - call $~lib/typedarray/Float64Array#__set - end - end end + if (result i32) + local.get $0 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat3/equals (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $2 + local.get $0 + i32.store + local.get $2 + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/mat3/equals global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $0 ) - (func $assembly/quat2/create (result i32) - (local $0 i32) + (func $export:assembly/mat4/Fov#get:upDegrees (param $0 i32) (result f64) + (local $1 i32) + (local $2 f64) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer - i32.const 8 - call $~lib/typedarray/Float64Array#constructor - local.tee $0 - i32.store - local.get $0 - i32.const 0 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - f64.const 0 - call $~lib/typedarray/Float64Array#__set + local.tee $1 local.get $0 - i32.const 2 - f64.const 0 - call $~lib/typedarray/Float64Array#__set + i32.store local.get $0 + f64.load + local.get $1 i32.const 4 - f64.const 0 - call $~lib/typedarray/Float64Array#__set + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/Fov#set:upDegrees (param $0 i32) (param $1 f64) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $0 - i32.const 5 - f64.const 0 - call $~lib/typedarray/Float64Array#__set + i32.store local.get $0 - i32.const 6 - f64.const 0 - call $~lib/typedarray/Float64Array#__set + local.get $1 + f64.store + local.get $2 + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/Fov#get:downDegrees (param $0 i32) (result f64) + (local $1 i32) + (local $2 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $1 local.get $0 - i32.const 7 - f64.const 0 - call $~lib/typedarray/Float64Array#__set + i32.store local.get $0 - i32.const 3 - f64.const 1 - call $~lib/typedarray/Float64Array#__set - global.get $~lib/memory/__stack_pointer + f64.load offset=8 + local.get $1 i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $0 ) - (func $assembly/quat2/fromValues (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (param $7 f64) (result i32) - (local $8 i32) + (func $export:assembly/mat4/Fov#set:downDegrees (param $0 i32) (param $1 f64) + (local $2 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer - i32.const 8 - call $~lib/typedarray/Float64Array#constructor - local.tee $8 + local.tee $2 + local.get $0 i32.store - local.get $8 - i32.const 0 local.get $0 - call $~lib/typedarray/Float64Array#__set - local.get $8 - i32.const 1 local.get $1 - call $~lib/typedarray/Float64Array#__set - local.get $8 - i32.const 2 + f64.store offset=8 local.get $2 - call $~lib/typedarray/Float64Array#__set - local.get $8 - i32.const 3 - local.get $3 - call $~lib/typedarray/Float64Array#__set - local.get $8 i32.const 4 - local.get $4 - call $~lib/typedarray/Float64Array#__set - local.get $8 - i32.const 5 - local.get $5 - call $~lib/typedarray/Float64Array#__set - local.get $8 - i32.const 6 - local.get $6 - call $~lib/typedarray/Float64Array#__set - local.get $8 - i32.const 7 - local.get $7 - call $~lib/typedarray/Float64Array#__set + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/Fov#get:leftDegrees (param $0 i32) (result f64) + (local $1 i32) + (local $2 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer + local.tee $1 + local.get $0 + i32.store + local.get $0 + f64.load offset=16 + local.get $1 i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $8 ) - (func $assembly/quat2/fromRotationTranslationValues (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (result i32) - (local $7 i32) + (func $export:assembly/mat4/Fov#set:leftDegrees (param $0 i32) (param $1 f64) + (local $2 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer - i32.const 8 - call $~lib/typedarray/Float64Array#constructor - local.tee $7 + local.tee $2 + local.get $0 i32.store - local.get $7 - i32.const 0 local.get $0 - call $~lib/typedarray/Float64Array#__set - local.get $7 - i32.const 1 local.get $1 - call $~lib/typedarray/Float64Array#__set - local.get $7 - i32.const 2 + f64.store offset=16 local.get $2 - call $~lib/typedarray/Float64Array#__set - local.get $7 - i32.const 3 - local.get $3 - call $~lib/typedarray/Float64Array#__set - local.get $7 i32.const 4 - local.get $4 - f64.const 0.5 - f64.mul - local.tee $4 - local.get $3 - f64.mul - local.get $5 - f64.const 0.5 - f64.mul - local.tee $5 - local.get $2 - f64.mul - f64.add - local.get $6 - f64.const 0.5 - f64.mul - local.tee $6 - local.get $1 - f64.mul - f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $7 - i32.const 5 - local.get $5 - local.get $3 - f64.mul - local.get $6 - local.get $0 - f64.mul - f64.add - local.get $4 - local.get $2 - f64.mul - f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $7 - i32.const 6 - local.get $6 - local.get $3 - f64.mul - local.get $4 - local.get $1 - f64.mul - f64.add - local.get $5 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/Fov#get:rightDegrees (param $0 i32) (result f64) + (local $1 i32) + (local $2 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $1 local.get $0 - f64.mul - f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $7 - i32.const 7 - local.get $4 - f64.neg + i32.store local.get $0 - f64.mul - local.get $5 + f64.load offset=24 local.get $1 - f64.mul - f64.sub - local.get $6 - local.get $2 - f64.mul - f64.sub - call $~lib/typedarray/Float64Array#__set - global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $7 ) - (func $assembly/vec2/fromValues (param $0 f64) (param $1 f64) (result i32) + (func $export:assembly/mat4/Fov#set:rightDegrees (param $0 i32) (param $1 f64) (local $2 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer - i32.const 2 - call $~lib/typedarray/Float64Array#constructor local.tee $2 + local.get $0 i32.store - local.get $2 - i32.const 0 local.get $0 - call $~lib/typedarray/Float64Array#__set + local.get $1 + f64.store offset=24 local.get $2 + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/Fov#constructor (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + block $folding-inner0 + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + local.tee $1 + local.get $0 + i32.store + local.get $1 + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + local.get $0 + i32.eqz + if + global.get $~lib/memory/__stack_pointer + i32.const 32 + i32.const 27 + call $~lib/rt/itcms/__new + local.tee $0 + i32.store + end + local.get $0 + f64.const 0 + f64.store + local.get $0 + f64.const 0 + f64.store offset=8 + local.get $0 + f64.const 0 + f64.store offset=16 + local.get $0 + f64.const 0 + f64.store offset=24 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + return + end + i32.const 29056 + i32.const 29104 i32.const 1 - local.get $1 - call $~lib/typedarray/Float64Array#__set + i32.const 1 + call $~lib/builtins/abort + unreachable + ) + (func $export:assembly/mat4/clone (param $0 i32) (result i32) + (local $1 i32) global.get $~lib/memory/__stack_pointer i32.const 4 - i32.add + i32.sub global.set $~lib/memory/__stack_pointer - local.get $2 + block $folding-inner0 + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + local.tee $1 + local.get $0 + i32.store + local.get $1 + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + local.tee $1 + i32.const 0 + i32.store + local.get $1 + i32.const 16 + call $~lib/typedarray/Float64Array#constructor + local.tee $1 + i32.store + local.get $1 + i32.const 0 + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 1 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 2 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 3 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 4 + local.get $0 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 5 + local.get $0 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 6 + local.get $0 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 7 + local.get $0 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 8 + local.get $0 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 9 + local.get $0 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 10 + local.get $0 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 11 + local.get $0 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 12 + local.get $0 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 13 + local.get $0 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 14 + local.get $0 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 15 + local.get $0 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + return + end + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable ) - (func $assembly/vec3/rotateX (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) - (local $4 i32) - (local $5 i32) + (func $export:assembly/mat4/copy (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.const 3 - i32.const 28 - i32.const 5616 - call $~lib/rt/__newArray - local.tee $4 + local.tee $2 + local.get $0 i32.store - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.const 3 - i32.const 28 - i32.const 5648 - call $~lib/rt/__newArray - local.tee $5 + local.get $2 + local.get $1 i32.store offset=4 - local.get $4 + local.get $0 i32.const 0 local.get $1 i32.const 0 call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - f64.sub - call $~lib/array/Array#__set - local.get $4 + call $~lib/typedarray/Float64Array#__set + local.get $0 i32.const 1 local.get $1 i32.const 1 call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - f64.sub - call $~lib/array/Array#__set - local.get $4 + call $~lib/typedarray/Float64Array#__set + local.get $0 i32.const 2 local.get $1 i32.const 2 call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 2 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 call $~lib/typedarray/Float64Array#__get - f64.sub - call $~lib/array/Array#__set - local.get $5 - i32.const 0 - local.get $4 - i32.const 0 - call $~lib/array/Array#__get - call $~lib/array/Array#__set - local.get $5 - i32.const 1 - local.get $4 - i32.const 1 - call $~lib/array/Array#__get - local.get $3 - call $~lib/math/NativeMath.cos - f64.mul - local.get $4 - i32.const 2 - call $~lib/array/Array#__get - local.get $3 - call $~lib/math/NativeMath.sin - f64.mul - f64.sub - call $~lib/array/Array#__set - local.get $5 - i32.const 2 - local.get $4 - i32.const 1 - call $~lib/array/Array#__get - local.get $3 - call $~lib/math/NativeMath.sin - f64.mul - local.get $4 - i32.const 2 - call $~lib/array/Array#__get - local.get $3 - call $~lib/math/NativeMath.cos - f64.mul - f64.add - call $~lib/array/Array#__set + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 0 - local.get $5 - i32.const 0 - call $~lib/array/Array#__get - local.get $2 - i32.const 0 + i32.const 4 + local.get $1 + i32.const 4 call $~lib/typedarray/Float64Array#__get - f64.add call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 1 - local.get $5 - i32.const 1 - call $~lib/array/Array#__get - local.get $2 - i32.const 1 + i32.const 5 + local.get $1 + i32.const 5 call $~lib/typedarray/Float64Array#__get - f64.add call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 2 - local.get $5 - i32.const 2 - call $~lib/array/Array#__get - local.get $2 - i32.const 2 + i32.const 6 + local.get $1 + i32.const 6 call $~lib/typedarray/Float64Array#__get - f64.add call $~lib/typedarray/Float64Array#__set - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer local.get $0 - ) - (func $assembly/vec3/rotateY (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) - (local $4 i32) - (local $5 i32) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.const 3 - i32.const 28 - i32.const 5728 - call $~lib/rt/__newArray - local.tee $4 - i32.store - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.const 3 - i32.const 28 - i32.const 5760 - call $~lib/rt/__newArray - local.tee $5 - i32.store offset=4 - local.get $4 - i32.const 0 + i32.const 7 local.get $1 - i32.const 0 + i32.const 7 call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $1 + i32.const 8 call $~lib/typedarray/Float64Array#__get - f64.sub - call $~lib/array/Array#__set - local.get $4 - i32.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 local.get $1 - i32.const 1 + i32.const 9 call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + local.get $1 + i32.const 10 call $~lib/typedarray/Float64Array#__get - f64.sub - call $~lib/array/Array#__set - local.get $4 - i32.const 2 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 local.get $1 - i32.const 2 + i32.const 11 call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 2 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + local.get $1 + i32.const 12 call $~lib/typedarray/Float64Array#__get - f64.sub - call $~lib/array/Array#__set - local.get $5 - i32.const 0 - local.get $4 - i32.const 2 - call $~lib/array/Array#__get - local.get $3 - call $~lib/math/NativeMath.sin - f64.mul - local.get $4 - i32.const 0 - call $~lib/array/Array#__get - local.get $3 - call $~lib/math/NativeMath.cos - f64.mul - f64.add - call $~lib/array/Array#__set - local.get $5 - i32.const 1 - local.get $4 - i32.const 1 - call $~lib/array/Array#__get - call $~lib/array/Array#__set - local.get $5 - i32.const 2 - local.get $4 - i32.const 2 - call $~lib/array/Array#__get - local.get $3 - call $~lib/math/NativeMath.cos - f64.mul - local.get $4 - i32.const 0 - call $~lib/array/Array#__get - local.get $3 - call $~lib/math/NativeMath.sin - f64.mul - f64.sub - call $~lib/array/Array#__set + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 0 - local.get $5 - i32.const 0 - call $~lib/array/Array#__get - local.get $2 - i32.const 0 + i32.const 13 + local.get $1 + i32.const 13 call $~lib/typedarray/Float64Array#__get - f64.add call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 1 - local.get $5 - i32.const 1 - call $~lib/array/Array#__get - local.get $2 - i32.const 1 + i32.const 14 + local.get $1 + i32.const 14 call $~lib/typedarray/Float64Array#__get - f64.add call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 2 - local.get $5 - i32.const 2 - call $~lib/array/Array#__get - local.get $2 - i32.const 2 + i32.const 15 + local.get $1 + i32.const 15 call $~lib/typedarray/Float64Array#__get - f64.add call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer i32.const 8 @@ -27131,723 +26761,1084 @@ global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $assembly/vec3/rotateZ (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) - (local $4 i32) - (local $5 i32) + (func $export:assembly/mat4/set (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (param $7 f64) (param $8 f64) (param $9 f64) (param $10 f64) (param $11 f64) (param $12 f64) (param $13 f64) (param $14 f64) (param $15 f64) (param $16 f64) (result i32) global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.const 3 - i32.const 28 - i32.const 5792 - call $~lib/rt/__newArray - local.tee $4 + local.get $0 i32.store - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.const 3 - i32.const 28 - i32.const 5824 - call $~lib/rt/__newArray - local.tee $5 - i32.store offset=4 - local.get $4 - i32.const 0 - local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.get $2 + local.get $0 i32.const 0 - call $~lib/typedarray/Float64Array#__get - f64.sub - call $~lib/array/Array#__set - local.get $4 - i32.const 1 local.get $1 + call $~lib/typedarray/Float64Array#__set + local.get $0 i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - f64.sub - call $~lib/array/Array#__set - local.get $4 - i32.const 2 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get local.get $2 + call $~lib/typedarray/Float64Array#__set + local.get $0 i32.const 2 - call $~lib/typedarray/Float64Array#__get - f64.sub - call $~lib/array/Array#__set - local.get $5 - i32.const 0 - local.get $4 - i32.const 0 - call $~lib/array/Array#__get - local.get $3 - call $~lib/math/NativeMath.cos - f64.mul - local.get $4 - i32.const 1 - call $~lib/array/Array#__get - local.get $3 - call $~lib/math/NativeMath.sin - f64.mul - f64.sub - call $~lib/array/Array#__set - local.get $5 - i32.const 1 - local.get $4 - i32.const 0 - call $~lib/array/Array#__get - local.get $3 - call $~lib/math/NativeMath.sin - f64.mul - local.get $4 - i32.const 1 - call $~lib/array/Array#__get local.get $3 - call $~lib/math/NativeMath.cos - f64.mul - f64.add - call $~lib/array/Array#__set - local.get $5 - i32.const 2 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 local.get $4 - i32.const 2 - call $~lib/array/Array#__get - call $~lib/array/Array#__set + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 0 + i32.const 4 local.get $5 - i32.const 0 - call $~lib/array/Array#__get - local.get $2 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - f64.add call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 1 - local.get $5 - i32.const 1 - call $~lib/array/Array#__get - local.get $2 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - f64.add + i32.const 5 + local.get $6 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 2 - local.get $5 - i32.const 2 - call $~lib/array/Array#__get - local.get $2 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - f64.add + i32.const 6 + local.get $7 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $8 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $9 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $10 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + local.get $11 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + local.get $12 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + local.get $13 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $14 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $15 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + local.get $16 call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat4/identity (param $0 i32) (result i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $assembly/mat4/identity + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/transpose (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $2 + local.get $0 + i32.store + local.get $2 + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + i32.eq + if + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $0 + i32.const 1 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $3 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $4 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $6 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + local.get $1 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + local.get $5 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $7 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $8 + call $~lib/typedarray/Float64Array#__set + else + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + local.get $1 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + local.get $1 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $1 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + local.get $1 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + end + global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $export:assembly/common/setMatrixArrayType (param $0 i32) + (func $export:assembly/mat4/invert (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - i32.const 3744 - i32.const 3808 - i32.const 20 - i32.const 3 - call $~lib/builtins/abort - unreachable - ) - (func $export:assembly/mat2/clone (param $0 i32) (result i32) global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $0 i32.store + local.get $2 + local.get $1 + i32.store offset=4 local.get $0 - call $assembly/vec4/clone + local.get $1 + call $assembly/mat4/invert global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer ) - (func $export:assembly/mat2/copy (param $0 i32) (param $1 i32) (result i32) + (func $export:assembly/mat4/adjoint (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $2 local.get $1 i32.store offset=4 local.get $0 local.get $1 - call $assembly/vec4/copy + call $assembly/mat4/adjoint global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer ) - (func $export:assembly/mat2/identity (param $0 i32) (result i32) + (func $export:assembly/mat4/determinant (param $0 i32) (result f64) + (local $1 f64) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 f64) + (local $16 f64) + (local $17 f64) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer local.get $0 i32.store local.get $0 i32.const 0 - f64.const 1 - call $~lib/typedarray/Float64Array#__set + call $~lib/typedarray/Float64Array#__get + local.set $1 local.get $0 i32.const 1 - f64.const 0 - call $~lib/typedarray/Float64Array#__set + call $~lib/typedarray/Float64Array#__get + local.set $5 local.get $0 i32.const 2 - f64.const 0 - call $~lib/typedarray/Float64Array#__set + call $~lib/typedarray/Float64Array#__get + local.set $2 local.get $0 i32.const 3 - f64.const 1 - call $~lib/typedarray/Float64Array#__set - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer + call $~lib/typedarray/Float64Array#__get + local.set $13 local.get $0 - ) - (func $export:assembly/mat2/set (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (result i32) - global.get $~lib/memory/__stack_pointer i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer + call $~lib/typedarray/Float64Array#__get + local.set $6 local.get $0 - i32.store + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $0 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $0 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $0 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $0 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $0 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.set $14 + local.get $0 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $0 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + local.set $12 + local.get $1 + local.get $9 + local.get $0 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + local.tee $4 + f64.mul + local.get $10 + local.get $12 + f64.mul + f64.sub + local.tee $15 + f64.mul + local.get $5 + local.get $3 + local.get $4 + f64.mul + local.get $10 + local.get $11 + f64.mul + f64.sub + local.tee $16 + f64.mul + f64.sub + local.get $2 + local.get $3 + local.get $12 + f64.mul + local.get $9 + local.get $11 + f64.mul + f64.sub + local.tee $17 + f64.mul + f64.add + f64.mul + local.get $13 + local.get $6 + local.get $15 + f64.mul + local.get $7 + local.get $16 + f64.mul + f64.sub + local.get $8 + local.get $17 + f64.mul + f64.add + f64.mul + f64.sub local.get $0 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + local.get $3 + local.get $5 + local.get $8 + f64.mul + local.get $2 + local.get $7 + f64.mul + f64.sub + local.tee $3 + f64.mul + local.get $9 local.get $1 + local.get $8 + f64.mul local.get $2 + local.get $6 + f64.mul + f64.sub + local.tee $2 + f64.mul + f64.sub + local.get $10 + local.get $1 + local.get $7 + f64.mul + local.get $5 + local.get $6 + f64.mul + f64.sub + local.tee $1 + f64.mul + f64.add + f64.mul + f64.add + local.get $14 + local.get $11 local.get $3 + f64.mul + local.get $12 + local.get $2 + f64.mul + f64.sub local.get $4 - call $assembly/vec4/set + local.get $1 + f64.mul + f64.add + f64.mul + f64.sub global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer ) - (func $export:assembly/mat2/transpose (param $0 i32) (param $1 i32) (result i32) - (local $2 f64) + (func $export:assembly/mat4/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $3 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $1 i32.store offset=4 + local.get $3 + local.get $2 + i32.store offset=8 local.get $0 local.get $1 - i32.eq - if - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.set $2 - local.get $0 - i32.const 1 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - local.get $2 - call $~lib/typedarray/Float64Array#__set - else - local.get $0 - i32.const 0 - local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - end + local.get $2 + call $assembly/mat4/multiply global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 12 i32.add global.set $~lib/memory/__stack_pointer - local.get $0 ) - (func $export:assembly/mat2/invert (param $0 i32) (param $1 i32) (result i32) - (local $2 f64) - (local $3 f64) - (local $4 f64) - (local $5 f64) - (local $6 f64) + (func $export:assembly/mat4/translate (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $3 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $1 i32.store offset=4 + local.get $3 + local.get $2 + i32.store offset=8 + local.get $0 local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.set $3 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.set $4 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.set $5 - block $__inlined_func$assembly/mat2/invert - local.get $3 - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.tee $2 - f64.mul - local.get $5 - local.get $4 - f64.mul - f64.sub - local.tee $6 - i64.reinterpret_f64 - i64.const 1 - i64.shl - i64.const 2 - i64.sub - i64.const -9007199254740994 - i64.gt_u - if - i32.const 0 - local.set $0 - br $__inlined_func$assembly/mat2/invert - end - local.get $0 - i32.const 0 - local.get $2 - f64.const 1 - local.get $6 - f64.div - local.tee $2 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - local.get $4 - f64.neg - local.get $2 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - local.get $5 - f64.neg - local.get $2 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - local.get $3 - local.get $2 - f64.mul - call $~lib/typedarray/Float64Array#__set - end + local.get $2 + call $assembly/mat4/translate global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 12 i32.add global.set $~lib/memory/__stack_pointer - local.get $0 ) - (func $export:assembly/mat2/adjoint (param $0 i32) (param $1 i32) (result i32) - (local $2 f64) + (func $export:assembly/mat4/scale (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 i32) global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $6 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $6 local.get $1 i32.store offset=4 - local.get $1 + local.get $6 + local.get $2 + i32.store offset=8 + local.get $2 i32.const 0 call $~lib/typedarray/Float64Array#__get - local.set $2 + local.set $3 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $5 local.get $0 i32.const 0 local.get $1 - i32.const 3 + i32.const 0 call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 local.get $1 i32.const 1 call $~lib/typedarray/Float64Array#__get - f64.neg + local.get $3 + f64.mul call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 local.get $1 i32.const 2 call $~lib/typedarray/Float64Array#__get - f64.neg + local.get $3 + f64.mul call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 3 - local.get $2 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul call $~lib/typedarray/Float64Array#__set - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer local.get $0 - ) - (func $export:assembly/mat2/determinant (param $0 i32) (result f64) - (local $1 f64) - global.get $~lib/memory/__stack_pointer i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.store + i32.const 5 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 0 + i32.const 6 + local.get $1 + i32.const 6 call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 3 + i32.const 7 + local.get $1 + i32.const 7 call $~lib/typedarray/Float64Array#__get + local.get $4 f64.mul + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 2 + i32.const 8 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $1 + i32.const 9 call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.mul + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 1 + i32.const 10 + local.get $1 + i32.const 10 call $~lib/typedarray/Float64Array#__get + local.get $5 f64.mul - f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + local.get $1 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + local.get $1 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $1 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $1 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + local.get $1 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 12 i32.add global.set $~lib/memory/__stack_pointer + local.get $0 ) - (func $export:assembly/mat2/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $export:assembly/mat4/rotate (param $0 i32) (param $1 i32) (param $2 f64) (param $3 i32) (result i32) + (local $4 i32) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $4 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $4 local.get $1 i32.store offset=4 - global.get $~lib/memory/__stack_pointer - local.get $2 + local.get $4 + local.get $3 i32.store offset=8 local.get $0 local.get $1 local.get $2 - call $assembly/mat2/multiply + local.get $3 + call $assembly/mat4/rotate global.get $~lib/memory/__stack_pointer i32.const 12 i32.add global.set $~lib/memory/__stack_pointer ) - (func $export:assembly/mat2/rotate (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (func $export:assembly/mat4/rotateX (param $0 i32) (param $1 i32) (param $2 f64) (result i32) (local $3 f64) (local $4 f64) (local $5 f64) (local $6 f64) (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $12 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $12 local.get $1 i32.store offset=4 + local.get $2 + call $~lib/math/NativeMath.sin + local.set $3 + local.get $2 + call $~lib/math/NativeMath.cos + local.set $2 local.get $1 - i32.const 0 + i32.const 4 call $~lib/typedarray/Float64Array#__get local.set $4 local.get $1 - i32.const 1 + i32.const 5 call $~lib/typedarray/Float64Array#__get local.set $5 local.get $1 - i32.const 2 + i32.const 6 call $~lib/typedarray/Float64Array#__get local.set $6 local.get $1 - i32.const 3 + i32.const 7 call $~lib/typedarray/Float64Array#__get local.set $7 - local.get $2 - call $~lib/math/NativeMath.sin - local.set $3 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $1 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $1 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.set $11 local.get $0 - i32.const 0 + local.get $1 + i32.ne + if + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + local.get $1 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $1 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $1 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + local.get $1 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + end + local.get $0 + i32.const 4 local.get $4 local.get $2 - call $~lib/math/NativeMath.cos - local.tee $2 f64.mul - local.get $6 + local.get $8 local.get $3 f64.mul f64.add call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 1 + i32.const 5 local.get $5 local.get $2 f64.mul - local.get $7 + local.get $9 local.get $3 f64.mul f64.add call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 2 - local.get $4 - local.get $3 - f64.neg - f64.mul + i32.const 6 local.get $6 local.get $2 f64.mul + local.get $10 + local.get $3 + f64.mul f64.add call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 3 - local.get $5 - local.get $3 - f64.neg - f64.mul + i32.const 7 local.get $7 local.get $2 f64.mul + local.get $11 + local.get $3 + f64.mul f64.add call $~lib/typedarray/Float64Array#__set - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $0 - ) - (func $export:assembly/mat2/scale (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 f64) - (local $4 f64) - (local $5 f64) - (local $6 f64) - (local $7 f64) - (local $8 f64) - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=8 - local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.set $5 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.set $6 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.set $7 - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.set $8 - local.get $2 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.set $3 + i32.const 8 + local.get $8 local.get $2 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.set $4 - local.get $0 - i32.const 0 - local.get $5 - local.get $3 f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - local.get $6 + local.get $4 local.get $3 f64.mul + f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 2 - local.get $7 - local.get $4 + i32.const 9 + local.get $9 + local.get $2 f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - local.get $8 - local.get $4 + local.get $5 + local.get $3 f64.mul - call $~lib/typedarray/Float64Array#__set - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $0 - ) - (func $export:assembly/mat2/fromRotation (param $0 i32) (param $1 f64) (result i32) - (local $2 f64) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - local.get $1 - call $~lib/math/NativeMath.sin - local.set $2 - local.get $0 - i32.const 0 - local.get $1 - call $~lib/math/NativeMath.cos - local.tee $1 + f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 1 + i32.const 10 + local.get $10 local.get $2 + f64.mul + local.get $6 + local.get $3 + f64.mul + f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 2 + i32.const 11 + local.get $11 local.get $2 - f64.neg - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - local.get $1 - call $~lib/typedarray/Float64Array#__set - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $0 - ) - (func $export:assembly/mat2/fromScaling (param $0 i32) (param $1 i32) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - local.get $0 - i32.const 0 - local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get + f64.mul + local.get $7 + local.get $3 + f64.mul + f64.sub call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer i32.const 8 @@ -27855,889 +27846,971 @@ global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $export:assembly/mat2/str (param $0 i32) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - local.get $0 - call $assembly/mat2/str - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/mat2/frob (param $0 i32) (result f64) - (local $1 f64) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - local.get $0 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.get $0 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.get $0 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.get $0 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $assembly/imports/MathUtil.hypot - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/mat2/LDU (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 16 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=8 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store offset=12 + (func $export:assembly/mat4/rotateY (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $12 local.get $0 - i32.const 2 - local.get $3 + i32.store + local.get $12 + local.get $1 + i32.store offset=4 + local.get $2 + call $~lib/math/NativeMath.sin + local.set $3 + local.get $2 + call $~lib/math/NativeMath.cos + local.set $2 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 i32.const 2 call $~lib/typedarray/Float64Array#__get - local.get $3 - i32.const 0 + local.set $6 + local.get $1 + i32.const 3 call $~lib/typedarray/Float64Array#__get - f64.div - call $~lib/typedarray/Float64Array#__set - local.get $2 - i32.const 0 - local.get $3 - i32.const 0 + local.set $7 + local.get $1 + i32.const 8 call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set + local.set $8 + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $1 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $1 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $0 + local.get $1 + i32.ne + if + local.get $0 + i32.const 4 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + local.get $1 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $1 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $1 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + local.get $1 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + end + local.get $0 + i32.const 0 + local.get $4 local.get $2 - i32.const 1 + f64.mul + local.get $8 local.get $3 - i32.const 1 - call $~lib/typedarray/Float64Array#__get + f64.mul + f64.sub call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $5 local.get $2 - i32.const 3 + f64.mul + local.get $9 local.get $3 - i32.const 3 - call $~lib/typedarray/Float64Array#__get + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 - call $~lib/typedarray/Float64Array#__get + local.get $6 local.get $2 - i32.const 1 - call $~lib/typedarray/Float64Array#__get + f64.mul + local.get $10 + local.get $3 f64.mul f64.sub call $~lib/typedarray/Float64Array#__set - global.get $~lib/memory/__stack_pointer + local.get $0 i32.const 3 - i32.const 2 - i32.const 25 - i32.const 0 - call $~lib/rt/__newArray - local.tee $3 - i32.store - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.load offset=4 - i32.store offset=4 + local.get $7 + local.get $2 + f64.mul + local.get $11 local.get $3 - i32.const 0 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set local.get $0 - call $~lib/array/Array<~lib/typedarray/Float64Array>#__uset - local.get $3 - i32.const 1 - local.get $1 - call $~lib/array/Array<~lib/typedarray/Float64Array>#__uset - local.get $3 - i32.const 2 - local.get $2 - call $~lib/array/Array<~lib/typedarray/Float64Array>#__uset - global.get $~lib/memory/__stack_pointer i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 16 - i32.add - global.set $~lib/memory/__stack_pointer + local.get $4 local.get $3 - ) - (func $export:assembly/mat2/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer + f64.mul + local.get $8 local.get $2 - i32.store offset=8 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set local.get $0 - local.get $1 + i32.const 9 + local.get $5 + local.get $3 + f64.mul + local.get $9 local.get $2 - call $assembly/vec4/add - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/mat2/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer + i32.const 10 + local.get $6 + local.get $3 + f64.mul + local.get $10 local.get $2 - i32.store offset=8 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set local.get $0 - local.get $1 + i32.const 11 + local.get $7 + local.get $3 + f64.mul + local.get $11 local.get $2 - call $assembly/vec4/subtract + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - i32.const 12 + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer + local.get $0 ) - (func $export:assembly/mat2/exactEquals (param $0 i32) (param $1 i32) (result i32) + (func $export:assembly/mat4/rotateZ (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $12 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $12 local.get $1 i32.store offset=4 - local.get $0 + local.get $2 + call $~lib/math/NativeMath.sin + local.set $3 + local.get $2 + call $~lib/math/NativeMath.cos + local.set $2 local.get $1 - call $assembly/vec4/exactEquals - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/mat2/equals (param $0 i32) (param $1 i32) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $4 local.get $1 - i32.store offset=4 - local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $5 local.get $1 - call $assembly/mat2/equals - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/mat2/multiplyScalar (param $0 i32) (param $1 i32) (param $2 f64) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $6 local.get $1 - i32.store offset=4 - local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $7 local.get $1 - local.get $2 - call $assembly/vec4/scale - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/mat2/multiplyScalarAndAdd (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $8 local.get $1 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=8 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $11 local.get $0 - i32.const 0 local.get $1 + i32.ne + if + local.get $0 + i32.const 8 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + local.get $1 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + local.get $1 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + local.get $1 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $1 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $1 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + local.get $1 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + end + local.get $0 i32.const 0 - call $~lib/typedarray/Float64Array#__get + local.get $4 local.get $2 - i32.const 0 - call $~lib/typedarray/Float64Array#__get + f64.mul + local.get $8 local.get $3 f64.mul f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get + local.get $5 local.get $2 - i32.const 1 - call $~lib/typedarray/Float64Array#__get + f64.mul + local.get $9 local.get $3 f64.mul f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get + local.get $6 local.get $2 - i32.const 2 - call $~lib/typedarray/Float64Array#__get + f64.mul + local.get $10 local.get $3 f64.mul f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 3 - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get + local.get $7 local.get $2 - i32.const 3 - call $~lib/typedarray/Float64Array#__get + f64.mul + local.get $11 local.get $3 f64.mul f64.add call $~lib/typedarray/Float64Array#__set - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $0 - ) - (func $export:assembly/mat2d/clone (param $0 i32) (result i32) - (local $1 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - global.get $~lib/memory/__stack_pointer - i32.const 6 - call $~lib/typedarray/Float64Array#constructor - local.tee $1 - i32.store - local.get $1 - i32.const 0 - local.get $0 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 1 - local.get $0 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 2 - local.get $0 - i32.const 2 - call $~lib/typedarray/Float64Array#__get + local.get $8 + local.get $2 + f64.mul + local.get $4 + local.get $3 + f64.mul + f64.sub call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 3 local.get $0 - i32.const 3 - call $~lib/typedarray/Float64Array#__get + i32.const 5 + local.get $9 + local.get $2 + f64.mul + local.get $5 + local.get $3 + f64.mul + f64.sub call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 4 local.get $0 - i32.const 4 - call $~lib/typedarray/Float64Array#__get + i32.const 6 + local.get $10 + local.get $2 + f64.mul + local.get $6 + local.get $3 + f64.mul + f64.sub call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 5 local.get $0 - i32.const 5 - call $~lib/typedarray/Float64Array#__get + i32.const 7 + local.get $11 + local.get $2 + f64.mul + local.get $7 + local.get $3 + f64.mul + f64.sub call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $1 + local.get $0 ) - (func $export:assembly/mat2d/copy (param $0 i32) (param $1 i32) (result i32) + (func $export:assembly/mat4/fromTranslation (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $2 local.get $1 i32.store offset=4 local.get $0 i32.const 0 - local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get + f64.const 1 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 3 - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 4 - local.get $1 - i32.const 4 - call $~lib/typedarray/Float64Array#__get + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 5 - local.get $1 - i32.const 5 - call $~lib/typedarray/Float64Array#__get + f64.const 1 call $~lib/typedarray/Float64Array#__set - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $0 - ) - (func $export:assembly/mat2d/identity (param $0 i32) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer local.get $0 - i32.store + i32.const 6 + f64.const 0 + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 0 - f64.const 1 + i32.const 7 + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 1 + i32.const 8 f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 2 + i32.const 9 f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 3 + i32.const 10 f64.const 1 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 4 + i32.const 11 f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 5 - f64.const 0 + i32.const 12 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + f64.const 1 call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $export:assembly/mat2d/set (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (result i32) + (func $export:assembly/mat4/fromScaling (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $0 i32.store + local.get $2 + local.get $1 + i32.store offset=4 local.get $0 i32.const 0 local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 - local.get $2 + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 - local.get $3 + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 3 - local.get $4 + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 4 - local.get $5 + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 5 - local.get $6 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get call $~lib/typedarray/Float64Array#__set - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer local.get $0 - ) - (func $export:assembly/mat2d/invert (param $0 i32) (param $1 i32) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer + i32.const 6 + f64.const 0 + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set local.get $0 - local.get $1 - call $assembly/mat2d/invert - global.get $~lib/memory/__stack_pointer i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/mat2d/determinant (param $0 i32) (result f64) - (local $1 f64) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - local.get $0 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.get $0 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - f64.mul + f64.const 0 + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 1 - call $~lib/typedarray/Float64Array#__get + i32.const 9 + f64.const 0 + call $~lib/typedarray/Float64Array#__set local.get $0 + i32.const 10 + local.get $1 i32.const 2 call $~lib/typedarray/Float64Array#__get - f64.mul - f64.sub - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/mat2d/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=8 + i32.const 11 + f64.const 0 + call $~lib/typedarray/Float64Array#__set local.get $0 - local.get $1 - local.get $2 - call $assembly/mat2d/multiply - global.get $~lib/memory/__stack_pointer i32.const 12 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/mat2d/rotate (param $0 i32) (param $1 i32) (param $2 f64) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer + f64.const 0 + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 + i32.const 13 + f64.const 0 + call $~lib/typedarray/Float64Array#__set local.get $0 - local.get $1 - local.get $2 - call $assembly/mat2d/rotate + i32.const 14 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + f64.const 1 + call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer + local.get $0 ) - (func $export:assembly/mat2d/scale (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $export:assembly/mat4/fromRotation (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 f64) (local $4 f64) (local $5 f64) (local $6 f64) (local $7 f64) (local $8 f64) - (local $9 f64) + (local $9 i32) (local $10 f64) global.get $~lib/memory/__stack_pointer - i32.const 12 + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=8 - local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.set $5 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.set $6 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.set $7 - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.set $8 - local.get $1 - i32.const 4 - call $~lib/typedarray/Float64Array#__get - local.set $9 - local.get $1 - i32.const 5 - call $~lib/typedarray/Float64Array#__get - local.set $10 - local.get $2 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.set $3 - local.get $2 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.set $4 - local.get $0 - i32.const 0 - local.get $5 - local.get $3 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - local.get $6 - local.get $3 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - local.get $7 - local.get $4 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - local.get $8 - local.get $4 - f64.mul - call $~lib/typedarray/Float64Array#__set + local.tee $9 local.get $0 - i32.const 4 + i32.store local.get $9 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 5 - local.get $10 - call $~lib/typedarray/Float64Array#__set + local.get $2 + i32.store offset=4 + block $__inlined_func$assembly/mat4/fromRotation + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.tee $4 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.tee $5 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.tee $7 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $assembly/imports/MathUtil.hypot + local.tee $3 + f64.const 1e-06 + f64.lt + if + i32.const 0 + local.set $0 + br $__inlined_func$assembly/mat4/fromRotation + end + local.get $1 + call $~lib/math/NativeMath.sin + local.set $6 + local.get $0 + i32.const 0 + local.get $4 + f64.const 1 + local.get $3 + f64.div + local.tee $3 + f64.mul + local.tee $4 + local.get $4 + f64.mul + f64.const 1 + local.get $1 + call $~lib/math/NativeMath.cos + local.tee $8 + f64.sub + local.tee $1 + f64.mul + local.get $8 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $5 + local.get $3 + f64.mul + local.tee $5 + local.get $4 + f64.mul + local.get $1 + f64.mul + local.get $7 + local.get $3 + f64.mul + local.tee $3 + local.get $6 + f64.mul + local.tee $7 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $3 + local.get $4 + f64.mul + local.get $1 + f64.mul + local.get $5 + local.get $6 + f64.mul + local.tee $10 + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $4 + local.get $5 + f64.mul + local.get $1 + f64.mul + local.get $7 + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $5 + local.get $5 + f64.mul + local.get $1 + f64.mul + local.get $8 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $3 + local.get $5 + f64.mul + local.get $1 + f64.mul + local.get $4 + local.get $6 + f64.mul + local.tee $6 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $4 + local.get $3 + f64.mul + local.get $1 + f64.mul + local.get $10 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $5 + local.get $3 + f64.mul + local.get $1 + f64.mul + local.get $6 + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + local.get $3 + local.get $3 + f64.mul + local.get $1 + f64.mul + local.get $8 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + end global.get $~lib/memory/__stack_pointer - i32.const 12 + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $export:assembly/mat2d/translate (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 f64) - (local $4 f64) - (local $5 f64) - (local $6 f64) - (local $7 f64) - (local $8 f64) - (local $9 f64) - (local $10 f64) + (func $export:assembly/mat4/fromXRotation (param $0 i32) (param $1 f64) (result i32) + (local $2 f64) global.get $~lib/memory/__stack_pointer - i32.const 12 + i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer local.get $0 i32.store - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=8 - local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.set $3 local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.set $4 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.set $5 - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.set $6 - local.get $1 - i32.const 4 - call $~lib/typedarray/Float64Array#__get - local.set $9 + call $~lib/math/NativeMath.sin + local.set $2 local.get $1 - i32.const 5 - call $~lib/typedarray/Float64Array#__get - local.set $10 - local.get $2 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.set $7 - local.get $2 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.set $8 + call $~lib/math/NativeMath.cos + local.set $1 local.get $0 i32.const 0 - local.get $3 + f64.const 1 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 - local.get $4 + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 - local.get $5 + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 3 - local.get $6 + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 4 - local.get $3 - local.get $7 - f64.mul - local.get $5 - local.get $8 - f64.mul - f64.add - local.get $9 - f64.add + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 5 - local.get $4 - local.get $7 - f64.mul - local.get $6 - local.get $8 - f64.mul - f64.add - local.get $10 - f64.add + local.get $1 call $~lib/typedarray/Float64Array#__set - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $0 - ) - (func $export:assembly/mat2d/fromRotation (param $0 i32) (param $1 f64) (result i32) - (local $2 f64) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer local.get $0 - i32.store - local.get $1 - call $~lib/math/NativeMath.sin - local.set $2 + i32.const 6 + local.get $2 + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 0 - local.get $1 - call $~lib/math/NativeMath.cos - local.tee $1 + i32.const 7 + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 1 - local.get $2 + i32.const 8 + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 2 + i32.const 9 local.get $2 f64.neg call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 3 + i32.const 10 local.get $1 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 4 + i32.const 11 f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 5 + i32.const 12 f64.const 0 call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + f64.const 1 + call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $export:assembly/mat2d/fromScaling (param $0 i32) (param $1 i32) (result i32) + (func $export:assembly/mat4/fromYRotation (param $0 i32) (param $1 f64) (result i32) + (local $2 f64) global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer local.get $0 i32.store - global.get $~lib/memory/__stack_pointer local.get $1 - i32.store offset=4 + call $~lib/math/NativeMath.sin + local.set $2 local.get $0 i32.const 0 local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get + call $~lib/math/NativeMath.cos + local.tee $1 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 @@ -28745,13 +28818,12 @@ call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 - f64.const 0 + local.get $2 + f64.neg call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 3 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 4 @@ -28759,1142 +28831,1155 @@ call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 5 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 f64.const 0 call $~lib/typedarray/Float64Array#__set - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer local.get $0 - ) - (func $export:assembly/mat2d/fromTranslation (param $0 i32) (param $1 i32) (result i32) - global.get $~lib/memory/__stack_pointer i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer + local.get $2 + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 + i32.const 9 + f64.const 0 + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 0 - f64.const 1 + i32.const 10 + local.get $1 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 1 + i32.const 11 f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 2 + i32.const 12 f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 3 - f64.const 1 + i32.const 13 + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 4 - local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get + i32.const 14 + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 5 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get + i32.const 15 + f64.const 1 call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 4 i32.add global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $export:assembly/mat2d/str (param $0 i32) (result i32) + (func $export:assembly/mat4/fromZRotation (param $0 i32) (param $1 f64) (result i32) + (local $2 f64) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - local.get $0 - call $assembly/mat2d/str - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/mat2d/frob (param $0 i32) (result f64) - (local $1 f64) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer local.get $0 i32.store + local.get $1 + call $~lib/math/NativeMath.sin + local.set $2 local.get $0 i32.const 0 - call $~lib/typedarray/Float64Array#__get + local.get $1 + call $~lib/math/NativeMath.cos + local.tee $1 + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 - call $~lib/typedarray/Float64Array#__get + local.get $2 + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 - call $~lib/typedarray/Float64Array#__get + f64.const 0 + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 3 - call $~lib/typedarray/Float64Array#__get + f64.const 0 + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 4 - call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.neg + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 5 - call $~lib/typedarray/Float64Array#__get - f64.const 1 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 + local.get $1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 f64.const 0 - call $assembly/imports/MathUtil.hypot - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/mat2d/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=8 + i32.const 9 + f64.const 0 + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 0 - local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - f64.add + i32.const 10 + f64.const 1 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 1 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - f64.add + i32.const 11 + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 2 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - f64.add + i32.const 12 + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 3 - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - f64.add + i32.const 13 + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 4 - local.get $1 - i32.const 4 - call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 4 - call $~lib/typedarray/Float64Array#__get - f64.add + i32.const 14 + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 5 - local.get $1 - i32.const 5 - call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 5 - call $~lib/typedarray/Float64Array#__get - f64.add + i32.const 15 + f64.const 1 call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - i32.const 12 + i32.const 4 i32.add global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $export:assembly/mat2d/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $export:assembly/mat4/fromRotationTranslation (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $3 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $1 i32.store offset=4 - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $2 i32.store offset=8 local.get $0 local.get $1 local.get $2 - call $assembly/mat2d/subtract + call $assembly/mat4/fromRotationTranslation global.get $~lib/memory/__stack_pointer i32.const 12 i32.add global.set $~lib/memory/__stack_pointer ) - (func $export:assembly/mat2d/multiplyScalar (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (func $export:assembly/mat4/fromQuat2 (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - local.get $0 - i32.const 0 - local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.get $2 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.get $2 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.get $2 - f64.mul - call $~lib/typedarray/Float64Array#__set + local.tee $2 local.get $0 - i32.const 3 - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get + i32.store local.get $2 - f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 4 local.get $1 - i32.const 4 - call $~lib/typedarray/Float64Array#__get - local.get $2 - f64.mul - call $~lib/typedarray/Float64Array#__set + i32.store offset=4 local.get $0 - i32.const 5 local.get $1 - i32.const 5 - call $~lib/typedarray/Float64Array#__get - local.get $2 - f64.mul - call $~lib/typedarray/Float64Array#__set + call $assembly/mat4/fromQuat2 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $0 ) - (func $export:assembly/mat2d/multiplyScalarAndAdd (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + (func $export:assembly/mat4/getTranslation (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer - i32.const 12 + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=8 - local.get $0 - i32.const 0 - local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.get $3 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.get $3 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.get $3 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.get $3 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $0 - i32.const 4 - local.get $1 - i32.const 4 - call $~lib/typedarray/Float64Array#__get + i32.store local.get $2 - i32.const 4 - call $~lib/typedarray/Float64Array#__get - local.get $3 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.store offset=4 local.get $0 - i32.const 5 local.get $1 - i32.const 5 - call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 5 - call $~lib/typedarray/Float64Array#__get - local.get $3 - f64.mul - f64.add - call $~lib/typedarray/Float64Array#__set + call $assembly/mat4/getTranslation global.get $~lib/memory/__stack_pointer - i32.const 12 + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $0 ) - (func $export:assembly/mat2d/exactEquals (param $0 i32) (param $1 i32) (result i32) + (func $export:assembly/mat4/getScaling (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $2 local.get $1 i32.store offset=4 local.get $0 - i32.const 0 - call $~lib/typedarray/Float64Array#__get local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - f64.eq - if (result i32) - local.get $0 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - f64.eq - else - i32.const 0 - end - if (result i32) - local.get $0 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - f64.eq - else - i32.const 0 - end - if (result i32) - local.get $0 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - f64.eq - else - i32.const 0 - end - if (result i32) - local.get $0 - i32.const 4 - call $~lib/typedarray/Float64Array#__get - local.get $1 - i32.const 4 - call $~lib/typedarray/Float64Array#__get - f64.eq - else - i32.const 0 - end - if (result i32) - local.get $0 - i32.const 5 - call $~lib/typedarray/Float64Array#__get - local.get $1 - i32.const 5 - call $~lib/typedarray/Float64Array#__get - f64.eq - else - i32.const 0 - end + call $assembly/mat4/getScaling global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer ) - (func $export:assembly/mat2d/equals (param $0 i32) (param $1 i32) (result i32) + (func $export:assembly/mat4/getRotation (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $2 local.get $1 i32.store offset=4 local.get $0 local.get $1 - call $assembly/mat2d/equals + call $assembly/mat4/getRotation global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer ) - (func $export:assembly/mat3/fromMat4 (param $0 i32) (param $1 i32) (result i32) + (func $export:assembly/mat4/decompose (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 i32) global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 16 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $4 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $4 local.get $1 i32.store offset=4 + local.get $4 + local.get $2 + i32.store offset=8 + local.get $4 + local.get $3 + i32.store offset=12 local.get $0 - i32.const 0 + local.get $1 + local.get $2 + local.get $3 + call $assembly/mat4/decompose + global.get $~lib/memory/__stack_pointer + i32.const 16 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/fromRotationTranslationScale (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 i32) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 f64) + (local $16 f64) + (local $17 f64) + global.get $~lib/memory/__stack_pointer + i32.const 16 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $9 + local.get $0 + i32.store + local.get $9 + local.get $1 + i32.store offset=4 + local.get $9 + local.get $2 + i32.store offset=8 + local.get $9 + local.get $3 + i32.store offset=12 local.get $1 i32.const 0 call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 + local.set $4 local.get $1 i32.const 1 call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 + local.set $6 + local.get $1 i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $5 local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $3 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $3 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $3 i32.const 2 call $~lib/typedarray/Float64Array#__get + local.set $12 + local.get $0 + i32.const 0 + f64.const 1 + local.get $6 + local.get $6 + local.get $6 + f64.add + local.tee $8 + f64.mul + local.tee $13 + local.get $5 + local.get $5 + local.get $5 + f64.add + local.tee $5 + f64.mul + local.tee $14 + f64.add + f64.sub + local.get $7 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $4 + local.get $8 + f64.mul + local.tee $15 + local.get $10 + local.get $5 + f64.mul + local.tee $16 + f64.add + local.get $7 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $4 + local.get $5 + f64.mul + local.tee $17 + local.get $10 + local.get $8 + f64.mul + local.tee $8 + f64.sub + local.get $7 + f64.mul call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 3 - local.get $1 - i32.const 4 - call $~lib/typedarray/Float64Array#__get + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 4 - local.get $1 - i32.const 5 - call $~lib/typedarray/Float64Array#__get + local.get $15 + local.get $16 + f64.sub + local.get $11 + f64.mul call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 5 - local.get $1 - i32.const 6 - call $~lib/typedarray/Float64Array#__get + f64.const 1 + local.get $4 + local.get $4 + local.get $4 + f64.add + local.tee $4 + f64.mul + local.tee $7 + local.get $14 + f64.add + f64.sub + local.get $11 + f64.mul call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 6 - local.get $1 - i32.const 8 - call $~lib/typedarray/Float64Array#__get + local.get $6 + local.get $5 + f64.mul + local.tee $6 + local.get $10 + local.get $4 + f64.mul + local.tee $4 + f64.add + local.get $11 + f64.mul call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 7 - local.get $1 - i32.const 9 - call $~lib/typedarray/Float64Array#__get + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 8 - local.get $1 - i32.const 10 - call $~lib/typedarray/Float64Array#__get + local.get $17 + local.get $8 + f64.add + local.get $12 + f64.mul call $~lib/typedarray/Float64Array#__set - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $0 - ) - (func $export:assembly/mat3/clone (param $0 i32) (result i32) - (local $1 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - global.get $~lib/memory/__stack_pointer i32.const 9 - call $~lib/typedarray/Float64Array#constructor - local.tee $1 - i32.store - local.get $1 - i32.const 0 - local.get $0 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 1 - local.get $0 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 2 - local.get $0 - i32.const 2 - call $~lib/typedarray/Float64Array#__get + local.get $6 + local.get $4 + f64.sub + local.get $12 + f64.mul call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 3 local.get $0 - i32.const 3 - call $~lib/typedarray/Float64Array#__get + i32.const 10 + f64.const 1 + local.get $7 + local.get $13 + f64.add + f64.sub + local.get $12 + f64.mul call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 4 local.get $0 - i32.const 4 - call $~lib/typedarray/Float64Array#__get + i32.const 11 + f64.const 0 call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 5 local.get $0 - i32.const 5 + i32.const 12 + local.get $2 + i32.const 0 call $~lib/typedarray/Float64Array#__get call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 6 local.get $0 - i32.const 6 + i32.const 13 + local.get $2 + i32.const 1 call $~lib/typedarray/Float64Array#__get call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 7 local.get $0 - i32.const 7 + i32.const 14 + local.get $2 + i32.const 2 call $~lib/typedarray/Float64Array#__get call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 8 local.get $0 - i32.const 8 - call $~lib/typedarray/Float64Array#__get + i32.const 15 + f64.const 1 call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 16 i32.add global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/mat4/fromRotationTranslationScaleOrigin (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) + (local $5 i32) global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add + i32.const 20 + i32.sub global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $5 + local.get $0 + i32.store + local.get $5 + local.get $1 + i32.store offset=4 + local.get $5 + local.get $2 + i32.store offset=8 + local.get $5 + local.get $3 + i32.store offset=12 + local.get $5 + local.get $4 + i32.store offset=16 + local.get $0 local.get $1 + local.get $2 + local.get $3 + local.get $4 + call $assembly/mat4/fromRotationTranslationScaleOrigin + global.get $~lib/memory/__stack_pointer + i32.const 20 + i32.add + global.set $~lib/memory/__stack_pointer ) - (func $export:assembly/mat3/copy (param $0 i32) (param $1 i32) (result i32) + (func $export:assembly/mat4/fromQuat (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 i32) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $8 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $8 local.get $1 i32.store offset=4 - local.get $0 - i32.const 0 local.get $1 i32.const 0 call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 4 - local.get $1 - i32.const 4 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 5 - local.get $1 - i32.const 5 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 6 + local.set $4 local.get $1 - i32.const 6 + i32.const 1 call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 7 + local.set $2 local.get $1 - i32.const 7 + i32.const 2 call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 8 + local.set $3 local.get $1 - i32.const 8 + i32.const 3 call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $0 - ) - (func $export:assembly/mat3/set (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (param $7 f64) (param $8 f64) (param $9 f64) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store + local.set $5 local.get $0 i32.const 0 - local.get $1 + f64.const 1 + local.get $2 + local.get $2 + local.get $2 + f64.add + local.tee $7 + f64.mul + local.tee $9 + f64.sub + local.get $3 + local.get $3 + local.get $3 + f64.add + local.tee $6 + f64.mul + local.tee $10 + f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 local.get $2 + local.get $4 + local.get $4 + f64.add + local.tee $2 + f64.mul + local.tee $11 + local.get $5 + local.get $6 + f64.mul + local.tee $6 + f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 local.get $3 + local.get $2 + f64.mul + local.tee $12 + local.get $5 + local.get $7 + f64.mul + local.tee $13 + f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 3 - local.get $4 + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 4 - local.get $5 + local.get $11 + local.get $6 + f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 5 - local.get $6 + f64.const 1 + local.get $4 + local.get $2 + f64.mul + f64.sub + local.tee $4 + local.get $10 + f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 6 + local.get $3 local.get $7 + f64.mul + local.tee $3 + local.get $5 + local.get $2 + f64.mul + local.tee $2 + f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 7 - local.get $8 + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 8 - local.get $9 - call $~lib/typedarray/Float64Array#__set - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $0 - ) - (func $export:assembly/mat3/identity (param $0 i32) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - local.get $0 - i32.const 0 - f64.const 1 + local.get $12 + local.get $13 + f64.add call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 1 - f64.const 0 + i32.const 9 + local.get $3 + local.get $2 + f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 2 - f64.const 0 + i32.const 10 + local.get $4 + local.get $9 + f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 3 + i32.const 11 f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 4 - f64.const 1 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 5 + i32.const 12 f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 6 + i32.const 13 f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 7 + i32.const 14 f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 8 + i32.const 15 f64.const 1 call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $0 - ) - (func $export:assembly/mat3/transpose (param $0 i32) (param $1 i32) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - local.get $0 - local.get $1 - call $assembly/mat3/transpose - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/mat3/invert (param $0 i32) (param $1 i32) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - local.get $0 - local.get $1 - call $assembly/mat3/invert - global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/mat3/adjoint (param $0 i32) (param $1 i32) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 local.get $0 - local.get $1 - call $assembly/mat3/adjoint - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer ) - (func $export:assembly/mat3/determinant (param $0 i32) (result f64) - (local $1 f64) - (local $2 f64) - (local $3 f64) - (local $4 f64) - (local $5 f64) - (local $6 f64) + (func $export:assembly/mat4/frustum (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (result i32) (local $7 f64) (local $8 f64) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer local.get $0 i32.store local.get $0 i32.const 0 - call $~lib/typedarray/Float64Array#__get + local.get $5 + local.get $5 + f64.add + local.tee $7 + f64.const 1 + local.get $2 + local.get $1 + f64.sub + f64.div + local.tee $8 + f64.mul + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.set $7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.set $8 + f64.const 0 + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.set $1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 4 - call $~lib/typedarray/Float64Array#__get - local.set $3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 5 - call $~lib/typedarray/Float64Array#__get - local.set $4 + local.get $7 + f64.const 1 + local.get $4 + local.get $3 + f64.sub + f64.div + local.tee $7 + f64.mul + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 6 - call $~lib/typedarray/Float64Array#__get - local.set $5 + f64.const 0 + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 7 - call $~lib/typedarray/Float64Array#__get - local.set $6 + f64.const 0 + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 8 - call $~lib/typedarray/Float64Array#__get - local.tee $2 - local.get $3 - f64.mul - local.get $4 - local.get $6 - f64.mul - f64.sub - f64.mul - local.get $7 local.get $2 - f64.neg local.get $1 + f64.add + local.get $8 f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 local.get $4 - local.get $5 - f64.mul + local.get $3 f64.add + local.get $7 f64.mul - f64.add - local.get $8 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 local.get $6 - local.get $1 - f64.mul - local.get $3 local.get $5 - f64.mul + f64.add + f64.const 1 + local.get $5 + local.get $6 f64.sub + f64.div + local.tee $1 f64.mul - f64.add - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/mat3/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=8 + i32.const 11 + f64.const -1 + call $~lib/typedarray/Float64Array#__set local.get $0 - local.get $1 - local.get $2 - call $assembly/mat3/multiply - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/mat3/translate (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - global.get $~lib/memory/__stack_pointer i32.const 12 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer + f64.const 0 + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=8 + i32.const 13 + f64.const 0 + call $~lib/typedarray/Float64Array#__set local.get $0 - local.get $1 + i32.const 14 + local.get $6 + local.get $5 + f64.mul + local.tee $2 local.get $2 - call $assembly/mat3/translate + f64.add + local.get $1 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + f64.const 0 + call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - i32.const 12 + i32.const 4 i32.add global.set $~lib/memory/__stack_pointer + local.get $0 ) - (func $export:assembly/mat3/rotate (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (func $export:assembly/mat4/perspectiveNO (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (result i32) global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer local.get $0 i32.store - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 local.get $0 local.get $1 local.get $2 - call $assembly/mat3/rotate + local.get $3 + local.get $4 + call $assembly/mat4/perspectiveNO global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 4 i32.add global.set $~lib/memory/__stack_pointer ) - (func $export:assembly/mat3/scale (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 f64) - (local $4 f64) + (func $export:assembly/mat4/perspectiveZO (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (result i32) global.get $~lib/memory/__stack_pointer - i32.const 12 + i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer local.get $0 i32.store - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=8 - local.get $2 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.set $3 - local.get $2 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.set $4 local.get $0 i32.const 0 - local.get $3 + f64.const 1 local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get + f64.const 0.5 f64.mul + call $~lib/math/NativeMath.tan + f64.div + local.tee $1 + local.get $2 + f64.div call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 - local.get $3 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - f64.mul + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 - local.get $3 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - f64.mul + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 3 - local.get $4 - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - f64.mul + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 4 - local.get $4 - local.get $1 - i32.const 4 - call $~lib/typedarray/Float64Array#__get - f64.mul + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 5 - local.get $4 local.get $1 - i32.const 5 - call $~lib/typedarray/Float64Array#__get - f64.mul call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 6 - local.get $1 - i32.const 6 - call $~lib/typedarray/Float64Array#__get + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 7 - local.get $1 - i32.const 7 - call $~lib/typedarray/Float64Array#__get + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 8 - local.get $1 - i32.const 8 - call $~lib/typedarray/Float64Array#__get + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + f64.const -1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + f64.const 0 call $~lib/typedarray/Float64Array#__set + local.get $4 + f64.const inf + f64.ne + if + local.get $0 + i32.const 10 + local.get $4 + f64.const 1 + local.get $3 + local.get $4 + f64.sub + f64.div + local.tee $1 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $4 + local.get $3 + f64.mul + local.get $1 + f64.mul + call $~lib/typedarray/Float64Array#__set + else + local.get $0 + i32.const 10 + f64.const -1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $3 + f64.neg + call $~lib/typedarray/Float64Array#__set + end global.get $~lib/memory/__stack_pointer - i32.const 12 + i32.const 4 i32.add global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $export:assembly/mat3/fromTranslation (param $0 i32) (param $1 i32) (result i32) + (func $export:assembly/mat4/perspectiveFromFieldOfView (param $0 i32) (param $1 i32) (param $2 f64) (param $3 f64) (result i32) + (local $4 f64) + (local $5 f64) + (local $6 i32) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $6 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $6 local.get $1 i32.store offset=4 + local.get $1 + f64.load + f64.const 3.141592653589793 + f64.mul + f64.const 180 + f64.div + call $~lib/math/NativeMath.tan + local.set $4 + local.get $1 + f64.load offset=8 + f64.const 3.141592653589793 + f64.mul + f64.const 180 + f64.div + call $~lib/math/NativeMath.tan + local.set $5 local.get $0 i32.const 0 - f64.const 1 + f64.const 2 + local.get $1 + f64.load offset=16 + f64.const 3.141592653589793 + f64.mul + f64.const 180 + f64.div + call $~lib/math/NativeMath.tan + local.tee $7 + local.get $1 + f64.load offset=24 + f64.const 3.141592653589793 + f64.mul + f64.const 180 + f64.div + call $~lib/math/NativeMath.tan + local.tee $8 + f64.add + f64.div + local.tee $9 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 @@ -29910,109 +29995,148 @@ call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 4 - f64.const 1 + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 5 - f64.const 0 + f64.const 2 + local.get $4 + local.get $5 + f64.add + f64.div + local.tee $10 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 6 - local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 7 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 8 - f64.const 1 - call $~lib/typedarray/Float64Array#__set - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $0 - ) - (func $export:assembly/mat3/fromRotation (param $0 i32) (param $1 f64) (result i32) - (local $2 f64) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - local.get $1 - call $~lib/math/NativeMath.sin - local.set $2 - local.get $0 - i32.const 0 - local.get $1 - call $~lib/math/NativeMath.cos - local.tee $1 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - local.get $2 + local.get $7 + local.get $8 + f64.sub + local.get $9 + f64.mul + f64.const 0.5 + f64.mul + f64.neg call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 2 - f64.const 0 + i32.const 9 + local.get $4 + local.get $5 + f64.sub + local.get $10 + f64.mul + f64.const 0.5 + f64.mul call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 3 + i32.const 10 + local.get $3 local.get $2 - f64.neg + local.get $3 + f64.sub + local.tee $4 + f64.div call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 4 - local.get $1 + i32.const 11 + f64.const -1 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 5 + i32.const 12 f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 6 + i32.const 13 f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 7 - f64.const 0 + i32.const 14 + local.get $3 + local.get $2 + f64.mul + local.get $4 + f64.div call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 8 - f64.const 1 + i32.const 15 + f64.const 0 call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $export:assembly/mat3/fromScaling (param $0 i32) (param $1 i32) (result i32) + (func $export:assembly/mat4/orthoNO (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (result i32) global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $0 local.get $1 - i32.store offset=4 + local.get $2 + local.get $3 + local.get $4 + local.get $5 + local.get $6 + call $assembly/mat4/orthoNO + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/mat4/orthoZO (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (result i32) + (local $7 f64) + (local $8 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store local.get $0 i32.const 0 + f64.const 1 local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.sub + f64.div + local.tee $7 + f64.const -2 + f64.mul call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 @@ -30028,13 +30152,18 @@ call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 4 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 5 - f64.const 0 + f64.const 1 + local.get $3 + local.get $4 + f64.sub + f64.div + local.tee $8 + f64.const -2 + f64.mul call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 6 @@ -30046,198 +30175,180 @@ call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 8 - f64.const 1 + f64.const 0 call $~lib/typedarray/Float64Array#__set - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $0 - ) - (func $export:assembly/mat3/fromMat2d (param $0 i32) (param $1 i32) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 local.get $0 - i32.const 0 - local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get + i32.const 9 + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 1 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get + i32.const 10 + f64.const 1 + local.get $5 + local.get $6 + f64.sub + f64.div + local.tee $6 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 2 + i32.const 11 f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 3 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 4 + i32.const 12 local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 5 - f64.const 0 + local.get $2 + f64.add + local.get $7 + f64.mul call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 6 - local.get $1 - i32.const 4 - call $~lib/typedarray/Float64Array#__get + i32.const 13 + local.get $4 + local.get $3 + f64.add + local.get $8 + f64.mul call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 7 - local.get $1 - i32.const 5 - call $~lib/typedarray/Float64Array#__get + i32.const 14 + local.get $5 + local.get $6 + f64.mul call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 8 + i32.const 15 f64.const 1 call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 4 i32.add global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $export:assembly/mat3/fromQuat (param $0 i32) (param $1 i32) (result i32) + (func $export:assembly/mat4/lookAt (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 i32) global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 16 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $4 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $4 local.get $1 i32.store offset=4 + local.get $4 + local.get $2 + i32.store offset=8 + local.get $4 + local.get $3 + i32.store offset=12 local.get $0 local.get $1 - call $assembly/mat3/fromQuat + local.get $2 + local.get $3 + call $assembly/mat4/lookAt global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 16 i32.add global.set $~lib/memory/__stack_pointer ) - (func $export:assembly/mat3/normalFromMat4 (param $0 i32) (param $1 i32) (result i32) + (func $export:assembly/mat4/targetTo (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 i32) global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 16 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $4 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $4 local.get $1 i32.store offset=4 + local.get $4 + local.get $2 + i32.store offset=8 + local.get $4 + local.get $3 + i32.store offset=12 local.get $0 local.get $1 - call $assembly/mat3/normalFromMat4 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/mat3/projection (param $0 i32) (param $1 f64) (param $2 f64) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - local.get $0 - i32.const 0 - f64.const 2 - local.get $1 - f64.div - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 4 - f64.const -2 local.get $2 - f64.div - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 5 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 6 - f64.const -1 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 7 - f64.const 1 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 8 - f64.const 1 - call $~lib/typedarray/Float64Array#__set + local.get $3 + call $assembly/mat4/targetTo global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 16 i32.add global.set $~lib/memory/__stack_pointer - local.get $0 ) - (func $export:assembly/mat3/str (param $0 i32) (result i32) + (func $export:assembly/mat4/str (param $0 i32) (result i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer local.get $0 i32.store local.get $0 - call $assembly/mat3/str + call $assembly/mat4/str global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer ) - (func $export:assembly/mat3/frob (param $0 i32) (result f64) + (func $export:assembly/mat4/frob (param $0 i32) (result f64) (local $1 f64) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer local.get $0 i32.store @@ -30268,86 +30379,69 @@ local.get $0 i32.const 8 call $~lib/typedarray/Float64Array#__get - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $assembly/imports/MathUtil.hypot - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/mat3/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=8 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 11 + call $~lib/typedarray/Float64Array#__get local.get $0 - local.get $1 - local.get $2 - call $assembly/mat3/add - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/mat3/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - global.get $~lib/memory/__stack_pointer i32.const 12 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer + call $~lib/typedarray/Float64Array#__get local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=8 + i32.const 13 + call $~lib/typedarray/Float64Array#__get local.get $0 - local.get $1 - local.get $2 - call $assembly/mat3/subtract + i32.const 14 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + call $assembly/imports/MathUtil.hypot global.get $~lib/memory/__stack_pointer - i32.const 12 + i32.const 4 i32.add global.set $~lib/memory/__stack_pointer ) - (func $export:assembly/mat3/multiplyScalar (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (func $export:assembly/mat4/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $3 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $1 i32.store offset=4 + local.get $3 + local.get $2 + i32.store offset=8 local.get $0 i32.const 0 local.get $1 i32.const 0 call $~lib/typedarray/Float64Array#__get local.get $2 - f64.mul + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 @@ -30355,7 +30449,9 @@ i32.const 1 call $~lib/typedarray/Float64Array#__get local.get $2 - f64.mul + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 @@ -30363,7 +30459,9 @@ i32.const 2 call $~lib/typedarray/Float64Array#__get local.get $2 - f64.mul + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 3 @@ -30371,7 +30469,9 @@ i32.const 3 call $~lib/typedarray/Float64Array#__get local.get $2 - f64.mul + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 4 @@ -30379,7 +30479,9 @@ i32.const 4 call $~lib/typedarray/Float64Array#__get local.get $2 - f64.mul + i32.const 4 + call $~lib/typedarray/Float64Array#__get + f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 5 @@ -30387,7 +30489,9 @@ i32.const 5 call $~lib/typedarray/Float64Array#__get local.get $2 - f64.mul + i32.const 5 + call $~lib/typedarray/Float64Array#__get + f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 6 @@ -30395,7 +30499,9 @@ i32.const 6 call $~lib/typedarray/Float64Array#__get local.get $2 - f64.mul + i32.const 6 + call $~lib/typedarray/Float64Array#__get + f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 7 @@ -30403,7 +30509,9 @@ i32.const 7 call $~lib/typedarray/Float64Array#__get local.get $2 - f64.mul + i32.const 7 + call $~lib/typedarray/Float64Array#__get + f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 8 @@ -30411,739 +30519,760 @@ i32.const 8 call $~lib/typedarray/Float64Array#__get local.get $2 - f64.mul - call $~lib/typedarray/Float64Array#__set - global.get $~lib/memory/__stack_pointer i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $0 - ) - (func $export:assembly/mat3/multiplyScalarAndAdd (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer + i32.const 9 local.get $1 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer + i32.const 9 + call $~lib/typedarray/Float64Array#__get local.get $2 - i32.store offset=8 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set local.get $0 + i32.const 10 local.get $1 + i32.const 10 + call $~lib/typedarray/Float64Array#__get local.get $2 - local.get $3 - call $assembly/mat3/multiplyScalarAndAdd - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/mat3/exactEquals (param $0 i32) (param $1 i32) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer + i32.const 10 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer + i32.const 11 local.get $1 - i32.store offset=4 - local.get $0 - i32.const 0 + i32.const 11 call $~lib/typedarray/Float64Array#__get - local.get $1 - i32.const 0 + local.get $2 + i32.const 11 call $~lib/typedarray/Float64Array#__get - f64.eq - if (result i32) - local.get $0 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - f64.eq - else - i32.const 0 - end - if (result i32) - local.get $0 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - f64.eq - else - i32.const 0 - end - if (result i32) - local.get $0 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - f64.eq - else - i32.const 0 - end - if (result i32) - local.get $0 - i32.const 4 - call $~lib/typedarray/Float64Array#__get - local.get $1 - i32.const 4 - call $~lib/typedarray/Float64Array#__get - f64.eq - else - i32.const 0 - end - if (result i32) - local.get $0 - i32.const 5 - call $~lib/typedarray/Float64Array#__get - local.get $1 - i32.const 5 - call $~lib/typedarray/Float64Array#__get - f64.eq - else - i32.const 0 - end - if (result i32) - local.get $0 - i32.const 6 - call $~lib/typedarray/Float64Array#__get - local.get $1 - i32.const 6 - call $~lib/typedarray/Float64Array#__get - f64.eq - else - i32.const 0 - end - if (result i32) - local.get $0 - i32.const 7 - call $~lib/typedarray/Float64Array#__get - local.get $1 - i32.const 7 - call $~lib/typedarray/Float64Array#__get - f64.eq - else - i32.const 0 - end - if (result i32) - local.get $0 - i32.const 8 - call $~lib/typedarray/Float64Array#__get - local.get $1 - i32.const 8 - call $~lib/typedarray/Float64Array#__get - f64.eq - else - i32.const 0 - end - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/mat3/equals (param $0 i32) (param $1 i32) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer + f64.add + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer + i32.const 12 local.get $1 - i32.store offset=4 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set local.get $0 + i32.const 13 local.get $1 - call $assembly/mat3/equals - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/mat4/Fov#get:upDegrees (param $0 i32) (result f64) - (local $1 f64) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - local.get $0 - f64.load - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/mat4/Fov#set:upDegrees (param $0 i32) (param $1 f64) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store + i32.const 13 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set local.get $0 + i32.const 14 local.get $1 - f64.store - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/mat4/Fov#get:downDegrees (param $0 i32) (result f64) - (local $1 f64) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - local.get $0 - f64.load offset=8 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/mat4/Fov#set:downDegrees (param $0 i32) (param $1 f64) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store + i32.const 14 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set local.get $0 + i32.const 15 local.get $1 - f64.store offset=8 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/mat4/Fov#get:leftDegrees (param $0 i32) (result f64) - (local $1 f64) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - local.get $0 - f64.load offset=16 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 12 i32.add global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/mat4/Fov#set:leftDegrees (param $0 i32) (param $1 f64) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store local.get $0 - local.get $1 - f64.store offset=16 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer ) - (func $export:assembly/mat4/Fov#get:rightDegrees (param $0 i32) (result f64) - (local $1 f64) + (func $export:assembly/mat4/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - local.get $0 - f64.load offset=24 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/mat4/Fov#set:rightDegrees (param $0 i32) (param $1 f64) global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer + local.tee $3 local.get $0 i32.store + local.get $3 + local.get $1 + i32.store offset=4 + local.get $3 + local.get $2 + i32.store offset=8 local.get $0 local.get $1 - f64.store offset=24 + local.get $2 + call $assembly/mat4/subtract global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 12 i32.add global.set $~lib/memory/__stack_pointer ) - (func $export:assembly/mat4/Fov#constructor (param $0 i32) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store + (func $export:assembly/mat4/multiplyScalar (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 i32) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - local.get $0 - i32.eqz + i32.const 12652 + i32.lt_s if - global.get $~lib/memory/__stack_pointer - i32.const 32 - i32.const 27 - call $~lib/rt/itcms/__new - local.tee $0 - i32.store + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable end - local.get $0 - f64.const 0 - f64.store - local.get $0 - f64.const 0 - f64.store offset=8 - local.get $0 - f64.const 0 - f64.store offset=16 - local.get $0 - f64.const 0 - f64.store offset=24 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $0 - ) - (func $export:assembly/mat4/clone (param $0 i32) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - local.get $0 - call $assembly/mat4/clone - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/mat4/copy (param $0 i32) (param $1 i32) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + local.tee $3 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $1 i32.store offset=4 local.get $0 - local.get $1 - call $assembly/mat4/copy - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/mat4/set (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (param $7 f64) (param $8 f64) (param $9 f64) (param $10 f64) (param $11 f64) (param $12 f64) (param $13 f64) (param $14 f64) (param $15 f64) (param $16 f64) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - local.get $0 i32.const 0 local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get local.get $2 + f64.mul call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 - local.get $3 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 3 - local.get $4 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 4 - local.get $5 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 5 - local.get $6 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 6 - local.get $7 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 7 - local.get $8 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 8 - local.get $9 + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 9 - local.get $10 + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 10 - local.get $11 + local.get $1 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 11 - local.get $12 + local.get $1 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 12 - local.get $13 + local.get $1 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 13 - local.get $14 + local.get $1 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 14 - local.get $15 + local.get $1 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 15 - local.get $16 + local.get $1 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.mul call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $export:assembly/mat4/identity (param $0 i32) (result i32) + (func $export:assembly/mat4/multiplyScalarAndAdd (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + (local $4 i32) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - local.get $0 - call $assembly/mat4/identity - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/mat4/transpose (param $0 i32) (param $1 i32) (result i32) global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer + local.tee $4 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $4 local.get $1 i32.store offset=4 + local.get $4 + local.get $2 + i32.store offset=8 local.get $0 + i32.const 0 local.get $1 - call $assembly/mat4/transpose - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/mat4/invert (param $0 i32) (param $1 i32) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer + i32.const 1 local.get $1 - i32.store offset=4 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set local.get $0 + i32.const 2 local.get $1 - call $assembly/mat4/invert - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/mat4/adjoint (param $0 i32) (param $1 i32) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer + i32.const 3 local.get $1 - i32.store offset=4 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set local.get $0 + i32.const 4 local.get $1 - call $assembly/mat4/adjoint - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/mat4/determinant (param $0 i32) (result f64) - (local $1 f64) - global.get $~lib/memory/__stack_pointer i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - local.get $0 - call $assembly/mat4/determinant - global.get $~lib/memory/__stack_pointer + call $~lib/typedarray/Float64Array#__get + local.get $2 i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/mat4/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer + i32.const 5 local.get $1 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer + i32.const 5 + call $~lib/typedarray/Float64Array#__get local.get $2 - i32.store offset=8 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set local.get $0 + i32.const 6 local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get local.get $2 - call $assembly/mat4/multiply - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/mat4/translate (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer + i32.const 7 local.get $1 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer + i32.const 7 + call $~lib/typedarray/Float64Array#__get local.get $2 - i32.store offset=8 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set local.get $0 + i32.const 8 local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get local.get $2 - call $assembly/mat4/translate - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/mat4/scale (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer + i32.const 9 local.get $1 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer + i32.const 9 + call $~lib/typedarray/Float64Array#__get local.get $2 - i32.store offset=8 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set local.get $0 + i32.const 10 local.get $1 + i32.const 10 + call $~lib/typedarray/Float64Array#__get local.get $2 - call $assembly/mat4/scale - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/mat4/rotate (param $0 i32) (param $1 i32) (param $2 f64) (param $3 i32) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer + i32.const 11 local.get $1 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 11 + call $~lib/typedarray/Float64Array#__get local.get $3 - i32.store offset=8 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set local.get $0 + i32.const 12 local.get $1 + i32.const 12 + call $~lib/typedarray/Float64Array#__get local.get $2 - local.get $3 - call $assembly/mat4/rotate - global.get $~lib/memory/__stack_pointer i32.const 12 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/mat4/rotateX (param $0 i32) (param $1 i32) (param $2 f64) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer + i32.const 13 local.get $1 - i32.store offset=4 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + local.get $1 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set local.get $0 + i32.const 15 local.get $1 + i32.const 15 + call $~lib/typedarray/Float64Array#__get local.get $2 - call $assembly/mat4/rotateX + i32.const 15 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 12 i32.add global.set $~lib/memory/__stack_pointer + local.get $0 ) - (func $export:assembly/mat4/rotateY (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (func $export:assembly/mat4/exactEquals (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $2 local.get $1 i32.store offset=4 local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get local.get $1 - local.get $2 - call $assembly/mat4/rotateY + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.eq + if (result i32) + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + f64.eq + else + i32.const 0 + end global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer ) - (func $export:assembly/mat4/rotateZ (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (func $export:assembly/mat4/equals (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $2 local.get $1 i32.store offset=4 local.get $0 local.get $1 - local.get $2 - call $assembly/mat4/rotateZ + call $assembly/mat4/equals global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer ) - (func $export:assembly/mat4/fromTranslation (param $0 i32) (param $1 i32) (result i32) + (func $export:assembly/quat/identity (param $0 i32) (result i32) global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer local.get $0 i32.store - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 local.get $0 i32.const 0 - f64.const 1 + f64.const 0 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 @@ -31155,1052 +31284,1480 @@ call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 3 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 4 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 5 - f64.const 1 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 6 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 7 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 8 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 9 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 10 - f64.const 1 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 11 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 12 - local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 13 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 14 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 15 f64.const 1 call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 4 i32.add global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $export:assembly/mat4/fromScaling (param $0 i32) (param $1 i32) (result i32) + (func $export:assembly/quat/setAxisAngle (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $3 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $1 i32.store offset=4 local.get $0 - i32.const 0 - local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 4 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 5 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 6 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 7 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 8 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 9 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 10 local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 11 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 12 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 13 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 14 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 15 - f64.const 1 - call $~lib/typedarray/Float64Array#__set + local.get $2 + call $assembly/quat/setAxisAngle global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $0 ) - (func $export:assembly/mat4/fromRotation (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $export:assembly/quat/getAxisAngle (param $0 i32) (param $1 i32) (result f64) + (local $2 f64) + (local $3 i32) + (local $4 f64) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $3 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer - local.get $2 + local.get $3 + local.get $1 i32.store offset=4 - local.get $0 local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/math/NativeMath.acos + local.tee $2 local.get $2 - call $assembly/mat4/fromRotation + f64.add + local.tee $4 + f64.const 0.5 + f64.mul + call $~lib/math/NativeMath.sin + local.tee $2 + f64.const 1e-06 + f64.gt + if + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.div + call $~lib/typedarray/Float64Array#__set + else + local.get $0 + i32.const 0 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + end global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer + local.get $4 ) - (func $export:assembly/mat4/fromXRotation (param $0 i32) (param $1 f64) (result i32) + (func $export:assembly/quat/getAngle (param $0 i32) (param $1 i32) (result f64) (local $2 f64) + (local $3 i32) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $3 local.get $0 i32.store + local.get $3 local.get $1 - call $~lib/math/NativeMath.sin - local.set $2 - local.get $1 - call $~lib/math/NativeMath.cos - local.set $1 - local.get $0 - i32.const 0 - f64.const 1 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 + i32.store offset=4 i32.const 2 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 4 - f64.const 0 - call $~lib/typedarray/Float64Array#__set + global.set $~argumentsLength local.get $0 - i32.const 5 local.get $1 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 6 + i32.const 2560 + i32.load + call_indirect $0 (type $i32_i32_=>_f64) + local.tee $2 local.get $2 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 7 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 8 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 9 + f64.add local.get $2 - f64.neg - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 10 - local.get $1 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 11 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 12 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 13 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 14 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 15 + f64.mul f64.const 1 - call $~lib/typedarray/Float64Array#__set + f64.sub + call $~lib/math/NativeMath.acos global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $0 ) - (func $export:assembly/mat4/fromYRotation (param $0 i32) (param $1 f64) (result i32) - (local $2 f64) + (func $export:assembly/quat/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $3 local.get $0 i32.store + local.get $3 local.get $1 - call $~lib/math/NativeMath.sin - local.set $2 - local.get $0 - i32.const 0 - local.get $1 - call $~lib/math/NativeMath.cos - local.tee $1 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - local.get $2 - f64.neg - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 4 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 5 - f64.const 1 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 6 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 7 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 8 + i32.store offset=4 + local.get $3 local.get $2 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 9 - f64.const 0 - call $~lib/typedarray/Float64Array#__set + i32.store offset=8 local.get $0 - i32.const 10 local.get $1 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 11 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 12 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 13 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 14 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 15 - f64.const 1 - call $~lib/typedarray/Float64Array#__set + local.get $2 + call $assembly/quat/multiply global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 12 i32.add global.set $~lib/memory/__stack_pointer - local.get $0 ) - (func $export:assembly/mat4/fromZRotation (param $0 i32) (param $1 f64) (result i32) - (local $2 f64) + (func $export:assembly/quat/rotateX (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 i32) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $3 local.get $0 - i32.store - local.get $1 - call $~lib/math/NativeMath.sin - local.set $2 - local.get $0 - i32.const 0 - local.get $1 - call $~lib/math/NativeMath.cos - local.tee $1 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - local.get $2 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 4 - local.get $2 - f64.neg - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 5 - local.get $1 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 6 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 7 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 8 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 9 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 10 - f64.const 1 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 11 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 12 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 13 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 14 - f64.const 0 - call $~lib/typedarray/Float64Array#__set + i32.store + local.get $3 + local.get $1 + i32.store offset=4 local.get $0 - i32.const 15 - f64.const 1 - call $~lib/typedarray/Float64Array#__set + local.get $1 + local.get $2 + call $assembly/quat/rotateX global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $0 ) - (func $export:assembly/mat4/fromRotationTranslation (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $export:assembly/quat/rotateY (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 i32) global.get $~lib/memory/__stack_pointer - i32.const 12 + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $3 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $1 i32.store offset=4 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=8 local.get $0 local.get $1 local.get $2 - call $assembly/mat4/fromRotationTranslation + call $assembly/quat/rotateY global.get $~lib/memory/__stack_pointer - i32.const 12 + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer ) - (func $export:assembly/mat4/fromQuat2 (param $0 i32) (param $1 i32) (result i32) + (func $export:assembly/quat/rotateZ (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $3 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $1 i32.store offset=4 local.get $0 local.get $1 - call $assembly/mat4/fromQuat2 + local.get $2 + call $assembly/quat/rotateZ global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer ) - (func $export:assembly/mat4/getTranslation (param $0 i32) (param $1 i32) (result i32) + (func $export:assembly/quat/calculateW (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $5 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $5 local.get $1 i32.store offset=4 - local.get $0 local.get $1 - call $assembly/mat4/getTranslation + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $0 + i32.const 0 + local.get $2 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $3 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $4 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 1 + local.get $2 + local.get $2 + f64.mul + f64.sub + local.get $3 + local.get $3 + f64.mul + f64.sub + local.get $4 + local.get $4 + f64.mul + f64.sub + f64.abs + f64.sqrt + call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer + local.get $0 ) - (func $export:assembly/mat4/getScaling (param $0 i32) (param $1 i32) (result i32) + (func $export:assembly/quat/exp (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $2 local.get $1 i32.store offset=4 local.get $0 local.get $1 - call $assembly/mat4/getScaling + call $assembly/quat/exp global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer ) - (func $export:assembly/mat4/getRotation (param $0 i32) (param $1 i32) (result i32) + (func $export:assembly/quat/ln (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $2 local.get $1 i32.store offset=4 local.get $0 local.get $1 - call $assembly/mat4/getRotation + call $assembly/quat/ln global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer ) - (func $export:assembly/mat4/decompose (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $export:assembly/quat/pow (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 i32) global.get $~lib/memory/__stack_pointer - i32.const 16 + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $3 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $1 i32.store offset=4 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=8 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store offset=12 local.get $0 local.get $1 + call $assembly/quat/ln + drop + i32.const 3 + global.set $~argumentsLength + local.get $0 + local.get $0 local.get $2 - local.get $3 - call $assembly/mat4/decompose + i32.const 2528 + i32.load + call_indirect $0 (type $i32_i32_f64_=>_i32) + drop + local.get $0 + local.get $0 + call $assembly/quat/exp + drop global.get $~lib/memory/__stack_pointer - i32.const 16 + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer + local.get $0 ) - (func $export:assembly/mat4/fromRotationTranslationScale (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $export:assembly/quat/slerp (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + (local $4 i32) global.get $~lib/memory/__stack_pointer - i32.const 16 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $4 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $4 local.get $1 i32.store offset=4 - global.get $~lib/memory/__stack_pointer + local.get $4 local.get $2 i32.store offset=8 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store offset=12 local.get $0 local.get $1 local.get $2 local.get $3 - call $assembly/mat4/fromRotationTranslationScale + call $assembly/quat/slerp global.get $~lib/memory/__stack_pointer - i32.const 16 + i32.const 12 i32.add global.set $~lib/memory/__stack_pointer ) - (func $export:assembly/mat4/fromRotationTranslationScaleOrigin (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) + (func $export:assembly/quat/random (param $0 i32) (result i32) + (local $1 f64) + (local $2 f64) + (local $3 f64) + (local $4 f64) global.get $~lib/memory/__stack_pointer - i32.const 20 + i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer local.get $0 i32.store - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer + i32.const 0 + global.set $~argumentsLength + global.get $assembly/common/RANDOM + i32.load + call_indirect $0 (type $none_=>_f64) + local.set $2 + i32.const 0 + global.set $~argumentsLength + global.get $assembly/common/RANDOM + i32.load + call_indirect $0 (type $none_=>_f64) + local.set $1 + i32.const 0 + global.set $~argumentsLength + global.get $assembly/common/RANDOM + i32.load + call_indirect $0 (type $none_=>_f64) + local.set $3 + local.get $0 + i32.const 0 + f64.const 1 local.get $2 - i32.store offset=8 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store offset=12 - global.get $~lib/memory/__stack_pointer - local.get $4 - i32.store offset=16 + f64.sub + f64.sqrt + local.tee $4 + local.get $1 + f64.const 6.283185307179586 + f64.mul + local.tee $1 + call $~lib/math/NativeMath.sin + f64.mul + call $~lib/typedarray/Float64Array#__set local.get $0 + i32.const 1 + local.get $4 local.get $1 + call $~lib/math/NativeMath.cos + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 local.get $2 + f64.sqrt + local.tee $2 local.get $3 - local.get $4 - call $assembly/mat4/fromRotationTranslationScaleOrigin + f64.const 6.283185307179586 + f64.mul + local.tee $1 + call $~lib/math/NativeMath.sin + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $2 + local.get $1 + call $~lib/math/NativeMath.cos + f64.mul + call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - i32.const 20 + i32.const 4 i32.add global.set $~lib/memory/__stack_pointer + local.get $0 ) - (func $export:assembly/mat4/fromQuat (param $0 i32) (param $1 i32) (result i32) + (func $export:assembly/quat/invert (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $6 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $6 local.get $1 i32.store offset=4 local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.tee $2 + f64.neg + f64.const 1 + local.get $2 + local.get $2 + f64.mul + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.tee $3 + local.get $3 + f64.mul + f64.add + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.tee $4 + local.get $4 + f64.mul + f64.add local.get $1 - call $assembly/mat4/fromQuat + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.tee $5 + local.get $5 + f64.mul + f64.add + local.tee $2 + f64.div + f64.const 0 + local.get $2 + i64.reinterpret_f64 + i64.const 1 + i64.shl + i64.const 2 + i64.sub + i64.const -9007199254740994 + i64.le_u + select + local.tee $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $3 + f64.neg + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $4 + f64.neg + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $5 + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer + local.get $0 ) - (func $export:assembly/mat4/frustum (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (result i32) + (func $export:assembly/quat/conjugate (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $0 i32.store + local.get $2 + local.get $1 + i32.store offset=4 local.get $0 + i32.const 0 local.get $1 - local.get $2 - local.get $3 - local.get $4 - local.get $5 - local.get $6 - call $assembly/mat4/frustum + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.neg + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer + local.get $0 ) - (func $export:assembly/mat4/perspectiveNO (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (result i32) + (func $export:assembly/quat/fromMat3 (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $0 i32.store + local.get $2 + local.get $1 + i32.store offset=4 local.get $0 local.get $1 - local.get $2 - local.get $3 - local.get $4 - call $assembly/mat4/perspectiveNO + call $assembly/quat/fromMat3 global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer ) - (func $export:assembly/mat4/perspectiveZO (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (result i32) + (func $export:assembly/quat/fromEuler@varargs (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) + (local $5 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + block $folding-inner0 + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + local.tee $5 + local.get $0 + i32.store + local.get $5 + local.get $4 + i32.store offset=4 + local.get $5 + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + i32.const 4 + i32.sub + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + global.get $~lib/memory/__stack_pointer + global.get $assembly/common/ANGLE_ORDER + local.tee $4 + i32.store + end + local.get $0 + local.get $1 + local.get $2 + local.get $3 + local.get $4 + call $assembly/quat/fromEuler + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + return + end + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + ) + (func $export:assembly/quat/str (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - local.get $0 - local.get $1 - local.get $2 - local.get $3 - local.get $4 - call $assembly/mat4/perspectiveZO - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer + block $folding-inner0 + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + local.tee $1 + local.get $0 + i32.store + local.get $1 + i32.const -64 + i32.add + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + local.tee $1 + i64.const 0 + i64.store + local.get $1 + i64.const 0 + i64.store offset=8 + local.get $1 + i64.const 0 + i64.store offset=16 + local.get $1 + i64.const 0 + i64.store offset=24 + local.get $1 + i64.const 0 + i64.store offset=32 + local.get $1 + i64.const 0 + i64.store offset=40 + local.get $1 + i64.const 0 + i64.store offset=48 + local.get $1 + i64.const 0 + i64.store offset=56 + local.get $1 + i32.const 12032 + i32.store offset=56 + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=60 + i32.const 12032 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.tee $2 + local.get $1 + i32.store offset=48 + local.get $2 + i32.const 5424 + i32.store offset=52 + local.get $1 + i32.const 5424 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=40 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=44 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.tee $2 + local.get $1 + i32.store offset=32 + local.get $2 + i32.const 5424 + i32.store offset=36 + local.get $1 + i32.const 5424 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=24 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=28 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.tee $2 + local.get $1 + i32.store offset=16 + local.get $2 + i32.const 5424 + i32.store offset=20 + local.get $1 + i32.const 5424 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=8 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=12 + local.get $1 + local.get $0 + call $~lib/string/String.__concat + local.set $0 + global.get $~lib/memory/__stack_pointer + local.tee $1 + local.get $0 + i32.store + local.get $1 + i32.const 5456 + i32.store offset=4 + local.get $0 + i32.const 5456 + call $~lib/string/String.__concat + global.get $~lib/memory/__stack_pointer + i32.const -64 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + return + end + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable ) - (func $export:assembly/mat4/perspectiveFromFieldOfView (param $0 i32) (param $1 i32) (param $2 f64) (param $3 f64) (result i32) + (func $export:assembly/quat/equals (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $2 local.get $1 i32.store offset=4 local.get $0 local.get $1 - local.get $2 - local.get $3 - call $assembly/mat4/perspectiveFromFieldOfView + call $assembly/vec4/dot + f64.abs + f64.const 0.999999 + f64.ge global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer ) - (func $export:assembly/mat4/orthoNO (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (result i32) + (func $export:assembly/quat2/clone (param $0 i32) (result i32) + (local $1 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - local.get $0 - local.get $1 - local.get $2 - local.get $3 - local.get $4 - local.get $5 - local.get $6 - call $assembly/mat4/orthoNO - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer + block $folding-inner0 + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + local.tee $1 + local.get $0 + i32.store + local.get $1 + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + local.tee $1 + i32.const 0 + i32.store + local.get $1 + i32.const 8 + call $~lib/typedarray/Float64Array#constructor + local.tee $1 + i32.store + local.get $1 + i32.const 0 + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 1 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 2 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 3 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 4 + local.get $0 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 5 + local.get $0 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 6 + local.get $0 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 7 + local.get $0 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + return + end + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable ) - (func $export:assembly/mat4/orthoZO (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (result i32) + (func $export:assembly/quat2/fromRotationTranslation (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - local.get $0 - local.get $1 - local.get $2 - local.get $3 - local.get $4 - local.get $5 - local.get $6 - call $assembly/mat4/orthoZO - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/mat4/lookAt (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) global.get $~lib/memory/__stack_pointer - i32.const 16 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer + local.tee $3 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=8 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store offset=12 - local.get $0 - local.get $1 - local.get $2 local.get $3 - call $assembly/mat4/lookAt - global.get $~lib/memory/__stack_pointer - i32.const 16 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/mat4/targetTo (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 16 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer local.get $1 i32.store offset=4 - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $2 i32.store offset=8 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store offset=12 local.get $0 local.get $1 local.get $2 - local.get $3 - call $assembly/mat4/targetTo + call $assembly/quat2/fromRotationTranslation global.get $~lib/memory/__stack_pointer - i32.const 16 + i32.const 12 i32.add global.set $~lib/memory/__stack_pointer ) - (func $export:assembly/mat4/str (param $0 i32) (result i32) + (func $export:assembly/quat2/fromTranslation (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - local.get $0 - call $assembly/mat4/str - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/mat4/frob (param $0 i32) (result f64) - (local $1 f64) global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $0 i32.store + local.get $2 + local.get $1 + i32.store offset=4 local.get $0 i32.const 0 - call $~lib/typedarray/Float64Array#__get + f64.const 0 + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 - call $~lib/typedarray/Float64Array#__get + f64.const 0 + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 - call $~lib/typedarray/Float64Array#__get + f64.const 0 + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 3 - call $~lib/typedarray/Float64Array#__get + f64.const 1 + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 4 + local.get $1 + i32.const 0 call $~lib/typedarray/Float64Array#__get + f64.const 0.5 + f64.mul + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 5 + local.get $1 + i32.const 1 call $~lib/typedarray/Float64Array#__get + f64.const 0.5 + f64.mul + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 6 + local.get $1 + i32.const 2 call $~lib/typedarray/Float64Array#__get + f64.const 0.5 + f64.mul + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 7 - call $~lib/typedarray/Float64Array#__get - local.get $0 - i32.const 8 - call $~lib/typedarray/Float64Array#__get - local.get $0 - i32.const 9 - call $~lib/typedarray/Float64Array#__get - local.get $0 - i32.const 10 - call $~lib/typedarray/Float64Array#__get - local.get $0 - i32.const 11 - call $~lib/typedarray/Float64Array#__get - local.get $0 - i32.const 12 - call $~lib/typedarray/Float64Array#__get - local.get $0 - i32.const 13 - call $~lib/typedarray/Float64Array#__get - local.get $0 - i32.const 14 - call $~lib/typedarray/Float64Array#__get - local.get $0 - i32.const 15 - call $~lib/typedarray/Float64Array#__get - call $assembly/imports/MathUtil.hypot + f64.const 0 + call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer + local.get $0 ) - (func $export:assembly/mat4/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $export:assembly/quat2/fromRotation (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer - i32.const 12 + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $2 local.get $1 i32.store offset=4 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=8 local.get $0 + i32.const 0 local.get $1 - local.get $2 - call $assembly/mat4/add - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/mat4/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer + i32.const 1 local.get $1 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=8 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set local.get $0 + i32.const 2 local.get $1 - local.get $2 - call $assembly/mat4/subtract - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/mat4/multiplyScalar (param $0 i32) (param $1 i32) (param $2 f64) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer + i32.const 3 local.get $1 - i32.store offset=4 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set local.get $0 - local.get $1 - local.get $2 - call $assembly/mat4/multiplyScalar - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/mat4/multiplyScalarAndAdd (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer + i32.const 4 + f64.const 0 + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=8 + i32.const 5 + f64.const 0 + call $~lib/typedarray/Float64Array#__set local.get $0 - local.get $1 - local.get $2 - local.get $3 - call $assembly/mat4/multiplyScalarAndAdd + i32.const 6 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - i32.const 12 + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer + local.get $0 ) - (func $export:assembly/mat4/exactEquals (param $0 i32) (param $1 i32) (result i32) + (func $export:assembly/quat2/fromMat4 (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - local.get $0 - local.get $1 - call $assembly/mat4/exactEquals - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer + block $folding-inner0 + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + local.tee $2 + local.get $0 + i32.store + local.get $2 + local.get $1 + i32.store offset=4 + local.get $2 + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + local.tee $2 + i64.const 0 + i64.store + local.get $2 + call $assembly/quat/create + local.tee $2 + i32.store + local.get $2 + local.get $1 + call $assembly/mat4/getRotation + drop + global.get $~lib/memory/__stack_pointer + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + local.tee $3 + i32.store offset=4 + local.get $3 + local.get $1 + call $assembly/mat4/getTranslation + drop + local.get $0 + local.get $2 + local.get $3 + call $assembly/quat2/fromRotationTranslation + drop + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + return + end + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable ) - (func $export:assembly/mat4/equals (param $0 i32) (param $1 i32) (result i32) + (func $export:assembly/quat2/copy (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $2 local.get $1 i32.store offset=4 local.get $0 local.get $1 - call $assembly/mat4/equals + call $assembly/quat2/copy global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer ) - (func $export:assembly/quat/identity (param $0 i32) (result i32) + (func $export:assembly/quat2/identity (param $0 i32) (result i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer local.get $0 i32.store @@ -32220,548 +32777,959 @@ i32.const 3 f64.const 1 call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $export:assembly/quat/setAxisAngle (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (func $export:assembly/quat2/set (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (param $7 f64) (param $8 f64) (result i32) global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer local.get $0 i32.store - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 local.get $0 + i32.const 0 local.get $1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 local.get $2 - call $assembly/quat/setAxisAngle + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $3 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $4 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $5 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $6 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $7 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $8 + call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 4 i32.add global.set $~lib/memory/__stack_pointer + local.get $0 ) - (func $export:assembly/quat/getAxisAngle (param $0 i32) (param $1 i32) (result f64) - (local $2 f64) - (local $3 f64) + (func $export:assembly/quat2/getDual (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - call $~lib/math/NativeMath.acos - local.tee $2 - local.get $2 - f64.add - local.tee $3 - f64.const 0.5 - f64.mul - call $~lib/math/NativeMath.sin - local.tee $2 - f64.const 1e-06 - f64.gt + i32.const 12652 + i32.lt_s if - local.get $0 - i32.const 0 - local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.get $2 - f64.div - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - local.get $1 + i32.const 29056 + i32.const 29104 i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.get $2 - f64.div - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.get $2 - f64.div - call $~lib/typedarray/Float64Array#__set - else - local.get $0 - i32.const 0 - f64.const 1 - call $~lib/typedarray/Float64Array#__set - local.get $0 i32.const 1 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - f64.const 0 - call $~lib/typedarray/Float64Array#__set + call $~lib/builtins/abort + unreachable end global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $3 - ) - (func $export:assembly/quat/getAngle (param $0 i32) (param $1 i32) (result f64) - (local $2 f64) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $2 local.get $1 i32.store offset=4 - i32.const 2 - global.set $~argumentsLength local.get $0 + i32.const 0 local.get $1 - i32.const 2608 - i32.load - call_indirect $0 (type $i32_i32_=>_f64) - local.tee $2 - local.get $2 - f64.add - local.get $2 - f64.mul - f64.const 1 - f64.sub - call $~lib/math/NativeMath.acos - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/quat/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer + i32.const 4 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer + i32.const 1 local.get $1 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=8 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set local.get $0 + i32.const 3 local.get $1 - local.get $2 - call $assembly/quat/multiply + i32.const 7 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - i32.const 12 + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer + local.get $0 ) - (func $export:assembly/quat/rotateX (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (func $export:assembly/quat2/setDual (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $2 local.get $1 i32.store offset=4 local.get $0 + i32.const 4 local.get $1 - local.get $2 - call $assembly/quat/rotateX - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/quat/rotateY (param $0 i32) (param $1 i32) (param $2 f64) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer + i32.const 5 local.get $1 - i32.store offset=4 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set local.get $0 + i32.const 6 local.get $1 - local.get $2 - call $assembly/quat/rotateY + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer + local.get $0 ) - (func $export:assembly/quat/rotateZ (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (func $export:assembly/quat2/getTranslation (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $11 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $11 local.get $1 i32.store offset=4 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.neg + local.set $6 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.neg + local.set $7 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.neg + local.set $8 local.get $0 + i32.const 0 + local.get $2 local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.tee $10 + f64.mul + local.get $5 + local.get $6 + f64.mul + f64.add + local.get $3 + local.get $8 + f64.mul + f64.add + local.get $4 + local.get $7 + f64.mul + f64.sub + local.tee $9 + local.get $9 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $3 + local.get $10 + f64.mul + local.get $5 + local.get $7 + f64.mul + f64.add + local.get $4 + local.get $6 + f64.mul + f64.add local.get $2 - call $assembly/quat/rotateZ + local.get $8 + f64.mul + f64.sub + local.tee $9 + local.get $9 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $4 + local.get $10 + f64.mul + local.get $5 + local.get $8 + f64.mul + f64.add + local.get $2 + local.get $7 + f64.mul + f64.add + local.get $3 + local.get $6 + f64.mul + f64.sub + local.tee $2 + local.get $2 + f64.add + call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer + local.get $0 ) - (func $export:assembly/quat/calculateW (param $0 i32) (param $1 i32) (result i32) - (local $2 f64) + (func $export:assembly/quat2/translate (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 f64) (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 i32) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $10 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $10 local.get $1 i32.store offset=4 + local.get $10 + local.get $2 + i32.store offset=8 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $5 local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $2 i32.const 0 call $~lib/typedarray/Float64Array#__get - local.set $2 - local.get $1 + f64.const 0.5 + f64.mul + local.set $7 + local.get $2 i32.const 1 call $~lib/typedarray/Float64Array#__get - local.set $3 - local.get $1 + f64.const 0.5 + f64.mul + local.set $8 + local.get $2 i32.const 2 call $~lib/typedarray/Float64Array#__get - local.set $4 + f64.const 0.5 + f64.mul + local.set $9 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $12 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $13 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $14 local.get $0 i32.const 0 - local.get $2 + local.get $3 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 - local.get $3 + local.get $4 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 - local.get $4 + local.get $5 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 3 - f64.const 1 - local.get $2 - local.get $2 + local.get $6 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $6 + local.get $7 + f64.mul + local.get $4 + local.get $9 + f64.mul + f64.add + local.get $5 + local.get $8 f64.mul f64.sub + local.get $11 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $6 + local.get $8 + f64.mul + local.get $5 + local.get $7 + f64.mul + f64.add local.get $3 - local.get $3 + local.get $9 f64.mul f64.sub + local.get $12 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $6 + local.get $9 + f64.mul + local.get $3 + local.get $8 + f64.mul + f64.add local.get $4 + local.get $7 + f64.mul + f64.sub + local.get $13 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $3 + f64.neg + local.get $7 + f64.mul local.get $4 + local.get $8 f64.mul f64.sub - f64.abs - f64.sqrt + local.get $5 + local.get $9 + f64.mul + f64.sub + local.get $14 + f64.add call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 12 i32.add global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $export:assembly/quat/exp (param $0 i32) (param $1 i32) (result i32) + (func $export:assembly/quat2/rotateX (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 f64) + (local $16 f64) + (local $17 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - local.get $0 - local.get $1 - call $assembly/quat/exp - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/quat/ln (param $0 i32) (param $1 i32) (result i32) global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer + local.tee $17 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $17 local.get $1 i32.store offset=4 - local.get $0 local.get $1 - call $assembly/quat/ln - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/quat/pow (param $0 i32) (param $1 i32) (param $2 f64) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.neg + local.set $3 local.get $1 - i32.store offset=4 - local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.neg + local.set $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.neg + local.set $5 local.get $1 - call $assembly/quat/ln - drop i32.const 3 - global.set $~argumentsLength - local.get $0 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $10 local.get $0 + local.get $1 local.get $2 - i32.const 2576 - i32.load - call_indirect $0 (type $i32_i32_f64_=>_i32) + call $assembly/quat/rotateX drop local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $2 local.get $0 - call $assembly/quat/exp - drop - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $0 - ) - (func $export:assembly/quat/slerp (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $11 local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=8 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $12 local.get $0 - local.get $1 - local.get $2 - local.get $3 - call $assembly/quat/slerp - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/quat/random (param $0 i32) (result i32) - (local $1 f64) - (local $2 f64) - (local $3 f64) - (local $4 f64) - global.get $~lib/memory/__stack_pointer i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - i32.const 0 - global.set $~argumentsLength - global.get $assembly/common/RANDOM - i32.load - call_indirect $0 (type $none_=>_f64) - local.set $2 - i32.const 0 - global.set $~argumentsLength - global.get $assembly/common/RANDOM - i32.load - call_indirect $0 (type $none_=>_f64) - local.set $1 - i32.const 0 - global.set $~argumentsLength - global.get $assembly/common/RANDOM - i32.load - call_indirect $0 (type $none_=>_f64) - local.set $3 + local.get $7 + local.get $6 + f64.mul + local.get $10 + local.get $3 + f64.mul + f64.add + local.get $8 + local.get $5 + f64.mul + f64.add + local.get $9 + local.get $4 + f64.mul + f64.sub + local.tee $13 local.get $0 - i32.const 0 - f64.const 1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.tee $14 + f64.mul + local.get $10 + local.get $6 + f64.mul + local.get $7 + local.get $3 + f64.mul + f64.sub + local.get $8 + local.get $4 + f64.mul + f64.sub + local.get $9 + local.get $5 + f64.mul + f64.sub + local.tee $15 local.get $2 + f64.mul + f64.add + local.get $8 + local.get $6 + f64.mul + local.get $10 + local.get $4 + f64.mul + f64.add + local.get $9 + local.get $3 + f64.mul + f64.add + local.get $7 + local.get $5 + f64.mul f64.sub - f64.sqrt - local.tee $4 - local.get $1 - f64.const 6.283185307179586 + local.tee $16 + local.get $12 f64.mul - local.tee $1 - call $~lib/math/NativeMath.sin + f64.add + local.get $9 + local.get $6 f64.mul - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 + local.get $10 + local.get $5 + f64.mul + f64.add + local.get $7 local.get $4 - local.get $1 - call $~lib/math/NativeMath.cos f64.mul + f64.add + local.get $8 + local.get $3 + f64.mul + f64.sub + local.tee $3 + local.get $11 + f64.mul + f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 2 + i32.const 5 + local.get $16 + local.get $14 + f64.mul + local.get $15 + local.get $11 + f64.mul + f64.add + local.get $3 local.get $2 - f64.sqrt - local.tee $2 + f64.mul + f64.add + local.get $13 + local.get $12 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 local.get $3 - f64.const 6.283185307179586 + local.get $14 f64.mul - local.tee $1 - call $~lib/math/NativeMath.sin + local.get $15 + local.get $12 + f64.mul + f64.add + local.get $13 + local.get $11 + f64.mul + f64.add + local.get $16 + local.get $2 f64.mul + f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 3 + i32.const 7 + local.get $15 + local.get $14 + f64.mul + local.get $13 local.get $2 - local.get $1 - call $~lib/math/NativeMath.cos f64.mul + f64.sub + local.get $16 + local.get $11 + f64.mul + f64.sub + local.get $3 + local.get $12 + f64.mul + f64.sub call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $export:assembly/quat/invert (param $0 i32) (param $1 i32) (result i32) - (local $2 f64) + (func $export:assembly/quat2/rotateY (param $0 i32) (param $1 i32) (param $2 f64) (result i32) (local $3 f64) (local $4 f64) (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 f64) + (local $16 f64) + (local $17 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $17 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $17 local.get $1 i32.store offset=4 - local.get $0 - i32.const 0 local.get $1 i32.const 0 call $~lib/typedarray/Float64Array#__get - local.tee $2 f64.neg - f64.const 1 - local.get $2 - local.get $2 - f64.mul + local.set $3 local.get $1 i32.const 1 call $~lib/typedarray/Float64Array#__get - local.tee $3 + f64.neg + local.set $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.neg + local.set $5 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $0 + local.get $1 + local.get $2 + call $assembly/quat/rotateY + drop + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $11 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $12 + local.get $0 + i32.const 4 + local.get $7 + local.get $6 + f64.mul + local.get $10 + local.get $3 + f64.mul + f64.add + local.get $8 + local.get $5 + f64.mul + f64.add + local.get $9 + local.get $4 + f64.mul + f64.sub + local.tee $13 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.tee $14 + f64.mul + local.get $10 + local.get $6 + f64.mul + local.get $7 local.get $3 f64.mul + f64.sub + local.get $8 + local.get $4 + f64.mul + f64.sub + local.get $9 + local.get $5 + f64.mul + f64.sub + local.tee $15 + local.get $2 + f64.mul f64.add - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.tee $4 + local.get $8 + local.get $6 + f64.mul + local.get $10 local.get $4 f64.mul f64.add - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.tee $5 + local.get $9 + local.get $3 + f64.mul + f64.add + local.get $7 local.get $5 f64.mul + f64.sub + local.tee $16 + local.get $12 + f64.mul f64.add - local.tee $2 - f64.div - f64.const 0 - local.get $2 - i64.reinterpret_f64 - i64.const 1 - i64.shl - i64.const 2 - i64.sub - i64.const -9007199254740994 - i64.le_u - select - local.tee $2 + local.get $9 + local.get $6 + f64.mul + local.get $10 + local.get $5 + f64.mul + f64.add + local.get $7 + local.get $4 + f64.mul + f64.add + local.get $8 + local.get $3 + f64.mul + f64.sub + local.tee $3 + local.get $11 f64.mul + f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 1 + i32.const 5 + local.get $16 + local.get $14 + f64.mul + local.get $15 + local.get $11 + f64.mul + f64.add local.get $3 - f64.neg local.get $2 f64.mul + f64.add + local.get $13 + local.get $12 + f64.mul + f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 2 - local.get $4 - f64.neg + i32.const 6 + local.get $3 + local.get $14 + f64.mul + local.get $15 + local.get $12 + f64.mul + f64.add + local.get $13 + local.get $11 + f64.mul + f64.add + local.get $16 local.get $2 f64.mul + f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 3 - local.get $5 + i32.const 7 + local.get $15 + local.get $14 + f64.mul + local.get $13 local.get $2 f64.mul + f64.sub + local.get $16 + local.get $11 + f64.mul + f64.sub + local.get $3 + local.get $12 + f64.mul + f64.sub call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer i32.const 8 @@ -32769,320 +33737,230 @@ global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $export:assembly/quat/conjugate (param $0 i32) (param $1 i32) (result i32) + (func $export:assembly/quat2/rotateZ (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 f64) + (local $16 f64) + (local $17 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $17 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $17 local.get $1 i32.store offset=4 - local.get $0 - i32.const 0 local.get $1 i32.const 0 call $~lib/typedarray/Float64Array#__get f64.neg - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 + local.set $3 local.get $1 i32.const 1 call $~lib/typedarray/Float64Array#__get f64.neg - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 + local.set $4 local.get $1 i32.const 2 call $~lib/typedarray/Float64Array#__get f64.neg - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $0 - ) - (func $export:assembly/quat/fromMat3 (param $0 i32) (param $1 i32) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - local.get $0 - local.get $1 - call $assembly/quat/fromMat3 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/quat/fromEuler@varargs (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer - local.get $4 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - block $1of1 - block $0of1 - block $outOfRange - global.get $~argumentsLength - i32.const 4 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - global.get $~lib/memory/__stack_pointer - global.get $assembly/common/ANGLE_ORDER - local.tee $4 - i32.store - end - local.get $0 - local.get $1 - local.get $2 - local.get $3 - local.get $4 - call $assembly/quat/fromEuler - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/quat/str (param $0 i32) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - local.get $0 - call $assembly/quat/str - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/quat/equals (param $0 i32) (param $1 i32) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - local.get $0 - local.get $1 - call $assembly/vec4/dot - f64.abs - f64.const 0.999999 - f64.ge - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/quat2/clone (param $0 i32) (result i32) - (local $1 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - global.get $~lib/memory/__stack_pointer - i32.const 8 - call $~lib/typedarray/Float64Array#constructor - local.tee $1 - i32.store - local.get $1 - i32.const 0 - local.get $0 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 1 - local.get $0 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 2 - local.get $0 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set + local.set $5 local.get $1 i32.const 3 - local.get $0 - i32.const 3 call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set + local.set $6 local.get $1 i32.const 4 - local.get $0 - i32.const 4 call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set + local.set $7 local.get $1 i32.const 5 - local.get $0 - i32.const 5 call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set + local.set $8 local.get $1 i32.const 6 - local.get $0 - i32.const 6 call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set + local.set $9 local.get $1 i32.const 7 - local.get $0 - i32.const 7 call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $1 - ) - (func $export:assembly/quat2/fromRotationTranslation (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=8 + local.set $10 local.get $0 local.get $1 local.get $2 - call $assembly/quat2/fromRotationTranslation - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/quat2/fromTranslation (param $0 i32) (param $1 i32) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 + call $assembly/quat/rotateZ + drop local.get $0 i32.const 0 - f64.const 0 - call $~lib/typedarray/Float64Array#__set + call $~lib/typedarray/Float64Array#__get + local.set $2 local.get $0 i32.const 1 - f64.const 0 - call $~lib/typedarray/Float64Array#__set + call $~lib/typedarray/Float64Array#__get + local.set $11 local.get $0 i32.const 2 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - f64.const 1 - call $~lib/typedarray/Float64Array#__set + call $~lib/typedarray/Float64Array#__get + local.set $12 local.get $0 i32.const 4 - local.get $1 - i32.const 0 + local.get $7 + local.get $6 + f64.mul + local.get $10 + local.get $3 + f64.mul + f64.add + local.get $8 + local.get $5 + f64.mul + f64.add + local.get $9 + local.get $4 + f64.mul + f64.sub + local.tee $13 + local.get $0 + i32.const 3 call $~lib/typedarray/Float64Array#__get - f64.const 0.5 + local.tee $14 + f64.mul + local.get $10 + local.get $6 + f64.mul + local.get $7 + local.get $3 + f64.mul + f64.sub + local.get $8 + local.get $4 + f64.mul + f64.sub + local.get $9 + local.get $5 + f64.mul + f64.sub + local.tee $15 + local.get $2 + f64.mul + f64.add + local.get $8 + local.get $6 + f64.mul + local.get $10 + local.get $4 + f64.mul + f64.add + local.get $9 + local.get $3 + f64.mul + f64.add + local.get $7 + local.get $5 + f64.mul + f64.sub + local.tee $16 + local.get $12 + f64.mul + f64.add + local.get $9 + local.get $6 f64.mul + local.get $10 + local.get $5 + f64.mul + f64.add + local.get $7 + local.get $4 + f64.mul + f64.add + local.get $8 + local.get $3 + f64.mul + f64.sub + local.tee $3 + local.get $11 + f64.mul + f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 5 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - f64.const 0.5 + local.get $16 + local.get $14 + f64.mul + local.get $15 + local.get $11 + f64.mul + f64.add + local.get $3 + local.get $2 + f64.mul + f64.add + local.get $13 + local.get $12 f64.mul + f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 6 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - f64.const 0.5 + local.get $3 + local.get $14 + f64.mul + local.get $15 + local.get $12 + f64.mul + f64.add + local.get $13 + local.get $11 + f64.mul + f64.add + local.get $16 + local.get $2 f64.mul + f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 7 - f64.const 0 + local.get $15 + local.get $14 + f64.mul + local.get $13 + local.get $2 + f64.mul + f64.sub + local.get $16 + local.get $11 + f64.mul + f64.sub + local.get $3 + local.get $12 + f64.mul + f64.sub call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer i32.const 8 @@ -33090,668 +33968,940 @@ global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $export:assembly/quat2/fromRotation (param $0 i32) (param $1 i32) (result i32) + (func $export:assembly/quat2/rotateByQuatAppend (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 i32) global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $11 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $11 local.get $1 i32.store offset=4 - local.get $0 + local.get $11 + local.get $2 + i32.store offset=8 + local.get $2 i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $9 local.get $1 i32.const 0 call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 + local.set $3 local.get $1 i32.const 1 call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 + local.set $4 local.get $1 i32.const 2 call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set + local.set $5 local.get $0 - i32.const 3 + i32.const 0 + local.get $3 + local.get $9 + f64.mul local.get $1 i32.const 3 call $~lib/typedarray/Float64Array#__get + local.tee $10 + local.get $6 + f64.mul + f64.add + local.get $4 + local.get $8 + f64.mul + f64.add + local.get $5 + local.get $7 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $4 + local.get $9 + f64.mul + local.get $10 + local.get $7 + f64.mul + f64.add + local.get $5 + local.get $6 + f64.mul + f64.add + local.get $3 + local.get $8 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $5 + local.get $9 + f64.mul + local.get $10 + local.get $8 + f64.mul + f64.add + local.get $3 + local.get $7 + f64.mul + f64.add + local.get $4 + local.get $6 + f64.mul + f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 + i32.const 3 + local.get $10 + local.get $9 + f64.mul + local.get $3 + local.get $6 + f64.mul + f64.sub + local.get $4 + local.get $7 + f64.mul + f64.sub + local.get $5 + local.get $8 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $1 i32.const 4 - f64.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $0 + i32.const 4 + local.get $3 + local.get $9 + f64.mul + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.tee $10 + local.get $6 + f64.mul + f64.add + local.get $4 + local.get $8 + f64.mul + f64.add + local.get $5 + local.get $7 + f64.mul + f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 5 - f64.const 0 + local.get $4 + local.get $9 + f64.mul + local.get $10 + local.get $7 + f64.mul + f64.add + local.get $5 + local.get $6 + f64.mul + f64.add + local.get $3 + local.get $8 + f64.mul + f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 6 - f64.const 0 + local.get $5 + local.get $9 + f64.mul + local.get $10 + local.get $8 + f64.mul + f64.add + local.get $3 + local.get $7 + f64.mul + f64.add + local.get $4 + local.get $6 + f64.mul + f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 7 - f64.const 0 + local.get $10 + local.get $9 + f64.mul + local.get $3 + local.get $6 + f64.mul + f64.sub + local.get $4 + local.get $7 + f64.mul + f64.sub + local.get $5 + local.get $8 + f64.mul + f64.sub call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 12 i32.add global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $export:assembly/quat2/fromMat4 (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) + (func $export:assembly/quat2/rotateByQuatPrepend (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 i32) global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $11 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $11 local.get $1 i32.store offset=4 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - call $assembly/quat/create - local.tee $2 - i32.store + local.get $11 local.get $2 + i32.store offset=8 local.get $1 - call $assembly/mat4/getRotation - drop - global.get $~lib/memory/__stack_pointer - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - local.tee $3 - i32.store offset=4 - local.get $3 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $6 local.get $1 - call $assembly/mat4/getTranslation - drop - local.get $0 - local.get $2 - local.get $3 - call $assembly/quat2/fromRotationTranslation - drop - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $0 - ) - (func $export:assembly/quat2/copy (param $0 i32) (param $1 i32) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $7 local.get $1 - i32.store offset=4 - local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $8 local.get $1 - call $assembly/quat2/copy - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/quat2/identity (param $0 i32) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $5 local.get $0 i32.const 0 - f64.const 0 + local.get $6 + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.tee $10 + f64.mul + local.get $9 + local.get $3 + f64.mul + f64.add + local.get $7 + local.get $5 + f64.mul + f64.add + local.get $8 + local.get $4 + f64.mul + f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 - f64.const 0 + local.get $7 + local.get $10 + f64.mul + local.get $9 + local.get $4 + f64.mul + f64.add + local.get $8 + local.get $3 + f64.mul + f64.add + local.get $6 + local.get $5 + f64.mul + f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 - f64.const 0 + local.get $8 + local.get $10 + f64.mul + local.get $9 + local.get $5 + f64.mul + f64.add + local.get $6 + local.get $4 + f64.mul + f64.add + local.get $7 + local.get $3 + f64.mul + f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 3 - f64.const 1 + local.get $9 + local.get $10 + f64.mul + local.get $6 + local.get $3 + f64.mul + f64.sub + local.get $7 + local.get $4 + f64.mul + f64.sub + local.get $8 + local.get $5 + f64.mul + f64.sub call $~lib/typedarray/Float64Array#__set + local.get $2 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $2 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $2 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $5 local.get $0 i32.const 4 - f64.const 0 + local.get $6 + local.get $2 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.tee $10 + f64.mul + local.get $9 + local.get $3 + f64.mul + f64.add + local.get $7 + local.get $5 + f64.mul + f64.add + local.get $8 + local.get $4 + f64.mul + f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 5 - f64.const 0 + local.get $7 + local.get $10 + f64.mul + local.get $9 + local.get $4 + f64.mul + f64.add + local.get $8 + local.get $3 + f64.mul + f64.add + local.get $6 + local.get $5 + f64.mul + f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 6 - f64.const 0 + local.get $8 + local.get $10 + f64.mul + local.get $9 + local.get $5 + f64.mul + f64.add + local.get $6 + local.get $4 + f64.mul + f64.add + local.get $7 + local.get $3 + f64.mul + f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 7 - f64.const 0 + local.get $9 + local.get $10 + f64.mul + local.get $6 + local.get $3 + f64.mul + f64.sub + local.get $7 + local.get $4 + f64.mul + f64.sub + local.get $8 + local.get $5 + f64.mul + f64.sub call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 12 i32.add global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $export:assembly/quat2/set (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (param $7 f64) (param $8 f64) (result i32) + (func $export:assembly/quat2/rotateAroundAxis (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + (local $4 i32) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $4 local.get $0 i32.store - local.get $0 - i32.const 0 + local.get $4 local.get $1 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - local.get $2 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - local.get $3 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 + i32.store offset=4 local.get $4 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 4 - local.get $5 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 5 - local.get $6 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 6 - local.get $7 - call $~lib/typedarray/Float64Array#__set + local.get $2 + i32.store offset=8 local.get $0 - i32.const 7 - local.get $8 - call $~lib/typedarray/Float64Array#__set + local.get $1 + local.get $2 + local.get $3 + call $assembly/quat2/rotateAroundAxis global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 12 i32.add global.set $~lib/memory/__stack_pointer - local.get $0 ) - (func $export:assembly/quat2/getDual (param $0 i32) (param $1 i32) (result i32) + (func $export:assembly/quat2/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $3 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $1 i32.store offset=4 + local.get $3 + local.get $2 + i32.store offset=8 local.get $0 i32.const 0 local.get $1 - i32.const 4 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 call $~lib/typedarray/Float64Array#__get + f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 local.get $1 - i32.const 5 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 call $~lib/typedarray/Float64Array#__get + f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 local.get $1 - i32.const 6 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 2 call $~lib/typedarray/Float64Array#__get + f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 3 local.get $1 - i32.const 7 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 3 call $~lib/typedarray/Float64Array#__get + f64.add call $~lib/typedarray/Float64Array#__set - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $0 - ) - (func $export:assembly/quat2/setDual (param $0 i32) (param $1 i32) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 local.get $0 i32.const 4 local.get $1 - i32.const 0 + i32.const 4 call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 5 local.get $1 - i32.const 1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 5 call $~lib/typedarray/Float64Array#__get + f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 6 local.get $1 - i32.const 2 + i32.const 6 call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 7 local.get $1 - i32.const 3 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 7 call $~lib/typedarray/Float64Array#__get + f64.add call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 12 i32.add global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $export:assembly/quat2/getTranslation (param $0 i32) (param $1 i32) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - local.get $0 - local.get $1 - call $assembly/quat2/getTranslation - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/quat2/translate (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $export:assembly/quat2/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $3 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $1 i32.store offset=4 - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $2 i32.store offset=8 local.get $0 local.get $1 local.get $2 - call $assembly/quat2/translate + call $assembly/quat2/multiply global.get $~lib/memory/__stack_pointer i32.const 12 i32.add global.set $~lib/memory/__stack_pointer ) - (func $export:assembly/quat2/rotateX (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (func $export:assembly/quat2/scale (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - local.get $0 - local.get $1 - local.get $2 - call $assembly/quat2/rotateX - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/quat2/rotateY (param $0 i32) (param $1 i32) (param $2 f64) (result i32) global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer + local.tee $3 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $1 i32.store offset=4 local.get $0 + i32.const 0 local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get local.get $2 - call $assembly/quat2/rotateY - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/quat2/rotateZ (param $0 i32) (param $1 i32) (param $2 f64) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 + f64.mul + call $~lib/typedarray/Float64Array#__set local.get $0 + i32.const 1 local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get local.get $2 - call $assembly/quat2/rotateZ - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/quat2/rotateByQuatAppend (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer + f64.mul + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer + i32.const 2 local.get $1 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer + i32.const 2 + call $~lib/typedarray/Float64Array#__get local.get $2 - i32.store offset=8 + f64.mul + call $~lib/typedarray/Float64Array#__set local.get $0 + i32.const 3 local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get local.get $2 - call $assembly/quat2/rotateByQuatAppend - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/quat2/rotateByQuatPrepend (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer + f64.mul + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer + i32.const 4 local.get $1 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer + i32.const 4 + call $~lib/typedarray/Float64Array#__get local.get $2 - i32.store offset=8 + f64.mul + call $~lib/typedarray/Float64Array#__set local.get $0 + i32.const 5 local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get local.get $2 - call $assembly/quat2/rotateByQuatPrepend - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/quat2/rotateAroundAxis (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer + f64.mul + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer + i32.const 6 local.get $1 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer + i32.const 6 + call $~lib/typedarray/Float64Array#__get local.get $2 - i32.store offset=8 + f64.mul + call $~lib/typedarray/Float64Array#__set local.get $0 + i32.const 7 local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get local.get $2 - local.get $3 - call $assembly/quat2/rotateAroundAxis + f64.mul + call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - i32.const 12 + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/quat2/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=8 local.get $0 - local.get $1 - local.get $2 - call $assembly/quat2/add - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.add - global.set $~lib/memory/__stack_pointer ) - (func $export:assembly/quat2/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $export:assembly/quat2/lerp (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + (local $4 f64) + (local $5 i32) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $5 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $5 local.get $1 i32.store offset=4 - global.get $~lib/memory/__stack_pointer + local.get $5 local.get $2 i32.store offset=8 - local.get $0 + i32.const 2 + global.set $~argumentsLength + local.get $3 + f64.neg + local.get $3 local.get $1 local.get $2 - call $assembly/quat2/multiply - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/quat2/scale (param $0 i32) (param $1 i32) (param $2 f64) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 + i32.const 2560 + i32.load + call_indirect $0 (type $i32_i32_=>_f64) + f64.const 0 + f64.lt + select + local.set $4 local.get $0 i32.const 0 local.get $1 i32.const 0 call $~lib/typedarray/Float64Array#__get + f64.const 1 + local.get $3 + f64.sub + local.tee $3 + f64.mul local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $4 f64.mul + f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 local.get $1 i32.const 1 call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $4 f64.mul + f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 local.get $1 i32.const 2 call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $4 f64.mul + f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 3 local.get $1 i32.const 3 call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $4 f64.mul + f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 4 local.get $1 i32.const 4 call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul local.get $2 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $4 f64.mul + f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 5 local.get $1 i32.const 5 call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul local.get $2 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $4 f64.mul + f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 6 local.get $1 i32.const 6 call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul local.get $2 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.get $4 f64.mul + f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 7 local.get $1 i32.const 7 call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul local.get $2 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $4 f64.mul + f64.add call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $0 - ) - (func $export:assembly/quat2/lerp (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=8 - local.get $0 - local.get $1 - local.get $2 - local.get $3 - call $assembly/quat2/lerp - global.get $~lib/memory/__stack_pointer i32.const 12 i32.add global.set $~lib/memory/__stack_pointer + local.get $0 ) (func $export:assembly/quat2/invert (param $0 i32) (param $1 i32) (result i32) (local $2 f64) + (local $3 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $3 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $1 i32.store offset=4 i32.const 1 global.set $~argumentsLength local.get $1 - i32.const 2288 + i32.const 2240 i32.load call_indirect $0 (type $i32_=>_f64) local.set $2 @@ -33832,15 +34982,27 @@ local.get $0 ) (func $export:assembly/quat2/conjugate (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $2 local.get $1 i32.store offset=4 local.get $0 @@ -33903,32 +35065,185 @@ global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $export:assembly/quat2/normalize (param $0 i32) (param $1 i32) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - local.get $0 - local.get $1 - call $assembly/quat2/normalize - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - ) + (func $export:assembly/quat2/normalize (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $11 + local.get $0 + i32.store + local.get $11 + local.get $1 + i32.store offset=4 + i32.const 1 + global.set $~argumentsLength + local.get $1 + i32.const 2240 + i32.load + call_indirect $0 (type $i32_=>_f64) + local.tee $2 + f64.const 0 + f64.gt + if + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.sqrt + local.tee $2 + f64.div + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.div + local.set $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.div + local.set $5 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $2 + f64.div + local.set $6 + local.get $1 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $10 + local.get $0 + i32.const 0 + local.get $3 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $4 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $5 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $6 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $7 + local.get $3 + local.get $3 + local.get $7 + f64.mul + local.get $4 + local.get $8 + f64.mul + f64.add + local.get $5 + local.get $9 + f64.mul + f64.add + local.get $6 + local.get $10 + f64.mul + f64.add + local.tee $3 + f64.mul + f64.sub + local.get $2 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $8 + local.get $4 + local.get $3 + f64.mul + f64.sub + local.get $2 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $9 + local.get $5 + local.get $3 + f64.mul + f64.sub + local.get $2 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + local.get $10 + local.get $6 + local.get $3 + f64.mul + f64.sub + local.get $2 + f64.div + call $~lib/typedarray/Float64Array#__set + end + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) (func $export:assembly/quat2/str (param $0 i32) (result i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer local.get $0 i32.store @@ -33940,15 +35255,27 @@ global.set $~lib/memory/__stack_pointer ) (func $export:assembly/quat2/exactEquals (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $2 local.get $1 i32.store offset=4 local.get $0 @@ -34041,80 +35368,330 @@ global.set $~lib/memory/__stack_pointer ) (func $export:assembly/quat2/equals (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 f64) + (local $16 f64) + (local $17 f64) + (local $18 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $18 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $18 local.get $1 i32.store offset=4 local.get $0 - local.get $1 - call $assembly/quat2/equals - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/vec2/clone (param $0 i32) (result i32) - (local $1 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store - global.get $~lib/memory/__stack_pointer + call $~lib/typedarray/Float64Array#__get + local.set $2 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $0 i32.const 2 - call $~lib/typedarray/Float64Array#constructor - local.tee $1 - i32.store - local.get $1 - i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $0 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $6 local.get $0 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $0 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $0 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $1 i32.const 0 call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set + local.set $10 local.get $1 i32.const 1 - local.get $0 - i32.const 1 call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - global.get $~lib/memory/__stack_pointer + local.set $11 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $12 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $13 + local.get $1 i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.set $14 + local.get $1 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.set $15 + local.get $1 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.set $16 + local.get $1 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.set $17 + local.get $2 + local.get $10 + f64.sub + f64.abs + f64.const 1 + local.get $2 + f64.abs + local.get $10 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + if (result i32) + local.get $3 + local.get $11 + f64.sub + f64.abs + f64.const 1 + local.get $3 + f64.abs + local.get $11 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $4 + local.get $12 + f64.sub + f64.abs + f64.const 1 + local.get $4 + f64.abs + local.get $12 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $5 + local.get $13 + f64.sub + f64.abs + f64.const 1 + local.get $5 + f64.abs + local.get $13 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $6 + local.get $14 + f64.sub + f64.abs + f64.const 1 + local.get $6 + f64.abs + local.get $14 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $7 + local.get $15 + f64.sub + f64.abs + f64.const 1 + local.get $7 + f64.abs + local.get $15 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $8 + local.get $16 + f64.sub + f64.abs + f64.const 1 + local.get $8 + f64.abs + local.get $16 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + if (result i32) + local.get $9 + local.get $17 + f64.sub + f64.abs + f64.const 1 + local.get $9 + f64.abs + local.get $17 + f64.abs + call $assembly/imports/MathUtil.max + f64.const 1e-06 + f64.mul + f64.le + else + i32.const 0 + end + global.get $~lib/memory/__stack_pointer + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/vec2/clone (param $0 i32) (result i32) + (local $1 i32) global.get $~lib/memory/__stack_pointer i32.const 4 - i32.add + i32.sub global.set $~lib/memory/__stack_pointer - local.get $1 + block $folding-inner0 + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + local.tee $1 + local.get $0 + i32.store + local.get $1 + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + local.tee $1 + i32.const 0 + i32.store + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#constructor + local.tee $1 + i32.store + local.get $1 + i32.const 0 + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 1 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + return + end + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable ) (func $export:assembly/vec2/copy (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $2 local.get $1 i32.store offset=4 local.get $0 @@ -34140,7 +35717,17 @@ i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer local.get $0 i32.store @@ -34159,18 +35746,30 @@ local.get $0 ) (func $export:assembly/vec2/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $3 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $1 i32.store offset=4 - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $2 i32.store offset=8 local.get $0 @@ -34200,18 +35799,30 @@ local.get $0 ) (func $export:assembly/vec2/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $3 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $1 i32.store offset=4 - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $2 i32.store offset=8 local.get $0 @@ -34224,18 +35835,30 @@ global.set $~lib/memory/__stack_pointer ) (func $export:assembly/vec2/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $3 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $1 i32.store offset=4 - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $2 i32.store offset=8 local.get $0 @@ -34248,18 +35871,30 @@ global.set $~lib/memory/__stack_pointer ) (func $export:assembly/vec2/divide (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $3 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $1 i32.store offset=4 - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $2 i32.store offset=8 local.get $0 @@ -34272,15 +35907,27 @@ global.set $~lib/memory/__stack_pointer ) (func $export:assembly/vec2/ceil (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $2 local.get $1 i32.store offset=4 local.get $0 @@ -34304,15 +35951,27 @@ local.get $0 ) (func $export:assembly/vec2/floor (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $2 local.get $1 i32.store offset=4 local.get $0 @@ -34336,18 +35995,30 @@ local.get $0 ) (func $export:assembly/vec2/min (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $3 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $1 i32.store offset=4 - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $2 i32.store offset=8 local.get $0 @@ -34377,18 +36048,30 @@ local.get $0 ) (func $export:assembly/vec2/max (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $3 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $1 i32.store offset=4 - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $2 i32.store offset=8 local.get $0 @@ -34419,15 +36102,27 @@ ) (func $export:assembly/vec2/round (param $0 i32) (param $1 i32) (result i32) (local $2 f64) + (local $3 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $3 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $1 i32.store offset=4 local.get $0 @@ -34461,15 +36156,27 @@ local.get $0 ) (func $export:assembly/vec2/scale (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $3 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $1 i32.store offset=4 local.get $0 @@ -34495,18 +36202,30 @@ local.get $0 ) (func $export:assembly/vec2/scaleAndAdd (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + (local $4 i32) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $4 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $4 local.get $1 i32.store offset=4 - global.get $~lib/memory/__stack_pointer + local.get $4 local.get $2 i32.store offset=8 local.get $0 @@ -34540,16 +36259,28 @@ local.get $0 ) (func $export:assembly/vec2/distance (param $0 i32) (param $1 i32) (result f64) - (local $2 f64) + (local $2 i32) + (local $3 f64) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $2 local.get $1 i32.store offset=4 local.get $0 @@ -34561,16 +36292,28 @@ global.set $~lib/memory/__stack_pointer ) (func $export:assembly/vec2/squaredDistance (param $0 i32) (param $1 i32) (result f64) - (local $2 f64) + (local $2 i32) + (local $3 f64) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $2 local.get $1 i32.store offset=4 local.get $0 @@ -34587,7 +36330,17 @@ i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer local.get $0 i32.store @@ -34604,7 +36357,17 @@ i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer local.get $0 i32.store @@ -34616,15 +36379,27 @@ global.set $~lib/memory/__stack_pointer ) (func $export:assembly/vec2/negate (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $2 local.get $1 i32.store offset=4 local.get $0 @@ -34648,15 +36423,27 @@ local.get $0 ) (func $export:assembly/vec2/inverse (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $2 local.get $1 i32.store offset=4 local.get $0 @@ -34683,15 +36470,27 @@ ) (func $export:assembly/vec2/normalize (param $0 i32) (param $1 i32) (result i32) (local $2 f64) + (local $3 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $3 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $1 i32.store offset=4 local.get $1 @@ -34740,16 +36539,28 @@ local.get $0 ) (func $export:assembly/vec2/dot (param $0 i32) (param $1 i32) (result f64) - (local $2 f64) + (local $2 i32) + (local $3 f64) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $2 local.get $1 i32.store offset=4 local.get $0 @@ -34773,19 +36584,31 @@ global.set $~lib/memory/__stack_pointer ) (func $export:assembly/vec2/cross (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 f64) + (local $3 i32) + (local $4 f64) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $3 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $1 i32.store offset=4 - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $2 i32.store offset=8 local.get $1 @@ -34803,7 +36626,7 @@ call $~lib/typedarray/Float64Array#__get f64.mul f64.sub - local.set $3 + local.set $4 local.get $0 i32.const 1 f64.const 0 @@ -34816,7 +36639,7 @@ call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 - local.get $3 + local.get $4 call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer i32.const 12 @@ -34825,50 +36648,62 @@ local.get $0 ) (func $export:assembly/vec2/lerp (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) - (local $4 f64) + (local $4 i32) (local $5 f64) + (local $6 f64) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $4 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $4 local.get $1 i32.store offset=4 - global.get $~lib/memory/__stack_pointer + local.get $4 local.get $2 i32.store offset=8 local.get $1 i32.const 0 call $~lib/typedarray/Float64Array#__get - local.set $4 + local.set $5 local.get $1 i32.const 1 call $~lib/typedarray/Float64Array#__get - local.set $5 + local.set $6 local.get $0 i32.const 0 - local.get $4 + local.get $5 local.get $3 local.get $2 i32.const 0 call $~lib/typedarray/Float64Array#__get - local.get $4 + local.get $5 f64.sub f64.mul f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 - local.get $5 + local.get $6 local.get $3 local.get $2 i32.const 1 call $~lib/typedarray/Float64Array#__get - local.get $5 + local.get $6 f64.sub f64.mul f64.add @@ -34885,7 +36720,17 @@ i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer local.get $0 i32.store @@ -34931,41 +36776,53 @@ local.get $0 ) (func $export:assembly/vec2/transformMat2 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 f64) + (local $3 i32) (local $4 f64) + (local $5 f64) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $3 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $1 i32.store offset=4 - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $2 i32.store offset=8 local.get $1 i32.const 0 call $~lib/typedarray/Float64Array#__get - local.set $3 + local.set $4 local.get $1 i32.const 1 call $~lib/typedarray/Float64Array#__get - local.set $4 + local.set $5 local.get $0 i32.const 0 local.get $2 i32.const 0 call $~lib/typedarray/Float64Array#__get - local.get $3 + local.get $4 f64.mul local.get $2 i32.const 2 call $~lib/typedarray/Float64Array#__get - local.get $4 + local.get $5 f64.mul f64.add call $~lib/typedarray/Float64Array#__set @@ -34974,12 +36831,12 @@ local.get $2 i32.const 1 call $~lib/typedarray/Float64Array#__get - local.get $3 + local.get $4 f64.mul local.get $2 i32.const 3 call $~lib/typedarray/Float64Array#__get - local.get $4 + local.get $5 f64.mul f64.add call $~lib/typedarray/Float64Array#__set @@ -34990,41 +36847,53 @@ local.get $0 ) (func $export:assembly/vec2/transformMat2d (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 f64) + (local $3 i32) (local $4 f64) + (local $5 f64) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $3 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $1 i32.store offset=4 - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $2 i32.store offset=8 local.get $1 i32.const 0 call $~lib/typedarray/Float64Array#__get - local.set $3 + local.set $4 local.get $1 i32.const 1 call $~lib/typedarray/Float64Array#__get - local.set $4 + local.set $5 local.get $0 i32.const 0 local.get $2 i32.const 0 call $~lib/typedarray/Float64Array#__get - local.get $3 + local.get $4 f64.mul local.get $2 i32.const 2 call $~lib/typedarray/Float64Array#__get - local.get $4 + local.get $5 f64.mul f64.add local.get $2 @@ -35037,12 +36906,12 @@ local.get $2 i32.const 1 call $~lib/typedarray/Float64Array#__get - local.get $3 + local.get $4 f64.mul local.get $2 i32.const 3 call $~lib/typedarray/Float64Array#__get - local.get $4 + local.get $5 f64.mul f64.add local.get $2 @@ -35057,41 +36926,53 @@ local.get $0 ) (func $export:assembly/vec2/transformMat3 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 f64) + (local $3 i32) (local $4 f64) + (local $5 f64) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $3 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $1 i32.store offset=4 - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $2 i32.store offset=8 local.get $1 i32.const 0 call $~lib/typedarray/Float64Array#__get - local.set $3 + local.set $4 local.get $1 i32.const 1 call $~lib/typedarray/Float64Array#__get - local.set $4 + local.set $5 local.get $0 i32.const 0 local.get $2 i32.const 0 call $~lib/typedarray/Float64Array#__get - local.get $3 + local.get $4 f64.mul local.get $2 i32.const 3 call $~lib/typedarray/Float64Array#__get - local.get $4 + local.get $5 f64.mul f64.add local.get $2 @@ -35104,12 +36985,12 @@ local.get $2 i32.const 1 call $~lib/typedarray/Float64Array#__get - local.get $3 + local.get $4 f64.mul local.get $2 i32.const 4 call $~lib/typedarray/Float64Array#__get - local.get $4 + local.get $5 f64.mul f64.add local.get $2 @@ -35124,41 +37005,53 @@ local.get $0 ) (func $export:assembly/vec2/transformMat4 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 f64) + (local $3 i32) (local $4 f64) + (local $5 f64) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $3 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $1 i32.store offset=4 - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $2 i32.store offset=8 local.get $1 i32.const 0 call $~lib/typedarray/Float64Array#__get - local.set $3 + local.set $4 local.get $1 i32.const 1 call $~lib/typedarray/Float64Array#__get - local.set $4 + local.set $5 local.get $0 i32.const 0 local.get $2 i32.const 0 call $~lib/typedarray/Float64Array#__get - local.get $3 + local.get $4 f64.mul local.get $2 i32.const 4 call $~lib/typedarray/Float64Array#__get - local.get $4 + local.get $5 f64.mul f64.add local.get $2 @@ -35171,12 +37064,12 @@ local.get $2 i32.const 1 call $~lib/typedarray/Float64Array#__get - local.get $3 + local.get $4 f64.mul local.get $2 i32.const 5 call $~lib/typedarray/Float64Array#__get - local.get $4 + local.get $5 f64.mul f64.add local.get $2 @@ -35191,21 +37084,33 @@ local.get $0 ) (func $export:assembly/vec2/rotate (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) - (local $4 f64) + (local $4 i32) (local $5 f64) (local $6 f64) + (local $7 f64) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $4 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $4 local.get $1 i32.store offset=4 - global.get $~lib/memory/__stack_pointer + local.get $4 local.get $2 i32.store offset=8 local.get $1 @@ -35215,7 +37120,7 @@ i32.const 0 call $~lib/typedarray/Float64Array#__get f64.sub - local.set $4 + local.set $5 local.get $1 i32.const 1 call $~lib/typedarray/Float64Array#__get @@ -35223,19 +37128,19 @@ i32.const 1 call $~lib/typedarray/Float64Array#__get f64.sub - local.set $5 + local.set $6 local.get $3 call $~lib/math/NativeMath.sin - local.set $6 + local.set $7 local.get $0 i32.const 0 - local.get $4 + local.get $5 local.get $3 call $~lib/math/NativeMath.cos local.tee $3 f64.mul - local.get $5 local.get $6 + local.get $7 f64.mul f64.sub local.get $2 @@ -35245,10 +37150,10 @@ call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 - local.get $4 - local.get $6 - f64.mul local.get $5 + local.get $7 + f64.mul + local.get $6 local.get $3 f64.mul f64.add @@ -35269,15 +37174,27 @@ (local $4 f64) (local $5 f64) (local $6 f64) + (local $7 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $7 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $7 local.get $1 i32.store offset=4 local.get $0 @@ -35309,18 +37226,7 @@ f64.add f64.sqrt f64.mul - local.set $2 - local.get $3 - local.get $5 - f64.mul - local.get $4 - local.get $6 - f64.mul - f64.add - local.get $2 - f64.div - local.get $2 - local.get $2 + local.tee $2 i64.reinterpret_f64 i64.const 1 i64.shl @@ -35328,7 +37234,19 @@ i64.sub i64.const -9007199254740994 i64.le_u - select + if (result f64) + local.get $3 + local.get $5 + f64.mul + local.get $4 + local.get $6 + f64.mul + f64.add + local.get $2 + f64.div + else + local.get $2 + end f64.const -1 f64.max f64.const 1 @@ -35344,7 +37262,17 @@ i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer local.get $0 i32.store @@ -35364,99 +37292,131 @@ ) (func $export:assembly/vec2/str (param $0 i32) (result i32) (local $1 i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer - i32.const 32 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=16 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=24 - global.get $~lib/memory/__stack_pointer - i32.const 5584 - i32.store offset=24 - local.get $0 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - call $~lib/number/F64#toString - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=28 - i32.const 5584 - local.get $1 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=16 - global.get $~lib/memory/__stack_pointer - i32.const 5072 - i32.store offset=20 - local.get $1 - i32.const 5072 - call $~lib/string/String.__concat - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=8 - local.get $0 + block $folding-inner0 + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + local.tee $1 + local.get $0 + i32.store + local.get $1 + i32.const 32 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + local.tee $1 + i64.const 0 + i64.store + local.get $1 + i64.const 0 + i64.store offset=8 + local.get $1 + i64.const 0 + i64.store offset=16 + local.get $1 + i64.const 0 + i64.store offset=24 + local.get $1 + i32.const 12096 + i32.store offset=24 + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=28 + i32.const 12096 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.tee $2 + local.get $1 + i32.store offset=16 + local.get $2 + i32.const 5424 + i32.store offset=20 + local.get $1 + i32.const 5424 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=8 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=12 + local.get $1 + local.get $0 + call $~lib/string/String.__concat + local.set $0 + global.get $~lib/memory/__stack_pointer + local.tee $1 + local.get $0 + i32.store + local.get $1 + i32.const 5456 + i32.store offset=4 + local.get $0 + i32.const 5456 + call $~lib/string/String.__concat + global.get $~lib/memory/__stack_pointer + i32.const 32 + i32.add + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + return + end + i32.const 29056 + i32.const 29104 i32.const 1 - call $~lib/typedarray/Float64Array#__get - call $~lib/number/F64#toString - local.set $0 - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store offset=12 - local.get $1 - local.get $0 - call $~lib/string/String.__concat - local.set $0 - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer - i32.const 5104 - i32.store offset=4 - local.get $0 - i32.const 5104 - call $~lib/string/String.__concat - global.get $~lib/memory/__stack_pointer - i32.const 32 - i32.add - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer + i32.const 1 + call $~lib/builtins/abort + unreachable ) (func $export:assembly/vec2/exactEquals (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $2 local.get $1 i32.store offset=4 local.get $0 @@ -35487,15 +37447,27 @@ (local $3 f64) (local $4 f64) (local $5 f64) + (local $6 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $6 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $6 local.get $1 i32.store offset=4 local.get $0 @@ -35555,50 +37527,67 @@ i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - global.get $~lib/memory/__stack_pointer - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - local.tee $1 - i32.store - local.get $1 - i32.const 0 - local.get $0 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $1 + block $folding-inner0 + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + local.tee $1 + local.get $0 + i32.store + local.get $1 + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + local.tee $1 + i32.const 0 + i32.store + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + local.tee $1 + i32.store + local.get $1 + i32.const 0 + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 1 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 2 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + return + end + i32.const 29056 + i32.const 29104 i32.const 1 - local.get $0 i32.const 1 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 2 - local.get $0 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - call $~lib/typedarray/Float64Array#__set - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $1 + call $~lib/builtins/abort + unreachable ) (func $export:assembly/vec3/length (param $0 i32) (result f64) (local $1 f64) @@ -35606,7 +37595,17 @@ i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer local.get $0 i32.store @@ -35618,15 +37617,27 @@ global.set $~lib/memory/__stack_pointer ) (func $export:assembly/vec3/copy (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $2 local.get $1 i32.store offset=4 local.get $0 @@ -35658,7 +37669,17 @@ i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer local.get $0 i32.store @@ -35681,18 +37702,30 @@ local.get $0 ) (func $export:assembly/vec3/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $3 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $1 i32.store offset=4 - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $2 i32.store offset=8 local.get $0 @@ -35732,18 +37765,30 @@ local.get $0 ) (func $export:assembly/vec3/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $3 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $1 i32.store offset=4 - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $2 i32.store offset=8 local.get $0 @@ -35756,18 +37801,30 @@ global.set $~lib/memory/__stack_pointer ) (func $export:assembly/vec3/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $3 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $1 i32.store offset=4 - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $2 i32.store offset=8 local.get $0 @@ -35780,18 +37837,30 @@ global.set $~lib/memory/__stack_pointer ) (func $export:assembly/vec3/divide (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $3 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $1 i32.store offset=4 - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $2 i32.store offset=8 local.get $0 @@ -35804,15 +37873,27 @@ global.set $~lib/memory/__stack_pointer ) (func $export:assembly/vec3/ceil (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $2 local.get $1 i32.store offset=4 local.get $0 @@ -35843,15 +37924,27 @@ local.get $0 ) (func $export:assembly/vec3/floor (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $2 local.get $1 i32.store offset=4 local.get $0 @@ -35882,18 +37975,30 @@ local.get $0 ) (func $export:assembly/vec3/min (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $3 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $1 i32.store offset=4 - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $2 i32.store offset=8 local.get $0 @@ -35933,18 +38038,30 @@ local.get $0 ) (func $export:assembly/vec3/max (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $3 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $1 i32.store offset=4 - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $2 i32.store offset=8 local.get $0 @@ -35985,15 +38102,27 @@ ) (func $export:assembly/vec3/round (param $0 i32) (param $1 i32) (result i32) (local $2 f64) + (local $3 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $3 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $1 i32.store offset=4 local.get $0 @@ -36039,15 +38168,27 @@ local.get $0 ) (func $export:assembly/vec3/scale (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $3 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $1 i32.store offset=4 local.get $0 @@ -36081,18 +38222,30 @@ local.get $0 ) (func $export:assembly/vec3/scaleAndAdd (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + (local $4 i32) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $4 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $4 local.get $1 i32.store offset=4 - global.get $~lib/memory/__stack_pointer + local.get $4 local.get $2 i32.store offset=8 local.get $0 @@ -36138,16 +38291,28 @@ local.get $0 ) (func $export:assembly/vec3/distance (param $0 i32) (param $1 i32) (result f64) - (local $2 f64) + (local $2 i32) + (local $3 f64) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $2 local.get $1 i32.store offset=4 local.get $0 @@ -36159,16 +38324,28 @@ global.set $~lib/memory/__stack_pointer ) (func $export:assembly/vec3/squaredDistance (param $0 i32) (param $1 i32) (result f64) - (local $2 f64) + (local $2 i32) + (local $3 f64) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $2 local.get $1 i32.store offset=4 local.get $0 @@ -36185,7 +38362,17 @@ i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer local.get $0 i32.store @@ -36197,15 +38384,27 @@ global.set $~lib/memory/__stack_pointer ) (func $export:assembly/vec3/negate (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $2 local.get $1 i32.store offset=4 local.get $0 @@ -36236,15 +38435,27 @@ local.get $0 ) (func $export:assembly/vec3/inverse (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $2 local.get $1 i32.store offset=4 local.get $0 @@ -36278,15 +38489,27 @@ local.get $0 ) (func $export:assembly/vec3/normalize (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $2 local.get $1 i32.store offset=4 local.get $0 @@ -36298,16 +38521,28 @@ global.set $~lib/memory/__stack_pointer ) (func $export:assembly/vec3/dot (param $0 i32) (param $1 i32) (result f64) - (local $2 f64) + (local $2 i32) + (local $3 f64) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $2 local.get $1 i32.store offset=4 local.get $0 @@ -36319,18 +38554,30 @@ global.set $~lib/memory/__stack_pointer ) (func $export:assembly/vec3/cross (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $3 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $1 i32.store offset=4 - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $2 i32.store offset=8 local.get $0 @@ -36343,67 +38590,79 @@ global.set $~lib/memory/__stack_pointer ) (func $export:assembly/vec3/lerp (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) - (local $4 f64) + (local $4 i32) (local $5 f64) (local $6 f64) + (local $7 f64) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $4 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $4 local.get $1 i32.store offset=4 - global.get $~lib/memory/__stack_pointer + local.get $4 local.get $2 i32.store offset=8 local.get $1 i32.const 0 call $~lib/typedarray/Float64Array#__get - local.set $4 + local.set $5 local.get $1 i32.const 1 call $~lib/typedarray/Float64Array#__get - local.set $5 + local.set $6 local.get $1 i32.const 2 call $~lib/typedarray/Float64Array#__get - local.set $6 + local.set $7 local.get $0 i32.const 0 - local.get $4 + local.get $5 local.get $3 local.get $2 i32.const 0 call $~lib/typedarray/Float64Array#__get - local.get $4 + local.get $5 f64.sub f64.mul f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 - local.get $5 + local.get $6 local.get $3 local.get $2 i32.const 1 call $~lib/typedarray/Float64Array#__get - local.get $5 + local.get $6 f64.sub f64.mul f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 - local.get $6 + local.get $7 local.get $3 local.get $2 i32.const 2 call $~lib/typedarray/Float64Array#__get - local.get $6 + local.get $7 f64.sub f64.mul f64.add @@ -36416,20 +38675,32 @@ ) (func $export:assembly/vec3/slerp (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) (local $4 f64) - (local $5 f64) + (local $5 i32) (local $6 f64) + (local $7 f64) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $5 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $5 local.get $1 i32.store offset=4 - global.get $~lib/memory/__stack_pointer + local.get $5 local.get $2 i32.store offset=8 local.get $1 @@ -36440,23 +38711,23 @@ f64.const 1 f64.min call $~lib/math/NativeMath.acos - local.tee $5 + local.tee $6 call $~lib/math/NativeMath.sin - local.set $6 + local.set $7 f64.const 1 local.get $3 f64.sub - local.get $5 + local.get $6 f64.mul call $~lib/math/NativeMath.sin - local.get $6 + local.get $7 f64.div local.set $4 local.get $3 - local.get $5 + local.get $6 f64.mul call $~lib/math/NativeMath.sin - local.get $6 + local.get $7 f64.div local.set $3 local.get $0 @@ -36475,103 +38746,334 @@ call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 - local.get $4 + local.get $4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.mul + local.get $3 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.mul + local.get $3 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/vec3/hermite (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 f64) (result i32) + (local $6 f64) + (local $7 i32) + (local $8 f64) + (local $9 f64) + (local $10 f64) + global.get $~lib/memory/__stack_pointer + i32.const 20 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $7 + local.get $0 + i32.store + local.get $7 + local.get $1 + i32.store offset=4 + local.get $7 + local.get $2 + i32.store offset=8 + local.get $7 + local.get $3 + i32.store offset=12 + local.get $7 + local.get $4 + i32.store offset=16 + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $5 + local.get $5 + f64.mul + local.tee $6 + local.get $5 + local.get $5 + f64.add + local.tee $10 + f64.const 3 + f64.sub + f64.mul + f64.const 1 + f64.add + local.tee $8 + f64.mul + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $6 + local.get $5 + f64.const 2 + f64.sub + f64.mul + local.get $5 + f64.add + local.tee $9 + f64.mul + f64.add + local.get $3 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $6 + local.get $5 + f64.const 1 + f64.sub + f64.mul + local.tee $5 + f64.mul + f64.add + local.get $4 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $6 + f64.const 3 + local.get $10 + f64.sub + f64.mul + local.tee $6 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $8 + f64.mul + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $9 + f64.mul + f64.add + local.get $3 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.mul + f64.add + local.get $4 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $6 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $8 + f64.mul + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $9 + f64.mul + f64.add + local.get $3 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.mul + f64.add + local.get $4 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $6 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 20 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/vec3/bezier (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 f64) (result i32) + (local $6 f64) + (local $7 i32) + (local $8 f64) + (local $9 f64) + (local $10 f64) + global.get $~lib/memory/__stack_pointer + i32.const 20 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $7 + local.get $0 + i32.store + local.get $7 + local.get $1 + i32.store offset=4 + local.get $7 + local.get $2 + i32.store offset=8 + local.get $7 + local.get $3 + i32.store offset=12 + local.get $7 + local.get $4 + i32.store offset=16 + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.const 1 + local.get $5 + f64.sub + local.tee $6 + local.get $6 + f64.mul + local.tee $8 + local.get $6 + f64.mul + local.tee $9 + f64.mul + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.const 3 + f64.mul + local.get $8 + f64.mul + local.tee $8 + f64.mul + f64.add + local.get $3 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $5 + local.get $5 + f64.mul + local.tee $10 + f64.const 3 + f64.mul + local.get $6 + f64.mul + local.tee $6 + f64.mul + f64.add + local.get $4 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $10 + local.get $5 + f64.mul + local.tee $5 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 local.get $1 i32.const 1 call $~lib/typedarray/Float64Array#__get + local.get $9 f64.mul - local.get $3 local.get $2 i32.const 1 call $~lib/typedarray/Float64Array#__get + local.get $8 + f64.mul + f64.add + local.get $3 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $6 + f64.mul + f64.add + local.get $4 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $5 f64.mul f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 - local.get $4 local.get $1 i32.const 2 call $~lib/typedarray/Float64Array#__get + local.get $9 f64.mul - local.get $3 local.get $2 i32.const 2 call $~lib/typedarray/Float64Array#__get + local.get $8 f64.mul f64.add - call $~lib/typedarray/Float64Array#__set - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $0 - ) - (func $export:assembly/vec3/hermite (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 f64) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 20 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=8 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store offset=12 - global.get $~lib/memory/__stack_pointer - local.get $4 - i32.store offset=16 - local.get $0 - local.get $1 - local.get $2 local.get $3 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $6 + f64.mul + f64.add local.get $4 + i32.const 2 + call $~lib/typedarray/Float64Array#__get local.get $5 - call $assembly/vec3/hermite + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer i32.const 20 i32.add global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/vec3/bezier (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 f64) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 20 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=8 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store offset=12 - global.get $~lib/memory/__stack_pointer - local.get $4 - i32.store offset=16 local.get $0 - local.get $1 - local.get $2 - local.get $3 - local.get $4 - local.get $5 - call $assembly/vec3/bezier - global.get $~lib/memory/__stack_pointer - i32.const 20 - i32.add - global.set $~lib/memory/__stack_pointer ) (func $export:assembly/vec3/random (param $0 i32) (param $1 f64) (result i32) (local $2 f64) @@ -36581,7 +39083,17 @@ i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer local.get $0 i32.store @@ -36653,45 +39165,193 @@ local.get $0 ) (func $export:assembly/vec3/transformMat4 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 i32) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $7 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $7 local.get $1 i32.store offset=4 - global.get $~lib/memory/__stack_pointer + local.get $7 local.get $2 i32.store offset=8 - local.get $0 local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + local.get $2 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.mul + f64.add + local.get $2 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.get $6 + f64.mul + f64.add + local.get $2 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + f64.add + local.tee $3 + f64.const 1 + local.get $3 + i64.reinterpret_f64 + i64.const 1 + i64.shl + i64.const 2 + i64.sub + i64.const -9007199254740994 + i64.le_u + select + local.set $3 + local.get $0 + i32.const 0 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + local.get $2 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.mul + f64.add + local.get $2 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.get $6 + f64.mul + f64.add + local.get $2 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + f64.add + local.get $3 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + local.get $2 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.mul + f64.add + local.get $2 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.get $6 + f64.mul + f64.add + local.get $2 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + f64.add + local.get $3 + f64.div + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + local.get $2 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.mul + f64.add + local.get $2 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.get $6 + f64.mul + f64.add local.get $2 - call $assembly/vec3/transformMat4 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + f64.add + local.get $3 + f64.div + call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer i32.const 12 i32.add global.set $~lib/memory/__stack_pointer + local.get $0 ) (func $export:assembly/vec3/transformMat3 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 f64) (local $4 f64) (local $5 f64) + (local $6 i32) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $6 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $6 local.get $1 i32.store offset=4 - global.get $~lib/memory/__stack_pointer + local.get $6 local.get $2 i32.store offset=8 local.get $1 @@ -36773,115 +39433,677 @@ local.get $0 ) (func $export:assembly/vec3/transformQuat (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 i32) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $9 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $9 local.get $1 i32.store offset=4 - global.get $~lib/memory/__stack_pointer + local.get $9 local.get $2 i32.store offset=8 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $8 local.get $0 + i32.const 0 + local.get $5 + local.get $7 local.get $1 - local.get $2 - call $assembly/vec3/transformQuat + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.tee $10 + f64.mul + local.get $4 + local.get $8 + f64.mul + f64.sub + local.tee $11 + local.get $6 + local.get $6 + f64.add + local.tee $6 + f64.mul + f64.add + local.get $7 + local.get $3 + local.get $8 + f64.mul + local.get $7 + local.get $5 + f64.mul + f64.sub + local.tee $12 + f64.mul + local.get $4 + local.get $4 + local.get $5 + f64.mul + local.get $3 + local.get $10 + f64.mul + f64.sub + local.tee $5 + f64.mul + f64.sub + local.tee $13 + local.get $13 + f64.add + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $8 + local.get $5 + local.get $6 + f64.mul + f64.add + local.get $4 + local.get $11 + f64.mul + local.get $3 + local.get $12 + f64.mul + f64.sub + local.tee $4 + local.get $4 + f64.add + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $10 + local.get $12 + local.get $6 + f64.mul + f64.add + local.get $3 + local.get $5 + f64.mul + local.get $7 + local.get $11 + f64.mul + f64.sub + local.tee $3 + local.get $3 + f64.add + f64.add + call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer i32.const 12 i32.add global.set $~lib/memory/__stack_pointer + local.get $0 ) (func $export:assembly/vec3/rotateX (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + (local $4 i32) + (local $5 i32) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=8 - local.get $0 - local.get $1 - local.get $2 - local.get $3 - call $assembly/vec3/rotateX - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.add - global.set $~lib/memory/__stack_pointer + block $folding-inner0 + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + local.tee $4 + local.get $0 + i32.store + local.get $4 + local.get $1 + i32.store offset=4 + local.get $4 + local.get $2 + i32.store offset=8 + local.get $4 + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + local.tee $4 + i64.const 0 + i64.store + local.get $4 + i32.const 0 + i32.const 3 + i32.const 28 + i32.const 12128 + call $~lib/rt/__newArray + local.tee $4 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.const 3 + i32.const 28 + i32.const 12160 + call $~lib/rt/__newArray + local.tee $5 + i32.store offset=4 + local.get $4 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/array/Array#__set + local.get $4 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/array/Array#__set + local.get $4 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/array/Array#__set + local.get $5 + i32.const 0 + local.get $4 + i32.const 0 + call $~lib/array/Array#__get + call $~lib/array/Array#__set + local.get $5 + i32.const 1 + local.get $4 + i32.const 1 + call $~lib/array/Array#__get + local.get $3 + call $~lib/math/NativeMath.cos + f64.mul + local.get $4 + i32.const 2 + call $~lib/array/Array#__get + local.get $3 + call $~lib/math/NativeMath.sin + f64.mul + f64.sub + call $~lib/array/Array#__set + local.get $5 + i32.const 2 + local.get $4 + i32.const 1 + call $~lib/array/Array#__get + local.get $3 + call $~lib/math/NativeMath.sin + f64.mul + local.get $4 + i32.const 2 + call $~lib/array/Array#__get + local.get $3 + call $~lib/math/NativeMath.cos + f64.mul + f64.add + call $~lib/array/Array#__set + local.get $0 + i32.const 0 + local.get $5 + i32.const 0 + call $~lib/array/Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $5 + i32.const 1 + call $~lib/array/Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $5 + i32.const 2 + call $~lib/array/Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + return + end + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable ) (func $export:assembly/vec3/rotateY (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + (local $4 i32) + (local $5 i32) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=8 - local.get $0 - local.get $1 - local.get $2 - local.get $3 - call $assembly/vec3/rotateY - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.add - global.set $~lib/memory/__stack_pointer + block $folding-inner0 + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + local.tee $4 + local.get $0 + i32.store + local.get $4 + local.get $1 + i32.store offset=4 + local.get $4 + local.get $2 + i32.store offset=8 + local.get $4 + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + local.tee $4 + i64.const 0 + i64.store + local.get $4 + i32.const 0 + i32.const 3 + i32.const 28 + i32.const 12240 + call $~lib/rt/__newArray + local.tee $4 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.const 3 + i32.const 28 + i32.const 12272 + call $~lib/rt/__newArray + local.tee $5 + i32.store offset=4 + local.get $4 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/array/Array#__set + local.get $4 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/array/Array#__set + local.get $4 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/array/Array#__set + local.get $5 + i32.const 0 + local.get $4 + i32.const 2 + call $~lib/array/Array#__get + local.get $3 + call $~lib/math/NativeMath.sin + f64.mul + local.get $4 + i32.const 0 + call $~lib/array/Array#__get + local.get $3 + call $~lib/math/NativeMath.cos + f64.mul + f64.add + call $~lib/array/Array#__set + local.get $5 + i32.const 1 + local.get $4 + i32.const 1 + call $~lib/array/Array#__get + call $~lib/array/Array#__set + local.get $5 + i32.const 2 + local.get $4 + i32.const 2 + call $~lib/array/Array#__get + local.get $3 + call $~lib/math/NativeMath.cos + f64.mul + local.get $4 + i32.const 0 + call $~lib/array/Array#__get + local.get $3 + call $~lib/math/NativeMath.sin + f64.mul + f64.sub + call $~lib/array/Array#__set + local.get $0 + i32.const 0 + local.get $5 + i32.const 0 + call $~lib/array/Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $5 + i32.const 1 + call $~lib/array/Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $5 + i32.const 2 + call $~lib/array/Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + return + end + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable ) (func $export:assembly/vec3/rotateZ (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + (local $4 i32) + (local $5 i32) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=8 - local.get $0 - local.get $1 - local.get $2 - local.get $3 - call $assembly/vec3/rotateZ - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.add - global.set $~lib/memory/__stack_pointer + block $folding-inner0 + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + local.tee $4 + local.get $0 + i32.store + local.get $4 + local.get $1 + i32.store offset=4 + local.get $4 + local.get $2 + i32.store offset=8 + local.get $4 + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + local.tee $4 + i64.const 0 + i64.store + local.get $4 + i32.const 0 + i32.const 3 + i32.const 28 + i32.const 12304 + call $~lib/rt/__newArray + local.tee $4 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.const 3 + i32.const 28 + i32.const 12336 + call $~lib/rt/__newArray + local.tee $5 + i32.store offset=4 + local.get $4 + i32.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/array/Array#__set + local.get $4 + i32.const 1 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/array/Array#__set + local.get $4 + i32.const 2 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.sub + call $~lib/array/Array#__set + local.get $5 + i32.const 0 + local.get $4 + i32.const 0 + call $~lib/array/Array#__get + local.get $3 + call $~lib/math/NativeMath.cos + f64.mul + local.get $4 + i32.const 1 + call $~lib/array/Array#__get + local.get $3 + call $~lib/math/NativeMath.sin + f64.mul + f64.sub + call $~lib/array/Array#__set + local.get $5 + i32.const 1 + local.get $4 + i32.const 0 + call $~lib/array/Array#__get + local.get $3 + call $~lib/math/NativeMath.sin + f64.mul + local.get $4 + i32.const 1 + call $~lib/array/Array#__get + local.get $3 + call $~lib/math/NativeMath.cos + f64.mul + f64.add + call $~lib/array/Array#__set + local.get $5 + i32.const 2 + local.get $4 + i32.const 2 + call $~lib/array/Array#__get + call $~lib/array/Array#__set + local.get $0 + i32.const 0 + local.get $5 + i32.const 0 + call $~lib/array/Array#__get + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $5 + i32.const 1 + call $~lib/array/Array#__get + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $5 + i32.const 2 + call $~lib/array/Array#__get + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.add + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + return + end + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable ) (func $export:assembly/vec3/angle (param $0 i32) (param $1 i32) (result f64) (local $2 f64) + (local $3 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $3 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $1 i32.store offset=4 local.get $0 @@ -36959,7 +40181,17 @@ i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer local.get $0 i32.store @@ -36982,31 +40214,164 @@ local.get $0 ) (func $export:assembly/vec3/str (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - local.get $0 - call $assembly/vec3/str - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer + block $folding-inner0 + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + local.tee $1 + local.get $0 + i32.store + local.get $1 + i32.const 48 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + local.tee $1 + i64.const 0 + i64.store + local.get $1 + i64.const 0 + i64.store offset=8 + local.get $1 + i64.const 0 + i64.store offset=16 + local.get $1 + i64.const 0 + i64.store offset=24 + local.get $1 + i64.const 0 + i64.store offset=32 + local.get $1 + i64.const 0 + i64.store offset=40 + local.get $1 + i32.const 12368 + i32.store offset=40 + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=44 + i32.const 12368 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.tee $2 + local.get $1 + i32.store offset=32 + local.get $2 + i32.const 5424 + i32.store offset=36 + local.get $1 + i32.const 5424 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=24 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=28 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.tee $2 + local.get $1 + i32.store offset=16 + local.get $2 + i32.const 5424 + i32.store offset=20 + local.get $1 + i32.const 5424 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=8 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=12 + local.get $1 + local.get $0 + call $~lib/string/String.__concat + local.set $0 + global.get $~lib/memory/__stack_pointer + local.tee $1 + local.get $0 + i32.store + local.get $1 + i32.const 5456 + i32.store offset=4 + local.get $0 + i32.const 5456 + call $~lib/string/String.__concat + global.get $~lib/memory/__stack_pointer + i32.const 48 + i32.add + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + return + end + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable ) (func $export:assembly/vec3/exactEquals (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $2 local.get $1 i32.store offset=4 local.get $0 @@ -37050,15 +40415,27 @@ (local $5 f64) (local $6 f64) (local $7 f64) + (local $8 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $8 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $8 local.get $1 i32.store offset=4 local.get $0 @@ -37138,18 +40515,30 @@ global.set $~lib/memory/__stack_pointer ) (func $export:assembly/vec4/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $3 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $1 i32.store offset=4 - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $2 i32.store offset=8 local.get $0 @@ -37162,18 +40551,30 @@ global.set $~lib/memory/__stack_pointer ) (func $export:assembly/vec4/divide (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $3 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $1 i32.store offset=4 - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $2 i32.store offset=8 local.get $0 @@ -37186,15 +40587,27 @@ global.set $~lib/memory/__stack_pointer ) (func $export:assembly/vec4/ceil (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $2 local.get $1 i32.store offset=4 local.get $0 @@ -37232,15 +40645,27 @@ local.get $0 ) (func $export:assembly/vec4/floor (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $2 local.get $1 i32.store offset=4 local.get $0 @@ -37278,18 +40703,30 @@ local.get $0 ) (func $export:assembly/vec4/min (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $3 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $1 i32.store offset=4 - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $2 i32.store offset=8 local.get $0 @@ -37339,18 +40776,30 @@ local.get $0 ) (func $export:assembly/vec4/max (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $3 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $1 i32.store offset=4 - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $2 i32.store offset=8 local.get $0 @@ -37401,15 +40850,27 @@ ) (func $export:assembly/vec4/round (param $0 i32) (param $1 i32) (result i32) (local $2 f64) + (local $3 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $3 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $3 local.get $1 i32.store offset=4 local.get $0 @@ -37467,16 +40928,28 @@ local.get $0 ) (func $export:assembly/vec4/distance (param $0 i32) (param $1 i32) (result f64) - (local $2 f64) + (local $2 i32) + (local $3 f64) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $2 local.get $1 i32.store offset=4 local.get $0 @@ -37488,16 +40961,28 @@ global.set $~lib/memory/__stack_pointer ) (func $export:assembly/vec4/squaredDistance (param $0 i32) (param $1 i32) (result f64) - (local $2 f64) + (local $2 i32) + (local $3 f64) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $2 local.get $1 i32.store offset=4 local.get $0 @@ -37514,7 +40999,17 @@ i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer local.get $0 i32.store @@ -37531,7 +41026,17 @@ i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer local.get $0 i32.store @@ -37543,15 +41048,27 @@ global.set $~lib/memory/__stack_pointer ) (func $export:assembly/vec4/negate (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $2 local.get $1 i32.store offset=4 local.get $0 @@ -37589,15 +41106,27 @@ local.get $0 ) (func $export:assembly/vec4/inverse (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $2 local.get $1 i32.store offset=4 local.get $0 @@ -37639,15 +41168,27 @@ local.get $0 ) (func $export:assembly/vec4/normalize (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $2 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $2 local.get $1 i32.store offset=4 local.get $0 @@ -37659,150 +41200,787 @@ global.set $~lib/memory/__stack_pointer ) (func $export:assembly/vec4/dot (param $0 i32) (param $1 i32) (result f64) - (local $2 f64) + (local $2 i32) + (local $3 f64) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $2 + local.get $0 + i32.store + local.get $2 + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + call $assembly/vec4/dot global.get $~lib/memory/__stack_pointer i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/vec4/cross (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 i32) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + global.get $~lib/memory/__stack_pointer + i32.const 16 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $4 + local.get $0 + i32.store + local.get $4 + local.get $1 + i32.store offset=4 + local.get $4 + local.get $2 + i32.store offset=8 + local.get $4 + local.get $3 + i32.store offset=12 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $3 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.mul + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $3 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.sub + local.set $6 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $3 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.mul + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $3 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.sub + local.set $7 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $3 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.mul + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $3 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.sub + local.set $8 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $3 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.mul + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $3 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.sub + local.set $9 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $3 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.mul + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $3 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.sub + local.set $10 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $3 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.mul + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $3 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.mul + f64.sub + local.set $11 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $0 + i32.const 0 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.tee $12 + local.get $11 + f64.mul + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.tee $13 + local.get $10 + f64.mul + f64.sub + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.tee $14 + local.get $9 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $5 + local.get $11 + f64.mul + f64.neg + local.get $13 + local.get $8 + f64.mul + f64.add + local.get $14 + local.get $7 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $5 + local.get $10 + f64.mul + local.get $12 + local.get $8 + f64.mul + f64.sub + local.get $14 + local.get $6 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $5 + local.get $9 + f64.mul + f64.neg + local.get $12 + local.get $7 + f64.mul + f64.add + local.get $13 + local.get $6 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 16 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + ) + (func $export:assembly/vec4/lerp (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + (local $4 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $4 + local.get $0 + i32.store + local.get $4 + local.get $1 + i32.store offset=4 + local.get $4 + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $assembly/vec4/lerp + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:assembly/vec4/random (param $0 i32) (param $1 f64) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $1 + f64.const 1 + local.get $1 + i64.reinterpret_f64 + i64.const 1 + i64.shl + i64.const 2 + i64.sub + i64.const -9007199254740994 + i64.le_u + select + local.set $1 + loop $do-continue|0 + i32.const 0 + global.set $~argumentsLength + global.get $assembly/common/RANDOM + i32.load + call_indirect $0 (type $none_=>_f64) + local.set $2 + i32.const 0 + global.set $~argumentsLength + local.get $2 + local.get $2 + f64.add + f64.const 1 + f64.sub + local.tee $2 + local.get $2 + f64.mul + global.get $assembly/common/RANDOM + i32.load + call_indirect $0 (type $none_=>_f64) + local.tee $4 + local.get $4 + f64.add + f64.const 1 + f64.sub + local.tee $4 + local.get $4 + f64.mul + f64.add + local.tee $6 + f64.const 1 + f64.ge + br_if $do-continue|0 + end + loop $do-continue|1 + i32.const 0 + global.set $~argumentsLength + global.get $assembly/common/RANDOM + i32.load + call_indirect $0 (type $none_=>_f64) + local.set $3 + i32.const 0 + global.set $~argumentsLength + local.get $3 + local.get $3 + f64.add + f64.const 1 + f64.sub + local.tee $3 + local.get $3 + f64.mul + global.get $assembly/common/RANDOM + i32.load + call_indirect $0 (type $none_=>_f64) + local.tee $5 + local.get $5 + f64.add + f64.const 1 + f64.sub + local.tee $5 + local.get $5 + f64.mul + f64.add + local.tee $7 + f64.const 1 + f64.ge + br_if $do-continue|1 + end local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer + i32.const 0 local.get $1 - i32.store offset=4 + local.get $2 + f64.mul + call $~lib/typedarray/Float64Array#__set local.get $0 + i32.const 1 local.get $1 - call $assembly/vec4/dot - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/vec4/cross (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 16 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer + local.get $4 + f64.mul + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer + i32.const 2 local.get $1 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=8 - global.get $~lib/memory/__stack_pointer local.get $3 - i32.store offset=12 + f64.mul + f64.const 1 + local.get $6 + f64.sub + local.get $7 + f64.div + f64.sqrt + local.tee $2 + f64.mul + call $~lib/typedarray/Float64Array#__set local.get $0 + i32.const 3 local.get $1 + local.get $5 + f64.mul local.get $2 - local.get $3 - call $assembly/vec4/cross + f64.mul + call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer - i32.const 16 + i32.const 4 i32.add global.set $~lib/memory/__stack_pointer + local.get $0 ) - (func $export:assembly/vec4/lerp (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32) + (func $export:assembly/vec4/transformMat4 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 i32) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $7 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $7 local.get $1 i32.store offset=4 - global.get $~lib/memory/__stack_pointer + local.get $7 local.get $2 i32.store offset=8 - local.get $0 local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.set $6 + local.get $0 + i32.const 0 local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get local.get $3 - call $assembly/vec4/lerp - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/vec4/random (param $0 i32) (param $1 f64) (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - local.get $0 - local.get $1 - call $assembly/vec4/random - global.get $~lib/memory/__stack_pointer + f64.mul + local.get $2 i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:assembly/vec4/transformMat4 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - global.get $~lib/memory/__stack_pointer + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + f64.add + local.get $2 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.mul + f64.add + local.get $2 i32.const 12 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer + call $~lib/typedarray/Float64Array#__get + local.get $6 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer + i32.const 1 local.get $2 - i32.store offset=8 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + local.get $2 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + f64.add + local.get $2 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.mul + f64.add + local.get $2 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + local.get $6 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set local.get $0 - local.get $1 + i32.const 2 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + local.get $2 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + f64.add + local.get $2 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.mul + f64.add + local.get $2 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + local.get $6 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $2 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $3 + f64.mul + local.get $2 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + local.get $4 + f64.mul + f64.add + local.get $2 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + local.get $5 + f64.mul + f64.add local.get $2 - call $assembly/vec4/transformMat4 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + local.get $6 + f64.mul + f64.add + call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer i32.const 12 i32.add global.set $~lib/memory/__stack_pointer + local.get $0 ) (func $export:assembly/vec4/transformQuat (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 i32) + (local $12 f64) + (local $13 f64) + (local $14 f64) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $11 local.get $0 i32.store - global.get $~lib/memory/__stack_pointer + local.get $11 local.get $1 i32.store offset=4 - global.get $~lib/memory/__stack_pointer + local.get $11 local.get $2 i32.store offset=8 - local.get $0 local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $7 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.set $9 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.set $8 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.set $5 + local.get $0 + i32.const 0 local.get $2 - call $assembly/vec4/transformQuat + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.tee $6 + local.get $3 + f64.mul + local.get $8 + local.get $7 + f64.mul + f64.add + local.get $5 + local.get $4 + f64.mul + f64.sub + local.tee $12 + local.get $6 + f64.mul + local.get $9 + f64.neg + local.tee $10 + local.get $3 + f64.mul + local.get $8 + local.get $4 + f64.mul + f64.sub + local.get $5 + local.get $7 + f64.mul + f64.sub + local.tee $13 + local.get $10 + f64.mul + f64.add + local.get $6 + local.get $4 + f64.mul + local.get $5 + local.get $3 + f64.mul + f64.add + local.get $9 + local.get $7 + f64.mul + f64.sub + local.tee $14 + local.get $5 + f64.neg + local.tee $5 + f64.mul + f64.add + local.get $6 + local.get $7 + f64.mul + local.get $9 + local.get $4 + f64.mul + f64.add + local.get $8 + local.get $3 + f64.mul + f64.sub + local.tee $3 + local.get $8 + f64.neg + local.tee $4 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $14 + local.get $6 + f64.mul + local.get $13 + local.get $4 + f64.mul + f64.add + local.get $3 + local.get $10 + f64.mul + f64.add + local.get $12 + local.get $5 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $3 + local.get $6 + f64.mul + local.get $13 + local.get $5 + f64.mul + f64.add + local.get $12 + local.get $4 + f64.mul + f64.add + local.get $14 + local.get $10 + f64.mul + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer i32.const 12 i32.add global.set $~lib/memory/__stack_pointer + local.get $0 ) (func $export:assembly/vec4/zero (param $0 i32) (result i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + if + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer local.get $0 i32.store @@ -37829,19 +42007,172 @@ local.get $0 ) (func $export:assembly/vec4/str (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - local.get $0 - call $assembly/vec4/str - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer + block $folding-inner0 + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + local.tee $1 + local.get $0 + i32.store + local.get $1 + i32.const -64 + i32.add + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12652 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + local.tee $1 + i64.const 0 + i64.store + local.get $1 + i64.const 0 + i64.store offset=8 + local.get $1 + i64.const 0 + i64.store offset=16 + local.get $1 + i64.const 0 + i64.store offset=24 + local.get $1 + i64.const 0 + i64.store offset=32 + local.get $1 + i64.const 0 + i64.store offset=40 + local.get $1 + i64.const 0 + i64.store offset=48 + local.get $1 + i64.const 0 + i64.store offset=56 + local.get $1 + i32.const 12400 + i32.store offset=56 + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=60 + i32.const 12400 + local.get $1 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.tee $2 + local.get $1 + i32.store offset=48 + local.get $2 + i32.const 5424 + i32.store offset=52 + local.get $1 + i32.const 5424 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=40 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=44 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.tee $2 + local.get $1 + i32.store offset=32 + local.get $2 + i32.const 5424 + i32.store offset=36 + local.get $1 + i32.const 5424 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=24 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=28 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.tee $2 + local.get $1 + i32.store offset=16 + local.get $2 + i32.const 5424 + i32.store offset=20 + local.get $1 + i32.const 5424 + call $~lib/string/String.__concat + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=8 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + call $~lib/number/F64#toString + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=12 + local.get $1 + local.get $0 + call $~lib/string/String.__concat + local.set $0 + global.get $~lib/memory/__stack_pointer + local.tee $1 + local.get $0 + i32.store + local.get $1 + i32.const 5456 + i32.store offset=4 + local.get $0 + i32.const 5456 + call $~lib/string/String.__concat + global.get $~lib/memory/__stack_pointer + i32.const -64 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + return + end + i32.const 29056 + i32.const 29104 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable ) ) diff --git a/js/types.d.ts b/js/types.d.ts deleted file mode 100644 index 58237b88..00000000 --- a/js/types.d.ts +++ /dev/null @@ -1,94 +0,0 @@ -interface IndexedCollection extends Iterable { - readonly length: number; - [index: number]: number; -} - -// prettier-ignore -declare type mat2 = - | [number, number, - number, number] - | IndexedCollection; - -// prettier-ignore -declare type mat2d = - | [number, number, - number, number, - number, number] - | IndexedCollection; - -// prettier-ignore -declare type mat3 = - | [number, number, number, - number, number, number, - number, number, number] - | IndexedCollection; - -// prettier-ignore -declare type mat4 = - | [number, number, number, number, - number, number, number, number, - number, number, number, number, - number, number, number, number] - | IndexedCollection; - -declare type quat = [number, number, number, number] | IndexedCollection; - -// prettier-ignore -declare type quat2 = - | [number, number, number, number, - number, number, number, number] - | IndexedCollection; - -declare type vec2 = [number, number] | IndexedCollection; -declare type vec3 = [number, number, number] | IndexedCollection; -declare type vec4 = [number, number, number, number] | IndexedCollection; - -// prettier-ignore -declare type ReadonlyMat2 = - | readonly [ - number, number, - number, number - ] - | IndexedCollection; - -// prettier-ignore -declare type ReadonlyMat2d = - | readonly [ - number, number, - number, number, - number, number - ] - | IndexedCollection; - -// prettier-ignore -declare type ReadonlyMat3 = - | readonly [ - number, number, number, - number, number, number, - number, number, number - ] - | IndexedCollection; - -// prettier-ignore -declare type ReadonlyMat4 = - | readonly [ - number, number, number, number, - number, number, number, number, - number, number, number, number, - number, number, number, number - ] - | IndexedCollection; - -declare type ReadonlyQuat = - | readonly [number, number, number, number] - | IndexedCollection; - -declare type ReadonlyQuat2 = - | readonly [number, number, number, number, number, number, number, number] - | IndexedCollection; - -declare type ReadonlyVec2 = readonly [number, number] | IndexedCollection; -declare type ReadonlyVec3 = readonly [number, number, number] | IndexedCollection; -declare type ReadonlyVec4 = - | readonly [number, number, number, number] - | IndexedCollection; diff --git a/package.json b/package.json index 60834501..0bcb6785 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "build-umd": "rollup -c", "build-esm": "cross-env BABEL_ENV=esm babel js -d dist/esm", "build-cjs": "babel js -d dist/cjs", - "build-dts": "tsc --allowJs --declaration --emitDeclarationOnly --outFile ./dist/index.d.ts ./assembly/index.ts ./js/types.d.ts && tsc --noEmit ./dist/index.d.ts", + "build-dts": "tsc --declaration --emitDeclarationOnly --outFile ./dist/index.d.ts ./assembly/index.ts && node ./utils/bundle-dts.js && tsc --noEmit ./dist/index.d.ts", "build": "del dist && npm run update-license-version && npm run build-js && npm run build-umd && npm run build-esm && npm run build-cjs && npm run build-dts && node ./utils/build.js && npm run asbuild", "prepare": "npm run build", "asbuild:untouched": "asc assembly/index.as.ts --target debug", diff --git a/utils/bundle-dts.js b/utils/bundle-dts.js index c7bcd554..82be43a4 100644 --- a/utils/bundle-dts.js +++ b/utils/bundle-dts.js @@ -2,7 +2,7 @@ const fs = require("fs"); const path = require("path"); let sourcePath = "./dist/index.d.ts"; -let sourceTypingsPath = "./src/types.d.ts"; +let sourceTypingsPath = "./assembly/index.d.ts"; let sourceTypings = fs.readFileSync(sourceTypingsPath, "utf-8"); let typings = fs.readFileSync(sourcePath, "utf-8"); let typingsLength = typings.length; @@ -37,4 +37,12 @@ typings = "\n" + sourceTypings.replace(/declare/g, "export") + "\n" + typings; // Wrap them in a "gl-matrix module" typings = 'declare module "gl-matrix" {\n' + typings + "\n}"; +// Place assemblyscript reference path to the top +typings = typings.replace(/\n\n\/\/\/ /g, ""); + +typings = ` +/// \n +${typings} +`; + fs.writeFileSync(sourcePath, typings, "utf-8"); From 598eff026a9f93c7fa88b5d81876176dc47955bf Mon Sep 17 00:00:00 2001 From: Huguenin-Elie Steve Date: Tue, 30 Mar 2021 13:55:52 +0200 Subject: [PATCH 18/32] compile from single file index.ts --- .size-snapshot.json | 6 +++--- assembly/index.as.ts | 17 ----------------- assembly/index.d.ts | 7 ++++--- assembly/index.ts | 2 +- build/untouched.wat | 4 ++-- dist/gl-matrix-min.js | 2 +- dist/gl-matrix.js | 4 +--- package.json | 4 ++-- utils/bundle-dts.js | 11 +++++++---- 9 files changed, 21 insertions(+), 36 deletions(-) delete mode 100644 assembly/index.as.ts diff --git a/.size-snapshot.json b/.size-snapshot.json index 96c4e346..01e5b5cb 100644 --- a/.size-snapshot.json +++ b/.size-snapshot.json @@ -5,8 +5,8 @@ "gzipped": 13273 }, "dist\\gl-matrix-min.js": { - "bundled": 2173, - "minified": 1927, - "gzipped": 1003 + "bundled": 2167, + "minified": 1888, + "gzipped": 980 } } diff --git a/assembly/index.as.ts b/assembly/index.as.ts deleted file mode 100644 index d2423c1e..00000000 --- a/assembly/index.as.ts +++ /dev/null @@ -1,17 +0,0 @@ -import * as glMatrix from "./common"; -import * as mat2 from "./mat2"; -import * as mat2d from "./mat2d"; -import * as mat3 from "./mat3"; -import * as mat4 from "./mat4"; -import * as quat from "./quat"; -import * as quat2 from "./quat2"; -import * as vec2 from "./vec2"; -import * as vec3 from "./vec3"; -import * as vec4 from "./vec4"; - -export { - glMatrix, - mat2, mat2d, mat3, mat4, - quat, quat2, - vec2, vec3, vec4, -}; diff --git a/assembly/index.d.ts b/assembly/index.d.ts index 52fcd586..294cef8c 100644 --- a/assembly/index.d.ts +++ b/assembly/index.d.ts @@ -24,6 +24,10 @@ declare type quat = IndexedCollection; declare type quat2 = IndexedCollection; +// prettier-ignore +declare type quat4 = + IndexedCollection; + declare type vec2 = IndexedCollection; declare type vec3 = IndexedCollection; declare type vec4 = IndexedCollection; @@ -64,6 +68,3 @@ declare class Fov { rightDegrees: f64; [key: string]: f64; } - -declare interface IArguments { -} diff --git a/assembly/index.ts b/assembly/index.ts index 78f259b1..d11b0eb0 100644 --- a/assembly/index.ts +++ b/assembly/index.ts @@ -1,4 +1,4 @@ -import "assemblyscript/std/portable"; +/// import * as glMatrix from "./common"; import * as mat2 from "./mat2"; import * as mat2d from "./mat2d"; diff --git a/build/untouched.wat b/build/untouched.wat index 8fc8c7f7..c5803ba0 100644 --- a/build/untouched.wat +++ b/build/untouched.wat @@ -9275,7 +9275,7 @@ (func $start:assembly/mat2 call $start:assembly/vec2 ) - (func $start:assembly/index.as + (func $start:assembly/index call $start:assembly/mat2 ) (func $assembly/common/setMatrixArrayType (param $0 i32) @@ -32629,7 +32629,7 @@ global.set $~argumentsLength ) (func $~start - call $start:assembly/index.as + call $start:assembly/index ) (func $~stack_check global.get $~lib/memory/__stack_pointer diff --git a/dist/gl-matrix-min.js b/dist/gl-matrix-min.js index 4f9dfedf..5dfae624 100644 --- a/dist/gl-matrix-min.js +++ b/dist/gl-matrix-min.js @@ -25,4 +25,4 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){"use strict";exports.__esModule=!0,exports.vec4=exports.vec3=exports.vec2=exports.quat2=exports.quat=exports.mat4=exports.mat3=exports.mat2d=exports.mat2=exports.glMatrix=void 0,require("assemblyscript/std/portable");var e=require("./common");exports.glMatrix=e;var r=require("./mat2");exports.mat2=r;var t=require("./mat2d");exports.mat2d=t;var a=require("./mat3");exports.mat3=a;var o=require("./mat4");exports.mat4=o;var s=require("./quat");exports.quat=s;var p=require("./quat2");exports.quat2=p;var x=require("./vec2");exports.vec2=x;var i=require("./vec3");exports.vec3=i;var u=require("./vec4");exports.vec4=u})); +!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){"use strict";exports.__esModule=!0,exports.vec4=exports.vec3=exports.vec2=exports.quat2=exports.quat=exports.mat4=exports.mat3=exports.mat2d=exports.mat2=exports.glMatrix=void 0;var e=require("./common");exports.glMatrix=e;var r=require("./mat2");exports.mat2=r;var t=require("./mat2d");exports.mat2d=t;var a=require("./mat3");exports.mat3=a;var o=require("./mat4");exports.mat4=o;var s=require("./quat");exports.quat=s;var x=require("./quat2");exports.quat2=x;var p=require("./vec2");exports.vec2=p;var u=require("./vec3");exports.vec3=u;var i=require("./vec4");exports.vec4=i})); diff --git a/dist/gl-matrix.js b/dist/gl-matrix.js index e07f4ed7..c12935bf 100644 --- a/dist/gl-matrix.js +++ b/dist/gl-matrix.js @@ -32,9 +32,7 @@ THE SOFTWARE. }((function () { 'use strict'; exports.__esModule = true; - exports.vec4 = exports.vec3 = exports.vec2 = exports.quat2 = exports.quat = exports.mat4 = exports.mat3 = exports.mat2d = exports.mat2 = exports.glMatrix = void 0; - - require("assemblyscript/std/portable"); + exports.vec4 = exports.vec3 = exports.vec2 = exports.quat2 = exports.quat = exports.mat4 = exports.mat3 = exports.mat2d = exports.mat2 = exports.glMatrix = void 0; /// var glMatrix = require("./common"); diff --git a/package.json b/package.json index 0bcb6785..f678afba 100644 --- a/package.json +++ b/package.json @@ -37,8 +37,8 @@ "build-dts": "tsc --declaration --emitDeclarationOnly --outFile ./dist/index.d.ts ./assembly/index.ts && node ./utils/bundle-dts.js && tsc --noEmit ./dist/index.d.ts", "build": "del dist && npm run update-license-version && npm run build-js && npm run build-umd && npm run build-esm && npm run build-cjs && npm run build-dts && node ./utils/build.js && npm run asbuild", "prepare": "npm run build", - "asbuild:untouched": "asc assembly/index.as.ts --target debug", - "asbuild:optimized": "asc assembly/index.as.ts --target release", + "asbuild:untouched": "asc assembly/index.ts --target debug", + "asbuild:optimized": "asc assembly/index.ts --target release", "asbuild": "npm run asbuild:untouched && npm run asbuild:optimized" }, "devDependencies": { diff --git a/utils/bundle-dts.js b/utils/bundle-dts.js index 82be43a4..d553064e 100644 --- a/utils/bundle-dts.js +++ b/utils/bundle-dts.js @@ -31,6 +31,9 @@ typings = typings.replace(/ *import.+from.*;/g, ""); // Replace declare module with exports typings = typings.replace(/declare module "([^"]+?)" {/g, "export module $1 {"); +// Remove module types for global +typings = typings.replace(/\n export type.*=.*;/g, ""); + // Add types typings = "\n" + sourceTypings.replace(/declare/g, "export") + "\n" + typings; @@ -40,9 +43,9 @@ typings = 'declare module "gl-matrix" {\n' + typings + "\n}"; // Place assemblyscript reference path to the top typings = typings.replace(/\n\n\/\/\/ /g, ""); -typings = ` -/// \n -${typings} -`; +typings = `/// \n${typings}`; + +// Retype parameters with global types +typings = typings.replace(/: [a-z0-9]+?\./g, ": "); fs.writeFileSync(sourcePath, typings, "utf-8"); From 28f978aae208232aa51a58535587387bee4ee3a2 Mon Sep 17 00:00:00 2001 From: Huguenin-Elie Steve Date: Tue, 30 Mar 2021 17:54:50 +0200 Subject: [PATCH 19/32] changetype is not implemented for TS compilation --- assembly/mat2.ts | 6 +++--- assembly/mat2d.ts | 6 +++--- assembly/mat3.ts | 6 +++--- assembly/mat4.ts | 6 +++--- assembly/quat.ts | 2 +- assembly/vec2.ts | 6 +++--- assembly/vec3.ts | 6 +++--- assembly/vec4.ts | 6 +++--- 8 files changed, 22 insertions(+), 22 deletions(-) diff --git a/assembly/mat2.ts b/assembly/mat2.ts index 3b8a30b9..528eba42 100644 --- a/assembly/mat2.ts +++ b/assembly/mat2.ts @@ -17,7 +17,7 @@ export type ReadonlyMat2 = IndexedCollection; * @returns {mat2} a new 2x2 matrix */ export function create(): mat2 { - let out: mat2 = changetype(new Float64Array(4)); + let out = new Float64Array(4); //if (glMatrix.ARRAY_TYPE != Float32Array) { out[1] = 0; out[2] = 0; @@ -34,7 +34,7 @@ export function create(): mat2 { * @returns {mat2} a new 2x2 matrix */ export function clone(a: ReadonlyMat2): mat2 { - let out: mat2 = changetype(new Float64Array(4)); + let out = new Float64Array(4); out[0] = a[0]; out[1] = a[1]; out[2] = a[2]; @@ -81,7 +81,7 @@ export function identity(out: mat2): mat2 { * @returns {mat2} out A new 2x2 matrix */ export function fromValues(m00: f64, m01: f64, m10: f64, m11: f64): mat2 { - let out: mat2 = changetype(new Float64Array(4)); + let out = new Float64Array(4); out[0] = m00; out[1] = m01; out[2] = m10; diff --git a/assembly/mat2d.ts b/assembly/mat2d.ts index 0651398d..1f5b3779 100644 --- a/assembly/mat2d.ts +++ b/assembly/mat2d.ts @@ -31,7 +31,7 @@ export type ReadonlyMat2d = IndexedCollection; * @returns {mat2d} a new 2x3 matrix */ export function create(): mat2d { - let out: mat2d = changetype(new Float64Array(6)); + let out = new Float64Array(6); //if (mat2d != Float32Array) { out[1] = 0; out[2] = 0; @@ -50,7 +50,7 @@ export function create(): mat2d { * @returns {mat2d} a new 2x3 matrix */ export function clone(a: ReadonlyMat2d): mat2d { - let out: mat2d = changetype(new Float64Array(6)); + let out = new Float64Array(6); out[0] = a[0]; out[1] = a[1]; out[2] = a[2]; @@ -105,7 +105,7 @@ export function identity(out: mat2d): mat2d { * @returns {mat2d} A new mat2d */ export function fromValues(a: f64, b: f64, c: f64, d: f64, tx: f64, ty: f64): mat2d { - let out: mat2d = changetype(new Float64Array(6)); + let out = new Float64Array(6); out[0] = a; out[1] = b; out[2] = c; diff --git a/assembly/mat3.ts b/assembly/mat3.ts index 1d55264c..9422b759 100644 --- a/assembly/mat3.ts +++ b/assembly/mat3.ts @@ -21,7 +21,7 @@ export type ReadonlyMat3 = IndexedCollection; * @returns {mat3} a new 3x3 matrix */ export function create(): mat3 { - let out = changetype(new Float64Array(9)); + let out = new Float64Array(9); //if (glMatrix.ARRAY_TYPE != Float32Array): mat3 { out[1] = 0; out[2] = 0; @@ -63,7 +63,7 @@ export function fromMat4(out: mat3, a: ReadonlyMat4): mat3 { * @returns {mat3} a new 3x3 matrix */ export function clone(a: ReadonlyMat3): mat3 { - let out = changetype(new Float64Array(9)); + let out = new Float64Array(9); out[0] = a[0]; out[1] = a[1]; out[2] = a[2]; @@ -111,7 +111,7 @@ export function copy(out: mat3, a: ReadonlyMat3): mat3 { * @returns {mat3} A new mat3 */ export function fromValues(m00: f64, m01: f64, m02: f64, m10: f64, m11: f64, m12: f64, m20: f64, m21: f64, m22: f64): mat3 { - let out = changetype(new Float64Array(9)); + let out = new Float64Array(9); out[0] = m00; out[1] = m01; out[2] = m02; diff --git a/assembly/mat4.ts b/assembly/mat4.ts index 5c81b60f..c7e256aa 100644 --- a/assembly/mat4.ts +++ b/assembly/mat4.ts @@ -32,7 +32,7 @@ export class Fov { * @returns {mat4} a new 4x4 matrix */ export function create(): mat4 { - let out = changetype(new Float64Array(16)); + let out = new Float64Array(16); //if (glMatrix.ARRAY_TYPE != Float32Array) { out[1] = 0; out[2] = 0; @@ -61,7 +61,7 @@ export function create(): mat4 { * @returns {mat4} a new 4x4 matrix */ export function clone(a: ReadonlyMat4): mat4 { - let out = changetype(new Float64Array(16)); + let out = new Float64Array(16); out[0] = a[0]; out[1] = a[1]; out[2] = a[2]; @@ -147,7 +147,7 @@ export function fromValues( m32: f64, m33: f64 ): mat4 { - let out = changetype(new Float64Array(16)); + let out = new Float64Array(16); out[0] = m00; out[1] = m01; out[2] = m02; diff --git a/assembly/quat.ts b/assembly/quat.ts index 4cce4070..28669e90 100644 --- a/assembly/quat.ts +++ b/assembly/quat.ts @@ -19,7 +19,7 @@ export type ReadonlyQuat = IndexedCollection; * @returns {quat} a new quaternion */ export function create(): quat { - let out = changetype(new Float64Array(4)); + let out = new Float64Array(4); //if (glMatrix.ARRAY_TYPE != Float32Array) { out[0] = 0; out[1] = 0; diff --git a/assembly/vec2.ts b/assembly/vec2.ts index a138991a..22b5094a 100644 --- a/assembly/vec2.ts +++ b/assembly/vec2.ts @@ -20,7 +20,7 @@ export type ReadonlyVec2 = IndexedCollection; * @returns {vec2} a new 2D vector */ export function create(): vec2 { - let out = changetype(new Float64Array(2)); + let out = new Float64Array(2); //if (glMatrix.ARRAY_TYPE != Float32Array) { out[0] = 0; out[1] = 0; @@ -35,7 +35,7 @@ export function create(): vec2 { * @returns {vec2} a new 2D vector */ export function clone(a: ReadonlyVec2): vec2 { - let out = changetype(new Float64Array(2)); + let out = new Float64Array(2); out[0] = a[0]; out[1] = a[1]; return out; @@ -49,7 +49,7 @@ export function clone(a: ReadonlyVec2): vec2 { * @returns {vec2} a new 2D vector */ export function fromValues(x: f64, y: f64): vec2 { - let out = changetype(new Float64Array(2)); + let out = new Float64Array(2); out[0] = x; out[1] = y; return out; diff --git a/assembly/vec3.ts b/assembly/vec3.ts index 895a36da..21d89fbd 100644 --- a/assembly/vec3.ts +++ b/assembly/vec3.ts @@ -19,7 +19,7 @@ export type ReadonlyVec3 = IndexedCollection; * @returns {vec3} a new 3D vector */ export function create(): vec3 { - let out = changetype(new Float64Array(3)); + let out = new Float64Array(3); //if (glMatrix.ARRAY_TYPE != Float32Array) { out[0] = 0; out[1] = 0; @@ -35,7 +35,7 @@ export function create(): vec3 { * @returns {vec3} a new 3D vector */ export function clone(a: ReadonlyVec3): vec3 { - var out = changetype(new Float64Array(3)); + var out = new Float64Array(3); out[0] = a[0]; out[1] = a[1]; out[2] = a[2]; @@ -64,7 +64,7 @@ export function length(a: ReadonlyVec3): f64 { * @returns {vec3} a new 3D vector */ export function fromValues(x: f64, y: f64, z: f64): vec3 { - let out = changetype(new Float64Array(3)); + let out = new Float64Array(3); out[0] = x; out[1] = y; out[2] = z; diff --git a/assembly/vec4.ts b/assembly/vec4.ts index 85382ab2..2ab9889d 100644 --- a/assembly/vec4.ts +++ b/assembly/vec4.ts @@ -17,7 +17,7 @@ export type ReadonlyVec4 = IndexedCollection; * @returns {vec4} a new 4D vector */ export function create(): vec4 { - let out = changetype(new Float64Array(4)); + let out = new Float64Array(4); //if (glMatrix.ARRAY_TYPE != Float32Array) { out[0] = 0; out[1] = 0; @@ -34,7 +34,7 @@ export function create(): vec4 { * @returns {vec4} a new 4D vector */ export function clone(a: ReadonlyVec4): vec4 { - let out = changetype(new Float64Array(4)); + let out = new Float64Array(4); out[0] = a[0]; out[1] = a[1]; out[2] = a[2]; @@ -52,7 +52,7 @@ export function clone(a: ReadonlyVec4): vec4 { * @returns {vec4} a new 4D vector */ export function fromValues(x: f64, y: f64, z: f64, w: f64): vec4 { - let out = changetype(new Float64Array(4)); + let out = new Float64Array(4); out[0] = x; out[1] = y; out[2] = z; From 07498917a5583fafd376c2a8b4ad51a7314d4ea1 Mon Sep 17 00:00:00 2001 From: Huguenin-Elie Steve Date: Tue, 30 Mar 2021 20:57:54 +0200 Subject: [PATCH 20/32] change MathUtil into JSMath and Maths namespaces --- assembly/common.ts | 4 +- assembly/imports.ts | 17 +- assembly/mat2.ts | 12 +- assembly/mat2d.ts | 16 +- assembly/mat3.ts | 22 +- assembly/mat4.ts | 58 +++--- assembly/mathutil.ts | 12 -- assembly/quat2.ts | 20 +- assembly/vec2.ts | 10 +- assembly/vec3.ts | 14 +- assembly/vec4.ts | 16 +- build/optimized.wat | 401 +++++++++++++++++++----------------- build/untouched.wat | 468 ++++++++++++++++++++++--------------------- 13 files changed, 555 insertions(+), 515 deletions(-) delete mode 100644 assembly/mathutil.ts diff --git a/assembly/common.ts b/assembly/common.ts index 7e304cfe..a7387e72 100644 --- a/assembly/common.ts +++ b/assembly/common.ts @@ -1,4 +1,4 @@ -import { MathUtil } from "./imports" +import { Maths } from "./imports"; /** * Common utilities @@ -41,5 +41,5 @@ export function toRadian(a: f64): f64 { * @returns {Boolean} True if the numbers are approximately equal, false otherwise. */ export function equals(a: f64, b: f64): bool { - return Math.abs(a - b) <= EPSILON * MathUtil.max(1.0, Math.abs(a), Math.abs(b)); + return Math.abs(a - b) <= EPSILON * Maths.max(1.0, Math.abs(a), Math.abs(b)); } diff --git a/assembly/imports.ts b/assembly/imports.ts index 3242bd5a..57e9119d 100644 --- a/assembly/imports.ts +++ b/assembly/imports.ts @@ -8,16 +8,23 @@ * JS Importations * @module glMatrix */ -export declare namespace MathUtil { - function min(a: i32, b: i32): i32; - - function max(a: f64, b: f64, c: f64): f64; - +export declare namespace JSMath { // @ts-ignore decorator @external("Math", "hypot") function hypot(a: f64, b: f64, c?: f64, d?: f64, e?: f64, f?: f64, g?: f64, h?: f64, i?: f64, j?: f64, k?: f64, l?: f64, m?: f64, n?: f64, o?: f64, p?: f64): f64; } +export namespace Maths { + export function min(a: i32, b: i32): i32 { + return a < b ? a : b; + } + + export function max(a: f64, b: f64, c: f64): f64 { + const q = Math.max(b, c) + return Math.max(a, q); + } +} + export interface IArguments { } diff --git a/assembly/mat2.ts b/assembly/mat2.ts index 528eba42..a8eaeb00 100644 --- a/assembly/mat2.ts +++ b/assembly/mat2.ts @@ -1,5 +1,5 @@ import * as glMatrix from "./common"; -import { IndexedCollection, MathUtil } from "./imports"; +import { IndexedCollection, JSMath, Maths } from "./imports"; import { ReadonlyVec2 } from "./vec2"; export type mat2 = IndexedCollection; @@ -313,7 +313,7 @@ export function str(a: ReadonlyMat2): string { * @returns {Number} Frobenius norm */ export function frob(a: ReadonlyMat2): f64 { - return MathUtil.hypot(a[0], a[1], a[2], a[3]); + return JSMath.hypot(a[0], a[1], a[2], a[3]); } /** @@ -394,13 +394,13 @@ export function equals(a: ReadonlyMat2, b: ReadonlyMat2): bool { b3 = b[3]; return ( Math.abs(a0 - b0) <= - glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a0), Math.abs(b0)) && + glMatrix.EPSILON * Maths.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= - glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a1), Math.abs(b1)) && + glMatrix.EPSILON * Maths.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= - glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a2), Math.abs(b2)) && + glMatrix.EPSILON * Maths.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= - glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a3), Math.abs(b3)) + glMatrix.EPSILON * Maths.max(1.0, Math.abs(a3), Math.abs(b3)) ); } diff --git a/assembly/mat2d.ts b/assembly/mat2d.ts index 1f5b3779..3a26e95c 100644 --- a/assembly/mat2d.ts +++ b/assembly/mat2d.ts @@ -1,5 +1,5 @@ import * as glMatrix from "./common"; -import { IndexedCollection, MathUtil } from "./imports"; +import { IndexedCollection, JSMath, Maths } from "./imports"; import { ReadonlyVec2 } from "./vec2"; export type mat2d = IndexedCollection; @@ -381,7 +381,7 @@ export function str(a: ReadonlyMat2d): string { * @returns {Number} Frobenius norm */ export function frob(a: ReadonlyMat2d): f64 { - return MathUtil.hypot(a[0], a[1], a[2], a[3], a[4], a[5], 1); + return JSMath.hypot(a[0], a[1], a[2], a[3], a[4], a[5], 1); } /** @@ -497,17 +497,17 @@ export function equals(a: ReadonlyMat2d, b: ReadonlyMat2d): bool { b5 = b[5]; return ( Math.abs(a0 - b0) <= - glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a0), Math.abs(b0)) && + glMatrix.EPSILON * Maths.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= - glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a1), Math.abs(b1)) && + glMatrix.EPSILON * Maths.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= - glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a2), Math.abs(b2)) && + glMatrix.EPSILON * Maths.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= - glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a3), Math.abs(b3)) && + glMatrix.EPSILON * Maths.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= - glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a4), Math.abs(b4)) && + glMatrix.EPSILON * Maths.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= - glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a5), Math.abs(b5)) + glMatrix.EPSILON * Maths.max(1.0, Math.abs(a5), Math.abs(b5)) ); } diff --git a/assembly/mat3.ts b/assembly/mat3.ts index 9422b759..48adc8fe 100644 --- a/assembly/mat3.ts +++ b/assembly/mat3.ts @@ -1,5 +1,5 @@ import * as glMatrix from "./common"; -import { IndexedCollection, MathUtil } from "./imports"; +import { IndexedCollection, JSMath, Maths } from "./imports"; import { ReadonlyMat2 } from "./mat2"; import { ReadonlyMat4 } from "./mat4"; import { ReadonlyVec2 } from "./vec2"; @@ -704,7 +704,7 @@ export function str(a: ReadonlyMat3): string { * @returns {Number} Frobenius norm */ export function frob(a: ReadonlyMat3): f64 { - return MathUtil.hypot(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8]); + return JSMath.hypot(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8]); } /** @@ -841,23 +841,23 @@ export function equals(a: ReadonlyMat3, b: ReadonlyMat3): bool { b8 = b[8]; return ( Math.abs(a0 - b0) <= - glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a0), Math.abs(b0)) && + glMatrix.EPSILON * Maths.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= - glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a1), Math.abs(b1)) && + glMatrix.EPSILON * Maths.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= - glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a2), Math.abs(b2)) && + glMatrix.EPSILON * Maths.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= - glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a3), Math.abs(b3)) && + glMatrix.EPSILON * Maths.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= - glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a4), Math.abs(b4)) && + glMatrix.EPSILON * Maths.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= - glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a5), Math.abs(b5)) && + glMatrix.EPSILON * Maths.max(1.0, Math.abs(a5), Math.abs(b5)) && Math.abs(a6 - b6) <= - glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a6), Math.abs(b6)) && + glMatrix.EPSILON * Maths.max(1.0, Math.abs(a6), Math.abs(b6)) && Math.abs(a7 - b7) <= - glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a7), Math.abs(b7)) && + glMatrix.EPSILON * Maths.max(1.0, Math.abs(a7), Math.abs(b7)) && Math.abs(a8 - b8) <= - glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a8), Math.abs(b8)) + glMatrix.EPSILON * Maths.max(1.0, Math.abs(a8), Math.abs(b8)) ); } diff --git a/assembly/mat4.ts b/assembly/mat4.ts index c7e256aa..bf145a53 100644 --- a/assembly/mat4.ts +++ b/assembly/mat4.ts @@ -1,5 +1,5 @@ import * as glMatrix from "./common"; -import { IndexedCollection, MathUtil } from "./imports"; +import { IndexedCollection, JSMath, Maths } from "./imports"; import * as quat from "./quat"; import { ReadonlyQuat2 } from "./quat2"; import * as vec3 from "./vec3"; @@ -634,7 +634,7 @@ export function rotate(out: mat4, a: ReadonlyMat4, rad: f64, axis: vec3.Readonly let x = axis[0], y = axis[1], z = axis[2]; - let len = MathUtil.hypot(x, y, z); + let len = JSMath.hypot(x, y, z); let s: f64, c: f64, t: f64; let a00: f64, a01: f64, a02: f64, a03: f64; let a10: f64, a11: f64, a12: f64, a13: f64; @@ -914,7 +914,7 @@ export function fromRotation(out: mat4, rad: f64, axis: vec3.ReadonlyVec3): mat4 let x = axis[0], y = axis[1], z = axis[2]; - let len = MathUtil.hypot(x, y, z); + let len = JSMath.hypot(x, y, z); let s: f64, c: f64, t: f64; if (len < glMatrix.EPSILON) { @@ -1181,9 +1181,9 @@ export function getScaling(out: mat4, mat: ReadonlyMat4): mat4 { let m32 = mat[9]; let m33 = mat[10]; - out[0] = MathUtil.hypot(m11, m12, m13); - out[1] = MathUtil.hypot(m21, m22, m23); - out[2] = MathUtil.hypot(m31, m32, m33); + out[0] = JSMath.hypot(m11, m12, m13); + out[1] = JSMath.hypot(m21, m22, m23); + out[2] = JSMath.hypot(m31, m32, m33); return out; } @@ -1271,9 +1271,9 @@ export function decompose(out_r: quat.quat, out_t: vec3.vec3, out_s: vec3.vec3, let m32 = mat[9]; let m33 = mat[10]; - out_s[0] = MathUtil.hypot(m11, m12, m13); - out_s[1] = MathUtil.hypot(m21, m22, m23); - out_s[2] = MathUtil.hypot(m31, m32, m33); + out_s[0] = JSMath.hypot(m11, m12, m13); + out_s[1] = JSMath.hypot(m21, m22, m23); + out_s[2] = JSMath.hypot(m31, m32, m33); let is1 = 1 / out_s[0]; let is2 = 1 / out_s[1]; @@ -1786,7 +1786,7 @@ export function lookAt(out: mat4, eye: vec3.ReadonlyVec3, center: vec3.ReadonlyV z1 = eyey - centery; z2 = eyez - centerz; - len = 1 / MathUtil.hypot(z0, z1, z2); + len = 1 / JSMath.hypot(z0, z1, z2); z0 *= len; z1 *= len; z2 *= len; @@ -1794,7 +1794,7 @@ export function lookAt(out: mat4, eye: vec3.ReadonlyVec3, center: vec3.ReadonlyV x0 = upy * z2 - upz * z1; x1 = upz * z0 - upx * z2; x2 = upx * z1 - upy * z0; - len = MathUtil.hypot(x0, x1, x2); + len = JSMath.hypot(x0, x1, x2); if (!len) { x0 = 0; x1 = 0; @@ -1810,7 +1810,7 @@ export function lookAt(out: mat4, eye: vec3.ReadonlyVec3, center: vec3.ReadonlyV y1 = z2 * x0 - z0 * x2; y2 = z0 * x1 - z1 * x0; - len = MathUtil.hypot(y0, y1, y2); + len = JSMath.hypot(y0, y1, y2); if (!len) { y0 = 0; y1 = 0; @@ -1953,7 +1953,7 @@ export function str(a: ReadonlyMat4): string { * @returns {Number} Frobenius norm */ export function frob(a: ReadonlyMat4): f64 { - return MathUtil.hypot( + return JSMath.hypot( a[0], a[1], a[2], @@ -2158,37 +2158,37 @@ export function equals(a: ReadonlyMat4, b: ReadonlyMat4): bool { return ( Math.abs(a0 - b0) <= - glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a0), Math.abs(b0)) && + glMatrix.EPSILON * Maths.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= - glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a1), Math.abs(b1)) && + glMatrix.EPSILON * Maths.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= - glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a2), Math.abs(b2)) && + glMatrix.EPSILON * Maths.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= - glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a3), Math.abs(b3)) && + glMatrix.EPSILON * Maths.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= - glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a4), Math.abs(b4)) && + glMatrix.EPSILON * Maths.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= - glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a5), Math.abs(b5)) && + glMatrix.EPSILON * Maths.max(1.0, Math.abs(a5), Math.abs(b5)) && Math.abs(a6 - b6) <= - glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a6), Math.abs(b6)) && + glMatrix.EPSILON * Maths.max(1.0, Math.abs(a6), Math.abs(b6)) && Math.abs(a7 - b7) <= - glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a7), Math.abs(b7)) && + glMatrix.EPSILON * Maths.max(1.0, Math.abs(a7), Math.abs(b7)) && Math.abs(a8 - b8) <= - glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a8), Math.abs(b8)) && + glMatrix.EPSILON * Maths.max(1.0, Math.abs(a8), Math.abs(b8)) && Math.abs(a9 - b9) <= - glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a9), Math.abs(b9)) && + glMatrix.EPSILON * Maths.max(1.0, Math.abs(a9), Math.abs(b9)) && Math.abs(a10 - b10) <= - glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a10), Math.abs(b10)) && + glMatrix.EPSILON * Maths.max(1.0, Math.abs(a10), Math.abs(b10)) && Math.abs(a11 - b11) <= - glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a11), Math.abs(b11)) && + glMatrix.EPSILON * Maths.max(1.0, Math.abs(a11), Math.abs(b11)) && Math.abs(a12 - b12) <= - glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a12), Math.abs(b12)) && + glMatrix.EPSILON * Maths.max(1.0, Math.abs(a12), Math.abs(b12)) && Math.abs(a13 - b13) <= - glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a13), Math.abs(b13)) && + glMatrix.EPSILON * Maths.max(1.0, Math.abs(a13), Math.abs(b13)) && Math.abs(a14 - b14) <= - glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a14), Math.abs(b14)) && + glMatrix.EPSILON * Maths.max(1.0, Math.abs(a14), Math.abs(b14)) && Math.abs(a15 - b15) <= - glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a15), Math.abs(b15)) + glMatrix.EPSILON * Maths.max(1.0, Math.abs(a15), Math.abs(b15)) ); } diff --git a/assembly/mathutil.ts b/assembly/mathutil.ts deleted file mode 100644 index ee9afc96..00000000 --- a/assembly/mathutil.ts +++ /dev/null @@ -1,12 +0,0 @@ -/// - -export namespace MathUtil { - function min(a: i32, b: i32): i32 { - return a < b ? a : b; - } - - function max(a: f64, b: f64, c: f64): f64 { - const q = Math.max(b, c) - return Math.max(a, q); - } -} diff --git a/assembly/quat2.ts b/assembly/quat2.ts index 6aa9aeeb..091e1b95 100644 --- a/assembly/quat2.ts +++ b/assembly/quat2.ts @@ -1,5 +1,5 @@ import * as glMatrix from "./common"; -import { IndexedCollection, MathUtil } from "./imports"; +import { IndexedCollection, JSMath, Maths } from "./imports"; import * as mat4 from "./mat4"; import * as quat from "./quat"; import * as vec3 from "./vec3"; @@ -543,7 +543,7 @@ export function rotateAroundAxis(out: quat2, a: ReadonlyQuat2, axis: vec3.Readon if (Math.abs(rad) < glMatrix.EPSILON) { return copy(out, a); } - let axisLength = MathUtil.hypot(axis[0], axis[1], axis[2]); + let axisLength = JSMath.hypot(axis[0], axis[1], axis[2]); rad = rad * 0.5; let s = Math.sin(rad); @@ -907,20 +907,20 @@ export function equals(a: ReadonlyQuat2, b: ReadonlyQuat2): bool { b7 = b[7]; return ( Math.abs(a0 - b0) <= - glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a0), Math.abs(b0)) && + glMatrix.EPSILON * Maths.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= - glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a1), Math.abs(b1)) && + glMatrix.EPSILON * Maths.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= - glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a2), Math.abs(b2)) && + glMatrix.EPSILON * Maths.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= - glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a3), Math.abs(b3)) && + glMatrix.EPSILON * Maths.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= - glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a4), Math.abs(b4)) && + glMatrix.EPSILON * Maths.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= - glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a5), Math.abs(b5)) && + glMatrix.EPSILON * Maths.max(1.0, Math.abs(a5), Math.abs(b5)) && Math.abs(a6 - b6) <= - glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a6), Math.abs(b6)) && + glMatrix.EPSILON * Maths.max(1.0, Math.abs(a6), Math.abs(b6)) && Math.abs(a7 - b7) <= - glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a7), Math.abs(b7)) + glMatrix.EPSILON * Maths.max(1.0, Math.abs(a7), Math.abs(b7)) ); } diff --git a/assembly/vec2.ts b/assembly/vec2.ts index 22b5094a..5985aaf7 100644 --- a/assembly/vec2.ts +++ b/assembly/vec2.ts @@ -1,5 +1,5 @@ import * as glMatrix from "./common"; -import { IArguments, IndexedCollection, MathUtil } from "./imports"; +import { IArguments, IndexedCollection, JSMath, Maths } from "./imports"; import { ReadonlyMat2 } from "./mat2"; import { ReadonlyMat2d } from "./mat2d"; import { ReadonlyMat3 } from "./mat3"; @@ -244,7 +244,7 @@ export function scaleAndAdd(out: vec2, a: ReadonlyVec2, b: ReadonlyVec2, scale: export function distance(a: ReadonlyVec2, b: ReadonlyVec2): f64 { var x = b[0] - a[0], y = b[1] - a[1]; - return MathUtil.hypot(x, y); + return JSMath.hypot(x, y); } /** @@ -544,9 +544,9 @@ export function equals(a: ReadonlyVec2, b: ReadonlyVec2): bool { b1 = b[1]; return ( Math.abs(a0 - b0) <= - glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a0), Math.abs(b0)) && + glMatrix.EPSILON * Maths.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= - glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a1), Math.abs(b1)) + glMatrix.EPSILON * Maths.max(1.0, Math.abs(a1), Math.abs(b1)) ); } @@ -618,7 +618,7 @@ export const forEach = ((): (a: vec2, stride: i32, offset: i32, count: i32, fn: } if (count) { - l = MathUtil.min(count * stride + offset, a.length); + l = Maths.min(count * stride + offset, a.length); } else { l = a.length; } diff --git a/assembly/vec3.ts b/assembly/vec3.ts index 21d89fbd..43dc4b27 100644 --- a/assembly/vec3.ts +++ b/assembly/vec3.ts @@ -1,5 +1,5 @@ import * as glMatrix from "./common"; -import { IArguments, IndexedCollection, MathUtil } from "./imports"; +import { IArguments, IndexedCollection, JSMath, Maths } from "./imports"; import { ReadonlyMat3 } from "./mat3"; import { ReadonlyMat4 } from "./mat4"; import { ReadonlyQuat } from "./quat"; @@ -52,7 +52,7 @@ export function length(a: ReadonlyVec3): f64 { let x = a[0]; let y = a[1]; let z = a[2]; - return MathUtil.hypot(x, y, z); + return JSMath.hypot(x, y, z); } /** @@ -275,7 +275,7 @@ export function distance(a: ReadonlyVec3, b: ReadonlyVec3): f64 { let x = b[0] - a[0]; let y = b[1] - a[1]; let z = b[2] - a[2]; - return MathUtil.hypot(x, y, z); + return JSMath.hypot(x, y, z); } /** @@ -740,11 +740,11 @@ export function equals(a: ReadonlyVec3, b: ReadonlyVec3): bool { b2 = b[2]; return ( Math.abs(a0 - b0) <= - glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a0), Math.abs(b0)) && + glMatrix.EPSILON * Maths.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= - glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a1), Math.abs(b1)) && + glMatrix.EPSILON * Maths.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= - glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a2), Math.abs(b2)) + glMatrix.EPSILON * Maths.max(1.0, Math.abs(a2), Math.abs(b2)) ); } @@ -816,7 +816,7 @@ export const forEach = ((): (a: vec3, stride: i32, offset: i32, count: i32, fn: } if (count) { - l = MathUtil.min(count * stride + offset, a.length); + l = Maths.min(count * stride + offset, a.length); } else { l = a.length; } diff --git a/assembly/vec4.ts b/assembly/vec4.ts index 2ab9889d..f59ad8c3 100644 --- a/assembly/vec4.ts +++ b/assembly/vec4.ts @@ -1,5 +1,5 @@ import * as glMatrix from "./common"; -import { IArguments, IndexedCollection, MathUtil } from "./imports"; +import { IArguments, IndexedCollection, JSMath, Maths } from "./imports"; import { ReadonlyQuat } from "./quat"; export type vec4 = IndexedCollection; @@ -279,7 +279,7 @@ export function distance(a: ReadonlyVec4, b: ReadonlyVec4): f64 { let y = b[1] - a[1]; let z = b[2] - a[2]; let w = b[3] - a[3]; - return MathUtil.hypot(x, y, z, w); + return JSMath.hypot(x, y, z, w); } /** @@ -308,7 +308,7 @@ export function length(a: ReadonlyVec4): f64 { let y = a[1]; let z = a[2]; let w = a[3]; - return MathUtil.hypot(x, y, z, w); + return JSMath.hypot(x, y, z, w); } /** @@ -577,13 +577,13 @@ export function equals(a: ReadonlyVec4, b: ReadonlyVec4): bool { b3 = b[3]; return ( Math.abs(a0 - b0) <= - glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a0), Math.abs(b0)) && + glMatrix.EPSILON * Maths.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= - glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a1), Math.abs(b1)) && + glMatrix.EPSILON * Maths.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= - glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a2), Math.abs(b2)) && + glMatrix.EPSILON * Maths.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= - glMatrix.EPSILON * MathUtil.max(1.0, Math.abs(a3), Math.abs(b3)) + glMatrix.EPSILON * Maths.max(1.0, Math.abs(a3), Math.abs(b3)) ); } @@ -655,7 +655,7 @@ export const forEach = ((): (a: vec4, stride: i32, offset: i32, count: i32, fn: } if (count) { - l = MathUtil.min(count * stride + offset, a.length); + l = Maths.min(count * stride + offset, a.length); } else { l = a.length; } diff --git a/build/optimized.wat b/build/optimized.wat index ffe358b0..95c84ebf 100644 --- a/build/optimized.wat +++ b/build/optimized.wat @@ -44,13 +44,10 @@ (type $f64_f64_f64_f64_f64_f64_f64_f64_f64_=>_i32 (func (param f64 f64 f64 f64 f64 f64 f64 f64 f64) (result i32))) (type $f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_=>_i32 (func (param f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64) (result i32))) (type $f64_f64_i32_=>_f64 (func (param f64 f64 i32) (result f64))) - (type $f64_f64_f64_=>_f64 (func (param f64 f64 f64) (result f64))) (type $f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_=>_f64 (func (param f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64) (result f64))) (import "env" "seed" (func $~lib/builtins/seed (result f64))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) - (import "Math" "hypot" (func $assembly/imports/MathUtil.hypot (param f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64) (result f64))) - (import "imports" "MathUtil.min" (func $assembly/imports/MathUtil.min (param i32 i32) (result i32))) - (import "imports" "MathUtil.max" (func $assembly/imports/MathUtil.max (param f64 f64 f64) (result f64))) + (import "Math" "hypot" (func $assembly/imports/JSMath.hypot (param f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64) (result f64))) (memory $0 1) (data (i32.const 1036) "\1c") (data (i32.const 1048) "\03\00\00\00\08\00\00\00\01") @@ -1178,7 +1175,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/MathUtil.hypot + call $assembly/imports/JSMath.hypot ) (func $assembly/vec3/squaredDistance (param $0 i32) (param $1 i32) (result f64) (local $2 f64) @@ -1238,7 +1235,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/MathUtil.hypot + call $assembly/imports/JSMath.hypot ) (func $assembly/vec3/squaredLength (param $0 i32) (result f64) (local $1 f64) @@ -1495,29 +1492,34 @@ local.tee $2 i32.const 256 i32.lt_u - if + if (result i32) local.get $2 i32.const 4 i32.shr_u - local.set $3 else - local.get $2 i32.const 31 local.get $2 + i32.const 1073741820 + local.get $2 + i32.const 1073741820 + i32.lt_u + select + local.tee $3 i32.clz i32.sub local.tee $2 + i32.const 7 + i32.sub + local.set $4 + local.get $3 + local.get $2 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor - local.set $3 - local.get $2 - i32.const 7 - i32.sub - local.set $4 end + local.set $3 local.get $1 i32.load offset=8 local.set $2 @@ -1598,11 +1600,9 @@ (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) local.get $1 i32.load - local.set $4 + local.set $3 local.get $1 i32.const 4 i32.add @@ -1611,15 +1611,17 @@ i32.const -4 i32.and i32.add - local.tee $5 + local.tee $4 i32.load local.tee $2 i32.const 1 i32.and if + local.get $0 local.get $4 - i32.const -4 - i32.and + call $~lib/rt/tlsf/removeBlock + local.get $1 + local.get $3 i32.const 4 i32.add local.get $2 @@ -1627,34 +1629,20 @@ i32.and i32.add local.tee $3 - i32.const 1073741820 - i32.lt_u - if - local.get $0 - local.get $5 - call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $3 - local.get $4 - i32.const 3 - i32.and - i32.or - local.tee $4 - i32.store - local.get $1 - i32.const 4 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $5 - i32.load - local.set $2 - end + i32.store + local.get $1 + i32.const 4 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.tee $4 + i32.load + local.set $2 end - local.get $4 + local.get $3 i32.const 2 i32.and if @@ -1662,78 +1650,69 @@ i32.const 4 i32.sub i32.load - local.tee $3 + local.tee $1 i32.load - local.tee $7 - i32.const -4 - i32.and + local.set $6 + local.get $0 + local.get $1 + call $~lib/rt/tlsf/removeBlock + local.get $1 + local.get $6 i32.const 4 i32.add - local.get $4 + local.get $3 i32.const -4 i32.and i32.add - local.tee $8 - i32.const 1073741820 - i32.lt_u - if - local.get $0 - local.get $3 - call $~lib/rt/tlsf/removeBlock - local.get $3 - local.get $8 - local.get $7 - i32.const 3 - i32.and - i32.or - local.tee $4 - i32.store - local.get $3 - local.set $1 - end + local.tee $3 + i32.store end - local.get $5 + local.get $4 local.get $2 i32.const 2 i32.or i32.store - local.get $5 + local.get $4 i32.const 4 i32.sub local.get $1 i32.store - local.get $4 + local.get $0 + local.get $3 i32.const -4 i32.and local.tee $3 i32.const 256 i32.lt_u - if + if (result i32) local.get $3 i32.const 4 i32.shr_u - local.set $3 else - local.get $3 i32.const 31 local.get $3 + i32.const 1073741820 + local.get $3 + i32.const 1073741820 + i32.lt_u + select + local.tee $3 i32.clz i32.sub local.tee $4 + i32.const 7 + i32.sub + local.set $5 + local.get $3 + local.get $4 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor - local.set $3 - local.get $4 - i32.const 7 - i32.sub - local.set $6 end - local.get $0 - local.get $3 - local.get $6 + local.tee $3 + local.get $5 i32.const 4 i32.shl i32.add @@ -1756,7 +1735,7 @@ end local.get $0 local.get $3 - local.get $6 + local.get $5 i32.const 4 i32.shl i32.add @@ -1769,12 +1748,12 @@ local.get $0 i32.load i32.const 1 - local.get $6 + local.get $5 i32.shl i32.or i32.store local.get $0 - local.get $6 + local.get $5 i32.const 2 i32.shl i32.add @@ -2520,7 +2499,7 @@ if i32.const 1648 i32.const 1920 - i32.const 462 + i32.const 458 i32.const 30 call $~lib/builtins/abort unreachable @@ -2950,7 +2929,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/MathUtil.hypot + call $assembly/imports/JSMath.hypot ) (func $assembly/vec4/squaredDistance (param $0 i32) (param $1 i32) (result f64) (local $2 f64) @@ -3023,7 +3002,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/MathUtil.hypot + call $assembly/imports/JSMath.hypot ) (func $assembly/vec4/squaredLength (param $0 i32) (result f64) (local $1 f64) @@ -7489,7 +7468,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/MathUtil.hypot + call $assembly/imports/JSMath.hypot ) (func $assembly/vec2/squaredDistance (param $0 i32) (param $1 i32) (result f64) (local $2 f64) @@ -7632,7 +7611,8 @@ f64.abs local.get $1 f64.abs - call $assembly/imports/MathUtil.max + f64.max + f64.max f64.const 1e-06 f64.mul f64.le @@ -10376,7 +10356,8 @@ f64.abs local.get $11 f64.abs - call $assembly/imports/MathUtil.max + f64.max + f64.max f64.const 1e-06 f64.mul f64.le @@ -10390,7 +10371,8 @@ f64.abs local.get $12 f64.abs - call $assembly/imports/MathUtil.max + f64.max + f64.max f64.const 1e-06 f64.mul f64.le @@ -10407,7 +10389,8 @@ f64.abs local.get $13 f64.abs - call $assembly/imports/MathUtil.max + f64.max + f64.max f64.const 1e-06 f64.mul f64.le @@ -10424,7 +10407,8 @@ f64.abs local.get $14 f64.abs - call $assembly/imports/MathUtil.max + f64.max + f64.max f64.const 1e-06 f64.mul f64.le @@ -10441,7 +10425,8 @@ f64.abs local.get $15 f64.abs - call $assembly/imports/MathUtil.max + f64.max + f64.max f64.const 1e-06 f64.mul f64.le @@ -10458,7 +10443,8 @@ f64.abs local.get $16 f64.abs - call $assembly/imports/MathUtil.max + f64.max + f64.max f64.const 1e-06 f64.mul f64.le @@ -10475,7 +10461,8 @@ f64.abs local.get $17 f64.abs - call $assembly/imports/MathUtil.max + f64.max + f64.max f64.const 1e-06 f64.mul f64.le @@ -10492,7 +10479,8 @@ f64.abs local.get $18 f64.abs - call $assembly/imports/MathUtil.max + f64.max + f64.max f64.const 1e-06 f64.mul f64.le @@ -10509,7 +10497,8 @@ f64.abs local.get $19 f64.abs - call $assembly/imports/MathUtil.max + f64.max + f64.max f64.const 1e-06 f64.mul f64.le @@ -11804,7 +11793,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/MathUtil.hypot + call $assembly/imports/JSMath.hypot local.tee $5 f64.const 1e-06 f64.lt @@ -12396,7 +12385,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/MathUtil.hypot + call $assembly/imports/JSMath.hypot call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 @@ -12416,7 +12405,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/MathUtil.hypot + call $assembly/imports/JSMath.hypot call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 @@ -12436,7 +12425,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/MathUtil.hypot + call $assembly/imports/JSMath.hypot call $~lib/typedarray/Float64Array#__set local.get $0 ) @@ -12525,7 +12514,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/MathUtil.hypot + call $assembly/imports/JSMath.hypot call $~lib/typedarray/Float64Array#__set local.get $2 i32.const 1 @@ -12545,7 +12534,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/MathUtil.hypot + call $assembly/imports/JSMath.hypot call $~lib/typedarray/Float64Array#__set local.get $2 i32.const 2 @@ -12565,7 +12554,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/MathUtil.hypot + call $assembly/imports/JSMath.hypot call $~lib/typedarray/Float64Array#__set f64.const 1 local.get $2 @@ -13168,7 +13157,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/MathUtil.hypot + call $assembly/imports/JSMath.hypot f64.div local.set $4 local.get $11 @@ -13217,7 +13206,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/MathUtil.hypot + call $assembly/imports/JSMath.hypot local.tee $5 i64.reinterpret_f64 i64.const 1 @@ -13286,7 +13275,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/MathUtil.hypot + call $assembly/imports/JSMath.hypot local.tee $10 i64.reinterpret_f64 i64.const 1 @@ -13806,7 +13795,8 @@ f64.abs local.get $18 f64.abs - call $assembly/imports/MathUtil.max + f64.max + f64.max f64.const 1e-06 f64.mul f64.le @@ -13820,7 +13810,8 @@ f64.abs local.get $19 f64.abs - call $assembly/imports/MathUtil.max + f64.max + f64.max f64.const 1e-06 f64.mul f64.le @@ -13837,7 +13828,8 @@ f64.abs local.get $20 f64.abs - call $assembly/imports/MathUtil.max + f64.max + f64.max f64.const 1e-06 f64.mul f64.le @@ -13854,7 +13846,8 @@ f64.abs local.get $21 f64.abs - call $assembly/imports/MathUtil.max + f64.max + f64.max f64.const 1e-06 f64.mul f64.le @@ -13871,7 +13864,8 @@ f64.abs local.get $22 f64.abs - call $assembly/imports/MathUtil.max + f64.max + f64.max f64.const 1e-06 f64.mul f64.le @@ -13888,7 +13882,8 @@ f64.abs local.get $23 f64.abs - call $assembly/imports/MathUtil.max + f64.max + f64.max f64.const 1e-06 f64.mul f64.le @@ -13905,7 +13900,8 @@ f64.abs local.get $24 f64.abs - call $assembly/imports/MathUtil.max + f64.max + f64.max f64.const 1e-06 f64.mul f64.le @@ -13922,7 +13918,8 @@ f64.abs local.get $25 f64.abs - call $assembly/imports/MathUtil.max + f64.max + f64.max f64.const 1e-06 f64.mul f64.le @@ -13939,7 +13936,8 @@ f64.abs local.get $26 f64.abs - call $assembly/imports/MathUtil.max + f64.max + f64.max f64.const 1e-06 f64.mul f64.le @@ -13956,7 +13954,8 @@ f64.abs local.get $27 f64.abs - call $assembly/imports/MathUtil.max + f64.max + f64.max f64.const 1e-06 f64.mul f64.le @@ -13973,7 +13972,8 @@ f64.abs local.get $28 f64.abs - call $assembly/imports/MathUtil.max + f64.max + f64.max f64.const 1e-06 f64.mul f64.le @@ -13990,7 +13990,8 @@ f64.abs local.get $29 f64.abs - call $assembly/imports/MathUtil.max + f64.max + f64.max f64.const 1e-06 f64.mul f64.le @@ -14007,7 +14008,8 @@ f64.abs local.get $30 f64.abs - call $assembly/imports/MathUtil.max + f64.max + f64.max f64.const 1e-06 f64.mul f64.le @@ -14024,7 +14026,8 @@ f64.abs local.get $31 f64.abs - call $assembly/imports/MathUtil.max + f64.max + f64.max f64.const 1e-06 f64.mul f64.le @@ -14041,7 +14044,8 @@ f64.abs local.get $32 f64.abs - call $assembly/imports/MathUtil.max + f64.max + f64.max f64.const 1e-06 f64.mul f64.le @@ -14058,7 +14062,8 @@ f64.abs local.get $33 f64.abs - call $assembly/imports/MathUtil.max + f64.max + f64.max f64.const 1e-06 f64.mul f64.le @@ -15528,7 +15533,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/MathUtil.hypot + call $assembly/imports/JSMath.hypot local.set $4 local.get $3 f64.const 0.5 @@ -16110,11 +16115,16 @@ local.get $6 i32.mul i32.add + local.tee $1 local.get $0 i32.load offset=8 i32.const 3 i32.shr_u - call $assembly/imports/MathUtil.min + local.tee $3 + local.get $1 + local.get $3 + i32.lt_s + select else local.get $0 i32.load offset=8 @@ -16263,11 +16273,16 @@ local.get $6 i32.mul i32.add + local.tee $1 local.get $0 i32.load offset=8 i32.const 3 i32.shr_u - call $assembly/imports/MathUtil.min + local.tee $3 + local.get $1 + local.get $3 + i32.lt_s + select else local.get $0 i32.load offset=8 @@ -16822,11 +16837,16 @@ local.get $6 i32.mul i32.add + local.tee $1 local.get $0 i32.load offset=8 i32.const 3 i32.shr_u - call $assembly/imports/MathUtil.min + local.tee $3 + local.get $1 + local.get $3 + i32.lt_s + select else local.get $0 i32.load offset=8 @@ -21447,7 +21467,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/MathUtil.hypot + call $assembly/imports/JSMath.hypot global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -21734,6 +21754,10 @@ i32.const 3 call $~lib/typedarray/Float64Array#__get local.set $9 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer local.get $2 local.get $6 f64.sub @@ -21743,7 +21767,8 @@ f64.abs local.get $6 f64.abs - call $assembly/imports/MathUtil.max + f64.max + f64.max f64.const 1e-06 f64.mul f64.le @@ -21757,7 +21782,8 @@ f64.abs local.get $7 f64.abs - call $assembly/imports/MathUtil.max + f64.max + f64.max f64.const 1e-06 f64.mul f64.le @@ -21774,7 +21800,8 @@ f64.abs local.get $8 f64.abs - call $assembly/imports/MathUtil.max + f64.max + f64.max f64.const 1e-06 f64.mul f64.le @@ -21791,17 +21818,14 @@ f64.abs local.get $9 f64.abs - call $assembly/imports/MathUtil.max + f64.max + f64.max f64.const 1e-06 f64.mul f64.le else i32.const 0 end - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer ) (func $export:assembly/mat2/multiplyScalar (param $0 i32) (param $1 i32) (param $2 f64) (result i32) (local $3 i32) @@ -22959,7 +22983,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/MathUtil.hypot + call $assembly/imports/JSMath.hypot global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -23452,6 +23476,10 @@ i32.const 5 call $~lib/typedarray/Float64Array#__get local.set $13 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer local.get $2 local.get $8 f64.sub @@ -23461,7 +23489,8 @@ f64.abs local.get $8 f64.abs - call $assembly/imports/MathUtil.max + f64.max + f64.max f64.const 1e-06 f64.mul f64.le @@ -23475,7 +23504,8 @@ f64.abs local.get $9 f64.abs - call $assembly/imports/MathUtil.max + f64.max + f64.max f64.const 1e-06 f64.mul f64.le @@ -23492,7 +23522,8 @@ f64.abs local.get $10 f64.abs - call $assembly/imports/MathUtil.max + f64.max + f64.max f64.const 1e-06 f64.mul f64.le @@ -23509,7 +23540,8 @@ f64.abs local.get $11 f64.abs - call $assembly/imports/MathUtil.max + f64.max + f64.max f64.const 1e-06 f64.mul f64.le @@ -23526,7 +23558,8 @@ f64.abs local.get $12 f64.abs - call $assembly/imports/MathUtil.max + f64.max + f64.max f64.const 1e-06 f64.mul f64.le @@ -23543,17 +23576,14 @@ f64.abs local.get $13 f64.abs - call $assembly/imports/MathUtil.max + f64.max + f64.max f64.const 1e-06 f64.mul f64.le else i32.const 0 end - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer ) (func $export:assembly/mat3/fromMat4 (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -25627,7 +25657,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/MathUtil.hypot + call $assembly/imports/JSMath.hypot global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -28523,7 +28553,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/MathUtil.hypot + call $assembly/imports/JSMath.hypot local.tee $3 f64.const 1e-06 f64.lt @@ -30400,7 +30430,7 @@ local.get $0 i32.const 15 call $~lib/typedarray/Float64Array#__get - call $assembly/imports/MathUtil.hypot + call $assembly/imports/JSMath.hypot global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -35471,6 +35501,10 @@ i32.const 7 call $~lib/typedarray/Float64Array#__get local.set $17 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer local.get $2 local.get $10 f64.sub @@ -35480,7 +35514,8 @@ f64.abs local.get $10 f64.abs - call $assembly/imports/MathUtil.max + f64.max + f64.max f64.const 1e-06 f64.mul f64.le @@ -35494,7 +35529,8 @@ f64.abs local.get $11 f64.abs - call $assembly/imports/MathUtil.max + f64.max + f64.max f64.const 1e-06 f64.mul f64.le @@ -35511,7 +35547,8 @@ f64.abs local.get $12 f64.abs - call $assembly/imports/MathUtil.max + f64.max + f64.max f64.const 1e-06 f64.mul f64.le @@ -35528,7 +35565,8 @@ f64.abs local.get $13 f64.abs - call $assembly/imports/MathUtil.max + f64.max + f64.max f64.const 1e-06 f64.mul f64.le @@ -35545,7 +35583,8 @@ f64.abs local.get $14 f64.abs - call $assembly/imports/MathUtil.max + f64.max + f64.max f64.const 1e-06 f64.mul f64.le @@ -35562,7 +35601,8 @@ f64.abs local.get $15 f64.abs - call $assembly/imports/MathUtil.max + f64.max + f64.max f64.const 1e-06 f64.mul f64.le @@ -35579,7 +35619,8 @@ f64.abs local.get $16 f64.abs - call $assembly/imports/MathUtil.max + f64.max + f64.max f64.const 1e-06 f64.mul f64.le @@ -35596,17 +35637,14 @@ f64.abs local.get $17 f64.abs - call $assembly/imports/MathUtil.max + f64.max + f64.max f64.const 1e-06 f64.mul f64.le else i32.const 0 end - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer ) (func $export:assembly/vec2/clone (param $0 i32) (result i32) (local $1 i32) @@ -37486,6 +37524,10 @@ i32.const 1 call $~lib/typedarray/Float64Array#__get local.set $5 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer local.get $2 local.get $4 f64.sub @@ -37495,7 +37537,8 @@ f64.abs local.get $4 f64.abs - call $assembly/imports/MathUtil.max + f64.max + f64.max f64.const 1e-06 f64.mul f64.le @@ -37509,17 +37552,14 @@ f64.abs local.get $5 f64.abs - call $assembly/imports/MathUtil.max + f64.max + f64.max f64.const 1e-06 f64.mul f64.le else i32.const 0 end - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer ) (func $export:assembly/vec3/clone (param $0 i32) (result i32) (local $1 i32) @@ -40462,6 +40502,10 @@ i32.const 2 call $~lib/typedarray/Float64Array#__get local.set $7 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer local.get $2 local.get $5 f64.sub @@ -40471,7 +40515,8 @@ f64.abs local.get $5 f64.abs - call $assembly/imports/MathUtil.max + f64.max + f64.max f64.const 1e-06 f64.mul f64.le @@ -40485,7 +40530,8 @@ f64.abs local.get $6 f64.abs - call $assembly/imports/MathUtil.max + f64.max + f64.max f64.const 1e-06 f64.mul f64.le @@ -40502,17 +40548,14 @@ f64.abs local.get $7 f64.abs - call $assembly/imports/MathUtil.max + f64.max + f64.max f64.const 1e-06 f64.mul f64.le else i32.const 0 end - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer ) (func $export:assembly/vec4/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) diff --git a/build/untouched.wat b/build/untouched.wat index c5803ba0..877b321d 100644 --- a/build/untouched.wat +++ b/build/untouched.wat @@ -52,9 +52,7 @@ (type $f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_=>_f64 (func (param f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64) (result f64))) (import "env" "seed" (func $~lib/builtins/seed (result f64))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) - (import "Math" "hypot" (func $assembly/imports/MathUtil.hypot (param f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64) (result f64))) - (import "imports" "MathUtil.min" (func $assembly/imports/MathUtil.min (param i32 i32) (result i32))) - (import "imports" "MathUtil.max" (func $assembly/imports/MathUtil.max (param f64 f64 f64) (result f64))) + (import "Math" "hypot" (func $assembly/imports/JSMath.hypot (param f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64) (result f64))) (memory $0 1) (data (i32.const 12) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\18\00\00\00~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s\00\00\00\00\00") (data (i32.const 60) "\1c\00\00\00\00\00\00\00\00\00\00\00\03\00\00\00\08\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00") @@ -753,7 +751,7 @@ if i32.const 0 i32.const 32 - i32.const 1399 + i32.const 1417 i32.const 5 call $~lib/builtins/abort unreachable @@ -1191,7 +1189,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/MathUtil.hypot + call $assembly/imports/JSMath.hypot ) (func $assembly/vec3/squaredDistance (param $0 i32) (param $1 i32) (result f64) (local $2 f64) @@ -1265,7 +1263,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/MathUtil.hypot + call $assembly/imports/JSMath.hypot ) (func $assembly/vec3/squaredLength (param $0 i32) (result f64) (local $1 f64) @@ -1654,7 +1652,7 @@ if i32.const 0 i32.const 944 - i32.const 273 + i32.const 268 i32.const 14 call $~lib/builtins/abort unreachable @@ -1670,18 +1668,11 @@ local.get $3 i32.const 12 i32.ge_u - if (result i32) - local.get $3 - i32.const 1073741820 - i32.lt_u - else - i32.const 0 - end i32.eqz if i32.const 0 i32.const 944 - i32.const 275 + i32.const 270 i32.const 14 call $~lib/builtins/abort unreachable @@ -1697,12 +1688,21 @@ i32.shr_u local.set $5 else - i32.const 31 local.get $3 + local.tee $6 + i32.const 1073741820 + local.tee $7 + local.get $6 + local.get $7 + i32.lt_u + select + local.set $6 + i32.const 31 + local.get $6 i32.clz i32.sub local.set $4 - local.get $3 + local.get $6 local.get $4 i32.const 4 i32.sub @@ -1735,41 +1735,41 @@ if i32.const 0 i32.const 944 - i32.const 288 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 i32.load offset=4 - local.set $6 + local.set $8 local.get $1 i32.load offset=8 - local.set $7 - local.get $6 + local.set $9 + local.get $8 if - local.get $6 - local.get $7 + local.get $8 + local.get $9 call $~lib/rt/tlsf/Block#set:next end - local.get $7 + local.get $9 if - local.get $7 - local.get $6 + local.get $9 + local.get $8 call $~lib/rt/tlsf/Block#set:prev end local.get $1 local.get $0 local.set $10 local.get $4 - local.set $9 + local.set $6 local.get $5 - local.set $8 + local.set $7 local.get $10 - local.get $9 + local.get $6 i32.const 4 i32.shl - local.get $8 + local.get $7 i32.add i32.const 2 i32.shl @@ -1782,55 +1782,55 @@ local.get $4 local.set $10 local.get $5 - local.set $9 - local.get $7 - local.set $8 + local.set $6 + local.get $9 + local.set $7 local.get $11 local.get $10 i32.const 4 i32.shl - local.get $9 + local.get $6 i32.add i32.const 2 i32.shl i32.add - local.get $8 - i32.store offset=96 local.get $7 + i32.store offset=96 + local.get $9 i32.eqz if local.get $0 - local.set $9 + local.set $6 local.get $4 - local.set $8 - local.get $9 - local.get $8 + local.set $7 + local.get $6 + local.get $7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $9 + local.set $6 local.get $0 - local.set $8 + local.set $7 local.get $4 local.set $11 - local.get $9 + local.get $6 i32.const 1 local.get $5 i32.shl i32.const -1 i32.xor i32.and - local.tee $9 + local.tee $6 local.set $10 - local.get $8 + local.get $7 local.get $11 i32.const 2 i32.shl i32.add local.get $10 i32.store offset=4 - local.get $9 + local.get $6 i32.eqz if local.get $0 @@ -1909,86 +1909,73 @@ i32.const 1 i32.and if + local.get $0 + local.get $4 + call $~lib/rt/tlsf/removeBlock + local.get $1 local.get $2 + i32.const 4 + i32.add + local.get $5 i32.const 3 i32.const -1 i32.xor i32.and + i32.add + local.tee $2 + call $~lib/rt/common/BLOCK#set:mmInfo + local.get $1 + local.set $3 + local.get $3 i32.const 4 i32.add - local.get $5 + local.get $3 + i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $3 - local.get $3 - i32.const 1073741820 - i32.lt_u - if - local.get $0 - local.get $4 - call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 - i32.const 3 - i32.and - local.get $3 - i32.or - local.tee $2 - call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $6 - local.get $6 - i32.const 4 - i32.add - local.get $6 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - local.set $4 - local.get $4 - i32.load - local.set $5 - end + local.set $4 + local.get $4 + i32.load + local.set $5 end local.get $2 i32.const 2 i32.and if local.get $1 - local.set $6 - local.get $6 + local.set $3 + local.get $3 i32.const 4 i32.sub i32.load - local.set $6 - local.get $6 - i32.load local.set $3 + local.get $3 + i32.load + local.set $6 i32.const 1 drop - local.get $3 + local.get $6 i32.const 1 i32.and i32.eqz if i32.const 0 i32.const 944 - i32.const 224 + i32.const 221 i32.const 16 call $~lib/builtins/abort unreachable end + local.get $0 local.get $3 - i32.const 3 - i32.const -1 - i32.xor - i32.and + call $~lib/rt/tlsf/removeBlock + local.get $3 + local.set $1 + local.get $1 + local.get $6 i32.const 4 i32.add local.get $2 @@ -1997,25 +1984,8 @@ i32.xor i32.and i32.add - local.set $7 - local.get $7 - i32.const 1073741820 - i32.lt_u - if - local.get $0 - local.get $6 - call $~lib/rt/tlsf/removeBlock - local.get $6 - local.get $3 - i32.const 3 - i32.and - local.get $7 - i32.or - local.tee $2 - call $~lib/rt/common/BLOCK#set:mmInfo - local.get $6 - local.set $1 - end + local.tee $2 + call $~lib/rt/common/BLOCK#set:mmInfo end local.get $4 local.get $5 @@ -2027,24 +1997,17 @@ i32.const -1 i32.xor i32.and - local.set $8 + local.set $7 i32.const 1 drop - local.get $8 + local.get $7 i32.const 12 i32.ge_u - if (result i32) - local.get $8 - i32.const 1073741820 - i32.lt_u - else - i32.const 0 - end i32.eqz if i32.const 0 i32.const 944 - i32.const 239 + i32.const 233 i32.const 14 call $~lib/builtins/abort unreachable @@ -2054,7 +2017,7 @@ local.get $1 i32.const 4 i32.add - local.get $8 + local.get $7 i32.add local.get $4 i32.eq @@ -2062,7 +2025,7 @@ if i32.const 0 i32.const 944 - i32.const 240 + i32.const 234 i32.const 14 call $~lib/builtins/abort unreachable @@ -2072,24 +2035,33 @@ i32.sub local.get $1 i32.store - local.get $8 + local.get $7 i32.const 256 i32.lt_u if i32.const 0 - local.set $9 - local.get $8 + local.set $8 + local.get $7 i32.const 4 i32.shr_u - local.set $10 + local.set $9 else + local.get $7 + local.tee $3 + i32.const 1073741820 + local.tee $6 + local.get $3 + local.get $6 + i32.lt_u + select + local.set $3 i32.const 31 - local.get $8 + local.get $3 i32.clz i32.sub - local.set $9 + local.set $8 + local.get $3 local.get $8 - local.get $9 i32.const 4 i32.sub i32.shr_u @@ -2097,21 +2069,21 @@ i32.const 4 i32.shl i32.xor - local.set $10 - local.get $9 + local.set $9 + local.get $8 i32.const 8 i32.const 1 i32.sub i32.sub - local.set $9 + local.set $8 end i32.const 1 drop - local.get $9 + local.get $8 i32.const 23 i32.lt_u if (result i32) - local.get $10 + local.get $9 i32.const 16 i32.lt_u else @@ -2121,18 +2093,18 @@ if i32.const 0 i32.const 944 - i32.const 256 + i32.const 251 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $7 - local.get $9 + local.set $10 + local.get $8 local.set $3 - local.get $10 + local.get $9 local.set $6 - local.get $7 + local.get $10 local.get $3 i32.const 4 i32.shl @@ -2157,14 +2129,14 @@ end local.get $0 local.set $12 + local.get $8 + local.set $10 local.get $9 - local.set $7 - local.get $10 local.set $3 local.get $1 local.set $6 local.get $12 - local.get $7 + local.get $10 i32.const 4 i32.shl local.get $3 @@ -2178,17 +2150,17 @@ local.get $0 i32.load i32.const 1 - local.get $9 + local.get $8 i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap local.get $0 local.set $13 - local.get $9 + local.get $8 local.set $12 local.get $0 local.set $3 - local.get $9 + local.get $8 local.set $6 local.get $3 local.get $6 @@ -2197,16 +2169,16 @@ i32.add i32.load offset=4 i32.const 1 - local.get $10 + local.get $9 i32.shl i32.or - local.set $7 + local.set $10 local.get $13 local.get $12 i32.const 2 i32.shl i32.add - local.get $7 + local.get $10 i32.store offset=4 ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -2226,7 +2198,7 @@ if i32.const 0 i32.const 944 - i32.const 381 + i32.const 377 i32.const 14 call $~lib/builtins/abort unreachable @@ -2269,7 +2241,7 @@ if i32.const 0 i32.const 944 - i32.const 388 + i32.const 384 i32.const 16 call $~lib/builtins/abort unreachable @@ -2302,7 +2274,7 @@ if i32.const 0 i32.const 944 - i32.const 401 + i32.const 397 i32.const 5 call $~lib/builtins/abort unreachable @@ -2545,7 +2517,7 @@ if i32.const 0 i32.const 944 - i32.const 565 + i32.const 559 i32.const 3 call $~lib/builtins/abort unreachable @@ -2876,7 +2848,7 @@ if i32.const 672 i32.const 944 - i32.const 462 + i32.const 458 i32.const 30 call $~lib/builtins/abort unreachable @@ -2960,7 +2932,7 @@ if i32.const 0 i32.const 944 - i32.const 334 + i32.const 330 i32.const 14 call $~lib/builtins/abort unreachable @@ -3025,7 +2997,7 @@ if i32.const 0 i32.const 944 - i32.const 347 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable @@ -3176,7 +3148,7 @@ if i32.const 0 i32.const 944 - i32.const 361 + i32.const 357 i32.const 14 call $~lib/builtins/abort unreachable @@ -3285,7 +3257,7 @@ if i32.const 0 i32.const 944 - i32.const 500 + i32.const 496 i32.const 16 call $~lib/builtins/abort unreachable @@ -3305,7 +3277,7 @@ if i32.const 0 i32.const 944 - i32.const 502 + i32.const 498 i32.const 14 call $~lib/builtins/abort unreachable @@ -3701,6 +3673,16 @@ i32.const 3 i32.shr_u ) + (func $assembly/imports/Maths.min (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.lt_s + if (result i32) + local.get $0 + else + local.get $1 + end + ) (func $start:assembly/vec3~anonymous|0 (result i32) i32.const 1008 ) @@ -3913,7 +3895,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/MathUtil.hypot + call $assembly/imports/JSMath.hypot ) (func $assembly/vec4/squaredDistance (param $0 i32) (param $1 i32) (result f64) (local $2 f64) @@ -4005,7 +3987,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/MathUtil.hypot + call $assembly/imports/JSMath.hypot ) (func $assembly/vec4/squaredLength (param $0 i32) (result f64) (local $1 f64) @@ -9084,7 +9066,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/MathUtil.hypot + call $assembly/imports/JSMath.hypot ) (func $assembly/vec2/squaredDistance (param $0 i32) (param $1 i32) (result f64) (local $2 f64) @@ -9291,6 +9273,26 @@ global.get $assembly/common/degree f64.mul ) + (func $assembly/imports/Maths.max (param $0 f64) (param $1 f64) (param $2 f64) (result f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + local.get $1 + local.set $4 + local.get $2 + local.set $3 + local.get $4 + local.get $3 + f64.max + local.set $4 + local.get $0 + local.set $5 + local.get $4 + local.set $3 + local.get $5 + local.get $3 + f64.max + ) (func $assembly/common/equals (param $0 f64) (param $1 f64) (result i32) (local $2 f64) local.get $0 @@ -9309,7 +9311,7 @@ local.set $2 local.get $2 f64.abs - call $assembly/imports/MathUtil.max + call $assembly/imports/Maths.max f64.mul f64.le ) @@ -12472,7 +12474,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/MathUtil.hypot + call $assembly/imports/JSMath.hypot ) (func $~lib/rt/__newBuffer (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -12648,7 +12650,7 @@ local.set $10 local.get $10 f64.abs - call $assembly/imports/MathUtil.max + call $assembly/imports/Maths.max f64.mul f64.le if (result i32) @@ -12668,7 +12670,7 @@ local.set $10 local.get $10 f64.abs - call $assembly/imports/MathUtil.max + call $assembly/imports/Maths.max f64.mul f64.le else @@ -12691,7 +12693,7 @@ local.set $10 local.get $10 f64.abs - call $assembly/imports/MathUtil.max + call $assembly/imports/Maths.max f64.mul f64.le else @@ -12714,7 +12716,7 @@ local.set $10 local.get $10 f64.abs - call $assembly/imports/MathUtil.max + call $assembly/imports/Maths.max f64.mul f64.le else @@ -13402,7 +13404,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/MathUtil.hypot + call $assembly/imports/JSMath.hypot ) (func $assembly/mat2d/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 @@ -13735,7 +13737,7 @@ local.set $14 local.get $14 f64.abs - call $assembly/imports/MathUtil.max + call $assembly/imports/Maths.max f64.mul f64.le if (result i32) @@ -13755,7 +13757,7 @@ local.set $14 local.get $14 f64.abs - call $assembly/imports/MathUtil.max + call $assembly/imports/Maths.max f64.mul f64.le else @@ -13778,7 +13780,7 @@ local.set $14 local.get $14 f64.abs - call $assembly/imports/MathUtil.max + call $assembly/imports/Maths.max f64.mul f64.le else @@ -13801,7 +13803,7 @@ local.set $14 local.get $14 f64.abs - call $assembly/imports/MathUtil.max + call $assembly/imports/Maths.max f64.mul f64.le else @@ -13824,7 +13826,7 @@ local.set $14 local.get $14 f64.abs - call $assembly/imports/MathUtil.max + call $assembly/imports/Maths.max f64.mul f64.le else @@ -13847,7 +13849,7 @@ local.set $14 local.get $14 f64.abs - call $assembly/imports/MathUtil.max + call $assembly/imports/Maths.max f64.mul f64.le else @@ -15676,7 +15678,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/MathUtil.hypot + call $assembly/imports/JSMath.hypot ) (func $assembly/mat3/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 @@ -16162,7 +16164,7 @@ local.set $20 local.get $20 f64.abs - call $assembly/imports/MathUtil.max + call $assembly/imports/Maths.max f64.mul f64.le if (result i32) @@ -16182,7 +16184,7 @@ local.set $20 local.get $20 f64.abs - call $assembly/imports/MathUtil.max + call $assembly/imports/Maths.max f64.mul f64.le else @@ -16205,7 +16207,7 @@ local.set $20 local.get $20 f64.abs - call $assembly/imports/MathUtil.max + call $assembly/imports/Maths.max f64.mul f64.le else @@ -16228,7 +16230,7 @@ local.set $20 local.get $20 f64.abs - call $assembly/imports/MathUtil.max + call $assembly/imports/Maths.max f64.mul f64.le else @@ -16251,7 +16253,7 @@ local.set $20 local.get $20 f64.abs - call $assembly/imports/MathUtil.max + call $assembly/imports/Maths.max f64.mul f64.le else @@ -16274,7 +16276,7 @@ local.set $20 local.get $20 f64.abs - call $assembly/imports/MathUtil.max + call $assembly/imports/Maths.max f64.mul f64.le else @@ -16297,7 +16299,7 @@ local.set $20 local.get $20 f64.abs - call $assembly/imports/MathUtil.max + call $assembly/imports/Maths.max f64.mul f64.le else @@ -16320,7 +16322,7 @@ local.set $20 local.get $20 f64.abs - call $assembly/imports/MathUtil.max + call $assembly/imports/Maths.max f64.mul f64.le else @@ -16343,7 +16345,7 @@ local.set $20 local.get $20 f64.abs - call $assembly/imports/MathUtil.max + call $assembly/imports/Maths.max f64.mul f64.le else @@ -18416,7 +18418,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/MathUtil.hypot + call $assembly/imports/JSMath.hypot local.set $7 local.get $7 global.get $assembly/common/EPSILON @@ -19516,7 +19518,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/MathUtil.hypot + call $assembly/imports/JSMath.hypot local.set $6 local.get $6 global.get $assembly/common/EPSILON @@ -20173,7 +20175,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/MathUtil.hypot + call $assembly/imports/JSMath.hypot call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 @@ -20193,7 +20195,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/MathUtil.hypot + call $assembly/imports/JSMath.hypot call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 @@ -20213,7 +20215,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/MathUtil.hypot + call $assembly/imports/JSMath.hypot call $~lib/typedarray/Float64Array#__set local.get $0 ) @@ -20314,7 +20316,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/MathUtil.hypot + call $assembly/imports/JSMath.hypot call $~lib/typedarray/Float64Array#__set local.get $2 i32.const 1 @@ -20334,7 +20336,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/MathUtil.hypot + call $assembly/imports/JSMath.hypot call $~lib/typedarray/Float64Array#__set local.get $2 i32.const 2 @@ -20354,7 +20356,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/MathUtil.hypot + call $assembly/imports/JSMath.hypot call $~lib/typedarray/Float64Array#__set i32.const 1 f64.convert_i32_s @@ -21894,7 +21896,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/MathUtil.hypot + call $assembly/imports/JSMath.hypot f64.div local.set $13 local.get $10 @@ -21949,7 +21951,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/MathUtil.hypot + call $assembly/imports/JSMath.hypot local.set $13 local.get $13 i64.reinterpret_f64 @@ -22025,7 +22027,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/MathUtil.hypot + call $assembly/imports/JSMath.hypot local.set $13 local.get $13 i64.reinterpret_f64 @@ -22446,7 +22448,7 @@ local.get $0 i32.const 15 call $~lib/typedarray/Float64Array#__get - call $assembly/imports/MathUtil.hypot + call $assembly/imports/JSMath.hypot ) (func $assembly/mat4/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 @@ -23289,7 +23291,7 @@ local.set $34 local.get $34 f64.abs - call $assembly/imports/MathUtil.max + call $assembly/imports/Maths.max f64.mul f64.le if (result i32) @@ -23309,7 +23311,7 @@ local.set $34 local.get $34 f64.abs - call $assembly/imports/MathUtil.max + call $assembly/imports/Maths.max f64.mul f64.le else @@ -23332,7 +23334,7 @@ local.set $34 local.get $34 f64.abs - call $assembly/imports/MathUtil.max + call $assembly/imports/Maths.max f64.mul f64.le else @@ -23355,7 +23357,7 @@ local.set $34 local.get $34 f64.abs - call $assembly/imports/MathUtil.max + call $assembly/imports/Maths.max f64.mul f64.le else @@ -23378,7 +23380,7 @@ local.set $34 local.get $34 f64.abs - call $assembly/imports/MathUtil.max + call $assembly/imports/Maths.max f64.mul f64.le else @@ -23401,7 +23403,7 @@ local.set $34 local.get $34 f64.abs - call $assembly/imports/MathUtil.max + call $assembly/imports/Maths.max f64.mul f64.le else @@ -23424,7 +23426,7 @@ local.set $34 local.get $34 f64.abs - call $assembly/imports/MathUtil.max + call $assembly/imports/Maths.max f64.mul f64.le else @@ -23447,7 +23449,7 @@ local.set $34 local.get $34 f64.abs - call $assembly/imports/MathUtil.max + call $assembly/imports/Maths.max f64.mul f64.le else @@ -23470,7 +23472,7 @@ local.set $34 local.get $34 f64.abs - call $assembly/imports/MathUtil.max + call $assembly/imports/Maths.max f64.mul f64.le else @@ -23493,7 +23495,7 @@ local.set $34 local.get $34 f64.abs - call $assembly/imports/MathUtil.max + call $assembly/imports/Maths.max f64.mul f64.le else @@ -23516,7 +23518,7 @@ local.set $34 local.get $34 f64.abs - call $assembly/imports/MathUtil.max + call $assembly/imports/Maths.max f64.mul f64.le else @@ -23539,7 +23541,7 @@ local.set $34 local.get $34 f64.abs - call $assembly/imports/MathUtil.max + call $assembly/imports/Maths.max f64.mul f64.le else @@ -23562,7 +23564,7 @@ local.set $34 local.get $34 f64.abs - call $assembly/imports/MathUtil.max + call $assembly/imports/Maths.max f64.mul f64.le else @@ -23585,7 +23587,7 @@ local.set $34 local.get $34 f64.abs - call $assembly/imports/MathUtil.max + call $assembly/imports/Maths.max f64.mul f64.le else @@ -23608,7 +23610,7 @@ local.set $34 local.get $34 f64.abs - call $assembly/imports/MathUtil.max + call $assembly/imports/Maths.max f64.mul f64.le else @@ -23631,7 +23633,7 @@ local.set $34 local.get $34 f64.abs - call $assembly/imports/MathUtil.max + call $assembly/imports/Maths.max f64.mul f64.le else @@ -27301,7 +27303,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/MathUtil.hypot + call $assembly/imports/JSMath.hypot local.set $4 local.get $3 f64.const 0.5 @@ -28264,7 +28266,7 @@ local.set $18 local.get $18 f64.abs - call $assembly/imports/MathUtil.max + call $assembly/imports/Maths.max f64.mul f64.le if (result i32) @@ -28284,7 +28286,7 @@ local.set $18 local.get $18 f64.abs - call $assembly/imports/MathUtil.max + call $assembly/imports/Maths.max f64.mul f64.le else @@ -28307,7 +28309,7 @@ local.set $18 local.get $18 f64.abs - call $assembly/imports/MathUtil.max + call $assembly/imports/Maths.max f64.mul f64.le else @@ -28330,7 +28332,7 @@ local.set $18 local.get $18 f64.abs - call $assembly/imports/MathUtil.max + call $assembly/imports/Maths.max f64.mul f64.le else @@ -28353,7 +28355,7 @@ local.set $18 local.get $18 f64.abs - call $assembly/imports/MathUtil.max + call $assembly/imports/Maths.max f64.mul f64.le else @@ -28376,7 +28378,7 @@ local.set $18 local.get $18 f64.abs - call $assembly/imports/MathUtil.max + call $assembly/imports/Maths.max f64.mul f64.le else @@ -28399,7 +28401,7 @@ local.set $18 local.get $18 f64.abs - call $assembly/imports/MathUtil.max + call $assembly/imports/Maths.max f64.mul f64.le else @@ -28422,7 +28424,7 @@ local.set $18 local.get $18 f64.abs - call $assembly/imports/MathUtil.max + call $assembly/imports/Maths.max f64.mul f64.le else @@ -29283,7 +29285,7 @@ local.set $6 local.get $6 f64.abs - call $assembly/imports/MathUtil.max + call $assembly/imports/Maths.max f64.mul f64.le if (result i32) @@ -29303,7 +29305,7 @@ local.set $6 local.get $6 f64.abs - call $assembly/imports/MathUtil.max + call $assembly/imports/Maths.max f64.mul f64.le else @@ -30892,7 +30894,7 @@ local.set $8 local.get $8 f64.abs - call $assembly/imports/MathUtil.max + call $assembly/imports/Maths.max f64.mul f64.le if (result i32) @@ -30912,7 +30914,7 @@ local.set $8 local.get $8 f64.abs - call $assembly/imports/MathUtil.max + call $assembly/imports/Maths.max f64.mul f64.le else @@ -30935,7 +30937,7 @@ local.set $8 local.get $8 f64.abs - call $assembly/imports/MathUtil.max + call $assembly/imports/Maths.max f64.mul f64.le else @@ -31999,7 +32001,7 @@ local.set $10 local.get $10 f64.abs - call $assembly/imports/MathUtil.max + call $assembly/imports/Maths.max f64.mul f64.le if (result i32) @@ -32019,7 +32021,7 @@ local.set $10 local.get $10 f64.abs - call $assembly/imports/MathUtil.max + call $assembly/imports/Maths.max f64.mul f64.le else @@ -32042,7 +32044,7 @@ local.set $10 local.get $10 f64.abs - call $assembly/imports/MathUtil.max + call $assembly/imports/Maths.max f64.mul f64.le else @@ -32065,7 +32067,7 @@ local.set $10 local.get $10 f64.abs - call $assembly/imports/MathUtil.max + call $assembly/imports/Maths.max f64.mul f64.le else @@ -32678,7 +32680,7 @@ i32.add local.get $0 call $~lib/typedarray/Float64Array#get:length - call $assembly/imports/MathUtil.min + call $assembly/imports/Maths.min local.set $7 else local.get $0 @@ -32835,7 +32837,7 @@ i32.add local.get $0 call $~lib/typedarray/Float64Array#get:length - call $assembly/imports/MathUtil.min + call $assembly/imports/Maths.min local.set $7 else local.get $0 @@ -33418,7 +33420,7 @@ i32.add local.get $0 call $~lib/typedarray/Float64Array#get:length - call $assembly/imports/MathUtil.min + call $assembly/imports/Maths.min local.set $7 else local.get $0 From 36ecee9cd5bc5f621ec4e8ba3ef724405446d1db Mon Sep 17 00:00:00 2001 From: Huguenin-Elie Steve Date: Thu, 1 Apr 2021 02:38:39 +0200 Subject: [PATCH 21/32] merge JSMath and Maths and toolchain TS into AMD modules production build achieved from assembly --- .gitignore | 1 + .size-snapshot.json | 6 +- assembly/imports.ts | 11 +- assembly/mat2.ts | 4 +- assembly/mat2d.ts | 4 +- assembly/mat3.ts | 4 +- assembly/mat4.ts | 26 +- assembly/quat2.ts | 4 +- assembly/vec2.ts | 4 +- assembly/vec3.ts | 6 +- assembly/vec4.ts | 6 +- build/optimized.wat | 44 +- build/untouched.wat | 44 +- dist/gl-matrix-min.js | 2 +- dist/gl-matrix.js | 7840 ++++++++++++++++++++++++++++++++++++++++- package.json | 6 +- 16 files changed, 7901 insertions(+), 111 deletions(-) diff --git a/.gitignore b/.gitignore index 7ad93499..e5926b77 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.vscode .rvmrc .DS_Store tmp diff --git a/.size-snapshot.json b/.size-snapshot.json index 01e5b5cb..e9f736fa 100644 --- a/.size-snapshot.json +++ b/.size-snapshot.json @@ -5,8 +5,8 @@ "gzipped": 13273 }, "dist\\gl-matrix-min.js": { - "bundled": 2167, - "minified": 1888, - "gzipped": 980 + "bundled": 223200, + "minified": 52941, + "gzipped": 13521 } } diff --git a/assembly/imports.ts b/assembly/imports.ts index 57e9119d..a46938c2 100644 --- a/assembly/imports.ts +++ b/assembly/imports.ts @@ -5,22 +5,21 @@ // prettier-ignore /** - * JS Importations + * Extended Math functions * @module glMatrix */ -export declare namespace JSMath { + +export namespace Maths { // @ts-ignore decorator @external("Math", "hypot") - function hypot(a: f64, b: f64, c?: f64, d?: f64, e?: f64, f?: f64, g?: f64, h?: f64, i?: f64, j?: f64, k?: f64, l?: f64, m?: f64, n?: f64, o?: f64, p?: f64): f64; -} + export declare function hypot(a: f64, b: f64, c?: f64, d?: f64, e?: f64, f?: f64, g?: f64, h?: f64, i?: f64, j?: f64, k?: f64, l?: f64, m?: f64, n?: f64, o?: f64, p?: f64): f64; -export namespace Maths { export function min(a: i32, b: i32): i32 { return a < b ? a : b; } export function max(a: f64, b: f64, c: f64): f64 { - const q = Math.max(b, c) + const q = Math.max(b, c); return Math.max(a, q); } } diff --git a/assembly/mat2.ts b/assembly/mat2.ts index a8eaeb00..5a4363c1 100644 --- a/assembly/mat2.ts +++ b/assembly/mat2.ts @@ -1,5 +1,5 @@ import * as glMatrix from "./common"; -import { IndexedCollection, JSMath, Maths } from "./imports"; +import { IndexedCollection, Maths } from "./imports"; import { ReadonlyVec2 } from "./vec2"; export type mat2 = IndexedCollection; @@ -313,7 +313,7 @@ export function str(a: ReadonlyMat2): string { * @returns {Number} Frobenius norm */ export function frob(a: ReadonlyMat2): f64 { - return JSMath.hypot(a[0], a[1], a[2], a[3]); + return Maths.hypot(a[0], a[1], a[2], a[3]); } /** diff --git a/assembly/mat2d.ts b/assembly/mat2d.ts index 3a26e95c..e9fcdf4a 100644 --- a/assembly/mat2d.ts +++ b/assembly/mat2d.ts @@ -1,5 +1,5 @@ import * as glMatrix from "./common"; -import { IndexedCollection, JSMath, Maths } from "./imports"; +import { IndexedCollection, Maths } from "./imports"; import { ReadonlyVec2 } from "./vec2"; export type mat2d = IndexedCollection; @@ -381,7 +381,7 @@ export function str(a: ReadonlyMat2d): string { * @returns {Number} Frobenius norm */ export function frob(a: ReadonlyMat2d): f64 { - return JSMath.hypot(a[0], a[1], a[2], a[3], a[4], a[5], 1); + return Maths.hypot(a[0], a[1], a[2], a[3], a[4], a[5], 1); } /** diff --git a/assembly/mat3.ts b/assembly/mat3.ts index 48adc8fe..e6477253 100644 --- a/assembly/mat3.ts +++ b/assembly/mat3.ts @@ -1,5 +1,5 @@ import * as glMatrix from "./common"; -import { IndexedCollection, JSMath, Maths } from "./imports"; +import { IndexedCollection, Maths } from "./imports"; import { ReadonlyMat2 } from "./mat2"; import { ReadonlyMat4 } from "./mat4"; import { ReadonlyVec2 } from "./vec2"; @@ -704,7 +704,7 @@ export function str(a: ReadonlyMat3): string { * @returns {Number} Frobenius norm */ export function frob(a: ReadonlyMat3): f64 { - return JSMath.hypot(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8]); + return Maths.hypot(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8]); } /** diff --git a/assembly/mat4.ts b/assembly/mat4.ts index bf145a53..af414975 100644 --- a/assembly/mat4.ts +++ b/assembly/mat4.ts @@ -1,5 +1,5 @@ import * as glMatrix from "./common"; -import { IndexedCollection, JSMath, Maths } from "./imports"; +import { IndexedCollection, Maths } from "./imports"; import * as quat from "./quat"; import { ReadonlyQuat2 } from "./quat2"; import * as vec3 from "./vec3"; @@ -634,7 +634,7 @@ export function rotate(out: mat4, a: ReadonlyMat4, rad: f64, axis: vec3.Readonly let x = axis[0], y = axis[1], z = axis[2]; - let len = JSMath.hypot(x, y, z); + let len = Maths.hypot(x, y, z); let s: f64, c: f64, t: f64; let a00: f64, a01: f64, a02: f64, a03: f64; let a10: f64, a11: f64, a12: f64, a13: f64; @@ -914,7 +914,7 @@ export function fromRotation(out: mat4, rad: f64, axis: vec3.ReadonlyVec3): mat4 let x = axis[0], y = axis[1], z = axis[2]; - let len = JSMath.hypot(x, y, z); + let len = Maths.hypot(x, y, z); let s: f64, c: f64, t: f64; if (len < glMatrix.EPSILON) { @@ -1181,9 +1181,9 @@ export function getScaling(out: mat4, mat: ReadonlyMat4): mat4 { let m32 = mat[9]; let m33 = mat[10]; - out[0] = JSMath.hypot(m11, m12, m13); - out[1] = JSMath.hypot(m21, m22, m23); - out[2] = JSMath.hypot(m31, m32, m33); + out[0] = Maths.hypot(m11, m12, m13); + out[1] = Maths.hypot(m21, m22, m23); + out[2] = Maths.hypot(m31, m32, m33); return out; } @@ -1271,9 +1271,9 @@ export function decompose(out_r: quat.quat, out_t: vec3.vec3, out_s: vec3.vec3, let m32 = mat[9]; let m33 = mat[10]; - out_s[0] = JSMath.hypot(m11, m12, m13); - out_s[1] = JSMath.hypot(m21, m22, m23); - out_s[2] = JSMath.hypot(m31, m32, m33); + out_s[0] = Maths.hypot(m11, m12, m13); + out_s[1] = Maths.hypot(m21, m22, m23); + out_s[2] = Maths.hypot(m31, m32, m33); let is1 = 1 / out_s[0]; let is2 = 1 / out_s[1]; @@ -1786,7 +1786,7 @@ export function lookAt(out: mat4, eye: vec3.ReadonlyVec3, center: vec3.ReadonlyV z1 = eyey - centery; z2 = eyez - centerz; - len = 1 / JSMath.hypot(z0, z1, z2); + len = 1 / Maths.hypot(z0, z1, z2); z0 *= len; z1 *= len; z2 *= len; @@ -1794,7 +1794,7 @@ export function lookAt(out: mat4, eye: vec3.ReadonlyVec3, center: vec3.ReadonlyV x0 = upy * z2 - upz * z1; x1 = upz * z0 - upx * z2; x2 = upx * z1 - upy * z0; - len = JSMath.hypot(x0, x1, x2); + len = Maths.hypot(x0, x1, x2); if (!len) { x0 = 0; x1 = 0; @@ -1810,7 +1810,7 @@ export function lookAt(out: mat4, eye: vec3.ReadonlyVec3, center: vec3.ReadonlyV y1 = z2 * x0 - z0 * x2; y2 = z0 * x1 - z1 * x0; - len = JSMath.hypot(y0, y1, y2); + len = Maths.hypot(y0, y1, y2); if (!len) { y0 = 0; y1 = 0; @@ -1953,7 +1953,7 @@ export function str(a: ReadonlyMat4): string { * @returns {Number} Frobenius norm */ export function frob(a: ReadonlyMat4): f64 { - return JSMath.hypot( + return Maths.hypot( a[0], a[1], a[2], diff --git a/assembly/quat2.ts b/assembly/quat2.ts index 091e1b95..255df1c9 100644 --- a/assembly/quat2.ts +++ b/assembly/quat2.ts @@ -1,5 +1,5 @@ import * as glMatrix from "./common"; -import { IndexedCollection, JSMath, Maths } from "./imports"; +import { IndexedCollection, Maths } from "./imports"; import * as mat4 from "./mat4"; import * as quat from "./quat"; import * as vec3 from "./vec3"; @@ -543,7 +543,7 @@ export function rotateAroundAxis(out: quat2, a: ReadonlyQuat2, axis: vec3.Readon if (Math.abs(rad) < glMatrix.EPSILON) { return copy(out, a); } - let axisLength = JSMath.hypot(axis[0], axis[1], axis[2]); + let axisLength = Maths.hypot(axis[0], axis[1], axis[2]); rad = rad * 0.5; let s = Math.sin(rad); diff --git a/assembly/vec2.ts b/assembly/vec2.ts index 5985aaf7..de41a748 100644 --- a/assembly/vec2.ts +++ b/assembly/vec2.ts @@ -1,5 +1,5 @@ import * as glMatrix from "./common"; -import { IArguments, IndexedCollection, JSMath, Maths } from "./imports"; +import { IArguments, IndexedCollection, Maths } from "./imports"; import { ReadonlyMat2 } from "./mat2"; import { ReadonlyMat2d } from "./mat2d"; import { ReadonlyMat3 } from "./mat3"; @@ -244,7 +244,7 @@ export function scaleAndAdd(out: vec2, a: ReadonlyVec2, b: ReadonlyVec2, scale: export function distance(a: ReadonlyVec2, b: ReadonlyVec2): f64 { var x = b[0] - a[0], y = b[1] - a[1]; - return JSMath.hypot(x, y); + return Maths.hypot(x, y); } /** diff --git a/assembly/vec3.ts b/assembly/vec3.ts index 43dc4b27..a3571c30 100644 --- a/assembly/vec3.ts +++ b/assembly/vec3.ts @@ -1,5 +1,5 @@ import * as glMatrix from "./common"; -import { IArguments, IndexedCollection, JSMath, Maths } from "./imports"; +import { IArguments, IndexedCollection, Maths } from "./imports"; import { ReadonlyMat3 } from "./mat3"; import { ReadonlyMat4 } from "./mat4"; import { ReadonlyQuat } from "./quat"; @@ -52,7 +52,7 @@ export function length(a: ReadonlyVec3): f64 { let x = a[0]; let y = a[1]; let z = a[2]; - return JSMath.hypot(x, y, z); + return Maths.hypot(x, y, z); } /** @@ -275,7 +275,7 @@ export function distance(a: ReadonlyVec3, b: ReadonlyVec3): f64 { let x = b[0] - a[0]; let y = b[1] - a[1]; let z = b[2] - a[2]; - return JSMath.hypot(x, y, z); + return Maths.hypot(x, y, z); } /** diff --git a/assembly/vec4.ts b/assembly/vec4.ts index f59ad8c3..cec360c8 100644 --- a/assembly/vec4.ts +++ b/assembly/vec4.ts @@ -1,5 +1,5 @@ import * as glMatrix from "./common"; -import { IArguments, IndexedCollection, JSMath, Maths } from "./imports"; +import { IArguments, IndexedCollection, Maths } from "./imports"; import { ReadonlyQuat } from "./quat"; export type vec4 = IndexedCollection; @@ -279,7 +279,7 @@ export function distance(a: ReadonlyVec4, b: ReadonlyVec4): f64 { let y = b[1] - a[1]; let z = b[2] - a[2]; let w = b[3] - a[3]; - return JSMath.hypot(x, y, z, w); + return Maths.hypot(x, y, z, w); } /** @@ -308,7 +308,7 @@ export function length(a: ReadonlyVec4): f64 { let y = a[1]; let z = a[2]; let w = a[3]; - return JSMath.hypot(x, y, z, w); + return Maths.hypot(x, y, z, w); } /** diff --git a/build/optimized.wat b/build/optimized.wat index 95c84ebf..baae5bfe 100644 --- a/build/optimized.wat +++ b/build/optimized.wat @@ -47,7 +47,7 @@ (type $f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_=>_f64 (func (param f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64) (result f64))) (import "env" "seed" (func $~lib/builtins/seed (result f64))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) - (import "Math" "hypot" (func $assembly/imports/JSMath.hypot (param f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64) (result f64))) + (import "Math" "hypot" (func $assembly/imports/Maths.hypot (param f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64) (result f64))) (memory $0 1) (data (i32.const 1036) "\1c") (data (i32.const 1048) "\03\00\00\00\08\00\00\00\01") @@ -1175,7 +1175,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/JSMath.hypot + call $assembly/imports/Maths.hypot ) (func $assembly/vec3/squaredDistance (param $0 i32) (param $1 i32) (result f64) (local $2 f64) @@ -1235,7 +1235,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/JSMath.hypot + call $assembly/imports/Maths.hypot ) (func $assembly/vec3/squaredLength (param $0 i32) (result f64) (local $1 f64) @@ -2929,7 +2929,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/JSMath.hypot + call $assembly/imports/Maths.hypot ) (func $assembly/vec4/squaredDistance (param $0 i32) (param $1 i32) (result f64) (local $2 f64) @@ -3002,7 +3002,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/JSMath.hypot + call $assembly/imports/Maths.hypot ) (func $assembly/vec4/squaredLength (param $0 i32) (result f64) (local $1 f64) @@ -7468,7 +7468,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/JSMath.hypot + call $assembly/imports/Maths.hypot ) (func $assembly/vec2/squaredDistance (param $0 i32) (param $1 i32) (result f64) (local $2 f64) @@ -11793,7 +11793,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/JSMath.hypot + call $assembly/imports/Maths.hypot local.tee $5 f64.const 1e-06 f64.lt @@ -12385,7 +12385,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/JSMath.hypot + call $assembly/imports/Maths.hypot call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 @@ -12405,7 +12405,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/JSMath.hypot + call $assembly/imports/Maths.hypot call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 @@ -12425,7 +12425,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/JSMath.hypot + call $assembly/imports/Maths.hypot call $~lib/typedarray/Float64Array#__set local.get $0 ) @@ -12514,7 +12514,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/JSMath.hypot + call $assembly/imports/Maths.hypot call $~lib/typedarray/Float64Array#__set local.get $2 i32.const 1 @@ -12534,7 +12534,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/JSMath.hypot + call $assembly/imports/Maths.hypot call $~lib/typedarray/Float64Array#__set local.get $2 i32.const 2 @@ -12554,7 +12554,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/JSMath.hypot + call $assembly/imports/Maths.hypot call $~lib/typedarray/Float64Array#__set f64.const 1 local.get $2 @@ -13157,7 +13157,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/JSMath.hypot + call $assembly/imports/Maths.hypot f64.div local.set $4 local.get $11 @@ -13206,7 +13206,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/JSMath.hypot + call $assembly/imports/Maths.hypot local.tee $5 i64.reinterpret_f64 i64.const 1 @@ -13275,7 +13275,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/JSMath.hypot + call $assembly/imports/Maths.hypot local.tee $10 i64.reinterpret_f64 i64.const 1 @@ -15533,7 +15533,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/JSMath.hypot + call $assembly/imports/Maths.hypot local.set $4 local.get $3 f64.const 0.5 @@ -21467,7 +21467,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/JSMath.hypot + call $assembly/imports/Maths.hypot global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -22983,7 +22983,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/JSMath.hypot + call $assembly/imports/Maths.hypot global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -25657,7 +25657,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/JSMath.hypot + call $assembly/imports/Maths.hypot global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -28553,7 +28553,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/JSMath.hypot + call $assembly/imports/Maths.hypot local.tee $3 f64.const 1e-06 f64.lt @@ -30430,7 +30430,7 @@ local.get $0 i32.const 15 call $~lib/typedarray/Float64Array#__get - call $assembly/imports/JSMath.hypot + call $assembly/imports/Maths.hypot global.get $~lib/memory/__stack_pointer i32.const 4 i32.add diff --git a/build/untouched.wat b/build/untouched.wat index 877b321d..7bfb1790 100644 --- a/build/untouched.wat +++ b/build/untouched.wat @@ -52,7 +52,7 @@ (type $f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_=>_f64 (func (param f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64) (result f64))) (import "env" "seed" (func $~lib/builtins/seed (result f64))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) - (import "Math" "hypot" (func $assembly/imports/JSMath.hypot (param f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64) (result f64))) + (import "Math" "hypot" (func $assembly/imports/Maths.hypot (param f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64) (result f64))) (memory $0 1) (data (i32.const 12) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\18\00\00\00~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s\00\00\00\00\00") (data (i32.const 60) "\1c\00\00\00\00\00\00\00\00\00\00\00\03\00\00\00\08\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00") @@ -1189,7 +1189,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/JSMath.hypot + call $assembly/imports/Maths.hypot ) (func $assembly/vec3/squaredDistance (param $0 i32) (param $1 i32) (result f64) (local $2 f64) @@ -1263,7 +1263,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/JSMath.hypot + call $assembly/imports/Maths.hypot ) (func $assembly/vec3/squaredLength (param $0 i32) (result f64) (local $1 f64) @@ -3895,7 +3895,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/JSMath.hypot + call $assembly/imports/Maths.hypot ) (func $assembly/vec4/squaredDistance (param $0 i32) (param $1 i32) (result f64) (local $2 f64) @@ -3987,7 +3987,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/JSMath.hypot + call $assembly/imports/Maths.hypot ) (func $assembly/vec4/squaredLength (param $0 i32) (result f64) (local $1 f64) @@ -9066,7 +9066,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/JSMath.hypot + call $assembly/imports/Maths.hypot ) (func $assembly/vec2/squaredDistance (param $0 i32) (param $1 i32) (result f64) (local $2 f64) @@ -12474,7 +12474,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/JSMath.hypot + call $assembly/imports/Maths.hypot ) (func $~lib/rt/__newBuffer (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -13404,7 +13404,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/JSMath.hypot + call $assembly/imports/Maths.hypot ) (func $assembly/mat2d/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 @@ -15678,7 +15678,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/JSMath.hypot + call $assembly/imports/Maths.hypot ) (func $assembly/mat3/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 @@ -18418,7 +18418,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/JSMath.hypot + call $assembly/imports/Maths.hypot local.set $7 local.get $7 global.get $assembly/common/EPSILON @@ -19518,7 +19518,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/JSMath.hypot + call $assembly/imports/Maths.hypot local.set $6 local.get $6 global.get $assembly/common/EPSILON @@ -20175,7 +20175,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/JSMath.hypot + call $assembly/imports/Maths.hypot call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 @@ -20195,7 +20195,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/JSMath.hypot + call $assembly/imports/Maths.hypot call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 @@ -20215,7 +20215,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/JSMath.hypot + call $assembly/imports/Maths.hypot call $~lib/typedarray/Float64Array#__set local.get $0 ) @@ -20316,7 +20316,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/JSMath.hypot + call $assembly/imports/Maths.hypot call $~lib/typedarray/Float64Array#__set local.get $2 i32.const 1 @@ -20336,7 +20336,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/JSMath.hypot + call $assembly/imports/Maths.hypot call $~lib/typedarray/Float64Array#__set local.get $2 i32.const 2 @@ -20356,7 +20356,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/JSMath.hypot + call $assembly/imports/Maths.hypot call $~lib/typedarray/Float64Array#__set i32.const 1 f64.convert_i32_s @@ -21896,7 +21896,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/JSMath.hypot + call $assembly/imports/Maths.hypot f64.div local.set $13 local.get $10 @@ -21951,7 +21951,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/JSMath.hypot + call $assembly/imports/Maths.hypot local.set $13 local.get $13 i64.reinterpret_f64 @@ -22027,7 +22027,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/JSMath.hypot + call $assembly/imports/Maths.hypot local.set $13 local.get $13 i64.reinterpret_f64 @@ -22448,7 +22448,7 @@ local.get $0 i32.const 15 call $~lib/typedarray/Float64Array#__get - call $assembly/imports/JSMath.hypot + call $assembly/imports/Maths.hypot ) (func $assembly/mat4/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 @@ -27303,7 +27303,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $assembly/imports/JSMath.hypot + call $assembly/imports/Maths.hypot local.set $4 local.get $3 f64.const 0.5 diff --git a/dist/gl-matrix-min.js b/dist/gl-matrix-min.js index 5dfae624..42c5551e 100644 --- a/dist/gl-matrix-min.js +++ b/dist/gl-matrix-min.js @@ -25,4 +25,4 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){"use strict";exports.__esModule=!0,exports.vec4=exports.vec3=exports.vec2=exports.quat2=exports.quat=exports.mat4=exports.mat3=exports.mat2d=exports.mat2=exports.glMatrix=void 0;var e=require("./common");exports.glMatrix=e;var r=require("./mat2");exports.mat2=r;var t=require("./mat2d");exports.mat2d=t;var a=require("./mat3");exports.mat3=a;var o=require("./mat4");exports.mat4=o;var s=require("./quat");exports.quat=s;var x=require("./quat2");exports.quat2=x;var p=require("./vec2");exports.vec2=p;var u=require("./vec3");exports.vec3=u;var i=require("./vec4");exports.vec4=i})); +!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).glMatrix={})}(this,(function(t){"use strict";var n;!function(t){t.min=function(t,n){return t0?(m=2*Math.sqrt(b+1),t[3]=.25*m,t[0]=(h-l)/m,t[1]=(M-c)/m,t[2]=(i-s)/m):o>f&&o>v?(m=2*Math.sqrt(1+o-f-v),t[3]=(h-l)/m,t[0]=.25*m,t[1]=(i+s)/m,t[2]=(M+c)/m):f>v?(m=2*Math.sqrt(1+f-o-v),t[3]=(M-c)/m,t[0]=(i+s)/m,t[1]=.25*m,t[2]=(h+l)/m):(m=2*Math.sqrt(1+v-o-f),t[3]=(i-s)/m,t[0]=(M+c)/m,t[1]=(h+l)/m,t[2]=.25*m),t}function O(t,n,r,a,u){var e=1/Math.tan(n/2);if(t[0]=e/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,"number"==typeof u&&u!==1/0){var o=1/(a-u);t[10]=(u+a)*o,t[14]=2*u*a*o}else t[10]=-1,t[14]=-2*a;return t}var R=O;function j(t,n,r,a,u,e,o){var i=1/(n-r),c=1/(a-u),s=1/(e-o);return t[0]=-2*i,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*c,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*s,t[11]=0,t[12]=(n+r)*i,t[13]=(u+a)*c,t[14]=(o+e)*s,t[15]=1,t}var E=j;function P(t,n,r){return t[0]=n[0]-r[0],t[1]=n[1]-r[1],t[2]=n[2]-r[2],t[3]=n[3]-r[3],t[4]=n[4]-r[4],t[5]=n[5]-r[5],t[6]=n[6]-r[6],t[7]=n[7]-r[7],t[8]=n[8]-r[8],t[9]=n[9]-r[9],t[10]=n[10]-r[10],t[11]=n[11]-r[11],t[12]=n[12]-r[12],t[13]=n[13]-r[13],t[14]=n[14]-r[14],t[15]=n[15]-r[15],t}var T=A,D=P,I=Object.freeze({__proto__:null,Fov:S,create:function(){var t=new Float64Array(16);return t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[0]=1,t[5]=1,t[10]=1,t[15]=1,t},clone:function(t){var n=new Float64Array(16);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n[9]=t[9],n[10]=t[10],n[11]=t[11],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15],n},copy:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],t},fromValues:function(t,n,r,a,u,e,o,i,c,s,f,h,M,l,v,b){var m=new Float64Array(16);return m[0]=t,m[1]=n,m[2]=r,m[3]=a,m[4]=u,m[5]=e,m[6]=o,m[7]=i,m[8]=c,m[9]=s,m[10]=f,m[11]=h,m[12]=M,m[13]=l,m[14]=v,m[15]=b,m},set:function(t,n,r,a,u,e,o,i,c,s,f,h,M,l,v,b,m){return t[0]=n,t[1]=r,t[2]=a,t[3]=u,t[4]=e,t[5]=o,t[6]=i,t[7]=c,t[8]=s,t[9]=f,t[10]=h,t[11]=M,t[12]=l,t[13]=v,t[14]=b,t[15]=m,t},identity:q,transpose:function(t,n){if(t===n){var r=n[1],a=n[2],u=n[3],e=n[6],o=n[7],i=n[11];t[1]=n[4],t[2]=n[8],t[3]=n[12],t[4]=r,t[6]=n[9],t[7]=n[13],t[8]=a,t[9]=e,t[11]=n[14],t[12]=u,t[13]=o,t[14]=i}else t[0]=n[0],t[1]=n[4],t[2]=n[8],t[3]=n[12],t[4]=n[1],t[5]=n[5],t[6]=n[9],t[7]=n[13],t[8]=n[2],t[9]=n[6],t[10]=n[10],t[11]=n[14],t[12]=n[3],t[13]=n[7],t[14]=n[11],t[15]=n[15];return t},invert:function(t,n){var r=n[0],a=n[1],u=n[2],e=n[3],o=n[4],i=n[5],c=n[6],s=n[7],f=n[8],h=n[9],M=n[10],l=n[11],v=n[12],b=n[13],m=n[14],d=n[15],g=r*i-a*o,y=r*c-u*o,p=r*s-e*o,x=a*c-u*i,S=a*s-e*i,q=u*s-e*c,A=f*b-h*v,_=f*m-M*v,w=f*d-l*v,F=h*m-M*b,z=h*d-l*b,O=M*d-l*m,R=g*O-y*z+p*F+x*w-S*_+q*A;return R?(R=1/R,t[0]=(i*O-c*z+s*F)*R,t[1]=(u*z-a*O-e*F)*R,t[2]=(b*q-m*S+d*x)*R,t[3]=(M*S-h*q-l*x)*R,t[4]=(c*w-o*O-s*_)*R,t[5]=(r*O-u*w+e*_)*R,t[6]=(m*p-v*q-d*y)*R,t[7]=(f*q-M*p+l*y)*R,t[8]=(o*z-i*w+s*A)*R,t[9]=(a*w-r*z-e*A)*R,t[10]=(v*S-b*p+d*g)*R,t[11]=(h*p-f*S-l*g)*R,t[12]=(i*_-o*F-c*A)*R,t[13]=(r*F-a*_+u*A)*R,t[14]=(b*y-v*x-m*g)*R,t[15]=(f*x-h*y+M*g)*R,t):null},adjoint:function(t,n){var r=n[0],a=n[1],u=n[2],e=n[3],o=n[4],i=n[5],c=n[6],s=n[7],f=n[8],h=n[9],M=n[10],l=n[11],v=n[12],b=n[13],m=n[14],d=n[15],g=r*i-a*o,y=r*c-u*o,p=r*s-e*o,x=a*c-u*i,S=a*s-e*i,q=u*s-e*c,A=f*b-h*v,_=f*m-M*v,w=f*d-l*v,F=h*m-M*b,z=h*d-l*b,O=M*d-l*m;return t[0]=i*O-c*z+s*F,t[1]=u*z-a*O-e*F,t[2]=b*q-m*S+d*x,t[3]=M*S-h*q-l*x,t[4]=c*w-o*O-s*_,t[5]=r*O-u*w+e*_,t[6]=m*p-v*q-d*y,t[7]=f*q-M*p+l*y,t[8]=o*z-i*w+s*A,t[9]=a*w-r*z-e*A,t[10]=v*S-b*p+d*g,t[11]=h*p-f*S-l*g,t[12]=i*_-o*F-c*A,t[13]=r*F-a*_+u*A,t[14]=b*y-v*x-m*g,t[15]=f*x-h*y+M*g,t},determinant:function(t){var n=t[0],r=t[1],a=t[2],u=t[3],e=t[4],o=t[5],i=t[6],c=t[7],s=t[8],f=t[9],h=t[10],M=t[11],l=t[12],v=t[13],b=t[14],m=n*o-r*e,d=n*i-a*e,g=r*i-a*o,y=s*v-f*l,p=s*b-h*l,x=f*b-h*v;return c*(n*x-r*p+a*y)-u*(e*x-o*p+i*y)+t[15]*(s*g-f*d+h*m)-M*(l*g-v*d+b*m)},multiply:A,translate:function(t,n,r){var a,u,e,o,i,c,s,f,h,M,l,v,b=r[0],m=r[1],d=r[2];return n===t?(t[12]=n[0]*b+n[4]*m+n[8]*d+n[12],t[13]=n[1]*b+n[5]*m+n[9]*d+n[13],t[14]=n[2]*b+n[6]*m+n[10]*d+n[14],t[15]=n[3]*b+n[7]*m+n[11]*d+n[15]):(a=n[0],u=n[1],e=n[2],o=n[3],i=n[4],c=n[5],s=n[6],f=n[7],h=n[8],M=n[9],l=n[10],v=n[11],t[0]=a,t[1]=u,t[2]=e,t[3]=o,t[4]=i,t[5]=c,t[6]=s,t[7]=f,t[8]=h,t[9]=M,t[10]=l,t[11]=v,t[12]=a*b+i*m+h*d+n[12],t[13]=u*b+c*m+M*d+n[13],t[14]=e*b+s*m+l*d+n[14],t[15]=o*b+f*m+v*d+n[15]),t},scale:function(t,n,r){var a=r[0],u=r[1],e=r[2];return t[0]=n[0]*a,t[1]=n[1]*a,t[2]=n[2]*a,t[3]=n[3]*a,t[4]=n[4]*u,t[5]=n[5]*u,t[6]=n[6]*u,t[7]=n[7]*u,t[8]=n[8]*e,t[9]=n[9]*e,t[10]=n[10]*e,t[11]=n[11]*e,t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],t},rotate:function(t,a,u,e){var o,i,c,s,f,h,M,l,v,b,m,d,g,y,p,x,S,q,A,_,w,F,z,O,R=e[0],j=e[1],E=e[2],P=n.hypot(R,j,E);return P0?(r[0]=2*(i*o+f*a+c*e-s*u)/h,r[1]=2*(c*o+f*u+s*a-i*e)/h,r[2]=2*(s*o+f*e+i*u-c*a)/h):(r[0]=2*(i*o+f*a+c*e-s*u),r[1]=2*(c*o+f*u+s*a-i*e),r[2]=2*(s*o+f*e+i*u-c*a)),_(t,n,r),t},getTranslation:w,getScaling:F,getRotation:z,decompose:function(t,r,a,u){r[0]=u[12],r[1]=u[13],r[2]=u[14];var e=u[0],o=u[1],i=u[2],c=u[4],s=u[5],f=u[6],h=u[8],M=u[9],l=u[10];a[0]=n.hypot(e,o,i),a[1]=n.hypot(c,s,f),a[2]=n.hypot(h,M,l);var v=1/a[0],b=1/a[1],m=1/a[2],d=e*v,g=o*b,y=i*m,p=c*v,x=s*b,S=f*m,q=h*v,A=M*b,_=l*m,w=d+x+_,F=0;return w>0?(F=2*Math.sqrt(w+1),t[3]=.25*F,t[0]=(S-A)/F,t[1]=(q-y)/F,t[2]=(g-p)/F):d>x&&d>_?(F=2*Math.sqrt(1+d-x-_),t[3]=(S-A)/F,t[0]=.25*F,t[1]=(g+p)/F,t[2]=(q+y)/F):x>_?(F=2*Math.sqrt(1+x-d-_),t[3]=(q-y)/F,t[0]=(g+p)/F,t[1]=.25*F,t[2]=(S+A)/F):(F=2*Math.sqrt(1+_-d-x),t[3]=(g-p)/F,t[0]=(q+y)/F,t[1]=(S+A)/F,t[2]=.25*F),t},fromRotationTranslationScale:function(t,n,r,a){var u=n[0],e=n[1],o=n[2],i=n[3],c=u+u,s=e+e,f=o+o,h=u*c,M=u*s,l=u*f,v=e*s,b=e*f,m=o*f,d=i*c,g=i*s,y=i*f,p=a[0],x=a[1],S=a[2];return t[0]=(1-(v+m))*p,t[1]=(M+y)*p,t[2]=(l-g)*p,t[3]=0,t[4]=(M-y)*x,t[5]=(1-(h+m))*x,t[6]=(b+d)*x,t[7]=0,t[8]=(l+g)*S,t[9]=(b-d)*S,t[10]=(1-(h+v))*S,t[11]=0,t[12]=r[0],t[13]=r[1],t[14]=r[2],t[15]=1,t},fromRotationTranslationScaleOrigin:function(t,n,r,a,u){var e=n[0],o=n[1],i=n[2],c=n[3],s=e+e,f=o+o,h=i+i,M=e*s,l=e*f,v=e*h,b=o*f,m=o*h,d=i*h,g=c*s,y=c*f,p=c*h,x=a[0],S=a[1],q=a[2],A=u[0],_=u[1],w=u[2],F=(1-(b+d))*x,z=(l+p)*x,O=(v-y)*x,R=(l-p)*S,j=(1-(M+d))*S,E=(m+g)*S,P=(v+y)*q,T=(m-g)*q,D=(1-(M+b))*q;return t[0]=F,t[1]=z,t[2]=O,t[3]=0,t[4]=R,t[5]=j,t[6]=E,t[7]=0,t[8]=P,t[9]=T,t[10]=D,t[11]=0,t[12]=r[0]+A-(F*A+R*_+P*w),t[13]=r[1]+_-(z*A+j*_+T*w),t[14]=r[2]+w-(O*A+E*_+D*w),t[15]=1,t},fromQuat:function(t,n){var r=n[0],a=n[1],u=n[2],e=n[3],o=r+r,i=a+a,c=u+u,s=r*o,f=a*o,h=a*i,M=u*o,l=u*i,v=u*c,b=e*o,m=e*i,d=e*c;return t[0]=1-h-v,t[1]=f+d,t[2]=M-m,t[3]=0,t[4]=f-d,t[5]=1-s-v,t[6]=l+b,t[7]=0,t[8]=M+m,t[9]=l-b,t[10]=1-s-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},frustum:function(t,n,r,a,u,e,o){var i=1/(r-n),c=1/(u-a),s=1/(e-o);return t[0]=2*e*i,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*e*c,t[6]=0,t[7]=0,t[8]=(r+n)*i,t[9]=(u+a)*c,t[10]=(o+e)*s,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*e*2*s,t[15]=0,t},perspectiveNO:O,perspective:R,perspectiveZO:function(t,n,r,a,u){var e=1/Math.tan(n/2);if(t[0]=e/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,"number"==typeof u&&u!==1/0){var o=1/(a-u);t[10]=u*o,t[14]=u*a*o}else t[10]=-1,t[14]=-a;return t},perspectiveFromFieldOfView:function(t,n,r,a){var u=Math.tan(n.upDegrees*Math.PI/180),e=Math.tan(n.downDegrees*Math.PI/180),o=Math.tan(n.leftDegrees*Math.PI/180),i=Math.tan(n.rightDegrees*Math.PI/180),c=2/(o+i),s=2/(u+e);return t[0]=c,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,t[6]=0,t[7]=0,t[8]=-(o-i)*c*.5,t[9]=(u-e)*s*.5,t[10]=a/(r-a),t[11]=-1,t[12]=0,t[13]=0,t[14]=a*r/(r-a),t[15]=0,t},orthoNO:j,ortho:E,orthoZO:function(t,n,r,a,u,e,o){var i=1/(n-r),c=1/(a-u),s=1/(e-o);return t[0]=-2*i,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*c,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=s,t[11]=0,t[12]=(n+r)*i,t[13]=(u+a)*c,t[14]=e*s,t[15]=1,t},lookAt:function(t,a,u,e){var o,i,c,s,f,h,M,l,v,b,m=a[0],d=a[1],g=a[2],y=e[0],p=e[1],x=e[2],S=u[0],A=u[1],_=u[2];return Math.abs(m-S)0&&(f*=l=1/Math.sqrt(l),h*=l,M*=l);var v=c*M-s*h,b=s*f-i*M,m=i*h-c*f;return(l=v*v+b*b+m*m)>0&&(v*=l=1/Math.sqrt(l),b*=l,m*=l),t[0]=v,t[1]=b,t[2]=m,t[3]=0,t[4]=h*m-M*b,t[5]=M*v-f*m,t[6]=f*b-h*v,t[7]=0,t[8]=f,t[9]=h,t[10]=M,t[11]=0,t[12]=u,t[13]=e,t[14]=o,t[15]=1,t},str:function(t){return"mat4("+t[0].toString()+", "+t[1].toString()+", "+t[2].toString()+", "+t[3].toString()+", "+t[4].toString()+", "+t[5].toString()+", "+t[6].toString()+", "+t[7].toString()+", "+t[8].toString()+", "+t[9].toString()+", "+t[10].toString()+", "+t[11].toString()+", "+t[12].toString()+", "+t[13].toString()+", "+t[14].toString()+", "+t[15].toString()+")"},frob:function(t){return n.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},add:function(t,n,r){return t[0]=n[0]+r[0],t[1]=n[1]+r[1],t[2]=n[2]+r[2],t[3]=n[3]+r[3],t[4]=n[4]+r[4],t[5]=n[5]+r[5],t[6]=n[6]+r[6],t[7]=n[7]+r[7],t[8]=n[8]+r[8],t[9]=n[9]+r[9],t[10]=n[10]+r[10],t[11]=n[11]+r[11],t[12]=n[12]+r[12],t[13]=n[13]+r[13],t[14]=n[14]+r[14],t[15]=n[15]+r[15],t},subtract:P,multiplyScalar:function(t,n,r){return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=n[3]*r,t[4]=n[4]*r,t[5]=n[5]*r,t[6]=n[6]*r,t[7]=n[7]*r,t[8]=n[8]*r,t[9]=n[9]*r,t[10]=n[10]*r,t[11]=n[11]*r,t[12]=n[12]*r,t[13]=n[13]*r,t[14]=n[14]*r,t[15]=n[15]*r,t},multiplyScalarAndAdd:function(t,n,r,a){return t[0]=n[0]+r[0]*a,t[1]=n[1]+r[1]*a,t[2]=n[2]+r[2]*a,t[3]=n[3]+r[3]*a,t[4]=n[4]+r[4]*a,t[5]=n[5]+r[5]*a,t[6]=n[6]+r[6]*a,t[7]=n[7]+r[7]*a,t[8]=n[8]+r[8]*a,t[9]=n[9]+r[9]*a,t[10]=n[10]+r[10]*a,t[11]=n[11]+r[11]*a,t[12]=n[12]+r[12]*a,t[13]=n[13]+r[13]*a,t[14]=n[14]+r[14]*a,t[15]=n[15]+r[15]*a,t},exactEquals:function(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[7]===n[7]&&t[8]===n[8]&&t[9]===n[9]&&t[10]===n[10]&&t[11]===n[11]&&t[12]===n[12]&&t[13]===n[13]&&t[14]===n[14]&&t[15]===n[15]},equals:function(t,a){var u=t[0],e=t[1],o=t[2],i=t[3],c=t[4],s=t[5],f=t[6],h=t[7],M=t[8],l=t[9],v=t[10],b=t[11],m=t[12],d=t[13],g=t[14],y=t[15],p=a[0],x=a[1],S=a[2],q=a[3],A=a[4],_=a[5],w=a[6],F=a[7],z=a[8],O=a[9],R=a[10],j=a[11],E=a[12],P=a[13],T=a[14],D=a[15];return Math.abs(u-p)<=r*n.max(1,Math.abs(u),Math.abs(p))&&Math.abs(e-x)<=r*n.max(1,Math.abs(e),Math.abs(x))&&Math.abs(o-S)<=r*n.max(1,Math.abs(o),Math.abs(S))&&Math.abs(i-q)<=r*n.max(1,Math.abs(i),Math.abs(q))&&Math.abs(c-A)<=r*n.max(1,Math.abs(c),Math.abs(A))&&Math.abs(s-_)<=r*n.max(1,Math.abs(s),Math.abs(_))&&Math.abs(f-w)<=r*n.max(1,Math.abs(f),Math.abs(w))&&Math.abs(h-F)<=r*n.max(1,Math.abs(h),Math.abs(F))&&Math.abs(M-z)<=r*n.max(1,Math.abs(M),Math.abs(z))&&Math.abs(l-O)<=r*n.max(1,Math.abs(l),Math.abs(O))&&Math.abs(v-R)<=r*n.max(1,Math.abs(v),Math.abs(R))&&Math.abs(b-j)<=r*n.max(1,Math.abs(b),Math.abs(j))&&Math.abs(m-E)<=r*n.max(1,Math.abs(m),Math.abs(E))&&Math.abs(d-P)<=r*n.max(1,Math.abs(d),Math.abs(P))&&Math.abs(g-T)<=r*n.max(1,Math.abs(g),Math.abs(T))&&Math.abs(y-D)<=r*n.max(1,Math.abs(y),Math.abs(D))},mul:T,sub:D});function L(){var t=new Float64Array(3);return t[0]=0,t[1]=0,t[2]=0,t}function V(t){var r=t[0],a=t[1],u=t[2];return n.hypot(r,a,u)}function Q(t,n,r){var a=new Float64Array(3);return a[0]=t,a[1]=n,a[2]=r,a}function Z(t,n,r){return t[0]=n[0]-r[0],t[1]=n[1]-r[1],t[2]=n[2]-r[2],t}function N(t,n,r){return t[0]=n[0]*r[0],t[1]=n[1]*r[1],t[2]=n[2]*r[2],t}function X(t,n,r){return t[0]=n[0]/r[0],t[1]=n[1]/r[1],t[2]=n[2]/r[2],t}function Y(t,r){var a=r[0]-t[0],u=r[1]-t[1],e=r[2]-t[2];return n.hypot(a,u,e)}function k(t,n){var r=n[0]-t[0],a=n[1]-t[1],u=n[2]-t[2];return r*r+a*a+u*u}function B(t){var n=t[0],r=t[1],a=t[2];return n*n+r*r+a*a}function U(t,n){var r=n[0],a=n[1],u=n[2],e=r*r+a*a+u*u;return e>0&&(e=1/Math.sqrt(e)),t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t}function G(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function W(t,n,r){var a=n[0],u=n[1],e=n[2],o=r[0],i=r[1],c=r[2];return t[0]=u*c-e*i,t[1]=e*o-a*c,t[2]=a*i-u*o,t}var C=Z,H=N,J=X,K=Y,$=k,tt=V,nt=B,rt=L(),at=function(t,r,a,u,e,o){var i,c;for(r||(r=3),a||(a=0),c=u?n.min(u*r+a,t.length):t.length,i=a;i0&&(o=1/Math.sqrt(o)),t[0]=r*o,t[1]=a*o,t[2]=u*o,t[3]=e*o,t}function pt(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]+t[3]*n[3]}function xt(t,n,r,a){var u=n[0],e=n[1],o=n[2],i=n[3];return t[0]=u+a*(r[0]-u),t[1]=e+a*(r[1]-e),t[2]=o+a*(r[2]-o),t[3]=i+a*(r[3]-i),t}function St(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]}var qt=ht,At=Mt,_t=lt,wt=bt,Ft=mt,zt=dt,Ot=gt,Rt=et(),jt=function(t,r,a,u,e,o){var i,c;for(r||(r=4),a||(a=0),c=u?n.min(u*r+a,t.length):t.length,i=a;i=1);do{c=(e=2*a()-1)*e+(o=2*a()-1)*o}while(c>=1);var s=Math.sqrt((1-i)/c);return t[0]=n*r,t[1]=n*u,t[2]=n*e*s,t[3]=n*o*s,t},transformMat4:function(t,n,r){var a=n[0],u=n[1],e=n[2],o=n[3];return t[0]=r[0]*a+r[4]*u+r[8]*e+r[12]*o,t[1]=r[1]*a+r[5]*u+r[9]*e+r[13]*o,t[2]=r[2]*a+r[6]*u+r[10]*e+r[14]*o,t[3]=r[3]*a+r[7]*u+r[11]*e+r[15]*o,t},transformQuat:function(t,n,r){var a=n[0],u=n[1],e=n[2],o=r[0],i=r[1],c=r[2],s=r[3],f=s*a+i*e-c*u,h=s*u+c*a-o*e,M=s*e+o*u-i*a,l=-o*a-i*u-c*e;return t[0]=f*s+l*-o+h*-c-M*-i,t[1]=h*s+l*-i+M*-o-f*-c,t[2]=M*s+l*-c+f*-i-h*-o,t[3]=n[3],t},zero:function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t},str:function(t){return"vec4("+t[0].toString()+", "+t[1].toString()+", "+t[2].toString()+", "+t[3].toString()+")"},exactEquals:St,equals:function(t,a){var u=t[0],e=t[1],o=t[2],i=t[3],c=a[0],s=a[1],f=a[2],h=a[3];return Math.abs(u-c)<=r*n.max(1,Math.abs(u),Math.abs(c))&&Math.abs(e-s)<=r*n.max(1,Math.abs(e),Math.abs(s))&&Math.abs(o-f)<=r*n.max(1,Math.abs(o),Math.abs(f))&&Math.abs(i-h)<=r*n.max(1,Math.abs(i),Math.abs(h))},sub:qt,mul:At,div:_t,dist:wt,sqrDist:Ft,len:zt,sqrLen:Ot,forEach:jt});function Pt(){var t=new Float64Array(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t}function Tt(t,n,r){r*=.5;var a=Math.sin(r);return t[0]=a*n[0],t[1]=a*n[1],t[2]=a*n[2],t[3]=Math.cos(r),t}function Dt(t,n,r){var a=n[0],u=n[1],e=n[2],o=n[3],i=r[0],c=r[1],s=r[2],f=r[3];return t[0]=a*f+o*i+u*s-e*c,t[1]=u*f+o*c+e*i-a*s,t[2]=e*f+o*s+a*c-u*i,t[3]=o*f-a*i-u*c-e*s,t}function It(t,n,r){r*=.5;var a=n[0],u=n[1],e=n[2],o=n[3],i=Math.sin(r),c=Math.cos(r);return t[0]=a*c+o*i,t[1]=u*c+e*i,t[2]=e*c-u*i,t[3]=o*c-a*i,t}function Lt(t,n,r){r*=.5;var a=n[0],u=n[1],e=n[2],o=n[3],i=Math.sin(r),c=Math.cos(r);return t[0]=a*c-e*i,t[1]=u*c+o*i,t[2]=e*c+a*i,t[3]=o*c-u*i,t}function Vt(t,n,r){r*=.5;var a=n[0],u=n[1],e=n[2],o=n[3],i=Math.sin(r),c=Math.cos(r);return t[0]=a*c+u*i,t[1]=u*c-a*i,t[2]=e*c+o*i,t[3]=o*c-e*i,t}function Qt(t,n){var r=n[0],a=n[1],u=n[2],e=n[3],o=Math.sqrt(r*r+a*a+u*u),i=Math.exp(e),c=o>0?i*Math.sin(o)/o:0;return t[0]=r*c,t[1]=a*c,t[2]=u*c,t[3]=i*Math.cos(o),t}function Zt(t,n){var r=n[0],a=n[1],u=n[2],e=n[3],o=Math.sqrt(r*r+a*a+u*u),i=o>0?Math.atan2(o,e)/o:0;return t[0]=r*i,t[1]=a*i,t[2]=u*i,t[3]=.5*Math.log(r*r+a*a+u*u+e*e),t}function Nt(t,n,a,u){var e,o,i,c,s,f=n[0],h=n[1],M=n[2],l=n[3],v=a[0],b=a[1],m=a[2],d=a[3];return(o=f*v+h*b+M*m+l*d)<0&&(o=-o,v=-v,b=-b,m=-m,d=-d),1-o>r?(e=Math.acos(o),i=Math.sin(e),c=Math.sin((1-u)*e)/i,s=Math.sin(u*e)/i):(c=1-u,s=u),t[0]=c*f+s*v,t[1]=c*h+s*b,t[2]=c*M+s*m,t[3]=c*l+s*d,t}function Xt(t,n){var r,a=n[0]+n[4]+n[8];if(a>0)r=Math.sqrt(a+1),t[3]=.5*r,r=.5/r,t[0]=(n[5]-n[7])*r,t[1]=(n[6]-n[2])*r,t[2]=(n[1]-n[3])*r;else{var u=0;n[4]>n[0]&&(u=1),n[8]>n[3*u+u]&&(u=2);var e=(u+1)%3,o=(u+2)%3;r=Math.sqrt(n[3*u+u]-n[3*e+e]-n[3*o+o]+1),t[u]=.5*r,r=.5/r,t[3]=(n[3*e+o]-n[3*o+e])*r,t[e]=(n[3*e+u]+n[3*u+e])*r,t[o]=(n[3*o+u]+n[3*u+o])*r}return t}var Yt=ot,kt=it,Bt=ct,Ut=st,Gt=ft,Wt=Dt,Ct=vt,Ht=pt,Jt=xt,Kt=dt,$t=Kt,tn=gt,nn=tn,rn=yt,an=St;var un=L(),en=Q(1,0,0),on=Q(0,1,0),cn=function(t,n,r){var a=G(n,r);return a<-.999999?(W(un,en,n),tt(un)<1e-6&&W(un,on,n),U(un,un),Tt(t,un,Math.PI),t):a>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):(W(un,n,r),t[0]=un[0],t[1]=un[1],t[2]=un[2],t[3]=1+a,rn(t,t))},sn=Pt(),fn=Pt(),hn=function(t,n,r,a,u,e){return Nt(sn,n,u,e),Nt(fn,r,a,e),Nt(t,sn,fn,2*e*(1-e)),t},Mn=m(),ln=function(t,n,r,a){return Mn[0]=r[0],Mn[3]=r[1],Mn[6]=r[2],Mn[1]=a[0],Mn[4]=a[1],Mn[7]=a[2],Mn[2]=-n[0],Mn[5]=-n[1],Mn[8]=-n[2],rn(t,Xt(t,Mn))},vn=Object.freeze({__proto__:null,create:Pt,identity:function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},setAxisAngle:Tt,getAxisAngle:function(t,n){var a=2*Math.acos(n[3]),u=Math.sin(a/2);return u>r?(t[0]=n[0]/u,t[1]=n[1]/u,t[2]=n[2]/u):(t[0]=1,t[1]=0,t[2]=0),a},getAngle:function(t,n){var r=Ht(t,n);return Math.acos(2*r*r-1)},multiply:Dt,rotateX:It,rotateY:Lt,rotateZ:Vt,calculateW:function(t,n){var r=n[0],a=n[1],u=n[2];return t[0]=r,t[1]=a,t[2]=u,t[3]=Math.sqrt(Math.abs(1-r*r-a*a-u*u)),t},exp:Qt,ln:Zt,pow:function(t,n,r){return Zt(t,n),Ct(t,t,r),Qt(t,t),t},slerp:Nt,random:function(t){var n=a(),r=a(),u=a(),e=Math.sqrt(1-n),o=Math.sqrt(n);return t[0]=e*Math.sin(2*Math.PI*r),t[1]=e*Math.cos(2*Math.PI*r),t[2]=o*Math.sin(2*Math.PI*u),t[3]=o*Math.cos(2*Math.PI*u),t},invert:function(t,n){var r=n[0],a=n[1],u=n[2],e=n[3],o=r*r+a*a+u*u+e*e,i=o?1/o:0;return t[0]=-r*i,t[1]=-a*i,t[2]=-u*i,t[3]=e*i,t},conjugate:function(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=n[3],t},fromMat3:Xt,fromEuler:function(t,n,r,a,u){void 0===u&&(u="zyx");var e=Math.PI/360;n*=e,a*=e,r*=e;var o=Math.sin(n),i=Math.cos(n),c=Math.sin(r),s=Math.cos(r),f=Math.sin(a),h=Math.cos(a);if("xyz"===u)t[0]=o*s*h+i*c*f,t[1]=i*c*h-o*s*f,t[2]=i*s*f+o*c*h,t[3]=i*s*h-o*c*f;else if("xzy"===u)t[0]=o*s*h-i*c*f,t[1]=i*c*h-o*s*f,t[2]=i*s*f+o*c*h,t[3]=i*s*h+o*c*f;else if("yxz"===u)t[0]=o*s*h+i*c*f,t[1]=i*c*h-o*s*f,t[2]=i*s*f-o*c*h,t[3]=i*s*h+o*c*f;else if("yzx"===u)t[0]=o*s*h+i*c*f,t[1]=i*c*h+o*s*f,t[2]=i*s*f-o*c*h,t[3]=i*s*h-o*c*f;else if("zxy"===u)t[0]=o*s*h-i*c*f,t[1]=i*c*h+o*s*f,t[2]=i*s*f+o*c*h,t[3]=i*s*h-o*c*f;else{if("zyx"!==u)throw new Error("Unknown angle order "+u);t[0]=o*s*h-i*c*f,t[1]=i*c*h+o*s*f,t[2]=i*s*f-o*c*h,t[3]=i*s*h+o*c*f}return t},str:function(t){return"quat("+t[0].toString()+", "+t[1].toString()+", "+t[2].toString()+", "+t[3].toString()+")"},clone:Yt,fromValues:kt,copy:Bt,set:Ut,add:Gt,mul:Wt,scale:Ct,dot:Ht,lerp:Jt,length:Kt,len:$t,squaredLength:tn,sqrLen:nn,normalize:rn,exactEquals:an,equals:function(t,n){return Math.abs(pt(t,n))>=1-r},rotationTo:cn,sqlerp:hn,setAxes:ln});function bn(t,n,r){var a=.5*r[0],u=.5*r[1],e=.5*r[2],o=n[0],i=n[1],c=n[2],s=n[3];return t[0]=o,t[1]=i,t[2]=c,t[3]=s,t[4]=a*s+u*c-e*i,t[5]=u*s+e*o-a*c,t[6]=e*s+a*i-u*o,t[7]=-a*o-u*i-e*c,t}function mn(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t}var dn=Bt;var gn=Bt;function yn(t,n,r){var a=n[0],u=n[1],e=n[2],o=n[3],i=r[4],c=r[5],s=r[6],f=r[7],h=n[4],M=n[5],l=n[6],v=n[7],b=r[0],m=r[1],d=r[2],g=r[3];return t[0]=a*g+o*b+u*d-e*m,t[1]=u*g+o*m+e*b-a*d,t[2]=e*g+o*d+a*m-u*b,t[3]=o*g-a*b-u*m-e*d,t[4]=a*f+o*i+u*s-e*c+h*g+v*b+M*d-l*m,t[5]=u*f+o*c+e*i-a*s+M*g+v*m+l*b-h*d,t[6]=e*f+o*s+a*c-u*i+l*g+v*d+h*m-M*b,t[7]=o*f-a*i-u*c-e*s+v*g-h*b-M*m-l*d,t}var pn=yn;var xn=Ht;var Sn=Kt,qn=Sn,An=tn,_n=An;var wn=Object.freeze({__proto__:null,create:function(){var t=changetype(new Float64Array(8));return t[0]=0,t[1]=0,t[2]=0,t[4]=0,t[5]=0,t[6]=0,t[7]=0,t[3]=1,t},clone:function(t){var n=changetype(new Float64Array(8));return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n},fromValues:function(t,n,r,a,u,e,o,i){var c=changetype(new Float64Array(8));return c[0]=t,c[1]=n,c[2]=r,c[3]=a,c[4]=u,c[5]=e,c[6]=o,c[7]=i,c},fromRotationTranslationValues:function(t,n,r,a,u,e,o){var i=changetype(new Float64Array(8));i[0]=t,i[1]=n,i[2]=r,i[3]=a;var c=.5*u,s=.5*e,f=.5*o;return i[4]=c*a+s*r-f*n,i[5]=s*a+f*t-c*r,i[6]=f*a+c*n-s*t,i[7]=-c*t-s*n-f*r,i},fromRotationTranslation:bn,fromTranslation:function(t,n){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t[4]=.5*n[0],t[5]=.5*n[1],t[6]=.5*n[2],t[7]=0,t},fromRotation:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=0,t[5]=0,t[6]=0,t[7]=0,t},fromMat4:function(t,n){var r=Pt();z(r,n);var a=new Float64Array(3);return w(a,n),bn(t,r,a),t},copy:mn,identity:function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t[6]=0,t[7]=0,t},set:function(t,n,r,a,u,e,o,i,c){return t[0]=n,t[1]=r,t[2]=a,t[3]=u,t[4]=e,t[5]=o,t[6]=i,t[7]=c,t},getReal:dn,getDual:function(t,n){return t[0]=n[4],t[1]=n[5],t[2]=n[6],t[3]=n[7],t},setReal:gn,setDual:function(t,n){return t[4]=n[0],t[5]=n[1],t[6]=n[2],t[7]=n[3],t},getTranslation:function(t,n){var r=n[4],a=n[5],u=n[6],e=n[7],o=-n[0],i=-n[1],c=-n[2],s=n[3];return t[0]=2*(r*s+e*o+a*c-u*i),t[1]=2*(a*s+e*i+u*o-r*c),t[2]=2*(u*s+e*c+r*i-a*o),t},translate:function(t,n,r){var a=n[0],u=n[1],e=n[2],o=n[3],i=.5*r[0],c=.5*r[1],s=.5*r[2],f=n[4],h=n[5],M=n[6],l=n[7];return t[0]=a,t[1]=u,t[2]=e,t[3]=o,t[4]=o*i+u*s-e*c+f,t[5]=o*c+e*i-a*s+h,t[6]=o*s+a*c-u*i+M,t[7]=-a*i-u*c-e*s+l,t},rotateX:function(t,n,r){var a=-n[0],u=-n[1],e=-n[2],o=n[3],i=n[4],c=n[5],s=n[6],f=n[7],h=i*o+f*a+c*e-s*u,M=c*o+f*u+s*a-i*e,l=s*o+f*e+i*u-c*a,v=f*o-i*a-c*u-s*e;return It(t,n,r),a=t[0],u=t[1],e=t[2],o=t[3],t[4]=h*o+v*a+M*e-l*u,t[5]=M*o+v*u+l*a-h*e,t[6]=l*o+v*e+h*u-M*a,t[7]=v*o-h*a-M*u-l*e,t},rotateY:function(t,n,r){var a=-n[0],u=-n[1],e=-n[2],o=n[3],i=n[4],c=n[5],s=n[6],f=n[7],h=i*o+f*a+c*e-s*u,M=c*o+f*u+s*a-i*e,l=s*o+f*e+i*u-c*a,v=f*o-i*a-c*u-s*e;return Lt(t,n,r),a=t[0],u=t[1],e=t[2],o=t[3],t[4]=h*o+v*a+M*e-l*u,t[5]=M*o+v*u+l*a-h*e,t[6]=l*o+v*e+h*u-M*a,t[7]=v*o-h*a-M*u-l*e,t},rotateZ:function(t,n,r){var a=-n[0],u=-n[1],e=-n[2],o=n[3],i=n[4],c=n[5],s=n[6],f=n[7],h=i*o+f*a+c*e-s*u,M=c*o+f*u+s*a-i*e,l=s*o+f*e+i*u-c*a,v=f*o-i*a-c*u-s*e;return Vt(t,n,r),a=t[0],u=t[1],e=t[2],o=t[3],t[4]=h*o+v*a+M*e-l*u,t[5]=M*o+v*u+l*a-h*e,t[6]=l*o+v*e+h*u-M*a,t[7]=v*o-h*a-M*u-l*e,t},rotateByQuatAppend:function(t,n,r){var a=r[0],u=r[1],e=r[2],o=r[3],i=n[0],c=n[1],s=n[2],f=n[3];return t[0]=i*o+f*a+c*e-s*u,t[1]=c*o+f*u+s*a-i*e,t[2]=s*o+f*e+i*u-c*a,t[3]=f*o-i*a-c*u-s*e,i=n[4],c=n[5],s=n[6],f=n[7],t[4]=i*o+f*a+c*e-s*u,t[5]=c*o+f*u+s*a-i*e,t[6]=s*o+f*e+i*u-c*a,t[7]=f*o-i*a-c*u-s*e,t},rotateByQuatPrepend:function(t,n,r){var a=n[0],u=n[1],e=n[2],o=n[3],i=r[0],c=r[1],s=r[2],f=r[3];return t[0]=a*f+o*i+u*s-e*c,t[1]=u*f+o*c+e*i-a*s,t[2]=e*f+o*s+a*c-u*i,t[3]=o*f-a*i-u*c-e*s,i=r[4],c=r[5],s=r[6],f=r[7],t[4]=a*f+o*i+u*s-e*c,t[5]=u*f+o*c+e*i-a*s,t[6]=e*f+o*s+a*c-u*i,t[7]=o*f-a*i-u*c-e*s,t},rotateAroundAxis:function(t,a,u,e){if(Math.abs(e)0){r=Math.sqrt(r);var a=n[0]/r,u=n[1]/r,e=n[2]/r,o=n[3]/r,i=n[4],c=n[5],s=n[6],f=n[7],h=a*i+u*c+e*s+o*f;t[0]=a,t[1]=u,t[2]=e,t[3]=o,t[4]=(i-a*h)/r,t[5]=(c-u*h)/r,t[6]=(s-e*h)/r,t[7]=(f-o*h)/r}return t},str:function(t){return"quat2("+t[0].toString()+", "+t[1].toString()+", "+t[2].toString()+", "+t[3].toString()+", "+t[4].toString()+", "+t[5].toString()+", "+t[6].toString()+", "+t[7].toString()+")"},exactEquals:function(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[7]===n[7]},equals:function(t,a){var u=t[0],e=t[1],o=t[2],i=t[3],c=t[4],s=t[5],f=t[6],h=t[7],M=a[0],l=a[1],v=a[2],b=a[3],m=a[4],d=a[5],g=a[6],y=a[7];return Math.abs(u-M)<=r*n.max(1,Math.abs(u),Math.abs(M))&&Math.abs(e-l)<=r*n.max(1,Math.abs(e),Math.abs(l))&&Math.abs(o-v)<=r*n.max(1,Math.abs(o),Math.abs(v))&&Math.abs(i-b)<=r*n.max(1,Math.abs(i),Math.abs(b))&&Math.abs(c-m)<=r*n.max(1,Math.abs(c),Math.abs(m))&&Math.abs(s-d)<=r*n.max(1,Math.abs(s),Math.abs(d))&&Math.abs(f-g)<=r*n.max(1,Math.abs(f),Math.abs(g))&&Math.abs(h-y)<=r*n.max(1,Math.abs(h),Math.abs(y))}});function Fn(){var t=new Float64Array(2);return t[0]=0,t[1]=0,t}function zn(t,n,r){return t[0]=n[0]-r[0],t[1]=n[1]-r[1],t}function On(t,n,r){return t[0]=n[0]*r[0],t[1]=n[1]*r[1],t}function Rn(t,n,r){return t[0]=n[0]/r[0],t[1]=n[1]/r[1],t}function jn(t,r){var a=r[0]-t[0],u=r[1]-t[1];return n.hypot(a,u)}function En(t,n){var r=n[0]-t[0],a=n[1]-t[1];return r*r+a*a}function Pn(t){var n=t[0],r=t[1];return Math.hypot(n,r)}function Tn(t){var n=t[0],r=t[1];return n*n+r*r}var Dn=Pn,In=zn,Ln=On,Vn=Rn,Qn=jn,Zn=En,Nn=Tn,Xn=Fn(),Yn=function(t,r,a,u,e,o){var i,c;for(r||(r=2),a||(a=0),c=u?n.min(u*r+a,t.length):t.length,i=a;i0&&(u=1/Math.sqrt(u)),t[0]=n[0]*u,t[1]=n[1]*u,t},dot:function(t,n){return t[0]*n[0]+t[1]*n[1]},cross:function(t,n,r){var a=n[0]*r[1]-n[1]*r[0];return t[0]=t[1]=0,t[2]=a,t},lerp:function(t,n,r,a){var u=n[0],e=n[1];return t[0]=u+a*(r[0]-u),t[1]=e+a*(r[1]-e),t},random:function(t,n){n=n||1;var r=2*a()*Math.PI;return t[0]=Math.cos(r)*n,t[1]=Math.sin(r)*n,t},transformMat2:function(t,n,r){var a=n[0],u=n[1];return t[0]=r[0]*a+r[2]*u,t[1]=r[1]*a+r[3]*u,t},transformMat2d:function(t,n,r){var a=n[0],u=n[1];return t[0]=r[0]*a+r[2]*u+r[4],t[1]=r[1]*a+r[3]*u+r[5],t},transformMat3:function(t,n,r){var a=n[0],u=n[1];return t[0]=r[0]*a+r[3]*u+r[6],t[1]=r[1]*a+r[4]*u+r[7],t},transformMat4:function(t,n,r){var a=n[0],u=n[1];return t[0]=r[0]*a+r[4]*u+r[12],t[1]=r[1]*a+r[5]*u+r[13],t},rotate:function(t,n,r,a){var u=n[0]-r[0],e=n[1]-r[1],o=Math.sin(a),i=Math.cos(a);return t[0]=u*i-e*o+r[0],t[1]=u*o+e*i+r[1],t},angle:function(t,n){var r=t[0],a=t[1],u=n[0],e=n[1],o=Math.sqrt(r*r+a*a)*Math.sqrt(u*u+e*e),i=o&&(r*u+a*e)/o;return Math.acos(Math.min(Math.max(i,-1),1))},zero:function(t){return t[0]=0,t[1]=0,t},str:function(t){return"vec2("+t[0].toString()+", "+t[1].toString()+")"},exactEquals:function(t,n){return t[0]===n[0]&&t[1]===n[1]},equals:function(t,a){var u=t[0],e=t[1],o=a[0],i=a[1];return Math.abs(u-o)<=r*n.max(1,Math.abs(u),Math.abs(o))&&Math.abs(e-i)<=r*n.max(1,Math.abs(e),Math.abs(i))},len:Dn,sub:In,mul:Ln,div:Vn,dist:Qn,sqrDist:Zn,sqrLen:Nn,forEach:Yn});t.glMatrix=e,t.mat2=f,t.mat2d=b,t.mat3=x,t.mat4=I,t.quat=vn,t.quat2=wn,t.vec2=kn,t.vec3=ut,t.vec4=Et,Object.defineProperty(t,"__esModule",{value:!0})})); diff --git a/dist/gl-matrix.js b/dist/gl-matrix.js index c12935bf..00853f27 100644 --- a/dist/gl-matrix.js +++ b/dist/gl-matrix.js @@ -26,52 +26,7840 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -(function (factory) { - typeof define === 'function' && define.amd ? define(factory) : - factory(); -}((function () { 'use strict'; +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.glMatrix = {})); +}(this, (function (exports) { 'use strict'; - exports.__esModule = true; - exports.vec4 = exports.vec3 = exports.vec2 = exports.quat2 = exports.quat = exports.mat4 = exports.mat3 = exports.mat2d = exports.mat2 = exports.glMatrix = void 0; /// + // this file import things passed in from JS, and exports them for use by other + // AS modules. + // @ts-ignore + // prettier-ignore - var glMatrix = require("./common"); + /** + * Extended Math functions + * @module glMatrix + */ + var Maths; - exports.glMatrix = glMatrix; + (function (Maths) { + function min(a, b) { + return a < b ? a : b; + } - var mat2 = require("./mat2"); + Maths.min = min; - exports.mat2 = mat2; + function max(a, b, c) { + var q = Math.max(b, c); + return Math.max(a, q); + } - var mat2d = require("./mat2d"); + Maths.max = max; + })(Maths || (Maths = {})); - exports.mat2d = mat2d; + /** + * Common utilities + * @module glMatrix + */ + // Configuration Constants - var mat3 = require("./mat3"); + var EPSILON = 0.000001; + var RANDOM = Math.random; + var ANGLE_ORDER = "zyx"; + /** + * Sets the type of array used when creating new vectors and matrices + * + * @param {Object} type Array type, such as Float32Array or Array + */ - exports.mat3 = mat3; + function setMatrixArrayType(type) { + throw new Error("Not implemented yet"); + } + var degree = Math.PI / 180; + /** + * Convert Degree To Radian + * + * @param {Number} a Angle in Degrees + */ - var mat4 = require("./mat4"); + function toRadian(a) { + return a * degree; + } + /** + * Tests whether or not the arguments have approximately the same value, within an absolute + * or relative tolerance of glMatrix.EPSILON (an absolute tolerance is used for values less + * than or equal to 1.0, and a relative tolerance is used for larger values) + * + * @param {Number} a The first number to test. + * @param {Number} b The second number to test. + * @returns {Boolean} True if the numbers are approximately equal, false otherwise. + */ - exports.mat4 = mat4; + function equals$9(a, b) { + return Math.abs(a - b) <= EPSILON * Maths.max(1.0, Math.abs(a), Math.abs(b)); + } - var quat = require("./quat"); + var common = /*#__PURE__*/Object.freeze({ + __proto__: null, + EPSILON: EPSILON, + RANDOM: RANDOM, + ANGLE_ORDER: ANGLE_ORDER, + setMatrixArrayType: setMatrixArrayType, + toRadian: toRadian, + equals: equals$9 + }); - exports.quat = quat; + /** + * 2x2 Matrix + * @module mat2 + */ - var quat2 = require("./quat2"); + /** + * Creates a new identity mat2 + * + * @returns {mat2} a new 2x2 matrix + */ - exports.quat2 = quat2; + function create$8() { + var out = new Float64Array(4); //if (glMatrix.ARRAY_TYPE != Float32Array) { - var vec2 = require("./vec2"); + out[1] = 0; + out[2] = 0; //} - exports.vec2 = vec2; + out[0] = 1; + out[3] = 1; + return out; + } + /** + * Creates a new mat2 initialized with values from an existing matrix + * + * @param {ReadonlyMat2} a matrix to clone + * @returns {mat2} a new 2x2 matrix + */ - var vec3 = require("./vec3"); + function clone$8(a) { + var out = new Float64Array(4); + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[3]; + return out; + } + /** + * Copy the values from one mat2 to another + * + * @param {mat2} out the receiving matrix + * @param {ReadonlyMat2} a the source matrix + * @returns {mat2} out + */ - exports.vec3 = vec3; + function copy$8(out, a) { + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[3]; + return out; + } + /** + * Set a mat2 to the identity matrix + * + * @param {mat2} out the receiving matrix + * @returns {mat2} out + */ - var vec4 = require("./vec4"); + function identity$5(out) { + out[0] = 1; + out[1] = 0; + out[2] = 0; + out[3] = 1; + return out; + } + /** + * Create a new mat2 with the given values + * + * @param {Number} m00 Component in column 0, row 0 position (index 0) + * @param {Number} m01 Component in column 0, row 1 position (index 1) + * @param {Number} m10 Component in column 1, row 0 position (index 2) + * @param {Number} m11 Component in column 1, row 1 position (index 3) + * @returns {mat2} out A new 2x2 matrix + */ - exports.vec4 = vec4; + function fromValues$8(m00, m01, m10, m11) { + var out = new Float64Array(4); + out[0] = m00; + out[1] = m01; + out[2] = m10; + out[3] = m11; + return out; + } + /** + * Set the components of a mat2 to the given values + * + * @param {mat2} out the receiving matrix + * @param {Number} m00 Component in column 0, row 0 position (index 0) + * @param {Number} m01 Component in column 0, row 1 position (index 1) + * @param {Number} m10 Component in column 1, row 0 position (index 2) + * @param {Number} m11 Component in column 1, row 1 position (index 3) + * @returns {mat2} out + */ + + function set$8(out, m00, m01, m10, m11) { + out[0] = m00; + out[1] = m01; + out[2] = m10; + out[3] = m11; + return out; + } + /** + * Transpose the values of a mat2 + * + * @param {mat2} out the receiving matrix + * @param {ReadonlyMat2} a the source matrix + * @returns {mat2} out + */ + + function transpose$2(out, a) { + // If we are transposing ourselves we can skip a few steps but have to cache + // some values + if (out === a) { + var a1 = a[1]; + out[1] = a[2]; + out[2] = a1; + } else { + out[0] = a[0]; + out[1] = a[2]; + out[2] = a[1]; + out[3] = a[3]; + } + + return out; + } + /** + * Inverts a mat2 + * + * @param {mat2} out the receiving matrix + * @param {ReadonlyMat2} a the source matrix + * @returns {mat2} out + */ + + function invert$5(out, a) { + var a0 = a[0], + a1 = a[1], + a2 = a[2], + a3 = a[3]; // Calculate the determinant + + var det = a0 * a3 - a2 * a1; + + if (!det) { + return null; + } + + det = 1.0 / det; + out[0] = a3 * det; + out[1] = -a1 * det; + out[2] = -a2 * det; + out[3] = a0 * det; + return out; + } + /** + * Calculates the adjugate of a mat2 + * + * @param {mat2} out the receiving matrix + * @param {ReadonlyMat2} a the source matrix + * @returns {mat2} out + */ + + function adjoint$2(out, a) { + // Caching this value is necessary if out == a + var a0 = a[0]; + out[0] = a[3]; + out[1] = -a[1]; + out[2] = -a[2]; + out[3] = a0; + return out; + } + /** + * Calculates the determinant of a mat2 + * + * @param {ReadonlyMat2} a the source matrix + * @returns {Number} determinant of a + */ + + function determinant$3(a) { + return a[0] * a[3] - a[2] * a[1]; + } + /** + * Multiplies two mat2's + * + * @param {mat2} out the receiving matrix + * @param {ReadonlyMat2} a the first operand + * @param {ReadonlyMat2} b the second operand + * @returns {mat2} out + */ + + function multiply$8(out, a, b) { + var a0 = a[0], + a1 = a[1], + a2 = a[2], + a3 = a[3]; + var b0 = b[0], + b1 = b[1], + b2 = b[2], + b3 = b[3]; + out[0] = a0 * b0 + a2 * b1; + out[1] = a1 * b0 + a3 * b1; + out[2] = a0 * b2 + a2 * b3; + out[3] = a1 * b2 + a3 * b3; + return out; + } + /** + * Rotates a mat2 by the given angle + * + * @param {mat2} out the receiving matrix + * @param {ReadonlyMat2} a the matrix to rotate + * @param {Number} rad the angle to rotate the matrix by + * @returns {mat2} out + */ + + function rotate$4(out, a, rad) { + var a0 = a[0], + a1 = a[1], + a2 = a[2], + a3 = a[3]; + var s = Math.sin(rad); + var c = Math.cos(rad); + out[0] = a0 * c + a2 * s; + out[1] = a1 * c + a3 * s; + out[2] = a0 * -s + a2 * c; + out[3] = a1 * -s + a3 * c; + return out; + } + /** + * Scales the mat2 by the dimensions in the given vec2 + * + * @param {mat2} out the receiving matrix + * @param {ReadonlyMat2} a the matrix to rotate + * @param {ReadonlyVec2} v the vec2 to scale the matrix by + * @returns {mat2} out + **/ + + function scale$8(out, a, v) { + var a0 = a[0], + a1 = a[1], + a2 = a[2], + a3 = a[3]; + var v0 = v[0], + v1 = v[1]; + out[0] = a0 * v0; + out[1] = a1 * v0; + out[2] = a2 * v1; + out[3] = a3 * v1; + return out; + } + /** + * Creates a matrix from a given angle + * This is equivalent to (but much faster than): + * + * mat2.identity(dest); + * mat2.rotate(dest, dest, rad); + * + * @param {mat2} out mat2 receiving operation result + * @param {Number} rad the angle to rotate the matrix by + * @returns {mat2} out + */ + + function fromRotation$4(out, rad) { + var s = Math.sin(rad); + var c = Math.cos(rad); + out[0] = c; + out[1] = s; + out[2] = -s; + out[3] = c; + return out; + } + /** + * Creates a matrix from a vector scaling + * This is equivalent to (but much faster than): + * + * mat2.identity(dest); + * mat2.scale(dest, dest, vec); + * + * @param {mat2} out mat2 receiving operation result + * @param {ReadonlyVec2} v Scaling vector + * @returns {mat2} out + */ + + function fromScaling$3(out, v) { + out[0] = v[0]; + out[1] = 0; + out[2] = 0; + out[3] = v[1]; + return out; + } + /** + * Returns a string representation of a mat2 + * + * @param {ReadonlyMat2} a matrix to represent as a string + * @returns {String} string representation of the matrix + */ + + function str$8(a) { + return "mat2(" + a[0].toString() + ", " + a[1].toString() + ", " + a[2].toString() + ", " + a[3].toString() + ")"; + } + /** + * Returns Frobenius norm of a mat2 + * + * @param {ReadonlyMat2} a the matrix to calculate Frobenius norm of + * @returns {Number} Frobenius norm + */ + + function frob$3(a) { + return Maths.hypot(a[0], a[1], a[2], a[3]); + } + /** + * Returns L, D and U matrices (Lower triangular, Diagonal and Upper triangular) by factorizing the input matrix + * @param {ReadonlyMat2} L the lower triangular matrix + * @param {ReadonlyMat2} D the diagonal matrix + * @param {ReadonlyMat2} U the upper triangular matrix + * @param {ReadonlyMat2} a the input matrix to factorize + * @returns {Array} LDU + */ + + function LDU(L, D, U, a) { + L[2] = a[2] / a[0]; + U[0] = a[0]; + U[1] = a[1]; + U[3] = a[3] - L[2] * U[1]; + return [L, D, U]; + } + /** + * Adds two mat2's + * + * @param {mat2} out the receiving matrix + * @param {ReadonlyMat2} a the first operand + * @param {ReadonlyMat2} b the second operand + * @returns {mat2} out + */ + + function add$8(out, a, b) { + out[0] = a[0] + b[0]; + out[1] = a[1] + b[1]; + out[2] = a[2] + b[2]; + out[3] = a[3] + b[3]; + return out; + } + /** + * Subtracts matrix b from matrix a + * + * @param {mat2} out the receiving matrix + * @param {ReadonlyMat2} a the first operand + * @param {ReadonlyMat2} b the second operand + * @returns {mat2} out + */ + + function subtract$6(out, a, b) { + out[0] = a[0] - b[0]; + out[1] = a[1] - b[1]; + out[2] = a[2] - b[2]; + out[3] = a[3] - b[3]; + return out; + } + /** + * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===) + * + * @param {ReadonlyMat2} a The first matrix. + * @param {ReadonlyMat2} b The second matrix. + * @returns {Boolean} True if the matrices are equal, false otherwise. + */ + + function exactEquals$8(a, b) { + return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3]; + } + /** + * Returns whether or not the matrices have approximately the same elements in the same position. + * + * @param {ReadonlyMat2} a The first matrix. + * @param {ReadonlyMat2} b The second matrix. + * @returns {Boolean} True if the matrices are equal, false otherwise. + */ + + function equals$8(a, b) { + var a0 = a[0], + a1 = a[1], + a2 = a[2], + a3 = a[3]; + var b0 = b[0], + b1 = b[1], + b2 = b[2], + b3 = b[3]; + return Math.abs(a0 - b0) <= EPSILON * Maths.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= EPSILON * Maths.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= EPSILON * Maths.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= EPSILON * Maths.max(1.0, Math.abs(a3), Math.abs(b3)); + } + /** + * Multiply each element of the matrix by a scalar. + * + * @param {mat2} out the receiving matrix + * @param {ReadonlyMat2} a the matrix to scale + * @param {Number} b amount to scale the matrix's elements by + * @returns {mat2} out + */ + + function multiplyScalar$3(out, a, b) { + out[0] = a[0] * b; + out[1] = a[1] * b; + out[2] = a[2] * b; + out[3] = a[3] * b; + return out; + } + /** + * Adds two mat2's after multiplying each element of the second operand by a scalar value. + * + * @param {mat2} out the receiving vector + * @param {ReadonlyMat2} a the first operand + * @param {ReadonlyMat2} b the second operand + * @param {Number} scale the amount to scale b's elements by before adding + * @returns {mat2} out + */ + + function multiplyScalarAndAdd$3(out, a, b, scale) { + out[0] = a[0] + b[0] * scale; + out[1] = a[1] + b[1] * scale; + out[2] = a[2] + b[2] * scale; + out[3] = a[3] + b[3] * scale; + return out; + } + /** + * Alias for {@link mat2.multiply} + * @function + */ + + var mul$8 = multiply$8; + /** + * Alias for {@link mat2.subtract} + * @function + */ + + var sub$6 = subtract$6; + + var mat2 = /*#__PURE__*/Object.freeze({ + __proto__: null, + create: create$8, + clone: clone$8, + copy: copy$8, + identity: identity$5, + fromValues: fromValues$8, + set: set$8, + transpose: transpose$2, + invert: invert$5, + adjoint: adjoint$2, + determinant: determinant$3, + multiply: multiply$8, + rotate: rotate$4, + scale: scale$8, + fromRotation: fromRotation$4, + fromScaling: fromScaling$3, + str: str$8, + frob: frob$3, + LDU: LDU, + add: add$8, + subtract: subtract$6, + exactEquals: exactEquals$8, + equals: equals$8, + multiplyScalar: multiplyScalar$3, + multiplyScalarAndAdd: multiplyScalarAndAdd$3, + mul: mul$8, + sub: sub$6 + }); + + /** + * 2x3 Matrix + * @module mat2d + * @description + * A mat2d contains six elements defined as: + *
+     * [a, b,
+     *  c, d,
+     *  tx, ty]
+     * 
+ * This is a short form for the 3x3 matrix: + *
+     * [a, b, 0,
+     *  c, d, 0,
+     *  tx, ty, 1]
+     * 
+ * The last column is ignored so the array is shorter and operations are faster. + */ + + /** + * Creates a new identity mat2d + * + * @returns {mat2d} a new 2x3 matrix + */ + + function create$7() { + var out = new Float64Array(6); //if (mat2d != Float32Array) { + + out[1] = 0; + out[2] = 0; + out[4] = 0; + out[5] = 0; //} + + out[0] = 1; + out[3] = 1; + return out; + } + /** + * Creates a new mat2d initialized with values from an existing matrix + * + * @param {ReadonlyMat2d} a matrix to clone + * @returns {mat2d} a new 2x3 matrix + */ + + function clone$7(a) { + var out = new Float64Array(6); + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[3]; + out[4] = a[4]; + out[5] = a[5]; + return out; + } + /** + * Copy the values from one mat2d to another + * + * @param {mat2d} out the receiving matrix + * @param {ReadonlyMat2d} a the source matrix + * @returns {mat2d} out + */ + + function copy$7(out, a) { + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[3]; + out[4] = a[4]; + out[5] = a[5]; + return out; + } + /** + * Set a mat2d to the identity matrix + * + * @param {mat2d} out the receiving matrix + * @returns {mat2d} out + */ + + function identity$4(out) { + out[0] = 1; + out[1] = 0; + out[2] = 0; + out[3] = 1; + out[4] = 0; + out[5] = 0; + return out; + } + /** + * Create a new mat2d with the given values + * + * @param {Number} a Component A (index 0) + * @param {Number} b Component B (index 1) + * @param {Number} c Component C (index 2) + * @param {Number} d Component D (index 3) + * @param {Number} tx Component TX (index 4) + * @param {Number} ty Component TY (index 5) + * @returns {mat2d} A new mat2d + */ + + function fromValues$7(a, b, c, d, tx, ty) { + var out = new Float64Array(6); + out[0] = a; + out[1] = b; + out[2] = c; + out[3] = d; + out[4] = tx; + out[5] = ty; + return out; + } + /** + * Set the components of a mat2d to the given values + * + * @param {mat2d} out the receiving matrix + * @param {Number} a Component A (index 0) + * @param {Number} b Component B (index 1) + * @param {Number} c Component C (index 2) + * @param {Number} d Component D (index 3) + * @param {Number} tx Component TX (index 4) + * @param {Number} ty Component TY (index 5) + * @returns {mat2d} out + */ + + function set$7(out, a, b, c, d, tx, ty) { + out[0] = a; + out[1] = b; + out[2] = c; + out[3] = d; + out[4] = tx; + out[5] = ty; + return out; + } + /** + * Inverts a mat2d + * + * @param {mat2d} out the receiving matrix + * @param {ReadonlyMat2d} a the source matrix + * @returns {mat2d} out + */ + + function invert$4(out, a) { + var aa = a[0], + ab = a[1], + ac = a[2], + ad = a[3]; + var atx = a[4], + aty = a[5]; + var det = aa * ad - ab * ac; + + if (!det) { + return null; + } + + det = 1.0 / det; + out[0] = ad * det; + out[1] = -ab * det; + out[2] = -ac * det; + out[3] = aa * det; + out[4] = (ac * aty - ad * atx) * det; + out[5] = (ab * atx - aa * aty) * det; + return out; + } + /** + * Calculates the determinant of a mat2d + * + * @param {ReadonlyMat2d} a the source matrix + * @returns {Number} determinant of a + */ + + function determinant$2(a) { + return a[0] * a[3] - a[1] * a[2]; + } + /** + * Multiplies two mat2d's + * + * @param {mat2d} out the receiving matrix + * @param {ReadonlyMat2d} a the first operand + * @param {ReadonlyMat2d} b the second operand + * @returns {mat2d} out + */ + + function multiply$7(out, a, b) { + var a0 = a[0], + a1 = a[1], + a2 = a[2], + a3 = a[3], + a4 = a[4], + a5 = a[5]; + var b0 = b[0], + b1 = b[1], + b2 = b[2], + b3 = b[3], + b4 = b[4], + b5 = b[5]; + out[0] = a0 * b0 + a2 * b1; + out[1] = a1 * b0 + a3 * b1; + out[2] = a0 * b2 + a2 * b3; + out[3] = a1 * b2 + a3 * b3; + out[4] = a0 * b4 + a2 * b5 + a4; + out[5] = a1 * b4 + a3 * b5 + a5; + return out; + } + /** + * Rotates a mat2d by the given angle + * + * @param {mat2d} out the receiving matrix + * @param {ReadonlyMat2d} a the matrix to rotate + * @param {Number} rad the angle to rotate the matrix by + * @returns {mat2d} out + */ + + function rotate$3(out, a, rad) { + var a0 = a[0], + a1 = a[1], + a2 = a[2], + a3 = a[3], + a4 = a[4], + a5 = a[5]; + var s = Math.sin(rad); + var c = Math.cos(rad); + out[0] = a0 * c + a2 * s; + out[1] = a1 * c + a3 * s; + out[2] = a0 * -s + a2 * c; + out[3] = a1 * -s + a3 * c; + out[4] = a4; + out[5] = a5; + return out; + } + /** + * Scales the mat2d by the dimensions in the given vec2 + * + * @param {mat2d} out the receiving matrix + * @param {ReadonlyMat2d} a the matrix to translate + * @param {ReadonlyVec2} v the vec2 to scale the matrix by + * @returns {mat2d} out + **/ + + function scale$7(out, a, v) { + var a0 = a[0], + a1 = a[1], + a2 = a[2], + a3 = a[3], + a4 = a[4], + a5 = a[5]; + var v0 = v[0], + v1 = v[1]; + out[0] = a0 * v0; + out[1] = a1 * v0; + out[2] = a2 * v1; + out[3] = a3 * v1; + out[4] = a4; + out[5] = a5; + return out; + } + /** + * Translates the mat2d by the dimensions in the given vec2 + * + * @param {mat2d} out the receiving matrix + * @param {ReadonlyMat2d} a the matrix to translate + * @param {ReadonlyVec2} v the vec2 to translate the matrix by + * @returns {mat2d} out + **/ + + function translate$3(out, a, v) { + var a0 = a[0], + a1 = a[1], + a2 = a[2], + a3 = a[3], + a4 = a[4], + a5 = a[5]; + var v0 = v[0], + v1 = v[1]; + out[0] = a0; + out[1] = a1; + out[2] = a2; + out[3] = a3; + out[4] = a0 * v0 + a2 * v1 + a4; + out[5] = a1 * v0 + a3 * v1 + a5; + return out; + } + /** + * Creates a matrix from a given angle + * This is equivalent to (but much faster than): + * + * mat2d.identity(dest); + * mat2d.rotate(dest, dest, rad); + * + * @param {mat2d} out mat2d receiving operation result + * @param {Number} rad the angle to rotate the matrix by + * @returns {mat2d} out + */ + + function fromRotation$3(out, rad) { + var s = Math.sin(rad), + c = Math.cos(rad); + out[0] = c; + out[1] = s; + out[2] = -s; + out[3] = c; + out[4] = 0; + out[5] = 0; + return out; + } + /** + * Creates a matrix from a vector scaling + * This is equivalent to (but much faster than): + * + * mat2d.identity(dest); + * mat2d.scale(dest, dest, vec); + * + * @param {mat2d} out mat2d receiving operation result + * @param {ReadonlyVec2} v Scaling vector + * @returns {mat2d} out + */ + + function fromScaling$2(out, v) { + out[0] = v[0]; + out[1] = 0; + out[2] = 0; + out[3] = v[1]; + out[4] = 0; + out[5] = 0; + return out; + } + /** + * Creates a matrix from a vector translation + * This is equivalent to (but much faster than): + * + * mat2d.identity(dest); + * mat2d.translate(dest, dest, vec); + * + * @param {mat2d} out mat2d receiving operation result + * @param {ReadonlyVec2} v Translation vector + * @returns {mat2d} out + */ + + function fromTranslation$3(out, v) { + out[0] = 1; + out[1] = 0; + out[2] = 0; + out[3] = 1; + out[4] = v[0]; + out[5] = v[1]; + return out; + } + /** + * Returns a string representation of a mat2d + * + * @param {ReadonlyMat2d} a matrix to represent as a string + * @returns {String} string representation of the matrix + */ + + function str$7(a) { + return "mat2d(" + a[0].toString() + ", " + a[1].toString() + ", " + a[2].toString() + ", " + a[3].toString() + ", " + a[4].toString() + ", " + a[5].toString() + ")"; + } + /** + * Returns Frobenius norm of a mat2d + * + * @param {ReadonlyMat2d} a the matrix to calculate Frobenius norm of + * @returns {Number} Frobenius norm + */ + + function frob$2(a) { + return Maths.hypot(a[0], a[1], a[2], a[3], a[4], a[5], 1); + } + /** + * Adds two mat2d's + * + * @param {mat2d} out the receiving matrix + * @param {ReadonlyMat2d} a the first operand + * @param {ReadonlyMat2d} b the second operand + * @returns {mat2d} out + */ + + function add$7(out, a, b) { + out[0] = a[0] + b[0]; + out[1] = a[1] + b[1]; + out[2] = a[2] + b[2]; + out[3] = a[3] + b[3]; + out[4] = a[4] + b[4]; + out[5] = a[5] + b[5]; + return out; + } + /** + * Subtracts matrix b from matrix a + * + * @param {mat2d} out the receiving matrix + * @param {ReadonlyMat2d} a the first operand + * @param {ReadonlyMat2d} b the second operand + * @returns {mat2d} out + */ + + function subtract$5(out, a, b) { + out[0] = a[0] - b[0]; + out[1] = a[1] - b[1]; + out[2] = a[2] - b[2]; + out[3] = a[3] - b[3]; + out[4] = a[4] - b[4]; + out[5] = a[5] - b[5]; + return out; + } + /** + * Multiply each element of the matrix by a scalar. + * + * @param {mat2d} out the receiving matrix + * @param {ReadonlyMat2d} a the matrix to scale + * @param {Number} b amount to scale the matrix's elements by + * @returns {mat2d} out + */ + + function multiplyScalar$2(out, a, b) { + out[0] = a[0] * b; + out[1] = a[1] * b; + out[2] = a[2] * b; + out[3] = a[3] * b; + out[4] = a[4] * b; + out[5] = a[5] * b; + return out; + } + /** + * Adds two mat2d's after multiplying each element of the second operand by a scalar value. + * + * @param {mat2d} out the receiving vector + * @param {ReadonlyMat2d} a the first operand + * @param {ReadonlyMat2d} b the second operand + * @param {Number} scale the amount to scale b's elements by before adding + * @returns {mat2d} out + */ + + function multiplyScalarAndAdd$2(out, a, b, scale) { + out[0] = a[0] + b[0] * scale; + out[1] = a[1] + b[1] * scale; + out[2] = a[2] + b[2] * scale; + out[3] = a[3] + b[3] * scale; + out[4] = a[4] + b[4] * scale; + out[5] = a[5] + b[5] * scale; + return out; + } + /** + * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===) + * + * @param {ReadonlyMat2d} a The first matrix. + * @param {ReadonlyMat2d} b The second matrix. + * @returns {Boolean} True if the matrices are equal, false otherwise. + */ + + function exactEquals$7(a, b) { + return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5]; + } + /** + * Returns whether or not the matrices have approximately the same elements in the same position. + * + * @param {ReadonlyMat2d} a The first matrix. + * @param {ReadonlyMat2d} b The second matrix. + * @returns {Boolean} True if the matrices are equal, false otherwise. + */ + + function equals$7(a, b) { + var a0 = a[0], + a1 = a[1], + a2 = a[2], + a3 = a[3], + a4 = a[4], + a5 = a[5]; + var b0 = b[0], + b1 = b[1], + b2 = b[2], + b3 = b[3], + b4 = b[4], + b5 = b[5]; + return Math.abs(a0 - b0) <= EPSILON * Maths.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= EPSILON * Maths.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= EPSILON * Maths.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= EPSILON * Maths.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= EPSILON * Maths.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= EPSILON * Maths.max(1.0, Math.abs(a5), Math.abs(b5)); + } + /** + * Alias for {@link mat2d.multiply} + * @function + */ + + var mul$7 = multiply$7; + /** + * Alias for {@link mat2d.subtract} + * @function + */ + + var sub$5 = subtract$5; + + var mat2d = /*#__PURE__*/Object.freeze({ + __proto__: null, + create: create$7, + clone: clone$7, + copy: copy$7, + identity: identity$4, + fromValues: fromValues$7, + set: set$7, + invert: invert$4, + determinant: determinant$2, + multiply: multiply$7, + rotate: rotate$3, + scale: scale$7, + translate: translate$3, + fromRotation: fromRotation$3, + fromScaling: fromScaling$2, + fromTranslation: fromTranslation$3, + str: str$7, + frob: frob$2, + add: add$7, + subtract: subtract$5, + multiplyScalar: multiplyScalar$2, + multiplyScalarAndAdd: multiplyScalarAndAdd$2, + exactEquals: exactEquals$7, + equals: equals$7, + mul: mul$7, + sub: sub$5 + }); + + /** + * 3x3 Matrix + * @module mat3 + */ + + /** + * Creates a new identity mat3 + * + * @returns {mat3} a new 3x3 matrix + */ + + function create$6() { + var out = new Float64Array(9); //if (glMatrix.ARRAY_TYPE != Float32Array): mat3 { + + out[1] = 0; + out[2] = 0; + out[3] = 0; + out[5] = 0; + out[6] = 0; + out[7] = 0; //} + + out[0] = 1; + out[4] = 1; + out[8] = 1; + return out; + } + /** + * Copies the upper-left 3x3 values into the given mat3. + * + * @param {mat3} out the receiving 3x3 matrix + * @param {ReadonlyMat4} a the source 4x4 matrix + * @returns {mat3} out + */ + + function fromMat4$1(out, a) { + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[4]; + out[4] = a[5]; + out[5] = a[6]; + out[6] = a[8]; + out[7] = a[9]; + out[8] = a[10]; + return out; + } + /** + * Creates a new mat3 initialized with values from an existing matrix + * + * @param {ReadonlyMat3} a matrix to clone + * @returns {mat3} a new 3x3 matrix + */ + + function clone$6(a) { + var out = new Float64Array(9); + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[3]; + out[4] = a[4]; + out[5] = a[5]; + out[6] = a[6]; + out[7] = a[7]; + out[8] = a[8]; + return out; + } + /** + * Copy the values from one mat3 to another + * + * @param {mat3} out the receiving matrix + * @param {ReadonlyMat3} a the source matrix + * @returns {mat3} out + */ + + function copy$6(out, a) { + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[3]; + out[4] = a[4]; + out[5] = a[5]; + out[6] = a[6]; + out[7] = a[7]; + out[8] = a[8]; + return out; + } + /** + * Create a new mat3 with the given values + * + * @param {Number} m00 Component in column 0, row 0 position (index 0) + * @param {Number} m01 Component in column 0, row 1 position (index 1) + * @param {Number} m02 Component in column 0, row 2 position (index 2) + * @param {Number} m10 Component in column 1, row 0 position (index 3) + * @param {Number} m11 Component in column 1, row 1 position (index 4) + * @param {Number} m12 Component in column 1, row 2 position (index 5) + * @param {Number} m20 Component in column 2, row 0 position (index 6) + * @param {Number} m21 Component in column 2, row 1 position (index 7) + * @param {Number} m22 Component in column 2, row 2 position (index 8) + * @returns {mat3} A new mat3 + */ + + function fromValues$6(m00, m01, m02, m10, m11, m12, m20, m21, m22) { + var out = new Float64Array(9); + out[0] = m00; + out[1] = m01; + out[2] = m02; + out[3] = m10; + out[4] = m11; + out[5] = m12; + out[6] = m20; + out[7] = m21; + out[8] = m22; + return out; + } + /** + * Set the components of a mat3 to the given values + * + * @param {mat3} out the receiving matrix + * @param {Number} m00 Component in column 0, row 0 position (index 0) + * @param {Number} m01 Component in column 0, row 1 position (index 1) + * @param {Number} m02 Component in column 0, row 2 position (index 2) + * @param {Number} m10 Component in column 1, row 0 position (index 3) + * @param {Number} m11 Component in column 1, row 1 position (index 4) + * @param {Number} m12 Component in column 1, row 2 position (index 5) + * @param {Number} m20 Component in column 2, row 0 position (index 6) + * @param {Number} m21 Component in column 2, row 1 position (index 7) + * @param {Number} m22 Component in column 2, row 2 position (index 8) + * @returns {mat3} out + */ + + function set$6(out, m00, m01, m02, m10, m11, m12, m20, m21, m22) { + out[0] = m00; + out[1] = m01; + out[2] = m02; + out[3] = m10; + out[4] = m11; + out[5] = m12; + out[6] = m20; + out[7] = m21; + out[8] = m22; + return out; + } + /** + * Set a mat3 to the identity matrix + * + * @param {mat3} out the receiving matrix + * @returns {mat3} out + */ + + function identity$3(out) { + out[0] = 1; + out[1] = 0; + out[2] = 0; + out[3] = 0; + out[4] = 1; + out[5] = 0; + out[6] = 0; + out[7] = 0; + out[8] = 1; + return out; + } + /** + * Transpose the values of a mat3 + * + * @param {mat3} out the receiving matrix + * @param {ReadonlyMat3} a the source matrix + * @returns {mat3} out + */ + + function transpose$1(out, a) { + // If we are transposing ourselves we can skip a few steps but have to cache some values + if (out === a) { + var a01 = a[1], + a02 = a[2], + a12 = a[5]; + out[1] = a[3]; + out[2] = a[6]; + out[3] = a01; + out[5] = a[7]; + out[6] = a02; + out[7] = a12; + } else { + out[0] = a[0]; + out[1] = a[3]; + out[2] = a[6]; + out[3] = a[1]; + out[4] = a[4]; + out[5] = a[7]; + out[6] = a[2]; + out[7] = a[5]; + out[8] = a[8]; + } + + return out; + } + /** + * Inverts a mat3 + * + * @param {mat3} out the receiving matrix + * @param {ReadonlyMat3} a the source matrix + * @returns {mat3} out + */ + + function invert$3(out, a) { + var a00 = a[0], + a01 = a[1], + a02 = a[2]; + var a10 = a[3], + a11 = a[4], + a12 = a[5]; + var a20 = a[6], + a21 = a[7], + a22 = a[8]; + var b01 = a22 * a11 - a12 * a21; + var b11 = -a22 * a10 + a12 * a20; + var b21 = a21 * a10 - a11 * a20; // Calculate the determinant + + var det = a00 * b01 + a01 * b11 + a02 * b21; + + if (!det) { + return null; + } + + det = 1.0 / det; + out[0] = b01 * det; + out[1] = (-a22 * a01 + a02 * a21) * det; + out[2] = (a12 * a01 - a02 * a11) * det; + out[3] = b11 * det; + out[4] = (a22 * a00 - a02 * a20) * det; + out[5] = (-a12 * a00 + a02 * a10) * det; + out[6] = b21 * det; + out[7] = (-a21 * a00 + a01 * a20) * det; + out[8] = (a11 * a00 - a01 * a10) * det; + return out; + } + /** + * Calculates the adjugate of a mat3 + * + * @param {mat3} out the receiving matrix + * @param {ReadonlyMat3} a the source matrix + * @returns {mat3} out + */ + + function adjoint$1(out, a) { + var a00 = a[0], + a01 = a[1], + a02 = a[2]; + var a10 = a[3], + a11 = a[4], + a12 = a[5]; + var a20 = a[6], + a21 = a[7], + a22 = a[8]; + out[0] = a11 * a22 - a12 * a21; + out[1] = a02 * a21 - a01 * a22; + out[2] = a01 * a12 - a02 * a11; + out[3] = a12 * a20 - a10 * a22; + out[4] = a00 * a22 - a02 * a20; + out[5] = a02 * a10 - a00 * a12; + out[6] = a10 * a21 - a11 * a20; + out[7] = a01 * a20 - a00 * a21; + out[8] = a00 * a11 - a01 * a10; + return out; + } + /** + * Calculates the determinant of a mat3 + * + * @param {ReadonlyMat3} a the source matrix + * @returns {Number} determinant of a + */ + + function determinant$1(a) { + var a00 = a[0], + a01 = a[1], + a02 = a[2]; + var a10 = a[3], + a11 = a[4], + a12 = a[5]; + var a20 = a[6], + a21 = a[7], + a22 = a[8]; + return a00 * (a22 * a11 - a12 * a21) + a01 * (-a22 * a10 + a12 * a20) + a02 * (a21 * a10 - a11 * a20); + } + /** + * Multiplies two mat3's + * + * @param {mat3} out the receiving matrix + * @param {ReadonlyMat3} a the first operand + * @param {ReadonlyMat3} b the second operand + * @returns {mat3} out + */ + + function multiply$6(out, a, b) { + var a00 = a[0], + a01 = a[1], + a02 = a[2]; + var a10 = a[3], + a11 = a[4], + a12 = a[5]; + var a20 = a[6], + a21 = a[7], + a22 = a[8]; + var b00 = b[0], + b01 = b[1], + b02 = b[2]; + var b10 = b[3], + b11 = b[4], + b12 = b[5]; + var b20 = b[6], + b21 = b[7], + b22 = b[8]; + out[0] = b00 * a00 + b01 * a10 + b02 * a20; + out[1] = b00 * a01 + b01 * a11 + b02 * a21; + out[2] = b00 * a02 + b01 * a12 + b02 * a22; + out[3] = b10 * a00 + b11 * a10 + b12 * a20; + out[4] = b10 * a01 + b11 * a11 + b12 * a21; + out[5] = b10 * a02 + b11 * a12 + b12 * a22; + out[6] = b20 * a00 + b21 * a10 + b22 * a20; + out[7] = b20 * a01 + b21 * a11 + b22 * a21; + out[8] = b20 * a02 + b21 * a12 + b22 * a22; + return out; + } + /** + * Translate a mat3 by the given vector + * + * @param {mat3} out the receiving matrix + * @param {ReadonlyMat3} a the matrix to translate + * @param {ReadonlyVec2} v vector to translate by + * @returns {mat3} out + */ + + function translate$2(out, a, v) { + var a00 = a[0], + a01 = a[1], + a02 = a[2], + a10 = a[3], + a11 = a[4], + a12 = a[5], + a20 = a[6], + a21 = a[7], + a22 = a[8], + x = v[0], + y = v[1]; + out[0] = a00; + out[1] = a01; + out[2] = a02; + out[3] = a10; + out[4] = a11; + out[5] = a12; + out[6] = x * a00 + y * a10 + a20; + out[7] = x * a01 + y * a11 + a21; + out[8] = x * a02 + y * a12 + a22; + return out; + } + /** + * Rotates a mat3 by the given angle + * + * @param {mat3} out the receiving matrix + * @param {ReadonlyMat3} a the matrix to rotate + * @param {Number} rad the angle to rotate the matrix by + * @returns {mat3} out + */ + + function rotate$2(out, a, rad) { + var a00 = a[0], + a01 = a[1], + a02 = a[2], + a10 = a[3], + a11 = a[4], + a12 = a[5], + a20 = a[6], + a21 = a[7], + a22 = a[8], + s = Math.sin(rad), + c = Math.cos(rad); + out[0] = c * a00 + s * a10; + out[1] = c * a01 + s * a11; + out[2] = c * a02 + s * a12; + out[3] = c * a10 - s * a00; + out[4] = c * a11 - s * a01; + out[5] = c * a12 - s * a02; + out[6] = a20; + out[7] = a21; + out[8] = a22; + return out; + } + /** + * Scales the mat3 by the dimensions in the given vec2 + * + * @param {mat3} out the receiving matrix + * @param {ReadonlyMat3} a the matrix to rotate + * @param {ReadonlyVec2} v the vec2 to scale the matrix by + * @returns {mat3} out + **/ + + function scale$6(out, a, v) { + var x = v[0], + y = v[1]; + out[0] = x * a[0]; + out[1] = x * a[1]; + out[2] = x * a[2]; + out[3] = y * a[3]; + out[4] = y * a[4]; + out[5] = y * a[5]; + out[6] = a[6]; + out[7] = a[7]; + out[8] = a[8]; + return out; + } + /** + * Creates a matrix from a vector translation + * This is equivalent to (but much faster than): + * + * mat3.identity(dest); + * mat3.translate(dest, dest, vec); + * + * @param {mat3} out mat3 receiving operation result + * @param {ReadonlyVec2} v Translation vector + * @returns {mat3} out + */ + + function fromTranslation$2(out, v) { + out[0] = 1; + out[1] = 0; + out[2] = 0; + out[3] = 0; + out[4] = 1; + out[5] = 0; + out[6] = v[0]; + out[7] = v[1]; + out[8] = 1; + return out; + } + /** + * Creates a matrix from a given angle + * This is equivalent to (but much faster than): + * + * mat3.identity(dest); + * mat3.rotate(dest, dest, rad); + * + * @param {mat3} out mat3 receiving operation result + * @param {Number} rad the angle to rotate the matrix by + * @returns {mat3} out + */ + + function fromRotation$2(out, rad) { + var s = Math.sin(rad), + c = Math.cos(rad); + out[0] = c; + out[1] = s; + out[2] = 0; + out[3] = -s; + out[4] = c; + out[5] = 0; + out[6] = 0; + out[7] = 0; + out[8] = 1; + return out; + } + /** + * Creates a matrix from a vector scaling + * This is equivalent to (but much faster than): + * + * mat3.identity(dest); + * mat3.scale(dest, dest, vec); + * + * @param {mat3} out mat3 receiving operation result + * @param {ReadonlyVec2} v Scaling vector + * @returns {mat3} out + */ + + function fromScaling$1(out, v) { + out[0] = v[0]; + out[1] = 0; + out[2] = 0; + out[3] = 0; + out[4] = v[1]; + out[5] = 0; + out[6] = 0; + out[7] = 0; + out[8] = 1; + return out; + } + /** + * Copies the values from a mat2d into a mat3 + * + * @param {mat3} out the receiving matrix + * @param {ReadonlyMat2d} a the matrix to copy + * @returns {mat3} out + **/ + + function fromMat2d(out, a) { + out[0] = a[0]; + out[1] = a[1]; + out[2] = 0; + out[3] = a[2]; + out[4] = a[3]; + out[5] = 0; + out[6] = a[4]; + out[7] = a[5]; + out[8] = 1; + return out; + } + /** + * Calculates a 3x3 matrix from the given quaternion + * + * @param {mat3} out mat3 receiving operation result + * @param {ReadonlyQuat} q Quaternion to create matrix from + * + * @returns {mat3} out + */ + + function fromQuat$1(out, q) { + var x = q[0], + y = q[1], + z = q[2], + w = q[3]; + var x2 = x + x; + var y2 = y + y; + var z2 = z + z; + var xx = x * x2; + var yx = y * x2; + var yy = y * y2; + var zx = z * x2; + var zy = z * y2; + var zz = z * z2; + var wx = w * x2; + var wy = w * y2; + var wz = w * z2; + out[0] = 1 - yy - zz; + out[3] = yx - wz; + out[6] = zx + wy; + out[1] = yx + wz; + out[4] = 1 - xx - zz; + out[7] = zy - wx; + out[2] = zx - wy; + out[5] = zy + wx; + out[8] = 1 - xx - yy; + return out; + } + /** + * Calculates a 3x3 normal matrix (transpose inverse) from the 4x4 matrix + * + * @param {mat3} out mat3 receiving operation result + * @param {ReadonlyMat4} a Mat4 to derive the normal matrix from + * + * @returns {mat3} out + */ + + function normalFromMat4(out, a) { + var a00 = a[0], + a01 = a[1], + a02 = a[2], + a03 = a[3]; + var a10 = a[4], + a11 = a[5], + a12 = a[6], + a13 = a[7]; + var a20 = a[8], + a21 = a[9], + a22 = a[10], + a23 = a[11]; + var a30 = a[12], + a31 = a[13], + a32 = a[14], + a33 = a[15]; + var b00 = a00 * a11 - a01 * a10; + var b01 = a00 * a12 - a02 * a10; + var b02 = a00 * a13 - a03 * a10; + var b03 = a01 * a12 - a02 * a11; + var b04 = a01 * a13 - a03 * a11; + var b05 = a02 * a13 - a03 * a12; + var b06 = a20 * a31 - a21 * a30; + var b07 = a20 * a32 - a22 * a30; + var b08 = a20 * a33 - a23 * a30; + var b09 = a21 * a32 - a22 * a31; + var b10 = a21 * a33 - a23 * a31; + var b11 = a22 * a33 - a23 * a32; // Calculate the determinant + + var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06; + + if (!det) { + return null; + } + + det = 1.0 / det; + out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det; + out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det; + out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det; + out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det; + out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det; + out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det; + out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det; + out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det; + out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det; + return out; + } + /** + * Generates a 2D projection matrix with the given bounds + * + * @param {mat3} out mat3 frustum matrix will be written into + * @param {number} width Width of your gl context + * @param {number} height Height of gl context + * @returns {mat3} out + */ + + function projection(out, width, height) { + out[0] = 2 / width; + out[1] = 0; + out[2] = 0; + out[3] = 0; + out[4] = -2 / height; + out[5] = 0; + out[6] = -1; + out[7] = 1; + out[8] = 1; + return out; + } + /** + * Returns a string representation of a mat3 + * + * @param {ReadonlyMat3} a matrix to represent as a string + * @returns {String} string representation of the matrix + */ + + function str$6(a) { + return "mat3(" + a[0].toString() + ", " + a[1].toString() + ", " + a[2].toString() + ", " + a[3].toString() + ", " + a[4].toString() + ", " + a[5].toString() + ", " + a[6].toString() + ", " + a[7].toString() + ", " + a[8].toString() + ")"; + } + /** + * Returns Frobenius norm of a mat3 + * + * @param {ReadonlyMat3} a the matrix to calculate Frobenius norm of + * @returns {Number} Frobenius norm + */ + + function frob$1(a) { + return Maths.hypot(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8]); + } + /** + * Adds two mat3's + * + * @param {mat3} out the receiving matrix + * @param {ReadonlyMat3} a the first operand + * @param {ReadonlyMat3} b the second operand + * @returns {mat3} out + */ + + function add$6(out, a, b) { + out[0] = a[0] + b[0]; + out[1] = a[1] + b[1]; + out[2] = a[2] + b[2]; + out[3] = a[3] + b[3]; + out[4] = a[4] + b[4]; + out[5] = a[5] + b[5]; + out[6] = a[6] + b[6]; + out[7] = a[7] + b[7]; + out[8] = a[8] + b[8]; + return out; + } + /** + * Subtracts matrix b from matrix a + * + * @param {mat3} out the receiving matrix + * @param {ReadonlyMat3} a the first operand + * @param {ReadonlyMat3} b the second operand + * @returns {mat3} out + */ + + function subtract$4(out, a, b) { + out[0] = a[0] - b[0]; + out[1] = a[1] - b[1]; + out[2] = a[2] - b[2]; + out[3] = a[3] - b[3]; + out[4] = a[4] - b[4]; + out[5] = a[5] - b[5]; + out[6] = a[6] - b[6]; + out[7] = a[7] - b[7]; + out[8] = a[8] - b[8]; + return out; + } + /** + * Multiply each element of the matrix by a scalar. + * + * @param {mat3} out the receiving matrix + * @param {ReadonlyMat3} a the matrix to scale + * @param {Number} b amount to scale the matrix's elements by + * @returns {mat3} out + */ + + function multiplyScalar$1(out, a, b) { + out[0] = a[0] * b; + out[1] = a[1] * b; + out[2] = a[2] * b; + out[3] = a[3] * b; + out[4] = a[4] * b; + out[5] = a[5] * b; + out[6] = a[6] * b; + out[7] = a[7] * b; + out[8] = a[8] * b; + return out; + } + /** + * Adds two mat3's after multiplying each element of the second operand by a scalar value. + * + * @param {mat3} out the receiving vector + * @param {ReadonlyMat3} a the first operand + * @param {ReadonlyMat3} b the second operand + * @param {Number} scale the amount to scale b's elements by before adding + * @returns {mat3} out + */ + + function multiplyScalarAndAdd$1(out, a, b, scale) { + out[0] = a[0] + b[0] * scale; + out[1] = a[1] + b[1] * scale; + out[2] = a[2] + b[2] * scale; + out[3] = a[3] + b[3] * scale; + out[4] = a[4] + b[4] * scale; + out[5] = a[5] + b[5] * scale; + out[6] = a[6] + b[6] * scale; + out[7] = a[7] + b[7] * scale; + out[8] = a[8] + b[8] * scale; + return out; + } + /** + * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===) + * + * @param {ReadonlyMat3} a The first matrix. + * @param {ReadonlyMat3} b The second matrix. + * @returns {Boolean} True if the matrices are equal, false otherwise. + */ + + function exactEquals$6(a, b) { + return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5] && a[6] === b[6] && a[7] === b[7] && a[8] === b[8]; + } + /** + * Returns whether or not the matrices have approximately the same elements in the same position. + * + * @param {ReadonlyMat3} a The first matrix. + * @param {ReadonlyMat3} b The second matrix. + * @returns {Boolean} True if the matrices are equal, false otherwise. + */ + + function equals$6(a, b) { + var a0 = a[0], + a1 = a[1], + a2 = a[2], + a3 = a[3], + a4 = a[4], + a5 = a[5], + a6 = a[6], + a7 = a[7], + a8 = a[8]; + var b0 = b[0], + b1 = b[1], + b2 = b[2], + b3 = b[3], + b4 = b[4], + b5 = b[5], + b6 = b[6], + b7 = b[7], + b8 = b[8]; + return Math.abs(a0 - b0) <= EPSILON * Maths.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= EPSILON * Maths.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= EPSILON * Maths.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= EPSILON * Maths.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= EPSILON * Maths.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= EPSILON * Maths.max(1.0, Math.abs(a5), Math.abs(b5)) && Math.abs(a6 - b6) <= EPSILON * Maths.max(1.0, Math.abs(a6), Math.abs(b6)) && Math.abs(a7 - b7) <= EPSILON * Maths.max(1.0, Math.abs(a7), Math.abs(b7)) && Math.abs(a8 - b8) <= EPSILON * Maths.max(1.0, Math.abs(a8), Math.abs(b8)); + } + /** + * Alias for {@link mat3.multiply} + * @function + */ + + var mul$6 = multiply$6; + /** + * Alias for {@link mat3.subtract} + * @function + */ + + var sub$4 = subtract$4; + + var mat3 = /*#__PURE__*/Object.freeze({ + __proto__: null, + create: create$6, + fromMat4: fromMat4$1, + clone: clone$6, + copy: copy$6, + fromValues: fromValues$6, + set: set$6, + identity: identity$3, + transpose: transpose$1, + invert: invert$3, + adjoint: adjoint$1, + determinant: determinant$1, + multiply: multiply$6, + translate: translate$2, + rotate: rotate$2, + scale: scale$6, + fromTranslation: fromTranslation$2, + fromRotation: fromRotation$2, + fromScaling: fromScaling$1, + fromMat2d: fromMat2d, + fromQuat: fromQuat$1, + normalFromMat4: normalFromMat4, + projection: projection, + str: str$6, + frob: frob$1, + add: add$6, + subtract: subtract$4, + multiplyScalar: multiplyScalar$1, + multiplyScalarAndAdd: multiplyScalarAndAdd$1, + exactEquals: exactEquals$6, + equals: equals$6, + mul: mul$6, + sub: sub$4 + }); + + /** + * Object containing the following values: upDegrees, downDegrees, leftDegrees, rightDegrees + */ + + var Fov = + /** @class */ + function () { + function Fov() {} + + return Fov; + }(); + /** + * 4x4 Matrix
Format: column-major, when typed out it looks like row-major
The matrices are being post multiplied. + * @module mat4 + */ + + /** + * Creates a new identity mat4 + * + * @returns {mat4} a new 4x4 matrix + */ + + function create$5() { + var out = new Float64Array(16); //if (glMatrix.ARRAY_TYPE != Float32Array) { + + out[1] = 0; + out[2] = 0; + out[3] = 0; + out[4] = 0; + out[6] = 0; + out[7] = 0; + out[8] = 0; + out[9] = 0; + out[11] = 0; + out[12] = 0; + out[13] = 0; + out[14] = 0; //} + + out[0] = 1; + out[5] = 1; + out[10] = 1; + out[15] = 1; + return out; + } + /** + * Creates a new mat4 initialized with values from an existing matrix + * + * @param {ReadonlyMat4} a matrix to clone + * @returns {mat4} a new 4x4 matrix + */ + + function clone$5(a) { + var out = new Float64Array(16); + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[3]; + out[4] = a[4]; + out[5] = a[5]; + out[6] = a[6]; + out[7] = a[7]; + out[8] = a[8]; + out[9] = a[9]; + out[10] = a[10]; + out[11] = a[11]; + out[12] = a[12]; + out[13] = a[13]; + out[14] = a[14]; + out[15] = a[15]; + return out; + } + /** + * Copy the values from one mat4 to another + * + * @param {mat4} out the receiving matrix + * @param {ReadonlyMat4} a the source matrix + * @returns {mat4} out + */ + + function copy$5(out, a) { + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[3]; + out[4] = a[4]; + out[5] = a[5]; + out[6] = a[6]; + out[7] = a[7]; + out[8] = a[8]; + out[9] = a[9]; + out[10] = a[10]; + out[11] = a[11]; + out[12] = a[12]; + out[13] = a[13]; + out[14] = a[14]; + out[15] = a[15]; + return out; + } + /** + * Create a new mat4 with the given values + * + * @param {Number} m00 Component in column 0, row 0 position (index 0) + * @param {Number} m01 Component in column 0, row 1 position (index 1) + * @param {Number} m02 Component in column 0, row 2 position (index 2) + * @param {Number} m03 Component in column 0, row 3 position (index 3) + * @param {Number} m10 Component in column 1, row 0 position (index 4) + * @param {Number} m11 Component in column 1, row 1 position (index 5) + * @param {Number} m12 Component in column 1, row 2 position (index 6) + * @param {Number} m13 Component in column 1, row 3 position (index 7) + * @param {Number} m20 Component in column 2, row 0 position (index 8) + * @param {Number} m21 Component in column 2, row 1 position (index 9) + * @param {Number} m22 Component in column 2, row 2 position (index 10) + * @param {Number} m23 Component in column 2, row 3 position (index 11) + * @param {Number} m30 Component in column 3, row 0 position (index 12) + * @param {Number} m31 Component in column 3, row 1 position (index 13) + * @param {Number} m32 Component in column 3, row 2 position (index 14) + * @param {Number} m33 Component in column 3, row 3 position (index 15) + * @returns {mat4} A new mat4 + */ + + function fromValues$5(m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) { + var out = new Float64Array(16); + out[0] = m00; + out[1] = m01; + out[2] = m02; + out[3] = m03; + out[4] = m10; + out[5] = m11; + out[6] = m12; + out[7] = m13; + out[8] = m20; + out[9] = m21; + out[10] = m22; + out[11] = m23; + out[12] = m30; + out[13] = m31; + out[14] = m32; + out[15] = m33; + return out; + } + /** + * Set the components of a mat4 to the given values + * + * @param {mat4} out the receiving matrix + * @param {Number} m00 Component in column 0, row 0 position (index 0) + * @param {Number} m01 Component in column 0, row 1 position (index 1) + * @param {Number} m02 Component in column 0, row 2 position (index 2) + * @param {Number} m03 Component in column 0, row 3 position (index 3) + * @param {Number} m10 Component in column 1, row 0 position (index 4) + * @param {Number} m11 Component in column 1, row 1 position (index 5) + * @param {Number} m12 Component in column 1, row 2 position (index 6) + * @param {Number} m13 Component in column 1, row 3 position (index 7) + * @param {Number} m20 Component in column 2, row 0 position (index 8) + * @param {Number} m21 Component in column 2, row 1 position (index 9) + * @param {Number} m22 Component in column 2, row 2 position (index 10) + * @param {Number} m23 Component in column 2, row 3 position (index 11) + * @param {Number} m30 Component in column 3, row 0 position (index 12) + * @param {Number} m31 Component in column 3, row 1 position (index 13) + * @param {Number} m32 Component in column 3, row 2 position (index 14) + * @param {Number} m33 Component in column 3, row 3 position (index 15) + * @returns {mat4} out + */ + + function set$5(out, m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) { + out[0] = m00; + out[1] = m01; + out[2] = m02; + out[3] = m03; + out[4] = m10; + out[5] = m11; + out[6] = m12; + out[7] = m13; + out[8] = m20; + out[9] = m21; + out[10] = m22; + out[11] = m23; + out[12] = m30; + out[13] = m31; + out[14] = m32; + out[15] = m33; + return out; + } + /** + * Set a mat4 to the identity matrix + * + * @param {mat4} out the receiving matrix + * @returns {mat4} out + */ + + function identity$2(out) { + out[0] = 1; + out[1] = 0; + out[2] = 0; + out[3] = 0; + out[4] = 0; + out[5] = 1; + out[6] = 0; + out[7] = 0; + out[8] = 0; + out[9] = 0; + out[10] = 1; + out[11] = 0; + out[12] = 0; + out[13] = 0; + out[14] = 0; + out[15] = 1; + return out; + } + /** + * Transpose the values of a mat4 + * + * @param {mat4} out the receiving matrix + * @param {ReadonlyMat4} a the source matrix + * @returns {mat4} out + */ + + function transpose(out, a) { + // If we are transposing ourselves we can skip a few steps but have to cache some values + if (out === a) { + var a01 = a[1], + a02 = a[2], + a03 = a[3]; + var a12 = a[6], + a13 = a[7]; + var a23 = a[11]; + out[1] = a[4]; + out[2] = a[8]; + out[3] = a[12]; + out[4] = a01; + out[6] = a[9]; + out[7] = a[13]; + out[8] = a02; + out[9] = a12; + out[11] = a[14]; + out[12] = a03; + out[13] = a13; + out[14] = a23; + } else { + out[0] = a[0]; + out[1] = a[4]; + out[2] = a[8]; + out[3] = a[12]; + out[4] = a[1]; + out[5] = a[5]; + out[6] = a[9]; + out[7] = a[13]; + out[8] = a[2]; + out[9] = a[6]; + out[10] = a[10]; + out[11] = a[14]; + out[12] = a[3]; + out[13] = a[7]; + out[14] = a[11]; + out[15] = a[15]; + } + + return out; + } + /** + * Inverts a mat4 + * + * @param {mat4} out the receiving matrix + * @param {ReadonlyMat4} a the source matrix + * @returns {mat4} out + */ + + function invert$2(out, a) { + var a00 = a[0], + a01 = a[1], + a02 = a[2], + a03 = a[3]; + var a10 = a[4], + a11 = a[5], + a12 = a[6], + a13 = a[7]; + var a20 = a[8], + a21 = a[9], + a22 = a[10], + a23 = a[11]; + var a30 = a[12], + a31 = a[13], + a32 = a[14], + a33 = a[15]; + var b00 = a00 * a11 - a01 * a10; + var b01 = a00 * a12 - a02 * a10; + var b02 = a00 * a13 - a03 * a10; + var b03 = a01 * a12 - a02 * a11; + var b04 = a01 * a13 - a03 * a11; + var b05 = a02 * a13 - a03 * a12; + var b06 = a20 * a31 - a21 * a30; + var b07 = a20 * a32 - a22 * a30; + var b08 = a20 * a33 - a23 * a30; + var b09 = a21 * a32 - a22 * a31; + var b10 = a21 * a33 - a23 * a31; + var b11 = a22 * a33 - a23 * a32; // Calculate the determinant + + var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06; + + if (!det) { + return null; + } + + det = 1.0 / det; + out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det; + out[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det; + out[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det; + out[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det; + out[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det; + out[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det; + out[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det; + out[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det; + out[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det; + out[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det; + out[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det; + out[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det; + out[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det; + out[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det; + out[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det; + out[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det; + return out; + } + /** + * Calculates the adjugate of a mat4 + * + * @param {mat4} out the receiving matrix + * @param {ReadonlyMat4} a the source matrix + * @returns {mat4} out + */ + + function adjoint(out, a) { + var a00 = a[0], + a01 = a[1], + a02 = a[2], + a03 = a[3]; + var a10 = a[4], + a11 = a[5], + a12 = a[6], + a13 = a[7]; + var a20 = a[8], + a21 = a[9], + a22 = a[10], + a23 = a[11]; + var a30 = a[12], + a31 = a[13], + a32 = a[14], + a33 = a[15]; + var b00 = a00 * a11 - a01 * a10; + var b01 = a00 * a12 - a02 * a10; + var b02 = a00 * a13 - a03 * a10; + var b03 = a01 * a12 - a02 * a11; + var b04 = a01 * a13 - a03 * a11; + var b05 = a02 * a13 - a03 * a12; + var b06 = a20 * a31 - a21 * a30; + var b07 = a20 * a32 - a22 * a30; + var b08 = a20 * a33 - a23 * a30; + var b09 = a21 * a32 - a22 * a31; + var b10 = a21 * a33 - a23 * a31; + var b11 = a22 * a33 - a23 * a32; + out[0] = a11 * b11 - a12 * b10 + a13 * b09; + out[1] = a02 * b10 - a01 * b11 - a03 * b09; + out[2] = a31 * b05 - a32 * b04 + a33 * b03; + out[3] = a22 * b04 - a21 * b05 - a23 * b03; + out[4] = a12 * b08 - a10 * b11 - a13 * b07; + out[5] = a00 * b11 - a02 * b08 + a03 * b07; + out[6] = a32 * b02 - a30 * b05 - a33 * b01; + out[7] = a20 * b05 - a22 * b02 + a23 * b01; + out[8] = a10 * b10 - a11 * b08 + a13 * b06; + out[9] = a01 * b08 - a00 * b10 - a03 * b06; + out[10] = a30 * b04 - a31 * b02 + a33 * b00; + out[11] = a21 * b02 - a20 * b04 - a23 * b00; + out[12] = a11 * b07 - a10 * b09 - a12 * b06; + out[13] = a00 * b09 - a01 * b07 + a02 * b06; + out[14] = a31 * b01 - a30 * b03 - a32 * b00; + out[15] = a20 * b03 - a21 * b01 + a22 * b00; + return out; + } + /** + * Calculates the determinant of a mat4 + * + * @param {ReadonlyMat4} a the source matrix + * @returns {Number} determinant of a + */ + + function determinant(a) { + var a00 = a[0], + a01 = a[1], + a02 = a[2], + a03 = a[3]; + var a10 = a[4], + a11 = a[5], + a12 = a[6], + a13 = a[7]; + var a20 = a[8], + a21 = a[9], + a22 = a[10], + a23 = a[11]; + var a30 = a[12], + a31 = a[13], + a32 = a[14], + a33 = a[15]; + var b0 = a00 * a11 - a01 * a10; + var b1 = a00 * a12 - a02 * a10; + var b2 = a01 * a12 - a02 * a11; + var b3 = a20 * a31 - a21 * a30; + var b4 = a20 * a32 - a22 * a30; + var b5 = a21 * a32 - a22 * a31; + var b6 = a00 * b5 - a01 * b4 + a02 * b3; + var b7 = a10 * b5 - a11 * b4 + a12 * b3; + var b8 = a20 * b2 - a21 * b1 + a22 * b0; + var b9 = a30 * b2 - a31 * b1 + a32 * b0; // Calculate the determinant + + return a13 * b6 - a03 * b7 + a33 * b8 - a23 * b9; + } + /** + * Multiplies two mat4s + * + * @param {mat4} out the receiving matrix + * @param {ReadonlyMat4} a the first operand + * @param {ReadonlyMat4} b the second operand + * @returns {mat4} out + */ + + function multiply$5(out, a, b) { + var a00 = a[0], + a01 = a[1], + a02 = a[2], + a03 = a[3]; + var a10 = a[4], + a11 = a[5], + a12 = a[6], + a13 = a[7]; + var a20 = a[8], + a21 = a[9], + a22 = a[10], + a23 = a[11]; + var a30 = a[12], + a31 = a[13], + a32 = a[14], + a33 = a[15]; // Cache only the current line of the second matrix + + var b0 = b[0], + b1 = b[1], + b2 = b[2], + b3 = b[3]; + out[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; + out[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; + out[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; + out[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; + b0 = b[4]; + b1 = b[5]; + b2 = b[6]; + b3 = b[7]; + out[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; + out[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; + out[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; + out[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; + b0 = b[8]; + b1 = b[9]; + b2 = b[10]; + b3 = b[11]; + out[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; + out[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; + out[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; + out[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; + b0 = b[12]; + b1 = b[13]; + b2 = b[14]; + b3 = b[15]; + out[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; + out[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; + out[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; + out[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; + return out; + } + /** + * Translate a mat4 by the given vector + * + * @param {mat4} out the receiving matrix + * @param {ReadonlyMat4} a the matrix to translate + * @param {ReadonlyVec3} v vector to translate by + * @returns {mat4} out + */ + + function translate$1(out, a, v) { + var x = v[0], + y = v[1], + z = v[2]; + var a00, a01, a02, a03; + var a10, a11, a12, a13; + var a20, a21, a22, a23; + + if (a === out) { + out[12] = a[0] * x + a[4] * y + a[8] * z + a[12]; + out[13] = a[1] * x + a[5] * y + a[9] * z + a[13]; + out[14] = a[2] * x + a[6] * y + a[10] * z + a[14]; + out[15] = a[3] * x + a[7] * y + a[11] * z + a[15]; + } else { + a00 = a[0]; + a01 = a[1]; + a02 = a[2]; + a03 = a[3]; + a10 = a[4]; + a11 = a[5]; + a12 = a[6]; + a13 = a[7]; + a20 = a[8]; + a21 = a[9]; + a22 = a[10]; + a23 = a[11]; + out[0] = a00; + out[1] = a01; + out[2] = a02; + out[3] = a03; + out[4] = a10; + out[5] = a11; + out[6] = a12; + out[7] = a13; + out[8] = a20; + out[9] = a21; + out[10] = a22; + out[11] = a23; + out[12] = a00 * x + a10 * y + a20 * z + a[12]; + out[13] = a01 * x + a11 * y + a21 * z + a[13]; + out[14] = a02 * x + a12 * y + a22 * z + a[14]; + out[15] = a03 * x + a13 * y + a23 * z + a[15]; + } + + return out; + } + /** + * Scales the mat4 by the dimensions in the given vec3 not using vectorization + * + * @param {mat4} out the receiving matrix + * @param {ReadonlyMat4} a the matrix to scale + * @param {ReadonlyVec3} v the vec3 to scale the matrix by + * @returns {mat4} out + **/ + + function scale$5(out, a, v) { + var x = v[0], + y = v[1], + z = v[2]; + out[0] = a[0] * x; + out[1] = a[1] * x; + out[2] = a[2] * x; + out[3] = a[3] * x; + out[4] = a[4] * y; + out[5] = a[5] * y; + out[6] = a[6] * y; + out[7] = a[7] * y; + out[8] = a[8] * z; + out[9] = a[9] * z; + out[10] = a[10] * z; + out[11] = a[11] * z; + out[12] = a[12]; + out[13] = a[13]; + out[14] = a[14]; + out[15] = a[15]; + return out; + } + /** + * Rotates a mat4 by the given angle around the given axis + * + * @param {mat4} out the receiving matrix + * @param {ReadonlyMat4} a the matrix to rotate + * @param {Number} rad the angle to rotate the matrix by + * @param {ReadonlyVec3} axis the axis to rotate around + * @returns {mat4} out + */ + + function rotate$1(out, a, rad, axis) { + var x = axis[0], + y = axis[1], + z = axis[2]; + var len = Maths.hypot(x, y, z); + var s, c, t; + var a00, a01, a02, a03; + var a10, a11, a12, a13; + var a20, a21, a22, a23; + var b00, b01, b02; + var b10, b11, b12; + var b20, b21, b22; + + if (len < EPSILON) { + return null; + } + + len = 1 / len; + x *= len; + y *= len; + z *= len; + s = Math.sin(rad); + c = Math.cos(rad); + t = 1 - c; + a00 = a[0]; + a01 = a[1]; + a02 = a[2]; + a03 = a[3]; + a10 = a[4]; + a11 = a[5]; + a12 = a[6]; + a13 = a[7]; + a20 = a[8]; + a21 = a[9]; + a22 = a[10]; + a23 = a[11]; // Construct the elements of the rotation matrix + + b00 = x * x * t + c; + b01 = y * x * t + z * s; + b02 = z * x * t - y * s; + b10 = x * y * t - z * s; + b11 = y * y * t + c; + b12 = z * y * t + x * s; + b20 = x * z * t + y * s; + b21 = y * z * t - x * s; + b22 = z * z * t + c; // Perform rotation-specific matrix multiplication + + out[0] = a00 * b00 + a10 * b01 + a20 * b02; + out[1] = a01 * b00 + a11 * b01 + a21 * b02; + out[2] = a02 * b00 + a12 * b01 + a22 * b02; + out[3] = a03 * b00 + a13 * b01 + a23 * b02; + out[4] = a00 * b10 + a10 * b11 + a20 * b12; + out[5] = a01 * b10 + a11 * b11 + a21 * b12; + out[6] = a02 * b10 + a12 * b11 + a22 * b12; + out[7] = a03 * b10 + a13 * b11 + a23 * b12; + out[8] = a00 * b20 + a10 * b21 + a20 * b22; + out[9] = a01 * b20 + a11 * b21 + a21 * b22; + out[10] = a02 * b20 + a12 * b21 + a22 * b22; + out[11] = a03 * b20 + a13 * b21 + a23 * b22; + + if (a !== out) { + // If the source and destination differ, copy the unchanged last row + out[12] = a[12]; + out[13] = a[13]; + out[14] = a[14]; + out[15] = a[15]; + } + + return out; + } + /** + * Rotates a matrix by the given angle around the X axis + * + * @param {mat4} out the receiving matrix + * @param {ReadonlyMat4} a the matrix to rotate + * @param {Number} rad the angle to rotate the matrix by + * @returns {mat4} out + */ + + function rotateX$3(out, a, rad) { + var s = Math.sin(rad); + var c = Math.cos(rad); + var a10 = a[4]; + var a11 = a[5]; + var a12 = a[6]; + var a13 = a[7]; + var a20 = a[8]; + var a21 = a[9]; + var a22 = a[10]; + var a23 = a[11]; + + if (a !== out) { + // If the source and destination differ, copy the unchanged rows + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[3]; + out[12] = a[12]; + out[13] = a[13]; + out[14] = a[14]; + out[15] = a[15]; + } // Perform axis-specific matrix multiplication + + + out[4] = a10 * c + a20 * s; + out[5] = a11 * c + a21 * s; + out[6] = a12 * c + a22 * s; + out[7] = a13 * c + a23 * s; + out[8] = a20 * c - a10 * s; + out[9] = a21 * c - a11 * s; + out[10] = a22 * c - a12 * s; + out[11] = a23 * c - a13 * s; + return out; + } + /** + * Rotates a matrix by the given angle around the Y axis + * + * @param {mat4} out the receiving matrix + * @param {ReadonlyMat4} a the matrix to rotate + * @param {Number} rad the angle to rotate the matrix by + * @returns {mat4} out + */ + + function rotateY$3(out, a, rad) { + var s = Math.sin(rad); + var c = Math.cos(rad); + var a00 = a[0]; + var a01 = a[1]; + var a02 = a[2]; + var a03 = a[3]; + var a20 = a[8]; + var a21 = a[9]; + var a22 = a[10]; + var a23 = a[11]; + + if (a !== out) { + // If the source and destination differ, copy the unchanged rows + out[4] = a[4]; + out[5] = a[5]; + out[6] = a[6]; + out[7] = a[7]; + out[12] = a[12]; + out[13] = a[13]; + out[14] = a[14]; + out[15] = a[15]; + } // Perform axis-specific matrix multiplication + + + out[0] = a00 * c - a20 * s; + out[1] = a01 * c - a21 * s; + out[2] = a02 * c - a22 * s; + out[3] = a03 * c - a23 * s; + out[8] = a00 * s + a20 * c; + out[9] = a01 * s + a21 * c; + out[10] = a02 * s + a22 * c; + out[11] = a03 * s + a23 * c; + return out; + } + /** + * Rotates a matrix by the given angle around the Z axis + * + * @param {mat4} out the receiving matrix + * @param {ReadonlyMat4} a the matrix to rotate + * @param {Number} rad the angle to rotate the matrix by + * @returns {mat4} out + */ + + function rotateZ$3(out, a, rad) { + var s = Math.sin(rad); + var c = Math.cos(rad); + var a00 = a[0]; + var a01 = a[1]; + var a02 = a[2]; + var a03 = a[3]; + var a10 = a[4]; + var a11 = a[5]; + var a12 = a[6]; + var a13 = a[7]; + + if (a !== out) { + // If the source and destination differ, copy the unchanged last row + out[8] = a[8]; + out[9] = a[9]; + out[10] = a[10]; + out[11] = a[11]; + out[12] = a[12]; + out[13] = a[13]; + out[14] = a[14]; + out[15] = a[15]; + } // Perform axis-specific matrix multiplication + + + out[0] = a00 * c + a10 * s; + out[1] = a01 * c + a11 * s; + out[2] = a02 * c + a12 * s; + out[3] = a03 * c + a13 * s; + out[4] = a10 * c - a00 * s; + out[5] = a11 * c - a01 * s; + out[6] = a12 * c - a02 * s; + out[7] = a13 * c - a03 * s; + return out; + } + /** + * Creates a matrix from a vector translation + * This is equivalent to (but much faster than): + * + * mat4.identity(dest); + * mat4.translate(dest, dest, vec); + * + * @param {mat4} out mat4 receiving operation result + * @param {ReadonlyVec3} v Translation vector + * @returns {mat4} out + */ + + function fromTranslation$1(out, v) { + out[0] = 1; + out[1] = 0; + out[2] = 0; + out[3] = 0; + out[4] = 0; + out[5] = 1; + out[6] = 0; + out[7] = 0; + out[8] = 0; + out[9] = 0; + out[10] = 1; + out[11] = 0; + out[12] = v[0]; + out[13] = v[1]; + out[14] = v[2]; + out[15] = 1; + return out; + } + /** + * Creates a matrix from a vector scaling + * This is equivalent to (but much faster than): + * + * mat4.identity(dest); + * mat4.scale(dest, dest, vec); + * + * @param {mat4} out mat4 receiving operation result + * @param {ReadonlyVec3} v Scaling vector + * @returns {mat4} out + */ + + function fromScaling(out, v) { + out[0] = v[0]; + out[1] = 0; + out[2] = 0; + out[3] = 0; + out[4] = 0; + out[5] = v[1]; + out[6] = 0; + out[7] = 0; + out[8] = 0; + out[9] = 0; + out[10] = v[2]; + out[11] = 0; + out[12] = 0; + out[13] = 0; + out[14] = 0; + out[15] = 1; + return out; + } + /** + * Creates a matrix from a given angle around a given axis + * This is equivalent to (but much faster than): + * + * mat4.identity(dest); + * mat4.rotate(dest, dest, rad: f64, axis: vec3.ReadonlyVec3); + * + * @param {mat4} out mat4 receiving operation result + * @param {Number} rad the angle to rotate the matrix by + * @param {ReadonlyVec3} axis the axis to rotate around + * @returns {mat4} out + */ + + function fromRotation$1(out, rad, axis) { + var x = axis[0], + y = axis[1], + z = axis[2]; + var len = Maths.hypot(x, y, z); + var s, c, t; + + if (len < EPSILON) { + return null; + } + + len = 1 / len; + x *= len; + y *= len; + z *= len; + s = Math.sin(rad); + c = Math.cos(rad); + t = 1 - c; // Perform rotation-specific matrix multiplication + + out[0] = x * x * t + c; + out[1] = y * x * t + z * s; + out[2] = z * x * t - y * s; + out[3] = 0; + out[4] = x * y * t - z * s; + out[5] = y * y * t + c; + out[6] = z * y * t + x * s; + out[7] = 0; + out[8] = x * z * t + y * s; + out[9] = y * z * t - x * s; + out[10] = z * z * t + c; + out[11] = 0; + out[12] = 0; + out[13] = 0; + out[14] = 0; + out[15] = 1; + return out; + } + /** + * Creates a matrix from the given angle around the X axis + * This is equivalent to (but much faster than): + * + * mat4.identity(dest); + * mat4.rotateX(dest, dest, rad); + * + * @param {mat4} out mat4 receiving operation result + * @param {Number} rad the angle to rotate the matrix by + * @returns {mat4} out + */ + + function fromXRotation(out, rad) { + var s = Math.sin(rad); + var c = Math.cos(rad); // Perform axis-specific matrix multiplication + + out[0] = 1; + out[1] = 0; + out[2] = 0; + out[3] = 0; + out[4] = 0; + out[5] = c; + out[6] = s; + out[7] = 0; + out[8] = 0; + out[9] = -s; + out[10] = c; + out[11] = 0; + out[12] = 0; + out[13] = 0; + out[14] = 0; + out[15] = 1; + return out; + } + /** + * Creates a matrix from the given angle around the Y axis + * This is equivalent to (but much faster than): + * + * mat4.identity(dest); + * mat4.rotateY(dest, dest, rad); + * + * @param {mat4} out mat4 receiving operation result + * @param {Number} rad the angle to rotate the matrix by + * @returns {mat4} out + */ + + function fromYRotation(out, rad) { + var s = Math.sin(rad); + var c = Math.cos(rad); // Perform axis-specific matrix multiplication + + out[0] = c; + out[1] = 0; + out[2] = -s; + out[3] = 0; + out[4] = 0; + out[5] = 1; + out[6] = 0; + out[7] = 0; + out[8] = s; + out[9] = 0; + out[10] = c; + out[11] = 0; + out[12] = 0; + out[13] = 0; + out[14] = 0; + out[15] = 1; + return out; + } + /** + * Creates a matrix from the given angle around the Z axis + * This is equivalent to (but much faster than): + * + * mat4.identity(dest); + * mat4.rotateZ(dest, dest, rad); + * + * @param {mat4} out mat4 receiving operation result + * @param {Number} rad the angle to rotate the matrix by + * @returns {mat4} out + */ + + function fromZRotation(out, rad) { + var s = Math.sin(rad); + var c = Math.cos(rad); // Perform axis-specific matrix multiplication + + out[0] = c; + out[1] = s; + out[2] = 0; + out[3] = 0; + out[4] = -s; + out[5] = c; + out[6] = 0; + out[7] = 0; + out[8] = 0; + out[9] = 0; + out[10] = 1; + out[11] = 0; + out[12] = 0; + out[13] = 0; + out[14] = 0; + out[15] = 1; + return out; + } + /** + * Creates a matrix from a quaternion rotation and vector translation + * This is equivalent to (but much faster than): + * + * mat4.identity(dest); + * mat4.translate(dest, vec); + * let quatMat = mat4.create(); + * quat4.toMat4(quat, quatMat); + * mat4.multiply(dest, quatMat); + * + * @param {mat4} out mat4 receiving operation result + * @param {quat4} q Rotation quaternion + * @param {ReadonlyVec3} v Translation vector + * @returns {mat4} out + */ + + function fromRotationTranslation$1(out, q, v) { + // Quaternion math + var x = q[0], + y = q[1], + z = q[2], + w = q[3]; + var x2 = x + x; + var y2 = y + y; + var z2 = z + z; + var xx = x * x2; + var xy = x * y2; + var xz = x * z2; + var yy = y * y2; + var yz = y * z2; + var zz = z * z2; + var wx = w * x2; + var wy = w * y2; + var wz = w * z2; + out[0] = 1 - (yy + zz); + out[1] = xy + wz; + out[2] = xz - wy; + out[3] = 0; + out[4] = xy - wz; + out[5] = 1 - (xx + zz); + out[6] = yz + wx; + out[7] = 0; + out[8] = xz + wy; + out[9] = yz - wx; + out[10] = 1 - (xx + yy); + out[11] = 0; + out[12] = v[0]; + out[13] = v[1]; + out[14] = v[2]; + out[15] = 1; + return out; + } + /** + * Creates a new mat4 from a dual quat. + * + * @param {mat4} out Matrix + * @param {ReadonlyQuat2} a Dual Quaternion + * @returns {mat4} mat4 receiving operation result + */ + + function fromQuat2(out, a) { + var translation = new Float64Array(3); + var bx = -a[0], + by = -a[1], + bz = -a[2], + bw = a[3], + ax = a[4], + ay = a[5], + az = a[6], + aw = a[7]; + var magnitude = bx * bx + by * by + bz * bz + bw * bw; //Only scale if it makes sense + + if (magnitude > 0) { + translation[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2 / magnitude; + translation[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2 / magnitude; + translation[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2 / magnitude; + } else { + translation[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2; + translation[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2; + translation[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2; + } + + fromRotationTranslation$1(out, a, translation); + return out; + } + /** + * Returns the translation vector component of a transformation + * matrix. If a matrix is built with fromRotationTranslation, + * the returned vector will be the same as the translation vector + * originally supplied. + * @param {vec3} out Vector to receive translation component + * @param {ReadonlyMat4} mat Matrix to be decomposed (input) + * @return {vec3} out + */ + + function getTranslation$1(out, mat) { + out[0] = mat[12]; + out[1] = mat[13]; + out[2] = mat[14]; + return out; + } + /** + * Returns the scaling factor component of a transformation + * matrix. If a matrix is built with fromRotationTranslationScale + * with a normalized Quaternion paramter, the returned vector will be + * the same as the scaling vector + * originally supplied. + * @param {vec3} out Vector to receive scaling factor component + * @param {ReadonlyMat4} mat Matrix to be decomposed (input) + * @return {vec3} out + */ + + function getScaling(out, mat) { + var m11 = mat[0]; + var m12 = mat[1]; + var m13 = mat[2]; + var m21 = mat[4]; + var m22 = mat[5]; + var m23 = mat[6]; + var m31 = mat[8]; + var m32 = mat[9]; + var m33 = mat[10]; + out[0] = Maths.hypot(m11, m12, m13); + out[1] = Maths.hypot(m21, m22, m23); + out[2] = Maths.hypot(m31, m32, m33); + return out; + } + /** + * Returns a quaternion representing the rotational component + * of a transformation matrix. If a matrix is built with + * fromRotationTranslation, the returned quaternion will be the + * same as the quaternion originally supplied. + * @param {quat} out Quaternion to receive the rotation component + * @param {ReadonlyMat4} mat Matrix to be decomposed (input) + * @return {quat} out + */ + + function getRotation(out, mat) { + var scaling = changetype(new Float64Array(3)); + getScaling(scaling, mat); + var is1 = 1 / scaling[0]; + var is2 = 1 / scaling[1]; + var is3 = 1 / scaling[2]; + var sm11 = mat[0] * is1; + var sm12 = mat[1] * is2; + var sm13 = mat[2] * is3; + var sm21 = mat[4] * is1; + var sm22 = mat[5] * is2; + var sm23 = mat[6] * is3; + var sm31 = mat[8] * is1; + var sm32 = mat[9] * is2; + var sm33 = mat[10] * is3; + var trace = sm11 + sm22 + sm33; + var S = 0; + + if (trace > 0) { + S = Math.sqrt(trace + 1.0) * 2; + out[3] = 0.25 * S; + out[0] = (sm23 - sm32) / S; + out[1] = (sm31 - sm13) / S; + out[2] = (sm12 - sm21) / S; + } else if (sm11 > sm22 && sm11 > sm33) { + S = Math.sqrt(1.0 + sm11 - sm22 - sm33) * 2; + out[3] = (sm23 - sm32) / S; + out[0] = 0.25 * S; + out[1] = (sm12 + sm21) / S; + out[2] = (sm31 + sm13) / S; + } else if (sm22 > sm33) { + S = Math.sqrt(1.0 + sm22 - sm11 - sm33) * 2; + out[3] = (sm31 - sm13) / S; + out[0] = (sm12 + sm21) / S; + out[1] = 0.25 * S; + out[2] = (sm23 + sm32) / S; + } else { + S = Math.sqrt(1.0 + sm33 - sm11 - sm22) * 2; + out[3] = (sm12 - sm21) / S; + out[0] = (sm31 + sm13) / S; + out[1] = (sm23 + sm32) / S; + out[2] = 0.25 * S; + } + + return out; + } + /** + * Decomposes a transformation matrix into its rotation, translation + * and scale components. Returns only the rotation component + * @param {quat} out_r Quaternion to receive the rotation component + * @param {vec3} out_t Vector to receive the translation vector + * @param {vec3} out_s Vector to receive the scaling factor + * @param {ReadonlyMat4} mat Matrix to be decomposed (input) + * @returns {quat} out_r + */ + + function decompose(out_r, out_t, out_s, mat) { + out_t[0] = mat[12]; + out_t[1] = mat[13]; + out_t[2] = mat[14]; + var m11 = mat[0]; + var m12 = mat[1]; + var m13 = mat[2]; + var m21 = mat[4]; + var m22 = mat[5]; + var m23 = mat[6]; + var m31 = mat[8]; + var m32 = mat[9]; + var m33 = mat[10]; + out_s[0] = Maths.hypot(m11, m12, m13); + out_s[1] = Maths.hypot(m21, m22, m23); + out_s[2] = Maths.hypot(m31, m32, m33); + var is1 = 1 / out_s[0]; + var is2 = 1 / out_s[1]; + var is3 = 1 / out_s[2]; + var sm11 = m11 * is1; + var sm12 = m12 * is2; + var sm13 = m13 * is3; + var sm21 = m21 * is1; + var sm22 = m22 * is2; + var sm23 = m23 * is3; + var sm31 = m31 * is1; + var sm32 = m32 * is2; + var sm33 = m33 * is3; + var trace = sm11 + sm22 + sm33; + var S = 0; + + if (trace > 0) { + S = Math.sqrt(trace + 1.0) * 2; + out_r[3] = 0.25 * S; + out_r[0] = (sm23 - sm32) / S; + out_r[1] = (sm31 - sm13) / S; + out_r[2] = (sm12 - sm21) / S; + } else if (sm11 > sm22 && sm11 > sm33) { + S = Math.sqrt(1.0 + sm11 - sm22 - sm33) * 2; + out_r[3] = (sm23 - sm32) / S; + out_r[0] = 0.25 * S; + out_r[1] = (sm12 + sm21) / S; + out_r[2] = (sm31 + sm13) / S; + } else if (sm22 > sm33) { + S = Math.sqrt(1.0 + sm22 - sm11 - sm33) * 2; + out_r[3] = (sm31 - sm13) / S; + out_r[0] = (sm12 + sm21) / S; + out_r[1] = 0.25 * S; + out_r[2] = (sm23 + sm32) / S; + } else { + S = Math.sqrt(1.0 + sm33 - sm11 - sm22) * 2; + out_r[3] = (sm12 - sm21) / S; + out_r[0] = (sm31 + sm13) / S; + out_r[1] = (sm23 + sm32) / S; + out_r[2] = 0.25 * S; + } + + return out_r; + } + /** + * Creates a matrix from a quaternion rotation, vector translation and vector scale + * This is equivalent to (but much faster than): + * + * mat4.identity(dest); + * mat4.translate(dest, vec); + * let quatMat = mat4.create(); + * quat4.toMat4(quat, quatMat); + * mat4.multiply(dest, quatMat); + * mat4.scale(dest, scale) + * + * @param {mat4} out mat4 receiving operation result + * @param {quat4} q Rotation quaternion + * @param {ReadonlyVec3} v Translation vector + * @param {ReadonlyVec3} s Scaling vector + * @returns {mat4} out + */ + + function fromRotationTranslationScale(out, q, v, s) { + // Quaternion math + var x = q[0], + y = q[1], + z = q[2], + w = q[3]; + var x2 = x + x; + var y2 = y + y; + var z2 = z + z; + var xx = x * x2; + var xy = x * y2; + var xz = x * z2; + var yy = y * y2; + var yz = y * z2; + var zz = z * z2; + var wx = w * x2; + var wy = w * y2; + var wz = w * z2; + var sx = s[0]; + var sy = s[1]; + var sz = s[2]; + out[0] = (1 - (yy + zz)) * sx; + out[1] = (xy + wz) * sx; + out[2] = (xz - wy) * sx; + out[3] = 0; + out[4] = (xy - wz) * sy; + out[5] = (1 - (xx + zz)) * sy; + out[6] = (yz + wx) * sy; + out[7] = 0; + out[8] = (xz + wy) * sz; + out[9] = (yz - wx) * sz; + out[10] = (1 - (xx + yy)) * sz; + out[11] = 0; + out[12] = v[0]; + out[13] = v[1]; + out[14] = v[2]; + out[15] = 1; + return out; + } + /** + * Creates a matrix from a quaternion rotation, vector translation and vector scale, rotating and scaling around the given origin + * This is equivalent to (but much faster than): + * + * mat4.identity(dest); + * mat4.translate(dest, vec); + * mat4.translate(dest, origin); + * let quatMat = mat4.create(); + * quat4.toMat4(quat, quatMat); + * mat4.multiply(dest, quatMat); + * mat4.scale(dest, scale) + * mat4.translate(dest, negativeOrigin); + * + * @param {mat4} out mat4 receiving operation result + * @param {quat4} q Rotation quaternion + * @param {ReadonlyVec3} v Translation vector + * @param {ReadonlyVec3} s Scaling vector + * @param {ReadonlyVec3} o The origin vector around which to scale and rotate + * @returns {mat4} out + */ + + function fromRotationTranslationScaleOrigin(out, q, v, s, o) { + // Quaternion math + var x = q[0], + y = q[1], + z = q[2], + w = q[3]; + var x2 = x + x; + var y2 = y + y; + var z2 = z + z; + var xx = x * x2; + var xy = x * y2; + var xz = x * z2; + var yy = y * y2; + var yz = y * z2; + var zz = z * z2; + var wx = w * x2; + var wy = w * y2; + var wz = w * z2; + var sx = s[0]; + var sy = s[1]; + var sz = s[2]; + var ox = o[0]; + var oy = o[1]; + var oz = o[2]; + var out0 = (1 - (yy + zz)) * sx; + var out1 = (xy + wz) * sx; + var out2 = (xz - wy) * sx; + var out4 = (xy - wz) * sy; + var out5 = (1 - (xx + zz)) * sy; + var out6 = (yz + wx) * sy; + var out8 = (xz + wy) * sz; + var out9 = (yz - wx) * sz; + var out10 = (1 - (xx + yy)) * sz; + out[0] = out0; + out[1] = out1; + out[2] = out2; + out[3] = 0; + out[4] = out4; + out[5] = out5; + out[6] = out6; + out[7] = 0; + out[8] = out8; + out[9] = out9; + out[10] = out10; + out[11] = 0; + out[12] = v[0] + ox - (out0 * ox + out4 * oy + out8 * oz); + out[13] = v[1] + oy - (out1 * ox + out5 * oy + out9 * oz); + out[14] = v[2] + oz - (out2 * ox + out6 * oy + out10 * oz); + out[15] = 1; + return out; + } + /** + * Calculates a 4x4 matrix from the given quaternion + * + * @param {mat4} out mat4 receiving operation result + * @param {ReadonlyQuat} q Quaternion to create matrix from + * + * @returns {mat4} out + */ + + function fromQuat(out, q) { + var x = q[0], + y = q[1], + z = q[2], + w = q[3]; + var x2 = x + x; + var y2 = y + y; + var z2 = z + z; + var xx = x * x2; + var yx = y * x2; + var yy = y * y2; + var zx = z * x2; + var zy = z * y2; + var zz = z * z2; + var wx = w * x2; + var wy = w * y2; + var wz = w * z2; + out[0] = 1 - yy - zz; + out[1] = yx + wz; + out[2] = zx - wy; + out[3] = 0; + out[4] = yx - wz; + out[5] = 1 - xx - zz; + out[6] = zy + wx; + out[7] = 0; + out[8] = zx + wy; + out[9] = zy - wx; + out[10] = 1 - xx - yy; + out[11] = 0; + out[12] = 0; + out[13] = 0; + out[14] = 0; + out[15] = 1; + return out; + } + /** + * Generates a frustum matrix with the given bounds + * + * @param {mat4} out mat4 frustum matrix will be written into + * @param {Number} left Left bound of the frustum + * @param {Number} right Right bound of the frustum + * @param {Number} bottom Bottom bound of the frustum + * @param {Number} top Top bound of the frustum + * @param {Number} near Near bound of the frustum + * @param {Number} far Far bound of the frustum + * @returns {mat4} out + */ + + function frustum(out, left, right, bottom, top, near, far) { + var rl = 1 / (right - left); + var tb = 1 / (top - bottom); + var nf = 1 / (near - far); + out[0] = near * 2 * rl; + out[1] = 0; + out[2] = 0; + out[3] = 0; + out[4] = 0; + out[5] = near * 2 * tb; + out[6] = 0; + out[7] = 0; + out[8] = (right + left) * rl; + out[9] = (top + bottom) * tb; + out[10] = (far + near) * nf; + out[11] = -1; + out[12] = 0; + out[13] = 0; + out[14] = far * near * 2 * nf; + out[15] = 0; + return out; + } + /** + * Generates a perspective projection matrix with the given bounds. + * The near/far clip planes correspond to a normalized device coordinate Z range of [-1, 1], + * which matches WebGL/OpenGL's clip volume. + * Passing null/undefined/no value for far will generate infinite projection matrix. + * + * Read https://www.assemblyscript.org/types.html#type-rules + * + * @param {mat4} out mat4 frustum matrix will be written into + * @param {number} fovy Vertical field of view in radians + * @param {number} aspect Aspect ratio. typically viewport width/height + * @param {number} near Near bound of the frustum + * @param {number} far Far bound of the frustum, can be null or Infinity + * @returns {mat4} out + */ + + function perspectiveNO(out, fovy, aspect, near, far) { + var f = 1.0 / Math.tan(fovy / 2); + out[0] = f / aspect; + out[1] = 0; + out[2] = 0; + out[3] = 0; + out[4] = 0; + out[5] = f; + out[6] = 0; + out[7] = 0; + out[8] = 0; + out[9] = 0; + out[11] = -1; + out[12] = 0; + out[13] = 0; + out[15] = 0; + + if (typeof far === "number" && far !== Infinity) { + var nf = 1 / (near - far); + out[10] = (far + near) * nf; + out[14] = 2 * far * near * nf; + } else { + out[10] = -1; + out[14] = -2 * near; + } + + return out; + } + /** + * Alias for {@link mat4.perspectiveNO} + * @function + */ + + var perspective = perspectiveNO; + /** + * Generates a perspective projection matrix suitable for WebGPU with the given bounds. + * The near/far clip planes correspond to a normalized device coordinate Z range of [0, 1], + * which matches WebGPU/Vulkan/DirectX/Metal's clip volume. + * Passing null/undefined/no value for far will generate infinite projection matrix. + * + * Read https://www.assemblyscript.org/types.html#type-rules + * + * @param {mat4} out mat4 frustum matrix will be written into + * @param {number} fovy Vertical field of view in radians + * @param {number} aspect Aspect ratio. typically viewport width/height + * @param {number} near Near bound of the frustum + * @param {number} far Far bound of the frustum, can be null or Infinity + * @returns {mat4} out + */ + + function perspectiveZO(out, fovy, aspect, near, far) { + var f = 1.0 / Math.tan(fovy / 2); + out[0] = f / aspect; + out[1] = 0; + out[2] = 0; + out[3] = 0; + out[4] = 0; + out[5] = f; + out[6] = 0; + out[7] = 0; + out[8] = 0; + out[9] = 0; + out[11] = -1; + out[12] = 0; + out[13] = 0; + out[15] = 0; + + if (typeof far === "number" && far !== Infinity) { + var nf = 1 / (near - far); + out[10] = far * nf; + out[14] = far * near * nf; + } else { + out[10] = -1; + out[14] = -near; + } + + return out; + } + /** + * Generates a perspective projection matrix with the given field of view. + * This is primarily useful for generating projection matrices to be used + * with the still experiemental WebVR API. + * + * @param {mat4} out mat4 frustum matrix will be written into + * @param {Fov} fov Object containing the following values: upDegrees, downDegrees, leftDegrees, rightDegrees + * @param {number} near Near bound of the frustum + * @param {number} far Far bound of the frustum + * @returns {mat4} out + */ + + function perspectiveFromFieldOfView(out, fov, near, far) { + var upTan = Math.tan(fov.upDegrees * Math.PI / 180.0); + var downTan = Math.tan(fov.downDegrees * Math.PI / 180.0); + var leftTan = Math.tan(fov.leftDegrees * Math.PI / 180.0); + var rightTan = Math.tan(fov.rightDegrees * Math.PI / 180.0); + var xScale = 2.0 / (leftTan + rightTan); + var yScale = 2.0 / (upTan + downTan); + out[0] = xScale; + out[1] = 0.0; + out[2] = 0.0; + out[3] = 0.0; + out[4] = 0.0; + out[5] = yScale; + out[6] = 0.0; + out[7] = 0.0; + out[8] = -((leftTan - rightTan) * xScale * 0.5); + out[9] = (upTan - downTan) * yScale * 0.5; + out[10] = far / (near - far); + out[11] = -1.0; + out[12] = 0.0; + out[13] = 0.0; + out[14] = far * near / (near - far); + out[15] = 0.0; + return out; + } + /** + * Generates a orthogonal projection matrix with the given bounds. + * The near/far clip planes correspond to a normalized device coordinate Z range of [-1, 1], + * which matches WebGL/OpenGL's clip volume. + * + * @param {mat4} out mat4 frustum matrix will be written into + * @param {number} left Left bound of the frustum + * @param {number} right Right bound of the frustum + * @param {number} bottom Bottom bound of the frustum + * @param {number} top Top bound of the frustum + * @param {number} near Near bound of the frustum + * @param {number} far Far bound of the frustum + * @returns {mat4} out + */ + + function orthoNO(out, left, right, bottom, top, near, far) { + var lr = 1 / (left - right); + var bt = 1 / (bottom - top); + var nf = 1 / (near - far); + out[0] = -2 * lr; + out[1] = 0; + out[2] = 0; + out[3] = 0; + out[4] = 0; + out[5] = -2 * bt; + out[6] = 0; + out[7] = 0; + out[8] = 0; + out[9] = 0; + out[10] = 2 * nf; + out[11] = 0; + out[12] = (left + right) * lr; + out[13] = (top + bottom) * bt; + out[14] = (far + near) * nf; + out[15] = 1; + return out; + } + /** + * Alias for {@link mat4.orthoNO} + * @function + */ + + var ortho = orthoNO; + /** + * Generates a orthogonal projection matrix with the given bounds. + * The near/far clip planes correspond to a normalized device coordinate Z range of [0, 1], + * which matches WebGPU/Vulkan/DirectX/Metal's clip volume. + * + * @param {mat4} out mat4 frustum matrix will be written into + * @param {number} left Left bound of the frustum + * @param {number} right Right bound of the frustum + * @param {number} bottom Bottom bound of the frustum + * @param {number} top Top bound of the frustum + * @param {number} near Near bound of the frustum + * @param {number} far Far bound of the frustum + * @returns {mat4} out + */ + + function orthoZO(out, left, right, bottom, top, near, far) { + var lr = 1 / (left - right); + var bt = 1 / (bottom - top); + var nf = 1 / (near - far); + out[0] = -2 * lr; + out[1] = 0; + out[2] = 0; + out[3] = 0; + out[4] = 0; + out[5] = -2 * bt; + out[6] = 0; + out[7] = 0; + out[8] = 0; + out[9] = 0; + out[10] = nf; + out[11] = 0; + out[12] = (left + right) * lr; + out[13] = (top + bottom) * bt; + out[14] = near * nf; + out[15] = 1; + return out; + } + /** + * Generates a look-at matrix with the given eye position, focal point, and up axis. + * If you want a matrix that actually makes an object look at another object, you should use targetTo instead. + * + * @param {mat4} out mat4 frustum matrix will be written into + * @param {ReadonlyVec3} eye Position of the viewer + * @param {ReadonlyVec3} center Point the viewer is looking at + * @param {ReadonlyVec3} up vec3 pointing up + * @returns {mat4} out + */ + + function lookAt(out, eye, center, up) { + var x0, x1, x2, y0, y1, y2, z0, z1, z2, len; + var eyex = eye[0]; + var eyey = eye[1]; + var eyez = eye[2]; + var upx = up[0]; + var upy = up[1]; + var upz = up[2]; + var centerx = center[0]; + var centery = center[1]; + var centerz = center[2]; + + if (Math.abs(eyex - centerx) < EPSILON && Math.abs(eyey - centery) < EPSILON && Math.abs(eyez - centerz) < EPSILON) { + return identity$2(out); + } + + z0 = eyex - centerx; + z1 = eyey - centery; + z2 = eyez - centerz; + len = 1 / Maths.hypot(z0, z1, z2); + z0 *= len; + z1 *= len; + z2 *= len; + x0 = upy * z2 - upz * z1; + x1 = upz * z0 - upx * z2; + x2 = upx * z1 - upy * z0; + len = Maths.hypot(x0, x1, x2); + + if (!len) { + x0 = 0; + x1 = 0; + x2 = 0; + } else { + len = 1 / len; + x0 *= len; + x1 *= len; + x2 *= len; + } + + y0 = z1 * x2 - z2 * x1; + y1 = z2 * x0 - z0 * x2; + y2 = z0 * x1 - z1 * x0; + len = Maths.hypot(y0, y1, y2); + + if (!len) { + y0 = 0; + y1 = 0; + y2 = 0; + } else { + len = 1 / len; + y0 *= len; + y1 *= len; + y2 *= len; + } + + out[0] = x0; + out[1] = y0; + out[2] = z0; + out[3] = 0; + out[4] = x1; + out[5] = y1; + out[6] = z1; + out[7] = 0; + out[8] = x2; + out[9] = y2; + out[10] = z2; + out[11] = 0; + out[12] = -(x0 * eyex + x1 * eyey + x2 * eyez); + out[13] = -(y0 * eyex + y1 * eyey + y2 * eyez); + out[14] = -(z0 * eyex + z1 * eyey + z2 * eyez); + out[15] = 1; + return out; + } + /** + * Generates a matrix that makes something look at something else. + * + * @param {mat4} out mat4 frustum matrix will be written into + * @param {ReadonlyVec3} eye Position of the viewer + * @param {ReadonlyVec3} center Point the viewer is looking at + * @param {ReadonlyVec3} up vec3 pointing up + * @returns {mat4} out + */ + + function targetTo(out, eye, target, up) { + var eyex = eye[0], + eyey = eye[1], + eyez = eye[2], + upx = up[0], + upy = up[1], + upz = up[2]; + var z0 = eyex - target[0], + z1 = eyey - target[1], + z2 = eyez - target[2]; + var len = z0 * z0 + z1 * z1 + z2 * z2; + + if (len > 0) { + len = 1 / Math.sqrt(len); + z0 *= len; + z1 *= len; + z2 *= len; + } + + var x0 = upy * z2 - upz * z1, + x1 = upz * z0 - upx * z2, + x2 = upx * z1 - upy * z0; + len = x0 * x0 + x1 * x1 + x2 * x2; + + if (len > 0) { + len = 1 / Math.sqrt(len); + x0 *= len; + x1 *= len; + x2 *= len; + } + + out[0] = x0; + out[1] = x1; + out[2] = x2; + out[3] = 0; + out[4] = z1 * x2 - z2 * x1; + out[5] = z2 * x0 - z0 * x2; + out[6] = z0 * x1 - z1 * x0; + out[7] = 0; + out[8] = z0; + out[9] = z1; + out[10] = z2; + out[11] = 0; + out[12] = eyex; + out[13] = eyey; + out[14] = eyez; + out[15] = 1; + return out; + } + /** + * Returns a string representation of a mat4 + * + * @param {ReadonlyMat4} a matrix to represent as a string + * @returns {String} string representation of the matrix + */ + + function str$5(a) { + return "mat4(" + a[0].toString() + ", " + a[1].toString() + ", " + a[2].toString() + ", " + a[3].toString() + ", " + a[4].toString() + ", " + a[5].toString() + ", " + a[6].toString() + ", " + a[7].toString() + ", " + a[8].toString() + ", " + a[9].toString() + ", " + a[10].toString() + ", " + a[11].toString() + ", " + a[12].toString() + ", " + a[13].toString() + ", " + a[14].toString() + ", " + a[15].toString() + ")"; + } + /** + * Returns Frobenius norm of a mat4 + * + * @param {ReadonlyMat4} a the matrix to calculate Frobenius norm of + * @returns {Number} Frobenius norm + */ + + function frob(a) { + return Maths.hypot(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]); + } + /** + * Adds two mat4's + * + * @param {mat4} out the receiving matrix + * @param {ReadonlyMat4} a the first operand + * @param {ReadonlyMat4} b the second operand + * @returns {mat4} out + */ + + function add$5(out, a, b) { + out[0] = a[0] + b[0]; + out[1] = a[1] + b[1]; + out[2] = a[2] + b[2]; + out[3] = a[3] + b[3]; + out[4] = a[4] + b[4]; + out[5] = a[5] + b[5]; + out[6] = a[6] + b[6]; + out[7] = a[7] + b[7]; + out[8] = a[8] + b[8]; + out[9] = a[9] + b[9]; + out[10] = a[10] + b[10]; + out[11] = a[11] + b[11]; + out[12] = a[12] + b[12]; + out[13] = a[13] + b[13]; + out[14] = a[14] + b[14]; + out[15] = a[15] + b[15]; + return out; + } + /** + * Subtracts matrix b from matrix a + * + * @param {mat4} out the receiving matrix + * @param {ReadonlyMat4} a the first operand + * @param {ReadonlyMat4} b the second operand + * @returns {mat4} out + */ + + function subtract$3(out, a, b) { + out[0] = a[0] - b[0]; + out[1] = a[1] - b[1]; + out[2] = a[2] - b[2]; + out[3] = a[3] - b[3]; + out[4] = a[4] - b[4]; + out[5] = a[5] - b[5]; + out[6] = a[6] - b[6]; + out[7] = a[7] - b[7]; + out[8] = a[8] - b[8]; + out[9] = a[9] - b[9]; + out[10] = a[10] - b[10]; + out[11] = a[11] - b[11]; + out[12] = a[12] - b[12]; + out[13] = a[13] - b[13]; + out[14] = a[14] - b[14]; + out[15] = a[15] - b[15]; + return out; + } + /** + * Multiply each element of the matrix by a scalar. + * + * @param {mat4} out the receiving matrix + * @param {ReadonlyMat4} a the matrix to scale + * @param {Number} b amount to scale the matrix's elements by + * @returns {mat4} out + */ + + function multiplyScalar(out, a, b) { + out[0] = a[0] * b; + out[1] = a[1] * b; + out[2] = a[2] * b; + out[3] = a[3] * b; + out[4] = a[4] * b; + out[5] = a[5] * b; + out[6] = a[6] * b; + out[7] = a[7] * b; + out[8] = a[8] * b; + out[9] = a[9] * b; + out[10] = a[10] * b; + out[11] = a[11] * b; + out[12] = a[12] * b; + out[13] = a[13] * b; + out[14] = a[14] * b; + out[15] = a[15] * b; + return out; + } + /** + * Adds two mat4's after multiplying each element of the second operand by a scalar value. + * + * @param {mat4} out the receiving vector + * @param {ReadonlyMat4} a the first operand + * @param {ReadonlyMat4} b the second operand + * @param {Number} scale the amount to scale b's elements by before adding + * @returns {mat4} out + */ + + function multiplyScalarAndAdd(out, a, b, scale) { + out[0] = a[0] + b[0] * scale; + out[1] = a[1] + b[1] * scale; + out[2] = a[2] + b[2] * scale; + out[3] = a[3] + b[3] * scale; + out[4] = a[4] + b[4] * scale; + out[5] = a[5] + b[5] * scale; + out[6] = a[6] + b[6] * scale; + out[7] = a[7] + b[7] * scale; + out[8] = a[8] + b[8] * scale; + out[9] = a[9] + b[9] * scale; + out[10] = a[10] + b[10] * scale; + out[11] = a[11] + b[11] * scale; + out[12] = a[12] + b[12] * scale; + out[13] = a[13] + b[13] * scale; + out[14] = a[14] + b[14] * scale; + out[15] = a[15] + b[15] * scale; + return out; + } + /** + * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===) + * + * @param {ReadonlyMat4} a The first matrix. + * @param {ReadonlyMat4} b The second matrix. + * @returns {Boolean} True if the matrices are equal, false otherwise. + */ + + function exactEquals$5(a, b) { + return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5] && a[6] === b[6] && a[7] === b[7] && a[8] === b[8] && a[9] === b[9] && a[10] === b[10] && a[11] === b[11] && a[12] === b[12] && a[13] === b[13] && a[14] === b[14] && a[15] === b[15]; + } + /** + * Returns whether or not the matrices have approximately the same elements in the same position. + * + * @param {ReadonlyMat4} a The first matrix. + * @param {ReadonlyMat4} b The second matrix. + * @returns {Boolean} True if the matrices are equal, false otherwise. + */ + + function equals$5(a, b) { + var a0 = a[0], + a1 = a[1], + a2 = a[2], + a3 = a[3]; + var a4 = a[4], + a5 = a[5], + a6 = a[6], + a7 = a[7]; + var a8 = a[8], + a9 = a[9], + a10 = a[10], + a11 = a[11]; + var a12 = a[12], + a13 = a[13], + a14 = a[14], + a15 = a[15]; + var b0 = b[0], + b1 = b[1], + b2 = b[2], + b3 = b[3]; + var b4 = b[4], + b5 = b[5], + b6 = b[6], + b7 = b[7]; + var b8 = b[8], + b9 = b[9], + b10 = b[10], + b11 = b[11]; + var b12 = b[12], + b13 = b[13], + b14 = b[14], + b15 = b[15]; + return Math.abs(a0 - b0) <= EPSILON * Maths.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= EPSILON * Maths.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= EPSILON * Maths.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= EPSILON * Maths.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= EPSILON * Maths.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= EPSILON * Maths.max(1.0, Math.abs(a5), Math.abs(b5)) && Math.abs(a6 - b6) <= EPSILON * Maths.max(1.0, Math.abs(a6), Math.abs(b6)) && Math.abs(a7 - b7) <= EPSILON * Maths.max(1.0, Math.abs(a7), Math.abs(b7)) && Math.abs(a8 - b8) <= EPSILON * Maths.max(1.0, Math.abs(a8), Math.abs(b8)) && Math.abs(a9 - b9) <= EPSILON * Maths.max(1.0, Math.abs(a9), Math.abs(b9)) && Math.abs(a10 - b10) <= EPSILON * Maths.max(1.0, Math.abs(a10), Math.abs(b10)) && Math.abs(a11 - b11) <= EPSILON * Maths.max(1.0, Math.abs(a11), Math.abs(b11)) && Math.abs(a12 - b12) <= EPSILON * Maths.max(1.0, Math.abs(a12), Math.abs(b12)) && Math.abs(a13 - b13) <= EPSILON * Maths.max(1.0, Math.abs(a13), Math.abs(b13)) && Math.abs(a14 - b14) <= EPSILON * Maths.max(1.0, Math.abs(a14), Math.abs(b14)) && Math.abs(a15 - b15) <= EPSILON * Maths.max(1.0, Math.abs(a15), Math.abs(b15)); + } + /** + * Alias for {@link mat4.multiply} + * @function + */ + + var mul$5 = multiply$5; + /** + * Alias for {@link mat4.subtract} + * @function + */ + + var sub$3 = subtract$3; + + var mat4 = /*#__PURE__*/Object.freeze({ + __proto__: null, + Fov: Fov, + create: create$5, + clone: clone$5, + copy: copy$5, + fromValues: fromValues$5, + set: set$5, + identity: identity$2, + transpose: transpose, + invert: invert$2, + adjoint: adjoint, + determinant: determinant, + multiply: multiply$5, + translate: translate$1, + scale: scale$5, + rotate: rotate$1, + rotateX: rotateX$3, + rotateY: rotateY$3, + rotateZ: rotateZ$3, + fromTranslation: fromTranslation$1, + fromScaling: fromScaling, + fromRotation: fromRotation$1, + fromXRotation: fromXRotation, + fromYRotation: fromYRotation, + fromZRotation: fromZRotation, + fromRotationTranslation: fromRotationTranslation$1, + fromQuat2: fromQuat2, + getTranslation: getTranslation$1, + getScaling: getScaling, + getRotation: getRotation, + decompose: decompose, + fromRotationTranslationScale: fromRotationTranslationScale, + fromRotationTranslationScaleOrigin: fromRotationTranslationScaleOrigin, + fromQuat: fromQuat, + frustum: frustum, + perspectiveNO: perspectiveNO, + perspective: perspective, + perspectiveZO: perspectiveZO, + perspectiveFromFieldOfView: perspectiveFromFieldOfView, + orthoNO: orthoNO, + ortho: ortho, + orthoZO: orthoZO, + lookAt: lookAt, + targetTo: targetTo, + str: str$5, + frob: frob, + add: add$5, + subtract: subtract$3, + multiplyScalar: multiplyScalar, + multiplyScalarAndAdd: multiplyScalarAndAdd, + exactEquals: exactEquals$5, + equals: equals$5, + mul: mul$5, + sub: sub$3 + }); + + /** + * 3 Dimensional Vector + * @module vec3 + */ + + /** + * Creates a new, empty vec3 + * + * @returns {vec3} a new 3D vector + */ + + function create$4() { + var out = new Float64Array(3); //if (glMatrix.ARRAY_TYPE != Float32Array) { + + out[0] = 0; + out[1] = 0; + out[2] = 0; //} + + return out; + } + /** + * Creates a new vec3 initialized with values from an existing vector + * + * @param {ReadonlyVec3} a vector to clone + * @returns {vec3} a new 3D vector + */ + + function clone$4(a) { + var out = new Float64Array(3); + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + return out; + } + /** + * Calculates the length of a vec3 + * + * @param {ReadonlyVec3} a vector to calculate length of + * @returns {Number} length of a + */ + + function length$4(a) { + var x = a[0]; + var y = a[1]; + var z = a[2]; + return Maths.hypot(x, y, z); + } + /** + * Creates a new vec3 initialized with the given values + * + * @param {Number} x X component + * @param {Number} y Y component + * @param {Number} z Z component + * @returns {vec3} a new 3D vector + */ + + function fromValues$4(x, y, z) { + var out = new Float64Array(3); + out[0] = x; + out[1] = y; + out[2] = z; + return out; + } + /** + * Copy the values from one vec3 to another + * + * @param {vec3} out the receiving vector + * @param {ReadonlyVec3} a the source vector + * @returns {vec3} out + */ + + function copy$4(out, a) { + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + return out; + } + /** + * Set the components of a vec3 to the given values + * + * @param {vec3} out the receiving vector + * @param {Number} x X component + * @param {Number} y Y component + * @param {Number} z Z component + * @returns {vec3} out + */ + + function set$4(out, x, y, z) { + out[0] = x; + out[1] = y; + out[2] = z; + return out; + } + /** + * Adds two vec3's + * + * @param {vec3} out the receiving vector + * @param {ReadonlyVec3} a the first operand + * @param {ReadonlyVec3} b the second operand + * @returns {vec3} out + */ + + function add$4(out, a, b) { + out[0] = a[0] + b[0]; + out[1] = a[1] + b[1]; + out[2] = a[2] + b[2]; + return out; + } + /** + * Subtracts vector b from vector a + * + * @param {vec3} out the receiving vector + * @param {ReadonlyVec3} a the first operand + * @param {ReadonlyVec3} b the second operand + * @returns {vec3} out + */ + + function subtract$2(out, a, b) { + out[0] = a[0] - b[0]; + out[1] = a[1] - b[1]; + out[2] = a[2] - b[2]; + return out; + } + /** + * Multiplies two vec3's + * + * @param {vec3} out the receiving vector + * @param {ReadonlyVec3} a the first operand + * @param {ReadonlyVec3} b the second operand + * @returns {vec3} out + */ + + function multiply$4(out, a, b) { + out[0] = a[0] * b[0]; + out[1] = a[1] * b[1]; + out[2] = a[2] * b[2]; + return out; + } + /** + * Divides two vec3's + * + * @param {vec3} out the receiving vector + * @param {ReadonlyVec3} a the first operand + * @param {ReadonlyVec3} b the second operand + * @returns {vec3} out + */ + + function divide$2(out, a, b) { + out[0] = a[0] / b[0]; + out[1] = a[1] / b[1]; + out[2] = a[2] / b[2]; + return out; + } + /** + * Math.ceil the components of a vec3 + * + * @param {vec3} out the receiving vector + * @param {ReadonlyVec3} a vector to ceil + * @returns {vec3} out + */ + + function ceil$2(out, a) { + out[0] = Math.ceil(a[0]); + out[1] = Math.ceil(a[1]); + out[2] = Math.ceil(a[2]); + return out; + } + /** + * Math.floor the components of a vec3 + * + * @param {vec3} out the receiving vector + * @param {ReadonlyVec3} a vector to floor + * @returns {vec3} out + */ + + function floor$2(out, a) { + out[0] = Math.floor(a[0]); + out[1] = Math.floor(a[1]); + out[2] = Math.floor(a[2]); + return out; + } + /** + * Returns the minimum of two vec3's + * + * @param {vec3} out the receiving vector + * @param {ReadonlyVec3} a the first operand + * @param {ReadonlyVec3} b the second operand + * @returns {vec3} out + */ + + function min$2(out, a, b) { + out[0] = Math.min(a[0], b[0]); + out[1] = Math.min(a[1], b[1]); + out[2] = Math.min(a[2], b[2]); + return out; + } + /** + * Returns the maximum of two vec3's + * + * @param {vec3} out the receiving vector + * @param {ReadonlyVec3} a the first operand + * @param {ReadonlyVec3} b the second operand + * @returns {vec3} out + */ + + function max$2(out, a, b) { + out[0] = Math.max(a[0], b[0]); + out[1] = Math.max(a[1], b[1]); + out[2] = Math.max(a[2], b[2]); + return out; + } + /** + * Math.round the components of a vec3 + * + * @param {vec3} out the receiving vector + * @param {ReadonlyVec3} a vector to round + * @returns {vec3} out + */ + + function round$2(out, a) { + out[0] = Math.round(a[0]); + out[1] = Math.round(a[1]); + out[2] = Math.round(a[2]); + return out; + } + /** + * Scales a vec3 by a scalar number + * + * @param {vec3} out the receiving vector + * @param {ReadonlyVec3} a the vector to scale + * @param {Number} b amount to scale the vector by + * @returns {vec3} out + */ + + function scale$4(out, a, b) { + out[0] = a[0] * b; + out[1] = a[1] * b; + out[2] = a[2] * b; + return out; + } + /** + * Adds two vec3's after scaling the second operand by a scalar value + * + * @param {vec3} out the receiving vector + * @param {ReadonlyVec3} a the first operand + * @param {ReadonlyVec3} b the second operand + * @param {Number} scale the amount to scale b by before adding + * @returns {vec3} out + */ + + function scaleAndAdd$2(out, a, b, scale) { + out[0] = a[0] + b[0] * scale; + out[1] = a[1] + b[1] * scale; + out[2] = a[2] + b[2] * scale; + return out; + } + /** + * Calculates the euclidian distance between two vec3's + * + * @param {ReadonlyVec3} a the first operand + * @param {ReadonlyVec3} b the second operand + * @returns {Number} distance between a and b + */ + + function distance$2(a, b) { + var x = b[0] - a[0]; + var y = b[1] - a[1]; + var z = b[2] - a[2]; + return Maths.hypot(x, y, z); + } + /** + * Calculates the squared euclidian distance between two vec3's + * + * @param {ReadonlyVec3} a the first operand + * @param {ReadonlyVec3} b the second operand + * @returns {Number} squared distance between a and b + */ + + function squaredDistance$2(a, b) { + var x = b[0] - a[0]; + var y = b[1] - a[1]; + var z = b[2] - a[2]; + return x * x + y * y + z * z; + } + /** + * Calculates the squared length of a vec3 + * + * @param {ReadonlyVec3} a vector to calculate squared length of + * @returns {Number} squared length of a + */ + + function squaredLength$4(a) { + var x = a[0]; + var y = a[1]; + var z = a[2]; + return x * x + y * y + z * z; + } + /** + * Negates the components of a vec3 + * + * @param {vec3} out the receiving vector + * @param {ReadonlyVec3} a vector to negate + * @returns {vec3} out + */ + + function negate$2(out, a) { + out[0] = -a[0]; + out[1] = -a[1]; + out[2] = -a[2]; + return out; + } + /** + * Returns the inverse of the components of a vec3 + * + * @param {vec3} out the receiving vector + * @param {ReadonlyVec3} a vector to invert + * @returns {vec3} out + */ + + function inverse$2(out, a) { + out[0] = 1.0 / a[0]; + out[1] = 1.0 / a[1]; + out[2] = 1.0 / a[2]; + return out; + } + /** + * Normalize a vec3 + * + * @param {vec3} out the receiving vector + * @param {ReadonlyVec3} a vector to normalize + * @returns {vec3} out + */ + + function normalize$4(out, a) { + var x = a[0]; + var y = a[1]; + var z = a[2]; + var len = x * x + y * y + z * z; + + if (len > 0) { + //TODO: evaluate use of glm_invsqrt here? + len = 1 / Math.sqrt(len); + } + + out[0] = a[0] * len; + out[1] = a[1] * len; + out[2] = a[2] * len; + return out; + } + /** + * Calculates the dot product of two vec3's + * + * @param {ReadonlyVec3} a the first operand + * @param {ReadonlyVec3} b the second operand + * @returns {Number} dot product of a and b + */ + + function dot$4(a, b) { + return a[0] * b[0] + a[1] * b[1] + a[2] * b[2]; + } + /** + * Computes the cross product of two vec3's + * + * @param {vec3} out the receiving vector + * @param {ReadonlyVec3} a the first operand + * @param {ReadonlyVec3} b the second operand + * @returns {vec3} out + */ + + function cross$2(out, a, b) { + var ax = a[0], + ay = a[1], + az = a[2]; + var bx = b[0], + by = b[1], + bz = b[2]; + out[0] = ay * bz - az * by; + out[1] = az * bx - ax * bz; + out[2] = ax * by - ay * bx; + return out; + } + /** + * Performs a linear interpolation between two vec3's + * + * @param {vec3} out the receiving vector + * @param {ReadonlyVec3} a the first operand + * @param {ReadonlyVec3} b the second operand + * @param {Number} t interpolation amount, in the range [0-1], between the two inputs + * @returns {vec3} out + */ + + function lerp$4(out, a, b, t) { + var ax = a[0]; + var ay = a[1]; + var az = a[2]; + out[0] = ax + t * (b[0] - ax); + out[1] = ay + t * (b[1] - ay); + out[2] = az + t * (b[2] - az); + return out; + } + /** + * Performs a spherical linear interpolation between two vec3's + * + * @param {vec3} out the receiving vector + * @param {ReadonlyVec3} a the first operand + * @param {ReadonlyVec3} b the second operand + * @param {Number} t interpolation amount, in the range [0-1], between the two inputs + * @returns {vec3} out + */ + + function slerp$1(out, a, b, t) { + var angle = Math.acos(Math.min(Math.max(dot$4(a, b), -1), 1)); + var sinTotal = Math.sin(angle); + var ratioA = Math.sin((1 - t) * angle) / sinTotal; + var ratioB = Math.sin(t * angle) / sinTotal; + out[0] = ratioA * a[0] + ratioB * b[0]; + out[1] = ratioA * a[1] + ratioB * b[1]; + out[2] = ratioA * a[2] + ratioB * b[2]; + return out; + } + /** + * Performs a hermite interpolation with two control points + * + * @param {vec3} out the receiving vector + * @param {ReadonlyVec3} a the first operand + * @param {ReadonlyVec3} b the second operand + * @param {ReadonlyVec3} c the third operand + * @param {ReadonlyVec3} d the fourth operand + * @param {Number} t interpolation amount, in the range [0-1], between the two inputs + * @returns {vec3} out + */ + + function hermite(out, a, b, c, d, t) { + var factorTimes2 = t * t; + var factor1 = factorTimes2 * (2 * t - 3) + 1; + var factor2 = factorTimes2 * (t - 2) + t; + var factor3 = factorTimes2 * (t - 1); + var factor4 = factorTimes2 * (3 - 2 * t); + out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4; + out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4; + out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4; + return out; + } + /** + * Performs a bezier interpolation with two control points + * + * @param {vec3} out the receiving vector + * @param {ReadonlyVec3} a the first operand + * @param {ReadonlyVec3} b the second operand + * @param {ReadonlyVec3} c the third operand + * @param {ReadonlyVec3} d the fourth operand + * @param {Number} t interpolation amount, in the range [0-1], between the two inputs + * @returns {vec3} out + */ + + function bezier(out, a, b, c, d, t) { + var inverseFactor = 1 - t; + var inverseFactorTimesTwo = inverseFactor * inverseFactor; + var factorTimes2 = t * t; + var factor1 = inverseFactorTimesTwo * inverseFactor; + var factor2 = 3 * t * inverseFactorTimesTwo; + var factor3 = 3 * factorTimes2 * inverseFactor; + var factor4 = factorTimes2 * t; + out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4; + out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4; + out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4; + return out; + } + /** + * Generates a random vector with the given scale + * + * @param {vec3} out the receiving vector + * @param {Number} [scale] Length of the resulting vector. If omitted, a unit vector will be returned + * @returns {vec3} out + */ + + function random$3(out, scale) { + scale = scale || 1.0; + var r = RANDOM() * 2.0 * Math.PI; + var z = RANDOM() * 2.0 - 1.0; + var zScale = Math.sqrt(1.0 - z * z) * scale; + out[0] = Math.cos(r) * zScale; + out[1] = Math.sin(r) * zScale; + out[2] = z * scale; + return out; + } + /** + * Transforms the vec3 with a mat4. + * 4th vector component is implicitly '1' + * + * @param {vec3} out the receiving vector + * @param {ReadonlyVec3} a the vector to transform + * @param {ReadonlyMat4} m matrix to transform with + * @returns {vec3} out + */ + + function transformMat4$2(out, a, m) { + var x = a[0], + y = a[1], + z = a[2]; + var w = m[3] * x + m[7] * y + m[11] * z + m[15]; + w = w || 1.0; + out[0] = (m[0] * x + m[4] * y + m[8] * z + m[12]) / w; + out[1] = (m[1] * x + m[5] * y + m[9] * z + m[13]) / w; + out[2] = (m[2] * x + m[6] * y + m[10] * z + m[14]) / w; + return out; + } + /** + * Transforms the vec3 with a mat3. + * + * @param {vec3} out the receiving vector + * @param {ReadonlyVec3} a the vector to transform + * @param {ReadonlyMat3} m the 3x3 matrix to transform with + * @returns {vec3} out + */ + + function transformMat3$1(out, a, m) { + var x = a[0], + y = a[1], + z = a[2]; + out[0] = x * m[0] + y * m[3] + z * m[6]; + out[1] = x * m[1] + y * m[4] + z * m[7]; + out[2] = x * m[2] + y * m[5] + z * m[8]; + return out; + } + /** + * Transforms the vec3 with a quat + * Can also be used for dual quaternions. (Multiply it with the real part) + * + * @param {vec3} out the receiving vector + * @param {ReadonlyVec3} a the vector to transform + * @param {ReadonlyQuat} q quaternion to transform with + * @returns {vec3} out + */ + + function transformQuat$1(out, a, q) { + // benchmarks: https://jsperf.com/quaternion-transform-vec3-implementations-fixed + var qx = q[0], + qy = q[1], + qz = q[2], + qw = q[3]; + var x = a[0], + y = a[1], + z = a[2]; // var qvec = [qx, qy, qz]; + // var uv = vec3.cross([], qvec, a); + + var uvx = qy * z - qz * y, + uvy = qz * x - qx * z, + uvz = qx * y - qy * x; // var uuv = vec3.cross([], qvec, uv); + + var uuvx = qy * uvz - qz * uvy, + uuvy = qz * uvx - qx * uvz, + uuvz = qx * uvy - qy * uvx; // vec3.scale(uv, uv, 2 * w); + + var w2 = qw * 2; + uvx *= w2; + uvy *= w2; + uvz *= w2; // vec3.scale(uuv, uuv, 2); + + uuvx *= 2; + uuvy *= 2; + uuvz *= 2; // return vec3.add(out, a, vec3.add(out, uv, uuv)); + + out[0] = x + uvx + uuvx; + out[1] = y + uvy + uuvy; + out[2] = z + uvz + uuvz; + return out; + } + /** + * Rotate a 3D vector around the x-axis + * @param {vec3} out The receiving vec3 + * @param {ReadonlyVec3} a The vec3 point to rotate + * @param {ReadonlyVec3} b The origin of the rotation + * @param {Number} rad The angle of rotation in radians + * @returns {vec3} out + */ + + function rotateX$2(out, a, b, rad) { + var p = [], + r = []; //Translate point to the origin + + p[0] = a[0] - b[0]; + p[1] = a[1] - b[1]; + p[2] = a[2] - b[2]; //perform rotation + + r[0] = p[0]; + r[1] = p[1] * Math.cos(rad) - p[2] * Math.sin(rad); + r[2] = p[1] * Math.sin(rad) + p[2] * Math.cos(rad); //translate to correct position + + out[0] = r[0] + b[0]; + out[1] = r[1] + b[1]; + out[2] = r[2] + b[2]; + return out; + } + /** + * Rotate a 3D vector around the y-axis + * @param {vec3} out The receiving vec3 + * @param {ReadonlyVec3} a The vec3 point to rotate + * @param {ReadonlyVec3} b The origin of the rotation + * @param {Number} rad The angle of rotation in radians + * @returns {vec3} out + */ + + function rotateY$2(out, a, b, rad) { + var p = [], + r = []; //Translate point to the origin + + p[0] = a[0] - b[0]; + p[1] = a[1] - b[1]; + p[2] = a[2] - b[2]; //perform rotation + + r[0] = p[2] * Math.sin(rad) + p[0] * Math.cos(rad); + r[1] = p[1]; + r[2] = p[2] * Math.cos(rad) - p[0] * Math.sin(rad); //translate to correct position + + out[0] = r[0] + b[0]; + out[1] = r[1] + b[1]; + out[2] = r[2] + b[2]; + return out; + } + /** + * Rotate a 3D vector around the z-axis + * @param {vec3} out The receiving vec3 + * @param {ReadonlyVec3} a The vec3 point to rotate + * @param {ReadonlyVec3} b The origin of the rotation + * @param {Number} rad The angle of rotation in radians + * @returns {vec3} out + */ + + function rotateZ$2(out, a, b, rad) { + var p = [], + r = []; //Translate point to the origin + + p[0] = a[0] - b[0]; + p[1] = a[1] - b[1]; + p[2] = a[2] - b[2]; //perform rotation + + r[0] = p[0] * Math.cos(rad) - p[1] * Math.sin(rad); + r[1] = p[0] * Math.sin(rad) + p[1] * Math.cos(rad); + r[2] = p[2]; //translate to correct position + + out[0] = r[0] + b[0]; + out[1] = r[1] + b[1]; + out[2] = r[2] + b[2]; + return out; + } + /** + * Get the angle between two 3D vectors + * @param {ReadonlyVec3} a The first operand + * @param {ReadonlyVec3} b The second operand + * @returns {Number} The angle in radians + */ + + function angle$1(a, b) { + var ax = a[0], + ay = a[1], + az = a[2], + bx = b[0], + by = b[1], + bz = b[2], + mag1 = Math.sqrt(ax * ax + ay * ay + az * az), + mag2 = Math.sqrt(bx * bx + by * by + bz * bz), + mag = mag1 * mag2, + cosine = mag && dot$4(a, b) / mag; + return Math.acos(Math.min(Math.max(cosine, -1), 1)); + } + /** + * Set the components of a vec3 to zero + * + * @param {vec3} out the receiving vector + * @returns {vec3} out + */ + + function zero$2(out) { + out[0] = 0.0; + out[1] = 0.0; + out[2] = 0.0; + return out; + } + /** + * Returns a string representation of a vector + * + * @param {ReadonlyVec3} a vector to represent as a string + * @returns {String} string representation of the vector + */ + + function str$4(a) { + return "vec3(" + a[0].toString() + ", " + a[1].toString() + ", " + a[2].toString() + ")"; + } + /** + * Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===) + * + * @param {ReadonlyVec3} a The first vector. + * @param {ReadonlyVec3} b The second vector. + * @returns {Boolean} True if the vectors are equal, false otherwise. + */ + + function exactEquals$4(a, b) { + return a[0] === b[0] && a[1] === b[1] && a[2] === b[2]; + } + /** + * Returns whether or not the vectors have approximately the same elements in the same position. + * + * @param {ReadonlyVec3} a The first vector. + * @param {ReadonlyVec3} b The second vector. + * @returns {Boolean} True if the vectors are equal, false otherwise. + */ + + function equals$4(a, b) { + var a0 = a[0], + a1 = a[1], + a2 = a[2]; + var b0 = b[0], + b1 = b[1], + b2 = b[2]; + return Math.abs(a0 - b0) <= EPSILON * Maths.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= EPSILON * Maths.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= EPSILON * Maths.max(1.0, Math.abs(a2), Math.abs(b2)); + } + /** + * Alias for {@link vec3.subtract} + * @function + */ + + var sub$2 = subtract$2; + /** + * Alias for {@link vec3.multiply} + * @function + */ + + var mul$4 = multiply$4; + /** + * Alias for {@link vec3.divide} + * @function + */ + + var div$2 = divide$2; + /** + * Alias for {@link vec3.distance} + * @function + */ + + var dist$2 = distance$2; + /** + * Alias for {@link vec3.squaredDistance} + * @function + */ + + var sqrDist$2 = squaredDistance$2; + /** + * Alias for {@link vec3.length} + * @function + */ + + var len$4 = length$4; + /** + * Alias for {@link vec3.squaredLength} + * @function + */ + + var sqrLen$4 = squaredLength$4; + /** + * Perform some operation over an array of vec3s. + * + * @param {Array} a the array of vectors to iterate over + * @param {Number} stride Number of elements between the start of each vec3. If 0 assumes tightly packed + * @param {Number} offset Number of elements to skip at the beginning of the array + * @param {Number} count Number of vec3s to iterate over. If 0 iterates over entire array + * @param {Function} fn Function to call for each vector in the array + * @param {Object} [arg] additional argument to pass to fn + * @returns {Array} a + * @function + */ + + var vec$2 = create$4(); + var forEach$2 = function () { + return function (a, stride, offset, count, fn, arg) { + var i, l; + + if (!stride) { + stride = 3; + } + + if (!offset) { + offset = 0; + } + + if (count) { + l = Maths.min(count * stride + offset, a.length); + } else { + l = a.length; + } + + for (i = offset; i < l; i += stride) { + vec$2[0] = a[i]; + vec$2[1] = a[i + 1]; + vec$2[2] = a[i + 2]; + fn(vec$2, vec$2, arg); + a[i] = vec$2[0]; + a[i + 1] = vec$2[1]; + a[i + 2] = vec$2[2]; + } + + return a; + }; + }(); + + var vec3 = /*#__PURE__*/Object.freeze({ + __proto__: null, + create: create$4, + clone: clone$4, + length: length$4, + fromValues: fromValues$4, + copy: copy$4, + set: set$4, + add: add$4, + subtract: subtract$2, + multiply: multiply$4, + divide: divide$2, + ceil: ceil$2, + floor: floor$2, + min: min$2, + max: max$2, + round: round$2, + scale: scale$4, + scaleAndAdd: scaleAndAdd$2, + distance: distance$2, + squaredDistance: squaredDistance$2, + squaredLength: squaredLength$4, + negate: negate$2, + inverse: inverse$2, + normalize: normalize$4, + dot: dot$4, + cross: cross$2, + lerp: lerp$4, + slerp: slerp$1, + hermite: hermite, + bezier: bezier, + random: random$3, + transformMat4: transformMat4$2, + transformMat3: transformMat3$1, + transformQuat: transformQuat$1, + rotateX: rotateX$2, + rotateY: rotateY$2, + rotateZ: rotateZ$2, + angle: angle$1, + zero: zero$2, + str: str$4, + exactEquals: exactEquals$4, + equals: equals$4, + sub: sub$2, + mul: mul$4, + div: div$2, + dist: dist$2, + sqrDist: sqrDist$2, + len: len$4, + sqrLen: sqrLen$4, + forEach: forEach$2 + }); + + /** + * 4 Dimensional Vector + * @module vec4 + */ + + /** + * Creates a new, empty vec4 + * + * @returns {vec4} a new 4D vector + */ + + function create$3() { + var out = new Float64Array(4); //if (glMatrix.ARRAY_TYPE != Float32Array) { + + out[0] = 0; + out[1] = 0; + out[2] = 0; + out[3] = 0; //} + + return out; + } + /** + * Creates a new vec4 initialized with values from an existing vector + * + * @param {ReadonlyVec4} a vector to clone + * @returns {vec4} a new 4D vector + */ + + function clone$3(a) { + var out = new Float64Array(4); + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[3]; + return out; + } + /** + * Creates a new vec4 initialized with the given values + * + * @param {Number} x X component + * @param {Number} y Y component + * @param {Number} z Z component + * @param {Number} w W component + * @returns {vec4} a new 4D vector + */ + + function fromValues$3(x, y, z, w) { + var out = new Float64Array(4); + out[0] = x; + out[1] = y; + out[2] = z; + out[3] = w; + return out; + } + /** + * Copy the values from one vec4 to another + * + * @param {vec4} out the receiving vector + * @param {ReadonlyVec4} a the source vector + * @returns {vec4} out + */ + + function copy$3(out, a) { + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[3]; + return out; + } + /** + * Set the components of a vec4 to the given values + * + * @param {vec4} out the receiving vector + * @param {Number} x X component + * @param {Number} y Y component + * @param {Number} z Z component + * @param {Number} w W component + * @returns {vec4} out + */ + + function set$3(out, x, y, z, w) { + out[0] = x; + out[1] = y; + out[2] = z; + out[3] = w; + return out; + } + /** + * Adds two vec4's + * + * @param {vec4} out the receiving vector + * @param {ReadonlyVec4} a the first operand + * @param {ReadonlyVec4} b the second operand + * @returns {vec4} out + */ + + function add$3(out, a, b) { + out[0] = a[0] + b[0]; + out[1] = a[1] + b[1]; + out[2] = a[2] + b[2]; + out[3] = a[3] + b[3]; + return out; + } + /** + * Subtracts vector b from vector a + * + * @param {vec4} out the receiving vector + * @param {ReadonlyVec4} a the first operand + * @param {ReadonlyVec4} b the second operand + * @returns {vec4} out + */ + + function subtract$1(out, a, b) { + out[0] = a[0] - b[0]; + out[1] = a[1] - b[1]; + out[2] = a[2] - b[2]; + out[3] = a[3] - b[3]; + return out; + } + /** + * Multiplies two vec4's + * + * @param {vec4} out the receiving vector + * @param {ReadonlyVec4} a the first operand + * @param {ReadonlyVec4} b the second operand + * @returns {vec4} out + */ + + function multiply$3(out, a, b) { + out[0] = a[0] * b[0]; + out[1] = a[1] * b[1]; + out[2] = a[2] * b[2]; + out[3] = a[3] * b[3]; + return out; + } + /** + * Divides two vec4's + * + * @param {vec4} out the receiving vector + * @param {ReadonlyVec4} a the first operand + * @param {ReadonlyVec4} b the second operand + * @returns {vec4} out + */ + + function divide$1(out, a, b) { + out[0] = a[0] / b[0]; + out[1] = a[1] / b[1]; + out[2] = a[2] / b[2]; + out[3] = a[3] / b[3]; + return out; + } + /** + * Math.ceil the components of a vec4 + * + * @param {vec4} out the receiving vector + * @param {ReadonlyVec4} a vector to ceil + * @returns {vec4} out + */ + + function ceil$1(out, a) { + out[0] = Math.ceil(a[0]); + out[1] = Math.ceil(a[1]); + out[2] = Math.ceil(a[2]); + out[3] = Math.ceil(a[3]); + return out; + } + /** + * Math.floor the components of a vec4 + * + * @param {vec4} out the receiving vector + * @param {ReadonlyVec4} a vector to floor + * @returns {vec4} out + */ + + function floor$1(out, a) { + out[0] = Math.floor(a[0]); + out[1] = Math.floor(a[1]); + out[2] = Math.floor(a[2]); + out[3] = Math.floor(a[3]); + return out; + } + /** + * Returns the minimum of two vec4's + * + * @param {vec4} out the receiving vector + * @param {ReadonlyVec4} a the first operand + * @param {ReadonlyVec4} b the second operand + * @returns {vec4} out + */ + + function min$1(out, a, b) { + out[0] = Math.min(a[0], b[0]); + out[1] = Math.min(a[1], b[1]); + out[2] = Math.min(a[2], b[2]); + out[3] = Math.min(a[3], b[3]); + return out; + } + /** + * Returns the maximum of two vec4's + * + * @param {vec4} out the receiving vector + * @param {ReadonlyVec4} a the first operand + * @param {ReadonlyVec4} b the second operand + * @returns {vec4} out + */ + + function max$1(out, a, b) { + out[0] = Math.max(a[0], b[0]); + out[1] = Math.max(a[1], b[1]); + out[2] = Math.max(a[2], b[2]); + out[3] = Math.max(a[3], b[3]); + return out; + } + /** + * Math.round the components of a vec4 + * + * @param {vec4} out the receiving vector + * @param {ReadonlyVec4} a vector to round + * @returns {vec4} out + */ + + function round$1(out, a) { + out[0] = Math.round(a[0]); + out[1] = Math.round(a[1]); + out[2] = Math.round(a[2]); + out[3] = Math.round(a[3]); + return out; + } + /** + * Scales a vec4 by a scalar number + * + * @param {vec4} out the receiving vector + * @param {ReadonlyVec4} a the vector to scale + * @param {Number} b amount to scale the vector by + * @returns {vec4} out + */ + + function scale$3(out, a, b) { + out[0] = a[0] * b; + out[1] = a[1] * b; + out[2] = a[2] * b; + out[3] = a[3] * b; + return out; + } + /** + * Adds two vec4's after scaling the second operand by a scalar value + * + * @param {vec4} out the receiving vector + * @param {ReadonlyVec4} a the first operand + * @param {ReadonlyVec4} b the second operand + * @param {Number} scale the amount to scale b by before adding + * @returns {vec4} out + */ + + function scaleAndAdd$1(out, a, b, scale) { + out[0] = a[0] + b[0] * scale; + out[1] = a[1] + b[1] * scale; + out[2] = a[2] + b[2] * scale; + out[3] = a[3] + b[3] * scale; + return out; + } + /** + * Calculates the euclidian distance between two vec4's + * + * @param {ReadonlyVec4} a the first operand + * @param {ReadonlyVec4} b the second operand + * @returns {Number} distance between a and b + */ + + function distance$1(a, b) { + var x = b[0] - a[0]; + var y = b[1] - a[1]; + var z = b[2] - a[2]; + var w = b[3] - a[3]; + return Maths.hypot(x, y, z, w); + } + /** + * Calculates the squared euclidian distance between two vec4's + * + * @param {ReadonlyVec4} a the first operand + * @param {ReadonlyVec4} b the second operand + * @returns {Number} squared distance between a and b + */ + + function squaredDistance$1(a, b) { + var x = b[0] - a[0]; + var y = b[1] - a[1]; + var z = b[2] - a[2]; + var w = b[3] - a[3]; + return x * x + y * y + z * z + w * w; + } + /** + * Calculates the length of a vec4 + * + * @param {ReadonlyVec4} a vector to calculate length of + * @returns {Number} length of a + */ + + function length$3(a) { + var x = a[0]; + var y = a[1]; + var z = a[2]; + var w = a[3]; + return Maths.hypot(x, y, z, w); + } + /** + * Calculates the squared length of a vec4 + * + * @param {ReadonlyVec4} a vector to calculate squared length of + * @returns {Number} squared length of a + */ + + function squaredLength$3(a) { + var x = a[0]; + var y = a[1]; + var z = a[2]; + var w = a[3]; + return x * x + y * y + z * z + w * w; + } + /** + * Negates the components of a vec4 + * + * @param {vec4} out the receiving vector + * @param {ReadonlyVec4} a vector to negate + * @returns {vec4} out + */ + + function negate$1(out, a) { + out[0] = -a[0]; + out[1] = -a[1]; + out[2] = -a[2]; + out[3] = -a[3]; + return out; + } + /** + * Returns the inverse of the components of a vec4 + * + * @param {vec4} out the receiving vector + * @param {ReadonlyVec4} a vector to invert + * @returns {vec4} out + */ + + function inverse$1(out, a) { + out[0] = 1.0 / a[0]; + out[1] = 1.0 / a[1]; + out[2] = 1.0 / a[2]; + out[3] = 1.0 / a[3]; + return out; + } + /** + * Normalize a vec4 + * + * @param {vec4} out the receiving vector + * @param {ReadonlyVec4} a vector to normalize + * @returns {vec4} out + */ + + function normalize$3(out, a) { + var x = a[0]; + var y = a[1]; + var z = a[2]; + var w = a[3]; + var len = x * x + y * y + z * z + w * w; + + if (len > 0) { + len = 1 / Math.sqrt(len); + } + + out[0] = x * len; + out[1] = y * len; + out[2] = z * len; + out[3] = w * len; + return out; + } + /** + * Calculates the dot product of two vec4's + * + * @param {ReadonlyVec4} a the first operand + * @param {ReadonlyVec4} b the second operand + * @returns {Number} dot product of a and b + */ + + function dot$3(a, b) { + return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3]; + } + /** + * Returns the cross-product of three vectors in a 4-dimensional space + * + * @param {vec4} out the receiving vector + * @param {ReadonlyVec4} u the first vector + * @param {ReadonlyVec4} v the second vector + * @param {ReadonlyVec4} w the third vector + * @returns {vec4} out + */ + + function cross$1(out, u, v, w) { + var A = v[0] * w[1] - v[1] * w[0], + B = v[0] * w[2] - v[2] * w[0], + C = v[0] * w[3] - v[3] * w[0], + D = v[1] * w[2] - v[2] * w[1], + E = v[1] * w[3] - v[3] * w[1], + F = v[2] * w[3] - v[3] * w[2]; + var G = u[0]; + var H = u[1]; + var I = u[2]; + var J = u[3]; + out[0] = H * F - I * E + J * D; + out[1] = -(G * F) + I * C - J * B; + out[2] = G * E - H * C + J * A; + out[3] = -(G * D) + H * B - I * A; + return out; + } + /** + * Performs a linear interpolation between two vec4's + * + * @param {vec4} out the receiving vector + * @param {ReadonlyVec4} a the first operand + * @param {ReadonlyVec4} b the second operand + * @param {Number} t interpolation amount, in the range [0-1], between the two inputs + * @returns {vec4} out + */ + + function lerp$3(out, a, b, t) { + var ax = a[0]; + var ay = a[1]; + var az = a[2]; + var aw = a[3]; + out[0] = ax + t * (b[0] - ax); + out[1] = ay + t * (b[1] - ay); + out[2] = az + t * (b[2] - az); + out[3] = aw + t * (b[3] - aw); + return out; + } + /** + * Generates a random vector with the given scale + * + * @param {vec4} out the receiving vector + * @param {Number} [scale] Length of the resulting vector. If omitted, a unit vector will be returned + * @returns {vec4} out + */ + + function random$2(out, scale) { + scale = scale || 1.0; // Marsaglia, George. Choosing a Point from the Surface of a + // Sphere. Ann. Math. Statist. 43 (1972), no. 2, 645--646. + // http://projecteuclid.org/euclid.aoms/1177692644; + + var v1, v2, v3, v4; + var s1, s2; + + do { + v1 = RANDOM() * 2 - 1; + v2 = RANDOM() * 2 - 1; + s1 = v1 * v1 + v2 * v2; + } while (s1 >= 1); + + do { + v3 = RANDOM() * 2 - 1; + v4 = RANDOM() * 2 - 1; + s2 = v3 * v3 + v4 * v4; + } while (s2 >= 1); + + var d = Math.sqrt((1 - s1) / s2); + out[0] = scale * v1; + out[1] = scale * v2; + out[2] = scale * v3 * d; + out[3] = scale * v4 * d; + return out; + } + /** + * Transforms the vec4 with a mat4. + * + * @param {vec4} out the receiving vector + * @param {ReadonlyVec4} a the vector to transform + * @param {ReadonlyMat4} m matrix to transform with + * @returns {vec4} out + */ + + function transformMat4$1(out, a, m) { + var x = a[0], + y = a[1], + z = a[2], + w = a[3]; + out[0] = m[0] * x + m[4] * y + m[8] * z + m[12] * w; + out[1] = m[1] * x + m[5] * y + m[9] * z + m[13] * w; + out[2] = m[2] * x + m[6] * y + m[10] * z + m[14] * w; + out[3] = m[3] * x + m[7] * y + m[11] * z + m[15] * w; + return out; + } + /** + * Transforms the vec4 with a quat + * + * @param {vec4} out the receiving vector + * @param {ReadonlyVec4} a the vector to transform + * @param {ReadonlyQuat} q quaternion to transform with + * @returns {vec4} out + */ + + function transformQuat(out, a, q) { + var x = a[0], + y = a[1], + z = a[2]; + var qx = q[0], + qy = q[1], + qz = q[2], + qw = q[3]; // calculate quat * vec + + var ix = qw * x + qy * z - qz * y; + var iy = qw * y + qz * x - qx * z; + var iz = qw * z + qx * y - qy * x; + var iw = -qx * x - qy * y - qz * z; // calculate result * inverse quat + + out[0] = ix * qw + iw * -qx + iy * -qz - iz * -qy; + out[1] = iy * qw + iw * -qy + iz * -qx - ix * -qz; + out[2] = iz * qw + iw * -qz + ix * -qy - iy * -qx; + out[3] = a[3]; + return out; + } + /** + * Set the components of a vec4 to zero + * + * @param {vec4} out the receiving vector + * @returns {vec4} out + */ + + function zero$1(out) { + out[0] = 0.0; + out[1] = 0.0; + out[2] = 0.0; + out[3] = 0.0; + return out; + } + /** + * Returns a string representation of a vector + * + * @param {ReadonlyVec4} a vector to represent as a string + * @returns {String} string representation of the vector + */ + + function str$3(a) { + return "vec4(" + a[0].toString() + ", " + a[1].toString() + ", " + a[2].toString() + ", " + a[3].toString() + ")"; + } + /** + * Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===) + * + * @param {ReadonlyVec4} a The first vector. + * @param {ReadonlyVec4} b The second vector. + * @returns {Boolean} True if the vectors are equal, false otherwise. + */ + + function exactEquals$3(a, b) { + return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3]; + } + /** + * Returns whether or not the vectors have approximately the same elements in the same position. + * + * @param {ReadonlyVec4} a The first vector. + * @param {ReadonlyVec4} b The second vector. + * @returns {Boolean} True if the vectors are equal, false otherwise. + */ + + function equals$3(a, b) { + var a0 = a[0], + a1 = a[1], + a2 = a[2], + a3 = a[3]; + var b0 = b[0], + b1 = b[1], + b2 = b[2], + b3 = b[3]; + return Math.abs(a0 - b0) <= EPSILON * Maths.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= EPSILON * Maths.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= EPSILON * Maths.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= EPSILON * Maths.max(1.0, Math.abs(a3), Math.abs(b3)); + } + /** + * Alias for {@link vec4.subtract} + * @function + */ + + var sub$1 = subtract$1; + /** + * Alias for {@link vec4.multiply} + * @function + */ + + var mul$3 = multiply$3; + /** + * Alias for {@link vec4.divide} + * @function + */ + + var div$1 = divide$1; + /** + * Alias for {@link vec4.distance} + * @function + */ + + var dist$1 = distance$1; + /** + * Alias for {@link vec4.squaredDistance} + * @function + */ + + var sqrDist$1 = squaredDistance$1; + /** + * Alias for {@link vec4.length} + * @function + */ + + var len$3 = length$3; + /** + * Alias for {@link vec4.squaredLength} + * @function + */ + + var sqrLen$3 = squaredLength$3; + /** + * Perform some operation over an array of vec4s. + * + * @param {Array} a the array of vectors to iterate over + * @param {Number} stride Number of elements between the start of each vec4. If 0 assumes tightly packed + * @param {Number} offset Number of elements to skip at the beginning of the array + * @param {Number} count Number of vec4s to iterate over. If 0 iterates over entire array + * @param {Function} fn Function to call for each vector in the array + * @param {Object} [arg] additional argument to pass to fn + * @returns {Array} a + * @function + */ + + var vec$1 = create$3(); + var forEach$1 = function () { + return function (a, stride, offset, count, fn, arg) { + var i, l; + + if (!stride) { + stride = 4; + } + + if (!offset) { + offset = 0; + } + + if (count) { + l = Maths.min(count * stride + offset, a.length); + } else { + l = a.length; + } + + for (i = offset; i < l; i += stride) { + vec$1[0] = a[i]; + vec$1[1] = a[i + 1]; + vec$1[2] = a[i + 2]; + vec$1[3] = a[i + 3]; + fn(vec$1, vec$1, arg); + a[i] = vec$1[0]; + a[i + 1] = vec$1[1]; + a[i + 2] = vec$1[2]; + a[i + 3] = vec$1[3]; + } + + return a; + }; + }(); + + var vec4 = /*#__PURE__*/Object.freeze({ + __proto__: null, + create: create$3, + clone: clone$3, + fromValues: fromValues$3, + copy: copy$3, + set: set$3, + add: add$3, + subtract: subtract$1, + multiply: multiply$3, + divide: divide$1, + ceil: ceil$1, + floor: floor$1, + min: min$1, + max: max$1, + round: round$1, + scale: scale$3, + scaleAndAdd: scaleAndAdd$1, + distance: distance$1, + squaredDistance: squaredDistance$1, + length: length$3, + squaredLength: squaredLength$3, + negate: negate$1, + inverse: inverse$1, + normalize: normalize$3, + dot: dot$3, + cross: cross$1, + lerp: lerp$3, + random: random$2, + transformMat4: transformMat4$1, + transformQuat: transformQuat, + zero: zero$1, + str: str$3, + exactEquals: exactEquals$3, + equals: equals$3, + sub: sub$1, + mul: mul$3, + div: div$1, + dist: dist$1, + sqrDist: sqrDist$1, + len: len$3, + sqrLen: sqrLen$3, + forEach: forEach$1 + }); + + /** + * Quaternion in the format XYZW + * @module quat + */ + + /** + * Creates a new identity quat + * + * @returns {quat} a new quaternion + */ + + function create$2() { + var out = new Float64Array(4); //if (glMatrix.ARRAY_TYPE != Float32Array) { + + out[0] = 0; + out[1] = 0; + out[2] = 0; //} + + out[3] = 1; + return out; + } + /** + * Set a quat to the identity quaternion + * + * @param {quat} out the receiving quaternion + * @returns {quat} out + */ + + function identity$1(out) { + out[0] = 0; + out[1] = 0; + out[2] = 0; + out[3] = 1; + return out; + } + /** + * Sets a quat from the given angle and rotation axis, + * then returns it. + * + * @param {quat} out the receiving quaternion + * @param {ReadonlyVec3} axis the axis around which to rotate + * @param {Number} rad the angle in radians + * @returns {quat} out + **/ + + function setAxisAngle(out, axis, rad) { + rad = rad * 0.5; + var s = Math.sin(rad); + out[0] = s * axis[0]; + out[1] = s * axis[1]; + out[2] = s * axis[2]; + out[3] = Math.cos(rad); + return out; + } + /** + * Gets the rotation axis and angle for a given + * quaternion. If a quaternion is created with + * setAxisAngle, this method will return the same + * values as providied in the original parameter list + * OR functionally equivalent values. + * Example: The quaternion formed by axis [0, 0, 1] and + * angle -90 is the same as the quaternion formed by + * [0, 0, 1] and 270. This method favors the latter. + * @param {vec3} out_axis Vector receiving the axis of rotation + * @param {ReadonlyQuat} q Quaternion to be decomposed + * @return {Number} Angle, in radians, of the rotation + */ + + function getAxisAngle(out_axis, q) { + var rad = Math.acos(q[3]) * 2.0; + var s = Math.sin(rad / 2.0); + + if (s > EPSILON) { + out_axis[0] = q[0] / s; + out_axis[1] = q[1] / s; + out_axis[2] = q[2] / s; + } else { + // If s is zero, return any axis (no rotation - axis does not matter) + out_axis[0] = 1; + out_axis[1] = 0; + out_axis[2] = 0; + } + + return rad; + } + /** + * Gets the angular distance between two unit quaternions + * + * @param {ReadonlyQuat} a Origin unit quaternion + * @param {ReadonlyQuat} b Destination unit quaternion + * @return {Number} Angle, in radians, between the two quaternions + */ + + function getAngle(a, b) { + var dotproduct = dot$2(a, b); + return Math.acos(2 * dotproduct * dotproduct - 1); + } + /** + * Multiplies two quat's + * + * @param {quat} out the receiving quaternion + * @param {ReadonlyQuat} a the first operand + * @param {ReadonlyQuat} b the second operand + * @returns {quat} out + */ + + function multiply$2(out, a, b) { + var ax = a[0], + ay = a[1], + az = a[2], + aw = a[3]; + var bx = b[0], + by = b[1], + bz = b[2], + bw = b[3]; + out[0] = ax * bw + aw * bx + ay * bz - az * by; + out[1] = ay * bw + aw * by + az * bx - ax * bz; + out[2] = az * bw + aw * bz + ax * by - ay * bx; + out[3] = aw * bw - ax * bx - ay * by - az * bz; + return out; + } + /** + * Rotates a quaternion by the given angle about the X axis + * + * @param {quat} out quat receiving operation result + * @param {ReadonlyQuat} a quat to rotate + * @param {number} rad angle (in radians) to rotate + * @returns {quat} out + */ + + function rotateX$1(out, a, rad) { + rad *= 0.5; + var ax = a[0], + ay = a[1], + az = a[2], + aw = a[3]; + var bx = Math.sin(rad), + bw = Math.cos(rad); + out[0] = ax * bw + aw * bx; + out[1] = ay * bw + az * bx; + out[2] = az * bw - ay * bx; + out[3] = aw * bw - ax * bx; + return out; + } + /** + * Rotates a quaternion by the given angle about the Y axis + * + * @param {quat} out quat receiving operation result + * @param {ReadonlyQuat} a quat to rotate + * @param {number} rad angle (in radians) to rotate + * @returns {quat} out + */ + + function rotateY$1(out, a, rad) { + rad *= 0.5; + var ax = a[0], + ay = a[1], + az = a[2], + aw = a[3]; + var by = Math.sin(rad), + bw = Math.cos(rad); + out[0] = ax * bw - az * by; + out[1] = ay * bw + aw * by; + out[2] = az * bw + ax * by; + out[3] = aw * bw - ay * by; + return out; + } + /** + * Rotates a quaternion by the given angle about the Z axis + * + * @param {quat} out quat receiving operation result + * @param {ReadonlyQuat} a quat to rotate + * @param {number} rad angle (in radians) to rotate + * @returns {quat} out + */ + + function rotateZ$1(out, a, rad) { + rad *= 0.5; + var ax = a[0], + ay = a[1], + az = a[2], + aw = a[3]; + var bz = Math.sin(rad), + bw = Math.cos(rad); + out[0] = ax * bw + ay * bz; + out[1] = ay * bw - ax * bz; + out[2] = az * bw + aw * bz; + out[3] = aw * bw - az * bz; + return out; + } + /** + * Calculates the W component of a quat from the X, Y, and Z components. + * Assumes that quaternion is 1 unit in length. + * Any existing W component will be ignored. + * + * @param {quat} out the receiving quaternion + * @param {ReadonlyQuat} a quat to calculate W component of + * @returns {quat} out + */ + + function calculateW(out, a) { + var x = a[0], + y = a[1], + z = a[2]; + out[0] = x; + out[1] = y; + out[2] = z; + out[3] = Math.sqrt(Math.abs(1.0 - x * x - y * y - z * z)); + return out; + } + /** + * Calculate the exponential of a unit quaternion. + * + * @param {quat} out the receiving quaternion + * @param {ReadonlyQuat} a quat to calculate the exponential of + * @returns {quat} out + */ + + function exp(out, a) { + var x = a[0], + y = a[1], + z = a[2], + w = a[3]; + var r = Math.sqrt(x * x + y * y + z * z); + var et = Math.exp(w); + var s = r > 0 ? et * Math.sin(r) / r : 0; + out[0] = x * s; + out[1] = y * s; + out[2] = z * s; + out[3] = et * Math.cos(r); + return out; + } + /** + * Calculate the natural logarithm of a unit quaternion. + * + * @param {quat} out the receiving quaternion + * @param {ReadonlyQuat} a quat to calculate the exponential of + * @returns {quat} out + */ + + function ln(out, a) { + var x = a[0], + y = a[1], + z = a[2], + w = a[3]; + var r = Math.sqrt(x * x + y * y + z * z); + var t = r > 0 ? Math.atan2(r, w) / r : 0; + out[0] = x * t; + out[1] = y * t; + out[2] = z * t; + out[3] = 0.5 * Math.log(x * x + y * y + z * z + w * w); + return out; + } + /** + * Calculate the scalar power of a unit quaternion. + * + * @param {quat} out the receiving quaternion + * @param {ReadonlyQuat} a quat to calculate the exponential of + * @param {Number} b amount to scale the quaternion by + * @returns {quat} out + */ + + function pow(out, a, b) { + ln(out, a); + scale$2(out, out, b); + exp(out, out); + return out; + } + /** + * Performs a spherical linear interpolation between two quat + * + * @param {quat} out the receiving quaternion + * @param {ReadonlyQuat} a the first operand + * @param {ReadonlyQuat} b the second operand + * @param {Number} t interpolation amount, in the range [0-1], between the two inputs + * @returns {quat} out + */ + + function slerp(out, a, b, t) { + // benchmarks: + // http://jsperf.com/quaternion-slerp-implementations + var ax = a[0], + ay = a[1], + az = a[2], + aw = a[3]; + var bx = b[0], + by = b[1], + bz = b[2], + bw = b[3]; + var omega, cosom, sinom, scale0, scale1; // calc cosine + + cosom = ax * bx + ay * by + az * bz + aw * bw; // adjust signs (if necessary) + + if (cosom < 0.0) { + cosom = -cosom; + bx = -bx; + by = -by; + bz = -bz; + bw = -bw; + } // calculate coefficients + + + if (1.0 - cosom > EPSILON) { + // standard case (slerp) + omega = Math.acos(cosom); + sinom = Math.sin(omega); + scale0 = Math.sin((1.0 - t) * omega) / sinom; + scale1 = Math.sin(t * omega) / sinom; + } else { + // "from" and "to" quaternions are very close + // ... so we can do a linear interpolation + scale0 = 1.0 - t; + scale1 = t; + } // calculate final values + + + out[0] = scale0 * ax + scale1 * bx; + out[1] = scale0 * ay + scale1 * by; + out[2] = scale0 * az + scale1 * bz; + out[3] = scale0 * aw + scale1 * bw; + return out; + } + /** + * Generates a random unit quaternion + * + * @param {quat} out the receiving quaternion + * @returns {quat} out + */ + + function random$1(out) { + // Implementation of http://planning.cs.uiuc.edu/node198.html + // TODO: Calling random 3 times is probably not the fastest solution + var u1 = RANDOM(); + var u2 = RANDOM(); + var u3 = RANDOM(); + var sqrt1MinusU1 = Math.sqrt(1 - u1); + var sqrtU1 = Math.sqrt(u1); + out[0] = sqrt1MinusU1 * Math.sin(2.0 * Math.PI * u2); + out[1] = sqrt1MinusU1 * Math.cos(2.0 * Math.PI * u2); + out[2] = sqrtU1 * Math.sin(2.0 * Math.PI * u3); + out[3] = sqrtU1 * Math.cos(2.0 * Math.PI * u3); + return out; + } + /** + * Calculates the inverse of a quat + * + * @param {quat} out the receiving quaternion + * @param {ReadonlyQuat} a quat to calculate inverse of + * @returns {quat} out + */ + + function invert$1(out, a) { + var a0 = a[0], + a1 = a[1], + a2 = a[2], + a3 = a[3]; + var dot = a0 * a0 + a1 * a1 + a2 * a2 + a3 * a3; + var invDot = dot ? 1.0 / dot : 0; // TODO: Would be faster to return [0,0,0,0] immediately if dot == 0 + + out[0] = -a0 * invDot; + out[1] = -a1 * invDot; + out[2] = -a2 * invDot; + out[3] = a3 * invDot; + return out; + } + /** + * Calculates the conjugate of a quat + * If the quaternion is normalized, this function is faster than quat.inverse and produces the same result. + * + * @param {quat} out the receiving quaternion + * @param {ReadonlyQuat} a quat to calculate conjugate of + * @returns {quat} out + */ + + function conjugate$1(out, a) { + out[0] = -a[0]; + out[1] = -a[1]; + out[2] = -a[2]; + out[3] = a[3]; + return out; + } + /** + * Creates a quaternion from the given 3x3 rotation matrix. + * + * NOTE: The resultant quaternion is not normalized, so you should be sure + * to renormalize the quaternion yourself where necessary. + * + * @param {quat} out the receiving quaternion + * @param {ReadonlyMat3} m rotation matrix + * @returns {quat} out + * @function + */ + + function fromMat3(out, m) { + // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes + // article "Quaternion Calculus and Fast Animation". + var fTrace = m[0] + m[4] + m[8]; + var fRoot; + + if (fTrace > 0.0) { + // |w| > 1/2, may as well choose w > 1/2 + fRoot = Math.sqrt(fTrace + 1.0); // 2w + + out[3] = 0.5 * fRoot; + fRoot = 0.5 / fRoot; // 1/(4w) + + out[0] = (m[5] - m[7]) * fRoot; + out[1] = (m[6] - m[2]) * fRoot; + out[2] = (m[1] - m[3]) * fRoot; + } else { + // |w| <= 1/2 + var i = 0; + if (m[4] > m[0]) i = 1; + if (m[8] > m[i * 3 + i]) i = 2; + var j = (i + 1) % 3; + var k = (i + 2) % 3; + fRoot = Math.sqrt(m[i * 3 + i] - m[j * 3 + j] - m[k * 3 + k] + 1.0); + out[i] = 0.5 * fRoot; + fRoot = 0.5 / fRoot; + out[3] = (m[j * 3 + k] - m[k * 3 + j]) * fRoot; + out[j] = (m[j * 3 + i] + m[i * 3 + j]) * fRoot; + out[k] = (m[k * 3 + i] + m[i * 3 + k]) * fRoot; + } + + return out; + } + /** + * Creates a quaternion from the given euler angle x, y, z using the provided intrinsic order for the conversion. + * + * @param {quat} out the receiving quaternion + * @param {x} x Angle to rotate around X axis in degrees. + * @param {y} y Angle to rotate around Y axis in degrees. + * @param {z} z Angle to rotate around Z axis in degrees. + * @param {'zyx'|'xyz'|'yxz'|'yzx'|'zxy'|'zyx'} order Intrinsic order for conversion, default is zyx. + * @returns {quat} out + * @function + */ + + function fromEuler(out, x, y, z, order) { + if (order === void 0) { + order = ANGLE_ORDER; + } + + var halfToRad = Math.PI / 360; + x *= halfToRad; + z *= halfToRad; + y *= halfToRad; + var sx = Math.sin(x); + var cx = Math.cos(x); + var sy = Math.sin(y); + var cy = Math.cos(y); + var sz = Math.sin(z); + var cz = Math.cos(z); + + if (order === "xyz") { + out[0] = sx * cy * cz + cx * sy * sz; + out[1] = cx * sy * cz - sx * cy * sz; + out[2] = cx * cy * sz + sx * sy * cz; + out[3] = cx * cy * cz - sx * sy * sz; + } else if (order === "xzy") { + out[0] = sx * cy * cz - cx * sy * sz; + out[1] = cx * sy * cz - sx * cy * sz; + out[2] = cx * cy * sz + sx * sy * cz; + out[3] = cx * cy * cz + sx * sy * sz; + } else if (order === "yxz") { + out[0] = sx * cy * cz + cx * sy * sz; + out[1] = cx * sy * cz - sx * cy * sz; + out[2] = cx * cy * sz - sx * sy * cz; + out[3] = cx * cy * cz + sx * sy * sz; + } else if (order === "yzx") { + out[0] = sx * cy * cz + cx * sy * sz; + out[1] = cx * sy * cz + sx * cy * sz; + out[2] = cx * cy * sz - sx * sy * cz; + out[3] = cx * cy * cz - sx * sy * sz; + } else if (order === "zxy") { + out[0] = sx * cy * cz - cx * sy * sz; + out[1] = cx * sy * cz + sx * cy * sz; + out[2] = cx * cy * sz + sx * sy * cz; + out[3] = cx * cy * cz - sx * sy * sz; + } else if (order === "zyx") { + out[0] = sx * cy * cz - cx * sy * sz; + out[1] = cx * sy * cz + sx * cy * sz; + out[2] = cx * cy * sz - sx * sy * cz; + out[3] = cx * cy * cz + sx * sy * sz; + } else throw new Error('Unknown angle order ' + order); + + return out; + } + /** + * Returns a string representation of a quaternion + * + * @param {ReadonlyQuat} a vector to represent as a string + * @returns {String} string representation of the vector + */ + + function str$2(a) { + return "quat(" + a[0].toString() + ", " + a[1].toString() + ", " + a[2].toString() + ", " + a[3].toString() + ")"; + } + /** + * Creates a new quat initialized with values from an existing quaternion + * + * @param {ReadonlyQuat} a quaternion to clone + * @returns {quat} a new quaternion + * @function + */ + + var clone$2 = clone$3; + /** + * Creates a new quat initialized with the given values + * + * @param {Number} x X component + * @param {Number} y Y component + * @param {Number} z Z component + * @param {Number} w W component + * @returns {quat} a new quaternion + * @function + */ + + var fromValues$2 = fromValues$3; + /** + * Copy the values from one quat to another + * + * @param {quat} out the receiving quaternion + * @param {ReadonlyQuat} a the source quaternion + * @returns {quat} out + * @function + */ + + var copy$2 = copy$3; + /** + * Set the components of a quat to the given values + * + * @param {quat} out the receiving quaternion + * @param {Number} x X component + * @param {Number} y Y component + * @param {Number} z Z component + * @param {Number} w W component + * @returns {quat} out + * @function + */ + + var set$2 = set$3; + /** + * Adds two quat's + * + * @param {quat} out the receiving quaternion + * @param {ReadonlyQuat} a the first operand + * @param {ReadonlyQuat} b the second operand + * @returns {quat} out + * @function + */ + + var add$2 = add$3; + /** + * Alias for {@link quat.multiply} + * @function + */ + + var mul$2 = multiply$2; + /** + * Scales a quat by a scalar number + * + * @param {quat} out the receiving vector + * @param {ReadonlyQuat} a the vector to scale + * @param {Number} b amount to scale the vector by + * @returns {quat} out + * @function + */ + + var scale$2 = scale$3; + /** + * Calculates the dot product of two quat's + * + * @param {ReadonlyQuat} a the first operand + * @param {ReadonlyQuat} b the second operand + * @returns {Number} dot product of a and b + * @function + */ + + var dot$2 = dot$3; + /** + * Performs a linear interpolation between two quat's + * + * @param {quat} out the receiving quaternion + * @param {ReadonlyQuat} a the first operand + * @param {ReadonlyQuat} b the second operand + * @param {Number} t interpolation amount, in the range [0-1], between the two inputs + * @returns {quat} out + * @function + */ + + var lerp$2 = lerp$3; + /** + * Calculates the length of a quat + * + * @param {ReadonlyQuat} a vector to calculate length of + * @returns {Number} length of a + */ + + var length$2 = length$3; + /** + * Alias for {@link quat.length} + * @function + */ + + var len$2 = length$2; + /** + * Calculates the squared length of a quat + * + * @param {ReadonlyQuat} a vector to calculate squared length of + * @returns {Number} squared length of a + * @function + */ + + var squaredLength$2 = squaredLength$3; + /** + * Alias for {@link quat.squaredLength} + * @function + */ + + var sqrLen$2 = squaredLength$2; + /** + * Normalize a quat + * + * @param {quat} out the receiving quaternion + * @param {ReadonlyQuat} a quaternion to normalize + * @returns {quat} out + * @function + */ + + var normalize$2 = normalize$3; + /** + * Returns whether or not the quaternions have exactly the same elements in the same position (when compared with ===) + * + * @param {ReadonlyQuat} a The first quaternion. + * @param {ReadonlyQuat} b The second quaternion. + * @returns {Boolean} True if the vectors are equal, false otherwise. + */ + + var exactEquals$2 = exactEquals$3; + /** + * Returns whether or not the quaternions point approximately to the same direction. + * + * Both quaternions are assumed to be unit length. + * + * @param {ReadonlyQuat} a The first unit quaternion. + * @param {ReadonlyQuat} b The second unit quaternion. + * @returns {Boolean} True if the quaternions are equal, false otherwise. + */ + + function equals$2(a, b) { + return Math.abs(dot$3(a, b)) >= 1 - EPSILON; + } + /** + * Sets a quaternion to represent the shortest rotation from one + * vector to another. + * + * Both vectors are assumed to be unit length. + * + * @param {quat} out the receiving quaternion. + * @param {ReadonlyVec3} a the initial vector + * @param {ReadonlyVec3} b the destination vector + * @returns {quat} out + */ + + var tmpvec3 = create$4(); + var xUnitVec3 = fromValues$4(1, 0, 0); + var yUnitVec3 = fromValues$4(0, 1, 0); + var rotationTo = function () { + return function (out, a, b) { + var dot = dot$4(a, b); + + if (dot < -0.999999) { + cross$2(tmpvec3, xUnitVec3, a); + if (len$4(tmpvec3) < 0.000001) cross$2(tmpvec3, yUnitVec3, a); + normalize$4(tmpvec3, tmpvec3); + setAxisAngle(out, tmpvec3, Math.PI); + return out; + } else if (dot > 0.999999) { + out[0] = 0; + out[1] = 0; + out[2] = 0; + out[3] = 1; + return out; + } else { + cross$2(tmpvec3, a, b); + out[0] = tmpvec3[0]; + out[1] = tmpvec3[1]; + out[2] = tmpvec3[2]; + out[3] = 1 + dot; + return normalize$2(out, out); + } + }; + }(); + /** + * Performs a spherical linear interpolation with two control points + * + * @param {quat} out the receiving quaternion + * @param {ReadonlyQuat} a the first operand + * @param {ReadonlyQuat} b the second operand + * @param {ReadonlyQuat} c the third operand + * @param {ReadonlyQuat} d the fourth operand + * @param {Number} t interpolation amount, in the range [0-1], between the two inputs + * @returns {quat} out + */ + + var temp1 = create$2(); + var temp2 = create$2(); + var sqlerp = function () { + return function (out, a, b, c, d, t) { + slerp(temp1, a, d, t); + slerp(temp2, b, c, t); + slerp(out, temp1, temp2, 2 * t * (1 - t)); + return out; + }; + }(); + /** + * Sets the specified quaternion with values corresponding to the given + * axes. Each axis is a vec3 and is expected to be unit length and + * perpendicular to all other specified axes. + * + * @param {quat} out the receiving quaternion + * @param {ReadonlyVec3} view the vector representing the viewing direction + * @param {ReadonlyVec3} right the vector representing the local "right" direction + * @param {ReadonlyVec3} up the vector representing the local "up" direction + * @returns {quat} out + */ + + var matr = create$6(); + var setAxes = function () { + return function (out, view, right, up) { + matr[0] = right[0]; + matr[3] = right[1]; + matr[6] = right[2]; + matr[1] = up[0]; + matr[4] = up[1]; + matr[7] = up[2]; + matr[2] = -view[0]; + matr[5] = -view[1]; + matr[8] = -view[2]; + return normalize$2(out, fromMat3(out, matr)); + }; + }(); + + var quat = /*#__PURE__*/Object.freeze({ + __proto__: null, + create: create$2, + identity: identity$1, + setAxisAngle: setAxisAngle, + getAxisAngle: getAxisAngle, + getAngle: getAngle, + multiply: multiply$2, + rotateX: rotateX$1, + rotateY: rotateY$1, + rotateZ: rotateZ$1, + calculateW: calculateW, + exp: exp, + ln: ln, + pow: pow, + slerp: slerp, + random: random$1, + invert: invert$1, + conjugate: conjugate$1, + fromMat3: fromMat3, + fromEuler: fromEuler, + str: str$2, + clone: clone$2, + fromValues: fromValues$2, + copy: copy$2, + set: set$2, + add: add$2, + mul: mul$2, + scale: scale$2, + dot: dot$2, + lerp: lerp$2, + length: length$2, + len: len$2, + squaredLength: squaredLength$2, + sqrLen: sqrLen$2, + normalize: normalize$2, + exactEquals: exactEquals$2, + equals: equals$2, + rotationTo: rotationTo, + sqlerp: sqlerp, + setAxes: setAxes + }); + + /** + * Dual Quaternion
+ * Format: [real, dual]
+ * Quaternion format: XYZW
+ * Make sure to have normalized dual quaternions, otherwise the functions may not work as intended.
+ * @module quat2 + */ + + /** + * Creates a new identity dual quat + * + * @returns {quat2} a new dual quaternion [real -> rotation, dual -> translation] + */ + + function create$1() { + var dq = changetype(new Float64Array(8)); //if (glMatrix.ARRAY_TYPE != Float32Array) { + + dq[0] = 0; + dq[1] = 0; + dq[2] = 0; + dq[4] = 0; + dq[5] = 0; + dq[6] = 0; + dq[7] = 0; //} + + dq[3] = 1; + return dq; + } + /** + * Creates a new quat initialized with values from an existing quaternion + * + * @param {ReadonlyQuat2} a dual quaternion to clone + * @returns {quat2} new dual quaternion + * @function + */ + + function clone$1(a) { + var dq = changetype(new Float64Array(8)); + dq[0] = a[0]; + dq[1] = a[1]; + dq[2] = a[2]; + dq[3] = a[3]; + dq[4] = a[4]; + dq[5] = a[5]; + dq[6] = a[6]; + dq[7] = a[7]; + return dq; + } + /** + * Creates a new dual quat initialized with the given values + * + * @param {Number} x1 X component + * @param {Number} y1 Y component + * @param {Number} z1 Z component + * @param {Number} w1 W component + * @param {Number} x2 X component + * @param {Number} y2 Y component + * @param {Number} z2 Z component + * @param {Number} w2 W component + * @returns {quat2} new dual quaternion + * @function + */ + + function fromValues$1(x1, y1, z1, w1, x2, y2, z2, w2) { + var dq = changetype(new Float64Array(8)); + dq[0] = x1; + dq[1] = y1; + dq[2] = z1; + dq[3] = w1; + dq[4] = x2; + dq[5] = y2; + dq[6] = z2; + dq[7] = w2; + return dq; + } + /** + * Creates a new dual quat from the given values (quat and translation) + * + * @param {Number} x1 X component + * @param {Number} y1 Y component + * @param {Number} z1 Z component + * @param {Number} w1 W component + * @param {Number} x2 X component (translation) + * @param {Number} y2 Y component (translation) + * @param {Number} z2 Z component (translation) + * @returns {quat2} new dual quaternion + * @function + */ + + function fromRotationTranslationValues(x1, y1, z1, w1, x2, y2, z2) { + var dq = changetype(new Float64Array(8)); + dq[0] = x1; + dq[1] = y1; + dq[2] = z1; + dq[3] = w1; + var ax = x2 * 0.5, + ay = y2 * 0.5, + az = z2 * 0.5; + dq[4] = ax * w1 + ay * z1 - az * y1; + dq[5] = ay * w1 + az * x1 - ax * z1; + dq[6] = az * w1 + ax * y1 - ay * x1; + dq[7] = -ax * x1 - ay * y1 - az * z1; + return dq; + } + /** + * Creates a dual quat from a quaternion and a translation + * + * @param {quat2} out quaternion receiving operation result + * @param {ReadonlyQuat} q a normalized quaternion + * @param {ReadonlyVec3} t translation vector + * @returns {quat2} dual quaternion receiving operation result + * @function + */ + + function fromRotationTranslation(out, q, t) { + var ax = t[0] * 0.5, + ay = t[1] * 0.5, + az = t[2] * 0.5, + bx = q[0], + by = q[1], + bz = q[2], + bw = q[3]; + out[0] = bx; + out[1] = by; + out[2] = bz; + out[3] = bw; + out[4] = ax * bw + ay * bz - az * by; + out[5] = ay * bw + az * bx - ax * bz; + out[6] = az * bw + ax * by - ay * bx; + out[7] = -ax * bx - ay * by - az * bz; + return out; + } + /** + * Creates a dual quat from a translation + * + * @param {quat2} out quaternion receiving operation result + * @param {ReadonlyVec3} t translation vector + * @returns {quat2} out quaternion receiving operation result + * @function + */ + + function fromTranslation(out, t) { + out[0] = 0; + out[1] = 0; + out[2] = 0; + out[3] = 1; + out[4] = t[0] * 0.5; + out[5] = t[1] * 0.5; + out[6] = t[2] * 0.5; + out[7] = 0; + return out; + } + /** + * Creates a dual quat from a quaternion + * + * @param {quat2} out quaternion receiving operation result + * @param {ReadonlyQuat} q the quaternion + * @returns {quat2} out quaternion receiving operation result + * @function + */ + + function fromRotation(out, q) { + out[0] = q[0]; + out[1] = q[1]; + out[2] = q[2]; + out[3] = q[3]; + out[4] = 0; + out[5] = 0; + out[6] = 0; + out[7] = 0; + return out; + } + /** + * Creates a new dual quat from a matrix (4x4) + * + * @param {quat2} out the dual quaternion + * @param {ReadonlyMat4} a the matrix + * @returns {quat2} dual quat receiving operation result + * @function + */ + + function fromMat4(out, a) { + //TODO Optimize this + var outer = create$2(); + getRotation(outer, a); + var t = new Float64Array(3); + getTranslation$1(t, a); + fromRotationTranslation(out, outer, t); + return out; + } + /** + * Copy the values from one dual quat to another + * + * @param {quat2} out the receiving dual quaternion + * @param {ReadonlyQuat2} a the source dual quaternion + * @returns {quat2} out + * @function + */ + + function copy$1(out, a) { + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[3]; + out[4] = a[4]; + out[5] = a[5]; + out[6] = a[6]; + out[7] = a[7]; + return out; + } + /** + * Set a dual quat to the identity dual quaternion + * + * @param {quat2} out the receiving quaternion + * @returns {quat2} out + */ + + function identity(out) { + out[0] = 0; + out[1] = 0; + out[2] = 0; + out[3] = 1; + out[4] = 0; + out[5] = 0; + out[6] = 0; + out[7] = 0; + return out; + } + /** + * Set the components of a dual quat to the given values + * + * @param {quat2} out the receiving quaternion + * @param {Number} x1 X component + * @param {Number} y1 Y component + * @param {Number} z1 Z component + * @param {Number} w1 W component + * @param {Number} x2 X component + * @param {Number} y2 Y component + * @param {Number} z2 Z component + * @param {Number} w2 W component + * @returns {quat2} out + * @function + */ + + function set$1(out, x1, y1, z1, w1, x2, y2, z2, w2) { + out[0] = x1; + out[1] = y1; + out[2] = z1; + out[3] = w1; + out[4] = x2; + out[5] = y2; + out[6] = z2; + out[7] = w2; + return out; + } + /** + * Gets the real part of a dual quat + * @param {quat} out real part + * @param {ReadonlyQuat2} a Dual Quaternion + * @return {quat} real part + */ + + var getReal = copy$2; + /** + * Gets the dual part of a dual quat + * @param {quat} out dual part + * @param {ReadonlyQuat2} a Dual Quaternion + * @return {quat} dual part + */ + + function getDual(out, a) { + out[0] = a[4]; + out[1] = a[5]; + out[2] = a[6]; + out[3] = a[7]; + return out; + } + /** + * Set the real component of a dual quat to the given quaternion + * + * @param {quat2} out the receiving quaternion + * @param {ReadonlyQuat} q a quaternion representing the real part + * @returns {quat2} out + * @function + */ + + var setReal = copy$2; + /** + * Set the dual component of a dual quat to the given quaternion + * + * @param {quat2} out the receiving quaternion + * @param {ReadonlyQuat} q a quaternion representing the dual part + * @returns {quat2} out + * @function + */ + + function setDual(out, q) { + out[4] = q[0]; + out[5] = q[1]; + out[6] = q[2]; + out[7] = q[3]; + return out; + } + /** + * Gets the translation of a normalized dual quat + * @param {vec3} out translation + * @param {ReadonlyQuat2} a Dual Quaternion to be decomposed + * @return {vec3} translation + */ + + function getTranslation(out, a) { + var ax = a[4], + ay = a[5], + az = a[6], + aw = a[7], + bx = -a[0], + by = -a[1], + bz = -a[2], + bw = a[3]; + out[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2; + out[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2; + out[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2; + return out; + } + /** + * Translates a dual quat by the given vector + * + * @param {quat2} out the receiving dual quaternion + * @param {ReadonlyQuat2} a the dual quaternion to translate + * @param {ReadonlyVec3} v vector to translate by + * @returns {quat2} out + */ + + function translate(out, a, v) { + var ax1 = a[0], + ay1 = a[1], + az1 = a[2], + aw1 = a[3], + bx1 = v[0] * 0.5, + by1 = v[1] * 0.5, + bz1 = v[2] * 0.5, + ax2 = a[4], + ay2 = a[5], + az2 = a[6], + aw2 = a[7]; + out[0] = ax1; + out[1] = ay1; + out[2] = az1; + out[3] = aw1; + out[4] = aw1 * bx1 + ay1 * bz1 - az1 * by1 + ax2; + out[5] = aw1 * by1 + az1 * bx1 - ax1 * bz1 + ay2; + out[6] = aw1 * bz1 + ax1 * by1 - ay1 * bx1 + az2; + out[7] = -ax1 * bx1 - ay1 * by1 - az1 * bz1 + aw2; + return out; + } + /** + * Rotates a dual quat around the X axis + * + * @param {quat2} out the receiving dual quaternion + * @param {ReadonlyQuat2} a the dual quaternion to rotate + * @param {number} rad how far should the rotation be + * @returns {quat2} out + */ + + function rotateX(out, a, rad) { + var bx = -a[0], + by = -a[1], + bz = -a[2], + bw = a[3], + ax = a[4], + ay = a[5], + az = a[6], + aw = a[7], + ax1 = ax * bw + aw * bx + ay * bz - az * by, + ay1 = ay * bw + aw * by + az * bx - ax * bz, + az1 = az * bw + aw * bz + ax * by - ay * bx, + aw1 = aw * bw - ax * bx - ay * by - az * bz; + rotateX$1(out, a, rad); + bx = out[0]; + by = out[1]; + bz = out[2]; + bw = out[3]; + out[4] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by; + out[5] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz; + out[6] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx; + out[7] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz; + return out; + } + /** + * Rotates a dual quat around the Y axis + * + * @param {quat2} out the receiving dual quaternion + * @param {ReadonlyQuat2} a the dual quaternion to rotate + * @param {number} rad how far should the rotation be + * @returns {quat2} out + */ + + function rotateY(out, a, rad) { + var bx = -a[0], + by = -a[1], + bz = -a[2], + bw = a[3], + ax = a[4], + ay = a[5], + az = a[6], + aw = a[7], + ax1 = ax * bw + aw * bx + ay * bz - az * by, + ay1 = ay * bw + aw * by + az * bx - ax * bz, + az1 = az * bw + aw * bz + ax * by - ay * bx, + aw1 = aw * bw - ax * bx - ay * by - az * bz; + rotateY$1(out, a, rad); + bx = out[0]; + by = out[1]; + bz = out[2]; + bw = out[3]; + out[4] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by; + out[5] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz; + out[6] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx; + out[7] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz; + return out; + } + /** + * Rotates a dual quat around the Z axis + * + * @param {quat2} out the receiving dual quaternion + * @param {ReadonlyQuat2} a the dual quaternion to rotate + * @param {number} rad how far should the rotation be + * @returns {quat2} out + */ + + function rotateZ(out, a, rad) { + var bx = -a[0], + by = -a[1], + bz = -a[2], + bw = a[3], + ax = a[4], + ay = a[5], + az = a[6], + aw = a[7], + ax1 = ax * bw + aw * bx + ay * bz - az * by, + ay1 = ay * bw + aw * by + az * bx - ax * bz, + az1 = az * bw + aw * bz + ax * by - ay * bx, + aw1 = aw * bw - ax * bx - ay * by - az * bz; + rotateZ$1(out, a, rad); + bx = out[0]; + by = out[1]; + bz = out[2]; + bw = out[3]; + out[4] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by; + out[5] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz; + out[6] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx; + out[7] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz; + return out; + } + /** + * Rotates a dual quat by a given quaternion (a * q) + * + * @param {quat2} out the receiving dual quaternion + * @param {ReadonlyQuat2} a the dual quaternion to rotate + * @param {ReadonlyQuat} q quaternion to rotate by + * @returns {quat2} out + */ + + function rotateByQuatAppend(out, a, q) { + var qx = q[0], + qy = q[1], + qz = q[2], + qw = q[3], + ax = a[0], + ay = a[1], + az = a[2], + aw = a[3]; + out[0] = ax * qw + aw * qx + ay * qz - az * qy; + out[1] = ay * qw + aw * qy + az * qx - ax * qz; + out[2] = az * qw + aw * qz + ax * qy - ay * qx; + out[3] = aw * qw - ax * qx - ay * qy - az * qz; + ax = a[4]; + ay = a[5]; + az = a[6]; + aw = a[7]; + out[4] = ax * qw + aw * qx + ay * qz - az * qy; + out[5] = ay * qw + aw * qy + az * qx - ax * qz; + out[6] = az * qw + aw * qz + ax * qy - ay * qx; + out[7] = aw * qw - ax * qx - ay * qy - az * qz; + return out; + } + /** + * Rotates a dual quat by a given quaternion (q * a) + * + * @param {quat2} out the receiving dual quaternion + * @param {ReadonlyQuat} q quaternion to rotate by + * @param {ReadonlyQuat2} a the dual quaternion to rotate + * @returns {quat2} out + */ + + function rotateByQuatPrepend(out, q, a) { + var qx = q[0], + qy = q[1], + qz = q[2], + qw = q[3], + bx = a[0], + by = a[1], + bz = a[2], + bw = a[3]; + out[0] = qx * bw + qw * bx + qy * bz - qz * by; + out[1] = qy * bw + qw * by + qz * bx - qx * bz; + out[2] = qz * bw + qw * bz + qx * by - qy * bx; + out[3] = qw * bw - qx * bx - qy * by - qz * bz; + bx = a[4]; + by = a[5]; + bz = a[6]; + bw = a[7]; + out[4] = qx * bw + qw * bx + qy * bz - qz * by; + out[5] = qy * bw + qw * by + qz * bx - qx * bz; + out[6] = qz * bw + qw * bz + qx * by - qy * bx; + out[7] = qw * bw - qx * bx - qy * by - qz * bz; + return out; + } + /** + * Rotates a dual quat around a given axis. Does the normalisation automatically + * + * @param {quat2} out the receiving dual quaternion + * @param {ReadonlyQuat2} a the dual quaternion to rotate + * @param {ReadonlyVec3} axis the axis to rotate around + * @param {Number} rad how far the rotation should be + * @returns {quat2} out + */ + + function rotateAroundAxis(out, a, axis, rad) { + //Special case for rad = 0 + if (Math.abs(rad) < EPSILON) { + return copy$1(out, a); + } + + var axisLength = Maths.hypot(axis[0], axis[1], axis[2]); + rad = rad * 0.5; + var s = Math.sin(rad); + var bx = s * axis[0] / axisLength; + var by = s * axis[1] / axisLength; + var bz = s * axis[2] / axisLength; + var bw = Math.cos(rad); + var ax1 = a[0], + ay1 = a[1], + az1 = a[2], + aw1 = a[3]; + out[0] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by; + out[1] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz; + out[2] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx; + out[3] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz; + var ax = a[4], + ay = a[5], + az = a[6], + aw = a[7]; + out[4] = ax * bw + aw * bx + ay * bz - az * by; + out[5] = ay * bw + aw * by + az * bx - ax * bz; + out[6] = az * bw + aw * bz + ax * by - ay * bx; + out[7] = aw * bw - ax * bx - ay * by - az * bz; + return out; + } + /** + * Adds two dual quat's + * + * @param {quat2} out the receiving dual quaternion + * @param {ReadonlyQuat2} a the first operand + * @param {ReadonlyQuat2} b the second operand + * @returns {quat2} out + * @function + */ + + function add$1(out, a, b) { + out[0] = a[0] + b[0]; + out[1] = a[1] + b[1]; + out[2] = a[2] + b[2]; + out[3] = a[3] + b[3]; + out[4] = a[4] + b[4]; + out[5] = a[5] + b[5]; + out[6] = a[6] + b[6]; + out[7] = a[7] + b[7]; + return out; + } + /** + * Multiplies two dual quat's + * + * @param {quat2} out the receiving dual quaternion + * @param {ReadonlyQuat2} a the first operand + * @param {ReadonlyQuat2} b the second operand + * @returns {quat2} out + */ + + function multiply$1(out, a, b) { + var ax0 = a[0], + ay0 = a[1], + az0 = a[2], + aw0 = a[3], + bx1 = b[4], + by1 = b[5], + bz1 = b[6], + bw1 = b[7], + ax1 = a[4], + ay1 = a[5], + az1 = a[6], + aw1 = a[7], + bx0 = b[0], + by0 = b[1], + bz0 = b[2], + bw0 = b[3]; + out[0] = ax0 * bw0 + aw0 * bx0 + ay0 * bz0 - az0 * by0; + out[1] = ay0 * bw0 + aw0 * by0 + az0 * bx0 - ax0 * bz0; + out[2] = az0 * bw0 + aw0 * bz0 + ax0 * by0 - ay0 * bx0; + out[3] = aw0 * bw0 - ax0 * bx0 - ay0 * by0 - az0 * bz0; + out[4] = ax0 * bw1 + aw0 * bx1 + ay0 * bz1 - az0 * by1 + ax1 * bw0 + aw1 * bx0 + ay1 * bz0 - az1 * by0; + out[5] = ay0 * bw1 + aw0 * by1 + az0 * bx1 - ax0 * bz1 + ay1 * bw0 + aw1 * by0 + az1 * bx0 - ax1 * bz0; + out[6] = az0 * bw1 + aw0 * bz1 + ax0 * by1 - ay0 * bx1 + az1 * bw0 + aw1 * bz0 + ax1 * by0 - ay1 * bx0; + out[7] = aw0 * bw1 - ax0 * bx1 - ay0 * by1 - az0 * bz1 + aw1 * bw0 - ax1 * bx0 - ay1 * by0 - az1 * bz0; + return out; + } + /** + * Alias for {@link quat2.multiply} + * @function + */ + + var mul$1 = multiply$1; + /** + * Scales a dual quat by a scalar number + * + * @param {quat2} out the receiving dual quat + * @param {ReadonlyQuat2} a the dual quat to scale + * @param {Number} b amount to scale the dual quat by + * @returns {quat2} out + * @function + */ + + function scale$1(out, a, b) { + out[0] = a[0] * b; + out[1] = a[1] * b; + out[2] = a[2] * b; + out[3] = a[3] * b; + out[4] = a[4] * b; + out[5] = a[5] * b; + out[6] = a[6] * b; + out[7] = a[7] * b; + return out; + } + /** + * Calculates the dot product of two dual quat's (The dot product of the real parts) + * + * @param {ReadonlyQuat2} a the first operand + * @param {ReadonlyQuat2} b the second operand + * @returns {Number} dot product of a and b + * @function + */ + + var dot$1 = dot$2; + /** + * Performs a linear interpolation between two dual quats's + * NOTE: The resulting dual quaternions won't always be normalized (The error is most noticeable when t = 0.5) + * + * @param {quat2} out the receiving dual quat + * @param {ReadonlyQuat2} a the first operand + * @param {ReadonlyQuat2} b the second operand + * @param {Number} t interpolation amount, in the range [0-1], between the two inputs + * @returns {quat2} out + */ + + function lerp$1(out, a, b, t) { + var mt = 1 - t; + if (dot$1(a, b) < 0) t = -t; + out[0] = a[0] * mt + b[0] * t; + out[1] = a[1] * mt + b[1] * t; + out[2] = a[2] * mt + b[2] * t; + out[3] = a[3] * mt + b[3] * t; + out[4] = a[4] * mt + b[4] * t; + out[5] = a[5] * mt + b[5] * t; + out[6] = a[6] * mt + b[6] * t; + out[7] = a[7] * mt + b[7] * t; + return out; + } + /** + * Calculates the inverse of a dual quat. If they are normalized, conjugate is cheaper + * + * @param {quat2} out the receiving dual quaternion + * @param {ReadonlyQuat2} a dual quat to calculate inverse of + * @returns {quat2} out + */ + + function invert(out, a) { + var sqlen = squaredLength$1(a); + out[0] = -a[0] / sqlen; + out[1] = -a[1] / sqlen; + out[2] = -a[2] / sqlen; + out[3] = a[3] / sqlen; + out[4] = -a[4] / sqlen; + out[5] = -a[5] / sqlen; + out[6] = -a[6] / sqlen; + out[7] = a[7] / sqlen; + return out; + } + /** + * Calculates the conjugate of a dual quat + * If the dual quaternion is normalized, this function is faster than quat2.inverse and produces the same result. + * + * @param {quat2} out the receiving quaternion + * @param {ReadonlyQuat2} a quat to calculate conjugate of + * @returns {quat2} out + */ + + function conjugate(out, a) { + out[0] = -a[0]; + out[1] = -a[1]; + out[2] = -a[2]; + out[3] = a[3]; + out[4] = -a[4]; + out[5] = -a[5]; + out[6] = -a[6]; + out[7] = a[7]; + return out; + } + /** + * Calculates the length of a dual quat + * + * @param {ReadonlyQuat2} a dual quat to calculate length of + * @returns {Number} length of a + * @function + */ + + var length$1 = length$2; + /** + * Alias for {@link quat2.length} + * @function + */ + + var len$1 = length$1; + /** + * Calculates the squared length of a dual quat + * + * @param {ReadonlyQuat2} a dual quat to calculate squared length of + * @returns {Number} squared length of a + * @function + */ + + var squaredLength$1 = squaredLength$2; + /** + * Alias for {@link quat2.squaredLength} + * @function + */ + + var sqrLen$1 = squaredLength$1; + /** + * Normalize a dual quat + * + * @param {quat2} out the receiving dual quaternion + * @param {ReadonlyQuat2} a dual quaternion to normalize + * @returns {quat2} out + * @function + */ + + function normalize$1(out, a) { + var magnitude = squaredLength$1(a); + + if (magnitude > 0) { + magnitude = Math.sqrt(magnitude); + var a0 = a[0] / magnitude; + var a1 = a[1] / magnitude; + var a2 = a[2] / magnitude; + var a3 = a[3] / magnitude; + var b0 = a[4]; + var b1 = a[5]; + var b2 = a[6]; + var b3 = a[7]; + var a_dot_b = a0 * b0 + a1 * b1 + a2 * b2 + a3 * b3; + out[0] = a0; + out[1] = a1; + out[2] = a2; + out[3] = a3; + out[4] = (b0 - a0 * a_dot_b) / magnitude; + out[5] = (b1 - a1 * a_dot_b) / magnitude; + out[6] = (b2 - a2 * a_dot_b) / magnitude; + out[7] = (b3 - a3 * a_dot_b) / magnitude; + } + + return out; + } + /** + * Returns a string representation of a dual quaternion + * + * @param {ReadonlyQuat2} a dual quaternion to represent as a string + * @returns {String} string representation of the dual quat + */ + + function str$1(a) { + return "quat2(" + a[0].toString() + ", " + a[1].toString() + ", " + a[2].toString() + ", " + a[3].toString() + ", " + a[4].toString() + ", " + a[5].toString() + ", " + a[6].toString() + ", " + a[7].toString() + ")"; + } + /** + * Returns whether or not the dual quaternions have exactly the same elements in the same position (when compared with ===) + * + * @param {ReadonlyQuat2} a the first dual quaternion. + * @param {ReadonlyQuat2} b the second dual quaternion. + * @returns {Boolean} true if the dual quaternions are equal, false otherwise. + */ + + function exactEquals$1(a, b) { + return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5] && a[6] === b[6] && a[7] === b[7]; + } + /** + * Returns whether or not the dual quaternions have approximately the same elements in the same position. + * + * @param {ReadonlyQuat2} a the first dual quat. + * @param {ReadonlyQuat2} b the second dual quat. + * @returns {Boolean} true if the dual quats are equal, false otherwise. + */ + + function equals$1(a, b) { + var a0 = a[0], + a1 = a[1], + a2 = a[2], + a3 = a[3], + a4 = a[4], + a5 = a[5], + a6 = a[6], + a7 = a[7]; + var b0 = b[0], + b1 = b[1], + b2 = b[2], + b3 = b[3], + b4 = b[4], + b5 = b[5], + b6 = b[6], + b7 = b[7]; + return Math.abs(a0 - b0) <= EPSILON * Maths.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= EPSILON * Maths.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= EPSILON * Maths.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= EPSILON * Maths.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= EPSILON * Maths.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= EPSILON * Maths.max(1.0, Math.abs(a5), Math.abs(b5)) && Math.abs(a6 - b6) <= EPSILON * Maths.max(1.0, Math.abs(a6), Math.abs(b6)) && Math.abs(a7 - b7) <= EPSILON * Maths.max(1.0, Math.abs(a7), Math.abs(b7)); + } + + var quat2 = /*#__PURE__*/Object.freeze({ + __proto__: null, + create: create$1, + clone: clone$1, + fromValues: fromValues$1, + fromRotationTranslationValues: fromRotationTranslationValues, + fromRotationTranslation: fromRotationTranslation, + fromTranslation: fromTranslation, + fromRotation: fromRotation, + fromMat4: fromMat4, + copy: copy$1, + identity: identity, + set: set$1, + getReal: getReal, + getDual: getDual, + setReal: setReal, + setDual: setDual, + getTranslation: getTranslation, + translate: translate, + rotateX: rotateX, + rotateY: rotateY, + rotateZ: rotateZ, + rotateByQuatAppend: rotateByQuatAppend, + rotateByQuatPrepend: rotateByQuatPrepend, + rotateAroundAxis: rotateAroundAxis, + add: add$1, + multiply: multiply$1, + mul: mul$1, + scale: scale$1, + dot: dot$1, + lerp: lerp$1, + invert: invert, + conjugate: conjugate, + length: length$1, + len: len$1, + squaredLength: squaredLength$1, + sqrLen: sqrLen$1, + normalize: normalize$1, + str: str$1, + exactEquals: exactEquals$1, + equals: equals$1 + }); + + /** + * 2 Dimensional Vector + * @module vec2 + */ + + /** + * Creates a new, empty vec2 + * + * @returns {vec2} a new 2D vector + */ + + function create() { + var out = new Float64Array(2); //if (glMatrix.ARRAY_TYPE != Float32Array) { + + out[0] = 0; + out[1] = 0; //} + + return out; + } + /** + * Creates a new vec2 initialized with values from an existing vector + * + * @param {ReadonlyVec2} a vector to clone + * @returns {vec2} a new 2D vector + */ + + function clone(a) { + var out = new Float64Array(2); + out[0] = a[0]; + out[1] = a[1]; + return out; + } + /** + * Creates a new vec2 initialized with the given values + * + * @param {Number} x X component + * @param {Number} y Y component + * @returns {vec2} a new 2D vector + */ + + function fromValues(x, y) { + var out = new Float64Array(2); + out[0] = x; + out[1] = y; + return out; + } + /** + * Copy the values from one vec2 to another + * + * @param {vec2} out the receiving vector + * @param {ReadonlyVec2} a the source vector + * @returns {vec2} out + */ + + function copy(out, a) { + out[0] = a[0]; + out[1] = a[1]; + return out; + } + /** + * Set the components of a vec2 to the given values + * + * @param {vec2} out the receiving vector + * @param {Number} x X component + * @param {Number} y Y component + * @returns {vec2} out + */ + + function set(out, x, y) { + out[0] = x; + out[1] = y; + return out; + } + /** + * Adds two vec2's + * + * @param {vec2} out the receiving vector + * @param {ReadonlyVec2} a the first operand + * @param {ReadonlyVec2} b the second operand + * @returns {vec2} out + */ + + function add(out, a, b) { + out[0] = a[0] + b[0]; + out[1] = a[1] + b[1]; + return out; + } + /** + * Subtracts vector b from vector a + * + * @param {vec2} out the receiving vector + * @param {ReadonlyVec2} a the first operand + * @param {ReadonlyVec2} b the second operand + * @returns {vec2} out + */ + + function subtract(out, a, b) { + out[0] = a[0] - b[0]; + out[1] = a[1] - b[1]; + return out; + } + /** + * Multiplies two vec2's + * + * @param {vec2} out the receiving vector + * @param {ReadonlyVec2} a the first operand + * @param {ReadonlyVec2} b the second operand + * @returns {vec2} out + */ + + function multiply(out, a, b) { + out[0] = a[0] * b[0]; + out[1] = a[1] * b[1]; + return out; + } + /** + * Divides two vec2's + * + * @param {vec2} out the receiving vector + * @param {ReadonlyVec2} a the first operand + * @param {ReadonlyVec2} b the second operand + * @returns {vec2} out + */ + + function divide(out, a, b) { + out[0] = a[0] / b[0]; + out[1] = a[1] / b[1]; + return out; + } + /** + * Math.ceil the components of a vec2 + * + * @param {vec2} out the receiving vector + * @param {ReadonlyVec2} a vector to ceil + * @returns {vec2} out + */ + + function ceil(out, a) { + out[0] = Math.ceil(a[0]); + out[1] = Math.ceil(a[1]); + return out; + } + /** + * Math.floor the components of a vec2 + * + * @param {vec2} out the receiving vector + * @param {ReadonlyVec2} a vector to floor + * @returns {vec2} out + */ + + function floor(out, a) { + out[0] = Math.floor(a[0]); + out[1] = Math.floor(a[1]); + return out; + } + /** + * Returns the minimum of two vec2's + * + * @param {vec2} out the receiving vector + * @param {ReadonlyVec2} a the first operand + * @param {ReadonlyVec2} b the second operand + * @returns {vec2} out + */ + + function min(out, a, b) { + out[0] = Math.min(a[0], b[0]); + out[1] = Math.min(a[1], b[1]); + return out; + } + /** + * Returns the maximum of two vec2's + * + * @param {vec2} out the receiving vector + * @param {ReadonlyVec2} a the first operand + * @param {ReadonlyVec2} b the second operand + * @returns {vec2} out + */ + + function max(out, a, b) { + out[0] = Math.max(a[0], b[0]); + out[1] = Math.max(a[1], b[1]); + return out; + } + /** + * Math.round the components of a vec2 + * + * @param {vec2} out the receiving vector + * @param {ReadonlyVec2} a vector to round + * @returns {vec2} out + */ + + function round(out, a) { + out[0] = Math.round(a[0]); + out[1] = Math.round(a[1]); + return out; + } + /** + * Scales a vec2 by a scalar number + * + * @param {vec2} out the receiving vector + * @param {ReadonlyVec2} a the vector to scale + * @param {Number} b amount to scale the vector by + * @returns {vec2} out + */ + + function scale(out, a, b) { + out[0] = a[0] * b; + out[1] = a[1] * b; + return out; + } + /** + * Adds two vec2's after scaling the second operand by a scalar value + * + * @param {vec2} out the receiving vector + * @param {ReadonlyVec2} a the first operand + * @param {ReadonlyVec2} b the second operand + * @param {Number} scale the amount to scale b by before adding + * @returns {vec2} out + */ + + function scaleAndAdd(out, a, b, scale) { + out[0] = a[0] + b[0] * scale; + out[1] = a[1] + b[1] * scale; + return out; + } + /** + * Calculates the euclidian distance between two vec2's + * + * @param {ReadonlyVec2} a the first operand + * @param {ReadonlyVec2} b the second operand + * @returns {Number} distance between a and b + */ + + function distance(a, b) { + var x = b[0] - a[0], + y = b[1] - a[1]; + return Maths.hypot(x, y); + } + /** + * Calculates the squared euclidian distance between two vec2's + * + * @param {ReadonlyVec2} a the first operand + * @param {ReadonlyVec2} b the second operand + * @returns {Number} squared distance between a and b + */ + + function squaredDistance(a, b) { + var x = b[0] - a[0], + y = b[1] - a[1]; + return x * x + y * y; + } + /** + * Calculates the length of a vec2 + * + * @param {ReadonlyVec2} a vector to calculate length of + * @returns {Number} length of a + */ + + function length(a) { + var x = a[0], + y = a[1]; + return Math.hypot(x, y); + } + /** + * Calculates the squared length of a vec2 + * + * @param {ReadonlyVec2} a vector to calculate squared length of + * @returns {Number} squared length of a + */ + + function squaredLength(a) { + var x = a[0], + y = a[1]; + return x * x + y * y; + } + /** + * Negates the components of a vec2 + * + * @param {vec2} out the receiving vector + * @param {ReadonlyVec2} a vector to negate + * @returns {vec2} out + */ + + function negate(out, a) { + out[0] = -a[0]; + out[1] = -a[1]; + return out; + } + /** + * Returns the inverse of the components of a vec2 + * + * @param {vec2} out the receiving vector + * @param {ReadonlyVec2} a vector to invert + * @returns {vec2} out + */ + + function inverse(out, a) { + out[0] = 1.0 / a[0]; + out[1] = 1.0 / a[1]; + return out; + } + /** + * Normalize a vec2 + * + * @param {vec2} out the receiving vector + * @param {ReadonlyVec2} a vector to normalize + * @returns {vec2} out + */ + + function normalize(out, a) { + var x = a[0], + y = a[1]; + var len = x * x + y * y; + + if (len > 0) { + //TODO: evaluate use of glm_invsqrt here? + len = 1 / Math.sqrt(len); + } + + out[0] = a[0] * len; + out[1] = a[1] * len; + return out; + } + /** + * Calculates the dot product of two vec2's + * + * @param {ReadonlyVec2} a the first operand + * @param {ReadonlyVec2} b the second operand + * @returns {Number} dot product of a and b + */ + + function dot(a, b) { + return a[0] * b[0] + a[1] * b[1]; + } + /** + * Computes the cross product of two vec2's + * Note that the cross product must by definition produce a 3D vector + * + * @param {vec3} out the receiving vector + * @param {ReadonlyVec2} a the first operand + * @param {ReadonlyVec2} b the second operand + * @returns {vec3} out + */ + + function cross(out, a, b) { + var z = a[0] * b[1] - a[1] * b[0]; + out[0] = out[1] = 0; + out[2] = z; + return out; + } + /** + * Performs a linear interpolation between two vec2's + * + * @param {vec2} out the receiving vector + * @param {ReadonlyVec2} a the first operand + * @param {ReadonlyVec2} b the second operand + * @param {Number} t interpolation amount, in the range [0-1], between the two inputs + * @returns {vec2} out + */ + + function lerp(out, a, b, t) { + var ax = a[0], + ay = a[1]; + out[0] = ax + t * (b[0] - ax); + out[1] = ay + t * (b[1] - ay); + return out; + } + /** + * Generates a random vector with the given scale + * + * @param {vec2} out the receiving vector + * @param {Number} [scale] Length of the resulting vector. If omitted, a unit vector will be returned + * @returns {vec2} out + */ + + function random(out, scale) { + scale = scale || 1.0; + var r = RANDOM() * 2.0 * Math.PI; + out[0] = Math.cos(r) * scale; + out[1] = Math.sin(r) * scale; + return out; + } + /** + * Transforms the vec2 with a mat2 + * + * @param {vec2} out the receiving vector + * @param {ReadonlyVec2} a the vector to transform + * @param {ReadonlyMat2} m matrix to transform with + * @returns {vec2} out + */ + + function transformMat2(out, a, m) { + var x = a[0], + y = a[1]; + out[0] = m[0] * x + m[2] * y; + out[1] = m[1] * x + m[3] * y; + return out; + } + /** + * Transforms the vec2 with a mat2d + * + * @param {vec2} out the receiving vector + * @param {ReadonlyVec2} a the vector to transform + * @param {ReadonlyMat2d} m matrix to transform with + * @returns {vec2} out + */ + + function transformMat2d(out, a, m) { + var x = a[0], + y = a[1]; + out[0] = m[0] * x + m[2] * y + m[4]; + out[1] = m[1] * x + m[3] * y + m[5]; + return out; + } + /** + * Transforms the vec2 with a mat3 + * 3rd vector component is implicitly '1' + * + * @param {vec2} out the receiving vector + * @param {ReadonlyVec2} a the vector to transform + * @param {ReadonlyMat3} m matrix to transform with + * @returns {vec2} out + */ + + function transformMat3(out, a, m) { + var x = a[0], + y = a[1]; + out[0] = m[0] * x + m[3] * y + m[6]; + out[1] = m[1] * x + m[4] * y + m[7]; + return out; + } + /** + * Transforms the vec2 with a mat4 + * 3rd vector component is implicitly '0' + * 4th vector component is implicitly '1' + * + * @param {vec2} out the receiving vector + * @param {ReadonlyVec2} a the vector to transform + * @param {ReadonlyMat4} m matrix to transform with + * @returns {vec2} out + */ + + function transformMat4(out, a, m) { + var x = a[0]; + var y = a[1]; + out[0] = m[0] * x + m[4] * y + m[12]; + out[1] = m[1] * x + m[5] * y + m[13]; + return out; + } + /** + * Rotate a 2D vector + * @param {vec2} out The receiving vec2 + * @param {ReadonlyVec2} a The vec2 point to rotate + * @param {ReadonlyVec2} b The origin of the rotation + * @param {Number} rad The angle of rotation in radians + * @returns {vec2} out + */ + + function rotate(out, a, b, rad) { + //Translate point to the origin + var p0 = a[0] - b[0], + p1 = a[1] - b[1], + sinC = Math.sin(rad), + cosC = Math.cos(rad); //perform rotation and translate to correct position + + out[0] = p0 * cosC - p1 * sinC + b[0]; + out[1] = p0 * sinC + p1 * cosC + b[1]; + return out; + } + /** + * Get the angle between two 2D vectors + * @param {ReadonlyVec2} a The first operand + * @param {ReadonlyVec2} b The second operand + * @returns {Number} The angle in radians + */ + + function angle(a, b) { + var x1 = a[0], + y1 = a[1], + x2 = b[0], + y2 = b[1], + // mag is the product of the magnitudes of a and b + mag = Math.sqrt(x1 * x1 + y1 * y1) * Math.sqrt(x2 * x2 + y2 * y2), + // mag &&.. short circuits if mag == 0 + cosine = mag && (x1 * x2 + y1 * y2) / mag; // Math.min(Math.max(cosine, -1), 1) clamps the cosine between -1 and 1 + + return Math.acos(Math.min(Math.max(cosine, -1), 1)); + } + /** + * Set the components of a vec2 to zero + * + * @param {vec2} out the receiving vector + * @returns {vec2} out + */ + + function zero(out) { + out[0] = 0.0; + out[1] = 0.0; + return out; + } + /** + * Returns a string representation of a vector + * + * @param {ReadonlyVec2} a vector to represent as a string + * @returns {String} string representation of the vector + */ + + function str(a) { + return "vec2(" + a[0].toString() + ", " + a[1].toString() + ")"; + } + /** + * Returns whether or not the vectors exactly have the same elements in the same position (when compared with ===) + * + * @param {ReadonlyVec2} a The first vector. + * @param {ReadonlyVec2} b The second vector. + * @returns {Boolean} True if the vectors are equal, false otherwise. + */ + + function exactEquals(a, b) { + return a[0] === b[0] && a[1] === b[1]; + } + /** + * Returns whether or not the vectors have approximately the same elements in the same position. + * + * @param {ReadonlyVec2} a The first vector. + * @param {ReadonlyVec2} b The second vector. + * @returns {Boolean} True if the vectors are equal, false otherwise. + */ + + function equals(a, b) { + var a0 = a[0], + a1 = a[1]; + var b0 = b[0], + b1 = b[1]; + return Math.abs(a0 - b0) <= EPSILON * Maths.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= EPSILON * Maths.max(1.0, Math.abs(a1), Math.abs(b1)); + } + /** + * Alias for {@link vec2.length} + * @function + */ + + var len = length; + /** + * Alias for {@link vec2.subtract} + * @function + */ + + var sub = subtract; + /** + * Alias for {@link vec2.multiply} + * @function + */ + + var mul = multiply; + /** + * Alias for {@link vec2.divide} + * @function + */ + + var div = divide; + /** + * Alias for {@link vec2.distance} + * @function + */ + + var dist = distance; + /** + * Alias for {@link vec2.squaredDistance} + * @function + */ + + var sqrDist = squaredDistance; + /** + * Alias for {@link vec2.squaredLength} + * @function + */ + + var sqrLen = squaredLength; + /** + * Perform some operation over an array of vec2s. + * + * @param {Array} a the array of vectors to iterate over + * @param {Number} stride Number of elements between the start of each vec2. If 0 assumes tightly packed + * @param {Number} offset Number of elements to skip at the beginning of the array + * @param {Number} count Number of vec2s to iterate over. If 0 iterates over entire array + * @param {Function} fn Function to call for each vector in the array + * @param {Object} [arg] additional argument to pass to fn + * @returns {Array} a + * @function + */ + + var vec = create(); + var forEach = function () { + return function (a, stride, offset, count, fn, arg) { + var i, l; + + if (!stride) { + stride = 2; + } + + if (!offset) { + offset = 0; + } + + if (count) { + l = Maths.min(count * stride + offset, a.length); + } else { + l = a.length; + } + + for (i = offset; i < l; i += stride) { + vec[0] = a[i]; + vec[1] = a[i + 1]; + fn(vec, vec, arg); + a[i] = vec[0]; + a[i + 1] = vec[1]; + } + + return a; + }; + }(); + + var vec2 = /*#__PURE__*/Object.freeze({ + __proto__: null, + create: create, + clone: clone, + fromValues: fromValues, + copy: copy, + set: set, + add: add, + subtract: subtract, + multiply: multiply, + divide: divide, + ceil: ceil, + floor: floor, + min: min, + max: max, + round: round, + scale: scale, + scaleAndAdd: scaleAndAdd, + distance: distance, + squaredDistance: squaredDistance, + length: length, + squaredLength: squaredLength, + negate: negate, + inverse: inverse, + normalize: normalize, + dot: dot, + cross: cross, + lerp: lerp, + random: random, + transformMat2: transformMat2, + transformMat2d: transformMat2d, + transformMat3: transformMat3, + transformMat4: transformMat4, + rotate: rotate, + angle: angle, + zero: zero, + str: str, + exactEquals: exactEquals, + equals: equals, + len: len, + sub: sub, + mul: mul, + div: div, + dist: dist, + sqrDist: sqrDist, + sqrLen: sqrLen, + forEach: forEach + }); + + exports.glMatrix = common; + exports.mat2 = mat2; + exports.mat2d = mat2d; + exports.mat3 = mat3; + exports.mat4 = mat4; + exports.quat = quat; + exports.quat2 = quat2; + exports.vec2 = vec2; + exports.vec3 = vec3; + exports.vec4 = vec4; + + Object.defineProperty(exports, '__esModule', { value: true }); }))); diff --git a/package.json b/package.json index f678afba..de40d860 100644 --- a/package.json +++ b/package.json @@ -30,11 +30,11 @@ "test": "mocha --require @babel/register --recursive spec", "doc": "jsdoc -c jsdoc.config.json", "update-license-version": "node utils/update-license-version.js", - "build-js": "tsc --outDir ./js ./assembly/index.ts", + "build-js": "tsc --module es2020 --outDir ./js ./assembly/index.ts", "build-umd": "rollup -c", "build-esm": "cross-env BABEL_ENV=esm babel js -d dist/esm", "build-cjs": "babel js -d dist/cjs", - "build-dts": "tsc --declaration --emitDeclarationOnly --outFile ./dist/index.d.ts ./assembly/index.ts && node ./utils/bundle-dts.js && tsc --noEmit ./dist/index.d.ts", + "build-dts": "tsc --declaration --emitDeclarationOnly --module amd --outFile ./dist/index.d.ts ./assembly/index.ts && node ./utils/bundle-dts.js && tsc --noEmit ./dist/index.d.ts", "build": "del dist && npm run update-license-version && npm run build-js && npm run build-umd && npm run build-esm && npm run build-cjs && npm run build-dts && node ./utils/build.js && npm run asbuild", "prepare": "npm run build", "asbuild:untouched": "asc assembly/index.ts --target debug", @@ -47,6 +47,7 @@ "@babel/core": "^7.9.0", "@babel/preset-env": "^7.9.0", "@babel/register": "^7.9.0", + "@rollup/plugin-typescript": "^8.2.1", "assemblyscript": "^0.18.16", "cross-env": "^7.0.2", "del-cli": "^3.0.0", @@ -54,6 +55,7 @@ "mocha": "^7.1.1", "node-libs-browser": "^2.2.1", "rollup": "^2.3.2", + "rollup-plugin-assemblyscript": "^2.0.0", "rollup-plugin-babel": "^4.4.0", "rollup-plugin-size-snapshot": "^0.11.0", "rollup-plugin-terser": "^5.3.0", From 79a3b97c4955e23f278ff3df25a41b308867e07a Mon Sep 17 00:00:00 2001 From: Huguenin-Elie Steve Date: Thu, 1 Apr 2021 08:45:39 +0200 Subject: [PATCH 22/32] simplify toolchain to compile TS/AS into JS --- .babelrc.js | 4 +- .size-snapshot.json | 2 +- dist/gl-matrix.js | 7293 ++++++++++++++++++++----------------------- js/.gitignore | 1 - package.json | 9 +- rollup.config.js | 5 +- utils/build.js | 2 +- 7 files changed, 3334 insertions(+), 3982 deletions(-) delete mode 100644 js/.gitignore diff --git a/.babelrc.js b/.babelrc.js index 075709d9..38fe1a58 100644 --- a/.babelrc.js +++ b/.babelrc.js @@ -1,8 +1,8 @@ module.exports = { - "presets": ["@babel/env"], + "presets": ["@babel/preset-typescript"], "env": { "esm": { - "presets": [["@babel/env", { "modules": false }]] + "presets": [["@babel/preset-typescript", { "modules": false }]], } } }; diff --git a/.size-snapshot.json b/.size-snapshot.json index e9f736fa..6e1b2705 100644 --- a/.size-snapshot.json +++ b/.size-snapshot.json @@ -5,7 +5,7 @@ "gzipped": 13273 }, "dist\\gl-matrix-min.js": { - "bundled": 223200, + "bundled": 228852, "minified": 52941, "gzipped": 13521 } diff --git a/dist/gl-matrix.js b/dist/gl-matrix.js index 00853f27..990607e0 100644 --- a/dist/gl-matrix.js +++ b/dist/gl-matrix.js @@ -36,26 +36,21 @@ THE SOFTWARE. // AS modules. // @ts-ignore // prettier-ignore - /** * Extended Math functions * @module glMatrix */ var Maths; - (function (Maths) { - function min(a, b) { - return a < b ? a : b; - } - - Maths.min = min; - - function max(a, b, c) { - var q = Math.max(b, c); - return Math.max(a, q); - } - - Maths.max = max; + function min(a, b) { + return a < b ? a : b; + } + Maths.min = min; + function max(a, b, c) { + var q = Math.max(b, c); + return Math.max(a, q); + } + Maths.max = max; })(Maths || (Maths = {})); /** @@ -63,7 +58,6 @@ THE SOFTWARE. * @module glMatrix */ // Configuration Constants - var EPSILON = 0.000001; var RANDOM = Math.random; var ANGLE_ORDER = "zyx"; @@ -72,9 +66,8 @@ THE SOFTWARE. * * @param {Object} type Array type, such as Float32Array or Array */ - function setMatrixArrayType(type) { - throw new Error("Not implemented yet"); + throw new Error("Not implemented yet"); } var degree = Math.PI / 180; /** @@ -82,9 +75,8 @@ THE SOFTWARE. * * @param {Number} a Angle in Degrees */ - function toRadian(a) { - return a * degree; + return a * degree; } /** * Tests whether or not the arguments have approximately the same value, within an absolute @@ -95,9 +87,8 @@ THE SOFTWARE. * @param {Number} b The second number to test. * @returns {Boolean} True if the numbers are approximately equal, false otherwise. */ - function equals$9(a, b) { - return Math.abs(a - b) <= EPSILON * Maths.max(1.0, Math.abs(a), Math.abs(b)); + return Math.abs(a - b) <= EPSILON * Maths.max(1.0, Math.abs(a), Math.abs(b)); } var common = /*#__PURE__*/Object.freeze({ @@ -114,22 +105,20 @@ THE SOFTWARE. * 2x2 Matrix * @module mat2 */ - /** * Creates a new identity mat2 * * @returns {mat2} a new 2x2 matrix */ - function create$8() { - var out = new Float64Array(4); //if (glMatrix.ARRAY_TYPE != Float32Array) { - - out[1] = 0; - out[2] = 0; //} - - out[0] = 1; - out[3] = 1; - return out; + var out = new Float64Array(4); + //if (glMatrix.ARRAY_TYPE != Float32Array) { + out[1] = 0; + out[2] = 0; + //} + out[0] = 1; + out[3] = 1; + return out; } /** * Creates a new mat2 initialized with values from an existing matrix @@ -137,14 +126,13 @@ THE SOFTWARE. * @param {ReadonlyMat2} a matrix to clone * @returns {mat2} a new 2x2 matrix */ - function clone$8(a) { - var out = new Float64Array(4); - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - return out; + var out = new Float64Array(4); + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[3]; + return out; } /** * Copy the values from one mat2 to another @@ -153,13 +141,12 @@ THE SOFTWARE. * @param {ReadonlyMat2} a the source matrix * @returns {mat2} out */ - function copy$8(out, a) { - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - return out; + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[3]; + return out; } /** * Set a mat2 to the identity matrix @@ -167,13 +154,12 @@ THE SOFTWARE. * @param {mat2} out the receiving matrix * @returns {mat2} out */ - function identity$5(out) { - out[0] = 1; - out[1] = 0; - out[2] = 0; - out[3] = 1; - return out; + out[0] = 1; + out[1] = 0; + out[2] = 0; + out[3] = 1; + return out; } /** * Create a new mat2 with the given values @@ -184,14 +170,13 @@ THE SOFTWARE. * @param {Number} m11 Component in column 1, row 1 position (index 3) * @returns {mat2} out A new 2x2 matrix */ - function fromValues$8(m00, m01, m10, m11) { - var out = new Float64Array(4); - out[0] = m00; - out[1] = m01; - out[2] = m10; - out[3] = m11; - return out; + var out = new Float64Array(4); + out[0] = m00; + out[1] = m01; + out[2] = m10; + out[3] = m11; + return out; } /** * Set the components of a mat2 to the given values @@ -203,13 +188,12 @@ THE SOFTWARE. * @param {Number} m11 Component in column 1, row 1 position (index 3) * @returns {mat2} out */ - function set$8(out, m00, m01, m10, m11) { - out[0] = m00; - out[1] = m01; - out[2] = m10; - out[3] = m11; - return out; + out[0] = m00; + out[1] = m01; + out[2] = m10; + out[3] = m11; + return out; } /** * Transpose the values of a mat2 @@ -218,22 +202,21 @@ THE SOFTWARE. * @param {ReadonlyMat2} a the source matrix * @returns {mat2} out */ - function transpose$2(out, a) { - // If we are transposing ourselves we can skip a few steps but have to cache - // some values - if (out === a) { - var a1 = a[1]; - out[1] = a[2]; - out[2] = a1; - } else { - out[0] = a[0]; - out[1] = a[2]; - out[2] = a[1]; - out[3] = a[3]; - } - - return out; + // If we are transposing ourselves we can skip a few steps but have to cache + // some values + if (out === a) { + var a1 = a[1]; + out[1] = a[2]; + out[2] = a1; + } + else { + out[0] = a[0]; + out[1] = a[2]; + out[2] = a[1]; + out[3] = a[3]; + } + return out; } /** * Inverts a mat2 @@ -242,25 +225,19 @@ THE SOFTWARE. * @param {ReadonlyMat2} a the source matrix * @returns {mat2} out */ - function invert$5(out, a) { - var a0 = a[0], - a1 = a[1], - a2 = a[2], - a3 = a[3]; // Calculate the determinant - - var det = a0 * a3 - a2 * a1; - - if (!det) { - return null; - } - - det = 1.0 / det; - out[0] = a3 * det; - out[1] = -a1 * det; - out[2] = -a2 * det; - out[3] = a0 * det; - return out; + var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3]; + // Calculate the determinant + var det = a0 * a3 - a2 * a1; + if (!det) { + return null; + } + det = 1.0 / det; + out[0] = a3 * det; + out[1] = -a1 * det; + out[2] = -a2 * det; + out[3] = a0 * det; + return out; } /** * Calculates the adjugate of a mat2 @@ -269,15 +246,14 @@ THE SOFTWARE. * @param {ReadonlyMat2} a the source matrix * @returns {mat2} out */ - function adjoint$2(out, a) { - // Caching this value is necessary if out == a - var a0 = a[0]; - out[0] = a[3]; - out[1] = -a[1]; - out[2] = -a[2]; - out[3] = a0; - return out; + // Caching this value is necessary if out == a + var a0 = a[0]; + out[0] = a[3]; + out[1] = -a[1]; + out[2] = -a[2]; + out[3] = a0; + return out; } /** * Calculates the determinant of a mat2 @@ -285,9 +261,8 @@ THE SOFTWARE. * @param {ReadonlyMat2} a the source matrix * @returns {Number} determinant of a */ - function determinant$3(a) { - return a[0] * a[3] - a[2] * a[1]; + return a[0] * a[3] - a[2] * a[1]; } /** * Multiplies two mat2's @@ -297,21 +272,14 @@ THE SOFTWARE. * @param {ReadonlyMat2} b the second operand * @returns {mat2} out */ - function multiply$8(out, a, b) { - var a0 = a[0], - a1 = a[1], - a2 = a[2], - a3 = a[3]; - var b0 = b[0], - b1 = b[1], - b2 = b[2], - b3 = b[3]; - out[0] = a0 * b0 + a2 * b1; - out[1] = a1 * b0 + a3 * b1; - out[2] = a0 * b2 + a2 * b3; - out[3] = a1 * b2 + a3 * b3; - return out; + var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3]; + var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3]; + out[0] = a0 * b0 + a2 * b1; + out[1] = a1 * b0 + a3 * b1; + out[2] = a0 * b2 + a2 * b3; + out[3] = a1 * b2 + a3 * b3; + return out; } /** * Rotates a mat2 by the given angle @@ -321,19 +289,15 @@ THE SOFTWARE. * @param {Number} rad the angle to rotate the matrix by * @returns {mat2} out */ - function rotate$4(out, a, rad) { - var a0 = a[0], - a1 = a[1], - a2 = a[2], - a3 = a[3]; - var s = Math.sin(rad); - var c = Math.cos(rad); - out[0] = a0 * c + a2 * s; - out[1] = a1 * c + a3 * s; - out[2] = a0 * -s + a2 * c; - out[3] = a1 * -s + a3 * c; - return out; + var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3]; + var s = Math.sin(rad); + var c = Math.cos(rad); + out[0] = a0 * c + a2 * s; + out[1] = a1 * c + a3 * s; + out[2] = a0 * -s + a2 * c; + out[3] = a1 * -s + a3 * c; + return out; } /** * Scales the mat2 by the dimensions in the given vec2 @@ -343,19 +307,14 @@ THE SOFTWARE. * @param {ReadonlyVec2} v the vec2 to scale the matrix by * @returns {mat2} out **/ - function scale$8(out, a, v) { - var a0 = a[0], - a1 = a[1], - a2 = a[2], - a3 = a[3]; - var v0 = v[0], - v1 = v[1]; - out[0] = a0 * v0; - out[1] = a1 * v0; - out[2] = a2 * v1; - out[3] = a3 * v1; - return out; + var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3]; + var v0 = v[0], v1 = v[1]; + out[0] = a0 * v0; + out[1] = a1 * v0; + out[2] = a2 * v1; + out[3] = a3 * v1; + return out; } /** * Creates a matrix from a given angle @@ -368,15 +327,14 @@ THE SOFTWARE. * @param {Number} rad the angle to rotate the matrix by * @returns {mat2} out */ - function fromRotation$4(out, rad) { - var s = Math.sin(rad); - var c = Math.cos(rad); - out[0] = c; - out[1] = s; - out[2] = -s; - out[3] = c; - return out; + var s = Math.sin(rad); + var c = Math.cos(rad); + out[0] = c; + out[1] = s; + out[2] = -s; + out[3] = c; + return out; } /** * Creates a matrix from a vector scaling @@ -389,13 +347,12 @@ THE SOFTWARE. * @param {ReadonlyVec2} v Scaling vector * @returns {mat2} out */ - function fromScaling$3(out, v) { - out[0] = v[0]; - out[1] = 0; - out[2] = 0; - out[3] = v[1]; - return out; + out[0] = v[0]; + out[1] = 0; + out[2] = 0; + out[3] = v[1]; + return out; } /** * Returns a string representation of a mat2 @@ -403,9 +360,8 @@ THE SOFTWARE. * @param {ReadonlyMat2} a matrix to represent as a string * @returns {String} string representation of the matrix */ - function str$8(a) { - return "mat2(" + a[0].toString() + ", " + a[1].toString() + ", " + a[2].toString() + ", " + a[3].toString() + ")"; + return "mat2(" + a[0].toString() + ", " + a[1].toString() + ", " + a[2].toString() + ", " + a[3].toString() + ")"; } /** * Returns Frobenius norm of a mat2 @@ -413,9 +369,8 @@ THE SOFTWARE. * @param {ReadonlyMat2} a the matrix to calculate Frobenius norm of * @returns {Number} Frobenius norm */ - function frob$3(a) { - return Maths.hypot(a[0], a[1], a[2], a[3]); + return Maths.hypot(a[0], a[1], a[2], a[3]); } /** * Returns L, D and U matrices (Lower triangular, Diagonal and Upper triangular) by factorizing the input matrix @@ -425,13 +380,12 @@ THE SOFTWARE. * @param {ReadonlyMat2} a the input matrix to factorize * @returns {Array} LDU */ - function LDU(L, D, U, a) { - L[2] = a[2] / a[0]; - U[0] = a[0]; - U[1] = a[1]; - U[3] = a[3] - L[2] * U[1]; - return [L, D, U]; + L[2] = a[2] / a[0]; + U[0] = a[0]; + U[1] = a[1]; + U[3] = a[3] - L[2] * U[1]; + return [L, D, U]; } /** * Adds two mat2's @@ -441,13 +395,12 @@ THE SOFTWARE. * @param {ReadonlyMat2} b the second operand * @returns {mat2} out */ - function add$8(out, a, b) { - out[0] = a[0] + b[0]; - out[1] = a[1] + b[1]; - out[2] = a[2] + b[2]; - out[3] = a[3] + b[3]; - return out; + out[0] = a[0] + b[0]; + out[1] = a[1] + b[1]; + out[2] = a[2] + b[2]; + out[3] = a[3] + b[3]; + return out; } /** * Subtracts matrix b from matrix a @@ -457,13 +410,12 @@ THE SOFTWARE. * @param {ReadonlyMat2} b the second operand * @returns {mat2} out */ - function subtract$6(out, a, b) { - out[0] = a[0] - b[0]; - out[1] = a[1] - b[1]; - out[2] = a[2] - b[2]; - out[3] = a[3] - b[3]; - return out; + out[0] = a[0] - b[0]; + out[1] = a[1] - b[1]; + out[2] = a[2] - b[2]; + out[3] = a[3] - b[3]; + return out; } /** * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===) @@ -472,9 +424,8 @@ THE SOFTWARE. * @param {ReadonlyMat2} b The second matrix. * @returns {Boolean} True if the matrices are equal, false otherwise. */ - function exactEquals$8(a, b) { - return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3]; + return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3]; } /** * Returns whether or not the matrices have approximately the same elements in the same position. @@ -483,17 +434,17 @@ THE SOFTWARE. * @param {ReadonlyMat2} b The second matrix. * @returns {Boolean} True if the matrices are equal, false otherwise. */ - function equals$8(a, b) { - var a0 = a[0], - a1 = a[1], - a2 = a[2], - a3 = a[3]; - var b0 = b[0], - b1 = b[1], - b2 = b[2], - b3 = b[3]; - return Math.abs(a0 - b0) <= EPSILON * Maths.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= EPSILON * Maths.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= EPSILON * Maths.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= EPSILON * Maths.max(1.0, Math.abs(a3), Math.abs(b3)); + var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3]; + var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3]; + return (Math.abs(a0 - b0) <= + EPSILON * Maths.max(1.0, Math.abs(a0), Math.abs(b0)) && + Math.abs(a1 - b1) <= + EPSILON * Maths.max(1.0, Math.abs(a1), Math.abs(b1)) && + Math.abs(a2 - b2) <= + EPSILON * Maths.max(1.0, Math.abs(a2), Math.abs(b2)) && + Math.abs(a3 - b3) <= + EPSILON * Maths.max(1.0, Math.abs(a3), Math.abs(b3))); } /** * Multiply each element of the matrix by a scalar. @@ -503,13 +454,12 @@ THE SOFTWARE. * @param {Number} b amount to scale the matrix's elements by * @returns {mat2} out */ - function multiplyScalar$3(out, a, b) { - out[0] = a[0] * b; - out[1] = a[1] * b; - out[2] = a[2] * b; - out[3] = a[3] * b; - return out; + out[0] = a[0] * b; + out[1] = a[1] * b; + out[2] = a[2] * b; + out[3] = a[3] * b; + return out; } /** * Adds two mat2's after multiplying each element of the second operand by a scalar value. @@ -520,25 +470,22 @@ THE SOFTWARE. * @param {Number} scale the amount to scale b's elements by before adding * @returns {mat2} out */ - function multiplyScalarAndAdd$3(out, a, b, scale) { - out[0] = a[0] + b[0] * scale; - out[1] = a[1] + b[1] * scale; - out[2] = a[2] + b[2] * scale; - out[3] = a[3] + b[3] * scale; - return out; + out[0] = a[0] + b[0] * scale; + out[1] = a[1] + b[1] * scale; + out[2] = a[2] + b[2] * scale; + out[3] = a[3] + b[3] * scale; + return out; } /** * Alias for {@link mat2.multiply} * @function */ - var mul$8 = multiply$8; /** * Alias for {@link mat2.subtract} * @function */ - var sub$6 = subtract$6; var mat2 = /*#__PURE__*/Object.freeze({ @@ -589,24 +536,22 @@ THE SOFTWARE. * * The last column is ignored so the array is shorter and operations are faster. */ - /** * Creates a new identity mat2d * * @returns {mat2d} a new 2x3 matrix */ - function create$7() { - var out = new Float64Array(6); //if (mat2d != Float32Array) { - - out[1] = 0; - out[2] = 0; - out[4] = 0; - out[5] = 0; //} - - out[0] = 1; - out[3] = 1; - return out; + var out = new Float64Array(6); + //if (mat2d != Float32Array) { + out[1] = 0; + out[2] = 0; + out[4] = 0; + out[5] = 0; + //} + out[0] = 1; + out[3] = 1; + return out; } /** * Creates a new mat2d initialized with values from an existing matrix @@ -614,16 +559,15 @@ THE SOFTWARE. * @param {ReadonlyMat2d} a matrix to clone * @returns {mat2d} a new 2x3 matrix */ - function clone$7(a) { - var out = new Float64Array(6); - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - out[4] = a[4]; - out[5] = a[5]; - return out; + var out = new Float64Array(6); + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[3]; + out[4] = a[4]; + out[5] = a[5]; + return out; } /** * Copy the values from one mat2d to another @@ -632,15 +576,14 @@ THE SOFTWARE. * @param {ReadonlyMat2d} a the source matrix * @returns {mat2d} out */ - function copy$7(out, a) { - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - out[4] = a[4]; - out[5] = a[5]; - return out; + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[3]; + out[4] = a[4]; + out[5] = a[5]; + return out; } /** * Set a mat2d to the identity matrix @@ -648,15 +591,14 @@ THE SOFTWARE. * @param {mat2d} out the receiving matrix * @returns {mat2d} out */ - function identity$4(out) { - out[0] = 1; - out[1] = 0; - out[2] = 0; - out[3] = 1; - out[4] = 0; - out[5] = 0; - return out; + out[0] = 1; + out[1] = 0; + out[2] = 0; + out[3] = 1; + out[4] = 0; + out[5] = 0; + return out; } /** * Create a new mat2d with the given values @@ -669,16 +611,15 @@ THE SOFTWARE. * @param {Number} ty Component TY (index 5) * @returns {mat2d} A new mat2d */ - function fromValues$7(a, b, c, d, tx, ty) { - var out = new Float64Array(6); - out[0] = a; - out[1] = b; - out[2] = c; - out[3] = d; - out[4] = tx; - out[5] = ty; - return out; + var out = new Float64Array(6); + out[0] = a; + out[1] = b; + out[2] = c; + out[3] = d; + out[4] = tx; + out[5] = ty; + return out; } /** * Set the components of a mat2d to the given values @@ -692,15 +633,14 @@ THE SOFTWARE. * @param {Number} ty Component TY (index 5) * @returns {mat2d} out */ - function set$7(out, a, b, c, d, tx, ty) { - out[0] = a; - out[1] = b; - out[2] = c; - out[3] = d; - out[4] = tx; - out[5] = ty; - return out; + out[0] = a; + out[1] = b; + out[2] = c; + out[3] = d; + out[4] = tx; + out[5] = ty; + return out; } /** * Inverts a mat2d @@ -709,28 +649,21 @@ THE SOFTWARE. * @param {ReadonlyMat2d} a the source matrix * @returns {mat2d} out */ - function invert$4(out, a) { - var aa = a[0], - ab = a[1], - ac = a[2], - ad = a[3]; - var atx = a[4], - aty = a[5]; - var det = aa * ad - ab * ac; - - if (!det) { - return null; - } - - det = 1.0 / det; - out[0] = ad * det; - out[1] = -ab * det; - out[2] = -ac * det; - out[3] = aa * det; - out[4] = (ac * aty - ad * atx) * det; - out[5] = (ab * atx - aa * aty) * det; - return out; + var aa = a[0], ab = a[1], ac = a[2], ad = a[3]; + var atx = a[4], aty = a[5]; + var det = aa * ad - ab * ac; + if (!det) { + return null; + } + det = 1.0 / det; + out[0] = ad * det; + out[1] = -ab * det; + out[2] = -ac * det; + out[3] = aa * det; + out[4] = (ac * aty - ad * atx) * det; + out[5] = (ab * atx - aa * aty) * det; + return out; } /** * Calculates the determinant of a mat2d @@ -738,9 +671,8 @@ THE SOFTWARE. * @param {ReadonlyMat2d} a the source matrix * @returns {Number} determinant of a */ - function determinant$2(a) { - return a[0] * a[3] - a[1] * a[2]; + return a[0] * a[3] - a[1] * a[2]; } /** * Multiplies two mat2d's @@ -750,27 +682,16 @@ THE SOFTWARE. * @param {ReadonlyMat2d} b the second operand * @returns {mat2d} out */ - function multiply$7(out, a, b) { - var a0 = a[0], - a1 = a[1], - a2 = a[2], - a3 = a[3], - a4 = a[4], - a5 = a[5]; - var b0 = b[0], - b1 = b[1], - b2 = b[2], - b3 = b[3], - b4 = b[4], - b5 = b[5]; - out[0] = a0 * b0 + a2 * b1; - out[1] = a1 * b0 + a3 * b1; - out[2] = a0 * b2 + a2 * b3; - out[3] = a1 * b2 + a3 * b3; - out[4] = a0 * b4 + a2 * b5 + a4; - out[5] = a1 * b4 + a3 * b5 + a5; - return out; + var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5]; + var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3], b4 = b[4], b5 = b[5]; + out[0] = a0 * b0 + a2 * b1; + out[1] = a1 * b0 + a3 * b1; + out[2] = a0 * b2 + a2 * b3; + out[3] = a1 * b2 + a3 * b3; + out[4] = a0 * b4 + a2 * b5 + a4; + out[5] = a1 * b4 + a3 * b5 + a5; + return out; } /** * Rotates a mat2d by the given angle @@ -780,23 +701,17 @@ THE SOFTWARE. * @param {Number} rad the angle to rotate the matrix by * @returns {mat2d} out */ - function rotate$3(out, a, rad) { - var a0 = a[0], - a1 = a[1], - a2 = a[2], - a3 = a[3], - a4 = a[4], - a5 = a[5]; - var s = Math.sin(rad); - var c = Math.cos(rad); - out[0] = a0 * c + a2 * s; - out[1] = a1 * c + a3 * s; - out[2] = a0 * -s + a2 * c; - out[3] = a1 * -s + a3 * c; - out[4] = a4; - out[5] = a5; - return out; + var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5]; + var s = Math.sin(rad); + var c = Math.cos(rad); + out[0] = a0 * c + a2 * s; + out[1] = a1 * c + a3 * s; + out[2] = a0 * -s + a2 * c; + out[3] = a1 * -s + a3 * c; + out[4] = a4; + out[5] = a5; + return out; } /** * Scales the mat2d by the dimensions in the given vec2 @@ -806,23 +721,16 @@ THE SOFTWARE. * @param {ReadonlyVec2} v the vec2 to scale the matrix by * @returns {mat2d} out **/ - function scale$7(out, a, v) { - var a0 = a[0], - a1 = a[1], - a2 = a[2], - a3 = a[3], - a4 = a[4], - a5 = a[5]; - var v0 = v[0], - v1 = v[1]; - out[0] = a0 * v0; - out[1] = a1 * v0; - out[2] = a2 * v1; - out[3] = a3 * v1; - out[4] = a4; - out[5] = a5; - return out; + var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5]; + var v0 = v[0], v1 = v[1]; + out[0] = a0 * v0; + out[1] = a1 * v0; + out[2] = a2 * v1; + out[3] = a3 * v1; + out[4] = a4; + out[5] = a5; + return out; } /** * Translates the mat2d by the dimensions in the given vec2 @@ -832,23 +740,16 @@ THE SOFTWARE. * @param {ReadonlyVec2} v the vec2 to translate the matrix by * @returns {mat2d} out **/ - function translate$3(out, a, v) { - var a0 = a[0], - a1 = a[1], - a2 = a[2], - a3 = a[3], - a4 = a[4], - a5 = a[5]; - var v0 = v[0], - v1 = v[1]; - out[0] = a0; - out[1] = a1; - out[2] = a2; - out[3] = a3; - out[4] = a0 * v0 + a2 * v1 + a4; - out[5] = a1 * v0 + a3 * v1 + a5; - return out; + var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5]; + var v0 = v[0], v1 = v[1]; + out[0] = a0; + out[1] = a1; + out[2] = a2; + out[3] = a3; + out[4] = a0 * v0 + a2 * v1 + a4; + out[5] = a1 * v0 + a3 * v1 + a5; + return out; } /** * Creates a matrix from a given angle @@ -861,17 +762,15 @@ THE SOFTWARE. * @param {Number} rad the angle to rotate the matrix by * @returns {mat2d} out */ - function fromRotation$3(out, rad) { - var s = Math.sin(rad), - c = Math.cos(rad); - out[0] = c; - out[1] = s; - out[2] = -s; - out[3] = c; - out[4] = 0; - out[5] = 0; - return out; + var s = Math.sin(rad), c = Math.cos(rad); + out[0] = c; + out[1] = s; + out[2] = -s; + out[3] = c; + out[4] = 0; + out[5] = 0; + return out; } /** * Creates a matrix from a vector scaling @@ -884,15 +783,14 @@ THE SOFTWARE. * @param {ReadonlyVec2} v Scaling vector * @returns {mat2d} out */ - function fromScaling$2(out, v) { - out[0] = v[0]; - out[1] = 0; - out[2] = 0; - out[3] = v[1]; - out[4] = 0; - out[5] = 0; - return out; + out[0] = v[0]; + out[1] = 0; + out[2] = 0; + out[3] = v[1]; + out[4] = 0; + out[5] = 0; + return out; } /** * Creates a matrix from a vector translation @@ -905,15 +803,14 @@ THE SOFTWARE. * @param {ReadonlyVec2} v Translation vector * @returns {mat2d} out */ - function fromTranslation$3(out, v) { - out[0] = 1; - out[1] = 0; - out[2] = 0; - out[3] = 1; - out[4] = v[0]; - out[5] = v[1]; - return out; + out[0] = 1; + out[1] = 0; + out[2] = 0; + out[3] = 1; + out[4] = v[0]; + out[5] = v[1]; + return out; } /** * Returns a string representation of a mat2d @@ -921,9 +818,20 @@ THE SOFTWARE. * @param {ReadonlyMat2d} a matrix to represent as a string * @returns {String} string representation of the matrix */ - function str$7(a) { - return "mat2d(" + a[0].toString() + ", " + a[1].toString() + ", " + a[2].toString() + ", " + a[3].toString() + ", " + a[4].toString() + ", " + a[5].toString() + ")"; + return ("mat2d(" + + a[0].toString() + + ", " + + a[1].toString() + + ", " + + a[2].toString() + + ", " + + a[3].toString() + + ", " + + a[4].toString() + + ", " + + a[5].toString() + + ")"); } /** * Returns Frobenius norm of a mat2d @@ -931,9 +839,8 @@ THE SOFTWARE. * @param {ReadonlyMat2d} a the matrix to calculate Frobenius norm of * @returns {Number} Frobenius norm */ - function frob$2(a) { - return Maths.hypot(a[0], a[1], a[2], a[3], a[4], a[5], 1); + return Maths.hypot(a[0], a[1], a[2], a[3], a[4], a[5], 1); } /** * Adds two mat2d's @@ -943,15 +850,14 @@ THE SOFTWARE. * @param {ReadonlyMat2d} b the second operand * @returns {mat2d} out */ - function add$7(out, a, b) { - out[0] = a[0] + b[0]; - out[1] = a[1] + b[1]; - out[2] = a[2] + b[2]; - out[3] = a[3] + b[3]; - out[4] = a[4] + b[4]; - out[5] = a[5] + b[5]; - return out; + out[0] = a[0] + b[0]; + out[1] = a[1] + b[1]; + out[2] = a[2] + b[2]; + out[3] = a[3] + b[3]; + out[4] = a[4] + b[4]; + out[5] = a[5] + b[5]; + return out; } /** * Subtracts matrix b from matrix a @@ -961,15 +867,14 @@ THE SOFTWARE. * @param {ReadonlyMat2d} b the second operand * @returns {mat2d} out */ - function subtract$5(out, a, b) { - out[0] = a[0] - b[0]; - out[1] = a[1] - b[1]; - out[2] = a[2] - b[2]; - out[3] = a[3] - b[3]; - out[4] = a[4] - b[4]; - out[5] = a[5] - b[5]; - return out; + out[0] = a[0] - b[0]; + out[1] = a[1] - b[1]; + out[2] = a[2] - b[2]; + out[3] = a[3] - b[3]; + out[4] = a[4] - b[4]; + out[5] = a[5] - b[5]; + return out; } /** * Multiply each element of the matrix by a scalar. @@ -979,15 +884,14 @@ THE SOFTWARE. * @param {Number} b amount to scale the matrix's elements by * @returns {mat2d} out */ - function multiplyScalar$2(out, a, b) { - out[0] = a[0] * b; - out[1] = a[1] * b; - out[2] = a[2] * b; - out[3] = a[3] * b; - out[4] = a[4] * b; - out[5] = a[5] * b; - return out; + out[0] = a[0] * b; + out[1] = a[1] * b; + out[2] = a[2] * b; + out[3] = a[3] * b; + out[4] = a[4] * b; + out[5] = a[5] * b; + return out; } /** * Adds two mat2d's after multiplying each element of the second operand by a scalar value. @@ -998,15 +902,14 @@ THE SOFTWARE. * @param {Number} scale the amount to scale b's elements by before adding * @returns {mat2d} out */ - function multiplyScalarAndAdd$2(out, a, b, scale) { - out[0] = a[0] + b[0] * scale; - out[1] = a[1] + b[1] * scale; - out[2] = a[2] + b[2] * scale; - out[3] = a[3] + b[3] * scale; - out[4] = a[4] + b[4] * scale; - out[5] = a[5] + b[5] * scale; - return out; + out[0] = a[0] + b[0] * scale; + out[1] = a[1] + b[1] * scale; + out[2] = a[2] + b[2] * scale; + out[3] = a[3] + b[3] * scale; + out[4] = a[4] + b[4] * scale; + out[5] = a[5] + b[5] * scale; + return out; } /** * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===) @@ -1015,9 +918,13 @@ THE SOFTWARE. * @param {ReadonlyMat2d} b The second matrix. * @returns {Boolean} True if the matrices are equal, false otherwise. */ - function exactEquals$7(a, b) { - return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5]; + return (a[0] === b[0] && + a[1] === b[1] && + a[2] === b[2] && + a[3] === b[3] && + a[4] === b[4] && + a[5] === b[5]); } /** * Returns whether or not the matrices have approximately the same elements in the same position. @@ -1026,33 +933,31 @@ THE SOFTWARE. * @param {ReadonlyMat2d} b The second matrix. * @returns {Boolean} True if the matrices are equal, false otherwise. */ - function equals$7(a, b) { - var a0 = a[0], - a1 = a[1], - a2 = a[2], - a3 = a[3], - a4 = a[4], - a5 = a[5]; - var b0 = b[0], - b1 = b[1], - b2 = b[2], - b3 = b[3], - b4 = b[4], - b5 = b[5]; - return Math.abs(a0 - b0) <= EPSILON * Maths.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= EPSILON * Maths.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= EPSILON * Maths.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= EPSILON * Maths.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= EPSILON * Maths.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= EPSILON * Maths.max(1.0, Math.abs(a5), Math.abs(b5)); + var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5]; + var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3], b4 = b[4], b5 = b[5]; + return (Math.abs(a0 - b0) <= + EPSILON * Maths.max(1.0, Math.abs(a0), Math.abs(b0)) && + Math.abs(a1 - b1) <= + EPSILON * Maths.max(1.0, Math.abs(a1), Math.abs(b1)) && + Math.abs(a2 - b2) <= + EPSILON * Maths.max(1.0, Math.abs(a2), Math.abs(b2)) && + Math.abs(a3 - b3) <= + EPSILON * Maths.max(1.0, Math.abs(a3), Math.abs(b3)) && + Math.abs(a4 - b4) <= + EPSILON * Maths.max(1.0, Math.abs(a4), Math.abs(b4)) && + Math.abs(a5 - b5) <= + EPSILON * Maths.max(1.0, Math.abs(a5), Math.abs(b5))); } /** * Alias for {@link mat2d.multiply} * @function */ - var mul$7 = multiply$7; /** * Alias for {@link mat2d.subtract} * @function */ - var sub$5 = subtract$5; var mat2d = /*#__PURE__*/Object.freeze({ @@ -1088,27 +993,25 @@ THE SOFTWARE. * 3x3 Matrix * @module mat3 */ - /** * Creates a new identity mat3 * * @returns {mat3} a new 3x3 matrix */ - function create$6() { - var out = new Float64Array(9); //if (glMatrix.ARRAY_TYPE != Float32Array): mat3 { - - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[5] = 0; - out[6] = 0; - out[7] = 0; //} - - out[0] = 1; - out[4] = 1; - out[8] = 1; - return out; + var out = new Float64Array(9); + //if (glMatrix.ARRAY_TYPE != Float32Array): mat3 { + out[1] = 0; + out[2] = 0; + out[3] = 0; + out[5] = 0; + out[6] = 0; + out[7] = 0; + //} + out[0] = 1; + out[4] = 1; + out[8] = 1; + return out; } /** * Copies the upper-left 3x3 values into the given mat3. @@ -1117,18 +1020,17 @@ THE SOFTWARE. * @param {ReadonlyMat4} a the source 4x4 matrix * @returns {mat3} out */ - function fromMat4$1(out, a) { - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[4]; - out[4] = a[5]; - out[5] = a[6]; - out[6] = a[8]; - out[7] = a[9]; - out[8] = a[10]; - return out; + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[4]; + out[4] = a[5]; + out[5] = a[6]; + out[6] = a[8]; + out[7] = a[9]; + out[8] = a[10]; + return out; } /** * Creates a new mat3 initialized with values from an existing matrix @@ -1136,19 +1038,18 @@ THE SOFTWARE. * @param {ReadonlyMat3} a matrix to clone * @returns {mat3} a new 3x3 matrix */ - function clone$6(a) { - var out = new Float64Array(9); - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - out[4] = a[4]; - out[5] = a[5]; - out[6] = a[6]; - out[7] = a[7]; - out[8] = a[8]; - return out; + var out = new Float64Array(9); + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[3]; + out[4] = a[4]; + out[5] = a[5]; + out[6] = a[6]; + out[7] = a[7]; + out[8] = a[8]; + return out; } /** * Copy the values from one mat3 to another @@ -1157,18 +1058,17 @@ THE SOFTWARE. * @param {ReadonlyMat3} a the source matrix * @returns {mat3} out */ - function copy$6(out, a) { - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - out[4] = a[4]; - out[5] = a[5]; - out[6] = a[6]; - out[7] = a[7]; - out[8] = a[8]; - return out; + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[3]; + out[4] = a[4]; + out[5] = a[5]; + out[6] = a[6]; + out[7] = a[7]; + out[8] = a[8]; + return out; } /** * Create a new mat3 with the given values @@ -1184,19 +1084,18 @@ THE SOFTWARE. * @param {Number} m22 Component in column 2, row 2 position (index 8) * @returns {mat3} A new mat3 */ - function fromValues$6(m00, m01, m02, m10, m11, m12, m20, m21, m22) { - var out = new Float64Array(9); - out[0] = m00; - out[1] = m01; - out[2] = m02; - out[3] = m10; - out[4] = m11; - out[5] = m12; - out[6] = m20; - out[7] = m21; - out[8] = m22; - return out; + var out = new Float64Array(9); + out[0] = m00; + out[1] = m01; + out[2] = m02; + out[3] = m10; + out[4] = m11; + out[5] = m12; + out[6] = m20; + out[7] = m21; + out[8] = m22; + return out; } /** * Set the components of a mat3 to the given values @@ -1213,18 +1112,17 @@ THE SOFTWARE. * @param {Number} m22 Component in column 2, row 2 position (index 8) * @returns {mat3} out */ - function set$6(out, m00, m01, m02, m10, m11, m12, m20, m21, m22) { - out[0] = m00; - out[1] = m01; - out[2] = m02; - out[3] = m10; - out[4] = m11; - out[5] = m12; - out[6] = m20; - out[7] = m21; - out[8] = m22; - return out; + out[0] = m00; + out[1] = m01; + out[2] = m02; + out[3] = m10; + out[4] = m11; + out[5] = m12; + out[6] = m20; + out[7] = m21; + out[8] = m22; + return out; } /** * Set a mat3 to the identity matrix @@ -1232,18 +1130,17 @@ THE SOFTWARE. * @param {mat3} out the receiving matrix * @returns {mat3} out */ - function identity$3(out) { - out[0] = 1; - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = 1; - out[5] = 0; - out[6] = 0; - out[7] = 0; - out[8] = 1; - return out; + out[0] = 1; + out[1] = 0; + out[2] = 0; + out[3] = 0; + out[4] = 1; + out[5] = 0; + out[6] = 0; + out[7] = 0; + out[8] = 1; + return out; } /** * Transpose the values of a mat3 @@ -1252,32 +1149,29 @@ THE SOFTWARE. * @param {ReadonlyMat3} a the source matrix * @returns {mat3} out */ - function transpose$1(out, a) { - // If we are transposing ourselves we can skip a few steps but have to cache some values - if (out === a) { - var a01 = a[1], - a02 = a[2], - a12 = a[5]; - out[1] = a[3]; - out[2] = a[6]; - out[3] = a01; - out[5] = a[7]; - out[6] = a02; - out[7] = a12; - } else { - out[0] = a[0]; - out[1] = a[3]; - out[2] = a[6]; - out[3] = a[1]; - out[4] = a[4]; - out[5] = a[7]; - out[6] = a[2]; - out[7] = a[5]; - out[8] = a[8]; - } - - return out; + // If we are transposing ourselves we can skip a few steps but have to cache some values + if (out === a) { + var a01 = a[1], a02 = a[2], a12 = a[5]; + out[1] = a[3]; + out[2] = a[6]; + out[3] = a01; + out[5] = a[7]; + out[6] = a02; + out[7] = a12; + } + else { + out[0] = a[0]; + out[1] = a[3]; + out[2] = a[6]; + out[3] = a[1]; + out[4] = a[4]; + out[5] = a[7]; + out[6] = a[2]; + out[7] = a[5]; + out[8] = a[8]; + } + return out; } /** * Inverts a mat3 @@ -1286,38 +1180,29 @@ THE SOFTWARE. * @param {ReadonlyMat3} a the source matrix * @returns {mat3} out */ - function invert$3(out, a) { - var a00 = a[0], - a01 = a[1], - a02 = a[2]; - var a10 = a[3], - a11 = a[4], - a12 = a[5]; - var a20 = a[6], - a21 = a[7], - a22 = a[8]; - var b01 = a22 * a11 - a12 * a21; - var b11 = -a22 * a10 + a12 * a20; - var b21 = a21 * a10 - a11 * a20; // Calculate the determinant - - var det = a00 * b01 + a01 * b11 + a02 * b21; - - if (!det) { - return null; - } - - det = 1.0 / det; - out[0] = b01 * det; - out[1] = (-a22 * a01 + a02 * a21) * det; - out[2] = (a12 * a01 - a02 * a11) * det; - out[3] = b11 * det; - out[4] = (a22 * a00 - a02 * a20) * det; - out[5] = (-a12 * a00 + a02 * a10) * det; - out[6] = b21 * det; - out[7] = (-a21 * a00 + a01 * a20) * det; - out[8] = (a11 * a00 - a01 * a10) * det; - return out; + var a00 = a[0], a01 = a[1], a02 = a[2]; + var a10 = a[3], a11 = a[4], a12 = a[5]; + var a20 = a[6], a21 = a[7], a22 = a[8]; + var b01 = a22 * a11 - a12 * a21; + var b11 = -a22 * a10 + a12 * a20; + var b21 = a21 * a10 - a11 * a20; + // Calculate the determinant + var det = a00 * b01 + a01 * b11 + a02 * b21; + if (!det) { + return null; + } + det = 1.0 / det; + out[0] = b01 * det; + out[1] = (-a22 * a01 + a02 * a21) * det; + out[2] = (a12 * a01 - a02 * a11) * det; + out[3] = b11 * det; + out[4] = (a22 * a00 - a02 * a20) * det; + out[5] = (-a12 * a00 + a02 * a10) * det; + out[6] = b21 * det; + out[7] = (-a21 * a00 + a01 * a20) * det; + out[8] = (a11 * a00 - a01 * a10) * det; + return out; } /** * Calculates the adjugate of a mat3 @@ -1326,27 +1211,20 @@ THE SOFTWARE. * @param {ReadonlyMat3} a the source matrix * @returns {mat3} out */ - function adjoint$1(out, a) { - var a00 = a[0], - a01 = a[1], - a02 = a[2]; - var a10 = a[3], - a11 = a[4], - a12 = a[5]; - var a20 = a[6], - a21 = a[7], - a22 = a[8]; - out[0] = a11 * a22 - a12 * a21; - out[1] = a02 * a21 - a01 * a22; - out[2] = a01 * a12 - a02 * a11; - out[3] = a12 * a20 - a10 * a22; - out[4] = a00 * a22 - a02 * a20; - out[5] = a02 * a10 - a00 * a12; - out[6] = a10 * a21 - a11 * a20; - out[7] = a01 * a20 - a00 * a21; - out[8] = a00 * a11 - a01 * a10; - return out; + var a00 = a[0], a01 = a[1], a02 = a[2]; + var a10 = a[3], a11 = a[4], a12 = a[5]; + var a20 = a[6], a21 = a[7], a22 = a[8]; + out[0] = a11 * a22 - a12 * a21; + out[1] = a02 * a21 - a01 * a22; + out[2] = a01 * a12 - a02 * a11; + out[3] = a12 * a20 - a10 * a22; + out[4] = a00 * a22 - a02 * a20; + out[5] = a02 * a10 - a00 * a12; + out[6] = a10 * a21 - a11 * a20; + out[7] = a01 * a20 - a00 * a21; + out[8] = a00 * a11 - a01 * a10; + return out; } /** * Calculates the determinant of a mat3 @@ -1354,18 +1232,13 @@ THE SOFTWARE. * @param {ReadonlyMat3} a the source matrix * @returns {Number} determinant of a */ - function determinant$1(a) { - var a00 = a[0], - a01 = a[1], - a02 = a[2]; - var a10 = a[3], - a11 = a[4], - a12 = a[5]; - var a20 = a[6], - a21 = a[7], - a22 = a[8]; - return a00 * (a22 * a11 - a12 * a21) + a01 * (-a22 * a10 + a12 * a20) + a02 * (a21 * a10 - a11 * a20); + var a00 = a[0], a01 = a[1], a02 = a[2]; + var a10 = a[3], a11 = a[4], a12 = a[5]; + var a20 = a[6], a21 = a[7], a22 = a[8]; + return (a00 * (a22 * a11 - a12 * a21) + + a01 * (-a22 * a10 + a12 * a20) + + a02 * (a21 * a10 - a11 * a20)); } /** * Multiplies two mat3's @@ -1375,36 +1248,23 @@ THE SOFTWARE. * @param {ReadonlyMat3} b the second operand * @returns {mat3} out */ - function multiply$6(out, a, b) { - var a00 = a[0], - a01 = a[1], - a02 = a[2]; - var a10 = a[3], - a11 = a[4], - a12 = a[5]; - var a20 = a[6], - a21 = a[7], - a22 = a[8]; - var b00 = b[0], - b01 = b[1], - b02 = b[2]; - var b10 = b[3], - b11 = b[4], - b12 = b[5]; - var b20 = b[6], - b21 = b[7], - b22 = b[8]; - out[0] = b00 * a00 + b01 * a10 + b02 * a20; - out[1] = b00 * a01 + b01 * a11 + b02 * a21; - out[2] = b00 * a02 + b01 * a12 + b02 * a22; - out[3] = b10 * a00 + b11 * a10 + b12 * a20; - out[4] = b10 * a01 + b11 * a11 + b12 * a21; - out[5] = b10 * a02 + b11 * a12 + b12 * a22; - out[6] = b20 * a00 + b21 * a10 + b22 * a20; - out[7] = b20 * a01 + b21 * a11 + b22 * a21; - out[8] = b20 * a02 + b21 * a12 + b22 * a22; - return out; + var a00 = a[0], a01 = a[1], a02 = a[2]; + var a10 = a[3], a11 = a[4], a12 = a[5]; + var a20 = a[6], a21 = a[7], a22 = a[8]; + var b00 = b[0], b01 = b[1], b02 = b[2]; + var b10 = b[3], b11 = b[4], b12 = b[5]; + var b20 = b[6], b21 = b[7], b22 = b[8]; + out[0] = b00 * a00 + b01 * a10 + b02 * a20; + out[1] = b00 * a01 + b01 * a11 + b02 * a21; + out[2] = b00 * a02 + b01 * a12 + b02 * a22; + out[3] = b10 * a00 + b11 * a10 + b12 * a20; + out[4] = b10 * a01 + b11 * a11 + b12 * a21; + out[5] = b10 * a02 + b11 * a12 + b12 * a22; + out[6] = b20 * a00 + b21 * a10 + b22 * a20; + out[7] = b20 * a01 + b21 * a11 + b22 * a21; + out[8] = b20 * a02 + b21 * a12 + b22 * a22; + return out; } /** * Translate a mat3 by the given vector @@ -1414,29 +1274,18 @@ THE SOFTWARE. * @param {ReadonlyVec2} v vector to translate by * @returns {mat3} out */ - function translate$2(out, a, v) { - var a00 = a[0], - a01 = a[1], - a02 = a[2], - a10 = a[3], - a11 = a[4], - a12 = a[5], - a20 = a[6], - a21 = a[7], - a22 = a[8], - x = v[0], - y = v[1]; - out[0] = a00; - out[1] = a01; - out[2] = a02; - out[3] = a10; - out[4] = a11; - out[5] = a12; - out[6] = x * a00 + y * a10 + a20; - out[7] = x * a01 + y * a11 + a21; - out[8] = x * a02 + y * a12 + a22; - return out; + var a00 = a[0], a01 = a[1], a02 = a[2], a10 = a[3], a11 = a[4], a12 = a[5], a20 = a[6], a21 = a[7], a22 = a[8], x = v[0], y = v[1]; + out[0] = a00; + out[1] = a01; + out[2] = a02; + out[3] = a10; + out[4] = a11; + out[5] = a12; + out[6] = x * a00 + y * a10 + a20; + out[7] = x * a01 + y * a11 + a21; + out[8] = x * a02 + y * a12 + a22; + return out; } /** * Rotates a mat3 by the given angle @@ -1446,29 +1295,18 @@ THE SOFTWARE. * @param {Number} rad the angle to rotate the matrix by * @returns {mat3} out */ - function rotate$2(out, a, rad) { - var a00 = a[0], - a01 = a[1], - a02 = a[2], - a10 = a[3], - a11 = a[4], - a12 = a[5], - a20 = a[6], - a21 = a[7], - a22 = a[8], - s = Math.sin(rad), - c = Math.cos(rad); - out[0] = c * a00 + s * a10; - out[1] = c * a01 + s * a11; - out[2] = c * a02 + s * a12; - out[3] = c * a10 - s * a00; - out[4] = c * a11 - s * a01; - out[5] = c * a12 - s * a02; - out[6] = a20; - out[7] = a21; - out[8] = a22; - return out; + var a00 = a[0], a01 = a[1], a02 = a[2], a10 = a[3], a11 = a[4], a12 = a[5], a20 = a[6], a21 = a[7], a22 = a[8], s = Math.sin(rad), c = Math.cos(rad); + out[0] = c * a00 + s * a10; + out[1] = c * a01 + s * a11; + out[2] = c * a02 + s * a12; + out[3] = c * a10 - s * a00; + out[4] = c * a11 - s * a01; + out[5] = c * a12 - s * a02; + out[6] = a20; + out[7] = a21; + out[8] = a22; + return out; } /** * Scales the mat3 by the dimensions in the given vec2 @@ -1478,20 +1316,18 @@ THE SOFTWARE. * @param {ReadonlyVec2} v the vec2 to scale the matrix by * @returns {mat3} out **/ - function scale$6(out, a, v) { - var x = v[0], - y = v[1]; - out[0] = x * a[0]; - out[1] = x * a[1]; - out[2] = x * a[2]; - out[3] = y * a[3]; - out[4] = y * a[4]; - out[5] = y * a[5]; - out[6] = a[6]; - out[7] = a[7]; - out[8] = a[8]; - return out; + var x = v[0], y = v[1]; + out[0] = x * a[0]; + out[1] = x * a[1]; + out[2] = x * a[2]; + out[3] = y * a[3]; + out[4] = y * a[4]; + out[5] = y * a[5]; + out[6] = a[6]; + out[7] = a[7]; + out[8] = a[8]; + return out; } /** * Creates a matrix from a vector translation @@ -1504,18 +1340,17 @@ THE SOFTWARE. * @param {ReadonlyVec2} v Translation vector * @returns {mat3} out */ - function fromTranslation$2(out, v) { - out[0] = 1; - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = 1; - out[5] = 0; - out[6] = v[0]; - out[7] = v[1]; - out[8] = 1; - return out; + out[0] = 1; + out[1] = 0; + out[2] = 0; + out[3] = 0; + out[4] = 1; + out[5] = 0; + out[6] = v[0]; + out[7] = v[1]; + out[8] = 1; + return out; } /** * Creates a matrix from a given angle @@ -1528,20 +1363,18 @@ THE SOFTWARE. * @param {Number} rad the angle to rotate the matrix by * @returns {mat3} out */ - function fromRotation$2(out, rad) { - var s = Math.sin(rad), - c = Math.cos(rad); - out[0] = c; - out[1] = s; - out[2] = 0; - out[3] = -s; - out[4] = c; - out[5] = 0; - out[6] = 0; - out[7] = 0; - out[8] = 1; - return out; + var s = Math.sin(rad), c = Math.cos(rad); + out[0] = c; + out[1] = s; + out[2] = 0; + out[3] = -s; + out[4] = c; + out[5] = 0; + out[6] = 0; + out[7] = 0; + out[8] = 1; + return out; } /** * Creates a matrix from a vector scaling @@ -1554,18 +1387,17 @@ THE SOFTWARE. * @param {ReadonlyVec2} v Scaling vector * @returns {mat3} out */ - function fromScaling$1(out, v) { - out[0] = v[0]; - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = v[1]; - out[5] = 0; - out[6] = 0; - out[7] = 0; - out[8] = 1; - return out; + out[0] = v[0]; + out[1] = 0; + out[2] = 0; + out[3] = 0; + out[4] = v[1]; + out[5] = 0; + out[6] = 0; + out[7] = 0; + out[8] = 1; + return out; } /** * Copies the values from a mat2d into a mat3 @@ -1574,18 +1406,17 @@ THE SOFTWARE. * @param {ReadonlyMat2d} a the matrix to copy * @returns {mat3} out **/ - function fromMat2d(out, a) { - out[0] = a[0]; - out[1] = a[1]; - out[2] = 0; - out[3] = a[2]; - out[4] = a[3]; - out[5] = 0; - out[6] = a[4]; - out[7] = a[5]; - out[8] = 1; - return out; + out[0] = a[0]; + out[1] = a[1]; + out[2] = 0; + out[3] = a[2]; + out[4] = a[3]; + out[5] = 0; + out[6] = a[4]; + out[7] = a[5]; + out[8] = 1; + return out; } /** * Calculates a 3x3 matrix from the given quaternion @@ -1595,34 +1426,30 @@ THE SOFTWARE. * * @returns {mat3} out */ - function fromQuat$1(out, q) { - var x = q[0], - y = q[1], - z = q[2], - w = q[3]; - var x2 = x + x; - var y2 = y + y; - var z2 = z + z; - var xx = x * x2; - var yx = y * x2; - var yy = y * y2; - var zx = z * x2; - var zy = z * y2; - var zz = z * z2; - var wx = w * x2; - var wy = w * y2; - var wz = w * z2; - out[0] = 1 - yy - zz; - out[3] = yx - wz; - out[6] = zx + wy; - out[1] = yx + wz; - out[4] = 1 - xx - zz; - out[7] = zy - wx; - out[2] = zx - wy; - out[5] = zy + wx; - out[8] = 1 - xx - yy; - return out; + var x = q[0], y = q[1], z = q[2], w = q[3]; + var x2 = x + x; + var y2 = y + y; + var z2 = z + z; + var xx = x * x2; + var yx = y * x2; + var yy = y * y2; + var zx = z * x2; + var zy = z * y2; + var zz = z * z2; + var wx = w * x2; + var wy = w * y2; + var wz = w * z2; + out[0] = 1 - yy - zz; + out[3] = yx - wz; + out[6] = zx + wy; + out[1] = yx + wz; + out[4] = 1 - xx - zz; + out[7] = zy - wx; + out[2] = zx - wy; + out[5] = zy + wx; + out[8] = 1 - xx - yy; + return out; } /** * Calculates a 3x3 normal matrix (transpose inverse) from the 4x4 matrix @@ -1632,54 +1459,39 @@ THE SOFTWARE. * * @returns {mat3} out */ - function normalFromMat4(out, a) { - var a00 = a[0], - a01 = a[1], - a02 = a[2], - a03 = a[3]; - var a10 = a[4], - a11 = a[5], - a12 = a[6], - a13 = a[7]; - var a20 = a[8], - a21 = a[9], - a22 = a[10], - a23 = a[11]; - var a30 = a[12], - a31 = a[13], - a32 = a[14], - a33 = a[15]; - var b00 = a00 * a11 - a01 * a10; - var b01 = a00 * a12 - a02 * a10; - var b02 = a00 * a13 - a03 * a10; - var b03 = a01 * a12 - a02 * a11; - var b04 = a01 * a13 - a03 * a11; - var b05 = a02 * a13 - a03 * a12; - var b06 = a20 * a31 - a21 * a30; - var b07 = a20 * a32 - a22 * a30; - var b08 = a20 * a33 - a23 * a30; - var b09 = a21 * a32 - a22 * a31; - var b10 = a21 * a33 - a23 * a31; - var b11 = a22 * a33 - a23 * a32; // Calculate the determinant - - var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06; - - if (!det) { - return null; - } - - det = 1.0 / det; - out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det; - out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det; - out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det; - out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det; - out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det; - out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det; - out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det; - out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det; - out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det; - return out; + var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3]; + var a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7]; + var a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11]; + var a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15]; + var b00 = a00 * a11 - a01 * a10; + var b01 = a00 * a12 - a02 * a10; + var b02 = a00 * a13 - a03 * a10; + var b03 = a01 * a12 - a02 * a11; + var b04 = a01 * a13 - a03 * a11; + var b05 = a02 * a13 - a03 * a12; + var b06 = a20 * a31 - a21 * a30; + var b07 = a20 * a32 - a22 * a30; + var b08 = a20 * a33 - a23 * a30; + var b09 = a21 * a32 - a22 * a31; + var b10 = a21 * a33 - a23 * a31; + var b11 = a22 * a33 - a23 * a32; + // Calculate the determinant + var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06; + if (!det) { + return null; + } + det = 1.0 / det; + out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det; + out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det; + out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det; + out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det; + out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det; + out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det; + out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det; + out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det; + out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det; + return out; } /** * Generates a 2D projection matrix with the given bounds @@ -1689,18 +1501,17 @@ THE SOFTWARE. * @param {number} height Height of gl context * @returns {mat3} out */ - function projection(out, width, height) { - out[0] = 2 / width; - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = -2 / height; - out[5] = 0; - out[6] = -1; - out[7] = 1; - out[8] = 1; - return out; + out[0] = 2 / width; + out[1] = 0; + out[2] = 0; + out[3] = 0; + out[4] = -2 / height; + out[5] = 0; + out[6] = -1; + out[7] = 1; + out[8] = 1; + return out; } /** * Returns a string representation of a mat3 @@ -1708,9 +1519,26 @@ THE SOFTWARE. * @param {ReadonlyMat3} a matrix to represent as a string * @returns {String} string representation of the matrix */ - function str$6(a) { - return "mat3(" + a[0].toString() + ", " + a[1].toString() + ", " + a[2].toString() + ", " + a[3].toString() + ", " + a[4].toString() + ", " + a[5].toString() + ", " + a[6].toString() + ", " + a[7].toString() + ", " + a[8].toString() + ")"; + return ("mat3(" + + a[0].toString() + + ", " + + a[1].toString() + + ", " + + a[2].toString() + + ", " + + a[3].toString() + + ", " + + a[4].toString() + + ", " + + a[5].toString() + + ", " + + a[6].toString() + + ", " + + a[7].toString() + + ", " + + a[8].toString() + + ")"); } /** * Returns Frobenius norm of a mat3 @@ -1718,9 +1546,8 @@ THE SOFTWARE. * @param {ReadonlyMat3} a the matrix to calculate Frobenius norm of * @returns {Number} Frobenius norm */ - function frob$1(a) { - return Maths.hypot(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8]); + return Maths.hypot(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8]); } /** * Adds two mat3's @@ -1730,18 +1557,17 @@ THE SOFTWARE. * @param {ReadonlyMat3} b the second operand * @returns {mat3} out */ - function add$6(out, a, b) { - out[0] = a[0] + b[0]; - out[1] = a[1] + b[1]; - out[2] = a[2] + b[2]; - out[3] = a[3] + b[3]; - out[4] = a[4] + b[4]; - out[5] = a[5] + b[5]; - out[6] = a[6] + b[6]; - out[7] = a[7] + b[7]; - out[8] = a[8] + b[8]; - return out; + out[0] = a[0] + b[0]; + out[1] = a[1] + b[1]; + out[2] = a[2] + b[2]; + out[3] = a[3] + b[3]; + out[4] = a[4] + b[4]; + out[5] = a[5] + b[5]; + out[6] = a[6] + b[6]; + out[7] = a[7] + b[7]; + out[8] = a[8] + b[8]; + return out; } /** * Subtracts matrix b from matrix a @@ -1751,18 +1577,17 @@ THE SOFTWARE. * @param {ReadonlyMat3} b the second operand * @returns {mat3} out */ - function subtract$4(out, a, b) { - out[0] = a[0] - b[0]; - out[1] = a[1] - b[1]; - out[2] = a[2] - b[2]; - out[3] = a[3] - b[3]; - out[4] = a[4] - b[4]; - out[5] = a[5] - b[5]; - out[6] = a[6] - b[6]; - out[7] = a[7] - b[7]; - out[8] = a[8] - b[8]; - return out; + out[0] = a[0] - b[0]; + out[1] = a[1] - b[1]; + out[2] = a[2] - b[2]; + out[3] = a[3] - b[3]; + out[4] = a[4] - b[4]; + out[5] = a[5] - b[5]; + out[6] = a[6] - b[6]; + out[7] = a[7] - b[7]; + out[8] = a[8] - b[8]; + return out; } /** * Multiply each element of the matrix by a scalar. @@ -1772,18 +1597,17 @@ THE SOFTWARE. * @param {Number} b amount to scale the matrix's elements by * @returns {mat3} out */ - function multiplyScalar$1(out, a, b) { - out[0] = a[0] * b; - out[1] = a[1] * b; - out[2] = a[2] * b; - out[3] = a[3] * b; - out[4] = a[4] * b; - out[5] = a[5] * b; - out[6] = a[6] * b; - out[7] = a[7] * b; - out[8] = a[8] * b; - return out; + out[0] = a[0] * b; + out[1] = a[1] * b; + out[2] = a[2] * b; + out[3] = a[3] * b; + out[4] = a[4] * b; + out[5] = a[5] * b; + out[6] = a[6] * b; + out[7] = a[7] * b; + out[8] = a[8] * b; + return out; } /** * Adds two mat3's after multiplying each element of the second operand by a scalar value. @@ -1794,18 +1618,17 @@ THE SOFTWARE. * @param {Number} scale the amount to scale b's elements by before adding * @returns {mat3} out */ - function multiplyScalarAndAdd$1(out, a, b, scale) { - out[0] = a[0] + b[0] * scale; - out[1] = a[1] + b[1] * scale; - out[2] = a[2] + b[2] * scale; - out[3] = a[3] + b[3] * scale; - out[4] = a[4] + b[4] * scale; - out[5] = a[5] + b[5] * scale; - out[6] = a[6] + b[6] * scale; - out[7] = a[7] + b[7] * scale; - out[8] = a[8] + b[8] * scale; - return out; + out[0] = a[0] + b[0] * scale; + out[1] = a[1] + b[1] * scale; + out[2] = a[2] + b[2] * scale; + out[3] = a[3] + b[3] * scale; + out[4] = a[4] + b[4] * scale; + out[5] = a[5] + b[5] * scale; + out[6] = a[6] + b[6] * scale; + out[7] = a[7] + b[7] * scale; + out[8] = a[8] + b[8] * scale; + return out; } /** * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===) @@ -1814,9 +1637,16 @@ THE SOFTWARE. * @param {ReadonlyMat3} b The second matrix. * @returns {Boolean} True if the matrices are equal, false otherwise. */ - function exactEquals$6(a, b) { - return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5] && a[6] === b[6] && a[7] === b[7] && a[8] === b[8]; + return (a[0] === b[0] && + a[1] === b[1] && + a[2] === b[2] && + a[3] === b[3] && + a[4] === b[4] && + a[5] === b[5] && + a[6] === b[6] && + a[7] === b[7] && + a[8] === b[8]); } /** * Returns whether or not the matrices have approximately the same elements in the same position. @@ -1825,39 +1655,37 @@ THE SOFTWARE. * @param {ReadonlyMat3} b The second matrix. * @returns {Boolean} True if the matrices are equal, false otherwise. */ - function equals$6(a, b) { - var a0 = a[0], - a1 = a[1], - a2 = a[2], - a3 = a[3], - a4 = a[4], - a5 = a[5], - a6 = a[6], - a7 = a[7], - a8 = a[8]; - var b0 = b[0], - b1 = b[1], - b2 = b[2], - b3 = b[3], - b4 = b[4], - b5 = b[5], - b6 = b[6], - b7 = b[7], - b8 = b[8]; - return Math.abs(a0 - b0) <= EPSILON * Maths.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= EPSILON * Maths.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= EPSILON * Maths.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= EPSILON * Maths.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= EPSILON * Maths.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= EPSILON * Maths.max(1.0, Math.abs(a5), Math.abs(b5)) && Math.abs(a6 - b6) <= EPSILON * Maths.max(1.0, Math.abs(a6), Math.abs(b6)) && Math.abs(a7 - b7) <= EPSILON * Maths.max(1.0, Math.abs(a7), Math.abs(b7)) && Math.abs(a8 - b8) <= EPSILON * Maths.max(1.0, Math.abs(a8), Math.abs(b8)); + var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5], a6 = a[6], a7 = a[7], a8 = a[8]; + var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3], b4 = b[4], b5 = b[5], b6 = b[6], b7 = b[7], b8 = b[8]; + return (Math.abs(a0 - b0) <= + EPSILON * Maths.max(1.0, Math.abs(a0), Math.abs(b0)) && + Math.abs(a1 - b1) <= + EPSILON * Maths.max(1.0, Math.abs(a1), Math.abs(b1)) && + Math.abs(a2 - b2) <= + EPSILON * Maths.max(1.0, Math.abs(a2), Math.abs(b2)) && + Math.abs(a3 - b3) <= + EPSILON * Maths.max(1.0, Math.abs(a3), Math.abs(b3)) && + Math.abs(a4 - b4) <= + EPSILON * Maths.max(1.0, Math.abs(a4), Math.abs(b4)) && + Math.abs(a5 - b5) <= + EPSILON * Maths.max(1.0, Math.abs(a5), Math.abs(b5)) && + Math.abs(a6 - b6) <= + EPSILON * Maths.max(1.0, Math.abs(a6), Math.abs(b6)) && + Math.abs(a7 - b7) <= + EPSILON * Maths.max(1.0, Math.abs(a7), Math.abs(b7)) && + Math.abs(a8 - b8) <= + EPSILON * Maths.max(1.0, Math.abs(a8), Math.abs(b8))); } /** * Alias for {@link mat3.multiply} * @function */ - var mul$6 = multiply$6; /** * Alias for {@link mat3.subtract} * @function */ - var sub$4 = subtract$4; var mat3 = /*#__PURE__*/Object.freeze({ @@ -1899,46 +1727,41 @@ THE SOFTWARE. /** * Object containing the following values: upDegrees, downDegrees, leftDegrees, rightDegrees */ - - var Fov = - /** @class */ - function () { - function Fov() {} - - return Fov; - }(); + var Fov = /** @class */ (function () { + function Fov() { + } + return Fov; + }()); /** * 4x4 Matrix
Format: column-major, when typed out it looks like row-major
The matrices are being post multiplied. * @module mat4 */ - /** * Creates a new identity mat4 * * @returns {mat4} a new 4x4 matrix */ - function create$5() { - var out = new Float64Array(16); //if (glMatrix.ARRAY_TYPE != Float32Array) { - - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = 0; - out[6] = 0; - out[7] = 0; - out[8] = 0; - out[9] = 0; - out[11] = 0; - out[12] = 0; - out[13] = 0; - out[14] = 0; //} - - out[0] = 1; - out[5] = 1; - out[10] = 1; - out[15] = 1; - return out; + var out = new Float64Array(16); + //if (glMatrix.ARRAY_TYPE != Float32Array) { + out[1] = 0; + out[2] = 0; + out[3] = 0; + out[4] = 0; + out[6] = 0; + out[7] = 0; + out[8] = 0; + out[9] = 0; + out[11] = 0; + out[12] = 0; + out[13] = 0; + out[14] = 0; + //} + out[0] = 1; + out[5] = 1; + out[10] = 1; + out[15] = 1; + return out; } /** * Creates a new mat4 initialized with values from an existing matrix @@ -1946,26 +1769,25 @@ THE SOFTWARE. * @param {ReadonlyMat4} a matrix to clone * @returns {mat4} a new 4x4 matrix */ - function clone$5(a) { - var out = new Float64Array(16); - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - out[4] = a[4]; - out[5] = a[5]; - out[6] = a[6]; - out[7] = a[7]; - out[8] = a[8]; - out[9] = a[9]; - out[10] = a[10]; - out[11] = a[11]; - out[12] = a[12]; - out[13] = a[13]; - out[14] = a[14]; - out[15] = a[15]; - return out; + var out = new Float64Array(16); + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[3]; + out[4] = a[4]; + out[5] = a[5]; + out[6] = a[6]; + out[7] = a[7]; + out[8] = a[8]; + out[9] = a[9]; + out[10] = a[10]; + out[11] = a[11]; + out[12] = a[12]; + out[13] = a[13]; + out[14] = a[14]; + out[15] = a[15]; + return out; } /** * Copy the values from one mat4 to another @@ -1974,25 +1796,24 @@ THE SOFTWARE. * @param {ReadonlyMat4} a the source matrix * @returns {mat4} out */ - function copy$5(out, a) { - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - out[4] = a[4]; - out[5] = a[5]; - out[6] = a[6]; - out[7] = a[7]; - out[8] = a[8]; - out[9] = a[9]; - out[10] = a[10]; - out[11] = a[11]; - out[12] = a[12]; - out[13] = a[13]; - out[14] = a[14]; - out[15] = a[15]; - return out; + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[3]; + out[4] = a[4]; + out[5] = a[5]; + out[6] = a[6]; + out[7] = a[7]; + out[8] = a[8]; + out[9] = a[9]; + out[10] = a[10]; + out[11] = a[11]; + out[12] = a[12]; + out[13] = a[13]; + out[14] = a[14]; + out[15] = a[15]; + return out; } /** * Create a new mat4 with the given values @@ -2015,26 +1836,25 @@ THE SOFTWARE. * @param {Number} m33 Component in column 3, row 3 position (index 15) * @returns {mat4} A new mat4 */ - function fromValues$5(m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) { - var out = new Float64Array(16); - out[0] = m00; - out[1] = m01; - out[2] = m02; - out[3] = m03; - out[4] = m10; - out[5] = m11; - out[6] = m12; - out[7] = m13; - out[8] = m20; - out[9] = m21; - out[10] = m22; - out[11] = m23; - out[12] = m30; - out[13] = m31; - out[14] = m32; - out[15] = m33; - return out; + var out = new Float64Array(16); + out[0] = m00; + out[1] = m01; + out[2] = m02; + out[3] = m03; + out[4] = m10; + out[5] = m11; + out[6] = m12; + out[7] = m13; + out[8] = m20; + out[9] = m21; + out[10] = m22; + out[11] = m23; + out[12] = m30; + out[13] = m31; + out[14] = m32; + out[15] = m33; + return out; } /** * Set the components of a mat4 to the given values @@ -2058,25 +1878,24 @@ THE SOFTWARE. * @param {Number} m33 Component in column 3, row 3 position (index 15) * @returns {mat4} out */ - function set$5(out, m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) { - out[0] = m00; - out[1] = m01; - out[2] = m02; - out[3] = m03; - out[4] = m10; - out[5] = m11; - out[6] = m12; - out[7] = m13; - out[8] = m20; - out[9] = m21; - out[10] = m22; - out[11] = m23; - out[12] = m30; - out[13] = m31; - out[14] = m32; - out[15] = m33; - return out; + out[0] = m00; + out[1] = m01; + out[2] = m02; + out[3] = m03; + out[4] = m10; + out[5] = m11; + out[6] = m12; + out[7] = m13; + out[8] = m20; + out[9] = m21; + out[10] = m22; + out[11] = m23; + out[12] = m30; + out[13] = m31; + out[14] = m32; + out[15] = m33; + return out; } /** * Set a mat4 to the identity matrix @@ -2084,25 +1903,24 @@ THE SOFTWARE. * @param {mat4} out the receiving matrix * @returns {mat4} out */ - function identity$2(out) { - out[0] = 1; - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = 0; - out[5] = 1; - out[6] = 0; - out[7] = 0; - out[8] = 0; - out[9] = 0; - out[10] = 1; - out[11] = 0; - out[12] = 0; - out[13] = 0; - out[14] = 0; - out[15] = 1; - return out; + out[0] = 1; + out[1] = 0; + out[2] = 0; + out[3] = 0; + out[4] = 0; + out[5] = 1; + out[6] = 0; + out[7] = 0; + out[8] = 0; + out[9] = 0; + out[10] = 1; + out[11] = 0; + out[12] = 0; + out[13] = 0; + out[14] = 0; + out[15] = 1; + return out; } /** * Transpose the values of a mat4 @@ -2111,48 +1929,44 @@ THE SOFTWARE. * @param {ReadonlyMat4} a the source matrix * @returns {mat4} out */ - function transpose(out, a) { - // If we are transposing ourselves we can skip a few steps but have to cache some values - if (out === a) { - var a01 = a[1], - a02 = a[2], - a03 = a[3]; - var a12 = a[6], - a13 = a[7]; - var a23 = a[11]; - out[1] = a[4]; - out[2] = a[8]; - out[3] = a[12]; - out[4] = a01; - out[6] = a[9]; - out[7] = a[13]; - out[8] = a02; - out[9] = a12; - out[11] = a[14]; - out[12] = a03; - out[13] = a13; - out[14] = a23; - } else { - out[0] = a[0]; - out[1] = a[4]; - out[2] = a[8]; - out[3] = a[12]; - out[4] = a[1]; - out[5] = a[5]; - out[6] = a[9]; - out[7] = a[13]; - out[8] = a[2]; - out[9] = a[6]; - out[10] = a[10]; - out[11] = a[14]; - out[12] = a[3]; - out[13] = a[7]; - out[14] = a[11]; - out[15] = a[15]; - } - - return out; + // If we are transposing ourselves we can skip a few steps but have to cache some values + if (out === a) { + var a01 = a[1], a02 = a[2], a03 = a[3]; + var a12 = a[6], a13 = a[7]; + var a23 = a[11]; + out[1] = a[4]; + out[2] = a[8]; + out[3] = a[12]; + out[4] = a01; + out[6] = a[9]; + out[7] = a[13]; + out[8] = a02; + out[9] = a12; + out[11] = a[14]; + out[12] = a03; + out[13] = a13; + out[14] = a23; + } + else { + out[0] = a[0]; + out[1] = a[4]; + out[2] = a[8]; + out[3] = a[12]; + out[4] = a[1]; + out[5] = a[5]; + out[6] = a[9]; + out[7] = a[13]; + out[8] = a[2]; + out[9] = a[6]; + out[10] = a[10]; + out[11] = a[14]; + out[12] = a[3]; + out[13] = a[7]; + out[14] = a[11]; + out[15] = a[15]; + } + return out; } /** * Inverts a mat4 @@ -2161,61 +1975,46 @@ THE SOFTWARE. * @param {ReadonlyMat4} a the source matrix * @returns {mat4} out */ - function invert$2(out, a) { - var a00 = a[0], - a01 = a[1], - a02 = a[2], - a03 = a[3]; - var a10 = a[4], - a11 = a[5], - a12 = a[6], - a13 = a[7]; - var a20 = a[8], - a21 = a[9], - a22 = a[10], - a23 = a[11]; - var a30 = a[12], - a31 = a[13], - a32 = a[14], - a33 = a[15]; - var b00 = a00 * a11 - a01 * a10; - var b01 = a00 * a12 - a02 * a10; - var b02 = a00 * a13 - a03 * a10; - var b03 = a01 * a12 - a02 * a11; - var b04 = a01 * a13 - a03 * a11; - var b05 = a02 * a13 - a03 * a12; - var b06 = a20 * a31 - a21 * a30; - var b07 = a20 * a32 - a22 * a30; - var b08 = a20 * a33 - a23 * a30; - var b09 = a21 * a32 - a22 * a31; - var b10 = a21 * a33 - a23 * a31; - var b11 = a22 * a33 - a23 * a32; // Calculate the determinant - - var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06; - - if (!det) { - return null; - } - - det = 1.0 / det; - out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det; - out[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det; - out[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det; - out[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det; - out[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det; - out[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det; - out[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det; - out[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det; - out[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det; - out[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det; - out[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det; - out[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det; - out[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det; - out[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det; - out[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det; - out[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det; - return out; + var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3]; + var a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7]; + var a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11]; + var a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15]; + var b00 = a00 * a11 - a01 * a10; + var b01 = a00 * a12 - a02 * a10; + var b02 = a00 * a13 - a03 * a10; + var b03 = a01 * a12 - a02 * a11; + var b04 = a01 * a13 - a03 * a11; + var b05 = a02 * a13 - a03 * a12; + var b06 = a20 * a31 - a21 * a30; + var b07 = a20 * a32 - a22 * a30; + var b08 = a20 * a33 - a23 * a30; + var b09 = a21 * a32 - a22 * a31; + var b10 = a21 * a33 - a23 * a31; + var b11 = a22 * a33 - a23 * a32; + // Calculate the determinant + var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06; + if (!det) { + return null; + } + det = 1.0 / det; + out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det; + out[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det; + out[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det; + out[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det; + out[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det; + out[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det; + out[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det; + out[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det; + out[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det; + out[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det; + out[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det; + out[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det; + out[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det; + out[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det; + out[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det; + out[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det; + return out; } /** * Calculates the adjugate of a mat4 @@ -2224,53 +2023,40 @@ THE SOFTWARE. * @param {ReadonlyMat4} a the source matrix * @returns {mat4} out */ - function adjoint(out, a) { - var a00 = a[0], - a01 = a[1], - a02 = a[2], - a03 = a[3]; - var a10 = a[4], - a11 = a[5], - a12 = a[6], - a13 = a[7]; - var a20 = a[8], - a21 = a[9], - a22 = a[10], - a23 = a[11]; - var a30 = a[12], - a31 = a[13], - a32 = a[14], - a33 = a[15]; - var b00 = a00 * a11 - a01 * a10; - var b01 = a00 * a12 - a02 * a10; - var b02 = a00 * a13 - a03 * a10; - var b03 = a01 * a12 - a02 * a11; - var b04 = a01 * a13 - a03 * a11; - var b05 = a02 * a13 - a03 * a12; - var b06 = a20 * a31 - a21 * a30; - var b07 = a20 * a32 - a22 * a30; - var b08 = a20 * a33 - a23 * a30; - var b09 = a21 * a32 - a22 * a31; - var b10 = a21 * a33 - a23 * a31; - var b11 = a22 * a33 - a23 * a32; - out[0] = a11 * b11 - a12 * b10 + a13 * b09; - out[1] = a02 * b10 - a01 * b11 - a03 * b09; - out[2] = a31 * b05 - a32 * b04 + a33 * b03; - out[3] = a22 * b04 - a21 * b05 - a23 * b03; - out[4] = a12 * b08 - a10 * b11 - a13 * b07; - out[5] = a00 * b11 - a02 * b08 + a03 * b07; - out[6] = a32 * b02 - a30 * b05 - a33 * b01; - out[7] = a20 * b05 - a22 * b02 + a23 * b01; - out[8] = a10 * b10 - a11 * b08 + a13 * b06; - out[9] = a01 * b08 - a00 * b10 - a03 * b06; - out[10] = a30 * b04 - a31 * b02 + a33 * b00; - out[11] = a21 * b02 - a20 * b04 - a23 * b00; - out[12] = a11 * b07 - a10 * b09 - a12 * b06; - out[13] = a00 * b09 - a01 * b07 + a02 * b06; - out[14] = a31 * b01 - a30 * b03 - a32 * b00; - out[15] = a20 * b03 - a21 * b01 + a22 * b00; - return out; + var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3]; + var a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7]; + var a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11]; + var a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15]; + var b00 = a00 * a11 - a01 * a10; + var b01 = a00 * a12 - a02 * a10; + var b02 = a00 * a13 - a03 * a10; + var b03 = a01 * a12 - a02 * a11; + var b04 = a01 * a13 - a03 * a11; + var b05 = a02 * a13 - a03 * a12; + var b06 = a20 * a31 - a21 * a30; + var b07 = a20 * a32 - a22 * a30; + var b08 = a20 * a33 - a23 * a30; + var b09 = a21 * a32 - a22 * a31; + var b10 = a21 * a33 - a23 * a31; + var b11 = a22 * a33 - a23 * a32; + out[0] = a11 * b11 - a12 * b10 + a13 * b09; + out[1] = a02 * b10 - a01 * b11 - a03 * b09; + out[2] = a31 * b05 - a32 * b04 + a33 * b03; + out[3] = a22 * b04 - a21 * b05 - a23 * b03; + out[4] = a12 * b08 - a10 * b11 - a13 * b07; + out[5] = a00 * b11 - a02 * b08 + a03 * b07; + out[6] = a32 * b02 - a30 * b05 - a33 * b01; + out[7] = a20 * b05 - a22 * b02 + a23 * b01; + out[8] = a10 * b10 - a11 * b08 + a13 * b06; + out[9] = a01 * b08 - a00 * b10 - a03 * b06; + out[10] = a30 * b04 - a31 * b02 + a33 * b00; + out[11] = a21 * b02 - a20 * b04 - a23 * b00; + out[12] = a11 * b07 - a10 * b09 - a12 * b06; + out[13] = a00 * b09 - a01 * b07 + a02 * b06; + out[14] = a31 * b01 - a30 * b03 - a32 * b00; + out[15] = a20 * b03 - a21 * b01 + a22 * b00; + return out; } /** * Calculates the determinant of a mat4 @@ -2278,36 +2064,23 @@ THE SOFTWARE. * @param {ReadonlyMat4} a the source matrix * @returns {Number} determinant of a */ - function determinant(a) { - var a00 = a[0], - a01 = a[1], - a02 = a[2], - a03 = a[3]; - var a10 = a[4], - a11 = a[5], - a12 = a[6], - a13 = a[7]; - var a20 = a[8], - a21 = a[9], - a22 = a[10], - a23 = a[11]; - var a30 = a[12], - a31 = a[13], - a32 = a[14], - a33 = a[15]; - var b0 = a00 * a11 - a01 * a10; - var b1 = a00 * a12 - a02 * a10; - var b2 = a01 * a12 - a02 * a11; - var b3 = a20 * a31 - a21 * a30; - var b4 = a20 * a32 - a22 * a30; - var b5 = a21 * a32 - a22 * a31; - var b6 = a00 * b5 - a01 * b4 + a02 * b3; - var b7 = a10 * b5 - a11 * b4 + a12 * b3; - var b8 = a20 * b2 - a21 * b1 + a22 * b0; - var b9 = a30 * b2 - a31 * b1 + a32 * b0; // Calculate the determinant - - return a13 * b6 - a03 * b7 + a33 * b8 - a23 * b9; + var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3]; + var a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7]; + var a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11]; + var a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15]; + var b0 = a00 * a11 - a01 * a10; + var b1 = a00 * a12 - a02 * a10; + var b2 = a01 * a12 - a02 * a11; + var b3 = a20 * a31 - a21 * a30; + var b4 = a20 * a32 - a22 * a30; + var b5 = a21 * a32 - a22 * a31; + var b6 = a00 * b5 - a01 * b4 + a02 * b3; + var b7 = a10 * b5 - a11 * b4 + a12 * b3; + var b8 = a20 * b2 - a21 * b1 + a22 * b0; + var b9 = a30 * b2 - a31 * b1 + a32 * b0; + // Calculate the determinant + return a13 * b6 - a03 * b7 + a33 * b8 - a23 * b9; } /** * Multiplies two mat4s @@ -2317,58 +2090,42 @@ THE SOFTWARE. * @param {ReadonlyMat4} b the second operand * @returns {mat4} out */ - function multiply$5(out, a, b) { - var a00 = a[0], - a01 = a[1], - a02 = a[2], - a03 = a[3]; - var a10 = a[4], - a11 = a[5], - a12 = a[6], - a13 = a[7]; - var a20 = a[8], - a21 = a[9], - a22 = a[10], - a23 = a[11]; - var a30 = a[12], - a31 = a[13], - a32 = a[14], - a33 = a[15]; // Cache only the current line of the second matrix - - var b0 = b[0], - b1 = b[1], - b2 = b[2], - b3 = b[3]; - out[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; - out[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; - out[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; - out[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; - b0 = b[4]; - b1 = b[5]; - b2 = b[6]; - b3 = b[7]; - out[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; - out[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; - out[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; - out[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; - b0 = b[8]; - b1 = b[9]; - b2 = b[10]; - b3 = b[11]; - out[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; - out[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; - out[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; - out[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; - b0 = b[12]; - b1 = b[13]; - b2 = b[14]; - b3 = b[15]; - out[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; - out[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; - out[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; - out[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; - return out; + var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3]; + var a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7]; + var a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11]; + var a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15]; + // Cache only the current line of the second matrix + var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3]; + out[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; + out[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; + out[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; + out[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; + b0 = b[4]; + b1 = b[5]; + b2 = b[6]; + b3 = b[7]; + out[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; + out[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; + out[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; + out[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; + b0 = b[8]; + b1 = b[9]; + b2 = b[10]; + b3 = b[11]; + out[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; + out[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; + out[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; + out[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; + b0 = b[12]; + b1 = b[13]; + b2 = b[14]; + b3 = b[15]; + out[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; + out[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; + out[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; + out[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; + return out; } /** * Translate a mat4 by the given vector @@ -2378,52 +2135,48 @@ THE SOFTWARE. * @param {ReadonlyVec3} v vector to translate by * @returns {mat4} out */ - function translate$1(out, a, v) { - var x = v[0], - y = v[1], - z = v[2]; - var a00, a01, a02, a03; - var a10, a11, a12, a13; - var a20, a21, a22, a23; - - if (a === out) { - out[12] = a[0] * x + a[4] * y + a[8] * z + a[12]; - out[13] = a[1] * x + a[5] * y + a[9] * z + a[13]; - out[14] = a[2] * x + a[6] * y + a[10] * z + a[14]; - out[15] = a[3] * x + a[7] * y + a[11] * z + a[15]; - } else { - a00 = a[0]; - a01 = a[1]; - a02 = a[2]; - a03 = a[3]; - a10 = a[4]; - a11 = a[5]; - a12 = a[6]; - a13 = a[7]; - a20 = a[8]; - a21 = a[9]; - a22 = a[10]; - a23 = a[11]; - out[0] = a00; - out[1] = a01; - out[2] = a02; - out[3] = a03; - out[4] = a10; - out[5] = a11; - out[6] = a12; - out[7] = a13; - out[8] = a20; - out[9] = a21; - out[10] = a22; - out[11] = a23; - out[12] = a00 * x + a10 * y + a20 * z + a[12]; - out[13] = a01 * x + a11 * y + a21 * z + a[13]; - out[14] = a02 * x + a12 * y + a22 * z + a[14]; - out[15] = a03 * x + a13 * y + a23 * z + a[15]; - } - - return out; + var x = v[0], y = v[1], z = v[2]; + var a00, a01, a02, a03; + var a10, a11, a12, a13; + var a20, a21, a22, a23; + if (a === out) { + out[12] = a[0] * x + a[4] * y + a[8] * z + a[12]; + out[13] = a[1] * x + a[5] * y + a[9] * z + a[13]; + out[14] = a[2] * x + a[6] * y + a[10] * z + a[14]; + out[15] = a[3] * x + a[7] * y + a[11] * z + a[15]; + } + else { + a00 = a[0]; + a01 = a[1]; + a02 = a[2]; + a03 = a[3]; + a10 = a[4]; + a11 = a[5]; + a12 = a[6]; + a13 = a[7]; + a20 = a[8]; + a21 = a[9]; + a22 = a[10]; + a23 = a[11]; + out[0] = a00; + out[1] = a01; + out[2] = a02; + out[3] = a03; + out[4] = a10; + out[5] = a11; + out[6] = a12; + out[7] = a13; + out[8] = a20; + out[9] = a21; + out[10] = a22; + out[11] = a23; + out[12] = a00 * x + a10 * y + a20 * z + a[12]; + out[13] = a01 * x + a11 * y + a21 * z + a[13]; + out[14] = a02 * x + a12 * y + a22 * z + a[14]; + out[15] = a03 * x + a13 * y + a23 * z + a[15]; + } + return out; } /** * Scales the mat4 by the dimensions in the given vec3 not using vectorization @@ -2433,28 +2186,25 @@ THE SOFTWARE. * @param {ReadonlyVec3} v the vec3 to scale the matrix by * @returns {mat4} out **/ - function scale$5(out, a, v) { - var x = v[0], - y = v[1], - z = v[2]; - out[0] = a[0] * x; - out[1] = a[1] * x; - out[2] = a[2] * x; - out[3] = a[3] * x; - out[4] = a[4] * y; - out[5] = a[5] * y; - out[6] = a[6] * y; - out[7] = a[7] * y; - out[8] = a[8] * z; - out[9] = a[9] * z; - out[10] = a[10] * z; - out[11] = a[11] * z; - out[12] = a[12]; - out[13] = a[13]; - out[14] = a[14]; - out[15] = a[15]; - return out; + var x = v[0], y = v[1], z = v[2]; + out[0] = a[0] * x; + out[1] = a[1] * x; + out[2] = a[2] * x; + out[3] = a[3] * x; + out[4] = a[4] * y; + out[5] = a[5] * y; + out[6] = a[6] * y; + out[7] = a[7] * y; + out[8] = a[8] * z; + out[9] = a[9] * z; + out[10] = a[10] * z; + out[11] = a[11] * z; + out[12] = a[12]; + out[13] = a[13]; + out[14] = a[14]; + out[15] = a[15]; + return out; } /** * Rotates a mat4 by the given angle around the given axis @@ -2465,76 +2215,69 @@ THE SOFTWARE. * @param {ReadonlyVec3} axis the axis to rotate around * @returns {mat4} out */ - function rotate$1(out, a, rad, axis) { - var x = axis[0], - y = axis[1], - z = axis[2]; - var len = Maths.hypot(x, y, z); - var s, c, t; - var a00, a01, a02, a03; - var a10, a11, a12, a13; - var a20, a21, a22, a23; - var b00, b01, b02; - var b10, b11, b12; - var b20, b21, b22; - - if (len < EPSILON) { - return null; - } - - len = 1 / len; - x *= len; - y *= len; - z *= len; - s = Math.sin(rad); - c = Math.cos(rad); - t = 1 - c; - a00 = a[0]; - a01 = a[1]; - a02 = a[2]; - a03 = a[3]; - a10 = a[4]; - a11 = a[5]; - a12 = a[6]; - a13 = a[7]; - a20 = a[8]; - a21 = a[9]; - a22 = a[10]; - a23 = a[11]; // Construct the elements of the rotation matrix - - b00 = x * x * t + c; - b01 = y * x * t + z * s; - b02 = z * x * t - y * s; - b10 = x * y * t - z * s; - b11 = y * y * t + c; - b12 = z * y * t + x * s; - b20 = x * z * t + y * s; - b21 = y * z * t - x * s; - b22 = z * z * t + c; // Perform rotation-specific matrix multiplication - - out[0] = a00 * b00 + a10 * b01 + a20 * b02; - out[1] = a01 * b00 + a11 * b01 + a21 * b02; - out[2] = a02 * b00 + a12 * b01 + a22 * b02; - out[3] = a03 * b00 + a13 * b01 + a23 * b02; - out[4] = a00 * b10 + a10 * b11 + a20 * b12; - out[5] = a01 * b10 + a11 * b11 + a21 * b12; - out[6] = a02 * b10 + a12 * b11 + a22 * b12; - out[7] = a03 * b10 + a13 * b11 + a23 * b12; - out[8] = a00 * b20 + a10 * b21 + a20 * b22; - out[9] = a01 * b20 + a11 * b21 + a21 * b22; - out[10] = a02 * b20 + a12 * b21 + a22 * b22; - out[11] = a03 * b20 + a13 * b21 + a23 * b22; - - if (a !== out) { - // If the source and destination differ, copy the unchanged last row - out[12] = a[12]; - out[13] = a[13]; - out[14] = a[14]; - out[15] = a[15]; - } - - return out; + var x = axis[0], y = axis[1], z = axis[2]; + var len = Maths.hypot(x, y, z); + var s, c, t; + var a00, a01, a02, a03; + var a10, a11, a12, a13; + var a20, a21, a22, a23; + var b00, b01, b02; + var b10, b11, b12; + var b20, b21, b22; + if (len < EPSILON) { + return null; + } + len = 1 / len; + x *= len; + y *= len; + z *= len; + s = Math.sin(rad); + c = Math.cos(rad); + t = 1 - c; + a00 = a[0]; + a01 = a[1]; + a02 = a[2]; + a03 = a[3]; + a10 = a[4]; + a11 = a[5]; + a12 = a[6]; + a13 = a[7]; + a20 = a[8]; + a21 = a[9]; + a22 = a[10]; + a23 = a[11]; + // Construct the elements of the rotation matrix + b00 = x * x * t + c; + b01 = y * x * t + z * s; + b02 = z * x * t - y * s; + b10 = x * y * t - z * s; + b11 = y * y * t + c; + b12 = z * y * t + x * s; + b20 = x * z * t + y * s; + b21 = y * z * t - x * s; + b22 = z * z * t + c; + // Perform rotation-specific matrix multiplication + out[0] = a00 * b00 + a10 * b01 + a20 * b02; + out[1] = a01 * b00 + a11 * b01 + a21 * b02; + out[2] = a02 * b00 + a12 * b01 + a22 * b02; + out[3] = a03 * b00 + a13 * b01 + a23 * b02; + out[4] = a00 * b10 + a10 * b11 + a20 * b12; + out[5] = a01 * b10 + a11 * b11 + a21 * b12; + out[6] = a02 * b10 + a12 * b11 + a22 * b12; + out[7] = a03 * b10 + a13 * b11 + a23 * b12; + out[8] = a00 * b20 + a10 * b21 + a20 * b22; + out[9] = a01 * b20 + a11 * b21 + a21 * b22; + out[10] = a02 * b20 + a12 * b21 + a22 * b22; + out[11] = a03 * b20 + a13 * b21 + a23 * b22; + if (a !== out) { + // If the source and destination differ, copy the unchanged last row + out[12] = a[12]; + out[13] = a[13]; + out[14] = a[14]; + out[15] = a[15]; + } + return out; } /** * Rotates a matrix by the given angle around the X axis @@ -2544,41 +2287,38 @@ THE SOFTWARE. * @param {Number} rad the angle to rotate the matrix by * @returns {mat4} out */ - function rotateX$3(out, a, rad) { - var s = Math.sin(rad); - var c = Math.cos(rad); - var a10 = a[4]; - var a11 = a[5]; - var a12 = a[6]; - var a13 = a[7]; - var a20 = a[8]; - var a21 = a[9]; - var a22 = a[10]; - var a23 = a[11]; - - if (a !== out) { - // If the source and destination differ, copy the unchanged rows - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - out[12] = a[12]; - out[13] = a[13]; - out[14] = a[14]; - out[15] = a[15]; - } // Perform axis-specific matrix multiplication - - - out[4] = a10 * c + a20 * s; - out[5] = a11 * c + a21 * s; - out[6] = a12 * c + a22 * s; - out[7] = a13 * c + a23 * s; - out[8] = a20 * c - a10 * s; - out[9] = a21 * c - a11 * s; - out[10] = a22 * c - a12 * s; - out[11] = a23 * c - a13 * s; - return out; + var s = Math.sin(rad); + var c = Math.cos(rad); + var a10 = a[4]; + var a11 = a[5]; + var a12 = a[6]; + var a13 = a[7]; + var a20 = a[8]; + var a21 = a[9]; + var a22 = a[10]; + var a23 = a[11]; + if (a !== out) { + // If the source and destination differ, copy the unchanged rows + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[3]; + out[12] = a[12]; + out[13] = a[13]; + out[14] = a[14]; + out[15] = a[15]; + } + // Perform axis-specific matrix multiplication + out[4] = a10 * c + a20 * s; + out[5] = a11 * c + a21 * s; + out[6] = a12 * c + a22 * s; + out[7] = a13 * c + a23 * s; + out[8] = a20 * c - a10 * s; + out[9] = a21 * c - a11 * s; + out[10] = a22 * c - a12 * s; + out[11] = a23 * c - a13 * s; + return out; } /** * Rotates a matrix by the given angle around the Y axis @@ -2588,41 +2328,38 @@ THE SOFTWARE. * @param {Number} rad the angle to rotate the matrix by * @returns {mat4} out */ - function rotateY$3(out, a, rad) { - var s = Math.sin(rad); - var c = Math.cos(rad); - var a00 = a[0]; - var a01 = a[1]; - var a02 = a[2]; - var a03 = a[3]; - var a20 = a[8]; - var a21 = a[9]; - var a22 = a[10]; - var a23 = a[11]; - - if (a !== out) { - // If the source and destination differ, copy the unchanged rows - out[4] = a[4]; - out[5] = a[5]; - out[6] = a[6]; - out[7] = a[7]; - out[12] = a[12]; - out[13] = a[13]; - out[14] = a[14]; - out[15] = a[15]; - } // Perform axis-specific matrix multiplication - - - out[0] = a00 * c - a20 * s; - out[1] = a01 * c - a21 * s; - out[2] = a02 * c - a22 * s; - out[3] = a03 * c - a23 * s; - out[8] = a00 * s + a20 * c; - out[9] = a01 * s + a21 * c; - out[10] = a02 * s + a22 * c; - out[11] = a03 * s + a23 * c; - return out; + var s = Math.sin(rad); + var c = Math.cos(rad); + var a00 = a[0]; + var a01 = a[1]; + var a02 = a[2]; + var a03 = a[3]; + var a20 = a[8]; + var a21 = a[9]; + var a22 = a[10]; + var a23 = a[11]; + if (a !== out) { + // If the source and destination differ, copy the unchanged rows + out[4] = a[4]; + out[5] = a[5]; + out[6] = a[6]; + out[7] = a[7]; + out[12] = a[12]; + out[13] = a[13]; + out[14] = a[14]; + out[15] = a[15]; + } + // Perform axis-specific matrix multiplication + out[0] = a00 * c - a20 * s; + out[1] = a01 * c - a21 * s; + out[2] = a02 * c - a22 * s; + out[3] = a03 * c - a23 * s; + out[8] = a00 * s + a20 * c; + out[9] = a01 * s + a21 * c; + out[10] = a02 * s + a22 * c; + out[11] = a03 * s + a23 * c; + return out; } /** * Rotates a matrix by the given angle around the Z axis @@ -2632,41 +2369,38 @@ THE SOFTWARE. * @param {Number} rad the angle to rotate the matrix by * @returns {mat4} out */ - function rotateZ$3(out, a, rad) { - var s = Math.sin(rad); - var c = Math.cos(rad); - var a00 = a[0]; - var a01 = a[1]; - var a02 = a[2]; - var a03 = a[3]; - var a10 = a[4]; - var a11 = a[5]; - var a12 = a[6]; - var a13 = a[7]; - - if (a !== out) { - // If the source and destination differ, copy the unchanged last row - out[8] = a[8]; - out[9] = a[9]; - out[10] = a[10]; - out[11] = a[11]; - out[12] = a[12]; - out[13] = a[13]; - out[14] = a[14]; - out[15] = a[15]; - } // Perform axis-specific matrix multiplication - - - out[0] = a00 * c + a10 * s; - out[1] = a01 * c + a11 * s; - out[2] = a02 * c + a12 * s; - out[3] = a03 * c + a13 * s; - out[4] = a10 * c - a00 * s; - out[5] = a11 * c - a01 * s; - out[6] = a12 * c - a02 * s; - out[7] = a13 * c - a03 * s; - return out; + var s = Math.sin(rad); + var c = Math.cos(rad); + var a00 = a[0]; + var a01 = a[1]; + var a02 = a[2]; + var a03 = a[3]; + var a10 = a[4]; + var a11 = a[5]; + var a12 = a[6]; + var a13 = a[7]; + if (a !== out) { + // If the source and destination differ, copy the unchanged last row + out[8] = a[8]; + out[9] = a[9]; + out[10] = a[10]; + out[11] = a[11]; + out[12] = a[12]; + out[13] = a[13]; + out[14] = a[14]; + out[15] = a[15]; + } + // Perform axis-specific matrix multiplication + out[0] = a00 * c + a10 * s; + out[1] = a01 * c + a11 * s; + out[2] = a02 * c + a12 * s; + out[3] = a03 * c + a13 * s; + out[4] = a10 * c - a00 * s; + out[5] = a11 * c - a01 * s; + out[6] = a12 * c - a02 * s; + out[7] = a13 * c - a03 * s; + return out; } /** * Creates a matrix from a vector translation @@ -2679,25 +2413,24 @@ THE SOFTWARE. * @param {ReadonlyVec3} v Translation vector * @returns {mat4} out */ - function fromTranslation$1(out, v) { - out[0] = 1; - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = 0; - out[5] = 1; - out[6] = 0; - out[7] = 0; - out[8] = 0; - out[9] = 0; - out[10] = 1; - out[11] = 0; - out[12] = v[0]; - out[13] = v[1]; - out[14] = v[2]; - out[15] = 1; - return out; + out[0] = 1; + out[1] = 0; + out[2] = 0; + out[3] = 0; + out[4] = 0; + out[5] = 1; + out[6] = 0; + out[7] = 0; + out[8] = 0; + out[9] = 0; + out[10] = 1; + out[11] = 0; + out[12] = v[0]; + out[13] = v[1]; + out[14] = v[2]; + out[15] = 1; + return out; } /** * Creates a matrix from a vector scaling @@ -2710,25 +2443,24 @@ THE SOFTWARE. * @param {ReadonlyVec3} v Scaling vector * @returns {mat4} out */ - function fromScaling(out, v) { - out[0] = v[0]; - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = 0; - out[5] = v[1]; - out[6] = 0; - out[7] = 0; - out[8] = 0; - out[9] = 0; - out[10] = v[2]; - out[11] = 0; - out[12] = 0; - out[13] = 0; - out[14] = 0; - out[15] = 1; - return out; + out[0] = v[0]; + out[1] = 0; + out[2] = 0; + out[3] = 0; + out[4] = 0; + out[5] = v[1]; + out[6] = 0; + out[7] = 0; + out[8] = 0; + out[9] = 0; + out[10] = v[2]; + out[11] = 0; + out[12] = 0; + out[13] = 0; + out[14] = 0; + out[15] = 1; + return out; } /** * Creates a matrix from a given angle around a given axis @@ -2742,43 +2474,38 @@ THE SOFTWARE. * @param {ReadonlyVec3} axis the axis to rotate around * @returns {mat4} out */ - function fromRotation$1(out, rad, axis) { - var x = axis[0], - y = axis[1], - z = axis[2]; - var len = Maths.hypot(x, y, z); - var s, c, t; - - if (len < EPSILON) { - return null; - } - - len = 1 / len; - x *= len; - y *= len; - z *= len; - s = Math.sin(rad); - c = Math.cos(rad); - t = 1 - c; // Perform rotation-specific matrix multiplication - - out[0] = x * x * t + c; - out[1] = y * x * t + z * s; - out[2] = z * x * t - y * s; - out[3] = 0; - out[4] = x * y * t - z * s; - out[5] = y * y * t + c; - out[6] = z * y * t + x * s; - out[7] = 0; - out[8] = x * z * t + y * s; - out[9] = y * z * t - x * s; - out[10] = z * z * t + c; - out[11] = 0; - out[12] = 0; - out[13] = 0; - out[14] = 0; - out[15] = 1; - return out; + var x = axis[0], y = axis[1], z = axis[2]; + var len = Maths.hypot(x, y, z); + var s, c, t; + if (len < EPSILON) { + return null; + } + len = 1 / len; + x *= len; + y *= len; + z *= len; + s = Math.sin(rad); + c = Math.cos(rad); + t = 1 - c; + // Perform rotation-specific matrix multiplication + out[0] = x * x * t + c; + out[1] = y * x * t + z * s; + out[2] = z * x * t - y * s; + out[3] = 0; + out[4] = x * y * t - z * s; + out[5] = y * y * t + c; + out[6] = z * y * t + x * s; + out[7] = 0; + out[8] = x * z * t + y * s; + out[9] = y * z * t - x * s; + out[10] = z * z * t + c; + out[11] = 0; + out[12] = 0; + out[13] = 0; + out[14] = 0; + out[15] = 1; + return out; } /** * Creates a matrix from the given angle around the X axis @@ -2791,28 +2518,27 @@ THE SOFTWARE. * @param {Number} rad the angle to rotate the matrix by * @returns {mat4} out */ - function fromXRotation(out, rad) { - var s = Math.sin(rad); - var c = Math.cos(rad); // Perform axis-specific matrix multiplication - - out[0] = 1; - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = 0; - out[5] = c; - out[6] = s; - out[7] = 0; - out[8] = 0; - out[9] = -s; - out[10] = c; - out[11] = 0; - out[12] = 0; - out[13] = 0; - out[14] = 0; - out[15] = 1; - return out; + var s = Math.sin(rad); + var c = Math.cos(rad); + // Perform axis-specific matrix multiplication + out[0] = 1; + out[1] = 0; + out[2] = 0; + out[3] = 0; + out[4] = 0; + out[5] = c; + out[6] = s; + out[7] = 0; + out[8] = 0; + out[9] = -s; + out[10] = c; + out[11] = 0; + out[12] = 0; + out[13] = 0; + out[14] = 0; + out[15] = 1; + return out; } /** * Creates a matrix from the given angle around the Y axis @@ -2825,28 +2551,27 @@ THE SOFTWARE. * @param {Number} rad the angle to rotate the matrix by * @returns {mat4} out */ - function fromYRotation(out, rad) { - var s = Math.sin(rad); - var c = Math.cos(rad); // Perform axis-specific matrix multiplication - - out[0] = c; - out[1] = 0; - out[2] = -s; - out[3] = 0; - out[4] = 0; - out[5] = 1; - out[6] = 0; - out[7] = 0; - out[8] = s; - out[9] = 0; - out[10] = c; - out[11] = 0; - out[12] = 0; - out[13] = 0; - out[14] = 0; - out[15] = 1; - return out; + var s = Math.sin(rad); + var c = Math.cos(rad); + // Perform axis-specific matrix multiplication + out[0] = c; + out[1] = 0; + out[2] = -s; + out[3] = 0; + out[4] = 0; + out[5] = 1; + out[6] = 0; + out[7] = 0; + out[8] = s; + out[9] = 0; + out[10] = c; + out[11] = 0; + out[12] = 0; + out[13] = 0; + out[14] = 0; + out[15] = 1; + return out; } /** * Creates a matrix from the given angle around the Z axis @@ -2859,28 +2584,27 @@ THE SOFTWARE. * @param {Number} rad the angle to rotate the matrix by * @returns {mat4} out */ - function fromZRotation(out, rad) { - var s = Math.sin(rad); - var c = Math.cos(rad); // Perform axis-specific matrix multiplication - - out[0] = c; - out[1] = s; - out[2] = 0; - out[3] = 0; - out[4] = -s; - out[5] = c; - out[6] = 0; - out[7] = 0; - out[8] = 0; - out[9] = 0; - out[10] = 1; - out[11] = 0; - out[12] = 0; - out[13] = 0; - out[14] = 0; - out[15] = 1; - return out; + var s = Math.sin(rad); + var c = Math.cos(rad); + // Perform axis-specific matrix multiplication + out[0] = c; + out[1] = s; + out[2] = 0; + out[3] = 0; + out[4] = -s; + out[5] = c; + out[6] = 0; + out[7] = 0; + out[8] = 0; + out[9] = 0; + out[10] = 1; + out[11] = 0; + out[12] = 0; + out[13] = 0; + out[14] = 0; + out[15] = 1; + return out; } /** * Creates a matrix from a quaternion rotation and vector translation @@ -2897,42 +2621,38 @@ THE SOFTWARE. * @param {ReadonlyVec3} v Translation vector * @returns {mat4} out */ - function fromRotationTranslation$1(out, q, v) { - // Quaternion math - var x = q[0], - y = q[1], - z = q[2], - w = q[3]; - var x2 = x + x; - var y2 = y + y; - var z2 = z + z; - var xx = x * x2; - var xy = x * y2; - var xz = x * z2; - var yy = y * y2; - var yz = y * z2; - var zz = z * z2; - var wx = w * x2; - var wy = w * y2; - var wz = w * z2; - out[0] = 1 - (yy + zz); - out[1] = xy + wz; - out[2] = xz - wy; - out[3] = 0; - out[4] = xy - wz; - out[5] = 1 - (xx + zz); - out[6] = yz + wx; - out[7] = 0; - out[8] = xz + wy; - out[9] = yz - wx; - out[10] = 1 - (xx + yy); - out[11] = 0; - out[12] = v[0]; - out[13] = v[1]; - out[14] = v[2]; - out[15] = 1; - return out; + // Quaternion math + var x = q[0], y = q[1], z = q[2], w = q[3]; + var x2 = x + x; + var y2 = y + y; + var z2 = z + z; + var xx = x * x2; + var xy = x * y2; + var xz = x * z2; + var yy = y * y2; + var yz = y * z2; + var zz = z * z2; + var wx = w * x2; + var wy = w * y2; + var wz = w * z2; + out[0] = 1 - (yy + zz); + out[1] = xy + wz; + out[2] = xz - wy; + out[3] = 0; + out[4] = xy - wz; + out[5] = 1 - (xx + zz); + out[6] = yz + wx; + out[7] = 0; + out[8] = xz + wy; + out[9] = yz - wx; + out[10] = 1 - (xx + yy); + out[11] = 0; + out[12] = v[0]; + out[13] = v[1]; + out[14] = v[2]; + out[15] = 1; + return out; } /** * Creates a new mat4 from a dual quat. @@ -2941,31 +2661,23 @@ THE SOFTWARE. * @param {ReadonlyQuat2} a Dual Quaternion * @returns {mat4} mat4 receiving operation result */ - function fromQuat2(out, a) { - var translation = new Float64Array(3); - var bx = -a[0], - by = -a[1], - bz = -a[2], - bw = a[3], - ax = a[4], - ay = a[5], - az = a[6], - aw = a[7]; - var magnitude = bx * bx + by * by + bz * bz + bw * bw; //Only scale if it makes sense - - if (magnitude > 0) { - translation[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2 / magnitude; - translation[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2 / magnitude; - translation[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2 / magnitude; - } else { - translation[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2; - translation[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2; - translation[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2; - } - - fromRotationTranslation$1(out, a, translation); - return out; + var translation = new Float64Array(3); + var bx = -a[0], by = -a[1], bz = -a[2], bw = a[3], ax = a[4], ay = a[5], az = a[6], aw = a[7]; + var magnitude = bx * bx + by * by + bz * bz + bw * bw; + //Only scale if it makes sense + if (magnitude > 0) { + translation[0] = ((ax * bw + aw * bx + ay * bz - az * by) * 2) / magnitude; + translation[1] = ((ay * bw + aw * by + az * bx - ax * bz) * 2) / magnitude; + translation[2] = ((az * bw + aw * bz + ax * by - ay * bx) * 2) / magnitude; + } + else { + translation[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2; + translation[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2; + translation[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2; + } + fromRotationTranslation$1(out, a, translation); + return out; } /** * Returns the translation vector component of a transformation @@ -2976,12 +2688,11 @@ THE SOFTWARE. * @param {ReadonlyMat4} mat Matrix to be decomposed (input) * @return {vec3} out */ - function getTranslation$1(out, mat) { - out[0] = mat[12]; - out[1] = mat[13]; - out[2] = mat[14]; - return out; + out[0] = mat[12]; + out[1] = mat[13]; + out[2] = mat[14]; + return out; } /** * Returns the scaling factor component of a transformation @@ -2993,21 +2704,20 @@ THE SOFTWARE. * @param {ReadonlyMat4} mat Matrix to be decomposed (input) * @return {vec3} out */ - function getScaling(out, mat) { - var m11 = mat[0]; - var m12 = mat[1]; - var m13 = mat[2]; - var m21 = mat[4]; - var m22 = mat[5]; - var m23 = mat[6]; - var m31 = mat[8]; - var m32 = mat[9]; - var m33 = mat[10]; - out[0] = Maths.hypot(m11, m12, m13); - out[1] = Maths.hypot(m21, m22, m23); - out[2] = Maths.hypot(m31, m32, m33); - return out; + var m11 = mat[0]; + var m12 = mat[1]; + var m13 = mat[2]; + var m21 = mat[4]; + var m22 = mat[5]; + var m23 = mat[6]; + var m31 = mat[8]; + var m32 = mat[9]; + var m33 = mat[10]; + out[0] = Maths.hypot(m11, m12, m13); + out[1] = Maths.hypot(m21, m22, m23); + out[2] = Maths.hypot(m31, m32, m33); + return out; } /** * Returns a quaternion representing the rotational component @@ -3018,52 +2728,52 @@ THE SOFTWARE. * @param {ReadonlyMat4} mat Matrix to be decomposed (input) * @return {quat} out */ - function getRotation(out, mat) { - var scaling = changetype(new Float64Array(3)); - getScaling(scaling, mat); - var is1 = 1 / scaling[0]; - var is2 = 1 / scaling[1]; - var is3 = 1 / scaling[2]; - var sm11 = mat[0] * is1; - var sm12 = mat[1] * is2; - var sm13 = mat[2] * is3; - var sm21 = mat[4] * is1; - var sm22 = mat[5] * is2; - var sm23 = mat[6] * is3; - var sm31 = mat[8] * is1; - var sm32 = mat[9] * is2; - var sm33 = mat[10] * is3; - var trace = sm11 + sm22 + sm33; - var S = 0; - - if (trace > 0) { - S = Math.sqrt(trace + 1.0) * 2; - out[3] = 0.25 * S; - out[0] = (sm23 - sm32) / S; - out[1] = (sm31 - sm13) / S; - out[2] = (sm12 - sm21) / S; - } else if (sm11 > sm22 && sm11 > sm33) { - S = Math.sqrt(1.0 + sm11 - sm22 - sm33) * 2; - out[3] = (sm23 - sm32) / S; - out[0] = 0.25 * S; - out[1] = (sm12 + sm21) / S; - out[2] = (sm31 + sm13) / S; - } else if (sm22 > sm33) { - S = Math.sqrt(1.0 + sm22 - sm11 - sm33) * 2; - out[3] = (sm31 - sm13) / S; - out[0] = (sm12 + sm21) / S; - out[1] = 0.25 * S; - out[2] = (sm23 + sm32) / S; - } else { - S = Math.sqrt(1.0 + sm33 - sm11 - sm22) * 2; - out[3] = (sm12 - sm21) / S; - out[0] = (sm31 + sm13) / S; - out[1] = (sm23 + sm32) / S; - out[2] = 0.25 * S; - } - - return out; + var scaling = changetype(new Float64Array(3)); + getScaling(scaling, mat); + var is1 = 1 / scaling[0]; + var is2 = 1 / scaling[1]; + var is3 = 1 / scaling[2]; + var sm11 = mat[0] * is1; + var sm12 = mat[1] * is2; + var sm13 = mat[2] * is3; + var sm21 = mat[4] * is1; + var sm22 = mat[5] * is2; + var sm23 = mat[6] * is3; + var sm31 = mat[8] * is1; + var sm32 = mat[9] * is2; + var sm33 = mat[10] * is3; + var trace = sm11 + sm22 + sm33; + var S = 0; + if (trace > 0) { + S = Math.sqrt(trace + 1.0) * 2; + out[3] = 0.25 * S; + out[0] = (sm23 - sm32) / S; + out[1] = (sm31 - sm13) / S; + out[2] = (sm12 - sm21) / S; + } + else if (sm11 > sm22 && sm11 > sm33) { + S = Math.sqrt(1.0 + sm11 - sm22 - sm33) * 2; + out[3] = (sm23 - sm32) / S; + out[0] = 0.25 * S; + out[1] = (sm12 + sm21) / S; + out[2] = (sm31 + sm13) / S; + } + else if (sm22 > sm33) { + S = Math.sqrt(1.0 + sm22 - sm11 - sm33) * 2; + out[3] = (sm31 - sm13) / S; + out[0] = (sm12 + sm21) / S; + out[1] = 0.25 * S; + out[2] = (sm23 + sm32) / S; + } + else { + S = Math.sqrt(1.0 + sm33 - sm11 - sm22) * 2; + out[3] = (sm12 - sm21) / S; + out[0] = (sm31 + sm13) / S; + out[1] = (sm23 + sm32) / S; + out[2] = 0.25 * S; + } + return out; } /** * Decomposes a transformation matrix into its rotation, translation @@ -3074,65 +2784,65 @@ THE SOFTWARE. * @param {ReadonlyMat4} mat Matrix to be decomposed (input) * @returns {quat} out_r */ - function decompose(out_r, out_t, out_s, mat) { - out_t[0] = mat[12]; - out_t[1] = mat[13]; - out_t[2] = mat[14]; - var m11 = mat[0]; - var m12 = mat[1]; - var m13 = mat[2]; - var m21 = mat[4]; - var m22 = mat[5]; - var m23 = mat[6]; - var m31 = mat[8]; - var m32 = mat[9]; - var m33 = mat[10]; - out_s[0] = Maths.hypot(m11, m12, m13); - out_s[1] = Maths.hypot(m21, m22, m23); - out_s[2] = Maths.hypot(m31, m32, m33); - var is1 = 1 / out_s[0]; - var is2 = 1 / out_s[1]; - var is3 = 1 / out_s[2]; - var sm11 = m11 * is1; - var sm12 = m12 * is2; - var sm13 = m13 * is3; - var sm21 = m21 * is1; - var sm22 = m22 * is2; - var sm23 = m23 * is3; - var sm31 = m31 * is1; - var sm32 = m32 * is2; - var sm33 = m33 * is3; - var trace = sm11 + sm22 + sm33; - var S = 0; - - if (trace > 0) { - S = Math.sqrt(trace + 1.0) * 2; - out_r[3] = 0.25 * S; - out_r[0] = (sm23 - sm32) / S; - out_r[1] = (sm31 - sm13) / S; - out_r[2] = (sm12 - sm21) / S; - } else if (sm11 > sm22 && sm11 > sm33) { - S = Math.sqrt(1.0 + sm11 - sm22 - sm33) * 2; - out_r[3] = (sm23 - sm32) / S; - out_r[0] = 0.25 * S; - out_r[1] = (sm12 + sm21) / S; - out_r[2] = (sm31 + sm13) / S; - } else if (sm22 > sm33) { - S = Math.sqrt(1.0 + sm22 - sm11 - sm33) * 2; - out_r[3] = (sm31 - sm13) / S; - out_r[0] = (sm12 + sm21) / S; - out_r[1] = 0.25 * S; - out_r[2] = (sm23 + sm32) / S; - } else { - S = Math.sqrt(1.0 + sm33 - sm11 - sm22) * 2; - out_r[3] = (sm12 - sm21) / S; - out_r[0] = (sm31 + sm13) / S; - out_r[1] = (sm23 + sm32) / S; - out_r[2] = 0.25 * S; - } - - return out_r; + out_t[0] = mat[12]; + out_t[1] = mat[13]; + out_t[2] = mat[14]; + var m11 = mat[0]; + var m12 = mat[1]; + var m13 = mat[2]; + var m21 = mat[4]; + var m22 = mat[5]; + var m23 = mat[6]; + var m31 = mat[8]; + var m32 = mat[9]; + var m33 = mat[10]; + out_s[0] = Maths.hypot(m11, m12, m13); + out_s[1] = Maths.hypot(m21, m22, m23); + out_s[2] = Maths.hypot(m31, m32, m33); + var is1 = 1 / out_s[0]; + var is2 = 1 / out_s[1]; + var is3 = 1 / out_s[2]; + var sm11 = m11 * is1; + var sm12 = m12 * is2; + var sm13 = m13 * is3; + var sm21 = m21 * is1; + var sm22 = m22 * is2; + var sm23 = m23 * is3; + var sm31 = m31 * is1; + var sm32 = m32 * is2; + var sm33 = m33 * is3; + var trace = sm11 + sm22 + sm33; + var S = 0; + if (trace > 0) { + S = Math.sqrt(trace + 1.0) * 2; + out_r[3] = 0.25 * S; + out_r[0] = (sm23 - sm32) / S; + out_r[1] = (sm31 - sm13) / S; + out_r[2] = (sm12 - sm21) / S; + } + else if (sm11 > sm22 && sm11 > sm33) { + S = Math.sqrt(1.0 + sm11 - sm22 - sm33) * 2; + out_r[3] = (sm23 - sm32) / S; + out_r[0] = 0.25 * S; + out_r[1] = (sm12 + sm21) / S; + out_r[2] = (sm31 + sm13) / S; + } + else if (sm22 > sm33) { + S = Math.sqrt(1.0 + sm22 - sm11 - sm33) * 2; + out_r[3] = (sm31 - sm13) / S; + out_r[0] = (sm12 + sm21) / S; + out_r[1] = 0.25 * S; + out_r[2] = (sm23 + sm32) / S; + } + else { + S = Math.sqrt(1.0 + sm33 - sm11 - sm22) * 2; + out_r[3] = (sm12 - sm21) / S; + out_r[0] = (sm31 + sm13) / S; + out_r[1] = (sm23 + sm32) / S; + out_r[2] = 0.25 * S; + } + return out_r; } /** * Creates a matrix from a quaternion rotation, vector translation and vector scale @@ -3151,45 +2861,41 @@ THE SOFTWARE. * @param {ReadonlyVec3} s Scaling vector * @returns {mat4} out */ - function fromRotationTranslationScale(out, q, v, s) { - // Quaternion math - var x = q[0], - y = q[1], - z = q[2], - w = q[3]; - var x2 = x + x; - var y2 = y + y; - var z2 = z + z; - var xx = x * x2; - var xy = x * y2; - var xz = x * z2; - var yy = y * y2; - var yz = y * z2; - var zz = z * z2; - var wx = w * x2; - var wy = w * y2; - var wz = w * z2; - var sx = s[0]; - var sy = s[1]; - var sz = s[2]; - out[0] = (1 - (yy + zz)) * sx; - out[1] = (xy + wz) * sx; - out[2] = (xz - wy) * sx; - out[3] = 0; - out[4] = (xy - wz) * sy; - out[5] = (1 - (xx + zz)) * sy; - out[6] = (yz + wx) * sy; - out[7] = 0; - out[8] = (xz + wy) * sz; - out[9] = (yz - wx) * sz; - out[10] = (1 - (xx + yy)) * sz; - out[11] = 0; - out[12] = v[0]; - out[13] = v[1]; - out[14] = v[2]; - out[15] = 1; - return out; + // Quaternion math + var x = q[0], y = q[1], z = q[2], w = q[3]; + var x2 = x + x; + var y2 = y + y; + var z2 = z + z; + var xx = x * x2; + var xy = x * y2; + var xz = x * z2; + var yy = y * y2; + var yz = y * z2; + var zz = z * z2; + var wx = w * x2; + var wy = w * y2; + var wz = w * z2; + var sx = s[0]; + var sy = s[1]; + var sz = s[2]; + out[0] = (1 - (yy + zz)) * sx; + out[1] = (xy + wz) * sx; + out[2] = (xz - wy) * sx; + out[3] = 0; + out[4] = (xy - wz) * sy; + out[5] = (1 - (xx + zz)) * sy; + out[6] = (yz + wx) * sy; + out[7] = 0; + out[8] = (xz + wy) * sz; + out[9] = (yz - wx) * sz; + out[10] = (1 - (xx + yy)) * sz; + out[11] = 0; + out[12] = v[0]; + out[13] = v[1]; + out[14] = v[2]; + out[15] = 1; + return out; } /** * Creates a matrix from a quaternion rotation, vector translation and vector scale, rotating and scaling around the given origin @@ -3211,57 +2917,53 @@ THE SOFTWARE. * @param {ReadonlyVec3} o The origin vector around which to scale and rotate * @returns {mat4} out */ - function fromRotationTranslationScaleOrigin(out, q, v, s, o) { - // Quaternion math - var x = q[0], - y = q[1], - z = q[2], - w = q[3]; - var x2 = x + x; - var y2 = y + y; - var z2 = z + z; - var xx = x * x2; - var xy = x * y2; - var xz = x * z2; - var yy = y * y2; - var yz = y * z2; - var zz = z * z2; - var wx = w * x2; - var wy = w * y2; - var wz = w * z2; - var sx = s[0]; - var sy = s[1]; - var sz = s[2]; - var ox = o[0]; - var oy = o[1]; - var oz = o[2]; - var out0 = (1 - (yy + zz)) * sx; - var out1 = (xy + wz) * sx; - var out2 = (xz - wy) * sx; - var out4 = (xy - wz) * sy; - var out5 = (1 - (xx + zz)) * sy; - var out6 = (yz + wx) * sy; - var out8 = (xz + wy) * sz; - var out9 = (yz - wx) * sz; - var out10 = (1 - (xx + yy)) * sz; - out[0] = out0; - out[1] = out1; - out[2] = out2; - out[3] = 0; - out[4] = out4; - out[5] = out5; - out[6] = out6; - out[7] = 0; - out[8] = out8; - out[9] = out9; - out[10] = out10; - out[11] = 0; - out[12] = v[0] + ox - (out0 * ox + out4 * oy + out8 * oz); - out[13] = v[1] + oy - (out1 * ox + out5 * oy + out9 * oz); - out[14] = v[2] + oz - (out2 * ox + out6 * oy + out10 * oz); - out[15] = 1; - return out; + // Quaternion math + var x = q[0], y = q[1], z = q[2], w = q[3]; + var x2 = x + x; + var y2 = y + y; + var z2 = z + z; + var xx = x * x2; + var xy = x * y2; + var xz = x * z2; + var yy = y * y2; + var yz = y * z2; + var zz = z * z2; + var wx = w * x2; + var wy = w * y2; + var wz = w * z2; + var sx = s[0]; + var sy = s[1]; + var sz = s[2]; + var ox = o[0]; + var oy = o[1]; + var oz = o[2]; + var out0 = (1 - (yy + zz)) * sx; + var out1 = (xy + wz) * sx; + var out2 = (xz - wy) * sx; + var out4 = (xy - wz) * sy; + var out5 = (1 - (xx + zz)) * sy; + var out6 = (yz + wx) * sy; + var out8 = (xz + wy) * sz; + var out9 = (yz - wx) * sz; + var out10 = (1 - (xx + yy)) * sz; + out[0] = out0; + out[1] = out1; + out[2] = out2; + out[3] = 0; + out[4] = out4; + out[5] = out5; + out[6] = out6; + out[7] = 0; + out[8] = out8; + out[9] = out9; + out[10] = out10; + out[11] = 0; + out[12] = v[0] + ox - (out0 * ox + out4 * oy + out8 * oz); + out[13] = v[1] + oy - (out1 * ox + out5 * oy + out9 * oz); + out[14] = v[2] + oz - (out2 * ox + out6 * oy + out10 * oz); + out[15] = 1; + return out; } /** * Calculates a 4x4 matrix from the given quaternion @@ -3271,41 +2973,37 @@ THE SOFTWARE. * * @returns {mat4} out */ - function fromQuat(out, q) { - var x = q[0], - y = q[1], - z = q[2], - w = q[3]; - var x2 = x + x; - var y2 = y + y; - var z2 = z + z; - var xx = x * x2; - var yx = y * x2; - var yy = y * y2; - var zx = z * x2; - var zy = z * y2; - var zz = z * z2; - var wx = w * x2; - var wy = w * y2; - var wz = w * z2; - out[0] = 1 - yy - zz; - out[1] = yx + wz; - out[2] = zx - wy; - out[3] = 0; - out[4] = yx - wz; - out[5] = 1 - xx - zz; - out[6] = zy + wx; - out[7] = 0; - out[8] = zx + wy; - out[9] = zy - wx; - out[10] = 1 - xx - yy; - out[11] = 0; - out[12] = 0; - out[13] = 0; - out[14] = 0; - out[15] = 1; - return out; + var x = q[0], y = q[1], z = q[2], w = q[3]; + var x2 = x + x; + var y2 = y + y; + var z2 = z + z; + var xx = x * x2; + var yx = y * x2; + var yy = y * y2; + var zx = z * x2; + var zy = z * y2; + var zz = z * z2; + var wx = w * x2; + var wy = w * y2; + var wz = w * z2; + out[0] = 1 - yy - zz; + out[1] = yx + wz; + out[2] = zx - wy; + out[3] = 0; + out[4] = yx - wz; + out[5] = 1 - xx - zz; + out[6] = zy + wx; + out[7] = 0; + out[8] = zx + wy; + out[9] = zy - wx; + out[10] = 1 - xx - yy; + out[11] = 0; + out[12] = 0; + out[13] = 0; + out[14] = 0; + out[15] = 1; + return out; } /** * Generates a frustum matrix with the given bounds @@ -3319,28 +3017,27 @@ THE SOFTWARE. * @param {Number} far Far bound of the frustum * @returns {mat4} out */ - function frustum(out, left, right, bottom, top, near, far) { - var rl = 1 / (right - left); - var tb = 1 / (top - bottom); - var nf = 1 / (near - far); - out[0] = near * 2 * rl; - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = 0; - out[5] = near * 2 * tb; - out[6] = 0; - out[7] = 0; - out[8] = (right + left) * rl; - out[9] = (top + bottom) * tb; - out[10] = (far + near) * nf; - out[11] = -1; - out[12] = 0; - out[13] = 0; - out[14] = far * near * 2 * nf; - out[15] = 0; - return out; + var rl = 1 / (right - left); + var tb = 1 / (top - bottom); + var nf = 1 / (near - far); + out[0] = near * 2 * rl; + out[1] = 0; + out[2] = 0; + out[3] = 0; + out[4] = 0; + out[5] = near * 2 * tb; + out[6] = 0; + out[7] = 0; + out[8] = (right + left) * rl; + out[9] = (top + bottom) * tb; + out[10] = (far + near) * nf; + out[11] = -1; + out[12] = 0; + out[13] = 0; + out[14] = far * near * 2 * nf; + out[15] = 0; + return out; } /** * Generates a perspective projection matrix with the given bounds. @@ -3357,40 +3054,37 @@ THE SOFTWARE. * @param {number} far Far bound of the frustum, can be null or Infinity * @returns {mat4} out */ - function perspectiveNO(out, fovy, aspect, near, far) { - var f = 1.0 / Math.tan(fovy / 2); - out[0] = f / aspect; - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = 0; - out[5] = f; - out[6] = 0; - out[7] = 0; - out[8] = 0; - out[9] = 0; - out[11] = -1; - out[12] = 0; - out[13] = 0; - out[15] = 0; - - if (typeof far === "number" && far !== Infinity) { - var nf = 1 / (near - far); - out[10] = (far + near) * nf; - out[14] = 2 * far * near * nf; - } else { - out[10] = -1; - out[14] = -2 * near; - } - - return out; + var f = 1.0 / Math.tan(fovy / 2); + out[0] = f / aspect; + out[1] = 0; + out[2] = 0; + out[3] = 0; + out[4] = 0; + out[5] = f; + out[6] = 0; + out[7] = 0; + out[8] = 0; + out[9] = 0; + out[11] = -1; + out[12] = 0; + out[13] = 0; + out[15] = 0; + if (typeof far === "number" && far !== Infinity) { + var nf = 1 / (near - far); + out[10] = (far + near) * nf; + out[14] = 2 * far * near * nf; + } + else { + out[10] = -1; + out[14] = -2 * near; + } + return out; } /** * Alias for {@link mat4.perspectiveNO} * @function */ - var perspective = perspectiveNO; /** * Generates a perspective projection matrix suitable for WebGPU with the given bounds. @@ -3407,34 +3101,32 @@ THE SOFTWARE. * @param {number} far Far bound of the frustum, can be null or Infinity * @returns {mat4} out */ - function perspectiveZO(out, fovy, aspect, near, far) { - var f = 1.0 / Math.tan(fovy / 2); - out[0] = f / aspect; - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = 0; - out[5] = f; - out[6] = 0; - out[7] = 0; - out[8] = 0; - out[9] = 0; - out[11] = -1; - out[12] = 0; - out[13] = 0; - out[15] = 0; - - if (typeof far === "number" && far !== Infinity) { - var nf = 1 / (near - far); - out[10] = far * nf; - out[14] = far * near * nf; - } else { - out[10] = -1; - out[14] = -near; - } - - return out; + var f = 1.0 / Math.tan(fovy / 2); + out[0] = f / aspect; + out[1] = 0; + out[2] = 0; + out[3] = 0; + out[4] = 0; + out[5] = f; + out[6] = 0; + out[7] = 0; + out[8] = 0; + out[9] = 0; + out[11] = -1; + out[12] = 0; + out[13] = 0; + out[15] = 0; + if (typeof far === "number" && far !== Infinity) { + var nf = 1 / (near - far); + out[10] = far * nf; + out[14] = far * near * nf; + } + else { + out[10] = -1; + out[14] = -near; + } + return out; } /** * Generates a perspective projection matrix with the given field of view. @@ -3447,31 +3139,30 @@ THE SOFTWARE. * @param {number} far Far bound of the frustum * @returns {mat4} out */ - function perspectiveFromFieldOfView(out, fov, near, far) { - var upTan = Math.tan(fov.upDegrees * Math.PI / 180.0); - var downTan = Math.tan(fov.downDegrees * Math.PI / 180.0); - var leftTan = Math.tan(fov.leftDegrees * Math.PI / 180.0); - var rightTan = Math.tan(fov.rightDegrees * Math.PI / 180.0); - var xScale = 2.0 / (leftTan + rightTan); - var yScale = 2.0 / (upTan + downTan); - out[0] = xScale; - out[1] = 0.0; - out[2] = 0.0; - out[3] = 0.0; - out[4] = 0.0; - out[5] = yScale; - out[6] = 0.0; - out[7] = 0.0; - out[8] = -((leftTan - rightTan) * xScale * 0.5); - out[9] = (upTan - downTan) * yScale * 0.5; - out[10] = far / (near - far); - out[11] = -1.0; - out[12] = 0.0; - out[13] = 0.0; - out[14] = far * near / (near - far); - out[15] = 0.0; - return out; + var upTan = Math.tan((fov.upDegrees * Math.PI) / 180.0); + var downTan = Math.tan((fov.downDegrees * Math.PI) / 180.0); + var leftTan = Math.tan((fov.leftDegrees * Math.PI) / 180.0); + var rightTan = Math.tan((fov.rightDegrees * Math.PI) / 180.0); + var xScale = 2.0 / (leftTan + rightTan); + var yScale = 2.0 / (upTan + downTan); + out[0] = xScale; + out[1] = 0.0; + out[2] = 0.0; + out[3] = 0.0; + out[4] = 0.0; + out[5] = yScale; + out[6] = 0.0; + out[7] = 0.0; + out[8] = -((leftTan - rightTan) * xScale * 0.5); + out[9] = (upTan - downTan) * yScale * 0.5; + out[10] = far / (near - far); + out[11] = -1.0; + out[12] = 0.0; + out[13] = 0.0; + out[14] = (far * near) / (near - far); + out[15] = 0.0; + return out; } /** * Generates a orthogonal projection matrix with the given bounds. @@ -3487,34 +3178,32 @@ THE SOFTWARE. * @param {number} far Far bound of the frustum * @returns {mat4} out */ - function orthoNO(out, left, right, bottom, top, near, far) { - var lr = 1 / (left - right); - var bt = 1 / (bottom - top); - var nf = 1 / (near - far); - out[0] = -2 * lr; - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = 0; - out[5] = -2 * bt; - out[6] = 0; - out[7] = 0; - out[8] = 0; - out[9] = 0; - out[10] = 2 * nf; - out[11] = 0; - out[12] = (left + right) * lr; - out[13] = (top + bottom) * bt; - out[14] = (far + near) * nf; - out[15] = 1; - return out; + var lr = 1 / (left - right); + var bt = 1 / (bottom - top); + var nf = 1 / (near - far); + out[0] = -2 * lr; + out[1] = 0; + out[2] = 0; + out[3] = 0; + out[4] = 0; + out[5] = -2 * bt; + out[6] = 0; + out[7] = 0; + out[8] = 0; + out[9] = 0; + out[10] = 2 * nf; + out[11] = 0; + out[12] = (left + right) * lr; + out[13] = (top + bottom) * bt; + out[14] = (far + near) * nf; + out[15] = 1; + return out; } /** * Alias for {@link mat4.orthoNO} * @function */ - var ortho = orthoNO; /** * Generates a orthogonal projection matrix with the given bounds. @@ -3530,28 +3219,27 @@ THE SOFTWARE. * @param {number} far Far bound of the frustum * @returns {mat4} out */ - function orthoZO(out, left, right, bottom, top, near, far) { - var lr = 1 / (left - right); - var bt = 1 / (bottom - top); - var nf = 1 / (near - far); - out[0] = -2 * lr; - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = 0; - out[5] = -2 * bt; - out[6] = 0; - out[7] = 0; - out[8] = 0; - out[9] = 0; - out[10] = nf; - out[11] = 0; - out[12] = (left + right) * lr; - out[13] = (top + bottom) * bt; - out[14] = near * nf; - out[15] = 1; - return out; + var lr = 1 / (left - right); + var bt = 1 / (bottom - top); + var nf = 1 / (near - far); + out[0] = -2 * lr; + out[1] = 0; + out[2] = 0; + out[3] = 0; + out[4] = 0; + out[5] = -2 * bt; + out[6] = 0; + out[7] = 0; + out[8] = 0; + out[9] = 0; + out[10] = nf; + out[11] = 0; + out[12] = (left + right) * lr; + out[13] = (top + bottom) * bt; + out[14] = near * nf; + out[15] = 1; + return out; } /** * Generates a look-at matrix with the given eye position, focal point, and up axis. @@ -3563,79 +3251,76 @@ THE SOFTWARE. * @param {ReadonlyVec3} up vec3 pointing up * @returns {mat4} out */ - function lookAt(out, eye, center, up) { - var x0, x1, x2, y0, y1, y2, z0, z1, z2, len; - var eyex = eye[0]; - var eyey = eye[1]; - var eyez = eye[2]; - var upx = up[0]; - var upy = up[1]; - var upz = up[2]; - var centerx = center[0]; - var centery = center[1]; - var centerz = center[2]; - - if (Math.abs(eyex - centerx) < EPSILON && Math.abs(eyey - centery) < EPSILON && Math.abs(eyez - centerz) < EPSILON) { - return identity$2(out); - } - - z0 = eyex - centerx; - z1 = eyey - centery; - z2 = eyez - centerz; - len = 1 / Maths.hypot(z0, z1, z2); - z0 *= len; - z1 *= len; - z2 *= len; - x0 = upy * z2 - upz * z1; - x1 = upz * z0 - upx * z2; - x2 = upx * z1 - upy * z0; - len = Maths.hypot(x0, x1, x2); - - if (!len) { - x0 = 0; - x1 = 0; - x2 = 0; - } else { - len = 1 / len; - x0 *= len; - x1 *= len; - x2 *= len; - } - - y0 = z1 * x2 - z2 * x1; - y1 = z2 * x0 - z0 * x2; - y2 = z0 * x1 - z1 * x0; - len = Maths.hypot(y0, y1, y2); - - if (!len) { - y0 = 0; - y1 = 0; - y2 = 0; - } else { - len = 1 / len; - y0 *= len; - y1 *= len; - y2 *= len; - } - - out[0] = x0; - out[1] = y0; - out[2] = z0; - out[3] = 0; - out[4] = x1; - out[5] = y1; - out[6] = z1; - out[7] = 0; - out[8] = x2; - out[9] = y2; - out[10] = z2; - out[11] = 0; - out[12] = -(x0 * eyex + x1 * eyey + x2 * eyez); - out[13] = -(y0 * eyex + y1 * eyey + y2 * eyez); - out[14] = -(z0 * eyex + z1 * eyey + z2 * eyez); - out[15] = 1; - return out; + var x0, x1, x2, y0, y1, y2, z0, z1, z2, len; + var eyex = eye[0]; + var eyey = eye[1]; + var eyez = eye[2]; + var upx = up[0]; + var upy = up[1]; + var upz = up[2]; + var centerx = center[0]; + var centery = center[1]; + var centerz = center[2]; + if (Math.abs(eyex - centerx) < EPSILON && + Math.abs(eyey - centery) < EPSILON && + Math.abs(eyez - centerz) < EPSILON) { + return identity$2(out); + } + z0 = eyex - centerx; + z1 = eyey - centery; + z2 = eyez - centerz; + len = 1 / Maths.hypot(z0, z1, z2); + z0 *= len; + z1 *= len; + z2 *= len; + x0 = upy * z2 - upz * z1; + x1 = upz * z0 - upx * z2; + x2 = upx * z1 - upy * z0; + len = Maths.hypot(x0, x1, x2); + if (!len) { + x0 = 0; + x1 = 0; + x2 = 0; + } + else { + len = 1 / len; + x0 *= len; + x1 *= len; + x2 *= len; + } + y0 = z1 * x2 - z2 * x1; + y1 = z2 * x0 - z0 * x2; + y2 = z0 * x1 - z1 * x0; + len = Maths.hypot(y0, y1, y2); + if (!len) { + y0 = 0; + y1 = 0; + y2 = 0; + } + else { + len = 1 / len; + y0 *= len; + y1 *= len; + y2 *= len; + } + out[0] = x0; + out[1] = y0; + out[2] = z0; + out[3] = 0; + out[4] = x1; + out[5] = y1; + out[6] = z1; + out[7] = 0; + out[8] = x2; + out[9] = y2; + out[10] = z2; + out[11] = 0; + out[12] = -(x0 * eyex + x1 * eyey + x2 * eyez); + out[13] = -(y0 * eyex + y1 * eyey + y2 * eyez); + out[14] = -(z0 * eyex + z1 * eyey + z2 * eyez); + out[15] = 1; + return out; } /** * Generates a matrix that makes something look at something else. @@ -3646,55 +3331,41 @@ THE SOFTWARE. * @param {ReadonlyVec3} up vec3 pointing up * @returns {mat4} out */ - function targetTo(out, eye, target, up) { - var eyex = eye[0], - eyey = eye[1], - eyez = eye[2], - upx = up[0], - upy = up[1], - upz = up[2]; - var z0 = eyex - target[0], - z1 = eyey - target[1], - z2 = eyez - target[2]; - var len = z0 * z0 + z1 * z1 + z2 * z2; - - if (len > 0) { - len = 1 / Math.sqrt(len); - z0 *= len; - z1 *= len; - z2 *= len; - } - - var x0 = upy * z2 - upz * z1, - x1 = upz * z0 - upx * z2, - x2 = upx * z1 - upy * z0; - len = x0 * x0 + x1 * x1 + x2 * x2; - - if (len > 0) { - len = 1 / Math.sqrt(len); - x0 *= len; - x1 *= len; - x2 *= len; - } - - out[0] = x0; - out[1] = x1; - out[2] = x2; - out[3] = 0; - out[4] = z1 * x2 - z2 * x1; - out[5] = z2 * x0 - z0 * x2; - out[6] = z0 * x1 - z1 * x0; - out[7] = 0; - out[8] = z0; - out[9] = z1; - out[10] = z2; - out[11] = 0; - out[12] = eyex; - out[13] = eyey; - out[14] = eyez; - out[15] = 1; - return out; + var eyex = eye[0], eyey = eye[1], eyez = eye[2], upx = up[0], upy = up[1], upz = up[2]; + var z0 = eyex - target[0], z1 = eyey - target[1], z2 = eyez - target[2]; + var len = z0 * z0 + z1 * z1 + z2 * z2; + if (len > 0) { + len = 1 / Math.sqrt(len); + z0 *= len; + z1 *= len; + z2 *= len; + } + var x0 = upy * z2 - upz * z1, x1 = upz * z0 - upx * z2, x2 = upx * z1 - upy * z0; + len = x0 * x0 + x1 * x1 + x2 * x2; + if (len > 0) { + len = 1 / Math.sqrt(len); + x0 *= len; + x1 *= len; + x2 *= len; + } + out[0] = x0; + out[1] = x1; + out[2] = x2; + out[3] = 0; + out[4] = z1 * x2 - z2 * x1; + out[5] = z2 * x0 - z0 * x2; + out[6] = z0 * x1 - z1 * x0; + out[7] = 0; + out[8] = z0; + out[9] = z1; + out[10] = z2; + out[11] = 0; + out[12] = eyex; + out[13] = eyey; + out[14] = eyez; + out[15] = 1; + return out; } /** * Returns a string representation of a mat4 @@ -3702,9 +3373,40 @@ THE SOFTWARE. * @param {ReadonlyMat4} a matrix to represent as a string * @returns {String} string representation of the matrix */ - function str$5(a) { - return "mat4(" + a[0].toString() + ", " + a[1].toString() + ", " + a[2].toString() + ", " + a[3].toString() + ", " + a[4].toString() + ", " + a[5].toString() + ", " + a[6].toString() + ", " + a[7].toString() + ", " + a[8].toString() + ", " + a[9].toString() + ", " + a[10].toString() + ", " + a[11].toString() + ", " + a[12].toString() + ", " + a[13].toString() + ", " + a[14].toString() + ", " + a[15].toString() + ")"; + return ("mat4(" + + a[0].toString() + + ", " + + a[1].toString() + + ", " + + a[2].toString() + + ", " + + a[3].toString() + + ", " + + a[4].toString() + + ", " + + a[5].toString() + + ", " + + a[6].toString() + + ", " + + a[7].toString() + + ", " + + a[8].toString() + + ", " + + a[9].toString() + + ", " + + a[10].toString() + + ", " + + a[11].toString() + + ", " + + a[12].toString() + + ", " + + a[13].toString() + + ", " + + a[14].toString() + + ", " + + a[15].toString() + + ")"); } /** * Returns Frobenius norm of a mat4 @@ -3712,9 +3414,8 @@ THE SOFTWARE. * @param {ReadonlyMat4} a the matrix to calculate Frobenius norm of * @returns {Number} Frobenius norm */ - function frob(a) { - return Maths.hypot(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]); + return Maths.hypot(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]); } /** * Adds two mat4's @@ -3724,25 +3425,24 @@ THE SOFTWARE. * @param {ReadonlyMat4} b the second operand * @returns {mat4} out */ - function add$5(out, a, b) { - out[0] = a[0] + b[0]; - out[1] = a[1] + b[1]; - out[2] = a[2] + b[2]; - out[3] = a[3] + b[3]; - out[4] = a[4] + b[4]; - out[5] = a[5] + b[5]; - out[6] = a[6] + b[6]; - out[7] = a[7] + b[7]; - out[8] = a[8] + b[8]; - out[9] = a[9] + b[9]; - out[10] = a[10] + b[10]; - out[11] = a[11] + b[11]; - out[12] = a[12] + b[12]; - out[13] = a[13] + b[13]; - out[14] = a[14] + b[14]; - out[15] = a[15] + b[15]; - return out; + out[0] = a[0] + b[0]; + out[1] = a[1] + b[1]; + out[2] = a[2] + b[2]; + out[3] = a[3] + b[3]; + out[4] = a[4] + b[4]; + out[5] = a[5] + b[5]; + out[6] = a[6] + b[6]; + out[7] = a[7] + b[7]; + out[8] = a[8] + b[8]; + out[9] = a[9] + b[9]; + out[10] = a[10] + b[10]; + out[11] = a[11] + b[11]; + out[12] = a[12] + b[12]; + out[13] = a[13] + b[13]; + out[14] = a[14] + b[14]; + out[15] = a[15] + b[15]; + return out; } /** * Subtracts matrix b from matrix a @@ -3752,25 +3452,24 @@ THE SOFTWARE. * @param {ReadonlyMat4} b the second operand * @returns {mat4} out */ - function subtract$3(out, a, b) { - out[0] = a[0] - b[0]; - out[1] = a[1] - b[1]; - out[2] = a[2] - b[2]; - out[3] = a[3] - b[3]; - out[4] = a[4] - b[4]; - out[5] = a[5] - b[5]; - out[6] = a[6] - b[6]; - out[7] = a[7] - b[7]; - out[8] = a[8] - b[8]; - out[9] = a[9] - b[9]; - out[10] = a[10] - b[10]; - out[11] = a[11] - b[11]; - out[12] = a[12] - b[12]; - out[13] = a[13] - b[13]; - out[14] = a[14] - b[14]; - out[15] = a[15] - b[15]; - return out; + out[0] = a[0] - b[0]; + out[1] = a[1] - b[1]; + out[2] = a[2] - b[2]; + out[3] = a[3] - b[3]; + out[4] = a[4] - b[4]; + out[5] = a[5] - b[5]; + out[6] = a[6] - b[6]; + out[7] = a[7] - b[7]; + out[8] = a[8] - b[8]; + out[9] = a[9] - b[9]; + out[10] = a[10] - b[10]; + out[11] = a[11] - b[11]; + out[12] = a[12] - b[12]; + out[13] = a[13] - b[13]; + out[14] = a[14] - b[14]; + out[15] = a[15] - b[15]; + return out; } /** * Multiply each element of the matrix by a scalar. @@ -3780,25 +3479,24 @@ THE SOFTWARE. * @param {Number} b amount to scale the matrix's elements by * @returns {mat4} out */ - function multiplyScalar(out, a, b) { - out[0] = a[0] * b; - out[1] = a[1] * b; - out[2] = a[2] * b; - out[3] = a[3] * b; - out[4] = a[4] * b; - out[5] = a[5] * b; - out[6] = a[6] * b; - out[7] = a[7] * b; - out[8] = a[8] * b; - out[9] = a[9] * b; - out[10] = a[10] * b; - out[11] = a[11] * b; - out[12] = a[12] * b; - out[13] = a[13] * b; - out[14] = a[14] * b; - out[15] = a[15] * b; - return out; + out[0] = a[0] * b; + out[1] = a[1] * b; + out[2] = a[2] * b; + out[3] = a[3] * b; + out[4] = a[4] * b; + out[5] = a[5] * b; + out[6] = a[6] * b; + out[7] = a[7] * b; + out[8] = a[8] * b; + out[9] = a[9] * b; + out[10] = a[10] * b; + out[11] = a[11] * b; + out[12] = a[12] * b; + out[13] = a[13] * b; + out[14] = a[14] * b; + out[15] = a[15] * b; + return out; } /** * Adds two mat4's after multiplying each element of the second operand by a scalar value. @@ -3809,25 +3507,24 @@ THE SOFTWARE. * @param {Number} scale the amount to scale b's elements by before adding * @returns {mat4} out */ - function multiplyScalarAndAdd(out, a, b, scale) { - out[0] = a[0] + b[0] * scale; - out[1] = a[1] + b[1] * scale; - out[2] = a[2] + b[2] * scale; - out[3] = a[3] + b[3] * scale; - out[4] = a[4] + b[4] * scale; - out[5] = a[5] + b[5] * scale; - out[6] = a[6] + b[6] * scale; - out[7] = a[7] + b[7] * scale; - out[8] = a[8] + b[8] * scale; - out[9] = a[9] + b[9] * scale; - out[10] = a[10] + b[10] * scale; - out[11] = a[11] + b[11] * scale; - out[12] = a[12] + b[12] * scale; - out[13] = a[13] + b[13] * scale; - out[14] = a[14] + b[14] * scale; - out[15] = a[15] + b[15] * scale; - return out; + out[0] = a[0] + b[0] * scale; + out[1] = a[1] + b[1] * scale; + out[2] = a[2] + b[2] * scale; + out[3] = a[3] + b[3] * scale; + out[4] = a[4] + b[4] * scale; + out[5] = a[5] + b[5] * scale; + out[6] = a[6] + b[6] * scale; + out[7] = a[7] + b[7] * scale; + out[8] = a[8] + b[8] * scale; + out[9] = a[9] + b[9] * scale; + out[10] = a[10] + b[10] * scale; + out[11] = a[11] + b[11] * scale; + out[12] = a[12] + b[12] * scale; + out[13] = a[13] + b[13] * scale; + out[14] = a[14] + b[14] * scale; + out[15] = a[15] + b[15] * scale; + return out; } /** * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===) @@ -3836,9 +3533,23 @@ THE SOFTWARE. * @param {ReadonlyMat4} b The second matrix. * @returns {Boolean} True if the matrices are equal, false otherwise. */ - function exactEquals$5(a, b) { - return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5] && a[6] === b[6] && a[7] === b[7] && a[8] === b[8] && a[9] === b[9] && a[10] === b[10] && a[11] === b[11] && a[12] === b[12] && a[13] === b[13] && a[14] === b[14] && a[15] === b[15]; + return (a[0] === b[0] && + a[1] === b[1] && + a[2] === b[2] && + a[3] === b[3] && + a[4] === b[4] && + a[5] === b[5] && + a[6] === b[6] && + a[7] === b[7] && + a[8] === b[8] && + a[9] === b[9] && + a[10] === b[10] && + a[11] === b[11] && + a[12] === b[12] && + a[13] === b[13] && + a[14] === b[14] && + a[15] === b[15]); } /** * Returns whether or not the matrices have approximately the same elements in the same position. @@ -3847,53 +3558,57 @@ THE SOFTWARE. * @param {ReadonlyMat4} b The second matrix. * @returns {Boolean} True if the matrices are equal, false otherwise. */ - function equals$5(a, b) { - var a0 = a[0], - a1 = a[1], - a2 = a[2], - a3 = a[3]; - var a4 = a[4], - a5 = a[5], - a6 = a[6], - a7 = a[7]; - var a8 = a[8], - a9 = a[9], - a10 = a[10], - a11 = a[11]; - var a12 = a[12], - a13 = a[13], - a14 = a[14], - a15 = a[15]; - var b0 = b[0], - b1 = b[1], - b2 = b[2], - b3 = b[3]; - var b4 = b[4], - b5 = b[5], - b6 = b[6], - b7 = b[7]; - var b8 = b[8], - b9 = b[9], - b10 = b[10], - b11 = b[11]; - var b12 = b[12], - b13 = b[13], - b14 = b[14], - b15 = b[15]; - return Math.abs(a0 - b0) <= EPSILON * Maths.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= EPSILON * Maths.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= EPSILON * Maths.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= EPSILON * Maths.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= EPSILON * Maths.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= EPSILON * Maths.max(1.0, Math.abs(a5), Math.abs(b5)) && Math.abs(a6 - b6) <= EPSILON * Maths.max(1.0, Math.abs(a6), Math.abs(b6)) && Math.abs(a7 - b7) <= EPSILON * Maths.max(1.0, Math.abs(a7), Math.abs(b7)) && Math.abs(a8 - b8) <= EPSILON * Maths.max(1.0, Math.abs(a8), Math.abs(b8)) && Math.abs(a9 - b9) <= EPSILON * Maths.max(1.0, Math.abs(a9), Math.abs(b9)) && Math.abs(a10 - b10) <= EPSILON * Maths.max(1.0, Math.abs(a10), Math.abs(b10)) && Math.abs(a11 - b11) <= EPSILON * Maths.max(1.0, Math.abs(a11), Math.abs(b11)) && Math.abs(a12 - b12) <= EPSILON * Maths.max(1.0, Math.abs(a12), Math.abs(b12)) && Math.abs(a13 - b13) <= EPSILON * Maths.max(1.0, Math.abs(a13), Math.abs(b13)) && Math.abs(a14 - b14) <= EPSILON * Maths.max(1.0, Math.abs(a14), Math.abs(b14)) && Math.abs(a15 - b15) <= EPSILON * Maths.max(1.0, Math.abs(a15), Math.abs(b15)); + var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3]; + var a4 = a[4], a5 = a[5], a6 = a[6], a7 = a[7]; + var a8 = a[8], a9 = a[9], a10 = a[10], a11 = a[11]; + var a12 = a[12], a13 = a[13], a14 = a[14], a15 = a[15]; + var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3]; + var b4 = b[4], b5 = b[5], b6 = b[6], b7 = b[7]; + var b8 = b[8], b9 = b[9], b10 = b[10], b11 = b[11]; + var b12 = b[12], b13 = b[13], b14 = b[14], b15 = b[15]; + return (Math.abs(a0 - b0) <= + EPSILON * Maths.max(1.0, Math.abs(a0), Math.abs(b0)) && + Math.abs(a1 - b1) <= + EPSILON * Maths.max(1.0, Math.abs(a1), Math.abs(b1)) && + Math.abs(a2 - b2) <= + EPSILON * Maths.max(1.0, Math.abs(a2), Math.abs(b2)) && + Math.abs(a3 - b3) <= + EPSILON * Maths.max(1.0, Math.abs(a3), Math.abs(b3)) && + Math.abs(a4 - b4) <= + EPSILON * Maths.max(1.0, Math.abs(a4), Math.abs(b4)) && + Math.abs(a5 - b5) <= + EPSILON * Maths.max(1.0, Math.abs(a5), Math.abs(b5)) && + Math.abs(a6 - b6) <= + EPSILON * Maths.max(1.0, Math.abs(a6), Math.abs(b6)) && + Math.abs(a7 - b7) <= + EPSILON * Maths.max(1.0, Math.abs(a7), Math.abs(b7)) && + Math.abs(a8 - b8) <= + EPSILON * Maths.max(1.0, Math.abs(a8), Math.abs(b8)) && + Math.abs(a9 - b9) <= + EPSILON * Maths.max(1.0, Math.abs(a9), Math.abs(b9)) && + Math.abs(a10 - b10) <= + EPSILON * Maths.max(1.0, Math.abs(a10), Math.abs(b10)) && + Math.abs(a11 - b11) <= + EPSILON * Maths.max(1.0, Math.abs(a11), Math.abs(b11)) && + Math.abs(a12 - b12) <= + EPSILON * Maths.max(1.0, Math.abs(a12), Math.abs(b12)) && + Math.abs(a13 - b13) <= + EPSILON * Maths.max(1.0, Math.abs(a13), Math.abs(b13)) && + Math.abs(a14 - b14) <= + EPSILON * Maths.max(1.0, Math.abs(a14), Math.abs(b14)) && + Math.abs(a15 - b15) <= + EPSILON * Maths.max(1.0, Math.abs(a15), Math.abs(b15))); } /** * Alias for {@link mat4.multiply} * @function */ - var mul$5 = multiply$5; /** * Alias for {@link mat4.subtract} * @function */ - var sub$3 = subtract$3; var mat4 = /*#__PURE__*/Object.freeze({ @@ -3957,21 +3672,19 @@ THE SOFTWARE. * 3 Dimensional Vector * @module vec3 */ - /** * Creates a new, empty vec3 * * @returns {vec3} a new 3D vector */ - function create$4() { - var out = new Float64Array(3); //if (glMatrix.ARRAY_TYPE != Float32Array) { - - out[0] = 0; - out[1] = 0; - out[2] = 0; //} - - return out; + var out = new Float64Array(3); + //if (glMatrix.ARRAY_TYPE != Float32Array) { + out[0] = 0; + out[1] = 0; + out[2] = 0; + //} + return out; } /** * Creates a new vec3 initialized with values from an existing vector @@ -3979,13 +3692,12 @@ THE SOFTWARE. * @param {ReadonlyVec3} a vector to clone * @returns {vec3} a new 3D vector */ - function clone$4(a) { - var out = new Float64Array(3); - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - return out; + var out = new Float64Array(3); + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + return out; } /** * Calculates the length of a vec3 @@ -3993,12 +3705,11 @@ THE SOFTWARE. * @param {ReadonlyVec3} a vector to calculate length of * @returns {Number} length of a */ - function length$4(a) { - var x = a[0]; - var y = a[1]; - var z = a[2]; - return Maths.hypot(x, y, z); + var x = a[0]; + var y = a[1]; + var z = a[2]; + return Maths.hypot(x, y, z); } /** * Creates a new vec3 initialized with the given values @@ -4008,13 +3719,12 @@ THE SOFTWARE. * @param {Number} z Z component * @returns {vec3} a new 3D vector */ - function fromValues$4(x, y, z) { - var out = new Float64Array(3); - out[0] = x; - out[1] = y; - out[2] = z; - return out; + var out = new Float64Array(3); + out[0] = x; + out[1] = y; + out[2] = z; + return out; } /** * Copy the values from one vec3 to another @@ -4023,12 +3733,11 @@ THE SOFTWARE. * @param {ReadonlyVec3} a the source vector * @returns {vec3} out */ - function copy$4(out, a) { - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - return out; + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + return out; } /** * Set the components of a vec3 to the given values @@ -4039,12 +3748,11 @@ THE SOFTWARE. * @param {Number} z Z component * @returns {vec3} out */ - function set$4(out, x, y, z) { - out[0] = x; - out[1] = y; - out[2] = z; - return out; + out[0] = x; + out[1] = y; + out[2] = z; + return out; } /** * Adds two vec3's @@ -4054,12 +3762,11 @@ THE SOFTWARE. * @param {ReadonlyVec3} b the second operand * @returns {vec3} out */ - function add$4(out, a, b) { - out[0] = a[0] + b[0]; - out[1] = a[1] + b[1]; - out[2] = a[2] + b[2]; - return out; + out[0] = a[0] + b[0]; + out[1] = a[1] + b[1]; + out[2] = a[2] + b[2]; + return out; } /** * Subtracts vector b from vector a @@ -4069,12 +3776,11 @@ THE SOFTWARE. * @param {ReadonlyVec3} b the second operand * @returns {vec3} out */ - function subtract$2(out, a, b) { - out[0] = a[0] - b[0]; - out[1] = a[1] - b[1]; - out[2] = a[2] - b[2]; - return out; + out[0] = a[0] - b[0]; + out[1] = a[1] - b[1]; + out[2] = a[2] - b[2]; + return out; } /** * Multiplies two vec3's @@ -4084,12 +3790,11 @@ THE SOFTWARE. * @param {ReadonlyVec3} b the second operand * @returns {vec3} out */ - function multiply$4(out, a, b) { - out[0] = a[0] * b[0]; - out[1] = a[1] * b[1]; - out[2] = a[2] * b[2]; - return out; + out[0] = a[0] * b[0]; + out[1] = a[1] * b[1]; + out[2] = a[2] * b[2]; + return out; } /** * Divides two vec3's @@ -4099,12 +3804,11 @@ THE SOFTWARE. * @param {ReadonlyVec3} b the second operand * @returns {vec3} out */ - function divide$2(out, a, b) { - out[0] = a[0] / b[0]; - out[1] = a[1] / b[1]; - out[2] = a[2] / b[2]; - return out; + out[0] = a[0] / b[0]; + out[1] = a[1] / b[1]; + out[2] = a[2] / b[2]; + return out; } /** * Math.ceil the components of a vec3 @@ -4113,12 +3817,11 @@ THE SOFTWARE. * @param {ReadonlyVec3} a vector to ceil * @returns {vec3} out */ - function ceil$2(out, a) { - out[0] = Math.ceil(a[0]); - out[1] = Math.ceil(a[1]); - out[2] = Math.ceil(a[2]); - return out; + out[0] = Math.ceil(a[0]); + out[1] = Math.ceil(a[1]); + out[2] = Math.ceil(a[2]); + return out; } /** * Math.floor the components of a vec3 @@ -4127,12 +3830,11 @@ THE SOFTWARE. * @param {ReadonlyVec3} a vector to floor * @returns {vec3} out */ - function floor$2(out, a) { - out[0] = Math.floor(a[0]); - out[1] = Math.floor(a[1]); - out[2] = Math.floor(a[2]); - return out; + out[0] = Math.floor(a[0]); + out[1] = Math.floor(a[1]); + out[2] = Math.floor(a[2]); + return out; } /** * Returns the minimum of two vec3's @@ -4142,12 +3844,11 @@ THE SOFTWARE. * @param {ReadonlyVec3} b the second operand * @returns {vec3} out */ - function min$2(out, a, b) { - out[0] = Math.min(a[0], b[0]); - out[1] = Math.min(a[1], b[1]); - out[2] = Math.min(a[2], b[2]); - return out; + out[0] = Math.min(a[0], b[0]); + out[1] = Math.min(a[1], b[1]); + out[2] = Math.min(a[2], b[2]); + return out; } /** * Returns the maximum of two vec3's @@ -4157,12 +3858,11 @@ THE SOFTWARE. * @param {ReadonlyVec3} b the second operand * @returns {vec3} out */ - function max$2(out, a, b) { - out[0] = Math.max(a[0], b[0]); - out[1] = Math.max(a[1], b[1]); - out[2] = Math.max(a[2], b[2]); - return out; + out[0] = Math.max(a[0], b[0]); + out[1] = Math.max(a[1], b[1]); + out[2] = Math.max(a[2], b[2]); + return out; } /** * Math.round the components of a vec3 @@ -4171,12 +3871,11 @@ THE SOFTWARE. * @param {ReadonlyVec3} a vector to round * @returns {vec3} out */ - function round$2(out, a) { - out[0] = Math.round(a[0]); - out[1] = Math.round(a[1]); - out[2] = Math.round(a[2]); - return out; + out[0] = Math.round(a[0]); + out[1] = Math.round(a[1]); + out[2] = Math.round(a[2]); + return out; } /** * Scales a vec3 by a scalar number @@ -4186,12 +3885,11 @@ THE SOFTWARE. * @param {Number} b amount to scale the vector by * @returns {vec3} out */ - function scale$4(out, a, b) { - out[0] = a[0] * b; - out[1] = a[1] * b; - out[2] = a[2] * b; - return out; + out[0] = a[0] * b; + out[1] = a[1] * b; + out[2] = a[2] * b; + return out; } /** * Adds two vec3's after scaling the second operand by a scalar value @@ -4202,12 +3900,11 @@ THE SOFTWARE. * @param {Number} scale the amount to scale b by before adding * @returns {vec3} out */ - function scaleAndAdd$2(out, a, b, scale) { - out[0] = a[0] + b[0] * scale; - out[1] = a[1] + b[1] * scale; - out[2] = a[2] + b[2] * scale; - return out; + out[0] = a[0] + b[0] * scale; + out[1] = a[1] + b[1] * scale; + out[2] = a[2] + b[2] * scale; + return out; } /** * Calculates the euclidian distance between two vec3's @@ -4216,12 +3913,11 @@ THE SOFTWARE. * @param {ReadonlyVec3} b the second operand * @returns {Number} distance between a and b */ - function distance$2(a, b) { - var x = b[0] - a[0]; - var y = b[1] - a[1]; - var z = b[2] - a[2]; - return Maths.hypot(x, y, z); + var x = b[0] - a[0]; + var y = b[1] - a[1]; + var z = b[2] - a[2]; + return Maths.hypot(x, y, z); } /** * Calculates the squared euclidian distance between two vec3's @@ -4230,12 +3926,11 @@ THE SOFTWARE. * @param {ReadonlyVec3} b the second operand * @returns {Number} squared distance between a and b */ - function squaredDistance$2(a, b) { - var x = b[0] - a[0]; - var y = b[1] - a[1]; - var z = b[2] - a[2]; - return x * x + y * y + z * z; + var x = b[0] - a[0]; + var y = b[1] - a[1]; + var z = b[2] - a[2]; + return x * x + y * y + z * z; } /** * Calculates the squared length of a vec3 @@ -4243,12 +3938,11 @@ THE SOFTWARE. * @param {ReadonlyVec3} a vector to calculate squared length of * @returns {Number} squared length of a */ - function squaredLength$4(a) { - var x = a[0]; - var y = a[1]; - var z = a[2]; - return x * x + y * y + z * z; + var x = a[0]; + var y = a[1]; + var z = a[2]; + return x * x + y * y + z * z; } /** * Negates the components of a vec3 @@ -4257,12 +3951,11 @@ THE SOFTWARE. * @param {ReadonlyVec3} a vector to negate * @returns {vec3} out */ - function negate$2(out, a) { - out[0] = -a[0]; - out[1] = -a[1]; - out[2] = -a[2]; - return out; + out[0] = -a[0]; + out[1] = -a[1]; + out[2] = -a[2]; + return out; } /** * Returns the inverse of the components of a vec3 @@ -4271,12 +3964,11 @@ THE SOFTWARE. * @param {ReadonlyVec3} a vector to invert * @returns {vec3} out */ - function inverse$2(out, a) { - out[0] = 1.0 / a[0]; - out[1] = 1.0 / a[1]; - out[2] = 1.0 / a[2]; - return out; + out[0] = 1.0 / a[0]; + out[1] = 1.0 / a[1]; + out[2] = 1.0 / a[2]; + return out; } /** * Normalize a vec3 @@ -4285,22 +3977,19 @@ THE SOFTWARE. * @param {ReadonlyVec3} a vector to normalize * @returns {vec3} out */ - function normalize$4(out, a) { - var x = a[0]; - var y = a[1]; - var z = a[2]; - var len = x * x + y * y + z * z; - - if (len > 0) { - //TODO: evaluate use of glm_invsqrt here? - len = 1 / Math.sqrt(len); - } - - out[0] = a[0] * len; - out[1] = a[1] * len; - out[2] = a[2] * len; - return out; + var x = a[0]; + var y = a[1]; + var z = a[2]; + var len = x * x + y * y + z * z; + if (len > 0) { + //TODO: evaluate use of glm_invsqrt here? + len = 1 / Math.sqrt(len); + } + out[0] = a[0] * len; + out[1] = a[1] * len; + out[2] = a[2] * len; + return out; } /** * Calculates the dot product of two vec3's @@ -4309,9 +3998,8 @@ THE SOFTWARE. * @param {ReadonlyVec3} b the second operand * @returns {Number} dot product of a and b */ - function dot$4(a, b) { - return a[0] * b[0] + a[1] * b[1] + a[2] * b[2]; + return a[0] * b[0] + a[1] * b[1] + a[2] * b[2]; } /** * Computes the cross product of two vec3's @@ -4321,18 +4009,13 @@ THE SOFTWARE. * @param {ReadonlyVec3} b the second operand * @returns {vec3} out */ - function cross$2(out, a, b) { - var ax = a[0], - ay = a[1], - az = a[2]; - var bx = b[0], - by = b[1], - bz = b[2]; - out[0] = ay * bz - az * by; - out[1] = az * bx - ax * bz; - out[2] = ax * by - ay * bx; - return out; + var ax = a[0], ay = a[1], az = a[2]; + var bx = b[0], by = b[1], bz = b[2]; + out[0] = ay * bz - az * by; + out[1] = az * bx - ax * bz; + out[2] = ax * by - ay * bx; + return out; } /** * Performs a linear interpolation between two vec3's @@ -4343,15 +4026,14 @@ THE SOFTWARE. * @param {Number} t interpolation amount, in the range [0-1], between the two inputs * @returns {vec3} out */ - function lerp$4(out, a, b, t) { - var ax = a[0]; - var ay = a[1]; - var az = a[2]; - out[0] = ax + t * (b[0] - ax); - out[1] = ay + t * (b[1] - ay); - out[2] = az + t * (b[2] - az); - return out; + var ax = a[0]; + var ay = a[1]; + var az = a[2]; + out[0] = ax + t * (b[0] - ax); + out[1] = ay + t * (b[1] - ay); + out[2] = az + t * (b[2] - az); + return out; } /** * Performs a spherical linear interpolation between two vec3's @@ -4362,16 +4044,15 @@ THE SOFTWARE. * @param {Number} t interpolation amount, in the range [0-1], between the two inputs * @returns {vec3} out */ - function slerp$1(out, a, b, t) { - var angle = Math.acos(Math.min(Math.max(dot$4(a, b), -1), 1)); - var sinTotal = Math.sin(angle); - var ratioA = Math.sin((1 - t) * angle) / sinTotal; - var ratioB = Math.sin(t * angle) / sinTotal; - out[0] = ratioA * a[0] + ratioB * b[0]; - out[1] = ratioA * a[1] + ratioB * b[1]; - out[2] = ratioA * a[2] + ratioB * b[2]; - return out; + var angle = Math.acos(Math.min(Math.max(dot$4(a, b), -1), 1)); + var sinTotal = Math.sin(angle); + var ratioA = Math.sin((1 - t) * angle) / sinTotal; + var ratioB = Math.sin(t * angle) / sinTotal; + out[0] = ratioA * a[0] + ratioB * b[0]; + out[1] = ratioA * a[1] + ratioB * b[1]; + out[2] = ratioA * a[2] + ratioB * b[2]; + return out; } /** * Performs a hermite interpolation with two control points @@ -4384,17 +4065,16 @@ THE SOFTWARE. * @param {Number} t interpolation amount, in the range [0-1], between the two inputs * @returns {vec3} out */ - function hermite(out, a, b, c, d, t) { - var factorTimes2 = t * t; - var factor1 = factorTimes2 * (2 * t - 3) + 1; - var factor2 = factorTimes2 * (t - 2) + t; - var factor3 = factorTimes2 * (t - 1); - var factor4 = factorTimes2 * (3 - 2 * t); - out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4; - out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4; - out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4; - return out; + var factorTimes2 = t * t; + var factor1 = factorTimes2 * (2 * t - 3) + 1; + var factor2 = factorTimes2 * (t - 2) + t; + var factor3 = factorTimes2 * (t - 1); + var factor4 = factorTimes2 * (3 - 2 * t); + out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4; + out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4; + out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4; + return out; } /** * Performs a bezier interpolation with two control points @@ -4407,19 +4087,18 @@ THE SOFTWARE. * @param {Number} t interpolation amount, in the range [0-1], between the two inputs * @returns {vec3} out */ - function bezier(out, a, b, c, d, t) { - var inverseFactor = 1 - t; - var inverseFactorTimesTwo = inverseFactor * inverseFactor; - var factorTimes2 = t * t; - var factor1 = inverseFactorTimesTwo * inverseFactor; - var factor2 = 3 * t * inverseFactorTimesTwo; - var factor3 = 3 * factorTimes2 * inverseFactor; - var factor4 = factorTimes2 * t; - out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4; - out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4; - out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4; - return out; + var inverseFactor = 1 - t; + var inverseFactorTimesTwo = inverseFactor * inverseFactor; + var factorTimes2 = t * t; + var factor1 = inverseFactorTimesTwo * inverseFactor; + var factor2 = 3 * t * inverseFactorTimesTwo; + var factor3 = 3 * factorTimes2 * inverseFactor; + var factor4 = factorTimes2 * t; + out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4; + out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4; + out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4; + return out; } /** * Generates a random vector with the given scale @@ -4428,16 +4107,15 @@ THE SOFTWARE. * @param {Number} [scale] Length of the resulting vector. If omitted, a unit vector will be returned * @returns {vec3} out */ - function random$3(out, scale) { - scale = scale || 1.0; - var r = RANDOM() * 2.0 * Math.PI; - var z = RANDOM() * 2.0 - 1.0; - var zScale = Math.sqrt(1.0 - z * z) * scale; - out[0] = Math.cos(r) * zScale; - out[1] = Math.sin(r) * zScale; - out[2] = z * scale; - return out; + scale = scale || 1.0; + var r = RANDOM() * 2.0 * Math.PI; + var z = RANDOM() * 2.0 - 1.0; + var zScale = Math.sqrt(1.0 - z * z) * scale; + out[0] = Math.cos(r) * zScale; + out[1] = Math.sin(r) * zScale; + out[2] = z * scale; + return out; } /** * Transforms the vec3 with a mat4. @@ -4448,17 +4126,14 @@ THE SOFTWARE. * @param {ReadonlyMat4} m matrix to transform with * @returns {vec3} out */ - function transformMat4$2(out, a, m) { - var x = a[0], - y = a[1], - z = a[2]; - var w = m[3] * x + m[7] * y + m[11] * z + m[15]; - w = w || 1.0; - out[0] = (m[0] * x + m[4] * y + m[8] * z + m[12]) / w; - out[1] = (m[1] * x + m[5] * y + m[9] * z + m[13]) / w; - out[2] = (m[2] * x + m[6] * y + m[10] * z + m[14]) / w; - return out; + var x = a[0], y = a[1], z = a[2]; + var w = m[3] * x + m[7] * y + m[11] * z + m[15]; + w = w || 1.0; + out[0] = (m[0] * x + m[4] * y + m[8] * z + m[12]) / w; + out[1] = (m[1] * x + m[5] * y + m[9] * z + m[13]) / w; + out[2] = (m[2] * x + m[6] * y + m[10] * z + m[14]) / w; + return out; } /** * Transforms the vec3 with a mat3. @@ -4468,15 +4143,12 @@ THE SOFTWARE. * @param {ReadonlyMat3} m the 3x3 matrix to transform with * @returns {vec3} out */ - function transformMat3$1(out, a, m) { - var x = a[0], - y = a[1], - z = a[2]; - out[0] = x * m[0] + y * m[3] + z * m[6]; - out[1] = x * m[1] + y * m[4] + z * m[7]; - out[2] = x * m[2] + y * m[5] + z * m[8]; - return out; + var x = a[0], y = a[1], z = a[2]; + out[0] = x * m[0] + y * m[3] + z * m[6]; + out[1] = x * m[1] + y * m[4] + z * m[7]; + out[2] = x * m[2] + y * m[5] + z * m[8]; + return out; } /** * Transforms the vec3 with a quat @@ -4487,39 +4159,29 @@ THE SOFTWARE. * @param {ReadonlyQuat} q quaternion to transform with * @returns {vec3} out */ - function transformQuat$1(out, a, q) { - // benchmarks: https://jsperf.com/quaternion-transform-vec3-implementations-fixed - var qx = q[0], - qy = q[1], - qz = q[2], - qw = q[3]; - var x = a[0], - y = a[1], - z = a[2]; // var qvec = [qx, qy, qz]; - // var uv = vec3.cross([], qvec, a); - - var uvx = qy * z - qz * y, - uvy = qz * x - qx * z, - uvz = qx * y - qy * x; // var uuv = vec3.cross([], qvec, uv); - - var uuvx = qy * uvz - qz * uvy, - uuvy = qz * uvx - qx * uvz, - uuvz = qx * uvy - qy * uvx; // vec3.scale(uv, uv, 2 * w); - - var w2 = qw * 2; - uvx *= w2; - uvy *= w2; - uvz *= w2; // vec3.scale(uuv, uuv, 2); - - uuvx *= 2; - uuvy *= 2; - uuvz *= 2; // return vec3.add(out, a, vec3.add(out, uv, uuv)); - - out[0] = x + uvx + uuvx; - out[1] = y + uvy + uuvy; - out[2] = z + uvz + uuvz; - return out; + // benchmarks: https://jsperf.com/quaternion-transform-vec3-implementations-fixed + var qx = q[0], qy = q[1], qz = q[2], qw = q[3]; + var x = a[0], y = a[1], z = a[2]; + // var qvec = [qx, qy, qz]; + // var uv = vec3.cross([], qvec, a); + var uvx = qy * z - qz * y, uvy = qz * x - qx * z, uvz = qx * y - qy * x; + // var uuv = vec3.cross([], qvec, uv); + var uuvx = qy * uvz - qz * uvy, uuvy = qz * uvx - qx * uvz, uuvz = qx * uvy - qy * uvx; + // vec3.scale(uv, uv, 2 * w); + var w2 = qw * 2; + uvx *= w2; + uvy *= w2; + uvz *= w2; + // vec3.scale(uuv, uuv, 2); + uuvx *= 2; + uuvy *= 2; + uuvz *= 2; + // return vec3.add(out, a, vec3.add(out, uv, uuv)); + out[0] = x + uvx + uuvx; + out[1] = y + uvy + uuvy; + out[2] = z + uvz + uuvz; + return out; } /** * Rotate a 3D vector around the x-axis @@ -4529,23 +4191,21 @@ THE SOFTWARE. * @param {Number} rad The angle of rotation in radians * @returns {vec3} out */ - function rotateX$2(out, a, b, rad) { - var p = [], - r = []; //Translate point to the origin - - p[0] = a[0] - b[0]; - p[1] = a[1] - b[1]; - p[2] = a[2] - b[2]; //perform rotation - - r[0] = p[0]; - r[1] = p[1] * Math.cos(rad) - p[2] * Math.sin(rad); - r[2] = p[1] * Math.sin(rad) + p[2] * Math.cos(rad); //translate to correct position - - out[0] = r[0] + b[0]; - out[1] = r[1] + b[1]; - out[2] = r[2] + b[2]; - return out; + var p = [], r = []; + //Translate point to the origin + p[0] = a[0] - b[0]; + p[1] = a[1] - b[1]; + p[2] = a[2] - b[2]; + //perform rotation + r[0] = p[0]; + r[1] = p[1] * Math.cos(rad) - p[2] * Math.sin(rad); + r[2] = p[1] * Math.sin(rad) + p[2] * Math.cos(rad); + //translate to correct position + out[0] = r[0] + b[0]; + out[1] = r[1] + b[1]; + out[2] = r[2] + b[2]; + return out; } /** * Rotate a 3D vector around the y-axis @@ -4555,23 +4215,21 @@ THE SOFTWARE. * @param {Number} rad The angle of rotation in radians * @returns {vec3} out */ - function rotateY$2(out, a, b, rad) { - var p = [], - r = []; //Translate point to the origin - - p[0] = a[0] - b[0]; - p[1] = a[1] - b[1]; - p[2] = a[2] - b[2]; //perform rotation - - r[0] = p[2] * Math.sin(rad) + p[0] * Math.cos(rad); - r[1] = p[1]; - r[2] = p[2] * Math.cos(rad) - p[0] * Math.sin(rad); //translate to correct position - - out[0] = r[0] + b[0]; - out[1] = r[1] + b[1]; - out[2] = r[2] + b[2]; - return out; + var p = [], r = []; + //Translate point to the origin + p[0] = a[0] - b[0]; + p[1] = a[1] - b[1]; + p[2] = a[2] - b[2]; + //perform rotation + r[0] = p[2] * Math.sin(rad) + p[0] * Math.cos(rad); + r[1] = p[1]; + r[2] = p[2] * Math.cos(rad) - p[0] * Math.sin(rad); + //translate to correct position + out[0] = r[0] + b[0]; + out[1] = r[1] + b[1]; + out[2] = r[2] + b[2]; + return out; } /** * Rotate a 3D vector around the z-axis @@ -4581,23 +4239,21 @@ THE SOFTWARE. * @param {Number} rad The angle of rotation in radians * @returns {vec3} out */ - function rotateZ$2(out, a, b, rad) { - var p = [], - r = []; //Translate point to the origin - - p[0] = a[0] - b[0]; - p[1] = a[1] - b[1]; - p[2] = a[2] - b[2]; //perform rotation - - r[0] = p[0] * Math.cos(rad) - p[1] * Math.sin(rad); - r[1] = p[0] * Math.sin(rad) + p[1] * Math.cos(rad); - r[2] = p[2]; //translate to correct position - - out[0] = r[0] + b[0]; - out[1] = r[1] + b[1]; - out[2] = r[2] + b[2]; - return out; + var p = [], r = []; + //Translate point to the origin + p[0] = a[0] - b[0]; + p[1] = a[1] - b[1]; + p[2] = a[2] - b[2]; + //perform rotation + r[0] = p[0] * Math.cos(rad) - p[1] * Math.sin(rad); + r[1] = p[0] * Math.sin(rad) + p[1] * Math.cos(rad); + r[2] = p[2]; + //translate to correct position + out[0] = r[0] + b[0]; + out[1] = r[1] + b[1]; + out[2] = r[2] + b[2]; + return out; } /** * Get the angle between two 3D vectors @@ -4605,19 +4261,9 @@ THE SOFTWARE. * @param {ReadonlyVec3} b The second operand * @returns {Number} The angle in radians */ - function angle$1(a, b) { - var ax = a[0], - ay = a[1], - az = a[2], - bx = b[0], - by = b[1], - bz = b[2], - mag1 = Math.sqrt(ax * ax + ay * ay + az * az), - mag2 = Math.sqrt(bx * bx + by * by + bz * bz), - mag = mag1 * mag2, - cosine = mag && dot$4(a, b) / mag; - return Math.acos(Math.min(Math.max(cosine, -1), 1)); + var ax = a[0], ay = a[1], az = a[2], bx = b[0], by = b[1], bz = b[2], mag1 = Math.sqrt(ax * ax + ay * ay + az * az), mag2 = Math.sqrt(bx * bx + by * by + bz * bz), mag = mag1 * mag2, cosine = mag && dot$4(a, b) / mag; + return Math.acos(Math.min(Math.max(cosine, -1), 1)); } /** * Set the components of a vec3 to zero @@ -4625,12 +4271,11 @@ THE SOFTWARE. * @param {vec3} out the receiving vector * @returns {vec3} out */ - function zero$2(out) { - out[0] = 0.0; - out[1] = 0.0; - out[2] = 0.0; - return out; + out[0] = 0.0; + out[1] = 0.0; + out[2] = 0.0; + return out; } /** * Returns a string representation of a vector @@ -4638,9 +4283,8 @@ THE SOFTWARE. * @param {ReadonlyVec3} a vector to represent as a string * @returns {String} string representation of the vector */ - function str$4(a) { - return "vec3(" + a[0].toString() + ", " + a[1].toString() + ", " + a[2].toString() + ")"; + return "vec3(" + a[0].toString() + ", " + a[1].toString() + ", " + a[2].toString() + ")"; } /** * Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===) @@ -4649,9 +4293,8 @@ THE SOFTWARE. * @param {ReadonlyVec3} b The second vector. * @returns {Boolean} True if the vectors are equal, false otherwise. */ - function exactEquals$4(a, b) { - return a[0] === b[0] && a[1] === b[1] && a[2] === b[2]; + return a[0] === b[0] && a[1] === b[1] && a[2] === b[2]; } /** * Returns whether or not the vectors have approximately the same elements in the same position. @@ -4660,57 +4303,50 @@ THE SOFTWARE. * @param {ReadonlyVec3} b The second vector. * @returns {Boolean} True if the vectors are equal, false otherwise. */ - function equals$4(a, b) { - var a0 = a[0], - a1 = a[1], - a2 = a[2]; - var b0 = b[0], - b1 = b[1], - b2 = b[2]; - return Math.abs(a0 - b0) <= EPSILON * Maths.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= EPSILON * Maths.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= EPSILON * Maths.max(1.0, Math.abs(a2), Math.abs(b2)); + var a0 = a[0], a1 = a[1], a2 = a[2]; + var b0 = b[0], b1 = b[1], b2 = b[2]; + return (Math.abs(a0 - b0) <= + EPSILON * Maths.max(1.0, Math.abs(a0), Math.abs(b0)) && + Math.abs(a1 - b1) <= + EPSILON * Maths.max(1.0, Math.abs(a1), Math.abs(b1)) && + Math.abs(a2 - b2) <= + EPSILON * Maths.max(1.0, Math.abs(a2), Math.abs(b2))); } /** * Alias for {@link vec3.subtract} * @function */ - var sub$2 = subtract$2; /** * Alias for {@link vec3.multiply} * @function */ - var mul$4 = multiply$4; /** * Alias for {@link vec3.divide} * @function */ - var div$2 = divide$2; /** * Alias for {@link vec3.distance} * @function */ - var dist$2 = distance$2; /** * Alias for {@link vec3.squaredDistance} * @function */ - var sqrDist$2 = squaredDistance$2; /** * Alias for {@link vec3.length} * @function */ - var len$4 = length$4; /** * Alias for {@link vec3.squaredLength} * @function */ - var sqrLen$4 = squaredLength$4; /** * Perform some operation over an array of vec3s. @@ -4724,39 +4360,34 @@ THE SOFTWARE. * @returns {Array} a * @function */ - var vec$2 = create$4(); - var forEach$2 = function () { - return function (a, stride, offset, count, fn, arg) { - var i, l; - - if (!stride) { - stride = 3; - } - - if (!offset) { - offset = 0; - } - - if (count) { - l = Maths.min(count * stride + offset, a.length); - } else { - l = a.length; - } - - for (i = offset; i < l; i += stride) { - vec$2[0] = a[i]; - vec$2[1] = a[i + 1]; - vec$2[2] = a[i + 2]; - fn(vec$2, vec$2, arg); - a[i] = vec$2[0]; - a[i + 1] = vec$2[1]; - a[i + 2] = vec$2[2]; - } - - return a; - }; - }(); + var forEach$2 = (function () { + return function (a, stride, offset, count, fn, arg) { + var i, l; + if (!stride) { + stride = 3; + } + if (!offset) { + offset = 0; + } + if (count) { + l = Maths.min(count * stride + offset, a.length); + } + else { + l = a.length; + } + for (i = offset; i < l; i += stride) { + vec$2[0] = a[i]; + vec$2[1] = a[i + 1]; + vec$2[2] = a[i + 2]; + fn(vec$2, vec$2, arg); + a[i] = vec$2[0]; + a[i + 1] = vec$2[1]; + a[i + 2] = vec$2[2]; + } + return a; + }; + })(); var vec3 = /*#__PURE__*/Object.freeze({ __proto__: null, @@ -4815,22 +4446,20 @@ THE SOFTWARE. * 4 Dimensional Vector * @module vec4 */ - /** * Creates a new, empty vec4 * * @returns {vec4} a new 4D vector */ - function create$3() { - var out = new Float64Array(4); //if (glMatrix.ARRAY_TYPE != Float32Array) { - - out[0] = 0; - out[1] = 0; - out[2] = 0; - out[3] = 0; //} - - return out; + var out = new Float64Array(4); + //if (glMatrix.ARRAY_TYPE != Float32Array) { + out[0] = 0; + out[1] = 0; + out[2] = 0; + out[3] = 0; + //} + return out; } /** * Creates a new vec4 initialized with values from an existing vector @@ -4838,14 +4467,13 @@ THE SOFTWARE. * @param {ReadonlyVec4} a vector to clone * @returns {vec4} a new 4D vector */ - function clone$3(a) { - var out = new Float64Array(4); - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - return out; + var out = new Float64Array(4); + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[3]; + return out; } /** * Creates a new vec4 initialized with the given values @@ -4856,14 +4484,13 @@ THE SOFTWARE. * @param {Number} w W component * @returns {vec4} a new 4D vector */ - function fromValues$3(x, y, z, w) { - var out = new Float64Array(4); - out[0] = x; - out[1] = y; - out[2] = z; - out[3] = w; - return out; + var out = new Float64Array(4); + out[0] = x; + out[1] = y; + out[2] = z; + out[3] = w; + return out; } /** * Copy the values from one vec4 to another @@ -4872,13 +4499,12 @@ THE SOFTWARE. * @param {ReadonlyVec4} a the source vector * @returns {vec4} out */ - function copy$3(out, a) { - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - return out; + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[3]; + return out; } /** * Set the components of a vec4 to the given values @@ -4890,13 +4516,12 @@ THE SOFTWARE. * @param {Number} w W component * @returns {vec4} out */ - function set$3(out, x, y, z, w) { - out[0] = x; - out[1] = y; - out[2] = z; - out[3] = w; - return out; + out[0] = x; + out[1] = y; + out[2] = z; + out[3] = w; + return out; } /** * Adds two vec4's @@ -4906,13 +4531,12 @@ THE SOFTWARE. * @param {ReadonlyVec4} b the second operand * @returns {vec4} out */ - function add$3(out, a, b) { - out[0] = a[0] + b[0]; - out[1] = a[1] + b[1]; - out[2] = a[2] + b[2]; - out[3] = a[3] + b[3]; - return out; + out[0] = a[0] + b[0]; + out[1] = a[1] + b[1]; + out[2] = a[2] + b[2]; + out[3] = a[3] + b[3]; + return out; } /** * Subtracts vector b from vector a @@ -4922,13 +4546,12 @@ THE SOFTWARE. * @param {ReadonlyVec4} b the second operand * @returns {vec4} out */ - function subtract$1(out, a, b) { - out[0] = a[0] - b[0]; - out[1] = a[1] - b[1]; - out[2] = a[2] - b[2]; - out[3] = a[3] - b[3]; - return out; + out[0] = a[0] - b[0]; + out[1] = a[1] - b[1]; + out[2] = a[2] - b[2]; + out[3] = a[3] - b[3]; + return out; } /** * Multiplies two vec4's @@ -4938,13 +4561,12 @@ THE SOFTWARE. * @param {ReadonlyVec4} b the second operand * @returns {vec4} out */ - function multiply$3(out, a, b) { - out[0] = a[0] * b[0]; - out[1] = a[1] * b[1]; - out[2] = a[2] * b[2]; - out[3] = a[3] * b[3]; - return out; + out[0] = a[0] * b[0]; + out[1] = a[1] * b[1]; + out[2] = a[2] * b[2]; + out[3] = a[3] * b[3]; + return out; } /** * Divides two vec4's @@ -4954,13 +4576,12 @@ THE SOFTWARE. * @param {ReadonlyVec4} b the second operand * @returns {vec4} out */ - function divide$1(out, a, b) { - out[0] = a[0] / b[0]; - out[1] = a[1] / b[1]; - out[2] = a[2] / b[2]; - out[3] = a[3] / b[3]; - return out; + out[0] = a[0] / b[0]; + out[1] = a[1] / b[1]; + out[2] = a[2] / b[2]; + out[3] = a[3] / b[3]; + return out; } /** * Math.ceil the components of a vec4 @@ -4969,13 +4590,12 @@ THE SOFTWARE. * @param {ReadonlyVec4} a vector to ceil * @returns {vec4} out */ - function ceil$1(out, a) { - out[0] = Math.ceil(a[0]); - out[1] = Math.ceil(a[1]); - out[2] = Math.ceil(a[2]); - out[3] = Math.ceil(a[3]); - return out; + out[0] = Math.ceil(a[0]); + out[1] = Math.ceil(a[1]); + out[2] = Math.ceil(a[2]); + out[3] = Math.ceil(a[3]); + return out; } /** * Math.floor the components of a vec4 @@ -4984,13 +4604,12 @@ THE SOFTWARE. * @param {ReadonlyVec4} a vector to floor * @returns {vec4} out */ - function floor$1(out, a) { - out[0] = Math.floor(a[0]); - out[1] = Math.floor(a[1]); - out[2] = Math.floor(a[2]); - out[3] = Math.floor(a[3]); - return out; + out[0] = Math.floor(a[0]); + out[1] = Math.floor(a[1]); + out[2] = Math.floor(a[2]); + out[3] = Math.floor(a[3]); + return out; } /** * Returns the minimum of two vec4's @@ -5000,13 +4619,12 @@ THE SOFTWARE. * @param {ReadonlyVec4} b the second operand * @returns {vec4} out */ - function min$1(out, a, b) { - out[0] = Math.min(a[0], b[0]); - out[1] = Math.min(a[1], b[1]); - out[2] = Math.min(a[2], b[2]); - out[3] = Math.min(a[3], b[3]); - return out; + out[0] = Math.min(a[0], b[0]); + out[1] = Math.min(a[1], b[1]); + out[2] = Math.min(a[2], b[2]); + out[3] = Math.min(a[3], b[3]); + return out; } /** * Returns the maximum of two vec4's @@ -5016,13 +4634,12 @@ THE SOFTWARE. * @param {ReadonlyVec4} b the second operand * @returns {vec4} out */ - function max$1(out, a, b) { - out[0] = Math.max(a[0], b[0]); - out[1] = Math.max(a[1], b[1]); - out[2] = Math.max(a[2], b[2]); - out[3] = Math.max(a[3], b[3]); - return out; + out[0] = Math.max(a[0], b[0]); + out[1] = Math.max(a[1], b[1]); + out[2] = Math.max(a[2], b[2]); + out[3] = Math.max(a[3], b[3]); + return out; } /** * Math.round the components of a vec4 @@ -5031,13 +4648,12 @@ THE SOFTWARE. * @param {ReadonlyVec4} a vector to round * @returns {vec4} out */ - function round$1(out, a) { - out[0] = Math.round(a[0]); - out[1] = Math.round(a[1]); - out[2] = Math.round(a[2]); - out[3] = Math.round(a[3]); - return out; + out[0] = Math.round(a[0]); + out[1] = Math.round(a[1]); + out[2] = Math.round(a[2]); + out[3] = Math.round(a[3]); + return out; } /** * Scales a vec4 by a scalar number @@ -5047,13 +4663,12 @@ THE SOFTWARE. * @param {Number} b amount to scale the vector by * @returns {vec4} out */ - function scale$3(out, a, b) { - out[0] = a[0] * b; - out[1] = a[1] * b; - out[2] = a[2] * b; - out[3] = a[3] * b; - return out; + out[0] = a[0] * b; + out[1] = a[1] * b; + out[2] = a[2] * b; + out[3] = a[3] * b; + return out; } /** * Adds two vec4's after scaling the second operand by a scalar value @@ -5064,13 +4679,12 @@ THE SOFTWARE. * @param {Number} scale the amount to scale b by before adding * @returns {vec4} out */ - function scaleAndAdd$1(out, a, b, scale) { - out[0] = a[0] + b[0] * scale; - out[1] = a[1] + b[1] * scale; - out[2] = a[2] + b[2] * scale; - out[3] = a[3] + b[3] * scale; - return out; + out[0] = a[0] + b[0] * scale; + out[1] = a[1] + b[1] * scale; + out[2] = a[2] + b[2] * scale; + out[3] = a[3] + b[3] * scale; + return out; } /** * Calculates the euclidian distance between two vec4's @@ -5079,13 +4693,12 @@ THE SOFTWARE. * @param {ReadonlyVec4} b the second operand * @returns {Number} distance between a and b */ - function distance$1(a, b) { - var x = b[0] - a[0]; - var y = b[1] - a[1]; - var z = b[2] - a[2]; - var w = b[3] - a[3]; - return Maths.hypot(x, y, z, w); + var x = b[0] - a[0]; + var y = b[1] - a[1]; + var z = b[2] - a[2]; + var w = b[3] - a[3]; + return Maths.hypot(x, y, z, w); } /** * Calculates the squared euclidian distance between two vec4's @@ -5094,13 +4707,12 @@ THE SOFTWARE. * @param {ReadonlyVec4} b the second operand * @returns {Number} squared distance between a and b */ - function squaredDistance$1(a, b) { - var x = b[0] - a[0]; - var y = b[1] - a[1]; - var z = b[2] - a[2]; - var w = b[3] - a[3]; - return x * x + y * y + z * z + w * w; + var x = b[0] - a[0]; + var y = b[1] - a[1]; + var z = b[2] - a[2]; + var w = b[3] - a[3]; + return x * x + y * y + z * z + w * w; } /** * Calculates the length of a vec4 @@ -5108,13 +4720,12 @@ THE SOFTWARE. * @param {ReadonlyVec4} a vector to calculate length of * @returns {Number} length of a */ - function length$3(a) { - var x = a[0]; - var y = a[1]; - var z = a[2]; - var w = a[3]; - return Maths.hypot(x, y, z, w); + var x = a[0]; + var y = a[1]; + var z = a[2]; + var w = a[3]; + return Maths.hypot(x, y, z, w); } /** * Calculates the squared length of a vec4 @@ -5122,13 +4733,12 @@ THE SOFTWARE. * @param {ReadonlyVec4} a vector to calculate squared length of * @returns {Number} squared length of a */ - function squaredLength$3(a) { - var x = a[0]; - var y = a[1]; - var z = a[2]; - var w = a[3]; - return x * x + y * y + z * z + w * w; + var x = a[0]; + var y = a[1]; + var z = a[2]; + var w = a[3]; + return x * x + y * y + z * z + w * w; } /** * Negates the components of a vec4 @@ -5137,13 +4747,12 @@ THE SOFTWARE. * @param {ReadonlyVec4} a vector to negate * @returns {vec4} out */ - function negate$1(out, a) { - out[0] = -a[0]; - out[1] = -a[1]; - out[2] = -a[2]; - out[3] = -a[3]; - return out; + out[0] = -a[0]; + out[1] = -a[1]; + out[2] = -a[2]; + out[3] = -a[3]; + return out; } /** * Returns the inverse of the components of a vec4 @@ -5152,13 +4761,12 @@ THE SOFTWARE. * @param {ReadonlyVec4} a vector to invert * @returns {vec4} out */ - function inverse$1(out, a) { - out[0] = 1.0 / a[0]; - out[1] = 1.0 / a[1]; - out[2] = 1.0 / a[2]; - out[3] = 1.0 / a[3]; - return out; + out[0] = 1.0 / a[0]; + out[1] = 1.0 / a[1]; + out[2] = 1.0 / a[2]; + out[3] = 1.0 / a[3]; + return out; } /** * Normalize a vec4 @@ -5167,23 +4775,20 @@ THE SOFTWARE. * @param {ReadonlyVec4} a vector to normalize * @returns {vec4} out */ - function normalize$3(out, a) { - var x = a[0]; - var y = a[1]; - var z = a[2]; - var w = a[3]; - var len = x * x + y * y + z * z + w * w; - - if (len > 0) { - len = 1 / Math.sqrt(len); - } - - out[0] = x * len; - out[1] = y * len; - out[2] = z * len; - out[3] = w * len; - return out; + var x = a[0]; + var y = a[1]; + var z = a[2]; + var w = a[3]; + var len = x * x + y * y + z * z + w * w; + if (len > 0) { + len = 1 / Math.sqrt(len); + } + out[0] = x * len; + out[1] = y * len; + out[2] = z * len; + out[3] = w * len; + return out; } /** * Calculates the dot product of two vec4's @@ -5192,9 +4797,8 @@ THE SOFTWARE. * @param {ReadonlyVec4} b the second operand * @returns {Number} dot product of a and b */ - function dot$3(a, b) { - return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3]; + return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3]; } /** * Returns the cross-product of three vectors in a 4-dimensional space @@ -5205,23 +4809,17 @@ THE SOFTWARE. * @param {ReadonlyVec4} w the third vector * @returns {vec4} out */ - function cross$1(out, u, v, w) { - var A = v[0] * w[1] - v[1] * w[0], - B = v[0] * w[2] - v[2] * w[0], - C = v[0] * w[3] - v[3] * w[0], - D = v[1] * w[2] - v[2] * w[1], - E = v[1] * w[3] - v[3] * w[1], - F = v[2] * w[3] - v[3] * w[2]; - var G = u[0]; - var H = u[1]; - var I = u[2]; - var J = u[3]; - out[0] = H * F - I * E + J * D; - out[1] = -(G * F) + I * C - J * B; - out[2] = G * E - H * C + J * A; - out[3] = -(G * D) + H * B - I * A; - return out; + var A = v[0] * w[1] - v[1] * w[0], B = v[0] * w[2] - v[2] * w[0], C = v[0] * w[3] - v[3] * w[0], D = v[1] * w[2] - v[2] * w[1], E = v[1] * w[3] - v[3] * w[1], F = v[2] * w[3] - v[3] * w[2]; + var G = u[0]; + var H = u[1]; + var I = u[2]; + var J = u[3]; + out[0] = H * F - I * E + J * D; + out[1] = -(G * F) + I * C - J * B; + out[2] = G * E - H * C + J * A; + out[3] = -(G * D) + H * B - I * A; + return out; } /** * Performs a linear interpolation between two vec4's @@ -5232,17 +4830,16 @@ THE SOFTWARE. * @param {Number} t interpolation amount, in the range [0-1], between the two inputs * @returns {vec4} out */ - function lerp$3(out, a, b, t) { - var ax = a[0]; - var ay = a[1]; - var az = a[2]; - var aw = a[3]; - out[0] = ax + t * (b[0] - ax); - out[1] = ay + t * (b[1] - ay); - out[2] = az + t * (b[2] - az); - out[3] = aw + t * (b[3] - aw); - return out; + var ax = a[0]; + var ay = a[1]; + var az = a[2]; + var aw = a[3]; + out[0] = ax + t * (b[0] - ax); + out[1] = ay + t * (b[1] - ay); + out[2] = az + t * (b[2] - az); + out[3] = aw + t * (b[3] - aw); + return out; } /** * Generates a random vector with the given scale @@ -5251,33 +4848,29 @@ THE SOFTWARE. * @param {Number} [scale] Length of the resulting vector. If omitted, a unit vector will be returned * @returns {vec4} out */ - function random$2(out, scale) { - scale = scale || 1.0; // Marsaglia, George. Choosing a Point from the Surface of a - // Sphere. Ann. Math. Statist. 43 (1972), no. 2, 645--646. - // http://projecteuclid.org/euclid.aoms/1177692644; - - var v1, v2, v3, v4; - var s1, s2; - - do { - v1 = RANDOM() * 2 - 1; - v2 = RANDOM() * 2 - 1; - s1 = v1 * v1 + v2 * v2; - } while (s1 >= 1); - - do { - v3 = RANDOM() * 2 - 1; - v4 = RANDOM() * 2 - 1; - s2 = v3 * v3 + v4 * v4; - } while (s2 >= 1); - - var d = Math.sqrt((1 - s1) / s2); - out[0] = scale * v1; - out[1] = scale * v2; - out[2] = scale * v3 * d; - out[3] = scale * v4 * d; - return out; + scale = scale || 1.0; + // Marsaglia, George. Choosing a Point from the Surface of a + // Sphere. Ann. Math. Statist. 43 (1972), no. 2, 645--646. + // http://projecteuclid.org/euclid.aoms/1177692644; + var v1, v2, v3, v4; + var s1, s2; + do { + v1 = RANDOM() * 2 - 1; + v2 = RANDOM() * 2 - 1; + s1 = v1 * v1 + v2 * v2; + } while (s1 >= 1); + do { + v3 = RANDOM() * 2 - 1; + v4 = RANDOM() * 2 - 1; + s2 = v3 * v3 + v4 * v4; + } while (s2 >= 1); + var d = Math.sqrt((1 - s1) / s2); + out[0] = scale * v1; + out[1] = scale * v2; + out[2] = scale * v3 * d; + out[3] = scale * v4 * d; + return out; } /** * Transforms the vec4 with a mat4. @@ -5287,17 +4880,13 @@ THE SOFTWARE. * @param {ReadonlyMat4} m matrix to transform with * @returns {vec4} out */ - function transformMat4$1(out, a, m) { - var x = a[0], - y = a[1], - z = a[2], - w = a[3]; - out[0] = m[0] * x + m[4] * y + m[8] * z + m[12] * w; - out[1] = m[1] * x + m[5] * y + m[9] * z + m[13] * w; - out[2] = m[2] * x + m[6] * y + m[10] * z + m[14] * w; - out[3] = m[3] * x + m[7] * y + m[11] * z + m[15] * w; - return out; + var x = a[0], y = a[1], z = a[2], w = a[3]; + out[0] = m[0] * x + m[4] * y + m[8] * z + m[12] * w; + out[1] = m[1] * x + m[5] * y + m[9] * z + m[13] * w; + out[2] = m[2] * x + m[6] * y + m[10] * z + m[14] * w; + out[3] = m[3] * x + m[7] * y + m[11] * z + m[15] * w; + return out; } /** * Transforms the vec4 with a quat @@ -5307,26 +4896,20 @@ THE SOFTWARE. * @param {ReadonlyQuat} q quaternion to transform with * @returns {vec4} out */ - function transformQuat(out, a, q) { - var x = a[0], - y = a[1], - z = a[2]; - var qx = q[0], - qy = q[1], - qz = q[2], - qw = q[3]; // calculate quat * vec - - var ix = qw * x + qy * z - qz * y; - var iy = qw * y + qz * x - qx * z; - var iz = qw * z + qx * y - qy * x; - var iw = -qx * x - qy * y - qz * z; // calculate result * inverse quat - - out[0] = ix * qw + iw * -qx + iy * -qz - iz * -qy; - out[1] = iy * qw + iw * -qy + iz * -qx - ix * -qz; - out[2] = iz * qw + iw * -qz + ix * -qy - iy * -qx; - out[3] = a[3]; - return out; + var x = a[0], y = a[1], z = a[2]; + var qx = q[0], qy = q[1], qz = q[2], qw = q[3]; + // calculate quat * vec + var ix = qw * x + qy * z - qz * y; + var iy = qw * y + qz * x - qx * z; + var iz = qw * z + qx * y - qy * x; + var iw = -qx * x - qy * y - qz * z; + // calculate result * inverse quat + out[0] = ix * qw + iw * -qx + iy * -qz - iz * -qy; + out[1] = iy * qw + iw * -qy + iz * -qx - ix * -qz; + out[2] = iz * qw + iw * -qz + ix * -qy - iy * -qx; + out[3] = a[3]; + return out; } /** * Set the components of a vec4 to zero @@ -5334,13 +4917,12 @@ THE SOFTWARE. * @param {vec4} out the receiving vector * @returns {vec4} out */ - function zero$1(out) { - out[0] = 0.0; - out[1] = 0.0; - out[2] = 0.0; - out[3] = 0.0; - return out; + out[0] = 0.0; + out[1] = 0.0; + out[2] = 0.0; + out[3] = 0.0; + return out; } /** * Returns a string representation of a vector @@ -5348,9 +4930,8 @@ THE SOFTWARE. * @param {ReadonlyVec4} a vector to represent as a string * @returns {String} string representation of the vector */ - function str$3(a) { - return "vec4(" + a[0].toString() + ", " + a[1].toString() + ", " + a[2].toString() + ", " + a[3].toString() + ")"; + return "vec4(" + a[0].toString() + ", " + a[1].toString() + ", " + a[2].toString() + ", " + a[3].toString() + ")"; } /** * Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===) @@ -5359,9 +4940,8 @@ THE SOFTWARE. * @param {ReadonlyVec4} b The second vector. * @returns {Boolean} True if the vectors are equal, false otherwise. */ - function exactEquals$3(a, b) { - return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3]; + return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3]; } /** * Returns whether or not the vectors have approximately the same elements in the same position. @@ -5370,59 +4950,52 @@ THE SOFTWARE. * @param {ReadonlyVec4} b The second vector. * @returns {Boolean} True if the vectors are equal, false otherwise. */ - function equals$3(a, b) { - var a0 = a[0], - a1 = a[1], - a2 = a[2], - a3 = a[3]; - var b0 = b[0], - b1 = b[1], - b2 = b[2], - b3 = b[3]; - return Math.abs(a0 - b0) <= EPSILON * Maths.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= EPSILON * Maths.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= EPSILON * Maths.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= EPSILON * Maths.max(1.0, Math.abs(a3), Math.abs(b3)); + var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3]; + var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3]; + return (Math.abs(a0 - b0) <= + EPSILON * Maths.max(1.0, Math.abs(a0), Math.abs(b0)) && + Math.abs(a1 - b1) <= + EPSILON * Maths.max(1.0, Math.abs(a1), Math.abs(b1)) && + Math.abs(a2 - b2) <= + EPSILON * Maths.max(1.0, Math.abs(a2), Math.abs(b2)) && + Math.abs(a3 - b3) <= + EPSILON * Maths.max(1.0, Math.abs(a3), Math.abs(b3))); } /** * Alias for {@link vec4.subtract} * @function */ - var sub$1 = subtract$1; /** * Alias for {@link vec4.multiply} * @function */ - var mul$3 = multiply$3; /** * Alias for {@link vec4.divide} * @function */ - var div$1 = divide$1; /** * Alias for {@link vec4.distance} * @function */ - var dist$1 = distance$1; /** * Alias for {@link vec4.squaredDistance} * @function */ - var sqrDist$1 = squaredDistance$1; /** * Alias for {@link vec4.length} * @function */ - var len$3 = length$3; /** * Alias for {@link vec4.squaredLength} * @function */ - var sqrLen$3 = squaredLength$3; /** * Perform some operation over an array of vec4s. @@ -5436,41 +5009,36 @@ THE SOFTWARE. * @returns {Array} a * @function */ - var vec$1 = create$3(); - var forEach$1 = function () { - return function (a, stride, offset, count, fn, arg) { - var i, l; - - if (!stride) { - stride = 4; - } - - if (!offset) { - offset = 0; - } - - if (count) { - l = Maths.min(count * stride + offset, a.length); - } else { - l = a.length; - } - - for (i = offset; i < l; i += stride) { - vec$1[0] = a[i]; - vec$1[1] = a[i + 1]; - vec$1[2] = a[i + 2]; - vec$1[3] = a[i + 3]; - fn(vec$1, vec$1, arg); - a[i] = vec$1[0]; - a[i + 1] = vec$1[1]; - a[i + 2] = vec$1[2]; - a[i + 3] = vec$1[3]; - } - - return a; - }; - }(); + var forEach$1 = (function () { + return function (a, stride, offset, count, fn, arg) { + var i, l; + if (!stride) { + stride = 4; + } + if (!offset) { + offset = 0; + } + if (count) { + l = Maths.min(count * stride + offset, a.length); + } + else { + l = a.length; + } + for (i = offset; i < l; i += stride) { + vec$1[0] = a[i]; + vec$1[1] = a[i + 1]; + vec$1[2] = a[i + 2]; + vec$1[3] = a[i + 3]; + fn(vec$1, vec$1, arg); + a[i] = vec$1[0]; + a[i + 1] = vec$1[1]; + a[i + 2] = vec$1[2]; + a[i + 3] = vec$1[3]; + } + return a; + }; + })(); var vec4 = /*#__PURE__*/Object.freeze({ __proto__: null, @@ -5521,22 +5089,20 @@ THE SOFTWARE. * Quaternion in the format XYZW * @module quat */ - /** * Creates a new identity quat * * @returns {quat} a new quaternion */ - function create$2() { - var out = new Float64Array(4); //if (glMatrix.ARRAY_TYPE != Float32Array) { - - out[0] = 0; - out[1] = 0; - out[2] = 0; //} - - out[3] = 1; - return out; + var out = new Float64Array(4); + //if (glMatrix.ARRAY_TYPE != Float32Array) { + out[0] = 0; + out[1] = 0; + out[2] = 0; + //} + out[3] = 1; + return out; } /** * Set a quat to the identity quaternion @@ -5544,13 +5110,12 @@ THE SOFTWARE. * @param {quat} out the receiving quaternion * @returns {quat} out */ - function identity$1(out) { - out[0] = 0; - out[1] = 0; - out[2] = 0; - out[3] = 1; - return out; + out[0] = 0; + out[1] = 0; + out[2] = 0; + out[3] = 1; + return out; } /** * Sets a quat from the given angle and rotation axis, @@ -5561,15 +5126,14 @@ THE SOFTWARE. * @param {Number} rad the angle in radians * @returns {quat} out **/ - function setAxisAngle(out, axis, rad) { - rad = rad * 0.5; - var s = Math.sin(rad); - out[0] = s * axis[0]; - out[1] = s * axis[1]; - out[2] = s * axis[2]; - out[3] = Math.cos(rad); - return out; + rad = rad * 0.5; + var s = Math.sin(rad); + out[0] = s * axis[0]; + out[1] = s * axis[1]; + out[2] = s * axis[2]; + out[3] = Math.cos(rad); + return out; } /** * Gets the rotation axis and angle for a given @@ -5584,23 +5148,21 @@ THE SOFTWARE. * @param {ReadonlyQuat} q Quaternion to be decomposed * @return {Number} Angle, in radians, of the rotation */ - function getAxisAngle(out_axis, q) { - var rad = Math.acos(q[3]) * 2.0; - var s = Math.sin(rad / 2.0); - - if (s > EPSILON) { - out_axis[0] = q[0] / s; - out_axis[1] = q[1] / s; - out_axis[2] = q[2] / s; - } else { - // If s is zero, return any axis (no rotation - axis does not matter) - out_axis[0] = 1; - out_axis[1] = 0; - out_axis[2] = 0; - } - - return rad; + var rad = Math.acos(q[3]) * 2.0; + var s = Math.sin(rad / 2.0); + if (s > EPSILON) { + out_axis[0] = q[0] / s; + out_axis[1] = q[1] / s; + out_axis[2] = q[2] / s; + } + else { + // If s is zero, return any axis (no rotation - axis does not matter) + out_axis[0] = 1; + out_axis[1] = 0; + out_axis[2] = 0; + } + return rad; } /** * Gets the angular distance between two unit quaternions @@ -5609,10 +5171,9 @@ THE SOFTWARE. * @param {ReadonlyQuat} b Destination unit quaternion * @return {Number} Angle, in radians, between the two quaternions */ - function getAngle(a, b) { - var dotproduct = dot$2(a, b); - return Math.acos(2 * dotproduct * dotproduct - 1); + var dotproduct = dot$2(a, b); + return Math.acos(2 * dotproduct * dotproduct - 1); } /** * Multiplies two quat's @@ -5622,21 +5183,14 @@ THE SOFTWARE. * @param {ReadonlyQuat} b the second operand * @returns {quat} out */ - function multiply$2(out, a, b) { - var ax = a[0], - ay = a[1], - az = a[2], - aw = a[3]; - var bx = b[0], - by = b[1], - bz = b[2], - bw = b[3]; - out[0] = ax * bw + aw * bx + ay * bz - az * by; - out[1] = ay * bw + aw * by + az * bx - ax * bz; - out[2] = az * bw + aw * bz + ax * by - ay * bx; - out[3] = aw * bw - ax * bx - ay * by - az * bz; - return out; + var ax = a[0], ay = a[1], az = a[2], aw = a[3]; + var bx = b[0], by = b[1], bz = b[2], bw = b[3]; + out[0] = ax * bw + aw * bx + ay * bz - az * by; + out[1] = ay * bw + aw * by + az * bx - ax * bz; + out[2] = az * bw + aw * bz + ax * by - ay * bx; + out[3] = aw * bw - ax * bx - ay * by - az * bz; + return out; } /** * Rotates a quaternion by the given angle about the X axis @@ -5646,20 +5200,15 @@ THE SOFTWARE. * @param {number} rad angle (in radians) to rotate * @returns {quat} out */ - function rotateX$1(out, a, rad) { - rad *= 0.5; - var ax = a[0], - ay = a[1], - az = a[2], - aw = a[3]; - var bx = Math.sin(rad), - bw = Math.cos(rad); - out[0] = ax * bw + aw * bx; - out[1] = ay * bw + az * bx; - out[2] = az * bw - ay * bx; - out[3] = aw * bw - ax * bx; - return out; + rad *= 0.5; + var ax = a[0], ay = a[1], az = a[2], aw = a[3]; + var bx = Math.sin(rad), bw = Math.cos(rad); + out[0] = ax * bw + aw * bx; + out[1] = ay * bw + az * bx; + out[2] = az * bw - ay * bx; + out[3] = aw * bw - ax * bx; + return out; } /** * Rotates a quaternion by the given angle about the Y axis @@ -5669,20 +5218,15 @@ THE SOFTWARE. * @param {number} rad angle (in radians) to rotate * @returns {quat} out */ - function rotateY$1(out, a, rad) { - rad *= 0.5; - var ax = a[0], - ay = a[1], - az = a[2], - aw = a[3]; - var by = Math.sin(rad), - bw = Math.cos(rad); - out[0] = ax * bw - az * by; - out[1] = ay * bw + aw * by; - out[2] = az * bw + ax * by; - out[3] = aw * bw - ay * by; - return out; + rad *= 0.5; + var ax = a[0], ay = a[1], az = a[2], aw = a[3]; + var by = Math.sin(rad), bw = Math.cos(rad); + out[0] = ax * bw - az * by; + out[1] = ay * bw + aw * by; + out[2] = az * bw + ax * by; + out[3] = aw * bw - ay * by; + return out; } /** * Rotates a quaternion by the given angle about the Z axis @@ -5692,20 +5236,15 @@ THE SOFTWARE. * @param {number} rad angle (in radians) to rotate * @returns {quat} out */ - function rotateZ$1(out, a, rad) { - rad *= 0.5; - var ax = a[0], - ay = a[1], - az = a[2], - aw = a[3]; - var bz = Math.sin(rad), - bw = Math.cos(rad); - out[0] = ax * bw + ay * bz; - out[1] = ay * bw - ax * bz; - out[2] = az * bw + aw * bz; - out[3] = aw * bw - az * bz; - return out; + rad *= 0.5; + var ax = a[0], ay = a[1], az = a[2], aw = a[3]; + var bz = Math.sin(rad), bw = Math.cos(rad); + out[0] = ax * bw + ay * bz; + out[1] = ay * bw - ax * bz; + out[2] = az * bw + aw * bz; + out[3] = aw * bw - az * bz; + return out; } /** * Calculates the W component of a quat from the X, Y, and Z components. @@ -5716,16 +5255,13 @@ THE SOFTWARE. * @param {ReadonlyQuat} a quat to calculate W component of * @returns {quat} out */ - function calculateW(out, a) { - var x = a[0], - y = a[1], - z = a[2]; - out[0] = x; - out[1] = y; - out[2] = z; - out[3] = Math.sqrt(Math.abs(1.0 - x * x - y * y - z * z)); - return out; + var x = a[0], y = a[1], z = a[2]; + out[0] = x; + out[1] = y; + out[2] = z; + out[3] = Math.sqrt(Math.abs(1.0 - x * x - y * y - z * z)); + return out; } /** * Calculate the exponential of a unit quaternion. @@ -5734,20 +5270,16 @@ THE SOFTWARE. * @param {ReadonlyQuat} a quat to calculate the exponential of * @returns {quat} out */ - function exp(out, a) { - var x = a[0], - y = a[1], - z = a[2], - w = a[3]; - var r = Math.sqrt(x * x + y * y + z * z); - var et = Math.exp(w); - var s = r > 0 ? et * Math.sin(r) / r : 0; - out[0] = x * s; - out[1] = y * s; - out[2] = z * s; - out[3] = et * Math.cos(r); - return out; + var x = a[0], y = a[1], z = a[2], w = a[3]; + var r = Math.sqrt(x * x + y * y + z * z); + var et = Math.exp(w); + var s = r > 0 ? (et * Math.sin(r)) / r : 0; + out[0] = x * s; + out[1] = y * s; + out[2] = z * s; + out[3] = et * Math.cos(r); + return out; } /** * Calculate the natural logarithm of a unit quaternion. @@ -5756,19 +5288,15 @@ THE SOFTWARE. * @param {ReadonlyQuat} a quat to calculate the exponential of * @returns {quat} out */ - function ln(out, a) { - var x = a[0], - y = a[1], - z = a[2], - w = a[3]; - var r = Math.sqrt(x * x + y * y + z * z); - var t = r > 0 ? Math.atan2(r, w) / r : 0; - out[0] = x * t; - out[1] = y * t; - out[2] = z * t; - out[3] = 0.5 * Math.log(x * x + y * y + z * z + w * w); - return out; + var x = a[0], y = a[1], z = a[2], w = a[3]; + var r = Math.sqrt(x * x + y * y + z * z); + var t = r > 0 ? Math.atan2(r, w) / r : 0; + out[0] = x * t; + out[1] = y * t; + out[2] = z * t; + out[3] = 0.5 * Math.log(x * x + y * y + z * z + w * w); + return out; } /** * Calculate the scalar power of a unit quaternion. @@ -5778,12 +5306,11 @@ THE SOFTWARE. * @param {Number} b amount to scale the quaternion by * @returns {quat} out */ - function pow(out, a, b) { - ln(out, a); - scale$2(out, out, b); - exp(out, out); - return out; + ln(out, a); + scale$2(out, out, b); + exp(out, out); + return out; } /** * Performs a spherical linear interpolation between two quat @@ -5794,50 +5321,42 @@ THE SOFTWARE. * @param {Number} t interpolation amount, in the range [0-1], between the two inputs * @returns {quat} out */ - function slerp(out, a, b, t) { - // benchmarks: - // http://jsperf.com/quaternion-slerp-implementations - var ax = a[0], - ay = a[1], - az = a[2], - aw = a[3]; - var bx = b[0], - by = b[1], - bz = b[2], - bw = b[3]; - var omega, cosom, sinom, scale0, scale1; // calc cosine - - cosom = ax * bx + ay * by + az * bz + aw * bw; // adjust signs (if necessary) - - if (cosom < 0.0) { - cosom = -cosom; - bx = -bx; - by = -by; - bz = -bz; - bw = -bw; - } // calculate coefficients - - - if (1.0 - cosom > EPSILON) { - // standard case (slerp) - omega = Math.acos(cosom); - sinom = Math.sin(omega); - scale0 = Math.sin((1.0 - t) * omega) / sinom; - scale1 = Math.sin(t * omega) / sinom; - } else { - // "from" and "to" quaternions are very close - // ... so we can do a linear interpolation - scale0 = 1.0 - t; - scale1 = t; - } // calculate final values - - - out[0] = scale0 * ax + scale1 * bx; - out[1] = scale0 * ay + scale1 * by; - out[2] = scale0 * az + scale1 * bz; - out[3] = scale0 * aw + scale1 * bw; - return out; + // benchmarks: + // http://jsperf.com/quaternion-slerp-implementations + var ax = a[0], ay = a[1], az = a[2], aw = a[3]; + var bx = b[0], by = b[1], bz = b[2], bw = b[3]; + var omega, cosom, sinom, scale0, scale1; + // calc cosine + cosom = ax * bx + ay * by + az * bz + aw * bw; + // adjust signs (if necessary) + if (cosom < 0.0) { + cosom = -cosom; + bx = -bx; + by = -by; + bz = -bz; + bw = -bw; + } + // calculate coefficients + if (1.0 - cosom > EPSILON) { + // standard case (slerp) + omega = Math.acos(cosom); + sinom = Math.sin(omega); + scale0 = Math.sin((1.0 - t) * omega) / sinom; + scale1 = Math.sin(t * omega) / sinom; + } + else { + // "from" and "to" quaternions are very close + // ... so we can do a linear interpolation + scale0 = 1.0 - t; + scale1 = t; + } + // calculate final values + out[0] = scale0 * ax + scale1 * bx; + out[1] = scale0 * ay + scale1 * by; + out[2] = scale0 * az + scale1 * bz; + out[3] = scale0 * aw + scale1 * bw; + return out; } /** * Generates a random unit quaternion @@ -5845,20 +5364,19 @@ THE SOFTWARE. * @param {quat} out the receiving quaternion * @returns {quat} out */ - function random$1(out) { - // Implementation of http://planning.cs.uiuc.edu/node198.html - // TODO: Calling random 3 times is probably not the fastest solution - var u1 = RANDOM(); - var u2 = RANDOM(); - var u3 = RANDOM(); - var sqrt1MinusU1 = Math.sqrt(1 - u1); - var sqrtU1 = Math.sqrt(u1); - out[0] = sqrt1MinusU1 * Math.sin(2.0 * Math.PI * u2); - out[1] = sqrt1MinusU1 * Math.cos(2.0 * Math.PI * u2); - out[2] = sqrtU1 * Math.sin(2.0 * Math.PI * u3); - out[3] = sqrtU1 * Math.cos(2.0 * Math.PI * u3); - return out; + // Implementation of http://planning.cs.uiuc.edu/node198.html + // TODO: Calling random 3 times is probably not the fastest solution + var u1 = RANDOM(); + var u2 = RANDOM(); + var u3 = RANDOM(); + var sqrt1MinusU1 = Math.sqrt(1 - u1); + var sqrtU1 = Math.sqrt(u1); + out[0] = sqrt1MinusU1 * Math.sin(2.0 * Math.PI * u2); + out[1] = sqrt1MinusU1 * Math.cos(2.0 * Math.PI * u2); + out[2] = sqrtU1 * Math.sin(2.0 * Math.PI * u3); + out[3] = sqrtU1 * Math.cos(2.0 * Math.PI * u3); + return out; } /** * Calculates the inverse of a quat @@ -5867,20 +5385,16 @@ THE SOFTWARE. * @param {ReadonlyQuat} a quat to calculate inverse of * @returns {quat} out */ - function invert$1(out, a) { - var a0 = a[0], - a1 = a[1], - a2 = a[2], - a3 = a[3]; - var dot = a0 * a0 + a1 * a1 + a2 * a2 + a3 * a3; - var invDot = dot ? 1.0 / dot : 0; // TODO: Would be faster to return [0,0,0,0] immediately if dot == 0 - - out[0] = -a0 * invDot; - out[1] = -a1 * invDot; - out[2] = -a2 * invDot; - out[3] = a3 * invDot; - return out; + var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3]; + var dot = a0 * a0 + a1 * a1 + a2 * a2 + a3 * a3; + var invDot = dot ? 1.0 / dot : 0; + // TODO: Would be faster to return [0,0,0,0] immediately if dot == 0 + out[0] = -a0 * invDot; + out[1] = -a1 * invDot; + out[2] = -a2 * invDot; + out[3] = a3 * invDot; + return out; } /** * Calculates the conjugate of a quat @@ -5890,13 +5404,12 @@ THE SOFTWARE. * @param {ReadonlyQuat} a quat to calculate conjugate of * @returns {quat} out */ - function conjugate$1(out, a) { - out[0] = -a[0]; - out[1] = -a[1]; - out[2] = -a[2]; - out[3] = a[3]; - return out; + out[0] = -a[0]; + out[1] = -a[1]; + out[2] = -a[2]; + out[3] = a[3]; + return out; } /** * Creates a quaternion from the given 3x3 rotation matrix. @@ -5909,39 +5422,37 @@ THE SOFTWARE. * @returns {quat} out * @function */ - function fromMat3(out, m) { - // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes - // article "Quaternion Calculus and Fast Animation". - var fTrace = m[0] + m[4] + m[8]; - var fRoot; - - if (fTrace > 0.0) { - // |w| > 1/2, may as well choose w > 1/2 - fRoot = Math.sqrt(fTrace + 1.0); // 2w - - out[3] = 0.5 * fRoot; - fRoot = 0.5 / fRoot; // 1/(4w) - - out[0] = (m[5] - m[7]) * fRoot; - out[1] = (m[6] - m[2]) * fRoot; - out[2] = (m[1] - m[3]) * fRoot; - } else { - // |w| <= 1/2 - var i = 0; - if (m[4] > m[0]) i = 1; - if (m[8] > m[i * 3 + i]) i = 2; - var j = (i + 1) % 3; - var k = (i + 2) % 3; - fRoot = Math.sqrt(m[i * 3 + i] - m[j * 3 + j] - m[k * 3 + k] + 1.0); - out[i] = 0.5 * fRoot; - fRoot = 0.5 / fRoot; - out[3] = (m[j * 3 + k] - m[k * 3 + j]) * fRoot; - out[j] = (m[j * 3 + i] + m[i * 3 + j]) * fRoot; - out[k] = (m[k * 3 + i] + m[i * 3 + k]) * fRoot; - } - - return out; + // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes + // article "Quaternion Calculus and Fast Animation". + var fTrace = m[0] + m[4] + m[8]; + var fRoot; + if (fTrace > 0.0) { + // |w| > 1/2, may as well choose w > 1/2 + fRoot = Math.sqrt(fTrace + 1.0); // 2w + out[3] = 0.5 * fRoot; + fRoot = 0.5 / fRoot; // 1/(4w) + out[0] = (m[5] - m[7]) * fRoot; + out[1] = (m[6] - m[2]) * fRoot; + out[2] = (m[1] - m[3]) * fRoot; + } + else { + // |w| <= 1/2 + var i = 0; + if (m[4] > m[0]) + i = 1; + if (m[8] > m[i * 3 + i]) + i = 2; + var j = (i + 1) % 3; + var k = (i + 2) % 3; + fRoot = Math.sqrt(m[i * 3 + i] - m[j * 3 + j] - m[k * 3 + k] + 1.0); + out[i] = 0.5 * fRoot; + fRoot = 0.5 / fRoot; + out[3] = (m[j * 3 + k] - m[k * 3 + j]) * fRoot; + out[j] = (m[j * 3 + i] + m[i * 3 + j]) * fRoot; + out[k] = (m[k * 3 + i] + m[i * 3 + k]) * fRoot; + } + return out; } /** * Creates a quaternion from the given euler angle x, y, z using the provided intrinsic order for the conversion. @@ -5954,56 +5465,57 @@ THE SOFTWARE. * @returns {quat} out * @function */ - function fromEuler(out, x, y, z, order) { - if (order === void 0) { - order = ANGLE_ORDER; - } - - var halfToRad = Math.PI / 360; - x *= halfToRad; - z *= halfToRad; - y *= halfToRad; - var sx = Math.sin(x); - var cx = Math.cos(x); - var sy = Math.sin(y); - var cy = Math.cos(y); - var sz = Math.sin(z); - var cz = Math.cos(z); - - if (order === "xyz") { - out[0] = sx * cy * cz + cx * sy * sz; - out[1] = cx * sy * cz - sx * cy * sz; - out[2] = cx * cy * sz + sx * sy * cz; - out[3] = cx * cy * cz - sx * sy * sz; - } else if (order === "xzy") { - out[0] = sx * cy * cz - cx * sy * sz; - out[1] = cx * sy * cz - sx * cy * sz; - out[2] = cx * cy * sz + sx * sy * cz; - out[3] = cx * cy * cz + sx * sy * sz; - } else if (order === "yxz") { - out[0] = sx * cy * cz + cx * sy * sz; - out[1] = cx * sy * cz - sx * cy * sz; - out[2] = cx * cy * sz - sx * sy * cz; - out[3] = cx * cy * cz + sx * sy * sz; - } else if (order === "yzx") { - out[0] = sx * cy * cz + cx * sy * sz; - out[1] = cx * sy * cz + sx * cy * sz; - out[2] = cx * cy * sz - sx * sy * cz; - out[3] = cx * cy * cz - sx * sy * sz; - } else if (order === "zxy") { - out[0] = sx * cy * cz - cx * sy * sz; - out[1] = cx * sy * cz + sx * cy * sz; - out[2] = cx * cy * sz + sx * sy * cz; - out[3] = cx * cy * cz - sx * sy * sz; - } else if (order === "zyx") { - out[0] = sx * cy * cz - cx * sy * sz; - out[1] = cx * sy * cz + sx * cy * sz; - out[2] = cx * cy * sz - sx * sy * cz; - out[3] = cx * cy * cz + sx * sy * sz; - } else throw new Error('Unknown angle order ' + order); - - return out; + if (order === void 0) { order = ANGLE_ORDER; } + var halfToRad = Math.PI / 360; + x *= halfToRad; + z *= halfToRad; + y *= halfToRad; + var sx = Math.sin(x); + var cx = Math.cos(x); + var sy = Math.sin(y); + var cy = Math.cos(y); + var sz = Math.sin(z); + var cz = Math.cos(z); + if (order === "xyz") { + out[0] = sx * cy * cz + cx * sy * sz; + out[1] = cx * sy * cz - sx * cy * sz; + out[2] = cx * cy * sz + sx * sy * cz; + out[3] = cx * cy * cz - sx * sy * sz; + } + else if (order === "xzy") { + out[0] = sx * cy * cz - cx * sy * sz; + out[1] = cx * sy * cz - sx * cy * sz; + out[2] = cx * cy * sz + sx * sy * cz; + out[3] = cx * cy * cz + sx * sy * sz; + } + else if (order === "yxz") { + out[0] = sx * cy * cz + cx * sy * sz; + out[1] = cx * sy * cz - sx * cy * sz; + out[2] = cx * cy * sz - sx * sy * cz; + out[3] = cx * cy * cz + sx * sy * sz; + } + else if (order === "yzx") { + out[0] = sx * cy * cz + cx * sy * sz; + out[1] = cx * sy * cz + sx * cy * sz; + out[2] = cx * cy * sz - sx * sy * cz; + out[3] = cx * cy * cz - sx * sy * sz; + } + else if (order === "zxy") { + out[0] = sx * cy * cz - cx * sy * sz; + out[1] = cx * sy * cz + sx * cy * sz; + out[2] = cx * cy * sz + sx * sy * cz; + out[3] = cx * cy * cz - sx * sy * sz; + } + else if (order === "zyx") { + out[0] = sx * cy * cz - cx * sy * sz; + out[1] = cx * sy * cz + sx * cy * sz; + out[2] = cx * cy * sz - sx * sy * cz; + out[3] = cx * cy * cz + sx * sy * sz; + } + else + throw new Error('Unknown angle order ' + order); + return out; } /** * Returns a string representation of a quaternion @@ -6011,9 +5523,8 @@ THE SOFTWARE. * @param {ReadonlyQuat} a vector to represent as a string * @returns {String} string representation of the vector */ - function str$2(a) { - return "quat(" + a[0].toString() + ", " + a[1].toString() + ", " + a[2].toString() + ", " + a[3].toString() + ")"; + return "quat(" + a[0].toString() + ", " + a[1].toString() + ", " + a[2].toString() + ", " + a[3].toString() + ")"; } /** * Creates a new quat initialized with values from an existing quaternion @@ -6022,7 +5533,6 @@ THE SOFTWARE. * @returns {quat} a new quaternion * @function */ - var clone$2 = clone$3; /** * Creates a new quat initialized with the given values @@ -6034,7 +5544,6 @@ THE SOFTWARE. * @returns {quat} a new quaternion * @function */ - var fromValues$2 = fromValues$3; /** * Copy the values from one quat to another @@ -6044,7 +5553,6 @@ THE SOFTWARE. * @returns {quat} out * @function */ - var copy$2 = copy$3; /** * Set the components of a quat to the given values @@ -6057,7 +5565,6 @@ THE SOFTWARE. * @returns {quat} out * @function */ - var set$2 = set$3; /** * Adds two quat's @@ -6068,13 +5575,11 @@ THE SOFTWARE. * @returns {quat} out * @function */ - var add$2 = add$3; /** * Alias for {@link quat.multiply} * @function */ - var mul$2 = multiply$2; /** * Scales a quat by a scalar number @@ -6085,7 +5590,6 @@ THE SOFTWARE. * @returns {quat} out * @function */ - var scale$2 = scale$3; /** * Calculates the dot product of two quat's @@ -6095,7 +5599,6 @@ THE SOFTWARE. * @returns {Number} dot product of a and b * @function */ - var dot$2 = dot$3; /** * Performs a linear interpolation between two quat's @@ -6107,7 +5610,6 @@ THE SOFTWARE. * @returns {quat} out * @function */ - var lerp$2 = lerp$3; /** * Calculates the length of a quat @@ -6115,13 +5617,11 @@ THE SOFTWARE. * @param {ReadonlyQuat} a vector to calculate length of * @returns {Number} length of a */ - var length$2 = length$3; /** * Alias for {@link quat.length} * @function */ - var len$2 = length$2; /** * Calculates the squared length of a quat @@ -6130,13 +5630,11 @@ THE SOFTWARE. * @returns {Number} squared length of a * @function */ - var squaredLength$2 = squaredLength$3; /** * Alias for {@link quat.squaredLength} * @function */ - var sqrLen$2 = squaredLength$2; /** * Normalize a quat @@ -6146,7 +5644,6 @@ THE SOFTWARE. * @returns {quat} out * @function */ - var normalize$2 = normalize$3; /** * Returns whether or not the quaternions have exactly the same elements in the same position (when compared with ===) @@ -6155,7 +5652,6 @@ THE SOFTWARE. * @param {ReadonlyQuat} b The second quaternion. * @returns {Boolean} True if the vectors are equal, false otherwise. */ - var exactEquals$2 = exactEquals$3; /** * Returns whether or not the quaternions point approximately to the same direction. @@ -6166,9 +5662,8 @@ THE SOFTWARE. * @param {ReadonlyQuat} b The second unit quaternion. * @returns {Boolean} True if the quaternions are equal, false otherwise. */ - function equals$2(a, b) { - return Math.abs(dot$3(a, b)) >= 1 - EPSILON; + return Math.abs(dot$3(a, b)) >= 1 - EPSILON; } /** * Sets a quaternion to represent the shortest rotation from one @@ -6181,36 +5676,37 @@ THE SOFTWARE. * @param {ReadonlyVec3} b the destination vector * @returns {quat} out */ - var tmpvec3 = create$4(); var xUnitVec3 = fromValues$4(1, 0, 0); var yUnitVec3 = fromValues$4(0, 1, 0); - var rotationTo = function () { - return function (out, a, b) { - var dot = dot$4(a, b); - - if (dot < -0.999999) { - cross$2(tmpvec3, xUnitVec3, a); - if (len$4(tmpvec3) < 0.000001) cross$2(tmpvec3, yUnitVec3, a); - normalize$4(tmpvec3, tmpvec3); - setAxisAngle(out, tmpvec3, Math.PI); - return out; - } else if (dot > 0.999999) { - out[0] = 0; - out[1] = 0; - out[2] = 0; - out[3] = 1; - return out; - } else { - cross$2(tmpvec3, a, b); - out[0] = tmpvec3[0]; - out[1] = tmpvec3[1]; - out[2] = tmpvec3[2]; - out[3] = 1 + dot; - return normalize$2(out, out); - } - }; - }(); + var rotationTo = (function () { + return function (out, a, b) { + var dot = dot$4(a, b); + if (dot < -0.999999) { + cross$2(tmpvec3, xUnitVec3, a); + if (len$4(tmpvec3) < 0.000001) + cross$2(tmpvec3, yUnitVec3, a); + normalize$4(tmpvec3, tmpvec3); + setAxisAngle(out, tmpvec3, Math.PI); + return out; + } + else if (dot > 0.999999) { + out[0] = 0; + out[1] = 0; + out[2] = 0; + out[3] = 1; + return out; + } + else { + cross$2(tmpvec3, a, b); + out[0] = tmpvec3[0]; + out[1] = tmpvec3[1]; + out[2] = tmpvec3[2]; + out[3] = 1 + dot; + return normalize$2(out, out); + } + }; + })(); /** * Performs a spherical linear interpolation with two control points * @@ -6222,17 +5718,16 @@ THE SOFTWARE. * @param {Number} t interpolation amount, in the range [0-1], between the two inputs * @returns {quat} out */ - var temp1 = create$2(); var temp2 = create$2(); - var sqlerp = function () { - return function (out, a, b, c, d, t) { - slerp(temp1, a, d, t); - slerp(temp2, b, c, t); - slerp(out, temp1, temp2, 2 * t * (1 - t)); - return out; - }; - }(); + var sqlerp = (function () { + return function (out, a, b, c, d, t) { + slerp(temp1, a, d, t); + slerp(temp2, b, c, t); + slerp(out, temp1, temp2, 2 * t * (1 - t)); + return out; + }; + })(); /** * Sets the specified quaternion with values corresponding to the given * axes. Each axis is a vec3 and is expected to be unit length and @@ -6244,22 +5739,21 @@ THE SOFTWARE. * @param {ReadonlyVec3} up the vector representing the local "up" direction * @returns {quat} out */ - var matr = create$6(); - var setAxes = function () { - return function (out, view, right, up) { - matr[0] = right[0]; - matr[3] = right[1]; - matr[6] = right[2]; - matr[1] = up[0]; - matr[4] = up[1]; - matr[7] = up[2]; - matr[2] = -view[0]; - matr[5] = -view[1]; - matr[8] = -view[2]; - return normalize$2(out, fromMat3(out, matr)); - }; - }(); + var setAxes = (function () { + return function (out, view, right, up) { + matr[0] = right[0]; + matr[3] = right[1]; + matr[6] = right[2]; + matr[1] = up[0]; + matr[4] = up[1]; + matr[7] = up[2]; + matr[2] = -view[0]; + matr[5] = -view[1]; + matr[8] = -view[2]; + return normalize$2(out, fromMat3(out, matr)); + }; + })(); var quat = /*#__PURE__*/Object.freeze({ __proto__: null, @@ -6311,26 +5805,24 @@ THE SOFTWARE. * Make sure to have normalized dual quaternions, otherwise the functions may not work as intended.
* @module quat2 */ - /** * Creates a new identity dual quat * * @returns {quat2} a new dual quaternion [real -> rotation, dual -> translation] */ - function create$1() { - var dq = changetype(new Float64Array(8)); //if (glMatrix.ARRAY_TYPE != Float32Array) { - - dq[0] = 0; - dq[1] = 0; - dq[2] = 0; - dq[4] = 0; - dq[5] = 0; - dq[6] = 0; - dq[7] = 0; //} - - dq[3] = 1; - return dq; + var dq = changetype(new Float64Array(8)); + //if (glMatrix.ARRAY_TYPE != Float32Array) { + dq[0] = 0; + dq[1] = 0; + dq[2] = 0; + dq[4] = 0; + dq[5] = 0; + dq[6] = 0; + dq[7] = 0; + //} + dq[3] = 1; + return dq; } /** * Creates a new quat initialized with values from an existing quaternion @@ -6339,18 +5831,17 @@ THE SOFTWARE. * @returns {quat2} new dual quaternion * @function */ - function clone$1(a) { - var dq = changetype(new Float64Array(8)); - dq[0] = a[0]; - dq[1] = a[1]; - dq[2] = a[2]; - dq[3] = a[3]; - dq[4] = a[4]; - dq[5] = a[5]; - dq[6] = a[6]; - dq[7] = a[7]; - return dq; + var dq = changetype(new Float64Array(8)); + dq[0] = a[0]; + dq[1] = a[1]; + dq[2] = a[2]; + dq[3] = a[3]; + dq[4] = a[4]; + dq[5] = a[5]; + dq[6] = a[6]; + dq[7] = a[7]; + return dq; } /** * Creates a new dual quat initialized with the given values @@ -6366,18 +5857,17 @@ THE SOFTWARE. * @returns {quat2} new dual quaternion * @function */ - function fromValues$1(x1, y1, z1, w1, x2, y2, z2, w2) { - var dq = changetype(new Float64Array(8)); - dq[0] = x1; - dq[1] = y1; - dq[2] = z1; - dq[3] = w1; - dq[4] = x2; - dq[5] = y2; - dq[6] = z2; - dq[7] = w2; - return dq; + var dq = changetype(new Float64Array(8)); + dq[0] = x1; + dq[1] = y1; + dq[2] = z1; + dq[3] = w1; + dq[4] = x2; + dq[5] = y2; + dq[6] = z2; + dq[7] = w2; + return dq; } /** * Creates a new dual quat from the given values (quat and translation) @@ -6392,21 +5882,18 @@ THE SOFTWARE. * @returns {quat2} new dual quaternion * @function */ - function fromRotationTranslationValues(x1, y1, z1, w1, x2, y2, z2) { - var dq = changetype(new Float64Array(8)); - dq[0] = x1; - dq[1] = y1; - dq[2] = z1; - dq[3] = w1; - var ax = x2 * 0.5, - ay = y2 * 0.5, - az = z2 * 0.5; - dq[4] = ax * w1 + ay * z1 - az * y1; - dq[5] = ay * w1 + az * x1 - ax * z1; - dq[6] = az * w1 + ax * y1 - ay * x1; - dq[7] = -ax * x1 - ay * y1 - az * z1; - return dq; + var dq = changetype(new Float64Array(8)); + dq[0] = x1; + dq[1] = y1; + dq[2] = z1; + dq[3] = w1; + var ax = x2 * 0.5, ay = y2 * 0.5, az = z2 * 0.5; + dq[4] = ax * w1 + ay * z1 - az * y1; + dq[5] = ay * w1 + az * x1 - ax * z1; + dq[6] = az * w1 + ax * y1 - ay * x1; + dq[7] = -ax * x1 - ay * y1 - az * z1; + return dq; } /** * Creates a dual quat from a quaternion and a translation @@ -6417,24 +5904,17 @@ THE SOFTWARE. * @returns {quat2} dual quaternion receiving operation result * @function */ - function fromRotationTranslation(out, q, t) { - var ax = t[0] * 0.5, - ay = t[1] * 0.5, - az = t[2] * 0.5, - bx = q[0], - by = q[1], - bz = q[2], - bw = q[3]; - out[0] = bx; - out[1] = by; - out[2] = bz; - out[3] = bw; - out[4] = ax * bw + ay * bz - az * by; - out[5] = ay * bw + az * bx - ax * bz; - out[6] = az * bw + ax * by - ay * bx; - out[7] = -ax * bx - ay * by - az * bz; - return out; + var ax = t[0] * 0.5, ay = t[1] * 0.5, az = t[2] * 0.5, bx = q[0], by = q[1], bz = q[2], bw = q[3]; + out[0] = bx; + out[1] = by; + out[2] = bz; + out[3] = bw; + out[4] = ax * bw + ay * bz - az * by; + out[5] = ay * bw + az * bx - ax * bz; + out[6] = az * bw + ax * by - ay * bx; + out[7] = -ax * bx - ay * by - az * bz; + return out; } /** * Creates a dual quat from a translation @@ -6444,17 +5924,16 @@ THE SOFTWARE. * @returns {quat2} out quaternion receiving operation result * @function */ - function fromTranslation(out, t) { - out[0] = 0; - out[1] = 0; - out[2] = 0; - out[3] = 1; - out[4] = t[0] * 0.5; - out[5] = t[1] * 0.5; - out[6] = t[2] * 0.5; - out[7] = 0; - return out; + out[0] = 0; + out[1] = 0; + out[2] = 0; + out[3] = 1; + out[4] = t[0] * 0.5; + out[5] = t[1] * 0.5; + out[6] = t[2] * 0.5; + out[7] = 0; + return out; } /** * Creates a dual quat from a quaternion @@ -6464,17 +5943,16 @@ THE SOFTWARE. * @returns {quat2} out quaternion receiving operation result * @function */ - function fromRotation(out, q) { - out[0] = q[0]; - out[1] = q[1]; - out[2] = q[2]; - out[3] = q[3]; - out[4] = 0; - out[5] = 0; - out[6] = 0; - out[7] = 0; - return out; + out[0] = q[0]; + out[1] = q[1]; + out[2] = q[2]; + out[3] = q[3]; + out[4] = 0; + out[5] = 0; + out[6] = 0; + out[7] = 0; + return out; } /** * Creates a new dual quat from a matrix (4x4) @@ -6484,15 +5962,14 @@ THE SOFTWARE. * @returns {quat2} dual quat receiving operation result * @function */ - function fromMat4(out, a) { - //TODO Optimize this - var outer = create$2(); - getRotation(outer, a); - var t = new Float64Array(3); - getTranslation$1(t, a); - fromRotationTranslation(out, outer, t); - return out; + //TODO Optimize this + var outer = create$2(); + getRotation(outer, a); + var t = new Float64Array(3); + getTranslation$1(t, a); + fromRotationTranslation(out, outer, t); + return out; } /** * Copy the values from one dual quat to another @@ -6502,17 +5979,16 @@ THE SOFTWARE. * @returns {quat2} out * @function */ - function copy$1(out, a) { - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - out[4] = a[4]; - out[5] = a[5]; - out[6] = a[6]; - out[7] = a[7]; - return out; + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[3]; + out[4] = a[4]; + out[5] = a[5]; + out[6] = a[6]; + out[7] = a[7]; + return out; } /** * Set a dual quat to the identity dual quaternion @@ -6520,17 +5996,16 @@ THE SOFTWARE. * @param {quat2} out the receiving quaternion * @returns {quat2} out */ - function identity(out) { - out[0] = 0; - out[1] = 0; - out[2] = 0; - out[3] = 1; - out[4] = 0; - out[5] = 0; - out[6] = 0; - out[7] = 0; - return out; + out[0] = 0; + out[1] = 0; + out[2] = 0; + out[3] = 1; + out[4] = 0; + out[5] = 0; + out[6] = 0; + out[7] = 0; + return out; } /** * Set the components of a dual quat to the given values @@ -6547,17 +6022,16 @@ THE SOFTWARE. * @returns {quat2} out * @function */ - function set$1(out, x1, y1, z1, w1, x2, y2, z2, w2) { - out[0] = x1; - out[1] = y1; - out[2] = z1; - out[3] = w1; - out[4] = x2; - out[5] = y2; - out[6] = z2; - out[7] = w2; - return out; + out[0] = x1; + out[1] = y1; + out[2] = z1; + out[3] = w1; + out[4] = x2; + out[5] = y2; + out[6] = z2; + out[7] = w2; + return out; } /** * Gets the real part of a dual quat @@ -6565,7 +6039,6 @@ THE SOFTWARE. * @param {ReadonlyQuat2} a Dual Quaternion * @return {quat} real part */ - var getReal = copy$2; /** * Gets the dual part of a dual quat @@ -6573,13 +6046,12 @@ THE SOFTWARE. * @param {ReadonlyQuat2} a Dual Quaternion * @return {quat} dual part */ - function getDual(out, a) { - out[0] = a[4]; - out[1] = a[5]; - out[2] = a[6]; - out[3] = a[7]; - return out; + out[0] = a[4]; + out[1] = a[5]; + out[2] = a[6]; + out[3] = a[7]; + return out; } /** * Set the real component of a dual quat to the given quaternion @@ -6589,7 +6061,6 @@ THE SOFTWARE. * @returns {quat2} out * @function */ - var setReal = copy$2; /** * Set the dual component of a dual quat to the given quaternion @@ -6599,13 +6070,12 @@ THE SOFTWARE. * @returns {quat2} out * @function */ - function setDual(out, q) { - out[4] = q[0]; - out[5] = q[1]; - out[6] = q[2]; - out[7] = q[3]; - return out; + out[4] = q[0]; + out[5] = q[1]; + out[6] = q[2]; + out[7] = q[3]; + return out; } /** * Gets the translation of a normalized dual quat @@ -6613,20 +6083,12 @@ THE SOFTWARE. * @param {ReadonlyQuat2} a Dual Quaternion to be decomposed * @return {vec3} translation */ - function getTranslation(out, a) { - var ax = a[4], - ay = a[5], - az = a[6], - aw = a[7], - bx = -a[0], - by = -a[1], - bz = -a[2], - bw = a[3]; - out[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2; - out[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2; - out[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2; - return out; + var ax = a[4], ay = a[5], az = a[6], aw = a[7], bx = -a[0], by = -a[1], bz = -a[2], bw = a[3]; + out[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2; + out[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2; + out[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2; + return out; } /** * Translates a dual quat by the given vector @@ -6636,28 +6098,17 @@ THE SOFTWARE. * @param {ReadonlyVec3} v vector to translate by * @returns {quat2} out */ - function translate(out, a, v) { - var ax1 = a[0], - ay1 = a[1], - az1 = a[2], - aw1 = a[3], - bx1 = v[0] * 0.5, - by1 = v[1] * 0.5, - bz1 = v[2] * 0.5, - ax2 = a[4], - ay2 = a[5], - az2 = a[6], - aw2 = a[7]; - out[0] = ax1; - out[1] = ay1; - out[2] = az1; - out[3] = aw1; - out[4] = aw1 * bx1 + ay1 * bz1 - az1 * by1 + ax2; - out[5] = aw1 * by1 + az1 * bx1 - ax1 * bz1 + ay2; - out[6] = aw1 * bz1 + ax1 * by1 - ay1 * bx1 + az2; - out[7] = -ax1 * bx1 - ay1 * by1 - az1 * bz1 + aw2; - return out; + var ax1 = a[0], ay1 = a[1], az1 = a[2], aw1 = a[3], bx1 = v[0] * 0.5, by1 = v[1] * 0.5, bz1 = v[2] * 0.5, ax2 = a[4], ay2 = a[5], az2 = a[6], aw2 = a[7]; + out[0] = ax1; + out[1] = ay1; + out[2] = az1; + out[3] = aw1; + out[4] = aw1 * bx1 + ay1 * bz1 - az1 * by1 + ax2; + out[5] = aw1 * by1 + az1 * bx1 - ax1 * bz1 + ay2; + out[6] = aw1 * bz1 + ax1 * by1 - ay1 * bx1 + az2; + out[7] = -ax1 * bx1 - ay1 * by1 - az1 * bz1 + aw2; + return out; } /** * Rotates a dual quat around the X axis @@ -6667,30 +6118,18 @@ THE SOFTWARE. * @param {number} rad how far should the rotation be * @returns {quat2} out */ - function rotateX(out, a, rad) { - var bx = -a[0], - by = -a[1], - bz = -a[2], - bw = a[3], - ax = a[4], - ay = a[5], - az = a[6], - aw = a[7], - ax1 = ax * bw + aw * bx + ay * bz - az * by, - ay1 = ay * bw + aw * by + az * bx - ax * bz, - az1 = az * bw + aw * bz + ax * by - ay * bx, - aw1 = aw * bw - ax * bx - ay * by - az * bz; - rotateX$1(out, a, rad); - bx = out[0]; - by = out[1]; - bz = out[2]; - bw = out[3]; - out[4] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by; - out[5] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz; - out[6] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx; - out[7] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz; - return out; + var bx = -a[0], by = -a[1], bz = -a[2], bw = a[3], ax = a[4], ay = a[5], az = a[6], aw = a[7], ax1 = ax * bw + aw * bx + ay * bz - az * by, ay1 = ay * bw + aw * by + az * bx - ax * bz, az1 = az * bw + aw * bz + ax * by - ay * bx, aw1 = aw * bw - ax * bx - ay * by - az * bz; + rotateX$1(out, a, rad); + bx = out[0]; + by = out[1]; + bz = out[2]; + bw = out[3]; + out[4] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by; + out[5] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz; + out[6] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx; + out[7] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz; + return out; } /** * Rotates a dual quat around the Y axis @@ -6700,30 +6139,18 @@ THE SOFTWARE. * @param {number} rad how far should the rotation be * @returns {quat2} out */ - function rotateY(out, a, rad) { - var bx = -a[0], - by = -a[1], - bz = -a[2], - bw = a[3], - ax = a[4], - ay = a[5], - az = a[6], - aw = a[7], - ax1 = ax * bw + aw * bx + ay * bz - az * by, - ay1 = ay * bw + aw * by + az * bx - ax * bz, - az1 = az * bw + aw * bz + ax * by - ay * bx, - aw1 = aw * bw - ax * bx - ay * by - az * bz; - rotateY$1(out, a, rad); - bx = out[0]; - by = out[1]; - bz = out[2]; - bw = out[3]; - out[4] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by; - out[5] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz; - out[6] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx; - out[7] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz; - return out; + var bx = -a[0], by = -a[1], bz = -a[2], bw = a[3], ax = a[4], ay = a[5], az = a[6], aw = a[7], ax1 = ax * bw + aw * bx + ay * bz - az * by, ay1 = ay * bw + aw * by + az * bx - ax * bz, az1 = az * bw + aw * bz + ax * by - ay * bx, aw1 = aw * bw - ax * bx - ay * by - az * bz; + rotateY$1(out, a, rad); + bx = out[0]; + by = out[1]; + bz = out[2]; + bw = out[3]; + out[4] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by; + out[5] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz; + out[6] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx; + out[7] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz; + return out; } /** * Rotates a dual quat around the Z axis @@ -6733,30 +6160,18 @@ THE SOFTWARE. * @param {number} rad how far should the rotation be * @returns {quat2} out */ - function rotateZ(out, a, rad) { - var bx = -a[0], - by = -a[1], - bz = -a[2], - bw = a[3], - ax = a[4], - ay = a[5], - az = a[6], - aw = a[7], - ax1 = ax * bw + aw * bx + ay * bz - az * by, - ay1 = ay * bw + aw * by + az * bx - ax * bz, - az1 = az * bw + aw * bz + ax * by - ay * bx, - aw1 = aw * bw - ax * bx - ay * by - az * bz; - rotateZ$1(out, a, rad); - bx = out[0]; - by = out[1]; - bz = out[2]; - bw = out[3]; - out[4] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by; - out[5] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz; - out[6] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx; - out[7] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz; - return out; + var bx = -a[0], by = -a[1], bz = -a[2], bw = a[3], ax = a[4], ay = a[5], az = a[6], aw = a[7], ax1 = ax * bw + aw * bx + ay * bz - az * by, ay1 = ay * bw + aw * by + az * bx - ax * bz, az1 = az * bw + aw * bz + ax * by - ay * bx, aw1 = aw * bw - ax * bx - ay * by - az * bz; + rotateZ$1(out, a, rad); + bx = out[0]; + by = out[1]; + bz = out[2]; + bw = out[3]; + out[4] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by; + out[5] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz; + out[6] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx; + out[7] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz; + return out; } /** * Rotates a dual quat by a given quaternion (a * q) @@ -6766,29 +6181,21 @@ THE SOFTWARE. * @param {ReadonlyQuat} q quaternion to rotate by * @returns {quat2} out */ - function rotateByQuatAppend(out, a, q) { - var qx = q[0], - qy = q[1], - qz = q[2], - qw = q[3], - ax = a[0], - ay = a[1], - az = a[2], - aw = a[3]; - out[0] = ax * qw + aw * qx + ay * qz - az * qy; - out[1] = ay * qw + aw * qy + az * qx - ax * qz; - out[2] = az * qw + aw * qz + ax * qy - ay * qx; - out[3] = aw * qw - ax * qx - ay * qy - az * qz; - ax = a[4]; - ay = a[5]; - az = a[6]; - aw = a[7]; - out[4] = ax * qw + aw * qx + ay * qz - az * qy; - out[5] = ay * qw + aw * qy + az * qx - ax * qz; - out[6] = az * qw + aw * qz + ax * qy - ay * qx; - out[7] = aw * qw - ax * qx - ay * qy - az * qz; - return out; + var qx = q[0], qy = q[1], qz = q[2], qw = q[3], ax = a[0], ay = a[1], az = a[2], aw = a[3]; + out[0] = ax * qw + aw * qx + ay * qz - az * qy; + out[1] = ay * qw + aw * qy + az * qx - ax * qz; + out[2] = az * qw + aw * qz + ax * qy - ay * qx; + out[3] = aw * qw - ax * qx - ay * qy - az * qz; + ax = a[4]; + ay = a[5]; + az = a[6]; + aw = a[7]; + out[4] = ax * qw + aw * qx + ay * qz - az * qy; + out[5] = ay * qw + aw * qy + az * qx - ax * qz; + out[6] = az * qw + aw * qz + ax * qy - ay * qx; + out[7] = aw * qw - ax * qx - ay * qy - az * qz; + return out; } /** * Rotates a dual quat by a given quaternion (q * a) @@ -6798,29 +6205,21 @@ THE SOFTWARE. * @param {ReadonlyQuat2} a the dual quaternion to rotate * @returns {quat2} out */ - function rotateByQuatPrepend(out, q, a) { - var qx = q[0], - qy = q[1], - qz = q[2], - qw = q[3], - bx = a[0], - by = a[1], - bz = a[2], - bw = a[3]; - out[0] = qx * bw + qw * bx + qy * bz - qz * by; - out[1] = qy * bw + qw * by + qz * bx - qx * bz; - out[2] = qz * bw + qw * bz + qx * by - qy * bx; - out[3] = qw * bw - qx * bx - qy * by - qz * bz; - bx = a[4]; - by = a[5]; - bz = a[6]; - bw = a[7]; - out[4] = qx * bw + qw * bx + qy * bz - qz * by; - out[5] = qy * bw + qw * by + qz * bx - qx * bz; - out[6] = qz * bw + qw * bz + qx * by - qy * bx; - out[7] = qw * bw - qx * bx - qy * by - qz * bz; - return out; + var qx = q[0], qy = q[1], qz = q[2], qw = q[3], bx = a[0], by = a[1], bz = a[2], bw = a[3]; + out[0] = qx * bw + qw * bx + qy * bz - qz * by; + out[1] = qy * bw + qw * by + qz * bx - qx * bz; + out[2] = qz * bw + qw * bz + qx * by - qy * bx; + out[3] = qw * bw - qx * bx - qy * by - qz * bz; + bx = a[4]; + by = a[5]; + bz = a[6]; + bw = a[7]; + out[4] = qx * bw + qw * bx + qy * bz - qz * by; + out[5] = qy * bw + qw * by + qz * bx - qx * bz; + out[6] = qz * bw + qw * bz + qx * by - qy * bx; + out[7] = qw * bw - qx * bx - qy * by - qz * bz; + return out; } /** * Rotates a dual quat around a given axis. Does the normalisation automatically @@ -6831,37 +6230,29 @@ THE SOFTWARE. * @param {Number} rad how far the rotation should be * @returns {quat2} out */ - function rotateAroundAxis(out, a, axis, rad) { - //Special case for rad = 0 - if (Math.abs(rad) < EPSILON) { - return copy$1(out, a); - } - - var axisLength = Maths.hypot(axis[0], axis[1], axis[2]); - rad = rad * 0.5; - var s = Math.sin(rad); - var bx = s * axis[0] / axisLength; - var by = s * axis[1] / axisLength; - var bz = s * axis[2] / axisLength; - var bw = Math.cos(rad); - var ax1 = a[0], - ay1 = a[1], - az1 = a[2], - aw1 = a[3]; - out[0] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by; - out[1] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz; - out[2] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx; - out[3] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz; - var ax = a[4], - ay = a[5], - az = a[6], - aw = a[7]; - out[4] = ax * bw + aw * bx + ay * bz - az * by; - out[5] = ay * bw + aw * by + az * bx - ax * bz; - out[6] = az * bw + aw * bz + ax * by - ay * bx; - out[7] = aw * bw - ax * bx - ay * by - az * bz; - return out; + //Special case for rad = 0 + if (Math.abs(rad) < EPSILON) { + return copy$1(out, a); + } + var axisLength = Maths.hypot(axis[0], axis[1], axis[2]); + rad = rad * 0.5; + var s = Math.sin(rad); + var bx = (s * axis[0]) / axisLength; + var by = (s * axis[1]) / axisLength; + var bz = (s * axis[2]) / axisLength; + var bw = Math.cos(rad); + var ax1 = a[0], ay1 = a[1], az1 = a[2], aw1 = a[3]; + out[0] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by; + out[1] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz; + out[2] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx; + out[3] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz; + var ax = a[4], ay = a[5], az = a[6], aw = a[7]; + out[4] = ax * bw + aw * bx + ay * bz - az * by; + out[5] = ay * bw + aw * by + az * bx - ax * bz; + out[6] = az * bw + aw * bz + ax * by - ay * bx; + out[7] = aw * bw - ax * bx - ay * by - az * bz; + return out; } /** * Adds two dual quat's @@ -6872,17 +6263,16 @@ THE SOFTWARE. * @returns {quat2} out * @function */ - function add$1(out, a, b) { - out[0] = a[0] + b[0]; - out[1] = a[1] + b[1]; - out[2] = a[2] + b[2]; - out[3] = a[3] + b[3]; - out[4] = a[4] + b[4]; - out[5] = a[5] + b[5]; - out[6] = a[6] + b[6]; - out[7] = a[7] + b[7]; - return out; + out[0] = a[0] + b[0]; + out[1] = a[1] + b[1]; + out[2] = a[2] + b[2]; + out[3] = a[3] + b[3]; + out[4] = a[4] + b[4]; + out[5] = a[5] + b[5]; + out[6] = a[6] + b[6]; + out[7] = a[7] + b[7]; + return out; } /** * Multiplies two dual quat's @@ -6892,39 +6282,54 @@ THE SOFTWARE. * @param {ReadonlyQuat2} b the second operand * @returns {quat2} out */ - function multiply$1(out, a, b) { - var ax0 = a[0], - ay0 = a[1], - az0 = a[2], - aw0 = a[3], - bx1 = b[4], - by1 = b[5], - bz1 = b[6], - bw1 = b[7], - ax1 = a[4], - ay1 = a[5], - az1 = a[6], - aw1 = a[7], - bx0 = b[0], - by0 = b[1], - bz0 = b[2], - bw0 = b[3]; - out[0] = ax0 * bw0 + aw0 * bx0 + ay0 * bz0 - az0 * by0; - out[1] = ay0 * bw0 + aw0 * by0 + az0 * bx0 - ax0 * bz0; - out[2] = az0 * bw0 + aw0 * bz0 + ax0 * by0 - ay0 * bx0; - out[3] = aw0 * bw0 - ax0 * bx0 - ay0 * by0 - az0 * bz0; - out[4] = ax0 * bw1 + aw0 * bx1 + ay0 * bz1 - az0 * by1 + ax1 * bw0 + aw1 * bx0 + ay1 * bz0 - az1 * by0; - out[5] = ay0 * bw1 + aw0 * by1 + az0 * bx1 - ax0 * bz1 + ay1 * bw0 + aw1 * by0 + az1 * bx0 - ax1 * bz0; - out[6] = az0 * bw1 + aw0 * bz1 + ax0 * by1 - ay0 * bx1 + az1 * bw0 + aw1 * bz0 + ax1 * by0 - ay1 * bx0; - out[7] = aw0 * bw1 - ax0 * bx1 - ay0 * by1 - az0 * bz1 + aw1 * bw0 - ax1 * bx0 - ay1 * by0 - az1 * bz0; - return out; + var ax0 = a[0], ay0 = a[1], az0 = a[2], aw0 = a[3], bx1 = b[4], by1 = b[5], bz1 = b[6], bw1 = b[7], ax1 = a[4], ay1 = a[5], az1 = a[6], aw1 = a[7], bx0 = b[0], by0 = b[1], bz0 = b[2], bw0 = b[3]; + out[0] = ax0 * bw0 + aw0 * bx0 + ay0 * bz0 - az0 * by0; + out[1] = ay0 * bw0 + aw0 * by0 + az0 * bx0 - ax0 * bz0; + out[2] = az0 * bw0 + aw0 * bz0 + ax0 * by0 - ay0 * bx0; + out[3] = aw0 * bw0 - ax0 * bx0 - ay0 * by0 - az0 * bz0; + out[4] = + ax0 * bw1 + + aw0 * bx1 + + ay0 * bz1 - + az0 * by1 + + ax1 * bw0 + + aw1 * bx0 + + ay1 * bz0 - + az1 * by0; + out[5] = + ay0 * bw1 + + aw0 * by1 + + az0 * bx1 - + ax0 * bz1 + + ay1 * bw0 + + aw1 * by0 + + az1 * bx0 - + ax1 * bz0; + out[6] = + az0 * bw1 + + aw0 * bz1 + + ax0 * by1 - + ay0 * bx1 + + az1 * bw0 + + aw1 * bz0 + + ax1 * by0 - + ay1 * bx0; + out[7] = + aw0 * bw1 - + ax0 * bx1 - + ay0 * by1 - + az0 * bz1 + + aw1 * bw0 - + ax1 * bx0 - + ay1 * by0 - + az1 * bz0; + return out; } /** * Alias for {@link quat2.multiply} * @function */ - var mul$1 = multiply$1; /** * Scales a dual quat by a scalar number @@ -6935,17 +6340,16 @@ THE SOFTWARE. * @returns {quat2} out * @function */ - function scale$1(out, a, b) { - out[0] = a[0] * b; - out[1] = a[1] * b; - out[2] = a[2] * b; - out[3] = a[3] * b; - out[4] = a[4] * b; - out[5] = a[5] * b; - out[6] = a[6] * b; - out[7] = a[7] * b; - return out; + out[0] = a[0] * b; + out[1] = a[1] * b; + out[2] = a[2] * b; + out[3] = a[3] * b; + out[4] = a[4] * b; + out[5] = a[5] * b; + out[6] = a[6] * b; + out[7] = a[7] * b; + return out; } /** * Calculates the dot product of two dual quat's (The dot product of the real parts) @@ -6955,7 +6359,6 @@ THE SOFTWARE. * @returns {Number} dot product of a and b * @function */ - var dot$1 = dot$2; /** * Performs a linear interpolation between two dual quats's @@ -6967,19 +6370,19 @@ THE SOFTWARE. * @param {Number} t interpolation amount, in the range [0-1], between the two inputs * @returns {quat2} out */ - function lerp$1(out, a, b, t) { - var mt = 1 - t; - if (dot$1(a, b) < 0) t = -t; - out[0] = a[0] * mt + b[0] * t; - out[1] = a[1] * mt + b[1] * t; - out[2] = a[2] * mt + b[2] * t; - out[3] = a[3] * mt + b[3] * t; - out[4] = a[4] * mt + b[4] * t; - out[5] = a[5] * mt + b[5] * t; - out[6] = a[6] * mt + b[6] * t; - out[7] = a[7] * mt + b[7] * t; - return out; + var mt = 1 - t; + if (dot$1(a, b) < 0) + t = -t; + out[0] = a[0] * mt + b[0] * t; + out[1] = a[1] * mt + b[1] * t; + out[2] = a[2] * mt + b[2] * t; + out[3] = a[3] * mt + b[3] * t; + out[4] = a[4] * mt + b[4] * t; + out[5] = a[5] * mt + b[5] * t; + out[6] = a[6] * mt + b[6] * t; + out[7] = a[7] * mt + b[7] * t; + return out; } /** * Calculates the inverse of a dual quat. If they are normalized, conjugate is cheaper @@ -6988,18 +6391,17 @@ THE SOFTWARE. * @param {ReadonlyQuat2} a dual quat to calculate inverse of * @returns {quat2} out */ - function invert(out, a) { - var sqlen = squaredLength$1(a); - out[0] = -a[0] / sqlen; - out[1] = -a[1] / sqlen; - out[2] = -a[2] / sqlen; - out[3] = a[3] / sqlen; - out[4] = -a[4] / sqlen; - out[5] = -a[5] / sqlen; - out[6] = -a[6] / sqlen; - out[7] = a[7] / sqlen; - return out; + var sqlen = squaredLength$1(a); + out[0] = -a[0] / sqlen; + out[1] = -a[1] / sqlen; + out[2] = -a[2] / sqlen; + out[3] = a[3] / sqlen; + out[4] = -a[4] / sqlen; + out[5] = -a[5] / sqlen; + out[6] = -a[6] / sqlen; + out[7] = a[7] / sqlen; + return out; } /** * Calculates the conjugate of a dual quat @@ -7009,17 +6411,16 @@ THE SOFTWARE. * @param {ReadonlyQuat2} a quat to calculate conjugate of * @returns {quat2} out */ - function conjugate(out, a) { - out[0] = -a[0]; - out[1] = -a[1]; - out[2] = -a[2]; - out[3] = a[3]; - out[4] = -a[4]; - out[5] = -a[5]; - out[6] = -a[6]; - out[7] = a[7]; - return out; + out[0] = -a[0]; + out[1] = -a[1]; + out[2] = -a[2]; + out[3] = a[3]; + out[4] = -a[4]; + out[5] = -a[5]; + out[6] = -a[6]; + out[7] = a[7]; + return out; } /** * Calculates the length of a dual quat @@ -7028,13 +6429,11 @@ THE SOFTWARE. * @returns {Number} length of a * @function */ - var length$1 = length$2; /** * Alias for {@link quat2.length} * @function */ - var len$1 = length$1; /** * Calculates the squared length of a dual quat @@ -7043,13 +6442,11 @@ THE SOFTWARE. * @returns {Number} squared length of a * @function */ - var squaredLength$1 = squaredLength$2; /** * Alias for {@link quat2.squaredLength} * @function */ - var sqrLen$1 = squaredLength$1; /** * Normalize a dual quat @@ -7059,32 +6456,29 @@ THE SOFTWARE. * @returns {quat2} out * @function */ - function normalize$1(out, a) { - var magnitude = squaredLength$1(a); - - if (magnitude > 0) { - magnitude = Math.sqrt(magnitude); - var a0 = a[0] / magnitude; - var a1 = a[1] / magnitude; - var a2 = a[2] / magnitude; - var a3 = a[3] / magnitude; - var b0 = a[4]; - var b1 = a[5]; - var b2 = a[6]; - var b3 = a[7]; - var a_dot_b = a0 * b0 + a1 * b1 + a2 * b2 + a3 * b3; - out[0] = a0; - out[1] = a1; - out[2] = a2; - out[3] = a3; - out[4] = (b0 - a0 * a_dot_b) / magnitude; - out[5] = (b1 - a1 * a_dot_b) / magnitude; - out[6] = (b2 - a2 * a_dot_b) / magnitude; - out[7] = (b3 - a3 * a_dot_b) / magnitude; - } - - return out; + var magnitude = squaredLength$1(a); + if (magnitude > 0) { + magnitude = Math.sqrt(magnitude); + var a0 = a[0] / magnitude; + var a1 = a[1] / magnitude; + var a2 = a[2] / magnitude; + var a3 = a[3] / magnitude; + var b0 = a[4]; + var b1 = a[5]; + var b2 = a[6]; + var b3 = a[7]; + var a_dot_b = a0 * b0 + a1 * b1 + a2 * b2 + a3 * b3; + out[0] = a0; + out[1] = a1; + out[2] = a2; + out[3] = a3; + out[4] = (b0 - a0 * a_dot_b) / magnitude; + out[5] = (b1 - a1 * a_dot_b) / magnitude; + out[6] = (b2 - a2 * a_dot_b) / magnitude; + out[7] = (b3 - a3 * a_dot_b) / magnitude; + } + return out; } /** * Returns a string representation of a dual quaternion @@ -7092,9 +6486,24 @@ THE SOFTWARE. * @param {ReadonlyQuat2} a dual quaternion to represent as a string * @returns {String} string representation of the dual quat */ - function str$1(a) { - return "quat2(" + a[0].toString() + ", " + a[1].toString() + ", " + a[2].toString() + ", " + a[3].toString() + ", " + a[4].toString() + ", " + a[5].toString() + ", " + a[6].toString() + ", " + a[7].toString() + ")"; + return ("quat2(" + + a[0].toString() + + ", " + + a[1].toString() + + ", " + + a[2].toString() + + ", " + + a[3].toString() + + ", " + + a[4].toString() + + ", " + + a[5].toString() + + ", " + + a[6].toString() + + ", " + + a[7].toString() + + ")"); } /** * Returns whether or not the dual quaternions have exactly the same elements in the same position (when compared with ===) @@ -7103,9 +6512,15 @@ THE SOFTWARE. * @param {ReadonlyQuat2} b the second dual quaternion. * @returns {Boolean} true if the dual quaternions are equal, false otherwise. */ - function exactEquals$1(a, b) { - return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5] && a[6] === b[6] && a[7] === b[7]; + return (a[0] === b[0] && + a[1] === b[1] && + a[2] === b[2] && + a[3] === b[3] && + a[4] === b[4] && + a[5] === b[5] && + a[6] === b[6] && + a[7] === b[7]); } /** * Returns whether or not the dual quaternions have approximately the same elements in the same position. @@ -7114,25 +6529,25 @@ THE SOFTWARE. * @param {ReadonlyQuat2} b the second dual quat. * @returns {Boolean} true if the dual quats are equal, false otherwise. */ - function equals$1(a, b) { - var a0 = a[0], - a1 = a[1], - a2 = a[2], - a3 = a[3], - a4 = a[4], - a5 = a[5], - a6 = a[6], - a7 = a[7]; - var b0 = b[0], - b1 = b[1], - b2 = b[2], - b3 = b[3], - b4 = b[4], - b5 = b[5], - b6 = b[6], - b7 = b[7]; - return Math.abs(a0 - b0) <= EPSILON * Maths.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= EPSILON * Maths.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= EPSILON * Maths.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= EPSILON * Maths.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= EPSILON * Maths.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= EPSILON * Maths.max(1.0, Math.abs(a5), Math.abs(b5)) && Math.abs(a6 - b6) <= EPSILON * Maths.max(1.0, Math.abs(a6), Math.abs(b6)) && Math.abs(a7 - b7) <= EPSILON * Maths.max(1.0, Math.abs(a7), Math.abs(b7)); + var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5], a6 = a[6], a7 = a[7]; + var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3], b4 = b[4], b5 = b[5], b6 = b[6], b7 = b[7]; + return (Math.abs(a0 - b0) <= + EPSILON * Maths.max(1.0, Math.abs(a0), Math.abs(b0)) && + Math.abs(a1 - b1) <= + EPSILON * Maths.max(1.0, Math.abs(a1), Math.abs(b1)) && + Math.abs(a2 - b2) <= + EPSILON * Maths.max(1.0, Math.abs(a2), Math.abs(b2)) && + Math.abs(a3 - b3) <= + EPSILON * Maths.max(1.0, Math.abs(a3), Math.abs(b3)) && + Math.abs(a4 - b4) <= + EPSILON * Maths.max(1.0, Math.abs(a4), Math.abs(b4)) && + Math.abs(a5 - b5) <= + EPSILON * Maths.max(1.0, Math.abs(a5), Math.abs(b5)) && + Math.abs(a6 - b6) <= + EPSILON * Maths.max(1.0, Math.abs(a6), Math.abs(b6)) && + Math.abs(a7 - b7) <= + EPSILON * Maths.max(1.0, Math.abs(a7), Math.abs(b7))); } var quat2 = /*#__PURE__*/Object.freeze({ @@ -7182,20 +6597,18 @@ THE SOFTWARE. * 2 Dimensional Vector * @module vec2 */ - /** * Creates a new, empty vec2 * * @returns {vec2} a new 2D vector */ - function create() { - var out = new Float64Array(2); //if (glMatrix.ARRAY_TYPE != Float32Array) { - - out[0] = 0; - out[1] = 0; //} - - return out; + var out = new Float64Array(2); + //if (glMatrix.ARRAY_TYPE != Float32Array) { + out[0] = 0; + out[1] = 0; + //} + return out; } /** * Creates a new vec2 initialized with values from an existing vector @@ -7203,12 +6616,11 @@ THE SOFTWARE. * @param {ReadonlyVec2} a vector to clone * @returns {vec2} a new 2D vector */ - function clone(a) { - var out = new Float64Array(2); - out[0] = a[0]; - out[1] = a[1]; - return out; + var out = new Float64Array(2); + out[0] = a[0]; + out[1] = a[1]; + return out; } /** * Creates a new vec2 initialized with the given values @@ -7217,12 +6629,11 @@ THE SOFTWARE. * @param {Number} y Y component * @returns {vec2} a new 2D vector */ - function fromValues(x, y) { - var out = new Float64Array(2); - out[0] = x; - out[1] = y; - return out; + var out = new Float64Array(2); + out[0] = x; + out[1] = y; + return out; } /** * Copy the values from one vec2 to another @@ -7231,11 +6642,10 @@ THE SOFTWARE. * @param {ReadonlyVec2} a the source vector * @returns {vec2} out */ - function copy(out, a) { - out[0] = a[0]; - out[1] = a[1]; - return out; + out[0] = a[0]; + out[1] = a[1]; + return out; } /** * Set the components of a vec2 to the given values @@ -7245,11 +6655,10 @@ THE SOFTWARE. * @param {Number} y Y component * @returns {vec2} out */ - function set(out, x, y) { - out[0] = x; - out[1] = y; - return out; + out[0] = x; + out[1] = y; + return out; } /** * Adds two vec2's @@ -7259,11 +6668,10 @@ THE SOFTWARE. * @param {ReadonlyVec2} b the second operand * @returns {vec2} out */ - function add(out, a, b) { - out[0] = a[0] + b[0]; - out[1] = a[1] + b[1]; - return out; + out[0] = a[0] + b[0]; + out[1] = a[1] + b[1]; + return out; } /** * Subtracts vector b from vector a @@ -7273,11 +6681,10 @@ THE SOFTWARE. * @param {ReadonlyVec2} b the second operand * @returns {vec2} out */ - function subtract(out, a, b) { - out[0] = a[0] - b[0]; - out[1] = a[1] - b[1]; - return out; + out[0] = a[0] - b[0]; + out[1] = a[1] - b[1]; + return out; } /** * Multiplies two vec2's @@ -7287,11 +6694,10 @@ THE SOFTWARE. * @param {ReadonlyVec2} b the second operand * @returns {vec2} out */ - function multiply(out, a, b) { - out[0] = a[0] * b[0]; - out[1] = a[1] * b[1]; - return out; + out[0] = a[0] * b[0]; + out[1] = a[1] * b[1]; + return out; } /** * Divides two vec2's @@ -7301,11 +6707,10 @@ THE SOFTWARE. * @param {ReadonlyVec2} b the second operand * @returns {vec2} out */ - function divide(out, a, b) { - out[0] = a[0] / b[0]; - out[1] = a[1] / b[1]; - return out; + out[0] = a[0] / b[0]; + out[1] = a[1] / b[1]; + return out; } /** * Math.ceil the components of a vec2 @@ -7314,11 +6719,10 @@ THE SOFTWARE. * @param {ReadonlyVec2} a vector to ceil * @returns {vec2} out */ - function ceil(out, a) { - out[0] = Math.ceil(a[0]); - out[1] = Math.ceil(a[1]); - return out; + out[0] = Math.ceil(a[0]); + out[1] = Math.ceil(a[1]); + return out; } /** * Math.floor the components of a vec2 @@ -7327,11 +6731,10 @@ THE SOFTWARE. * @param {ReadonlyVec2} a vector to floor * @returns {vec2} out */ - function floor(out, a) { - out[0] = Math.floor(a[0]); - out[1] = Math.floor(a[1]); - return out; + out[0] = Math.floor(a[0]); + out[1] = Math.floor(a[1]); + return out; } /** * Returns the minimum of two vec2's @@ -7341,11 +6744,10 @@ THE SOFTWARE. * @param {ReadonlyVec2} b the second operand * @returns {vec2} out */ - function min(out, a, b) { - out[0] = Math.min(a[0], b[0]); - out[1] = Math.min(a[1], b[1]); - return out; + out[0] = Math.min(a[0], b[0]); + out[1] = Math.min(a[1], b[1]); + return out; } /** * Returns the maximum of two vec2's @@ -7355,11 +6757,10 @@ THE SOFTWARE. * @param {ReadonlyVec2} b the second operand * @returns {vec2} out */ - function max(out, a, b) { - out[0] = Math.max(a[0], b[0]); - out[1] = Math.max(a[1], b[1]); - return out; + out[0] = Math.max(a[0], b[0]); + out[1] = Math.max(a[1], b[1]); + return out; } /** * Math.round the components of a vec2 @@ -7368,11 +6769,10 @@ THE SOFTWARE. * @param {ReadonlyVec2} a vector to round * @returns {vec2} out */ - function round(out, a) { - out[0] = Math.round(a[0]); - out[1] = Math.round(a[1]); - return out; + out[0] = Math.round(a[0]); + out[1] = Math.round(a[1]); + return out; } /** * Scales a vec2 by a scalar number @@ -7382,11 +6782,10 @@ THE SOFTWARE. * @param {Number} b amount to scale the vector by * @returns {vec2} out */ - function scale(out, a, b) { - out[0] = a[0] * b; - out[1] = a[1] * b; - return out; + out[0] = a[0] * b; + out[1] = a[1] * b; + return out; } /** * Adds two vec2's after scaling the second operand by a scalar value @@ -7397,11 +6796,10 @@ THE SOFTWARE. * @param {Number} scale the amount to scale b by before adding * @returns {vec2} out */ - function scaleAndAdd(out, a, b, scale) { - out[0] = a[0] + b[0] * scale; - out[1] = a[1] + b[1] * scale; - return out; + out[0] = a[0] + b[0] * scale; + out[1] = a[1] + b[1] * scale; + return out; } /** * Calculates the euclidian distance between two vec2's @@ -7410,11 +6808,9 @@ THE SOFTWARE. * @param {ReadonlyVec2} b the second operand * @returns {Number} distance between a and b */ - function distance(a, b) { - var x = b[0] - a[0], - y = b[1] - a[1]; - return Maths.hypot(x, y); + var x = b[0] - a[0], y = b[1] - a[1]; + return Maths.hypot(x, y); } /** * Calculates the squared euclidian distance between two vec2's @@ -7423,11 +6819,9 @@ THE SOFTWARE. * @param {ReadonlyVec2} b the second operand * @returns {Number} squared distance between a and b */ - function squaredDistance(a, b) { - var x = b[0] - a[0], - y = b[1] - a[1]; - return x * x + y * y; + var x = b[0] - a[0], y = b[1] - a[1]; + return x * x + y * y; } /** * Calculates the length of a vec2 @@ -7435,11 +6829,9 @@ THE SOFTWARE. * @param {ReadonlyVec2} a vector to calculate length of * @returns {Number} length of a */ - function length(a) { - var x = a[0], - y = a[1]; - return Math.hypot(x, y); + var x = a[0], y = a[1]; + return Math.hypot(x, y); } /** * Calculates the squared length of a vec2 @@ -7447,11 +6839,9 @@ THE SOFTWARE. * @param {ReadonlyVec2} a vector to calculate squared length of * @returns {Number} squared length of a */ - function squaredLength(a) { - var x = a[0], - y = a[1]; - return x * x + y * y; + var x = a[0], y = a[1]; + return x * x + y * y; } /** * Negates the components of a vec2 @@ -7460,11 +6850,10 @@ THE SOFTWARE. * @param {ReadonlyVec2} a vector to negate * @returns {vec2} out */ - function negate(out, a) { - out[0] = -a[0]; - out[1] = -a[1]; - return out; + out[0] = -a[0]; + out[1] = -a[1]; + return out; } /** * Returns the inverse of the components of a vec2 @@ -7473,11 +6862,10 @@ THE SOFTWARE. * @param {ReadonlyVec2} a vector to invert * @returns {vec2} out */ - function inverse(out, a) { - out[0] = 1.0 / a[0]; - out[1] = 1.0 / a[1]; - return out; + out[0] = 1.0 / a[0]; + out[1] = 1.0 / a[1]; + return out; } /** * Normalize a vec2 @@ -7486,20 +6874,16 @@ THE SOFTWARE. * @param {ReadonlyVec2} a vector to normalize * @returns {vec2} out */ - function normalize(out, a) { - var x = a[0], - y = a[1]; - var len = x * x + y * y; - - if (len > 0) { - //TODO: evaluate use of glm_invsqrt here? - len = 1 / Math.sqrt(len); - } - - out[0] = a[0] * len; - out[1] = a[1] * len; - return out; + var x = a[0], y = a[1]; + var len = x * x + y * y; + if (len > 0) { + //TODO: evaluate use of glm_invsqrt here? + len = 1 / Math.sqrt(len); + } + out[0] = a[0] * len; + out[1] = a[1] * len; + return out; } /** * Calculates the dot product of two vec2's @@ -7508,9 +6892,8 @@ THE SOFTWARE. * @param {ReadonlyVec2} b the second operand * @returns {Number} dot product of a and b */ - function dot(a, b) { - return a[0] * b[0] + a[1] * b[1]; + return a[0] * b[0] + a[1] * b[1]; } /** * Computes the cross product of two vec2's @@ -7521,12 +6904,11 @@ THE SOFTWARE. * @param {ReadonlyVec2} b the second operand * @returns {vec3} out */ - function cross(out, a, b) { - var z = a[0] * b[1] - a[1] * b[0]; - out[0] = out[1] = 0; - out[2] = z; - return out; + var z = a[0] * b[1] - a[1] * b[0]; + out[0] = out[1] = 0; + out[2] = z; + return out; } /** * Performs a linear interpolation between two vec2's @@ -7537,13 +6919,11 @@ THE SOFTWARE. * @param {Number} t interpolation amount, in the range [0-1], between the two inputs * @returns {vec2} out */ - function lerp(out, a, b, t) { - var ax = a[0], - ay = a[1]; - out[0] = ax + t * (b[0] - ax); - out[1] = ay + t * (b[1] - ay); - return out; + var ax = a[0], ay = a[1]; + out[0] = ax + t * (b[0] - ax); + out[1] = ay + t * (b[1] - ay); + return out; } /** * Generates a random vector with the given scale @@ -7552,13 +6932,12 @@ THE SOFTWARE. * @param {Number} [scale] Length of the resulting vector. If omitted, a unit vector will be returned * @returns {vec2} out */ - function random(out, scale) { - scale = scale || 1.0; - var r = RANDOM() * 2.0 * Math.PI; - out[0] = Math.cos(r) * scale; - out[1] = Math.sin(r) * scale; - return out; + scale = scale || 1.0; + var r = RANDOM() * 2.0 * Math.PI; + out[0] = Math.cos(r) * scale; + out[1] = Math.sin(r) * scale; + return out; } /** * Transforms the vec2 with a mat2 @@ -7568,13 +6947,11 @@ THE SOFTWARE. * @param {ReadonlyMat2} m matrix to transform with * @returns {vec2} out */ - function transformMat2(out, a, m) { - var x = a[0], - y = a[1]; - out[0] = m[0] * x + m[2] * y; - out[1] = m[1] * x + m[3] * y; - return out; + var x = a[0], y = a[1]; + out[0] = m[0] * x + m[2] * y; + out[1] = m[1] * x + m[3] * y; + return out; } /** * Transforms the vec2 with a mat2d @@ -7584,13 +6961,11 @@ THE SOFTWARE. * @param {ReadonlyMat2d} m matrix to transform with * @returns {vec2} out */ - function transformMat2d(out, a, m) { - var x = a[0], - y = a[1]; - out[0] = m[0] * x + m[2] * y + m[4]; - out[1] = m[1] * x + m[3] * y + m[5]; - return out; + var x = a[0], y = a[1]; + out[0] = m[0] * x + m[2] * y + m[4]; + out[1] = m[1] * x + m[3] * y + m[5]; + return out; } /** * Transforms the vec2 with a mat3 @@ -7601,13 +6976,11 @@ THE SOFTWARE. * @param {ReadonlyMat3} m matrix to transform with * @returns {vec2} out */ - function transformMat3(out, a, m) { - var x = a[0], - y = a[1]; - out[0] = m[0] * x + m[3] * y + m[6]; - out[1] = m[1] * x + m[4] * y + m[7]; - return out; + var x = a[0], y = a[1]; + out[0] = m[0] * x + m[3] * y + m[6]; + out[1] = m[1] * x + m[4] * y + m[7]; + return out; } /** * Transforms the vec2 with a mat4 @@ -7619,13 +6992,12 @@ THE SOFTWARE. * @param {ReadonlyMat4} m matrix to transform with * @returns {vec2} out */ - function transformMat4(out, a, m) { - var x = a[0]; - var y = a[1]; - out[0] = m[0] * x + m[4] * y + m[12]; - out[1] = m[1] * x + m[5] * y + m[13]; - return out; + var x = a[0]; + var y = a[1]; + out[0] = m[0] * x + m[4] * y + m[12]; + out[1] = m[1] * x + m[5] * y + m[13]; + return out; } /** * Rotate a 2D vector @@ -7635,17 +7007,13 @@ THE SOFTWARE. * @param {Number} rad The angle of rotation in radians * @returns {vec2} out */ - function rotate(out, a, b, rad) { - //Translate point to the origin - var p0 = a[0] - b[0], - p1 = a[1] - b[1], - sinC = Math.sin(rad), - cosC = Math.cos(rad); //perform rotation and translate to correct position - - out[0] = p0 * cosC - p1 * sinC + b[0]; - out[1] = p0 * sinC + p1 * cosC + b[1]; - return out; + //Translate point to the origin + var p0 = a[0] - b[0], p1 = a[1] - b[1], sinC = Math.sin(rad), cosC = Math.cos(rad); + //perform rotation and translate to correct position + out[0] = p0 * cosC - p1 * sinC + b[0]; + out[1] = p0 * sinC + p1 * cosC + b[1]; + return out; } /** * Get the angle between two 2D vectors @@ -7653,18 +7021,14 @@ THE SOFTWARE. * @param {ReadonlyVec2} b The second operand * @returns {Number} The angle in radians */ - function angle(a, b) { - var x1 = a[0], - y1 = a[1], - x2 = b[0], - y2 = b[1], - // mag is the product of the magnitudes of a and b - mag = Math.sqrt(x1 * x1 + y1 * y1) * Math.sqrt(x2 * x2 + y2 * y2), - // mag &&.. short circuits if mag == 0 - cosine = mag && (x1 * x2 + y1 * y2) / mag; // Math.min(Math.max(cosine, -1), 1) clamps the cosine between -1 and 1 - - return Math.acos(Math.min(Math.max(cosine, -1), 1)); + var x1 = a[0], y1 = a[1], x2 = b[0], y2 = b[1], + // mag is the product of the magnitudes of a and b + mag = Math.sqrt(x1 * x1 + y1 * y1) * Math.sqrt(x2 * x2 + y2 * y2), + // mag &&.. short circuits if mag == 0 + cosine = mag && (x1 * x2 + y1 * y2) / mag; + // Math.min(Math.max(cosine, -1), 1) clamps the cosine between -1 and 1 + return Math.acos(Math.min(Math.max(cosine, -1), 1)); } /** * Set the components of a vec2 to zero @@ -7672,11 +7036,10 @@ THE SOFTWARE. * @param {vec2} out the receiving vector * @returns {vec2} out */ - function zero(out) { - out[0] = 0.0; - out[1] = 0.0; - return out; + out[0] = 0.0; + out[1] = 0.0; + return out; } /** * Returns a string representation of a vector @@ -7684,9 +7047,8 @@ THE SOFTWARE. * @param {ReadonlyVec2} a vector to represent as a string * @returns {String} string representation of the vector */ - function str(a) { - return "vec2(" + a[0].toString() + ", " + a[1].toString() + ")"; + return "vec2(" + a[0].toString() + ", " + a[1].toString() + ")"; } /** * Returns whether or not the vectors exactly have the same elements in the same position (when compared with ===) @@ -7695,9 +7057,8 @@ THE SOFTWARE. * @param {ReadonlyVec2} b The second vector. * @returns {Boolean} True if the vectors are equal, false otherwise. */ - function exactEquals(a, b) { - return a[0] === b[0] && a[1] === b[1]; + return a[0] === b[0] && a[1] === b[1]; } /** * Returns whether or not the vectors have approximately the same elements in the same position. @@ -7706,55 +7067,48 @@ THE SOFTWARE. * @param {ReadonlyVec2} b The second vector. * @returns {Boolean} True if the vectors are equal, false otherwise. */ - function equals(a, b) { - var a0 = a[0], - a1 = a[1]; - var b0 = b[0], - b1 = b[1]; - return Math.abs(a0 - b0) <= EPSILON * Maths.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= EPSILON * Maths.max(1.0, Math.abs(a1), Math.abs(b1)); + var a0 = a[0], a1 = a[1]; + var b0 = b[0], b1 = b[1]; + return (Math.abs(a0 - b0) <= + EPSILON * Maths.max(1.0, Math.abs(a0), Math.abs(b0)) && + Math.abs(a1 - b1) <= + EPSILON * Maths.max(1.0, Math.abs(a1), Math.abs(b1))); } /** * Alias for {@link vec2.length} * @function */ - var len = length; /** * Alias for {@link vec2.subtract} * @function */ - var sub = subtract; /** * Alias for {@link vec2.multiply} * @function */ - var mul = multiply; /** * Alias for {@link vec2.divide} * @function */ - var div = divide; /** * Alias for {@link vec2.distance} * @function */ - var dist = distance; /** * Alias for {@link vec2.squaredDistance} * @function */ - var sqrDist = squaredDistance; /** * Alias for {@link vec2.squaredLength} * @function */ - var sqrLen = squaredLength; /** * Perform some operation over an array of vec2s. @@ -7768,37 +7122,32 @@ THE SOFTWARE. * @returns {Array} a * @function */ - var vec = create(); - var forEach = function () { - return function (a, stride, offset, count, fn, arg) { - var i, l; - - if (!stride) { - stride = 2; - } - - if (!offset) { - offset = 0; - } - - if (count) { - l = Maths.min(count * stride + offset, a.length); - } else { - l = a.length; - } - - for (i = offset; i < l; i += stride) { - vec[0] = a[i]; - vec[1] = a[i + 1]; - fn(vec, vec, arg); - a[i] = vec[0]; - a[i + 1] = vec[1]; - } - - return a; - }; - }(); + var forEach = (function () { + return function (a, stride, offset, count, fn, arg) { + var i, l; + if (!stride) { + stride = 2; + } + if (!offset) { + offset = 0; + } + if (count) { + l = Maths.min(count * stride + offset, a.length); + } + else { + l = a.length; + } + for (i = offset; i < l; i += stride) { + vec[0] = a[i]; + vec[1] = a[i + 1]; + fn(vec, vec, arg); + a[i] = vec[0]; + a[i + 1] = vec[1]; + } + return a; + }; + })(); var vec2 = /*#__PURE__*/Object.freeze({ __proto__: null, diff --git a/js/.gitignore b/js/.gitignore deleted file mode 100644 index a6c7c285..00000000 --- a/js/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*.js diff --git a/package.json b/package.json index de40d860..2eb94a53 100644 --- a/package.json +++ b/package.json @@ -30,12 +30,12 @@ "test": "mocha --require @babel/register --recursive spec", "doc": "jsdoc -c jsdoc.config.json", "update-license-version": "node utils/update-license-version.js", - "build-js": "tsc --module es2020 --outDir ./js ./assembly/index.ts", "build-umd": "rollup -c", - "build-esm": "cross-env BABEL_ENV=esm babel js -d dist/esm", - "build-cjs": "babel js -d dist/cjs", + "build-esm": "cross-env BABEL_ENV=esm babel assembly -d dist/esm", + "build-cjs": "babel assembly -d dist/cjs", "build-dts": "tsc --declaration --emitDeclarationOnly --module amd --outFile ./dist/index.d.ts ./assembly/index.ts && node ./utils/bundle-dts.js && tsc --noEmit ./dist/index.d.ts", - "build": "del dist && npm run update-license-version && npm run build-js && npm run build-umd && npm run build-esm && npm run build-cjs && npm run build-dts && node ./utils/build.js && npm run asbuild", + "build-portable": "del dist && npm run update-license-version && npm run build-umd && npm run build-esm && npm run build-cjs && npm run build-dts && node ./utils/build.js", + "build": "npm run build-portable && npm run asbuild", "prepare": "npm run build", "asbuild:untouched": "asc assembly/index.ts --target debug", "asbuild:optimized": "asc assembly/index.ts --target release", @@ -46,6 +46,7 @@ "@babel/cli": "^7.8.4", "@babel/core": "^7.9.0", "@babel/preset-env": "^7.9.0", + "@babel/preset-typescript": "^7.13.0", "@babel/register": "^7.9.0", "@rollup/plugin-typescript": "^8.2.1", "assemblyscript": "^0.18.16", diff --git a/rollup.config.js b/rollup.config.js index 6f5c71eb..b4ff719f 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,11 +1,12 @@ import babel from 'rollup-plugin-babel'; import { terser } from 'rollup-plugin-terser'; import { sizeSnapshot } from 'rollup-plugin-size-snapshot'; +import typescript from '@rollup/plugin-typescript'; const version = require('./package.json').version; const license = require('./utils/license-template'); -const input = './js/index.js'; +const input = './assembly/index.ts'; const name = 'glMatrix'; const bannerPlugin = { @@ -25,6 +26,7 @@ export default [ input, output: { file: 'dist/gl-matrix.js', format: 'umd', name }, plugins: [ + typescript(), bannerPlugin, babel() ] @@ -33,6 +35,7 @@ export default [ input, output: { file: 'dist/gl-matrix-min.js', format: 'umd', name }, plugins: [ + typescript(), bannerPlugin, babel(), sizeSnapshot(), diff --git a/utils/build.js b/utils/build.js index d664eb3e..5ec8dfdb 100644 --- a/utils/build.js +++ b/utils/build.js @@ -17,7 +17,7 @@ fs.writeFileSync('dist/package.json', JSON.stringify(pkg, null, 2)); copyFileSync('README.md', 'dist/README.md'); copyFileSync('LICENSE.md', 'dist/LICENSE.md'); -const files = fs.readdirSync('js') +const files = fs.readdirSync('assembly') .filter(file => !file.includes('common') && !file.includes('index')) .forEach(file => { const name = file.endsWith('.js') ? file.slice(0, -3) : file; From 8a56b64b6d29a0f56875004f341260bb6f343d14 Mon Sep 17 00:00:00 2001 From: Huguenin-Elie Steve Date: Thu, 1 Apr 2021 10:23:50 +0200 Subject: [PATCH 23/32] definitive toolchain compilation esm and cjs are produced by tsc rollup build all wasm loaders --- .babelrc.js | 4 ++-- .gitignore | 2 +- .size-snapshot.json | 6 +++--- build/loader-debug.js | 14 ++++++++++++++ build/loader-release.js | 14 ++++++++++++++ package.json | 19 ++++++++----------- rollup.config.js | 35 +++++++++++++++++++++++++++-------- 7 files changed, 69 insertions(+), 25 deletions(-) create mode 100644 build/loader-debug.js create mode 100644 build/loader-release.js diff --git a/.babelrc.js b/.babelrc.js index 38fe1a58..9cd650f8 100644 --- a/.babelrc.js +++ b/.babelrc.js @@ -1,8 +1,8 @@ module.exports = { - "presets": ["@babel/preset-typescript"], + "presets": ["@babel/preset-env"], "env": { "esm": { - "presets": [["@babel/preset-typescript", { "modules": false }]], + "presets": [["@babel/preset-env", { "modules": false }]], } } }; diff --git a/.gitignore b/.gitignore index e5926b77..31d08d5e 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,7 @@ .DS_Store tmp node_modules -npm-debug.log +*.log package-lock.json yarn.lock dist diff --git a/.size-snapshot.json b/.size-snapshot.json index 6e1b2705..3f9a0929 100644 --- a/.size-snapshot.json +++ b/.size-snapshot.json @@ -5,8 +5,8 @@ "gzipped": 13273 }, "dist\\gl-matrix-min.js": { - "bundled": 228852, - "minified": 52941, - "gzipped": 13521 + "bundled": 52941, + "minified": 52870, + "gzipped": 13467 } } diff --git a/build/loader-debug.js b/build/loader-debug.js new file mode 100644 index 00000000..fc44ff05 --- /dev/null +++ b/build/loader-debug.js @@ -0,0 +1,14 @@ +import wasm from './untouched.wasm'; + +let modules; + +wasm({ ...imports }).then(({ instance }) => { + modules = instance.exports +}) + +export const { + glMatrix, + mat2, mat2d, mat3, mat4, + quat, quat2, + vec2, vec3, vec4 +} = modules; diff --git a/build/loader-release.js b/build/loader-release.js new file mode 100644 index 00000000..ed55662e --- /dev/null +++ b/build/loader-release.js @@ -0,0 +1,14 @@ +import wasm from './optimized.wasm'; + +let modules; + +wasm({ ...imports }).then(({ instance }) => { + modules = instance.exports +}) + +export const { + glMatrix, + mat2, mat2d, mat3, mat4, + quat, quat2, + vec2, vec3, vec4 +} = modules; diff --git a/package.json b/package.json index 2eb94a53..abb88f0c 100644 --- a/package.json +++ b/package.json @@ -31,11 +31,10 @@ "doc": "jsdoc -c jsdoc.config.json", "update-license-version": "node utils/update-license-version.js", "build-umd": "rollup -c", - "build-esm": "cross-env BABEL_ENV=esm babel assembly -d dist/esm", - "build-cjs": "babel assembly -d dist/cjs", + "build-esm": "tsc --module es6 assembly/index.ts --outDir dist/esm", + "build-cjs": "tsc --module commonjs assembly/index.ts -outDir dist/cjs", "build-dts": "tsc --declaration --emitDeclarationOnly --module amd --outFile ./dist/index.d.ts ./assembly/index.ts && node ./utils/bundle-dts.js && tsc --noEmit ./dist/index.d.ts", - "build-portable": "del dist && npm run update-license-version && npm run build-umd && npm run build-esm && npm run build-cjs && npm run build-dts && node ./utils/build.js", - "build": "npm run build-portable && npm run asbuild", + "build": "del dist && npm run update-license-version && npm run asbuild && npm run build-umd && npm run build-esm && npm run build-cjs && npm run build-dts && node ./utils/build.js", "prepare": "npm run build", "asbuild:untouched": "asc assembly/index.ts --target debug", "asbuild:optimized": "asc assembly/index.ts --target release", @@ -43,12 +42,12 @@ }, "devDependencies": { "@assemblyscript/loader": "^0.18.17", - "@babel/cli": "^7.8.4", - "@babel/core": "^7.9.0", - "@babel/preset-env": "^7.9.0", - "@babel/preset-typescript": "^7.13.0", + "@babel/core": "7.9.0", + "@babel/preset-env": "^7.13.12", "@babel/register": "^7.9.0", + "@rollup/plugin-replace": "^2.4.2", "@rollup/plugin-typescript": "^8.2.1", + "@rollup/plugin-wasm": "^5.1.2", "assemblyscript": "^0.18.16", "cross-env": "^7.0.2", "del-cli": "^3.0.0", @@ -56,10 +55,8 @@ "mocha": "^7.1.1", "node-libs-browser": "^2.2.1", "rollup": "^2.3.2", - "rollup-plugin-assemblyscript": "^2.0.0", - "rollup-plugin-babel": "^4.4.0", "rollup-plugin-size-snapshot": "^0.11.0", - "rollup-plugin-terser": "^5.3.0", + "rollup-plugin-terser": "5.3.0", "typescript": "^3.8.3" }, "dependencies": {} diff --git a/rollup.config.js b/rollup.config.js index b4ff719f..fd861a63 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,7 +1,8 @@ -import babel from 'rollup-plugin-babel'; -import { terser } from 'rollup-plugin-terser'; import { sizeSnapshot } from 'rollup-plugin-size-snapshot'; +import { terser } from 'rollup-plugin-terser'; +import replace from '@rollup/plugin-replace'; import typescript from '@rollup/plugin-typescript'; +import wasm from '@rollup/plugin-wasm'; const version = require('./package.json').version; const license = require('./utils/license-template'); @@ -22,26 +23,44 @@ ${license} } export default [ + { + input: './build/loader-debug.js', + output: { file: 'dist/wasm/gl-matrix-loader-debug.js', format: 'umd', name }, + plugins: [ + replace({ preventAssignment: true }), + wasm(), + bannerPlugin + ] + }, + { + input: './build/loader-release.js', + output: { file: 'dist/wasm/gl-matrix-loader-release.js', format: 'umd', name }, + plugins: [ + replace({ preventAssignment: true }), + wasm(), + bannerPlugin + ] + }, { input, output: { file: 'dist/gl-matrix.js', format: 'umd', name }, plugins: [ + replace({ preventAssignment: true }), typescript(), - bannerPlugin, - babel() + bannerPlugin ] }, { input, output: { file: 'dist/gl-matrix-min.js', format: 'umd', name }, plugins: [ + replace({ preventAssignment: true }), typescript(), - bannerPlugin, - babel(), - sizeSnapshot(), terser({ output: { comments: /^!/ } - }) + }), + sizeSnapshot(), + bannerPlugin ] } ]; From 78a6d918eae61860c6fc619c457133064049d43a Mon Sep 17 00:00:00 2001 From: Huguenin-Elie Steve Date: Fri, 2 Apr 2021 13:27:33 +0200 Subject: [PATCH 24/32] hypot cannot be parsed in JS build must declare hypot3, hypot4, hypot7, ... each for function overloading moved namespace Math into maths.ts --- .size-snapshot.json | 6 +- assembly/common.ts | 2 +- assembly/imports.ts | 20 - assembly/mat2.ts | 5 +- assembly/mat2d.ts | 5 +- assembly/mat3.ts | 5 +- assembly/mat4.ts | 27 +- assembly/maths.ts | 197 ++ assembly/quat2.ts | 5 +- assembly/vec2.ts | 5 +- assembly/vec3.ts | 7 +- assembly/vec4.ts | 7 +- build/optimized.wat | 5136 +++++++++++++++++------------ build/untouched.wat | 2175 ++++++++----- dist/gl-matrix-min.js | 28 - dist/gl-matrix.js | 7214 ----------------------------------------- package.json | 3 + rollup.config.js | 4 +- 18 files changed, 4563 insertions(+), 10288 deletions(-) create mode 100644 assembly/maths.ts delete mode 100644 dist/gl-matrix-min.js delete mode 100644 dist/gl-matrix.js diff --git a/.size-snapshot.json b/.size-snapshot.json index 3f9a0929..9eceb04e 100644 --- a/.size-snapshot.json +++ b/.size-snapshot.json @@ -5,8 +5,8 @@ "gzipped": 13273 }, "dist\\gl-matrix-min.js": { - "bundled": 52941, - "minified": 52870, - "gzipped": 13467 + "bundled": 54440, + "minified": 54369, + "gzipped": 13854 } } diff --git a/assembly/common.ts b/assembly/common.ts index a7387e72..c21ff366 100644 --- a/assembly/common.ts +++ b/assembly/common.ts @@ -1,4 +1,4 @@ -import { Maths } from "./imports"; +import { Maths } from "./maths"; /** * Common utilities diff --git a/assembly/imports.ts b/assembly/imports.ts index a46938c2..5c99d7c0 100644 --- a/assembly/imports.ts +++ b/assembly/imports.ts @@ -4,26 +4,6 @@ // @ts-ignore // prettier-ignore -/** - * Extended Math functions - * @module glMatrix - */ - -export namespace Maths { - // @ts-ignore decorator - @external("Math", "hypot") - export declare function hypot(a: f64, b: f64, c?: f64, d?: f64, e?: f64, f?: f64, g?: f64, h?: f64, i?: f64, j?: f64, k?: f64, l?: f64, m?: f64, n?: f64, o?: f64, p?: f64): f64; - - export function min(a: i32, b: i32): i32 { - return a < b ? a : b; - } - - export function max(a: f64, b: f64, c: f64): f64 { - const q = Math.max(b, c); - return Math.max(a, q); - } -} - export interface IArguments { } diff --git a/assembly/mat2.ts b/assembly/mat2.ts index 5a4363c1..4e072c1e 100644 --- a/assembly/mat2.ts +++ b/assembly/mat2.ts @@ -1,5 +1,6 @@ import * as glMatrix from "./common"; -import { IndexedCollection, Maths } from "./imports"; +import { IndexedCollection } from "./imports"; +import { Maths } from "./maths"; import { ReadonlyVec2 } from "./vec2"; export type mat2 = IndexedCollection; @@ -313,7 +314,7 @@ export function str(a: ReadonlyMat2): string { * @returns {Number} Frobenius norm */ export function frob(a: ReadonlyMat2): f64 { - return Maths.hypot(a[0], a[1], a[2], a[3]); + return Maths.hypot4(a[0], a[1], a[2], a[3]); } /** diff --git a/assembly/mat2d.ts b/assembly/mat2d.ts index e9fcdf4a..a4958c69 100644 --- a/assembly/mat2d.ts +++ b/assembly/mat2d.ts @@ -1,5 +1,6 @@ import * as glMatrix from "./common"; -import { IndexedCollection, Maths } from "./imports"; +import { IndexedCollection } from "./imports" +import { Maths } from "./maths"; import { ReadonlyVec2 } from "./vec2"; export type mat2d = IndexedCollection; @@ -381,7 +382,7 @@ export function str(a: ReadonlyMat2d): string { * @returns {Number} Frobenius norm */ export function frob(a: ReadonlyMat2d): f64 { - return Maths.hypot(a[0], a[1], a[2], a[3], a[4], a[5], 1); + return Maths.hypot7(a[0], a[1], a[2], a[3], a[4], a[5], 1); } /** diff --git a/assembly/mat3.ts b/assembly/mat3.ts index e6477253..4b38f601 100644 --- a/assembly/mat3.ts +++ b/assembly/mat3.ts @@ -1,5 +1,6 @@ import * as glMatrix from "./common"; -import { IndexedCollection, Maths } from "./imports"; +import { IndexedCollection } from "./imports"; +import { Maths } from "./maths"; import { ReadonlyMat2 } from "./mat2"; import { ReadonlyMat4 } from "./mat4"; import { ReadonlyVec2 } from "./vec2"; @@ -704,7 +705,7 @@ export function str(a: ReadonlyMat3): string { * @returns {Number} Frobenius norm */ export function frob(a: ReadonlyMat3): f64 { - return Maths.hypot(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8]); + return Maths.hypot9(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8]); } /** diff --git a/assembly/mat4.ts b/assembly/mat4.ts index af414975..828550dc 100644 --- a/assembly/mat4.ts +++ b/assembly/mat4.ts @@ -1,5 +1,6 @@ import * as glMatrix from "./common"; -import { IndexedCollection, Maths } from "./imports"; +import { IndexedCollection } from "./imports"; +import { Maths } from "./maths"; import * as quat from "./quat"; import { ReadonlyQuat2 } from "./quat2"; import * as vec3 from "./vec3"; @@ -634,7 +635,7 @@ export function rotate(out: mat4, a: ReadonlyMat4, rad: f64, axis: vec3.Readonly let x = axis[0], y = axis[1], z = axis[2]; - let len = Maths.hypot(x, y, z); + let len = Maths.hypot3(x, y, z); let s: f64, c: f64, t: f64; let a00: f64, a01: f64, a02: f64, a03: f64; let a10: f64, a11: f64, a12: f64, a13: f64; @@ -914,7 +915,7 @@ export function fromRotation(out: mat4, rad: f64, axis: vec3.ReadonlyVec3): mat4 let x = axis[0], y = axis[1], z = axis[2]; - let len = Maths.hypot(x, y, z); + let len = Maths.hypot3(x, y, z); let s: f64, c: f64, t: f64; if (len < glMatrix.EPSILON) { @@ -1181,9 +1182,9 @@ export function getScaling(out: mat4, mat: ReadonlyMat4): mat4 { let m32 = mat[9]; let m33 = mat[10]; - out[0] = Maths.hypot(m11, m12, m13); - out[1] = Maths.hypot(m21, m22, m23); - out[2] = Maths.hypot(m31, m32, m33); + out[0] = Maths.hypot3(m11, m12, m13); + out[1] = Maths.hypot3(m21, m22, m23); + out[2] = Maths.hypot3(m31, m32, m33); return out; } @@ -1271,9 +1272,9 @@ export function decompose(out_r: quat.quat, out_t: vec3.vec3, out_s: vec3.vec3, let m32 = mat[9]; let m33 = mat[10]; - out_s[0] = Maths.hypot(m11, m12, m13); - out_s[1] = Maths.hypot(m21, m22, m23); - out_s[2] = Maths.hypot(m31, m32, m33); + out_s[0] = Maths.hypot3(m11, m12, m13); + out_s[1] = Maths.hypot3(m21, m22, m23); + out_s[2] = Maths.hypot3(m31, m32, m33); let is1 = 1 / out_s[0]; let is2 = 1 / out_s[1]; @@ -1786,7 +1787,7 @@ export function lookAt(out: mat4, eye: vec3.ReadonlyVec3, center: vec3.ReadonlyV z1 = eyey - centery; z2 = eyez - centerz; - len = 1 / Maths.hypot(z0, z1, z2); + len = 1 / Maths.hypot3(z0, z1, z2); z0 *= len; z1 *= len; z2 *= len; @@ -1794,7 +1795,7 @@ export function lookAt(out: mat4, eye: vec3.ReadonlyVec3, center: vec3.ReadonlyV x0 = upy * z2 - upz * z1; x1 = upz * z0 - upx * z2; x2 = upx * z1 - upy * z0; - len = Maths.hypot(x0, x1, x2); + len = Maths.hypot3(x0, x1, x2); if (!len) { x0 = 0; x1 = 0; @@ -1810,7 +1811,7 @@ export function lookAt(out: mat4, eye: vec3.ReadonlyVec3, center: vec3.ReadonlyV y1 = z2 * x0 - z0 * x2; y2 = z0 * x1 - z1 * x0; - len = Maths.hypot(y0, y1, y2); + len = Maths.hypot3(y0, y1, y2); if (!len) { y0 = 0; y1 = 0; @@ -1953,7 +1954,7 @@ export function str(a: ReadonlyMat4): string { * @returns {Number} Frobenius norm */ export function frob(a: ReadonlyMat4): f64 { - return Maths.hypot( + return Maths.hypot16( a[0], a[1], a[2], diff --git a/assembly/maths.ts b/assembly/maths.ts new file mode 100644 index 00000000..c97728cb --- /dev/null +++ b/assembly/maths.ts @@ -0,0 +1,197 @@ +/** + * Extended Math functions + */ + +export namespace Maths { + /** + * Returns the square root of the sum of squares of its arguments. + * @param a a + * @param b b + * @param c c + */ + export function hypot3(a: f64, b: f64, c: f64): f64 { + a = Math.abs(a); + b = Math.abs(b); + c = Math.abs(c); + Math.hypot + + let s = max(a, b, c); + if (s == 0) return 0; + let invs = 1.0 / s; + a *= invs; + b *= invs; + c *= invs; + return s * Math.sqrt(a * a + b * b + c * c); + } + + /** + * Returns the square root of the sum of squares of its arguments. + * @param a a + * @param b b + * @param c c + * @param d d + */ + export function hypot4(a: f64, b: f64, c: f64, d: f64): f64 { + a = Math.abs(a); + b = Math.abs(b); + c = Math.abs(c); + d = Math.abs(d); + + let s = Math.max(a, max(b, c, d)); + if (s == 0) return 0; + let invs = 1.0 / s; + a *= invs; + b *= invs; + c *= invs; + d *= invs; + return s * Math.sqrt(a * a + b * b + c * c + d * d); + } + + /** + * Returns the square root of the sum of squares of its arguments. + * @param a a + * @param b b + * @param c c + * @param d d + * @param e e + * @param f f + * @param g g + */ + export function hypot7(a: f64, b: f64, c: f64, d: f64, e: f64, f: f64, g: f64): f64 { + a = Math.abs(a); + b = Math.abs(b); + c = Math.abs(c); + d = Math.abs(d); + e = Math.abs(e); + f = Math.abs(f); + g = Math.abs(g); + + let s = max(a, max(b, c, d), max(e, f, g)); + if (s == 0) return 0; + let invs = 1.0 / s; + a *= invs; + b *= invs; + c *= invs; + d *= invs; + e *= invs; + f *= invs; + g *= invs; + return s * Math.sqrt(a * a + b * b + c * c + d * d + e * e + f * f + g * g); + } + + /** + * Returns the square root of the sum of squares of its arguments. + * @param a a + * @param b b + * @param c c + * @param d d + * @param e e + * @param f f + * @param g g + * @param h h + * @param i i + */ + export function hypot9(a: f64, b: f64, c: f64, d: f64, e: f64, f: f64, g: f64, h: f64, i: f64): f64 { + a = Math.abs(a); + b = Math.abs(b); + c = Math.abs(c); + d = Math.abs(d); + e = Math.abs(e); + f = Math.abs(f); + g = Math.abs(g); + h = Math.abs(h); + i = Math.abs(i); + + let s = max(max(a, max(b, c, d), max(e, f, g)), h, i); + if (s == 0) return 0; + let invs = 1.0 / s; + a *= invs; + b *= invs; + c *= invs; + d *= invs; + e *= invs; + f *= invs; + g *= invs; + h *= invs; + i *= invs; + return s * Math.sqrt(a * a + b * b + c * c + d * d + e * e + f * f + g * g + h * h + i * i); + } + + /** + * Returns the square root of the sum of squares of its arguments. + * @param a a + * @param b b + * @param c c + * @param d d + * @param e e + * @param f f + * @param g g + * @param h h + * @param i i + * @param j j + * @param k k + * @param l l + * @param m m + * @param n n + * @param o o + * @param p p + */ + export function hypot16(a: f64, b: f64, c: f64, d: f64, e: f64, f: f64, g: f64, h: f64, i: f64, j: f64, k: f64, l: f64, m: f64, n: f64, o: f64, p: f64): f64 { + a = Math.abs(a); + b = Math.abs(b); + c = Math.abs(c); + d = Math.abs(d); + e = Math.abs(e); + f = Math.abs(f); + g = Math.abs(g); + h = Math.abs(h); + i = Math.abs(i); + j = Math.abs(j); + k = Math.abs(k); + l = Math.abs(l); + m = Math.abs(m); + n = Math.abs(n); + o = Math.abs(o); + p = Math.abs(p); + + let s = Math.max(max(a, max(b, c, d), max(e, f, g)), max(max(h, i, j), max(k, l, m), max(n, o, p))); + if (s == 0) return 0; + let invs = 1.0 / s; + a *= invs; + b *= invs; + c *= invs; + d *= invs; + e *= invs; + f *= invs; + g *= invs; + h *= invs; + j *= invs; + k *= invs; + l *= invs; + m *= invs; + n *= invs; + o *= invs; + p *= invs; + return s * Math.sqrt(a * a + b * b + c * c + d * d + e * e + f * f + g * g + h * h + i * i + j * j + k * k + m * m + n * n + o * o + p * p); + } + + /** + * Returns the smaller of a set of supplied numeric expressions. + * @param a a + * @param b b + */ + export function min(a: i32, b: i32): i32 { + return a < b ? a : b; + } + + /** + * Returns the larger of a set of supplied numeric expressions. + * @param a a + * @param b b + * @param c c + */ + export function max(a: f64, b: f64, c: f64): f64 { + const q = Math.max(b, c); + return Math.max(a, q); + } +} \ No newline at end of file diff --git a/assembly/quat2.ts b/assembly/quat2.ts index 255df1c9..70d46000 100644 --- a/assembly/quat2.ts +++ b/assembly/quat2.ts @@ -1,5 +1,6 @@ import * as glMatrix from "./common"; -import { IndexedCollection, Maths } from "./imports"; +import { IndexedCollection } from "./imports"; +import { Maths } from "./maths"; import * as mat4 from "./mat4"; import * as quat from "./quat"; import * as vec3 from "./vec3"; @@ -543,7 +544,7 @@ export function rotateAroundAxis(out: quat2, a: ReadonlyQuat2, axis: vec3.Readon if (Math.abs(rad) < glMatrix.EPSILON) { return copy(out, a); } - let axisLength = Maths.hypot(axis[0], axis[1], axis[2]); + let axisLength = Maths.hypot3(axis[0], axis[1], axis[2]); rad = rad * 0.5; let s = Math.sin(rad); diff --git a/assembly/vec2.ts b/assembly/vec2.ts index de41a748..d323217e 100644 --- a/assembly/vec2.ts +++ b/assembly/vec2.ts @@ -1,5 +1,6 @@ import * as glMatrix from "./common"; -import { IArguments, IndexedCollection, Maths } from "./imports"; +import { IArguments, IndexedCollection } from "./imports"; +import { Maths } from "./maths"; import { ReadonlyMat2 } from "./mat2"; import { ReadonlyMat2d } from "./mat2d"; import { ReadonlyMat3 } from "./mat3"; @@ -244,7 +245,7 @@ export function scaleAndAdd(out: vec2, a: ReadonlyVec2, b: ReadonlyVec2, scale: export function distance(a: ReadonlyVec2, b: ReadonlyVec2): f64 { var x = b[0] - a[0], y = b[1] - a[1]; - return Maths.hypot(x, y); + return Math.hypot(x, y); } /** diff --git a/assembly/vec3.ts b/assembly/vec3.ts index a3571c30..8a99853e 100644 --- a/assembly/vec3.ts +++ b/assembly/vec3.ts @@ -1,5 +1,6 @@ import * as glMatrix from "./common"; -import { IArguments, IndexedCollection, Maths } from "./imports"; +import { IArguments, IndexedCollection } from "./imports"; +import { Maths } from "./maths"; import { ReadonlyMat3 } from "./mat3"; import { ReadonlyMat4 } from "./mat4"; import { ReadonlyQuat } from "./quat"; @@ -52,7 +53,7 @@ export function length(a: ReadonlyVec3): f64 { let x = a[0]; let y = a[1]; let z = a[2]; - return Maths.hypot(x, y, z); + return Maths.hypot3(x, y, z); } /** @@ -275,7 +276,7 @@ export function distance(a: ReadonlyVec3, b: ReadonlyVec3): f64 { let x = b[0] - a[0]; let y = b[1] - a[1]; let z = b[2] - a[2]; - return Maths.hypot(x, y, z); + return Maths.hypot3(x, y, z); } /** diff --git a/assembly/vec4.ts b/assembly/vec4.ts index cec360c8..8da3673e 100644 --- a/assembly/vec4.ts +++ b/assembly/vec4.ts @@ -1,5 +1,6 @@ import * as glMatrix from "./common"; -import { IArguments, IndexedCollection, Maths } from "./imports"; +import { IArguments, IndexedCollection } from "./imports"; +import { Maths } from "./maths"; import { ReadonlyQuat } from "./quat"; export type vec4 = IndexedCollection; @@ -279,7 +280,7 @@ export function distance(a: ReadonlyVec4, b: ReadonlyVec4): f64 { let y = b[1] - a[1]; let z = b[2] - a[2]; let w = b[3] - a[3]; - return Maths.hypot(x, y, z, w); + return Maths.hypot4(x, y, z, w); } /** @@ -308,7 +309,7 @@ export function length(a: ReadonlyVec4): f64 { let y = a[1]; let z = a[2]; let w = a[3]; - return Maths.hypot(x, y, z, w); + return Maths.hypot4(x, y, z, w); } /** diff --git a/build/optimized.wat b/build/optimized.wat index baae5bfe..9f14877f 100644 --- a/build/optimized.wat +++ b/build/optimized.wat @@ -24,13 +24,13 @@ (type $f64_=>_i32 (func (param f64) (result i32))) (type $i32_i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32) (result i32))) (type $i32_i32_f64_i32_=>_i32 (func (param i32 i32 f64 i32) (result i32))) + (type $i32_f64_i32_=>_i32 (func (param i32 f64 i32) (result i32))) (type $i32_f64_f64_=>_i32 (func (param i32 f64 f64) (result i32))) (type $i32_f64_f64_f64_i32_=>_i32 (func (param i32 f64 f64 f64 i32) (result i32))) (type $f64_f64_=>_i32 (func (param f64 f64) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i64_=>_i32 (func (param i64) (result i32))) (type $i32_i32_f64_f64_=>_i32 (func (param i32 i32 f64 f64) (result i32))) - (type $i32_f64_i32_=>_i32 (func (param i32 f64 i32) (result i32))) (type $i32_f64_f64_f64_=>_i32 (func (param i32 f64 f64 f64) (result i32))) (type $i32_f64_f64_f64_f64_f64_f64_f64_f64_=>_i32 (func (param i32 f64 f64 f64 f64 f64 f64 f64 f64) (result i32))) (type $i32_f64_f64_f64_f64_f64_f64_f64_f64_f64_=>_i32 (func (param i32 f64 f64 f64 f64 f64 f64 f64 f64 f64) (result i32))) @@ -43,11 +43,10 @@ (type $f64_f64_f64_f64_f64_f64_f64_f64_=>_i32 (func (param f64 f64 f64 f64 f64 f64 f64 f64) (result i32))) (type $f64_f64_f64_f64_f64_f64_f64_f64_f64_=>_i32 (func (param f64 f64 f64 f64 f64 f64 f64 f64 f64) (result i32))) (type $f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_=>_i32 (func (param f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64) (result i32))) + (type $f64_f64_=>_f64 (func (param f64 f64) (result f64))) (type $f64_f64_i32_=>_f64 (func (param f64 f64 i32) (result f64))) - (type $f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_=>_f64 (func (param f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64) (result f64))) (import "env" "seed" (func $~lib/builtins/seed (result f64))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) - (import "Math" "hypot" (func $assembly/imports/Maths.hypot (param f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64) (result f64))) (memory $0 1) (data (i32.const 1036) "\1c") (data (i32.const 1048) "\03\00\00\00\08\00\00\00\01") @@ -70,47 +69,47 @@ (data (i32.const 1388) "\1c") (data (i32.const 1400) "\06\00\00\00\08\00\00\00\07") (data (i32.const 1420) "\1c") - (data (i32.const 1432) "\06\00\00\00\08\00\00\00\08") + (data (i32.const 1432) "\07\00\00\00\08\00\00\00\08") (data (i32.const 1452) "\1c") (data (i32.const 1464) "\07\00\00\00\08\00\00\00\t") (data (i32.const 1484) "\1c") - (data (i32.const 1496) "\07\00\00\00\08\00\00\00\n") - (data (i32.const 1516) ",") - (data (i32.const 1528) "\01\00\00\00\1c\00\00\00I\00n\00v\00a\00l\00i\00d\00 \00l\00e\00n\00g\00t\00h") - (data (i32.const 1564) "<") - (data (i32.const 1576) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 1628) "<") - (data (i32.const 1640) "\01\00\00\00(\00\00\00A\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e") - (data (i32.const 1692) "<") - (data (i32.const 1704) "\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00r\00t\00/\00i\00t\00c\00m\00s\00.\00t\00s") - (data (i32.const 1820) ",") - (data (i32.const 1832) "\01\00\00\00\14\00\00\00~\00l\00i\00b\00/\00r\00t\00.\00t\00s") - (data (i32.const 1900) "<") - (data (i32.const 1912) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s") - (data (i32.const 1964) "\1c") - (data (i32.const 1976) "\n\00\00\00\08\00\00\00\0b") + (data (i32.const 1496) "\08\00\00\00\08\00\00\00\n") + (data (i32.const 1516) "\1c") + (data (i32.const 1528) "\08\00\00\00\08\00\00\00\0b") + (data (i32.const 1548) ",") + (data (i32.const 1560) "\01\00\00\00\1c\00\00\00I\00n\00v\00a\00l\00i\00d\00 \00l\00e\00n\00g\00t\00h") + (data (i32.const 1596) "<") + (data (i32.const 1608) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 1660) "<") + (data (i32.const 1672) "\01\00\00\00(\00\00\00A\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e") + (data (i32.const 1724) "<") + (data (i32.const 1736) "\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00r\00t\00/\00i\00t\00c\00m\00s\00.\00t\00s") + (data (i32.const 1852) ",") + (data (i32.const 1864) "\01\00\00\00\14\00\00\00~\00l\00i\00b\00/\00r\00t\00.\00t\00s") + (data (i32.const 1932) "<") + (data (i32.const 1944) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s") (data (i32.const 1996) "\1c") - (data (i32.const 2008) "\t\00\00\00\08\00\00\00\0c") + (data (i32.const 2008) "\0b\00\00\00\08\00\00\00\0c") (data (i32.const 2028) "\1c") - (data (i32.const 2040) "\05\00\00\00\08\00\00\00\0d") + (data (i32.const 2040) "\n\00\00\00\08\00\00\00\0d") (data (i32.const 2060) "\1c") (data (i32.const 2072) "\05\00\00\00\08\00\00\00\0e") (data (i32.const 2092) "\1c") (data (i32.const 2104) "\05\00\00\00\08\00\00\00\0f") (data (i32.const 2124) "\1c") - (data (i32.const 2136) "\06\00\00\00\08\00\00\00\10") + (data (i32.const 2136) "\05\00\00\00\08\00\00\00\10") (data (i32.const 2156) "\1c") - (data (i32.const 2168) "\06\00\00\00\08\00\00\00\11") + (data (i32.const 2168) "\07\00\00\00\08\00\00\00\11") (data (i32.const 2188) "\1c") (data (i32.const 2200) "\07\00\00\00\08\00\00\00\12") (data (i32.const 2220) "\1c") - (data (i32.const 2232) "\07\00\00\00\08\00\00\00\13") + (data (i32.const 2232) "\08\00\00\00\08\00\00\00\13") (data (i32.const 2252) "\1c") - (data (i32.const 2264) "\n\00\00\00\08\00\00\00\14") + (data (i32.const 2264) "\08\00\00\00\08\00\00\00\14") (data (i32.const 2284) "\1c") - (data (i32.const 2296) "\t\00\00\00\08\00\00\00\15") + (data (i32.const 2296) "\0b\00\00\00\08\00\00\00\15") (data (i32.const 2316) "\1c") - (data (i32.const 2328) "\0b\00\00\00\08\00\00\00\16") + (data (i32.const 2328) "\n\00\00\00\08\00\00\00\16") (data (i32.const 2348) "\1c") (data (i32.const 2360) "\0c\00\00\00\08\00\00\00\17") (data (i32.const 2380) "\1c") @@ -118,42 +117,42 @@ (data (i32.const 2412) "\1c") (data (i32.const 2424) "\0e\00\00\00\08\00\00\00\19") (data (i32.const 2444) "\1c") - (data (i32.const 2456) "\05\00\00\00\08\00\00\00\1a") + (data (i32.const 2456) "\0f\00\00\00\08\00\00\00\1a") (data (i32.const 2476) "\1c") (data (i32.const 2488) "\05\00\00\00\08\00\00\00\1b") (data (i32.const 2508) "\1c") - (data (i32.const 2520) "\0f\00\00\00\08\00\00\00\1c") + (data (i32.const 2520) "\05\00\00\00\08\00\00\00\1c") (data (i32.const 2540) "\1c") - (data (i32.const 2552) "\06\00\00\00\08\00\00\00\1d") + (data (i32.const 2552) "\10\00\00\00\08\00\00\00\1d") (data (i32.const 2572) "\1c") - (data (i32.const 2584) "\10\00\00\00\08\00\00\00\1e") + (data (i32.const 2584) "\07\00\00\00\08\00\00\00\1e") (data (i32.const 2604) "\1c") - (data (i32.const 2616) "\0d\00\00\00\08\00\00\00\1f") + (data (i32.const 2616) "\11\00\00\00\08\00\00\00\1f") (data (i32.const 2636) "\1c") - (data (i32.const 2648) "\11\00\00\00\08\00\00\00 ") - (data (i32.const 2672) "n\83\f9\a2\00\00\00\00\d1W\'\fc)\15DN\99\95b\db\c0\dd4\f5\abcQ\feA\90C<:n$\b7a\c5\bb\de\ea.I\06\e0\d2MB\1c\eb\1d\fe\1c\92\d1\t\f55\82\e8>\a7)\b1&p\9c\e9\84D\bb.9\d6\919A~_\b4\8b_\84\9c\f49S\83\ff\97\f8\1f;(\f9\bd\8b\11/\ef\0f\98\05\de\cf~6m\1fm\nZf?FO\b7\t\cb\'\c7\ba\'u-\ea_\9e\f79\07={\f1\e5\eb\b1_\fbk\ea\92R\8aF0\03V\08]\8d\1f \bc\cf\f0\abk{\fca\91\e3\a9\1d6\f4\9a_\85\99e\08\1b\e6^\80\d8\ff\8d@h\a0\14W\15\06\061\'sM") - (data (i32.const 2876) "\1c") - (data (i32.const 2888) "\05\00\00\00\08\00\00\00!") + (data (i32.const 2648) "\0e\00\00\00\08\00\00\00 ") + (data (i32.const 2668) "\1c") + (data (i32.const 2680) "\12\00\00\00\08\00\00\00!") + (data (i32.const 2704) "n\83\f9\a2\00\00\00\00\d1W\'\fc)\15DN\99\95b\db\c0\dd4\f5\abcQ\feA\90C<:n$\b7a\c5\bb\de\ea.I\06\e0\d2MB\1c\eb\1d\fe\1c\92\d1\t\f55\82\e8>\a7)\b1&p\9c\e9\84D\bb.9\d6\919A~_\b4\8b_\84\9c\f49S\83\ff\97\f8\1f;(\f9\bd\8b\11/\ef\0f\98\05\de\cf~6m\1fm\nZf?FO\b7\t\cb\'\c7\ba\'u-\ea_\9e\f79\07={\f1\e5\eb\b1_\fbk\ea\92R\8aF0\03V\08]\8d\1f \bc\cf\f0\abk{\fca\91\e3\a9\1d6\f4\9a_\85\99e\08\1b\e6^\80\d8\ff\8d@h\a0\14W\15\06\061\'sM") (data (i32.const 2908) "\1c") - (data (i32.const 2920) "\12\00\00\00\08\00\00\00\"") + (data (i32.const 2920) "\05\00\00\00\08\00\00\00\"") (data (i32.const 2940) "\1c") - (data (i32.const 2952) "\14\00\00\00\08\00\00\00#") + (data (i32.const 2952) "\13\00\00\00\08\00\00\00#") (data (i32.const 2972) "\1c") - (data (i32.const 2984) "\13\00\00\00\08\00\00\00$") + (data (i32.const 2984) "\15\00\00\00\08\00\00\00$") (data (i32.const 3004) "\1c") - (data (i32.const 3016) "\16\00\00\00\08\00\00\00%") + (data (i32.const 3016) "\14\00\00\00\08\00\00\00%") (data (i32.const 3036) "\1c") - (data (i32.const 3048) "\15\00\00\00\08\00\00\00&") + (data (i32.const 3048) "\17\00\00\00\08\00\00\00&") (data (i32.const 3068) "\1c") - (data (i32.const 3080) "\05\00\00\00\08\00\00\00\'") + (data (i32.const 3080) "\16\00\00\00\08\00\00\00\'") (data (i32.const 3100) "\1c") - (data (i32.const 3112) "\01\00\00\00\0c\00\00\00n\00u\00m\00b\00e\00r") + (data (i32.const 3112) "\05\00\00\00\08\00\00\00(") (data (i32.const 3132) "\1c") - (data (i32.const 3144) "\0e\00\00\00\08\00\00\00(") + (data (i32.const 3144) "\01\00\00\00\0c\00\00\00n\00u\00m\00b\00e\00r") (data (i32.const 3164) "\1c") - (data (i32.const 3176) "\17\00\00\00\08\00\00\00)") + (data (i32.const 3176) "\0f\00\00\00\08\00\00\00)") (data (i32.const 3196) "\1c") - (data (i32.const 3208) "\05\00\00\00\08\00\00\00*") + (data (i32.const 3208) "\18\00\00\00\08\00\00\00*") (data (i32.const 3228) "\1c") (data (i32.const 3240) "\05\00\00\00\08\00\00\00+") (data (i32.const 3260) "\1c") @@ -161,98 +160,100 @@ (data (i32.const 3292) "\1c") (data (i32.const 3304) "\05\00\00\00\08\00\00\00-") (data (i32.const 3324) "\1c") - (data (i32.const 3336) "\07\00\00\00\08\00\00\00.") + (data (i32.const 3336) "\05\00\00\00\08\00\00\00.") (data (i32.const 3356) "\1c") - (data (i32.const 3368) "\05\00\00\00\08\00\00\00/") + (data (i32.const 3368) "\08\00\00\00\08\00\00\00/") (data (i32.const 3388) "\1c") (data (i32.const 3400) "\05\00\00\00\08\00\00\000") (data (i32.const 3420) "\1c") (data (i32.const 3432) "\05\00\00\00\08\00\00\001") (data (i32.const 3452) "\1c") - (data (i32.const 3464) "\06\00\00\00\08\00\00\002") + (data (i32.const 3464) "\05\00\00\00\08\00\00\002") (data (i32.const 3484) "\1c") - (data (i32.const 3496) "\06\00\00\00\08\00\00\003") + (data (i32.const 3496) "\07\00\00\00\08\00\00\003") (data (i32.const 3516) "\1c") (data (i32.const 3528) "\07\00\00\00\08\00\00\004") (data (i32.const 3548) "\1c") - (data (i32.const 3560) "\n\00\00\00\08\00\00\005") + (data (i32.const 3560) "\08\00\00\00\08\00\00\005") (data (i32.const 3580) "\1c") - (data (i32.const 3592) "\t\00\00\00\08\00\00\006") + (data (i32.const 3592) "\0b\00\00\00\08\00\00\006") (data (i32.const 3612) "\1c") - (data (i32.const 3624) "\05\00\00\00\08\00\00\007") + (data (i32.const 3624) "\n\00\00\00\08\00\00\007") (data (i32.const 3644) "\1c") (data (i32.const 3656) "\05\00\00\00\08\00\00\008") - (data (i32.const 3676) "<") - (data (i32.const 3688) "\01\00\00\00&\00\00\00N\00o\00t\00 \00i\00m\00p\00l\00e\00m\00e\00n\00t\00e\00d\00 \00y\00e\00t") - (data (i32.const 3740) "<") - (data (i32.const 3752) "\01\00\00\00$\00\00\00a\00s\00s\00e\00m\00b\00l\00y\00/\00c\00o\00m\00m\00o\00n\00.\00t\00s") - (data (i32.const 3804) "\1c") - (data (i32.const 3816) "\01\00\00\00\n\00\00\00m\00a\00t\002\00(") + (data (i32.const 3676) "\1c") + (data (i32.const 3688) "\05\00\00\00\08\00\00\009") + (data (i32.const 3708) "<") + (data (i32.const 3720) "\01\00\00\00&\00\00\00N\00o\00t\00 \00i\00m\00p\00l\00e\00m\00e\00n\00t\00e\00d\00 \00y\00e\00t") + (data (i32.const 3772) "<") + (data (i32.const 3784) "\01\00\00\00$\00\00\00a\00s\00s\00e\00m\00b\00l\00y\00/\00c\00o\00m\00m\00o\00n\00.\00t\00s") (data (i32.const 3836) "\1c") - (data (i32.const 3848) "\01\00\00\00\06\00\00\000\00.\000") + (data (i32.const 3848) "\01\00\00\00\n\00\00\00m\00a\00t\002\00(") (data (i32.const 3868) "\1c") - (data (i32.const 3880) "\01\00\00\00\06\00\00\00N\00a\00N") - (data (i32.const 3900) ",") - (data (i32.const 3912) "\01\00\00\00\12\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 3948) ",") - (data (i32.const 3960) "\01\00\00\00\10\00\00\00I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 4056) "\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\9a\ec\ef?\d1f\87\10z^\90\bc\85\7fn\e8\15\e3\ef?\13\f6g5R\d2\8c\be\ef?m{\83]\a6\9a\97<\0f\89\f9lX\b5\ef?\fc\ef\fd\92\1a\b5\8e<\f7Gr+\92\ac\ef?\d1\9c/p=\be><\a2\d1\d32\ec\a3\ef?\0bn\90\894\03j\bc\1b\d3\fe\aff\9b\ef?\0e\bd/*RV\95\bcQ[\12\d0\01\93\ef?U\eaN\8c\ef\80P\bc\cc1l\c0\bd\8a\ef?\16\f4\d5\b9#\c9\91\bc\e0-\a9\ae\9a\82\ef?\afU\\\e9\e3\d3\80\f7\ec\9a<\aa\b9h1\87T\ef?\9d8\86\cb\82\e7\8f\bc\1d\d9\fc\"PM\ef?\8d\c3\a6DAo\8a<\d6\8cb\88;F\ef?}\04\e4\b0\05z\80<\96\dc}\91I?\ef?\94\a8\a8\e3\fd\8e\96<8bunz8\ef?}Ht\f2\18^\87\a9\af\0c\ef?\b6\ab\b0MuM\83<\15\b71\n\fe\06\ef?Lt\ac\e2\01B\86<1\d8L\fcp\01\ef?J\f8\d3]9\dd\8f<\ff\16d\b2\08\fc\ee?\04[\8e;\80\a3\86\bc\f1\9f\92_\c5\f6\ee?hPK\cc\edJ\92\bc\cb\a9:7\a7\f1\ee?\8e-Q\1b\f8\07\99\bcf\d8\05m\ae\ec\ee?\d26\94>\e8\d1q\bc\f7\9f\e54\db\e7\ee?\15\1b\ce\b3\19\19\99\bc\e5\a8\13\c3-\e3\ee?mL*\a7H\9f\85<\"4\12L\a6\de\ee?\8ai(z`\12\93\bc\1c\80\ac\04E\da\ee?[\89\17H\8f\a7X\bc*.\f7!\n\d6\ee?\1b\9aIg\9b,|\bc\97\a8P\d9\f5\d1\ee?\11\ac\c2`\edcC<-\89a`\08\ce\ee?\efd\06;\tf\96Z~d\1fx\bct_\ec\e8u\9f\ee?\b0}\8b\c0J\ee\86\bct\81\a5H\9a\9f\ee?\8a\e6U\1e2\19\86\bc\c9gBV\eb\9f\ee?\d3\d4\t^\cb\9c\90T\'\a4\ee?47;\f1\b6i\93\bc\13\ceL\99\89\a5\ee?\1e\ff\19:\84^\80\bc\ad\c7#F\1a\a7\ee?nWr\d8P\d4\94\bc\ed\92D\9b\d9\a8\ee?\00\8a\0e[g\ad\90<\99f\8a\d9\c7\aa\ee?\b4\ea\f0\c1/\b7\8d<\db\a0*B\e5\ac\ee?\ff\e7\c5\9c`\b6e\bc\8cD\b5\162\af\ee?D_\f3Y\83\f6{<6w\15\99\ae\b1\ee?\83=\1e\a7\1f\t\93\bc\c6\ff\91\0b[\b4\ee?)\1el\8b\b8\a9]\bc\e5\c5\cd\b07\b7\ee?Y\b9\90|\f9#l\bc\0fR\c8\cbD\ba\ee?\aa\f9\f4\"CC\92\bcPN\de\9f\82\bd\ee?K\8ef\d7l\ca\85\bc\ba\07\cap\f1\c0\ee?\'\ce\91+\fc\afq<\90\f0\a3\82\91\c4\ee?\bbs\n\e15\d2m<##\e3\19c\c8\ee?c\"b\"\04\c5\87\bce\e5]{f\cc\ee?\d51\e2\e3\86\1c\8b<3-J\ec\9b\d0\ee?\15\bb\bc\d3\d1\bb\91\bc]%>\b2\03\d5\ee?\d21\ee\9c1\cc\90\b4\07!\d5\82\bc_\9b{3\97|\ef?\c9\0dG;\b9*\89\bc)\a1\f5\14F\86\ef?\d3\88:`\04\b6t<\f6?\8b\e7.\90\ef?qr\9dQ\ec\c5\83<\83L\c7\fbQ\9a\ef?\f0\91\d3\8f\12\f7\8f\bc\da\90\a4\a2\af\a4\ef?}t#\e2\98\ae\8d\bc\f1g\8e-H\af\ef?\08 \aaA\bc\c3\8e<\'Za\ee\1b\ba\ef?2\eb\a9\c3\94+\84<\97\bak7+\c5\ef?\ee\85\d11\a9d\8a<@En[v\d0\ef?\ed\e3;\e4\ba7\8e\bc\14\be\9c\ad\fd\db\ef?\9d\cd\91M;\89w<\d8\90\9e\81\c1\e7\ef?\89\cc`A\c1\05S<\f1q\8f+\c2\f3\ef?") - (data (i32.const 7616) "\9f\de\e0\c3\f04\f7?\00\90\e6y\7f\cc\d7\bf\1f\e9,jx\13\f7?\00\00\0d\c2\eeo\d7\bf\a0\b5\fa\08`\f2\f6?\00\e0Q\13\e3\13\d7\bf}\8c\13\1f\a6\d1\f6?\00x(8[\b8\d6\bf\d1\b4\c5\0bI\b1\f6?\00x\80\90U]\d6\bf\ba\0c/3G\91\f6?\00\00\18v\d0\02\d6\bf#B\"\18\9fq\f6?\00\90\90\86\ca\a8\d5\bf\d9\1e\a5\99OR\f6?\00P\03VCO\d5\bf\c4$\8f\aaV3\f6?\00@k\c37\f6\d4\bf\14\dc\9dk\b3\14\f6?\00P\a8\fd\a7\9d\d4\bfL\\\c6Rd\f6\f5?\00\a8\899\92E\d4\bfO,\91\b5g\d8\f5?\00\b8\b09\f4\ed\d3\bf\de\90[\cb\bc\ba\f5?\00p\8fD\ce\96\d3\bfx\1a\d9\f2a\9d\f5?\00\a0\bd\17\1e@\d3\bf\87VF\12V\80\f5?\00\80F\ef\e2\e9\d2\bf\d3k\e7\ce\97c\f5?\00\e008\1b\94\d2\bf\93\7f\a7\e2%G\f5?\00\88\da\8c\c5>\d2\bf\83E\06B\ff*\f5?\00\90\')\e1\e9\d1\bf\df\bd\b2\db\"\0f\f5?\00\f8H+m\95\d1\bf\d7\de4G\8f\f3\f4?\00\f8\b9\9agA\d1\bf@(\de\cfC\d8\f4?\00\98\ef\94\d0\ed\d0\bf\c8\a3x\c0>\bd\f4?\00\10\db\18\a5\9a\d0\bf\8a%\e0\c3\7f\a2\f4?\00\b8cR\e6G\d0\bf4\84\d4$\05\88\f4?\00\f0\86E\"\eb\cf\bf\0b-\19\1b\cem\f4?\00\b0\17uJG\cf\bfT\189\d3\d9S\f4?\000\10=D\a4\ce\bfZ\84\b4D\':\f4?\00\b0\e9D\0d\02\ce\bf\fb\f8\15A\b5 \f4?\00\f0w)\a2`\cd\bf\b1\f4>\da\82\07\f4?\00\90\95\04\01\c0\cc\bf\8f\feW]\8f\ee\f3?\00\10\89V) \cc\bf\e9L\0b\a0\d9\d5\f3?\00\10\81\8d\17\81\cb\bf+\c1\10\c0`\bd\f3?\00\d0\d3\cc\c9\e2\ca\bf\b8\dau+$\a5\f3?\00\90\12.@E\ca\bf\02\d0\9f\cd\"\8d\f3?\00\f0\1dhw\a8\c9\bf\1cz\84\c5[u\f3?\000Him\0c\c9\bf\e26\adI\ce]\f3?\00\c0E\a6 q\c8\bf@\d4M\98yF\f3?\000\14\b4\8f\d6\c7\bf$\cb\ff\ce\\/\f3?\00pb<\b8<\c7\bfI\0d\a1uw\18\f3?\00`7\9b\9a\a3\c6\bf\909>7\c8\01\f3?\00\a0\b7T1\0b\c6\bfA\f8\95\bbN\eb\f2?\000$v}s\c5\bf\d1\a9\19\02\n\d5\f2?\000\c2\8f{\dc\c4\bf*\fd\b7\a8\f9\be\f2?\00\00\d2Q,F\c4\bf\ab\1b\0cz\1c\a9\f2?\00\00\83\bc\8a\b0\c3\bf0\b5\14`r\93\f2?\00\00Ik\99\1b\c3\bf\f5\a1WW\fa}\f2?\00@\a4\90T\87\c2\bf\bf;\1d\9b\b3h\f2?\00\a0y\f8\b9\f3\c1\bf\bd\f5\8f\83\9dS\f2?\00\a0,%\c8`\c1\bf;\08\c9\aa\b7>\f2?\00 \f7W\7f\ce\c0\bf\b6@\a9+\01*\f2?\00\a0\feI\dc<\c0\bf2A\cc\96y\15\f2?\00\80K\bc\bdW\bf\bf\9b\fc\d2\1d \01\f2?\00@@\96\087\be\bf\0bHMI\f4\ec\f1?\00@\f9>\98\17\bd\bfie\8fR\f5\d8\f1?\00\a0\d8Ng\f9\bb\bf|~W\11#\c5\f1?\00`/ y\dc\ba\bf\e9&\cbt|\b1\f1?\00\80(\e7\c3\c0\b9\bf\b6\1a,\0c\01\9e\f1?\00\c0r\b3F\a6\b8\bf\bdp\b6{\b0\8a\f1?\00\00\ac\b3\01\8d\b7\bf\b6\bc\ef%\8aw\f1?\00\008E\f1t\b6\bf\da1L5\8dd\f1?\00\80\87m\0e^\b5\bf\dd_\'\90\b9Q\f1?\00\e0\a1\de\\H\b4\bfL\d22\a4\0e?\f1?\00\a0jM\d93\b3\bf\da\f9\10r\8b,\f1?\00`\c5\f8y \b2\bf1\b5\ec(0\1a\f1?\00 b\98F\0e\b1\bf\af4\84\da\fb\07\f1?\00\00\d2jl\fa\af\bf\b3kN\0f\ee\f5\f0?\00@wJ\8d\da\ad\bf\ce\9f*]\06\e4\f0?\00\00\85\e4\ec\bc\ab\bf!\a5,cD\d2\f0?\00\c0\12@\89\a1\a9\bf\1a\98\e2|\a7\c0\f0?\00\c0\023X\88\a7\bf\d16\c6\83/\af\f0?\00\80\d6g^q\a5\bf9\13\a0\98\db\9d\f0?\00\80eI\8a\\\a3\bf\df\e7R\af\ab\8c\f0?\00@\15d\e3I\a1\bf\fb(N/\9f{\f0?\00\80\eb\82\c0r\9e\bf\19\8f5\8c\b5j\f0?\00\80RR\f1U\9a\bf,\f9\ec\a5\eeY\f0?\00\80\81\cfb=\96\bf\90,\d1\cdII\f0?\00\00\aa\8c\fb(\92\bf\a9\ad\f0\c6\c68\f0?\00\00\f9 {1\8c\bf\a92y\13e(\f0?\00\00\aa]5\19\84\bfHs\ea\'$\18\f0?\00\00\ec\c2\03\12x\bf\95\b1\14\06\04\08\f0?\00\00$y\t\04`\bf\1a\fa&\f7\1f\e0\ef?\00\00\90\84\f3\efo?t\eaa\c2\1c\a1\ef?\00\00=5A\dc\87?.\99\81\b0\10c\ef?\00\80\c2\c4\a3\ce\93?\cd\ad\ee<\f6%\ef?\00\00\89\14\c1\9f\9b?\e7\13\91\03\c8\e9\ee?\00\00\11\ce\d8\b0\a1?\ab\b1\cbx\80\ae\ee?\00\c0\01\d0[\8a\a5?\9b\0c\9d\a2\1at\ee?\00\80\d8@\83\\\a9?\b5\99\n\83\91:\ee?\00\80W\efj\'\ad?V\9a`\t\e0\01\ee?\00\c0\98\e5\98u\b0?\98\bbw\e5\01\ca\ed?\00 \0d\e3\f5S\b2?\03\91|\0b\f2\92\ed?\00\008\8b\dd.\b4?\ce\\\fbf\ac\\\ed?\00\c0W\87Y\06\b6?\9d\de^\aa,\'\ed?\00\00j5v\da\b7?\cd,k>n\f2\ec?\00`\1cNC\ab\b9?\02y\a7\a2m\be\ec?\00`\0d\bb\c7x\bb?m\087m&\8b\ec?\00 \e72\13C\bd?\04X]\bd\94X\ec?\00`\deq1\n\bf?\8c\9f\bb3\b5&\ec?\00@\91+\15g\c0??\e7\ec\ee\83\f5\eb?\00\b0\92\82\85G\c1?\c1\96\dbu\fd\c4\eb?\000\ca\cdn&\c2?(J\86\0c\1e\95\eb?\00P\c5\a6\d7\03\c3?,>\ef\c5\e2e\eb?\00\103<\c3\df\c3?\8b\88\c9gH7\eb?\00\80zk6\ba\c4?J0\1d!K\t\eb?\00\f0\d1(9\93\c5?~\ef\f2\85\e8\db\ea?\00\f0\18$\cdj\c6?\a2=`1\1d\af\ea?\00\90f\ec\f8@\c7?\a7X\d3?\e6\82\ea?\00\f0\1a\f5\c0\15\c8?\8bs\t\ef@W\ea?\00\80\f6T)\e9\c8?\'K\ab\90*,\ea?\00@\f8\026\bb\c9?\d1\f2\93\13\a0\01\ea?\00\00,\1c\ed\8b\ca?\1b<\db$\9f\d7\e9?\00\d0\01\\Q[\cb?\90\b1\c7\05%\ae\e9?\00\c0\bc\ccg)\cc?/\ce\97\f2.\85\e9?\00`H\d55\f6\cc?uK\a4\ee\ba\\\e9?\00\c0F4\bd\c1\cd?8H\e7\9d\c64\e9?\00\e0\cf\b8\01\8c\ce?\e6Rg/O\0d\e9?\00\90\17\c0\tU\cf?\9d\d7\ff\8eR\e6\e8?\00\b8\1f\12l\0e\d0?|\00\cc\9f\ce\bf\e8?\00\d0\93\0e\b8q\d0?\0e\c3\be\da\c0\99\e8?\00p\86\9ek\d4\d0?\fb\17#\aa\'t\e8?\00\d0K3\876\d1?\08\9a\b3\ac\00O\e8?\00H#g\0d\98\d1?U>e\e8I*\e8?\00\80\cc\e0\ff\f8\d1?`\02\f4\95\01\06\e8?\00hc\d7_Y\d2?)\a3\e0c%\e2\e7?\00\a8\14\t0\b9\d2?\ad\b5\dcw\b3\be\e7?\00`C\10r\18\d3?\c2%\97g\aa\9b\e7?\00\18\ecm&w\d3?W\06\17\f2\07y\e7?\000\af\fbO\d5\d3?\0c\13\d6\db\caV\e7?\00\e0/\e3\ee2\d4?") - (data (i32.const 9664) "k\b6O\01\00\10\e6?<[B\91l\02~<\95\b4M\03\000\e6?A]\00H\ea\bf\8d\f6\05\eb\ff\ef\e6?S-\e2\1a\04\80~\bc\80\97\86\0e\00\10\e7?Ry\tqf\ff{<\12\e9g\fc\ff/\e7?$\87\bd&\e2\00\8c\89<\b9{F\13\000\e9?v\02\98KN\80\7f.\98\dd\ff\af\e9?7\93Z\8a\e0@\87\bcf\fbI\ed\ff\cf\e9?\00\e0\9b\c1\08\ce?O*\00\b0\ea?_?\ff<\04\fdi\bc\d1\1e\ae\d7\ff\cf\ea?\b4p\90\12\e7>\82\bcx\04Q\ee\ff\ef\ea?\a3\de\0e\e0>\06j<[\0de\db\ff\0f\eb?\b9\n\1f8\c8\06ZO\86\d0E\ff\8a<@\16\87\f9\ff\8f\eb?\f9\c3\c2\96w\fe|\f0\0f\00\f0\f4?\1cS\85\0b\89\7f\97<\d1K\dc\12\00\10\f5?6\a4fqe\04`\c9\03\00\b0\f5?\c0\0c\bf\n\08A\9f\bc\bc\19I\1d\00\d0\f5?)G%\fb*\81\98\bc\89z\b8\e7\ff\ef\f5?\04i\ed\80\b7~\94\bc") - (data (i32.const 11724) "\1c") - (data (i32.const 11736) "\01\00\00\00\06\00\00\00x\00y\00z") + (data (i32.const 5544) "\01\00\00\00\n\00\00\00m\00a\00t\003\00(") + (data (i32.const 5564) "\1c") + (data (i32.const 5576) "\01\00\00\00\n\00\00\00m\00a\00t\004\00(") + (data (i32.const 5614) "\f0?n\bf\88\1aO;\9b<53\fb\a9=\f6\ef?]\dc\d8\9c\13`q\bca\80w>\9a\ec\ef?\d1f\87\10z^\90\bc\85\7fn\e8\15\e3\ef?\13\f6g5R\d2\8c\be\ef?m{\83]\a6\9a\97<\0f\89\f9lX\b5\ef?\fc\ef\fd\92\1a\b5\8e<\f7Gr+\92\ac\ef?\d1\9c/p=\be><\a2\d1\d32\ec\a3\ef?\0bn\90\894\03j\bc\1b\d3\fe\aff\9b\ef?\0e\bd/*RV\95\bcQ[\12\d0\01\93\ef?U\eaN\8c\ef\80P\bc\cc1l\c0\bd\8a\ef?\16\f4\d5\b9#\c9\91\bc\e0-\a9\ae\9a\82\ef?\afU\\\e9\e3\d3\80\f7\ec\9a<\aa\b9h1\87T\ef?\9d8\86\cb\82\e7\8f\bc\1d\d9\fc\"PM\ef?\8d\c3\a6DAo\8a<\d6\8cb\88;F\ef?}\04\e4\b0\05z\80<\96\dc}\91I?\ef?\94\a8\a8\e3\fd\8e\96<8bunz8\ef?}Ht\f2\18^\87\a9\af\0c\ef?\b6\ab\b0MuM\83<\15\b71\n\fe\06\ef?Lt\ac\e2\01B\86<1\d8L\fcp\01\ef?J\f8\d3]9\dd\8f<\ff\16d\b2\08\fc\ee?\04[\8e;\80\a3\86\bc\f1\9f\92_\c5\f6\ee?hPK\cc\edJ\92\bc\cb\a9:7\a7\f1\ee?\8e-Q\1b\f8\07\99\bcf\d8\05m\ae\ec\ee?\d26\94>\e8\d1q\bc\f7\9f\e54\db\e7\ee?\15\1b\ce\b3\19\19\99\bc\e5\a8\13\c3-\e3\ee?mL*\a7H\9f\85<\"4\12L\a6\de\ee?\8ai(z`\12\93\bc\1c\80\ac\04E\da\ee?[\89\17H\8f\a7X\bc*.\f7!\n\d6\ee?\1b\9aIg\9b,|\bc\97\a8P\d9\f5\d1\ee?\11\ac\c2`\edcC<-\89a`\08\ce\ee?\efd\06;\tf\96Z~d\1fx\bct_\ec\e8u\9f\ee?\b0}\8b\c0J\ee\86\bct\81\a5H\9a\9f\ee?\8a\e6U\1e2\19\86\bc\c9gBV\eb\9f\ee?\d3\d4\t^\cb\9c\90T\'\a4\ee?47;\f1\b6i\93\bc\13\ceL\99\89\a5\ee?\1e\ff\19:\84^\80\bc\ad\c7#F\1a\a7\ee?nWr\d8P\d4\94\bc\ed\92D\9b\d9\a8\ee?\00\8a\0e[g\ad\90<\99f\8a\d9\c7\aa\ee?\b4\ea\f0\c1/\b7\8d<\db\a0*B\e5\ac\ee?\ff\e7\c5\9c`\b6e\bc\8cD\b5\162\af\ee?D_\f3Y\83\f6{<6w\15\99\ae\b1\ee?\83=\1e\a7\1f\t\93\bc\c6\ff\91\0b[\b4\ee?)\1el\8b\b8\a9]\bc\e5\c5\cd\b07\b7\ee?Y\b9\90|\f9#l\bc\0fR\c8\cbD\ba\ee?\aa\f9\f4\"CC\92\bcPN\de\9f\82\bd\ee?K\8ef\d7l\ca\85\bc\ba\07\cap\f1\c0\ee?\'\ce\91+\fc\afq<\90\f0\a3\82\91\c4\ee?\bbs\n\e15\d2m<##\e3\19c\c8\ee?c\"b\"\04\c5\87\bce\e5]{f\cc\ee?\d51\e2\e3\86\1c\8b<3-J\ec\9b\d0\ee?\15\bb\bc\d3\d1\bb\91\bc]%>\b2\03\d5\ee?\d21\ee\9c1\cc\90\b4\07!\d5\82\bc_\9b{3\97|\ef?\c9\0dG;\b9*\89\bc)\a1\f5\14F\86\ef?\d3\88:`\04\b6t<\f6?\8b\e7.\90\ef?qr\9dQ\ec\c5\83<\83L\c7\fbQ\9a\ef?\f0\91\d3\8f\12\f7\8f\bc\da\90\a4\a2\af\a4\ef?}t#\e2\98\ae\8d\bc\f1g\8e-H\af\ef?\08 \aaA\bc\c3\8e<\'Za\ee\1b\ba\ef?2\eb\a9\c3\94+\84<\97\bak7+\c5\ef?\ee\85\d11\a9d\8a<@En[v\d0\ef?\ed\e3;\e4\ba7\8e\bc\14\be\9c\ad\fd\db\ef?\9d\cd\91M;\89w<\d8\90\9e\81\c1\e7\ef?\89\cc`A\c1\05S<\f1q\8f+\c2\f3\ef?") + (data (i32.const 7648) "\9f\de\e0\c3\f04\f7?\00\90\e6y\7f\cc\d7\bf\1f\e9,jx\13\f7?\00\00\0d\c2\eeo\d7\bf\a0\b5\fa\08`\f2\f6?\00\e0Q\13\e3\13\d7\bf}\8c\13\1f\a6\d1\f6?\00x(8[\b8\d6\bf\d1\b4\c5\0bI\b1\f6?\00x\80\90U]\d6\bf\ba\0c/3G\91\f6?\00\00\18v\d0\02\d6\bf#B\"\18\9fq\f6?\00\90\90\86\ca\a8\d5\bf\d9\1e\a5\99OR\f6?\00P\03VCO\d5\bf\c4$\8f\aaV3\f6?\00@k\c37\f6\d4\bf\14\dc\9dk\b3\14\f6?\00P\a8\fd\a7\9d\d4\bfL\\\c6Rd\f6\f5?\00\a8\899\92E\d4\bfO,\91\b5g\d8\f5?\00\b8\b09\f4\ed\d3\bf\de\90[\cb\bc\ba\f5?\00p\8fD\ce\96\d3\bfx\1a\d9\f2a\9d\f5?\00\a0\bd\17\1e@\d3\bf\87VF\12V\80\f5?\00\80F\ef\e2\e9\d2\bf\d3k\e7\ce\97c\f5?\00\e008\1b\94\d2\bf\93\7f\a7\e2%G\f5?\00\88\da\8c\c5>\d2\bf\83E\06B\ff*\f5?\00\90\')\e1\e9\d1\bf\df\bd\b2\db\"\0f\f5?\00\f8H+m\95\d1\bf\d7\de4G\8f\f3\f4?\00\f8\b9\9agA\d1\bf@(\de\cfC\d8\f4?\00\98\ef\94\d0\ed\d0\bf\c8\a3x\c0>\bd\f4?\00\10\db\18\a5\9a\d0\bf\8a%\e0\c3\7f\a2\f4?\00\b8cR\e6G\d0\bf4\84\d4$\05\88\f4?\00\f0\86E\"\eb\cf\bf\0b-\19\1b\cem\f4?\00\b0\17uJG\cf\bfT\189\d3\d9S\f4?\000\10=D\a4\ce\bfZ\84\b4D\':\f4?\00\b0\e9D\0d\02\ce\bf\fb\f8\15A\b5 \f4?\00\f0w)\a2`\cd\bf\b1\f4>\da\82\07\f4?\00\90\95\04\01\c0\cc\bf\8f\feW]\8f\ee\f3?\00\10\89V) \cc\bf\e9L\0b\a0\d9\d5\f3?\00\10\81\8d\17\81\cb\bf+\c1\10\c0`\bd\f3?\00\d0\d3\cc\c9\e2\ca\bf\b8\dau+$\a5\f3?\00\90\12.@E\ca\bf\02\d0\9f\cd\"\8d\f3?\00\f0\1dhw\a8\c9\bf\1cz\84\c5[u\f3?\000Him\0c\c9\bf\e26\adI\ce]\f3?\00\c0E\a6 q\c8\bf@\d4M\98yF\f3?\000\14\b4\8f\d6\c7\bf$\cb\ff\ce\\/\f3?\00pb<\b8<\c7\bfI\0d\a1uw\18\f3?\00`7\9b\9a\a3\c6\bf\909>7\c8\01\f3?\00\a0\b7T1\0b\c6\bfA\f8\95\bbN\eb\f2?\000$v}s\c5\bf\d1\a9\19\02\n\d5\f2?\000\c2\8f{\dc\c4\bf*\fd\b7\a8\f9\be\f2?\00\00\d2Q,F\c4\bf\ab\1b\0cz\1c\a9\f2?\00\00\83\bc\8a\b0\c3\bf0\b5\14`r\93\f2?\00\00Ik\99\1b\c3\bf\f5\a1WW\fa}\f2?\00@\a4\90T\87\c2\bf\bf;\1d\9b\b3h\f2?\00\a0y\f8\b9\f3\c1\bf\bd\f5\8f\83\9dS\f2?\00\a0,%\c8`\c1\bf;\08\c9\aa\b7>\f2?\00 \f7W\7f\ce\c0\bf\b6@\a9+\01*\f2?\00\a0\feI\dc<\c0\bf2A\cc\96y\15\f2?\00\80K\bc\bdW\bf\bf\9b\fc\d2\1d \01\f2?\00@@\96\087\be\bf\0bHMI\f4\ec\f1?\00@\f9>\98\17\bd\bfie\8fR\f5\d8\f1?\00\a0\d8Ng\f9\bb\bf|~W\11#\c5\f1?\00`/ y\dc\ba\bf\e9&\cbt|\b1\f1?\00\80(\e7\c3\c0\b9\bf\b6\1a,\0c\01\9e\f1?\00\c0r\b3F\a6\b8\bf\bdp\b6{\b0\8a\f1?\00\00\ac\b3\01\8d\b7\bf\b6\bc\ef%\8aw\f1?\00\008E\f1t\b6\bf\da1L5\8dd\f1?\00\80\87m\0e^\b5\bf\dd_\'\90\b9Q\f1?\00\e0\a1\de\\H\b4\bfL\d22\a4\0e?\f1?\00\a0jM\d93\b3\bf\da\f9\10r\8b,\f1?\00`\c5\f8y \b2\bf1\b5\ec(0\1a\f1?\00 b\98F\0e\b1\bf\af4\84\da\fb\07\f1?\00\00\d2jl\fa\af\bf\b3kN\0f\ee\f5\f0?\00@wJ\8d\da\ad\bf\ce\9f*]\06\e4\f0?\00\00\85\e4\ec\bc\ab\bf!\a5,cD\d2\f0?\00\c0\12@\89\a1\a9\bf\1a\98\e2|\a7\c0\f0?\00\c0\023X\88\a7\bf\d16\c6\83/\af\f0?\00\80\d6g^q\a5\bf9\13\a0\98\db\9d\f0?\00\80eI\8a\\\a3\bf\df\e7R\af\ab\8c\f0?\00@\15d\e3I\a1\bf\fb(N/\9f{\f0?\00\80\eb\82\c0r\9e\bf\19\8f5\8c\b5j\f0?\00\80RR\f1U\9a\bf,\f9\ec\a5\eeY\f0?\00\80\81\cfb=\96\bf\90,\d1\cdII\f0?\00\00\aa\8c\fb(\92\bf\a9\ad\f0\c6\c68\f0?\00\00\f9 {1\8c\bf\a92y\13e(\f0?\00\00\aa]5\19\84\bfHs\ea\'$\18\f0?\00\00\ec\c2\03\12x\bf\95\b1\14\06\04\08\f0?\00\00$y\t\04`\bf\1a\fa&\f7\1f\e0\ef?\00\00\90\84\f3\efo?t\eaa\c2\1c\a1\ef?\00\00=5A\dc\87?.\99\81\b0\10c\ef?\00\80\c2\c4\a3\ce\93?\cd\ad\ee<\f6%\ef?\00\00\89\14\c1\9f\9b?\e7\13\91\03\c8\e9\ee?\00\00\11\ce\d8\b0\a1?\ab\b1\cbx\80\ae\ee?\00\c0\01\d0[\8a\a5?\9b\0c\9d\a2\1at\ee?\00\80\d8@\83\\\a9?\b5\99\n\83\91:\ee?\00\80W\efj\'\ad?V\9a`\t\e0\01\ee?\00\c0\98\e5\98u\b0?\98\bbw\e5\01\ca\ed?\00 \0d\e3\f5S\b2?\03\91|\0b\f2\92\ed?\00\008\8b\dd.\b4?\ce\\\fbf\ac\\\ed?\00\c0W\87Y\06\b6?\9d\de^\aa,\'\ed?\00\00j5v\da\b7?\cd,k>n\f2\ec?\00`\1cNC\ab\b9?\02y\a7\a2m\be\ec?\00`\0d\bb\c7x\bb?m\087m&\8b\ec?\00 \e72\13C\bd?\04X]\bd\94X\ec?\00`\deq1\n\bf?\8c\9f\bb3\b5&\ec?\00@\91+\15g\c0??\e7\ec\ee\83\f5\eb?\00\b0\92\82\85G\c1?\c1\96\dbu\fd\c4\eb?\000\ca\cdn&\c2?(J\86\0c\1e\95\eb?\00P\c5\a6\d7\03\c3?,>\ef\c5\e2e\eb?\00\103<\c3\df\c3?\8b\88\c9gH7\eb?\00\80zk6\ba\c4?J0\1d!K\t\eb?\00\f0\d1(9\93\c5?~\ef\f2\85\e8\db\ea?\00\f0\18$\cdj\c6?\a2=`1\1d\af\ea?\00\90f\ec\f8@\c7?\a7X\d3?\e6\82\ea?\00\f0\1a\f5\c0\15\c8?\8bs\t\ef@W\ea?\00\80\f6T)\e9\c8?\'K\ab\90*,\ea?\00@\f8\026\bb\c9?\d1\f2\93\13\a0\01\ea?\00\00,\1c\ed\8b\ca?\1b<\db$\9f\d7\e9?\00\d0\01\\Q[\cb?\90\b1\c7\05%\ae\e9?\00\c0\bc\ccg)\cc?/\ce\97\f2.\85\e9?\00`H\d55\f6\cc?uK\a4\ee\ba\\\e9?\00\c0F4\bd\c1\cd?8H\e7\9d\c64\e9?\00\e0\cf\b8\01\8c\ce?\e6Rg/O\0d\e9?\00\90\17\c0\tU\cf?\9d\d7\ff\8eR\e6\e8?\00\b8\1f\12l\0e\d0?|\00\cc\9f\ce\bf\e8?\00\d0\93\0e\b8q\d0?\0e\c3\be\da\c0\99\e8?\00p\86\9ek\d4\d0?\fb\17#\aa\'t\e8?\00\d0K3\876\d1?\08\9a\b3\ac\00O\e8?\00H#g\0d\98\d1?U>e\e8I*\e8?\00\80\cc\e0\ff\f8\d1?`\02\f4\95\01\06\e8?\00hc\d7_Y\d2?)\a3\e0c%\e2\e7?\00\a8\14\t0\b9\d2?\ad\b5\dcw\b3\be\e7?\00`C\10r\18\d3?\c2%\97g\aa\9b\e7?\00\18\ecm&w\d3?W\06\17\f2\07y\e7?\000\af\fbO\d5\d3?\0c\13\d6\db\caV\e7?\00\e0/\e3\ee2\d4?") + (data (i32.const 9696) "k\b6O\01\00\10\e6?<[B\91l\02~<\95\b4M\03\000\e6?A]\00H\ea\bf\8d\f6\05\eb\ff\ef\e6?S-\e2\1a\04\80~\bc\80\97\86\0e\00\10\e7?Ry\tqf\ff{<\12\e9g\fc\ff/\e7?$\87\bd&\e2\00\8c\89<\b9{F\13\000\e9?v\02\98KN\80\7f.\98\dd\ff\af\e9?7\93Z\8a\e0@\87\bcf\fbI\ed\ff\cf\e9?\00\e0\9b\c1\08\ce?O*\00\b0\ea?_?\ff<\04\fdi\bc\d1\1e\ae\d7\ff\cf\ea?\b4p\90\12\e7>\82\bcx\04Q\ee\ff\ef\ea?\a3\de\0e\e0>\06j<[\0de\db\ff\0f\eb?\b9\n\1f8\c8\06ZO\86\d0E\ff\8a<@\16\87\f9\ff\8f\eb?\f9\c3\c2\96w\fe|\f0\0f\00\f0\f4?\1cS\85\0b\89\7f\97<\d1K\dc\12\00\10\f5?6\a4fqe\04`\c9\03\00\b0\f5?\c0\0c\bf\n\08A\9f\bc\bc\19I\1d\00\d0\f5?)G%\fb*\81\98\bc\89z\b8\e7\ff\ef\f5?\04i\ed\80\b7~\94\bc") (data (i32.const 11756) "\1c") - (data (i32.const 11768) "\01\00\00\00\06\00\00\00x\00z\00y") + (data (i32.const 11768) "\01\00\00\00\06\00\00\00x\00y\00z") (data (i32.const 11788) "\1c") - (data (i32.const 11800) "\01\00\00\00\06\00\00\00y\00x\00z") + (data (i32.const 11800) "\01\00\00\00\06\00\00\00x\00z\00y") (data (i32.const 11820) "\1c") - (data (i32.const 11832) "\01\00\00\00\06\00\00\00y\00z\00x") + (data (i32.const 11832) "\01\00\00\00\06\00\00\00y\00x\00z") (data (i32.const 11852) "\1c") - (data (i32.const 11864) "\01\00\00\00\06\00\00\00z\00x\00y") - (data (i32.const 11884) "<") - (data (i32.const 11896) "\01\00\00\00(\00\00\00U\00n\00k\00n\00o\00w\00n\00 \00a\00n\00g\00l\00e\00 \00o\00r\00d\00e\00r\00 ") - (data (i32.const 11948) "<") - (data (i32.const 11960) "\01\00\00\00 \00\00\00a\00s\00s\00e\00m\00b\00l\00y\00/\00q\00u\00a\00t\00.\00t\00s") - (data (i32.const 12012) "\1c") - (data (i32.const 12024) "\01\00\00\00\n\00\00\00q\00u\00a\00t\00(") + (data (i32.const 11864) "\01\00\00\00\06\00\00\00y\00z\00x") + (data (i32.const 11884) "\1c") + (data (i32.const 11896) "\01\00\00\00\06\00\00\00z\00x\00y") + (data (i32.const 11916) "<") + (data (i32.const 11928) "\01\00\00\00(\00\00\00U\00n\00k\00n\00o\00w\00n\00 \00a\00n\00g\00l\00e\00 \00o\00r\00d\00e\00r\00 ") + (data (i32.const 11980) "<") + (data (i32.const 11992) "\01\00\00\00 \00\00\00a\00s\00s\00e\00m\00b\00l\00y\00/\00q\00u\00a\00t\00.\00t\00s") (data (i32.const 12044) "\1c") - (data (i32.const 12056) "\01\00\00\00\0c\00\00\00q\00u\00a\00t\002\00(") + (data (i32.const 12056) "\01\00\00\00\n\00\00\00q\00u\00a\00t\00(") (data (i32.const 12076) "\1c") - (data (i32.const 12088) "\01\00\00\00\n\00\00\00v\00e\00c\002\00(") + (data (i32.const 12088) "\01\00\00\00\0c\00\00\00q\00u\00a\00t\002\00(") (data (i32.const 12108) "\1c") + (data (i32.const 12120) "\01\00\00\00\n\00\00\00v\00e\00c\002\00(") (data (i32.const 12140) "\1c") - (data (i32.const 12172) ",") - (data (i32.const 12184) "\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 12220) "\1c") + (data (i32.const 12172) "\1c") + (data (i32.const 12204) ",") + (data (i32.const 12216) "\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") (data (i32.const 12252) "\1c") (data (i32.const 12284) "\1c") (data (i32.const 12316) "\1c") (data (i32.const 12348) "\1c") - (data (i32.const 12360) "\01\00\00\00\n\00\00\00v\00e\00c\003\00(") (data (i32.const 12380) "\1c") - (data (i32.const 12392) "\01\00\00\00\n\00\00\00v\00e\00c\004\00(") - (data (i32.const 12416) "\1d\00\00\00 \00\00\00\00\00\00\00 ") - (data (i32.const 12452) "\01\1a\00\00\02") - (data (i32.const 12484) " ") - (data (i32.const 12612) " \00\00\00\00\00\00\00\02A\00\00\00\00\00\00\02\t\00\00\00\00\00\00 \00\00\00\00\00\00\00\02\1a") - (table $0 57 funcref) - (elem (i32.const 1) $~lib/math/NativeMath.random $assembly/mat2d/multiply $assembly/mat2d/subtract $assembly/vec3/subtract $assembly/vec3/multiply $assembly/vec3/divide $assembly/vec3/distance $assembly/vec3/squaredDistance $assembly/vec3/length $assembly/vec3/squaredLength $start:assembly/vec3~anonymous|0~anonymous|0 $start:assembly/vec3~anonymous|0 $assembly/vec4/subtract $assembly/vec4/multiply $assembly/vec4/divide $assembly/vec4/distance $assembly/vec4/squaredDistance $assembly/vec4/length $assembly/vec4/squaredLength $start:assembly/vec4~anonymous|0~anonymous|0 $start:assembly/vec4~anonymous|0 $assembly/vec4/clone $assembly/vec4/fromValues $assembly/vec4/copy $assembly/vec4/set $assembly/vec4/add $assembly/quat/multiply $assembly/vec4/scale $assembly/vec4/dot $assembly/vec4/lerp $assembly/vec4/normalize $assembly/vec4/exactEquals $start:assembly/quat~anonymous|0~anonymous|0 $start:assembly/quat~anonymous|0 $start:assembly/quat~anonymous|1~anonymous|0 $start:assembly/quat~anonymous|1 $start:assembly/quat~anonymous|2~anonymous|0 $start:assembly/quat~anonymous|2 $assembly/quat2/multiply $assembly/mat4/perspectiveNO $assembly/mat4/orthoNO $assembly/mat4/multiply $assembly/mat4/subtract $assembly/mat3/multiply $assembly/mat3/subtract $assembly/vec2/length $assembly/vec2/subtract $assembly/vec2/multiply $assembly/vec2/divide $assembly/vec2/distance $assembly/vec2/squaredDistance $assembly/vec2/squaredLength $start:assembly/vec2~anonymous|0~anonymous|0 $start:assembly/vec2~anonymous|0 $assembly/mat2/multiply $assembly/vec4/subtract) + (data (i32.const 12392) "\01\00\00\00\n\00\00\00v\00e\00c\003\00(") + (data (i32.const 12412) "\1c") + (data (i32.const 12424) "\01\00\00\00\n\00\00\00v\00e\00c\004\00(") + (data (i32.const 12448) "\1e\00\00\00 \00\00\00\00\00\00\00 ") + (data (i32.const 12484) "\01\1a\00\00\02") + (data (i32.const 12524) " ") + (data (i32.const 12652) " \00\00\00\00\00\00\00\02A\00\00\00\00\00\00\02\t\00\00\00\00\00\00 \00\00\00\00\00\00\00\02\1a") + (table $0 58 funcref) + (elem (i32.const 1) $~lib/math/NativeMath.random $assembly/mat2d/multiply $assembly/mat2d/subtract $assembly/vec3/subtract $assembly/vec3/multiply $assembly/vec3/divide $~lib/math/NativeMath.hypot $assembly/vec3/distance $assembly/vec3/squaredDistance $assembly/vec3/length $assembly/vec3/squaredLength $start:assembly/vec3~anonymous|0~anonymous|0 $start:assembly/vec3~anonymous|0 $assembly/vec4/subtract $assembly/vec4/multiply $assembly/vec4/divide $assembly/vec4/distance $assembly/vec4/squaredDistance $assembly/vec4/length $assembly/vec4/squaredLength $start:assembly/vec4~anonymous|0~anonymous|0 $start:assembly/vec4~anonymous|0 $assembly/vec4/clone $assembly/vec4/fromValues $assembly/vec4/copy $assembly/vec4/set $assembly/vec4/add $assembly/quat/multiply $assembly/vec4/scale $assembly/vec4/dot $assembly/vec4/lerp $assembly/vec4/normalize $assembly/vec4/exactEquals $start:assembly/quat~anonymous|0~anonymous|0 $start:assembly/quat~anonymous|0 $start:assembly/quat~anonymous|1~anonymous|0 $start:assembly/quat~anonymous|1 $start:assembly/quat~anonymous|2~anonymous|0 $start:assembly/quat~anonymous|2 $assembly/quat2/multiply $assembly/mat4/perspectiveNO $assembly/mat4/orthoNO $assembly/mat4/multiply $assembly/mat4/subtract $assembly/mat3/multiply $assembly/mat3/subtract $assembly/vec2/length $assembly/vec2/subtract $assembly/vec2/multiply $assembly/vec2/divide $assembly/vec2/distance $assembly/vec2/squaredDistance $assembly/vec2/squaredLength $start:assembly/vec2~anonymous|0~anonymous|0 $start:assembly/vec2~anonymous|0 $assembly/mat2/multiply $assembly/vec4/subtract) (global $assembly/common/EPSILON f64 (f64.const 1e-06)) (global $~lib/math/random_seeded (mut i32) (i32.const 0)) (global $~lib/math/random_state0_64 (mut i64) (i64.const 0)) @@ -264,10 +265,10 @@ (global $assembly/vec3/sub i32 (i32.const 1312)) (global $assembly/vec3/mul i32 (i32.const 1344)) (global $assembly/vec3/div i32 (i32.const 1376)) - (global $assembly/vec3/dist i32 (i32.const 1408)) - (global $assembly/vec3/sqrDist i32 (i32.const 1440)) - (global $assembly/vec3/len i32 (i32.const 1472)) - (global $assembly/vec3/sqrLen i32 (i32.const 1504)) + (global $assembly/vec3/dist i32 (i32.const 1440)) + (global $assembly/vec3/sqrDist i32 (i32.const 1472)) + (global $assembly/vec3/len i32 (i32.const 1504)) + (global $assembly/vec3/sqrLen i32 (i32.const 1536)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) @@ -281,30 +282,30 @@ (global $assembly/vec3/vec (mut i32) (i32.const 0)) (global $~argumentsLength (mut i32) (i32.const 0)) (global $assembly/vec3/forEach (mut i32) (i32.const 0)) - (global $assembly/vec4/sub i32 (i32.const 2048)) - (global $assembly/vec4/mul i32 (i32.const 2080)) - (global $assembly/vec4/div i32 (i32.const 2112)) - (global $assembly/vec4/dist i32 (i32.const 2144)) - (global $assembly/vec4/sqrDist i32 (i32.const 2176)) - (global $assembly/vec4/len i32 (i32.const 2208)) - (global $assembly/vec4/sqrLen i32 (i32.const 2240)) + (global $assembly/vec4/sub i32 (i32.const 2080)) + (global $assembly/vec4/mul i32 (i32.const 2112)) + (global $assembly/vec4/div i32 (i32.const 2144)) + (global $assembly/vec4/dist i32 (i32.const 2176)) + (global $assembly/vec4/sqrDist i32 (i32.const 2208)) + (global $assembly/vec4/len i32 (i32.const 2240)) + (global $assembly/vec4/sqrLen i32 (i32.const 2272)) (global $assembly/vec4/vec (mut i32) (i32.const 0)) (global $assembly/vec4/forEach (mut i32) (i32.const 0)) - (global $assembly/quat/clone i32 (i32.const 2336)) - (global $assembly/quat/fromValues i32 (i32.const 2368)) - (global $assembly/quat/copy i32 (i32.const 2400)) - (global $assembly/quat/set i32 (i32.const 2432)) - (global $assembly/quat/add i32 (i32.const 2464)) - (global $assembly/quat/mul i32 (i32.const 2496)) - (global $assembly/quat/scale i32 (i32.const 2528)) - (global $assembly/quat/dot i32 (i32.const 2560)) - (global $assembly/quat/lerp i32 (i32.const 2592)) - (global $assembly/quat/length i32 (i32.const 2208)) - (global $assembly/quat/len i32 (i32.const 2208)) - (global $assembly/quat/squaredLength i32 (i32.const 2240)) - (global $assembly/quat/sqrLen i32 (i32.const 2240)) - (global $assembly/quat/normalize i32 (i32.const 2624)) - (global $assembly/quat/exactEquals i32 (i32.const 2656)) + (global $assembly/quat/clone i32 (i32.const 2368)) + (global $assembly/quat/fromValues i32 (i32.const 2400)) + (global $assembly/quat/copy i32 (i32.const 2432)) + (global $assembly/quat/set i32 (i32.const 2464)) + (global $assembly/quat/add i32 (i32.const 2496)) + (global $assembly/quat/mul i32 (i32.const 2528)) + (global $assembly/quat/scale i32 (i32.const 2560)) + (global $assembly/quat/dot i32 (i32.const 2592)) + (global $assembly/quat/lerp i32 (i32.const 2624)) + (global $assembly/quat/length i32 (i32.const 2240)) + (global $assembly/quat/len i32 (i32.const 2240)) + (global $assembly/quat/squaredLength i32 (i32.const 2272)) + (global $assembly/quat/sqrLen i32 (i32.const 2272)) + (global $assembly/quat/normalize i32 (i32.const 2656)) + (global $assembly/quat/exactEquals i32 (i32.const 2688)) (global $assembly/quat/tmpvec3 (mut i32) (i32.const 0)) (global $assembly/quat/xUnitVec3 (mut i32) (i32.const 0)) (global $assembly/quat/yUnitVec3 (mut i32) (i32.const 0)) @@ -317,39 +318,39 @@ (global $assembly/quat/sqlerp (mut i32) (i32.const 0)) (global $assembly/quat/matr (mut i32) (i32.const 0)) (global $assembly/quat/setAxes (mut i32) (i32.const 0)) - (global $assembly/quat2/getReal i32 (i32.const 2400)) - (global $assembly/quat2/setReal i32 (i32.const 2400)) - (global $assembly/quat2/mul i32 (i32.const 3088)) - (global $assembly/quat2/dot i32 (i32.const 2560)) - (global $assembly/quat2/length i32 (i32.const 2208)) - (global $assembly/quat2/len i32 (i32.const 2208)) - (global $assembly/quat2/squaredLength i32 (i32.const 2240)) - (global $assembly/quat2/sqrLen i32 (i32.const 2240)) - (global $assembly/mat4/perspective i32 (i32.const 3152)) - (global $assembly/mat4/ortho i32 (i32.const 3184)) - (global $assembly/mat4/mul i32 (i32.const 3216)) - (global $assembly/mat4/sub i32 (i32.const 3248)) - (global $assembly/mat3/mul i32 (i32.const 3280)) - (global $assembly/mat3/sub i32 (i32.const 3312)) - (global $assembly/vec2/len i32 (i32.const 3344)) - (global $assembly/vec2/sub i32 (i32.const 3376)) - (global $assembly/vec2/mul i32 (i32.const 3408)) - (global $assembly/vec2/div i32 (i32.const 3440)) - (global $assembly/vec2/dist i32 (i32.const 3472)) - (global $assembly/vec2/sqrDist i32 (i32.const 3504)) - (global $assembly/vec2/sqrLen i32 (i32.const 3536)) + (global $assembly/quat2/getReal i32 (i32.const 2432)) + (global $assembly/quat2/setReal i32 (i32.const 2432)) + (global $assembly/quat2/mul i32 (i32.const 3120)) + (global $assembly/quat2/dot i32 (i32.const 2592)) + (global $assembly/quat2/length i32 (i32.const 2240)) + (global $assembly/quat2/len i32 (i32.const 2240)) + (global $assembly/quat2/squaredLength i32 (i32.const 2272)) + (global $assembly/quat2/sqrLen i32 (i32.const 2272)) + (global $assembly/mat4/perspective i32 (i32.const 3184)) + (global $assembly/mat4/ortho i32 (i32.const 3216)) + (global $assembly/mat4/mul i32 (i32.const 3248)) + (global $assembly/mat4/sub i32 (i32.const 3280)) + (global $assembly/mat3/mul i32 (i32.const 3312)) + (global $assembly/mat3/sub i32 (i32.const 3344)) + (global $assembly/vec2/len i32 (i32.const 3376)) + (global $assembly/vec2/sub i32 (i32.const 3408)) + (global $assembly/vec2/mul i32 (i32.const 3440)) + (global $assembly/vec2/div i32 (i32.const 3472)) + (global $assembly/vec2/dist i32 (i32.const 3504)) + (global $assembly/vec2/sqrDist i32 (i32.const 3536)) + (global $assembly/vec2/sqrLen i32 (i32.const 3568)) (global $assembly/vec2/vec (mut i32) (i32.const 0)) (global $assembly/vec2/forEach (mut i32) (i32.const 0)) - (global $assembly/mat2/mul i32 (i32.const 3632)) - (global $assembly/mat2/sub i32 (i32.const 3664)) + (global $assembly/mat2/mul i32 (i32.const 3664)) + (global $assembly/mat2/sub i32 (i32.const 3696)) (global $~lib/util/number/_frc_plus (mut i64) (i64.const 0)) (global $~lib/util/number/_frc_minus (mut i64) (i64.const 0)) (global $~lib/util/number/_exp (mut i32) (i32.const 0)) (global $~lib/util/number/_K (mut i32) (i32.const 0)) (global $~lib/util/number/_frc_pow (mut i64) (i64.const 0)) (global $~lib/util/number/_exp_pow (mut i32) (i32.const 0)) - (global $assembly/mat4/Fov i32 (i32.const 27)) - (global $~lib/memory/__stack_pointer (mut i32) (i32.const 29036)) + (global $assembly/mat4/Fov i32 (i32.const 28)) + (global $~lib/memory/__stack_pointer (mut i32) (i32.const 29076)) (export "glMatrix.EPSILON" (global $assembly/common/EPSILON)) (export "glMatrix.RANDOM" (global $assembly/common/RANDOM)) (export "glMatrix.ANGLE_ORDER" (global $assembly/common/ANGLE_ORDER)) @@ -1140,42 +1141,244 @@ call $~lib/typedarray/Float64Array#__set local.get $0 ) - (func $assembly/vec3/distance (param $0 i32) (param $1 i32) (result f64) + (func $~lib/math/NativeMath.hypot (param $0 f64) (param $1 f64) (result f64) + (local $2 i64) + (local $3 i64) + (local $4 i64) + (local $5 f64) + (local $6 i32) + (local $7 f64) + (local $8 i32) + (local $9 f64) + (local $10 f64) + (local $11 f64) local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get + i64.reinterpret_f64 + i64.const 9223372036854775807 + i64.and + local.tee $2 local.get $0 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - f64.sub - local.get $1 + i64.reinterpret_f64 + i64.const 9223372036854775807 + i64.and + local.tee $3 + i64.gt_u + if + local.get $3 + local.get $2 + local.set $3 + local.set $2 + end + local.get $2 + f64.reinterpret_i64 + local.set $1 + local.get $2 + i64.const 52 + i64.shr_u + i32.wrap_i64 + local.tee $6 + i32.const 2047 + i32.eq + if + local.get $1 + return + end + local.get $3 + f64.reinterpret_i64 + local.set $0 i32.const 1 - call $~lib/typedarray/Float64Array#__get + local.get $2 + i64.eqz + local.get $3 + i64.const 52 + i64.shr_u + i32.wrap_i64 + local.tee $8 + i32.const 2047 + i32.eq + select + if + local.get $0 + return + end + local.get $8 + local.get $6 + i32.sub + i32.const 64 + i32.gt_s + if + local.get $0 + local.get $1 + f64.add + return + end + f64.const 1 + local.set $7 + local.get $8 + i32.const 1533 + i32.gt_u + if (result f64) + f64.const 5260135901548373507240989e186 + local.set $7 + local.get $1 + f64.const 1.90109156629516e-211 + f64.mul + local.set $1 + local.get $0 + f64.const 1.90109156629516e-211 + f64.mul + else + local.get $6 + i32.const 573 + i32.lt_u + if (result f64) + f64.const 1.90109156629516e-211 + local.set $7 + local.get $1 + f64.const 5260135901548373507240989e186 + f64.mul + local.set $1 + local.get $0 + f64.const 5260135901548373507240989e186 + f64.mul + else + local.get $0 + end + end + local.set $0 + local.get $1 + local.get $1 + local.get $1 + f64.const 134217729 + f64.mul + local.tee $11 + f64.sub + local.get $11 + f64.add + local.tee $10 + f64.sub + local.set $5 local.get $0 - i32.const 1 - call $~lib/typedarray/Float64Array#__get + local.get $0 + local.get $0 + f64.const 134217729 + f64.mul + local.tee $11 f64.sub + local.get $11 + f64.add + local.tee $9 + f64.sub + local.set $11 + local.get $7 + local.get $10 + local.get $10 + f64.mul local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get + local.get $1 + f64.mul + local.tee $1 + f64.sub + local.get $10 + local.get $10 + f64.add + local.get $5 + f64.add + local.get $5 + f64.mul + f64.add + local.get $9 + local.get $9 + f64.mul local.get $0 - i32.const 2 - call $~lib/typedarray/Float64Array#__get + local.get $0 + f64.mul + local.tee $0 f64.sub - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $assembly/imports/Maths.hypot + local.get $9 + local.get $9 + f64.add + local.get $11 + f64.add + local.get $11 + f64.mul + f64.add + f64.add + local.get $1 + f64.add + local.get $0 + f64.add + f64.sqrt + f64.mul + ) + (func $assembly/vec3/distance (param $0 i32) (param $1 i32) (result f64) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + block $__inlined_func$assembly/maths/Maths.hypot3 (result f64) + f64.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.sub + f64.abs + local.tee $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.sub + f64.abs + local.tee $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.sub + f64.abs + local.tee $5 + f64.max + f64.max + local.tee $2 + f64.const 0 + f64.eq + br_if $__inlined_func$assembly/maths/Maths.hypot3 + drop + local.get $2 + local.get $3 + f64.const 1 + local.get $2 + f64.div + local.tee $2 + f64.mul + local.tee $3 + local.get $3 + f64.mul + local.get $4 + local.get $2 + f64.mul + local.tee $3 + local.get $3 + f64.mul + f64.add + local.get $5 + local.get $2 + f64.mul + local.tee $2 + local.get $2 + f64.mul + f64.add + f64.sqrt + f64.mul + end ) (func $assembly/vec3/squaredDistance (param $0 i32) (param $1 i32) (result f64) (local $2 f64) @@ -1213,29 +1416,61 @@ f64.add ) (func $assembly/vec3/length (param $0 i32) (result f64) - local.get $0 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.get $0 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.get $0 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $assembly/imports/Maths.hypot + (local $1 f64) + (local $2 f64) + (local $3 f64) + (local $4 f64) + block $__inlined_func$assembly/maths/Maths.hypot3 (result f64) + f64.const 0 + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.abs + local.tee $2 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.abs + local.tee $3 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.abs + local.tee $4 + f64.max + f64.max + local.tee $1 + f64.const 0 + f64.eq + br_if $__inlined_func$assembly/maths/Maths.hypot3 + drop + local.get $1 + local.get $2 + f64.const 1 + local.get $1 + f64.div + local.tee $1 + f64.mul + local.tee $2 + local.get $2 + f64.mul + local.get $3 + local.get $1 + f64.mul + local.tee $2 + local.get $2 + f64.mul + f64.add + local.get $4 + local.get $1 + f64.mul + local.tee $1 + local.get $1 + f64.mul + f64.add + f64.sqrt + f64.mul + end ) (func $assembly/vec3/squaredLength (param $0 i32) (result f64) (local $1 f64) @@ -1265,9 +1500,9 @@ (local $1 i32) i32.const 1120 call $~lib/rt/itcms/__visit - i32.const 1536 + i32.const 1568 call $~lib/rt/itcms/__visit - i32.const 1648 + i32.const 1680 call $~lib/rt/itcms/__visit global.get $assembly/common/ANGLE_ORDER local.tee $0 @@ -1406,12 +1641,12 @@ i32.const 1 else local.get $1 - i32.const 12416 + i32.const 12448 i32.load i32.gt_u if i32.const 1120 - i32.const 1840 + i32.const 1872 i32.const 22 i32.const 28 call $~lib/builtins/abort @@ -1420,7 +1655,7 @@ local.get $1 i32.const 3 i32.shl - i32.const 12420 + i32.const 12452 i32.add i32.load i32.const 32 @@ -1859,10 +2094,10 @@ if unreachable end - i32.const 29040 + i32.const 29088 i32.const 0 i32.store - i32.const 30608 + i32.const 30656 i32.const 0 i32.store loop $for-loop|0 @@ -1873,7 +2108,7 @@ local.get $1 i32.const 2 i32.shl - i32.const 29040 + i32.const 29088 i32.add i32.const 0 i32.store offset=4 @@ -1891,7 +2126,7 @@ i32.add i32.const 2 i32.shl - i32.const 29040 + i32.const 29088 i32.add i32.const 0 i32.store offset=96 @@ -1909,13 +2144,13 @@ br $for-loop|0 end end - i32.const 29040 - i32.const 30612 + i32.const 29088 + i32.const 30660 memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory - i32.const 29040 + i32.const 29088 global.set $~lib/rt/tlsf/ROOT ) (func $~lib/rt/itcms/step (result i32) @@ -1998,7 +2233,7 @@ local.set $0 loop $while-continue|0 local.get $0 - i32.const 29036 + i32.const 29076 i32.lt_u if local.get $0 @@ -2081,7 +2316,7 @@ i32.load offset=4 drop local.get $0 - i32.const 29036 + i32.const 29076 i32.lt_u if local.get $0 @@ -2104,7 +2339,7 @@ i32.const 4 i32.add local.tee $0 - i32.const 29036 + i32.const 29076 i32.ge_u if global.get $~lib/rt/tlsf/ROOT @@ -2430,8 +2665,8 @@ i32.const 1073741804 i32.ge_u if - i32.const 1648 - i32.const 1712 + i32.const 1680 + i32.const 1744 i32.const 260 i32.const 31 call $~lib/builtins/abort @@ -2497,8 +2732,8 @@ i32.const 1073741820 i32.ge_u if - i32.const 1648 - i32.const 1920 + i32.const 1680 + i32.const 1952 i32.const 458 i32.const 30 call $~lib/builtins/abort @@ -2757,7 +2992,7 @@ end ) (func $start:assembly/vec3~anonymous|0 (result i32) - i32.const 1984 + i32.const 2016 ) (func $assembly/vec4/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 @@ -2889,47 +3124,91 @@ local.get $0 ) (func $assembly/vec4/distance (param $0 i32) (param $1 i32) (result f64) - local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.get $0 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - f64.sub - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.get $0 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - f64.sub - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.get $0 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - f64.sub - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.get $0 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - f64.sub - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $assembly/imports/Maths.hypot + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + block $__inlined_func$assembly/maths/Maths.hypot4 (result f64) + f64.const 0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.sub + f64.abs + local.tee $3 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.sub + f64.abs + local.tee $4 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.sub + f64.abs + local.tee $5 + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.sub + f64.abs + local.tee $6 + f64.max + f64.max + f64.max + local.tee $2 + f64.const 0 + f64.eq + br_if $__inlined_func$assembly/maths/Maths.hypot4 + drop + local.get $2 + local.get $3 + f64.const 1 + local.get $2 + f64.div + local.tee $2 + f64.mul + local.tee $3 + local.get $3 + f64.mul + local.get $4 + local.get $2 + f64.mul + local.tee $3 + local.get $3 + f64.mul + f64.add + local.get $5 + local.get $2 + f64.mul + local.tee $3 + local.get $3 + f64.mul + f64.add + local.get $6 + local.get $2 + f64.mul + local.tee $2 + local.get $2 + f64.mul + f64.add + f64.sqrt + f64.mul + end ) (func $assembly/vec4/squaredDistance (param $0 i32) (param $1 i32) (result f64) (local $2 f64) @@ -2978,31 +3257,75 @@ f64.add ) (func $assembly/vec4/length (param $0 i32) (result f64) - local.get $0 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.get $0 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.get $0 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.get $0 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $assembly/imports/Maths.hypot + (local $1 f64) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + block $__inlined_func$assembly/maths/Maths.hypot4 (result f64) + f64.const 0 + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.abs + local.tee $2 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.abs + local.tee $3 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.abs + local.tee $4 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.abs + local.tee $5 + f64.max + f64.max + f64.max + local.tee $1 + f64.const 0 + f64.eq + br_if $__inlined_func$assembly/maths/Maths.hypot4 + drop + local.get $1 + local.get $2 + f64.const 1 + local.get $1 + f64.div + local.tee $1 + f64.mul + local.tee $2 + local.get $2 + f64.mul + local.get $3 + local.get $1 + f64.mul + local.tee $2 + local.get $2 + f64.mul + f64.add + local.get $4 + local.get $1 + f64.mul + local.tee $2 + local.get $2 + f64.mul + f64.add + local.get $5 + local.get $1 + f64.mul + local.tee $1 + local.get $1 + f64.mul + f64.add + f64.sqrt + f64.mul + end ) (func $assembly/vec4/squaredLength (param $0 i32) (result f64) (local $1 f64) @@ -3035,7 +3358,7 @@ f64.add ) (func $start:assembly/vec4~anonymous|0 (result i32) - i32.const 2272 + i32.const 2304 ) (func $assembly/vec4/copy (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -3661,7 +3984,7 @@ i32.wrap_i64 i32.const 3 i32.shl - i32.const 2672 + i32.const 2704 i32.add local.tee $7 i64.load @@ -4762,7 +5085,7 @@ local.get $0 ) (func $start:assembly/quat~anonymous|0 (result i32) - i32.const 2896 + i32.const 2928 ) (func $~lib/math/NativeMath.acos (param $0 f64) (result f64) (local $1 f64) @@ -5161,7 +5484,7 @@ local.get $0 ) (func $start:assembly/quat~anonymous|1 (result i32) - i32.const 2960 + i32.const 2992 ) (func $assembly/quat/fromMat3 (param $0 i32) (param $1 i32) (result i32) (local $2 f64) @@ -5357,7 +5680,7 @@ local.get $0 ) (func $start:assembly/quat~anonymous|2 (result i32) - i32.const 3024 + i32.const 3056 ) (func $assembly/quat2/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 f64) @@ -7195,180 +7518,13 @@ local.get $0 ) (func $assembly/vec2/length (param $0 i32) (result f64) - (local $1 i64) - (local $2 i64) - (local $3 i64) - (local $4 f64) - (local $5 f64) - (local $6 f64) - (local $7 f64) - (local $8 f64) - (local $9 i32) - (local $10 f64) - (local $11 f64) local.get $0 i32.const 0 call $~lib/typedarray/Float64Array#__get - local.set $4 local.get $0 i32.const 1 call $~lib/typedarray/Float64Array#__get - i64.reinterpret_f64 - i64.const 9223372036854775807 - i64.and - local.tee $1 - local.get $4 - i64.reinterpret_f64 - i64.const 9223372036854775807 - i64.and - local.tee $2 - i64.gt_u - if - local.get $2 - local.get $1 - local.set $2 - local.set $1 - end - local.get $2 - i64.const 52 - i64.shr_u - i32.wrap_i64 - local.set $0 - local.get $1 - f64.reinterpret_i64 - local.set $5 - block $__inlined_func$~lib/math/NativeMath.hypot (result f64) - local.get $5 - local.get $1 - i64.const 52 - i64.shr_u - i32.wrap_i64 - local.tee $9 - i32.const 2047 - i32.eq - br_if $__inlined_func$~lib/math/NativeMath.hypot - drop - local.get $2 - f64.reinterpret_i64 - local.tee $4 - i32.const 1 - local.get $1 - i64.eqz - local.get $0 - i32.const 2047 - i32.eq - select - br_if $__inlined_func$~lib/math/NativeMath.hypot - drop - local.get $4 - local.get $5 - f64.add - local.get $0 - local.get $9 - i32.sub - i32.const 64 - i32.gt_s - br_if $__inlined_func$~lib/math/NativeMath.hypot - drop - f64.const 1 - local.set $8 - local.get $0 - i32.const 1533 - i32.gt_u - if (result f64) - f64.const 5260135901548373507240989e186 - local.set $8 - local.get $5 - f64.const 1.90109156629516e-211 - f64.mul - local.set $5 - local.get $4 - f64.const 1.90109156629516e-211 - f64.mul - else - local.get $9 - i32.const 573 - i32.lt_u - if (result f64) - f64.const 1.90109156629516e-211 - local.set $8 - local.get $5 - f64.const 5260135901548373507240989e186 - f64.mul - local.set $5 - local.get $4 - f64.const 5260135901548373507240989e186 - f64.mul - else - local.get $4 - end - end - local.set $4 - local.get $5 - local.get $5 - local.get $5 - f64.const 134217729 - f64.mul - local.tee $6 - f64.sub - local.get $6 - f64.add - local.tee $6 - f64.sub - local.set $10 - local.get $4 - local.get $4 - local.get $4 - f64.const 134217729 - f64.mul - local.tee $7 - f64.sub - local.get $7 - f64.add - local.tee $7 - f64.sub - local.set $11 - local.get $8 - local.get $6 - local.get $6 - f64.mul - local.get $5 - local.get $5 - f64.mul - local.tee $5 - f64.sub - local.get $6 - local.get $6 - f64.add - local.get $10 - f64.add - local.get $10 - f64.mul - f64.add - local.get $7 - local.get $7 - f64.mul - local.get $4 - local.get $4 - f64.mul - local.tee $4 - f64.sub - local.get $7 - local.get $7 - f64.add - local.get $11 - f64.add - local.get $11 - f64.mul - f64.add - f64.add - local.get $5 - f64.add - local.get $4 - f64.add - f64.sqrt - f64.mul - end + call $~lib/math/NativeMath.hypot ) (func $assembly/vec2/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 @@ -7454,21 +7610,7 @@ i32.const 1 call $~lib/typedarray/Float64Array#__get f64.sub - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $assembly/imports/Maths.hypot + call $~lib/math/NativeMath.hypot ) (func $assembly/vec2/squaredDistance (param $0 i32) (param $1 i32) (result f64) (local $2 f64) @@ -7511,7 +7653,7 @@ f64.add ) (func $start:assembly/vec2~anonymous|0 (result i32) - i32.const 3568 + i32.const 3600 ) (func $assembly/mat2/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 f64) @@ -7824,7 +7966,7 @@ local.get $5 i32.const 1 i32.shl - i32.const 4000 + i32.const 4032 i32.add local.get $3 i32.const 65535 @@ -7859,7 +8001,7 @@ local.get $7 i32.const 2 i32.shl - i32.const 4928 + i32.const 4960 i32.add i64.load32_u local.get $9 @@ -7869,7 +8011,7 @@ local.get $5 i32.const 1 i32.shl - i32.const 3998 + i32.const 4030 i32.add local.tee $7 i32.load16_u @@ -7949,7 +8091,7 @@ local.get $5 i32.const 1 i32.shl - i32.const 4000 + i32.const 4032 i32.add local.get $6 i32.wrap_i64 @@ -7987,7 +8129,7 @@ i32.sub i32.const 2 i32.shl - i32.const 4928 + i32.const 4960 i32.add i64.load32_u i64.mul @@ -7995,7 +8137,7 @@ local.get $5 i32.const 1 i32.shl - i32.const 3998 + i32.const 4030 i32.add local.tee $7 i32.load16_u @@ -9022,7 +9164,7 @@ i32.div_u i32.const 2 i32.shl - i32.const 4968 + i32.const 5000 i32.add i64.load32_u local.get $3 @@ -9030,7 +9172,7 @@ i32.rem_u i32.const 2 i32.shl - i32.const 4968 + i32.const 5000 i32.add i64.load32_u i64.const 32 @@ -9057,7 +9199,7 @@ i32.rem_u i32.const 2 i32.shl - i32.const 4968 + i32.const 5000 i32.add i32.load i32.store @@ -9080,7 +9222,7 @@ local.get $1 i32.const 2 i32.shl - i32.const 4968 + i32.const 5000 i32.add i32.load i32.store @@ -9456,7 +9598,7 @@ f64.lt local.tee $8 if (result f64) - i32.const 4000 + i32.const 4032 i32.const 45 i32.store16 local.get $0 @@ -9557,14 +9699,14 @@ i32.sub global.set $~lib/util/number/_K local.get $9 - i32.const 4056 + i32.const 4088 i32.add i64.load global.set $~lib/util/number/_frc_pow local.get $5 i32.const 1 i32.shl - i32.const 4752 + i32.const 4784 i32.add i32.load16_s global.set $~lib/util/number/_exp_pow @@ -9596,7 +9738,7 @@ local.get $8 i32.const 1 i32.shl - i32.const 4000 + i32.const 4032 i32.add local.get $2 local.get $1 @@ -9730,11 +9872,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -9752,7 +9894,7 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - i32.const 3856 + i32.const 3888 local.set $1 br $__inlined_func$~lib/util/number/dtoa end @@ -9770,7 +9912,7 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - i32.const 3888 + i32.const 3920 local.set $1 br $__inlined_func$~lib/util/number/dtoa end @@ -9778,8 +9920,8 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - i32.const 3920 - i32.const 3968 + i32.const 3952 + i32.const 4000 local.get $0 f64.const 0 f64.lt @@ -9799,7 +9941,7 @@ local.tee $1 i32.store local.get $1 - i32.const 4000 + i32.const 4032 local.get $2 call $~lib/memory/memory.copy global.get $~lib/memory/__stack_pointer @@ -9818,11 +9960,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -9858,7 +10000,7 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - i32.const 5392 + i32.const 5424 local.set $2 br $__inlined_func$~lib/string/String#concat end @@ -11768,33 +11910,61 @@ (local $23 f64) (local $24 f64) (local $25 f64) - local.get $3 - i32.const 0 - call $~lib/typedarray/Float64Array#__get + block $__inlined_func$assembly/maths/Maths.hypot3 (result f64) + f64.const 0 + local.get $3 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.tee $6 + f64.abs + local.tee $5 + local.get $3 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.tee $7 + f64.abs + local.tee $11 + local.get $3 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.tee $9 + f64.abs + local.tee $8 + f64.max + f64.max + local.tee $4 + f64.const 0 + f64.eq + br_if $__inlined_func$assembly/maths/Maths.hypot3 + drop + local.get $4 + local.get $5 + f64.const 1 + local.get $4 + f64.div + local.tee $4 + f64.mul + local.tee $5 + local.get $5 + f64.mul + local.get $11 + local.get $4 + f64.mul + local.tee $5 + local.get $5 + f64.mul + f64.add + local.get $8 + local.get $4 + f64.mul + local.tee $4 + local.get $4 + f64.mul + f64.add + f64.sqrt + f64.mul + end local.tee $4 - local.get $3 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.tee $7 - local.get $3 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.tee $6 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $assembly/imports/Maths.hypot - local.tee $5 f64.const 1e-06 f64.lt if @@ -11803,14 +11973,14 @@ end local.get $2 call $~lib/math/NativeMath.sin - local.set $11 + local.set $8 local.get $2 call $~lib/math/NativeMath.cos - local.set $12 + local.set $11 local.get $1 i32.const 0 call $~lib/typedarray/Float64Array#__get - local.set $8 + local.set $12 local.get $1 i32.const 1 call $~lib/typedarray/Float64Array#__get @@ -11857,10 +12027,10 @@ local.set $23 local.get $0 i32.const 0 - local.get $8 - local.get $4 + local.get $12 + local.get $6 f64.const 1 - local.get $5 + local.get $4 f64.div local.tee $5 f64.mul @@ -11868,32 +12038,32 @@ local.get $4 f64.mul f64.const 1 - local.get $12 + local.get $11 f64.sub local.tee $2 f64.mul - local.get $12 + local.get $11 f64.add - local.tee $9 + local.tee $10 f64.mul local.get $16 local.get $7 local.get $5 f64.mul - local.tee $7 + local.tee $6 local.get $4 f64.mul local.get $2 f64.mul - local.get $6 + local.get $9 local.get $5 f64.mul local.tee $5 - local.get $11 + local.get $8 f64.mul local.tee $24 f64.add - local.tee $6 + local.tee $7 f64.mul f64.add local.get $20 @@ -11902,140 +12072,140 @@ f64.mul local.get $2 f64.mul - local.get $7 - local.get $11 + local.get $6 + local.get $8 f64.mul local.tee $25 f64.sub - local.tee $10 + local.tee $9 f64.mul f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 local.get $13 - local.get $9 + local.get $10 f64.mul local.get $17 - local.get $6 + local.get $7 f64.mul f64.add local.get $21 - local.get $10 + local.get $9 f64.mul f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 local.get $14 - local.get $9 + local.get $10 f64.mul local.get $18 - local.get $6 + local.get $7 f64.mul f64.add local.get $22 - local.get $10 + local.get $9 f64.mul f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 3 local.get $15 - local.get $9 + local.get $10 f64.mul local.get $19 - local.get $6 + local.get $7 f64.mul f64.add local.get $23 - local.get $10 + local.get $9 f64.mul f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 4 - local.get $8 + local.get $12 local.get $4 - local.get $7 + local.get $6 f64.mul local.get $2 f64.mul local.get $24 f64.sub - local.tee $9 + local.tee $10 f64.mul local.get $16 - local.get $7 - local.get $7 + local.get $6 + local.get $6 f64.mul local.get $2 f64.mul - local.get $12 + local.get $11 f64.add - local.tee $6 + local.tee $7 f64.mul f64.add local.get $20 local.get $5 - local.get $7 + local.get $6 f64.mul local.get $2 f64.mul local.get $4 - local.get $11 + local.get $8 f64.mul - local.tee $11 + local.tee $9 f64.add - local.tee $10 + local.tee $8 f64.mul f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 5 local.get $13 - local.get $9 + local.get $10 f64.mul local.get $17 - local.get $6 + local.get $7 f64.mul f64.add local.get $21 - local.get $10 + local.get $8 f64.mul f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 6 local.get $14 - local.get $9 + local.get $10 f64.mul local.get $18 - local.get $6 + local.get $7 f64.mul f64.add local.get $22 - local.get $10 + local.get $8 f64.mul f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 7 local.get $15 - local.get $9 + local.get $10 f64.mul local.get $19 - local.get $6 + local.get $7 f64.mul f64.add local.get $23 - local.get $10 + local.get $8 f64.mul f64.add call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 8 - local.get $8 + local.get $12 local.get $4 local.get $5 f64.mul @@ -12043,17 +12213,17 @@ f64.mul local.get $25 f64.add - local.tee $8 + local.tee $4 f64.mul local.get $16 - local.get $7 + local.get $6 local.get $5 f64.mul local.get $2 f64.mul - local.get $11 + local.get $9 f64.sub - local.tee $4 + local.tee $6 f64.mul f64.add local.get $20 @@ -12062,7 +12232,7 @@ f64.mul local.get $2 f64.mul - local.get $12 + local.get $11 f64.add local.tee $2 f64.mul @@ -12071,10 +12241,10 @@ local.get $0 i32.const 9 local.get $13 - local.get $8 + local.get $4 f64.mul local.get $17 - local.get $4 + local.get $6 f64.mul f64.add local.get $21 @@ -12085,10 +12255,10 @@ local.get $0 i32.const 10 local.get $14 - local.get $8 + local.get $4 f64.mul local.get $18 - local.get $4 + local.get $6 f64.mul f64.add local.get $22 @@ -12099,10 +12269,10 @@ local.get $0 i32.const 11 local.get $15 - local.get $8 + local.get $4 f64.mul local.get $19 - local.get $4 + local.get $6 f64.mul f64.add local.get $23 @@ -12141,6 +12311,224 @@ end local.get $0 ) + (func $assembly/mat4/fromRotation (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + block $__inlined_func$assembly/maths/Maths.hypot3 (result f64) + f64.const 0 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.tee $5 + f64.abs + local.tee $4 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + local.tee $8 + f64.abs + local.tee $6 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + local.tee $9 + f64.abs + local.tee $7 + f64.max + f64.max + local.tee $3 + f64.const 0 + f64.eq + br_if $__inlined_func$assembly/maths/Maths.hypot3 + drop + local.get $3 + local.get $4 + f64.const 1 + local.get $3 + f64.div + local.tee $3 + f64.mul + local.tee $4 + local.get $4 + f64.mul + local.get $6 + local.get $3 + f64.mul + local.tee $4 + local.get $4 + f64.mul + f64.add + local.get $7 + local.get $3 + f64.mul + local.tee $3 + local.get $3 + f64.mul + f64.add + f64.sqrt + f64.mul + end + local.tee $3 + f64.const 1e-06 + f64.lt + if + i32.const 0 + return + end + local.get $1 + call $~lib/math/NativeMath.sin + local.set $6 + local.get $0 + i32.const 0 + local.get $5 + f64.const 1 + local.get $3 + f64.div + local.tee $4 + f64.mul + local.tee $3 + local.get $3 + f64.mul + f64.const 1 + local.get $1 + call $~lib/math/NativeMath.cos + local.tee $7 + f64.sub + local.tee $1 + f64.mul + local.get $7 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + local.get $8 + local.get $4 + f64.mul + local.tee $5 + local.get $3 + f64.mul + local.get $1 + f64.mul + local.get $9 + local.get $4 + f64.mul + local.tee $4 + local.get $6 + f64.mul + local.tee $8 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + local.get $4 + local.get $3 + f64.mul + local.get $1 + f64.mul + local.get $5 + local.get $6 + f64.mul + local.tee $9 + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + local.get $3 + local.get $5 + f64.mul + local.get $1 + f64.mul + local.get $8 + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + local.get $5 + local.get $5 + f64.mul + local.get $1 + f64.mul + local.get $7 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + local.get $4 + local.get $5 + f64.mul + local.get $1 + f64.mul + local.get $3 + local.get $6 + f64.mul + local.tee $6 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + local.get $3 + local.get $4 + f64.mul + local.get $1 + f64.mul + local.get $9 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + local.get $5 + local.get $4 + f64.mul + local.get $1 + f64.mul + local.get $6 + f64.sub + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 10 + local.get $4 + local.get $4 + f64.mul + local.get $1 + f64.mul + local.get $7 + f64.add + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 15 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + ) (func $assembly/mat4/fromRotationTranslation (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 f64) (local $4 f64) @@ -12331,6 +12719,7 @@ (local $8 f64) (local $9 f64) (local $10 f64) + (local $11 f64) local.get $1 i32.const 0 call $~lib/typedarray/Float64Array#__get @@ -12350,82 +12739,166 @@ local.get $1 i32.const 5 call $~lib/typedarray/Float64Array#__get - local.set $6 + local.set $7 local.get $1 i32.const 6 call $~lib/typedarray/Float64Array#__get - local.set $7 + local.set $8 local.get $1 i32.const 8 call $~lib/typedarray/Float64Array#__get - local.set $8 + local.set $9 local.get $1 i32.const 9 call $~lib/typedarray/Float64Array#__get - local.set $9 + local.set $10 local.get $1 i32.const 10 call $~lib/typedarray/Float64Array#__get - local.set $10 + local.set $11 local.get $0 i32.const 0 - local.get $2 - local.get $3 - local.get $4 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $assembly/imports/Maths.hypot + block $__inlined_func$assembly/maths/Maths.hypot3 (result f64) + f64.const 0 + local.get $2 + f64.abs + local.tee $6 + local.get $3 + f64.abs + local.tee $3 + local.get $4 + f64.abs + local.tee $4 + f64.max + f64.max + local.tee $2 + f64.const 0 + f64.eq + br_if $__inlined_func$assembly/maths/Maths.hypot3 + drop + local.get $2 + local.get $6 + f64.const 1 + local.get $2 + f64.div + local.tee $2 + f64.mul + local.tee $6 + local.get $6 + f64.mul + local.get $3 + local.get $2 + f64.mul + local.tee $3 + local.get $3 + f64.mul + f64.add + local.get $4 + local.get $2 + f64.mul + local.tee $2 + local.get $2 + f64.mul + f64.add + f64.sqrt + f64.mul + end call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 - local.get $5 - local.get $6 - local.get $7 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $assembly/imports/Maths.hypot + block $__inlined_func$assembly/maths/Maths.hypot30 (result f64) + f64.const 0 + local.get $5 + f64.abs + local.tee $3 + local.get $7 + f64.abs + local.tee $4 + local.get $8 + f64.abs + local.tee $5 + f64.max + f64.max + local.tee $2 + f64.const 0 + f64.eq + br_if $__inlined_func$assembly/maths/Maths.hypot30 + drop + local.get $2 + local.get $3 + f64.const 1 + local.get $2 + f64.div + local.tee $2 + f64.mul + local.tee $3 + local.get $3 + f64.mul + local.get $4 + local.get $2 + f64.mul + local.tee $3 + local.get $3 + f64.mul + f64.add + local.get $5 + local.get $2 + f64.mul + local.tee $2 + local.get $2 + f64.mul + f64.add + f64.sqrt + f64.mul + end call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 - local.get $8 - local.get $9 - local.get $10 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $assembly/imports/Maths.hypot + block $__inlined_func$assembly/maths/Maths.hypot31 (result f64) + f64.const 0 + local.get $9 + f64.abs + local.tee $3 + local.get $10 + f64.abs + local.tee $4 + local.get $11 + f64.abs + local.tee $5 + f64.max + f64.max + local.tee $2 + f64.const 0 + f64.eq + br_if $__inlined_func$assembly/maths/Maths.hypot31 + drop + local.get $2 + local.get $3 + f64.const 1 + local.get $2 + f64.div + local.tee $2 + f64.mul + local.tee $3 + local.get $3 + f64.mul + local.get $4 + local.get $2 + f64.mul + local.tee $3 + local.get $3 + f64.mul + f64.add + local.get $5 + local.get $2 + f64.mul + local.tee $2 + local.get $2 + f64.mul + f64.add + f64.sqrt + f64.mul + end call $~lib/typedarray/Float64Array#__set local.get $0 ) @@ -12442,6 +12915,7 @@ (local $13 f64) (local $14 f64) (local $15 f64) + (local $16 f64) local.get $1 i32.const 0 local.get $3 @@ -12463,98 +12937,182 @@ local.get $3 i32.const 0 call $~lib/typedarray/Float64Array#__get - local.set $6 + local.set $7 local.get $3 i32.const 1 call $~lib/typedarray/Float64Array#__get - local.set $5 + local.set $6 local.get $3 i32.const 2 call $~lib/typedarray/Float64Array#__get - local.set $7 + local.set $9 local.get $3 i32.const 4 call $~lib/typedarray/Float64Array#__get - local.set $8 + local.set $10 local.get $3 i32.const 5 call $~lib/typedarray/Float64Array#__get - local.set $12 + local.set $15 local.get $3 i32.const 6 call $~lib/typedarray/Float64Array#__get - local.set $9 + local.set $11 local.get $3 i32.const 8 call $~lib/typedarray/Float64Array#__get - local.set $10 + local.set $12 local.get $3 i32.const 9 call $~lib/typedarray/Float64Array#__get - local.set $11 + local.set $13 local.get $3 i32.const 10 call $~lib/typedarray/Float64Array#__get - local.set $14 + local.set $16 local.get $2 i32.const 0 - local.get $6 - local.get $5 - local.get $7 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $assembly/imports/Maths.hypot + block $__inlined_func$assembly/maths/Maths.hypot3 (result f64) + f64.const 0 + local.get $7 + f64.abs + local.tee $5 + local.get $6 + f64.abs + local.tee $8 + local.get $9 + f64.abs + local.tee $14 + f64.max + f64.max + local.tee $4 + f64.const 0 + f64.eq + br_if $__inlined_func$assembly/maths/Maths.hypot3 + drop + local.get $4 + local.get $5 + f64.const 1 + local.get $4 + f64.div + local.tee $4 + f64.mul + local.tee $5 + local.get $5 + f64.mul + local.get $8 + local.get $4 + f64.mul + local.tee $5 + local.get $5 + f64.mul + f64.add + local.get $14 + local.get $4 + f64.mul + local.tee $4 + local.get $4 + f64.mul + f64.add + f64.sqrt + f64.mul + end call $~lib/typedarray/Float64Array#__set local.get $2 i32.const 1 - local.get $8 - local.get $12 - local.get $9 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $assembly/imports/Maths.hypot + block $__inlined_func$assembly/maths/Maths.hypot30 (result f64) + f64.const 0 + local.get $10 + f64.abs + local.tee $5 + local.get $15 + f64.abs + local.tee $8 + local.get $11 + f64.abs + local.tee $14 + f64.max + f64.max + local.tee $4 + f64.const 0 + f64.eq + br_if $__inlined_func$assembly/maths/Maths.hypot30 + drop + local.get $4 + local.get $5 + f64.const 1 + local.get $4 + f64.div + local.tee $4 + f64.mul + local.tee $5 + local.get $5 + f64.mul + local.get $8 + local.get $4 + f64.mul + local.tee $5 + local.get $5 + f64.mul + f64.add + local.get $14 + local.get $4 + f64.mul + local.tee $4 + local.get $4 + f64.mul + f64.add + f64.sqrt + f64.mul + end call $~lib/typedarray/Float64Array#__set local.get $2 i32.const 2 - local.get $10 - local.get $11 - local.get $14 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $assembly/imports/Maths.hypot + block $__inlined_func$assembly/maths/Maths.hypot31 (result f64) + f64.const 0 + local.get $12 + f64.abs + local.tee $5 + local.get $13 + f64.abs + local.tee $8 + local.get $16 + f64.abs + local.tee $14 + f64.max + f64.max + local.tee $4 + f64.const 0 + f64.eq + br_if $__inlined_func$assembly/maths/Maths.hypot31 + drop + local.get $4 + local.get $5 + f64.const 1 + local.get $4 + f64.div + local.tee $4 + f64.mul + local.tee $5 + local.get $5 + f64.mul + local.get $8 + local.get $4 + f64.mul + local.tee $5 + local.get $5 + f64.mul + f64.add + local.get $14 + local.get $4 + f64.mul + local.tee $4 + local.get $4 + f64.mul + f64.add + f64.sqrt + f64.mul + end call $~lib/typedarray/Float64Array#__set f64.const 1 local.get $2 @@ -12562,30 +13120,22 @@ call $~lib/typedarray/Float64Array#__get f64.div local.set $4 - local.get $5 + local.get $6 f64.const 1 local.get $2 i32.const 1 call $~lib/typedarray/Float64Array#__get f64.div - local.tee $5 + local.tee $6 f64.mul - local.set $13 - local.get $7 + local.set $5 + local.get $9 f64.const 1 local.get $2 i32.const 2 call $~lib/typedarray/Float64Array#__get f64.div - local.tee $15 - f64.mul - local.set $7 - local.get $8 - local.get $4 - f64.mul - local.set $8 - local.get $9 - local.get $15 + local.tee $8 f64.mul local.set $9 local.get $10 @@ -12593,30 +13143,38 @@ f64.mul local.set $10 local.get $11 - local.get $5 + local.get $8 f64.mul local.set $11 + local.get $12 + local.get $4 + f64.mul + local.set $12 + local.get $13 local.get $6 + f64.mul + local.set $13 + local.get $7 local.get $4 f64.mul local.tee $4 - local.get $12 - local.get $5 + local.get $15 + local.get $6 f64.mul - local.tee $6 + local.tee $7 f64.add - local.get $14 - local.get $15 + local.get $16 + local.get $8 f64.mul - local.tee $5 + local.tee $6 f64.add - local.tee $12 + local.tee $15 f64.const 0 f64.gt if local.get $0 i32.const 3 - local.get $12 + local.get $15 f64.const 1 f64.add f64.sqrt @@ -12629,49 +13187,49 @@ call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 0 - local.get $9 local.get $11 + local.get $13 f64.sub local.get $4 f64.div call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 - local.get $10 - local.get $7 + local.get $12 + local.get $9 f64.sub local.get $4 f64.div call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 - local.get $13 - local.get $8 + local.get $5 + local.get $10 f64.sub local.get $4 f64.div call $~lib/typedarray/Float64Array#__set else local.get $4 - local.get $5 + local.get $6 f64.gt i32.const 0 local.get $4 - local.get $6 + local.get $7 f64.gt select if local.get $0 i32.const 3 - local.get $9 local.get $11 + local.get $13 f64.sub local.get $4 f64.const 1 f64.add - local.get $6 + local.get $7 f64.sub - local.get $5 + local.get $6 f64.sub f64.sqrt local.tee $4 @@ -12688,36 +13246,36 @@ call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 - local.get $13 - local.get $8 + local.get $5 + local.get $10 f64.add local.get $4 f64.div call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 - local.get $10 - local.get $7 + local.get $12 + local.get $9 f64.add local.get $4 f64.div call $~lib/typedarray/Float64Array#__set else - local.get $5 local.get $6 + local.get $7 f64.lt if local.get $0 i32.const 3 - local.get $10 - local.get $7 + local.get $12 + local.get $9 f64.sub - local.get $6 + local.get $7 f64.const 1 f64.add local.get $4 f64.sub - local.get $5 + local.get $6 f64.sub f64.sqrt local.tee $4 @@ -12728,8 +13286,8 @@ call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 0 - local.get $13 - local.get $8 + local.get $5 + local.get $10 f64.add local.get $4 f64.div @@ -12742,8 +13300,8 @@ call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 - local.get $9 local.get $11 + local.get $13 f64.add local.get $4 f64.div @@ -12751,15 +13309,15 @@ else local.get $0 i32.const 3 - local.get $13 - local.get $8 - f64.sub local.get $5 + local.get $10 + f64.sub + local.get $6 f64.const 1 f64.add local.get $4 f64.sub - local.get $6 + local.get $7 f64.sub f64.sqrt local.tee $4 @@ -12770,16 +13328,16 @@ call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 0 - local.get $10 - local.get $7 + local.get $12 + local.get $9 f64.add local.get $4 f64.div call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 - local.get $9 local.get $11 + local.get $13 f64.add local.get $4 f64.div @@ -13069,6 +13627,9 @@ (local $14 f64) (local $15 f64) (local $16 f64) + (local $17 f64) + (local $18 f64) + (local $19 f64) local.get $1 i32.const 0 call $~lib/typedarray/Float64Array#__get @@ -13084,42 +13645,42 @@ local.get $3 i32.const 0 call $~lib/typedarray/Float64Array#__get - local.set $5 + local.set $4 local.get $3 i32.const 1 call $~lib/typedarray/Float64Array#__get - local.set $11 + local.set $5 local.get $3 i32.const 2 call $~lib/typedarray/Float64Array#__get - local.set $6 + local.set $12 local.get $2 i32.const 0 call $~lib/typedarray/Float64Array#__get - local.set $7 + local.set $6 local.get $2 i32.const 1 call $~lib/typedarray/Float64Array#__get - local.set $8 + local.set $10 local.get $15 local.get $2 i32.const 2 call $~lib/typedarray/Float64Array#__get - local.tee $4 + local.tee $8 f64.sub f64.abs f64.const 1e-06 f64.lt i32.const 0 local.get $14 - local.get $8 + local.get $10 f64.sub f64.abs f64.const 1e-06 f64.lt i32.const 0 local.get $13 - local.get $7 + local.get $6 f64.sub f64.abs f64.const 1e-06 @@ -13131,83 +13692,140 @@ call $assembly/mat4/identity return end - f64.const 1 - local.get $13 - local.get $7 - f64.sub - local.tee $9 - local.get $14 - local.get $8 - f64.sub - local.tee $8 - local.get $15 - local.get $4 - f64.sub - local.tee $7 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $assembly/imports/Maths.hypot - f64.div - local.set $4 - local.get $11 - local.get $7 - local.get $4 - f64.mul - local.tee $7 - f64.mul - local.get $6 - local.get $8 - local.get $4 - f64.mul - local.tee $8 - f64.mul - f64.sub - local.tee $12 - local.get $6 - local.get $9 - local.get $4 - f64.mul + block $__inlined_func$assembly/maths/Maths.hypot3 (result f64) + f64.const 0 + local.get $13 + local.get $6 + f64.sub + local.tee $11 + f64.abs + local.tee $9 + local.get $14 + local.get $10 + f64.sub + local.tee $10 + f64.abs + local.tee $7 + local.get $15 + local.get $8 + f64.sub + local.tee $8 + f64.abs + local.tee $16 + f64.max + f64.max + local.tee $6 + f64.const 0 + f64.eq + br_if $__inlined_func$assembly/maths/Maths.hypot3 + drop + local.get $6 + local.get $9 + f64.const 1 + local.get $6 + f64.div + local.tee $6 + f64.mul + local.tee $9 + local.get $9 + f64.mul + local.get $7 + local.get $6 + f64.mul + local.tee $9 + local.get $9 + f64.mul + f64.add + local.get $16 + local.get $6 + f64.mul + local.tee $6 + local.get $6 + f64.mul + f64.add + f64.sqrt + f64.mul + end + local.set $6 + block $__inlined_func$assembly/maths/Maths.hypot30 (result f64) + f64.const 0 + local.get $5 + local.get $8 + f64.const 1 + local.get $6 + f64.div + local.tee $8 + f64.mul + local.tee $6 + f64.mul + local.get $12 + local.get $10 + local.get $8 + f64.mul + local.tee $10 + f64.mul + f64.sub + local.tee $9 + f64.abs + local.tee $7 + local.get $12 + local.get $11 + local.get $8 + f64.mul + local.tee $12 + f64.mul + local.get $4 + local.get $6 + f64.mul + f64.sub + local.tee $11 + f64.abs + local.tee $8 + local.get $4 + local.get $10 + f64.mul + local.get $5 + local.get $12 + f64.mul + f64.sub + local.tee $5 + f64.abs + local.tee $16 + f64.max + f64.max + local.tee $4 + f64.const 0 + f64.eq + br_if $__inlined_func$assembly/maths/Maths.hypot30 + drop + local.get $4 + local.get $7 + f64.const 1 + local.get $4 + f64.div + local.tee $4 + f64.mul + local.tee $7 + local.get $7 + f64.mul + local.get $8 + local.get $4 + f64.mul + local.tee $8 + local.get $8 + f64.mul + f64.add + local.get $16 + local.get $4 + f64.mul + local.tee $4 + local.get $4 + f64.mul + f64.add + f64.sqrt + f64.mul + end local.tee $4 - f64.mul - local.get $5 - local.get $7 - f64.mul - f64.sub - local.tee $9 - local.get $5 - local.get $8 - f64.mul - local.get $11 - local.get $4 - f64.mul - f64.sub - local.tee $10 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $assembly/imports/Maths.hypot - local.tee $5 i64.reinterpret_f64 i64.const 1 i64.shl @@ -13217,66 +13835,94 @@ i64.gt_u if (result f64) f64.const 0 - local.set $5 + local.set $8 f64.const 0 local.set $11 f64.const 0 else - local.get $12 + local.get $9 f64.const 1 - local.get $5 + local.get $4 f64.div - local.tee $6 + local.tee $4 f64.mul - local.set $5 - local.get $9 - local.get $6 + local.set $8 + local.get $11 + local.get $4 f64.mul local.set $11 + local.get $5 + local.get $4 + f64.mul + end + local.set $4 + block $__inlined_func$assembly/maths/Maths.hypot31 (result f64) + f64.const 0 local.get $10 + local.get $4 + f64.mul + local.get $6 + local.get $11 + f64.mul + f64.sub + local.tee $9 + f64.abs + local.tee $7 local.get $6 + local.get $8 + f64.mul + local.get $12 + local.get $4 + f64.mul + f64.sub + local.tee $16 + f64.abs + local.tee $17 + local.get $12 + local.get $11 + f64.mul + local.get $10 + local.get $8 + f64.mul + f64.sub + local.tee $18 + f64.abs + local.tee $19 + f64.max + f64.max + local.tee $5 + f64.const 0 + f64.eq + br_if $__inlined_func$assembly/maths/Maths.hypot31 + drop + local.get $5 + local.get $7 + f64.const 1 + local.get $5 + f64.div + local.tee $5 + f64.mul + local.tee $7 + local.get $7 + f64.mul + local.get $17 + local.get $5 + f64.mul + local.tee $7 + local.get $7 + f64.mul + f64.add + local.get $19 + local.get $5 + f64.mul + local.tee $5 + local.get $5 + f64.mul + f64.add + f64.sqrt f64.mul end - local.set $6 - local.get $8 - local.get $6 - f64.mul - local.get $7 - local.get $11 - f64.mul - f64.sub - local.tee $9 - local.get $7 - local.get $5 - f64.mul - local.get $4 - local.get $6 - f64.mul - f64.sub - local.tee $12 - local.get $4 - local.get $11 - f64.mul - local.get $8 - local.get $5 - f64.mul - f64.sub - local.tee $16 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $assembly/imports/Maths.hypot - local.tee $10 + local.tee $5 i64.reinterpret_f64 i64.const 1 i64.shl @@ -13286,38 +13932,38 @@ i64.gt_u if (result f64) f64.const 0 - local.set $9 + local.set $5 f64.const 0 - local.set $12 + local.set $9 f64.const 0 else local.get $9 f64.const 1 - local.get $10 + local.get $5 f64.div - local.tee $10 - f64.mul - local.set $9 - local.get $12 - local.get $10 + local.tee $7 f64.mul - local.set $12 + local.set $5 local.get $16 - local.get $10 + local.get $7 + f64.mul + local.set $9 + local.get $18 + local.get $7 f64.mul end - local.set $10 + local.set $7 local.get $0 i32.const 0 - local.get $5 + local.get $8 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 - local.get $9 + local.get $5 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 - local.get $4 + local.get $12 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 3 @@ -13329,11 +13975,11 @@ call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 5 - local.get $12 + local.get $9 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 6 - local.get $8 + local.get $10 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 7 @@ -13341,15 +13987,15 @@ call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 8 - local.get $6 + local.get $4 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 9 - local.get $10 + local.get $7 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 10 - local.get $7 + local.get $6 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 11 @@ -13357,14 +14003,14 @@ call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 12 - local.get $5 + local.get $8 local.get $13 f64.mul local.get $11 local.get $14 f64.mul f64.add - local.get $6 + local.get $4 local.get $15 f64.mul f64.add @@ -13372,14 +14018,14 @@ call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 13 - local.get $9 + local.get $5 local.get $13 f64.mul - local.get $12 + local.get $9 local.get $14 f64.mul f64.add - local.get $10 + local.get $7 local.get $15 f64.mul f64.add @@ -13387,14 +14033,14 @@ call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 14 - local.get $4 + local.get $12 local.get $13 f64.mul - local.get $8 + local.get $10 local.get $14 f64.mul f64.add - local.get $7 + local.get $6 local.get $15 f64.mul f64.add @@ -14381,7 +15027,7 @@ i32.wrap_i64 i32.const 3 i32.shl - i32.const 5568 + i32.const 5600 i32.add local.tee $11 i64.load offset=8 @@ -14956,7 +15602,7 @@ i32.const 4 i32.shl local.tee $7 - i32.const 9664 + i32.const 9696 i32.add local.set $4 local.get $1 @@ -14972,7 +15618,7 @@ f64.load offset=8 f64.sub local.get $7 - i32.const 7616 + i32.const 7648 i32.add local.tee $4 f64.load @@ -15511,34 +16157,62 @@ call $assembly/quat2/copy return end - local.get $2 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.get $2 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $assembly/imports/Maths.hypot + block $__inlined_func$assembly/maths/Maths.hypot3 (result f64) + f64.const 0 + local.get $2 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.abs + local.tee $5 + local.get $2 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.abs + local.tee $6 + local.get $2 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.abs + local.tee $7 + f64.max + f64.max + local.tee $4 + f64.const 0 + f64.eq + br_if $__inlined_func$assembly/maths/Maths.hypot3 + drop + local.get $4 + local.get $5 + f64.const 1 + local.get $4 + f64.div + local.tee $4 + f64.mul + local.tee $5 + local.get $5 + f64.mul + local.get $6 + local.get $4 + f64.mul + local.tee $5 + local.get $5 + f64.mul + f64.add + local.get $7 + local.get $4 + f64.mul + local.tee $4 + local.get $4 + f64.mul + f64.add + f64.sqrt + f64.mul + end local.set $4 local.get $3 f64.const 0.5 f64.mul - local.tee $5 + local.tee $7 call $~lib/math/NativeMath.sin local.tee $6 local.get $2 @@ -15555,7 +16229,7 @@ f64.mul local.get $4 f64.div - local.set $9 + local.set $5 local.get $6 local.get $2 i32.const 2 @@ -15564,24 +16238,24 @@ local.get $4 f64.div local.set $4 - local.get $5 + local.get $7 call $~lib/math/NativeMath.cos local.set $6 local.get $1 i32.const 0 call $~lib/typedarray/Float64Array#__get - local.set $5 + local.set $7 local.get $1 i32.const 1 call $~lib/typedarray/Float64Array#__get - local.set $7 + local.set $8 local.get $1 i32.const 2 call $~lib/typedarray/Float64Array#__get - local.set $8 + local.set $9 local.get $0 i32.const 0 - local.get $5 + local.get $7 local.get $6 f64.mul local.get $1 @@ -15591,47 +16265,47 @@ local.get $3 f64.mul f64.add - local.get $7 + local.get $8 local.get $4 f64.mul f64.add - local.get $8 local.get $9 + local.get $5 f64.mul f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 - local.get $7 + local.get $8 local.get $6 f64.mul local.get $10 - local.get $9 + local.get $5 f64.mul f64.add - local.get $8 + local.get $9 local.get $3 f64.mul f64.add - local.get $5 + local.get $7 local.get $4 f64.mul f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 - local.get $8 + local.get $9 local.get $6 f64.mul local.get $10 local.get $4 f64.mul f64.add + local.get $7 local.get $5 - local.get $9 f64.mul f64.add - local.get $7 + local.get $8 local.get $3 f64.mul f64.sub @@ -15641,15 +16315,15 @@ local.get $10 local.get $6 f64.mul - local.get $5 + local.get $7 local.get $3 f64.mul f64.sub - local.get $7 - local.get $9 + local.get $8 + local.get $5 f64.mul f64.sub - local.get $8 + local.get $9 local.get $4 f64.mul f64.sub @@ -15657,18 +16331,18 @@ local.get $1 i32.const 4 call $~lib/typedarray/Float64Array#__get - local.set $5 + local.set $7 local.get $1 i32.const 5 call $~lib/typedarray/Float64Array#__get - local.set $7 + local.set $8 local.get $1 i32.const 6 call $~lib/typedarray/Float64Array#__get - local.set $8 + local.set $9 local.get $0 i32.const 4 - local.get $5 + local.get $7 local.get $6 f64.mul local.get $1 @@ -15678,47 +16352,47 @@ local.get $3 f64.mul f64.add - local.get $7 + local.get $8 local.get $4 f64.mul f64.add - local.get $8 local.get $9 + local.get $5 f64.mul f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 5 - local.get $7 + local.get $8 local.get $6 f64.mul local.get $10 - local.get $9 + local.get $5 f64.mul f64.add - local.get $8 + local.get $9 local.get $3 f64.mul f64.add - local.get $5 + local.get $7 local.get $4 f64.mul f64.sub call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 6 - local.get $8 + local.get $9 local.get $6 f64.mul local.get $10 local.get $4 f64.mul f64.add + local.get $7 local.get $5 - local.get $9 f64.mul f64.add - local.get $7 + local.get $8 local.get $3 f64.mul f64.sub @@ -15728,15 +16402,15 @@ local.get $10 local.get $6 f64.mul - local.get $5 + local.get $7 local.get $3 f64.mul f64.sub - local.get $7 - local.get $9 + local.get $8 + local.get $5 f64.mul f64.sub - local.get $8 + local.get $9 local.get $4 f64.mul f64.sub @@ -15762,7 +16436,7 @@ i32.lt_s if i32.const 1120 - i32.const 12192 + i32.const 12224 i32.const 108 i32.const 22 call $~lib/builtins/abort @@ -15784,8 +16458,8 @@ i32.const 134217727 i32.gt_u if - i32.const 1536 - i32.const 12192 + i32.const 1568 + i32.const 12224 i32.const 14 i32.const 48 call $~lib/builtins/abort @@ -15880,7 +16554,7 @@ i32.ge_u if i32.const 1120 - i32.const 12192 + i32.const 12224 i32.const 92 i32.const 42 call $~lib/builtins/abort @@ -15912,7 +16586,7 @@ i32.const 8 i32.sub i32.load - br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $folding-inner2 $folding-inner0 $folding-inner2 $folding-inner0 $folding-inner0 $folding-inner0 $assembly/imports/IArguments $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $~lib/object/Object $~lib/array/Array<~lib/typedarray/Float64Array> $folding-inner1 $assembly/mat4/Fov $folding-inner1 $invalid + br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $folding-inner2 $folding-inner0 $folding-inner2 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $assembly/imports/IArguments $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $~lib/object/Object $~lib/array/Array<~lib/typedarray/Float64Array> $folding-inner1 $assembly/mat4/Fov $folding-inner1 $invalid end return end @@ -15985,19 +16659,11 @@ memory.size i32.const 16 i32.shl - i32.const 29036 + i32.const 29076 i32.sub i32.const 1 i32.shr_u global.set $~lib/rt/itcms/threshold - i32.const 1764 - i32.const 1760 - i32.store - i32.const 1768 - i32.const 1760 - i32.store - i32.const 1760 - global.set $~lib/rt/itcms/pinSpace i32.const 1796 i32.const 1792 i32.store @@ -16005,20 +16671,28 @@ i32.const 1792 i32.store i32.const 1792 + global.set $~lib/rt/itcms/pinSpace + i32.const 1828 + i32.const 1824 + i32.store + i32.const 1832 + i32.const 1824 + i32.store + i32.const 1824 global.set $~lib/rt/itcms/toSpace - i32.const 1876 - i32.const 1872 + i32.const 1908 + i32.const 1904 i32.store - i32.const 1880 - i32.const 1872 + i32.const 1912 + i32.const 1904 i32.store - i32.const 1872 + i32.const 1904 global.set $~lib/rt/itcms/fromSpace call $assembly/vec3/create global.set $assembly/vec3/vec i32.const 0 global.set $~argumentsLength - i32.const 2016 + i32.const 2048 i32.load call_indirect $0 (type $none_=>_i32) global.set $assembly/vec3/forEach @@ -16026,7 +16700,7 @@ global.set $assembly/vec4/vec i32.const 0 global.set $~argumentsLength - i32.const 2304 + i32.const 2336 i32.load call_indirect $0 (type $none_=>_i32) global.set $assembly/vec4/forEach @@ -16044,7 +16718,7 @@ global.set $assembly/quat/yUnitVec3 i32.const 0 global.set $~argumentsLength - i32.const 2928 + i32.const 2960 i32.load call_indirect $0 (type $none_=>_i32) global.set $assembly/quat/rotationTo @@ -16054,7 +16728,7 @@ global.set $assembly/quat/temp2 i32.const 0 global.set $~argumentsLength - i32.const 2992 + i32.const 3024 i32.load call_indirect $0 (type $none_=>_i32) global.set $assembly/quat/sqlerp @@ -16062,7 +16736,7 @@ global.set $assembly/quat/matr i32.const 0 global.set $~argumentsLength - i32.const 3056 + i32.const 3088 i32.load call_indirect $0 (type $none_=>_i32) global.set $assembly/quat/setAxes @@ -16070,7 +16744,7 @@ global.set $assembly/vec2/vec i32.const 0 global.set $~argumentsLength - i32.const 3600 + i32.const 3632 i32.load call_indirect $0 (type $none_=>_i32) global.set $assembly/vec2/forEach @@ -16085,11 +16759,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -16243,11 +16917,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -16421,11 +17095,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -16462,7 +17136,7 @@ i32.const 1 global.set $~argumentsLength local.get $2 - i32.const 1472 + i32.const 1504 i32.load call_indirect $0 (type $i32_=>_f64) f64.const 1e-06 @@ -16575,7 +17249,7 @@ global.set $~argumentsLength local.get $0 local.get $0 - i32.const 2624 + i32.const 2656 i32.load call_indirect $0 (type $i32_i32_=>_i32) local.set $0 @@ -16594,11 +17268,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -16665,11 +17339,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -16790,7 +17464,7 @@ global.set $~argumentsLength local.get $0 local.get $1 - i32.const 2624 + i32.const 2656 i32.load call_indirect $0 (type $i32_i32_=>_i32) global.get $~lib/memory/__stack_pointer @@ -16807,11 +17481,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -16939,11 +17613,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -16987,7 +17661,7 @@ i64.const 0 i64.store offset=88 local.get $1 - i32.const 5488 + i32.const 5520 i32.store offset=88 local.get $0 i32.const 0 @@ -16997,7 +17671,7 @@ global.get $~lib/memory/__stack_pointer local.get $1 i32.store offset=92 - i32.const 5488 + i32.const 5520 local.get $1 call $~lib/string/String.__concat local.set $1 @@ -17006,10 +17680,10 @@ local.get $1 i32.store offset=80 local.get $2 - i32.const 5424 + i32.const 5456 i32.store offset=84 local.get $1 - i32.const 5424 + i32.const 5456 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -17032,10 +17706,10 @@ local.get $1 i32.store offset=64 local.get $2 - i32.const 5424 + i32.const 5456 i32.store offset=68 local.get $1 - i32.const 5424 + i32.const 5456 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -17058,10 +17732,10 @@ local.get $1 i32.store offset=48 local.get $2 - i32.const 5424 + i32.const 5456 i32.store offset=52 local.get $1 - i32.const 5424 + i32.const 5456 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -17084,10 +17758,10 @@ local.get $1 i32.store offset=32 local.get $2 - i32.const 5424 + i32.const 5456 i32.store offset=36 local.get $1 - i32.const 5424 + i32.const 5456 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -17110,10 +17784,10 @@ local.get $1 i32.store offset=16 local.get $2 - i32.const 5424 + i32.const 5456 i32.store offset=20 local.get $1 - i32.const 5424 + i32.const 5456 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -17136,10 +17810,10 @@ local.get $0 i32.store local.get $1 - i32.const 5456 + i32.const 5488 i32.store offset=4 local.get $0 - i32.const 5456 + i32.const 5488 call $~lib/string/String.__concat global.get $~lib/memory/__stack_pointer i32.const 96 @@ -17154,11 +17828,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -17220,7 +17894,7 @@ i64.const 0 i64.store offset=136 local.get $1 - i32.const 5520 + i32.const 5552 i32.store offset=136 local.get $0 i32.const 0 @@ -17230,7 +17904,7 @@ global.get $~lib/memory/__stack_pointer local.get $1 i32.store offset=140 - i32.const 5520 + i32.const 5552 local.get $1 call $~lib/string/String.__concat local.set $1 @@ -17239,10 +17913,10 @@ local.get $1 i32.store offset=128 local.get $2 - i32.const 5424 + i32.const 5456 i32.store offset=132 local.get $1 - i32.const 5424 + i32.const 5456 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -17265,10 +17939,10 @@ local.get $1 i32.store offset=112 local.get $2 - i32.const 5424 + i32.const 5456 i32.store offset=116 local.get $1 - i32.const 5424 + i32.const 5456 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -17291,10 +17965,10 @@ local.get $1 i32.store offset=96 local.get $2 - i32.const 5424 + i32.const 5456 i32.store offset=100 local.get $1 - i32.const 5424 + i32.const 5456 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -17317,10 +17991,10 @@ local.get $1 i32.store offset=80 local.get $2 - i32.const 5424 + i32.const 5456 i32.store offset=84 local.get $1 - i32.const 5424 + i32.const 5456 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -17343,10 +18017,10 @@ local.get $1 i32.store offset=64 local.get $2 - i32.const 5424 + i32.const 5456 i32.store offset=68 local.get $1 - i32.const 5424 + i32.const 5456 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -17369,10 +18043,10 @@ local.get $1 i32.store offset=48 local.get $2 - i32.const 5424 + i32.const 5456 i32.store offset=52 local.get $1 - i32.const 5424 + i32.const 5456 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -17395,10 +18069,10 @@ local.get $1 i32.store offset=32 local.get $2 - i32.const 5424 + i32.const 5456 i32.store offset=36 local.get $1 - i32.const 5424 + i32.const 5456 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -17421,10 +18095,10 @@ local.get $1 i32.store offset=16 local.get $2 - i32.const 5424 + i32.const 5456 i32.store offset=20 local.get $1 - i32.const 5424 + i32.const 5456 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -17447,10 +18121,10 @@ local.get $0 i32.store local.get $1 - i32.const 5456 + i32.const 5488 i32.store offset=4 local.get $0 - i32.const 5456 + i32.const 5488 call $~lib/string/String.__concat global.get $~lib/memory/__stack_pointer i32.const 144 @@ -17465,11 +18139,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -17573,7 +18247,7 @@ i64.const 0 i64.store offset=248 local.get $1 - i32.const 5552 + i32.const 5584 i32.store offset=248 local.get $0 i32.const 0 @@ -17583,7 +18257,7 @@ global.get $~lib/memory/__stack_pointer local.get $1 i32.store offset=252 - i32.const 5552 + i32.const 5584 local.get $1 call $~lib/string/String.__concat local.set $1 @@ -17592,10 +18266,10 @@ local.get $1 i32.store offset=240 local.get $2 - i32.const 5424 + i32.const 5456 i32.store offset=244 local.get $1 - i32.const 5424 + i32.const 5456 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -17618,10 +18292,10 @@ local.get $1 i32.store offset=224 local.get $2 - i32.const 5424 + i32.const 5456 i32.store offset=228 local.get $1 - i32.const 5424 + i32.const 5456 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -17644,10 +18318,10 @@ local.get $1 i32.store offset=208 local.get $2 - i32.const 5424 + i32.const 5456 i32.store offset=212 local.get $1 - i32.const 5424 + i32.const 5456 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -17670,10 +18344,10 @@ local.get $1 i32.store offset=192 local.get $2 - i32.const 5424 + i32.const 5456 i32.store offset=196 local.get $1 - i32.const 5424 + i32.const 5456 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -17696,10 +18370,10 @@ local.get $1 i32.store offset=176 local.get $2 - i32.const 5424 + i32.const 5456 i32.store offset=180 local.get $1 - i32.const 5424 + i32.const 5456 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -17722,10 +18396,10 @@ local.get $1 i32.store offset=160 local.get $2 - i32.const 5424 + i32.const 5456 i32.store offset=164 local.get $1 - i32.const 5424 + i32.const 5456 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -17748,10 +18422,10 @@ local.get $1 i32.store offset=144 local.get $2 - i32.const 5424 + i32.const 5456 i32.store offset=148 local.get $1 - i32.const 5424 + i32.const 5456 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -17774,10 +18448,10 @@ local.get $1 i32.store offset=128 local.get $2 - i32.const 5424 + i32.const 5456 i32.store offset=132 local.get $1 - i32.const 5424 + i32.const 5456 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -17800,10 +18474,10 @@ local.get $1 i32.store offset=112 local.get $2 - i32.const 5424 + i32.const 5456 i32.store offset=116 local.get $1 - i32.const 5424 + i32.const 5456 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -17826,10 +18500,10 @@ local.get $1 i32.store offset=96 local.get $2 - i32.const 5424 + i32.const 5456 i32.store offset=100 local.get $1 - i32.const 5424 + i32.const 5456 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -17852,10 +18526,10 @@ local.get $1 i32.store offset=80 local.get $2 - i32.const 5424 + i32.const 5456 i32.store offset=84 local.get $1 - i32.const 5424 + i32.const 5456 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -17878,10 +18552,10 @@ local.get $1 i32.store offset=64 local.get $2 - i32.const 5424 + i32.const 5456 i32.store offset=68 local.get $1 - i32.const 5424 + i32.const 5456 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -17904,10 +18578,10 @@ local.get $1 i32.store offset=48 local.get $2 - i32.const 5424 + i32.const 5456 i32.store offset=52 local.get $1 - i32.const 5424 + i32.const 5456 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -17930,10 +18604,10 @@ local.get $1 i32.store offset=32 local.get $2 - i32.const 5424 + i32.const 5456 i32.store offset=36 local.get $1 - i32.const 5424 + i32.const 5456 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -17956,10 +18630,10 @@ local.get $1 i32.store offset=16 local.get $2 - i32.const 5424 + i32.const 5456 i32.store offset=20 local.get $1 - i32.const 5424 + i32.const 5456 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -17982,10 +18656,10 @@ local.get $0 i32.store local.get $1 - i32.const 5456 + i32.const 5488 i32.store offset=4 local.get $0 - i32.const 5456 + i32.const 5488 call $~lib/string/String.__concat global.get $~lib/memory/__stack_pointer i32.const 256 @@ -18003,11 +18677,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -18044,7 +18718,7 @@ call $~lib/math/NativeMath.cos local.set $2 local.get $4 - i32.const 11744 + i32.const 11776 i32.eq if local.get $0 @@ -18101,7 +18775,7 @@ call $~lib/typedarray/Float64Array#__set else local.get $4 - i32.const 11776 + i32.const 11808 i32.eq if local.get $0 @@ -18158,7 +18832,7 @@ call $~lib/typedarray/Float64Array#__set else local.get $4 - i32.const 11808 + i32.const 11840 i32.eq if local.get $0 @@ -18215,7 +18889,7 @@ call $~lib/typedarray/Float64Array#__set else local.get $4 - i32.const 11840 + i32.const 11872 i32.eq if local.get $0 @@ -18272,7 +18946,7 @@ call $~lib/typedarray/Float64Array#__set else local.get $4 - i32.const 11872 + i32.const 11904 i32.eq if local.get $0 @@ -18386,12 +19060,12 @@ call $~lib/typedarray/Float64Array#__set else global.get $~lib/memory/__stack_pointer - i32.const 11904 + i32.const 11936 i32.store - i32.const 11904 + i32.const 11936 local.get $4 call $~lib/string/String.__concat - i32.const 11968 + i32.const 12000 i32.const 512 i32.const 10 call $~lib/builtins/abort @@ -18416,11 +19090,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -18476,7 +19150,7 @@ i64.const 0 i64.store offset=120 local.get $1 - i32.const 12064 + i32.const 12096 i32.store offset=120 local.get $0 i32.const 0 @@ -18486,7 +19160,7 @@ global.get $~lib/memory/__stack_pointer local.get $1 i32.store offset=124 - i32.const 12064 + i32.const 12096 local.get $1 call $~lib/string/String.__concat local.set $1 @@ -18495,10 +19169,10 @@ local.get $1 i32.store offset=112 local.get $2 - i32.const 5424 + i32.const 5456 i32.store offset=116 local.get $1 - i32.const 5424 + i32.const 5456 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -18521,10 +19195,10 @@ local.get $1 i32.store offset=96 local.get $2 - i32.const 5424 + i32.const 5456 i32.store offset=100 local.get $1 - i32.const 5424 + i32.const 5456 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -18547,10 +19221,10 @@ local.get $1 i32.store offset=80 local.get $2 - i32.const 5424 + i32.const 5456 i32.store offset=84 local.get $1 - i32.const 5424 + i32.const 5456 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -18573,10 +19247,10 @@ local.get $1 i32.store offset=64 local.get $2 - i32.const 5424 + i32.const 5456 i32.store offset=68 local.get $1 - i32.const 5424 + i32.const 5456 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -18599,10 +19273,10 @@ local.get $1 i32.store offset=48 local.get $2 - i32.const 5424 + i32.const 5456 i32.store offset=52 local.get $1 - i32.const 5424 + i32.const 5456 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -18625,10 +19299,10 @@ local.get $1 i32.store offset=32 local.get $2 - i32.const 5424 + i32.const 5456 i32.store offset=36 local.get $1 - i32.const 5424 + i32.const 5456 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -18651,10 +19325,10 @@ local.get $1 i32.store offset=16 local.get $2 - i32.const 5424 + i32.const 5456 i32.store offset=20 local.get $1 - i32.const 5424 + i32.const 5456 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -18677,10 +19351,10 @@ local.get $0 i32.store local.get $1 - i32.const 5456 + i32.const 5488 i32.store offset=4 local.get $0 - i32.const 5456 + i32.const 5488 call $~lib/string/String.__concat global.get $~lib/memory/__stack_pointer i32.const 128 @@ -18697,7 +19371,7 @@ global.set $~lib/memory/__stack_pointer block $folding-inner0 global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -18716,7 +19390,7 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -18749,8 +19423,8 @@ i32.const 134217727 i32.gt_u if - i32.const 1536 - i32.const 1584 + i32.const 1568 + i32.const 1616 i32.const 18 i32.const 57 call $~lib/builtins/abort @@ -18795,8 +19469,8 @@ local.get $1 return end - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -18809,11 +19483,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -18853,11 +19527,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -18901,11 +19575,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -18957,11 +19631,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -19005,11 +19679,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -19049,11 +19723,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -19097,11 +19771,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -19165,11 +19839,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -19205,11 +19879,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -19255,11 +19929,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -19320,11 +19994,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -19376,11 +20050,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -19432,11 +20106,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -19500,11 +20174,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -19596,11 +20270,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -19702,11 +20376,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -19937,11 +20611,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -20232,11 +20906,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -20296,11 +20970,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -20360,11 +21034,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -20474,11 +21148,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -20513,11 +21187,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -20526,8 +21200,8 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.store - i32.const 3696 - i32.const 3760 + i32.const 3728 + i32.const 3792 i32.const 20 i32.const 3 call $~lib/builtins/abort @@ -20539,11 +21213,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -20566,11 +21240,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -20597,11 +21271,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -20638,11 +21312,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -20670,11 +21344,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -20749,11 +21423,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -20844,11 +21518,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -20902,11 +21576,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -20942,11 +21616,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -20983,11 +21657,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -21082,11 +21756,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -21163,11 +21837,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -21211,11 +21885,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -21263,7 +21937,7 @@ global.set $~lib/memory/__stack_pointer block $folding-inner0 global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -21275,7 +21949,7 @@ i32.add global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -21304,7 +21978,7 @@ i64.const 0 i64.store offset=56 local.get $1 - i32.const 3824 + i32.const 3856 i32.store offset=56 local.get $0 i32.const 0 @@ -21314,7 +21988,7 @@ global.get $~lib/memory/__stack_pointer local.get $1 i32.store offset=60 - i32.const 3824 + i32.const 3856 local.get $1 call $~lib/string/String.__concat local.set $1 @@ -21323,10 +21997,10 @@ local.get $1 i32.store offset=48 local.get $2 - i32.const 5424 + i32.const 5456 i32.store offset=52 local.get $1 - i32.const 5424 + i32.const 5456 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -21349,10 +22023,10 @@ local.get $1 i32.store offset=32 local.get $2 - i32.const 5424 + i32.const 5456 i32.store offset=36 local.get $1 - i32.const 5424 + i32.const 5456 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -21375,10 +22049,10 @@ local.get $1 i32.store offset=16 local.get $2 - i32.const 5424 + i32.const 5456 i32.store offset=20 local.get $1 - i32.const 5424 + i32.const 5456 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -21401,10 +22075,10 @@ local.get $0 i32.store local.get $1 - i32.const 5456 + i32.const 5488 i32.store offset=4 local.get $0 - i32.const 5456 + i32.const 5488 call $~lib/string/String.__concat global.get $~lib/memory/__stack_pointer i32.const -64 @@ -21416,8 +22090,8 @@ global.set $~lib/memory/__stack_pointer return end - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -21425,16 +22099,20 @@ ) (func $export:assembly/mat2/frob (param $0 i32) (result f64) (local $1 f64) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -21443,31 +22121,70 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.store - local.get $0 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.get $0 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.get $0 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.get $0 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $assembly/imports/Maths.hypot + block $__inlined_func$assembly/maths/Maths.hypot4 (result f64) + f64.const 0 + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.abs + local.tee $2 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.abs + local.tee $3 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.abs + local.tee $4 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.abs + local.tee $5 + f64.max + f64.max + f64.max + local.tee $1 + f64.const 0 + f64.eq + br_if $__inlined_func$assembly/maths/Maths.hypot4 + drop + local.get $1 + local.get $2 + f64.const 1 + local.get $1 + f64.div + local.tee $1 + f64.mul + local.tee $2 + local.get $2 + f64.mul + local.get $3 + local.get $1 + f64.mul + local.tee $2 + local.get $2 + f64.mul + f64.add + local.get $4 + local.get $1 + f64.mul + local.tee $2 + local.get $2 + f64.mul + f64.add + local.get $5 + local.get $1 + f64.mul + local.tee $1 + local.get $1 + f64.mul + f64.add + f64.sqrt + f64.mul + end global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -21481,7 +22198,7 @@ global.set $~lib/memory/__stack_pointer block $folding-inner0 global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -21502,7 +22219,7 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -21547,7 +22264,7 @@ global.get $~lib/memory/__stack_pointer i32.const 3 i32.const 2 - i32.const 25 + i32.const 26 i32.const 0 call $~lib/rt/__newArray local.tee $3 @@ -21579,8 +22296,8 @@ local.get $3 return end - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -21593,11 +22310,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -21629,11 +22346,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -21665,11 +22382,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -21705,11 +22422,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -21834,11 +22551,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -21867,11 +22584,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -21949,7 +22666,7 @@ global.set $~lib/memory/__stack_pointer block $folding-inner0 global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -21961,7 +22678,7 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -22020,8 +22737,8 @@ local.get $1 return end - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -22034,11 +22751,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -22099,11 +22816,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -22148,11 +22865,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -22205,11 +22922,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -22334,11 +23051,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -22374,11 +23091,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -22417,11 +23134,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -22534,11 +23251,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -22639,11 +23356,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -22744,11 +23461,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -22800,11 +23517,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -22858,11 +23575,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -22915,11 +23632,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -22937,16 +23654,22 @@ ) (func $export:assembly/mat2d/frob (param $0 i32) (result f64) (local $1 f64) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -22955,35 +23678,102 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.store - local.get $0 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.get $0 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.get $0 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.get $0 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.get $0 - i32.const 4 - call $~lib/typedarray/Float64Array#__get - local.get $0 - i32.const 5 - call $~lib/typedarray/Float64Array#__get - f64.const 1 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $assembly/imports/Maths.hypot + block $__inlined_func$assembly/maths/Maths.hypot7 (result f64) + f64.const 0 + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.abs + local.tee $1 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.abs + local.tee $3 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.abs + local.tee $4 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.abs + local.tee $5 + f64.max + f64.max + local.get $0 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + f64.abs + local.tee $6 + local.get $0 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + f64.abs + local.tee $7 + f64.const 1 + f64.max + f64.max + f64.max + f64.max + local.tee $2 + f64.const 0 + f64.eq + br_if $__inlined_func$assembly/maths/Maths.hypot7 + drop + local.get $2 + local.get $1 + f64.const 1 + local.get $2 + f64.div + local.tee $2 + f64.mul + local.tee $1 + local.get $1 + f64.mul + local.get $3 + local.get $2 + f64.mul + local.tee $1 + local.get $1 + f64.mul + f64.add + local.get $4 + local.get $2 + f64.mul + local.tee $1 + local.get $1 + f64.mul + f64.add + local.get $5 + local.get $2 + f64.mul + local.tee $1 + local.get $1 + f64.mul + f64.add + local.get $6 + local.get $2 + f64.mul + local.tee $1 + local.get $1 + f64.mul + f64.add + local.get $7 + local.get $2 + f64.mul + local.tee $1 + local.get $1 + f64.mul + f64.add + local.get $2 + local.get $2 + f64.mul + f64.add + f64.sqrt + f64.mul + end global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -22996,11 +23786,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -23089,11 +23879,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -23125,11 +23915,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -23203,11 +23993,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -23308,11 +24098,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -23411,11 +24201,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -23592,11 +24382,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -23677,7 +24467,7 @@ global.set $~lib/memory/__stack_pointer block $folding-inner0 global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -23689,7 +24479,7 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -23766,8 +24556,8 @@ local.get $1 return end - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -23780,11 +24570,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -23863,11 +24653,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -23924,11 +24714,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -23989,11 +24779,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -24134,11 +24924,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -24352,11 +25142,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -24515,11 +25305,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -24604,11 +25394,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -24651,11 +25441,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -24798,11 +25588,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -24943,11 +25733,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -25050,11 +25840,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -25120,11 +25910,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -25188,11 +25978,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -25258,11 +26048,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -25347,11 +26137,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -25487,11 +26277,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -25518,11 +26308,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -25583,11 +26373,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -25605,16 +26395,25 @@ ) (func $export:assembly/mat3/frob (param $0 i32) (result f64) (local $1 f64) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -25623,41 +26422,135 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.store - local.get $0 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.get $0 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.get $0 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.get $0 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.get $0 - i32.const 4 - call $~lib/typedarray/Float64Array#__get - local.get $0 - i32.const 5 - call $~lib/typedarray/Float64Array#__get - local.get $0 - i32.const 6 - call $~lib/typedarray/Float64Array#__get - local.get $0 - i32.const 7 - call $~lib/typedarray/Float64Array#__get - local.get $0 - i32.const 8 - call $~lib/typedarray/Float64Array#__get - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $assembly/imports/Maths.hypot + block $__inlined_func$assembly/maths/Maths.hypot9 (result f64) + f64.const 0 + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.abs + local.tee $1 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.abs + local.tee $3 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.abs + local.tee $4 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.abs + local.tee $5 + f64.max + f64.max + local.get $0 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + f64.abs + local.tee $6 + local.get $0 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + f64.abs + local.tee $7 + local.get $0 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + f64.abs + local.tee $8 + f64.max + f64.max + f64.max + f64.max + local.get $0 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + f64.abs + local.tee $9 + local.get $0 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + f64.abs + local.tee $10 + f64.max + f64.max + local.tee $2 + f64.const 0 + f64.eq + br_if $__inlined_func$assembly/maths/Maths.hypot9 + drop + local.get $2 + local.get $1 + f64.const 1 + local.get $2 + f64.div + local.tee $2 + f64.mul + local.tee $1 + local.get $1 + f64.mul + local.get $3 + local.get $2 + f64.mul + local.tee $1 + local.get $1 + f64.mul + f64.add + local.get $4 + local.get $2 + f64.mul + local.tee $1 + local.get $1 + f64.mul + f64.add + local.get $5 + local.get $2 + f64.mul + local.tee $1 + local.get $1 + f64.mul + f64.add + local.get $6 + local.get $2 + f64.mul + local.tee $1 + local.get $1 + f64.mul + f64.add + local.get $7 + local.get $2 + f64.mul + local.tee $1 + local.get $1 + f64.mul + f64.add + local.get $8 + local.get $2 + f64.mul + local.tee $1 + local.get $1 + f64.mul + f64.add + local.get $9 + local.get $2 + f64.mul + local.tee $1 + local.get $1 + f64.mul + f64.add + local.get $10 + local.get $2 + f64.mul + local.tee $2 + local.get $2 + f64.mul + f64.add + f64.sqrt + f64.mul + end global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -25670,11 +26563,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -25793,11 +26686,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -25829,11 +26722,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -25931,11 +26824,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -26072,11 +26965,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -26196,11 +27089,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -26229,11 +27122,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -26257,11 +27150,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -26287,11 +27180,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -26315,11 +27208,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -26345,11 +27238,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -26373,11 +27266,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -26403,11 +27296,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -26431,11 +27324,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -26461,7 +27354,7 @@ global.set $~lib/memory/__stack_pointer block $folding-inner0 global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -26473,7 +27366,7 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -26484,7 +27377,7 @@ if global.get $~lib/memory/__stack_pointer i32.const 32 - i32.const 27 + i32.const 28 call $~lib/rt/itcms/__new local.tee $0 i32.store @@ -26512,8 +27405,8 @@ local.get $0 return end - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -26527,7 +27420,7 @@ global.set $~lib/memory/__stack_pointer block $folding-inner0 global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -26539,7 +27432,7 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -26658,8 +27551,8 @@ local.get $1 return end - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -26672,11 +27565,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -26797,11 +27690,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -26886,11 +27779,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -26919,11 +27812,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -27135,11 +28028,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -27167,11 +28060,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -27215,11 +28108,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -27396,11 +28289,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -27432,11 +28325,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -27471,11 +28364,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -27636,11 +28529,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -27682,11 +28575,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -27892,11 +28785,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -28102,11 +28995,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -28303,11 +29196,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -28403,11 +29296,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -28497,224 +29390,37 @@ local.get $0 ) (func $export:assembly/mat4/fromRotation (param $0 i32) (param $1 f64) (param $2 i32) (result i32) - (local $3 f64) - (local $4 f64) - (local $5 f64) - (local $6 f64) - (local $7 f64) - (local $8 f64) - (local $9 i32) - (local $10 f64) + (local $3 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort unreachable end global.get $~lib/memory/__stack_pointer - local.tee $9 + local.tee $3 local.get $0 i32.store - local.get $9 + local.get $3 local.get $2 i32.store offset=4 - block $__inlined_func$assembly/mat4/fromRotation - local.get $2 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.tee $4 - local.get $2 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.tee $5 - local.get $2 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.tee $7 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $assembly/imports/Maths.hypot - local.tee $3 - f64.const 1e-06 - f64.lt - if - i32.const 0 - local.set $0 - br $__inlined_func$assembly/mat4/fromRotation - end - local.get $1 - call $~lib/math/NativeMath.sin - local.set $6 - local.get $0 - i32.const 0 - local.get $4 - f64.const 1 - local.get $3 - f64.div - local.tee $3 - f64.mul - local.tee $4 - local.get $4 - f64.mul - f64.const 1 - local.get $1 - call $~lib/math/NativeMath.cos - local.tee $8 - f64.sub - local.tee $1 - f64.mul - local.get $8 - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - local.get $5 - local.get $3 - f64.mul - local.tee $5 - local.get $4 - f64.mul - local.get $1 - f64.mul - local.get $7 - local.get $3 - f64.mul - local.tee $3 - local.get $6 - f64.mul - local.tee $7 - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - local.get $3 - local.get $4 - f64.mul - local.get $1 - f64.mul - local.get $5 - local.get $6 - f64.mul - local.tee $10 - f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 4 - local.get $4 - local.get $5 - f64.mul - local.get $1 - f64.mul - local.get $7 - f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 5 - local.get $5 - local.get $5 - f64.mul - local.get $1 - f64.mul - local.get $8 - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 6 - local.get $3 - local.get $5 - f64.mul - local.get $1 - f64.mul - local.get $4 - local.get $6 - f64.mul - local.tee $6 - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 7 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 8 - local.get $4 - local.get $3 - f64.mul - local.get $1 - f64.mul - local.get $10 - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 9 - local.get $5 - local.get $3 - f64.mul - local.get $1 - f64.mul - local.get $6 - f64.sub - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 10 - local.get $3 - local.get $3 - f64.mul - local.get $1 - f64.mul - local.get $8 - f64.add - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 11 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 12 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 13 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 14 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 15 - f64.const 1 - call $~lib/typedarray/Float64Array#__set - end + local.get $0 + local.get $1 + local.get $2 + call $assembly/mat4/fromRotation global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $0 ) (func $export:assembly/mat4/fromXRotation (param $0 i32) (param $1 f64) (result i32) (local $2 f64) @@ -28723,11 +29429,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -28820,11 +29526,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -28916,11 +29622,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -29012,11 +29718,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -29048,11 +29754,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -29080,11 +29786,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -29112,11 +29818,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -29144,11 +29850,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -29176,11 +29882,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -29229,11 +29935,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -29441,11 +30147,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -29496,11 +30202,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -29665,11 +30371,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -29795,11 +30501,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -29825,11 +30531,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -29955,11 +30661,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -30110,11 +30816,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -30144,11 +30850,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -30263,11 +30969,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -30303,11 +31009,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -30342,11 +31048,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -30364,16 +31070,31 @@ ) (func $export:assembly/mat4/frob (param $0 i32) (result f64) (local $1 f64) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 f64) + (local $16 f64) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -30382,55 +31103,215 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.store - local.get $0 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - local.get $0 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - local.get $0 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - local.get $0 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - local.get $0 - i32.const 4 - call $~lib/typedarray/Float64Array#__get - local.get $0 - i32.const 5 - call $~lib/typedarray/Float64Array#__get - local.get $0 - i32.const 6 - call $~lib/typedarray/Float64Array#__get - local.get $0 - i32.const 7 - call $~lib/typedarray/Float64Array#__get - local.get $0 - i32.const 8 - call $~lib/typedarray/Float64Array#__get - local.get $0 - i32.const 9 - call $~lib/typedarray/Float64Array#__get - local.get $0 - i32.const 10 - call $~lib/typedarray/Float64Array#__get - local.get $0 - i32.const 11 - call $~lib/typedarray/Float64Array#__get - local.get $0 - i32.const 12 - call $~lib/typedarray/Float64Array#__get - local.get $0 - i32.const 13 - call $~lib/typedarray/Float64Array#__get - local.get $0 - i32.const 14 - call $~lib/typedarray/Float64Array#__get - local.get $0 - i32.const 15 - call $~lib/typedarray/Float64Array#__get - call $assembly/imports/Maths.hypot + block $__inlined_func$assembly/maths/Maths.hypot16 (result f64) + f64.const 0 + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.abs + local.tee $2 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.abs + local.tee $4 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.abs + local.tee $5 + local.get $0 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.abs + local.tee $6 + f64.max + f64.max + local.get $0 + i32.const 4 + call $~lib/typedarray/Float64Array#__get + f64.abs + local.tee $7 + local.get $0 + i32.const 5 + call $~lib/typedarray/Float64Array#__get + f64.abs + local.tee $8 + local.get $0 + i32.const 6 + call $~lib/typedarray/Float64Array#__get + f64.abs + local.tee $9 + f64.max + f64.max + f64.max + f64.max + local.get $0 + i32.const 7 + call $~lib/typedarray/Float64Array#__get + f64.abs + local.tee $10 + local.get $0 + i32.const 8 + call $~lib/typedarray/Float64Array#__get + f64.abs + local.tee $3 + local.get $0 + i32.const 9 + call $~lib/typedarray/Float64Array#__get + f64.abs + local.tee $11 + f64.max + f64.max + local.get $0 + i32.const 10 + call $~lib/typedarray/Float64Array#__get + f64.abs + local.tee $12 + local.get $0 + i32.const 11 + call $~lib/typedarray/Float64Array#__get + f64.abs + local.get $0 + i32.const 12 + call $~lib/typedarray/Float64Array#__get + f64.abs + local.tee $13 + f64.max + f64.max + local.get $0 + i32.const 13 + call $~lib/typedarray/Float64Array#__get + f64.abs + local.tee $14 + local.get $0 + i32.const 14 + call $~lib/typedarray/Float64Array#__get + f64.abs + local.tee $15 + local.get $0 + i32.const 15 + call $~lib/typedarray/Float64Array#__get + f64.abs + local.tee $16 + f64.max + f64.max + f64.max + f64.max + f64.max + local.tee $1 + f64.const 0 + f64.eq + br_if $__inlined_func$assembly/maths/Maths.hypot16 + drop + local.get $1 + local.get $2 + f64.const 1 + local.get $1 + f64.div + local.tee $1 + f64.mul + local.tee $2 + local.get $2 + f64.mul + local.get $4 + local.get $1 + f64.mul + local.tee $2 + local.get $2 + f64.mul + f64.add + local.get $5 + local.get $1 + f64.mul + local.tee $2 + local.get $2 + f64.mul + f64.add + local.get $6 + local.get $1 + f64.mul + local.tee $2 + local.get $2 + f64.mul + f64.add + local.get $7 + local.get $1 + f64.mul + local.tee $2 + local.get $2 + f64.mul + f64.add + local.get $8 + local.get $1 + f64.mul + local.tee $2 + local.get $2 + f64.mul + f64.add + local.get $9 + local.get $1 + f64.mul + local.tee $2 + local.get $2 + f64.mul + f64.add + local.get $10 + local.get $1 + f64.mul + local.tee $2 + local.get $2 + f64.mul + f64.add + local.get $3 + local.get $3 + f64.mul + f64.add + local.get $11 + local.get $1 + f64.mul + local.tee $3 + local.get $3 + f64.mul + f64.add + local.get $12 + local.get $1 + f64.mul + local.tee $3 + local.get $3 + f64.mul + f64.add + local.get $13 + local.get $1 + f64.mul + local.tee $3 + local.get $3 + f64.mul + f64.add + local.get $14 + local.get $1 + f64.mul + local.tee $3 + local.get $3 + f64.mul + f64.add + local.get $15 + local.get $1 + f64.mul + local.tee $3 + local.get $3 + f64.mul + f64.add + local.get $16 + local.get $1 + f64.mul + local.tee $1 + local.get $1 + f64.mul + f64.add + f64.sqrt + f64.mul + end global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -30443,11 +31324,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -30636,11 +31517,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -30672,11 +31553,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -30830,11 +31711,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -31055,11 +31936,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -31256,11 +32137,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -31287,11 +32168,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -31329,11 +32210,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -31364,11 +32245,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -31448,11 +32329,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -31469,7 +32350,7 @@ global.set $~argumentsLength local.get $0 local.get $1 - i32.const 2560 + i32.const 2592 i32.load call_indirect $0 (type $i32_i32_=>_f64) local.tee $2 @@ -31492,11 +32373,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -31528,11 +32409,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -31561,11 +32442,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -31594,11 +32475,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -31630,11 +32511,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -31702,11 +32583,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -31734,11 +32615,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -31766,11 +32647,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -31792,7 +32673,7 @@ local.get $0 local.get $0 local.get $2 - i32.const 2528 + i32.const 2560 i32.load call_indirect $0 (type $i32_i32_f64_=>_i32) drop @@ -31813,11 +32694,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -31853,11 +32734,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -31941,11 +32822,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -32038,11 +32919,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -32095,11 +32976,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -32128,7 +33009,7 @@ global.set $~lib/memory/__stack_pointer block $folding-inner0 global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -32143,7 +33024,7 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -32180,8 +33061,8 @@ global.set $~lib/memory/__stack_pointer return end - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -32196,7 +33077,7 @@ global.set $~lib/memory/__stack_pointer block $folding-inner0 global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -32208,7 +33089,7 @@ i32.add global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -32237,7 +33118,7 @@ i64.const 0 i64.store offset=56 local.get $1 - i32.const 12032 + i32.const 12064 i32.store offset=56 local.get $0 i32.const 0 @@ -32247,7 +33128,7 @@ global.get $~lib/memory/__stack_pointer local.get $1 i32.store offset=60 - i32.const 12032 + i32.const 12064 local.get $1 call $~lib/string/String.__concat local.set $1 @@ -32256,10 +33137,10 @@ local.get $1 i32.store offset=48 local.get $2 - i32.const 5424 + i32.const 5456 i32.store offset=52 local.get $1 - i32.const 5424 + i32.const 5456 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -32282,10 +33163,10 @@ local.get $1 i32.store offset=32 local.get $2 - i32.const 5424 + i32.const 5456 i32.store offset=36 local.get $1 - i32.const 5424 + i32.const 5456 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -32308,10 +33189,10 @@ local.get $1 i32.store offset=16 local.get $2 - i32.const 5424 + i32.const 5456 i32.store offset=20 local.get $1 - i32.const 5424 + i32.const 5456 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -32334,10 +33215,10 @@ local.get $0 i32.store local.get $1 - i32.const 5456 + i32.const 5488 i32.store offset=4 local.get $0 - i32.const 5456 + i32.const 5488 call $~lib/string/String.__concat global.get $~lib/memory/__stack_pointer i32.const -64 @@ -32349,8 +33230,8 @@ global.set $~lib/memory/__stack_pointer return end - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -32363,11 +33244,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -32399,7 +33280,7 @@ global.set $~lib/memory/__stack_pointer block $folding-inner0 global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -32411,7 +33292,7 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -32482,8 +33363,8 @@ local.get $1 return end - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -32496,11 +33377,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -32532,11 +33413,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -32606,11 +33487,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -32678,7 +33559,7 @@ global.set $~lib/memory/__stack_pointer block $folding-inner0 global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -32693,7 +33574,7 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -32733,8 +33614,8 @@ local.get $0 return end - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -32747,11 +33628,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -32778,11 +33659,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -32835,11 +33716,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -32893,11 +33774,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -32947,11 +33828,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -33010,11 +33891,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -33148,11 +34029,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -33326,11 +34207,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -33557,11 +34438,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -33788,11 +34669,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -34013,11 +34894,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -34244,11 +35125,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -34467,11 +35348,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -34504,11 +35385,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -34617,11 +35498,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -34653,11 +35534,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -34748,11 +35629,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -34775,7 +35656,7 @@ local.get $3 local.get $1 local.get $2 - i32.const 2560 + i32.const 2592 i32.load call_indirect $0 (type $i32_i32_=>_f64) f64.const 0 @@ -34911,11 +35792,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -34931,7 +35812,7 @@ i32.const 1 global.set $~argumentsLength local.get $1 - i32.const 2240 + i32.const 2272 i32.load call_indirect $0 (type $i32_=>_f64) local.set $2 @@ -35018,11 +35899,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -35111,11 +35992,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -35131,7 +36012,7 @@ i32.const 1 global.set $~argumentsLength local.get $1 - i32.const 2240 + i32.const 2272 i32.load call_indirect $0 (type $i32_=>_f64) local.tee $2 @@ -35264,11 +36145,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -35291,11 +36172,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -35420,11 +36301,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -35654,7 +36535,7 @@ global.set $~lib/memory/__stack_pointer block $folding-inner0 global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -35666,7 +36547,7 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -35701,8 +36582,8 @@ local.get $1 return end - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -35715,11 +36596,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -35756,11 +36637,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -35790,11 +36671,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -35843,11 +36724,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -35879,11 +36760,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -35915,11 +36796,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -35951,11 +36832,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -35995,11 +36876,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -36039,11 +36920,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -36092,11 +36973,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -36146,11 +37027,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -36200,11 +37081,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -36246,11 +37127,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -36304,11 +37185,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -36337,11 +37218,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -36369,11 +37250,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -36383,7 +37264,12 @@ local.get $0 i32.store local.get $0 - call $assembly/vec2/length + i32.const 0 + call $~lib/typedarray/Float64Array#__get + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + call $~lib/math/NativeMath.hypot global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -36396,11 +37282,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -36423,11 +37309,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -36467,11 +37353,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -36514,11 +37400,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -36584,11 +37470,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -36629,11 +37515,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -36694,11 +37580,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -36759,11 +37645,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -36822,11 +37708,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -36893,11 +37779,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -36972,11 +37858,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -37051,11 +37937,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -37131,11 +38017,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -37218,11 +38104,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -37301,11 +38187,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -37337,7 +38223,7 @@ global.set $~lib/memory/__stack_pointer block $folding-inner0 global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -37349,7 +38235,7 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -37366,7 +38252,7 @@ i64.const 0 i64.store offset=24 local.get $1 - i32.const 12096 + i32.const 12128 i32.store offset=24 local.get $0 i32.const 0 @@ -37376,7 +38262,7 @@ global.get $~lib/memory/__stack_pointer local.get $1 i32.store offset=28 - i32.const 12096 + i32.const 12128 local.get $1 call $~lib/string/String.__concat local.set $1 @@ -37385,10 +38271,10 @@ local.get $1 i32.store offset=16 local.get $2 - i32.const 5424 + i32.const 5456 i32.store offset=20 local.get $1 - i32.const 5424 + i32.const 5456 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -37411,10 +38297,10 @@ local.get $0 i32.store local.get $1 - i32.const 5456 + i32.const 5488 i32.store offset=4 local.get $0 - i32.const 5456 + i32.const 5488 call $~lib/string/String.__concat global.get $~lib/memory/__stack_pointer i32.const 32 @@ -37426,8 +38312,8 @@ global.set $~lib/memory/__stack_pointer return end - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -37440,11 +38326,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -37491,11 +38377,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -37569,7 +38455,7 @@ global.set $~lib/memory/__stack_pointer block $folding-inner0 global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -37581,7 +38467,7 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -37622,8 +38508,8 @@ local.get $1 return end - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -37636,11 +38522,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -37663,11 +38549,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -37710,11 +38596,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -37748,11 +38634,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -37811,11 +38697,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -37847,11 +38733,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -37883,11 +38769,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -37919,11 +38805,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -37970,11 +38856,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -38021,11 +38907,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -38084,11 +38970,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -38148,11 +39034,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -38214,11 +39100,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -38268,11 +39154,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -38338,11 +39224,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -38371,11 +39257,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -38403,11 +39289,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -38430,11 +39316,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -38481,11 +39367,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -38535,11 +39421,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -38568,11 +39454,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -38600,11 +39486,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -38639,11 +39525,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -38723,11 +39609,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -38829,11 +39715,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -38980,11 +39866,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -39124,11 +40010,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -39215,11 +40101,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -39374,11 +40260,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -39489,11 +40375,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -39632,7 +40518,7 @@ global.set $~lib/memory/__stack_pointer block $folding-inner0 global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -39650,7 +40536,7 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -39660,16 +40546,16 @@ local.get $4 i32.const 0 i32.const 3 - i32.const 28 - i32.const 12128 + i32.const 29 + i32.const 12160 call $~lib/rt/__newArray local.tee $4 i32.store global.get $~lib/memory/__stack_pointer i32.const 0 i32.const 3 - i32.const 28 - i32.const 12160 + i32.const 29 + i32.const 12192 call $~lib/rt/__newArray local.tee $5 i32.store offset=4 @@ -39782,8 +40668,8 @@ local.get $0 return end - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -39798,7 +40684,7 @@ global.set $~lib/memory/__stack_pointer block $folding-inner0 global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -39816,7 +40702,7 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -39826,16 +40712,16 @@ local.get $4 i32.const 0 i32.const 3 - i32.const 28 - i32.const 12240 + i32.const 29 + i32.const 12272 call $~lib/rt/__newArray local.tee $4 i32.store global.get $~lib/memory/__stack_pointer i32.const 0 i32.const 3 - i32.const 28 - i32.const 12272 + i32.const 29 + i32.const 12304 call $~lib/rt/__newArray local.tee $5 i32.store offset=4 @@ -39948,8 +40834,8 @@ local.get $0 return end - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -39964,7 +40850,7 @@ global.set $~lib/memory/__stack_pointer block $folding-inner0 global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -39982,7 +40868,7 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -39992,16 +40878,16 @@ local.get $4 i32.const 0 i32.const 3 - i32.const 28 - i32.const 12304 + i32.const 29 + i32.const 12336 call $~lib/rt/__newArray local.tee $4 i32.store global.get $~lib/memory/__stack_pointer i32.const 0 i32.const 3 - i32.const 28 - i32.const 12336 + i32.const 29 + i32.const 12368 call $~lib/rt/__newArray local.tee $5 i32.store offset=4 @@ -40114,8 +41000,8 @@ local.get $0 return end - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -40129,11 +41015,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -40222,11 +41108,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -40262,7 +41148,7 @@ global.set $~lib/memory/__stack_pointer block $folding-inner0 global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -40274,7 +41160,7 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -40297,7 +41183,7 @@ i64.const 0 i64.store offset=40 local.get $1 - i32.const 12368 + i32.const 12400 i32.store offset=40 local.get $0 i32.const 0 @@ -40307,7 +41193,7 @@ global.get $~lib/memory/__stack_pointer local.get $1 i32.store offset=44 - i32.const 12368 + i32.const 12400 local.get $1 call $~lib/string/String.__concat local.set $1 @@ -40316,10 +41202,10 @@ local.get $1 i32.store offset=32 local.get $2 - i32.const 5424 + i32.const 5456 i32.store offset=36 local.get $1 - i32.const 5424 + i32.const 5456 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -40342,10 +41228,10 @@ local.get $1 i32.store offset=16 local.get $2 - i32.const 5424 + i32.const 5456 i32.store offset=20 local.get $1 - i32.const 5424 + i32.const 5456 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -40368,10 +41254,10 @@ local.get $0 i32.store local.get $1 - i32.const 5456 + i32.const 5488 i32.store offset=4 local.get $0 - i32.const 5456 + i32.const 5488 call $~lib/string/String.__concat global.get $~lib/memory/__stack_pointer i32.const 48 @@ -40383,8 +41269,8 @@ global.set $~lib/memory/__stack_pointer return end - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -40397,11 +41283,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -40461,11 +41347,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -40564,11 +41450,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -40600,11 +41486,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -40636,11 +41522,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -40694,11 +41580,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -40752,11 +41638,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -40825,11 +41711,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -40899,11 +41785,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -40978,11 +41864,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -41011,11 +41897,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -41043,11 +41929,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -41070,11 +41956,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -41097,11 +41983,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -41155,11 +42041,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -41217,11 +42103,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -41250,11 +42136,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -41292,11 +42178,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -41495,11 +42381,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -41537,11 +42423,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -41681,11 +42567,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -41845,11 +42731,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -42014,11 +42900,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s if - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -42058,7 +42944,7 @@ global.set $~lib/memory/__stack_pointer block $folding-inner0 global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -42070,7 +42956,7 @@ i32.add global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12652 + i32.const 12692 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -42099,7 +42985,7 @@ i64.const 0 i64.store offset=56 local.get $1 - i32.const 12400 + i32.const 12432 i32.store offset=56 local.get $0 i32.const 0 @@ -42109,7 +42995,7 @@ global.get $~lib/memory/__stack_pointer local.get $1 i32.store offset=60 - i32.const 12400 + i32.const 12432 local.get $1 call $~lib/string/String.__concat local.set $1 @@ -42118,10 +43004,10 @@ local.get $1 i32.store offset=48 local.get $2 - i32.const 5424 + i32.const 5456 i32.store offset=52 local.get $1 - i32.const 5424 + i32.const 5456 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -42144,10 +43030,10 @@ local.get $1 i32.store offset=32 local.get $2 - i32.const 5424 + i32.const 5456 i32.store offset=36 local.get $1 - i32.const 5424 + i32.const 5456 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -42170,10 +43056,10 @@ local.get $1 i32.store offset=16 local.get $2 - i32.const 5424 + i32.const 5456 i32.store offset=20 local.get $1 - i32.const 5424 + i32.const 5456 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -42196,10 +43082,10 @@ local.get $0 i32.store local.get $1 - i32.const 5456 + i32.const 5488 i32.store offset=4 local.get $0 - i32.const 5456 + i32.const 5488 call $~lib/string/String.__concat global.get $~lib/memory/__stack_pointer i32.const -64 @@ -42211,8 +43097,8 @@ global.set $~lib/memory/__stack_pointer return end - i32.const 29056 i32.const 29104 + i32.const 29152 i32.const 1 i32.const 1 call $~lib/builtins/abort diff --git a/build/untouched.wat b/build/untouched.wat index 7bfb1790..03cbea40 100644 --- a/build/untouched.wat +++ b/build/untouched.wat @@ -34,6 +34,7 @@ (type $f64_f64_=>_i32 (func (param f64 f64) (result i32))) (type $f64_f64_f64_f64_=>_i32 (func (param f64 f64 f64 f64) (result i32))) (type $f64_f64_=>_f64 (func (param f64 f64) (result f64))) + (type $f64_f64_f64_=>_f64 (func (param f64 f64 f64) (result f64))) (type $i64_=>_none (func (param i64))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $f64_=>_i32 (func (param f64) (result i32))) @@ -48,11 +49,12 @@ (type $f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_=>_i32 (func (param f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64) (result i32))) (type $i64_=>_i64 (func (param i64) (result i64))) (type $f64_f64_i32_=>_f64 (func (param f64 f64 i32) (result f64))) - (type $f64_f64_f64_=>_f64 (func (param f64 f64 f64) (result f64))) + (type $f64_f64_f64_f64_=>_f64 (func (param f64 f64 f64 f64) (result f64))) + (type $f64_f64_f64_f64_f64_f64_f64_=>_f64 (func (param f64 f64 f64 f64 f64 f64 f64) (result f64))) + (type $f64_f64_f64_f64_f64_f64_f64_f64_f64_=>_f64 (func (param f64 f64 f64 f64 f64 f64 f64 f64 f64) (result f64))) (type $f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_=>_f64 (func (param f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64) (result f64))) (import "env" "seed" (func $~lib/builtins/seed (result f64))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) - (import "Math" "hypot" (func $assembly/imports/Maths.hypot (param f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64) (result f64))) (memory $0 1) (data (i32.const 12) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\18\00\00\00~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s\00\00\00\00\00") (data (i32.const 60) "\1c\00\00\00\00\00\00\00\00\00\00\00\03\00\00\00\08\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00") @@ -65,109 +67,110 @@ (data (i32.const 348) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 380) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00\06\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 412) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\00\07\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 444) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 444) "\1c\00\00\00\00\00\00\00\00\00\00\00\07\00\00\00\08\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 476) "\1c\00\00\00\00\00\00\00\00\00\00\00\07\00\00\00\08\00\00\00\t\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 508) "\1c\00\00\00\00\00\00\00\00\00\00\00\07\00\00\00\08\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 540) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1c\00\00\00I\00n\00v\00a\00l\00i\00d\00 \00l\00e\00n\00g\00t\00h\00") - (data (i32.const 588) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00\00\00\00\00\00\00") - (data (i32.const 652) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00(\00\00\00A\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e\00\00\00\00\00") - (data (i32.const 716) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00r\00t\00/\00i\00t\00c\00m\00s\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 784) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 508) "\1c\00\00\00\00\00\00\00\00\00\00\00\08\00\00\00\08\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 540) "\1c\00\00\00\00\00\00\00\00\00\00\00\08\00\00\00\08\00\00\00\0b\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 572) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1c\00\00\00I\00n\00v\00a\00l\00i\00d\00 \00l\00e\00n\00g\00t\00h\00") + (data (i32.const 620) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00\00\00\00\00\00\00") + (data (i32.const 684) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00(\00\00\00A\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e\00\00\00\00\00") + (data (i32.const 748) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00r\00t\00/\00i\00t\00c\00m\00s\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 816) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 844) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\00~\00l\00i\00b\00/\00r\00t\00.\00t\00s\00\00\00\00\00\00\00\00\00") - (data (i32.const 896) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 924) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 988) "\1c\00\00\00\00\00\00\00\00\00\00\00\n\00\00\00\08\00\00\00\0b\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1020) "\1c\00\00\00\00\00\00\00\00\00\00\00\t\00\00\00\08\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1052) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00\0d\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 848) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 876) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\00~\00l\00i\00b\00/\00r\00t\00.\00t\00s\00\00\00\00\00\00\00\00\00") + (data (i32.const 928) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 956) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1020) "\1c\00\00\00\00\00\00\00\00\00\00\00\0b\00\00\00\08\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1052) "\1c\00\00\00\00\00\00\00\00\00\00\00\n\00\00\00\08\00\00\00\0d\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 1084) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 1116) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00\0f\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1148) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1180) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\00\11\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1148) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1180) "\1c\00\00\00\00\00\00\00\00\00\00\00\07\00\00\00\08\00\00\00\11\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 1212) "\1c\00\00\00\00\00\00\00\00\00\00\00\07\00\00\00\08\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1244) "\1c\00\00\00\00\00\00\00\00\00\00\00\07\00\00\00\08\00\00\00\13\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1276) "\1c\00\00\00\00\00\00\00\00\00\00\00\n\00\00\00\08\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1308) "\1c\00\00\00\00\00\00\00\00\00\00\00\t\00\00\00\08\00\00\00\15\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1340) "\1c\00\00\00\00\00\00\00\00\00\00\00\0b\00\00\00\08\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1244) "\1c\00\00\00\00\00\00\00\00\00\00\00\08\00\00\00\08\00\00\00\13\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1276) "\1c\00\00\00\00\00\00\00\00\00\00\00\08\00\00\00\08\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1308) "\1c\00\00\00\00\00\00\00\00\00\00\00\0b\00\00\00\08\00\00\00\15\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1340) "\1c\00\00\00\00\00\00\00\00\00\00\00\n\00\00\00\08\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 1372) "\1c\00\00\00\00\00\00\00\00\00\00\00\0c\00\00\00\08\00\00\00\17\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 1404) "\1c\00\00\00\00\00\00\00\00\00\00\00\0d\00\00\00\08\00\00\00\18\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 1436) "\1c\00\00\00\00\00\00\00\00\00\00\00\0e\00\00\00\08\00\00\00\19\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1468) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1468) "\1c\00\00\00\00\00\00\00\00\00\00\00\0f\00\00\00\08\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 1500) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00\1b\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1532) "\1c\00\00\00\00\00\00\00\00\00\00\00\0f\00\00\00\08\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1564) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\00\1d\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1596) "\1c\00\00\00\00\00\00\00\00\00\00\00\10\00\00\00\08\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1628) "\1c\00\00\00\00\00\00\00\00\00\00\00\0d\00\00\00\08\00\00\00\1f\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1660) "\1c\00\00\00\00\00\00\00\00\00\00\00\11\00\00\00\08\00\00\00 \00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1696) "n\83\f9\a2\00\00\00\00\d1W\'\fc)\15DN\99\95b\db\c0\dd4\f5\abcQ\feA\90C<:n$\b7a\c5\bb\de\ea.I\06\e0\d2MB\1c\eb\1d\fe\1c\92\d1\t\f55\82\e8>\a7)\b1&p\9c\e9\84D\bb.9\d6\919A~_\b4\8b_\84\9c\f49S\83\ff\97\f8\1f;(\f9\bd\8b\11/\ef\0f\98\05\de\cf~6m\1fm\nZf?FO\b7\t\cb\'\c7\ba\'u-\ea_\9e\f79\07={\f1\e5\eb\b1_\fbk\ea\92R\8aF0\03V\08]\8d\1f \bc\cf\f0\abk{\fca\91\e3\a9\1d6\f4\9a_\85\99e\08\1b\e6^\80\d8\ff\8d@h\a0\14W\15\06\061\'sM") - (data (i32.const 1900) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00!\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1932) "\1c\00\00\00\00\00\00\00\00\00\00\00\12\00\00\00\08\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1964) "\1c\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\08\00\00\00#\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1996) "\1c\00\00\00\00\00\00\00\00\00\00\00\13\00\00\00\08\00\00\00$\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2028) "\1c\00\00\00\00\00\00\00\00\00\00\00\16\00\00\00\08\00\00\00%\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2060) "\1c\00\00\00\00\00\00\00\00\00\00\00\15\00\00\00\08\00\00\00&\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2092) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00\'\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2124) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00n\00u\00m\00b\00e\00r\00") - (data (i32.const 2156) "\1c\00\00\00\00\00\00\00\00\00\00\00\0e\00\00\00\08\00\00\00(\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2188) "\1c\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\08\00\00\00)\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2220) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00*\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1532) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1564) "\1c\00\00\00\00\00\00\00\00\00\00\00\10\00\00\00\08\00\00\00\1d\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1596) "\1c\00\00\00\00\00\00\00\00\00\00\00\07\00\00\00\08\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1628) "\1c\00\00\00\00\00\00\00\00\00\00\00\11\00\00\00\08\00\00\00\1f\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1660) "\1c\00\00\00\00\00\00\00\00\00\00\00\0e\00\00\00\08\00\00\00 \00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1692) "\1c\00\00\00\00\00\00\00\00\00\00\00\12\00\00\00\08\00\00\00!\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1728) "n\83\f9\a2\00\00\00\00\d1W\'\fc)\15DN\99\95b\db\c0\dd4\f5\abcQ\feA\90C<:n$\b7a\c5\bb\de\ea.I\06\e0\d2MB\1c\eb\1d\fe\1c\92\d1\t\f55\82\e8>\a7)\b1&p\9c\e9\84D\bb.9\d6\919A~_\b4\8b_\84\9c\f49S\83\ff\97\f8\1f;(\f9\bd\8b\11/\ef\0f\98\05\de\cf~6m\1fm\nZf?FO\b7\t\cb\'\c7\ba\'u-\ea_\9e\f79\07={\f1\e5\eb\b1_\fbk\ea\92R\8aF0\03V\08]\8d\1f \bc\cf\f0\abk{\fca\91\e3\a9\1d6\f4\9a_\85\99e\08\1b\e6^\80\d8\ff\8d@h\a0\14W\15\06\061\'sM") + (data (i32.const 1932) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1964) "\1c\00\00\00\00\00\00\00\00\00\00\00\13\00\00\00\08\00\00\00#\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1996) "\1c\00\00\00\00\00\00\00\00\00\00\00\15\00\00\00\08\00\00\00$\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2028) "\1c\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\08\00\00\00%\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2060) "\1c\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\08\00\00\00&\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2092) "\1c\00\00\00\00\00\00\00\00\00\00\00\16\00\00\00\08\00\00\00\'\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2124) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00(\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2156) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00n\00u\00m\00b\00e\00r\00") + (data (i32.const 2188) "\1c\00\00\00\00\00\00\00\00\00\00\00\0f\00\00\00\08\00\00\00)\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2220) "\1c\00\00\00\00\00\00\00\00\00\00\00\18\00\00\00\08\00\00\00*\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 2252) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00+\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 2284) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00,\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 2316) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00-\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2348) "\1c\00\00\00\00\00\00\00\00\00\00\00\07\00\00\00\08\00\00\00.\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2380) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00/\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2348) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00.\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2380) "\1c\00\00\00\00\00\00\00\00\00\00\00\08\00\00\00\08\00\00\00/\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 2412) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\000\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 2444) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\001\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2476) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\002\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2508) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\003\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2476) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\002\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2508) "\1c\00\00\00\00\00\00\00\00\00\00\00\07\00\00\00\08\00\00\003\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 2540) "\1c\00\00\00\00\00\00\00\00\00\00\00\07\00\00\00\08\00\00\004\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2572) "\1c\00\00\00\00\00\00\00\00\00\00\00\n\00\00\00\08\00\00\005\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2604) "\1c\00\00\00\00\00\00\00\00\00\00\00\t\00\00\00\08\00\00\006\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2636) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\007\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2572) "\1c\00\00\00\00\00\00\00\00\00\00\00\08\00\00\00\08\00\00\005\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2604) "\1c\00\00\00\00\00\00\00\00\00\00\00\0b\00\00\00\08\00\00\006\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2636) "\1c\00\00\00\00\00\00\00\00\00\00\00\n\00\00\00\08\00\00\007\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 2668) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\008\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2700) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00&\00\00\00N\00o\00t\00 \00i\00m\00p\00l\00e\00m\00e\00n\00t\00e\00d\00 \00y\00e\00t\00\00\00\00\00\00\00") - (data (i32.const 2764) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00$\00\00\00a\00s\00s\00e\00m\00b\00l\00y\00/\00c\00o\00m\00m\00o\00n\00.\00t\00s\00\00\00\00\00\00\00\00\00") - (data (i32.const 2828) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00m\00a\00t\002\00(\00\00\00") - (data (i32.const 2860) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\000\00.\000\00\00\00\00\00\00\00") - (data (i32.const 2892) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00N\00a\00N\00\00\00\00\00\00\00") - (data (i32.const 2924) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\12\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2972) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\00I\00n\00f\00i\00n\00i\00t\00y\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 3024) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 3080) "\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\9a\ec\ef?\d1f\87\10z^\90\bc\85\7fn\e8\15\e3\ef?\13\f6g5R\d2\8c\be\ef?m{\83]\a6\9a\97<\0f\89\f9lX\b5\ef?\fc\ef\fd\92\1a\b5\8e<\f7Gr+\92\ac\ef?\d1\9c/p=\be><\a2\d1\d32\ec\a3\ef?\0bn\90\894\03j\bc\1b\d3\fe\aff\9b\ef?\0e\bd/*RV\95\bcQ[\12\d0\01\93\ef?U\eaN\8c\ef\80P\bc\cc1l\c0\bd\8a\ef?\16\f4\d5\b9#\c9\91\bc\e0-\a9\ae\9a\82\ef?\afU\\\e9\e3\d3\80\f7\ec\9a<\aa\b9h1\87T\ef?\9d8\86\cb\82\e7\8f\bc\1d\d9\fc\"PM\ef?\8d\c3\a6DAo\8a<\d6\8cb\88;F\ef?}\04\e4\b0\05z\80<\96\dc}\91I?\ef?\94\a8\a8\e3\fd\8e\96<8bunz8\ef?}Ht\f2\18^\87\a9\af\0c\ef?\b6\ab\b0MuM\83<\15\b71\n\fe\06\ef?Lt\ac\e2\01B\86<1\d8L\fcp\01\ef?J\f8\d3]9\dd\8f<\ff\16d\b2\08\fc\ee?\04[\8e;\80\a3\86\bc\f1\9f\92_\c5\f6\ee?hPK\cc\edJ\92\bc\cb\a9:7\a7\f1\ee?\8e-Q\1b\f8\07\99\bcf\d8\05m\ae\ec\ee?\d26\94>\e8\d1q\bc\f7\9f\e54\db\e7\ee?\15\1b\ce\b3\19\19\99\bc\e5\a8\13\c3-\e3\ee?mL*\a7H\9f\85<\"4\12L\a6\de\ee?\8ai(z`\12\93\bc\1c\80\ac\04E\da\ee?[\89\17H\8f\a7X\bc*.\f7!\n\d6\ee?\1b\9aIg\9b,|\bc\97\a8P\d9\f5\d1\ee?\11\ac\c2`\edcC<-\89a`\08\ce\ee?\efd\06;\tf\96Z~d\1fx\bct_\ec\e8u\9f\ee?\b0}\8b\c0J\ee\86\bct\81\a5H\9a\9f\ee?\8a\e6U\1e2\19\86\bc\c9gBV\eb\9f\ee?\d3\d4\t^\cb\9c\90T\'\a4\ee?47;\f1\b6i\93\bc\13\ceL\99\89\a5\ee?\1e\ff\19:\84^\80\bc\ad\c7#F\1a\a7\ee?nWr\d8P\d4\94\bc\ed\92D\9b\d9\a8\ee?\00\8a\0e[g\ad\90<\99f\8a\d9\c7\aa\ee?\b4\ea\f0\c1/\b7\8d<\db\a0*B\e5\ac\ee?\ff\e7\c5\9c`\b6e\bc\8cD\b5\162\af\ee?D_\f3Y\83\f6{<6w\15\99\ae\b1\ee?\83=\1e\a7\1f\t\93\bc\c6\ff\91\0b[\b4\ee?)\1el\8b\b8\a9]\bc\e5\c5\cd\b07\b7\ee?Y\b9\90|\f9#l\bc\0fR\c8\cbD\ba\ee?\aa\f9\f4\"CC\92\bcPN\de\9f\82\bd\ee?K\8ef\d7l\ca\85\bc\ba\07\cap\f1\c0\ee?\'\ce\91+\fc\afq<\90\f0\a3\82\91\c4\ee?\bbs\n\e15\d2m<##\e3\19c\c8\ee?c\"b\"\04\c5\87\bce\e5]{f\cc\ee?\d51\e2\e3\86\1c\8b<3-J\ec\9b\d0\ee?\15\bb\bc\d3\d1\bb\91\bc]%>\b2\03\d5\ee?\d21\ee\9c1\cc\90\b4\07!\d5\82\bc_\9b{3\97|\ef?\c9\0dG;\b9*\89\bc)\a1\f5\14F\86\ef?\d3\88:`\04\b6t<\f6?\8b\e7.\90\ef?qr\9dQ\ec\c5\83<\83L\c7\fbQ\9a\ef?\f0\91\d3\8f\12\f7\8f\bc\da\90\a4\a2\af\a4\ef?}t#\e2\98\ae\8d\bc\f1g\8e-H\af\ef?\08 \aaA\bc\c3\8e<\'Za\ee\1b\ba\ef?2\eb\a9\c3\94+\84<\97\bak7+\c5\ef?\ee\85\d11\a9d\8a<@En[v\d0\ef?\ed\e3;\e4\ba7\8e\bc\14\be\9c\ad\fd\db\ef?\9d\cd\91M;\89w<\d8\90\9e\81\c1\e7\ef?\89\cc`A\c1\05S<\f1q\8f+\c2\f3\ef?") - (data (i32.const 6640) "\9f\de\e0\c3\f04\f7?\00\90\e6y\7f\cc\d7\bf\1f\e9,jx\13\f7?\00\00\0d\c2\eeo\d7\bf\a0\b5\fa\08`\f2\f6?\00\e0Q\13\e3\13\d7\bf}\8c\13\1f\a6\d1\f6?\00x(8[\b8\d6\bf\d1\b4\c5\0bI\b1\f6?\00x\80\90U]\d6\bf\ba\0c/3G\91\f6?\00\00\18v\d0\02\d6\bf#B\"\18\9fq\f6?\00\90\90\86\ca\a8\d5\bf\d9\1e\a5\99OR\f6?\00P\03VCO\d5\bf\c4$\8f\aaV3\f6?\00@k\c37\f6\d4\bf\14\dc\9dk\b3\14\f6?\00P\a8\fd\a7\9d\d4\bfL\\\c6Rd\f6\f5?\00\a8\899\92E\d4\bfO,\91\b5g\d8\f5?\00\b8\b09\f4\ed\d3\bf\de\90[\cb\bc\ba\f5?\00p\8fD\ce\96\d3\bfx\1a\d9\f2a\9d\f5?\00\a0\bd\17\1e@\d3\bf\87VF\12V\80\f5?\00\80F\ef\e2\e9\d2\bf\d3k\e7\ce\97c\f5?\00\e008\1b\94\d2\bf\93\7f\a7\e2%G\f5?\00\88\da\8c\c5>\d2\bf\83E\06B\ff*\f5?\00\90\')\e1\e9\d1\bf\df\bd\b2\db\"\0f\f5?\00\f8H+m\95\d1\bf\d7\de4G\8f\f3\f4?\00\f8\b9\9agA\d1\bf@(\de\cfC\d8\f4?\00\98\ef\94\d0\ed\d0\bf\c8\a3x\c0>\bd\f4?\00\10\db\18\a5\9a\d0\bf\8a%\e0\c3\7f\a2\f4?\00\b8cR\e6G\d0\bf4\84\d4$\05\88\f4?\00\f0\86E\"\eb\cf\bf\0b-\19\1b\cem\f4?\00\b0\17uJG\cf\bfT\189\d3\d9S\f4?\000\10=D\a4\ce\bfZ\84\b4D\':\f4?\00\b0\e9D\0d\02\ce\bf\fb\f8\15A\b5 \f4?\00\f0w)\a2`\cd\bf\b1\f4>\da\82\07\f4?\00\90\95\04\01\c0\cc\bf\8f\feW]\8f\ee\f3?\00\10\89V) \cc\bf\e9L\0b\a0\d9\d5\f3?\00\10\81\8d\17\81\cb\bf+\c1\10\c0`\bd\f3?\00\d0\d3\cc\c9\e2\ca\bf\b8\dau+$\a5\f3?\00\90\12.@E\ca\bf\02\d0\9f\cd\"\8d\f3?\00\f0\1dhw\a8\c9\bf\1cz\84\c5[u\f3?\000Him\0c\c9\bf\e26\adI\ce]\f3?\00\c0E\a6 q\c8\bf@\d4M\98yF\f3?\000\14\b4\8f\d6\c7\bf$\cb\ff\ce\\/\f3?\00pb<\b8<\c7\bfI\0d\a1uw\18\f3?\00`7\9b\9a\a3\c6\bf\909>7\c8\01\f3?\00\a0\b7T1\0b\c6\bfA\f8\95\bbN\eb\f2?\000$v}s\c5\bf\d1\a9\19\02\n\d5\f2?\000\c2\8f{\dc\c4\bf*\fd\b7\a8\f9\be\f2?\00\00\d2Q,F\c4\bf\ab\1b\0cz\1c\a9\f2?\00\00\83\bc\8a\b0\c3\bf0\b5\14`r\93\f2?\00\00Ik\99\1b\c3\bf\f5\a1WW\fa}\f2?\00@\a4\90T\87\c2\bf\bf;\1d\9b\b3h\f2?\00\a0y\f8\b9\f3\c1\bf\bd\f5\8f\83\9dS\f2?\00\a0,%\c8`\c1\bf;\08\c9\aa\b7>\f2?\00 \f7W\7f\ce\c0\bf\b6@\a9+\01*\f2?\00\a0\feI\dc<\c0\bf2A\cc\96y\15\f2?\00\80K\bc\bdW\bf\bf\9b\fc\d2\1d \01\f2?\00@@\96\087\be\bf\0bHMI\f4\ec\f1?\00@\f9>\98\17\bd\bfie\8fR\f5\d8\f1?\00\a0\d8Ng\f9\bb\bf|~W\11#\c5\f1?\00`/ y\dc\ba\bf\e9&\cbt|\b1\f1?\00\80(\e7\c3\c0\b9\bf\b6\1a,\0c\01\9e\f1?\00\c0r\b3F\a6\b8\bf\bdp\b6{\b0\8a\f1?\00\00\ac\b3\01\8d\b7\bf\b6\bc\ef%\8aw\f1?\00\008E\f1t\b6\bf\da1L5\8dd\f1?\00\80\87m\0e^\b5\bf\dd_\'\90\b9Q\f1?\00\e0\a1\de\\H\b4\bfL\d22\a4\0e?\f1?\00\a0jM\d93\b3\bf\da\f9\10r\8b,\f1?\00`\c5\f8y \b2\bf1\b5\ec(0\1a\f1?\00 b\98F\0e\b1\bf\af4\84\da\fb\07\f1?\00\00\d2jl\fa\af\bf\b3kN\0f\ee\f5\f0?\00@wJ\8d\da\ad\bf\ce\9f*]\06\e4\f0?\00\00\85\e4\ec\bc\ab\bf!\a5,cD\d2\f0?\00\c0\12@\89\a1\a9\bf\1a\98\e2|\a7\c0\f0?\00\c0\023X\88\a7\bf\d16\c6\83/\af\f0?\00\80\d6g^q\a5\bf9\13\a0\98\db\9d\f0?\00\80eI\8a\\\a3\bf\df\e7R\af\ab\8c\f0?\00@\15d\e3I\a1\bf\fb(N/\9f{\f0?\00\80\eb\82\c0r\9e\bf\19\8f5\8c\b5j\f0?\00\80RR\f1U\9a\bf,\f9\ec\a5\eeY\f0?\00\80\81\cfb=\96\bf\90,\d1\cdII\f0?\00\00\aa\8c\fb(\92\bf\a9\ad\f0\c6\c68\f0?\00\00\f9 {1\8c\bf\a92y\13e(\f0?\00\00\aa]5\19\84\bfHs\ea\'$\18\f0?\00\00\ec\c2\03\12x\bf\95\b1\14\06\04\08\f0?\00\00$y\t\04`\bf\1a\fa&\f7\1f\e0\ef?\00\00\90\84\f3\efo?t\eaa\c2\1c\a1\ef?\00\00=5A\dc\87?.\99\81\b0\10c\ef?\00\80\c2\c4\a3\ce\93?\cd\ad\ee<\f6%\ef?\00\00\89\14\c1\9f\9b?\e7\13\91\03\c8\e9\ee?\00\00\11\ce\d8\b0\a1?\ab\b1\cbx\80\ae\ee?\00\c0\01\d0[\8a\a5?\9b\0c\9d\a2\1at\ee?\00\80\d8@\83\\\a9?\b5\99\n\83\91:\ee?\00\80W\efj\'\ad?V\9a`\t\e0\01\ee?\00\c0\98\e5\98u\b0?\98\bbw\e5\01\ca\ed?\00 \0d\e3\f5S\b2?\03\91|\0b\f2\92\ed?\00\008\8b\dd.\b4?\ce\\\fbf\ac\\\ed?\00\c0W\87Y\06\b6?\9d\de^\aa,\'\ed?\00\00j5v\da\b7?\cd,k>n\f2\ec?\00`\1cNC\ab\b9?\02y\a7\a2m\be\ec?\00`\0d\bb\c7x\bb?m\087m&\8b\ec?\00 \e72\13C\bd?\04X]\bd\94X\ec?\00`\deq1\n\bf?\8c\9f\bb3\b5&\ec?\00@\91+\15g\c0??\e7\ec\ee\83\f5\eb?\00\b0\92\82\85G\c1?\c1\96\dbu\fd\c4\eb?\000\ca\cdn&\c2?(J\86\0c\1e\95\eb?\00P\c5\a6\d7\03\c3?,>\ef\c5\e2e\eb?\00\103<\c3\df\c3?\8b\88\c9gH7\eb?\00\80zk6\ba\c4?J0\1d!K\t\eb?\00\f0\d1(9\93\c5?~\ef\f2\85\e8\db\ea?\00\f0\18$\cdj\c6?\a2=`1\1d\af\ea?\00\90f\ec\f8@\c7?\a7X\d3?\e6\82\ea?\00\f0\1a\f5\c0\15\c8?\8bs\t\ef@W\ea?\00\80\f6T)\e9\c8?\'K\ab\90*,\ea?\00@\f8\026\bb\c9?\d1\f2\93\13\a0\01\ea?\00\00,\1c\ed\8b\ca?\1b<\db$\9f\d7\e9?\00\d0\01\\Q[\cb?\90\b1\c7\05%\ae\e9?\00\c0\bc\ccg)\cc?/\ce\97\f2.\85\e9?\00`H\d55\f6\cc?uK\a4\ee\ba\\\e9?\00\c0F4\bd\c1\cd?8H\e7\9d\c64\e9?\00\e0\cf\b8\01\8c\ce?\e6Rg/O\0d\e9?\00\90\17\c0\tU\cf?\9d\d7\ff\8eR\e6\e8?\00\b8\1f\12l\0e\d0?|\00\cc\9f\ce\bf\e8?\00\d0\93\0e\b8q\d0?\0e\c3\be\da\c0\99\e8?\00p\86\9ek\d4\d0?\fb\17#\aa\'t\e8?\00\d0K3\876\d1?\08\9a\b3\ac\00O\e8?\00H#g\0d\98\d1?U>e\e8I*\e8?\00\80\cc\e0\ff\f8\d1?`\02\f4\95\01\06\e8?\00hc\d7_Y\d2?)\a3\e0c%\e2\e7?\00\a8\14\t0\b9\d2?\ad\b5\dcw\b3\be\e7?\00`C\10r\18\d3?\c2%\97g\aa\9b\e7?\00\18\ecm&w\d3?W\06\17\f2\07y\e7?\000\af\fbO\d5\d3?\0c\13\d6\db\caV\e7?\00\e0/\e3\ee2\d4?") - (data (i32.const 8688) "k\b6O\01\00\10\e6?<[B\91l\02~<\95\b4M\03\000\e6?A]\00H\ea\bf\8d\f6\05\eb\ff\ef\e6?S-\e2\1a\04\80~\bc\80\97\86\0e\00\10\e7?Ry\tqf\ff{<\12\e9g\fc\ff/\e7?$\87\bd&\e2\00\8c\89<\b9{F\13\000\e9?v\02\98KN\80\7f.\98\dd\ff\af\e9?7\93Z\8a\e0@\87\bcf\fbI\ed\ff\cf\e9?\00\e0\9b\c1\08\ce?O*\00\b0\ea?_?\ff<\04\fdi\bc\d1\1e\ae\d7\ff\cf\ea?\b4p\90\12\e7>\82\bcx\04Q\ee\ff\ef\ea?\a3\de\0e\e0>\06j<[\0de\db\ff\0f\eb?\b9\n\1f8\c8\06ZO\86\d0E\ff\8a<@\16\87\f9\ff\8f\eb?\f9\c3\c2\96w\fe|\f0\0f\00\f0\f4?\1cS\85\0b\89\7f\97<\d1K\dc\12\00\10\f5?6\a4fqe\04`\c9\03\00\b0\f5?\c0\0c\bf\n\08A\9f\bc\bc\19I\1d\00\d0\f5?)G%\fb*\81\98\bc\89z\b8\e7\ff\ef\f5?\04i\ed\80\b7~\94\bc") - (data (i32.const 10748) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00x\00y\00z\00\00\00\00\00\00\00") - (data (i32.const 10780) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00x\00z\00y\00\00\00\00\00\00\00") - (data (i32.const 10812) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00y\00x\00z\00\00\00\00\00\00\00") - (data (i32.const 10844) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00y\00z\00x\00\00\00\00\00\00\00") - (data (i32.const 10876) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00z\00x\00y\00\00\00\00\00\00\00") - (data (i32.const 10908) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00(\00\00\00U\00n\00k\00n\00o\00w\00n\00 \00a\00n\00g\00l\00e\00 \00o\00r\00d\00e\00r\00 \00\00\00\00\00") - (data (i32.const 10972) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00 \00\00\00a\00s\00s\00e\00m\00b\00l\00y\00/\00q\00u\00a\00t\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 11036) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00q\00u\00a\00t\00(\00\00\00") - (data (i32.const 11068) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00q\00u\00a\00t\002\00(\00") - (data (i32.const 11100) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00v\00e\00c\002\00(\00\00\00") - (data (i32.const 11132) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2700) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\009\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2732) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00&\00\00\00N\00o\00t\00 \00i\00m\00p\00l\00e\00m\00e\00n\00t\00e\00d\00 \00y\00e\00t\00\00\00\00\00\00\00") + (data (i32.const 2796) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00$\00\00\00a\00s\00s\00e\00m\00b\00l\00y\00/\00c\00o\00m\00m\00o\00n\00.\00t\00s\00\00\00\00\00\00\00\00\00") + (data (i32.const 2860) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00m\00a\00t\002\00(\00\00\00") + (data (i32.const 2892) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\000\00.\000\00\00\00\00\00\00\00") + (data (i32.const 2924) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00N\00a\00N\00\00\00\00\00\00\00") + (data (i32.const 2956) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\12\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 3004) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\00I\00n\00f\00i\00n\00i\00t\00y\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 3056) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 3112) "\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\9a\ec\ef?\d1f\87\10z^\90\bc\85\7fn\e8\15\e3\ef?\13\f6g5R\d2\8c\be\ef?m{\83]\a6\9a\97<\0f\89\f9lX\b5\ef?\fc\ef\fd\92\1a\b5\8e<\f7Gr+\92\ac\ef?\d1\9c/p=\be><\a2\d1\d32\ec\a3\ef?\0bn\90\894\03j\bc\1b\d3\fe\aff\9b\ef?\0e\bd/*RV\95\bcQ[\12\d0\01\93\ef?U\eaN\8c\ef\80P\bc\cc1l\c0\bd\8a\ef?\16\f4\d5\b9#\c9\91\bc\e0-\a9\ae\9a\82\ef?\afU\\\e9\e3\d3\80\f7\ec\9a<\aa\b9h1\87T\ef?\9d8\86\cb\82\e7\8f\bc\1d\d9\fc\"PM\ef?\8d\c3\a6DAo\8a<\d6\8cb\88;F\ef?}\04\e4\b0\05z\80<\96\dc}\91I?\ef?\94\a8\a8\e3\fd\8e\96<8bunz8\ef?}Ht\f2\18^\87\a9\af\0c\ef?\b6\ab\b0MuM\83<\15\b71\n\fe\06\ef?Lt\ac\e2\01B\86<1\d8L\fcp\01\ef?J\f8\d3]9\dd\8f<\ff\16d\b2\08\fc\ee?\04[\8e;\80\a3\86\bc\f1\9f\92_\c5\f6\ee?hPK\cc\edJ\92\bc\cb\a9:7\a7\f1\ee?\8e-Q\1b\f8\07\99\bcf\d8\05m\ae\ec\ee?\d26\94>\e8\d1q\bc\f7\9f\e54\db\e7\ee?\15\1b\ce\b3\19\19\99\bc\e5\a8\13\c3-\e3\ee?mL*\a7H\9f\85<\"4\12L\a6\de\ee?\8ai(z`\12\93\bc\1c\80\ac\04E\da\ee?[\89\17H\8f\a7X\bc*.\f7!\n\d6\ee?\1b\9aIg\9b,|\bc\97\a8P\d9\f5\d1\ee?\11\ac\c2`\edcC<-\89a`\08\ce\ee?\efd\06;\tf\96Z~d\1fx\bct_\ec\e8u\9f\ee?\b0}\8b\c0J\ee\86\bct\81\a5H\9a\9f\ee?\8a\e6U\1e2\19\86\bc\c9gBV\eb\9f\ee?\d3\d4\t^\cb\9c\90T\'\a4\ee?47;\f1\b6i\93\bc\13\ceL\99\89\a5\ee?\1e\ff\19:\84^\80\bc\ad\c7#F\1a\a7\ee?nWr\d8P\d4\94\bc\ed\92D\9b\d9\a8\ee?\00\8a\0e[g\ad\90<\99f\8a\d9\c7\aa\ee?\b4\ea\f0\c1/\b7\8d<\db\a0*B\e5\ac\ee?\ff\e7\c5\9c`\b6e\bc\8cD\b5\162\af\ee?D_\f3Y\83\f6{<6w\15\99\ae\b1\ee?\83=\1e\a7\1f\t\93\bc\c6\ff\91\0b[\b4\ee?)\1el\8b\b8\a9]\bc\e5\c5\cd\b07\b7\ee?Y\b9\90|\f9#l\bc\0fR\c8\cbD\ba\ee?\aa\f9\f4\"CC\92\bcPN\de\9f\82\bd\ee?K\8ef\d7l\ca\85\bc\ba\07\cap\f1\c0\ee?\'\ce\91+\fc\afq<\90\f0\a3\82\91\c4\ee?\bbs\n\e15\d2m<##\e3\19c\c8\ee?c\"b\"\04\c5\87\bce\e5]{f\cc\ee?\d51\e2\e3\86\1c\8b<3-J\ec\9b\d0\ee?\15\bb\bc\d3\d1\bb\91\bc]%>\b2\03\d5\ee?\d21\ee\9c1\cc\90\b4\07!\d5\82\bc_\9b{3\97|\ef?\c9\0dG;\b9*\89\bc)\a1\f5\14F\86\ef?\d3\88:`\04\b6t<\f6?\8b\e7.\90\ef?qr\9dQ\ec\c5\83<\83L\c7\fbQ\9a\ef?\f0\91\d3\8f\12\f7\8f\bc\da\90\a4\a2\af\a4\ef?}t#\e2\98\ae\8d\bc\f1g\8e-H\af\ef?\08 \aaA\bc\c3\8e<\'Za\ee\1b\ba\ef?2\eb\a9\c3\94+\84<\97\bak7+\c5\ef?\ee\85\d11\a9d\8a<@En[v\d0\ef?\ed\e3;\e4\ba7\8e\bc\14\be\9c\ad\fd\db\ef?\9d\cd\91M;\89w<\d8\90\9e\81\c1\e7\ef?\89\cc`A\c1\05S<\f1q\8f+\c2\f3\ef?") + (data (i32.const 6672) "\9f\de\e0\c3\f04\f7?\00\90\e6y\7f\cc\d7\bf\1f\e9,jx\13\f7?\00\00\0d\c2\eeo\d7\bf\a0\b5\fa\08`\f2\f6?\00\e0Q\13\e3\13\d7\bf}\8c\13\1f\a6\d1\f6?\00x(8[\b8\d6\bf\d1\b4\c5\0bI\b1\f6?\00x\80\90U]\d6\bf\ba\0c/3G\91\f6?\00\00\18v\d0\02\d6\bf#B\"\18\9fq\f6?\00\90\90\86\ca\a8\d5\bf\d9\1e\a5\99OR\f6?\00P\03VCO\d5\bf\c4$\8f\aaV3\f6?\00@k\c37\f6\d4\bf\14\dc\9dk\b3\14\f6?\00P\a8\fd\a7\9d\d4\bfL\\\c6Rd\f6\f5?\00\a8\899\92E\d4\bfO,\91\b5g\d8\f5?\00\b8\b09\f4\ed\d3\bf\de\90[\cb\bc\ba\f5?\00p\8fD\ce\96\d3\bfx\1a\d9\f2a\9d\f5?\00\a0\bd\17\1e@\d3\bf\87VF\12V\80\f5?\00\80F\ef\e2\e9\d2\bf\d3k\e7\ce\97c\f5?\00\e008\1b\94\d2\bf\93\7f\a7\e2%G\f5?\00\88\da\8c\c5>\d2\bf\83E\06B\ff*\f5?\00\90\')\e1\e9\d1\bf\df\bd\b2\db\"\0f\f5?\00\f8H+m\95\d1\bf\d7\de4G\8f\f3\f4?\00\f8\b9\9agA\d1\bf@(\de\cfC\d8\f4?\00\98\ef\94\d0\ed\d0\bf\c8\a3x\c0>\bd\f4?\00\10\db\18\a5\9a\d0\bf\8a%\e0\c3\7f\a2\f4?\00\b8cR\e6G\d0\bf4\84\d4$\05\88\f4?\00\f0\86E\"\eb\cf\bf\0b-\19\1b\cem\f4?\00\b0\17uJG\cf\bfT\189\d3\d9S\f4?\000\10=D\a4\ce\bfZ\84\b4D\':\f4?\00\b0\e9D\0d\02\ce\bf\fb\f8\15A\b5 \f4?\00\f0w)\a2`\cd\bf\b1\f4>\da\82\07\f4?\00\90\95\04\01\c0\cc\bf\8f\feW]\8f\ee\f3?\00\10\89V) \cc\bf\e9L\0b\a0\d9\d5\f3?\00\10\81\8d\17\81\cb\bf+\c1\10\c0`\bd\f3?\00\d0\d3\cc\c9\e2\ca\bf\b8\dau+$\a5\f3?\00\90\12.@E\ca\bf\02\d0\9f\cd\"\8d\f3?\00\f0\1dhw\a8\c9\bf\1cz\84\c5[u\f3?\000Him\0c\c9\bf\e26\adI\ce]\f3?\00\c0E\a6 q\c8\bf@\d4M\98yF\f3?\000\14\b4\8f\d6\c7\bf$\cb\ff\ce\\/\f3?\00pb<\b8<\c7\bfI\0d\a1uw\18\f3?\00`7\9b\9a\a3\c6\bf\909>7\c8\01\f3?\00\a0\b7T1\0b\c6\bfA\f8\95\bbN\eb\f2?\000$v}s\c5\bf\d1\a9\19\02\n\d5\f2?\000\c2\8f{\dc\c4\bf*\fd\b7\a8\f9\be\f2?\00\00\d2Q,F\c4\bf\ab\1b\0cz\1c\a9\f2?\00\00\83\bc\8a\b0\c3\bf0\b5\14`r\93\f2?\00\00Ik\99\1b\c3\bf\f5\a1WW\fa}\f2?\00@\a4\90T\87\c2\bf\bf;\1d\9b\b3h\f2?\00\a0y\f8\b9\f3\c1\bf\bd\f5\8f\83\9dS\f2?\00\a0,%\c8`\c1\bf;\08\c9\aa\b7>\f2?\00 \f7W\7f\ce\c0\bf\b6@\a9+\01*\f2?\00\a0\feI\dc<\c0\bf2A\cc\96y\15\f2?\00\80K\bc\bdW\bf\bf\9b\fc\d2\1d \01\f2?\00@@\96\087\be\bf\0bHMI\f4\ec\f1?\00@\f9>\98\17\bd\bfie\8fR\f5\d8\f1?\00\a0\d8Ng\f9\bb\bf|~W\11#\c5\f1?\00`/ y\dc\ba\bf\e9&\cbt|\b1\f1?\00\80(\e7\c3\c0\b9\bf\b6\1a,\0c\01\9e\f1?\00\c0r\b3F\a6\b8\bf\bdp\b6{\b0\8a\f1?\00\00\ac\b3\01\8d\b7\bf\b6\bc\ef%\8aw\f1?\00\008E\f1t\b6\bf\da1L5\8dd\f1?\00\80\87m\0e^\b5\bf\dd_\'\90\b9Q\f1?\00\e0\a1\de\\H\b4\bfL\d22\a4\0e?\f1?\00\a0jM\d93\b3\bf\da\f9\10r\8b,\f1?\00`\c5\f8y \b2\bf1\b5\ec(0\1a\f1?\00 b\98F\0e\b1\bf\af4\84\da\fb\07\f1?\00\00\d2jl\fa\af\bf\b3kN\0f\ee\f5\f0?\00@wJ\8d\da\ad\bf\ce\9f*]\06\e4\f0?\00\00\85\e4\ec\bc\ab\bf!\a5,cD\d2\f0?\00\c0\12@\89\a1\a9\bf\1a\98\e2|\a7\c0\f0?\00\c0\023X\88\a7\bf\d16\c6\83/\af\f0?\00\80\d6g^q\a5\bf9\13\a0\98\db\9d\f0?\00\80eI\8a\\\a3\bf\df\e7R\af\ab\8c\f0?\00@\15d\e3I\a1\bf\fb(N/\9f{\f0?\00\80\eb\82\c0r\9e\bf\19\8f5\8c\b5j\f0?\00\80RR\f1U\9a\bf,\f9\ec\a5\eeY\f0?\00\80\81\cfb=\96\bf\90,\d1\cdII\f0?\00\00\aa\8c\fb(\92\bf\a9\ad\f0\c6\c68\f0?\00\00\f9 {1\8c\bf\a92y\13e(\f0?\00\00\aa]5\19\84\bfHs\ea\'$\18\f0?\00\00\ec\c2\03\12x\bf\95\b1\14\06\04\08\f0?\00\00$y\t\04`\bf\1a\fa&\f7\1f\e0\ef?\00\00\90\84\f3\efo?t\eaa\c2\1c\a1\ef?\00\00=5A\dc\87?.\99\81\b0\10c\ef?\00\80\c2\c4\a3\ce\93?\cd\ad\ee<\f6%\ef?\00\00\89\14\c1\9f\9b?\e7\13\91\03\c8\e9\ee?\00\00\11\ce\d8\b0\a1?\ab\b1\cbx\80\ae\ee?\00\c0\01\d0[\8a\a5?\9b\0c\9d\a2\1at\ee?\00\80\d8@\83\\\a9?\b5\99\n\83\91:\ee?\00\80W\efj\'\ad?V\9a`\t\e0\01\ee?\00\c0\98\e5\98u\b0?\98\bbw\e5\01\ca\ed?\00 \0d\e3\f5S\b2?\03\91|\0b\f2\92\ed?\00\008\8b\dd.\b4?\ce\\\fbf\ac\\\ed?\00\c0W\87Y\06\b6?\9d\de^\aa,\'\ed?\00\00j5v\da\b7?\cd,k>n\f2\ec?\00`\1cNC\ab\b9?\02y\a7\a2m\be\ec?\00`\0d\bb\c7x\bb?m\087m&\8b\ec?\00 \e72\13C\bd?\04X]\bd\94X\ec?\00`\deq1\n\bf?\8c\9f\bb3\b5&\ec?\00@\91+\15g\c0??\e7\ec\ee\83\f5\eb?\00\b0\92\82\85G\c1?\c1\96\dbu\fd\c4\eb?\000\ca\cdn&\c2?(J\86\0c\1e\95\eb?\00P\c5\a6\d7\03\c3?,>\ef\c5\e2e\eb?\00\103<\c3\df\c3?\8b\88\c9gH7\eb?\00\80zk6\ba\c4?J0\1d!K\t\eb?\00\f0\d1(9\93\c5?~\ef\f2\85\e8\db\ea?\00\f0\18$\cdj\c6?\a2=`1\1d\af\ea?\00\90f\ec\f8@\c7?\a7X\d3?\e6\82\ea?\00\f0\1a\f5\c0\15\c8?\8bs\t\ef@W\ea?\00\80\f6T)\e9\c8?\'K\ab\90*,\ea?\00@\f8\026\bb\c9?\d1\f2\93\13\a0\01\ea?\00\00,\1c\ed\8b\ca?\1b<\db$\9f\d7\e9?\00\d0\01\\Q[\cb?\90\b1\c7\05%\ae\e9?\00\c0\bc\ccg)\cc?/\ce\97\f2.\85\e9?\00`H\d55\f6\cc?uK\a4\ee\ba\\\e9?\00\c0F4\bd\c1\cd?8H\e7\9d\c64\e9?\00\e0\cf\b8\01\8c\ce?\e6Rg/O\0d\e9?\00\90\17\c0\tU\cf?\9d\d7\ff\8eR\e6\e8?\00\b8\1f\12l\0e\d0?|\00\cc\9f\ce\bf\e8?\00\d0\93\0e\b8q\d0?\0e\c3\be\da\c0\99\e8?\00p\86\9ek\d4\d0?\fb\17#\aa\'t\e8?\00\d0K3\876\d1?\08\9a\b3\ac\00O\e8?\00H#g\0d\98\d1?U>e\e8I*\e8?\00\80\cc\e0\ff\f8\d1?`\02\f4\95\01\06\e8?\00hc\d7_Y\d2?)\a3\e0c%\e2\e7?\00\a8\14\t0\b9\d2?\ad\b5\dcw\b3\be\e7?\00`C\10r\18\d3?\c2%\97g\aa\9b\e7?\00\18\ecm&w\d3?W\06\17\f2\07y\e7?\000\af\fbO\d5\d3?\0c\13\d6\db\caV\e7?\00\e0/\e3\ee2\d4?") + (data (i32.const 8720) "k\b6O\01\00\10\e6?<[B\91l\02~<\95\b4M\03\000\e6?A]\00H\ea\bf\8d\f6\05\eb\ff\ef\e6?S-\e2\1a\04\80~\bc\80\97\86\0e\00\10\e7?Ry\tqf\ff{<\12\e9g\fc\ff/\e7?$\87\bd&\e2\00\8c\89<\b9{F\13\000\e9?v\02\98KN\80\7f.\98\dd\ff\af\e9?7\93Z\8a\e0@\87\bcf\fbI\ed\ff\cf\e9?\00\e0\9b\c1\08\ce?O*\00\b0\ea?_?\ff<\04\fdi\bc\d1\1e\ae\d7\ff\cf\ea?\b4p\90\12\e7>\82\bcx\04Q\ee\ff\ef\ea?\a3\de\0e\e0>\06j<[\0de\db\ff\0f\eb?\b9\n\1f8\c8\06ZO\86\d0E\ff\8a<@\16\87\f9\ff\8f\eb?\f9\c3\c2\96w\fe|\f0\0f\00\f0\f4?\1cS\85\0b\89\7f\97<\d1K\dc\12\00\10\f5?6\a4fqe\04`\c9\03\00\b0\f5?\c0\0c\bf\n\08A\9f\bc\bc\19I\1d\00\d0\f5?)G%\fb*\81\98\bc\89z\b8\e7\ff\ef\f5?\04i\ed\80\b7~\94\bc") + (data (i32.const 10780) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00x\00y\00z\00\00\00\00\00\00\00") + (data (i32.const 10812) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00x\00z\00y\00\00\00\00\00\00\00") + (data (i32.const 10844) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00y\00x\00z\00\00\00\00\00\00\00") + (data (i32.const 10876) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00y\00z\00x\00\00\00\00\00\00\00") + (data (i32.const 10908) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00z\00x\00y\00\00\00\00\00\00\00") + (data (i32.const 10940) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00(\00\00\00U\00n\00k\00n\00o\00w\00n\00 \00a\00n\00g\00l\00e\00 \00o\00r\00d\00e\00r\00 \00\00\00\00\00") + (data (i32.const 11004) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00 \00\00\00a\00s\00s\00e\00m\00b\00l\00y\00/\00q\00u\00a\00t\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 11068) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00q\00u\00a\00t\00(\00\00\00") + (data (i32.const 11100) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00q\00u\00a\00t\002\00(\00") + (data (i32.const 11132) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00v\00e\00c\002\00(\00\00\00") (data (i32.const 11164) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 11196) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00\00\00") - (data (i32.const 11244) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 11196) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 11228) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00\00\00") (data (i32.const 11276) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 11308) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 11340) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 11372) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00v\00e\00c\003\00(\00\00\00") - (data (i32.const 11404) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00v\00e\00c\004\00(\00\00\00") - (data (i32.const 11440) "\1d\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\1a\00\00\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00 \00\00\00\00\00\00\00\02A\00\00\00\00\00\00\02\t\00\00\00\00\00\00 \00\00\00\00\00\00\00\02\1a\00\00\00\00\00\00") - (table $0 57 funcref) - (elem (i32.const 1) $~lib/math/NativeMath.random $assembly/mat2d/multiply $assembly/mat2d/subtract $assembly/vec3/subtract $assembly/vec3/multiply $assembly/vec3/divide $assembly/vec3/distance $assembly/vec3/squaredDistance $assembly/vec3/length $assembly/vec3/squaredLength $start:assembly/vec3~anonymous|0~anonymous|0 $start:assembly/vec3~anonymous|0 $assembly/vec4/subtract $assembly/vec4/multiply $assembly/vec4/divide $assembly/vec4/distance $assembly/vec4/squaredDistance $assembly/vec4/length $assembly/vec4/squaredLength $start:assembly/vec4~anonymous|0~anonymous|0 $start:assembly/vec4~anonymous|0 $assembly/vec4/clone $assembly/vec4/fromValues $assembly/vec4/copy $assembly/vec4/set $assembly/vec4/add $assembly/quat/multiply $assembly/vec4/scale $assembly/vec4/dot $assembly/vec4/lerp $assembly/vec4/normalize $assembly/vec4/exactEquals $start:assembly/quat~anonymous|0~anonymous|0 $start:assembly/quat~anonymous|0 $start:assembly/quat~anonymous|1~anonymous|0 $start:assembly/quat~anonymous|1 $start:assembly/quat~anonymous|2~anonymous|0 $start:assembly/quat~anonymous|2 $assembly/quat2/multiply $assembly/mat4/perspectiveNO $assembly/mat4/orthoNO $assembly/mat4/multiply $assembly/mat4/subtract $assembly/mat3/multiply $assembly/mat3/subtract $assembly/vec2/length $assembly/vec2/subtract $assembly/vec2/multiply $assembly/vec2/divide $assembly/vec2/distance $assembly/vec2/squaredDistance $assembly/vec2/squaredLength $start:assembly/vec2~anonymous|0~anonymous|0 $start:assembly/vec2~anonymous|0 $assembly/mat2/multiply $assembly/mat2/subtract) + (data (i32.const 11372) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 11404) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00v\00e\00c\003\00(\00\00\00") + (data (i32.const 11436) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00v\00e\00c\004\00(\00\00\00") + (data (i32.const 11472) "\1e\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\1a\00\00\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00 \00\00\00\00\00\00\00\02A\00\00\00\00\00\00\02\t\00\00\00\00\00\00 \00\00\00\00\00\00\00\02\1a\00\00\00\00\00\00") + (table $0 58 funcref) + (elem (i32.const 1) $~lib/math/NativeMath.random $assembly/mat2d/multiply $assembly/mat2d/subtract $assembly/vec3/subtract $assembly/vec3/multiply $assembly/vec3/divide $~lib/math/NativeMath.hypot $assembly/vec3/distance $assembly/vec3/squaredDistance $assembly/vec3/length $assembly/vec3/squaredLength $start:assembly/vec3~anonymous|0~anonymous|0 $start:assembly/vec3~anonymous|0 $assembly/vec4/subtract $assembly/vec4/multiply $assembly/vec4/divide $assembly/vec4/distance $assembly/vec4/squaredDistance $assembly/vec4/length $assembly/vec4/squaredLength $start:assembly/vec4~anonymous|0~anonymous|0 $start:assembly/vec4~anonymous|0 $assembly/vec4/clone $assembly/vec4/fromValues $assembly/vec4/copy $assembly/vec4/set $assembly/vec4/add $assembly/quat/multiply $assembly/vec4/scale $assembly/vec4/dot $assembly/vec4/lerp $assembly/vec4/normalize $assembly/vec4/exactEquals $start:assembly/quat~anonymous|0~anonymous|0 $start:assembly/quat~anonymous|0 $start:assembly/quat~anonymous|1~anonymous|0 $start:assembly/quat~anonymous|1 $start:assembly/quat~anonymous|2~anonymous|0 $start:assembly/quat~anonymous|2 $assembly/quat2/multiply $assembly/mat4/perspectiveNO $assembly/mat4/orthoNO $assembly/mat4/multiply $assembly/mat4/subtract $assembly/mat3/multiply $assembly/mat3/subtract $assembly/vec2/length $assembly/vec2/subtract $assembly/vec2/multiply $assembly/vec2/divide $assembly/vec2/distance $assembly/vec2/squaredDistance $assembly/vec2/squaredLength $start:assembly/vec2~anonymous|0~anonymous|0 $start:assembly/vec2~anonymous|0 $assembly/mat2/multiply $assembly/mat2/subtract) (global $assembly/common/EPSILON f64 (f64.const 1e-06)) (global $~lib/math/random_seeded (mut i32) (i32.const 0)) (global $~lib/math/random_state0_64 (mut i64) (i64.const 0)) @@ -183,10 +186,10 @@ (global $assembly/vec3/sub i32 (i32.const 336)) (global $assembly/vec3/mul i32 (i32.const 368)) (global $assembly/vec3/div i32 (i32.const 400)) - (global $assembly/vec3/dist i32 (i32.const 432)) - (global $assembly/vec3/sqrDist i32 (i32.const 464)) - (global $assembly/vec3/len i32 (i32.const 496)) - (global $assembly/vec3/sqrLen i32 (i32.const 528)) + (global $assembly/vec3/dist i32 (i32.const 464)) + (global $assembly/vec3/sqrDist i32 (i32.const 496)) + (global $assembly/vec3/len i32 (i32.const 528)) + (global $assembly/vec3/sqrLen i32 (i32.const 560)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) @@ -202,30 +205,30 @@ (global $assembly/vec3/vec (mut i32) (i32.const 0)) (global $~argumentsLength (mut i32) (i32.const 0)) (global $assembly/vec3/forEach (mut i32) (i32.const 0)) - (global $assembly/vec4/sub i32 (i32.const 1072)) - (global $assembly/vec4/mul i32 (i32.const 1104)) - (global $assembly/vec4/div i32 (i32.const 1136)) - (global $assembly/vec4/dist i32 (i32.const 1168)) - (global $assembly/vec4/sqrDist i32 (i32.const 1200)) - (global $assembly/vec4/len i32 (i32.const 1232)) - (global $assembly/vec4/sqrLen i32 (i32.const 1264)) + (global $assembly/vec4/sub i32 (i32.const 1104)) + (global $assembly/vec4/mul i32 (i32.const 1136)) + (global $assembly/vec4/div i32 (i32.const 1168)) + (global $assembly/vec4/dist i32 (i32.const 1200)) + (global $assembly/vec4/sqrDist i32 (i32.const 1232)) + (global $assembly/vec4/len i32 (i32.const 1264)) + (global $assembly/vec4/sqrLen i32 (i32.const 1296)) (global $assembly/vec4/vec (mut i32) (i32.const 0)) (global $assembly/vec4/forEach (mut i32) (i32.const 0)) - (global $assembly/quat/clone i32 (i32.const 1360)) - (global $assembly/quat/fromValues i32 (i32.const 1392)) - (global $assembly/quat/copy i32 (i32.const 1424)) - (global $assembly/quat/set i32 (i32.const 1456)) - (global $assembly/quat/add i32 (i32.const 1488)) - (global $assembly/quat/mul i32 (i32.const 1520)) - (global $assembly/quat/scale i32 (i32.const 1552)) - (global $assembly/quat/dot i32 (i32.const 1584)) - (global $assembly/quat/lerp i32 (i32.const 1616)) - (global $assembly/quat/length i32 (i32.const 1232)) - (global $assembly/quat/len i32 (i32.const 1232)) - (global $assembly/quat/squaredLength i32 (i32.const 1264)) - (global $assembly/quat/sqrLen i32 (i32.const 1264)) - (global $assembly/quat/normalize i32 (i32.const 1648)) - (global $assembly/quat/exactEquals i32 (i32.const 1680)) + (global $assembly/quat/clone i32 (i32.const 1392)) + (global $assembly/quat/fromValues i32 (i32.const 1424)) + (global $assembly/quat/copy i32 (i32.const 1456)) + (global $assembly/quat/set i32 (i32.const 1488)) + (global $assembly/quat/add i32 (i32.const 1520)) + (global $assembly/quat/mul i32 (i32.const 1552)) + (global $assembly/quat/scale i32 (i32.const 1584)) + (global $assembly/quat/dot i32 (i32.const 1616)) + (global $assembly/quat/lerp i32 (i32.const 1648)) + (global $assembly/quat/length i32 (i32.const 1264)) + (global $assembly/quat/len i32 (i32.const 1264)) + (global $assembly/quat/squaredLength i32 (i32.const 1296)) + (global $assembly/quat/sqrLen i32 (i32.const 1296)) + (global $assembly/quat/normalize i32 (i32.const 1680)) + (global $assembly/quat/exactEquals i32 (i32.const 1712)) (global $assembly/quat/tmpvec3 (mut i32) (i32.const 0)) (global $assembly/quat/xUnitVec3 (mut i32) (i32.const 0)) (global $assembly/quat/yUnitVec3 (mut i32) (i32.const 0)) @@ -238,42 +241,42 @@ (global $assembly/quat/sqlerp (mut i32) (i32.const 0)) (global $assembly/quat/matr (mut i32) (i32.const 0)) (global $assembly/quat/setAxes (mut i32) (i32.const 0)) - (global $assembly/quat2/getReal i32 (i32.const 1424)) - (global $assembly/quat2/setReal i32 (i32.const 1424)) - (global $assembly/quat2/mul i32 (i32.const 2112)) - (global $assembly/quat2/dot i32 (i32.const 1584)) - (global $assembly/quat2/length i32 (i32.const 1232)) - (global $assembly/quat2/len i32 (i32.const 1232)) - (global $assembly/quat2/squaredLength i32 (i32.const 1264)) - (global $assembly/quat2/sqrLen i32 (i32.const 1264)) - (global $assembly/mat4/perspective i32 (i32.const 2176)) - (global $assembly/mat4/ortho i32 (i32.const 2208)) - (global $assembly/mat4/mul i32 (i32.const 2240)) - (global $assembly/mat4/sub i32 (i32.const 2272)) - (global $assembly/mat3/mul i32 (i32.const 2304)) - (global $assembly/mat3/sub i32 (i32.const 2336)) - (global $assembly/vec2/len i32 (i32.const 2368)) - (global $assembly/vec2/sub i32 (i32.const 2400)) - (global $assembly/vec2/mul i32 (i32.const 2432)) - (global $assembly/vec2/div i32 (i32.const 2464)) - (global $assembly/vec2/dist i32 (i32.const 2496)) - (global $assembly/vec2/sqrDist i32 (i32.const 2528)) - (global $assembly/vec2/sqrLen i32 (i32.const 2560)) + (global $assembly/quat2/getReal i32 (i32.const 1456)) + (global $assembly/quat2/setReal i32 (i32.const 1456)) + (global $assembly/quat2/mul i32 (i32.const 2144)) + (global $assembly/quat2/dot i32 (i32.const 1616)) + (global $assembly/quat2/length i32 (i32.const 1264)) + (global $assembly/quat2/len i32 (i32.const 1264)) + (global $assembly/quat2/squaredLength i32 (i32.const 1296)) + (global $assembly/quat2/sqrLen i32 (i32.const 1296)) + (global $assembly/mat4/perspective i32 (i32.const 2208)) + (global $assembly/mat4/ortho i32 (i32.const 2240)) + (global $assembly/mat4/mul i32 (i32.const 2272)) + (global $assembly/mat4/sub i32 (i32.const 2304)) + (global $assembly/mat3/mul i32 (i32.const 2336)) + (global $assembly/mat3/sub i32 (i32.const 2368)) + (global $assembly/vec2/len i32 (i32.const 2400)) + (global $assembly/vec2/sub i32 (i32.const 2432)) + (global $assembly/vec2/mul i32 (i32.const 2464)) + (global $assembly/vec2/div i32 (i32.const 2496)) + (global $assembly/vec2/dist i32 (i32.const 2528)) + (global $assembly/vec2/sqrDist i32 (i32.const 2560)) + (global $assembly/vec2/sqrLen i32 (i32.const 2592)) (global $assembly/vec2/vec (mut i32) (i32.const 0)) (global $assembly/vec2/forEach (mut i32) (i32.const 0)) - (global $assembly/mat2/mul i32 (i32.const 2656)) - (global $assembly/mat2/sub i32 (i32.const 2688)) + (global $assembly/mat2/mul i32 (i32.const 2688)) + (global $assembly/mat2/sub i32 (i32.const 2720)) (global $~lib/util/number/_frc_plus (mut i64) (i64.const 0)) (global $~lib/util/number/_frc_minus (mut i64) (i64.const 0)) (global $~lib/util/number/_exp (mut i32) (i32.const 0)) (global $~lib/util/number/_K (mut i32) (i32.const 0)) (global $~lib/util/number/_frc_pow (mut i64) (i64.const 0)) (global $~lib/util/number/_exp_pow (mut i32) (i32.const 0)) - (global $assembly/mat4/Fov i32 (i32.const 27)) - (global $~lib/rt/__rtti_base i32 (i32.const 11440)) - (global $~lib/memory/__data_end i32 (i32.const 11676)) - (global $~lib/memory/__stack_pointer (mut i32) (i32.const 28060)) - (global $~lib/memory/__heap_base i32 (i32.const 28060)) + (global $assembly/mat4/Fov i32 (i32.const 28)) + (global $~lib/rt/__rtti_base i32 (i32.const 11472)) + (global $~lib/memory/__data_end i32 (i32.const 11716)) + (global $~lib/memory/__stack_pointer (mut i32) (i32.const 28100)) + (global $~lib/memory/__heap_base i32 (i32.const 28100)) (export "glMatrix.EPSILON" (global $assembly/common/EPSILON)) (export "glMatrix.RANDOM" (global $assembly/common/RANDOM)) (export "glMatrix.ANGLE_ORDER" (global $assembly/common/ANGLE_ORDER)) @@ -1145,6 +1148,291 @@ call $~lib/typedarray/Float64Array#__set local.get $0 ) + (func $~lib/math/NativeMath.hypot (param $0 f64) (param $1 f64) (result f64) + (local $2 i64) + (local $3 i64) + (local $4 i64) + (local $5 i32) + (local $6 i32) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + local.get $0 + i64.reinterpret_f64 + local.set $2 + local.get $1 + i64.reinterpret_f64 + local.set $3 + local.get $2 + i64.const 9223372036854775807 + i64.and + local.set $2 + local.get $3 + i64.const 9223372036854775807 + i64.and + local.set $3 + local.get $2 + local.get $3 + i64.lt_u + if + local.get $2 + local.set $4 + local.get $3 + local.set $2 + local.get $4 + local.set $3 + end + local.get $2 + i64.const 52 + i64.shr_u + i32.wrap_i64 + local.set $5 + local.get $3 + i64.const 52 + i64.shr_u + i32.wrap_i64 + local.set $6 + local.get $3 + f64.reinterpret_i64 + local.set $1 + local.get $6 + i32.const 2047 + i32.eq + if + local.get $1 + return + end + local.get $2 + f64.reinterpret_i64 + local.set $0 + local.get $5 + i32.const 2047 + i32.eq + if (result i32) + i32.const 1 + else + local.get $3 + i64.const 0 + i64.eq + end + if + local.get $0 + return + end + local.get $5 + local.get $6 + i32.sub + i32.const 64 + i32.gt_s + if + local.get $0 + local.get $1 + f64.add + return + end + f64.const 1 + local.set $7 + local.get $5 + i32.const 1023 + i32.const 510 + i32.add + i32.gt_s + if + f64.const 5260135901548373507240989e186 + local.set $7 + local.get $0 + f64.const 1.90109156629516e-211 + f64.mul + local.set $0 + local.get $1 + f64.const 1.90109156629516e-211 + f64.mul + local.set $1 + else + local.get $6 + i32.const 1023 + i32.const 450 + i32.sub + i32.lt_s + if + f64.const 1.90109156629516e-211 + local.set $7 + local.get $0 + f64.const 5260135901548373507240989e186 + f64.mul + local.set $0 + local.get $1 + f64.const 5260135901548373507240989e186 + f64.mul + local.set $1 + end + end + local.get $0 + f64.const 134217729 + f64.mul + local.set $8 + local.get $0 + local.get $8 + f64.sub + local.get $8 + f64.add + local.set $9 + local.get $0 + local.get $9 + f64.sub + local.set $10 + local.get $0 + local.get $0 + f64.mul + local.set $11 + local.get $9 + local.get $9 + f64.mul + local.get $11 + f64.sub + f64.const 2 + local.get $9 + f64.mul + local.get $10 + f64.add + local.get $10 + f64.mul + f64.add + local.set $12 + local.get $1 + f64.const 134217729 + f64.mul + local.set $8 + local.get $1 + local.get $8 + f64.sub + local.get $8 + f64.add + local.set $9 + local.get $1 + local.get $9 + f64.sub + local.set $10 + local.get $1 + local.get $1 + f64.mul + local.set $13 + local.get $9 + local.get $9 + f64.mul + local.get $13 + f64.sub + f64.const 2 + local.get $9 + f64.mul + local.get $10 + f64.add + local.get $10 + f64.mul + f64.add + local.set $14 + local.get $7 + local.get $14 + local.get $12 + f64.add + local.get $13 + f64.add + local.get $11 + f64.add + f64.sqrt + f64.mul + ) + (func $assembly/maths/Maths.max (param $0 f64) (param $1 f64) (param $2 f64) (result f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + local.get $1 + local.set $4 + local.get $2 + local.set $3 + local.get $4 + local.get $3 + f64.max + local.set $4 + local.get $0 + local.set $5 + local.get $4 + local.set $3 + local.get $5 + local.get $3 + f64.max + ) + (func $assembly/maths/Maths.hypot3 (param $0 f64) (param $1 f64) (param $2 f64) (result f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + local.get $0 + local.set $3 + local.get $3 + f64.abs + local.set $0 + local.get $1 + local.set $3 + local.get $3 + f64.abs + local.set $1 + local.get $2 + local.set $3 + local.get $3 + f64.abs + local.set $2 + i32.const 432 + drop + local.get $0 + local.get $1 + local.get $2 + call $assembly/maths/Maths.max + local.set $3 + local.get $3 + f64.const 0 + f64.eq + if + f64.const 0 + return + end + f64.const 1 + local.get $3 + f64.div + local.set $4 + local.get $0 + local.get $4 + f64.mul + local.set $0 + local.get $1 + local.get $4 + f64.mul + local.set $1 + local.get $2 + local.get $4 + f64.mul + local.set $2 + local.get $3 + local.get $0 + local.get $0 + f64.mul + local.get $1 + local.get $1 + f64.mul + f64.add + local.get $2 + local.get $2 + f64.mul + f64.add + local.set $5 + local.get $5 + f64.sqrt + f64.mul + ) (func $assembly/vec3/distance (param $0 i32) (param $1 i32) (result f64) (local $2 f64) (local $3 f64) @@ -1176,20 +1464,7 @@ local.get $2 local.get $3 local.get $4 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $assembly/imports/Maths.hypot + call $assembly/maths/Maths.hypot3 ) (func $assembly/vec3/squaredDistance (param $0 i32) (param $1 i32) (result f64) (local $2 f64) @@ -1250,20 +1525,7 @@ local.get $1 local.get $2 local.get $3 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $assembly/imports/Maths.hypot + call $assembly/maths/Maths.hypot3 ) (func $assembly/vec3/squaredLength (param $0 i32) (result f64) (local $1 f64) @@ -1353,7 +1615,7 @@ i32.eqz if i32.const 0 - i32.const 736 + i32.const 768 i32.const 159 i32.const 16 call $~lib/builtins/abort @@ -1419,7 +1681,7 @@ i32.eqz if i32.const 0 - i32.const 736 + i32.const 768 i32.const 127 i32.const 18 call $~lib/builtins/abort @@ -1436,7 +1698,7 @@ i32.eqz if i32.const 0 - i32.const 736 + i32.const 768 i32.const 131 i32.const 16 call $~lib/builtins/abort @@ -1459,7 +1721,7 @@ i32.gt_u if i32.const 144 - i32.const 864 + i32.const 896 i32.const 22 i32.const 28 call $~lib/builtins/abort @@ -1525,7 +1787,7 @@ i32.eqz if (result i32) i32.const 0 - i32.const 736 + i32.const 768 i32.const 147 i32.const 30 call $~lib/builtins/abort @@ -1651,7 +1913,7 @@ i32.eqz if i32.const 0 - i32.const 944 + i32.const 976 i32.const 268 i32.const 14 call $~lib/builtins/abort @@ -1671,7 +1933,7 @@ i32.eqz if i32.const 0 - i32.const 944 + i32.const 976 i32.const 270 i32.const 14 call $~lib/builtins/abort @@ -1734,7 +1996,7 @@ i32.eqz if i32.const 0 - i32.const 944 + i32.const 976 i32.const 284 i32.const 14 call $~lib/builtins/abort @@ -1866,7 +2128,7 @@ i32.eqz if i32.const 0 - i32.const 944 + i32.const 976 i32.const 201 i32.const 14 call $~lib/builtins/abort @@ -1883,7 +2145,7 @@ i32.eqz if i32.const 0 - i32.const 944 + i32.const 976 i32.const 203 i32.const 14 call $~lib/builtins/abort @@ -1963,7 +2225,7 @@ i32.eqz if i32.const 0 - i32.const 944 + i32.const 976 i32.const 221 i32.const 16 call $~lib/builtins/abort @@ -2006,7 +2268,7 @@ i32.eqz if i32.const 0 - i32.const 944 + i32.const 976 i32.const 233 i32.const 14 call $~lib/builtins/abort @@ -2024,7 +2286,7 @@ i32.eqz if i32.const 0 - i32.const 944 + i32.const 976 i32.const 234 i32.const 14 call $~lib/builtins/abort @@ -2092,7 +2354,7 @@ i32.eqz if i32.const 0 - i32.const 944 + i32.const 976 i32.const 251 i32.const 14 call $~lib/builtins/abort @@ -2197,7 +2459,7 @@ i32.eqz if i32.const 0 - i32.const 944 + i32.const 976 i32.const 377 i32.const 14 call $~lib/builtins/abort @@ -2240,7 +2502,7 @@ i32.eqz if i32.const 0 - i32.const 944 + i32.const 976 i32.const 384 i32.const 16 call $~lib/builtins/abort @@ -2273,7 +2535,7 @@ i32.eqz if i32.const 0 - i32.const 944 + i32.const 976 i32.const 397 i32.const 5 call $~lib/builtins/abort @@ -2516,7 +2778,7 @@ i32.eqz if i32.const 0 - i32.const 944 + i32.const 976 i32.const 559 i32.const 3 call $~lib/builtins/abort @@ -2738,7 +3000,7 @@ i32.eqz if i32.const 0 - i32.const 736 + i32.const 768 i32.const 228 i32.const 20 call $~lib/builtins/abort @@ -2846,8 +3108,8 @@ i32.const 1073741820 i32.ge_u if - i32.const 672 - i32.const 944 + i32.const 704 + i32.const 976 i32.const 458 i32.const 30 call $~lib/builtins/abort @@ -2931,7 +3193,7 @@ i32.eqz if i32.const 0 - i32.const 944 + i32.const 976 i32.const 330 i32.const 14 call $~lib/builtins/abort @@ -2996,7 +3258,7 @@ i32.eqz if i32.const 0 - i32.const 944 + i32.const 976 i32.const 343 i32.const 18 call $~lib/builtins/abort @@ -3147,7 +3409,7 @@ i32.eqz if i32.const 0 - i32.const 944 + i32.const 976 i32.const 357 i32.const 14 call $~lib/builtins/abort @@ -3256,7 +3518,7 @@ i32.eqz if i32.const 0 - i32.const 944 + i32.const 976 i32.const 496 i32.const 16 call $~lib/builtins/abort @@ -3276,7 +3538,7 @@ i32.eqz if i32.const 0 - i32.const 944 + i32.const 976 i32.const 498 i32.const 14 call $~lib/builtins/abort @@ -3535,8 +3797,8 @@ i32.const 1073741804 i32.ge_u if - i32.const 672 - i32.const 736 + i32.const 704 + i32.const 768 i32.const 260 i32.const 31 call $~lib/builtins/abort @@ -3595,7 +3857,7 @@ i32.eqz if i32.const 0 - i32.const 736 + i32.const 768 i32.const 294 i32.const 14 call $~lib/builtins/abort @@ -3673,7 +3935,7 @@ i32.const 3 i32.shr_u ) - (func $assembly/imports/Maths.min (param $0 i32) (param $1 i32) (result i32) + (func $assembly/maths/Maths.min (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.lt_s @@ -3684,7 +3946,7 @@ end ) (func $start:assembly/vec3~anonymous|0 (result i32) - i32.const 1008 + i32.const 1040 ) (func $start:assembly/vec3 memory.size @@ -3695,20 +3957,20 @@ i32.const 1 i32.shr_u global.set $~lib/rt/itcms/threshold - i32.const 784 + i32.const 816 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace - i32.const 816 + i32.const 848 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/toSpace - i32.const 896 + i32.const 928 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/fromSpace call $assembly/vec3/create global.set $assembly/vec3/vec i32.const 0 global.set $~argumentsLength - i32.const 1040 + i32.const 1072 i32.load call_indirect $0 (type $none_=>_i32) global.set $assembly/vec3/forEach @@ -3842,6 +4104,89 @@ call $~lib/typedarray/Float64Array#__set local.get $0 ) + (func $assembly/maths/Maths.hypot4 (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (result f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + local.get $0 + local.set $4 + local.get $4 + f64.abs + local.set $0 + local.get $1 + local.set $4 + local.get $4 + f64.abs + local.set $1 + local.get $2 + local.set $4 + local.get $4 + f64.abs + local.set $2 + local.get $3 + local.set $4 + local.get $4 + f64.abs + local.set $3 + local.get $0 + local.set $5 + local.get $1 + local.get $2 + local.get $3 + call $assembly/maths/Maths.max + local.set $4 + local.get $5 + local.get $4 + f64.max + local.set $5 + local.get $5 + f64.const 0 + f64.eq + if + f64.const 0 + return + end + f64.const 1 + local.get $5 + f64.div + local.set $4 + local.get $0 + local.get $4 + f64.mul + local.set $0 + local.get $1 + local.get $4 + f64.mul + local.set $1 + local.get $2 + local.get $4 + f64.mul + local.set $2 + local.get $3 + local.get $4 + f64.mul + local.set $3 + local.get $5 + local.get $0 + local.get $0 + f64.mul + local.get $1 + local.get $1 + f64.mul + f64.add + local.get $2 + local.get $2 + f64.mul + f64.add + local.get $3 + local.get $3 + f64.mul + f64.add + local.set $6 + local.get $6 + f64.sqrt + f64.mul + ) (func $assembly/vec4/distance (param $0 i32) (param $1 i32) (result f64) (local $2 f64) (local $3 f64) @@ -3883,19 +4228,7 @@ local.get $3 local.get $4 local.get $5 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $assembly/imports/Maths.hypot + call $assembly/maths/Maths.hypot4 ) (func $assembly/vec4/squaredDistance (param $0 i32) (param $1 i32) (result f64) (local $2 f64) @@ -3975,19 +4308,7 @@ local.get $2 local.get $3 local.get $4 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $assembly/imports/Maths.hypot + call $assembly/maths/Maths.hypot4 ) (func $assembly/vec4/squaredLength (param $0 i32) (result f64) (local $1 f64) @@ -4027,14 +4348,14 @@ f64.add ) (func $start:assembly/vec4~anonymous|0 (result i32) - i32.const 1296 + i32.const 1328 ) (func $start:assembly/vec4 call $assembly/vec4/create global.set $assembly/vec4/vec i32.const 0 global.set $~argumentsLength - i32.const 1328 + i32.const 1360 i32.load call_indirect $0 (type $none_=>_i32) global.set $assembly/vec4/forEach @@ -4707,7 +5028,7 @@ i64.const 63 i64.and local.set $4 - i32.const 1696 + i32.const 1728 local.get $3 i64.const 6 i64.shr_s @@ -6151,7 +6472,7 @@ local.get $0 ) (func $start:assembly/quat~anonymous|0 (result i32) - i32.const 1920 + i32.const 1952 ) (func $~lib/math/R (param $0 f64) (result f64) (local $1 f64) @@ -6515,7 +6836,7 @@ local.get $0 ) (func $start:assembly/quat~anonymous|1 (result i32) - i32.const 1984 + i32.const 2016 ) (func $assembly/quat/fromMat3 (param $0 i32) (param $1 i32) (result i32) (local $2 f64) @@ -6737,7 +7058,7 @@ local.get $0 ) (func $start:assembly/quat~anonymous|2 (result i32) - i32.const 2048 + i32.const 2080 ) (func $start:assembly/quat call $start:assembly/vec3 @@ -6756,7 +7077,7 @@ global.set $assembly/quat/yUnitVec3 i32.const 0 global.set $~argumentsLength - i32.const 1952 + i32.const 1984 i32.load call_indirect $0 (type $none_=>_i32) global.set $assembly/quat/rotationTo @@ -6766,7 +7087,7 @@ global.set $assembly/quat/temp2 i32.const 0 global.set $~argumentsLength - i32.const 2016 + i32.const 2048 i32.load call_indirect $0 (type $none_=>_i32) global.set $assembly/quat/sqlerp @@ -6774,7 +7095,7 @@ global.set $assembly/quat/matr i32.const 0 global.set $~argumentsLength - i32.const 2080 + i32.const 2112 i32.load call_indirect $0 (type $none_=>_i32) global.set $assembly/quat/setAxes @@ -7669,8 +7990,8 @@ call $~lib/typedarray/Float64Array#__set local.get $4 drop - i32.const 2144 - i32.const 2144 + i32.const 2176 + i32.const 2176 i32.eq if (result i32) local.get $4 @@ -8748,205 +9069,6 @@ (func $start:assembly/mat3 call $start:assembly/mat4 ) - (func $~lib/math/NativeMath.hypot (param $0 f64) (param $1 f64) (result f64) - (local $2 i64) - (local $3 i64) - (local $4 i64) - (local $5 i32) - (local $6 i32) - (local $7 f64) - (local $8 f64) - (local $9 f64) - (local $10 f64) - (local $11 f64) - (local $12 f64) - (local $13 f64) - (local $14 f64) - local.get $0 - i64.reinterpret_f64 - local.set $2 - local.get $1 - i64.reinterpret_f64 - local.set $3 - local.get $2 - i64.const 9223372036854775807 - i64.and - local.set $2 - local.get $3 - i64.const 9223372036854775807 - i64.and - local.set $3 - local.get $2 - local.get $3 - i64.lt_u - if - local.get $2 - local.set $4 - local.get $3 - local.set $2 - local.get $4 - local.set $3 - end - local.get $2 - i64.const 52 - i64.shr_u - i32.wrap_i64 - local.set $5 - local.get $3 - i64.const 52 - i64.shr_u - i32.wrap_i64 - local.set $6 - local.get $3 - f64.reinterpret_i64 - local.set $1 - local.get $6 - i32.const 2047 - i32.eq - if - local.get $1 - return - end - local.get $2 - f64.reinterpret_i64 - local.set $0 - local.get $5 - i32.const 2047 - i32.eq - if (result i32) - i32.const 1 - else - local.get $3 - i64.const 0 - i64.eq - end - if - local.get $0 - return - end - local.get $5 - local.get $6 - i32.sub - i32.const 64 - i32.gt_s - if - local.get $0 - local.get $1 - f64.add - return - end - f64.const 1 - local.set $7 - local.get $5 - i32.const 1023 - i32.const 510 - i32.add - i32.gt_s - if - f64.const 5260135901548373507240989e186 - local.set $7 - local.get $0 - f64.const 1.90109156629516e-211 - f64.mul - local.set $0 - local.get $1 - f64.const 1.90109156629516e-211 - f64.mul - local.set $1 - else - local.get $6 - i32.const 1023 - i32.const 450 - i32.sub - i32.lt_s - if - f64.const 1.90109156629516e-211 - local.set $7 - local.get $0 - f64.const 5260135901548373507240989e186 - f64.mul - local.set $0 - local.get $1 - f64.const 5260135901548373507240989e186 - f64.mul - local.set $1 - end - end - local.get $0 - f64.const 134217729 - f64.mul - local.set $8 - local.get $0 - local.get $8 - f64.sub - local.get $8 - f64.add - local.set $9 - local.get $0 - local.get $9 - f64.sub - local.set $10 - local.get $0 - local.get $0 - f64.mul - local.set $11 - local.get $9 - local.get $9 - f64.mul - local.get $11 - f64.sub - f64.const 2 - local.get $9 - f64.mul - local.get $10 - f64.add - local.get $10 - f64.mul - f64.add - local.set $12 - local.get $1 - f64.const 134217729 - f64.mul - local.set $8 - local.get $1 - local.get $8 - f64.sub - local.get $8 - f64.add - local.set $9 - local.get $1 - local.get $9 - f64.sub - local.set $10 - local.get $1 - local.get $1 - f64.mul - local.set $13 - local.get $9 - local.get $9 - f64.mul - local.get $13 - f64.sub - f64.const 2 - local.get $9 - f64.mul - local.get $10 - f64.add - local.get $10 - f64.mul - f64.add - local.set $14 - local.get $7 - local.get $14 - local.get $12 - f64.add - local.get $13 - f64.add - local.get $11 - f64.add - f64.sqrt - f64.mul - ) (func $assembly/vec2/length (param $0 i32) (result f64) (local $1 f64) (local $2 f64) @@ -9052,21 +9174,7 @@ local.set $3 local.get $2 local.get $3 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $assembly/imports/Maths.hypot + call $~lib/math/NativeMath.hypot ) (func $assembly/vec2/squaredDistance (param $0 i32) (param $1 i32) (result f64) (local $2 f64) @@ -9115,7 +9223,7 @@ f64.add ) (func $start:assembly/vec2~anonymous|0 (result i32) - i32.const 2592 + i32.const 2624 ) (func $start:assembly/vec2 call $start:assembly/mat3 @@ -9123,7 +9231,7 @@ global.set $assembly/vec2/vec i32.const 0 global.set $~argumentsLength - i32.const 2624 + i32.const 2656 i32.load call_indirect $0 (type $none_=>_i32) global.set $assembly/vec2/forEach @@ -9261,8 +9369,8 @@ call $start:assembly/mat2 ) (func $assembly/common/setMatrixArrayType (param $0 i32) - i32.const 2720 - i32.const 2784 + i32.const 2752 + i32.const 2816 i32.const 20 i32.const 3 call $~lib/builtins/abort @@ -9273,26 +9381,6 @@ global.get $assembly/common/degree f64.mul ) - (func $assembly/imports/Maths.max (param $0 f64) (param $1 f64) (param $2 f64) (result f64) - (local $3 f64) - (local $4 f64) - (local $5 f64) - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $4 - local.get $3 - f64.max - local.set $4 - local.get $0 - local.set $5 - local.get $4 - local.set $3 - local.get $5 - local.get $3 - f64.max - ) (func $assembly/common/equals (param $0 f64) (param $1 f64) (result i32) (local $2 f64) local.get $0 @@ -9311,7 +9399,7 @@ local.set $2 local.get $2 f64.abs - call $assembly/imports/Maths.max + call $assembly/maths/Maths.max f64.mul f64.le ) @@ -10054,7 +10142,7 @@ local.set $22 local.get $18 local.set $21 - i32.const 3952 + i32.const 3984 local.get $13 i32.const 2 i32.shl @@ -10195,7 +10283,7 @@ i32.add global.set $~lib/util/number/_K local.get $10 - i32.const 3952 + i32.const 3984 i32.const 0 local.get $13 i32.sub @@ -11576,14 +11664,14 @@ i32.const 100 i32.rem_u local.set $7 - i32.const 3992 + i32.const 4024 local.get $6 i32.const 2 i32.shl i32.add i64.load32_u local.set $8 - i32.const 3992 + i32.const 4024 local.get $7 i32.const 2 i32.shl @@ -11626,7 +11714,7 @@ i32.const 2 i32.sub local.set $2 - i32.const 3992 + i32.const 4024 local.get $10 i32.const 2 i32.shl @@ -11649,7 +11737,7 @@ i32.const 2 i32.sub local.set $2 - i32.const 3992 + i32.const 4024 local.get $1 i32.const 2 i32.shl @@ -12169,14 +12257,14 @@ i32.shl i32.sub global.set $~lib/util/number/_K - i32.const 3080 + i32.const 3112 local.get $14 i32.const 3 i32.shl i32.add i64.load global.set $~lib/util/number/_frc_pow - i32.const 3776 + i32.const 3808 local.get $14 i32.const 1 i32.shl @@ -12462,19 +12550,7 @@ local.get $0 i32.const 3 call $~lib/typedarray/Float64Array#__get - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $assembly/imports/Maths.hypot + call $assembly/maths/Maths.hypot4 ) (func $~lib/rt/__newBuffer (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -12650,7 +12726,7 @@ local.set $10 local.get $10 f64.abs - call $assembly/imports/Maths.max + call $assembly/maths/Maths.max f64.mul f64.le if (result i32) @@ -12670,7 +12746,7 @@ local.set $10 local.get $10 f64.abs - call $assembly/imports/Maths.max + call $assembly/maths/Maths.max f64.mul f64.le else @@ -12693,7 +12769,7 @@ local.set $10 local.get $10 f64.abs - call $assembly/imports/Maths.max + call $assembly/maths/Maths.max f64.mul f64.le else @@ -12716,7 +12792,7 @@ local.set $10 local.get $10 f64.abs - call $assembly/imports/Maths.max + call $assembly/maths/Maths.max f64.mul f64.le else @@ -13375,6 +13451,128 @@ call $~lib/typedarray/Float64Array#__set local.get $0 ) + (func $assembly/maths/Maths.hypot7 (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (result f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + local.get $0 + local.set $7 + local.get $7 + f64.abs + local.set $0 + local.get $1 + local.set $7 + local.get $7 + f64.abs + local.set $1 + local.get $2 + local.set $7 + local.get $7 + f64.abs + local.set $2 + local.get $3 + local.set $7 + local.get $7 + f64.abs + local.set $3 + local.get $4 + local.set $7 + local.get $7 + f64.abs + local.set $4 + local.get $5 + local.set $7 + local.get $7 + f64.abs + local.set $5 + local.get $6 + local.set $7 + local.get $7 + f64.abs + local.set $6 + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $assembly/maths/Maths.max + local.get $4 + local.get $5 + local.get $6 + call $assembly/maths/Maths.max + call $assembly/maths/Maths.max + local.set $7 + local.get $7 + f64.const 0 + f64.eq + if + f64.const 0 + return + end + f64.const 1 + local.get $7 + f64.div + local.set $8 + local.get $0 + local.get $8 + f64.mul + local.set $0 + local.get $1 + local.get $8 + f64.mul + local.set $1 + local.get $2 + local.get $8 + f64.mul + local.set $2 + local.get $3 + local.get $8 + f64.mul + local.set $3 + local.get $4 + local.get $8 + f64.mul + local.set $4 + local.get $5 + local.get $8 + f64.mul + local.set $5 + local.get $6 + local.get $8 + f64.mul + local.set $6 + local.get $7 + local.get $0 + local.get $0 + f64.mul + local.get $1 + local.get $1 + f64.mul + f64.add + local.get $2 + local.get $2 + f64.mul + f64.add + local.get $3 + local.get $3 + f64.mul + f64.add + local.get $4 + local.get $4 + f64.mul + f64.add + local.get $5 + local.get $5 + f64.mul + f64.add + local.get $6 + local.get $6 + f64.mul + f64.add + local.set $9 + local.get $9 + f64.sqrt + f64.mul + ) (func $assembly/mat2d/frob (param $0 i32) (result f64) local.get $0 i32.const 0 @@ -13395,16 +13593,7 @@ i32.const 5 call $~lib/typedarray/Float64Array#__get f64.const 1 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $assembly/imports/Maths.hypot + call $assembly/maths/Maths.hypot7 ) (func $assembly/mat2d/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 @@ -13737,7 +13926,7 @@ local.set $14 local.get $14 f64.abs - call $assembly/imports/Maths.max + call $assembly/maths/Maths.max f64.mul f64.le if (result i32) @@ -13757,7 +13946,7 @@ local.set $14 local.get $14 f64.abs - call $assembly/imports/Maths.max + call $assembly/maths/Maths.max f64.mul f64.le else @@ -13780,7 +13969,7 @@ local.set $14 local.get $14 f64.abs - call $assembly/imports/Maths.max + call $assembly/maths/Maths.max f64.mul f64.le else @@ -13803,7 +13992,7 @@ local.set $14 local.get $14 f64.abs - call $assembly/imports/Maths.max + call $assembly/maths/Maths.max f64.mul f64.le else @@ -13826,7 +14015,7 @@ local.set $14 local.get $14 f64.abs - call $assembly/imports/Maths.max + call $assembly/maths/Maths.max f64.mul f64.le else @@ -13849,7 +14038,7 @@ local.set $14 local.get $14 f64.abs - call $assembly/imports/Maths.max + call $assembly/maths/Maths.max f64.mul f64.le else @@ -15643,6 +15832,157 @@ call $~lib/typedarray/Float64Array#__set local.get $0 ) + (func $assembly/maths/Maths.hypot9 (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (param $7 f64) (param $8 f64) (result f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + local.get $0 + local.set $9 + local.get $9 + f64.abs + local.set $0 + local.get $1 + local.set $9 + local.get $9 + f64.abs + local.set $1 + local.get $2 + local.set $9 + local.get $9 + f64.abs + local.set $2 + local.get $3 + local.set $9 + local.get $9 + f64.abs + local.set $3 + local.get $4 + local.set $9 + local.get $9 + f64.abs + local.set $4 + local.get $5 + local.set $9 + local.get $9 + f64.abs + local.set $5 + local.get $6 + local.set $9 + local.get $9 + f64.abs + local.set $6 + local.get $7 + local.set $9 + local.get $9 + f64.abs + local.set $7 + local.get $8 + local.set $9 + local.get $9 + f64.abs + local.set $8 + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $assembly/maths/Maths.max + local.get $4 + local.get $5 + local.get $6 + call $assembly/maths/Maths.max + call $assembly/maths/Maths.max + local.get $7 + local.get $8 + call $assembly/maths/Maths.max + local.set $9 + local.get $9 + f64.const 0 + f64.eq + if + f64.const 0 + return + end + f64.const 1 + local.get $9 + f64.div + local.set $10 + local.get $0 + local.get $10 + f64.mul + local.set $0 + local.get $1 + local.get $10 + f64.mul + local.set $1 + local.get $2 + local.get $10 + f64.mul + local.set $2 + local.get $3 + local.get $10 + f64.mul + local.set $3 + local.get $4 + local.get $10 + f64.mul + local.set $4 + local.get $5 + local.get $10 + f64.mul + local.set $5 + local.get $6 + local.get $10 + f64.mul + local.set $6 + local.get $7 + local.get $10 + f64.mul + local.set $7 + local.get $8 + local.get $10 + f64.mul + local.set $8 + local.get $9 + local.get $0 + local.get $0 + f64.mul + local.get $1 + local.get $1 + f64.mul + f64.add + local.get $2 + local.get $2 + f64.mul + f64.add + local.get $3 + local.get $3 + f64.mul + f64.add + local.get $4 + local.get $4 + f64.mul + f64.add + local.get $5 + local.get $5 + f64.mul + f64.add + local.get $6 + local.get $6 + f64.mul + f64.add + local.get $7 + local.get $7 + f64.mul + f64.add + local.get $8 + local.get $8 + f64.mul + f64.add + local.set $11 + local.get $11 + f64.sqrt + f64.mul + ) (func $assembly/mat3/frob (param $0 i32) (result f64) local.get $0 i32.const 0 @@ -15671,14 +16011,7 @@ local.get $0 i32.const 8 call $~lib/typedarray/Float64Array#__get - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $assembly/imports/Maths.hypot + call $assembly/maths/Maths.hypot9 ) (func $assembly/mat3/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 @@ -16164,7 +16497,7 @@ local.set $20 local.get $20 f64.abs - call $assembly/imports/Maths.max + call $assembly/maths/Maths.max f64.mul f64.le if (result i32) @@ -16184,7 +16517,7 @@ local.set $20 local.get $20 f64.abs - call $assembly/imports/Maths.max + call $assembly/maths/Maths.max f64.mul f64.le else @@ -16207,7 +16540,7 @@ local.set $20 local.get $20 f64.abs - call $assembly/imports/Maths.max + call $assembly/maths/Maths.max f64.mul f64.le else @@ -16230,7 +16563,7 @@ local.set $20 local.get $20 f64.abs - call $assembly/imports/Maths.max + call $assembly/maths/Maths.max f64.mul f64.le else @@ -16253,7 +16586,7 @@ local.set $20 local.get $20 f64.abs - call $assembly/imports/Maths.max + call $assembly/maths/Maths.max f64.mul f64.le else @@ -16276,7 +16609,7 @@ local.set $20 local.get $20 f64.abs - call $assembly/imports/Maths.max + call $assembly/maths/Maths.max f64.mul f64.le else @@ -16299,7 +16632,7 @@ local.set $20 local.get $20 f64.abs - call $assembly/imports/Maths.max + call $assembly/maths/Maths.max f64.mul f64.le else @@ -16322,7 +16655,7 @@ local.set $20 local.get $20 f64.abs - call $assembly/imports/Maths.max + call $assembly/maths/Maths.max f64.mul f64.le else @@ -16345,7 +16678,7 @@ local.set $20 local.get $20 f64.abs - call $assembly/imports/Maths.max + call $assembly/maths/Maths.max f64.mul f64.le else @@ -18405,20 +18738,7 @@ local.get $4 local.get $5 local.get $6 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $assembly/imports/Maths.hypot + call $assembly/maths/Maths.hypot3 local.set $7 local.get $7 global.get $assembly/common/EPSILON @@ -19505,20 +19825,7 @@ local.get $3 local.get $4 local.get $5 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $assembly/imports/Maths.hypot + call $assembly/maths/Maths.hypot3 local.set $6 local.get $6 global.get $assembly/common/EPSILON @@ -20162,60 +20469,21 @@ local.get $2 local.get $3 local.get $4 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $assembly/imports/Maths.hypot + call $assembly/maths/Maths.hypot3 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 local.get $5 local.get $6 local.get $7 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $assembly/imports/Maths.hypot + call $assembly/maths/Maths.hypot3 call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 local.get $8 local.get $9 local.get $10 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $assembly/imports/Maths.hypot + call $assembly/maths/Maths.hypot3 call $~lib/typedarray/Float64Array#__set local.get $0 ) @@ -20303,60 +20571,21 @@ local.get $4 local.get $5 local.get $6 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $assembly/imports/Maths.hypot + call $assembly/maths/Maths.hypot3 call $~lib/typedarray/Float64Array#__set local.get $2 i32.const 1 local.get $7 local.get $8 local.get $9 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $assembly/imports/Maths.hypot + call $assembly/maths/Maths.hypot3 call $~lib/typedarray/Float64Array#__set local.get $2 i32.const 2 local.get $10 local.get $11 local.get $12 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $assembly/imports/Maths.hypot + call $assembly/maths/Maths.hypot3 call $~lib/typedarray/Float64Array#__set i32.const 1 f64.convert_i32_s @@ -21483,8 +21712,8 @@ call $~lib/typedarray/Float64Array#__set local.get $4 drop - i32.const 2144 - i32.const 2144 + i32.const 2176 + i32.const 2176 i32.eq if (result i32) local.get $4 @@ -21883,20 +22112,7 @@ local.get $10 local.get $11 local.get $12 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $assembly/imports/Maths.hypot + call $assembly/maths/Maths.hypot3 f64.div local.set $13 local.get $10 @@ -21938,20 +22154,7 @@ local.get $4 local.get $5 local.get $6 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $assembly/imports/Maths.hypot + call $assembly/maths/Maths.hypot3 local.set $13 local.get $13 i64.reinterpret_f64 @@ -22014,20 +22217,7 @@ local.get $7 local.get $8 local.get $9 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $assembly/imports/Maths.hypot + call $assembly/maths/Maths.hypot3 local.set $13 local.get $13 i64.reinterpret_f64 @@ -22399,6 +22589,255 @@ call $~lib/typedarray/Float64Array#__set local.get $0 ) + (func $assembly/maths/Maths.hypot16 (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (param $7 f64) (param $8 f64) (param $9 f64) (param $10 f64) (param $11 f64) (param $12 f64) (param $13 f64) (param $14 f64) (param $15 f64) (result f64) + (local $16 f64) + (local $17 f64) + (local $18 f64) + local.get $0 + local.set $16 + local.get $16 + f64.abs + local.set $0 + local.get $1 + local.set $16 + local.get $16 + f64.abs + local.set $1 + local.get $2 + local.set $16 + local.get $16 + f64.abs + local.set $2 + local.get $3 + local.set $16 + local.get $16 + f64.abs + local.set $3 + local.get $4 + local.set $16 + local.get $16 + f64.abs + local.set $4 + local.get $5 + local.set $16 + local.get $16 + f64.abs + local.set $5 + local.get $6 + local.set $16 + local.get $16 + f64.abs + local.set $6 + local.get $7 + local.set $16 + local.get $16 + f64.abs + local.set $7 + local.get $8 + local.set $16 + local.get $16 + f64.abs + local.set $8 + local.get $9 + local.set $16 + local.get $16 + f64.abs + local.set $9 + local.get $10 + local.set $16 + local.get $16 + f64.abs + local.set $10 + local.get $11 + local.set $16 + local.get $16 + f64.abs + local.set $11 + local.get $12 + local.set $16 + local.get $16 + f64.abs + local.set $12 + local.get $13 + local.set $16 + local.get $16 + f64.abs + local.set $13 + local.get $14 + local.set $16 + local.get $16 + f64.abs + local.set $14 + local.get $15 + local.set $16 + local.get $16 + f64.abs + local.set $15 + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $assembly/maths/Maths.max + local.get $4 + local.get $5 + local.get $6 + call $assembly/maths/Maths.max + call $assembly/maths/Maths.max + local.set $17 + local.get $7 + local.get $8 + local.get $9 + call $assembly/maths/Maths.max + local.get $10 + local.get $11 + local.get $12 + call $assembly/maths/Maths.max + local.get $13 + local.get $14 + local.get $15 + call $assembly/maths/Maths.max + call $assembly/maths/Maths.max + local.set $16 + local.get $17 + local.get $16 + f64.max + local.set $17 + local.get $17 + f64.const 0 + f64.eq + if + f64.const 0 + return + end + f64.const 1 + local.get $17 + f64.div + local.set $16 + local.get $0 + local.get $16 + f64.mul + local.set $0 + local.get $1 + local.get $16 + f64.mul + local.set $1 + local.get $2 + local.get $16 + f64.mul + local.set $2 + local.get $3 + local.get $16 + f64.mul + local.set $3 + local.get $4 + local.get $16 + f64.mul + local.set $4 + local.get $5 + local.get $16 + f64.mul + local.set $5 + local.get $6 + local.get $16 + f64.mul + local.set $6 + local.get $7 + local.get $16 + f64.mul + local.set $7 + local.get $9 + local.get $16 + f64.mul + local.set $9 + local.get $10 + local.get $16 + f64.mul + local.set $10 + local.get $11 + local.get $16 + f64.mul + local.set $11 + local.get $12 + local.get $16 + f64.mul + local.set $12 + local.get $13 + local.get $16 + f64.mul + local.set $13 + local.get $14 + local.get $16 + f64.mul + local.set $14 + local.get $15 + local.get $16 + f64.mul + local.set $15 + local.get $17 + local.get $0 + local.get $0 + f64.mul + local.get $1 + local.get $1 + f64.mul + f64.add + local.get $2 + local.get $2 + f64.mul + f64.add + local.get $3 + local.get $3 + f64.mul + f64.add + local.get $4 + local.get $4 + f64.mul + f64.add + local.get $5 + local.get $5 + f64.mul + f64.add + local.get $6 + local.get $6 + f64.mul + f64.add + local.get $7 + local.get $7 + f64.mul + f64.add + local.get $8 + local.get $8 + f64.mul + f64.add + local.get $9 + local.get $9 + f64.mul + f64.add + local.get $10 + local.get $10 + f64.mul + f64.add + local.get $12 + local.get $12 + f64.mul + f64.add + local.get $13 + local.get $13 + f64.mul + f64.add + local.get $14 + local.get $14 + f64.mul + f64.add + local.get $15 + local.get $15 + f64.mul + f64.add + local.set $18 + local.get $18 + f64.sqrt + f64.mul + ) (func $assembly/mat4/frob (param $0 i32) (result f64) local.get $0 i32.const 0 @@ -22448,7 +22887,7 @@ local.get $0 i32.const 15 call $~lib/typedarray/Float64Array#__get - call $assembly/imports/Maths.hypot + call $assembly/maths/Maths.hypot16 ) (func $assembly/mat4/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 @@ -23291,7 +23730,7 @@ local.set $34 local.get $34 f64.abs - call $assembly/imports/Maths.max + call $assembly/maths/Maths.max f64.mul f64.le if (result i32) @@ -23311,7 +23750,7 @@ local.set $34 local.get $34 f64.abs - call $assembly/imports/Maths.max + call $assembly/maths/Maths.max f64.mul f64.le else @@ -23334,7 +23773,7 @@ local.set $34 local.get $34 f64.abs - call $assembly/imports/Maths.max + call $assembly/maths/Maths.max f64.mul f64.le else @@ -23357,7 +23796,7 @@ local.set $34 local.get $34 f64.abs - call $assembly/imports/Maths.max + call $assembly/maths/Maths.max f64.mul f64.le else @@ -23380,7 +23819,7 @@ local.set $34 local.get $34 f64.abs - call $assembly/imports/Maths.max + call $assembly/maths/Maths.max f64.mul f64.le else @@ -23403,7 +23842,7 @@ local.set $34 local.get $34 f64.abs - call $assembly/imports/Maths.max + call $assembly/maths/Maths.max f64.mul f64.le else @@ -23426,7 +23865,7 @@ local.set $34 local.get $34 f64.abs - call $assembly/imports/Maths.max + call $assembly/maths/Maths.max f64.mul f64.le else @@ -23449,7 +23888,7 @@ local.set $34 local.get $34 f64.abs - call $assembly/imports/Maths.max + call $assembly/maths/Maths.max f64.mul f64.le else @@ -23472,7 +23911,7 @@ local.set $34 local.get $34 f64.abs - call $assembly/imports/Maths.max + call $assembly/maths/Maths.max f64.mul f64.le else @@ -23495,7 +23934,7 @@ local.set $34 local.get $34 f64.abs - call $assembly/imports/Maths.max + call $assembly/maths/Maths.max f64.mul f64.le else @@ -23518,7 +23957,7 @@ local.set $34 local.get $34 f64.abs - call $assembly/imports/Maths.max + call $assembly/maths/Maths.max f64.mul f64.le else @@ -23541,7 +23980,7 @@ local.set $34 local.get $34 f64.abs - call $assembly/imports/Maths.max + call $assembly/maths/Maths.max f64.mul f64.le else @@ -23564,7 +24003,7 @@ local.set $34 local.get $34 f64.abs - call $assembly/imports/Maths.max + call $assembly/maths/Maths.max f64.mul f64.le else @@ -23587,7 +24026,7 @@ local.set $34 local.get $34 f64.abs - call $assembly/imports/Maths.max + call $assembly/maths/Maths.max f64.mul f64.le else @@ -23610,7 +24049,7 @@ local.set $34 local.get $34 f64.abs - call $assembly/imports/Maths.max + call $assembly/maths/Maths.max f64.mul f64.le else @@ -23633,7 +24072,7 @@ local.set $34 local.get $34 f64.abs - call $assembly/imports/Maths.max + call $assembly/maths/Maths.max f64.mul f64.le else @@ -24140,7 +24579,7 @@ i64.sub i64.shl local.set $9 - i32.const 4592 + i32.const 4624 local.get $8 i32.const 3 i32.shl @@ -24148,7 +24587,7 @@ i64.load f64.reinterpret_i64 local.set $10 - i32.const 4592 + i32.const 4624 local.get $8 i32.const 3 i32.shl @@ -25171,7 +25610,7 @@ i64.and i64.sub local.set $16 - i32.const 6640 + i32.const 6672 local.get $14 i32.const 1 i32.const 3 @@ -25180,7 +25619,7 @@ i32.add f64.load local.set $11 - i32.const 6640 + i32.const 6672 local.get $14 i32.const 1 i32.const 3 @@ -25192,7 +25631,7 @@ local.get $16 f64.reinterpret_i64 local.set $9 - i32.const 8688 + i32.const 8720 local.get $14 i32.const 1 i32.const 3 @@ -25201,7 +25640,7 @@ i32.add f64.load local.set $8 - i32.const 8688 + i32.const 8720 local.get $14 i32.const 1 i32.const 3 @@ -27290,20 +27729,7 @@ local.get $2 i32.const 2 call $~lib/typedarray/Float64Array#__get - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $assembly/imports/Maths.hypot + call $assembly/maths/Maths.hypot3 local.set $4 local.get $3 f64.const 0.5 @@ -28266,7 +28692,7 @@ local.set $18 local.get $18 f64.abs - call $assembly/imports/Maths.max + call $assembly/maths/Maths.max f64.mul f64.le if (result i32) @@ -28286,7 +28712,7 @@ local.set $18 local.get $18 f64.abs - call $assembly/imports/Maths.max + call $assembly/maths/Maths.max f64.mul f64.le else @@ -28309,7 +28735,7 @@ local.set $18 local.get $18 f64.abs - call $assembly/imports/Maths.max + call $assembly/maths/Maths.max f64.mul f64.le else @@ -28332,7 +28758,7 @@ local.set $18 local.get $18 f64.abs - call $assembly/imports/Maths.max + call $assembly/maths/Maths.max f64.mul f64.le else @@ -28355,7 +28781,7 @@ local.set $18 local.get $18 f64.abs - call $assembly/imports/Maths.max + call $assembly/maths/Maths.max f64.mul f64.le else @@ -28378,7 +28804,7 @@ local.set $18 local.get $18 f64.abs - call $assembly/imports/Maths.max + call $assembly/maths/Maths.max f64.mul f64.le else @@ -28401,7 +28827,7 @@ local.set $18 local.get $18 f64.abs - call $assembly/imports/Maths.max + call $assembly/maths/Maths.max f64.mul f64.le else @@ -28424,7 +28850,7 @@ local.set $18 local.get $18 f64.abs - call $assembly/imports/Maths.max + call $assembly/maths/Maths.max f64.mul f64.le else @@ -29285,7 +29711,7 @@ local.set $6 local.get $6 f64.abs - call $assembly/imports/Maths.max + call $assembly/maths/Maths.max f64.mul f64.le if (result i32) @@ -29305,7 +29731,7 @@ local.set $6 local.get $6 f64.abs - call $assembly/imports/Maths.max + call $assembly/maths/Maths.max f64.mul f64.le else @@ -30573,8 +30999,8 @@ i32.shr_u i32.gt_u if - i32.const 560 - i32.const 11216 + i32.const 592 + i32.const 11248 i32.const 14 i32.const 48 call $~lib/builtins/abort @@ -30647,7 +31073,7 @@ i32.lt_s if i32.const 144 - i32.const 11216 + i32.const 11248 i32.const 108 i32.const 22 call $~lib/builtins/abort @@ -30678,7 +31104,7 @@ i32.ge_u if i32.const 144 - i32.const 11216 + i32.const 11248 i32.const 92 i32.const 42 call $~lib/builtins/abort @@ -30894,7 +31320,7 @@ local.set $8 local.get $8 f64.abs - call $assembly/imports/Maths.max + call $assembly/maths/Maths.max f64.mul f64.le if (result i32) @@ -30914,7 +31340,7 @@ local.set $8 local.get $8 f64.abs - call $assembly/imports/Maths.max + call $assembly/maths/Maths.max f64.mul f64.le else @@ -30937,7 +31363,7 @@ local.set $8 local.get $8 f64.abs - call $assembly/imports/Maths.max + call $assembly/maths/Maths.max f64.mul f64.le else @@ -32001,7 +32427,7 @@ local.set $10 local.get $10 f64.abs - call $assembly/imports/Maths.max + call $assembly/maths/Maths.max f64.mul f64.le if (result i32) @@ -32021,7 +32447,7 @@ local.set $10 local.get $10 f64.abs - call $assembly/imports/Maths.max + call $assembly/maths/Maths.max f64.mul f64.le else @@ -32044,7 +32470,7 @@ local.set $10 local.get $10 f64.abs - call $assembly/imports/Maths.max + call $assembly/maths/Maths.max f64.mul f64.le else @@ -32067,7 +32493,7 @@ local.set $10 local.get $10 f64.abs - call $assembly/imports/Maths.max + call $assembly/maths/Maths.max f64.mul f64.le else @@ -32079,10 +32505,10 @@ i32.const 144 local.get $0 call $~lib/rt/itcms/__visit - i32.const 560 + i32.const 592 local.get $0 call $~lib/rt/itcms/__visit - i32.const 672 + i32.const 704 local.get $0 call $~lib/rt/itcms/__visit global.get $assembly/common/ANGLE_ORDER @@ -32194,6 +32620,17 @@ local.get $1 call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>#__visit ) + (func $~lib/function/Function<%28f64%2Cf64%29=>f64>#__visit (param $0 i32) (param $1 i32) + local.get $0 + i32.load offset=4 + local.get $1 + call $~lib/rt/itcms/__visit + ) + (func $~lib/function/Function<%28f64%2Cf64%29=>f64>~visit (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/function/Function<%28f64%2Cf64%29=>f64>#__visit + ) (func $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>f64>#__visit (param $0 i32) (param $1 i32) local.get $0 i32.load offset=4 @@ -32482,40 +32919,46 @@ block $assembly/imports/IArguments block $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>f64> block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>f64> - block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> - block $~lib/typedarray/Float64Array - block $~lib/function/Function<%28%29=>f64> - block $~lib/arraybuffer/ArrayBufferView - block $~lib/string/String - block $~lib/arraybuffer/ArrayBuffer - local.get $0 - i32.const 8 - i32.sub - i32.load - br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/arraybuffer/ArrayBufferView $~lib/function/Function<%28%29=>f64> $~lib/typedarray/Float64Array $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>f64> $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>f64> $assembly/imports/IArguments $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28f64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>bool> $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/object/Object $~lib/array/Array<~lib/typedarray/Float64Array> $~lib/array/Array $assembly/mat4/Fov $~lib/array/Array $invalid + block $~lib/function/Function<%28f64%2Cf64%29=>f64> + block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> + block $~lib/typedarray/Float64Array + block $~lib/function/Function<%28%29=>f64> + block $~lib/arraybuffer/ArrayBufferView + block $~lib/string/String + block $~lib/arraybuffer/ArrayBuffer + local.get $0 + i32.const 8 + i32.sub + i32.load + br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/arraybuffer/ArrayBufferView $~lib/function/Function<%28%29=>f64> $~lib/typedarray/Float64Array $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28f64%2Cf64%29=>f64> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>f64> $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>f64> $assembly/imports/IArguments $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28f64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>bool> $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/object/Object $~lib/array/Array<~lib/typedarray/Float64Array> $~lib/array/Array $assembly/mat4/Fov $~lib/array/Array $invalid + end + return end return end + local.get $0 + local.get $1 + call $~lib/arraybuffer/ArrayBufferView~visit return end local.get $0 local.get $1 - call $~lib/arraybuffer/ArrayBufferView~visit + call $~lib/function/Function<%28%29=>f64>~visit return end local.get $0 local.get $1 - call $~lib/function/Function<%28%29=>f64>~visit + call $~lib/typedarray/Float64Array~visit return end local.get $0 local.get $1 - call $~lib/typedarray/Float64Array~visit + call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>~visit return end local.get $0 local.get $1 - call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>~visit + call $~lib/function/Function<%28f64%2Cf64%29=>f64>~visit return end local.get $0 @@ -32638,8 +33081,8 @@ global.get $~lib/memory/__data_end i32.lt_s if - i32.const 28080 i32.const 28128 + i32.const 28176 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -32680,7 +33123,7 @@ i32.add local.get $0 call $~lib/typedarray/Float64Array#get:length - call $assembly/imports/Maths.min + call $assembly/maths/Maths.min local.set $7 else local.get $0 @@ -32837,7 +33280,7 @@ i32.add local.get $0 call $~lib/typedarray/Float64Array#get:length - call $assembly/imports/Maths.min + call $assembly/maths/Maths.min local.set $7 else local.get $0 @@ -33420,7 +33863,7 @@ i32.add local.get $0 call $~lib/typedarray/Float64Array#get:length - call $assembly/imports/Maths.min + call $assembly/maths/Maths.min local.set $7 else local.get $0 @@ -33548,7 +33991,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store offset=56 - i32.const 2848 + i32.const 2880 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -33570,7 +34013,7 @@ local.get $1 i32.store offset=48 local.get $1 - i32.const 4448 + i32.const 4480 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -33598,7 +34041,7 @@ local.get $1 i32.store offset=32 local.get $1 - i32.const 4448 + i32.const 4480 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -33626,7 +34069,7 @@ local.get $1 i32.store offset=16 local.get $1 - i32.const 4448 + i32.const 4480 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -33654,7 +34097,7 @@ local.get $1 i32.store local.get $1 - i32.const 4480 + i32.const 4512 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -33711,7 +34154,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store offset=88 - i32.const 4512 + i32.const 4544 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -33733,7 +34176,7 @@ local.get $1 i32.store offset=80 local.get $1 - i32.const 4448 + i32.const 4480 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -33761,7 +34204,7 @@ local.get $1 i32.store offset=64 local.get $1 - i32.const 4448 + i32.const 4480 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -33789,7 +34232,7 @@ local.get $1 i32.store offset=48 local.get $1 - i32.const 4448 + i32.const 4480 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -33817,7 +34260,7 @@ local.get $1 i32.store offset=32 local.get $1 - i32.const 4448 + i32.const 4480 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -33845,7 +34288,7 @@ local.get $1 i32.store offset=16 local.get $1 - i32.const 4448 + i32.const 4480 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -33873,7 +34316,7 @@ local.get $1 i32.store local.get $1 - i32.const 4480 + i32.const 4512 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -33948,7 +34391,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store offset=136 - i32.const 4544 + i32.const 4576 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -33970,7 +34413,7 @@ local.get $1 i32.store offset=128 local.get $1 - i32.const 4448 + i32.const 4480 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -33998,7 +34441,7 @@ local.get $1 i32.store offset=112 local.get $1 - i32.const 4448 + i32.const 4480 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34026,7 +34469,7 @@ local.get $1 i32.store offset=96 local.get $1 - i32.const 4448 + i32.const 4480 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34054,7 +34497,7 @@ local.get $1 i32.store offset=80 local.get $1 - i32.const 4448 + i32.const 4480 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34082,7 +34525,7 @@ local.get $1 i32.store offset=64 local.get $1 - i32.const 4448 + i32.const 4480 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34110,7 +34553,7 @@ local.get $1 i32.store offset=48 local.get $1 - i32.const 4448 + i32.const 4480 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34138,7 +34581,7 @@ local.get $1 i32.store offset=32 local.get $1 - i32.const 4448 + i32.const 4480 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34166,7 +34609,7 @@ local.get $1 i32.store offset=16 local.get $1 - i32.const 4448 + i32.const 4480 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34194,7 +34637,7 @@ local.get $1 i32.store local.get $1 - i32.const 4480 + i32.const 4512 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34311,7 +34754,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store offset=248 - i32.const 4576 + i32.const 4608 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34333,7 +34776,7 @@ local.get $1 i32.store offset=240 local.get $1 - i32.const 4448 + i32.const 4480 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34361,7 +34804,7 @@ local.get $1 i32.store offset=224 local.get $1 - i32.const 4448 + i32.const 4480 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34389,7 +34832,7 @@ local.get $1 i32.store offset=208 local.get $1 - i32.const 4448 + i32.const 4480 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34417,7 +34860,7 @@ local.get $1 i32.store offset=192 local.get $1 - i32.const 4448 + i32.const 4480 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34445,7 +34888,7 @@ local.get $1 i32.store offset=176 local.get $1 - i32.const 4448 + i32.const 4480 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34473,7 +34916,7 @@ local.get $1 i32.store offset=160 local.get $1 - i32.const 4448 + i32.const 4480 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34501,7 +34944,7 @@ local.get $1 i32.store offset=144 local.get $1 - i32.const 4448 + i32.const 4480 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34529,7 +34972,7 @@ local.get $1 i32.store offset=128 local.get $1 - i32.const 4448 + i32.const 4480 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34557,7 +35000,7 @@ local.get $1 i32.store offset=112 local.get $1 - i32.const 4448 + i32.const 4480 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34585,7 +35028,7 @@ local.get $1 i32.store offset=96 local.get $1 - i32.const 4448 + i32.const 4480 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34613,7 +35056,7 @@ local.get $1 i32.store offset=80 local.get $1 - i32.const 4448 + i32.const 4480 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34641,7 +35084,7 @@ local.get $1 i32.store offset=64 local.get $1 - i32.const 4448 + i32.const 4480 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34669,7 +35112,7 @@ local.get $1 i32.store offset=48 local.get $1 - i32.const 4448 + i32.const 4480 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34697,7 +35140,7 @@ local.get $1 i32.store offset=32 local.get $1 - i32.const 4448 + i32.const 4480 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34725,7 +35168,7 @@ local.get $1 i32.store offset=16 local.get $1 - i32.const 4448 + i32.const 4480 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34753,7 +35196,7 @@ local.get $1 i32.store local.get $1 - i32.const 4480 + i32.const 4512 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34819,7 +35262,7 @@ call $~lib/math/NativeMath.cos local.set $11 local.get $4 - i32.const 10768 + i32.const 10800 i32.eq if local.get $0 @@ -34880,7 +35323,7 @@ call $~lib/typedarray/Float64Array#__set else local.get $4 - i32.const 10800 + i32.const 10832 i32.eq if local.get $0 @@ -34941,7 +35384,7 @@ call $~lib/typedarray/Float64Array#__set else local.get $4 - i32.const 10832 + i32.const 10864 i32.eq if local.get $0 @@ -35002,7 +35445,7 @@ call $~lib/typedarray/Float64Array#__set else local.get $4 - i32.const 10864 + i32.const 10896 i32.eq if local.get $0 @@ -35063,7 +35506,7 @@ call $~lib/typedarray/Float64Array#__set else local.get $4 - i32.const 10896 + i32.const 10928 i32.eq if local.get $0 @@ -35184,7 +35627,7 @@ f64.add call $~lib/typedarray/Float64Array#__set else - i32.const 10928 + i32.const 10960 local.set $12 global.get $~lib/memory/__stack_pointer local.get $12 @@ -35192,7 +35635,7 @@ local.get $12 local.get $4 call $~lib/string/String.__concat - i32.const 10992 + i32.const 11024 i32.const 512 i32.const 10 call $~lib/builtins/abort @@ -35242,7 +35685,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store offset=56 - i32.const 11056 + i32.const 11088 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35264,7 +35707,7 @@ local.get $1 i32.store offset=48 local.get $1 - i32.const 4448 + i32.const 4480 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35292,7 +35735,7 @@ local.get $1 i32.store offset=32 local.get $1 - i32.const 4448 + i32.const 4480 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35320,7 +35763,7 @@ local.get $1 i32.store offset=16 local.get $1 - i32.const 4448 + i32.const 4480 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35348,7 +35791,7 @@ local.get $1 i32.store local.get $1 - i32.const 4480 + i32.const 4512 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35417,7 +35860,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store offset=120 - i32.const 11088 + i32.const 11120 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35439,7 +35882,7 @@ local.get $1 i32.store offset=112 local.get $1 - i32.const 4448 + i32.const 4480 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35467,7 +35910,7 @@ local.get $1 i32.store offset=96 local.get $1 - i32.const 4448 + i32.const 4480 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35495,7 +35938,7 @@ local.get $1 i32.store offset=80 local.get $1 - i32.const 4448 + i32.const 4480 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35523,7 +35966,7 @@ local.get $1 i32.store offset=64 local.get $1 - i32.const 4448 + i32.const 4480 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35551,7 +35994,7 @@ local.get $1 i32.store offset=48 local.get $1 - i32.const 4448 + i32.const 4480 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35579,7 +36022,7 @@ local.get $1 i32.store offset=32 local.get $1 - i32.const 4448 + i32.const 4480 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35607,7 +36050,7 @@ local.get $1 i32.store offset=16 local.get $1 - i32.const 4448 + i32.const 4480 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35635,7 +36078,7 @@ local.get $1 i32.store local.get $1 - i32.const 4480 + i32.const 4512 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35668,7 +36111,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store offset=24 - i32.const 11120 + i32.const 11152 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35690,7 +36133,7 @@ local.get $1 i32.store offset=16 local.get $1 - i32.const 4448 + i32.const 4480 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35718,7 +36161,7 @@ local.get $1 i32.store local.get $1 - i32.const 4480 + i32.const 4512 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35757,7 +36200,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store offset=40 - i32.const 11392 + i32.const 11424 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35779,7 +36222,7 @@ local.get $1 i32.store offset=32 local.get $1 - i32.const 4448 + i32.const 4480 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35807,7 +36250,7 @@ local.get $1 i32.store offset=16 local.get $1 - i32.const 4448 + i32.const 4480 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35835,7 +36278,7 @@ local.get $1 i32.store local.get $1 - i32.const 4480 + i32.const 4512 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35880,7 +36323,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store offset=56 - i32.const 11424 + i32.const 11456 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35902,7 +36345,7 @@ local.get $1 i32.store offset=48 local.get $1 - i32.const 4448 + i32.const 4480 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35930,7 +36373,7 @@ local.get $1 i32.store offset=32 local.get $1 - i32.const 4448 + i32.const 4480 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35958,7 +36401,7 @@ local.get $1 i32.store offset=16 local.get $1 - i32.const 4448 + i32.const 4480 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35986,7 +36429,7 @@ local.get $1 i32.store local.get $1 - i32.const 4480 + i32.const 4512 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -36036,8 +36479,8 @@ i32.shr_u i32.gt_u if - i32.const 560 - i32.const 608 + i32.const 592 + i32.const 640 i32.const 18 i32.const 57 call $~lib/builtins/abort @@ -36595,7 +37038,7 @@ f64.const 0 f64.eq if - i32.const 2880 + i32.const 2912 local.set $3 global.get $~lib/memory/__stack_pointer i32.const 4 @@ -36615,7 +37058,7 @@ local.get $0 f64.ne if - i32.const 2912 + i32.const 2944 local.set $3 global.get $~lib/memory/__stack_pointer i32.const 4 @@ -36624,8 +37067,8 @@ local.get $3 return end - i32.const 2944 - i32.const 2992 + i32.const 2976 + i32.const 3024 local.get $0 f64.const 0 f64.lt @@ -36638,7 +37081,7 @@ local.get $3 return end - i32.const 3024 + i32.const 3056 local.get $0 call $~lib/util/number/dtoa_core i32.const 1 @@ -36651,7 +37094,7 @@ local.tee $2 i32.store local.get $2 - i32.const 3024 + i32.const 3056 local.get $1 call $~lib/memory/memory.copy local.get $2 @@ -36694,7 +37137,7 @@ i32.const 0 i32.eq if - i32.const 4416 + i32.const 4448 local.set $6 global.get $~lib/memory/__stack_pointer i32.const 4 @@ -36830,7 +37273,7 @@ global.get $~lib/memory/__stack_pointer i32.const 3 i32.const 2 - i32.const 25 + i32.const 26 i32.const 0 call $~lib/rt/__newArray local.tee $4 @@ -37174,7 +37617,7 @@ if global.get $~lib/memory/__stack_pointer i32.const 32 - i32.const 27 + i32.const 28 call $~lib/rt/itcms/__new local.tee $0 i32.store @@ -38512,16 +38955,16 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.const 3 - i32.const 28 - i32.const 11152 + i32.const 29 + i32.const 11184 call $~lib/rt/__newArray local.tee $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 0 i32.const 3 - i32.const 28 - i32.const 11184 + i32.const 29 + i32.const 11216 call $~lib/rt/__newArray local.tee $6 i32.store offset=4 @@ -38647,16 +39090,16 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.const 3 - i32.const 28 - i32.const 11264 + i32.const 29 + i32.const 11296 call $~lib/rt/__newArray local.tee $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 0 i32.const 3 - i32.const 28 - i32.const 11296 + i32.const 29 + i32.const 11328 call $~lib/rt/__newArray local.tee $6 i32.store offset=4 @@ -38782,16 +39225,16 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.const 3 - i32.const 28 - i32.const 11328 + i32.const 29 + i32.const 11360 call $~lib/rt/__newArray local.tee $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 0 i32.const 3 - i32.const 28 - i32.const 11360 + i32.const 29 + i32.const 11392 call $~lib/rt/__newArray local.tee $6 i32.store offset=4 diff --git a/dist/gl-matrix-min.js b/dist/gl-matrix-min.js deleted file mode 100644 index 42c5551e..00000000 --- a/dist/gl-matrix-min.js +++ /dev/null @@ -1,28 +0,0 @@ -/*! -@fileoverview gl-matrix - High performance matrix and vector operations -@author Brandon Jones -@author Colin MacKenzie IV -@version 3.3.0 - -Copyright (c) 2015-2021, Brandon Jones, Colin MacKenzie IV. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -*/ -!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).glMatrix={})}(this,(function(t){"use strict";var n;!function(t){t.min=function(t,n){return t0?(m=2*Math.sqrt(b+1),t[3]=.25*m,t[0]=(h-l)/m,t[1]=(M-c)/m,t[2]=(i-s)/m):o>f&&o>v?(m=2*Math.sqrt(1+o-f-v),t[3]=(h-l)/m,t[0]=.25*m,t[1]=(i+s)/m,t[2]=(M+c)/m):f>v?(m=2*Math.sqrt(1+f-o-v),t[3]=(M-c)/m,t[0]=(i+s)/m,t[1]=.25*m,t[2]=(h+l)/m):(m=2*Math.sqrt(1+v-o-f),t[3]=(i-s)/m,t[0]=(M+c)/m,t[1]=(h+l)/m,t[2]=.25*m),t}function O(t,n,r,a,u){var e=1/Math.tan(n/2);if(t[0]=e/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,"number"==typeof u&&u!==1/0){var o=1/(a-u);t[10]=(u+a)*o,t[14]=2*u*a*o}else t[10]=-1,t[14]=-2*a;return t}var R=O;function j(t,n,r,a,u,e,o){var i=1/(n-r),c=1/(a-u),s=1/(e-o);return t[0]=-2*i,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*c,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*s,t[11]=0,t[12]=(n+r)*i,t[13]=(u+a)*c,t[14]=(o+e)*s,t[15]=1,t}var E=j;function P(t,n,r){return t[0]=n[0]-r[0],t[1]=n[1]-r[1],t[2]=n[2]-r[2],t[3]=n[3]-r[3],t[4]=n[4]-r[4],t[5]=n[5]-r[5],t[6]=n[6]-r[6],t[7]=n[7]-r[7],t[8]=n[8]-r[8],t[9]=n[9]-r[9],t[10]=n[10]-r[10],t[11]=n[11]-r[11],t[12]=n[12]-r[12],t[13]=n[13]-r[13],t[14]=n[14]-r[14],t[15]=n[15]-r[15],t}var T=A,D=P,I=Object.freeze({__proto__:null,Fov:S,create:function(){var t=new Float64Array(16);return t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[0]=1,t[5]=1,t[10]=1,t[15]=1,t},clone:function(t){var n=new Float64Array(16);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n[9]=t[9],n[10]=t[10],n[11]=t[11],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15],n},copy:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],t},fromValues:function(t,n,r,a,u,e,o,i,c,s,f,h,M,l,v,b){var m=new Float64Array(16);return m[0]=t,m[1]=n,m[2]=r,m[3]=a,m[4]=u,m[5]=e,m[6]=o,m[7]=i,m[8]=c,m[9]=s,m[10]=f,m[11]=h,m[12]=M,m[13]=l,m[14]=v,m[15]=b,m},set:function(t,n,r,a,u,e,o,i,c,s,f,h,M,l,v,b,m){return t[0]=n,t[1]=r,t[2]=a,t[3]=u,t[4]=e,t[5]=o,t[6]=i,t[7]=c,t[8]=s,t[9]=f,t[10]=h,t[11]=M,t[12]=l,t[13]=v,t[14]=b,t[15]=m,t},identity:q,transpose:function(t,n){if(t===n){var r=n[1],a=n[2],u=n[3],e=n[6],o=n[7],i=n[11];t[1]=n[4],t[2]=n[8],t[3]=n[12],t[4]=r,t[6]=n[9],t[7]=n[13],t[8]=a,t[9]=e,t[11]=n[14],t[12]=u,t[13]=o,t[14]=i}else t[0]=n[0],t[1]=n[4],t[2]=n[8],t[3]=n[12],t[4]=n[1],t[5]=n[5],t[6]=n[9],t[7]=n[13],t[8]=n[2],t[9]=n[6],t[10]=n[10],t[11]=n[14],t[12]=n[3],t[13]=n[7],t[14]=n[11],t[15]=n[15];return t},invert:function(t,n){var r=n[0],a=n[1],u=n[2],e=n[3],o=n[4],i=n[5],c=n[6],s=n[7],f=n[8],h=n[9],M=n[10],l=n[11],v=n[12],b=n[13],m=n[14],d=n[15],g=r*i-a*o,y=r*c-u*o,p=r*s-e*o,x=a*c-u*i,S=a*s-e*i,q=u*s-e*c,A=f*b-h*v,_=f*m-M*v,w=f*d-l*v,F=h*m-M*b,z=h*d-l*b,O=M*d-l*m,R=g*O-y*z+p*F+x*w-S*_+q*A;return R?(R=1/R,t[0]=(i*O-c*z+s*F)*R,t[1]=(u*z-a*O-e*F)*R,t[2]=(b*q-m*S+d*x)*R,t[3]=(M*S-h*q-l*x)*R,t[4]=(c*w-o*O-s*_)*R,t[5]=(r*O-u*w+e*_)*R,t[6]=(m*p-v*q-d*y)*R,t[7]=(f*q-M*p+l*y)*R,t[8]=(o*z-i*w+s*A)*R,t[9]=(a*w-r*z-e*A)*R,t[10]=(v*S-b*p+d*g)*R,t[11]=(h*p-f*S-l*g)*R,t[12]=(i*_-o*F-c*A)*R,t[13]=(r*F-a*_+u*A)*R,t[14]=(b*y-v*x-m*g)*R,t[15]=(f*x-h*y+M*g)*R,t):null},adjoint:function(t,n){var r=n[0],a=n[1],u=n[2],e=n[3],o=n[4],i=n[5],c=n[6],s=n[7],f=n[8],h=n[9],M=n[10],l=n[11],v=n[12],b=n[13],m=n[14],d=n[15],g=r*i-a*o,y=r*c-u*o,p=r*s-e*o,x=a*c-u*i,S=a*s-e*i,q=u*s-e*c,A=f*b-h*v,_=f*m-M*v,w=f*d-l*v,F=h*m-M*b,z=h*d-l*b,O=M*d-l*m;return t[0]=i*O-c*z+s*F,t[1]=u*z-a*O-e*F,t[2]=b*q-m*S+d*x,t[3]=M*S-h*q-l*x,t[4]=c*w-o*O-s*_,t[5]=r*O-u*w+e*_,t[6]=m*p-v*q-d*y,t[7]=f*q-M*p+l*y,t[8]=o*z-i*w+s*A,t[9]=a*w-r*z-e*A,t[10]=v*S-b*p+d*g,t[11]=h*p-f*S-l*g,t[12]=i*_-o*F-c*A,t[13]=r*F-a*_+u*A,t[14]=b*y-v*x-m*g,t[15]=f*x-h*y+M*g,t},determinant:function(t){var n=t[0],r=t[1],a=t[2],u=t[3],e=t[4],o=t[5],i=t[6],c=t[7],s=t[8],f=t[9],h=t[10],M=t[11],l=t[12],v=t[13],b=t[14],m=n*o-r*e,d=n*i-a*e,g=r*i-a*o,y=s*v-f*l,p=s*b-h*l,x=f*b-h*v;return c*(n*x-r*p+a*y)-u*(e*x-o*p+i*y)+t[15]*(s*g-f*d+h*m)-M*(l*g-v*d+b*m)},multiply:A,translate:function(t,n,r){var a,u,e,o,i,c,s,f,h,M,l,v,b=r[0],m=r[1],d=r[2];return n===t?(t[12]=n[0]*b+n[4]*m+n[8]*d+n[12],t[13]=n[1]*b+n[5]*m+n[9]*d+n[13],t[14]=n[2]*b+n[6]*m+n[10]*d+n[14],t[15]=n[3]*b+n[7]*m+n[11]*d+n[15]):(a=n[0],u=n[1],e=n[2],o=n[3],i=n[4],c=n[5],s=n[6],f=n[7],h=n[8],M=n[9],l=n[10],v=n[11],t[0]=a,t[1]=u,t[2]=e,t[3]=o,t[4]=i,t[5]=c,t[6]=s,t[7]=f,t[8]=h,t[9]=M,t[10]=l,t[11]=v,t[12]=a*b+i*m+h*d+n[12],t[13]=u*b+c*m+M*d+n[13],t[14]=e*b+s*m+l*d+n[14],t[15]=o*b+f*m+v*d+n[15]),t},scale:function(t,n,r){var a=r[0],u=r[1],e=r[2];return t[0]=n[0]*a,t[1]=n[1]*a,t[2]=n[2]*a,t[3]=n[3]*a,t[4]=n[4]*u,t[5]=n[5]*u,t[6]=n[6]*u,t[7]=n[7]*u,t[8]=n[8]*e,t[9]=n[9]*e,t[10]=n[10]*e,t[11]=n[11]*e,t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],t},rotate:function(t,a,u,e){var o,i,c,s,f,h,M,l,v,b,m,d,g,y,p,x,S,q,A,_,w,F,z,O,R=e[0],j=e[1],E=e[2],P=n.hypot(R,j,E);return P0?(r[0]=2*(i*o+f*a+c*e-s*u)/h,r[1]=2*(c*o+f*u+s*a-i*e)/h,r[2]=2*(s*o+f*e+i*u-c*a)/h):(r[0]=2*(i*o+f*a+c*e-s*u),r[1]=2*(c*o+f*u+s*a-i*e),r[2]=2*(s*o+f*e+i*u-c*a)),_(t,n,r),t},getTranslation:w,getScaling:F,getRotation:z,decompose:function(t,r,a,u){r[0]=u[12],r[1]=u[13],r[2]=u[14];var e=u[0],o=u[1],i=u[2],c=u[4],s=u[5],f=u[6],h=u[8],M=u[9],l=u[10];a[0]=n.hypot(e,o,i),a[1]=n.hypot(c,s,f),a[2]=n.hypot(h,M,l);var v=1/a[0],b=1/a[1],m=1/a[2],d=e*v,g=o*b,y=i*m,p=c*v,x=s*b,S=f*m,q=h*v,A=M*b,_=l*m,w=d+x+_,F=0;return w>0?(F=2*Math.sqrt(w+1),t[3]=.25*F,t[0]=(S-A)/F,t[1]=(q-y)/F,t[2]=(g-p)/F):d>x&&d>_?(F=2*Math.sqrt(1+d-x-_),t[3]=(S-A)/F,t[0]=.25*F,t[1]=(g+p)/F,t[2]=(q+y)/F):x>_?(F=2*Math.sqrt(1+x-d-_),t[3]=(q-y)/F,t[0]=(g+p)/F,t[1]=.25*F,t[2]=(S+A)/F):(F=2*Math.sqrt(1+_-d-x),t[3]=(g-p)/F,t[0]=(q+y)/F,t[1]=(S+A)/F,t[2]=.25*F),t},fromRotationTranslationScale:function(t,n,r,a){var u=n[0],e=n[1],o=n[2],i=n[3],c=u+u,s=e+e,f=o+o,h=u*c,M=u*s,l=u*f,v=e*s,b=e*f,m=o*f,d=i*c,g=i*s,y=i*f,p=a[0],x=a[1],S=a[2];return t[0]=(1-(v+m))*p,t[1]=(M+y)*p,t[2]=(l-g)*p,t[3]=0,t[4]=(M-y)*x,t[5]=(1-(h+m))*x,t[6]=(b+d)*x,t[7]=0,t[8]=(l+g)*S,t[9]=(b-d)*S,t[10]=(1-(h+v))*S,t[11]=0,t[12]=r[0],t[13]=r[1],t[14]=r[2],t[15]=1,t},fromRotationTranslationScaleOrigin:function(t,n,r,a,u){var e=n[0],o=n[1],i=n[2],c=n[3],s=e+e,f=o+o,h=i+i,M=e*s,l=e*f,v=e*h,b=o*f,m=o*h,d=i*h,g=c*s,y=c*f,p=c*h,x=a[0],S=a[1],q=a[2],A=u[0],_=u[1],w=u[2],F=(1-(b+d))*x,z=(l+p)*x,O=(v-y)*x,R=(l-p)*S,j=(1-(M+d))*S,E=(m+g)*S,P=(v+y)*q,T=(m-g)*q,D=(1-(M+b))*q;return t[0]=F,t[1]=z,t[2]=O,t[3]=0,t[4]=R,t[5]=j,t[6]=E,t[7]=0,t[8]=P,t[9]=T,t[10]=D,t[11]=0,t[12]=r[0]+A-(F*A+R*_+P*w),t[13]=r[1]+_-(z*A+j*_+T*w),t[14]=r[2]+w-(O*A+E*_+D*w),t[15]=1,t},fromQuat:function(t,n){var r=n[0],a=n[1],u=n[2],e=n[3],o=r+r,i=a+a,c=u+u,s=r*o,f=a*o,h=a*i,M=u*o,l=u*i,v=u*c,b=e*o,m=e*i,d=e*c;return t[0]=1-h-v,t[1]=f+d,t[2]=M-m,t[3]=0,t[4]=f-d,t[5]=1-s-v,t[6]=l+b,t[7]=0,t[8]=M+m,t[9]=l-b,t[10]=1-s-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},frustum:function(t,n,r,a,u,e,o){var i=1/(r-n),c=1/(u-a),s=1/(e-o);return t[0]=2*e*i,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*e*c,t[6]=0,t[7]=0,t[8]=(r+n)*i,t[9]=(u+a)*c,t[10]=(o+e)*s,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*e*2*s,t[15]=0,t},perspectiveNO:O,perspective:R,perspectiveZO:function(t,n,r,a,u){var e=1/Math.tan(n/2);if(t[0]=e/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,"number"==typeof u&&u!==1/0){var o=1/(a-u);t[10]=u*o,t[14]=u*a*o}else t[10]=-1,t[14]=-a;return t},perspectiveFromFieldOfView:function(t,n,r,a){var u=Math.tan(n.upDegrees*Math.PI/180),e=Math.tan(n.downDegrees*Math.PI/180),o=Math.tan(n.leftDegrees*Math.PI/180),i=Math.tan(n.rightDegrees*Math.PI/180),c=2/(o+i),s=2/(u+e);return t[0]=c,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,t[6]=0,t[7]=0,t[8]=-(o-i)*c*.5,t[9]=(u-e)*s*.5,t[10]=a/(r-a),t[11]=-1,t[12]=0,t[13]=0,t[14]=a*r/(r-a),t[15]=0,t},orthoNO:j,ortho:E,orthoZO:function(t,n,r,a,u,e,o){var i=1/(n-r),c=1/(a-u),s=1/(e-o);return t[0]=-2*i,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*c,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=s,t[11]=0,t[12]=(n+r)*i,t[13]=(u+a)*c,t[14]=e*s,t[15]=1,t},lookAt:function(t,a,u,e){var o,i,c,s,f,h,M,l,v,b,m=a[0],d=a[1],g=a[2],y=e[0],p=e[1],x=e[2],S=u[0],A=u[1],_=u[2];return Math.abs(m-S)0&&(f*=l=1/Math.sqrt(l),h*=l,M*=l);var v=c*M-s*h,b=s*f-i*M,m=i*h-c*f;return(l=v*v+b*b+m*m)>0&&(v*=l=1/Math.sqrt(l),b*=l,m*=l),t[0]=v,t[1]=b,t[2]=m,t[3]=0,t[4]=h*m-M*b,t[5]=M*v-f*m,t[6]=f*b-h*v,t[7]=0,t[8]=f,t[9]=h,t[10]=M,t[11]=0,t[12]=u,t[13]=e,t[14]=o,t[15]=1,t},str:function(t){return"mat4("+t[0].toString()+", "+t[1].toString()+", "+t[2].toString()+", "+t[3].toString()+", "+t[4].toString()+", "+t[5].toString()+", "+t[6].toString()+", "+t[7].toString()+", "+t[8].toString()+", "+t[9].toString()+", "+t[10].toString()+", "+t[11].toString()+", "+t[12].toString()+", "+t[13].toString()+", "+t[14].toString()+", "+t[15].toString()+")"},frob:function(t){return n.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},add:function(t,n,r){return t[0]=n[0]+r[0],t[1]=n[1]+r[1],t[2]=n[2]+r[2],t[3]=n[3]+r[3],t[4]=n[4]+r[4],t[5]=n[5]+r[5],t[6]=n[6]+r[6],t[7]=n[7]+r[7],t[8]=n[8]+r[8],t[9]=n[9]+r[9],t[10]=n[10]+r[10],t[11]=n[11]+r[11],t[12]=n[12]+r[12],t[13]=n[13]+r[13],t[14]=n[14]+r[14],t[15]=n[15]+r[15],t},subtract:P,multiplyScalar:function(t,n,r){return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=n[3]*r,t[4]=n[4]*r,t[5]=n[5]*r,t[6]=n[6]*r,t[7]=n[7]*r,t[8]=n[8]*r,t[9]=n[9]*r,t[10]=n[10]*r,t[11]=n[11]*r,t[12]=n[12]*r,t[13]=n[13]*r,t[14]=n[14]*r,t[15]=n[15]*r,t},multiplyScalarAndAdd:function(t,n,r,a){return t[0]=n[0]+r[0]*a,t[1]=n[1]+r[1]*a,t[2]=n[2]+r[2]*a,t[3]=n[3]+r[3]*a,t[4]=n[4]+r[4]*a,t[5]=n[5]+r[5]*a,t[6]=n[6]+r[6]*a,t[7]=n[7]+r[7]*a,t[8]=n[8]+r[8]*a,t[9]=n[9]+r[9]*a,t[10]=n[10]+r[10]*a,t[11]=n[11]+r[11]*a,t[12]=n[12]+r[12]*a,t[13]=n[13]+r[13]*a,t[14]=n[14]+r[14]*a,t[15]=n[15]+r[15]*a,t},exactEquals:function(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[7]===n[7]&&t[8]===n[8]&&t[9]===n[9]&&t[10]===n[10]&&t[11]===n[11]&&t[12]===n[12]&&t[13]===n[13]&&t[14]===n[14]&&t[15]===n[15]},equals:function(t,a){var u=t[0],e=t[1],o=t[2],i=t[3],c=t[4],s=t[5],f=t[6],h=t[7],M=t[8],l=t[9],v=t[10],b=t[11],m=t[12],d=t[13],g=t[14],y=t[15],p=a[0],x=a[1],S=a[2],q=a[3],A=a[4],_=a[5],w=a[6],F=a[7],z=a[8],O=a[9],R=a[10],j=a[11],E=a[12],P=a[13],T=a[14],D=a[15];return Math.abs(u-p)<=r*n.max(1,Math.abs(u),Math.abs(p))&&Math.abs(e-x)<=r*n.max(1,Math.abs(e),Math.abs(x))&&Math.abs(o-S)<=r*n.max(1,Math.abs(o),Math.abs(S))&&Math.abs(i-q)<=r*n.max(1,Math.abs(i),Math.abs(q))&&Math.abs(c-A)<=r*n.max(1,Math.abs(c),Math.abs(A))&&Math.abs(s-_)<=r*n.max(1,Math.abs(s),Math.abs(_))&&Math.abs(f-w)<=r*n.max(1,Math.abs(f),Math.abs(w))&&Math.abs(h-F)<=r*n.max(1,Math.abs(h),Math.abs(F))&&Math.abs(M-z)<=r*n.max(1,Math.abs(M),Math.abs(z))&&Math.abs(l-O)<=r*n.max(1,Math.abs(l),Math.abs(O))&&Math.abs(v-R)<=r*n.max(1,Math.abs(v),Math.abs(R))&&Math.abs(b-j)<=r*n.max(1,Math.abs(b),Math.abs(j))&&Math.abs(m-E)<=r*n.max(1,Math.abs(m),Math.abs(E))&&Math.abs(d-P)<=r*n.max(1,Math.abs(d),Math.abs(P))&&Math.abs(g-T)<=r*n.max(1,Math.abs(g),Math.abs(T))&&Math.abs(y-D)<=r*n.max(1,Math.abs(y),Math.abs(D))},mul:T,sub:D});function L(){var t=new Float64Array(3);return t[0]=0,t[1]=0,t[2]=0,t}function V(t){var r=t[0],a=t[1],u=t[2];return n.hypot(r,a,u)}function Q(t,n,r){var a=new Float64Array(3);return a[0]=t,a[1]=n,a[2]=r,a}function Z(t,n,r){return t[0]=n[0]-r[0],t[1]=n[1]-r[1],t[2]=n[2]-r[2],t}function N(t,n,r){return t[0]=n[0]*r[0],t[1]=n[1]*r[1],t[2]=n[2]*r[2],t}function X(t,n,r){return t[0]=n[0]/r[0],t[1]=n[1]/r[1],t[2]=n[2]/r[2],t}function Y(t,r){var a=r[0]-t[0],u=r[1]-t[1],e=r[2]-t[2];return n.hypot(a,u,e)}function k(t,n){var r=n[0]-t[0],a=n[1]-t[1],u=n[2]-t[2];return r*r+a*a+u*u}function B(t){var n=t[0],r=t[1],a=t[2];return n*n+r*r+a*a}function U(t,n){var r=n[0],a=n[1],u=n[2],e=r*r+a*a+u*u;return e>0&&(e=1/Math.sqrt(e)),t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t}function G(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function W(t,n,r){var a=n[0],u=n[1],e=n[2],o=r[0],i=r[1],c=r[2];return t[0]=u*c-e*i,t[1]=e*o-a*c,t[2]=a*i-u*o,t}var C=Z,H=N,J=X,K=Y,$=k,tt=V,nt=B,rt=L(),at=function(t,r,a,u,e,o){var i,c;for(r||(r=3),a||(a=0),c=u?n.min(u*r+a,t.length):t.length,i=a;i0&&(o=1/Math.sqrt(o)),t[0]=r*o,t[1]=a*o,t[2]=u*o,t[3]=e*o,t}function pt(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]+t[3]*n[3]}function xt(t,n,r,a){var u=n[0],e=n[1],o=n[2],i=n[3];return t[0]=u+a*(r[0]-u),t[1]=e+a*(r[1]-e),t[2]=o+a*(r[2]-o),t[3]=i+a*(r[3]-i),t}function St(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]}var qt=ht,At=Mt,_t=lt,wt=bt,Ft=mt,zt=dt,Ot=gt,Rt=et(),jt=function(t,r,a,u,e,o){var i,c;for(r||(r=4),a||(a=0),c=u?n.min(u*r+a,t.length):t.length,i=a;i=1);do{c=(e=2*a()-1)*e+(o=2*a()-1)*o}while(c>=1);var s=Math.sqrt((1-i)/c);return t[0]=n*r,t[1]=n*u,t[2]=n*e*s,t[3]=n*o*s,t},transformMat4:function(t,n,r){var a=n[0],u=n[1],e=n[2],o=n[3];return t[0]=r[0]*a+r[4]*u+r[8]*e+r[12]*o,t[1]=r[1]*a+r[5]*u+r[9]*e+r[13]*o,t[2]=r[2]*a+r[6]*u+r[10]*e+r[14]*o,t[3]=r[3]*a+r[7]*u+r[11]*e+r[15]*o,t},transformQuat:function(t,n,r){var a=n[0],u=n[1],e=n[2],o=r[0],i=r[1],c=r[2],s=r[3],f=s*a+i*e-c*u,h=s*u+c*a-o*e,M=s*e+o*u-i*a,l=-o*a-i*u-c*e;return t[0]=f*s+l*-o+h*-c-M*-i,t[1]=h*s+l*-i+M*-o-f*-c,t[2]=M*s+l*-c+f*-i-h*-o,t[3]=n[3],t},zero:function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t},str:function(t){return"vec4("+t[0].toString()+", "+t[1].toString()+", "+t[2].toString()+", "+t[3].toString()+")"},exactEquals:St,equals:function(t,a){var u=t[0],e=t[1],o=t[2],i=t[3],c=a[0],s=a[1],f=a[2],h=a[3];return Math.abs(u-c)<=r*n.max(1,Math.abs(u),Math.abs(c))&&Math.abs(e-s)<=r*n.max(1,Math.abs(e),Math.abs(s))&&Math.abs(o-f)<=r*n.max(1,Math.abs(o),Math.abs(f))&&Math.abs(i-h)<=r*n.max(1,Math.abs(i),Math.abs(h))},sub:qt,mul:At,div:_t,dist:wt,sqrDist:Ft,len:zt,sqrLen:Ot,forEach:jt});function Pt(){var t=new Float64Array(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t}function Tt(t,n,r){r*=.5;var a=Math.sin(r);return t[0]=a*n[0],t[1]=a*n[1],t[2]=a*n[2],t[3]=Math.cos(r),t}function Dt(t,n,r){var a=n[0],u=n[1],e=n[2],o=n[3],i=r[0],c=r[1],s=r[2],f=r[3];return t[0]=a*f+o*i+u*s-e*c,t[1]=u*f+o*c+e*i-a*s,t[2]=e*f+o*s+a*c-u*i,t[3]=o*f-a*i-u*c-e*s,t}function It(t,n,r){r*=.5;var a=n[0],u=n[1],e=n[2],o=n[3],i=Math.sin(r),c=Math.cos(r);return t[0]=a*c+o*i,t[1]=u*c+e*i,t[2]=e*c-u*i,t[3]=o*c-a*i,t}function Lt(t,n,r){r*=.5;var a=n[0],u=n[1],e=n[2],o=n[3],i=Math.sin(r),c=Math.cos(r);return t[0]=a*c-e*i,t[1]=u*c+o*i,t[2]=e*c+a*i,t[3]=o*c-u*i,t}function Vt(t,n,r){r*=.5;var a=n[0],u=n[1],e=n[2],o=n[3],i=Math.sin(r),c=Math.cos(r);return t[0]=a*c+u*i,t[1]=u*c-a*i,t[2]=e*c+o*i,t[3]=o*c-e*i,t}function Qt(t,n){var r=n[0],a=n[1],u=n[2],e=n[3],o=Math.sqrt(r*r+a*a+u*u),i=Math.exp(e),c=o>0?i*Math.sin(o)/o:0;return t[0]=r*c,t[1]=a*c,t[2]=u*c,t[3]=i*Math.cos(o),t}function Zt(t,n){var r=n[0],a=n[1],u=n[2],e=n[3],o=Math.sqrt(r*r+a*a+u*u),i=o>0?Math.atan2(o,e)/o:0;return t[0]=r*i,t[1]=a*i,t[2]=u*i,t[3]=.5*Math.log(r*r+a*a+u*u+e*e),t}function Nt(t,n,a,u){var e,o,i,c,s,f=n[0],h=n[1],M=n[2],l=n[3],v=a[0],b=a[1],m=a[2],d=a[3];return(o=f*v+h*b+M*m+l*d)<0&&(o=-o,v=-v,b=-b,m=-m,d=-d),1-o>r?(e=Math.acos(o),i=Math.sin(e),c=Math.sin((1-u)*e)/i,s=Math.sin(u*e)/i):(c=1-u,s=u),t[0]=c*f+s*v,t[1]=c*h+s*b,t[2]=c*M+s*m,t[3]=c*l+s*d,t}function Xt(t,n){var r,a=n[0]+n[4]+n[8];if(a>0)r=Math.sqrt(a+1),t[3]=.5*r,r=.5/r,t[0]=(n[5]-n[7])*r,t[1]=(n[6]-n[2])*r,t[2]=(n[1]-n[3])*r;else{var u=0;n[4]>n[0]&&(u=1),n[8]>n[3*u+u]&&(u=2);var e=(u+1)%3,o=(u+2)%3;r=Math.sqrt(n[3*u+u]-n[3*e+e]-n[3*o+o]+1),t[u]=.5*r,r=.5/r,t[3]=(n[3*e+o]-n[3*o+e])*r,t[e]=(n[3*e+u]+n[3*u+e])*r,t[o]=(n[3*o+u]+n[3*u+o])*r}return t}var Yt=ot,kt=it,Bt=ct,Ut=st,Gt=ft,Wt=Dt,Ct=vt,Ht=pt,Jt=xt,Kt=dt,$t=Kt,tn=gt,nn=tn,rn=yt,an=St;var un=L(),en=Q(1,0,0),on=Q(0,1,0),cn=function(t,n,r){var a=G(n,r);return a<-.999999?(W(un,en,n),tt(un)<1e-6&&W(un,on,n),U(un,un),Tt(t,un,Math.PI),t):a>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):(W(un,n,r),t[0]=un[0],t[1]=un[1],t[2]=un[2],t[3]=1+a,rn(t,t))},sn=Pt(),fn=Pt(),hn=function(t,n,r,a,u,e){return Nt(sn,n,u,e),Nt(fn,r,a,e),Nt(t,sn,fn,2*e*(1-e)),t},Mn=m(),ln=function(t,n,r,a){return Mn[0]=r[0],Mn[3]=r[1],Mn[6]=r[2],Mn[1]=a[0],Mn[4]=a[1],Mn[7]=a[2],Mn[2]=-n[0],Mn[5]=-n[1],Mn[8]=-n[2],rn(t,Xt(t,Mn))},vn=Object.freeze({__proto__:null,create:Pt,identity:function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},setAxisAngle:Tt,getAxisAngle:function(t,n){var a=2*Math.acos(n[3]),u=Math.sin(a/2);return u>r?(t[0]=n[0]/u,t[1]=n[1]/u,t[2]=n[2]/u):(t[0]=1,t[1]=0,t[2]=0),a},getAngle:function(t,n){var r=Ht(t,n);return Math.acos(2*r*r-1)},multiply:Dt,rotateX:It,rotateY:Lt,rotateZ:Vt,calculateW:function(t,n){var r=n[0],a=n[1],u=n[2];return t[0]=r,t[1]=a,t[2]=u,t[3]=Math.sqrt(Math.abs(1-r*r-a*a-u*u)),t},exp:Qt,ln:Zt,pow:function(t,n,r){return Zt(t,n),Ct(t,t,r),Qt(t,t),t},slerp:Nt,random:function(t){var n=a(),r=a(),u=a(),e=Math.sqrt(1-n),o=Math.sqrt(n);return t[0]=e*Math.sin(2*Math.PI*r),t[1]=e*Math.cos(2*Math.PI*r),t[2]=o*Math.sin(2*Math.PI*u),t[3]=o*Math.cos(2*Math.PI*u),t},invert:function(t,n){var r=n[0],a=n[1],u=n[2],e=n[3],o=r*r+a*a+u*u+e*e,i=o?1/o:0;return t[0]=-r*i,t[1]=-a*i,t[2]=-u*i,t[3]=e*i,t},conjugate:function(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=n[3],t},fromMat3:Xt,fromEuler:function(t,n,r,a,u){void 0===u&&(u="zyx");var e=Math.PI/360;n*=e,a*=e,r*=e;var o=Math.sin(n),i=Math.cos(n),c=Math.sin(r),s=Math.cos(r),f=Math.sin(a),h=Math.cos(a);if("xyz"===u)t[0]=o*s*h+i*c*f,t[1]=i*c*h-o*s*f,t[2]=i*s*f+o*c*h,t[3]=i*s*h-o*c*f;else if("xzy"===u)t[0]=o*s*h-i*c*f,t[1]=i*c*h-o*s*f,t[2]=i*s*f+o*c*h,t[3]=i*s*h+o*c*f;else if("yxz"===u)t[0]=o*s*h+i*c*f,t[1]=i*c*h-o*s*f,t[2]=i*s*f-o*c*h,t[3]=i*s*h+o*c*f;else if("yzx"===u)t[0]=o*s*h+i*c*f,t[1]=i*c*h+o*s*f,t[2]=i*s*f-o*c*h,t[3]=i*s*h-o*c*f;else if("zxy"===u)t[0]=o*s*h-i*c*f,t[1]=i*c*h+o*s*f,t[2]=i*s*f+o*c*h,t[3]=i*s*h-o*c*f;else{if("zyx"!==u)throw new Error("Unknown angle order "+u);t[0]=o*s*h-i*c*f,t[1]=i*c*h+o*s*f,t[2]=i*s*f-o*c*h,t[3]=i*s*h+o*c*f}return t},str:function(t){return"quat("+t[0].toString()+", "+t[1].toString()+", "+t[2].toString()+", "+t[3].toString()+")"},clone:Yt,fromValues:kt,copy:Bt,set:Ut,add:Gt,mul:Wt,scale:Ct,dot:Ht,lerp:Jt,length:Kt,len:$t,squaredLength:tn,sqrLen:nn,normalize:rn,exactEquals:an,equals:function(t,n){return Math.abs(pt(t,n))>=1-r},rotationTo:cn,sqlerp:hn,setAxes:ln});function bn(t,n,r){var a=.5*r[0],u=.5*r[1],e=.5*r[2],o=n[0],i=n[1],c=n[2],s=n[3];return t[0]=o,t[1]=i,t[2]=c,t[3]=s,t[4]=a*s+u*c-e*i,t[5]=u*s+e*o-a*c,t[6]=e*s+a*i-u*o,t[7]=-a*o-u*i-e*c,t}function mn(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t}var dn=Bt;var gn=Bt;function yn(t,n,r){var a=n[0],u=n[1],e=n[2],o=n[3],i=r[4],c=r[5],s=r[6],f=r[7],h=n[4],M=n[5],l=n[6],v=n[7],b=r[0],m=r[1],d=r[2],g=r[3];return t[0]=a*g+o*b+u*d-e*m,t[1]=u*g+o*m+e*b-a*d,t[2]=e*g+o*d+a*m-u*b,t[3]=o*g-a*b-u*m-e*d,t[4]=a*f+o*i+u*s-e*c+h*g+v*b+M*d-l*m,t[5]=u*f+o*c+e*i-a*s+M*g+v*m+l*b-h*d,t[6]=e*f+o*s+a*c-u*i+l*g+v*d+h*m-M*b,t[7]=o*f-a*i-u*c-e*s+v*g-h*b-M*m-l*d,t}var pn=yn;var xn=Ht;var Sn=Kt,qn=Sn,An=tn,_n=An;var wn=Object.freeze({__proto__:null,create:function(){var t=changetype(new Float64Array(8));return t[0]=0,t[1]=0,t[2]=0,t[4]=0,t[5]=0,t[6]=0,t[7]=0,t[3]=1,t},clone:function(t){var n=changetype(new Float64Array(8));return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n},fromValues:function(t,n,r,a,u,e,o,i){var c=changetype(new Float64Array(8));return c[0]=t,c[1]=n,c[2]=r,c[3]=a,c[4]=u,c[5]=e,c[6]=o,c[7]=i,c},fromRotationTranslationValues:function(t,n,r,a,u,e,o){var i=changetype(new Float64Array(8));i[0]=t,i[1]=n,i[2]=r,i[3]=a;var c=.5*u,s=.5*e,f=.5*o;return i[4]=c*a+s*r-f*n,i[5]=s*a+f*t-c*r,i[6]=f*a+c*n-s*t,i[7]=-c*t-s*n-f*r,i},fromRotationTranslation:bn,fromTranslation:function(t,n){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t[4]=.5*n[0],t[5]=.5*n[1],t[6]=.5*n[2],t[7]=0,t},fromRotation:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=0,t[5]=0,t[6]=0,t[7]=0,t},fromMat4:function(t,n){var r=Pt();z(r,n);var a=new Float64Array(3);return w(a,n),bn(t,r,a),t},copy:mn,identity:function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t[6]=0,t[7]=0,t},set:function(t,n,r,a,u,e,o,i,c){return t[0]=n,t[1]=r,t[2]=a,t[3]=u,t[4]=e,t[5]=o,t[6]=i,t[7]=c,t},getReal:dn,getDual:function(t,n){return t[0]=n[4],t[1]=n[5],t[2]=n[6],t[3]=n[7],t},setReal:gn,setDual:function(t,n){return t[4]=n[0],t[5]=n[1],t[6]=n[2],t[7]=n[3],t},getTranslation:function(t,n){var r=n[4],a=n[5],u=n[6],e=n[7],o=-n[0],i=-n[1],c=-n[2],s=n[3];return t[0]=2*(r*s+e*o+a*c-u*i),t[1]=2*(a*s+e*i+u*o-r*c),t[2]=2*(u*s+e*c+r*i-a*o),t},translate:function(t,n,r){var a=n[0],u=n[1],e=n[2],o=n[3],i=.5*r[0],c=.5*r[1],s=.5*r[2],f=n[4],h=n[5],M=n[6],l=n[7];return t[0]=a,t[1]=u,t[2]=e,t[3]=o,t[4]=o*i+u*s-e*c+f,t[5]=o*c+e*i-a*s+h,t[6]=o*s+a*c-u*i+M,t[7]=-a*i-u*c-e*s+l,t},rotateX:function(t,n,r){var a=-n[0],u=-n[1],e=-n[2],o=n[3],i=n[4],c=n[5],s=n[6],f=n[7],h=i*o+f*a+c*e-s*u,M=c*o+f*u+s*a-i*e,l=s*o+f*e+i*u-c*a,v=f*o-i*a-c*u-s*e;return It(t,n,r),a=t[0],u=t[1],e=t[2],o=t[3],t[4]=h*o+v*a+M*e-l*u,t[5]=M*o+v*u+l*a-h*e,t[6]=l*o+v*e+h*u-M*a,t[7]=v*o-h*a-M*u-l*e,t},rotateY:function(t,n,r){var a=-n[0],u=-n[1],e=-n[2],o=n[3],i=n[4],c=n[5],s=n[6],f=n[7],h=i*o+f*a+c*e-s*u,M=c*o+f*u+s*a-i*e,l=s*o+f*e+i*u-c*a,v=f*o-i*a-c*u-s*e;return Lt(t,n,r),a=t[0],u=t[1],e=t[2],o=t[3],t[4]=h*o+v*a+M*e-l*u,t[5]=M*o+v*u+l*a-h*e,t[6]=l*o+v*e+h*u-M*a,t[7]=v*o-h*a-M*u-l*e,t},rotateZ:function(t,n,r){var a=-n[0],u=-n[1],e=-n[2],o=n[3],i=n[4],c=n[5],s=n[6],f=n[7],h=i*o+f*a+c*e-s*u,M=c*o+f*u+s*a-i*e,l=s*o+f*e+i*u-c*a,v=f*o-i*a-c*u-s*e;return Vt(t,n,r),a=t[0],u=t[1],e=t[2],o=t[3],t[4]=h*o+v*a+M*e-l*u,t[5]=M*o+v*u+l*a-h*e,t[6]=l*o+v*e+h*u-M*a,t[7]=v*o-h*a-M*u-l*e,t},rotateByQuatAppend:function(t,n,r){var a=r[0],u=r[1],e=r[2],o=r[3],i=n[0],c=n[1],s=n[2],f=n[3];return t[0]=i*o+f*a+c*e-s*u,t[1]=c*o+f*u+s*a-i*e,t[2]=s*o+f*e+i*u-c*a,t[3]=f*o-i*a-c*u-s*e,i=n[4],c=n[5],s=n[6],f=n[7],t[4]=i*o+f*a+c*e-s*u,t[5]=c*o+f*u+s*a-i*e,t[6]=s*o+f*e+i*u-c*a,t[7]=f*o-i*a-c*u-s*e,t},rotateByQuatPrepend:function(t,n,r){var a=n[0],u=n[1],e=n[2],o=n[3],i=r[0],c=r[1],s=r[2],f=r[3];return t[0]=a*f+o*i+u*s-e*c,t[1]=u*f+o*c+e*i-a*s,t[2]=e*f+o*s+a*c-u*i,t[3]=o*f-a*i-u*c-e*s,i=r[4],c=r[5],s=r[6],f=r[7],t[4]=a*f+o*i+u*s-e*c,t[5]=u*f+o*c+e*i-a*s,t[6]=e*f+o*s+a*c-u*i,t[7]=o*f-a*i-u*c-e*s,t},rotateAroundAxis:function(t,a,u,e){if(Math.abs(e)0){r=Math.sqrt(r);var a=n[0]/r,u=n[1]/r,e=n[2]/r,o=n[3]/r,i=n[4],c=n[5],s=n[6],f=n[7],h=a*i+u*c+e*s+o*f;t[0]=a,t[1]=u,t[2]=e,t[3]=o,t[4]=(i-a*h)/r,t[5]=(c-u*h)/r,t[6]=(s-e*h)/r,t[7]=(f-o*h)/r}return t},str:function(t){return"quat2("+t[0].toString()+", "+t[1].toString()+", "+t[2].toString()+", "+t[3].toString()+", "+t[4].toString()+", "+t[5].toString()+", "+t[6].toString()+", "+t[7].toString()+")"},exactEquals:function(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[7]===n[7]},equals:function(t,a){var u=t[0],e=t[1],o=t[2],i=t[3],c=t[4],s=t[5],f=t[6],h=t[7],M=a[0],l=a[1],v=a[2],b=a[3],m=a[4],d=a[5],g=a[6],y=a[7];return Math.abs(u-M)<=r*n.max(1,Math.abs(u),Math.abs(M))&&Math.abs(e-l)<=r*n.max(1,Math.abs(e),Math.abs(l))&&Math.abs(o-v)<=r*n.max(1,Math.abs(o),Math.abs(v))&&Math.abs(i-b)<=r*n.max(1,Math.abs(i),Math.abs(b))&&Math.abs(c-m)<=r*n.max(1,Math.abs(c),Math.abs(m))&&Math.abs(s-d)<=r*n.max(1,Math.abs(s),Math.abs(d))&&Math.abs(f-g)<=r*n.max(1,Math.abs(f),Math.abs(g))&&Math.abs(h-y)<=r*n.max(1,Math.abs(h),Math.abs(y))}});function Fn(){var t=new Float64Array(2);return t[0]=0,t[1]=0,t}function zn(t,n,r){return t[0]=n[0]-r[0],t[1]=n[1]-r[1],t}function On(t,n,r){return t[0]=n[0]*r[0],t[1]=n[1]*r[1],t}function Rn(t,n,r){return t[0]=n[0]/r[0],t[1]=n[1]/r[1],t}function jn(t,r){var a=r[0]-t[0],u=r[1]-t[1];return n.hypot(a,u)}function En(t,n){var r=n[0]-t[0],a=n[1]-t[1];return r*r+a*a}function Pn(t){var n=t[0],r=t[1];return Math.hypot(n,r)}function Tn(t){var n=t[0],r=t[1];return n*n+r*r}var Dn=Pn,In=zn,Ln=On,Vn=Rn,Qn=jn,Zn=En,Nn=Tn,Xn=Fn(),Yn=function(t,r,a,u,e,o){var i,c;for(r||(r=2),a||(a=0),c=u?n.min(u*r+a,t.length):t.length,i=a;i0&&(u=1/Math.sqrt(u)),t[0]=n[0]*u,t[1]=n[1]*u,t},dot:function(t,n){return t[0]*n[0]+t[1]*n[1]},cross:function(t,n,r){var a=n[0]*r[1]-n[1]*r[0];return t[0]=t[1]=0,t[2]=a,t},lerp:function(t,n,r,a){var u=n[0],e=n[1];return t[0]=u+a*(r[0]-u),t[1]=e+a*(r[1]-e),t},random:function(t,n){n=n||1;var r=2*a()*Math.PI;return t[0]=Math.cos(r)*n,t[1]=Math.sin(r)*n,t},transformMat2:function(t,n,r){var a=n[0],u=n[1];return t[0]=r[0]*a+r[2]*u,t[1]=r[1]*a+r[3]*u,t},transformMat2d:function(t,n,r){var a=n[0],u=n[1];return t[0]=r[0]*a+r[2]*u+r[4],t[1]=r[1]*a+r[3]*u+r[5],t},transformMat3:function(t,n,r){var a=n[0],u=n[1];return t[0]=r[0]*a+r[3]*u+r[6],t[1]=r[1]*a+r[4]*u+r[7],t},transformMat4:function(t,n,r){var a=n[0],u=n[1];return t[0]=r[0]*a+r[4]*u+r[12],t[1]=r[1]*a+r[5]*u+r[13],t},rotate:function(t,n,r,a){var u=n[0]-r[0],e=n[1]-r[1],o=Math.sin(a),i=Math.cos(a);return t[0]=u*i-e*o+r[0],t[1]=u*o+e*i+r[1],t},angle:function(t,n){var r=t[0],a=t[1],u=n[0],e=n[1],o=Math.sqrt(r*r+a*a)*Math.sqrt(u*u+e*e),i=o&&(r*u+a*e)/o;return Math.acos(Math.min(Math.max(i,-1),1))},zero:function(t){return t[0]=0,t[1]=0,t},str:function(t){return"vec2("+t[0].toString()+", "+t[1].toString()+")"},exactEquals:function(t,n){return t[0]===n[0]&&t[1]===n[1]},equals:function(t,a){var u=t[0],e=t[1],o=a[0],i=a[1];return Math.abs(u-o)<=r*n.max(1,Math.abs(u),Math.abs(o))&&Math.abs(e-i)<=r*n.max(1,Math.abs(e),Math.abs(i))},len:Dn,sub:In,mul:Ln,div:Vn,dist:Qn,sqrDist:Zn,sqrLen:Nn,forEach:Yn});t.glMatrix=e,t.mat2=f,t.mat2d=b,t.mat3=x,t.mat4=I,t.quat=vn,t.quat2=wn,t.vec2=kn,t.vec3=ut,t.vec4=Et,Object.defineProperty(t,"__esModule",{value:!0})})); diff --git a/dist/gl-matrix.js b/dist/gl-matrix.js deleted file mode 100644 index 990607e0..00000000 --- a/dist/gl-matrix.js +++ /dev/null @@ -1,7214 +0,0 @@ - -/*! -@fileoverview gl-matrix - High performance matrix and vector operations -@author Brandon Jones -@author Colin MacKenzie IV -@version 3.3.0 - -Copyright (c) 2015-2021, Brandon Jones, Colin MacKenzie IV. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -*/ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.glMatrix = {})); -}(this, (function (exports) { 'use strict'; - - // this file import things passed in from JS, and exports them for use by other - // AS modules. - // @ts-ignore - // prettier-ignore - /** - * Extended Math functions - * @module glMatrix - */ - var Maths; - (function (Maths) { - function min(a, b) { - return a < b ? a : b; - } - Maths.min = min; - function max(a, b, c) { - var q = Math.max(b, c); - return Math.max(a, q); - } - Maths.max = max; - })(Maths || (Maths = {})); - - /** - * Common utilities - * @module glMatrix - */ - // Configuration Constants - var EPSILON = 0.000001; - var RANDOM = Math.random; - var ANGLE_ORDER = "zyx"; - /** - * Sets the type of array used when creating new vectors and matrices - * - * @param {Object} type Array type, such as Float32Array or Array - */ - function setMatrixArrayType(type) { - throw new Error("Not implemented yet"); - } - var degree = Math.PI / 180; - /** - * Convert Degree To Radian - * - * @param {Number} a Angle in Degrees - */ - function toRadian(a) { - return a * degree; - } - /** - * Tests whether or not the arguments have approximately the same value, within an absolute - * or relative tolerance of glMatrix.EPSILON (an absolute tolerance is used for values less - * than or equal to 1.0, and a relative tolerance is used for larger values) - * - * @param {Number} a The first number to test. - * @param {Number} b The second number to test. - * @returns {Boolean} True if the numbers are approximately equal, false otherwise. - */ - function equals$9(a, b) { - return Math.abs(a - b) <= EPSILON * Maths.max(1.0, Math.abs(a), Math.abs(b)); - } - - var common = /*#__PURE__*/Object.freeze({ - __proto__: null, - EPSILON: EPSILON, - RANDOM: RANDOM, - ANGLE_ORDER: ANGLE_ORDER, - setMatrixArrayType: setMatrixArrayType, - toRadian: toRadian, - equals: equals$9 - }); - - /** - * 2x2 Matrix - * @module mat2 - */ - /** - * Creates a new identity mat2 - * - * @returns {mat2} a new 2x2 matrix - */ - function create$8() { - var out = new Float64Array(4); - //if (glMatrix.ARRAY_TYPE != Float32Array) { - out[1] = 0; - out[2] = 0; - //} - out[0] = 1; - out[3] = 1; - return out; - } - /** - * Creates a new mat2 initialized with values from an existing matrix - * - * @param {ReadonlyMat2} a matrix to clone - * @returns {mat2} a new 2x2 matrix - */ - function clone$8(a) { - var out = new Float64Array(4); - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - return out; - } - /** - * Copy the values from one mat2 to another - * - * @param {mat2} out the receiving matrix - * @param {ReadonlyMat2} a the source matrix - * @returns {mat2} out - */ - function copy$8(out, a) { - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - return out; - } - /** - * Set a mat2 to the identity matrix - * - * @param {mat2} out the receiving matrix - * @returns {mat2} out - */ - function identity$5(out) { - out[0] = 1; - out[1] = 0; - out[2] = 0; - out[3] = 1; - return out; - } - /** - * Create a new mat2 with the given values - * - * @param {Number} m00 Component in column 0, row 0 position (index 0) - * @param {Number} m01 Component in column 0, row 1 position (index 1) - * @param {Number} m10 Component in column 1, row 0 position (index 2) - * @param {Number} m11 Component in column 1, row 1 position (index 3) - * @returns {mat2} out A new 2x2 matrix - */ - function fromValues$8(m00, m01, m10, m11) { - var out = new Float64Array(4); - out[0] = m00; - out[1] = m01; - out[2] = m10; - out[3] = m11; - return out; - } - /** - * Set the components of a mat2 to the given values - * - * @param {mat2} out the receiving matrix - * @param {Number} m00 Component in column 0, row 0 position (index 0) - * @param {Number} m01 Component in column 0, row 1 position (index 1) - * @param {Number} m10 Component in column 1, row 0 position (index 2) - * @param {Number} m11 Component in column 1, row 1 position (index 3) - * @returns {mat2} out - */ - function set$8(out, m00, m01, m10, m11) { - out[0] = m00; - out[1] = m01; - out[2] = m10; - out[3] = m11; - return out; - } - /** - * Transpose the values of a mat2 - * - * @param {mat2} out the receiving matrix - * @param {ReadonlyMat2} a the source matrix - * @returns {mat2} out - */ - function transpose$2(out, a) { - // If we are transposing ourselves we can skip a few steps but have to cache - // some values - if (out === a) { - var a1 = a[1]; - out[1] = a[2]; - out[2] = a1; - } - else { - out[0] = a[0]; - out[1] = a[2]; - out[2] = a[1]; - out[3] = a[3]; - } - return out; - } - /** - * Inverts a mat2 - * - * @param {mat2} out the receiving matrix - * @param {ReadonlyMat2} a the source matrix - * @returns {mat2} out - */ - function invert$5(out, a) { - var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3]; - // Calculate the determinant - var det = a0 * a3 - a2 * a1; - if (!det) { - return null; - } - det = 1.0 / det; - out[0] = a3 * det; - out[1] = -a1 * det; - out[2] = -a2 * det; - out[3] = a0 * det; - return out; - } - /** - * Calculates the adjugate of a mat2 - * - * @param {mat2} out the receiving matrix - * @param {ReadonlyMat2} a the source matrix - * @returns {mat2} out - */ - function adjoint$2(out, a) { - // Caching this value is necessary if out == a - var a0 = a[0]; - out[0] = a[3]; - out[1] = -a[1]; - out[2] = -a[2]; - out[3] = a0; - return out; - } - /** - * Calculates the determinant of a mat2 - * - * @param {ReadonlyMat2} a the source matrix - * @returns {Number} determinant of a - */ - function determinant$3(a) { - return a[0] * a[3] - a[2] * a[1]; - } - /** - * Multiplies two mat2's - * - * @param {mat2} out the receiving matrix - * @param {ReadonlyMat2} a the first operand - * @param {ReadonlyMat2} b the second operand - * @returns {mat2} out - */ - function multiply$8(out, a, b) { - var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3]; - var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3]; - out[0] = a0 * b0 + a2 * b1; - out[1] = a1 * b0 + a3 * b1; - out[2] = a0 * b2 + a2 * b3; - out[3] = a1 * b2 + a3 * b3; - return out; - } - /** - * Rotates a mat2 by the given angle - * - * @param {mat2} out the receiving matrix - * @param {ReadonlyMat2} a the matrix to rotate - * @param {Number} rad the angle to rotate the matrix by - * @returns {mat2} out - */ - function rotate$4(out, a, rad) { - var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3]; - var s = Math.sin(rad); - var c = Math.cos(rad); - out[0] = a0 * c + a2 * s; - out[1] = a1 * c + a3 * s; - out[2] = a0 * -s + a2 * c; - out[3] = a1 * -s + a3 * c; - return out; - } - /** - * Scales the mat2 by the dimensions in the given vec2 - * - * @param {mat2} out the receiving matrix - * @param {ReadonlyMat2} a the matrix to rotate - * @param {ReadonlyVec2} v the vec2 to scale the matrix by - * @returns {mat2} out - **/ - function scale$8(out, a, v) { - var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3]; - var v0 = v[0], v1 = v[1]; - out[0] = a0 * v0; - out[1] = a1 * v0; - out[2] = a2 * v1; - out[3] = a3 * v1; - return out; - } - /** - * Creates a matrix from a given angle - * This is equivalent to (but much faster than): - * - * mat2.identity(dest); - * mat2.rotate(dest, dest, rad); - * - * @param {mat2} out mat2 receiving operation result - * @param {Number} rad the angle to rotate the matrix by - * @returns {mat2} out - */ - function fromRotation$4(out, rad) { - var s = Math.sin(rad); - var c = Math.cos(rad); - out[0] = c; - out[1] = s; - out[2] = -s; - out[3] = c; - return out; - } - /** - * Creates a matrix from a vector scaling - * This is equivalent to (but much faster than): - * - * mat2.identity(dest); - * mat2.scale(dest, dest, vec); - * - * @param {mat2} out mat2 receiving operation result - * @param {ReadonlyVec2} v Scaling vector - * @returns {mat2} out - */ - function fromScaling$3(out, v) { - out[0] = v[0]; - out[1] = 0; - out[2] = 0; - out[3] = v[1]; - return out; - } - /** - * Returns a string representation of a mat2 - * - * @param {ReadonlyMat2} a matrix to represent as a string - * @returns {String} string representation of the matrix - */ - function str$8(a) { - return "mat2(" + a[0].toString() + ", " + a[1].toString() + ", " + a[2].toString() + ", " + a[3].toString() + ")"; - } - /** - * Returns Frobenius norm of a mat2 - * - * @param {ReadonlyMat2} a the matrix to calculate Frobenius norm of - * @returns {Number} Frobenius norm - */ - function frob$3(a) { - return Maths.hypot(a[0], a[1], a[2], a[3]); - } - /** - * Returns L, D and U matrices (Lower triangular, Diagonal and Upper triangular) by factorizing the input matrix - * @param {ReadonlyMat2} L the lower triangular matrix - * @param {ReadonlyMat2} D the diagonal matrix - * @param {ReadonlyMat2} U the upper triangular matrix - * @param {ReadonlyMat2} a the input matrix to factorize - * @returns {Array} LDU - */ - function LDU(L, D, U, a) { - L[2] = a[2] / a[0]; - U[0] = a[0]; - U[1] = a[1]; - U[3] = a[3] - L[2] * U[1]; - return [L, D, U]; - } - /** - * Adds two mat2's - * - * @param {mat2} out the receiving matrix - * @param {ReadonlyMat2} a the first operand - * @param {ReadonlyMat2} b the second operand - * @returns {mat2} out - */ - function add$8(out, a, b) { - out[0] = a[0] + b[0]; - out[1] = a[1] + b[1]; - out[2] = a[2] + b[2]; - out[3] = a[3] + b[3]; - return out; - } - /** - * Subtracts matrix b from matrix a - * - * @param {mat2} out the receiving matrix - * @param {ReadonlyMat2} a the first operand - * @param {ReadonlyMat2} b the second operand - * @returns {mat2} out - */ - function subtract$6(out, a, b) { - out[0] = a[0] - b[0]; - out[1] = a[1] - b[1]; - out[2] = a[2] - b[2]; - out[3] = a[3] - b[3]; - return out; - } - /** - * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===) - * - * @param {ReadonlyMat2} a The first matrix. - * @param {ReadonlyMat2} b The second matrix. - * @returns {Boolean} True if the matrices are equal, false otherwise. - */ - function exactEquals$8(a, b) { - return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3]; - } - /** - * Returns whether or not the matrices have approximately the same elements in the same position. - * - * @param {ReadonlyMat2} a The first matrix. - * @param {ReadonlyMat2} b The second matrix. - * @returns {Boolean} True if the matrices are equal, false otherwise. - */ - function equals$8(a, b) { - var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3]; - var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3]; - return (Math.abs(a0 - b0) <= - EPSILON * Maths.max(1.0, Math.abs(a0), Math.abs(b0)) && - Math.abs(a1 - b1) <= - EPSILON * Maths.max(1.0, Math.abs(a1), Math.abs(b1)) && - Math.abs(a2 - b2) <= - EPSILON * Maths.max(1.0, Math.abs(a2), Math.abs(b2)) && - Math.abs(a3 - b3) <= - EPSILON * Maths.max(1.0, Math.abs(a3), Math.abs(b3))); - } - /** - * Multiply each element of the matrix by a scalar. - * - * @param {mat2} out the receiving matrix - * @param {ReadonlyMat2} a the matrix to scale - * @param {Number} b amount to scale the matrix's elements by - * @returns {mat2} out - */ - function multiplyScalar$3(out, a, b) { - out[0] = a[0] * b; - out[1] = a[1] * b; - out[2] = a[2] * b; - out[3] = a[3] * b; - return out; - } - /** - * Adds two mat2's after multiplying each element of the second operand by a scalar value. - * - * @param {mat2} out the receiving vector - * @param {ReadonlyMat2} a the first operand - * @param {ReadonlyMat2} b the second operand - * @param {Number} scale the amount to scale b's elements by before adding - * @returns {mat2} out - */ - function multiplyScalarAndAdd$3(out, a, b, scale) { - out[0] = a[0] + b[0] * scale; - out[1] = a[1] + b[1] * scale; - out[2] = a[2] + b[2] * scale; - out[3] = a[3] + b[3] * scale; - return out; - } - /** - * Alias for {@link mat2.multiply} - * @function - */ - var mul$8 = multiply$8; - /** - * Alias for {@link mat2.subtract} - * @function - */ - var sub$6 = subtract$6; - - var mat2 = /*#__PURE__*/Object.freeze({ - __proto__: null, - create: create$8, - clone: clone$8, - copy: copy$8, - identity: identity$5, - fromValues: fromValues$8, - set: set$8, - transpose: transpose$2, - invert: invert$5, - adjoint: adjoint$2, - determinant: determinant$3, - multiply: multiply$8, - rotate: rotate$4, - scale: scale$8, - fromRotation: fromRotation$4, - fromScaling: fromScaling$3, - str: str$8, - frob: frob$3, - LDU: LDU, - add: add$8, - subtract: subtract$6, - exactEquals: exactEquals$8, - equals: equals$8, - multiplyScalar: multiplyScalar$3, - multiplyScalarAndAdd: multiplyScalarAndAdd$3, - mul: mul$8, - sub: sub$6 - }); - - /** - * 2x3 Matrix - * @module mat2d - * @description - * A mat2d contains six elements defined as: - *
-     * [a, b,
-     *  c, d,
-     *  tx, ty]
-     * 
- * This is a short form for the 3x3 matrix: - *
-     * [a, b, 0,
-     *  c, d, 0,
-     *  tx, ty, 1]
-     * 
- * The last column is ignored so the array is shorter and operations are faster. - */ - /** - * Creates a new identity mat2d - * - * @returns {mat2d} a new 2x3 matrix - */ - function create$7() { - var out = new Float64Array(6); - //if (mat2d != Float32Array) { - out[1] = 0; - out[2] = 0; - out[4] = 0; - out[5] = 0; - //} - out[0] = 1; - out[3] = 1; - return out; - } - /** - * Creates a new mat2d initialized with values from an existing matrix - * - * @param {ReadonlyMat2d} a matrix to clone - * @returns {mat2d} a new 2x3 matrix - */ - function clone$7(a) { - var out = new Float64Array(6); - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - out[4] = a[4]; - out[5] = a[5]; - return out; - } - /** - * Copy the values from one mat2d to another - * - * @param {mat2d} out the receiving matrix - * @param {ReadonlyMat2d} a the source matrix - * @returns {mat2d} out - */ - function copy$7(out, a) { - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - out[4] = a[4]; - out[5] = a[5]; - return out; - } - /** - * Set a mat2d to the identity matrix - * - * @param {mat2d} out the receiving matrix - * @returns {mat2d} out - */ - function identity$4(out) { - out[0] = 1; - out[1] = 0; - out[2] = 0; - out[3] = 1; - out[4] = 0; - out[5] = 0; - return out; - } - /** - * Create a new mat2d with the given values - * - * @param {Number} a Component A (index 0) - * @param {Number} b Component B (index 1) - * @param {Number} c Component C (index 2) - * @param {Number} d Component D (index 3) - * @param {Number} tx Component TX (index 4) - * @param {Number} ty Component TY (index 5) - * @returns {mat2d} A new mat2d - */ - function fromValues$7(a, b, c, d, tx, ty) { - var out = new Float64Array(6); - out[0] = a; - out[1] = b; - out[2] = c; - out[3] = d; - out[4] = tx; - out[5] = ty; - return out; - } - /** - * Set the components of a mat2d to the given values - * - * @param {mat2d} out the receiving matrix - * @param {Number} a Component A (index 0) - * @param {Number} b Component B (index 1) - * @param {Number} c Component C (index 2) - * @param {Number} d Component D (index 3) - * @param {Number} tx Component TX (index 4) - * @param {Number} ty Component TY (index 5) - * @returns {mat2d} out - */ - function set$7(out, a, b, c, d, tx, ty) { - out[0] = a; - out[1] = b; - out[2] = c; - out[3] = d; - out[4] = tx; - out[5] = ty; - return out; - } - /** - * Inverts a mat2d - * - * @param {mat2d} out the receiving matrix - * @param {ReadonlyMat2d} a the source matrix - * @returns {mat2d} out - */ - function invert$4(out, a) { - var aa = a[0], ab = a[1], ac = a[2], ad = a[3]; - var atx = a[4], aty = a[5]; - var det = aa * ad - ab * ac; - if (!det) { - return null; - } - det = 1.0 / det; - out[0] = ad * det; - out[1] = -ab * det; - out[2] = -ac * det; - out[3] = aa * det; - out[4] = (ac * aty - ad * atx) * det; - out[5] = (ab * atx - aa * aty) * det; - return out; - } - /** - * Calculates the determinant of a mat2d - * - * @param {ReadonlyMat2d} a the source matrix - * @returns {Number} determinant of a - */ - function determinant$2(a) { - return a[0] * a[3] - a[1] * a[2]; - } - /** - * Multiplies two mat2d's - * - * @param {mat2d} out the receiving matrix - * @param {ReadonlyMat2d} a the first operand - * @param {ReadonlyMat2d} b the second operand - * @returns {mat2d} out - */ - function multiply$7(out, a, b) { - var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5]; - var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3], b4 = b[4], b5 = b[5]; - out[0] = a0 * b0 + a2 * b1; - out[1] = a1 * b0 + a3 * b1; - out[2] = a0 * b2 + a2 * b3; - out[3] = a1 * b2 + a3 * b3; - out[4] = a0 * b4 + a2 * b5 + a4; - out[5] = a1 * b4 + a3 * b5 + a5; - return out; - } - /** - * Rotates a mat2d by the given angle - * - * @param {mat2d} out the receiving matrix - * @param {ReadonlyMat2d} a the matrix to rotate - * @param {Number} rad the angle to rotate the matrix by - * @returns {mat2d} out - */ - function rotate$3(out, a, rad) { - var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5]; - var s = Math.sin(rad); - var c = Math.cos(rad); - out[0] = a0 * c + a2 * s; - out[1] = a1 * c + a3 * s; - out[2] = a0 * -s + a2 * c; - out[3] = a1 * -s + a3 * c; - out[4] = a4; - out[5] = a5; - return out; - } - /** - * Scales the mat2d by the dimensions in the given vec2 - * - * @param {mat2d} out the receiving matrix - * @param {ReadonlyMat2d} a the matrix to translate - * @param {ReadonlyVec2} v the vec2 to scale the matrix by - * @returns {mat2d} out - **/ - function scale$7(out, a, v) { - var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5]; - var v0 = v[0], v1 = v[1]; - out[0] = a0 * v0; - out[1] = a1 * v0; - out[2] = a2 * v1; - out[3] = a3 * v1; - out[4] = a4; - out[5] = a5; - return out; - } - /** - * Translates the mat2d by the dimensions in the given vec2 - * - * @param {mat2d} out the receiving matrix - * @param {ReadonlyMat2d} a the matrix to translate - * @param {ReadonlyVec2} v the vec2 to translate the matrix by - * @returns {mat2d} out - **/ - function translate$3(out, a, v) { - var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5]; - var v0 = v[0], v1 = v[1]; - out[0] = a0; - out[1] = a1; - out[2] = a2; - out[3] = a3; - out[4] = a0 * v0 + a2 * v1 + a4; - out[5] = a1 * v0 + a3 * v1 + a5; - return out; - } - /** - * Creates a matrix from a given angle - * This is equivalent to (but much faster than): - * - * mat2d.identity(dest); - * mat2d.rotate(dest, dest, rad); - * - * @param {mat2d} out mat2d receiving operation result - * @param {Number} rad the angle to rotate the matrix by - * @returns {mat2d} out - */ - function fromRotation$3(out, rad) { - var s = Math.sin(rad), c = Math.cos(rad); - out[0] = c; - out[1] = s; - out[2] = -s; - out[3] = c; - out[4] = 0; - out[5] = 0; - return out; - } - /** - * Creates a matrix from a vector scaling - * This is equivalent to (but much faster than): - * - * mat2d.identity(dest); - * mat2d.scale(dest, dest, vec); - * - * @param {mat2d} out mat2d receiving operation result - * @param {ReadonlyVec2} v Scaling vector - * @returns {mat2d} out - */ - function fromScaling$2(out, v) { - out[0] = v[0]; - out[1] = 0; - out[2] = 0; - out[3] = v[1]; - out[4] = 0; - out[5] = 0; - return out; - } - /** - * Creates a matrix from a vector translation - * This is equivalent to (but much faster than): - * - * mat2d.identity(dest); - * mat2d.translate(dest, dest, vec); - * - * @param {mat2d} out mat2d receiving operation result - * @param {ReadonlyVec2} v Translation vector - * @returns {mat2d} out - */ - function fromTranslation$3(out, v) { - out[0] = 1; - out[1] = 0; - out[2] = 0; - out[3] = 1; - out[4] = v[0]; - out[5] = v[1]; - return out; - } - /** - * Returns a string representation of a mat2d - * - * @param {ReadonlyMat2d} a matrix to represent as a string - * @returns {String} string representation of the matrix - */ - function str$7(a) { - return ("mat2d(" + - a[0].toString() + - ", " + - a[1].toString() + - ", " + - a[2].toString() + - ", " + - a[3].toString() + - ", " + - a[4].toString() + - ", " + - a[5].toString() + - ")"); - } - /** - * Returns Frobenius norm of a mat2d - * - * @param {ReadonlyMat2d} a the matrix to calculate Frobenius norm of - * @returns {Number} Frobenius norm - */ - function frob$2(a) { - return Maths.hypot(a[0], a[1], a[2], a[3], a[4], a[5], 1); - } - /** - * Adds two mat2d's - * - * @param {mat2d} out the receiving matrix - * @param {ReadonlyMat2d} a the first operand - * @param {ReadonlyMat2d} b the second operand - * @returns {mat2d} out - */ - function add$7(out, a, b) { - out[0] = a[0] + b[0]; - out[1] = a[1] + b[1]; - out[2] = a[2] + b[2]; - out[3] = a[3] + b[3]; - out[4] = a[4] + b[4]; - out[5] = a[5] + b[5]; - return out; - } - /** - * Subtracts matrix b from matrix a - * - * @param {mat2d} out the receiving matrix - * @param {ReadonlyMat2d} a the first operand - * @param {ReadonlyMat2d} b the second operand - * @returns {mat2d} out - */ - function subtract$5(out, a, b) { - out[0] = a[0] - b[0]; - out[1] = a[1] - b[1]; - out[2] = a[2] - b[2]; - out[3] = a[3] - b[3]; - out[4] = a[4] - b[4]; - out[5] = a[5] - b[5]; - return out; - } - /** - * Multiply each element of the matrix by a scalar. - * - * @param {mat2d} out the receiving matrix - * @param {ReadonlyMat2d} a the matrix to scale - * @param {Number} b amount to scale the matrix's elements by - * @returns {mat2d} out - */ - function multiplyScalar$2(out, a, b) { - out[0] = a[0] * b; - out[1] = a[1] * b; - out[2] = a[2] * b; - out[3] = a[3] * b; - out[4] = a[4] * b; - out[5] = a[5] * b; - return out; - } - /** - * Adds two mat2d's after multiplying each element of the second operand by a scalar value. - * - * @param {mat2d} out the receiving vector - * @param {ReadonlyMat2d} a the first operand - * @param {ReadonlyMat2d} b the second operand - * @param {Number} scale the amount to scale b's elements by before adding - * @returns {mat2d} out - */ - function multiplyScalarAndAdd$2(out, a, b, scale) { - out[0] = a[0] + b[0] * scale; - out[1] = a[1] + b[1] * scale; - out[2] = a[2] + b[2] * scale; - out[3] = a[3] + b[3] * scale; - out[4] = a[4] + b[4] * scale; - out[5] = a[5] + b[5] * scale; - return out; - } - /** - * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===) - * - * @param {ReadonlyMat2d} a The first matrix. - * @param {ReadonlyMat2d} b The second matrix. - * @returns {Boolean} True if the matrices are equal, false otherwise. - */ - function exactEquals$7(a, b) { - return (a[0] === b[0] && - a[1] === b[1] && - a[2] === b[2] && - a[3] === b[3] && - a[4] === b[4] && - a[5] === b[5]); - } - /** - * Returns whether or not the matrices have approximately the same elements in the same position. - * - * @param {ReadonlyMat2d} a The first matrix. - * @param {ReadonlyMat2d} b The second matrix. - * @returns {Boolean} True if the matrices are equal, false otherwise. - */ - function equals$7(a, b) { - var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5]; - var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3], b4 = b[4], b5 = b[5]; - return (Math.abs(a0 - b0) <= - EPSILON * Maths.max(1.0, Math.abs(a0), Math.abs(b0)) && - Math.abs(a1 - b1) <= - EPSILON * Maths.max(1.0, Math.abs(a1), Math.abs(b1)) && - Math.abs(a2 - b2) <= - EPSILON * Maths.max(1.0, Math.abs(a2), Math.abs(b2)) && - Math.abs(a3 - b3) <= - EPSILON * Maths.max(1.0, Math.abs(a3), Math.abs(b3)) && - Math.abs(a4 - b4) <= - EPSILON * Maths.max(1.0, Math.abs(a4), Math.abs(b4)) && - Math.abs(a5 - b5) <= - EPSILON * Maths.max(1.0, Math.abs(a5), Math.abs(b5))); - } - /** - * Alias for {@link mat2d.multiply} - * @function - */ - var mul$7 = multiply$7; - /** - * Alias for {@link mat2d.subtract} - * @function - */ - var sub$5 = subtract$5; - - var mat2d = /*#__PURE__*/Object.freeze({ - __proto__: null, - create: create$7, - clone: clone$7, - copy: copy$7, - identity: identity$4, - fromValues: fromValues$7, - set: set$7, - invert: invert$4, - determinant: determinant$2, - multiply: multiply$7, - rotate: rotate$3, - scale: scale$7, - translate: translate$3, - fromRotation: fromRotation$3, - fromScaling: fromScaling$2, - fromTranslation: fromTranslation$3, - str: str$7, - frob: frob$2, - add: add$7, - subtract: subtract$5, - multiplyScalar: multiplyScalar$2, - multiplyScalarAndAdd: multiplyScalarAndAdd$2, - exactEquals: exactEquals$7, - equals: equals$7, - mul: mul$7, - sub: sub$5 - }); - - /** - * 3x3 Matrix - * @module mat3 - */ - /** - * Creates a new identity mat3 - * - * @returns {mat3} a new 3x3 matrix - */ - function create$6() { - var out = new Float64Array(9); - //if (glMatrix.ARRAY_TYPE != Float32Array): mat3 { - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[5] = 0; - out[6] = 0; - out[7] = 0; - //} - out[0] = 1; - out[4] = 1; - out[8] = 1; - return out; - } - /** - * Copies the upper-left 3x3 values into the given mat3. - * - * @param {mat3} out the receiving 3x3 matrix - * @param {ReadonlyMat4} a the source 4x4 matrix - * @returns {mat3} out - */ - function fromMat4$1(out, a) { - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[4]; - out[4] = a[5]; - out[5] = a[6]; - out[6] = a[8]; - out[7] = a[9]; - out[8] = a[10]; - return out; - } - /** - * Creates a new mat3 initialized with values from an existing matrix - * - * @param {ReadonlyMat3} a matrix to clone - * @returns {mat3} a new 3x3 matrix - */ - function clone$6(a) { - var out = new Float64Array(9); - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - out[4] = a[4]; - out[5] = a[5]; - out[6] = a[6]; - out[7] = a[7]; - out[8] = a[8]; - return out; - } - /** - * Copy the values from one mat3 to another - * - * @param {mat3} out the receiving matrix - * @param {ReadonlyMat3} a the source matrix - * @returns {mat3} out - */ - function copy$6(out, a) { - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - out[4] = a[4]; - out[5] = a[5]; - out[6] = a[6]; - out[7] = a[7]; - out[8] = a[8]; - return out; - } - /** - * Create a new mat3 with the given values - * - * @param {Number} m00 Component in column 0, row 0 position (index 0) - * @param {Number} m01 Component in column 0, row 1 position (index 1) - * @param {Number} m02 Component in column 0, row 2 position (index 2) - * @param {Number} m10 Component in column 1, row 0 position (index 3) - * @param {Number} m11 Component in column 1, row 1 position (index 4) - * @param {Number} m12 Component in column 1, row 2 position (index 5) - * @param {Number} m20 Component in column 2, row 0 position (index 6) - * @param {Number} m21 Component in column 2, row 1 position (index 7) - * @param {Number} m22 Component in column 2, row 2 position (index 8) - * @returns {mat3} A new mat3 - */ - function fromValues$6(m00, m01, m02, m10, m11, m12, m20, m21, m22) { - var out = new Float64Array(9); - out[0] = m00; - out[1] = m01; - out[2] = m02; - out[3] = m10; - out[4] = m11; - out[5] = m12; - out[6] = m20; - out[7] = m21; - out[8] = m22; - return out; - } - /** - * Set the components of a mat3 to the given values - * - * @param {mat3} out the receiving matrix - * @param {Number} m00 Component in column 0, row 0 position (index 0) - * @param {Number} m01 Component in column 0, row 1 position (index 1) - * @param {Number} m02 Component in column 0, row 2 position (index 2) - * @param {Number} m10 Component in column 1, row 0 position (index 3) - * @param {Number} m11 Component in column 1, row 1 position (index 4) - * @param {Number} m12 Component in column 1, row 2 position (index 5) - * @param {Number} m20 Component in column 2, row 0 position (index 6) - * @param {Number} m21 Component in column 2, row 1 position (index 7) - * @param {Number} m22 Component in column 2, row 2 position (index 8) - * @returns {mat3} out - */ - function set$6(out, m00, m01, m02, m10, m11, m12, m20, m21, m22) { - out[0] = m00; - out[1] = m01; - out[2] = m02; - out[3] = m10; - out[4] = m11; - out[5] = m12; - out[6] = m20; - out[7] = m21; - out[8] = m22; - return out; - } - /** - * Set a mat3 to the identity matrix - * - * @param {mat3} out the receiving matrix - * @returns {mat3} out - */ - function identity$3(out) { - out[0] = 1; - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = 1; - out[5] = 0; - out[6] = 0; - out[7] = 0; - out[8] = 1; - return out; - } - /** - * Transpose the values of a mat3 - * - * @param {mat3} out the receiving matrix - * @param {ReadonlyMat3} a the source matrix - * @returns {mat3} out - */ - function transpose$1(out, a) { - // If we are transposing ourselves we can skip a few steps but have to cache some values - if (out === a) { - var a01 = a[1], a02 = a[2], a12 = a[5]; - out[1] = a[3]; - out[2] = a[6]; - out[3] = a01; - out[5] = a[7]; - out[6] = a02; - out[7] = a12; - } - else { - out[0] = a[0]; - out[1] = a[3]; - out[2] = a[6]; - out[3] = a[1]; - out[4] = a[4]; - out[5] = a[7]; - out[6] = a[2]; - out[7] = a[5]; - out[8] = a[8]; - } - return out; - } - /** - * Inverts a mat3 - * - * @param {mat3} out the receiving matrix - * @param {ReadonlyMat3} a the source matrix - * @returns {mat3} out - */ - function invert$3(out, a) { - var a00 = a[0], a01 = a[1], a02 = a[2]; - var a10 = a[3], a11 = a[4], a12 = a[5]; - var a20 = a[6], a21 = a[7], a22 = a[8]; - var b01 = a22 * a11 - a12 * a21; - var b11 = -a22 * a10 + a12 * a20; - var b21 = a21 * a10 - a11 * a20; - // Calculate the determinant - var det = a00 * b01 + a01 * b11 + a02 * b21; - if (!det) { - return null; - } - det = 1.0 / det; - out[0] = b01 * det; - out[1] = (-a22 * a01 + a02 * a21) * det; - out[2] = (a12 * a01 - a02 * a11) * det; - out[3] = b11 * det; - out[4] = (a22 * a00 - a02 * a20) * det; - out[5] = (-a12 * a00 + a02 * a10) * det; - out[6] = b21 * det; - out[7] = (-a21 * a00 + a01 * a20) * det; - out[8] = (a11 * a00 - a01 * a10) * det; - return out; - } - /** - * Calculates the adjugate of a mat3 - * - * @param {mat3} out the receiving matrix - * @param {ReadonlyMat3} a the source matrix - * @returns {mat3} out - */ - function adjoint$1(out, a) { - var a00 = a[0], a01 = a[1], a02 = a[2]; - var a10 = a[3], a11 = a[4], a12 = a[5]; - var a20 = a[6], a21 = a[7], a22 = a[8]; - out[0] = a11 * a22 - a12 * a21; - out[1] = a02 * a21 - a01 * a22; - out[2] = a01 * a12 - a02 * a11; - out[3] = a12 * a20 - a10 * a22; - out[4] = a00 * a22 - a02 * a20; - out[5] = a02 * a10 - a00 * a12; - out[6] = a10 * a21 - a11 * a20; - out[7] = a01 * a20 - a00 * a21; - out[8] = a00 * a11 - a01 * a10; - return out; - } - /** - * Calculates the determinant of a mat3 - * - * @param {ReadonlyMat3} a the source matrix - * @returns {Number} determinant of a - */ - function determinant$1(a) { - var a00 = a[0], a01 = a[1], a02 = a[2]; - var a10 = a[3], a11 = a[4], a12 = a[5]; - var a20 = a[6], a21 = a[7], a22 = a[8]; - return (a00 * (a22 * a11 - a12 * a21) + - a01 * (-a22 * a10 + a12 * a20) + - a02 * (a21 * a10 - a11 * a20)); - } - /** - * Multiplies two mat3's - * - * @param {mat3} out the receiving matrix - * @param {ReadonlyMat3} a the first operand - * @param {ReadonlyMat3} b the second operand - * @returns {mat3} out - */ - function multiply$6(out, a, b) { - var a00 = a[0], a01 = a[1], a02 = a[2]; - var a10 = a[3], a11 = a[4], a12 = a[5]; - var a20 = a[6], a21 = a[7], a22 = a[8]; - var b00 = b[0], b01 = b[1], b02 = b[2]; - var b10 = b[3], b11 = b[4], b12 = b[5]; - var b20 = b[6], b21 = b[7], b22 = b[8]; - out[0] = b00 * a00 + b01 * a10 + b02 * a20; - out[1] = b00 * a01 + b01 * a11 + b02 * a21; - out[2] = b00 * a02 + b01 * a12 + b02 * a22; - out[3] = b10 * a00 + b11 * a10 + b12 * a20; - out[4] = b10 * a01 + b11 * a11 + b12 * a21; - out[5] = b10 * a02 + b11 * a12 + b12 * a22; - out[6] = b20 * a00 + b21 * a10 + b22 * a20; - out[7] = b20 * a01 + b21 * a11 + b22 * a21; - out[8] = b20 * a02 + b21 * a12 + b22 * a22; - return out; - } - /** - * Translate a mat3 by the given vector - * - * @param {mat3} out the receiving matrix - * @param {ReadonlyMat3} a the matrix to translate - * @param {ReadonlyVec2} v vector to translate by - * @returns {mat3} out - */ - function translate$2(out, a, v) { - var a00 = a[0], a01 = a[1], a02 = a[2], a10 = a[3], a11 = a[4], a12 = a[5], a20 = a[6], a21 = a[7], a22 = a[8], x = v[0], y = v[1]; - out[0] = a00; - out[1] = a01; - out[2] = a02; - out[3] = a10; - out[4] = a11; - out[5] = a12; - out[6] = x * a00 + y * a10 + a20; - out[7] = x * a01 + y * a11 + a21; - out[8] = x * a02 + y * a12 + a22; - return out; - } - /** - * Rotates a mat3 by the given angle - * - * @param {mat3} out the receiving matrix - * @param {ReadonlyMat3} a the matrix to rotate - * @param {Number} rad the angle to rotate the matrix by - * @returns {mat3} out - */ - function rotate$2(out, a, rad) { - var a00 = a[0], a01 = a[1], a02 = a[2], a10 = a[3], a11 = a[4], a12 = a[5], a20 = a[6], a21 = a[7], a22 = a[8], s = Math.sin(rad), c = Math.cos(rad); - out[0] = c * a00 + s * a10; - out[1] = c * a01 + s * a11; - out[2] = c * a02 + s * a12; - out[3] = c * a10 - s * a00; - out[4] = c * a11 - s * a01; - out[5] = c * a12 - s * a02; - out[6] = a20; - out[7] = a21; - out[8] = a22; - return out; - } - /** - * Scales the mat3 by the dimensions in the given vec2 - * - * @param {mat3} out the receiving matrix - * @param {ReadonlyMat3} a the matrix to rotate - * @param {ReadonlyVec2} v the vec2 to scale the matrix by - * @returns {mat3} out - **/ - function scale$6(out, a, v) { - var x = v[0], y = v[1]; - out[0] = x * a[0]; - out[1] = x * a[1]; - out[2] = x * a[2]; - out[3] = y * a[3]; - out[4] = y * a[4]; - out[5] = y * a[5]; - out[6] = a[6]; - out[7] = a[7]; - out[8] = a[8]; - return out; - } - /** - * Creates a matrix from a vector translation - * This is equivalent to (but much faster than): - * - * mat3.identity(dest); - * mat3.translate(dest, dest, vec); - * - * @param {mat3} out mat3 receiving operation result - * @param {ReadonlyVec2} v Translation vector - * @returns {mat3} out - */ - function fromTranslation$2(out, v) { - out[0] = 1; - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = 1; - out[5] = 0; - out[6] = v[0]; - out[7] = v[1]; - out[8] = 1; - return out; - } - /** - * Creates a matrix from a given angle - * This is equivalent to (but much faster than): - * - * mat3.identity(dest); - * mat3.rotate(dest, dest, rad); - * - * @param {mat3} out mat3 receiving operation result - * @param {Number} rad the angle to rotate the matrix by - * @returns {mat3} out - */ - function fromRotation$2(out, rad) { - var s = Math.sin(rad), c = Math.cos(rad); - out[0] = c; - out[1] = s; - out[2] = 0; - out[3] = -s; - out[4] = c; - out[5] = 0; - out[6] = 0; - out[7] = 0; - out[8] = 1; - return out; - } - /** - * Creates a matrix from a vector scaling - * This is equivalent to (but much faster than): - * - * mat3.identity(dest); - * mat3.scale(dest, dest, vec); - * - * @param {mat3} out mat3 receiving operation result - * @param {ReadonlyVec2} v Scaling vector - * @returns {mat3} out - */ - function fromScaling$1(out, v) { - out[0] = v[0]; - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = v[1]; - out[5] = 0; - out[6] = 0; - out[7] = 0; - out[8] = 1; - return out; - } - /** - * Copies the values from a mat2d into a mat3 - * - * @param {mat3} out the receiving matrix - * @param {ReadonlyMat2d} a the matrix to copy - * @returns {mat3} out - **/ - function fromMat2d(out, a) { - out[0] = a[0]; - out[1] = a[1]; - out[2] = 0; - out[3] = a[2]; - out[4] = a[3]; - out[5] = 0; - out[6] = a[4]; - out[7] = a[5]; - out[8] = 1; - return out; - } - /** - * Calculates a 3x3 matrix from the given quaternion - * - * @param {mat3} out mat3 receiving operation result - * @param {ReadonlyQuat} q Quaternion to create matrix from - * - * @returns {mat3} out - */ - function fromQuat$1(out, q) { - var x = q[0], y = q[1], z = q[2], w = q[3]; - var x2 = x + x; - var y2 = y + y; - var z2 = z + z; - var xx = x * x2; - var yx = y * x2; - var yy = y * y2; - var zx = z * x2; - var zy = z * y2; - var zz = z * z2; - var wx = w * x2; - var wy = w * y2; - var wz = w * z2; - out[0] = 1 - yy - zz; - out[3] = yx - wz; - out[6] = zx + wy; - out[1] = yx + wz; - out[4] = 1 - xx - zz; - out[7] = zy - wx; - out[2] = zx - wy; - out[5] = zy + wx; - out[8] = 1 - xx - yy; - return out; - } - /** - * Calculates a 3x3 normal matrix (transpose inverse) from the 4x4 matrix - * - * @param {mat3} out mat3 receiving operation result - * @param {ReadonlyMat4} a Mat4 to derive the normal matrix from - * - * @returns {mat3} out - */ - function normalFromMat4(out, a) { - var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3]; - var a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7]; - var a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11]; - var a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15]; - var b00 = a00 * a11 - a01 * a10; - var b01 = a00 * a12 - a02 * a10; - var b02 = a00 * a13 - a03 * a10; - var b03 = a01 * a12 - a02 * a11; - var b04 = a01 * a13 - a03 * a11; - var b05 = a02 * a13 - a03 * a12; - var b06 = a20 * a31 - a21 * a30; - var b07 = a20 * a32 - a22 * a30; - var b08 = a20 * a33 - a23 * a30; - var b09 = a21 * a32 - a22 * a31; - var b10 = a21 * a33 - a23 * a31; - var b11 = a22 * a33 - a23 * a32; - // Calculate the determinant - var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06; - if (!det) { - return null; - } - det = 1.0 / det; - out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det; - out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det; - out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det; - out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det; - out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det; - out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det; - out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det; - out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det; - out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det; - return out; - } - /** - * Generates a 2D projection matrix with the given bounds - * - * @param {mat3} out mat3 frustum matrix will be written into - * @param {number} width Width of your gl context - * @param {number} height Height of gl context - * @returns {mat3} out - */ - function projection(out, width, height) { - out[0] = 2 / width; - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = -2 / height; - out[5] = 0; - out[6] = -1; - out[7] = 1; - out[8] = 1; - return out; - } - /** - * Returns a string representation of a mat3 - * - * @param {ReadonlyMat3} a matrix to represent as a string - * @returns {String} string representation of the matrix - */ - function str$6(a) { - return ("mat3(" + - a[0].toString() + - ", " + - a[1].toString() + - ", " + - a[2].toString() + - ", " + - a[3].toString() + - ", " + - a[4].toString() + - ", " + - a[5].toString() + - ", " + - a[6].toString() + - ", " + - a[7].toString() + - ", " + - a[8].toString() + - ")"); - } - /** - * Returns Frobenius norm of a mat3 - * - * @param {ReadonlyMat3} a the matrix to calculate Frobenius norm of - * @returns {Number} Frobenius norm - */ - function frob$1(a) { - return Maths.hypot(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8]); - } - /** - * Adds two mat3's - * - * @param {mat3} out the receiving matrix - * @param {ReadonlyMat3} a the first operand - * @param {ReadonlyMat3} b the second operand - * @returns {mat3} out - */ - function add$6(out, a, b) { - out[0] = a[0] + b[0]; - out[1] = a[1] + b[1]; - out[2] = a[2] + b[2]; - out[3] = a[3] + b[3]; - out[4] = a[4] + b[4]; - out[5] = a[5] + b[5]; - out[6] = a[6] + b[6]; - out[7] = a[7] + b[7]; - out[8] = a[8] + b[8]; - return out; - } - /** - * Subtracts matrix b from matrix a - * - * @param {mat3} out the receiving matrix - * @param {ReadonlyMat3} a the first operand - * @param {ReadonlyMat3} b the second operand - * @returns {mat3} out - */ - function subtract$4(out, a, b) { - out[0] = a[0] - b[0]; - out[1] = a[1] - b[1]; - out[2] = a[2] - b[2]; - out[3] = a[3] - b[3]; - out[4] = a[4] - b[4]; - out[5] = a[5] - b[5]; - out[6] = a[6] - b[6]; - out[7] = a[7] - b[7]; - out[8] = a[8] - b[8]; - return out; - } - /** - * Multiply each element of the matrix by a scalar. - * - * @param {mat3} out the receiving matrix - * @param {ReadonlyMat3} a the matrix to scale - * @param {Number} b amount to scale the matrix's elements by - * @returns {mat3} out - */ - function multiplyScalar$1(out, a, b) { - out[0] = a[0] * b; - out[1] = a[1] * b; - out[2] = a[2] * b; - out[3] = a[3] * b; - out[4] = a[4] * b; - out[5] = a[5] * b; - out[6] = a[6] * b; - out[7] = a[7] * b; - out[8] = a[8] * b; - return out; - } - /** - * Adds two mat3's after multiplying each element of the second operand by a scalar value. - * - * @param {mat3} out the receiving vector - * @param {ReadonlyMat3} a the first operand - * @param {ReadonlyMat3} b the second operand - * @param {Number} scale the amount to scale b's elements by before adding - * @returns {mat3} out - */ - function multiplyScalarAndAdd$1(out, a, b, scale) { - out[0] = a[0] + b[0] * scale; - out[1] = a[1] + b[1] * scale; - out[2] = a[2] + b[2] * scale; - out[3] = a[3] + b[3] * scale; - out[4] = a[4] + b[4] * scale; - out[5] = a[5] + b[5] * scale; - out[6] = a[6] + b[6] * scale; - out[7] = a[7] + b[7] * scale; - out[8] = a[8] + b[8] * scale; - return out; - } - /** - * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===) - * - * @param {ReadonlyMat3} a The first matrix. - * @param {ReadonlyMat3} b The second matrix. - * @returns {Boolean} True if the matrices are equal, false otherwise. - */ - function exactEquals$6(a, b) { - return (a[0] === b[0] && - a[1] === b[1] && - a[2] === b[2] && - a[3] === b[3] && - a[4] === b[4] && - a[5] === b[5] && - a[6] === b[6] && - a[7] === b[7] && - a[8] === b[8]); - } - /** - * Returns whether or not the matrices have approximately the same elements in the same position. - * - * @param {ReadonlyMat3} a The first matrix. - * @param {ReadonlyMat3} b The second matrix. - * @returns {Boolean} True if the matrices are equal, false otherwise. - */ - function equals$6(a, b) { - var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5], a6 = a[6], a7 = a[7], a8 = a[8]; - var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3], b4 = b[4], b5 = b[5], b6 = b[6], b7 = b[7], b8 = b[8]; - return (Math.abs(a0 - b0) <= - EPSILON * Maths.max(1.0, Math.abs(a0), Math.abs(b0)) && - Math.abs(a1 - b1) <= - EPSILON * Maths.max(1.0, Math.abs(a1), Math.abs(b1)) && - Math.abs(a2 - b2) <= - EPSILON * Maths.max(1.0, Math.abs(a2), Math.abs(b2)) && - Math.abs(a3 - b3) <= - EPSILON * Maths.max(1.0, Math.abs(a3), Math.abs(b3)) && - Math.abs(a4 - b4) <= - EPSILON * Maths.max(1.0, Math.abs(a4), Math.abs(b4)) && - Math.abs(a5 - b5) <= - EPSILON * Maths.max(1.0, Math.abs(a5), Math.abs(b5)) && - Math.abs(a6 - b6) <= - EPSILON * Maths.max(1.0, Math.abs(a6), Math.abs(b6)) && - Math.abs(a7 - b7) <= - EPSILON * Maths.max(1.0, Math.abs(a7), Math.abs(b7)) && - Math.abs(a8 - b8) <= - EPSILON * Maths.max(1.0, Math.abs(a8), Math.abs(b8))); - } - /** - * Alias for {@link mat3.multiply} - * @function - */ - var mul$6 = multiply$6; - /** - * Alias for {@link mat3.subtract} - * @function - */ - var sub$4 = subtract$4; - - var mat3 = /*#__PURE__*/Object.freeze({ - __proto__: null, - create: create$6, - fromMat4: fromMat4$1, - clone: clone$6, - copy: copy$6, - fromValues: fromValues$6, - set: set$6, - identity: identity$3, - transpose: transpose$1, - invert: invert$3, - adjoint: adjoint$1, - determinant: determinant$1, - multiply: multiply$6, - translate: translate$2, - rotate: rotate$2, - scale: scale$6, - fromTranslation: fromTranslation$2, - fromRotation: fromRotation$2, - fromScaling: fromScaling$1, - fromMat2d: fromMat2d, - fromQuat: fromQuat$1, - normalFromMat4: normalFromMat4, - projection: projection, - str: str$6, - frob: frob$1, - add: add$6, - subtract: subtract$4, - multiplyScalar: multiplyScalar$1, - multiplyScalarAndAdd: multiplyScalarAndAdd$1, - exactEquals: exactEquals$6, - equals: equals$6, - mul: mul$6, - sub: sub$4 - }); - - /** - * Object containing the following values: upDegrees, downDegrees, leftDegrees, rightDegrees - */ - var Fov = /** @class */ (function () { - function Fov() { - } - return Fov; - }()); - /** - * 4x4 Matrix
Format: column-major, when typed out it looks like row-major
The matrices are being post multiplied. - * @module mat4 - */ - /** - * Creates a new identity mat4 - * - * @returns {mat4} a new 4x4 matrix - */ - function create$5() { - var out = new Float64Array(16); - //if (glMatrix.ARRAY_TYPE != Float32Array) { - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = 0; - out[6] = 0; - out[7] = 0; - out[8] = 0; - out[9] = 0; - out[11] = 0; - out[12] = 0; - out[13] = 0; - out[14] = 0; - //} - out[0] = 1; - out[5] = 1; - out[10] = 1; - out[15] = 1; - return out; - } - /** - * Creates a new mat4 initialized with values from an existing matrix - * - * @param {ReadonlyMat4} a matrix to clone - * @returns {mat4} a new 4x4 matrix - */ - function clone$5(a) { - var out = new Float64Array(16); - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - out[4] = a[4]; - out[5] = a[5]; - out[6] = a[6]; - out[7] = a[7]; - out[8] = a[8]; - out[9] = a[9]; - out[10] = a[10]; - out[11] = a[11]; - out[12] = a[12]; - out[13] = a[13]; - out[14] = a[14]; - out[15] = a[15]; - return out; - } - /** - * Copy the values from one mat4 to another - * - * @param {mat4} out the receiving matrix - * @param {ReadonlyMat4} a the source matrix - * @returns {mat4} out - */ - function copy$5(out, a) { - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - out[4] = a[4]; - out[5] = a[5]; - out[6] = a[6]; - out[7] = a[7]; - out[8] = a[8]; - out[9] = a[9]; - out[10] = a[10]; - out[11] = a[11]; - out[12] = a[12]; - out[13] = a[13]; - out[14] = a[14]; - out[15] = a[15]; - return out; - } - /** - * Create a new mat4 with the given values - * - * @param {Number} m00 Component in column 0, row 0 position (index 0) - * @param {Number} m01 Component in column 0, row 1 position (index 1) - * @param {Number} m02 Component in column 0, row 2 position (index 2) - * @param {Number} m03 Component in column 0, row 3 position (index 3) - * @param {Number} m10 Component in column 1, row 0 position (index 4) - * @param {Number} m11 Component in column 1, row 1 position (index 5) - * @param {Number} m12 Component in column 1, row 2 position (index 6) - * @param {Number} m13 Component in column 1, row 3 position (index 7) - * @param {Number} m20 Component in column 2, row 0 position (index 8) - * @param {Number} m21 Component in column 2, row 1 position (index 9) - * @param {Number} m22 Component in column 2, row 2 position (index 10) - * @param {Number} m23 Component in column 2, row 3 position (index 11) - * @param {Number} m30 Component in column 3, row 0 position (index 12) - * @param {Number} m31 Component in column 3, row 1 position (index 13) - * @param {Number} m32 Component in column 3, row 2 position (index 14) - * @param {Number} m33 Component in column 3, row 3 position (index 15) - * @returns {mat4} A new mat4 - */ - function fromValues$5(m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) { - var out = new Float64Array(16); - out[0] = m00; - out[1] = m01; - out[2] = m02; - out[3] = m03; - out[4] = m10; - out[5] = m11; - out[6] = m12; - out[7] = m13; - out[8] = m20; - out[9] = m21; - out[10] = m22; - out[11] = m23; - out[12] = m30; - out[13] = m31; - out[14] = m32; - out[15] = m33; - return out; - } - /** - * Set the components of a mat4 to the given values - * - * @param {mat4} out the receiving matrix - * @param {Number} m00 Component in column 0, row 0 position (index 0) - * @param {Number} m01 Component in column 0, row 1 position (index 1) - * @param {Number} m02 Component in column 0, row 2 position (index 2) - * @param {Number} m03 Component in column 0, row 3 position (index 3) - * @param {Number} m10 Component in column 1, row 0 position (index 4) - * @param {Number} m11 Component in column 1, row 1 position (index 5) - * @param {Number} m12 Component in column 1, row 2 position (index 6) - * @param {Number} m13 Component in column 1, row 3 position (index 7) - * @param {Number} m20 Component in column 2, row 0 position (index 8) - * @param {Number} m21 Component in column 2, row 1 position (index 9) - * @param {Number} m22 Component in column 2, row 2 position (index 10) - * @param {Number} m23 Component in column 2, row 3 position (index 11) - * @param {Number} m30 Component in column 3, row 0 position (index 12) - * @param {Number} m31 Component in column 3, row 1 position (index 13) - * @param {Number} m32 Component in column 3, row 2 position (index 14) - * @param {Number} m33 Component in column 3, row 3 position (index 15) - * @returns {mat4} out - */ - function set$5(out, m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) { - out[0] = m00; - out[1] = m01; - out[2] = m02; - out[3] = m03; - out[4] = m10; - out[5] = m11; - out[6] = m12; - out[7] = m13; - out[8] = m20; - out[9] = m21; - out[10] = m22; - out[11] = m23; - out[12] = m30; - out[13] = m31; - out[14] = m32; - out[15] = m33; - return out; - } - /** - * Set a mat4 to the identity matrix - * - * @param {mat4} out the receiving matrix - * @returns {mat4} out - */ - function identity$2(out) { - out[0] = 1; - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = 0; - out[5] = 1; - out[6] = 0; - out[7] = 0; - out[8] = 0; - out[9] = 0; - out[10] = 1; - out[11] = 0; - out[12] = 0; - out[13] = 0; - out[14] = 0; - out[15] = 1; - return out; - } - /** - * Transpose the values of a mat4 - * - * @param {mat4} out the receiving matrix - * @param {ReadonlyMat4} a the source matrix - * @returns {mat4} out - */ - function transpose(out, a) { - // If we are transposing ourselves we can skip a few steps but have to cache some values - if (out === a) { - var a01 = a[1], a02 = a[2], a03 = a[3]; - var a12 = a[6], a13 = a[7]; - var a23 = a[11]; - out[1] = a[4]; - out[2] = a[8]; - out[3] = a[12]; - out[4] = a01; - out[6] = a[9]; - out[7] = a[13]; - out[8] = a02; - out[9] = a12; - out[11] = a[14]; - out[12] = a03; - out[13] = a13; - out[14] = a23; - } - else { - out[0] = a[0]; - out[1] = a[4]; - out[2] = a[8]; - out[3] = a[12]; - out[4] = a[1]; - out[5] = a[5]; - out[6] = a[9]; - out[7] = a[13]; - out[8] = a[2]; - out[9] = a[6]; - out[10] = a[10]; - out[11] = a[14]; - out[12] = a[3]; - out[13] = a[7]; - out[14] = a[11]; - out[15] = a[15]; - } - return out; - } - /** - * Inverts a mat4 - * - * @param {mat4} out the receiving matrix - * @param {ReadonlyMat4} a the source matrix - * @returns {mat4} out - */ - function invert$2(out, a) { - var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3]; - var a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7]; - var a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11]; - var a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15]; - var b00 = a00 * a11 - a01 * a10; - var b01 = a00 * a12 - a02 * a10; - var b02 = a00 * a13 - a03 * a10; - var b03 = a01 * a12 - a02 * a11; - var b04 = a01 * a13 - a03 * a11; - var b05 = a02 * a13 - a03 * a12; - var b06 = a20 * a31 - a21 * a30; - var b07 = a20 * a32 - a22 * a30; - var b08 = a20 * a33 - a23 * a30; - var b09 = a21 * a32 - a22 * a31; - var b10 = a21 * a33 - a23 * a31; - var b11 = a22 * a33 - a23 * a32; - // Calculate the determinant - var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06; - if (!det) { - return null; - } - det = 1.0 / det; - out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det; - out[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det; - out[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det; - out[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det; - out[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det; - out[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det; - out[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det; - out[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det; - out[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det; - out[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det; - out[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det; - out[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det; - out[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det; - out[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det; - out[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det; - out[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det; - return out; - } - /** - * Calculates the adjugate of a mat4 - * - * @param {mat4} out the receiving matrix - * @param {ReadonlyMat4} a the source matrix - * @returns {mat4} out - */ - function adjoint(out, a) { - var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3]; - var a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7]; - var a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11]; - var a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15]; - var b00 = a00 * a11 - a01 * a10; - var b01 = a00 * a12 - a02 * a10; - var b02 = a00 * a13 - a03 * a10; - var b03 = a01 * a12 - a02 * a11; - var b04 = a01 * a13 - a03 * a11; - var b05 = a02 * a13 - a03 * a12; - var b06 = a20 * a31 - a21 * a30; - var b07 = a20 * a32 - a22 * a30; - var b08 = a20 * a33 - a23 * a30; - var b09 = a21 * a32 - a22 * a31; - var b10 = a21 * a33 - a23 * a31; - var b11 = a22 * a33 - a23 * a32; - out[0] = a11 * b11 - a12 * b10 + a13 * b09; - out[1] = a02 * b10 - a01 * b11 - a03 * b09; - out[2] = a31 * b05 - a32 * b04 + a33 * b03; - out[3] = a22 * b04 - a21 * b05 - a23 * b03; - out[4] = a12 * b08 - a10 * b11 - a13 * b07; - out[5] = a00 * b11 - a02 * b08 + a03 * b07; - out[6] = a32 * b02 - a30 * b05 - a33 * b01; - out[7] = a20 * b05 - a22 * b02 + a23 * b01; - out[8] = a10 * b10 - a11 * b08 + a13 * b06; - out[9] = a01 * b08 - a00 * b10 - a03 * b06; - out[10] = a30 * b04 - a31 * b02 + a33 * b00; - out[11] = a21 * b02 - a20 * b04 - a23 * b00; - out[12] = a11 * b07 - a10 * b09 - a12 * b06; - out[13] = a00 * b09 - a01 * b07 + a02 * b06; - out[14] = a31 * b01 - a30 * b03 - a32 * b00; - out[15] = a20 * b03 - a21 * b01 + a22 * b00; - return out; - } - /** - * Calculates the determinant of a mat4 - * - * @param {ReadonlyMat4} a the source matrix - * @returns {Number} determinant of a - */ - function determinant(a) { - var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3]; - var a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7]; - var a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11]; - var a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15]; - var b0 = a00 * a11 - a01 * a10; - var b1 = a00 * a12 - a02 * a10; - var b2 = a01 * a12 - a02 * a11; - var b3 = a20 * a31 - a21 * a30; - var b4 = a20 * a32 - a22 * a30; - var b5 = a21 * a32 - a22 * a31; - var b6 = a00 * b5 - a01 * b4 + a02 * b3; - var b7 = a10 * b5 - a11 * b4 + a12 * b3; - var b8 = a20 * b2 - a21 * b1 + a22 * b0; - var b9 = a30 * b2 - a31 * b1 + a32 * b0; - // Calculate the determinant - return a13 * b6 - a03 * b7 + a33 * b8 - a23 * b9; - } - /** - * Multiplies two mat4s - * - * @param {mat4} out the receiving matrix - * @param {ReadonlyMat4} a the first operand - * @param {ReadonlyMat4} b the second operand - * @returns {mat4} out - */ - function multiply$5(out, a, b) { - var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3]; - var a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7]; - var a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11]; - var a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15]; - // Cache only the current line of the second matrix - var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3]; - out[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; - out[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; - out[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; - out[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; - b0 = b[4]; - b1 = b[5]; - b2 = b[6]; - b3 = b[7]; - out[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; - out[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; - out[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; - out[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; - b0 = b[8]; - b1 = b[9]; - b2 = b[10]; - b3 = b[11]; - out[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; - out[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; - out[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; - out[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; - b0 = b[12]; - b1 = b[13]; - b2 = b[14]; - b3 = b[15]; - out[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; - out[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; - out[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; - out[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; - return out; - } - /** - * Translate a mat4 by the given vector - * - * @param {mat4} out the receiving matrix - * @param {ReadonlyMat4} a the matrix to translate - * @param {ReadonlyVec3} v vector to translate by - * @returns {mat4} out - */ - function translate$1(out, a, v) { - var x = v[0], y = v[1], z = v[2]; - var a00, a01, a02, a03; - var a10, a11, a12, a13; - var a20, a21, a22, a23; - if (a === out) { - out[12] = a[0] * x + a[4] * y + a[8] * z + a[12]; - out[13] = a[1] * x + a[5] * y + a[9] * z + a[13]; - out[14] = a[2] * x + a[6] * y + a[10] * z + a[14]; - out[15] = a[3] * x + a[7] * y + a[11] * z + a[15]; - } - else { - a00 = a[0]; - a01 = a[1]; - a02 = a[2]; - a03 = a[3]; - a10 = a[4]; - a11 = a[5]; - a12 = a[6]; - a13 = a[7]; - a20 = a[8]; - a21 = a[9]; - a22 = a[10]; - a23 = a[11]; - out[0] = a00; - out[1] = a01; - out[2] = a02; - out[3] = a03; - out[4] = a10; - out[5] = a11; - out[6] = a12; - out[7] = a13; - out[8] = a20; - out[9] = a21; - out[10] = a22; - out[11] = a23; - out[12] = a00 * x + a10 * y + a20 * z + a[12]; - out[13] = a01 * x + a11 * y + a21 * z + a[13]; - out[14] = a02 * x + a12 * y + a22 * z + a[14]; - out[15] = a03 * x + a13 * y + a23 * z + a[15]; - } - return out; - } - /** - * Scales the mat4 by the dimensions in the given vec3 not using vectorization - * - * @param {mat4} out the receiving matrix - * @param {ReadonlyMat4} a the matrix to scale - * @param {ReadonlyVec3} v the vec3 to scale the matrix by - * @returns {mat4} out - **/ - function scale$5(out, a, v) { - var x = v[0], y = v[1], z = v[2]; - out[0] = a[0] * x; - out[1] = a[1] * x; - out[2] = a[2] * x; - out[3] = a[3] * x; - out[4] = a[4] * y; - out[5] = a[5] * y; - out[6] = a[6] * y; - out[7] = a[7] * y; - out[8] = a[8] * z; - out[9] = a[9] * z; - out[10] = a[10] * z; - out[11] = a[11] * z; - out[12] = a[12]; - out[13] = a[13]; - out[14] = a[14]; - out[15] = a[15]; - return out; - } - /** - * Rotates a mat4 by the given angle around the given axis - * - * @param {mat4} out the receiving matrix - * @param {ReadonlyMat4} a the matrix to rotate - * @param {Number} rad the angle to rotate the matrix by - * @param {ReadonlyVec3} axis the axis to rotate around - * @returns {mat4} out - */ - function rotate$1(out, a, rad, axis) { - var x = axis[0], y = axis[1], z = axis[2]; - var len = Maths.hypot(x, y, z); - var s, c, t; - var a00, a01, a02, a03; - var a10, a11, a12, a13; - var a20, a21, a22, a23; - var b00, b01, b02; - var b10, b11, b12; - var b20, b21, b22; - if (len < EPSILON) { - return null; - } - len = 1 / len; - x *= len; - y *= len; - z *= len; - s = Math.sin(rad); - c = Math.cos(rad); - t = 1 - c; - a00 = a[0]; - a01 = a[1]; - a02 = a[2]; - a03 = a[3]; - a10 = a[4]; - a11 = a[5]; - a12 = a[6]; - a13 = a[7]; - a20 = a[8]; - a21 = a[9]; - a22 = a[10]; - a23 = a[11]; - // Construct the elements of the rotation matrix - b00 = x * x * t + c; - b01 = y * x * t + z * s; - b02 = z * x * t - y * s; - b10 = x * y * t - z * s; - b11 = y * y * t + c; - b12 = z * y * t + x * s; - b20 = x * z * t + y * s; - b21 = y * z * t - x * s; - b22 = z * z * t + c; - // Perform rotation-specific matrix multiplication - out[0] = a00 * b00 + a10 * b01 + a20 * b02; - out[1] = a01 * b00 + a11 * b01 + a21 * b02; - out[2] = a02 * b00 + a12 * b01 + a22 * b02; - out[3] = a03 * b00 + a13 * b01 + a23 * b02; - out[4] = a00 * b10 + a10 * b11 + a20 * b12; - out[5] = a01 * b10 + a11 * b11 + a21 * b12; - out[6] = a02 * b10 + a12 * b11 + a22 * b12; - out[7] = a03 * b10 + a13 * b11 + a23 * b12; - out[8] = a00 * b20 + a10 * b21 + a20 * b22; - out[9] = a01 * b20 + a11 * b21 + a21 * b22; - out[10] = a02 * b20 + a12 * b21 + a22 * b22; - out[11] = a03 * b20 + a13 * b21 + a23 * b22; - if (a !== out) { - // If the source and destination differ, copy the unchanged last row - out[12] = a[12]; - out[13] = a[13]; - out[14] = a[14]; - out[15] = a[15]; - } - return out; - } - /** - * Rotates a matrix by the given angle around the X axis - * - * @param {mat4} out the receiving matrix - * @param {ReadonlyMat4} a the matrix to rotate - * @param {Number} rad the angle to rotate the matrix by - * @returns {mat4} out - */ - function rotateX$3(out, a, rad) { - var s = Math.sin(rad); - var c = Math.cos(rad); - var a10 = a[4]; - var a11 = a[5]; - var a12 = a[6]; - var a13 = a[7]; - var a20 = a[8]; - var a21 = a[9]; - var a22 = a[10]; - var a23 = a[11]; - if (a !== out) { - // If the source and destination differ, copy the unchanged rows - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - out[12] = a[12]; - out[13] = a[13]; - out[14] = a[14]; - out[15] = a[15]; - } - // Perform axis-specific matrix multiplication - out[4] = a10 * c + a20 * s; - out[5] = a11 * c + a21 * s; - out[6] = a12 * c + a22 * s; - out[7] = a13 * c + a23 * s; - out[8] = a20 * c - a10 * s; - out[9] = a21 * c - a11 * s; - out[10] = a22 * c - a12 * s; - out[11] = a23 * c - a13 * s; - return out; - } - /** - * Rotates a matrix by the given angle around the Y axis - * - * @param {mat4} out the receiving matrix - * @param {ReadonlyMat4} a the matrix to rotate - * @param {Number} rad the angle to rotate the matrix by - * @returns {mat4} out - */ - function rotateY$3(out, a, rad) { - var s = Math.sin(rad); - var c = Math.cos(rad); - var a00 = a[0]; - var a01 = a[1]; - var a02 = a[2]; - var a03 = a[3]; - var a20 = a[8]; - var a21 = a[9]; - var a22 = a[10]; - var a23 = a[11]; - if (a !== out) { - // If the source and destination differ, copy the unchanged rows - out[4] = a[4]; - out[5] = a[5]; - out[6] = a[6]; - out[7] = a[7]; - out[12] = a[12]; - out[13] = a[13]; - out[14] = a[14]; - out[15] = a[15]; - } - // Perform axis-specific matrix multiplication - out[0] = a00 * c - a20 * s; - out[1] = a01 * c - a21 * s; - out[2] = a02 * c - a22 * s; - out[3] = a03 * c - a23 * s; - out[8] = a00 * s + a20 * c; - out[9] = a01 * s + a21 * c; - out[10] = a02 * s + a22 * c; - out[11] = a03 * s + a23 * c; - return out; - } - /** - * Rotates a matrix by the given angle around the Z axis - * - * @param {mat4} out the receiving matrix - * @param {ReadonlyMat4} a the matrix to rotate - * @param {Number} rad the angle to rotate the matrix by - * @returns {mat4} out - */ - function rotateZ$3(out, a, rad) { - var s = Math.sin(rad); - var c = Math.cos(rad); - var a00 = a[0]; - var a01 = a[1]; - var a02 = a[2]; - var a03 = a[3]; - var a10 = a[4]; - var a11 = a[5]; - var a12 = a[6]; - var a13 = a[7]; - if (a !== out) { - // If the source and destination differ, copy the unchanged last row - out[8] = a[8]; - out[9] = a[9]; - out[10] = a[10]; - out[11] = a[11]; - out[12] = a[12]; - out[13] = a[13]; - out[14] = a[14]; - out[15] = a[15]; - } - // Perform axis-specific matrix multiplication - out[0] = a00 * c + a10 * s; - out[1] = a01 * c + a11 * s; - out[2] = a02 * c + a12 * s; - out[3] = a03 * c + a13 * s; - out[4] = a10 * c - a00 * s; - out[5] = a11 * c - a01 * s; - out[6] = a12 * c - a02 * s; - out[7] = a13 * c - a03 * s; - return out; - } - /** - * Creates a matrix from a vector translation - * This is equivalent to (but much faster than): - * - * mat4.identity(dest); - * mat4.translate(dest, dest, vec); - * - * @param {mat4} out mat4 receiving operation result - * @param {ReadonlyVec3} v Translation vector - * @returns {mat4} out - */ - function fromTranslation$1(out, v) { - out[0] = 1; - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = 0; - out[5] = 1; - out[6] = 0; - out[7] = 0; - out[8] = 0; - out[9] = 0; - out[10] = 1; - out[11] = 0; - out[12] = v[0]; - out[13] = v[1]; - out[14] = v[2]; - out[15] = 1; - return out; - } - /** - * Creates a matrix from a vector scaling - * This is equivalent to (but much faster than): - * - * mat4.identity(dest); - * mat4.scale(dest, dest, vec); - * - * @param {mat4} out mat4 receiving operation result - * @param {ReadonlyVec3} v Scaling vector - * @returns {mat4} out - */ - function fromScaling(out, v) { - out[0] = v[0]; - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = 0; - out[5] = v[1]; - out[6] = 0; - out[7] = 0; - out[8] = 0; - out[9] = 0; - out[10] = v[2]; - out[11] = 0; - out[12] = 0; - out[13] = 0; - out[14] = 0; - out[15] = 1; - return out; - } - /** - * Creates a matrix from a given angle around a given axis - * This is equivalent to (but much faster than): - * - * mat4.identity(dest); - * mat4.rotate(dest, dest, rad: f64, axis: vec3.ReadonlyVec3); - * - * @param {mat4} out mat4 receiving operation result - * @param {Number} rad the angle to rotate the matrix by - * @param {ReadonlyVec3} axis the axis to rotate around - * @returns {mat4} out - */ - function fromRotation$1(out, rad, axis) { - var x = axis[0], y = axis[1], z = axis[2]; - var len = Maths.hypot(x, y, z); - var s, c, t; - if (len < EPSILON) { - return null; - } - len = 1 / len; - x *= len; - y *= len; - z *= len; - s = Math.sin(rad); - c = Math.cos(rad); - t = 1 - c; - // Perform rotation-specific matrix multiplication - out[0] = x * x * t + c; - out[1] = y * x * t + z * s; - out[2] = z * x * t - y * s; - out[3] = 0; - out[4] = x * y * t - z * s; - out[5] = y * y * t + c; - out[6] = z * y * t + x * s; - out[7] = 0; - out[8] = x * z * t + y * s; - out[9] = y * z * t - x * s; - out[10] = z * z * t + c; - out[11] = 0; - out[12] = 0; - out[13] = 0; - out[14] = 0; - out[15] = 1; - return out; - } - /** - * Creates a matrix from the given angle around the X axis - * This is equivalent to (but much faster than): - * - * mat4.identity(dest); - * mat4.rotateX(dest, dest, rad); - * - * @param {mat4} out mat4 receiving operation result - * @param {Number} rad the angle to rotate the matrix by - * @returns {mat4} out - */ - function fromXRotation(out, rad) { - var s = Math.sin(rad); - var c = Math.cos(rad); - // Perform axis-specific matrix multiplication - out[0] = 1; - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = 0; - out[5] = c; - out[6] = s; - out[7] = 0; - out[8] = 0; - out[9] = -s; - out[10] = c; - out[11] = 0; - out[12] = 0; - out[13] = 0; - out[14] = 0; - out[15] = 1; - return out; - } - /** - * Creates a matrix from the given angle around the Y axis - * This is equivalent to (but much faster than): - * - * mat4.identity(dest); - * mat4.rotateY(dest, dest, rad); - * - * @param {mat4} out mat4 receiving operation result - * @param {Number} rad the angle to rotate the matrix by - * @returns {mat4} out - */ - function fromYRotation(out, rad) { - var s = Math.sin(rad); - var c = Math.cos(rad); - // Perform axis-specific matrix multiplication - out[0] = c; - out[1] = 0; - out[2] = -s; - out[3] = 0; - out[4] = 0; - out[5] = 1; - out[6] = 0; - out[7] = 0; - out[8] = s; - out[9] = 0; - out[10] = c; - out[11] = 0; - out[12] = 0; - out[13] = 0; - out[14] = 0; - out[15] = 1; - return out; - } - /** - * Creates a matrix from the given angle around the Z axis - * This is equivalent to (but much faster than): - * - * mat4.identity(dest); - * mat4.rotateZ(dest, dest, rad); - * - * @param {mat4} out mat4 receiving operation result - * @param {Number} rad the angle to rotate the matrix by - * @returns {mat4} out - */ - function fromZRotation(out, rad) { - var s = Math.sin(rad); - var c = Math.cos(rad); - // Perform axis-specific matrix multiplication - out[0] = c; - out[1] = s; - out[2] = 0; - out[3] = 0; - out[4] = -s; - out[5] = c; - out[6] = 0; - out[7] = 0; - out[8] = 0; - out[9] = 0; - out[10] = 1; - out[11] = 0; - out[12] = 0; - out[13] = 0; - out[14] = 0; - out[15] = 1; - return out; - } - /** - * Creates a matrix from a quaternion rotation and vector translation - * This is equivalent to (but much faster than): - * - * mat4.identity(dest); - * mat4.translate(dest, vec); - * let quatMat = mat4.create(); - * quat4.toMat4(quat, quatMat); - * mat4.multiply(dest, quatMat); - * - * @param {mat4} out mat4 receiving operation result - * @param {quat4} q Rotation quaternion - * @param {ReadonlyVec3} v Translation vector - * @returns {mat4} out - */ - function fromRotationTranslation$1(out, q, v) { - // Quaternion math - var x = q[0], y = q[1], z = q[2], w = q[3]; - var x2 = x + x; - var y2 = y + y; - var z2 = z + z; - var xx = x * x2; - var xy = x * y2; - var xz = x * z2; - var yy = y * y2; - var yz = y * z2; - var zz = z * z2; - var wx = w * x2; - var wy = w * y2; - var wz = w * z2; - out[0] = 1 - (yy + zz); - out[1] = xy + wz; - out[2] = xz - wy; - out[3] = 0; - out[4] = xy - wz; - out[5] = 1 - (xx + zz); - out[6] = yz + wx; - out[7] = 0; - out[8] = xz + wy; - out[9] = yz - wx; - out[10] = 1 - (xx + yy); - out[11] = 0; - out[12] = v[0]; - out[13] = v[1]; - out[14] = v[2]; - out[15] = 1; - return out; - } - /** - * Creates a new mat4 from a dual quat. - * - * @param {mat4} out Matrix - * @param {ReadonlyQuat2} a Dual Quaternion - * @returns {mat4} mat4 receiving operation result - */ - function fromQuat2(out, a) { - var translation = new Float64Array(3); - var bx = -a[0], by = -a[1], bz = -a[2], bw = a[3], ax = a[4], ay = a[5], az = a[6], aw = a[7]; - var magnitude = bx * bx + by * by + bz * bz + bw * bw; - //Only scale if it makes sense - if (magnitude > 0) { - translation[0] = ((ax * bw + aw * bx + ay * bz - az * by) * 2) / magnitude; - translation[1] = ((ay * bw + aw * by + az * bx - ax * bz) * 2) / magnitude; - translation[2] = ((az * bw + aw * bz + ax * by - ay * bx) * 2) / magnitude; - } - else { - translation[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2; - translation[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2; - translation[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2; - } - fromRotationTranslation$1(out, a, translation); - return out; - } - /** - * Returns the translation vector component of a transformation - * matrix. If a matrix is built with fromRotationTranslation, - * the returned vector will be the same as the translation vector - * originally supplied. - * @param {vec3} out Vector to receive translation component - * @param {ReadonlyMat4} mat Matrix to be decomposed (input) - * @return {vec3} out - */ - function getTranslation$1(out, mat) { - out[0] = mat[12]; - out[1] = mat[13]; - out[2] = mat[14]; - return out; - } - /** - * Returns the scaling factor component of a transformation - * matrix. If a matrix is built with fromRotationTranslationScale - * with a normalized Quaternion paramter, the returned vector will be - * the same as the scaling vector - * originally supplied. - * @param {vec3} out Vector to receive scaling factor component - * @param {ReadonlyMat4} mat Matrix to be decomposed (input) - * @return {vec3} out - */ - function getScaling(out, mat) { - var m11 = mat[0]; - var m12 = mat[1]; - var m13 = mat[2]; - var m21 = mat[4]; - var m22 = mat[5]; - var m23 = mat[6]; - var m31 = mat[8]; - var m32 = mat[9]; - var m33 = mat[10]; - out[0] = Maths.hypot(m11, m12, m13); - out[1] = Maths.hypot(m21, m22, m23); - out[2] = Maths.hypot(m31, m32, m33); - return out; - } - /** - * Returns a quaternion representing the rotational component - * of a transformation matrix. If a matrix is built with - * fromRotationTranslation, the returned quaternion will be the - * same as the quaternion originally supplied. - * @param {quat} out Quaternion to receive the rotation component - * @param {ReadonlyMat4} mat Matrix to be decomposed (input) - * @return {quat} out - */ - function getRotation(out, mat) { - var scaling = changetype(new Float64Array(3)); - getScaling(scaling, mat); - var is1 = 1 / scaling[0]; - var is2 = 1 / scaling[1]; - var is3 = 1 / scaling[2]; - var sm11 = mat[0] * is1; - var sm12 = mat[1] * is2; - var sm13 = mat[2] * is3; - var sm21 = mat[4] * is1; - var sm22 = mat[5] * is2; - var sm23 = mat[6] * is3; - var sm31 = mat[8] * is1; - var sm32 = mat[9] * is2; - var sm33 = mat[10] * is3; - var trace = sm11 + sm22 + sm33; - var S = 0; - if (trace > 0) { - S = Math.sqrt(trace + 1.0) * 2; - out[3] = 0.25 * S; - out[0] = (sm23 - sm32) / S; - out[1] = (sm31 - sm13) / S; - out[2] = (sm12 - sm21) / S; - } - else if (sm11 > sm22 && sm11 > sm33) { - S = Math.sqrt(1.0 + sm11 - sm22 - sm33) * 2; - out[3] = (sm23 - sm32) / S; - out[0] = 0.25 * S; - out[1] = (sm12 + sm21) / S; - out[2] = (sm31 + sm13) / S; - } - else if (sm22 > sm33) { - S = Math.sqrt(1.0 + sm22 - sm11 - sm33) * 2; - out[3] = (sm31 - sm13) / S; - out[0] = (sm12 + sm21) / S; - out[1] = 0.25 * S; - out[2] = (sm23 + sm32) / S; - } - else { - S = Math.sqrt(1.0 + sm33 - sm11 - sm22) * 2; - out[3] = (sm12 - sm21) / S; - out[0] = (sm31 + sm13) / S; - out[1] = (sm23 + sm32) / S; - out[2] = 0.25 * S; - } - return out; - } - /** - * Decomposes a transformation matrix into its rotation, translation - * and scale components. Returns only the rotation component - * @param {quat} out_r Quaternion to receive the rotation component - * @param {vec3} out_t Vector to receive the translation vector - * @param {vec3} out_s Vector to receive the scaling factor - * @param {ReadonlyMat4} mat Matrix to be decomposed (input) - * @returns {quat} out_r - */ - function decompose(out_r, out_t, out_s, mat) { - out_t[0] = mat[12]; - out_t[1] = mat[13]; - out_t[2] = mat[14]; - var m11 = mat[0]; - var m12 = mat[1]; - var m13 = mat[2]; - var m21 = mat[4]; - var m22 = mat[5]; - var m23 = mat[6]; - var m31 = mat[8]; - var m32 = mat[9]; - var m33 = mat[10]; - out_s[0] = Maths.hypot(m11, m12, m13); - out_s[1] = Maths.hypot(m21, m22, m23); - out_s[2] = Maths.hypot(m31, m32, m33); - var is1 = 1 / out_s[0]; - var is2 = 1 / out_s[1]; - var is3 = 1 / out_s[2]; - var sm11 = m11 * is1; - var sm12 = m12 * is2; - var sm13 = m13 * is3; - var sm21 = m21 * is1; - var sm22 = m22 * is2; - var sm23 = m23 * is3; - var sm31 = m31 * is1; - var sm32 = m32 * is2; - var sm33 = m33 * is3; - var trace = sm11 + sm22 + sm33; - var S = 0; - if (trace > 0) { - S = Math.sqrt(trace + 1.0) * 2; - out_r[3] = 0.25 * S; - out_r[0] = (sm23 - sm32) / S; - out_r[1] = (sm31 - sm13) / S; - out_r[2] = (sm12 - sm21) / S; - } - else if (sm11 > sm22 && sm11 > sm33) { - S = Math.sqrt(1.0 + sm11 - sm22 - sm33) * 2; - out_r[3] = (sm23 - sm32) / S; - out_r[0] = 0.25 * S; - out_r[1] = (sm12 + sm21) / S; - out_r[2] = (sm31 + sm13) / S; - } - else if (sm22 > sm33) { - S = Math.sqrt(1.0 + sm22 - sm11 - sm33) * 2; - out_r[3] = (sm31 - sm13) / S; - out_r[0] = (sm12 + sm21) / S; - out_r[1] = 0.25 * S; - out_r[2] = (sm23 + sm32) / S; - } - else { - S = Math.sqrt(1.0 + sm33 - sm11 - sm22) * 2; - out_r[3] = (sm12 - sm21) / S; - out_r[0] = (sm31 + sm13) / S; - out_r[1] = (sm23 + sm32) / S; - out_r[2] = 0.25 * S; - } - return out_r; - } - /** - * Creates a matrix from a quaternion rotation, vector translation and vector scale - * This is equivalent to (but much faster than): - * - * mat4.identity(dest); - * mat4.translate(dest, vec); - * let quatMat = mat4.create(); - * quat4.toMat4(quat, quatMat); - * mat4.multiply(dest, quatMat); - * mat4.scale(dest, scale) - * - * @param {mat4} out mat4 receiving operation result - * @param {quat4} q Rotation quaternion - * @param {ReadonlyVec3} v Translation vector - * @param {ReadonlyVec3} s Scaling vector - * @returns {mat4} out - */ - function fromRotationTranslationScale(out, q, v, s) { - // Quaternion math - var x = q[0], y = q[1], z = q[2], w = q[3]; - var x2 = x + x; - var y2 = y + y; - var z2 = z + z; - var xx = x * x2; - var xy = x * y2; - var xz = x * z2; - var yy = y * y2; - var yz = y * z2; - var zz = z * z2; - var wx = w * x2; - var wy = w * y2; - var wz = w * z2; - var sx = s[0]; - var sy = s[1]; - var sz = s[2]; - out[0] = (1 - (yy + zz)) * sx; - out[1] = (xy + wz) * sx; - out[2] = (xz - wy) * sx; - out[3] = 0; - out[4] = (xy - wz) * sy; - out[5] = (1 - (xx + zz)) * sy; - out[6] = (yz + wx) * sy; - out[7] = 0; - out[8] = (xz + wy) * sz; - out[9] = (yz - wx) * sz; - out[10] = (1 - (xx + yy)) * sz; - out[11] = 0; - out[12] = v[0]; - out[13] = v[1]; - out[14] = v[2]; - out[15] = 1; - return out; - } - /** - * Creates a matrix from a quaternion rotation, vector translation and vector scale, rotating and scaling around the given origin - * This is equivalent to (but much faster than): - * - * mat4.identity(dest); - * mat4.translate(dest, vec); - * mat4.translate(dest, origin); - * let quatMat = mat4.create(); - * quat4.toMat4(quat, quatMat); - * mat4.multiply(dest, quatMat); - * mat4.scale(dest, scale) - * mat4.translate(dest, negativeOrigin); - * - * @param {mat4} out mat4 receiving operation result - * @param {quat4} q Rotation quaternion - * @param {ReadonlyVec3} v Translation vector - * @param {ReadonlyVec3} s Scaling vector - * @param {ReadonlyVec3} o The origin vector around which to scale and rotate - * @returns {mat4} out - */ - function fromRotationTranslationScaleOrigin(out, q, v, s, o) { - // Quaternion math - var x = q[0], y = q[1], z = q[2], w = q[3]; - var x2 = x + x; - var y2 = y + y; - var z2 = z + z; - var xx = x * x2; - var xy = x * y2; - var xz = x * z2; - var yy = y * y2; - var yz = y * z2; - var zz = z * z2; - var wx = w * x2; - var wy = w * y2; - var wz = w * z2; - var sx = s[0]; - var sy = s[1]; - var sz = s[2]; - var ox = o[0]; - var oy = o[1]; - var oz = o[2]; - var out0 = (1 - (yy + zz)) * sx; - var out1 = (xy + wz) * sx; - var out2 = (xz - wy) * sx; - var out4 = (xy - wz) * sy; - var out5 = (1 - (xx + zz)) * sy; - var out6 = (yz + wx) * sy; - var out8 = (xz + wy) * sz; - var out9 = (yz - wx) * sz; - var out10 = (1 - (xx + yy)) * sz; - out[0] = out0; - out[1] = out1; - out[2] = out2; - out[3] = 0; - out[4] = out4; - out[5] = out5; - out[6] = out6; - out[7] = 0; - out[8] = out8; - out[9] = out9; - out[10] = out10; - out[11] = 0; - out[12] = v[0] + ox - (out0 * ox + out4 * oy + out8 * oz); - out[13] = v[1] + oy - (out1 * ox + out5 * oy + out9 * oz); - out[14] = v[2] + oz - (out2 * ox + out6 * oy + out10 * oz); - out[15] = 1; - return out; - } - /** - * Calculates a 4x4 matrix from the given quaternion - * - * @param {mat4} out mat4 receiving operation result - * @param {ReadonlyQuat} q Quaternion to create matrix from - * - * @returns {mat4} out - */ - function fromQuat(out, q) { - var x = q[0], y = q[1], z = q[2], w = q[3]; - var x2 = x + x; - var y2 = y + y; - var z2 = z + z; - var xx = x * x2; - var yx = y * x2; - var yy = y * y2; - var zx = z * x2; - var zy = z * y2; - var zz = z * z2; - var wx = w * x2; - var wy = w * y2; - var wz = w * z2; - out[0] = 1 - yy - zz; - out[1] = yx + wz; - out[2] = zx - wy; - out[3] = 0; - out[4] = yx - wz; - out[5] = 1 - xx - zz; - out[6] = zy + wx; - out[7] = 0; - out[8] = zx + wy; - out[9] = zy - wx; - out[10] = 1 - xx - yy; - out[11] = 0; - out[12] = 0; - out[13] = 0; - out[14] = 0; - out[15] = 1; - return out; - } - /** - * Generates a frustum matrix with the given bounds - * - * @param {mat4} out mat4 frustum matrix will be written into - * @param {Number} left Left bound of the frustum - * @param {Number} right Right bound of the frustum - * @param {Number} bottom Bottom bound of the frustum - * @param {Number} top Top bound of the frustum - * @param {Number} near Near bound of the frustum - * @param {Number} far Far bound of the frustum - * @returns {mat4} out - */ - function frustum(out, left, right, bottom, top, near, far) { - var rl = 1 / (right - left); - var tb = 1 / (top - bottom); - var nf = 1 / (near - far); - out[0] = near * 2 * rl; - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = 0; - out[5] = near * 2 * tb; - out[6] = 0; - out[7] = 0; - out[8] = (right + left) * rl; - out[9] = (top + bottom) * tb; - out[10] = (far + near) * nf; - out[11] = -1; - out[12] = 0; - out[13] = 0; - out[14] = far * near * 2 * nf; - out[15] = 0; - return out; - } - /** - * Generates a perspective projection matrix with the given bounds. - * The near/far clip planes correspond to a normalized device coordinate Z range of [-1, 1], - * which matches WebGL/OpenGL's clip volume. - * Passing null/undefined/no value for far will generate infinite projection matrix. - * - * Read https://www.assemblyscript.org/types.html#type-rules - * - * @param {mat4} out mat4 frustum matrix will be written into - * @param {number} fovy Vertical field of view in radians - * @param {number} aspect Aspect ratio. typically viewport width/height - * @param {number} near Near bound of the frustum - * @param {number} far Far bound of the frustum, can be null or Infinity - * @returns {mat4} out - */ - function perspectiveNO(out, fovy, aspect, near, far) { - var f = 1.0 / Math.tan(fovy / 2); - out[0] = f / aspect; - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = 0; - out[5] = f; - out[6] = 0; - out[7] = 0; - out[8] = 0; - out[9] = 0; - out[11] = -1; - out[12] = 0; - out[13] = 0; - out[15] = 0; - if (typeof far === "number" && far !== Infinity) { - var nf = 1 / (near - far); - out[10] = (far + near) * nf; - out[14] = 2 * far * near * nf; - } - else { - out[10] = -1; - out[14] = -2 * near; - } - return out; - } - /** - * Alias for {@link mat4.perspectiveNO} - * @function - */ - var perspective = perspectiveNO; - /** - * Generates a perspective projection matrix suitable for WebGPU with the given bounds. - * The near/far clip planes correspond to a normalized device coordinate Z range of [0, 1], - * which matches WebGPU/Vulkan/DirectX/Metal's clip volume. - * Passing null/undefined/no value for far will generate infinite projection matrix. - * - * Read https://www.assemblyscript.org/types.html#type-rules - * - * @param {mat4} out mat4 frustum matrix will be written into - * @param {number} fovy Vertical field of view in radians - * @param {number} aspect Aspect ratio. typically viewport width/height - * @param {number} near Near bound of the frustum - * @param {number} far Far bound of the frustum, can be null or Infinity - * @returns {mat4} out - */ - function perspectiveZO(out, fovy, aspect, near, far) { - var f = 1.0 / Math.tan(fovy / 2); - out[0] = f / aspect; - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = 0; - out[5] = f; - out[6] = 0; - out[7] = 0; - out[8] = 0; - out[9] = 0; - out[11] = -1; - out[12] = 0; - out[13] = 0; - out[15] = 0; - if (typeof far === "number" && far !== Infinity) { - var nf = 1 / (near - far); - out[10] = far * nf; - out[14] = far * near * nf; - } - else { - out[10] = -1; - out[14] = -near; - } - return out; - } - /** - * Generates a perspective projection matrix with the given field of view. - * This is primarily useful for generating projection matrices to be used - * with the still experiemental WebVR API. - * - * @param {mat4} out mat4 frustum matrix will be written into - * @param {Fov} fov Object containing the following values: upDegrees, downDegrees, leftDegrees, rightDegrees - * @param {number} near Near bound of the frustum - * @param {number} far Far bound of the frustum - * @returns {mat4} out - */ - function perspectiveFromFieldOfView(out, fov, near, far) { - var upTan = Math.tan((fov.upDegrees * Math.PI) / 180.0); - var downTan = Math.tan((fov.downDegrees * Math.PI) / 180.0); - var leftTan = Math.tan((fov.leftDegrees * Math.PI) / 180.0); - var rightTan = Math.tan((fov.rightDegrees * Math.PI) / 180.0); - var xScale = 2.0 / (leftTan + rightTan); - var yScale = 2.0 / (upTan + downTan); - out[0] = xScale; - out[1] = 0.0; - out[2] = 0.0; - out[3] = 0.0; - out[4] = 0.0; - out[5] = yScale; - out[6] = 0.0; - out[7] = 0.0; - out[8] = -((leftTan - rightTan) * xScale * 0.5); - out[9] = (upTan - downTan) * yScale * 0.5; - out[10] = far / (near - far); - out[11] = -1.0; - out[12] = 0.0; - out[13] = 0.0; - out[14] = (far * near) / (near - far); - out[15] = 0.0; - return out; - } - /** - * Generates a orthogonal projection matrix with the given bounds. - * The near/far clip planes correspond to a normalized device coordinate Z range of [-1, 1], - * which matches WebGL/OpenGL's clip volume. - * - * @param {mat4} out mat4 frustum matrix will be written into - * @param {number} left Left bound of the frustum - * @param {number} right Right bound of the frustum - * @param {number} bottom Bottom bound of the frustum - * @param {number} top Top bound of the frustum - * @param {number} near Near bound of the frustum - * @param {number} far Far bound of the frustum - * @returns {mat4} out - */ - function orthoNO(out, left, right, bottom, top, near, far) { - var lr = 1 / (left - right); - var bt = 1 / (bottom - top); - var nf = 1 / (near - far); - out[0] = -2 * lr; - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = 0; - out[5] = -2 * bt; - out[6] = 0; - out[7] = 0; - out[8] = 0; - out[9] = 0; - out[10] = 2 * nf; - out[11] = 0; - out[12] = (left + right) * lr; - out[13] = (top + bottom) * bt; - out[14] = (far + near) * nf; - out[15] = 1; - return out; - } - /** - * Alias for {@link mat4.orthoNO} - * @function - */ - var ortho = orthoNO; - /** - * Generates a orthogonal projection matrix with the given bounds. - * The near/far clip planes correspond to a normalized device coordinate Z range of [0, 1], - * which matches WebGPU/Vulkan/DirectX/Metal's clip volume. - * - * @param {mat4} out mat4 frustum matrix will be written into - * @param {number} left Left bound of the frustum - * @param {number} right Right bound of the frustum - * @param {number} bottom Bottom bound of the frustum - * @param {number} top Top bound of the frustum - * @param {number} near Near bound of the frustum - * @param {number} far Far bound of the frustum - * @returns {mat4} out - */ - function orthoZO(out, left, right, bottom, top, near, far) { - var lr = 1 / (left - right); - var bt = 1 / (bottom - top); - var nf = 1 / (near - far); - out[0] = -2 * lr; - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = 0; - out[5] = -2 * bt; - out[6] = 0; - out[7] = 0; - out[8] = 0; - out[9] = 0; - out[10] = nf; - out[11] = 0; - out[12] = (left + right) * lr; - out[13] = (top + bottom) * bt; - out[14] = near * nf; - out[15] = 1; - return out; - } - /** - * Generates a look-at matrix with the given eye position, focal point, and up axis. - * If you want a matrix that actually makes an object look at another object, you should use targetTo instead. - * - * @param {mat4} out mat4 frustum matrix will be written into - * @param {ReadonlyVec3} eye Position of the viewer - * @param {ReadonlyVec3} center Point the viewer is looking at - * @param {ReadonlyVec3} up vec3 pointing up - * @returns {mat4} out - */ - function lookAt(out, eye, center, up) { - var x0, x1, x2, y0, y1, y2, z0, z1, z2, len; - var eyex = eye[0]; - var eyey = eye[1]; - var eyez = eye[2]; - var upx = up[0]; - var upy = up[1]; - var upz = up[2]; - var centerx = center[0]; - var centery = center[1]; - var centerz = center[2]; - if (Math.abs(eyex - centerx) < EPSILON && - Math.abs(eyey - centery) < EPSILON && - Math.abs(eyez - centerz) < EPSILON) { - return identity$2(out); - } - z0 = eyex - centerx; - z1 = eyey - centery; - z2 = eyez - centerz; - len = 1 / Maths.hypot(z0, z1, z2); - z0 *= len; - z1 *= len; - z2 *= len; - x0 = upy * z2 - upz * z1; - x1 = upz * z0 - upx * z2; - x2 = upx * z1 - upy * z0; - len = Maths.hypot(x0, x1, x2); - if (!len) { - x0 = 0; - x1 = 0; - x2 = 0; - } - else { - len = 1 / len; - x0 *= len; - x1 *= len; - x2 *= len; - } - y0 = z1 * x2 - z2 * x1; - y1 = z2 * x0 - z0 * x2; - y2 = z0 * x1 - z1 * x0; - len = Maths.hypot(y0, y1, y2); - if (!len) { - y0 = 0; - y1 = 0; - y2 = 0; - } - else { - len = 1 / len; - y0 *= len; - y1 *= len; - y2 *= len; - } - out[0] = x0; - out[1] = y0; - out[2] = z0; - out[3] = 0; - out[4] = x1; - out[5] = y1; - out[6] = z1; - out[7] = 0; - out[8] = x2; - out[9] = y2; - out[10] = z2; - out[11] = 0; - out[12] = -(x0 * eyex + x1 * eyey + x2 * eyez); - out[13] = -(y0 * eyex + y1 * eyey + y2 * eyez); - out[14] = -(z0 * eyex + z1 * eyey + z2 * eyez); - out[15] = 1; - return out; - } - /** - * Generates a matrix that makes something look at something else. - * - * @param {mat4} out mat4 frustum matrix will be written into - * @param {ReadonlyVec3} eye Position of the viewer - * @param {ReadonlyVec3} center Point the viewer is looking at - * @param {ReadonlyVec3} up vec3 pointing up - * @returns {mat4} out - */ - function targetTo(out, eye, target, up) { - var eyex = eye[0], eyey = eye[1], eyez = eye[2], upx = up[0], upy = up[1], upz = up[2]; - var z0 = eyex - target[0], z1 = eyey - target[1], z2 = eyez - target[2]; - var len = z0 * z0 + z1 * z1 + z2 * z2; - if (len > 0) { - len = 1 / Math.sqrt(len); - z0 *= len; - z1 *= len; - z2 *= len; - } - var x0 = upy * z2 - upz * z1, x1 = upz * z0 - upx * z2, x2 = upx * z1 - upy * z0; - len = x0 * x0 + x1 * x1 + x2 * x2; - if (len > 0) { - len = 1 / Math.sqrt(len); - x0 *= len; - x1 *= len; - x2 *= len; - } - out[0] = x0; - out[1] = x1; - out[2] = x2; - out[3] = 0; - out[4] = z1 * x2 - z2 * x1; - out[5] = z2 * x0 - z0 * x2; - out[6] = z0 * x1 - z1 * x0; - out[7] = 0; - out[8] = z0; - out[9] = z1; - out[10] = z2; - out[11] = 0; - out[12] = eyex; - out[13] = eyey; - out[14] = eyez; - out[15] = 1; - return out; - } - /** - * Returns a string representation of a mat4 - * - * @param {ReadonlyMat4} a matrix to represent as a string - * @returns {String} string representation of the matrix - */ - function str$5(a) { - return ("mat4(" + - a[0].toString() + - ", " + - a[1].toString() + - ", " + - a[2].toString() + - ", " + - a[3].toString() + - ", " + - a[4].toString() + - ", " + - a[5].toString() + - ", " + - a[6].toString() + - ", " + - a[7].toString() + - ", " + - a[8].toString() + - ", " + - a[9].toString() + - ", " + - a[10].toString() + - ", " + - a[11].toString() + - ", " + - a[12].toString() + - ", " + - a[13].toString() + - ", " + - a[14].toString() + - ", " + - a[15].toString() + - ")"); - } - /** - * Returns Frobenius norm of a mat4 - * - * @param {ReadonlyMat4} a the matrix to calculate Frobenius norm of - * @returns {Number} Frobenius norm - */ - function frob(a) { - return Maths.hypot(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]); - } - /** - * Adds two mat4's - * - * @param {mat4} out the receiving matrix - * @param {ReadonlyMat4} a the first operand - * @param {ReadonlyMat4} b the second operand - * @returns {mat4} out - */ - function add$5(out, a, b) { - out[0] = a[0] + b[0]; - out[1] = a[1] + b[1]; - out[2] = a[2] + b[2]; - out[3] = a[3] + b[3]; - out[4] = a[4] + b[4]; - out[5] = a[5] + b[5]; - out[6] = a[6] + b[6]; - out[7] = a[7] + b[7]; - out[8] = a[8] + b[8]; - out[9] = a[9] + b[9]; - out[10] = a[10] + b[10]; - out[11] = a[11] + b[11]; - out[12] = a[12] + b[12]; - out[13] = a[13] + b[13]; - out[14] = a[14] + b[14]; - out[15] = a[15] + b[15]; - return out; - } - /** - * Subtracts matrix b from matrix a - * - * @param {mat4} out the receiving matrix - * @param {ReadonlyMat4} a the first operand - * @param {ReadonlyMat4} b the second operand - * @returns {mat4} out - */ - function subtract$3(out, a, b) { - out[0] = a[0] - b[0]; - out[1] = a[1] - b[1]; - out[2] = a[2] - b[2]; - out[3] = a[3] - b[3]; - out[4] = a[4] - b[4]; - out[5] = a[5] - b[5]; - out[6] = a[6] - b[6]; - out[7] = a[7] - b[7]; - out[8] = a[8] - b[8]; - out[9] = a[9] - b[9]; - out[10] = a[10] - b[10]; - out[11] = a[11] - b[11]; - out[12] = a[12] - b[12]; - out[13] = a[13] - b[13]; - out[14] = a[14] - b[14]; - out[15] = a[15] - b[15]; - return out; - } - /** - * Multiply each element of the matrix by a scalar. - * - * @param {mat4} out the receiving matrix - * @param {ReadonlyMat4} a the matrix to scale - * @param {Number} b amount to scale the matrix's elements by - * @returns {mat4} out - */ - function multiplyScalar(out, a, b) { - out[0] = a[0] * b; - out[1] = a[1] * b; - out[2] = a[2] * b; - out[3] = a[3] * b; - out[4] = a[4] * b; - out[5] = a[5] * b; - out[6] = a[6] * b; - out[7] = a[7] * b; - out[8] = a[8] * b; - out[9] = a[9] * b; - out[10] = a[10] * b; - out[11] = a[11] * b; - out[12] = a[12] * b; - out[13] = a[13] * b; - out[14] = a[14] * b; - out[15] = a[15] * b; - return out; - } - /** - * Adds two mat4's after multiplying each element of the second operand by a scalar value. - * - * @param {mat4} out the receiving vector - * @param {ReadonlyMat4} a the first operand - * @param {ReadonlyMat4} b the second operand - * @param {Number} scale the amount to scale b's elements by before adding - * @returns {mat4} out - */ - function multiplyScalarAndAdd(out, a, b, scale) { - out[0] = a[0] + b[0] * scale; - out[1] = a[1] + b[1] * scale; - out[2] = a[2] + b[2] * scale; - out[3] = a[3] + b[3] * scale; - out[4] = a[4] + b[4] * scale; - out[5] = a[5] + b[5] * scale; - out[6] = a[6] + b[6] * scale; - out[7] = a[7] + b[7] * scale; - out[8] = a[8] + b[8] * scale; - out[9] = a[9] + b[9] * scale; - out[10] = a[10] + b[10] * scale; - out[11] = a[11] + b[11] * scale; - out[12] = a[12] + b[12] * scale; - out[13] = a[13] + b[13] * scale; - out[14] = a[14] + b[14] * scale; - out[15] = a[15] + b[15] * scale; - return out; - } - /** - * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===) - * - * @param {ReadonlyMat4} a The first matrix. - * @param {ReadonlyMat4} b The second matrix. - * @returns {Boolean} True if the matrices are equal, false otherwise. - */ - function exactEquals$5(a, b) { - return (a[0] === b[0] && - a[1] === b[1] && - a[2] === b[2] && - a[3] === b[3] && - a[4] === b[4] && - a[5] === b[5] && - a[6] === b[6] && - a[7] === b[7] && - a[8] === b[8] && - a[9] === b[9] && - a[10] === b[10] && - a[11] === b[11] && - a[12] === b[12] && - a[13] === b[13] && - a[14] === b[14] && - a[15] === b[15]); - } - /** - * Returns whether or not the matrices have approximately the same elements in the same position. - * - * @param {ReadonlyMat4} a The first matrix. - * @param {ReadonlyMat4} b The second matrix. - * @returns {Boolean} True if the matrices are equal, false otherwise. - */ - function equals$5(a, b) { - var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3]; - var a4 = a[4], a5 = a[5], a6 = a[6], a7 = a[7]; - var a8 = a[8], a9 = a[9], a10 = a[10], a11 = a[11]; - var a12 = a[12], a13 = a[13], a14 = a[14], a15 = a[15]; - var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3]; - var b4 = b[4], b5 = b[5], b6 = b[6], b7 = b[7]; - var b8 = b[8], b9 = b[9], b10 = b[10], b11 = b[11]; - var b12 = b[12], b13 = b[13], b14 = b[14], b15 = b[15]; - return (Math.abs(a0 - b0) <= - EPSILON * Maths.max(1.0, Math.abs(a0), Math.abs(b0)) && - Math.abs(a1 - b1) <= - EPSILON * Maths.max(1.0, Math.abs(a1), Math.abs(b1)) && - Math.abs(a2 - b2) <= - EPSILON * Maths.max(1.0, Math.abs(a2), Math.abs(b2)) && - Math.abs(a3 - b3) <= - EPSILON * Maths.max(1.0, Math.abs(a3), Math.abs(b3)) && - Math.abs(a4 - b4) <= - EPSILON * Maths.max(1.0, Math.abs(a4), Math.abs(b4)) && - Math.abs(a5 - b5) <= - EPSILON * Maths.max(1.0, Math.abs(a5), Math.abs(b5)) && - Math.abs(a6 - b6) <= - EPSILON * Maths.max(1.0, Math.abs(a6), Math.abs(b6)) && - Math.abs(a7 - b7) <= - EPSILON * Maths.max(1.0, Math.abs(a7), Math.abs(b7)) && - Math.abs(a8 - b8) <= - EPSILON * Maths.max(1.0, Math.abs(a8), Math.abs(b8)) && - Math.abs(a9 - b9) <= - EPSILON * Maths.max(1.0, Math.abs(a9), Math.abs(b9)) && - Math.abs(a10 - b10) <= - EPSILON * Maths.max(1.0, Math.abs(a10), Math.abs(b10)) && - Math.abs(a11 - b11) <= - EPSILON * Maths.max(1.0, Math.abs(a11), Math.abs(b11)) && - Math.abs(a12 - b12) <= - EPSILON * Maths.max(1.0, Math.abs(a12), Math.abs(b12)) && - Math.abs(a13 - b13) <= - EPSILON * Maths.max(1.0, Math.abs(a13), Math.abs(b13)) && - Math.abs(a14 - b14) <= - EPSILON * Maths.max(1.0, Math.abs(a14), Math.abs(b14)) && - Math.abs(a15 - b15) <= - EPSILON * Maths.max(1.0, Math.abs(a15), Math.abs(b15))); - } - /** - * Alias for {@link mat4.multiply} - * @function - */ - var mul$5 = multiply$5; - /** - * Alias for {@link mat4.subtract} - * @function - */ - var sub$3 = subtract$3; - - var mat4 = /*#__PURE__*/Object.freeze({ - __proto__: null, - Fov: Fov, - create: create$5, - clone: clone$5, - copy: copy$5, - fromValues: fromValues$5, - set: set$5, - identity: identity$2, - transpose: transpose, - invert: invert$2, - adjoint: adjoint, - determinant: determinant, - multiply: multiply$5, - translate: translate$1, - scale: scale$5, - rotate: rotate$1, - rotateX: rotateX$3, - rotateY: rotateY$3, - rotateZ: rotateZ$3, - fromTranslation: fromTranslation$1, - fromScaling: fromScaling, - fromRotation: fromRotation$1, - fromXRotation: fromXRotation, - fromYRotation: fromYRotation, - fromZRotation: fromZRotation, - fromRotationTranslation: fromRotationTranslation$1, - fromQuat2: fromQuat2, - getTranslation: getTranslation$1, - getScaling: getScaling, - getRotation: getRotation, - decompose: decompose, - fromRotationTranslationScale: fromRotationTranslationScale, - fromRotationTranslationScaleOrigin: fromRotationTranslationScaleOrigin, - fromQuat: fromQuat, - frustum: frustum, - perspectiveNO: perspectiveNO, - perspective: perspective, - perspectiveZO: perspectiveZO, - perspectiveFromFieldOfView: perspectiveFromFieldOfView, - orthoNO: orthoNO, - ortho: ortho, - orthoZO: orthoZO, - lookAt: lookAt, - targetTo: targetTo, - str: str$5, - frob: frob, - add: add$5, - subtract: subtract$3, - multiplyScalar: multiplyScalar, - multiplyScalarAndAdd: multiplyScalarAndAdd, - exactEquals: exactEquals$5, - equals: equals$5, - mul: mul$5, - sub: sub$3 - }); - - /** - * 3 Dimensional Vector - * @module vec3 - */ - /** - * Creates a new, empty vec3 - * - * @returns {vec3} a new 3D vector - */ - function create$4() { - var out = new Float64Array(3); - //if (glMatrix.ARRAY_TYPE != Float32Array) { - out[0] = 0; - out[1] = 0; - out[2] = 0; - //} - return out; - } - /** - * Creates a new vec3 initialized with values from an existing vector - * - * @param {ReadonlyVec3} a vector to clone - * @returns {vec3} a new 3D vector - */ - function clone$4(a) { - var out = new Float64Array(3); - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - return out; - } - /** - * Calculates the length of a vec3 - * - * @param {ReadonlyVec3} a vector to calculate length of - * @returns {Number} length of a - */ - function length$4(a) { - var x = a[0]; - var y = a[1]; - var z = a[2]; - return Maths.hypot(x, y, z); - } - /** - * Creates a new vec3 initialized with the given values - * - * @param {Number} x X component - * @param {Number} y Y component - * @param {Number} z Z component - * @returns {vec3} a new 3D vector - */ - function fromValues$4(x, y, z) { - var out = new Float64Array(3); - out[0] = x; - out[1] = y; - out[2] = z; - return out; - } - /** - * Copy the values from one vec3 to another - * - * @param {vec3} out the receiving vector - * @param {ReadonlyVec3} a the source vector - * @returns {vec3} out - */ - function copy$4(out, a) { - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - return out; - } - /** - * Set the components of a vec3 to the given values - * - * @param {vec3} out the receiving vector - * @param {Number} x X component - * @param {Number} y Y component - * @param {Number} z Z component - * @returns {vec3} out - */ - function set$4(out, x, y, z) { - out[0] = x; - out[1] = y; - out[2] = z; - return out; - } - /** - * Adds two vec3's - * - * @param {vec3} out the receiving vector - * @param {ReadonlyVec3} a the first operand - * @param {ReadonlyVec3} b the second operand - * @returns {vec3} out - */ - function add$4(out, a, b) { - out[0] = a[0] + b[0]; - out[1] = a[1] + b[1]; - out[2] = a[2] + b[2]; - return out; - } - /** - * Subtracts vector b from vector a - * - * @param {vec3} out the receiving vector - * @param {ReadonlyVec3} a the first operand - * @param {ReadonlyVec3} b the second operand - * @returns {vec3} out - */ - function subtract$2(out, a, b) { - out[0] = a[0] - b[0]; - out[1] = a[1] - b[1]; - out[2] = a[2] - b[2]; - return out; - } - /** - * Multiplies two vec3's - * - * @param {vec3} out the receiving vector - * @param {ReadonlyVec3} a the first operand - * @param {ReadonlyVec3} b the second operand - * @returns {vec3} out - */ - function multiply$4(out, a, b) { - out[0] = a[0] * b[0]; - out[1] = a[1] * b[1]; - out[2] = a[2] * b[2]; - return out; - } - /** - * Divides two vec3's - * - * @param {vec3} out the receiving vector - * @param {ReadonlyVec3} a the first operand - * @param {ReadonlyVec3} b the second operand - * @returns {vec3} out - */ - function divide$2(out, a, b) { - out[0] = a[0] / b[0]; - out[1] = a[1] / b[1]; - out[2] = a[2] / b[2]; - return out; - } - /** - * Math.ceil the components of a vec3 - * - * @param {vec3} out the receiving vector - * @param {ReadonlyVec3} a vector to ceil - * @returns {vec3} out - */ - function ceil$2(out, a) { - out[0] = Math.ceil(a[0]); - out[1] = Math.ceil(a[1]); - out[2] = Math.ceil(a[2]); - return out; - } - /** - * Math.floor the components of a vec3 - * - * @param {vec3} out the receiving vector - * @param {ReadonlyVec3} a vector to floor - * @returns {vec3} out - */ - function floor$2(out, a) { - out[0] = Math.floor(a[0]); - out[1] = Math.floor(a[1]); - out[2] = Math.floor(a[2]); - return out; - } - /** - * Returns the minimum of two vec3's - * - * @param {vec3} out the receiving vector - * @param {ReadonlyVec3} a the first operand - * @param {ReadonlyVec3} b the second operand - * @returns {vec3} out - */ - function min$2(out, a, b) { - out[0] = Math.min(a[0], b[0]); - out[1] = Math.min(a[1], b[1]); - out[2] = Math.min(a[2], b[2]); - return out; - } - /** - * Returns the maximum of two vec3's - * - * @param {vec3} out the receiving vector - * @param {ReadonlyVec3} a the first operand - * @param {ReadonlyVec3} b the second operand - * @returns {vec3} out - */ - function max$2(out, a, b) { - out[0] = Math.max(a[0], b[0]); - out[1] = Math.max(a[1], b[1]); - out[2] = Math.max(a[2], b[2]); - return out; - } - /** - * Math.round the components of a vec3 - * - * @param {vec3} out the receiving vector - * @param {ReadonlyVec3} a vector to round - * @returns {vec3} out - */ - function round$2(out, a) { - out[0] = Math.round(a[0]); - out[1] = Math.round(a[1]); - out[2] = Math.round(a[2]); - return out; - } - /** - * Scales a vec3 by a scalar number - * - * @param {vec3} out the receiving vector - * @param {ReadonlyVec3} a the vector to scale - * @param {Number} b amount to scale the vector by - * @returns {vec3} out - */ - function scale$4(out, a, b) { - out[0] = a[0] * b; - out[1] = a[1] * b; - out[2] = a[2] * b; - return out; - } - /** - * Adds two vec3's after scaling the second operand by a scalar value - * - * @param {vec3} out the receiving vector - * @param {ReadonlyVec3} a the first operand - * @param {ReadonlyVec3} b the second operand - * @param {Number} scale the amount to scale b by before adding - * @returns {vec3} out - */ - function scaleAndAdd$2(out, a, b, scale) { - out[0] = a[0] + b[0] * scale; - out[1] = a[1] + b[1] * scale; - out[2] = a[2] + b[2] * scale; - return out; - } - /** - * Calculates the euclidian distance between two vec3's - * - * @param {ReadonlyVec3} a the first operand - * @param {ReadonlyVec3} b the second operand - * @returns {Number} distance between a and b - */ - function distance$2(a, b) { - var x = b[0] - a[0]; - var y = b[1] - a[1]; - var z = b[2] - a[2]; - return Maths.hypot(x, y, z); - } - /** - * Calculates the squared euclidian distance between two vec3's - * - * @param {ReadonlyVec3} a the first operand - * @param {ReadonlyVec3} b the second operand - * @returns {Number} squared distance between a and b - */ - function squaredDistance$2(a, b) { - var x = b[0] - a[0]; - var y = b[1] - a[1]; - var z = b[2] - a[2]; - return x * x + y * y + z * z; - } - /** - * Calculates the squared length of a vec3 - * - * @param {ReadonlyVec3} a vector to calculate squared length of - * @returns {Number} squared length of a - */ - function squaredLength$4(a) { - var x = a[0]; - var y = a[1]; - var z = a[2]; - return x * x + y * y + z * z; - } - /** - * Negates the components of a vec3 - * - * @param {vec3} out the receiving vector - * @param {ReadonlyVec3} a vector to negate - * @returns {vec3} out - */ - function negate$2(out, a) { - out[0] = -a[0]; - out[1] = -a[1]; - out[2] = -a[2]; - return out; - } - /** - * Returns the inverse of the components of a vec3 - * - * @param {vec3} out the receiving vector - * @param {ReadonlyVec3} a vector to invert - * @returns {vec3} out - */ - function inverse$2(out, a) { - out[0] = 1.0 / a[0]; - out[1] = 1.0 / a[1]; - out[2] = 1.0 / a[2]; - return out; - } - /** - * Normalize a vec3 - * - * @param {vec3} out the receiving vector - * @param {ReadonlyVec3} a vector to normalize - * @returns {vec3} out - */ - function normalize$4(out, a) { - var x = a[0]; - var y = a[1]; - var z = a[2]; - var len = x * x + y * y + z * z; - if (len > 0) { - //TODO: evaluate use of glm_invsqrt here? - len = 1 / Math.sqrt(len); - } - out[0] = a[0] * len; - out[1] = a[1] * len; - out[2] = a[2] * len; - return out; - } - /** - * Calculates the dot product of two vec3's - * - * @param {ReadonlyVec3} a the first operand - * @param {ReadonlyVec3} b the second operand - * @returns {Number} dot product of a and b - */ - function dot$4(a, b) { - return a[0] * b[0] + a[1] * b[1] + a[2] * b[2]; - } - /** - * Computes the cross product of two vec3's - * - * @param {vec3} out the receiving vector - * @param {ReadonlyVec3} a the first operand - * @param {ReadonlyVec3} b the second operand - * @returns {vec3} out - */ - function cross$2(out, a, b) { - var ax = a[0], ay = a[1], az = a[2]; - var bx = b[0], by = b[1], bz = b[2]; - out[0] = ay * bz - az * by; - out[1] = az * bx - ax * bz; - out[2] = ax * by - ay * bx; - return out; - } - /** - * Performs a linear interpolation between two vec3's - * - * @param {vec3} out the receiving vector - * @param {ReadonlyVec3} a the first operand - * @param {ReadonlyVec3} b the second operand - * @param {Number} t interpolation amount, in the range [0-1], between the two inputs - * @returns {vec3} out - */ - function lerp$4(out, a, b, t) { - var ax = a[0]; - var ay = a[1]; - var az = a[2]; - out[0] = ax + t * (b[0] - ax); - out[1] = ay + t * (b[1] - ay); - out[2] = az + t * (b[2] - az); - return out; - } - /** - * Performs a spherical linear interpolation between two vec3's - * - * @param {vec3} out the receiving vector - * @param {ReadonlyVec3} a the first operand - * @param {ReadonlyVec3} b the second operand - * @param {Number} t interpolation amount, in the range [0-1], between the two inputs - * @returns {vec3} out - */ - function slerp$1(out, a, b, t) { - var angle = Math.acos(Math.min(Math.max(dot$4(a, b), -1), 1)); - var sinTotal = Math.sin(angle); - var ratioA = Math.sin((1 - t) * angle) / sinTotal; - var ratioB = Math.sin(t * angle) / sinTotal; - out[0] = ratioA * a[0] + ratioB * b[0]; - out[1] = ratioA * a[1] + ratioB * b[1]; - out[2] = ratioA * a[2] + ratioB * b[2]; - return out; - } - /** - * Performs a hermite interpolation with two control points - * - * @param {vec3} out the receiving vector - * @param {ReadonlyVec3} a the first operand - * @param {ReadonlyVec3} b the second operand - * @param {ReadonlyVec3} c the third operand - * @param {ReadonlyVec3} d the fourth operand - * @param {Number} t interpolation amount, in the range [0-1], between the two inputs - * @returns {vec3} out - */ - function hermite(out, a, b, c, d, t) { - var factorTimes2 = t * t; - var factor1 = factorTimes2 * (2 * t - 3) + 1; - var factor2 = factorTimes2 * (t - 2) + t; - var factor3 = factorTimes2 * (t - 1); - var factor4 = factorTimes2 * (3 - 2 * t); - out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4; - out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4; - out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4; - return out; - } - /** - * Performs a bezier interpolation with two control points - * - * @param {vec3} out the receiving vector - * @param {ReadonlyVec3} a the first operand - * @param {ReadonlyVec3} b the second operand - * @param {ReadonlyVec3} c the third operand - * @param {ReadonlyVec3} d the fourth operand - * @param {Number} t interpolation amount, in the range [0-1], between the two inputs - * @returns {vec3} out - */ - function bezier(out, a, b, c, d, t) { - var inverseFactor = 1 - t; - var inverseFactorTimesTwo = inverseFactor * inverseFactor; - var factorTimes2 = t * t; - var factor1 = inverseFactorTimesTwo * inverseFactor; - var factor2 = 3 * t * inverseFactorTimesTwo; - var factor3 = 3 * factorTimes2 * inverseFactor; - var factor4 = factorTimes2 * t; - out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4; - out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4; - out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4; - return out; - } - /** - * Generates a random vector with the given scale - * - * @param {vec3} out the receiving vector - * @param {Number} [scale] Length of the resulting vector. If omitted, a unit vector will be returned - * @returns {vec3} out - */ - function random$3(out, scale) { - scale = scale || 1.0; - var r = RANDOM() * 2.0 * Math.PI; - var z = RANDOM() * 2.0 - 1.0; - var zScale = Math.sqrt(1.0 - z * z) * scale; - out[0] = Math.cos(r) * zScale; - out[1] = Math.sin(r) * zScale; - out[2] = z * scale; - return out; - } - /** - * Transforms the vec3 with a mat4. - * 4th vector component is implicitly '1' - * - * @param {vec3} out the receiving vector - * @param {ReadonlyVec3} a the vector to transform - * @param {ReadonlyMat4} m matrix to transform with - * @returns {vec3} out - */ - function transformMat4$2(out, a, m) { - var x = a[0], y = a[1], z = a[2]; - var w = m[3] * x + m[7] * y + m[11] * z + m[15]; - w = w || 1.0; - out[0] = (m[0] * x + m[4] * y + m[8] * z + m[12]) / w; - out[1] = (m[1] * x + m[5] * y + m[9] * z + m[13]) / w; - out[2] = (m[2] * x + m[6] * y + m[10] * z + m[14]) / w; - return out; - } - /** - * Transforms the vec3 with a mat3. - * - * @param {vec3} out the receiving vector - * @param {ReadonlyVec3} a the vector to transform - * @param {ReadonlyMat3} m the 3x3 matrix to transform with - * @returns {vec3} out - */ - function transformMat3$1(out, a, m) { - var x = a[0], y = a[1], z = a[2]; - out[0] = x * m[0] + y * m[3] + z * m[6]; - out[1] = x * m[1] + y * m[4] + z * m[7]; - out[2] = x * m[2] + y * m[5] + z * m[8]; - return out; - } - /** - * Transforms the vec3 with a quat - * Can also be used for dual quaternions. (Multiply it with the real part) - * - * @param {vec3} out the receiving vector - * @param {ReadonlyVec3} a the vector to transform - * @param {ReadonlyQuat} q quaternion to transform with - * @returns {vec3} out - */ - function transformQuat$1(out, a, q) { - // benchmarks: https://jsperf.com/quaternion-transform-vec3-implementations-fixed - var qx = q[0], qy = q[1], qz = q[2], qw = q[3]; - var x = a[0], y = a[1], z = a[2]; - // var qvec = [qx, qy, qz]; - // var uv = vec3.cross([], qvec, a); - var uvx = qy * z - qz * y, uvy = qz * x - qx * z, uvz = qx * y - qy * x; - // var uuv = vec3.cross([], qvec, uv); - var uuvx = qy * uvz - qz * uvy, uuvy = qz * uvx - qx * uvz, uuvz = qx * uvy - qy * uvx; - // vec3.scale(uv, uv, 2 * w); - var w2 = qw * 2; - uvx *= w2; - uvy *= w2; - uvz *= w2; - // vec3.scale(uuv, uuv, 2); - uuvx *= 2; - uuvy *= 2; - uuvz *= 2; - // return vec3.add(out, a, vec3.add(out, uv, uuv)); - out[0] = x + uvx + uuvx; - out[1] = y + uvy + uuvy; - out[2] = z + uvz + uuvz; - return out; - } - /** - * Rotate a 3D vector around the x-axis - * @param {vec3} out The receiving vec3 - * @param {ReadonlyVec3} a The vec3 point to rotate - * @param {ReadonlyVec3} b The origin of the rotation - * @param {Number} rad The angle of rotation in radians - * @returns {vec3} out - */ - function rotateX$2(out, a, b, rad) { - var p = [], r = []; - //Translate point to the origin - p[0] = a[0] - b[0]; - p[1] = a[1] - b[1]; - p[2] = a[2] - b[2]; - //perform rotation - r[0] = p[0]; - r[1] = p[1] * Math.cos(rad) - p[2] * Math.sin(rad); - r[2] = p[1] * Math.sin(rad) + p[2] * Math.cos(rad); - //translate to correct position - out[0] = r[0] + b[0]; - out[1] = r[1] + b[1]; - out[2] = r[2] + b[2]; - return out; - } - /** - * Rotate a 3D vector around the y-axis - * @param {vec3} out The receiving vec3 - * @param {ReadonlyVec3} a The vec3 point to rotate - * @param {ReadonlyVec3} b The origin of the rotation - * @param {Number} rad The angle of rotation in radians - * @returns {vec3} out - */ - function rotateY$2(out, a, b, rad) { - var p = [], r = []; - //Translate point to the origin - p[0] = a[0] - b[0]; - p[1] = a[1] - b[1]; - p[2] = a[2] - b[2]; - //perform rotation - r[0] = p[2] * Math.sin(rad) + p[0] * Math.cos(rad); - r[1] = p[1]; - r[2] = p[2] * Math.cos(rad) - p[0] * Math.sin(rad); - //translate to correct position - out[0] = r[0] + b[0]; - out[1] = r[1] + b[1]; - out[2] = r[2] + b[2]; - return out; - } - /** - * Rotate a 3D vector around the z-axis - * @param {vec3} out The receiving vec3 - * @param {ReadonlyVec3} a The vec3 point to rotate - * @param {ReadonlyVec3} b The origin of the rotation - * @param {Number} rad The angle of rotation in radians - * @returns {vec3} out - */ - function rotateZ$2(out, a, b, rad) { - var p = [], r = []; - //Translate point to the origin - p[0] = a[0] - b[0]; - p[1] = a[1] - b[1]; - p[2] = a[2] - b[2]; - //perform rotation - r[0] = p[0] * Math.cos(rad) - p[1] * Math.sin(rad); - r[1] = p[0] * Math.sin(rad) + p[1] * Math.cos(rad); - r[2] = p[2]; - //translate to correct position - out[0] = r[0] + b[0]; - out[1] = r[1] + b[1]; - out[2] = r[2] + b[2]; - return out; - } - /** - * Get the angle between two 3D vectors - * @param {ReadonlyVec3} a The first operand - * @param {ReadonlyVec3} b The second operand - * @returns {Number} The angle in radians - */ - function angle$1(a, b) { - var ax = a[0], ay = a[1], az = a[2], bx = b[0], by = b[1], bz = b[2], mag1 = Math.sqrt(ax * ax + ay * ay + az * az), mag2 = Math.sqrt(bx * bx + by * by + bz * bz), mag = mag1 * mag2, cosine = mag && dot$4(a, b) / mag; - return Math.acos(Math.min(Math.max(cosine, -1), 1)); - } - /** - * Set the components of a vec3 to zero - * - * @param {vec3} out the receiving vector - * @returns {vec3} out - */ - function zero$2(out) { - out[0] = 0.0; - out[1] = 0.0; - out[2] = 0.0; - return out; - } - /** - * Returns a string representation of a vector - * - * @param {ReadonlyVec3} a vector to represent as a string - * @returns {String} string representation of the vector - */ - function str$4(a) { - return "vec3(" + a[0].toString() + ", " + a[1].toString() + ", " + a[2].toString() + ")"; - } - /** - * Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===) - * - * @param {ReadonlyVec3} a The first vector. - * @param {ReadonlyVec3} b The second vector. - * @returns {Boolean} True if the vectors are equal, false otherwise. - */ - function exactEquals$4(a, b) { - return a[0] === b[0] && a[1] === b[1] && a[2] === b[2]; - } - /** - * Returns whether or not the vectors have approximately the same elements in the same position. - * - * @param {ReadonlyVec3} a The first vector. - * @param {ReadonlyVec3} b The second vector. - * @returns {Boolean} True if the vectors are equal, false otherwise. - */ - function equals$4(a, b) { - var a0 = a[0], a1 = a[1], a2 = a[2]; - var b0 = b[0], b1 = b[1], b2 = b[2]; - return (Math.abs(a0 - b0) <= - EPSILON * Maths.max(1.0, Math.abs(a0), Math.abs(b0)) && - Math.abs(a1 - b1) <= - EPSILON * Maths.max(1.0, Math.abs(a1), Math.abs(b1)) && - Math.abs(a2 - b2) <= - EPSILON * Maths.max(1.0, Math.abs(a2), Math.abs(b2))); - } - /** - * Alias for {@link vec3.subtract} - * @function - */ - var sub$2 = subtract$2; - /** - * Alias for {@link vec3.multiply} - * @function - */ - var mul$4 = multiply$4; - /** - * Alias for {@link vec3.divide} - * @function - */ - var div$2 = divide$2; - /** - * Alias for {@link vec3.distance} - * @function - */ - var dist$2 = distance$2; - /** - * Alias for {@link vec3.squaredDistance} - * @function - */ - var sqrDist$2 = squaredDistance$2; - /** - * Alias for {@link vec3.length} - * @function - */ - var len$4 = length$4; - /** - * Alias for {@link vec3.squaredLength} - * @function - */ - var sqrLen$4 = squaredLength$4; - /** - * Perform some operation over an array of vec3s. - * - * @param {Array} a the array of vectors to iterate over - * @param {Number} stride Number of elements between the start of each vec3. If 0 assumes tightly packed - * @param {Number} offset Number of elements to skip at the beginning of the array - * @param {Number} count Number of vec3s to iterate over. If 0 iterates over entire array - * @param {Function} fn Function to call for each vector in the array - * @param {Object} [arg] additional argument to pass to fn - * @returns {Array} a - * @function - */ - var vec$2 = create$4(); - var forEach$2 = (function () { - return function (a, stride, offset, count, fn, arg) { - var i, l; - if (!stride) { - stride = 3; - } - if (!offset) { - offset = 0; - } - if (count) { - l = Maths.min(count * stride + offset, a.length); - } - else { - l = a.length; - } - for (i = offset; i < l; i += stride) { - vec$2[0] = a[i]; - vec$2[1] = a[i + 1]; - vec$2[2] = a[i + 2]; - fn(vec$2, vec$2, arg); - a[i] = vec$2[0]; - a[i + 1] = vec$2[1]; - a[i + 2] = vec$2[2]; - } - return a; - }; - })(); - - var vec3 = /*#__PURE__*/Object.freeze({ - __proto__: null, - create: create$4, - clone: clone$4, - length: length$4, - fromValues: fromValues$4, - copy: copy$4, - set: set$4, - add: add$4, - subtract: subtract$2, - multiply: multiply$4, - divide: divide$2, - ceil: ceil$2, - floor: floor$2, - min: min$2, - max: max$2, - round: round$2, - scale: scale$4, - scaleAndAdd: scaleAndAdd$2, - distance: distance$2, - squaredDistance: squaredDistance$2, - squaredLength: squaredLength$4, - negate: negate$2, - inverse: inverse$2, - normalize: normalize$4, - dot: dot$4, - cross: cross$2, - lerp: lerp$4, - slerp: slerp$1, - hermite: hermite, - bezier: bezier, - random: random$3, - transformMat4: transformMat4$2, - transformMat3: transformMat3$1, - transformQuat: transformQuat$1, - rotateX: rotateX$2, - rotateY: rotateY$2, - rotateZ: rotateZ$2, - angle: angle$1, - zero: zero$2, - str: str$4, - exactEquals: exactEquals$4, - equals: equals$4, - sub: sub$2, - mul: mul$4, - div: div$2, - dist: dist$2, - sqrDist: sqrDist$2, - len: len$4, - sqrLen: sqrLen$4, - forEach: forEach$2 - }); - - /** - * 4 Dimensional Vector - * @module vec4 - */ - /** - * Creates a new, empty vec4 - * - * @returns {vec4} a new 4D vector - */ - function create$3() { - var out = new Float64Array(4); - //if (glMatrix.ARRAY_TYPE != Float32Array) { - out[0] = 0; - out[1] = 0; - out[2] = 0; - out[3] = 0; - //} - return out; - } - /** - * Creates a new vec4 initialized with values from an existing vector - * - * @param {ReadonlyVec4} a vector to clone - * @returns {vec4} a new 4D vector - */ - function clone$3(a) { - var out = new Float64Array(4); - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - return out; - } - /** - * Creates a new vec4 initialized with the given values - * - * @param {Number} x X component - * @param {Number} y Y component - * @param {Number} z Z component - * @param {Number} w W component - * @returns {vec4} a new 4D vector - */ - function fromValues$3(x, y, z, w) { - var out = new Float64Array(4); - out[0] = x; - out[1] = y; - out[2] = z; - out[3] = w; - return out; - } - /** - * Copy the values from one vec4 to another - * - * @param {vec4} out the receiving vector - * @param {ReadonlyVec4} a the source vector - * @returns {vec4} out - */ - function copy$3(out, a) { - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - return out; - } - /** - * Set the components of a vec4 to the given values - * - * @param {vec4} out the receiving vector - * @param {Number} x X component - * @param {Number} y Y component - * @param {Number} z Z component - * @param {Number} w W component - * @returns {vec4} out - */ - function set$3(out, x, y, z, w) { - out[0] = x; - out[1] = y; - out[2] = z; - out[3] = w; - return out; - } - /** - * Adds two vec4's - * - * @param {vec4} out the receiving vector - * @param {ReadonlyVec4} a the first operand - * @param {ReadonlyVec4} b the second operand - * @returns {vec4} out - */ - function add$3(out, a, b) { - out[0] = a[0] + b[0]; - out[1] = a[1] + b[1]; - out[2] = a[2] + b[2]; - out[3] = a[3] + b[3]; - return out; - } - /** - * Subtracts vector b from vector a - * - * @param {vec4} out the receiving vector - * @param {ReadonlyVec4} a the first operand - * @param {ReadonlyVec4} b the second operand - * @returns {vec4} out - */ - function subtract$1(out, a, b) { - out[0] = a[0] - b[0]; - out[1] = a[1] - b[1]; - out[2] = a[2] - b[2]; - out[3] = a[3] - b[3]; - return out; - } - /** - * Multiplies two vec4's - * - * @param {vec4} out the receiving vector - * @param {ReadonlyVec4} a the first operand - * @param {ReadonlyVec4} b the second operand - * @returns {vec4} out - */ - function multiply$3(out, a, b) { - out[0] = a[0] * b[0]; - out[1] = a[1] * b[1]; - out[2] = a[2] * b[2]; - out[3] = a[3] * b[3]; - return out; - } - /** - * Divides two vec4's - * - * @param {vec4} out the receiving vector - * @param {ReadonlyVec4} a the first operand - * @param {ReadonlyVec4} b the second operand - * @returns {vec4} out - */ - function divide$1(out, a, b) { - out[0] = a[0] / b[0]; - out[1] = a[1] / b[1]; - out[2] = a[2] / b[2]; - out[3] = a[3] / b[3]; - return out; - } - /** - * Math.ceil the components of a vec4 - * - * @param {vec4} out the receiving vector - * @param {ReadonlyVec4} a vector to ceil - * @returns {vec4} out - */ - function ceil$1(out, a) { - out[0] = Math.ceil(a[0]); - out[1] = Math.ceil(a[1]); - out[2] = Math.ceil(a[2]); - out[3] = Math.ceil(a[3]); - return out; - } - /** - * Math.floor the components of a vec4 - * - * @param {vec4} out the receiving vector - * @param {ReadonlyVec4} a vector to floor - * @returns {vec4} out - */ - function floor$1(out, a) { - out[0] = Math.floor(a[0]); - out[1] = Math.floor(a[1]); - out[2] = Math.floor(a[2]); - out[3] = Math.floor(a[3]); - return out; - } - /** - * Returns the minimum of two vec4's - * - * @param {vec4} out the receiving vector - * @param {ReadonlyVec4} a the first operand - * @param {ReadonlyVec4} b the second operand - * @returns {vec4} out - */ - function min$1(out, a, b) { - out[0] = Math.min(a[0], b[0]); - out[1] = Math.min(a[1], b[1]); - out[2] = Math.min(a[2], b[2]); - out[3] = Math.min(a[3], b[3]); - return out; - } - /** - * Returns the maximum of two vec4's - * - * @param {vec4} out the receiving vector - * @param {ReadonlyVec4} a the first operand - * @param {ReadonlyVec4} b the second operand - * @returns {vec4} out - */ - function max$1(out, a, b) { - out[0] = Math.max(a[0], b[0]); - out[1] = Math.max(a[1], b[1]); - out[2] = Math.max(a[2], b[2]); - out[3] = Math.max(a[3], b[3]); - return out; - } - /** - * Math.round the components of a vec4 - * - * @param {vec4} out the receiving vector - * @param {ReadonlyVec4} a vector to round - * @returns {vec4} out - */ - function round$1(out, a) { - out[0] = Math.round(a[0]); - out[1] = Math.round(a[1]); - out[2] = Math.round(a[2]); - out[3] = Math.round(a[3]); - return out; - } - /** - * Scales a vec4 by a scalar number - * - * @param {vec4} out the receiving vector - * @param {ReadonlyVec4} a the vector to scale - * @param {Number} b amount to scale the vector by - * @returns {vec4} out - */ - function scale$3(out, a, b) { - out[0] = a[0] * b; - out[1] = a[1] * b; - out[2] = a[2] * b; - out[3] = a[3] * b; - return out; - } - /** - * Adds two vec4's after scaling the second operand by a scalar value - * - * @param {vec4} out the receiving vector - * @param {ReadonlyVec4} a the first operand - * @param {ReadonlyVec4} b the second operand - * @param {Number} scale the amount to scale b by before adding - * @returns {vec4} out - */ - function scaleAndAdd$1(out, a, b, scale) { - out[0] = a[0] + b[0] * scale; - out[1] = a[1] + b[1] * scale; - out[2] = a[2] + b[2] * scale; - out[3] = a[3] + b[3] * scale; - return out; - } - /** - * Calculates the euclidian distance between two vec4's - * - * @param {ReadonlyVec4} a the first operand - * @param {ReadonlyVec4} b the second operand - * @returns {Number} distance between a and b - */ - function distance$1(a, b) { - var x = b[0] - a[0]; - var y = b[1] - a[1]; - var z = b[2] - a[2]; - var w = b[3] - a[3]; - return Maths.hypot(x, y, z, w); - } - /** - * Calculates the squared euclidian distance between two vec4's - * - * @param {ReadonlyVec4} a the first operand - * @param {ReadonlyVec4} b the second operand - * @returns {Number} squared distance between a and b - */ - function squaredDistance$1(a, b) { - var x = b[0] - a[0]; - var y = b[1] - a[1]; - var z = b[2] - a[2]; - var w = b[3] - a[3]; - return x * x + y * y + z * z + w * w; - } - /** - * Calculates the length of a vec4 - * - * @param {ReadonlyVec4} a vector to calculate length of - * @returns {Number} length of a - */ - function length$3(a) { - var x = a[0]; - var y = a[1]; - var z = a[2]; - var w = a[3]; - return Maths.hypot(x, y, z, w); - } - /** - * Calculates the squared length of a vec4 - * - * @param {ReadonlyVec4} a vector to calculate squared length of - * @returns {Number} squared length of a - */ - function squaredLength$3(a) { - var x = a[0]; - var y = a[1]; - var z = a[2]; - var w = a[3]; - return x * x + y * y + z * z + w * w; - } - /** - * Negates the components of a vec4 - * - * @param {vec4} out the receiving vector - * @param {ReadonlyVec4} a vector to negate - * @returns {vec4} out - */ - function negate$1(out, a) { - out[0] = -a[0]; - out[1] = -a[1]; - out[2] = -a[2]; - out[3] = -a[3]; - return out; - } - /** - * Returns the inverse of the components of a vec4 - * - * @param {vec4} out the receiving vector - * @param {ReadonlyVec4} a vector to invert - * @returns {vec4} out - */ - function inverse$1(out, a) { - out[0] = 1.0 / a[0]; - out[1] = 1.0 / a[1]; - out[2] = 1.0 / a[2]; - out[3] = 1.0 / a[3]; - return out; - } - /** - * Normalize a vec4 - * - * @param {vec4} out the receiving vector - * @param {ReadonlyVec4} a vector to normalize - * @returns {vec4} out - */ - function normalize$3(out, a) { - var x = a[0]; - var y = a[1]; - var z = a[2]; - var w = a[3]; - var len = x * x + y * y + z * z + w * w; - if (len > 0) { - len = 1 / Math.sqrt(len); - } - out[0] = x * len; - out[1] = y * len; - out[2] = z * len; - out[3] = w * len; - return out; - } - /** - * Calculates the dot product of two vec4's - * - * @param {ReadonlyVec4} a the first operand - * @param {ReadonlyVec4} b the second operand - * @returns {Number} dot product of a and b - */ - function dot$3(a, b) { - return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3]; - } - /** - * Returns the cross-product of three vectors in a 4-dimensional space - * - * @param {vec4} out the receiving vector - * @param {ReadonlyVec4} u the first vector - * @param {ReadonlyVec4} v the second vector - * @param {ReadonlyVec4} w the third vector - * @returns {vec4} out - */ - function cross$1(out, u, v, w) { - var A = v[0] * w[1] - v[1] * w[0], B = v[0] * w[2] - v[2] * w[0], C = v[0] * w[3] - v[3] * w[0], D = v[1] * w[2] - v[2] * w[1], E = v[1] * w[3] - v[3] * w[1], F = v[2] * w[3] - v[3] * w[2]; - var G = u[0]; - var H = u[1]; - var I = u[2]; - var J = u[3]; - out[0] = H * F - I * E + J * D; - out[1] = -(G * F) + I * C - J * B; - out[2] = G * E - H * C + J * A; - out[3] = -(G * D) + H * B - I * A; - return out; - } - /** - * Performs a linear interpolation between two vec4's - * - * @param {vec4} out the receiving vector - * @param {ReadonlyVec4} a the first operand - * @param {ReadonlyVec4} b the second operand - * @param {Number} t interpolation amount, in the range [0-1], between the two inputs - * @returns {vec4} out - */ - function lerp$3(out, a, b, t) { - var ax = a[0]; - var ay = a[1]; - var az = a[2]; - var aw = a[3]; - out[0] = ax + t * (b[0] - ax); - out[1] = ay + t * (b[1] - ay); - out[2] = az + t * (b[2] - az); - out[3] = aw + t * (b[3] - aw); - return out; - } - /** - * Generates a random vector with the given scale - * - * @param {vec4} out the receiving vector - * @param {Number} [scale] Length of the resulting vector. If omitted, a unit vector will be returned - * @returns {vec4} out - */ - function random$2(out, scale) { - scale = scale || 1.0; - // Marsaglia, George. Choosing a Point from the Surface of a - // Sphere. Ann. Math. Statist. 43 (1972), no. 2, 645--646. - // http://projecteuclid.org/euclid.aoms/1177692644; - var v1, v2, v3, v4; - var s1, s2; - do { - v1 = RANDOM() * 2 - 1; - v2 = RANDOM() * 2 - 1; - s1 = v1 * v1 + v2 * v2; - } while (s1 >= 1); - do { - v3 = RANDOM() * 2 - 1; - v4 = RANDOM() * 2 - 1; - s2 = v3 * v3 + v4 * v4; - } while (s2 >= 1); - var d = Math.sqrt((1 - s1) / s2); - out[0] = scale * v1; - out[1] = scale * v2; - out[2] = scale * v3 * d; - out[3] = scale * v4 * d; - return out; - } - /** - * Transforms the vec4 with a mat4. - * - * @param {vec4} out the receiving vector - * @param {ReadonlyVec4} a the vector to transform - * @param {ReadonlyMat4} m matrix to transform with - * @returns {vec4} out - */ - function transformMat4$1(out, a, m) { - var x = a[0], y = a[1], z = a[2], w = a[3]; - out[0] = m[0] * x + m[4] * y + m[8] * z + m[12] * w; - out[1] = m[1] * x + m[5] * y + m[9] * z + m[13] * w; - out[2] = m[2] * x + m[6] * y + m[10] * z + m[14] * w; - out[3] = m[3] * x + m[7] * y + m[11] * z + m[15] * w; - return out; - } - /** - * Transforms the vec4 with a quat - * - * @param {vec4} out the receiving vector - * @param {ReadonlyVec4} a the vector to transform - * @param {ReadonlyQuat} q quaternion to transform with - * @returns {vec4} out - */ - function transformQuat(out, a, q) { - var x = a[0], y = a[1], z = a[2]; - var qx = q[0], qy = q[1], qz = q[2], qw = q[3]; - // calculate quat * vec - var ix = qw * x + qy * z - qz * y; - var iy = qw * y + qz * x - qx * z; - var iz = qw * z + qx * y - qy * x; - var iw = -qx * x - qy * y - qz * z; - // calculate result * inverse quat - out[0] = ix * qw + iw * -qx + iy * -qz - iz * -qy; - out[1] = iy * qw + iw * -qy + iz * -qx - ix * -qz; - out[2] = iz * qw + iw * -qz + ix * -qy - iy * -qx; - out[3] = a[3]; - return out; - } - /** - * Set the components of a vec4 to zero - * - * @param {vec4} out the receiving vector - * @returns {vec4} out - */ - function zero$1(out) { - out[0] = 0.0; - out[1] = 0.0; - out[2] = 0.0; - out[3] = 0.0; - return out; - } - /** - * Returns a string representation of a vector - * - * @param {ReadonlyVec4} a vector to represent as a string - * @returns {String} string representation of the vector - */ - function str$3(a) { - return "vec4(" + a[0].toString() + ", " + a[1].toString() + ", " + a[2].toString() + ", " + a[3].toString() + ")"; - } - /** - * Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===) - * - * @param {ReadonlyVec4} a The first vector. - * @param {ReadonlyVec4} b The second vector. - * @returns {Boolean} True if the vectors are equal, false otherwise. - */ - function exactEquals$3(a, b) { - return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3]; - } - /** - * Returns whether or not the vectors have approximately the same elements in the same position. - * - * @param {ReadonlyVec4} a The first vector. - * @param {ReadonlyVec4} b The second vector. - * @returns {Boolean} True if the vectors are equal, false otherwise. - */ - function equals$3(a, b) { - var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3]; - var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3]; - return (Math.abs(a0 - b0) <= - EPSILON * Maths.max(1.0, Math.abs(a0), Math.abs(b0)) && - Math.abs(a1 - b1) <= - EPSILON * Maths.max(1.0, Math.abs(a1), Math.abs(b1)) && - Math.abs(a2 - b2) <= - EPSILON * Maths.max(1.0, Math.abs(a2), Math.abs(b2)) && - Math.abs(a3 - b3) <= - EPSILON * Maths.max(1.0, Math.abs(a3), Math.abs(b3))); - } - /** - * Alias for {@link vec4.subtract} - * @function - */ - var sub$1 = subtract$1; - /** - * Alias for {@link vec4.multiply} - * @function - */ - var mul$3 = multiply$3; - /** - * Alias for {@link vec4.divide} - * @function - */ - var div$1 = divide$1; - /** - * Alias for {@link vec4.distance} - * @function - */ - var dist$1 = distance$1; - /** - * Alias for {@link vec4.squaredDistance} - * @function - */ - var sqrDist$1 = squaredDistance$1; - /** - * Alias for {@link vec4.length} - * @function - */ - var len$3 = length$3; - /** - * Alias for {@link vec4.squaredLength} - * @function - */ - var sqrLen$3 = squaredLength$3; - /** - * Perform some operation over an array of vec4s. - * - * @param {Array} a the array of vectors to iterate over - * @param {Number} stride Number of elements between the start of each vec4. If 0 assumes tightly packed - * @param {Number} offset Number of elements to skip at the beginning of the array - * @param {Number} count Number of vec4s to iterate over. If 0 iterates over entire array - * @param {Function} fn Function to call for each vector in the array - * @param {Object} [arg] additional argument to pass to fn - * @returns {Array} a - * @function - */ - var vec$1 = create$3(); - var forEach$1 = (function () { - return function (a, stride, offset, count, fn, arg) { - var i, l; - if (!stride) { - stride = 4; - } - if (!offset) { - offset = 0; - } - if (count) { - l = Maths.min(count * stride + offset, a.length); - } - else { - l = a.length; - } - for (i = offset; i < l; i += stride) { - vec$1[0] = a[i]; - vec$1[1] = a[i + 1]; - vec$1[2] = a[i + 2]; - vec$1[3] = a[i + 3]; - fn(vec$1, vec$1, arg); - a[i] = vec$1[0]; - a[i + 1] = vec$1[1]; - a[i + 2] = vec$1[2]; - a[i + 3] = vec$1[3]; - } - return a; - }; - })(); - - var vec4 = /*#__PURE__*/Object.freeze({ - __proto__: null, - create: create$3, - clone: clone$3, - fromValues: fromValues$3, - copy: copy$3, - set: set$3, - add: add$3, - subtract: subtract$1, - multiply: multiply$3, - divide: divide$1, - ceil: ceil$1, - floor: floor$1, - min: min$1, - max: max$1, - round: round$1, - scale: scale$3, - scaleAndAdd: scaleAndAdd$1, - distance: distance$1, - squaredDistance: squaredDistance$1, - length: length$3, - squaredLength: squaredLength$3, - negate: negate$1, - inverse: inverse$1, - normalize: normalize$3, - dot: dot$3, - cross: cross$1, - lerp: lerp$3, - random: random$2, - transformMat4: transformMat4$1, - transformQuat: transformQuat, - zero: zero$1, - str: str$3, - exactEquals: exactEquals$3, - equals: equals$3, - sub: sub$1, - mul: mul$3, - div: div$1, - dist: dist$1, - sqrDist: sqrDist$1, - len: len$3, - sqrLen: sqrLen$3, - forEach: forEach$1 - }); - - /** - * Quaternion in the format XYZW - * @module quat - */ - /** - * Creates a new identity quat - * - * @returns {quat} a new quaternion - */ - function create$2() { - var out = new Float64Array(4); - //if (glMatrix.ARRAY_TYPE != Float32Array) { - out[0] = 0; - out[1] = 0; - out[2] = 0; - //} - out[3] = 1; - return out; - } - /** - * Set a quat to the identity quaternion - * - * @param {quat} out the receiving quaternion - * @returns {quat} out - */ - function identity$1(out) { - out[0] = 0; - out[1] = 0; - out[2] = 0; - out[3] = 1; - return out; - } - /** - * Sets a quat from the given angle and rotation axis, - * then returns it. - * - * @param {quat} out the receiving quaternion - * @param {ReadonlyVec3} axis the axis around which to rotate - * @param {Number} rad the angle in radians - * @returns {quat} out - **/ - function setAxisAngle(out, axis, rad) { - rad = rad * 0.5; - var s = Math.sin(rad); - out[0] = s * axis[0]; - out[1] = s * axis[1]; - out[2] = s * axis[2]; - out[3] = Math.cos(rad); - return out; - } - /** - * Gets the rotation axis and angle for a given - * quaternion. If a quaternion is created with - * setAxisAngle, this method will return the same - * values as providied in the original parameter list - * OR functionally equivalent values. - * Example: The quaternion formed by axis [0, 0, 1] and - * angle -90 is the same as the quaternion formed by - * [0, 0, 1] and 270. This method favors the latter. - * @param {vec3} out_axis Vector receiving the axis of rotation - * @param {ReadonlyQuat} q Quaternion to be decomposed - * @return {Number} Angle, in radians, of the rotation - */ - function getAxisAngle(out_axis, q) { - var rad = Math.acos(q[3]) * 2.0; - var s = Math.sin(rad / 2.0); - if (s > EPSILON) { - out_axis[0] = q[0] / s; - out_axis[1] = q[1] / s; - out_axis[2] = q[2] / s; - } - else { - // If s is zero, return any axis (no rotation - axis does not matter) - out_axis[0] = 1; - out_axis[1] = 0; - out_axis[2] = 0; - } - return rad; - } - /** - * Gets the angular distance between two unit quaternions - * - * @param {ReadonlyQuat} a Origin unit quaternion - * @param {ReadonlyQuat} b Destination unit quaternion - * @return {Number} Angle, in radians, between the two quaternions - */ - function getAngle(a, b) { - var dotproduct = dot$2(a, b); - return Math.acos(2 * dotproduct * dotproduct - 1); - } - /** - * Multiplies two quat's - * - * @param {quat} out the receiving quaternion - * @param {ReadonlyQuat} a the first operand - * @param {ReadonlyQuat} b the second operand - * @returns {quat} out - */ - function multiply$2(out, a, b) { - var ax = a[0], ay = a[1], az = a[2], aw = a[3]; - var bx = b[0], by = b[1], bz = b[2], bw = b[3]; - out[0] = ax * bw + aw * bx + ay * bz - az * by; - out[1] = ay * bw + aw * by + az * bx - ax * bz; - out[2] = az * bw + aw * bz + ax * by - ay * bx; - out[3] = aw * bw - ax * bx - ay * by - az * bz; - return out; - } - /** - * Rotates a quaternion by the given angle about the X axis - * - * @param {quat} out quat receiving operation result - * @param {ReadonlyQuat} a quat to rotate - * @param {number} rad angle (in radians) to rotate - * @returns {quat} out - */ - function rotateX$1(out, a, rad) { - rad *= 0.5; - var ax = a[0], ay = a[1], az = a[2], aw = a[3]; - var bx = Math.sin(rad), bw = Math.cos(rad); - out[0] = ax * bw + aw * bx; - out[1] = ay * bw + az * bx; - out[2] = az * bw - ay * bx; - out[3] = aw * bw - ax * bx; - return out; - } - /** - * Rotates a quaternion by the given angle about the Y axis - * - * @param {quat} out quat receiving operation result - * @param {ReadonlyQuat} a quat to rotate - * @param {number} rad angle (in radians) to rotate - * @returns {quat} out - */ - function rotateY$1(out, a, rad) { - rad *= 0.5; - var ax = a[0], ay = a[1], az = a[2], aw = a[3]; - var by = Math.sin(rad), bw = Math.cos(rad); - out[0] = ax * bw - az * by; - out[1] = ay * bw + aw * by; - out[2] = az * bw + ax * by; - out[3] = aw * bw - ay * by; - return out; - } - /** - * Rotates a quaternion by the given angle about the Z axis - * - * @param {quat} out quat receiving operation result - * @param {ReadonlyQuat} a quat to rotate - * @param {number} rad angle (in radians) to rotate - * @returns {quat} out - */ - function rotateZ$1(out, a, rad) { - rad *= 0.5; - var ax = a[0], ay = a[1], az = a[2], aw = a[3]; - var bz = Math.sin(rad), bw = Math.cos(rad); - out[0] = ax * bw + ay * bz; - out[1] = ay * bw - ax * bz; - out[2] = az * bw + aw * bz; - out[3] = aw * bw - az * bz; - return out; - } - /** - * Calculates the W component of a quat from the X, Y, and Z components. - * Assumes that quaternion is 1 unit in length. - * Any existing W component will be ignored. - * - * @param {quat} out the receiving quaternion - * @param {ReadonlyQuat} a quat to calculate W component of - * @returns {quat} out - */ - function calculateW(out, a) { - var x = a[0], y = a[1], z = a[2]; - out[0] = x; - out[1] = y; - out[2] = z; - out[3] = Math.sqrt(Math.abs(1.0 - x * x - y * y - z * z)); - return out; - } - /** - * Calculate the exponential of a unit quaternion. - * - * @param {quat} out the receiving quaternion - * @param {ReadonlyQuat} a quat to calculate the exponential of - * @returns {quat} out - */ - function exp(out, a) { - var x = a[0], y = a[1], z = a[2], w = a[3]; - var r = Math.sqrt(x * x + y * y + z * z); - var et = Math.exp(w); - var s = r > 0 ? (et * Math.sin(r)) / r : 0; - out[0] = x * s; - out[1] = y * s; - out[2] = z * s; - out[3] = et * Math.cos(r); - return out; - } - /** - * Calculate the natural logarithm of a unit quaternion. - * - * @param {quat} out the receiving quaternion - * @param {ReadonlyQuat} a quat to calculate the exponential of - * @returns {quat} out - */ - function ln(out, a) { - var x = a[0], y = a[1], z = a[2], w = a[3]; - var r = Math.sqrt(x * x + y * y + z * z); - var t = r > 0 ? Math.atan2(r, w) / r : 0; - out[0] = x * t; - out[1] = y * t; - out[2] = z * t; - out[3] = 0.5 * Math.log(x * x + y * y + z * z + w * w); - return out; - } - /** - * Calculate the scalar power of a unit quaternion. - * - * @param {quat} out the receiving quaternion - * @param {ReadonlyQuat} a quat to calculate the exponential of - * @param {Number} b amount to scale the quaternion by - * @returns {quat} out - */ - function pow(out, a, b) { - ln(out, a); - scale$2(out, out, b); - exp(out, out); - return out; - } - /** - * Performs a spherical linear interpolation between two quat - * - * @param {quat} out the receiving quaternion - * @param {ReadonlyQuat} a the first operand - * @param {ReadonlyQuat} b the second operand - * @param {Number} t interpolation amount, in the range [0-1], between the two inputs - * @returns {quat} out - */ - function slerp(out, a, b, t) { - // benchmarks: - // http://jsperf.com/quaternion-slerp-implementations - var ax = a[0], ay = a[1], az = a[2], aw = a[3]; - var bx = b[0], by = b[1], bz = b[2], bw = b[3]; - var omega, cosom, sinom, scale0, scale1; - // calc cosine - cosom = ax * bx + ay * by + az * bz + aw * bw; - // adjust signs (if necessary) - if (cosom < 0.0) { - cosom = -cosom; - bx = -bx; - by = -by; - bz = -bz; - bw = -bw; - } - // calculate coefficients - if (1.0 - cosom > EPSILON) { - // standard case (slerp) - omega = Math.acos(cosom); - sinom = Math.sin(omega); - scale0 = Math.sin((1.0 - t) * omega) / sinom; - scale1 = Math.sin(t * omega) / sinom; - } - else { - // "from" and "to" quaternions are very close - // ... so we can do a linear interpolation - scale0 = 1.0 - t; - scale1 = t; - } - // calculate final values - out[0] = scale0 * ax + scale1 * bx; - out[1] = scale0 * ay + scale1 * by; - out[2] = scale0 * az + scale1 * bz; - out[3] = scale0 * aw + scale1 * bw; - return out; - } - /** - * Generates a random unit quaternion - * - * @param {quat} out the receiving quaternion - * @returns {quat} out - */ - function random$1(out) { - // Implementation of http://planning.cs.uiuc.edu/node198.html - // TODO: Calling random 3 times is probably not the fastest solution - var u1 = RANDOM(); - var u2 = RANDOM(); - var u3 = RANDOM(); - var sqrt1MinusU1 = Math.sqrt(1 - u1); - var sqrtU1 = Math.sqrt(u1); - out[0] = sqrt1MinusU1 * Math.sin(2.0 * Math.PI * u2); - out[1] = sqrt1MinusU1 * Math.cos(2.0 * Math.PI * u2); - out[2] = sqrtU1 * Math.sin(2.0 * Math.PI * u3); - out[3] = sqrtU1 * Math.cos(2.0 * Math.PI * u3); - return out; - } - /** - * Calculates the inverse of a quat - * - * @param {quat} out the receiving quaternion - * @param {ReadonlyQuat} a quat to calculate inverse of - * @returns {quat} out - */ - function invert$1(out, a) { - var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3]; - var dot = a0 * a0 + a1 * a1 + a2 * a2 + a3 * a3; - var invDot = dot ? 1.0 / dot : 0; - // TODO: Would be faster to return [0,0,0,0] immediately if dot == 0 - out[0] = -a0 * invDot; - out[1] = -a1 * invDot; - out[2] = -a2 * invDot; - out[3] = a3 * invDot; - return out; - } - /** - * Calculates the conjugate of a quat - * If the quaternion is normalized, this function is faster than quat.inverse and produces the same result. - * - * @param {quat} out the receiving quaternion - * @param {ReadonlyQuat} a quat to calculate conjugate of - * @returns {quat} out - */ - function conjugate$1(out, a) { - out[0] = -a[0]; - out[1] = -a[1]; - out[2] = -a[2]; - out[3] = a[3]; - return out; - } - /** - * Creates a quaternion from the given 3x3 rotation matrix. - * - * NOTE: The resultant quaternion is not normalized, so you should be sure - * to renormalize the quaternion yourself where necessary. - * - * @param {quat} out the receiving quaternion - * @param {ReadonlyMat3} m rotation matrix - * @returns {quat} out - * @function - */ - function fromMat3(out, m) { - // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes - // article "Quaternion Calculus and Fast Animation". - var fTrace = m[0] + m[4] + m[8]; - var fRoot; - if (fTrace > 0.0) { - // |w| > 1/2, may as well choose w > 1/2 - fRoot = Math.sqrt(fTrace + 1.0); // 2w - out[3] = 0.5 * fRoot; - fRoot = 0.5 / fRoot; // 1/(4w) - out[0] = (m[5] - m[7]) * fRoot; - out[1] = (m[6] - m[2]) * fRoot; - out[2] = (m[1] - m[3]) * fRoot; - } - else { - // |w| <= 1/2 - var i = 0; - if (m[4] > m[0]) - i = 1; - if (m[8] > m[i * 3 + i]) - i = 2; - var j = (i + 1) % 3; - var k = (i + 2) % 3; - fRoot = Math.sqrt(m[i * 3 + i] - m[j * 3 + j] - m[k * 3 + k] + 1.0); - out[i] = 0.5 * fRoot; - fRoot = 0.5 / fRoot; - out[3] = (m[j * 3 + k] - m[k * 3 + j]) * fRoot; - out[j] = (m[j * 3 + i] + m[i * 3 + j]) * fRoot; - out[k] = (m[k * 3 + i] + m[i * 3 + k]) * fRoot; - } - return out; - } - /** - * Creates a quaternion from the given euler angle x, y, z using the provided intrinsic order for the conversion. - * - * @param {quat} out the receiving quaternion - * @param {x} x Angle to rotate around X axis in degrees. - * @param {y} y Angle to rotate around Y axis in degrees. - * @param {z} z Angle to rotate around Z axis in degrees. - * @param {'zyx'|'xyz'|'yxz'|'yzx'|'zxy'|'zyx'} order Intrinsic order for conversion, default is zyx. - * @returns {quat} out - * @function - */ - function fromEuler(out, x, y, z, order) { - if (order === void 0) { order = ANGLE_ORDER; } - var halfToRad = Math.PI / 360; - x *= halfToRad; - z *= halfToRad; - y *= halfToRad; - var sx = Math.sin(x); - var cx = Math.cos(x); - var sy = Math.sin(y); - var cy = Math.cos(y); - var sz = Math.sin(z); - var cz = Math.cos(z); - if (order === "xyz") { - out[0] = sx * cy * cz + cx * sy * sz; - out[1] = cx * sy * cz - sx * cy * sz; - out[2] = cx * cy * sz + sx * sy * cz; - out[3] = cx * cy * cz - sx * sy * sz; - } - else if (order === "xzy") { - out[0] = sx * cy * cz - cx * sy * sz; - out[1] = cx * sy * cz - sx * cy * sz; - out[2] = cx * cy * sz + sx * sy * cz; - out[3] = cx * cy * cz + sx * sy * sz; - } - else if (order === "yxz") { - out[0] = sx * cy * cz + cx * sy * sz; - out[1] = cx * sy * cz - sx * cy * sz; - out[2] = cx * cy * sz - sx * sy * cz; - out[3] = cx * cy * cz + sx * sy * sz; - } - else if (order === "yzx") { - out[0] = sx * cy * cz + cx * sy * sz; - out[1] = cx * sy * cz + sx * cy * sz; - out[2] = cx * cy * sz - sx * sy * cz; - out[3] = cx * cy * cz - sx * sy * sz; - } - else if (order === "zxy") { - out[0] = sx * cy * cz - cx * sy * sz; - out[1] = cx * sy * cz + sx * cy * sz; - out[2] = cx * cy * sz + sx * sy * cz; - out[3] = cx * cy * cz - sx * sy * sz; - } - else if (order === "zyx") { - out[0] = sx * cy * cz - cx * sy * sz; - out[1] = cx * sy * cz + sx * cy * sz; - out[2] = cx * cy * sz - sx * sy * cz; - out[3] = cx * cy * cz + sx * sy * sz; - } - else - throw new Error('Unknown angle order ' + order); - return out; - } - /** - * Returns a string representation of a quaternion - * - * @param {ReadonlyQuat} a vector to represent as a string - * @returns {String} string representation of the vector - */ - function str$2(a) { - return "quat(" + a[0].toString() + ", " + a[1].toString() + ", " + a[2].toString() + ", " + a[3].toString() + ")"; - } - /** - * Creates a new quat initialized with values from an existing quaternion - * - * @param {ReadonlyQuat} a quaternion to clone - * @returns {quat} a new quaternion - * @function - */ - var clone$2 = clone$3; - /** - * Creates a new quat initialized with the given values - * - * @param {Number} x X component - * @param {Number} y Y component - * @param {Number} z Z component - * @param {Number} w W component - * @returns {quat} a new quaternion - * @function - */ - var fromValues$2 = fromValues$3; - /** - * Copy the values from one quat to another - * - * @param {quat} out the receiving quaternion - * @param {ReadonlyQuat} a the source quaternion - * @returns {quat} out - * @function - */ - var copy$2 = copy$3; - /** - * Set the components of a quat to the given values - * - * @param {quat} out the receiving quaternion - * @param {Number} x X component - * @param {Number} y Y component - * @param {Number} z Z component - * @param {Number} w W component - * @returns {quat} out - * @function - */ - var set$2 = set$3; - /** - * Adds two quat's - * - * @param {quat} out the receiving quaternion - * @param {ReadonlyQuat} a the first operand - * @param {ReadonlyQuat} b the second operand - * @returns {quat} out - * @function - */ - var add$2 = add$3; - /** - * Alias for {@link quat.multiply} - * @function - */ - var mul$2 = multiply$2; - /** - * Scales a quat by a scalar number - * - * @param {quat} out the receiving vector - * @param {ReadonlyQuat} a the vector to scale - * @param {Number} b amount to scale the vector by - * @returns {quat} out - * @function - */ - var scale$2 = scale$3; - /** - * Calculates the dot product of two quat's - * - * @param {ReadonlyQuat} a the first operand - * @param {ReadonlyQuat} b the second operand - * @returns {Number} dot product of a and b - * @function - */ - var dot$2 = dot$3; - /** - * Performs a linear interpolation between two quat's - * - * @param {quat} out the receiving quaternion - * @param {ReadonlyQuat} a the first operand - * @param {ReadonlyQuat} b the second operand - * @param {Number} t interpolation amount, in the range [0-1], between the two inputs - * @returns {quat} out - * @function - */ - var lerp$2 = lerp$3; - /** - * Calculates the length of a quat - * - * @param {ReadonlyQuat} a vector to calculate length of - * @returns {Number} length of a - */ - var length$2 = length$3; - /** - * Alias for {@link quat.length} - * @function - */ - var len$2 = length$2; - /** - * Calculates the squared length of a quat - * - * @param {ReadonlyQuat} a vector to calculate squared length of - * @returns {Number} squared length of a - * @function - */ - var squaredLength$2 = squaredLength$3; - /** - * Alias for {@link quat.squaredLength} - * @function - */ - var sqrLen$2 = squaredLength$2; - /** - * Normalize a quat - * - * @param {quat} out the receiving quaternion - * @param {ReadonlyQuat} a quaternion to normalize - * @returns {quat} out - * @function - */ - var normalize$2 = normalize$3; - /** - * Returns whether or not the quaternions have exactly the same elements in the same position (when compared with ===) - * - * @param {ReadonlyQuat} a The first quaternion. - * @param {ReadonlyQuat} b The second quaternion. - * @returns {Boolean} True if the vectors are equal, false otherwise. - */ - var exactEquals$2 = exactEquals$3; - /** - * Returns whether or not the quaternions point approximately to the same direction. - * - * Both quaternions are assumed to be unit length. - * - * @param {ReadonlyQuat} a The first unit quaternion. - * @param {ReadonlyQuat} b The second unit quaternion. - * @returns {Boolean} True if the quaternions are equal, false otherwise. - */ - function equals$2(a, b) { - return Math.abs(dot$3(a, b)) >= 1 - EPSILON; - } - /** - * Sets a quaternion to represent the shortest rotation from one - * vector to another. - * - * Both vectors are assumed to be unit length. - * - * @param {quat} out the receiving quaternion. - * @param {ReadonlyVec3} a the initial vector - * @param {ReadonlyVec3} b the destination vector - * @returns {quat} out - */ - var tmpvec3 = create$4(); - var xUnitVec3 = fromValues$4(1, 0, 0); - var yUnitVec3 = fromValues$4(0, 1, 0); - var rotationTo = (function () { - return function (out, a, b) { - var dot = dot$4(a, b); - if (dot < -0.999999) { - cross$2(tmpvec3, xUnitVec3, a); - if (len$4(tmpvec3) < 0.000001) - cross$2(tmpvec3, yUnitVec3, a); - normalize$4(tmpvec3, tmpvec3); - setAxisAngle(out, tmpvec3, Math.PI); - return out; - } - else if (dot > 0.999999) { - out[0] = 0; - out[1] = 0; - out[2] = 0; - out[3] = 1; - return out; - } - else { - cross$2(tmpvec3, a, b); - out[0] = tmpvec3[0]; - out[1] = tmpvec3[1]; - out[2] = tmpvec3[2]; - out[3] = 1 + dot; - return normalize$2(out, out); - } - }; - })(); - /** - * Performs a spherical linear interpolation with two control points - * - * @param {quat} out the receiving quaternion - * @param {ReadonlyQuat} a the first operand - * @param {ReadonlyQuat} b the second operand - * @param {ReadonlyQuat} c the third operand - * @param {ReadonlyQuat} d the fourth operand - * @param {Number} t interpolation amount, in the range [0-1], between the two inputs - * @returns {quat} out - */ - var temp1 = create$2(); - var temp2 = create$2(); - var sqlerp = (function () { - return function (out, a, b, c, d, t) { - slerp(temp1, a, d, t); - slerp(temp2, b, c, t); - slerp(out, temp1, temp2, 2 * t * (1 - t)); - return out; - }; - })(); - /** - * Sets the specified quaternion with values corresponding to the given - * axes. Each axis is a vec3 and is expected to be unit length and - * perpendicular to all other specified axes. - * - * @param {quat} out the receiving quaternion - * @param {ReadonlyVec3} view the vector representing the viewing direction - * @param {ReadonlyVec3} right the vector representing the local "right" direction - * @param {ReadonlyVec3} up the vector representing the local "up" direction - * @returns {quat} out - */ - var matr = create$6(); - var setAxes = (function () { - return function (out, view, right, up) { - matr[0] = right[0]; - matr[3] = right[1]; - matr[6] = right[2]; - matr[1] = up[0]; - matr[4] = up[1]; - matr[7] = up[2]; - matr[2] = -view[0]; - matr[5] = -view[1]; - matr[8] = -view[2]; - return normalize$2(out, fromMat3(out, matr)); - }; - })(); - - var quat = /*#__PURE__*/Object.freeze({ - __proto__: null, - create: create$2, - identity: identity$1, - setAxisAngle: setAxisAngle, - getAxisAngle: getAxisAngle, - getAngle: getAngle, - multiply: multiply$2, - rotateX: rotateX$1, - rotateY: rotateY$1, - rotateZ: rotateZ$1, - calculateW: calculateW, - exp: exp, - ln: ln, - pow: pow, - slerp: slerp, - random: random$1, - invert: invert$1, - conjugate: conjugate$1, - fromMat3: fromMat3, - fromEuler: fromEuler, - str: str$2, - clone: clone$2, - fromValues: fromValues$2, - copy: copy$2, - set: set$2, - add: add$2, - mul: mul$2, - scale: scale$2, - dot: dot$2, - lerp: lerp$2, - length: length$2, - len: len$2, - squaredLength: squaredLength$2, - sqrLen: sqrLen$2, - normalize: normalize$2, - exactEquals: exactEquals$2, - equals: equals$2, - rotationTo: rotationTo, - sqlerp: sqlerp, - setAxes: setAxes - }); - - /** - * Dual Quaternion
- * Format: [real, dual]
- * Quaternion format: XYZW
- * Make sure to have normalized dual quaternions, otherwise the functions may not work as intended.
- * @module quat2 - */ - /** - * Creates a new identity dual quat - * - * @returns {quat2} a new dual quaternion [real -> rotation, dual -> translation] - */ - function create$1() { - var dq = changetype(new Float64Array(8)); - //if (glMatrix.ARRAY_TYPE != Float32Array) { - dq[0] = 0; - dq[1] = 0; - dq[2] = 0; - dq[4] = 0; - dq[5] = 0; - dq[6] = 0; - dq[7] = 0; - //} - dq[3] = 1; - return dq; - } - /** - * Creates a new quat initialized with values from an existing quaternion - * - * @param {ReadonlyQuat2} a dual quaternion to clone - * @returns {quat2} new dual quaternion - * @function - */ - function clone$1(a) { - var dq = changetype(new Float64Array(8)); - dq[0] = a[0]; - dq[1] = a[1]; - dq[2] = a[2]; - dq[3] = a[3]; - dq[4] = a[4]; - dq[5] = a[5]; - dq[6] = a[6]; - dq[7] = a[7]; - return dq; - } - /** - * Creates a new dual quat initialized with the given values - * - * @param {Number} x1 X component - * @param {Number} y1 Y component - * @param {Number} z1 Z component - * @param {Number} w1 W component - * @param {Number} x2 X component - * @param {Number} y2 Y component - * @param {Number} z2 Z component - * @param {Number} w2 W component - * @returns {quat2} new dual quaternion - * @function - */ - function fromValues$1(x1, y1, z1, w1, x2, y2, z2, w2) { - var dq = changetype(new Float64Array(8)); - dq[0] = x1; - dq[1] = y1; - dq[2] = z1; - dq[3] = w1; - dq[4] = x2; - dq[5] = y2; - dq[6] = z2; - dq[7] = w2; - return dq; - } - /** - * Creates a new dual quat from the given values (quat and translation) - * - * @param {Number} x1 X component - * @param {Number} y1 Y component - * @param {Number} z1 Z component - * @param {Number} w1 W component - * @param {Number} x2 X component (translation) - * @param {Number} y2 Y component (translation) - * @param {Number} z2 Z component (translation) - * @returns {quat2} new dual quaternion - * @function - */ - function fromRotationTranslationValues(x1, y1, z1, w1, x2, y2, z2) { - var dq = changetype(new Float64Array(8)); - dq[0] = x1; - dq[1] = y1; - dq[2] = z1; - dq[3] = w1; - var ax = x2 * 0.5, ay = y2 * 0.5, az = z2 * 0.5; - dq[4] = ax * w1 + ay * z1 - az * y1; - dq[5] = ay * w1 + az * x1 - ax * z1; - dq[6] = az * w1 + ax * y1 - ay * x1; - dq[7] = -ax * x1 - ay * y1 - az * z1; - return dq; - } - /** - * Creates a dual quat from a quaternion and a translation - * - * @param {quat2} out quaternion receiving operation result - * @param {ReadonlyQuat} q a normalized quaternion - * @param {ReadonlyVec3} t translation vector - * @returns {quat2} dual quaternion receiving operation result - * @function - */ - function fromRotationTranslation(out, q, t) { - var ax = t[0] * 0.5, ay = t[1] * 0.5, az = t[2] * 0.5, bx = q[0], by = q[1], bz = q[2], bw = q[3]; - out[0] = bx; - out[1] = by; - out[2] = bz; - out[3] = bw; - out[4] = ax * bw + ay * bz - az * by; - out[5] = ay * bw + az * bx - ax * bz; - out[6] = az * bw + ax * by - ay * bx; - out[7] = -ax * bx - ay * by - az * bz; - return out; - } - /** - * Creates a dual quat from a translation - * - * @param {quat2} out quaternion receiving operation result - * @param {ReadonlyVec3} t translation vector - * @returns {quat2} out quaternion receiving operation result - * @function - */ - function fromTranslation(out, t) { - out[0] = 0; - out[1] = 0; - out[2] = 0; - out[3] = 1; - out[4] = t[0] * 0.5; - out[5] = t[1] * 0.5; - out[6] = t[2] * 0.5; - out[7] = 0; - return out; - } - /** - * Creates a dual quat from a quaternion - * - * @param {quat2} out quaternion receiving operation result - * @param {ReadonlyQuat} q the quaternion - * @returns {quat2} out quaternion receiving operation result - * @function - */ - function fromRotation(out, q) { - out[0] = q[0]; - out[1] = q[1]; - out[2] = q[2]; - out[3] = q[3]; - out[4] = 0; - out[5] = 0; - out[6] = 0; - out[7] = 0; - return out; - } - /** - * Creates a new dual quat from a matrix (4x4) - * - * @param {quat2} out the dual quaternion - * @param {ReadonlyMat4} a the matrix - * @returns {quat2} dual quat receiving operation result - * @function - */ - function fromMat4(out, a) { - //TODO Optimize this - var outer = create$2(); - getRotation(outer, a); - var t = new Float64Array(3); - getTranslation$1(t, a); - fromRotationTranslation(out, outer, t); - return out; - } - /** - * Copy the values from one dual quat to another - * - * @param {quat2} out the receiving dual quaternion - * @param {ReadonlyQuat2} a the source dual quaternion - * @returns {quat2} out - * @function - */ - function copy$1(out, a) { - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - out[4] = a[4]; - out[5] = a[5]; - out[6] = a[6]; - out[7] = a[7]; - return out; - } - /** - * Set a dual quat to the identity dual quaternion - * - * @param {quat2} out the receiving quaternion - * @returns {quat2} out - */ - function identity(out) { - out[0] = 0; - out[1] = 0; - out[2] = 0; - out[3] = 1; - out[4] = 0; - out[5] = 0; - out[6] = 0; - out[7] = 0; - return out; - } - /** - * Set the components of a dual quat to the given values - * - * @param {quat2} out the receiving quaternion - * @param {Number} x1 X component - * @param {Number} y1 Y component - * @param {Number} z1 Z component - * @param {Number} w1 W component - * @param {Number} x2 X component - * @param {Number} y2 Y component - * @param {Number} z2 Z component - * @param {Number} w2 W component - * @returns {quat2} out - * @function - */ - function set$1(out, x1, y1, z1, w1, x2, y2, z2, w2) { - out[0] = x1; - out[1] = y1; - out[2] = z1; - out[3] = w1; - out[4] = x2; - out[5] = y2; - out[6] = z2; - out[7] = w2; - return out; - } - /** - * Gets the real part of a dual quat - * @param {quat} out real part - * @param {ReadonlyQuat2} a Dual Quaternion - * @return {quat} real part - */ - var getReal = copy$2; - /** - * Gets the dual part of a dual quat - * @param {quat} out dual part - * @param {ReadonlyQuat2} a Dual Quaternion - * @return {quat} dual part - */ - function getDual(out, a) { - out[0] = a[4]; - out[1] = a[5]; - out[2] = a[6]; - out[3] = a[7]; - return out; - } - /** - * Set the real component of a dual quat to the given quaternion - * - * @param {quat2} out the receiving quaternion - * @param {ReadonlyQuat} q a quaternion representing the real part - * @returns {quat2} out - * @function - */ - var setReal = copy$2; - /** - * Set the dual component of a dual quat to the given quaternion - * - * @param {quat2} out the receiving quaternion - * @param {ReadonlyQuat} q a quaternion representing the dual part - * @returns {quat2} out - * @function - */ - function setDual(out, q) { - out[4] = q[0]; - out[5] = q[1]; - out[6] = q[2]; - out[7] = q[3]; - return out; - } - /** - * Gets the translation of a normalized dual quat - * @param {vec3} out translation - * @param {ReadonlyQuat2} a Dual Quaternion to be decomposed - * @return {vec3} translation - */ - function getTranslation(out, a) { - var ax = a[4], ay = a[5], az = a[6], aw = a[7], bx = -a[0], by = -a[1], bz = -a[2], bw = a[3]; - out[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2; - out[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2; - out[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2; - return out; - } - /** - * Translates a dual quat by the given vector - * - * @param {quat2} out the receiving dual quaternion - * @param {ReadonlyQuat2} a the dual quaternion to translate - * @param {ReadonlyVec3} v vector to translate by - * @returns {quat2} out - */ - function translate(out, a, v) { - var ax1 = a[0], ay1 = a[1], az1 = a[2], aw1 = a[3], bx1 = v[0] * 0.5, by1 = v[1] * 0.5, bz1 = v[2] * 0.5, ax2 = a[4], ay2 = a[5], az2 = a[6], aw2 = a[7]; - out[0] = ax1; - out[1] = ay1; - out[2] = az1; - out[3] = aw1; - out[4] = aw1 * bx1 + ay1 * bz1 - az1 * by1 + ax2; - out[5] = aw1 * by1 + az1 * bx1 - ax1 * bz1 + ay2; - out[6] = aw1 * bz1 + ax1 * by1 - ay1 * bx1 + az2; - out[7] = -ax1 * bx1 - ay1 * by1 - az1 * bz1 + aw2; - return out; - } - /** - * Rotates a dual quat around the X axis - * - * @param {quat2} out the receiving dual quaternion - * @param {ReadonlyQuat2} a the dual quaternion to rotate - * @param {number} rad how far should the rotation be - * @returns {quat2} out - */ - function rotateX(out, a, rad) { - var bx = -a[0], by = -a[1], bz = -a[2], bw = a[3], ax = a[4], ay = a[5], az = a[6], aw = a[7], ax1 = ax * bw + aw * bx + ay * bz - az * by, ay1 = ay * bw + aw * by + az * bx - ax * bz, az1 = az * bw + aw * bz + ax * by - ay * bx, aw1 = aw * bw - ax * bx - ay * by - az * bz; - rotateX$1(out, a, rad); - bx = out[0]; - by = out[1]; - bz = out[2]; - bw = out[3]; - out[4] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by; - out[5] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz; - out[6] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx; - out[7] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz; - return out; - } - /** - * Rotates a dual quat around the Y axis - * - * @param {quat2} out the receiving dual quaternion - * @param {ReadonlyQuat2} a the dual quaternion to rotate - * @param {number} rad how far should the rotation be - * @returns {quat2} out - */ - function rotateY(out, a, rad) { - var bx = -a[0], by = -a[1], bz = -a[2], bw = a[3], ax = a[4], ay = a[5], az = a[6], aw = a[7], ax1 = ax * bw + aw * bx + ay * bz - az * by, ay1 = ay * bw + aw * by + az * bx - ax * bz, az1 = az * bw + aw * bz + ax * by - ay * bx, aw1 = aw * bw - ax * bx - ay * by - az * bz; - rotateY$1(out, a, rad); - bx = out[0]; - by = out[1]; - bz = out[2]; - bw = out[3]; - out[4] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by; - out[5] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz; - out[6] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx; - out[7] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz; - return out; - } - /** - * Rotates a dual quat around the Z axis - * - * @param {quat2} out the receiving dual quaternion - * @param {ReadonlyQuat2} a the dual quaternion to rotate - * @param {number} rad how far should the rotation be - * @returns {quat2} out - */ - function rotateZ(out, a, rad) { - var bx = -a[0], by = -a[1], bz = -a[2], bw = a[3], ax = a[4], ay = a[5], az = a[6], aw = a[7], ax1 = ax * bw + aw * bx + ay * bz - az * by, ay1 = ay * bw + aw * by + az * bx - ax * bz, az1 = az * bw + aw * bz + ax * by - ay * bx, aw1 = aw * bw - ax * bx - ay * by - az * bz; - rotateZ$1(out, a, rad); - bx = out[0]; - by = out[1]; - bz = out[2]; - bw = out[3]; - out[4] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by; - out[5] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz; - out[6] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx; - out[7] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz; - return out; - } - /** - * Rotates a dual quat by a given quaternion (a * q) - * - * @param {quat2} out the receiving dual quaternion - * @param {ReadonlyQuat2} a the dual quaternion to rotate - * @param {ReadonlyQuat} q quaternion to rotate by - * @returns {quat2} out - */ - function rotateByQuatAppend(out, a, q) { - var qx = q[0], qy = q[1], qz = q[2], qw = q[3], ax = a[0], ay = a[1], az = a[2], aw = a[3]; - out[0] = ax * qw + aw * qx + ay * qz - az * qy; - out[1] = ay * qw + aw * qy + az * qx - ax * qz; - out[2] = az * qw + aw * qz + ax * qy - ay * qx; - out[3] = aw * qw - ax * qx - ay * qy - az * qz; - ax = a[4]; - ay = a[5]; - az = a[6]; - aw = a[7]; - out[4] = ax * qw + aw * qx + ay * qz - az * qy; - out[5] = ay * qw + aw * qy + az * qx - ax * qz; - out[6] = az * qw + aw * qz + ax * qy - ay * qx; - out[7] = aw * qw - ax * qx - ay * qy - az * qz; - return out; - } - /** - * Rotates a dual quat by a given quaternion (q * a) - * - * @param {quat2} out the receiving dual quaternion - * @param {ReadonlyQuat} q quaternion to rotate by - * @param {ReadonlyQuat2} a the dual quaternion to rotate - * @returns {quat2} out - */ - function rotateByQuatPrepend(out, q, a) { - var qx = q[0], qy = q[1], qz = q[2], qw = q[3], bx = a[0], by = a[1], bz = a[2], bw = a[3]; - out[0] = qx * bw + qw * bx + qy * bz - qz * by; - out[1] = qy * bw + qw * by + qz * bx - qx * bz; - out[2] = qz * bw + qw * bz + qx * by - qy * bx; - out[3] = qw * bw - qx * bx - qy * by - qz * bz; - bx = a[4]; - by = a[5]; - bz = a[6]; - bw = a[7]; - out[4] = qx * bw + qw * bx + qy * bz - qz * by; - out[5] = qy * bw + qw * by + qz * bx - qx * bz; - out[6] = qz * bw + qw * bz + qx * by - qy * bx; - out[7] = qw * bw - qx * bx - qy * by - qz * bz; - return out; - } - /** - * Rotates a dual quat around a given axis. Does the normalisation automatically - * - * @param {quat2} out the receiving dual quaternion - * @param {ReadonlyQuat2} a the dual quaternion to rotate - * @param {ReadonlyVec3} axis the axis to rotate around - * @param {Number} rad how far the rotation should be - * @returns {quat2} out - */ - function rotateAroundAxis(out, a, axis, rad) { - //Special case for rad = 0 - if (Math.abs(rad) < EPSILON) { - return copy$1(out, a); - } - var axisLength = Maths.hypot(axis[0], axis[1], axis[2]); - rad = rad * 0.5; - var s = Math.sin(rad); - var bx = (s * axis[0]) / axisLength; - var by = (s * axis[1]) / axisLength; - var bz = (s * axis[2]) / axisLength; - var bw = Math.cos(rad); - var ax1 = a[0], ay1 = a[1], az1 = a[2], aw1 = a[3]; - out[0] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by; - out[1] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz; - out[2] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx; - out[3] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz; - var ax = a[4], ay = a[5], az = a[6], aw = a[7]; - out[4] = ax * bw + aw * bx + ay * bz - az * by; - out[5] = ay * bw + aw * by + az * bx - ax * bz; - out[6] = az * bw + aw * bz + ax * by - ay * bx; - out[7] = aw * bw - ax * bx - ay * by - az * bz; - return out; - } - /** - * Adds two dual quat's - * - * @param {quat2} out the receiving dual quaternion - * @param {ReadonlyQuat2} a the first operand - * @param {ReadonlyQuat2} b the second operand - * @returns {quat2} out - * @function - */ - function add$1(out, a, b) { - out[0] = a[0] + b[0]; - out[1] = a[1] + b[1]; - out[2] = a[2] + b[2]; - out[3] = a[3] + b[3]; - out[4] = a[4] + b[4]; - out[5] = a[5] + b[5]; - out[6] = a[6] + b[6]; - out[7] = a[7] + b[7]; - return out; - } - /** - * Multiplies two dual quat's - * - * @param {quat2} out the receiving dual quaternion - * @param {ReadonlyQuat2} a the first operand - * @param {ReadonlyQuat2} b the second operand - * @returns {quat2} out - */ - function multiply$1(out, a, b) { - var ax0 = a[0], ay0 = a[1], az0 = a[2], aw0 = a[3], bx1 = b[4], by1 = b[5], bz1 = b[6], bw1 = b[7], ax1 = a[4], ay1 = a[5], az1 = a[6], aw1 = a[7], bx0 = b[0], by0 = b[1], bz0 = b[2], bw0 = b[3]; - out[0] = ax0 * bw0 + aw0 * bx0 + ay0 * bz0 - az0 * by0; - out[1] = ay0 * bw0 + aw0 * by0 + az0 * bx0 - ax0 * bz0; - out[2] = az0 * bw0 + aw0 * bz0 + ax0 * by0 - ay0 * bx0; - out[3] = aw0 * bw0 - ax0 * bx0 - ay0 * by0 - az0 * bz0; - out[4] = - ax0 * bw1 + - aw0 * bx1 + - ay0 * bz1 - - az0 * by1 + - ax1 * bw0 + - aw1 * bx0 + - ay1 * bz0 - - az1 * by0; - out[5] = - ay0 * bw1 + - aw0 * by1 + - az0 * bx1 - - ax0 * bz1 + - ay1 * bw0 + - aw1 * by0 + - az1 * bx0 - - ax1 * bz0; - out[6] = - az0 * bw1 + - aw0 * bz1 + - ax0 * by1 - - ay0 * bx1 + - az1 * bw0 + - aw1 * bz0 + - ax1 * by0 - - ay1 * bx0; - out[7] = - aw0 * bw1 - - ax0 * bx1 - - ay0 * by1 - - az0 * bz1 + - aw1 * bw0 - - ax1 * bx0 - - ay1 * by0 - - az1 * bz0; - return out; - } - /** - * Alias for {@link quat2.multiply} - * @function - */ - var mul$1 = multiply$1; - /** - * Scales a dual quat by a scalar number - * - * @param {quat2} out the receiving dual quat - * @param {ReadonlyQuat2} a the dual quat to scale - * @param {Number} b amount to scale the dual quat by - * @returns {quat2} out - * @function - */ - function scale$1(out, a, b) { - out[0] = a[0] * b; - out[1] = a[1] * b; - out[2] = a[2] * b; - out[3] = a[3] * b; - out[4] = a[4] * b; - out[5] = a[5] * b; - out[6] = a[6] * b; - out[7] = a[7] * b; - return out; - } - /** - * Calculates the dot product of two dual quat's (The dot product of the real parts) - * - * @param {ReadonlyQuat2} a the first operand - * @param {ReadonlyQuat2} b the second operand - * @returns {Number} dot product of a and b - * @function - */ - var dot$1 = dot$2; - /** - * Performs a linear interpolation between two dual quats's - * NOTE: The resulting dual quaternions won't always be normalized (The error is most noticeable when t = 0.5) - * - * @param {quat2} out the receiving dual quat - * @param {ReadonlyQuat2} a the first operand - * @param {ReadonlyQuat2} b the second operand - * @param {Number} t interpolation amount, in the range [0-1], between the two inputs - * @returns {quat2} out - */ - function lerp$1(out, a, b, t) { - var mt = 1 - t; - if (dot$1(a, b) < 0) - t = -t; - out[0] = a[0] * mt + b[0] * t; - out[1] = a[1] * mt + b[1] * t; - out[2] = a[2] * mt + b[2] * t; - out[3] = a[3] * mt + b[3] * t; - out[4] = a[4] * mt + b[4] * t; - out[5] = a[5] * mt + b[5] * t; - out[6] = a[6] * mt + b[6] * t; - out[7] = a[7] * mt + b[7] * t; - return out; - } - /** - * Calculates the inverse of a dual quat. If they are normalized, conjugate is cheaper - * - * @param {quat2} out the receiving dual quaternion - * @param {ReadonlyQuat2} a dual quat to calculate inverse of - * @returns {quat2} out - */ - function invert(out, a) { - var sqlen = squaredLength$1(a); - out[0] = -a[0] / sqlen; - out[1] = -a[1] / sqlen; - out[2] = -a[2] / sqlen; - out[3] = a[3] / sqlen; - out[4] = -a[4] / sqlen; - out[5] = -a[5] / sqlen; - out[6] = -a[6] / sqlen; - out[7] = a[7] / sqlen; - return out; - } - /** - * Calculates the conjugate of a dual quat - * If the dual quaternion is normalized, this function is faster than quat2.inverse and produces the same result. - * - * @param {quat2} out the receiving quaternion - * @param {ReadonlyQuat2} a quat to calculate conjugate of - * @returns {quat2} out - */ - function conjugate(out, a) { - out[0] = -a[0]; - out[1] = -a[1]; - out[2] = -a[2]; - out[3] = a[3]; - out[4] = -a[4]; - out[5] = -a[5]; - out[6] = -a[6]; - out[7] = a[7]; - return out; - } - /** - * Calculates the length of a dual quat - * - * @param {ReadonlyQuat2} a dual quat to calculate length of - * @returns {Number} length of a - * @function - */ - var length$1 = length$2; - /** - * Alias for {@link quat2.length} - * @function - */ - var len$1 = length$1; - /** - * Calculates the squared length of a dual quat - * - * @param {ReadonlyQuat2} a dual quat to calculate squared length of - * @returns {Number} squared length of a - * @function - */ - var squaredLength$1 = squaredLength$2; - /** - * Alias for {@link quat2.squaredLength} - * @function - */ - var sqrLen$1 = squaredLength$1; - /** - * Normalize a dual quat - * - * @param {quat2} out the receiving dual quaternion - * @param {ReadonlyQuat2} a dual quaternion to normalize - * @returns {quat2} out - * @function - */ - function normalize$1(out, a) { - var magnitude = squaredLength$1(a); - if (magnitude > 0) { - magnitude = Math.sqrt(magnitude); - var a0 = a[0] / magnitude; - var a1 = a[1] / magnitude; - var a2 = a[2] / magnitude; - var a3 = a[3] / magnitude; - var b0 = a[4]; - var b1 = a[5]; - var b2 = a[6]; - var b3 = a[7]; - var a_dot_b = a0 * b0 + a1 * b1 + a2 * b2 + a3 * b3; - out[0] = a0; - out[1] = a1; - out[2] = a2; - out[3] = a3; - out[4] = (b0 - a0 * a_dot_b) / magnitude; - out[5] = (b1 - a1 * a_dot_b) / magnitude; - out[6] = (b2 - a2 * a_dot_b) / magnitude; - out[7] = (b3 - a3 * a_dot_b) / magnitude; - } - return out; - } - /** - * Returns a string representation of a dual quaternion - * - * @param {ReadonlyQuat2} a dual quaternion to represent as a string - * @returns {String} string representation of the dual quat - */ - function str$1(a) { - return ("quat2(" + - a[0].toString() + - ", " + - a[1].toString() + - ", " + - a[2].toString() + - ", " + - a[3].toString() + - ", " + - a[4].toString() + - ", " + - a[5].toString() + - ", " + - a[6].toString() + - ", " + - a[7].toString() + - ")"); - } - /** - * Returns whether or not the dual quaternions have exactly the same elements in the same position (when compared with ===) - * - * @param {ReadonlyQuat2} a the first dual quaternion. - * @param {ReadonlyQuat2} b the second dual quaternion. - * @returns {Boolean} true if the dual quaternions are equal, false otherwise. - */ - function exactEquals$1(a, b) { - return (a[0] === b[0] && - a[1] === b[1] && - a[2] === b[2] && - a[3] === b[3] && - a[4] === b[4] && - a[5] === b[5] && - a[6] === b[6] && - a[7] === b[7]); - } - /** - * Returns whether or not the dual quaternions have approximately the same elements in the same position. - * - * @param {ReadonlyQuat2} a the first dual quat. - * @param {ReadonlyQuat2} b the second dual quat. - * @returns {Boolean} true if the dual quats are equal, false otherwise. - */ - function equals$1(a, b) { - var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5], a6 = a[6], a7 = a[7]; - var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3], b4 = b[4], b5 = b[5], b6 = b[6], b7 = b[7]; - return (Math.abs(a0 - b0) <= - EPSILON * Maths.max(1.0, Math.abs(a0), Math.abs(b0)) && - Math.abs(a1 - b1) <= - EPSILON * Maths.max(1.0, Math.abs(a1), Math.abs(b1)) && - Math.abs(a2 - b2) <= - EPSILON * Maths.max(1.0, Math.abs(a2), Math.abs(b2)) && - Math.abs(a3 - b3) <= - EPSILON * Maths.max(1.0, Math.abs(a3), Math.abs(b3)) && - Math.abs(a4 - b4) <= - EPSILON * Maths.max(1.0, Math.abs(a4), Math.abs(b4)) && - Math.abs(a5 - b5) <= - EPSILON * Maths.max(1.0, Math.abs(a5), Math.abs(b5)) && - Math.abs(a6 - b6) <= - EPSILON * Maths.max(1.0, Math.abs(a6), Math.abs(b6)) && - Math.abs(a7 - b7) <= - EPSILON * Maths.max(1.0, Math.abs(a7), Math.abs(b7))); - } - - var quat2 = /*#__PURE__*/Object.freeze({ - __proto__: null, - create: create$1, - clone: clone$1, - fromValues: fromValues$1, - fromRotationTranslationValues: fromRotationTranslationValues, - fromRotationTranslation: fromRotationTranslation, - fromTranslation: fromTranslation, - fromRotation: fromRotation, - fromMat4: fromMat4, - copy: copy$1, - identity: identity, - set: set$1, - getReal: getReal, - getDual: getDual, - setReal: setReal, - setDual: setDual, - getTranslation: getTranslation, - translate: translate, - rotateX: rotateX, - rotateY: rotateY, - rotateZ: rotateZ, - rotateByQuatAppend: rotateByQuatAppend, - rotateByQuatPrepend: rotateByQuatPrepend, - rotateAroundAxis: rotateAroundAxis, - add: add$1, - multiply: multiply$1, - mul: mul$1, - scale: scale$1, - dot: dot$1, - lerp: lerp$1, - invert: invert, - conjugate: conjugate, - length: length$1, - len: len$1, - squaredLength: squaredLength$1, - sqrLen: sqrLen$1, - normalize: normalize$1, - str: str$1, - exactEquals: exactEquals$1, - equals: equals$1 - }); - - /** - * 2 Dimensional Vector - * @module vec2 - */ - /** - * Creates a new, empty vec2 - * - * @returns {vec2} a new 2D vector - */ - function create() { - var out = new Float64Array(2); - //if (glMatrix.ARRAY_TYPE != Float32Array) { - out[0] = 0; - out[1] = 0; - //} - return out; - } - /** - * Creates a new vec2 initialized with values from an existing vector - * - * @param {ReadonlyVec2} a vector to clone - * @returns {vec2} a new 2D vector - */ - function clone(a) { - var out = new Float64Array(2); - out[0] = a[0]; - out[1] = a[1]; - return out; - } - /** - * Creates a new vec2 initialized with the given values - * - * @param {Number} x X component - * @param {Number} y Y component - * @returns {vec2} a new 2D vector - */ - function fromValues(x, y) { - var out = new Float64Array(2); - out[0] = x; - out[1] = y; - return out; - } - /** - * Copy the values from one vec2 to another - * - * @param {vec2} out the receiving vector - * @param {ReadonlyVec2} a the source vector - * @returns {vec2} out - */ - function copy(out, a) { - out[0] = a[0]; - out[1] = a[1]; - return out; - } - /** - * Set the components of a vec2 to the given values - * - * @param {vec2} out the receiving vector - * @param {Number} x X component - * @param {Number} y Y component - * @returns {vec2} out - */ - function set(out, x, y) { - out[0] = x; - out[1] = y; - return out; - } - /** - * Adds two vec2's - * - * @param {vec2} out the receiving vector - * @param {ReadonlyVec2} a the first operand - * @param {ReadonlyVec2} b the second operand - * @returns {vec2} out - */ - function add(out, a, b) { - out[0] = a[0] + b[0]; - out[1] = a[1] + b[1]; - return out; - } - /** - * Subtracts vector b from vector a - * - * @param {vec2} out the receiving vector - * @param {ReadonlyVec2} a the first operand - * @param {ReadonlyVec2} b the second operand - * @returns {vec2} out - */ - function subtract(out, a, b) { - out[0] = a[0] - b[0]; - out[1] = a[1] - b[1]; - return out; - } - /** - * Multiplies two vec2's - * - * @param {vec2} out the receiving vector - * @param {ReadonlyVec2} a the first operand - * @param {ReadonlyVec2} b the second operand - * @returns {vec2} out - */ - function multiply(out, a, b) { - out[0] = a[0] * b[0]; - out[1] = a[1] * b[1]; - return out; - } - /** - * Divides two vec2's - * - * @param {vec2} out the receiving vector - * @param {ReadonlyVec2} a the first operand - * @param {ReadonlyVec2} b the second operand - * @returns {vec2} out - */ - function divide(out, a, b) { - out[0] = a[0] / b[0]; - out[1] = a[1] / b[1]; - return out; - } - /** - * Math.ceil the components of a vec2 - * - * @param {vec2} out the receiving vector - * @param {ReadonlyVec2} a vector to ceil - * @returns {vec2} out - */ - function ceil(out, a) { - out[0] = Math.ceil(a[0]); - out[1] = Math.ceil(a[1]); - return out; - } - /** - * Math.floor the components of a vec2 - * - * @param {vec2} out the receiving vector - * @param {ReadonlyVec2} a vector to floor - * @returns {vec2} out - */ - function floor(out, a) { - out[0] = Math.floor(a[0]); - out[1] = Math.floor(a[1]); - return out; - } - /** - * Returns the minimum of two vec2's - * - * @param {vec2} out the receiving vector - * @param {ReadonlyVec2} a the first operand - * @param {ReadonlyVec2} b the second operand - * @returns {vec2} out - */ - function min(out, a, b) { - out[0] = Math.min(a[0], b[0]); - out[1] = Math.min(a[1], b[1]); - return out; - } - /** - * Returns the maximum of two vec2's - * - * @param {vec2} out the receiving vector - * @param {ReadonlyVec2} a the first operand - * @param {ReadonlyVec2} b the second operand - * @returns {vec2} out - */ - function max(out, a, b) { - out[0] = Math.max(a[0], b[0]); - out[1] = Math.max(a[1], b[1]); - return out; - } - /** - * Math.round the components of a vec2 - * - * @param {vec2} out the receiving vector - * @param {ReadonlyVec2} a vector to round - * @returns {vec2} out - */ - function round(out, a) { - out[0] = Math.round(a[0]); - out[1] = Math.round(a[1]); - return out; - } - /** - * Scales a vec2 by a scalar number - * - * @param {vec2} out the receiving vector - * @param {ReadonlyVec2} a the vector to scale - * @param {Number} b amount to scale the vector by - * @returns {vec2} out - */ - function scale(out, a, b) { - out[0] = a[0] * b; - out[1] = a[1] * b; - return out; - } - /** - * Adds two vec2's after scaling the second operand by a scalar value - * - * @param {vec2} out the receiving vector - * @param {ReadonlyVec2} a the first operand - * @param {ReadonlyVec2} b the second operand - * @param {Number} scale the amount to scale b by before adding - * @returns {vec2} out - */ - function scaleAndAdd(out, a, b, scale) { - out[0] = a[0] + b[0] * scale; - out[1] = a[1] + b[1] * scale; - return out; - } - /** - * Calculates the euclidian distance between two vec2's - * - * @param {ReadonlyVec2} a the first operand - * @param {ReadonlyVec2} b the second operand - * @returns {Number} distance between a and b - */ - function distance(a, b) { - var x = b[0] - a[0], y = b[1] - a[1]; - return Maths.hypot(x, y); - } - /** - * Calculates the squared euclidian distance between two vec2's - * - * @param {ReadonlyVec2} a the first operand - * @param {ReadonlyVec2} b the second operand - * @returns {Number} squared distance between a and b - */ - function squaredDistance(a, b) { - var x = b[0] - a[0], y = b[1] - a[1]; - return x * x + y * y; - } - /** - * Calculates the length of a vec2 - * - * @param {ReadonlyVec2} a vector to calculate length of - * @returns {Number} length of a - */ - function length(a) { - var x = a[0], y = a[1]; - return Math.hypot(x, y); - } - /** - * Calculates the squared length of a vec2 - * - * @param {ReadonlyVec2} a vector to calculate squared length of - * @returns {Number} squared length of a - */ - function squaredLength(a) { - var x = a[0], y = a[1]; - return x * x + y * y; - } - /** - * Negates the components of a vec2 - * - * @param {vec2} out the receiving vector - * @param {ReadonlyVec2} a vector to negate - * @returns {vec2} out - */ - function negate(out, a) { - out[0] = -a[0]; - out[1] = -a[1]; - return out; - } - /** - * Returns the inverse of the components of a vec2 - * - * @param {vec2} out the receiving vector - * @param {ReadonlyVec2} a vector to invert - * @returns {vec2} out - */ - function inverse(out, a) { - out[0] = 1.0 / a[0]; - out[1] = 1.0 / a[1]; - return out; - } - /** - * Normalize a vec2 - * - * @param {vec2} out the receiving vector - * @param {ReadonlyVec2} a vector to normalize - * @returns {vec2} out - */ - function normalize(out, a) { - var x = a[0], y = a[1]; - var len = x * x + y * y; - if (len > 0) { - //TODO: evaluate use of glm_invsqrt here? - len = 1 / Math.sqrt(len); - } - out[0] = a[0] * len; - out[1] = a[1] * len; - return out; - } - /** - * Calculates the dot product of two vec2's - * - * @param {ReadonlyVec2} a the first operand - * @param {ReadonlyVec2} b the second operand - * @returns {Number} dot product of a and b - */ - function dot(a, b) { - return a[0] * b[0] + a[1] * b[1]; - } - /** - * Computes the cross product of two vec2's - * Note that the cross product must by definition produce a 3D vector - * - * @param {vec3} out the receiving vector - * @param {ReadonlyVec2} a the first operand - * @param {ReadonlyVec2} b the second operand - * @returns {vec3} out - */ - function cross(out, a, b) { - var z = a[0] * b[1] - a[1] * b[0]; - out[0] = out[1] = 0; - out[2] = z; - return out; - } - /** - * Performs a linear interpolation between two vec2's - * - * @param {vec2} out the receiving vector - * @param {ReadonlyVec2} a the first operand - * @param {ReadonlyVec2} b the second operand - * @param {Number} t interpolation amount, in the range [0-1], between the two inputs - * @returns {vec2} out - */ - function lerp(out, a, b, t) { - var ax = a[0], ay = a[1]; - out[0] = ax + t * (b[0] - ax); - out[1] = ay + t * (b[1] - ay); - return out; - } - /** - * Generates a random vector with the given scale - * - * @param {vec2} out the receiving vector - * @param {Number} [scale] Length of the resulting vector. If omitted, a unit vector will be returned - * @returns {vec2} out - */ - function random(out, scale) { - scale = scale || 1.0; - var r = RANDOM() * 2.0 * Math.PI; - out[0] = Math.cos(r) * scale; - out[1] = Math.sin(r) * scale; - return out; - } - /** - * Transforms the vec2 with a mat2 - * - * @param {vec2} out the receiving vector - * @param {ReadonlyVec2} a the vector to transform - * @param {ReadonlyMat2} m matrix to transform with - * @returns {vec2} out - */ - function transformMat2(out, a, m) { - var x = a[0], y = a[1]; - out[0] = m[0] * x + m[2] * y; - out[1] = m[1] * x + m[3] * y; - return out; - } - /** - * Transforms the vec2 with a mat2d - * - * @param {vec2} out the receiving vector - * @param {ReadonlyVec2} a the vector to transform - * @param {ReadonlyMat2d} m matrix to transform with - * @returns {vec2} out - */ - function transformMat2d(out, a, m) { - var x = a[0], y = a[1]; - out[0] = m[0] * x + m[2] * y + m[4]; - out[1] = m[1] * x + m[3] * y + m[5]; - return out; - } - /** - * Transforms the vec2 with a mat3 - * 3rd vector component is implicitly '1' - * - * @param {vec2} out the receiving vector - * @param {ReadonlyVec2} a the vector to transform - * @param {ReadonlyMat3} m matrix to transform with - * @returns {vec2} out - */ - function transformMat3(out, a, m) { - var x = a[0], y = a[1]; - out[0] = m[0] * x + m[3] * y + m[6]; - out[1] = m[1] * x + m[4] * y + m[7]; - return out; - } - /** - * Transforms the vec2 with a mat4 - * 3rd vector component is implicitly '0' - * 4th vector component is implicitly '1' - * - * @param {vec2} out the receiving vector - * @param {ReadonlyVec2} a the vector to transform - * @param {ReadonlyMat4} m matrix to transform with - * @returns {vec2} out - */ - function transformMat4(out, a, m) { - var x = a[0]; - var y = a[1]; - out[0] = m[0] * x + m[4] * y + m[12]; - out[1] = m[1] * x + m[5] * y + m[13]; - return out; - } - /** - * Rotate a 2D vector - * @param {vec2} out The receiving vec2 - * @param {ReadonlyVec2} a The vec2 point to rotate - * @param {ReadonlyVec2} b The origin of the rotation - * @param {Number} rad The angle of rotation in radians - * @returns {vec2} out - */ - function rotate(out, a, b, rad) { - //Translate point to the origin - var p0 = a[0] - b[0], p1 = a[1] - b[1], sinC = Math.sin(rad), cosC = Math.cos(rad); - //perform rotation and translate to correct position - out[0] = p0 * cosC - p1 * sinC + b[0]; - out[1] = p0 * sinC + p1 * cosC + b[1]; - return out; - } - /** - * Get the angle between two 2D vectors - * @param {ReadonlyVec2} a The first operand - * @param {ReadonlyVec2} b The second operand - * @returns {Number} The angle in radians - */ - function angle(a, b) { - var x1 = a[0], y1 = a[1], x2 = b[0], y2 = b[1], - // mag is the product of the magnitudes of a and b - mag = Math.sqrt(x1 * x1 + y1 * y1) * Math.sqrt(x2 * x2 + y2 * y2), - // mag &&.. short circuits if mag == 0 - cosine = mag && (x1 * x2 + y1 * y2) / mag; - // Math.min(Math.max(cosine, -1), 1) clamps the cosine between -1 and 1 - return Math.acos(Math.min(Math.max(cosine, -1), 1)); - } - /** - * Set the components of a vec2 to zero - * - * @param {vec2} out the receiving vector - * @returns {vec2} out - */ - function zero(out) { - out[0] = 0.0; - out[1] = 0.0; - return out; - } - /** - * Returns a string representation of a vector - * - * @param {ReadonlyVec2} a vector to represent as a string - * @returns {String} string representation of the vector - */ - function str(a) { - return "vec2(" + a[0].toString() + ", " + a[1].toString() + ")"; - } - /** - * Returns whether or not the vectors exactly have the same elements in the same position (when compared with ===) - * - * @param {ReadonlyVec2} a The first vector. - * @param {ReadonlyVec2} b The second vector. - * @returns {Boolean} True if the vectors are equal, false otherwise. - */ - function exactEquals(a, b) { - return a[0] === b[0] && a[1] === b[1]; - } - /** - * Returns whether or not the vectors have approximately the same elements in the same position. - * - * @param {ReadonlyVec2} a The first vector. - * @param {ReadonlyVec2} b The second vector. - * @returns {Boolean} True if the vectors are equal, false otherwise. - */ - function equals(a, b) { - var a0 = a[0], a1 = a[1]; - var b0 = b[0], b1 = b[1]; - return (Math.abs(a0 - b0) <= - EPSILON * Maths.max(1.0, Math.abs(a0), Math.abs(b0)) && - Math.abs(a1 - b1) <= - EPSILON * Maths.max(1.0, Math.abs(a1), Math.abs(b1))); - } - /** - * Alias for {@link vec2.length} - * @function - */ - var len = length; - /** - * Alias for {@link vec2.subtract} - * @function - */ - var sub = subtract; - /** - * Alias for {@link vec2.multiply} - * @function - */ - var mul = multiply; - /** - * Alias for {@link vec2.divide} - * @function - */ - var div = divide; - /** - * Alias for {@link vec2.distance} - * @function - */ - var dist = distance; - /** - * Alias for {@link vec2.squaredDistance} - * @function - */ - var sqrDist = squaredDistance; - /** - * Alias for {@link vec2.squaredLength} - * @function - */ - var sqrLen = squaredLength; - /** - * Perform some operation over an array of vec2s. - * - * @param {Array} a the array of vectors to iterate over - * @param {Number} stride Number of elements between the start of each vec2. If 0 assumes tightly packed - * @param {Number} offset Number of elements to skip at the beginning of the array - * @param {Number} count Number of vec2s to iterate over. If 0 iterates over entire array - * @param {Function} fn Function to call for each vector in the array - * @param {Object} [arg] additional argument to pass to fn - * @returns {Array} a - * @function - */ - var vec = create(); - var forEach = (function () { - return function (a, stride, offset, count, fn, arg) { - var i, l; - if (!stride) { - stride = 2; - } - if (!offset) { - offset = 0; - } - if (count) { - l = Maths.min(count * stride + offset, a.length); - } - else { - l = a.length; - } - for (i = offset; i < l; i += stride) { - vec[0] = a[i]; - vec[1] = a[i + 1]; - fn(vec, vec, arg); - a[i] = vec[0]; - a[i + 1] = vec[1]; - } - return a; - }; - })(); - - var vec2 = /*#__PURE__*/Object.freeze({ - __proto__: null, - create: create, - clone: clone, - fromValues: fromValues, - copy: copy, - set: set, - add: add, - subtract: subtract, - multiply: multiply, - divide: divide, - ceil: ceil, - floor: floor, - min: min, - max: max, - round: round, - scale: scale, - scaleAndAdd: scaleAndAdd, - distance: distance, - squaredDistance: squaredDistance, - length: length, - squaredLength: squaredLength, - negate: negate, - inverse: inverse, - normalize: normalize, - dot: dot, - cross: cross, - lerp: lerp, - random: random, - transformMat2: transformMat2, - transformMat2d: transformMat2d, - transformMat3: transformMat3, - transformMat4: transformMat4, - rotate: rotate, - angle: angle, - zero: zero, - str: str, - exactEquals: exactEquals, - equals: equals, - len: len, - sub: sub, - mul: mul, - div: div, - dist: dist, - sqrDist: sqrDist, - sqrLen: sqrLen, - forEach: forEach - }); - - exports.glMatrix = common; - exports.mat2 = mat2; - exports.mat2d = mat2d; - exports.mat3 = mat3; - exports.mat4 = mat4; - exports.quat = quat; - exports.quat2 = quat2; - exports.vec2 = vec2; - exports.vec3 = vec3; - exports.vec4 = vec4; - - Object.defineProperty(exports, '__esModule', { value: true }); - -}))); diff --git a/package.json b/package.json index abb88f0c..ab63c427 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,8 @@ ], "scripts": { "test": "mocha --require @babel/register --recursive spec", + "test:as": "asp --verbose", + "test:ci": "asp --summary", "doc": "jsdoc -c jsdoc.config.json", "update-license-version": "node utils/update-license-version.js", "build-umd": "rollup -c", @@ -41,6 +43,7 @@ "asbuild": "npm run asbuild:untouched && npm run asbuild:optimized" }, "devDependencies": { + "@as-pect/cli": "^6.0.0", "@assemblyscript/loader": "^0.18.17", "@babel/core": "7.9.0", "@babel/preset-env": "^7.13.12", diff --git a/rollup.config.js b/rollup.config.js index fd861a63..3b3a77e6 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -28,7 +28,7 @@ export default [ output: { file: 'dist/wasm/gl-matrix-loader-debug.js', format: 'umd', name }, plugins: [ replace({ preventAssignment: true }), - wasm(), + wasm({ sourceMap: true }), bannerPlugin ] }, @@ -37,7 +37,7 @@ export default [ output: { file: 'dist/wasm/gl-matrix-loader-release.js', format: 'umd', name }, plugins: [ replace({ preventAssignment: true }), - wasm(), + wasm({ sourceMap: true }), bannerPlugin ] }, From 0dd49ae5874944930a11bce70434fd40449b3a94 Mon Sep 17 00:00:00 2001 From: Huguenin-Elie Steve Date: Fri, 2 Apr 2021 18:09:15 +0200 Subject: [PATCH 25/32] javascript interface for webassembly rollup supports operation for both release and debug script allows to produce the exports for each loader files loader is compiled from JS using typescript but babel is supported --- .size-snapshot.json | 6 +++--- assembly/tsconfig.json | 3 +++ build/loader-debug.js | 6 +++--- build/loader-release.js | 6 +++--- loader/.gitignore | 2 ++ loader/index.js | 14 +++++++++++++ loader/tsconfig.json | 9 +++++++++ package.json | 3 ++- rollup.config.js | 16 +++++++++++---- utils/build-loader.js | 44 +++++++++++++++++++++++++++++++++++++++++ utils/build.js | 10 ++++++++-- 11 files changed, 103 insertions(+), 16 deletions(-) create mode 100644 loader/.gitignore create mode 100644 loader/index.js create mode 100644 loader/tsconfig.json create mode 100644 utils/build-loader.js diff --git a/.size-snapshot.json b/.size-snapshot.json index 9eceb04e..0cde2734 100644 --- a/.size-snapshot.json +++ b/.size-snapshot.json @@ -5,8 +5,8 @@ "gzipped": 13273 }, "dist\\gl-matrix-min.js": { - "bundled": 54440, - "minified": 54369, - "gzipped": 13854 + "bundled": 54568, + "minified": 54478, + "gzipped": 13921 } } diff --git a/assembly/tsconfig.json b/assembly/tsconfig.json index e020765c..4e33fb72 100644 --- a/assembly/tsconfig.json +++ b/assembly/tsconfig.json @@ -1,5 +1,8 @@ { "extends": "assemblyscript/std/portable.json", + "exclude": [ + "./**/*.spec.ts" + ], "include": [ "./**/*.ts" ] diff --git a/build/loader-debug.js b/build/loader-debug.js index fc44ff05..a59c6063 100644 --- a/build/loader-debug.js +++ b/build/loader-debug.js @@ -2,9 +2,9 @@ import wasm from './untouched.wasm'; let modules; -wasm({ ...imports }).then(({ instance }) => { - modules = instance.exports -}) +wasm({ ...imports }).then(instance => { + modules = instance.exports; +}); export const { glMatrix, diff --git a/build/loader-release.js b/build/loader-release.js index ed55662e..8a605ce4 100644 --- a/build/loader-release.js +++ b/build/loader-release.js @@ -2,9 +2,9 @@ import wasm from './optimized.wasm'; let modules; -wasm({ ...imports }).then(({ instance }) => { - modules = instance.exports -}) +wasm({ ...imports }).then(instance => { + modules = instance.exports; +}); export const { glMatrix, diff --git a/loader/.gitignore b/loader/.gitignore new file mode 100644 index 00000000..60694a99 --- /dev/null +++ b/loader/.gitignore @@ -0,0 +1,2 @@ +*.js +!index.js diff --git a/loader/index.js b/loader/index.js new file mode 100644 index 00000000..0e57bc3a --- /dev/null +++ b/loader/index.js @@ -0,0 +1,14 @@ +import wasm from '../build/optimized.wasm'; + +let modules; + +wasm({ ...imports }).then(instance => { + modules = instance.exports; +}); + +export const { + glMatrix, + mat2, mat2d, mat3, mat4, + quat, quat2, + vec2, vec3, vec4 +} = modules; diff --git a/loader/tsconfig.json b/loader/tsconfig.json new file mode 100644 index 00000000..1f4bf60a --- /dev/null +++ b/loader/tsconfig.json @@ -0,0 +1,9 @@ +{ + "compilerOptions": { + "module": "umd", + "outDir": "../dist/wasm", + "allowJs": true, + "checkJs": false + }, + "exclude": ["index.js"] +} diff --git a/package.json b/package.json index ab63c427..293bed7d 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,8 @@ "build-esm": "tsc --module es6 assembly/index.ts --outDir dist/esm", "build-cjs": "tsc --module commonjs assembly/index.ts -outDir dist/cjs", "build-dts": "tsc --declaration --emitDeclarationOnly --module amd --outFile ./dist/index.d.ts ./assembly/index.ts && node ./utils/bundle-dts.js && tsc --noEmit ./dist/index.d.ts", - "build": "del dist && npm run update-license-version && npm run asbuild && npm run build-umd && npm run build-esm && npm run build-cjs && npm run build-dts && node ./utils/build.js", + "build-loader": "node ./utils/build-loader.js && tsc -p loader/tsconfig.json", + "build": "del dist && npm run update-license-version && npm run build-loader && npm run asbuild && npm run build-umd && npm run build-esm && npm run build-cjs && npm run build-dts && node ./utils/build.js", "prepare": "npm run build", "asbuild:untouched": "asc assembly/index.ts --target debug", "asbuild:optimized": "asc assembly/index.ts --target release", diff --git a/rollup.config.js b/rollup.config.js index 3b3a77e6..402fbe2d 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -23,9 +23,17 @@ ${license} } export default [ + { + input: './loader/index.js', + output: { file: 'dist/wasm/index.js', format: 'umd', name }, + plugins: [ + replace({ preventAssignment: true }), + wasm({ sourceMap: true }), + ] + }, { input: './build/loader-debug.js', - output: { file: 'dist/wasm/gl-matrix-loader-debug.js', format: 'umd', name }, + output: { file: 'dist/gl-matrix-loader-debug.js', format: 'umd', name }, plugins: [ replace({ preventAssignment: true }), wasm({ sourceMap: true }), @@ -34,7 +42,7 @@ export default [ }, { input: './build/loader-release.js', - output: { file: 'dist/wasm/gl-matrix-loader-release.js', format: 'umd', name }, + output: { file: 'dist/gl-matrix-loader-release.js', format: 'umd', name }, plugins: [ replace({ preventAssignment: true }), wasm({ sourceMap: true }), @@ -46,7 +54,7 @@ export default [ output: { file: 'dist/gl-matrix.js', format: 'umd', name }, plugins: [ replace({ preventAssignment: true }), - typescript(), + typescript({ tsconfig: 'assembly/tsconfig.json'}), bannerPlugin ] }, @@ -55,7 +63,7 @@ export default [ output: { file: 'dist/gl-matrix-min.js', format: 'umd', name }, plugins: [ replace({ preventAssignment: true }), - typescript(), + typescript({ tsconfig: 'assembly/tsconfig.json'}), terser({ output: { comments: /^!/ } }), diff --git a/utils/build-loader.js b/utils/build-loader.js new file mode 100644 index 00000000..454ea743 --- /dev/null +++ b/utils/build-loader.js @@ -0,0 +1,44 @@ +const fs = require('fs'); +const path = require('path'); + +const inputDir = 'assembly'; +const outputDir = 'loader'; + +let declarations = new Set(); + +let content; + +fs.readdirSync(inputDir) + .filter(file => + file.includes('.ts') && + !file.includes('import') && + !file.includes('index') && + !file.includes('math') && + !file.includes('d.ts') && + !file.includes('_tests_')) + .forEach(file => { + const fileName = file.split('.')[0]; + let moduleName = fileName; + if (file.includes('common')) { + moduleName = 'glMatrix'; + } + content = `import { ${moduleName} } from './index.js'\n\nexport const {\n`; + console.log(`Searching for exported functions and objects in file ${path.join(inputDir, file)}...`); + fs.readFileSync(path.join(inputDir, file)).toString().split('\n').forEach(line => { + if (line.match(/export.+(function|var).[a-z]+.+[;\{]/g) !== null) { + declarations.add(line.replace(/export.+(function|var).([a-z]+).+[;\{\r]/g, "$2")); + } + }); + + declarations.forEach((value, value2, set) => { + if (value != 'min' && value != 'max') { + content += ` ${value},\n`; + } + }); + content += `\} = ${moduleName};\n`; + + console.log(`Found ${declarations.size ?? 0} exports.`); + + loader = fs.writeFileSync(path.join(outputDir, fileName + '.js'), content); + console.log(`Exports are being written to file ${path.join(outputDir, fileName + '.js')}\n`); + }); diff --git a/utils/build.js b/utils/build.js index 5ec8dfdb..97543ea3 100644 --- a/utils/build.js +++ b/utils/build.js @@ -18,9 +18,15 @@ copyFileSync('README.md', 'dist/README.md'); copyFileSync('LICENSE.md', 'dist/LICENSE.md'); const files = fs.readdirSync('assembly') - .filter(file => !file.includes('common') && !file.includes('index')) + .filter(file => + !file.includes('_tests_') && + !file.includes('.json') && + !file.includes('import') && + !file.includes('math') && + !file.includes('common') && !file.includes('index')) .forEach(file => { - const name = file.endsWith('.js') ? file.slice(0, -3) : file; + const name = file.endsWith('.ts') ? file.slice(0, -3) : file; + file = file.slice(0, -3) + '.js'; const filePkg = { name: `gl-matrix/${name}`, main: `../cjs/${file}`, From 194ed13f5c600b11627648277337ece40aa6d601 Mon Sep 17 00:00:00 2001 From: Huguenin-Elie Steve Date: Fri, 2 Apr 2021 22:05:02 +0200 Subject: [PATCH 26/32] update .travis.yml for using latest node-lts version --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8b854ab6..865ea74c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: node_js sudo: false node_js: - - "12.16.1" + - "lts/*" script: - npm run build - npm run test From 1922b8db48608648f1534f41ef19b5808f1500e8 Mon Sep 17 00:00:00 2001 From: Huguenin-Elie Steve Date: Sun, 4 Apr 2021 11:51:53 +0200 Subject: [PATCH 27/32] add upper case support --- utils/build-loader.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/build-loader.js b/utils/build-loader.js index 454ea743..9cde6663 100644 --- a/utils/build-loader.js +++ b/utils/build-loader.js @@ -25,8 +25,8 @@ fs.readdirSync(inputDir) content = `import { ${moduleName} } from './index.js'\n\nexport const {\n`; console.log(`Searching for exported functions and objects in file ${path.join(inputDir, file)}...`); fs.readFileSync(path.join(inputDir, file)).toString().split('\n').forEach(line => { - if (line.match(/export.+(function|var).[a-z]+.+[;\{]/g) !== null) { - declarations.add(line.replace(/export.+(function|var).([a-z]+).+[;\{\r]/g, "$2")); + if (line.match(/export.+(function|var).[a-zA-Z]+.+[;\{]/g) !== null) { + declarations.add(line.replace(/export.+(function|var).([a-zA-Z]+).+[;\{\r]/g, "$2")); } }); From 1124e844024c8852d552e9fc5111d9b02282c49e Mon Sep 17 00:00:00 2001 From: Huguenin-Elie Steve Date: Sun, 4 Apr 2021 12:31:05 +0200 Subject: [PATCH 28/32] right asynchronous call for WebAssembly loading --- build/loader-debug.js | 12 +++++++----- build/loader-release.js | 12 +++++++----- loader/index.js | 10 ++++++---- 3 files changed, 20 insertions(+), 14 deletions(-) diff --git a/build/loader-debug.js b/build/loader-debug.js index a59c6063..cce4a023 100644 --- a/build/loader-debug.js +++ b/build/loader-debug.js @@ -1,14 +1,16 @@ import wasm from './untouched.wasm'; -let modules; +var modules; -wasm({ ...imports }).then(instance => { - modules = instance.exports; -}); +(async (...imports) => { + wasm(imports).then(instance => { + modules = instance.exports; + }); +})(); export const { glMatrix, mat2, mat2d, mat3, mat4, quat, quat2, vec2, vec3, vec4 -} = modules; +} = modules; \ No newline at end of file diff --git a/build/loader-release.js b/build/loader-release.js index 8a605ce4..392c452c 100644 --- a/build/loader-release.js +++ b/build/loader-release.js @@ -1,14 +1,16 @@ import wasm from './optimized.wasm'; -let modules; +var modules; -wasm({ ...imports }).then(instance => { - modules = instance.exports; -}); +(async (...imports) => { + wasm(imports).then(instance => { + modules = instance.exports; + }); +})(); export const { glMatrix, mat2, mat2d, mat3, mat4, quat, quat2, vec2, vec3, vec4 -} = modules; +} = modules; \ No newline at end of file diff --git a/loader/index.js b/loader/index.js index 0e57bc3a..6ddc4f18 100644 --- a/loader/index.js +++ b/loader/index.js @@ -1,10 +1,12 @@ import wasm from '../build/optimized.wasm'; -let modules; +var modules; -wasm({ ...imports }).then(instance => { - modules = instance.exports; -}); +(async (...imports) => { + wasm(imports).then(instance => { + modules = instance.exports; + }); +})(); export const { glMatrix, From 885e3b10e989f78d473cc3f59ac948ec595b2804 Mon Sep 17 00:00:00 2001 From: Huguenin-Elie Steve Date: Mon, 26 Apr 2021 13:09:08 +0200 Subject: [PATCH 29/32] update assembly and asconfig.json global function min cannot be accessed inside class when overriden asconfig.json: tdsFiles, exportRuntime, runtime set to incremental --- asconfig.json | 5 + assembly/common.ts | 12 +- assembly/mat2.ts | 4 +- assembly/mat2d.ts | 4 +- assembly/mat3.ts | 4 +- assembly/mat4.ts | 4 +- assembly/maths.ts | 9 - assembly/quat.ts | 4 +- assembly/quat2.ts | 4 +- assembly/vec2.ts | 6 +- assembly/vec3.ts | 6 +- assembly/vec4.ts | 6 +- build/optimized.wasm.d.ts | 399 +++++ build/optimized.wat | 3177 ++++++++++++++++++++----------------- build/untouched.wasm.d.ts | 399 +++++ build/untouched.wat | 1373 +++++++++------- index.js | 5 - 17 files changed, 3312 insertions(+), 2109 deletions(-) create mode 100644 build/optimized.wasm.d.ts create mode 100644 build/untouched.wasm.d.ts delete mode 100644 index.js diff --git a/asconfig.json b/asconfig.json index ad6de144..df648650 100644 --- a/asconfig.json +++ b/asconfig.json @@ -3,12 +3,17 @@ "debug": { "binaryFile": "build/untouched.wasm", "textFile": "build/untouched.wat", + "tdsFile": "build/untouched.wasm.d.ts", + "exportRuntime": true, "sourceMap": true, "debug": true }, "release": { "binaryFile": "build/optimized.wasm", "textFile": "build/optimized.wat", + "tdsFile": "build/optimized.wasm.d.ts", + "exportRuntime": true, + "runtime": "incremental", "sourceMap": true, "optimizeLevel": 3, "shrinkLevel": 0, diff --git a/assembly/common.ts b/assembly/common.ts index c21ff366..c90f2eb4 100644 --- a/assembly/common.ts +++ b/assembly/common.ts @@ -7,17 +7,21 @@ import { Maths } from "./maths"; // Configuration Constants export const EPSILON = 0.000001; -export type ARRAY_TYPE = Float64Array; +export enum ArrayTypeEnum { + Float64ArrayT = idof(), + ArrayF64T = idof>(), +}; +export let ARRAY_TYPE = ArrayTypeEnum.Float64ArrayT; export let RANDOM = Math.random; export let ANGLE_ORDER = "zyx"; /** * Sets the type of array used when creating new vectors and matrices * - * @param {Object} type Array type, such as Float32Array or Array + * @param {Number} id Array type, such as Float32Array or Array */ -export function setMatrixArrayType(type: Object): void { - throw new Error("Not implemented yet"); +export function setMatrixArrayType(id: i32): void { + ARRAY_TYPE = id; } const degree: f64 = Math.PI / 180; diff --git a/assembly/mat2.ts b/assembly/mat2.ts index 4e072c1e..9b772f18 100644 --- a/assembly/mat2.ts +++ b/assembly/mat2.ts @@ -19,10 +19,10 @@ export type ReadonlyMat2 = IndexedCollection; */ export function create(): mat2 { let out = new Float64Array(4); - //if (glMatrix.ARRAY_TYPE != Float32Array) { + if (glMatrix.ARRAY_TYPE != glMatrix.ArrayTypeEnum.Float64ArrayT) { out[1] = 0; out[2] = 0; - //} + } out[0] = 1; out[3] = 1; return out; diff --git a/assembly/mat2d.ts b/assembly/mat2d.ts index a4958c69..b9f22ea0 100644 --- a/assembly/mat2d.ts +++ b/assembly/mat2d.ts @@ -33,12 +33,12 @@ export type ReadonlyMat2d = IndexedCollection; */ export function create(): mat2d { let out = new Float64Array(6); - //if (mat2d != Float32Array) { + if (glMatrix.ARRAY_TYPE != glMatrix.ArrayTypeEnum.Float64ArrayT) { out[1] = 0; out[2] = 0; out[4] = 0; out[5] = 0; - //} + } out[0] = 1; out[3] = 1; return out; diff --git a/assembly/mat3.ts b/assembly/mat3.ts index 4b38f601..f737b43b 100644 --- a/assembly/mat3.ts +++ b/assembly/mat3.ts @@ -23,14 +23,14 @@ export type ReadonlyMat3 = IndexedCollection; */ export function create(): mat3 { let out = new Float64Array(9); - //if (glMatrix.ARRAY_TYPE != Float32Array): mat3 { + if (glMatrix.ARRAY_TYPE != glMatrix.ArrayTypeEnum.Float64ArrayT) { out[1] = 0; out[2] = 0; out[3] = 0; out[5] = 0; out[6] = 0; out[7] = 0; - //} + } out[0] = 1; out[4] = 1; out[8] = 1; diff --git a/assembly/mat4.ts b/assembly/mat4.ts index 828550dc..1661d78a 100644 --- a/assembly/mat4.ts +++ b/assembly/mat4.ts @@ -34,7 +34,7 @@ export class Fov { */ export function create(): mat4 { let out = new Float64Array(16); - //if (glMatrix.ARRAY_TYPE != Float32Array) { + if (glMatrix.ARRAY_TYPE != glMatrix.ArrayTypeEnum.Float64ArrayT) { out[1] = 0; out[2] = 0; out[3] = 0; @@ -47,7 +47,7 @@ export function create(): mat4 { out[12] = 0; out[13] = 0; out[14] = 0; - //} + } out[0] = 1; out[5] = 1; out[10] = 1; diff --git a/assembly/maths.ts b/assembly/maths.ts index c97728cb..2899b956 100644 --- a/assembly/maths.ts +++ b/assembly/maths.ts @@ -175,15 +175,6 @@ export namespace Maths { return s * Math.sqrt(a * a + b * b + c * c + d * d + e * e + f * f + g * g + h * h + i * i + j * j + k * k + m * m + n * n + o * o + p * p); } - /** - * Returns the smaller of a set of supplied numeric expressions. - * @param a a - * @param b b - */ - export function min(a: i32, b: i32): i32 { - return a < b ? a : b; - } - /** * Returns the larger of a set of supplied numeric expressions. * @param a a diff --git a/assembly/quat.ts b/assembly/quat.ts index 28669e90..5636aa90 100644 --- a/assembly/quat.ts +++ b/assembly/quat.ts @@ -20,11 +20,11 @@ export type ReadonlyQuat = IndexedCollection; */ export function create(): quat { let out = new Float64Array(4); - //if (glMatrix.ARRAY_TYPE != Float32Array) { + if (glMatrix.ARRAY_TYPE != glMatrix.ArrayTypeEnum.Float64ArrayT) { out[0] = 0; out[1] = 0; out[2] = 0; - //} + } out[3] = 1; return out; } diff --git a/assembly/quat2.ts b/assembly/quat2.ts index 70d46000..06ac06b3 100644 --- a/assembly/quat2.ts +++ b/assembly/quat2.ts @@ -24,7 +24,7 @@ export type ReadonlyQuat2 = IndexedCollection; */ export function create(): quat2 { let dq = changetype(new Float64Array(8)); - //if (glMatrix.ARRAY_TYPE != Float32Array) { + if (glMatrix.ARRAY_TYPE != glMatrix.ArrayTypeEnum.Float64ArrayT) { dq[0] = 0; dq[1] = 0; dq[2] = 0; @@ -32,7 +32,7 @@ export function create(): quat2 { dq[5] = 0; dq[6] = 0; dq[7] = 0; - //} + } dq[3] = 1; return dq; } diff --git a/assembly/vec2.ts b/assembly/vec2.ts index d323217e..98ca20db 100644 --- a/assembly/vec2.ts +++ b/assembly/vec2.ts @@ -22,10 +22,10 @@ export type ReadonlyVec2 = IndexedCollection; */ export function create(): vec2 { let out = new Float64Array(2); - //if (glMatrix.ARRAY_TYPE != Float32Array) { + if (glMatrix.ARRAY_TYPE != glMatrix.ArrayTypeEnum.Float64ArrayT) { out[0] = 0; out[1] = 0; - //} + } return out; } @@ -619,7 +619,7 @@ export const forEach = ((): (a: vec2, stride: i32, offset: i32, count: i32, fn: } if (count) { - l = Maths.min(count * stride + offset, a.length); + l = Math.min(count * stride + offset, a.length); } else { l = a.length; } diff --git a/assembly/vec3.ts b/assembly/vec3.ts index 8a99853e..a80c073d 100644 --- a/assembly/vec3.ts +++ b/assembly/vec3.ts @@ -21,11 +21,11 @@ export type ReadonlyVec3 = IndexedCollection; */ export function create(): vec3 { let out = new Float64Array(3); - //if (glMatrix.ARRAY_TYPE != Float32Array) { + if (glMatrix.ARRAY_TYPE != glMatrix.ArrayTypeEnum.Float64ArrayT) { out[0] = 0; out[1] = 0; out[2] = 0; - //} + } return out; } @@ -817,7 +817,7 @@ export const forEach = ((): (a: vec3, stride: i32, offset: i32, count: i32, fn: } if (count) { - l = Maths.min(count * stride + offset, a.length); + l = Math.min(count * stride + offset, a.length); } else { l = a.length; } diff --git a/assembly/vec4.ts b/assembly/vec4.ts index 8da3673e..8fc7911d 100644 --- a/assembly/vec4.ts +++ b/assembly/vec4.ts @@ -19,12 +19,12 @@ export type ReadonlyVec4 = IndexedCollection; */ export function create(): vec4 { let out = new Float64Array(4); - //if (glMatrix.ARRAY_TYPE != Float32Array) { + if (glMatrix.ARRAY_TYPE != glMatrix.ArrayTypeEnum.Float64ArrayT) { out[0] = 0; out[1] = 0; out[2] = 0; out[3] = 0; - //} + } return out; } @@ -656,7 +656,7 @@ export const forEach = ((): (a: vec4, stride: i32, offset: i32, count: i32, fn: } if (count) { - l = Maths.min(count * stride + offset, a.length); + l = Math.min(count * stride + offset, a.length); } else { l = a.length; } diff --git a/build/optimized.wasm.d.ts b/build/optimized.wasm.d.ts new file mode 100644 index 00000000..c423912e --- /dev/null +++ b/build/optimized.wasm.d.ts @@ -0,0 +1,399 @@ +declare module ASModule { + type i8 = number; + type i16 = number; + type i32 = number; + type i64 = bigint; + type isize = number; + type u8 = number; + type u16 = number; + type u32 = number; + type u64 = bigint; + type usize = number; + type f32 = number; + type f64 = number; + type bool = boolean | number; + export namespace glMatrix { + export var EPSILON: f64; + export var RANDOM: usize; + export var ANGLE_ORDER: usize; + export function setMatrixArrayType(type: usize): void; + export function toRadian(a: f64): f64; + export function equals(a: f64, b: f64): bool; + } + export namespace mat2 { + export function create(): usize; + export function clone(a: usize): usize; + export function copy(out: usize, a: usize): usize; + export function identity(out: usize): usize; + export function fromValues(m00: f64, m01: f64, m10: f64, m11: f64): usize; + export function set(out: usize, m00: f64, m01: f64, m10: f64, m11: f64): usize; + export function transpose(out: usize, a: usize): usize; + export function invert(out: usize, a: usize): usize; + export function adjoint(out: usize, a: usize): usize; + export function determinant(a: usize): f64; + export function multiply(out: usize, a: usize, b: usize): usize; + export function rotate(out: usize, a: usize, rad: f64): usize; + export function scale(out: usize, a: usize, v: usize): usize; + export function fromRotation(out: usize, rad: f64): usize; + export function fromScaling(out: usize, v: usize): usize; + export function str(a: usize): usize; + export function frob(a: usize): f64; + export function LDU(L: usize, D: usize, U: usize, a: usize): usize; + export function add(out: usize, a: usize, b: usize): usize; + export function subtract(out: usize, a: usize, b: usize): usize; + export function exactEquals(a: usize, b: usize): bool; + export function equals(a: usize, b: usize): bool; + export function multiplyScalar(out: usize, a: usize, b: f64): usize; + export function multiplyScalarAndAdd(out: usize, a: usize, b: usize, scale: f64): usize; + export var mul: usize; + export var sub: usize; + } + export namespace mat2d { + export function create(): usize; + export function clone(a: usize): usize; + export function copy(out: usize, a: usize): usize; + export function identity(out: usize): usize; + export function fromValues(a: f64, b: f64, c: f64, d: f64, tx: f64, ty: f64): usize; + export function set(out: usize, a: f64, b: f64, c: f64, d: f64, tx: f64, ty: f64): usize; + export function invert(out: usize, a: usize): usize; + export function determinant(a: usize): f64; + export function multiply(out: usize, a: usize, b: usize): usize; + export function rotate(out: usize, a: usize, rad: f64): usize; + export function scale(out: usize, a: usize, v: usize): usize; + export function translate(out: usize, a: usize, v: usize): usize; + export function fromRotation(out: usize, rad: f64): usize; + export function fromScaling(out: usize, v: usize): usize; + export function fromTranslation(out: usize, v: usize): usize; + export function str(a: usize): usize; + export function frob(a: usize): f64; + export function add(out: usize, a: usize, b: usize): usize; + export function subtract(out: usize, a: usize, b: usize): usize; + export function multiplyScalar(out: usize, a: usize, b: f64): usize; + export function multiplyScalarAndAdd(out: usize, a: usize, b: usize, scale: f64): usize; + export function exactEquals(a: usize, b: usize): bool; + export function equals(a: usize, b: usize): bool; + export var mul: usize; + export var sub: usize; + } + export namespace mat3 { + export function create(): usize; + export function fromMat4(out: usize, a: usize): usize; + export function clone(a: usize): usize; + export function copy(out: usize, a: usize): usize; + export function fromValues(m00: f64, m01: f64, m02: f64, m10: f64, m11: f64, m12: f64, m20: f64, m21: f64, m22: f64): usize; + export function set(out: usize, m00: f64, m01: f64, m02: f64, m10: f64, m11: f64, m12: f64, m20: f64, m21: f64, m22: f64): usize; + export function identity(out: usize): usize; + export function transpose(out: usize, a: usize): usize; + export function invert(out: usize, a: usize): usize; + export function adjoint(out: usize, a: usize): usize; + export function determinant(a: usize): f64; + export function multiply(out: usize, a: usize, b: usize): usize; + export function translate(out: usize, a: usize, v: usize): usize; + export function rotate(out: usize, a: usize, rad: f64): usize; + export function scale(out: usize, a: usize, v: usize): usize; + export function fromTranslation(out: usize, v: usize): usize; + export function fromRotation(out: usize, rad: f64): usize; + export function fromScaling(out: usize, v: usize): usize; + export function fromMat2d(out: usize, a: usize): usize; + export function fromQuat(out: usize, q: usize): usize; + export function normalFromMat4(out: usize, a: usize): usize; + export function projection(out: usize, width: f64, height: f64): usize; + export function str(a: usize): usize; + export function frob(a: usize): f64; + export function add(out: usize, a: usize, b: usize): usize; + export function subtract(out: usize, a: usize, b: usize): usize; + export function multiplyScalar(out: usize, a: usize, b: f64): usize; + export function multiplyScalarAndAdd(out: usize, a: usize, b: usize, scale: f64): usize; + export function exactEquals(a: usize, b: usize): bool; + export function equals(a: usize, b: usize): bool; + export var mul: usize; + export var sub: usize; + } + export namespace mat4 { + export class Fov { + static wrap(ptr: usize): Fov; + valueOf(): usize; + upDegrees: f64; + downDegrees: f64; + leftDegrees: f64; + rightDegrees: f64; + constructor(); + } + export function create(): usize; + export function clone(a: usize): usize; + export function copy(out: usize, a: usize): usize; + export function fromValues(m00: f64, m01: f64, m02: f64, m03: f64, m10: f64, m11: f64, m12: f64, m13: f64, m20: f64, m21: f64, m22: f64, m23: f64, m30: f64, m31: f64, m32: f64, m33: f64): usize; + export function set(out: usize, m00: f64, m01: f64, m02: f64, m03: f64, m10: f64, m11: f64, m12: f64, m13: f64, m20: f64, m21: f64, m22: f64, m23: f64, m30: f64, m31: f64, m32: f64, m33: f64): usize; + export function identity(out: usize): usize; + export function transpose(out: usize, a: usize): usize; + export function invert(out: usize, a: usize): usize; + export function adjoint(out: usize, a: usize): usize; + export function determinant(a: usize): f64; + export function multiply(out: usize, a: usize, b: usize): usize; + export function translate(out: usize, a: usize, v: usize): usize; + export function scale(out: usize, a: usize, v: usize): usize; + export function rotate(out: usize, a: usize, rad: f64, axis: usize): usize; + export function rotateX(out: usize, a: usize, rad: f64): usize; + export function rotateY(out: usize, a: usize, rad: f64): usize; + export function rotateZ(out: usize, a: usize, rad: f64): usize; + export function fromTranslation(out: usize, v: usize): usize; + export function fromScaling(out: usize, v: usize): usize; + export function fromRotation(out: usize, rad: f64, axis: usize): usize; + export function fromXRotation(out: usize, rad: f64): usize; + export function fromYRotation(out: usize, rad: f64): usize; + export function fromZRotation(out: usize, rad: f64): usize; + export function fromRotationTranslation(out: usize, q: usize, v: usize): usize; + export function fromQuat2(out: usize, a: usize): usize; + export function getTranslation(out: usize, mat: usize): usize; + export function getScaling(out: usize, mat: usize): usize; + export function getRotation(out: usize, mat: usize): usize; + export function decompose(out_r: usize, out_t: usize, out_s: usize, mat: usize): usize; + export function fromRotationTranslationScale(out: usize, q: usize, v: usize, s: usize): usize; + export function fromRotationTranslationScaleOrigin(out: usize, q: usize, v: usize, s: usize, o: usize): usize; + export function fromQuat(out: usize, q: usize): usize; + export function frustum(out: usize, left: f64, right: f64, bottom: f64, top: f64, near: f64, far: f64): usize; + export function perspectiveNO(out: usize, fovy: f64, aspect: f64, near: f64, far: f64): usize; + export var perspective: usize; + export function perspectiveZO(out: usize, fovy: f64, aspect: f64, near: f64, far: f64): usize; + export function perspectiveFromFieldOfView(out: usize, fov: usize, near: f64, far: f64): usize; + export function orthoNO(out: usize, left: f64, right: f64, bottom: f64, top: f64, near: f64, far: f64): usize; + export var ortho: usize; + export function orthoZO(out: usize, left: f64, right: f64, bottom: f64, top: f64, near: f64, far: f64): usize; + export function lookAt(out: usize, eye: usize, center: usize, up: usize): usize; + export function targetTo(out: usize, eye: usize, target: usize, up: usize): usize; + export function str(a: usize): usize; + export function frob(a: usize): f64; + export function add(out: usize, a: usize, b: usize): usize; + export function subtract(out: usize, a: usize, b: usize): usize; + export function multiplyScalar(out: usize, a: usize, b: f64): usize; + export function multiplyScalarAndAdd(out: usize, a: usize, b: usize, scale: f64): usize; + export function exactEquals(a: usize, b: usize): bool; + export function equals(a: usize, b: usize): bool; + export var mul: usize; + export var sub: usize; + } + export namespace quat { + export function create(): usize; + export function identity(out: usize): usize; + export function setAxisAngle(out: usize, axis: usize, rad: f64): usize; + export function getAxisAngle(out_axis: usize, q: usize): f64; + export function getAngle(a: usize, b: usize): f64; + export function multiply(out: usize, a: usize, b: usize): usize; + export function rotateX(out: usize, a: usize, rad: f64): usize; + export function rotateY(out: usize, a: usize, rad: f64): usize; + export function rotateZ(out: usize, a: usize, rad: f64): usize; + export function calculateW(out: usize, a: usize): usize; + export function exp(out: usize, a: usize): usize; + export function ln(out: usize, a: usize): usize; + export function pow(out: usize, a: usize, b: f64): usize; + export function slerp(out: usize, a: usize, b: usize, t: f64): usize; + export function random(out: usize): usize; + export function invert(out: usize, a: usize): usize; + export function conjugate(out: usize, a: usize): usize; + export function fromMat3(out: usize, m: usize): usize; + export function fromEuler(out: usize, x: f64, y: f64, z: f64, order?: usize): usize; + export function str(a: usize): usize; + export var clone: usize; + export var fromValues: usize; + export var copy: usize; + export var set: usize; + export var add: usize; + export var mul: usize; + export var scale: usize; + export var dot: usize; + export var lerp: usize; + export var length: usize; + export var len: usize; + export var squaredLength: usize; + export var sqrLen: usize; + export var normalize: usize; + export var exactEquals: usize; + export function equals(a: usize, b: usize): bool; + export var rotationTo: usize; + export var sqlerp: usize; + export var setAxes: usize; + } + export namespace quat2 { + export function create(): usize; + export function clone(a: usize): usize; + export function fromValues(x1: f64, y1: f64, z1: f64, w1: f64, x2: f64, y2: f64, z2: f64, w2: f64): usize; + export function fromRotationTranslationValues(x1: f64, y1: f64, z1: f64, w1: f64, x2: f64, y2: f64, z2: f64): usize; + export function fromRotationTranslation(out: usize, q: usize, t: usize): usize; + export function fromTranslation(out: usize, t: usize): usize; + export function fromRotation(out: usize, q: usize): usize; + export function fromMat4(out: usize, a: usize): usize; + export function copy(out: usize, a: usize): usize; + export function identity(out: usize): usize; + export function set(out: usize, x1: f64, y1: f64, z1: f64, w1: f64, x2: f64, y2: f64, z2: f64, w2: f64): usize; + export var getReal: usize; + export function getDual(out: usize, a: usize): usize; + export var setReal: usize; + export function setDual(out: usize, q: usize): usize; + export function getTranslation(out: usize, a: usize): usize; + export function translate(out: usize, a: usize, v: usize): usize; + export function rotateX(out: usize, a: usize, rad: f64): usize; + export function rotateY(out: usize, a: usize, rad: f64): usize; + export function rotateZ(out: usize, a: usize, rad: f64): usize; + export function rotateByQuatAppend(out: usize, a: usize, q: usize): usize; + export function rotateByQuatPrepend(out: usize, q: usize, a: usize): usize; + export function rotateAroundAxis(out: usize, a: usize, axis: usize, rad: f64): usize; + export function add(out: usize, a: usize, b: usize): usize; + export function multiply(out: usize, a: usize, b: usize): usize; + export var mul: usize; + export function scale(out: usize, a: usize, b: f64): usize; + export var dot: usize; + export function lerp(out: usize, a: usize, b: usize, t: f64): usize; + export function invert(out: usize, a: usize): usize; + export function conjugate(out: usize, a: usize): usize; + export var length: usize; + export var len: usize; + export var squaredLength: usize; + export var sqrLen: usize; + export function normalize(out: usize, a: usize): usize; + export function str(a: usize): usize; + export function exactEquals(a: usize, b: usize): bool; + export function equals(a: usize, b: usize): bool; + } + export namespace vec2 { + export function create(): usize; + export function clone(a: usize): usize; + export function fromValues(x: f64, y: f64): usize; + export function copy(out: usize, a: usize): usize; + export function set(out: usize, x: f64, y: f64): usize; + export function add(out: usize, a: usize, b: usize): usize; + export function subtract(out: usize, a: usize, b: usize): usize; + export function multiply(out: usize, a: usize, b: usize): usize; + export function divide(out: usize, a: usize, b: usize): usize; + export function ceil(out: usize, a: usize): usize; + export function floor(out: usize, a: usize): usize; + export function min(out: usize, a: usize, b: usize): usize; + export function max(out: usize, a: usize, b: usize): usize; + export function round(out: usize, a: usize): usize; + export function scale(out: usize, a: usize, b: f64): usize; + export function scaleAndAdd(out: usize, a: usize, b: usize, scale: f64): usize; + export function distance(a: usize, b: usize): f64; + export function squaredDistance(a: usize, b: usize): f64; + export function length(a: usize): f64; + export function squaredLength(a: usize): f64; + export function negate(out: usize, a: usize): usize; + export function inverse(out: usize, a: usize): usize; + export function normalize(out: usize, a: usize): usize; + export function dot(a: usize, b: usize): f64; + export function cross(out: usize, a: usize, b: usize): usize; + export function lerp(out: usize, a: usize, b: usize, t: f64): usize; + export function random(out: usize, scale: f64): usize; + export function transformMat2(out: usize, a: usize, m: usize): usize; + export function transformMat2d(out: usize, a: usize, m: usize): usize; + export function transformMat3(out: usize, a: usize, m: usize): usize; + export function transformMat4(out: usize, a: usize, m: usize): usize; + export function rotate(out: usize, a: usize, b: usize, rad: f64): usize; + export function angle(a: usize, b: usize): f64; + export function zero(out: usize): usize; + export function str(a: usize): usize; + export function exactEquals(a: usize, b: usize): bool; + export function equals(a: usize, b: usize): bool; + export var len: usize; + export var sub: usize; + export var mul: usize; + export var div: usize; + export var dist: usize; + export var sqrDist: usize; + export var sqrLen: usize; + export var forEach: usize; + } + export namespace vec3 { + export function create(): usize; + export function clone(a: usize): usize; + export function length(a: usize): f64; + export function fromValues(x: f64, y: f64, z: f64): usize; + export function copy(out: usize, a: usize): usize; + export function set(out: usize, x: f64, y: f64, z: f64): usize; + export function add(out: usize, a: usize, b: usize): usize; + export function subtract(out: usize, a: usize, b: usize): usize; + export function multiply(out: usize, a: usize, b: usize): usize; + export function divide(out: usize, a: usize, b: usize): usize; + export function ceil(out: usize, a: usize): usize; + export function floor(out: usize, a: usize): usize; + export function min(out: usize, a: usize, b: usize): usize; + export function max(out: usize, a: usize, b: usize): usize; + export function round(out: usize, a: usize): usize; + export function scale(out: usize, a: usize, b: f64): usize; + export function scaleAndAdd(out: usize, a: usize, b: usize, scale: f64): usize; + export function distance(a: usize, b: usize): f64; + export function squaredDistance(a: usize, b: usize): f64; + export function squaredLength(a: usize): f64; + export function negate(out: usize, a: usize): usize; + export function inverse(out: usize, a: usize): usize; + export function normalize(out: usize, a: usize): usize; + export function dot(a: usize, b: usize): f64; + export function cross(out: usize, a: usize, b: usize): usize; + export function lerp(out: usize, a: usize, b: usize, t: f64): usize; + export function slerp(out: usize, a: usize, b: usize, t: f64): usize; + export function hermite(out: usize, a: usize, b: usize, c: usize, d: usize, t: f64): usize; + export function bezier(out: usize, a: usize, b: usize, c: usize, d: usize, t: f64): usize; + export function random(out: usize, scale: f64): usize; + export function transformMat4(out: usize, a: usize, m: usize): usize; + export function transformMat3(out: usize, a: usize, m: usize): usize; + export function transformQuat(out: usize, a: usize, q: usize): usize; + export function rotateX(out: usize, a: usize, b: usize, rad: f64): usize; + export function rotateY(out: usize, a: usize, b: usize, rad: f64): usize; + export function rotateZ(out: usize, a: usize, b: usize, rad: f64): usize; + export function angle(a: usize, b: usize): f64; + export function zero(out: usize): usize; + export function str(a: usize): usize; + export function exactEquals(a: usize, b: usize): bool; + export function equals(a: usize, b: usize): bool; + export var sub: usize; + export var mul: usize; + export var div: usize; + export var dist: usize; + export var sqrDist: usize; + export var len: usize; + export var sqrLen: usize; + export var forEach: usize; + } + export namespace vec4 { + export function create(): usize; + export function clone(a: usize): usize; + export function fromValues(x: f64, y: f64, z: f64, w: f64): usize; + export function copy(out: usize, a: usize): usize; + export function set(out: usize, x: f64, y: f64, z: f64, w: f64): usize; + export function add(out: usize, a: usize, b: usize): usize; + export function subtract(out: usize, a: usize, b: usize): usize; + export function multiply(out: usize, a: usize, b: usize): usize; + export function divide(out: usize, a: usize, b: usize): usize; + export function ceil(out: usize, a: usize): usize; + export function floor(out: usize, a: usize): usize; + export function min(out: usize, a: usize, b: usize): usize; + export function max(out: usize, a: usize, b: usize): usize; + export function round(out: usize, a: usize): usize; + export function scale(out: usize, a: usize, b: f64): usize; + export function scaleAndAdd(out: usize, a: usize, b: usize, scale: f64): usize; + export function distance(a: usize, b: usize): f64; + export function squaredDistance(a: usize, b: usize): f64; + export function length(a: usize): f64; + export function squaredLength(a: usize): f64; + export function negate(out: usize, a: usize): usize; + export function inverse(out: usize, a: usize): usize; + export function normalize(out: usize, a: usize): usize; + export function dot(a: usize, b: usize): f64; + export function cross(out: usize, u: usize, v: usize, w: usize): usize; + export function lerp(out: usize, a: usize, b: usize, t: f64): usize; + export function random(out: usize, scale: f64): usize; + export function transformMat4(out: usize, a: usize, m: usize): usize; + export function transformQuat(out: usize, a: usize, q: usize): usize; + export function zero(out: usize): usize; + export function str(a: usize): usize; + export function exactEquals(a: usize, b: usize): bool; + export function equals(a: usize, b: usize): bool; + export var sub: usize; + export var mul: usize; + export var div: usize; + export var dist: usize; + export var sqrDist: usize; + export var len: usize; + export var sqrLen: usize; + export var forEach: usize; + } +} +export default ASModule; diff --git a/build/optimized.wat b/build/optimized.wat index 9f14877f..9fc1ac2a 100644 --- a/build/optimized.wat +++ b/build/optimized.wat @@ -15,8 +15,8 @@ (type $i32_=>_none (func (param i32))) (type $i32_f64_f64_f64_f64_=>_i32 (func (param i32 f64 f64 f64 f64) (result i32))) (type $i32_f64_f64_f64_f64_f64_f64_=>_i32 (func (param i32 f64 f64 f64 f64 f64 f64) (result i32))) - (type $i32_f64_=>_none (func (param i32 f64))) (type $none_=>_none (func)) + (type $i32_f64_=>_none (func (param i32 f64))) (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_i32_i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32 i32) (result i32))) (type $i32_i32_i32_i32_i32_f64_=>_i32 (func (param i32 i32 i32 i32 i32 f64) (result i32))) @@ -49,7 +49,7 @@ (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 1036) "\1c") - (data (i32.const 1048) "\03\00\00\00\08\00\00\00\01") + (data (i32.const 1048) "\05\00\00\00\08\00\00\00\01") (data (i32.const 1068) "\1c") (data (i32.const 1080) "\01\00\00\00\06\00\00\00z\00y\00x") (data (i32.const 1100) "<") @@ -57,25 +57,25 @@ (data (i32.const 1164) "<") (data (i32.const 1176) "\01\00\00\00$\00\00\00~\00l\00i\00b\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s") (data (i32.const 1228) "\1c") - (data (i32.const 1240) "\05\00\00\00\08\00\00\00\02") + (data (i32.const 1240) "\06\00\00\00\08\00\00\00\02") (data (i32.const 1260) "\1c") - (data (i32.const 1272) "\05\00\00\00\08\00\00\00\03") + (data (i32.const 1272) "\06\00\00\00\08\00\00\00\03") (data (i32.const 1292) "\1c") - (data (i32.const 1304) "\05\00\00\00\08\00\00\00\04") + (data (i32.const 1304) "\06\00\00\00\08\00\00\00\04") (data (i32.const 1324) "\1c") - (data (i32.const 1336) "\05\00\00\00\08\00\00\00\05") + (data (i32.const 1336) "\06\00\00\00\08\00\00\00\05") (data (i32.const 1356) "\1c") - (data (i32.const 1368) "\05\00\00\00\08\00\00\00\06") + (data (i32.const 1368) "\06\00\00\00\08\00\00\00\06") (data (i32.const 1388) "\1c") - (data (i32.const 1400) "\06\00\00\00\08\00\00\00\07") + (data (i32.const 1400) "\07\00\00\00\08\00\00\00\07") (data (i32.const 1420) "\1c") - (data (i32.const 1432) "\07\00\00\00\08\00\00\00\08") + (data (i32.const 1432) "\08\00\00\00\08\00\00\00\08") (data (i32.const 1452) "\1c") - (data (i32.const 1464) "\07\00\00\00\08\00\00\00\t") + (data (i32.const 1464) "\08\00\00\00\08\00\00\00\t") (data (i32.const 1484) "\1c") - (data (i32.const 1496) "\08\00\00\00\08\00\00\00\n") + (data (i32.const 1496) "\t\00\00\00\08\00\00\00\n") (data (i32.const 1516) "\1c") - (data (i32.const 1528) "\08\00\00\00\08\00\00\00\0b") + (data (i32.const 1528) "\t\00\00\00\08\00\00\00\0b") (data (i32.const 1548) ",") (data (i32.const 1560) "\01\00\00\00\1c\00\00\00I\00n\00v\00a\00l\00i\00d\00 \00l\00e\00n\00g\00t\00h") (data (i32.const 1596) "<") @@ -89,172 +89,175 @@ (data (i32.const 1932) "<") (data (i32.const 1944) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s") (data (i32.const 1996) "\1c") - (data (i32.const 2008) "\0b\00\00\00\08\00\00\00\0c") + (data (i32.const 2008) "\0c\00\00\00\08\00\00\00\0c") (data (i32.const 2028) "\1c") - (data (i32.const 2040) "\n\00\00\00\08\00\00\00\0d") + (data (i32.const 2040) "\0b\00\00\00\08\00\00\00\0d") (data (i32.const 2060) "\1c") - (data (i32.const 2072) "\05\00\00\00\08\00\00\00\0e") + (data (i32.const 2072) "\06\00\00\00\08\00\00\00\0e") (data (i32.const 2092) "\1c") - (data (i32.const 2104) "\05\00\00\00\08\00\00\00\0f") + (data (i32.const 2104) "\06\00\00\00\08\00\00\00\0f") (data (i32.const 2124) "\1c") - (data (i32.const 2136) "\05\00\00\00\08\00\00\00\10") + (data (i32.const 2136) "\06\00\00\00\08\00\00\00\10") (data (i32.const 2156) "\1c") - (data (i32.const 2168) "\07\00\00\00\08\00\00\00\11") + (data (i32.const 2168) "\08\00\00\00\08\00\00\00\11") (data (i32.const 2188) "\1c") - (data (i32.const 2200) "\07\00\00\00\08\00\00\00\12") + (data (i32.const 2200) "\08\00\00\00\08\00\00\00\12") (data (i32.const 2220) "\1c") - (data (i32.const 2232) "\08\00\00\00\08\00\00\00\13") + (data (i32.const 2232) "\t\00\00\00\08\00\00\00\13") (data (i32.const 2252) "\1c") - (data (i32.const 2264) "\08\00\00\00\08\00\00\00\14") + (data (i32.const 2264) "\t\00\00\00\08\00\00\00\14") (data (i32.const 2284) "\1c") - (data (i32.const 2296) "\0b\00\00\00\08\00\00\00\15") + (data (i32.const 2296) "\0c\00\00\00\08\00\00\00\15") (data (i32.const 2316) "\1c") - (data (i32.const 2328) "\n\00\00\00\08\00\00\00\16") + (data (i32.const 2328) "\0b\00\00\00\08\00\00\00\16") (data (i32.const 2348) "\1c") - (data (i32.const 2360) "\0c\00\00\00\08\00\00\00\17") + (data (i32.const 2360) "\0d\00\00\00\08\00\00\00\17") (data (i32.const 2380) "\1c") - (data (i32.const 2392) "\0d\00\00\00\08\00\00\00\18") + (data (i32.const 2392) "\0e\00\00\00\08\00\00\00\18") (data (i32.const 2412) "\1c") - (data (i32.const 2424) "\0e\00\00\00\08\00\00\00\19") + (data (i32.const 2424) "\0f\00\00\00\08\00\00\00\19") (data (i32.const 2444) "\1c") - (data (i32.const 2456) "\0f\00\00\00\08\00\00\00\1a") + (data (i32.const 2456) "\10\00\00\00\08\00\00\00\1a") (data (i32.const 2476) "\1c") - (data (i32.const 2488) "\05\00\00\00\08\00\00\00\1b") + (data (i32.const 2488) "\06\00\00\00\08\00\00\00\1b") (data (i32.const 2508) "\1c") - (data (i32.const 2520) "\05\00\00\00\08\00\00\00\1c") + (data (i32.const 2520) "\06\00\00\00\08\00\00\00\1c") (data (i32.const 2540) "\1c") - (data (i32.const 2552) "\10\00\00\00\08\00\00\00\1d") + (data (i32.const 2552) "\11\00\00\00\08\00\00\00\1d") (data (i32.const 2572) "\1c") - (data (i32.const 2584) "\07\00\00\00\08\00\00\00\1e") + (data (i32.const 2584) "\08\00\00\00\08\00\00\00\1e") (data (i32.const 2604) "\1c") - (data (i32.const 2616) "\11\00\00\00\08\00\00\00\1f") + (data (i32.const 2616) "\12\00\00\00\08\00\00\00\1f") (data (i32.const 2636) "\1c") - (data (i32.const 2648) "\0e\00\00\00\08\00\00\00 ") + (data (i32.const 2648) "\0f\00\00\00\08\00\00\00 ") (data (i32.const 2668) "\1c") - (data (i32.const 2680) "\12\00\00\00\08\00\00\00!") + (data (i32.const 2680) "\13\00\00\00\08\00\00\00!") (data (i32.const 2704) "n\83\f9\a2\00\00\00\00\d1W\'\fc)\15DN\99\95b\db\c0\dd4\f5\abcQ\feA\90C<:n$\b7a\c5\bb\de\ea.I\06\e0\d2MB\1c\eb\1d\fe\1c\92\d1\t\f55\82\e8>\a7)\b1&p\9c\e9\84D\bb.9\d6\919A~_\b4\8b_\84\9c\f49S\83\ff\97\f8\1f;(\f9\bd\8b\11/\ef\0f\98\05\de\cf~6m\1fm\nZf?FO\b7\t\cb\'\c7\ba\'u-\ea_\9e\f79\07={\f1\e5\eb\b1_\fbk\ea\92R\8aF0\03V\08]\8d\1f \bc\cf\f0\abk{\fca\91\e3\a9\1d6\f4\9a_\85\99e\08\1b\e6^\80\d8\ff\8d@h\a0\14W\15\06\061\'sM") (data (i32.const 2908) "\1c") - (data (i32.const 2920) "\05\00\00\00\08\00\00\00\"") + (data (i32.const 2920) "\06\00\00\00\08\00\00\00\"") (data (i32.const 2940) "\1c") - (data (i32.const 2952) "\13\00\00\00\08\00\00\00#") + (data (i32.const 2952) "\14\00\00\00\08\00\00\00#") (data (i32.const 2972) "\1c") - (data (i32.const 2984) "\15\00\00\00\08\00\00\00$") + (data (i32.const 2984) "\16\00\00\00\08\00\00\00$") (data (i32.const 3004) "\1c") - (data (i32.const 3016) "\14\00\00\00\08\00\00\00%") + (data (i32.const 3016) "\15\00\00\00\08\00\00\00%") (data (i32.const 3036) "\1c") - (data (i32.const 3048) "\17\00\00\00\08\00\00\00&") + (data (i32.const 3048) "\18\00\00\00\08\00\00\00&") (data (i32.const 3068) "\1c") - (data (i32.const 3080) "\16\00\00\00\08\00\00\00\'") + (data (i32.const 3080) "\17\00\00\00\08\00\00\00\'") (data (i32.const 3100) "\1c") - (data (i32.const 3112) "\05\00\00\00\08\00\00\00(") + (data (i32.const 3112) "\06\00\00\00\08\00\00\00(") (data (i32.const 3132) "\1c") (data (i32.const 3144) "\01\00\00\00\0c\00\00\00n\00u\00m\00b\00e\00r") (data (i32.const 3164) "\1c") - (data (i32.const 3176) "\0f\00\00\00\08\00\00\00)") + (data (i32.const 3176) "\10\00\00\00\08\00\00\00)") (data (i32.const 3196) "\1c") - (data (i32.const 3208) "\18\00\00\00\08\00\00\00*") + (data (i32.const 3208) "\19\00\00\00\08\00\00\00*") (data (i32.const 3228) "\1c") - (data (i32.const 3240) "\05\00\00\00\08\00\00\00+") + (data (i32.const 3240) "\06\00\00\00\08\00\00\00+") (data (i32.const 3260) "\1c") - (data (i32.const 3272) "\05\00\00\00\08\00\00\00,") + (data (i32.const 3272) "\06\00\00\00\08\00\00\00,") (data (i32.const 3292) "\1c") - (data (i32.const 3304) "\05\00\00\00\08\00\00\00-") + (data (i32.const 3304) "\06\00\00\00\08\00\00\00-") (data (i32.const 3324) "\1c") - (data (i32.const 3336) "\05\00\00\00\08\00\00\00.") + (data (i32.const 3336) "\06\00\00\00\08\00\00\00.") (data (i32.const 3356) "\1c") - (data (i32.const 3368) "\08\00\00\00\08\00\00\00/") + (data (i32.const 3368) "\t\00\00\00\08\00\00\00/") (data (i32.const 3388) "\1c") - (data (i32.const 3400) "\05\00\00\00\08\00\00\000") + (data (i32.const 3400) "\06\00\00\00\08\00\00\000") (data (i32.const 3420) "\1c") - (data (i32.const 3432) "\05\00\00\00\08\00\00\001") + (data (i32.const 3432) "\06\00\00\00\08\00\00\001") (data (i32.const 3452) "\1c") - (data (i32.const 3464) "\05\00\00\00\08\00\00\002") + (data (i32.const 3464) "\06\00\00\00\08\00\00\002") (data (i32.const 3484) "\1c") - (data (i32.const 3496) "\07\00\00\00\08\00\00\003") + (data (i32.const 3496) "\08\00\00\00\08\00\00\003") (data (i32.const 3516) "\1c") - (data (i32.const 3528) "\07\00\00\00\08\00\00\004") + (data (i32.const 3528) "\08\00\00\00\08\00\00\004") (data (i32.const 3548) "\1c") - (data (i32.const 3560) "\08\00\00\00\08\00\00\005") + (data (i32.const 3560) "\t\00\00\00\08\00\00\005") (data (i32.const 3580) "\1c") - (data (i32.const 3592) "\0b\00\00\00\08\00\00\006") + (data (i32.const 3592) "\0c\00\00\00\08\00\00\006") (data (i32.const 3612) "\1c") - (data (i32.const 3624) "\n\00\00\00\08\00\00\007") + (data (i32.const 3624) "\0b\00\00\00\08\00\00\007") (data (i32.const 3644) "\1c") - (data (i32.const 3656) "\05\00\00\00\08\00\00\008") + (data (i32.const 3656) "\06\00\00\00\08\00\00\008") (data (i32.const 3676) "\1c") - (data (i32.const 3688) "\05\00\00\00\08\00\00\009") - (data (i32.const 3708) "<") - (data (i32.const 3720) "\01\00\00\00&\00\00\00N\00o\00t\00 \00i\00m\00p\00l\00e\00m\00e\00n\00t\00e\00d\00 \00y\00e\00t") - (data (i32.const 3772) "<") - (data (i32.const 3784) "\01\00\00\00$\00\00\00a\00s\00s\00e\00m\00b\00l\00y\00/\00c\00o\00m\00m\00o\00n\00.\00t\00s") - (data (i32.const 3836) "\1c") - (data (i32.const 3848) "\01\00\00\00\n\00\00\00m\00a\00t\002\00(") - (data (i32.const 3868) "\1c") - (data (i32.const 3880) "\01\00\00\00\06\00\00\000\00.\000") - (data (i32.const 3900) "\1c") - (data (i32.const 3912) "\01\00\00\00\06\00\00\00N\00a\00N") - (data (i32.const 3932) ",") - (data (i32.const 3944) "\01\00\00\00\12\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 3980) ",") - (data (i32.const 3992) "\01\00\00\00\10\00\00\00I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 4088) "\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\9a\ec\ef?\d1f\87\10z^\90\bc\85\7fn\e8\15\e3\ef?\13\f6g5R\d2\8c\be\ef?m{\83]\a6\9a\97<\0f\89\f9lX\b5\ef?\fc\ef\fd\92\1a\b5\8e<\f7Gr+\92\ac\ef?\d1\9c/p=\be><\a2\d1\d32\ec\a3\ef?\0bn\90\894\03j\bc\1b\d3\fe\aff\9b\ef?\0e\bd/*RV\95\bcQ[\12\d0\01\93\ef?U\eaN\8c\ef\80P\bc\cc1l\c0\bd\8a\ef?\16\f4\d5\b9#\c9\91\bc\e0-\a9\ae\9a\82\ef?\afU\\\e9\e3\d3\80\f7\ec\9a<\aa\b9h1\87T\ef?\9d8\86\cb\82\e7\8f\bc\1d\d9\fc\"PM\ef?\8d\c3\a6DAo\8a<\d6\8cb\88;F\ef?}\04\e4\b0\05z\80<\96\dc}\91I?\ef?\94\a8\a8\e3\fd\8e\96<8bunz8\ef?}Ht\f2\18^\87\a9\af\0c\ef?\b6\ab\b0MuM\83<\15\b71\n\fe\06\ef?Lt\ac\e2\01B\86<1\d8L\fcp\01\ef?J\f8\d3]9\dd\8f<\ff\16d\b2\08\fc\ee?\04[\8e;\80\a3\86\bc\f1\9f\92_\c5\f6\ee?hPK\cc\edJ\92\bc\cb\a9:7\a7\f1\ee?\8e-Q\1b\f8\07\99\bcf\d8\05m\ae\ec\ee?\d26\94>\e8\d1q\bc\f7\9f\e54\db\e7\ee?\15\1b\ce\b3\19\19\99\bc\e5\a8\13\c3-\e3\ee?mL*\a7H\9f\85<\"4\12L\a6\de\ee?\8ai(z`\12\93\bc\1c\80\ac\04E\da\ee?[\89\17H\8f\a7X\bc*.\f7!\n\d6\ee?\1b\9aIg\9b,|\bc\97\a8P\d9\f5\d1\ee?\11\ac\c2`\edcC<-\89a`\08\ce\ee?\efd\06;\tf\96Z~d\1fx\bct_\ec\e8u\9f\ee?\b0}\8b\c0J\ee\86\bct\81\a5H\9a\9f\ee?\8a\e6U\1e2\19\86\bc\c9gBV\eb\9f\ee?\d3\d4\t^\cb\9c\90T\'\a4\ee?47;\f1\b6i\93\bc\13\ceL\99\89\a5\ee?\1e\ff\19:\84^\80\bc\ad\c7#F\1a\a7\ee?nWr\d8P\d4\94\bc\ed\92D\9b\d9\a8\ee?\00\8a\0e[g\ad\90<\99f\8a\d9\c7\aa\ee?\b4\ea\f0\c1/\b7\8d<\db\a0*B\e5\ac\ee?\ff\e7\c5\9c`\b6e\bc\8cD\b5\162\af\ee?D_\f3Y\83\f6{<6w\15\99\ae\b1\ee?\83=\1e\a7\1f\t\93\bc\c6\ff\91\0b[\b4\ee?)\1el\8b\b8\a9]\bc\e5\c5\cd\b07\b7\ee?Y\b9\90|\f9#l\bc\0fR\c8\cbD\ba\ee?\aa\f9\f4\"CC\92\bcPN\de\9f\82\bd\ee?K\8ef\d7l\ca\85\bc\ba\07\cap\f1\c0\ee?\'\ce\91+\fc\afq<\90\f0\a3\82\91\c4\ee?\bbs\n\e15\d2m<##\e3\19c\c8\ee?c\"b\"\04\c5\87\bce\e5]{f\cc\ee?\d51\e2\e3\86\1c\8b<3-J\ec\9b\d0\ee?\15\bb\bc\d3\d1\bb\91\bc]%>\b2\03\d5\ee?\d21\ee\9c1\cc\90\b4\07!\d5\82\bc_\9b{3\97|\ef?\c9\0dG;\b9*\89\bc)\a1\f5\14F\86\ef?\d3\88:`\04\b6t<\f6?\8b\e7.\90\ef?qr\9dQ\ec\c5\83<\83L\c7\fbQ\9a\ef?\f0\91\d3\8f\12\f7\8f\bc\da\90\a4\a2\af\a4\ef?}t#\e2\98\ae\8d\bc\f1g\8e-H\af\ef?\08 \aaA\bc\c3\8e<\'Za\ee\1b\ba\ef?2\eb\a9\c3\94+\84<\97\bak7+\c5\ef?\ee\85\d11\a9d\8a<@En[v\d0\ef?\ed\e3;\e4\ba7\8e\bc\14\be\9c\ad\fd\db\ef?\9d\cd\91M;\89w<\d8\90\9e\81\c1\e7\ef?\89\cc`A\c1\05S<\f1q\8f+\c2\f3\ef?") - (data (i32.const 7648) "\9f\de\e0\c3\f04\f7?\00\90\e6y\7f\cc\d7\bf\1f\e9,jx\13\f7?\00\00\0d\c2\eeo\d7\bf\a0\b5\fa\08`\f2\f6?\00\e0Q\13\e3\13\d7\bf}\8c\13\1f\a6\d1\f6?\00x(8[\b8\d6\bf\d1\b4\c5\0bI\b1\f6?\00x\80\90U]\d6\bf\ba\0c/3G\91\f6?\00\00\18v\d0\02\d6\bf#B\"\18\9fq\f6?\00\90\90\86\ca\a8\d5\bf\d9\1e\a5\99OR\f6?\00P\03VCO\d5\bf\c4$\8f\aaV3\f6?\00@k\c37\f6\d4\bf\14\dc\9dk\b3\14\f6?\00P\a8\fd\a7\9d\d4\bfL\\\c6Rd\f6\f5?\00\a8\899\92E\d4\bfO,\91\b5g\d8\f5?\00\b8\b09\f4\ed\d3\bf\de\90[\cb\bc\ba\f5?\00p\8fD\ce\96\d3\bfx\1a\d9\f2a\9d\f5?\00\a0\bd\17\1e@\d3\bf\87VF\12V\80\f5?\00\80F\ef\e2\e9\d2\bf\d3k\e7\ce\97c\f5?\00\e008\1b\94\d2\bf\93\7f\a7\e2%G\f5?\00\88\da\8c\c5>\d2\bf\83E\06B\ff*\f5?\00\90\')\e1\e9\d1\bf\df\bd\b2\db\"\0f\f5?\00\f8H+m\95\d1\bf\d7\de4G\8f\f3\f4?\00\f8\b9\9agA\d1\bf@(\de\cfC\d8\f4?\00\98\ef\94\d0\ed\d0\bf\c8\a3x\c0>\bd\f4?\00\10\db\18\a5\9a\d0\bf\8a%\e0\c3\7f\a2\f4?\00\b8cR\e6G\d0\bf4\84\d4$\05\88\f4?\00\f0\86E\"\eb\cf\bf\0b-\19\1b\cem\f4?\00\b0\17uJG\cf\bfT\189\d3\d9S\f4?\000\10=D\a4\ce\bfZ\84\b4D\':\f4?\00\b0\e9D\0d\02\ce\bf\fb\f8\15A\b5 \f4?\00\f0w)\a2`\cd\bf\b1\f4>\da\82\07\f4?\00\90\95\04\01\c0\cc\bf\8f\feW]\8f\ee\f3?\00\10\89V) \cc\bf\e9L\0b\a0\d9\d5\f3?\00\10\81\8d\17\81\cb\bf+\c1\10\c0`\bd\f3?\00\d0\d3\cc\c9\e2\ca\bf\b8\dau+$\a5\f3?\00\90\12.@E\ca\bf\02\d0\9f\cd\"\8d\f3?\00\f0\1dhw\a8\c9\bf\1cz\84\c5[u\f3?\000Him\0c\c9\bf\e26\adI\ce]\f3?\00\c0E\a6 q\c8\bf@\d4M\98yF\f3?\000\14\b4\8f\d6\c7\bf$\cb\ff\ce\\/\f3?\00pb<\b8<\c7\bfI\0d\a1uw\18\f3?\00`7\9b\9a\a3\c6\bf\909>7\c8\01\f3?\00\a0\b7T1\0b\c6\bfA\f8\95\bbN\eb\f2?\000$v}s\c5\bf\d1\a9\19\02\n\d5\f2?\000\c2\8f{\dc\c4\bf*\fd\b7\a8\f9\be\f2?\00\00\d2Q,F\c4\bf\ab\1b\0cz\1c\a9\f2?\00\00\83\bc\8a\b0\c3\bf0\b5\14`r\93\f2?\00\00Ik\99\1b\c3\bf\f5\a1WW\fa}\f2?\00@\a4\90T\87\c2\bf\bf;\1d\9b\b3h\f2?\00\a0y\f8\b9\f3\c1\bf\bd\f5\8f\83\9dS\f2?\00\a0,%\c8`\c1\bf;\08\c9\aa\b7>\f2?\00 \f7W\7f\ce\c0\bf\b6@\a9+\01*\f2?\00\a0\feI\dc<\c0\bf2A\cc\96y\15\f2?\00\80K\bc\bdW\bf\bf\9b\fc\d2\1d \01\f2?\00@@\96\087\be\bf\0bHMI\f4\ec\f1?\00@\f9>\98\17\bd\bfie\8fR\f5\d8\f1?\00\a0\d8Ng\f9\bb\bf|~W\11#\c5\f1?\00`/ y\dc\ba\bf\e9&\cbt|\b1\f1?\00\80(\e7\c3\c0\b9\bf\b6\1a,\0c\01\9e\f1?\00\c0r\b3F\a6\b8\bf\bdp\b6{\b0\8a\f1?\00\00\ac\b3\01\8d\b7\bf\b6\bc\ef%\8aw\f1?\00\008E\f1t\b6\bf\da1L5\8dd\f1?\00\80\87m\0e^\b5\bf\dd_\'\90\b9Q\f1?\00\e0\a1\de\\H\b4\bfL\d22\a4\0e?\f1?\00\a0jM\d93\b3\bf\da\f9\10r\8b,\f1?\00`\c5\f8y \b2\bf1\b5\ec(0\1a\f1?\00 b\98F\0e\b1\bf\af4\84\da\fb\07\f1?\00\00\d2jl\fa\af\bf\b3kN\0f\ee\f5\f0?\00@wJ\8d\da\ad\bf\ce\9f*]\06\e4\f0?\00\00\85\e4\ec\bc\ab\bf!\a5,cD\d2\f0?\00\c0\12@\89\a1\a9\bf\1a\98\e2|\a7\c0\f0?\00\c0\023X\88\a7\bf\d16\c6\83/\af\f0?\00\80\d6g^q\a5\bf9\13\a0\98\db\9d\f0?\00\80eI\8a\\\a3\bf\df\e7R\af\ab\8c\f0?\00@\15d\e3I\a1\bf\fb(N/\9f{\f0?\00\80\eb\82\c0r\9e\bf\19\8f5\8c\b5j\f0?\00\80RR\f1U\9a\bf,\f9\ec\a5\eeY\f0?\00\80\81\cfb=\96\bf\90,\d1\cdII\f0?\00\00\aa\8c\fb(\92\bf\a9\ad\f0\c6\c68\f0?\00\00\f9 {1\8c\bf\a92y\13e(\f0?\00\00\aa]5\19\84\bfHs\ea\'$\18\f0?\00\00\ec\c2\03\12x\bf\95\b1\14\06\04\08\f0?\00\00$y\t\04`\bf\1a\fa&\f7\1f\e0\ef?\00\00\90\84\f3\efo?t\eaa\c2\1c\a1\ef?\00\00=5A\dc\87?.\99\81\b0\10c\ef?\00\80\c2\c4\a3\ce\93?\cd\ad\ee<\f6%\ef?\00\00\89\14\c1\9f\9b?\e7\13\91\03\c8\e9\ee?\00\00\11\ce\d8\b0\a1?\ab\b1\cbx\80\ae\ee?\00\c0\01\d0[\8a\a5?\9b\0c\9d\a2\1at\ee?\00\80\d8@\83\\\a9?\b5\99\n\83\91:\ee?\00\80W\efj\'\ad?V\9a`\t\e0\01\ee?\00\c0\98\e5\98u\b0?\98\bbw\e5\01\ca\ed?\00 \0d\e3\f5S\b2?\03\91|\0b\f2\92\ed?\00\008\8b\dd.\b4?\ce\\\fbf\ac\\\ed?\00\c0W\87Y\06\b6?\9d\de^\aa,\'\ed?\00\00j5v\da\b7?\cd,k>n\f2\ec?\00`\1cNC\ab\b9?\02y\a7\a2m\be\ec?\00`\0d\bb\c7x\bb?m\087m&\8b\ec?\00 \e72\13C\bd?\04X]\bd\94X\ec?\00`\deq1\n\bf?\8c\9f\bb3\b5&\ec?\00@\91+\15g\c0??\e7\ec\ee\83\f5\eb?\00\b0\92\82\85G\c1?\c1\96\dbu\fd\c4\eb?\000\ca\cdn&\c2?(J\86\0c\1e\95\eb?\00P\c5\a6\d7\03\c3?,>\ef\c5\e2e\eb?\00\103<\c3\df\c3?\8b\88\c9gH7\eb?\00\80zk6\ba\c4?J0\1d!K\t\eb?\00\f0\d1(9\93\c5?~\ef\f2\85\e8\db\ea?\00\f0\18$\cdj\c6?\a2=`1\1d\af\ea?\00\90f\ec\f8@\c7?\a7X\d3?\e6\82\ea?\00\f0\1a\f5\c0\15\c8?\8bs\t\ef@W\ea?\00\80\f6T)\e9\c8?\'K\ab\90*,\ea?\00@\f8\026\bb\c9?\d1\f2\93\13\a0\01\ea?\00\00,\1c\ed\8b\ca?\1b<\db$\9f\d7\e9?\00\d0\01\\Q[\cb?\90\b1\c7\05%\ae\e9?\00\c0\bc\ccg)\cc?/\ce\97\f2.\85\e9?\00`H\d55\f6\cc?uK\a4\ee\ba\\\e9?\00\c0F4\bd\c1\cd?8H\e7\9d\c64\e9?\00\e0\cf\b8\01\8c\ce?\e6Rg/O\0d\e9?\00\90\17\c0\tU\cf?\9d\d7\ff\8eR\e6\e8?\00\b8\1f\12l\0e\d0?|\00\cc\9f\ce\bf\e8?\00\d0\93\0e\b8q\d0?\0e\c3\be\da\c0\99\e8?\00p\86\9ek\d4\d0?\fb\17#\aa\'t\e8?\00\d0K3\876\d1?\08\9a\b3\ac\00O\e8?\00H#g\0d\98\d1?U>e\e8I*\e8?\00\80\cc\e0\ff\f8\d1?`\02\f4\95\01\06\e8?\00hc\d7_Y\d2?)\a3\e0c%\e2\e7?\00\a8\14\t0\b9\d2?\ad\b5\dcw\b3\be\e7?\00`C\10r\18\d3?\c2%\97g\aa\9b\e7?\00\18\ecm&w\d3?W\06\17\f2\07y\e7?\000\af\fbO\d5\d3?\0c\13\d6\db\caV\e7?\00\e0/\e3\ee2\d4?") - (data (i32.const 9696) "k\b6O\01\00\10\e6?<[B\91l\02~<\95\b4M\03\000\e6?A]\00H\ea\bf\8d\f6\05\eb\ff\ef\e6?S-\e2\1a\04\80~\bc\80\97\86\0e\00\10\e7?Ry\tqf\ff{<\12\e9g\fc\ff/\e7?$\87\bd&\e2\00\8c\89<\b9{F\13\000\e9?v\02\98KN\80\7f.\98\dd\ff\af\e9?7\93Z\8a\e0@\87\bcf\fbI\ed\ff\cf\e9?\00\e0\9b\c1\08\ce?O*\00\b0\ea?_?\ff<\04\fdi\bc\d1\1e\ae\d7\ff\cf\ea?\b4p\90\12\e7>\82\bcx\04Q\ee\ff\ef\ea?\a3\de\0e\e0>\06j<[\0de\db\ff\0f\eb?\b9\n\1f8\c8\06ZO\86\d0E\ff\8a<@\16\87\f9\ff\8f\eb?\f9\c3\c2\96w\fe|\f0\0f\00\f0\f4?\1cS\85\0b\89\7f\97<\d1K\dc\12\00\10\f5?6\a4fqe\04`\c9\03\00\b0\f5?\c0\0c\bf\n\08A\9f\bc\bc\19I\1d\00\d0\f5?)G%\fb*\81\98\bc\89z\b8\e7\ff\ef\f5?\04i\ed\80\b7~\94\bc") + (data (i32.const 5448) "\01\00\00\00\n\00\00\00m\00a\00t\004\00(") + (data (i32.const 5486) "\f0?n\bf\88\1aO;\9b<53\fb\a9=\f6\ef?]\dc\d8\9c\13`q\bca\80w>\9a\ec\ef?\d1f\87\10z^\90\bc\85\7fn\e8\15\e3\ef?\13\f6g5R\d2\8c\be\ef?m{\83]\a6\9a\97<\0f\89\f9lX\b5\ef?\fc\ef\fd\92\1a\b5\8e<\f7Gr+\92\ac\ef?\d1\9c/p=\be><\a2\d1\d32\ec\a3\ef?\0bn\90\894\03j\bc\1b\d3\fe\aff\9b\ef?\0e\bd/*RV\95\bcQ[\12\d0\01\93\ef?U\eaN\8c\ef\80P\bc\cc1l\c0\bd\8a\ef?\16\f4\d5\b9#\c9\91\bc\e0-\a9\ae\9a\82\ef?\afU\\\e9\e3\d3\80\f7\ec\9a<\aa\b9h1\87T\ef?\9d8\86\cb\82\e7\8f\bc\1d\d9\fc\"PM\ef?\8d\c3\a6DAo\8a<\d6\8cb\88;F\ef?}\04\e4\b0\05z\80<\96\dc}\91I?\ef?\94\a8\a8\e3\fd\8e\96<8bunz8\ef?}Ht\f2\18^\87\a9\af\0c\ef?\b6\ab\b0MuM\83<\15\b71\n\fe\06\ef?Lt\ac\e2\01B\86<1\d8L\fcp\01\ef?J\f8\d3]9\dd\8f<\ff\16d\b2\08\fc\ee?\04[\8e;\80\a3\86\bc\f1\9f\92_\c5\f6\ee?hPK\cc\edJ\92\bc\cb\a9:7\a7\f1\ee?\8e-Q\1b\f8\07\99\bcf\d8\05m\ae\ec\ee?\d26\94>\e8\d1q\bc\f7\9f\e54\db\e7\ee?\15\1b\ce\b3\19\19\99\bc\e5\a8\13\c3-\e3\ee?mL*\a7H\9f\85<\"4\12L\a6\de\ee?\8ai(z`\12\93\bc\1c\80\ac\04E\da\ee?[\89\17H\8f\a7X\bc*.\f7!\n\d6\ee?\1b\9aIg\9b,|\bc\97\a8P\d9\f5\d1\ee?\11\ac\c2`\edcC<-\89a`\08\ce\ee?\efd\06;\tf\96Z~d\1fx\bct_\ec\e8u\9f\ee?\b0}\8b\c0J\ee\86\bct\81\a5H\9a\9f\ee?\8a\e6U\1e2\19\86\bc\c9gBV\eb\9f\ee?\d3\d4\t^\cb\9c\90T\'\a4\ee?47;\f1\b6i\93\bc\13\ceL\99\89\a5\ee?\1e\ff\19:\84^\80\bc\ad\c7#F\1a\a7\ee?nWr\d8P\d4\94\bc\ed\92D\9b\d9\a8\ee?\00\8a\0e[g\ad\90<\99f\8a\d9\c7\aa\ee?\b4\ea\f0\c1/\b7\8d<\db\a0*B\e5\ac\ee?\ff\e7\c5\9c`\b6e\bc\8cD\b5\162\af\ee?D_\f3Y\83\f6{<6w\15\99\ae\b1\ee?\83=\1e\a7\1f\t\93\bc\c6\ff\91\0b[\b4\ee?)\1el\8b\b8\a9]\bc\e5\c5\cd\b07\b7\ee?Y\b9\90|\f9#l\bc\0fR\c8\cbD\ba\ee?\aa\f9\f4\"CC\92\bcPN\de\9f\82\bd\ee?K\8ef\d7l\ca\85\bc\ba\07\cap\f1\c0\ee?\'\ce\91+\fc\afq<\90\f0\a3\82\91\c4\ee?\bbs\n\e15\d2m<##\e3\19c\c8\ee?c\"b\"\04\c5\87\bce\e5]{f\cc\ee?\d51\e2\e3\86\1c\8b<3-J\ec\9b\d0\ee?\15\bb\bc\d3\d1\bb\91\bc]%>\b2\03\d5\ee?\d21\ee\9c1\cc\90\b4\07!\d5\82\bc_\9b{3\97|\ef?\c9\0dG;\b9*\89\bc)\a1\f5\14F\86\ef?\d3\88:`\04\b6t<\f6?\8b\e7.\90\ef?qr\9dQ\ec\c5\83<\83L\c7\fbQ\9a\ef?\f0\91\d3\8f\12\f7\8f\bc\da\90\a4\a2\af\a4\ef?}t#\e2\98\ae\8d\bc\f1g\8e-H\af\ef?\08 \aaA\bc\c3\8e<\'Za\ee\1b\ba\ef?2\eb\a9\c3\94+\84<\97\bak7+\c5\ef?\ee\85\d11\a9d\8a<@En[v\d0\ef?\ed\e3;\e4\ba7\8e\bc\14\be\9c\ad\fd\db\ef?\9d\cd\91M;\89w<\d8\90\9e\81\c1\e7\ef?\89\cc`A\c1\05S<\f1q\8f+\c2\f3\ef?") + (data (i32.const 7520) "\9f\de\e0\c3\f04\f7?\00\90\e6y\7f\cc\d7\bf\1f\e9,jx\13\f7?\00\00\0d\c2\eeo\d7\bf\a0\b5\fa\08`\f2\f6?\00\e0Q\13\e3\13\d7\bf}\8c\13\1f\a6\d1\f6?\00x(8[\b8\d6\bf\d1\b4\c5\0bI\b1\f6?\00x\80\90U]\d6\bf\ba\0c/3G\91\f6?\00\00\18v\d0\02\d6\bf#B\"\18\9fq\f6?\00\90\90\86\ca\a8\d5\bf\d9\1e\a5\99OR\f6?\00P\03VCO\d5\bf\c4$\8f\aaV3\f6?\00@k\c37\f6\d4\bf\14\dc\9dk\b3\14\f6?\00P\a8\fd\a7\9d\d4\bfL\\\c6Rd\f6\f5?\00\a8\899\92E\d4\bfO,\91\b5g\d8\f5?\00\b8\b09\f4\ed\d3\bf\de\90[\cb\bc\ba\f5?\00p\8fD\ce\96\d3\bfx\1a\d9\f2a\9d\f5?\00\a0\bd\17\1e@\d3\bf\87VF\12V\80\f5?\00\80F\ef\e2\e9\d2\bf\d3k\e7\ce\97c\f5?\00\e008\1b\94\d2\bf\93\7f\a7\e2%G\f5?\00\88\da\8c\c5>\d2\bf\83E\06B\ff*\f5?\00\90\')\e1\e9\d1\bf\df\bd\b2\db\"\0f\f5?\00\f8H+m\95\d1\bf\d7\de4G\8f\f3\f4?\00\f8\b9\9agA\d1\bf@(\de\cfC\d8\f4?\00\98\ef\94\d0\ed\d0\bf\c8\a3x\c0>\bd\f4?\00\10\db\18\a5\9a\d0\bf\8a%\e0\c3\7f\a2\f4?\00\b8cR\e6G\d0\bf4\84\d4$\05\88\f4?\00\f0\86E\"\eb\cf\bf\0b-\19\1b\cem\f4?\00\b0\17uJG\cf\bfT\189\d3\d9S\f4?\000\10=D\a4\ce\bfZ\84\b4D\':\f4?\00\b0\e9D\0d\02\ce\bf\fb\f8\15A\b5 \f4?\00\f0w)\a2`\cd\bf\b1\f4>\da\82\07\f4?\00\90\95\04\01\c0\cc\bf\8f\feW]\8f\ee\f3?\00\10\89V) \cc\bf\e9L\0b\a0\d9\d5\f3?\00\10\81\8d\17\81\cb\bf+\c1\10\c0`\bd\f3?\00\d0\d3\cc\c9\e2\ca\bf\b8\dau+$\a5\f3?\00\90\12.@E\ca\bf\02\d0\9f\cd\"\8d\f3?\00\f0\1dhw\a8\c9\bf\1cz\84\c5[u\f3?\000Him\0c\c9\bf\e26\adI\ce]\f3?\00\c0E\a6 q\c8\bf@\d4M\98yF\f3?\000\14\b4\8f\d6\c7\bf$\cb\ff\ce\\/\f3?\00pb<\b8<\c7\bfI\0d\a1uw\18\f3?\00`7\9b\9a\a3\c6\bf\909>7\c8\01\f3?\00\a0\b7T1\0b\c6\bfA\f8\95\bbN\eb\f2?\000$v}s\c5\bf\d1\a9\19\02\n\d5\f2?\000\c2\8f{\dc\c4\bf*\fd\b7\a8\f9\be\f2?\00\00\d2Q,F\c4\bf\ab\1b\0cz\1c\a9\f2?\00\00\83\bc\8a\b0\c3\bf0\b5\14`r\93\f2?\00\00Ik\99\1b\c3\bf\f5\a1WW\fa}\f2?\00@\a4\90T\87\c2\bf\bf;\1d\9b\b3h\f2?\00\a0y\f8\b9\f3\c1\bf\bd\f5\8f\83\9dS\f2?\00\a0,%\c8`\c1\bf;\08\c9\aa\b7>\f2?\00 \f7W\7f\ce\c0\bf\b6@\a9+\01*\f2?\00\a0\feI\dc<\c0\bf2A\cc\96y\15\f2?\00\80K\bc\bdW\bf\bf\9b\fc\d2\1d \01\f2?\00@@\96\087\be\bf\0bHMI\f4\ec\f1?\00@\f9>\98\17\bd\bfie\8fR\f5\d8\f1?\00\a0\d8Ng\f9\bb\bf|~W\11#\c5\f1?\00`/ y\dc\ba\bf\e9&\cbt|\b1\f1?\00\80(\e7\c3\c0\b9\bf\b6\1a,\0c\01\9e\f1?\00\c0r\b3F\a6\b8\bf\bdp\b6{\b0\8a\f1?\00\00\ac\b3\01\8d\b7\bf\b6\bc\ef%\8aw\f1?\00\008E\f1t\b6\bf\da1L5\8dd\f1?\00\80\87m\0e^\b5\bf\dd_\'\90\b9Q\f1?\00\e0\a1\de\\H\b4\bfL\d22\a4\0e?\f1?\00\a0jM\d93\b3\bf\da\f9\10r\8b,\f1?\00`\c5\f8y \b2\bf1\b5\ec(0\1a\f1?\00 b\98F\0e\b1\bf\af4\84\da\fb\07\f1?\00\00\d2jl\fa\af\bf\b3kN\0f\ee\f5\f0?\00@wJ\8d\da\ad\bf\ce\9f*]\06\e4\f0?\00\00\85\e4\ec\bc\ab\bf!\a5,cD\d2\f0?\00\c0\12@\89\a1\a9\bf\1a\98\e2|\a7\c0\f0?\00\c0\023X\88\a7\bf\d16\c6\83/\af\f0?\00\80\d6g^q\a5\bf9\13\a0\98\db\9d\f0?\00\80eI\8a\\\a3\bf\df\e7R\af\ab\8c\f0?\00@\15d\e3I\a1\bf\fb(N/\9f{\f0?\00\80\eb\82\c0r\9e\bf\19\8f5\8c\b5j\f0?\00\80RR\f1U\9a\bf,\f9\ec\a5\eeY\f0?\00\80\81\cfb=\96\bf\90,\d1\cdII\f0?\00\00\aa\8c\fb(\92\bf\a9\ad\f0\c6\c68\f0?\00\00\f9 {1\8c\bf\a92y\13e(\f0?\00\00\aa]5\19\84\bfHs\ea\'$\18\f0?\00\00\ec\c2\03\12x\bf\95\b1\14\06\04\08\f0?\00\00$y\t\04`\bf\1a\fa&\f7\1f\e0\ef?\00\00\90\84\f3\efo?t\eaa\c2\1c\a1\ef?\00\00=5A\dc\87?.\99\81\b0\10c\ef?\00\80\c2\c4\a3\ce\93?\cd\ad\ee<\f6%\ef?\00\00\89\14\c1\9f\9b?\e7\13\91\03\c8\e9\ee?\00\00\11\ce\d8\b0\a1?\ab\b1\cbx\80\ae\ee?\00\c0\01\d0[\8a\a5?\9b\0c\9d\a2\1at\ee?\00\80\d8@\83\\\a9?\b5\99\n\83\91:\ee?\00\80W\efj\'\ad?V\9a`\t\e0\01\ee?\00\c0\98\e5\98u\b0?\98\bbw\e5\01\ca\ed?\00 \0d\e3\f5S\b2?\03\91|\0b\f2\92\ed?\00\008\8b\dd.\b4?\ce\\\fbf\ac\\\ed?\00\c0W\87Y\06\b6?\9d\de^\aa,\'\ed?\00\00j5v\da\b7?\cd,k>n\f2\ec?\00`\1cNC\ab\b9?\02y\a7\a2m\be\ec?\00`\0d\bb\c7x\bb?m\087m&\8b\ec?\00 \e72\13C\bd?\04X]\bd\94X\ec?\00`\deq1\n\bf?\8c\9f\bb3\b5&\ec?\00@\91+\15g\c0??\e7\ec\ee\83\f5\eb?\00\b0\92\82\85G\c1?\c1\96\dbu\fd\c4\eb?\000\ca\cdn&\c2?(J\86\0c\1e\95\eb?\00P\c5\a6\d7\03\c3?,>\ef\c5\e2e\eb?\00\103<\c3\df\c3?\8b\88\c9gH7\eb?\00\80zk6\ba\c4?J0\1d!K\t\eb?\00\f0\d1(9\93\c5?~\ef\f2\85\e8\db\ea?\00\f0\18$\cdj\c6?\a2=`1\1d\af\ea?\00\90f\ec\f8@\c7?\a7X\d3?\e6\82\ea?\00\f0\1a\f5\c0\15\c8?\8bs\t\ef@W\ea?\00\80\f6T)\e9\c8?\'K\ab\90*,\ea?\00@\f8\026\bb\c9?\d1\f2\93\13\a0\01\ea?\00\00,\1c\ed\8b\ca?\1b<\db$\9f\d7\e9?\00\d0\01\\Q[\cb?\90\b1\c7\05%\ae\e9?\00\c0\bc\ccg)\cc?/\ce\97\f2.\85\e9?\00`H\d55\f6\cc?uK\a4\ee\ba\\\e9?\00\c0F4\bd\c1\cd?8H\e7\9d\c64\e9?\00\e0\cf\b8\01\8c\ce?\e6Rg/O\0d\e9?\00\90\17\c0\tU\cf?\9d\d7\ff\8eR\e6\e8?\00\b8\1f\12l\0e\d0?|\00\cc\9f\ce\bf\e8?\00\d0\93\0e\b8q\d0?\0e\c3\be\da\c0\99\e8?\00p\86\9ek\d4\d0?\fb\17#\aa\'t\e8?\00\d0K3\876\d1?\08\9a\b3\ac\00O\e8?\00H#g\0d\98\d1?U>e\e8I*\e8?\00\80\cc\e0\ff\f8\d1?`\02\f4\95\01\06\e8?\00hc\d7_Y\d2?)\a3\e0c%\e2\e7?\00\a8\14\t0\b9\d2?\ad\b5\dcw\b3\be\e7?\00`C\10r\18\d3?\c2%\97g\aa\9b\e7?\00\18\ecm&w\d3?W\06\17\f2\07y\e7?\000\af\fbO\d5\d3?\0c\13\d6\db\caV\e7?\00\e0/\e3\ee2\d4?") + (data (i32.const 9568) "k\b6O\01\00\10\e6?<[B\91l\02~<\95\b4M\03\000\e6?A]\00H\ea\bf\8d\f6\05\eb\ff\ef\e6?S-\e2\1a\04\80~\bc\80\97\86\0e\00\10\e7?Ry\tqf\ff{<\12\e9g\fc\ff/\e7?$\87\bd&\e2\00\8c\89<\b9{F\13\000\e9?v\02\98KN\80\7f.\98\dd\ff\af\e9?7\93Z\8a\e0@\87\bcf\fbI\ed\ff\cf\e9?\00\e0\9b\c1\08\ce?O*\00\b0\ea?_?\ff<\04\fdi\bc\d1\1e\ae\d7\ff\cf\ea?\b4p\90\12\e7>\82\bcx\04Q\ee\ff\ef\ea?\a3\de\0e\e0>\06j<[\0de\db\ff\0f\eb?\b9\n\1f8\c8\06ZO\86\d0E\ff\8a<@\16\87\f9\ff\8f\eb?\f9\c3\c2\96w\fe|\f0\0f\00\f0\f4?\1cS\85\0b\89\7f\97<\d1K\dc\12\00\10\f5?6\a4fqe\04`\c9\03\00\b0\f5?\c0\0c\bf\n\08A\9f\bc\bc\19I\1d\00\d0\f5?)G%\fb*\81\98\bc\89z\b8\e7\ff\ef\f5?\04i\ed\80\b7~\94\bc") + (data (i32.const 11628) "\1c") + (data (i32.const 11640) "\01\00\00\00\06\00\00\00x\00y\00z") + (data (i32.const 11660) "\1c") + (data (i32.const 11672) "\01\00\00\00\06\00\00\00x\00z\00y") + (data (i32.const 11692) "\1c") + (data (i32.const 11704) "\01\00\00\00\06\00\00\00y\00x\00z") + (data (i32.const 11724) "\1c") + (data (i32.const 11736) "\01\00\00\00\06\00\00\00y\00z\00x") (data (i32.const 11756) "\1c") - (data (i32.const 11768) "\01\00\00\00\06\00\00\00x\00y\00z") - (data (i32.const 11788) "\1c") - (data (i32.const 11800) "\01\00\00\00\06\00\00\00x\00z\00y") - (data (i32.const 11820) "\1c") - (data (i32.const 11832) "\01\00\00\00\06\00\00\00y\00x\00z") - (data (i32.const 11852) "\1c") - (data (i32.const 11864) "\01\00\00\00\06\00\00\00y\00z\00x") - (data (i32.const 11884) "\1c") - (data (i32.const 11896) "\01\00\00\00\06\00\00\00z\00x\00y") - (data (i32.const 11916) "<") - (data (i32.const 11928) "\01\00\00\00(\00\00\00U\00n\00k\00n\00o\00w\00n\00 \00a\00n\00g\00l\00e\00 \00o\00r\00d\00e\00r\00 ") - (data (i32.const 11980) "<") - (data (i32.const 11992) "\01\00\00\00 \00\00\00a\00s\00s\00e\00m\00b\00l\00y\00/\00q\00u\00a\00t\00.\00t\00s") + (data (i32.const 11768) "\01\00\00\00\06\00\00\00z\00x\00y") + (data (i32.const 11788) "<") + (data (i32.const 11800) "\01\00\00\00(\00\00\00U\00n\00k\00n\00o\00w\00n\00 \00a\00n\00g\00l\00e\00 \00o\00r\00d\00e\00r\00 ") + (data (i32.const 11852) "<") + (data (i32.const 11864) "\01\00\00\00 \00\00\00a\00s\00s\00e\00m\00b\00l\00y\00/\00q\00u\00a\00t\00.\00t\00s") + (data (i32.const 11916) "\1c") + (data (i32.const 11928) "\01\00\00\00\n\00\00\00q\00u\00a\00t\00(") + (data (i32.const 11948) "\1c") + (data (i32.const 11960) "\01\00\00\00\0c\00\00\00q\00u\00a\00t\002\00(") + (data (i32.const 11980) "\1c") + (data (i32.const 11992) "\01\00\00\00\n\00\00\00v\00e\00c\002\00(") + (data (i32.const 12012) "\1c") (data (i32.const 12044) "\1c") - (data (i32.const 12056) "\01\00\00\00\n\00\00\00q\00u\00a\00t\00(") - (data (i32.const 12076) "\1c") - (data (i32.const 12088) "\01\00\00\00\0c\00\00\00q\00u\00a\00t\002\00(") - (data (i32.const 12108) "\1c") - (data (i32.const 12120) "\01\00\00\00\n\00\00\00v\00e\00c\002\00(") - (data (i32.const 12140) "\1c") - (data (i32.const 12172) "\1c") - (data (i32.const 12204) ",") - (data (i32.const 12216) "\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 12076) ",") + (data (i32.const 12088) "\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 12124) "\1c") + (data (i32.const 12156) "\1c") + (data (i32.const 12188) "\1c") + (data (i32.const 12220) "\1c") (data (i32.const 12252) "\1c") + (data (i32.const 12264) "\01\00\00\00\n\00\00\00v\00e\00c\003\00(") (data (i32.const 12284) "\1c") - (data (i32.const 12316) "\1c") - (data (i32.const 12348) "\1c") - (data (i32.const 12380) "\1c") - (data (i32.const 12392) "\01\00\00\00\n\00\00\00v\00e\00c\003\00(") - (data (i32.const 12412) "\1c") - (data (i32.const 12424) "\01\00\00\00\n\00\00\00v\00e\00c\004\00(") - (data (i32.const 12448) "\1e\00\00\00 \00\00\00\00\00\00\00 ") - (data (i32.const 12484) "\01\1a\00\00\02") - (data (i32.const 12524) " ") - (data (i32.const 12652) " \00\00\00\00\00\00\00\02A\00\00\00\00\00\00\02\t\00\00\00\00\00\00 \00\00\00\00\00\00\00\02\1a") + (data (i32.const 12296) "\01\00\00\00\n\00\00\00v\00e\00c\004\00(") + (data (i32.const 12316) "<") + (data (i32.const 12328) "\01\00\00\00*\00\00\00O\00b\00j\00e\00c\00t\00 \00a\00l\00r\00e\00a\00d\00y\00 \00p\00i\00n\00n\00e\00d") + (data (i32.const 12380) "<") + (data (i32.const 12392) "\01\00\00\00(\00\00\00O\00b\00j\00e\00c\00t\00 \00i\00s\00 \00n\00o\00t\00 \00p\00i\00n\00n\00e\00d") + (data (i32.const 12448) "\1d\00\00\00 \00\00\00\00\00\00\00 ") + (data (i32.const 12476) "\01\1a\00\00\02\00\00\00\02\1a") + (data (i32.const 12532) " ") + (data (i32.const 12660) "\02A\00\00\00\00\00\00\02\t\00\00\00\00\00\00 ") (table $0 58 funcref) (elem (i32.const 1) $~lib/math/NativeMath.random $assembly/mat2d/multiply $assembly/mat2d/subtract $assembly/vec3/subtract $assembly/vec3/multiply $assembly/vec3/divide $~lib/math/NativeMath.hypot $assembly/vec3/distance $assembly/vec3/squaredDistance $assembly/vec3/length $assembly/vec3/squaredLength $start:assembly/vec3~anonymous|0~anonymous|0 $start:assembly/vec3~anonymous|0 $assembly/vec4/subtract $assembly/vec4/multiply $assembly/vec4/divide $assembly/vec4/distance $assembly/vec4/squaredDistance $assembly/vec4/length $assembly/vec4/squaredLength $start:assembly/vec4~anonymous|0~anonymous|0 $start:assembly/vec4~anonymous|0 $assembly/vec4/clone $assembly/vec4/fromValues $assembly/vec4/copy $assembly/vec4/set $assembly/vec4/add $assembly/quat/multiply $assembly/vec4/scale $assembly/vec4/dot $assembly/vec4/lerp $assembly/vec4/normalize $assembly/vec4/exactEquals $start:assembly/quat~anonymous|0~anonymous|0 $start:assembly/quat~anonymous|0 $start:assembly/quat~anonymous|1~anonymous|0 $start:assembly/quat~anonymous|1 $start:assembly/quat~anonymous|2~anonymous|0 $start:assembly/quat~anonymous|2 $assembly/quat2/multiply $assembly/mat4/perspectiveNO $assembly/mat4/orthoNO $assembly/mat4/multiply $assembly/mat4/subtract $assembly/mat3/multiply $assembly/mat3/subtract $assembly/vec2/length $assembly/vec2/subtract $assembly/vec2/multiply $assembly/vec2/divide $assembly/vec2/distance $assembly/vec2/squaredDistance $assembly/vec2/squaredLength $start:assembly/vec2~anonymous|0~anonymous|0 $start:assembly/vec2~anonymous|0 $assembly/mat2/multiply $assembly/vec4/subtract) (global $assembly/common/EPSILON f64 (f64.const 1e-06)) + (global $assembly/common/ArrayTypeEnum.Float64ArrayT i32 (i32.const 3)) + (global $assembly/common/ArrayTypeEnum.ArrayF64T i32 (i32.const 4)) + (global $assembly/common/ARRAY_TYPE (mut i32) (i32.const 0)) (global $~lib/math/random_seeded (mut i32) (i32.const 0)) (global $~lib/math/random_state0_64 (mut i64) (i64.const 0)) (global $~lib/math/random_state1_64 (mut i64) (i64.const 0)) @@ -350,10 +353,15 @@ (global $~lib/util/number/_frc_pow (mut i64) (i64.const 0)) (global $~lib/util/number/_exp_pow (mut i32) (i32.const 0)) (global $assembly/mat4/Fov i32 (i32.const 28)) - (global $~lib/memory/__stack_pointer (mut i32) (i32.const 29076)) + (global $~lib/rt/__rtti_base i32 (i32.const 12448)) + (global $~lib/memory/__stack_pointer (mut i32) (i32.const 29068)) (export "glMatrix.EPSILON" (global $assembly/common/EPSILON)) + (export "glMatrix.ArrayTypeEnum.Float64ArrayT" (global $assembly/common/ArrayTypeEnum.Float64ArrayT)) + (export "glMatrix.ArrayTypeEnum.ArrayF64T" (global $assembly/common/ArrayTypeEnum.ArrayF64T)) + (export "glMatrix.ARRAY_TYPE" (global $assembly/common/ARRAY_TYPE)) (export "glMatrix.RANDOM" (global $assembly/common/RANDOM)) (export "glMatrix.ANGLE_ORDER" (global $assembly/common/ANGLE_ORDER)) + (export "glMatrix.setMatrixArrayType" (func $assembly/common/setMatrixArrayType)) (export "glMatrix.toRadian" (func $assembly/common/toRadian)) (export "glMatrix.equals" (func $assembly/common/equals)) (export "mat2.create" (func $assembly/mat2/create)) @@ -435,9 +443,13 @@ (export "vec4.len" (global $assembly/vec4/len)) (export "vec4.sqrLen" (global $assembly/vec4/sqrLen)) (export "vec4.forEach" (global $assembly/vec4/forEach)) + (export "__new" (func $~lib/rt/itcms/__new)) + (export "__pin" (func $~lib/rt/itcms/__pin)) + (export "__unpin" (func $~lib/rt/itcms/__unpin)) + (export "__collect" (func $~lib/rt/itcms/__collect)) + (export "__rtti_base" (global $~lib/rt/__rtti_base)) (export "memory" (memory $0)) (export "__setArgumentsLength" (func $~setArgumentsLength)) - (export "glMatrix.setMatrixArrayType" (func $export:assembly/common/setMatrixArrayType)) (export "mat2.clone" (func $export:assembly/mat2/clone)) (export "mat2.copy" (func $export:assembly/mat2/copy)) (export "mat2.identity" (func $export:assembly/mat2/identity)) @@ -1504,6 +1516,10 @@ call $~lib/rt/itcms/__visit i32.const 1680 call $~lib/rt/itcms/__visit + i32.const 12336 + call $~lib/rt/itcms/__visit + i32.const 12400 + call $~lib/rt/itcms/__visit global.get $assembly/common/ANGLE_ORDER local.tee $0 if @@ -1608,7 +1624,7 @@ i32.load offset=4 i32.const -4 i32.and - local.tee $1 + local.tee $2 i32.eqz if local.get $0 @@ -1616,14 +1632,14 @@ drop br $__inlined_func$~lib/rt/itcms/Object#unlink end - local.get $1 + local.get $2 local.get $0 i32.load offset=8 - local.tee $2 + local.tee $1 i32.store offset=8 - local.get $2 local.get $1 local.get $2 + local.get $1 i32.load offset=4 i32.const 3 i32.and @@ -2094,10 +2110,10 @@ if unreachable end - i32.const 29088 + i32.const 29072 i32.const 0 i32.store - i32.const 30656 + i32.const 30640 i32.const 0 i32.store loop $for-loop|0 @@ -2108,7 +2124,7 @@ local.get $1 i32.const 2 i32.shl - i32.const 29088 + i32.const 29072 i32.add i32.const 0 i32.store offset=4 @@ -2126,7 +2142,7 @@ i32.add i32.const 2 i32.shl - i32.const 29088 + i32.const 29072 i32.add i32.const 0 i32.store offset=96 @@ -2144,13 +2160,13 @@ br $for-loop|0 end end - i32.const 29088 - i32.const 30660 + i32.const 29072 + i32.const 30644 memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory - i32.const 29088 + i32.const 29072 global.set $~lib/rt/tlsf/ROOT ) (func $~lib/rt/itcms/step (result i32) @@ -2233,7 +2249,7 @@ local.set $0 loop $while-continue|0 local.get $0 - i32.const 29076 + i32.const 29068 i32.lt_u if local.get $0 @@ -2316,7 +2332,7 @@ i32.load offset=4 drop local.get $0 - i32.const 29076 + i32.const 29068 i32.lt_u if local.get $0 @@ -2339,7 +2355,7 @@ i32.const 4 i32.add local.tee $0 - i32.const 29076 + i32.const 29068 i32.ge_u if global.get $~lib/rt/tlsf/ROOT @@ -7738,6 +7754,10 @@ call $~lib/typedarray/Float64Array#__set local.get $0 ) + (func $assembly/common/setMatrixArrayType (param $0 i32) + local.get $0 + global.set $assembly/common/ARRAY_TYPE + ) (func $assembly/common/toRadian (param $0 f64) (result f64) local.get $0 f64.const 0.017453292519943295 @@ -7966,7 +7986,7 @@ local.get $5 i32.const 1 i32.shl - i32.const 4032 + i32.const 3904 i32.add local.get $3 i32.const 65535 @@ -8001,7 +8021,7 @@ local.get $7 i32.const 2 i32.shl - i32.const 4960 + i32.const 4832 i32.add i64.load32_u local.get $9 @@ -8011,7 +8031,7 @@ local.get $5 i32.const 1 i32.shl - i32.const 4030 + i32.const 3902 i32.add local.tee $7 i32.load16_u @@ -8091,7 +8111,7 @@ local.get $5 i32.const 1 i32.shl - i32.const 4032 + i32.const 3904 i32.add local.get $6 i32.wrap_i64 @@ -8129,7 +8149,7 @@ i32.sub i32.const 2 i32.shl - i32.const 4960 + i32.const 4832 i32.add i64.load32_u i64.mul @@ -8137,7 +8157,7 @@ local.get $5 i32.const 1 i32.shl - i32.const 4030 + i32.const 3902 i32.add local.tee $7 i32.load16_u @@ -9164,7 +9184,7 @@ i32.div_u i32.const 2 i32.shl - i32.const 5000 + i32.const 4872 i32.add i64.load32_u local.get $3 @@ -9172,7 +9192,7 @@ i32.rem_u i32.const 2 i32.shl - i32.const 5000 + i32.const 4872 i32.add i64.load32_u i64.const 32 @@ -9199,7 +9219,7 @@ i32.rem_u i32.const 2 i32.shl - i32.const 5000 + i32.const 4872 i32.add i32.load i32.store @@ -9222,7 +9242,7 @@ local.get $1 i32.const 2 i32.shl - i32.const 5000 + i32.const 4872 i32.add i32.load i32.store @@ -9598,7 +9618,7 @@ f64.lt local.tee $8 if (result f64) - i32.const 4032 + i32.const 3904 i32.const 45 i32.store16 local.get $0 @@ -9699,14 +9719,14 @@ i32.sub global.set $~lib/util/number/_K local.get $9 - i32.const 4088 + i32.const 3960 i32.add i64.load global.set $~lib/util/number/_frc_pow local.get $5 i32.const 1 i32.shl - i32.const 4784 + i32.const 4656 i32.add i32.load16_s global.set $~lib/util/number/_exp_pow @@ -9738,7 +9758,7 @@ local.get $8 i32.const 1 i32.shl - i32.const 4032 + i32.const 3904 i32.add local.get $2 local.get $1 @@ -9872,11 +9892,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -9894,7 +9914,7 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - i32.const 3888 + i32.const 3760 local.set $1 br $__inlined_func$~lib/util/number/dtoa end @@ -9912,7 +9932,7 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - i32.const 3920 + i32.const 3792 local.set $1 br $__inlined_func$~lib/util/number/dtoa end @@ -9920,8 +9940,8 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - i32.const 3952 - i32.const 4000 + i32.const 3824 + i32.const 3872 local.get $0 f64.const 0 f64.lt @@ -9941,7 +9961,7 @@ local.tee $1 i32.store local.get $1 - i32.const 4032 + i32.const 3904 local.get $2 call $~lib/memory/memory.copy global.get $~lib/memory/__stack_pointer @@ -9960,11 +9980,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -10000,7 +10020,7 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - i32.const 5424 + i32.const 5296 local.set $2 br $__inlined_func$~lib/string/String#concat end @@ -15027,7 +15047,7 @@ i32.wrap_i64 i32.const 3 i32.shl - i32.const 5600 + i32.const 5472 i32.add local.tee $11 i64.load offset=8 @@ -15602,7 +15622,7 @@ i32.const 4 i32.shl local.tee $7 - i32.const 9696 + i32.const 9568 i32.add local.set $4 local.get $1 @@ -15618,7 +15638,7 @@ f64.load offset=8 f64.sub local.get $7 - i32.const 7648 + i32.const 7520 i32.add local.tee $4 f64.load @@ -16436,7 +16456,7 @@ i32.lt_s if i32.const 1120 - i32.const 12224 + i32.const 12096 i32.const 108 i32.const 22 call $~lib/builtins/abort @@ -16459,7 +16479,7 @@ i32.gt_u if i32.const 1568 - i32.const 12224 + i32.const 12096 i32.const 14 i32.const 48 call $~lib/builtins/abort @@ -16554,7 +16574,7 @@ i32.ge_u if i32.const 1120 - i32.const 12224 + i32.const 12096 i32.const 92 i32.const 42 call $~lib/builtins/abort @@ -16568,6 +16588,201 @@ i32.add f64.load ) + (func $~lib/rt/itcms/__pin (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + if + local.get $0 + i32.const 20 + i32.sub + local.tee $1 + i32.load offset=4 + i32.const 3 + i32.and + i32.const 3 + i32.eq + if + i32.const 12336 + i32.const 1744 + i32.const 337 + i32.const 7 + call $~lib/builtins/abort + unreachable + end + block $__inlined_func$~lib/rt/itcms/Object#unlink + local.get $1 + i32.load offset=4 + i32.const -4 + i32.and + local.tee $2 + i32.eqz + if + local.get $1 + i32.load offset=8 + drop + br $__inlined_func$~lib/rt/itcms/Object#unlink + end + local.get $2 + local.get $1 + i32.load offset=8 + local.tee $3 + i32.store offset=8 + local.get $3 + local.get $2 + local.get $3 + i32.load offset=4 + i32.const 3 + i32.and + i32.or + i32.store offset=4 + end + global.get $~lib/rt/itcms/pinSpace + local.tee $3 + i32.load offset=8 + local.set $2 + local.get $1 + local.get $3 + i32.const 3 + i32.or + i32.store offset=4 + local.get $1 + local.get $2 + i32.store offset=8 + local.get $2 + local.get $1 + local.get $2 + i32.load offset=4 + i32.const 3 + i32.and + i32.or + i32.store offset=4 + local.get $3 + local.get $1 + i32.store offset=8 + end + local.get $0 + ) + (func $~lib/rt/itcms/__unpin (param $0 i32) + (local $1 i32) + (local $2 i32) + local.get $0 + i32.eqz + if + return + end + local.get $0 + i32.const 20 + i32.sub + local.tee $0 + i32.load offset=4 + i32.const 3 + i32.and + i32.const 3 + i32.ne + if + i32.const 12400 + i32.const 1744 + i32.const 351 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/rt/itcms/state + i32.const 1 + i32.eq + if + local.get $0 + call $~lib/rt/itcms/Object#makeGray + else + block $__inlined_func$~lib/rt/itcms/Object#unlink + local.get $0 + i32.load offset=4 + i32.const -4 + i32.and + local.tee $1 + i32.eqz + if + local.get $0 + i32.load offset=8 + drop + br $__inlined_func$~lib/rt/itcms/Object#unlink + end + local.get $1 + local.get $0 + i32.load offset=8 + local.tee $2 + i32.store offset=8 + local.get $2 + local.get $1 + local.get $2 + i32.load offset=4 + i32.const 3 + i32.and + i32.or + i32.store offset=4 + end + global.get $~lib/rt/itcms/fromSpace + local.tee $2 + i32.load offset=8 + local.set $1 + local.get $0 + local.get $2 + global.get $~lib/rt/itcms/white + i32.or + i32.store offset=4 + local.get $0 + local.get $1 + i32.store offset=8 + local.get $1 + local.get $0 + local.get $1 + i32.load offset=4 + i32.const 3 + i32.and + i32.or + i32.store offset=4 + local.get $2 + local.get $0 + i32.store offset=8 + end + ) + (func $~lib/rt/itcms/__collect + global.get $~lib/rt/itcms/state + i32.const 0 + i32.gt_s + if + loop $while-continue|0 + global.get $~lib/rt/itcms/state + if + call $~lib/rt/itcms/step + drop + br $while-continue|0 + end + end + end + call $~lib/rt/itcms/step + drop + loop $while-continue|1 + global.get $~lib/rt/itcms/state + if + call $~lib/rt/itcms/step + drop + br $while-continue|1 + end + end + global.get $~lib/rt/itcms/total + i64.extend_i32_u + i64.const 200 + i64.mul + i64.const 100 + i64.div_u + i32.wrap_i64 + i32.const 1024 + i32.add + global.set $~lib/rt/itcms/threshold + ) (func $~lib/rt/__visit_members (param $0 i32) (local $1 i32) (local $2 i32) @@ -16578,17 +16793,14 @@ block $invalid block $assembly/mat4/Fov block $~lib/array/Array<~lib/typedarray/Float64Array> - block $~lib/object/Object - block $assembly/imports/IArguments - block $~lib/string/String - block $~lib/arraybuffer/ArrayBuffer - local.get $0 - i32.const 8 - i32.sub - i32.load - br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $folding-inner2 $folding-inner0 $folding-inner2 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $assembly/imports/IArguments $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $~lib/object/Object $~lib/array/Array<~lib/typedarray/Float64Array> $folding-inner1 $assembly/mat4/Fov $folding-inner1 $invalid - end - return + block $assembly/imports/IArguments + block $~lib/string/String + block $~lib/arraybuffer/ArrayBuffer + local.get $0 + i32.const 8 + i32.sub + i32.load + br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $folding-inner2 $folding-inner2 $folding-inner0 $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner1 $assembly/imports/IArguments $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner1 $~lib/array/Array<~lib/typedarray/Float64Array> $folding-inner0 $assembly/mat4/Fov $invalid end return end @@ -16634,12 +16846,12 @@ unreachable end local.get $0 - i32.load offset=4 + i32.load call $~lib/rt/itcms/__visit return end local.get $0 - i32.load + i32.load offset=4 call $~lib/rt/itcms/__visit return end @@ -16656,10 +16868,12 @@ global.set $~argumentsLength ) (func $~start + i32.const 3 + global.set $assembly/common/ARRAY_TYPE memory.size i32.const 16 i32.shl - i32.const 29076 + i32.const 29068 i32.sub i32.const 1 i32.shr_u @@ -16759,11 +16973,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -16789,16 +17003,14 @@ local.get $6 i32.mul i32.add - local.tee $1 + f64.convert_i32_s local.get $0 i32.load offset=8 i32.const 3 i32.shr_u - local.tee $3 - local.get $1 - local.get $3 - i32.lt_s - select + f64.convert_i32_s + f64.min + i32.trunc_f64_s else local.get $0 i32.load offset=8 @@ -16917,11 +17129,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -16947,16 +17159,14 @@ local.get $6 i32.mul i32.add - local.tee $1 + f64.convert_i32_s local.get $0 i32.load offset=8 i32.const 3 i32.shr_u - local.tee $3 - local.get $1 - local.get $3 - i32.lt_s - select + f64.convert_i32_s + f64.min + i32.trunc_f64_s else local.get $0 i32.load offset=8 @@ -17095,11 +17305,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -17268,11 +17478,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -17339,11 +17549,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -17481,11 +17691,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -17511,16 +17721,14 @@ local.get $6 i32.mul i32.add - local.tee $1 + f64.convert_i32_s local.get $0 i32.load offset=8 i32.const 3 i32.shr_u - local.tee $3 - local.get $1 - local.get $3 - i32.lt_s - select + f64.convert_i32_s + f64.min + i32.trunc_f64_s else local.get $0 i32.load offset=8 @@ -17613,11 +17821,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -17661,7 +17869,7 @@ i64.const 0 i64.store offset=88 local.get $1 - i32.const 5520 + i32.const 5392 i32.store offset=88 local.get $0 i32.const 0 @@ -17671,7 +17879,7 @@ global.get $~lib/memory/__stack_pointer local.get $1 i32.store offset=92 - i32.const 5520 + i32.const 5392 local.get $1 call $~lib/string/String.__concat local.set $1 @@ -17680,10 +17888,10 @@ local.get $1 i32.store offset=80 local.get $2 - i32.const 5456 + i32.const 5328 i32.store offset=84 local.get $1 - i32.const 5456 + i32.const 5328 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -17706,10 +17914,10 @@ local.get $1 i32.store offset=64 local.get $2 - i32.const 5456 + i32.const 5328 i32.store offset=68 local.get $1 - i32.const 5456 + i32.const 5328 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -17732,10 +17940,10 @@ local.get $1 i32.store offset=48 local.get $2 - i32.const 5456 + i32.const 5328 i32.store offset=52 local.get $1 - i32.const 5456 + i32.const 5328 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -17758,10 +17966,10 @@ local.get $1 i32.store offset=32 local.get $2 - i32.const 5456 + i32.const 5328 i32.store offset=36 local.get $1 - i32.const 5456 + i32.const 5328 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -17784,10 +17992,10 @@ local.get $1 i32.store offset=16 local.get $2 - i32.const 5456 + i32.const 5328 i32.store offset=20 local.get $1 - i32.const 5456 + i32.const 5328 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -17810,10 +18018,10 @@ local.get $0 i32.store local.get $1 - i32.const 5488 + i32.const 5360 i32.store offset=4 local.get $0 - i32.const 5488 + i32.const 5360 call $~lib/string/String.__concat global.get $~lib/memory/__stack_pointer i32.const 96 @@ -17828,11 +18036,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -17894,7 +18102,7 @@ i64.const 0 i64.store offset=136 local.get $1 - i32.const 5552 + i32.const 5424 i32.store offset=136 local.get $0 i32.const 0 @@ -17904,7 +18112,7 @@ global.get $~lib/memory/__stack_pointer local.get $1 i32.store offset=140 - i32.const 5552 + i32.const 5424 local.get $1 call $~lib/string/String.__concat local.set $1 @@ -17913,10 +18121,10 @@ local.get $1 i32.store offset=128 local.get $2 - i32.const 5456 + i32.const 5328 i32.store offset=132 local.get $1 - i32.const 5456 + i32.const 5328 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -17939,10 +18147,10 @@ local.get $1 i32.store offset=112 local.get $2 - i32.const 5456 + i32.const 5328 i32.store offset=116 local.get $1 - i32.const 5456 + i32.const 5328 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -17965,10 +18173,10 @@ local.get $1 i32.store offset=96 local.get $2 - i32.const 5456 + i32.const 5328 i32.store offset=100 local.get $1 - i32.const 5456 + i32.const 5328 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -17991,10 +18199,10 @@ local.get $1 i32.store offset=80 local.get $2 - i32.const 5456 + i32.const 5328 i32.store offset=84 local.get $1 - i32.const 5456 + i32.const 5328 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -18017,10 +18225,10 @@ local.get $1 i32.store offset=64 local.get $2 - i32.const 5456 + i32.const 5328 i32.store offset=68 local.get $1 - i32.const 5456 + i32.const 5328 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -18043,10 +18251,10 @@ local.get $1 i32.store offset=48 local.get $2 - i32.const 5456 + i32.const 5328 i32.store offset=52 local.get $1 - i32.const 5456 + i32.const 5328 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -18069,10 +18277,10 @@ local.get $1 i32.store offset=32 local.get $2 - i32.const 5456 + i32.const 5328 i32.store offset=36 local.get $1 - i32.const 5456 + i32.const 5328 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -18095,10 +18303,10 @@ local.get $1 i32.store offset=16 local.get $2 - i32.const 5456 + i32.const 5328 i32.store offset=20 local.get $1 - i32.const 5456 + i32.const 5328 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -18121,10 +18329,10 @@ local.get $0 i32.store local.get $1 - i32.const 5488 + i32.const 5360 i32.store offset=4 local.get $0 - i32.const 5488 + i32.const 5360 call $~lib/string/String.__concat global.get $~lib/memory/__stack_pointer i32.const 144 @@ -18139,11 +18347,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -18247,7 +18455,7 @@ i64.const 0 i64.store offset=248 local.get $1 - i32.const 5584 + i32.const 5456 i32.store offset=248 local.get $0 i32.const 0 @@ -18257,7 +18465,7 @@ global.get $~lib/memory/__stack_pointer local.get $1 i32.store offset=252 - i32.const 5584 + i32.const 5456 local.get $1 call $~lib/string/String.__concat local.set $1 @@ -18266,10 +18474,10 @@ local.get $1 i32.store offset=240 local.get $2 - i32.const 5456 + i32.const 5328 i32.store offset=244 local.get $1 - i32.const 5456 + i32.const 5328 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -18292,10 +18500,10 @@ local.get $1 i32.store offset=224 local.get $2 - i32.const 5456 + i32.const 5328 i32.store offset=228 local.get $1 - i32.const 5456 + i32.const 5328 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -18318,10 +18526,10 @@ local.get $1 i32.store offset=208 local.get $2 - i32.const 5456 + i32.const 5328 i32.store offset=212 local.get $1 - i32.const 5456 + i32.const 5328 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -18344,10 +18552,10 @@ local.get $1 i32.store offset=192 local.get $2 - i32.const 5456 + i32.const 5328 i32.store offset=196 local.get $1 - i32.const 5456 + i32.const 5328 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -18370,10 +18578,10 @@ local.get $1 i32.store offset=176 local.get $2 - i32.const 5456 + i32.const 5328 i32.store offset=180 local.get $1 - i32.const 5456 + i32.const 5328 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -18396,10 +18604,10 @@ local.get $1 i32.store offset=160 local.get $2 - i32.const 5456 + i32.const 5328 i32.store offset=164 local.get $1 - i32.const 5456 + i32.const 5328 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -18422,10 +18630,10 @@ local.get $1 i32.store offset=144 local.get $2 - i32.const 5456 + i32.const 5328 i32.store offset=148 local.get $1 - i32.const 5456 + i32.const 5328 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -18448,10 +18656,10 @@ local.get $1 i32.store offset=128 local.get $2 - i32.const 5456 + i32.const 5328 i32.store offset=132 local.get $1 - i32.const 5456 + i32.const 5328 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -18474,10 +18682,10 @@ local.get $1 i32.store offset=112 local.get $2 - i32.const 5456 + i32.const 5328 i32.store offset=116 local.get $1 - i32.const 5456 + i32.const 5328 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -18500,10 +18708,10 @@ local.get $1 i32.store offset=96 local.get $2 - i32.const 5456 + i32.const 5328 i32.store offset=100 local.get $1 - i32.const 5456 + i32.const 5328 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -18526,10 +18734,10 @@ local.get $1 i32.store offset=80 local.get $2 - i32.const 5456 + i32.const 5328 i32.store offset=84 local.get $1 - i32.const 5456 + i32.const 5328 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -18552,10 +18760,10 @@ local.get $1 i32.store offset=64 local.get $2 - i32.const 5456 + i32.const 5328 i32.store offset=68 local.get $1 - i32.const 5456 + i32.const 5328 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -18578,10 +18786,10 @@ local.get $1 i32.store offset=48 local.get $2 - i32.const 5456 + i32.const 5328 i32.store offset=52 local.get $1 - i32.const 5456 + i32.const 5328 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -18604,10 +18812,10 @@ local.get $1 i32.store offset=32 local.get $2 - i32.const 5456 + i32.const 5328 i32.store offset=36 local.get $1 - i32.const 5456 + i32.const 5328 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -18630,10 +18838,10 @@ local.get $1 i32.store offset=16 local.get $2 - i32.const 5456 + i32.const 5328 i32.store offset=20 local.get $1 - i32.const 5456 + i32.const 5328 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -18656,10 +18864,10 @@ local.get $0 i32.store local.get $1 - i32.const 5488 + i32.const 5360 i32.store offset=4 local.get $0 - i32.const 5488 + i32.const 5360 call $~lib/string/String.__concat global.get $~lib/memory/__stack_pointer i32.const 256 @@ -18677,11 +18885,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -18718,7 +18926,7 @@ call $~lib/math/NativeMath.cos local.set $2 local.get $4 - i32.const 11776 + i32.const 11648 i32.eq if local.get $0 @@ -18775,7 +18983,7 @@ call $~lib/typedarray/Float64Array#__set else local.get $4 - i32.const 11808 + i32.const 11680 i32.eq if local.get $0 @@ -18832,7 +19040,7 @@ call $~lib/typedarray/Float64Array#__set else local.get $4 - i32.const 11840 + i32.const 11712 i32.eq if local.get $0 @@ -18889,7 +19097,7 @@ call $~lib/typedarray/Float64Array#__set else local.get $4 - i32.const 11872 + i32.const 11744 i32.eq if local.get $0 @@ -18946,7 +19154,7 @@ call $~lib/typedarray/Float64Array#__set else local.get $4 - i32.const 11904 + i32.const 11776 i32.eq if local.get $0 @@ -19060,12 +19268,12 @@ call $~lib/typedarray/Float64Array#__set else global.get $~lib/memory/__stack_pointer - i32.const 11936 + i32.const 11808 i32.store - i32.const 11936 + i32.const 11808 local.get $4 call $~lib/string/String.__concat - i32.const 12000 + i32.const 11872 i32.const 512 i32.const 10 call $~lib/builtins/abort @@ -19090,11 +19298,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -19150,7 +19358,7 @@ i64.const 0 i64.store offset=120 local.get $1 - i32.const 12096 + i32.const 11968 i32.store offset=120 local.get $0 i32.const 0 @@ -19160,7 +19368,7 @@ global.get $~lib/memory/__stack_pointer local.get $1 i32.store offset=124 - i32.const 12096 + i32.const 11968 local.get $1 call $~lib/string/String.__concat local.set $1 @@ -19169,10 +19377,10 @@ local.get $1 i32.store offset=112 local.get $2 - i32.const 5456 + i32.const 5328 i32.store offset=116 local.get $1 - i32.const 5456 + i32.const 5328 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -19195,10 +19403,10 @@ local.get $1 i32.store offset=96 local.get $2 - i32.const 5456 + i32.const 5328 i32.store offset=100 local.get $1 - i32.const 5456 + i32.const 5328 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -19221,10 +19429,10 @@ local.get $1 i32.store offset=80 local.get $2 - i32.const 5456 + i32.const 5328 i32.store offset=84 local.get $1 - i32.const 5456 + i32.const 5328 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -19247,10 +19455,10 @@ local.get $1 i32.store offset=64 local.get $2 - i32.const 5456 + i32.const 5328 i32.store offset=68 local.get $1 - i32.const 5456 + i32.const 5328 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -19273,10 +19481,10 @@ local.get $1 i32.store offset=48 local.get $2 - i32.const 5456 + i32.const 5328 i32.store offset=52 local.get $1 - i32.const 5456 + i32.const 5328 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -19299,10 +19507,10 @@ local.get $1 i32.store offset=32 local.get $2 - i32.const 5456 + i32.const 5328 i32.store offset=36 local.get $1 - i32.const 5456 + i32.const 5328 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -19325,10 +19533,10 @@ local.get $1 i32.store offset=16 local.get $2 - i32.const 5456 + i32.const 5328 i32.store offset=20 local.get $1 - i32.const 5456 + i32.const 5328 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -19351,10 +19559,10 @@ local.get $0 i32.store local.get $1 - i32.const 5488 + i32.const 5360 i32.store offset=4 local.get $0 - i32.const 5488 + i32.const 5360 call $~lib/string/String.__concat global.get $~lib/memory/__stack_pointer i32.const 128 @@ -19371,7 +19579,7 @@ global.set $~lib/memory/__stack_pointer block $folding-inner0 global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -19380,7 +19588,7 @@ i32.store local.get $1 i32.const 12 - i32.const 4 + i32.const 3 call $~lib/rt/itcms/__new local.tee $1 i32.store @@ -19390,7 +19598,7 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -19469,8 +19677,8 @@ local.get $1 return end - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -19483,11 +19691,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -19502,18 +19710,23 @@ call $~lib/typedarray/Float64Array#constructor local.tee $0 i32.store - local.get $0 - i32.const 0 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - f64.const 0 - call $~lib/typedarray/Float64Array#__set + global.get $assembly/common/ARRAY_TYPE + i32.const 3 + i32.ne + if + local.get $0 + i32.const 0 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + end global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -19527,11 +19740,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -19546,22 +19759,27 @@ call $~lib/typedarray/Float64Array#constructor local.tee $0 i32.store - local.get $0 - i32.const 0 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 + global.get $assembly/common/ARRAY_TYPE i32.const 3 - f64.const 0 - call $~lib/typedarray/Float64Array#__set + i32.ne + if + local.get $0 + i32.const 0 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + end global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -19575,11 +19793,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -19631,11 +19849,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -19679,11 +19897,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -19723,11 +19941,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -19742,18 +19960,23 @@ call $~lib/typedarray/Float64Array#constructor local.tee $0 i32.store - local.get $0 - i32.const 0 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - f64.const 0 - call $~lib/typedarray/Float64Array#__set + global.get $assembly/common/ARRAY_TYPE + i32.const 3 + i32.ne + if + local.get $0 + i32.const 0 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + end local.get $0 i32.const 3 f64.const 1 @@ -19771,11 +19994,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -19790,30 +20013,35 @@ call $~lib/typedarray/Float64Array#constructor local.tee $0 i32.store - local.get $0 - i32.const 1 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 + global.get $assembly/common/ARRAY_TYPE i32.const 3 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 5 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 6 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 7 - f64.const 0 - call $~lib/typedarray/Float64Array#__set + i32.ne + if + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + end local.get $0 i32.const 0 f64.const 1 @@ -19839,11 +20067,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -19858,14 +20086,19 @@ call $~lib/typedarray/Float64Array#constructor local.tee $0 i32.store - local.get $0 - i32.const 0 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - f64.const 0 - call $~lib/typedarray/Float64Array#__set + global.get $assembly/common/ARRAY_TYPE + i32.const 3 + i32.ne + if + local.get $0 + i32.const 0 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + end global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -19879,11 +20112,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -19898,14 +20131,19 @@ call $~lib/typedarray/Float64Array#constructor local.tee $0 i32.store - local.get $0 - i32.const 1 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - f64.const 0 - call $~lib/typedarray/Float64Array#__set + global.get $assembly/common/ARRAY_TYPE + i32.const 3 + i32.ne + if + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + end local.get $0 i32.const 0 f64.const 1 @@ -19929,11 +20167,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -19994,11 +20232,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -20013,22 +20251,27 @@ call $~lib/typedarray/Float64Array#constructor local.tee $0 i32.store - local.get $0 - i32.const 1 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 4 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 5 - f64.const 0 - call $~lib/typedarray/Float64Array#__set + global.get $assembly/common/ARRAY_TYPE + i32.const 3 + i32.ne + if + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + end local.get $0 i32.const 0 f64.const 1 @@ -20050,11 +20293,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -20106,11 +20349,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -20174,11 +20417,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -20193,54 +20436,59 @@ call $~lib/typedarray/Float64Array#constructor local.tee $0 i32.store - local.get $0 - i32.const 1 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 + global.get $assembly/common/ARRAY_TYPE i32.const 3 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 4 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 6 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 7 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 8 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 9 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 11 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 12 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 13 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 14 - f64.const 0 - call $~lib/typedarray/Float64Array#__set + i32.ne + if + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + end local.get $0 i32.const 0 f64.const 1 @@ -20270,11 +20518,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -20376,11 +20624,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -20611,11 +20859,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -20906,11 +21154,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -20925,34 +21173,39 @@ call $~lib/typedarray/Float64Array#constructor local.tee $0 i32.store - local.get $0 - i32.const 0 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 4 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 5 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 6 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 7 - f64.const 0 - call $~lib/typedarray/Float64Array#__set + global.get $assembly/common/ARRAY_TYPE + i32.const 3 + i32.ne + if + local.get $0 + i32.const 0 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + end local.get $0 i32.const 3 f64.const 1 @@ -20970,11 +21223,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -21034,11 +21287,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -21148,11 +21401,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -21181,43 +21434,17 @@ global.set $~lib/memory/__stack_pointer local.get $2 ) - (func $export:assembly/common/setMatrixArrayType (param $0 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 12692 - i32.lt_s - if - i32.const 29104 - i32.const 29152 - i32.const 1 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - i32.const 3728 - i32.const 3792 - i32.const 20 - i32.const 3 - call $~lib/builtins/abort - unreachable - ) (func $export:assembly/mat2/clone (param $0 i32) (result i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -21240,11 +21467,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -21271,11 +21498,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -21312,11 +21539,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -21344,11 +21571,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -21423,11 +21650,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -21518,11 +21745,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -21576,11 +21803,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -21616,11 +21843,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -21657,11 +21884,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -21756,11 +21983,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -21837,11 +22064,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -21885,11 +22112,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -21937,7 +22164,7 @@ global.set $~lib/memory/__stack_pointer block $folding-inner0 global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -21949,7 +22176,7 @@ i32.add global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -21978,7 +22205,7 @@ i64.const 0 i64.store offset=56 local.get $1 - i32.const 3856 + i32.const 3728 i32.store offset=56 local.get $0 i32.const 0 @@ -21988,7 +22215,7 @@ global.get $~lib/memory/__stack_pointer local.get $1 i32.store offset=60 - i32.const 3856 + i32.const 3728 local.get $1 call $~lib/string/String.__concat local.set $1 @@ -21997,10 +22224,10 @@ local.get $1 i32.store offset=48 local.get $2 - i32.const 5456 + i32.const 5328 i32.store offset=52 local.get $1 - i32.const 5456 + i32.const 5328 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -22023,10 +22250,10 @@ local.get $1 i32.store offset=32 local.get $2 - i32.const 5456 + i32.const 5328 i32.store offset=36 local.get $1 - i32.const 5456 + i32.const 5328 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -22049,10 +22276,10 @@ local.get $1 i32.store offset=16 local.get $2 - i32.const 5456 + i32.const 5328 i32.store offset=20 local.get $1 - i32.const 5456 + i32.const 5328 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -22075,10 +22302,10 @@ local.get $0 i32.store local.get $1 - i32.const 5488 + i32.const 5360 i32.store offset=4 local.get $0 - i32.const 5488 + i32.const 5360 call $~lib/string/String.__concat global.get $~lib/memory/__stack_pointer i32.const -64 @@ -22090,8 +22317,8 @@ global.set $~lib/memory/__stack_pointer return end - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -22108,11 +22335,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -22198,7 +22425,7 @@ global.set $~lib/memory/__stack_pointer block $folding-inner0 global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -22219,7 +22446,7 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -22296,8 +22523,8 @@ local.get $3 return end - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -22310,11 +22537,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -22346,11 +22573,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -22382,11 +22609,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -22422,11 +22649,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -22551,11 +22778,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -22584,11 +22811,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -22666,7 +22893,7 @@ global.set $~lib/memory/__stack_pointer block $folding-inner0 global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -22678,7 +22905,7 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -22737,8 +22964,8 @@ local.get $1 return end - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -22751,11 +22978,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -22816,11 +23043,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -22865,11 +23092,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -22922,11 +23149,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -23051,11 +23278,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -23091,11 +23318,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -23134,11 +23361,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -23251,11 +23478,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -23356,11 +23583,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -23461,11 +23688,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -23517,11 +23744,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -23575,11 +23802,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -23632,11 +23859,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -23665,11 +23892,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -23786,11 +24013,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -23879,11 +24106,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -23915,11 +24142,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -23993,11 +24220,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -24098,11 +24325,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -24201,11 +24428,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -24382,11 +24609,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -24467,7 +24694,7 @@ global.set $~lib/memory/__stack_pointer block $folding-inner0 global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -24479,7 +24706,7 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -24556,8 +24783,8 @@ local.get $1 return end - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -24570,11 +24797,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -24653,11 +24880,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -24714,11 +24941,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -24779,11 +25006,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -24924,11 +25151,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -25142,11 +25369,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -25305,11 +25532,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -25394,11 +25621,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -25441,11 +25668,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -25588,11 +25815,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -25733,11 +25960,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -25840,11 +26067,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -25910,11 +26137,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -25978,11 +26205,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -26048,11 +26275,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -26137,11 +26364,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -26277,11 +26504,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -26308,11 +26535,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -26373,11 +26600,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -26409,11 +26636,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -26563,11 +26790,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -26686,11 +26913,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -26722,11 +26949,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -26824,11 +27051,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -26965,11 +27192,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -27089,11 +27316,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -27122,11 +27349,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -27150,11 +27377,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -27180,11 +27407,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -27208,11 +27435,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -27238,11 +27465,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -27266,11 +27493,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -27296,11 +27523,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -27324,11 +27551,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -27354,7 +27581,7 @@ global.set $~lib/memory/__stack_pointer block $folding-inner0 global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -27366,7 +27593,7 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -27405,8 +27632,8 @@ local.get $0 return end - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -27420,7 +27647,7 @@ global.set $~lib/memory/__stack_pointer block $folding-inner0 global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -27432,7 +27659,7 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -27551,8 +27778,8 @@ local.get $1 return end - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -27565,11 +27792,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -27690,11 +27917,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -27779,11 +28006,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -27812,11 +28039,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -28028,11 +28255,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -28060,11 +28287,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -28108,11 +28335,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -28289,11 +28516,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -28325,11 +28552,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -28364,11 +28591,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -28529,11 +28756,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -28575,11 +28802,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -28785,11 +29012,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -28995,11 +29222,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -29196,11 +29423,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -29296,11 +29523,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -29396,11 +29623,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -29429,11 +29656,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -29526,11 +29753,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -29622,11 +29849,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -29718,11 +29945,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -29754,11 +29981,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -29786,11 +30013,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -29818,11 +30045,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -29850,11 +30077,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -29882,11 +30109,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -29935,11 +30162,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -30147,11 +30374,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -30202,11 +30429,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -30371,11 +30598,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -30501,11 +30728,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -30531,11 +30758,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -30661,11 +30888,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -30816,11 +31043,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -30850,11 +31077,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -30969,11 +31196,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -31009,11 +31236,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -31048,11 +31275,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -31090,11 +31317,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -31324,11 +31551,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -31517,11 +31744,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -31553,11 +31780,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -31711,11 +31938,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -31936,11 +32163,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -32137,11 +32364,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -32168,11 +32395,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -32210,11 +32437,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -32245,11 +32472,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -32329,11 +32556,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -32373,11 +32600,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -32409,11 +32636,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -32442,11 +32669,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -32475,11 +32702,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -32511,11 +32738,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -32583,11 +32810,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -32615,11 +32842,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -32647,11 +32874,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -32694,11 +32921,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -32734,11 +32961,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -32822,11 +33049,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -32919,11 +33146,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -32976,11 +33203,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -33009,7 +33236,7 @@ global.set $~lib/memory/__stack_pointer block $folding-inner0 global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -33024,7 +33251,7 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -33061,8 +33288,8 @@ global.set $~lib/memory/__stack_pointer return end - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -33077,7 +33304,7 @@ global.set $~lib/memory/__stack_pointer block $folding-inner0 global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -33089,7 +33316,7 @@ i32.add global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -33118,7 +33345,7 @@ i64.const 0 i64.store offset=56 local.get $1 - i32.const 12064 + i32.const 11936 i32.store offset=56 local.get $0 i32.const 0 @@ -33128,7 +33355,7 @@ global.get $~lib/memory/__stack_pointer local.get $1 i32.store offset=60 - i32.const 12064 + i32.const 11936 local.get $1 call $~lib/string/String.__concat local.set $1 @@ -33137,10 +33364,10 @@ local.get $1 i32.store offset=48 local.get $2 - i32.const 5456 + i32.const 5328 i32.store offset=52 local.get $1 - i32.const 5456 + i32.const 5328 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -33163,10 +33390,10 @@ local.get $1 i32.store offset=32 local.get $2 - i32.const 5456 + i32.const 5328 i32.store offset=36 local.get $1 - i32.const 5456 + i32.const 5328 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -33189,10 +33416,10 @@ local.get $1 i32.store offset=16 local.get $2 - i32.const 5456 + i32.const 5328 i32.store offset=20 local.get $1 - i32.const 5456 + i32.const 5328 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -33215,10 +33442,10 @@ local.get $0 i32.store local.get $1 - i32.const 5488 + i32.const 5360 i32.store offset=4 local.get $0 - i32.const 5488 + i32.const 5360 call $~lib/string/String.__concat global.get $~lib/memory/__stack_pointer i32.const -64 @@ -33230,8 +33457,8 @@ global.set $~lib/memory/__stack_pointer return end - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -33244,11 +33471,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -33280,7 +33507,7 @@ global.set $~lib/memory/__stack_pointer block $folding-inner0 global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -33292,7 +33519,7 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -33363,8 +33590,8 @@ local.get $1 return end - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -33377,11 +33604,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -33413,11 +33640,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -33487,11 +33714,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -33559,7 +33786,7 @@ global.set $~lib/memory/__stack_pointer block $folding-inner0 global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -33574,7 +33801,7 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -33614,8 +33841,8 @@ local.get $0 return end - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -33628,11 +33855,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -33659,11 +33886,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -33716,11 +33943,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -33774,11 +34001,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -33828,11 +34055,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -33891,11 +34118,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -34029,11 +34256,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -34207,11 +34434,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -34438,11 +34665,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -34669,11 +34896,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -34894,11 +35121,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -35125,11 +35352,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -35348,11 +35575,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -35385,11 +35612,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -35498,11 +35725,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -35534,11 +35761,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -35629,11 +35856,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -35792,11 +36019,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -35899,11 +36126,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -35992,11 +36219,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -36145,11 +36372,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -36172,11 +36399,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -36301,11 +36528,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -36535,7 +36762,7 @@ global.set $~lib/memory/__stack_pointer block $folding-inner0 global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -36547,7 +36774,7 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -36582,8 +36809,8 @@ local.get $1 return end - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -36596,11 +36823,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -36637,11 +36864,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -36671,11 +36898,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -36724,11 +36951,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -36760,11 +36987,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -36796,11 +37023,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -36832,11 +37059,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -36876,11 +37103,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -36920,11 +37147,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -36973,11 +37200,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -37027,11 +37254,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -37081,11 +37308,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -37127,11 +37354,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -37185,11 +37412,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -37218,11 +37445,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -37250,11 +37477,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -37282,11 +37509,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -37309,11 +37536,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -37353,11 +37580,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -37400,11 +37627,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -37470,11 +37697,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -37515,11 +37742,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -37580,11 +37807,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -37645,11 +37872,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -37708,11 +37935,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -37779,11 +38006,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -37858,11 +38085,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -37937,11 +38164,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -38017,11 +38244,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -38104,11 +38331,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -38187,11 +38414,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -38223,7 +38450,7 @@ global.set $~lib/memory/__stack_pointer block $folding-inner0 global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -38235,7 +38462,7 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -38252,7 +38479,7 @@ i64.const 0 i64.store offset=24 local.get $1 - i32.const 12128 + i32.const 12000 i32.store offset=24 local.get $0 i32.const 0 @@ -38262,7 +38489,7 @@ global.get $~lib/memory/__stack_pointer local.get $1 i32.store offset=28 - i32.const 12128 + i32.const 12000 local.get $1 call $~lib/string/String.__concat local.set $1 @@ -38271,10 +38498,10 @@ local.get $1 i32.store offset=16 local.get $2 - i32.const 5456 + i32.const 5328 i32.store offset=20 local.get $1 - i32.const 5456 + i32.const 5328 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -38297,10 +38524,10 @@ local.get $0 i32.store local.get $1 - i32.const 5488 + i32.const 5360 i32.store offset=4 local.get $0 - i32.const 5488 + i32.const 5360 call $~lib/string/String.__concat global.get $~lib/memory/__stack_pointer i32.const 32 @@ -38312,8 +38539,8 @@ global.set $~lib/memory/__stack_pointer return end - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -38326,11 +38553,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -38377,11 +38604,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -38455,7 +38682,7 @@ global.set $~lib/memory/__stack_pointer block $folding-inner0 global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -38467,7 +38694,7 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -38508,8 +38735,8 @@ local.get $1 return end - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -38522,11 +38749,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -38549,11 +38776,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -38596,11 +38823,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -38634,11 +38861,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -38697,11 +38924,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -38733,11 +38960,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -38769,11 +38996,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -38805,11 +39032,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -38856,11 +39083,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -38907,11 +39134,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -38970,11 +39197,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -39034,11 +39261,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -39100,11 +39327,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -39154,11 +39381,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -39224,11 +39451,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -39257,11 +39484,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -39289,11 +39516,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -39316,11 +39543,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -39367,11 +39594,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -39421,11 +39648,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -39454,11 +39681,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -39486,11 +39713,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -39525,11 +39752,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -39609,11 +39836,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -39715,11 +39942,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -39866,11 +40093,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -40010,11 +40237,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -40101,11 +40328,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -40260,11 +40487,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -40375,11 +40602,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -40518,7 +40745,7 @@ global.set $~lib/memory/__stack_pointer block $folding-inner0 global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -40536,7 +40763,7 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -40546,16 +40773,16 @@ local.get $4 i32.const 0 i32.const 3 - i32.const 29 - i32.const 12160 + i32.const 4 + i32.const 12032 call $~lib/rt/__newArray local.tee $4 i32.store global.get $~lib/memory/__stack_pointer i32.const 0 i32.const 3 - i32.const 29 - i32.const 12192 + i32.const 4 + i32.const 12064 call $~lib/rt/__newArray local.tee $5 i32.store offset=4 @@ -40668,8 +40895,8 @@ local.get $0 return end - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -40684,7 +40911,7 @@ global.set $~lib/memory/__stack_pointer block $folding-inner0 global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -40702,7 +40929,7 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -40712,16 +40939,16 @@ local.get $4 i32.const 0 i32.const 3 - i32.const 29 - i32.const 12272 + i32.const 4 + i32.const 12144 call $~lib/rt/__newArray local.tee $4 i32.store global.get $~lib/memory/__stack_pointer i32.const 0 i32.const 3 - i32.const 29 - i32.const 12304 + i32.const 4 + i32.const 12176 call $~lib/rt/__newArray local.tee $5 i32.store offset=4 @@ -40834,8 +41061,8 @@ local.get $0 return end - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -40850,7 +41077,7 @@ global.set $~lib/memory/__stack_pointer block $folding-inner0 global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -40868,7 +41095,7 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -40878,16 +41105,16 @@ local.get $4 i32.const 0 i32.const 3 - i32.const 29 - i32.const 12336 + i32.const 4 + i32.const 12208 call $~lib/rt/__newArray local.tee $4 i32.store global.get $~lib/memory/__stack_pointer i32.const 0 i32.const 3 - i32.const 29 - i32.const 12368 + i32.const 4 + i32.const 12240 call $~lib/rt/__newArray local.tee $5 i32.store offset=4 @@ -41000,8 +41227,8 @@ local.get $0 return end - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -41015,11 +41242,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -41108,11 +41335,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -41148,7 +41375,7 @@ global.set $~lib/memory/__stack_pointer block $folding-inner0 global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -41160,7 +41387,7 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -41183,7 +41410,7 @@ i64.const 0 i64.store offset=40 local.get $1 - i32.const 12400 + i32.const 12272 i32.store offset=40 local.get $0 i32.const 0 @@ -41193,7 +41420,7 @@ global.get $~lib/memory/__stack_pointer local.get $1 i32.store offset=44 - i32.const 12400 + i32.const 12272 local.get $1 call $~lib/string/String.__concat local.set $1 @@ -41202,10 +41429,10 @@ local.get $1 i32.store offset=32 local.get $2 - i32.const 5456 + i32.const 5328 i32.store offset=36 local.get $1 - i32.const 5456 + i32.const 5328 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -41228,10 +41455,10 @@ local.get $1 i32.store offset=16 local.get $2 - i32.const 5456 + i32.const 5328 i32.store offset=20 local.get $1 - i32.const 5456 + i32.const 5328 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -41254,10 +41481,10 @@ local.get $0 i32.store local.get $1 - i32.const 5488 + i32.const 5360 i32.store offset=4 local.get $0 - i32.const 5488 + i32.const 5360 call $~lib/string/String.__concat global.get $~lib/memory/__stack_pointer i32.const 48 @@ -41269,8 +41496,8 @@ global.set $~lib/memory/__stack_pointer return end - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -41283,11 +41510,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -41347,11 +41574,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -41450,11 +41677,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -41486,11 +41713,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -41522,11 +41749,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -41580,11 +41807,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -41638,11 +41865,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -41711,11 +41938,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -41785,11 +42012,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -41864,11 +42091,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -41897,11 +42124,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -41929,11 +42156,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -41956,11 +42183,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -41983,11 +42210,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -42041,11 +42268,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -42103,11 +42330,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -42136,11 +42363,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -42178,11 +42405,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -42381,11 +42608,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -42423,11 +42650,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -42567,11 +42794,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -42731,11 +42958,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -42900,11 +43127,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s if - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -42944,7 +43171,7 @@ global.set $~lib/memory/__stack_pointer block $folding-inner0 global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -42956,7 +43183,7 @@ i32.add global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12692 + i32.const 12684 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -42985,7 +43212,7 @@ i64.const 0 i64.store offset=56 local.get $1 - i32.const 12432 + i32.const 12304 i32.store offset=56 local.get $0 i32.const 0 @@ -42995,7 +43222,7 @@ global.get $~lib/memory/__stack_pointer local.get $1 i32.store offset=60 - i32.const 12432 + i32.const 12304 local.get $1 call $~lib/string/String.__concat local.set $1 @@ -43004,10 +43231,10 @@ local.get $1 i32.store offset=48 local.get $2 - i32.const 5456 + i32.const 5328 i32.store offset=52 local.get $1 - i32.const 5456 + i32.const 5328 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -43030,10 +43257,10 @@ local.get $1 i32.store offset=32 local.get $2 - i32.const 5456 + i32.const 5328 i32.store offset=36 local.get $1 - i32.const 5456 + i32.const 5328 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -43056,10 +43283,10 @@ local.get $1 i32.store offset=16 local.get $2 - i32.const 5456 + i32.const 5328 i32.store offset=20 local.get $1 - i32.const 5456 + i32.const 5328 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -43082,10 +43309,10 @@ local.get $0 i32.store local.get $1 - i32.const 5488 + i32.const 5360 i32.store offset=4 local.get $0 - i32.const 5488 + i32.const 5360 call $~lib/string/String.__concat global.get $~lib/memory/__stack_pointer i32.const -64 @@ -43097,8 +43324,8 @@ global.set $~lib/memory/__stack_pointer return end - i32.const 29104 - i32.const 29152 + i32.const 29088 + i32.const 29136 i32.const 1 i32.const 1 call $~lib/builtins/abort diff --git a/build/untouched.wasm.d.ts b/build/untouched.wasm.d.ts new file mode 100644 index 00000000..c423912e --- /dev/null +++ b/build/untouched.wasm.d.ts @@ -0,0 +1,399 @@ +declare module ASModule { + type i8 = number; + type i16 = number; + type i32 = number; + type i64 = bigint; + type isize = number; + type u8 = number; + type u16 = number; + type u32 = number; + type u64 = bigint; + type usize = number; + type f32 = number; + type f64 = number; + type bool = boolean | number; + export namespace glMatrix { + export var EPSILON: f64; + export var RANDOM: usize; + export var ANGLE_ORDER: usize; + export function setMatrixArrayType(type: usize): void; + export function toRadian(a: f64): f64; + export function equals(a: f64, b: f64): bool; + } + export namespace mat2 { + export function create(): usize; + export function clone(a: usize): usize; + export function copy(out: usize, a: usize): usize; + export function identity(out: usize): usize; + export function fromValues(m00: f64, m01: f64, m10: f64, m11: f64): usize; + export function set(out: usize, m00: f64, m01: f64, m10: f64, m11: f64): usize; + export function transpose(out: usize, a: usize): usize; + export function invert(out: usize, a: usize): usize; + export function adjoint(out: usize, a: usize): usize; + export function determinant(a: usize): f64; + export function multiply(out: usize, a: usize, b: usize): usize; + export function rotate(out: usize, a: usize, rad: f64): usize; + export function scale(out: usize, a: usize, v: usize): usize; + export function fromRotation(out: usize, rad: f64): usize; + export function fromScaling(out: usize, v: usize): usize; + export function str(a: usize): usize; + export function frob(a: usize): f64; + export function LDU(L: usize, D: usize, U: usize, a: usize): usize; + export function add(out: usize, a: usize, b: usize): usize; + export function subtract(out: usize, a: usize, b: usize): usize; + export function exactEquals(a: usize, b: usize): bool; + export function equals(a: usize, b: usize): bool; + export function multiplyScalar(out: usize, a: usize, b: f64): usize; + export function multiplyScalarAndAdd(out: usize, a: usize, b: usize, scale: f64): usize; + export var mul: usize; + export var sub: usize; + } + export namespace mat2d { + export function create(): usize; + export function clone(a: usize): usize; + export function copy(out: usize, a: usize): usize; + export function identity(out: usize): usize; + export function fromValues(a: f64, b: f64, c: f64, d: f64, tx: f64, ty: f64): usize; + export function set(out: usize, a: f64, b: f64, c: f64, d: f64, tx: f64, ty: f64): usize; + export function invert(out: usize, a: usize): usize; + export function determinant(a: usize): f64; + export function multiply(out: usize, a: usize, b: usize): usize; + export function rotate(out: usize, a: usize, rad: f64): usize; + export function scale(out: usize, a: usize, v: usize): usize; + export function translate(out: usize, a: usize, v: usize): usize; + export function fromRotation(out: usize, rad: f64): usize; + export function fromScaling(out: usize, v: usize): usize; + export function fromTranslation(out: usize, v: usize): usize; + export function str(a: usize): usize; + export function frob(a: usize): f64; + export function add(out: usize, a: usize, b: usize): usize; + export function subtract(out: usize, a: usize, b: usize): usize; + export function multiplyScalar(out: usize, a: usize, b: f64): usize; + export function multiplyScalarAndAdd(out: usize, a: usize, b: usize, scale: f64): usize; + export function exactEquals(a: usize, b: usize): bool; + export function equals(a: usize, b: usize): bool; + export var mul: usize; + export var sub: usize; + } + export namespace mat3 { + export function create(): usize; + export function fromMat4(out: usize, a: usize): usize; + export function clone(a: usize): usize; + export function copy(out: usize, a: usize): usize; + export function fromValues(m00: f64, m01: f64, m02: f64, m10: f64, m11: f64, m12: f64, m20: f64, m21: f64, m22: f64): usize; + export function set(out: usize, m00: f64, m01: f64, m02: f64, m10: f64, m11: f64, m12: f64, m20: f64, m21: f64, m22: f64): usize; + export function identity(out: usize): usize; + export function transpose(out: usize, a: usize): usize; + export function invert(out: usize, a: usize): usize; + export function adjoint(out: usize, a: usize): usize; + export function determinant(a: usize): f64; + export function multiply(out: usize, a: usize, b: usize): usize; + export function translate(out: usize, a: usize, v: usize): usize; + export function rotate(out: usize, a: usize, rad: f64): usize; + export function scale(out: usize, a: usize, v: usize): usize; + export function fromTranslation(out: usize, v: usize): usize; + export function fromRotation(out: usize, rad: f64): usize; + export function fromScaling(out: usize, v: usize): usize; + export function fromMat2d(out: usize, a: usize): usize; + export function fromQuat(out: usize, q: usize): usize; + export function normalFromMat4(out: usize, a: usize): usize; + export function projection(out: usize, width: f64, height: f64): usize; + export function str(a: usize): usize; + export function frob(a: usize): f64; + export function add(out: usize, a: usize, b: usize): usize; + export function subtract(out: usize, a: usize, b: usize): usize; + export function multiplyScalar(out: usize, a: usize, b: f64): usize; + export function multiplyScalarAndAdd(out: usize, a: usize, b: usize, scale: f64): usize; + export function exactEquals(a: usize, b: usize): bool; + export function equals(a: usize, b: usize): bool; + export var mul: usize; + export var sub: usize; + } + export namespace mat4 { + export class Fov { + static wrap(ptr: usize): Fov; + valueOf(): usize; + upDegrees: f64; + downDegrees: f64; + leftDegrees: f64; + rightDegrees: f64; + constructor(); + } + export function create(): usize; + export function clone(a: usize): usize; + export function copy(out: usize, a: usize): usize; + export function fromValues(m00: f64, m01: f64, m02: f64, m03: f64, m10: f64, m11: f64, m12: f64, m13: f64, m20: f64, m21: f64, m22: f64, m23: f64, m30: f64, m31: f64, m32: f64, m33: f64): usize; + export function set(out: usize, m00: f64, m01: f64, m02: f64, m03: f64, m10: f64, m11: f64, m12: f64, m13: f64, m20: f64, m21: f64, m22: f64, m23: f64, m30: f64, m31: f64, m32: f64, m33: f64): usize; + export function identity(out: usize): usize; + export function transpose(out: usize, a: usize): usize; + export function invert(out: usize, a: usize): usize; + export function adjoint(out: usize, a: usize): usize; + export function determinant(a: usize): f64; + export function multiply(out: usize, a: usize, b: usize): usize; + export function translate(out: usize, a: usize, v: usize): usize; + export function scale(out: usize, a: usize, v: usize): usize; + export function rotate(out: usize, a: usize, rad: f64, axis: usize): usize; + export function rotateX(out: usize, a: usize, rad: f64): usize; + export function rotateY(out: usize, a: usize, rad: f64): usize; + export function rotateZ(out: usize, a: usize, rad: f64): usize; + export function fromTranslation(out: usize, v: usize): usize; + export function fromScaling(out: usize, v: usize): usize; + export function fromRotation(out: usize, rad: f64, axis: usize): usize; + export function fromXRotation(out: usize, rad: f64): usize; + export function fromYRotation(out: usize, rad: f64): usize; + export function fromZRotation(out: usize, rad: f64): usize; + export function fromRotationTranslation(out: usize, q: usize, v: usize): usize; + export function fromQuat2(out: usize, a: usize): usize; + export function getTranslation(out: usize, mat: usize): usize; + export function getScaling(out: usize, mat: usize): usize; + export function getRotation(out: usize, mat: usize): usize; + export function decompose(out_r: usize, out_t: usize, out_s: usize, mat: usize): usize; + export function fromRotationTranslationScale(out: usize, q: usize, v: usize, s: usize): usize; + export function fromRotationTranslationScaleOrigin(out: usize, q: usize, v: usize, s: usize, o: usize): usize; + export function fromQuat(out: usize, q: usize): usize; + export function frustum(out: usize, left: f64, right: f64, bottom: f64, top: f64, near: f64, far: f64): usize; + export function perspectiveNO(out: usize, fovy: f64, aspect: f64, near: f64, far: f64): usize; + export var perspective: usize; + export function perspectiveZO(out: usize, fovy: f64, aspect: f64, near: f64, far: f64): usize; + export function perspectiveFromFieldOfView(out: usize, fov: usize, near: f64, far: f64): usize; + export function orthoNO(out: usize, left: f64, right: f64, bottom: f64, top: f64, near: f64, far: f64): usize; + export var ortho: usize; + export function orthoZO(out: usize, left: f64, right: f64, bottom: f64, top: f64, near: f64, far: f64): usize; + export function lookAt(out: usize, eye: usize, center: usize, up: usize): usize; + export function targetTo(out: usize, eye: usize, target: usize, up: usize): usize; + export function str(a: usize): usize; + export function frob(a: usize): f64; + export function add(out: usize, a: usize, b: usize): usize; + export function subtract(out: usize, a: usize, b: usize): usize; + export function multiplyScalar(out: usize, a: usize, b: f64): usize; + export function multiplyScalarAndAdd(out: usize, a: usize, b: usize, scale: f64): usize; + export function exactEquals(a: usize, b: usize): bool; + export function equals(a: usize, b: usize): bool; + export var mul: usize; + export var sub: usize; + } + export namespace quat { + export function create(): usize; + export function identity(out: usize): usize; + export function setAxisAngle(out: usize, axis: usize, rad: f64): usize; + export function getAxisAngle(out_axis: usize, q: usize): f64; + export function getAngle(a: usize, b: usize): f64; + export function multiply(out: usize, a: usize, b: usize): usize; + export function rotateX(out: usize, a: usize, rad: f64): usize; + export function rotateY(out: usize, a: usize, rad: f64): usize; + export function rotateZ(out: usize, a: usize, rad: f64): usize; + export function calculateW(out: usize, a: usize): usize; + export function exp(out: usize, a: usize): usize; + export function ln(out: usize, a: usize): usize; + export function pow(out: usize, a: usize, b: f64): usize; + export function slerp(out: usize, a: usize, b: usize, t: f64): usize; + export function random(out: usize): usize; + export function invert(out: usize, a: usize): usize; + export function conjugate(out: usize, a: usize): usize; + export function fromMat3(out: usize, m: usize): usize; + export function fromEuler(out: usize, x: f64, y: f64, z: f64, order?: usize): usize; + export function str(a: usize): usize; + export var clone: usize; + export var fromValues: usize; + export var copy: usize; + export var set: usize; + export var add: usize; + export var mul: usize; + export var scale: usize; + export var dot: usize; + export var lerp: usize; + export var length: usize; + export var len: usize; + export var squaredLength: usize; + export var sqrLen: usize; + export var normalize: usize; + export var exactEquals: usize; + export function equals(a: usize, b: usize): bool; + export var rotationTo: usize; + export var sqlerp: usize; + export var setAxes: usize; + } + export namespace quat2 { + export function create(): usize; + export function clone(a: usize): usize; + export function fromValues(x1: f64, y1: f64, z1: f64, w1: f64, x2: f64, y2: f64, z2: f64, w2: f64): usize; + export function fromRotationTranslationValues(x1: f64, y1: f64, z1: f64, w1: f64, x2: f64, y2: f64, z2: f64): usize; + export function fromRotationTranslation(out: usize, q: usize, t: usize): usize; + export function fromTranslation(out: usize, t: usize): usize; + export function fromRotation(out: usize, q: usize): usize; + export function fromMat4(out: usize, a: usize): usize; + export function copy(out: usize, a: usize): usize; + export function identity(out: usize): usize; + export function set(out: usize, x1: f64, y1: f64, z1: f64, w1: f64, x2: f64, y2: f64, z2: f64, w2: f64): usize; + export var getReal: usize; + export function getDual(out: usize, a: usize): usize; + export var setReal: usize; + export function setDual(out: usize, q: usize): usize; + export function getTranslation(out: usize, a: usize): usize; + export function translate(out: usize, a: usize, v: usize): usize; + export function rotateX(out: usize, a: usize, rad: f64): usize; + export function rotateY(out: usize, a: usize, rad: f64): usize; + export function rotateZ(out: usize, a: usize, rad: f64): usize; + export function rotateByQuatAppend(out: usize, a: usize, q: usize): usize; + export function rotateByQuatPrepend(out: usize, q: usize, a: usize): usize; + export function rotateAroundAxis(out: usize, a: usize, axis: usize, rad: f64): usize; + export function add(out: usize, a: usize, b: usize): usize; + export function multiply(out: usize, a: usize, b: usize): usize; + export var mul: usize; + export function scale(out: usize, a: usize, b: f64): usize; + export var dot: usize; + export function lerp(out: usize, a: usize, b: usize, t: f64): usize; + export function invert(out: usize, a: usize): usize; + export function conjugate(out: usize, a: usize): usize; + export var length: usize; + export var len: usize; + export var squaredLength: usize; + export var sqrLen: usize; + export function normalize(out: usize, a: usize): usize; + export function str(a: usize): usize; + export function exactEquals(a: usize, b: usize): bool; + export function equals(a: usize, b: usize): bool; + } + export namespace vec2 { + export function create(): usize; + export function clone(a: usize): usize; + export function fromValues(x: f64, y: f64): usize; + export function copy(out: usize, a: usize): usize; + export function set(out: usize, x: f64, y: f64): usize; + export function add(out: usize, a: usize, b: usize): usize; + export function subtract(out: usize, a: usize, b: usize): usize; + export function multiply(out: usize, a: usize, b: usize): usize; + export function divide(out: usize, a: usize, b: usize): usize; + export function ceil(out: usize, a: usize): usize; + export function floor(out: usize, a: usize): usize; + export function min(out: usize, a: usize, b: usize): usize; + export function max(out: usize, a: usize, b: usize): usize; + export function round(out: usize, a: usize): usize; + export function scale(out: usize, a: usize, b: f64): usize; + export function scaleAndAdd(out: usize, a: usize, b: usize, scale: f64): usize; + export function distance(a: usize, b: usize): f64; + export function squaredDistance(a: usize, b: usize): f64; + export function length(a: usize): f64; + export function squaredLength(a: usize): f64; + export function negate(out: usize, a: usize): usize; + export function inverse(out: usize, a: usize): usize; + export function normalize(out: usize, a: usize): usize; + export function dot(a: usize, b: usize): f64; + export function cross(out: usize, a: usize, b: usize): usize; + export function lerp(out: usize, a: usize, b: usize, t: f64): usize; + export function random(out: usize, scale: f64): usize; + export function transformMat2(out: usize, a: usize, m: usize): usize; + export function transformMat2d(out: usize, a: usize, m: usize): usize; + export function transformMat3(out: usize, a: usize, m: usize): usize; + export function transformMat4(out: usize, a: usize, m: usize): usize; + export function rotate(out: usize, a: usize, b: usize, rad: f64): usize; + export function angle(a: usize, b: usize): f64; + export function zero(out: usize): usize; + export function str(a: usize): usize; + export function exactEquals(a: usize, b: usize): bool; + export function equals(a: usize, b: usize): bool; + export var len: usize; + export var sub: usize; + export var mul: usize; + export var div: usize; + export var dist: usize; + export var sqrDist: usize; + export var sqrLen: usize; + export var forEach: usize; + } + export namespace vec3 { + export function create(): usize; + export function clone(a: usize): usize; + export function length(a: usize): f64; + export function fromValues(x: f64, y: f64, z: f64): usize; + export function copy(out: usize, a: usize): usize; + export function set(out: usize, x: f64, y: f64, z: f64): usize; + export function add(out: usize, a: usize, b: usize): usize; + export function subtract(out: usize, a: usize, b: usize): usize; + export function multiply(out: usize, a: usize, b: usize): usize; + export function divide(out: usize, a: usize, b: usize): usize; + export function ceil(out: usize, a: usize): usize; + export function floor(out: usize, a: usize): usize; + export function min(out: usize, a: usize, b: usize): usize; + export function max(out: usize, a: usize, b: usize): usize; + export function round(out: usize, a: usize): usize; + export function scale(out: usize, a: usize, b: f64): usize; + export function scaleAndAdd(out: usize, a: usize, b: usize, scale: f64): usize; + export function distance(a: usize, b: usize): f64; + export function squaredDistance(a: usize, b: usize): f64; + export function squaredLength(a: usize): f64; + export function negate(out: usize, a: usize): usize; + export function inverse(out: usize, a: usize): usize; + export function normalize(out: usize, a: usize): usize; + export function dot(a: usize, b: usize): f64; + export function cross(out: usize, a: usize, b: usize): usize; + export function lerp(out: usize, a: usize, b: usize, t: f64): usize; + export function slerp(out: usize, a: usize, b: usize, t: f64): usize; + export function hermite(out: usize, a: usize, b: usize, c: usize, d: usize, t: f64): usize; + export function bezier(out: usize, a: usize, b: usize, c: usize, d: usize, t: f64): usize; + export function random(out: usize, scale: f64): usize; + export function transformMat4(out: usize, a: usize, m: usize): usize; + export function transformMat3(out: usize, a: usize, m: usize): usize; + export function transformQuat(out: usize, a: usize, q: usize): usize; + export function rotateX(out: usize, a: usize, b: usize, rad: f64): usize; + export function rotateY(out: usize, a: usize, b: usize, rad: f64): usize; + export function rotateZ(out: usize, a: usize, b: usize, rad: f64): usize; + export function angle(a: usize, b: usize): f64; + export function zero(out: usize): usize; + export function str(a: usize): usize; + export function exactEquals(a: usize, b: usize): bool; + export function equals(a: usize, b: usize): bool; + export var sub: usize; + export var mul: usize; + export var div: usize; + export var dist: usize; + export var sqrDist: usize; + export var len: usize; + export var sqrLen: usize; + export var forEach: usize; + } + export namespace vec4 { + export function create(): usize; + export function clone(a: usize): usize; + export function fromValues(x: f64, y: f64, z: f64, w: f64): usize; + export function copy(out: usize, a: usize): usize; + export function set(out: usize, x: f64, y: f64, z: f64, w: f64): usize; + export function add(out: usize, a: usize, b: usize): usize; + export function subtract(out: usize, a: usize, b: usize): usize; + export function multiply(out: usize, a: usize, b: usize): usize; + export function divide(out: usize, a: usize, b: usize): usize; + export function ceil(out: usize, a: usize): usize; + export function floor(out: usize, a: usize): usize; + export function min(out: usize, a: usize, b: usize): usize; + export function max(out: usize, a: usize, b: usize): usize; + export function round(out: usize, a: usize): usize; + export function scale(out: usize, a: usize, b: f64): usize; + export function scaleAndAdd(out: usize, a: usize, b: usize, scale: f64): usize; + export function distance(a: usize, b: usize): f64; + export function squaredDistance(a: usize, b: usize): f64; + export function length(a: usize): f64; + export function squaredLength(a: usize): f64; + export function negate(out: usize, a: usize): usize; + export function inverse(out: usize, a: usize): usize; + export function normalize(out: usize, a: usize): usize; + export function dot(a: usize, b: usize): f64; + export function cross(out: usize, u: usize, v: usize, w: usize): usize; + export function lerp(out: usize, a: usize, b: usize, t: f64): usize; + export function random(out: usize, scale: f64): usize; + export function transformMat4(out: usize, a: usize, m: usize): usize; + export function transformQuat(out: usize, a: usize, q: usize): usize; + export function zero(out: usize): usize; + export function str(a: usize): usize; + export function exactEquals(a: usize, b: usize): bool; + export function equals(a: usize, b: usize): bool; + export var sub: usize; + export var mul: usize; + export var div: usize; + export var dist: usize; + export var sqrDist: usize; + export var len: usize; + export var sqrLen: usize; + export var forEach: usize; + } +} +export default ASModule; diff --git a/build/untouched.wat b/build/untouched.wat index 03cbea40..67a2cd99 100644 --- a/build/untouched.wat +++ b/build/untouched.wat @@ -9,8 +9,8 @@ (type $i32_i32_=>_f64 (func (param i32 i32) (result f64))) (type $none_=>_i32 (func (result i32))) (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) - (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) (type $none_=>_none (func)) + (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_f64 (func (result f64))) (type $i32_=>_none (func (param i32))) @@ -57,20 +57,20 @@ (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 12) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\18\00\00\00~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s\00\00\00\00\00") - (data (i32.const 60) "\1c\00\00\00\00\00\00\00\00\00\00\00\03\00\00\00\08\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 60) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 92) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00z\00y\00x\00\00\00\00\00\00\00") (data (i32.const 124) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00$\00\00\00I\00n\00d\00e\00x\00 \00o\00u\00t\00 \00o\00f\00 \00r\00a\00n\00g\00e\00\00\00\00\00\00\00\00\00") (data (i32.const 188) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00$\00\00\00~\00l\00i\00b\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s\00\00\00\00\00\00\00\00\00") - (data (i32.const 252) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 284) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00\03\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 316) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 348) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 380) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00\06\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 412) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\00\07\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 444) "\1c\00\00\00\00\00\00\00\00\00\00\00\07\00\00\00\08\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 476) "\1c\00\00\00\00\00\00\00\00\00\00\00\07\00\00\00\08\00\00\00\t\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 508) "\1c\00\00\00\00\00\00\00\00\00\00\00\08\00\00\00\08\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 540) "\1c\00\00\00\00\00\00\00\00\00\00\00\08\00\00\00\08\00\00\00\0b\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 252) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 284) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\00\03\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 316) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 348) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 380) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\00\06\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 412) "\1c\00\00\00\00\00\00\00\00\00\00\00\07\00\00\00\08\00\00\00\07\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 444) "\1c\00\00\00\00\00\00\00\00\00\00\00\08\00\00\00\08\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 476) "\1c\00\00\00\00\00\00\00\00\00\00\00\08\00\00\00\08\00\00\00\t\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 508) "\1c\00\00\00\00\00\00\00\00\00\00\00\t\00\00\00\08\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 540) "\1c\00\00\00\00\00\00\00\00\00\00\00\t\00\00\00\08\00\00\00\0b\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 572) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1c\00\00\00I\00n\00v\00a\00l\00i\00d\00 \00l\00e\00n\00g\00t\00h\00") (data (i32.const 620) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00\00\00\00\00\00\00") (data (i32.const 684) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00(\00\00\00A\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e\00\00\00\00\00") @@ -80,98 +80,101 @@ (data (i32.const 876) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\00~\00l\00i\00b\00/\00r\00t\00.\00t\00s\00\00\00\00\00\00\00\00\00") (data (i32.const 928) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 956) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1020) "\1c\00\00\00\00\00\00\00\00\00\00\00\0b\00\00\00\08\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1052) "\1c\00\00\00\00\00\00\00\00\00\00\00\n\00\00\00\08\00\00\00\0d\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1084) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1116) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00\0f\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1148) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1180) "\1c\00\00\00\00\00\00\00\00\00\00\00\07\00\00\00\08\00\00\00\11\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1212) "\1c\00\00\00\00\00\00\00\00\00\00\00\07\00\00\00\08\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1244) "\1c\00\00\00\00\00\00\00\00\00\00\00\08\00\00\00\08\00\00\00\13\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1276) "\1c\00\00\00\00\00\00\00\00\00\00\00\08\00\00\00\08\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1308) "\1c\00\00\00\00\00\00\00\00\00\00\00\0b\00\00\00\08\00\00\00\15\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1340) "\1c\00\00\00\00\00\00\00\00\00\00\00\n\00\00\00\08\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1372) "\1c\00\00\00\00\00\00\00\00\00\00\00\0c\00\00\00\08\00\00\00\17\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1404) "\1c\00\00\00\00\00\00\00\00\00\00\00\0d\00\00\00\08\00\00\00\18\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1436) "\1c\00\00\00\00\00\00\00\00\00\00\00\0e\00\00\00\08\00\00\00\19\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1468) "\1c\00\00\00\00\00\00\00\00\00\00\00\0f\00\00\00\08\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1500) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00\1b\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1532) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1564) "\1c\00\00\00\00\00\00\00\00\00\00\00\10\00\00\00\08\00\00\00\1d\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1596) "\1c\00\00\00\00\00\00\00\00\00\00\00\07\00\00\00\08\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1628) "\1c\00\00\00\00\00\00\00\00\00\00\00\11\00\00\00\08\00\00\00\1f\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1660) "\1c\00\00\00\00\00\00\00\00\00\00\00\0e\00\00\00\08\00\00\00 \00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1692) "\1c\00\00\00\00\00\00\00\00\00\00\00\12\00\00\00\08\00\00\00!\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1020) "\1c\00\00\00\00\00\00\00\00\00\00\00\0c\00\00\00\08\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1052) "\1c\00\00\00\00\00\00\00\00\00\00\00\0b\00\00\00\08\00\00\00\0d\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1084) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1116) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\00\0f\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1148) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1180) "\1c\00\00\00\00\00\00\00\00\00\00\00\08\00\00\00\08\00\00\00\11\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1212) "\1c\00\00\00\00\00\00\00\00\00\00\00\08\00\00\00\08\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1244) "\1c\00\00\00\00\00\00\00\00\00\00\00\t\00\00\00\08\00\00\00\13\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1276) "\1c\00\00\00\00\00\00\00\00\00\00\00\t\00\00\00\08\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1308) "\1c\00\00\00\00\00\00\00\00\00\00\00\0c\00\00\00\08\00\00\00\15\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1340) "\1c\00\00\00\00\00\00\00\00\00\00\00\0b\00\00\00\08\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1372) "\1c\00\00\00\00\00\00\00\00\00\00\00\0d\00\00\00\08\00\00\00\17\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1404) "\1c\00\00\00\00\00\00\00\00\00\00\00\0e\00\00\00\08\00\00\00\18\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1436) "\1c\00\00\00\00\00\00\00\00\00\00\00\0f\00\00\00\08\00\00\00\19\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1468) "\1c\00\00\00\00\00\00\00\00\00\00\00\10\00\00\00\08\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1500) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\00\1b\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1532) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1564) "\1c\00\00\00\00\00\00\00\00\00\00\00\11\00\00\00\08\00\00\00\1d\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1596) "\1c\00\00\00\00\00\00\00\00\00\00\00\08\00\00\00\08\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1628) "\1c\00\00\00\00\00\00\00\00\00\00\00\12\00\00\00\08\00\00\00\1f\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1660) "\1c\00\00\00\00\00\00\00\00\00\00\00\0f\00\00\00\08\00\00\00 \00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1692) "\1c\00\00\00\00\00\00\00\00\00\00\00\13\00\00\00\08\00\00\00!\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 1728) "n\83\f9\a2\00\00\00\00\d1W\'\fc)\15DN\99\95b\db\c0\dd4\f5\abcQ\feA\90C<:n$\b7a\c5\bb\de\ea.I\06\e0\d2MB\1c\eb\1d\fe\1c\92\d1\t\f55\82\e8>\a7)\b1&p\9c\e9\84D\bb.9\d6\919A~_\b4\8b_\84\9c\f49S\83\ff\97\f8\1f;(\f9\bd\8b\11/\ef\0f\98\05\de\cf~6m\1fm\nZf?FO\b7\t\cb\'\c7\ba\'u-\ea_\9e\f79\07={\f1\e5\eb\b1_\fbk\ea\92R\8aF0\03V\08]\8d\1f \bc\cf\f0\abk{\fca\91\e3\a9\1d6\f4\9a_\85\99e\08\1b\e6^\80\d8\ff\8d@h\a0\14W\15\06\061\'sM") - (data (i32.const 1932) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1964) "\1c\00\00\00\00\00\00\00\00\00\00\00\13\00\00\00\08\00\00\00#\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1996) "\1c\00\00\00\00\00\00\00\00\00\00\00\15\00\00\00\08\00\00\00$\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2028) "\1c\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\08\00\00\00%\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2060) "\1c\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\08\00\00\00&\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2092) "\1c\00\00\00\00\00\00\00\00\00\00\00\16\00\00\00\08\00\00\00\'\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2124) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00(\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1932) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1964) "\1c\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\08\00\00\00#\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1996) "\1c\00\00\00\00\00\00\00\00\00\00\00\16\00\00\00\08\00\00\00$\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2028) "\1c\00\00\00\00\00\00\00\00\00\00\00\15\00\00\00\08\00\00\00%\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2060) "\1c\00\00\00\00\00\00\00\00\00\00\00\18\00\00\00\08\00\00\00&\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2092) "\1c\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\08\00\00\00\'\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2124) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\00(\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 2156) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00n\00u\00m\00b\00e\00r\00") - (data (i32.const 2188) "\1c\00\00\00\00\00\00\00\00\00\00\00\0f\00\00\00\08\00\00\00)\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2220) "\1c\00\00\00\00\00\00\00\00\00\00\00\18\00\00\00\08\00\00\00*\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2252) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00+\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2284) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00,\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2316) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00-\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2348) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00.\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2380) "\1c\00\00\00\00\00\00\00\00\00\00\00\08\00\00\00\08\00\00\00/\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2412) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\000\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2444) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\001\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2476) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\002\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2508) "\1c\00\00\00\00\00\00\00\00\00\00\00\07\00\00\00\08\00\00\003\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2540) "\1c\00\00\00\00\00\00\00\00\00\00\00\07\00\00\00\08\00\00\004\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2572) "\1c\00\00\00\00\00\00\00\00\00\00\00\08\00\00\00\08\00\00\005\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2604) "\1c\00\00\00\00\00\00\00\00\00\00\00\0b\00\00\00\08\00\00\006\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2636) "\1c\00\00\00\00\00\00\00\00\00\00\00\n\00\00\00\08\00\00\007\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2668) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\008\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2700) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\009\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2732) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00&\00\00\00N\00o\00t\00 \00i\00m\00p\00l\00e\00m\00e\00n\00t\00e\00d\00 \00y\00e\00t\00\00\00\00\00\00\00") - (data (i32.const 2796) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00$\00\00\00a\00s\00s\00e\00m\00b\00l\00y\00/\00c\00o\00m\00m\00o\00n\00.\00t\00s\00\00\00\00\00\00\00\00\00") - (data (i32.const 2860) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00m\00a\00t\002\00(\00\00\00") - (data (i32.const 2892) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\000\00.\000\00\00\00\00\00\00\00") - (data (i32.const 2924) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00N\00a\00N\00\00\00\00\00\00\00") - (data (i32.const 2956) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\12\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 3004) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\00I\00n\00f\00i\00n\00i\00t\00y\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 3056) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 3112) "\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\9a\ec\ef?\d1f\87\10z^\90\bc\85\7fn\e8\15\e3\ef?\13\f6g5R\d2\8c\be\ef?m{\83]\a6\9a\97<\0f\89\f9lX\b5\ef?\fc\ef\fd\92\1a\b5\8e<\f7Gr+\92\ac\ef?\d1\9c/p=\be><\a2\d1\d32\ec\a3\ef?\0bn\90\894\03j\bc\1b\d3\fe\aff\9b\ef?\0e\bd/*RV\95\bcQ[\12\d0\01\93\ef?U\eaN\8c\ef\80P\bc\cc1l\c0\bd\8a\ef?\16\f4\d5\b9#\c9\91\bc\e0-\a9\ae\9a\82\ef?\afU\\\e9\e3\d3\80\f7\ec\9a<\aa\b9h1\87T\ef?\9d8\86\cb\82\e7\8f\bc\1d\d9\fc\"PM\ef?\8d\c3\a6DAo\8a<\d6\8cb\88;F\ef?}\04\e4\b0\05z\80<\96\dc}\91I?\ef?\94\a8\a8\e3\fd\8e\96<8bunz8\ef?}Ht\f2\18^\87\a9\af\0c\ef?\b6\ab\b0MuM\83<\15\b71\n\fe\06\ef?Lt\ac\e2\01B\86<1\d8L\fcp\01\ef?J\f8\d3]9\dd\8f<\ff\16d\b2\08\fc\ee?\04[\8e;\80\a3\86\bc\f1\9f\92_\c5\f6\ee?hPK\cc\edJ\92\bc\cb\a9:7\a7\f1\ee?\8e-Q\1b\f8\07\99\bcf\d8\05m\ae\ec\ee?\d26\94>\e8\d1q\bc\f7\9f\e54\db\e7\ee?\15\1b\ce\b3\19\19\99\bc\e5\a8\13\c3-\e3\ee?mL*\a7H\9f\85<\"4\12L\a6\de\ee?\8ai(z`\12\93\bc\1c\80\ac\04E\da\ee?[\89\17H\8f\a7X\bc*.\f7!\n\d6\ee?\1b\9aIg\9b,|\bc\97\a8P\d9\f5\d1\ee?\11\ac\c2`\edcC<-\89a`\08\ce\ee?\efd\06;\tf\96Z~d\1fx\bct_\ec\e8u\9f\ee?\b0}\8b\c0J\ee\86\bct\81\a5H\9a\9f\ee?\8a\e6U\1e2\19\86\bc\c9gBV\eb\9f\ee?\d3\d4\t^\cb\9c\90T\'\a4\ee?47;\f1\b6i\93\bc\13\ceL\99\89\a5\ee?\1e\ff\19:\84^\80\bc\ad\c7#F\1a\a7\ee?nWr\d8P\d4\94\bc\ed\92D\9b\d9\a8\ee?\00\8a\0e[g\ad\90<\99f\8a\d9\c7\aa\ee?\b4\ea\f0\c1/\b7\8d<\db\a0*B\e5\ac\ee?\ff\e7\c5\9c`\b6e\bc\8cD\b5\162\af\ee?D_\f3Y\83\f6{<6w\15\99\ae\b1\ee?\83=\1e\a7\1f\t\93\bc\c6\ff\91\0b[\b4\ee?)\1el\8b\b8\a9]\bc\e5\c5\cd\b07\b7\ee?Y\b9\90|\f9#l\bc\0fR\c8\cbD\ba\ee?\aa\f9\f4\"CC\92\bcPN\de\9f\82\bd\ee?K\8ef\d7l\ca\85\bc\ba\07\cap\f1\c0\ee?\'\ce\91+\fc\afq<\90\f0\a3\82\91\c4\ee?\bbs\n\e15\d2m<##\e3\19c\c8\ee?c\"b\"\04\c5\87\bce\e5]{f\cc\ee?\d51\e2\e3\86\1c\8b<3-J\ec\9b\d0\ee?\15\bb\bc\d3\d1\bb\91\bc]%>\b2\03\d5\ee?\d21\ee\9c1\cc\90\b4\07!\d5\82\bc_\9b{3\97|\ef?\c9\0dG;\b9*\89\bc)\a1\f5\14F\86\ef?\d3\88:`\04\b6t<\f6?\8b\e7.\90\ef?qr\9dQ\ec\c5\83<\83L\c7\fbQ\9a\ef?\f0\91\d3\8f\12\f7\8f\bc\da\90\a4\a2\af\a4\ef?}t#\e2\98\ae\8d\bc\f1g\8e-H\af\ef?\08 \aaA\bc\c3\8e<\'Za\ee\1b\ba\ef?2\eb\a9\c3\94+\84<\97\bak7+\c5\ef?\ee\85\d11\a9d\8a<@En[v\d0\ef?\ed\e3;\e4\ba7\8e\bc\14\be\9c\ad\fd\db\ef?\9d\cd\91M;\89w<\d8\90\9e\81\c1\e7\ef?\89\cc`A\c1\05S<\f1q\8f+\c2\f3\ef?") - (data (i32.const 6672) "\9f\de\e0\c3\f04\f7?\00\90\e6y\7f\cc\d7\bf\1f\e9,jx\13\f7?\00\00\0d\c2\eeo\d7\bf\a0\b5\fa\08`\f2\f6?\00\e0Q\13\e3\13\d7\bf}\8c\13\1f\a6\d1\f6?\00x(8[\b8\d6\bf\d1\b4\c5\0bI\b1\f6?\00x\80\90U]\d6\bf\ba\0c/3G\91\f6?\00\00\18v\d0\02\d6\bf#B\"\18\9fq\f6?\00\90\90\86\ca\a8\d5\bf\d9\1e\a5\99OR\f6?\00P\03VCO\d5\bf\c4$\8f\aaV3\f6?\00@k\c37\f6\d4\bf\14\dc\9dk\b3\14\f6?\00P\a8\fd\a7\9d\d4\bfL\\\c6Rd\f6\f5?\00\a8\899\92E\d4\bfO,\91\b5g\d8\f5?\00\b8\b09\f4\ed\d3\bf\de\90[\cb\bc\ba\f5?\00p\8fD\ce\96\d3\bfx\1a\d9\f2a\9d\f5?\00\a0\bd\17\1e@\d3\bf\87VF\12V\80\f5?\00\80F\ef\e2\e9\d2\bf\d3k\e7\ce\97c\f5?\00\e008\1b\94\d2\bf\93\7f\a7\e2%G\f5?\00\88\da\8c\c5>\d2\bf\83E\06B\ff*\f5?\00\90\')\e1\e9\d1\bf\df\bd\b2\db\"\0f\f5?\00\f8H+m\95\d1\bf\d7\de4G\8f\f3\f4?\00\f8\b9\9agA\d1\bf@(\de\cfC\d8\f4?\00\98\ef\94\d0\ed\d0\bf\c8\a3x\c0>\bd\f4?\00\10\db\18\a5\9a\d0\bf\8a%\e0\c3\7f\a2\f4?\00\b8cR\e6G\d0\bf4\84\d4$\05\88\f4?\00\f0\86E\"\eb\cf\bf\0b-\19\1b\cem\f4?\00\b0\17uJG\cf\bfT\189\d3\d9S\f4?\000\10=D\a4\ce\bfZ\84\b4D\':\f4?\00\b0\e9D\0d\02\ce\bf\fb\f8\15A\b5 \f4?\00\f0w)\a2`\cd\bf\b1\f4>\da\82\07\f4?\00\90\95\04\01\c0\cc\bf\8f\feW]\8f\ee\f3?\00\10\89V) \cc\bf\e9L\0b\a0\d9\d5\f3?\00\10\81\8d\17\81\cb\bf+\c1\10\c0`\bd\f3?\00\d0\d3\cc\c9\e2\ca\bf\b8\dau+$\a5\f3?\00\90\12.@E\ca\bf\02\d0\9f\cd\"\8d\f3?\00\f0\1dhw\a8\c9\bf\1cz\84\c5[u\f3?\000Him\0c\c9\bf\e26\adI\ce]\f3?\00\c0E\a6 q\c8\bf@\d4M\98yF\f3?\000\14\b4\8f\d6\c7\bf$\cb\ff\ce\\/\f3?\00pb<\b8<\c7\bfI\0d\a1uw\18\f3?\00`7\9b\9a\a3\c6\bf\909>7\c8\01\f3?\00\a0\b7T1\0b\c6\bfA\f8\95\bbN\eb\f2?\000$v}s\c5\bf\d1\a9\19\02\n\d5\f2?\000\c2\8f{\dc\c4\bf*\fd\b7\a8\f9\be\f2?\00\00\d2Q,F\c4\bf\ab\1b\0cz\1c\a9\f2?\00\00\83\bc\8a\b0\c3\bf0\b5\14`r\93\f2?\00\00Ik\99\1b\c3\bf\f5\a1WW\fa}\f2?\00@\a4\90T\87\c2\bf\bf;\1d\9b\b3h\f2?\00\a0y\f8\b9\f3\c1\bf\bd\f5\8f\83\9dS\f2?\00\a0,%\c8`\c1\bf;\08\c9\aa\b7>\f2?\00 \f7W\7f\ce\c0\bf\b6@\a9+\01*\f2?\00\a0\feI\dc<\c0\bf2A\cc\96y\15\f2?\00\80K\bc\bdW\bf\bf\9b\fc\d2\1d \01\f2?\00@@\96\087\be\bf\0bHMI\f4\ec\f1?\00@\f9>\98\17\bd\bfie\8fR\f5\d8\f1?\00\a0\d8Ng\f9\bb\bf|~W\11#\c5\f1?\00`/ y\dc\ba\bf\e9&\cbt|\b1\f1?\00\80(\e7\c3\c0\b9\bf\b6\1a,\0c\01\9e\f1?\00\c0r\b3F\a6\b8\bf\bdp\b6{\b0\8a\f1?\00\00\ac\b3\01\8d\b7\bf\b6\bc\ef%\8aw\f1?\00\008E\f1t\b6\bf\da1L5\8dd\f1?\00\80\87m\0e^\b5\bf\dd_\'\90\b9Q\f1?\00\e0\a1\de\\H\b4\bfL\d22\a4\0e?\f1?\00\a0jM\d93\b3\bf\da\f9\10r\8b,\f1?\00`\c5\f8y \b2\bf1\b5\ec(0\1a\f1?\00 b\98F\0e\b1\bf\af4\84\da\fb\07\f1?\00\00\d2jl\fa\af\bf\b3kN\0f\ee\f5\f0?\00@wJ\8d\da\ad\bf\ce\9f*]\06\e4\f0?\00\00\85\e4\ec\bc\ab\bf!\a5,cD\d2\f0?\00\c0\12@\89\a1\a9\bf\1a\98\e2|\a7\c0\f0?\00\c0\023X\88\a7\bf\d16\c6\83/\af\f0?\00\80\d6g^q\a5\bf9\13\a0\98\db\9d\f0?\00\80eI\8a\\\a3\bf\df\e7R\af\ab\8c\f0?\00@\15d\e3I\a1\bf\fb(N/\9f{\f0?\00\80\eb\82\c0r\9e\bf\19\8f5\8c\b5j\f0?\00\80RR\f1U\9a\bf,\f9\ec\a5\eeY\f0?\00\80\81\cfb=\96\bf\90,\d1\cdII\f0?\00\00\aa\8c\fb(\92\bf\a9\ad\f0\c6\c68\f0?\00\00\f9 {1\8c\bf\a92y\13e(\f0?\00\00\aa]5\19\84\bfHs\ea\'$\18\f0?\00\00\ec\c2\03\12x\bf\95\b1\14\06\04\08\f0?\00\00$y\t\04`\bf\1a\fa&\f7\1f\e0\ef?\00\00\90\84\f3\efo?t\eaa\c2\1c\a1\ef?\00\00=5A\dc\87?.\99\81\b0\10c\ef?\00\80\c2\c4\a3\ce\93?\cd\ad\ee<\f6%\ef?\00\00\89\14\c1\9f\9b?\e7\13\91\03\c8\e9\ee?\00\00\11\ce\d8\b0\a1?\ab\b1\cbx\80\ae\ee?\00\c0\01\d0[\8a\a5?\9b\0c\9d\a2\1at\ee?\00\80\d8@\83\\\a9?\b5\99\n\83\91:\ee?\00\80W\efj\'\ad?V\9a`\t\e0\01\ee?\00\c0\98\e5\98u\b0?\98\bbw\e5\01\ca\ed?\00 \0d\e3\f5S\b2?\03\91|\0b\f2\92\ed?\00\008\8b\dd.\b4?\ce\\\fbf\ac\\\ed?\00\c0W\87Y\06\b6?\9d\de^\aa,\'\ed?\00\00j5v\da\b7?\cd,k>n\f2\ec?\00`\1cNC\ab\b9?\02y\a7\a2m\be\ec?\00`\0d\bb\c7x\bb?m\087m&\8b\ec?\00 \e72\13C\bd?\04X]\bd\94X\ec?\00`\deq1\n\bf?\8c\9f\bb3\b5&\ec?\00@\91+\15g\c0??\e7\ec\ee\83\f5\eb?\00\b0\92\82\85G\c1?\c1\96\dbu\fd\c4\eb?\000\ca\cdn&\c2?(J\86\0c\1e\95\eb?\00P\c5\a6\d7\03\c3?,>\ef\c5\e2e\eb?\00\103<\c3\df\c3?\8b\88\c9gH7\eb?\00\80zk6\ba\c4?J0\1d!K\t\eb?\00\f0\d1(9\93\c5?~\ef\f2\85\e8\db\ea?\00\f0\18$\cdj\c6?\a2=`1\1d\af\ea?\00\90f\ec\f8@\c7?\a7X\d3?\e6\82\ea?\00\f0\1a\f5\c0\15\c8?\8bs\t\ef@W\ea?\00\80\f6T)\e9\c8?\'K\ab\90*,\ea?\00@\f8\026\bb\c9?\d1\f2\93\13\a0\01\ea?\00\00,\1c\ed\8b\ca?\1b<\db$\9f\d7\e9?\00\d0\01\\Q[\cb?\90\b1\c7\05%\ae\e9?\00\c0\bc\ccg)\cc?/\ce\97\f2.\85\e9?\00`H\d55\f6\cc?uK\a4\ee\ba\\\e9?\00\c0F4\bd\c1\cd?8H\e7\9d\c64\e9?\00\e0\cf\b8\01\8c\ce?\e6Rg/O\0d\e9?\00\90\17\c0\tU\cf?\9d\d7\ff\8eR\e6\e8?\00\b8\1f\12l\0e\d0?|\00\cc\9f\ce\bf\e8?\00\d0\93\0e\b8q\d0?\0e\c3\be\da\c0\99\e8?\00p\86\9ek\d4\d0?\fb\17#\aa\'t\e8?\00\d0K3\876\d1?\08\9a\b3\ac\00O\e8?\00H#g\0d\98\d1?U>e\e8I*\e8?\00\80\cc\e0\ff\f8\d1?`\02\f4\95\01\06\e8?\00hc\d7_Y\d2?)\a3\e0c%\e2\e7?\00\a8\14\t0\b9\d2?\ad\b5\dcw\b3\be\e7?\00`C\10r\18\d3?\c2%\97g\aa\9b\e7?\00\18\ecm&w\d3?W\06\17\f2\07y\e7?\000\af\fbO\d5\d3?\0c\13\d6\db\caV\e7?\00\e0/\e3\ee2\d4?") - (data (i32.const 8720) "k\b6O\01\00\10\e6?<[B\91l\02~<\95\b4M\03\000\e6?A]\00H\ea\bf\8d\f6\05\eb\ff\ef\e6?S-\e2\1a\04\80~\bc\80\97\86\0e\00\10\e7?Ry\tqf\ff{<\12\e9g\fc\ff/\e7?$\87\bd&\e2\00\8c\89<\b9{F\13\000\e9?v\02\98KN\80\7f.\98\dd\ff\af\e9?7\93Z\8a\e0@\87\bcf\fbI\ed\ff\cf\e9?\00\e0\9b\c1\08\ce?O*\00\b0\ea?_?\ff<\04\fdi\bc\d1\1e\ae\d7\ff\cf\ea?\b4p\90\12\e7>\82\bcx\04Q\ee\ff\ef\ea?\a3\de\0e\e0>\06j<[\0de\db\ff\0f\eb?\b9\n\1f8\c8\06ZO\86\d0E\ff\8a<@\16\87\f9\ff\8f\eb?\f9\c3\c2\96w\fe|\f0\0f\00\f0\f4?\1cS\85\0b\89\7f\97<\d1K\dc\12\00\10\f5?6\a4fqe\04`\c9\03\00\b0\f5?\c0\0c\bf\n\08A\9f\bc\bc\19I\1d\00\d0\f5?)G%\fb*\81\98\bc\89z\b8\e7\ff\ef\f5?\04i\ed\80\b7~\94\bc") - (data (i32.const 10780) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00x\00y\00z\00\00\00\00\00\00\00") - (data (i32.const 10812) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00x\00z\00y\00\00\00\00\00\00\00") - (data (i32.const 10844) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00y\00x\00z\00\00\00\00\00\00\00") - (data (i32.const 10876) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00y\00z\00x\00\00\00\00\00\00\00") - (data (i32.const 10908) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00z\00x\00y\00\00\00\00\00\00\00") - (data (i32.const 10940) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00(\00\00\00U\00n\00k\00n\00o\00w\00n\00 \00a\00n\00g\00l\00e\00 \00o\00r\00d\00e\00r\00 \00\00\00\00\00") - (data (i32.const 11004) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00 \00\00\00a\00s\00s\00e\00m\00b\00l\00y\00/\00q\00u\00a\00t\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 11068) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00q\00u\00a\00t\00(\00\00\00") - (data (i32.const 11100) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00q\00u\00a\00t\002\00(\00") - (data (i32.const 11132) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00v\00e\00c\002\00(\00\00\00") - (data (i32.const 11164) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 11196) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 11228) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00\00\00") - (data (i32.const 11276) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 11308) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 11340) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 11372) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 11404) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00v\00e\00c\003\00(\00\00\00") - (data (i32.const 11436) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00v\00e\00c\004\00(\00\00\00") - (data (i32.const 11472) "\1e\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\1a\00\00\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00 \00\00\00\00\00\00\00\02A\00\00\00\00\00\00\02\t\00\00\00\00\00\00 \00\00\00\00\00\00\00\02\1a\00\00\00\00\00\00") + (data (i32.const 2188) "\1c\00\00\00\00\00\00\00\00\00\00\00\10\00\00\00\08\00\00\00)\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2220) "\1c\00\00\00\00\00\00\00\00\00\00\00\19\00\00\00\08\00\00\00*\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2252) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\00+\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2284) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\00,\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2316) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\00-\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2348) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\00.\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2380) "\1c\00\00\00\00\00\00\00\00\00\00\00\t\00\00\00\08\00\00\00/\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2412) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\000\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2444) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\001\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2476) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\002\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2508) "\1c\00\00\00\00\00\00\00\00\00\00\00\08\00\00\00\08\00\00\003\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2540) "\1c\00\00\00\00\00\00\00\00\00\00\00\08\00\00\00\08\00\00\004\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2572) "\1c\00\00\00\00\00\00\00\00\00\00\00\t\00\00\00\08\00\00\005\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2604) "\1c\00\00\00\00\00\00\00\00\00\00\00\0c\00\00\00\08\00\00\006\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2636) "\1c\00\00\00\00\00\00\00\00\00\00\00\0b\00\00\00\08\00\00\007\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2668) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\008\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2700) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\009\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2732) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00m\00a\00t\002\00(\00\00\00") + (data (i32.const 2764) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\000\00.\000\00\00\00\00\00\00\00") + (data (i32.const 2796) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00N\00a\00N\00\00\00\00\00\00\00") + (data (i32.const 2828) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\12\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2876) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\00I\00n\00f\00i\00n\00i\00t\00y\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2928) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2984) "\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\9a\ec\ef?\d1f\87\10z^\90\bc\85\7fn\e8\15\e3\ef?\13\f6g5R\d2\8c\be\ef?m{\83]\a6\9a\97<\0f\89\f9lX\b5\ef?\fc\ef\fd\92\1a\b5\8e<\f7Gr+\92\ac\ef?\d1\9c/p=\be><\a2\d1\d32\ec\a3\ef?\0bn\90\894\03j\bc\1b\d3\fe\aff\9b\ef?\0e\bd/*RV\95\bcQ[\12\d0\01\93\ef?U\eaN\8c\ef\80P\bc\cc1l\c0\bd\8a\ef?\16\f4\d5\b9#\c9\91\bc\e0-\a9\ae\9a\82\ef?\afU\\\e9\e3\d3\80\f7\ec\9a<\aa\b9h1\87T\ef?\9d8\86\cb\82\e7\8f\bc\1d\d9\fc\"PM\ef?\8d\c3\a6DAo\8a<\d6\8cb\88;F\ef?}\04\e4\b0\05z\80<\96\dc}\91I?\ef?\94\a8\a8\e3\fd\8e\96<8bunz8\ef?}Ht\f2\18^\87\a9\af\0c\ef?\b6\ab\b0MuM\83<\15\b71\n\fe\06\ef?Lt\ac\e2\01B\86<1\d8L\fcp\01\ef?J\f8\d3]9\dd\8f<\ff\16d\b2\08\fc\ee?\04[\8e;\80\a3\86\bc\f1\9f\92_\c5\f6\ee?hPK\cc\edJ\92\bc\cb\a9:7\a7\f1\ee?\8e-Q\1b\f8\07\99\bcf\d8\05m\ae\ec\ee?\d26\94>\e8\d1q\bc\f7\9f\e54\db\e7\ee?\15\1b\ce\b3\19\19\99\bc\e5\a8\13\c3-\e3\ee?mL*\a7H\9f\85<\"4\12L\a6\de\ee?\8ai(z`\12\93\bc\1c\80\ac\04E\da\ee?[\89\17H\8f\a7X\bc*.\f7!\n\d6\ee?\1b\9aIg\9b,|\bc\97\a8P\d9\f5\d1\ee?\11\ac\c2`\edcC<-\89a`\08\ce\ee?\efd\06;\tf\96Z~d\1fx\bct_\ec\e8u\9f\ee?\b0}\8b\c0J\ee\86\bct\81\a5H\9a\9f\ee?\8a\e6U\1e2\19\86\bc\c9gBV\eb\9f\ee?\d3\d4\t^\cb\9c\90T\'\a4\ee?47;\f1\b6i\93\bc\13\ceL\99\89\a5\ee?\1e\ff\19:\84^\80\bc\ad\c7#F\1a\a7\ee?nWr\d8P\d4\94\bc\ed\92D\9b\d9\a8\ee?\00\8a\0e[g\ad\90<\99f\8a\d9\c7\aa\ee?\b4\ea\f0\c1/\b7\8d<\db\a0*B\e5\ac\ee?\ff\e7\c5\9c`\b6e\bc\8cD\b5\162\af\ee?D_\f3Y\83\f6{<6w\15\99\ae\b1\ee?\83=\1e\a7\1f\t\93\bc\c6\ff\91\0b[\b4\ee?)\1el\8b\b8\a9]\bc\e5\c5\cd\b07\b7\ee?Y\b9\90|\f9#l\bc\0fR\c8\cbD\ba\ee?\aa\f9\f4\"CC\92\bcPN\de\9f\82\bd\ee?K\8ef\d7l\ca\85\bc\ba\07\cap\f1\c0\ee?\'\ce\91+\fc\afq<\90\f0\a3\82\91\c4\ee?\bbs\n\e15\d2m<##\e3\19c\c8\ee?c\"b\"\04\c5\87\bce\e5]{f\cc\ee?\d51\e2\e3\86\1c\8b<3-J\ec\9b\d0\ee?\15\bb\bc\d3\d1\bb\91\bc]%>\b2\03\d5\ee?\d21\ee\9c1\cc\90\b4\07!\d5\82\bc_\9b{3\97|\ef?\c9\0dG;\b9*\89\bc)\a1\f5\14F\86\ef?\d3\88:`\04\b6t<\f6?\8b\e7.\90\ef?qr\9dQ\ec\c5\83<\83L\c7\fbQ\9a\ef?\f0\91\d3\8f\12\f7\8f\bc\da\90\a4\a2\af\a4\ef?}t#\e2\98\ae\8d\bc\f1g\8e-H\af\ef?\08 \aaA\bc\c3\8e<\'Za\ee\1b\ba\ef?2\eb\a9\c3\94+\84<\97\bak7+\c5\ef?\ee\85\d11\a9d\8a<@En[v\d0\ef?\ed\e3;\e4\ba7\8e\bc\14\be\9c\ad\fd\db\ef?\9d\cd\91M;\89w<\d8\90\9e\81\c1\e7\ef?\89\cc`A\c1\05S<\f1q\8f+\c2\f3\ef?") + (data (i32.const 6544) "\9f\de\e0\c3\f04\f7?\00\90\e6y\7f\cc\d7\bf\1f\e9,jx\13\f7?\00\00\0d\c2\eeo\d7\bf\a0\b5\fa\08`\f2\f6?\00\e0Q\13\e3\13\d7\bf}\8c\13\1f\a6\d1\f6?\00x(8[\b8\d6\bf\d1\b4\c5\0bI\b1\f6?\00x\80\90U]\d6\bf\ba\0c/3G\91\f6?\00\00\18v\d0\02\d6\bf#B\"\18\9fq\f6?\00\90\90\86\ca\a8\d5\bf\d9\1e\a5\99OR\f6?\00P\03VCO\d5\bf\c4$\8f\aaV3\f6?\00@k\c37\f6\d4\bf\14\dc\9dk\b3\14\f6?\00P\a8\fd\a7\9d\d4\bfL\\\c6Rd\f6\f5?\00\a8\899\92E\d4\bfO,\91\b5g\d8\f5?\00\b8\b09\f4\ed\d3\bf\de\90[\cb\bc\ba\f5?\00p\8fD\ce\96\d3\bfx\1a\d9\f2a\9d\f5?\00\a0\bd\17\1e@\d3\bf\87VF\12V\80\f5?\00\80F\ef\e2\e9\d2\bf\d3k\e7\ce\97c\f5?\00\e008\1b\94\d2\bf\93\7f\a7\e2%G\f5?\00\88\da\8c\c5>\d2\bf\83E\06B\ff*\f5?\00\90\')\e1\e9\d1\bf\df\bd\b2\db\"\0f\f5?\00\f8H+m\95\d1\bf\d7\de4G\8f\f3\f4?\00\f8\b9\9agA\d1\bf@(\de\cfC\d8\f4?\00\98\ef\94\d0\ed\d0\bf\c8\a3x\c0>\bd\f4?\00\10\db\18\a5\9a\d0\bf\8a%\e0\c3\7f\a2\f4?\00\b8cR\e6G\d0\bf4\84\d4$\05\88\f4?\00\f0\86E\"\eb\cf\bf\0b-\19\1b\cem\f4?\00\b0\17uJG\cf\bfT\189\d3\d9S\f4?\000\10=D\a4\ce\bfZ\84\b4D\':\f4?\00\b0\e9D\0d\02\ce\bf\fb\f8\15A\b5 \f4?\00\f0w)\a2`\cd\bf\b1\f4>\da\82\07\f4?\00\90\95\04\01\c0\cc\bf\8f\feW]\8f\ee\f3?\00\10\89V) \cc\bf\e9L\0b\a0\d9\d5\f3?\00\10\81\8d\17\81\cb\bf+\c1\10\c0`\bd\f3?\00\d0\d3\cc\c9\e2\ca\bf\b8\dau+$\a5\f3?\00\90\12.@E\ca\bf\02\d0\9f\cd\"\8d\f3?\00\f0\1dhw\a8\c9\bf\1cz\84\c5[u\f3?\000Him\0c\c9\bf\e26\adI\ce]\f3?\00\c0E\a6 q\c8\bf@\d4M\98yF\f3?\000\14\b4\8f\d6\c7\bf$\cb\ff\ce\\/\f3?\00pb<\b8<\c7\bfI\0d\a1uw\18\f3?\00`7\9b\9a\a3\c6\bf\909>7\c8\01\f3?\00\a0\b7T1\0b\c6\bfA\f8\95\bbN\eb\f2?\000$v}s\c5\bf\d1\a9\19\02\n\d5\f2?\000\c2\8f{\dc\c4\bf*\fd\b7\a8\f9\be\f2?\00\00\d2Q,F\c4\bf\ab\1b\0cz\1c\a9\f2?\00\00\83\bc\8a\b0\c3\bf0\b5\14`r\93\f2?\00\00Ik\99\1b\c3\bf\f5\a1WW\fa}\f2?\00@\a4\90T\87\c2\bf\bf;\1d\9b\b3h\f2?\00\a0y\f8\b9\f3\c1\bf\bd\f5\8f\83\9dS\f2?\00\a0,%\c8`\c1\bf;\08\c9\aa\b7>\f2?\00 \f7W\7f\ce\c0\bf\b6@\a9+\01*\f2?\00\a0\feI\dc<\c0\bf2A\cc\96y\15\f2?\00\80K\bc\bdW\bf\bf\9b\fc\d2\1d \01\f2?\00@@\96\087\be\bf\0bHMI\f4\ec\f1?\00@\f9>\98\17\bd\bfie\8fR\f5\d8\f1?\00\a0\d8Ng\f9\bb\bf|~W\11#\c5\f1?\00`/ y\dc\ba\bf\e9&\cbt|\b1\f1?\00\80(\e7\c3\c0\b9\bf\b6\1a,\0c\01\9e\f1?\00\c0r\b3F\a6\b8\bf\bdp\b6{\b0\8a\f1?\00\00\ac\b3\01\8d\b7\bf\b6\bc\ef%\8aw\f1?\00\008E\f1t\b6\bf\da1L5\8dd\f1?\00\80\87m\0e^\b5\bf\dd_\'\90\b9Q\f1?\00\e0\a1\de\\H\b4\bfL\d22\a4\0e?\f1?\00\a0jM\d93\b3\bf\da\f9\10r\8b,\f1?\00`\c5\f8y \b2\bf1\b5\ec(0\1a\f1?\00 b\98F\0e\b1\bf\af4\84\da\fb\07\f1?\00\00\d2jl\fa\af\bf\b3kN\0f\ee\f5\f0?\00@wJ\8d\da\ad\bf\ce\9f*]\06\e4\f0?\00\00\85\e4\ec\bc\ab\bf!\a5,cD\d2\f0?\00\c0\12@\89\a1\a9\bf\1a\98\e2|\a7\c0\f0?\00\c0\023X\88\a7\bf\d16\c6\83/\af\f0?\00\80\d6g^q\a5\bf9\13\a0\98\db\9d\f0?\00\80eI\8a\\\a3\bf\df\e7R\af\ab\8c\f0?\00@\15d\e3I\a1\bf\fb(N/\9f{\f0?\00\80\eb\82\c0r\9e\bf\19\8f5\8c\b5j\f0?\00\80RR\f1U\9a\bf,\f9\ec\a5\eeY\f0?\00\80\81\cfb=\96\bf\90,\d1\cdII\f0?\00\00\aa\8c\fb(\92\bf\a9\ad\f0\c6\c68\f0?\00\00\f9 {1\8c\bf\a92y\13e(\f0?\00\00\aa]5\19\84\bfHs\ea\'$\18\f0?\00\00\ec\c2\03\12x\bf\95\b1\14\06\04\08\f0?\00\00$y\t\04`\bf\1a\fa&\f7\1f\e0\ef?\00\00\90\84\f3\efo?t\eaa\c2\1c\a1\ef?\00\00=5A\dc\87?.\99\81\b0\10c\ef?\00\80\c2\c4\a3\ce\93?\cd\ad\ee<\f6%\ef?\00\00\89\14\c1\9f\9b?\e7\13\91\03\c8\e9\ee?\00\00\11\ce\d8\b0\a1?\ab\b1\cbx\80\ae\ee?\00\c0\01\d0[\8a\a5?\9b\0c\9d\a2\1at\ee?\00\80\d8@\83\\\a9?\b5\99\n\83\91:\ee?\00\80W\efj\'\ad?V\9a`\t\e0\01\ee?\00\c0\98\e5\98u\b0?\98\bbw\e5\01\ca\ed?\00 \0d\e3\f5S\b2?\03\91|\0b\f2\92\ed?\00\008\8b\dd.\b4?\ce\\\fbf\ac\\\ed?\00\c0W\87Y\06\b6?\9d\de^\aa,\'\ed?\00\00j5v\da\b7?\cd,k>n\f2\ec?\00`\1cNC\ab\b9?\02y\a7\a2m\be\ec?\00`\0d\bb\c7x\bb?m\087m&\8b\ec?\00 \e72\13C\bd?\04X]\bd\94X\ec?\00`\deq1\n\bf?\8c\9f\bb3\b5&\ec?\00@\91+\15g\c0??\e7\ec\ee\83\f5\eb?\00\b0\92\82\85G\c1?\c1\96\dbu\fd\c4\eb?\000\ca\cdn&\c2?(J\86\0c\1e\95\eb?\00P\c5\a6\d7\03\c3?,>\ef\c5\e2e\eb?\00\103<\c3\df\c3?\8b\88\c9gH7\eb?\00\80zk6\ba\c4?J0\1d!K\t\eb?\00\f0\d1(9\93\c5?~\ef\f2\85\e8\db\ea?\00\f0\18$\cdj\c6?\a2=`1\1d\af\ea?\00\90f\ec\f8@\c7?\a7X\d3?\e6\82\ea?\00\f0\1a\f5\c0\15\c8?\8bs\t\ef@W\ea?\00\80\f6T)\e9\c8?\'K\ab\90*,\ea?\00@\f8\026\bb\c9?\d1\f2\93\13\a0\01\ea?\00\00,\1c\ed\8b\ca?\1b<\db$\9f\d7\e9?\00\d0\01\\Q[\cb?\90\b1\c7\05%\ae\e9?\00\c0\bc\ccg)\cc?/\ce\97\f2.\85\e9?\00`H\d55\f6\cc?uK\a4\ee\ba\\\e9?\00\c0F4\bd\c1\cd?8H\e7\9d\c64\e9?\00\e0\cf\b8\01\8c\ce?\e6Rg/O\0d\e9?\00\90\17\c0\tU\cf?\9d\d7\ff\8eR\e6\e8?\00\b8\1f\12l\0e\d0?|\00\cc\9f\ce\bf\e8?\00\d0\93\0e\b8q\d0?\0e\c3\be\da\c0\99\e8?\00p\86\9ek\d4\d0?\fb\17#\aa\'t\e8?\00\d0K3\876\d1?\08\9a\b3\ac\00O\e8?\00H#g\0d\98\d1?U>e\e8I*\e8?\00\80\cc\e0\ff\f8\d1?`\02\f4\95\01\06\e8?\00hc\d7_Y\d2?)\a3\e0c%\e2\e7?\00\a8\14\t0\b9\d2?\ad\b5\dcw\b3\be\e7?\00`C\10r\18\d3?\c2%\97g\aa\9b\e7?\00\18\ecm&w\d3?W\06\17\f2\07y\e7?\000\af\fbO\d5\d3?\0c\13\d6\db\caV\e7?\00\e0/\e3\ee2\d4?") + (data (i32.const 8592) "k\b6O\01\00\10\e6?<[B\91l\02~<\95\b4M\03\000\e6?A]\00H\ea\bf\8d\f6\05\eb\ff\ef\e6?S-\e2\1a\04\80~\bc\80\97\86\0e\00\10\e7?Ry\tqf\ff{<\12\e9g\fc\ff/\e7?$\87\bd&\e2\00\8c\89<\b9{F\13\000\e9?v\02\98KN\80\7f.\98\dd\ff\af\e9?7\93Z\8a\e0@\87\bcf\fbI\ed\ff\cf\e9?\00\e0\9b\c1\08\ce?O*\00\b0\ea?_?\ff<\04\fdi\bc\d1\1e\ae\d7\ff\cf\ea?\b4p\90\12\e7>\82\bcx\04Q\ee\ff\ef\ea?\a3\de\0e\e0>\06j<[\0de\db\ff\0f\eb?\b9\n\1f8\c8\06ZO\86\d0E\ff\8a<@\16\87\f9\ff\8f\eb?\f9\c3\c2\96w\fe|\f0\0f\00\f0\f4?\1cS\85\0b\89\7f\97<\d1K\dc\12\00\10\f5?6\a4fqe\04`\c9\03\00\b0\f5?\c0\0c\bf\n\08A\9f\bc\bc\19I\1d\00\d0\f5?)G%\fb*\81\98\bc\89z\b8\e7\ff\ef\f5?\04i\ed\80\b7~\94\bc") + (data (i32.const 10652) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00x\00y\00z\00\00\00\00\00\00\00") + (data (i32.const 10684) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00x\00z\00y\00\00\00\00\00\00\00") + (data (i32.const 10716) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00y\00x\00z\00\00\00\00\00\00\00") + (data (i32.const 10748) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00y\00z\00x\00\00\00\00\00\00\00") + (data (i32.const 10780) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00z\00x\00y\00\00\00\00\00\00\00") + (data (i32.const 10812) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00(\00\00\00U\00n\00k\00n\00o\00w\00n\00 \00a\00n\00g\00l\00e\00 \00o\00r\00d\00e\00r\00 \00\00\00\00\00") + (data (i32.const 10876) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00 \00\00\00a\00s\00s\00e\00m\00b\00l\00y\00/\00q\00u\00a\00t\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 10940) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00q\00u\00a\00t\00(\00\00\00") + (data (i32.const 10972) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00q\00u\00a\00t\002\00(\00") + (data (i32.const 11004) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00v\00e\00c\002\00(\00\00\00") + (data (i32.const 11036) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 11068) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 11100) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00\00\00") + (data (i32.const 11148) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 11180) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 11212) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 11244) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 11276) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00v\00e\00c\003\00(\00\00\00") + (data (i32.const 11308) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00v\00e\00c\004\00(\00\00\00") + (data (i32.const 11340) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00*\00\00\00O\00b\00j\00e\00c\00t\00 \00a\00l\00r\00e\00a\00d\00y\00 \00p\00i\00n\00n\00e\00d\00\00\00") + (data (i32.const 11404) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00(\00\00\00O\00b\00j\00e\00c\00t\00 \00i\00s\00 \00n\00o\00t\00 \00p\00i\00n\00n\00e\00d\00\00\00\00\00") + (data (i32.const 11472) "\1d\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\1a\00\00\02\00\00\00\02\1a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\02A\00\00\00\00\00\00\02\t\00\00\00\00\00\00 \00\00\00\00\00\00\00") (table $0 58 funcref) (elem (i32.const 1) $~lib/math/NativeMath.random $assembly/mat2d/multiply $assembly/mat2d/subtract $assembly/vec3/subtract $assembly/vec3/multiply $assembly/vec3/divide $~lib/math/NativeMath.hypot $assembly/vec3/distance $assembly/vec3/squaredDistance $assembly/vec3/length $assembly/vec3/squaredLength $start:assembly/vec3~anonymous|0~anonymous|0 $start:assembly/vec3~anonymous|0 $assembly/vec4/subtract $assembly/vec4/multiply $assembly/vec4/divide $assembly/vec4/distance $assembly/vec4/squaredDistance $assembly/vec4/length $assembly/vec4/squaredLength $start:assembly/vec4~anonymous|0~anonymous|0 $start:assembly/vec4~anonymous|0 $assembly/vec4/clone $assembly/vec4/fromValues $assembly/vec4/copy $assembly/vec4/set $assembly/vec4/add $assembly/quat/multiply $assembly/vec4/scale $assembly/vec4/dot $assembly/vec4/lerp $assembly/vec4/normalize $assembly/vec4/exactEquals $start:assembly/quat~anonymous|0~anonymous|0 $start:assembly/quat~anonymous|0 $start:assembly/quat~anonymous|1~anonymous|0 $start:assembly/quat~anonymous|1 $start:assembly/quat~anonymous|2~anonymous|0 $start:assembly/quat~anonymous|2 $assembly/quat2/multiply $assembly/mat4/perspectiveNO $assembly/mat4/orthoNO $assembly/mat4/multiply $assembly/mat4/subtract $assembly/mat3/multiply $assembly/mat3/subtract $assembly/vec2/length $assembly/vec2/subtract $assembly/vec2/multiply $assembly/vec2/divide $assembly/vec2/distance $assembly/vec2/squaredDistance $assembly/vec2/squaredLength $start:assembly/vec2~anonymous|0~anonymous|0 $start:assembly/vec2~anonymous|0 $assembly/mat2/multiply $assembly/mat2/subtract) (global $assembly/common/EPSILON f64 (f64.const 1e-06)) + (global $assembly/common/ArrayTypeEnum.Float64ArrayT i32 (i32.const 3)) + (global $assembly/common/ArrayTypeEnum.ArrayF64T i32 (i32.const 4)) + (global $assembly/common/ARRAY_TYPE (mut i32) (i32.const 0)) (global $~lib/math/random_seeded (mut i32) (i32.const 0)) (global $~lib/math/random_state0_64 (mut i64) (i64.const 0)) (global $~lib/math/random_state1_64 (mut i64) (i64.const 0)) @@ -274,12 +277,16 @@ (global $~lib/util/number/_exp_pow (mut i32) (i32.const 0)) (global $assembly/mat4/Fov i32 (i32.const 28)) (global $~lib/rt/__rtti_base i32 (i32.const 11472)) - (global $~lib/memory/__data_end i32 (i32.const 11716)) - (global $~lib/memory/__stack_pointer (mut i32) (i32.const 28100)) - (global $~lib/memory/__heap_base i32 (i32.const 28100)) + (global $~lib/memory/__data_end i32 (i32.const 11708)) + (global $~lib/memory/__stack_pointer (mut i32) (i32.const 28092)) + (global $~lib/memory/__heap_base i32 (i32.const 28092)) (export "glMatrix.EPSILON" (global $assembly/common/EPSILON)) + (export "glMatrix.ArrayTypeEnum.Float64ArrayT" (global $assembly/common/ArrayTypeEnum.Float64ArrayT)) + (export "glMatrix.ArrayTypeEnum.ArrayF64T" (global $assembly/common/ArrayTypeEnum.ArrayF64T)) + (export "glMatrix.ARRAY_TYPE" (global $assembly/common/ARRAY_TYPE)) (export "glMatrix.RANDOM" (global $assembly/common/RANDOM)) (export "glMatrix.ANGLE_ORDER" (global $assembly/common/ANGLE_ORDER)) + (export "glMatrix.setMatrixArrayType" (func $assembly/common/setMatrixArrayType)) (export "glMatrix.toRadian" (func $assembly/common/toRadian)) (export "glMatrix.equals" (func $assembly/common/equals)) (export "mat2.create" (func $assembly/mat2/create)) @@ -361,9 +368,13 @@ (export "vec4.len" (global $assembly/vec4/len)) (export "vec4.sqrLen" (global $assembly/vec4/sqrLen)) (export "vec4.forEach" (global $assembly/vec4/forEach)) + (export "__new" (func $~lib/rt/itcms/__new)) + (export "__pin" (func $~lib/rt/itcms/__pin)) + (export "__unpin" (func $~lib/rt/itcms/__unpin)) + (export "__collect" (func $~lib/rt/itcms/__collect)) + (export "__rtti_base" (global $~lib/rt/__rtti_base)) (export "memory" (memory $0)) (export "__setArgumentsLength" (func $~setArgumentsLength)) - (export "glMatrix.setMatrixArrayType" (func $export:assembly/common/setMatrixArrayType)) (export "mat2.clone" (func $export:assembly/mat2/clone)) (export "mat2.copy" (func $export:assembly/mat2/copy)) (export "mat2.identity" (func $export:assembly/mat2/identity)) @@ -812,6 +823,10 @@ f64.const 1 f64.sub ) + (func $start:assembly/common + global.get $assembly/common/ArrayTypeEnum.Float64ArrayT + global.set $assembly/common/ARRAY_TYPE + ) (func $~lib/typedarray/Float64Array#__get (param $0 i32) (param $1 i32) (result f64) local.get $1 local.get $0 @@ -3935,16 +3950,6 @@ i32.const 3 i32.shr_u ) - (func $assembly/maths/Maths.min (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - i32.lt_s - if (result i32) - local.get $0 - else - local.get $1 - end - ) (func $start:assembly/vec3~anonymous|0 (result i32) i32.const 1040 ) @@ -9366,15 +9371,12 @@ call $start:assembly/vec2 ) (func $start:assembly/index + call $start:assembly/common call $start:assembly/mat2 ) (func $assembly/common/setMatrixArrayType (param $0 i32) - i32.const 2752 - i32.const 2816 - i32.const 20 - i32.const 3 - call $~lib/builtins/abort - unreachable + local.get $0 + global.set $assembly/common/ARRAY_TYPE ) (func $assembly/common/toRadian (param $0 f64) (result f64) local.get $0 @@ -10142,7 +10144,7 @@ local.set $22 local.get $18 local.set $21 - i32.const 3984 + i32.const 3856 local.get $13 i32.const 2 i32.shl @@ -10283,7 +10285,7 @@ i32.add global.set $~lib/util/number/_K local.get $10 - i32.const 3984 + i32.const 3856 i32.const 0 local.get $13 i32.sub @@ -11664,14 +11666,14 @@ i32.const 100 i32.rem_u local.set $7 - i32.const 4024 + i32.const 3896 local.get $6 i32.const 2 i32.shl i32.add i64.load32_u local.set $8 - i32.const 4024 + i32.const 3896 local.get $7 i32.const 2 i32.shl @@ -11714,7 +11716,7 @@ i32.const 2 i32.sub local.set $2 - i32.const 4024 + i32.const 3896 local.get $10 i32.const 2 i32.shl @@ -11737,7 +11739,7 @@ i32.const 2 i32.sub local.set $2 - i32.const 4024 + i32.const 3896 local.get $1 i32.const 2 i32.shl @@ -12257,14 +12259,14 @@ i32.shl i32.sub global.set $~lib/util/number/_K - i32.const 3112 + i32.const 2984 local.get $14 i32.const 3 i32.shl i32.add i64.load global.set $~lib/util/number/_frc_pow - i32.const 3808 + i32.const 3680 local.get $14 i32.const 1 i32.shl @@ -24579,7 +24581,7 @@ i64.sub i64.shl local.set $9 - i32.const 4624 + i32.const 4496 local.get $8 i32.const 3 i32.shl @@ -24587,7 +24589,7 @@ i64.load f64.reinterpret_i64 local.set $10 - i32.const 4624 + i32.const 4496 local.get $8 i32.const 3 i32.shl @@ -25610,7 +25612,7 @@ i64.and i64.sub local.set $16 - i32.const 6672 + i32.const 6544 local.get $14 i32.const 1 i32.const 3 @@ -25619,7 +25621,7 @@ i32.add f64.load local.set $11 - i32.const 6672 + i32.const 6544 local.get $14 i32.const 1 i32.const 3 @@ -25631,7 +25633,7 @@ local.get $16 f64.reinterpret_i64 local.set $9 - i32.const 8720 + i32.const 8592 local.get $14 i32.const 1 i32.const 3 @@ -25640,7 +25642,7 @@ i32.add f64.load local.set $8 - i32.const 8720 + i32.const 8592 local.get $14 i32.const 1 i32.const 3 @@ -31000,7 +31002,7 @@ i32.gt_u if i32.const 592 - i32.const 11248 + i32.const 11120 i32.const 14 i32.const 48 call $~lib/builtins/abort @@ -31073,7 +31075,7 @@ i32.lt_s if i32.const 144 - i32.const 11248 + i32.const 11120 i32.const 108 i32.const 22 call $~lib/builtins/abort @@ -31104,7 +31106,7 @@ i32.ge_u if i32.const 144 - i32.const 11248 + i32.const 11120 i32.const 92 i32.const 42 call $~lib/builtins/abort @@ -32500,6 +32502,128 @@ i32.const 0 end ) + (func $~lib/rt/itcms/__pin (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + if + local.get $0 + i32.const 20 + i32.sub + local.set $1 + local.get $1 + call $~lib/rt/itcms/Object#get:color + i32.const 3 + i32.eq + if + i32.const 11360 + i32.const 768 + i32.const 337 + i32.const 7 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/itcms/Object#unlink + local.get $1 + global.get $~lib/rt/itcms/pinSpace + i32.const 3 + call $~lib/rt/itcms/Object#linkTo + end + local.get $0 + ) + (func $~lib/rt/itcms/__unpin (param $0 i32) + (local $1 i32) + local.get $0 + i32.eqz + if + return + end + local.get $0 + i32.const 20 + i32.sub + local.set $1 + local.get $1 + call $~lib/rt/itcms/Object#get:color + i32.const 3 + i32.ne + if + i32.const 11424 + i32.const 768 + i32.const 351 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/rt/itcms/state + i32.const 1 + i32.eq + if + local.get $1 + call $~lib/rt/itcms/Object#makeGray + else + local.get $1 + call $~lib/rt/itcms/Object#unlink + local.get $1 + global.get $~lib/rt/itcms/fromSpace + global.get $~lib/rt/itcms/white + call $~lib/rt/itcms/Object#linkTo + end + ) + (func $~lib/rt/itcms/__collect + (local $0 i32) + i32.const 0 + drop + global.get $~lib/rt/itcms/state + i32.const 0 + i32.gt_s + if + loop $while-continue|0 + global.get $~lib/rt/itcms/state + i32.const 0 + i32.ne + local.set $0 + local.get $0 + if + call $~lib/rt/itcms/step + drop + br $while-continue|0 + end + end + end + call $~lib/rt/itcms/step + drop + loop $while-continue|1 + global.get $~lib/rt/itcms/state + i32.const 0 + i32.ne + local.set $0 + local.get $0 + if + call $~lib/rt/itcms/step + drop + br $while-continue|1 + end + end + global.get $~lib/rt/itcms/total + i64.extend_i32_u + i64.const 200 + i64.mul + i64.const 100 + i64.div_u + i32.wrap_i64 + i32.const 1024 + i32.add + global.set $~lib/rt/itcms/threshold + i32.const 0 + drop + i32.const 0 + if (result i32) + i32.const 1 + else + i32.const 0 + end + drop + ) (func $~lib/rt/__visit_globals (param $0 i32) (local $1 i32) i32.const 144 @@ -32511,6 +32635,12 @@ i32.const 704 local.get $0 call $~lib/rt/itcms/__visit + i32.const 11360 + local.get $0 + call $~lib/rt/itcms/__visit + i32.const 11424 + local.get $0 + call $~lib/rt/itcms/__visit global.get $assembly/common/ANGLE_ORDER local.tee $1 if @@ -32593,6 +32723,24 @@ call $~lib/rt/itcms/__visit end ) + (func $~lib/typedarray/Float64Array~visit (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/arraybuffer/ArrayBufferView~visit + ) + (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + i32.const 0 + drop + local.get $0 + i32.load + local.get $1 + call $~lib/rt/itcms/__visit + ) + (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/array/Array#__visit + ) (func $~lib/function/Function<%28%29=>f64>#__visit (param $0 i32) (param $1 i32) local.get $0 i32.load offset=4 @@ -32604,11 +32752,6 @@ local.get $1 call $~lib/function/Function<%28%29=>f64>#__visit ) - (func $~lib/typedarray/Float64Array~visit (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - call $~lib/arraybuffer/ArrayBufferView~visit - ) (func $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>#__visit (param $0 i32) (param $1 i32) local.get $0 i32.load offset=4 @@ -32881,69 +33024,50 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) - i32.const 0 - drop - local.get $0 - i32.load - local.get $1 - call $~lib/rt/itcms/__visit - ) - (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - call $~lib/array/Array#__visit - ) (func $~lib/rt/__visit_members (param $0 i32) (param $1 i32) block $invalid - block $~lib/array/Array - block $assembly/mat4/Fov - block $~lib/array/Array - block $~lib/array/Array<~lib/typedarray/Float64Array> - block $~lib/object/Object - block $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array> - block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> - block $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> - block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> - block $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> - block $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> - block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>bool> - block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> - block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> - block $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array> - block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> - block $~lib/function/Function<%28f64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array> - block $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> - block $~lib/function/Function<%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array> - block $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array> - block $assembly/imports/IArguments - block $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>f64> - block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>f64> - block $~lib/function/Function<%28f64%2Cf64%29=>f64> - block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> + block $assembly/mat4/Fov + block $~lib/array/Array + block $~lib/array/Array<~lib/typedarray/Float64Array> + block $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array> + block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> + block $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> + block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> + block $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> + block $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> + block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>bool> + block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> + block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> + block $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array> + block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> + block $~lib/function/Function<%28f64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array> + block $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> + block $~lib/function/Function<%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array> + block $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array> + block $assembly/imports/IArguments + block $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>f64> + block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>f64> + block $~lib/function/Function<%28f64%2Cf64%29=>f64> + block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> + block $~lib/function/Function<%28%29=>f64> + block $~lib/array/Array block $~lib/typedarray/Float64Array - block $~lib/function/Function<%28%29=>f64> - block $~lib/arraybuffer/ArrayBufferView - block $~lib/string/String - block $~lib/arraybuffer/ArrayBuffer - local.get $0 - i32.const 8 - i32.sub - i32.load - br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/arraybuffer/ArrayBufferView $~lib/function/Function<%28%29=>f64> $~lib/typedarray/Float64Array $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28f64%2Cf64%29=>f64> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>f64> $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>f64> $assembly/imports/IArguments $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28f64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>bool> $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/object/Object $~lib/array/Array<~lib/typedarray/Float64Array> $~lib/array/Array $assembly/mat4/Fov $~lib/array/Array $invalid - end - return + block $~lib/arraybuffer/ArrayBufferView + block $~lib/string/String + block $~lib/arraybuffer/ArrayBuffer + local.get $0 + i32.const 8 + i32.sub + i32.load + br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/arraybuffer/ArrayBufferView $~lib/typedarray/Float64Array $~lib/array/Array $~lib/function/Function<%28%29=>f64> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28f64%2Cf64%29=>f64> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>f64> $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>f64> $assembly/imports/IArguments $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28f64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>bool> $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/array/Array<~lib/typedarray/Float64Array> $~lib/array/Array $assembly/mat4/Fov $invalid end return end - local.get $0 - local.get $1 - call $~lib/arraybuffer/ArrayBufferView~visit return end local.get $0 local.get $1 - call $~lib/function/Function<%28%29=>f64>~visit + call $~lib/arraybuffer/ArrayBufferView~visit return end local.get $0 @@ -32953,118 +33077,121 @@ end local.get $0 local.get $1 - call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>~visit + call $~lib/array/Array~visit return end local.get $0 local.get $1 - call $~lib/function/Function<%28f64%2Cf64%29=>f64>~visit + call $~lib/function/Function<%28%29=>f64>~visit return end local.get $0 local.get $1 - call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>f64>~visit + call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>~visit return end local.get $0 local.get $1 - call $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>f64>~visit + call $~lib/function/Function<%28f64%2Cf64%29=>f64>~visit return end + local.get $0 + local.get $1 + call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>f64>~visit return end local.get $0 local.get $1 - call $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array>~visit + call $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>f64>~visit return end - local.get $0 - local.get $1 - call $~lib/function/Function<%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array>~visit return end local.get $0 local.get $1 - call $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>~visit + call $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array>~visit return end local.get $0 local.get $1 - call $~lib/function/Function<%28f64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array>~visit + call $~lib/function/Function<%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array>~visit return end local.get $0 local.get $1 - call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>~visit + call $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>~visit return end local.get $0 local.get $1 - call $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array>~visit + call $~lib/function/Function<%28f64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array>~visit return end local.get $0 local.get $1 - call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>~visit + call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>~visit return end local.get $0 local.get $1 - call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>~visit + call $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array>~visit return end local.get $0 local.get $1 - call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>bool>~visit + call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>~visit return end local.get $0 local.get $1 - call $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>~visit + call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>~visit return end local.get $0 local.get $1 - call $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>~visit + call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>bool>~visit return end local.get $0 local.get $1 - call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>~visit + call $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>~visit return end local.get $0 local.get $1 - call $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>~visit + call $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>~visit return end local.get $0 local.get $1 - call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>~visit + call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>~visit return end local.get $0 local.get $1 - call $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array>~visit + call $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>~visit return end + local.get $0 + local.get $1 + call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>~visit return end local.get $0 local.get $1 - call $~lib/array/Array<~lib/typedarray/Float64Array>~visit + call $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array>~visit return end local.get $0 local.get $1 - call $~lib/array/Array~visit + call $~lib/array/Array<~lib/typedarray/Float64Array>~visit return end + local.get $0 + local.get $1 + call $~lib/array/Array~visit return end - local.get $0 - local.get $1 - call $~lib/array/Array~visit return end unreachable @@ -33081,8 +33208,8 @@ global.get $~lib/memory/__data_end i32.lt_s if - i32.const 28128 - i32.const 28176 + i32.const 28112 + i32.const 28160 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -33092,8 +33219,10 @@ (func $start:assembly/vec3~anonymous|0~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (result i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) + (local $8 f64) + (local $9 f64) + (local $10 i32) + (local $11 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -33121,9 +33250,16 @@ i32.mul local.get $2 i32.add + f64.convert_i32_s + local.set $9 local.get $0 call $~lib/typedarray/Float64Array#get:length - call $assembly/maths/Maths.min + f64.convert_i32_s + local.set $8 + local.get $9 + local.get $8 + f64.min + i32.trunc_f64_s local.set $7 else local.get $0 @@ -33136,26 +33272,26 @@ local.get $6 local.get $7 i32.lt_s - local.set $8 - local.get $8 + local.set $10 + local.get $10 if global.get $assembly/vec3/vec - local.set $9 + local.set $11 global.get $~lib/memory/__stack_pointer - local.get $9 + local.get $11 i32.store - local.get $9 + local.get $11 i32.const 0 local.get $0 local.get $6 call $~lib/typedarray/Float64Array#__get call $~lib/typedarray/Float64Array#__set global.get $assembly/vec3/vec - local.set $9 + local.set $11 global.get $~lib/memory/__stack_pointer - local.get $9 + local.get $11 i32.store - local.get $9 + local.get $11 i32.const 1 local.get $0 local.get $6 @@ -33164,11 +33300,11 @@ call $~lib/typedarray/Float64Array#__get call $~lib/typedarray/Float64Array#__set global.get $assembly/vec3/vec - local.set $9 + local.set $11 global.get $~lib/memory/__stack_pointer - local.get $9 + local.get $11 i32.store - local.get $9 + local.get $11 i32.const 2 local.get $0 local.get $6 @@ -33177,17 +33313,17 @@ call $~lib/typedarray/Float64Array#__get call $~lib/typedarray/Float64Array#__set global.get $assembly/vec3/vec - local.set $9 + local.set $11 global.get $~lib/memory/__stack_pointer - local.get $9 + local.get $11 i32.store - local.get $9 + local.get $11 global.get $assembly/vec3/vec - local.set $9 + local.set $11 global.get $~lib/memory/__stack_pointer - local.get $9 + local.get $11 i32.store offset=4 - local.get $9 + local.get $11 local.get $5 i32.const 3 global.set $~argumentsLength @@ -33197,11 +33333,11 @@ local.get $0 local.get $6 global.get $assembly/vec3/vec - local.set $9 + local.set $11 global.get $~lib/memory/__stack_pointer - local.get $9 + local.get $11 i32.store - local.get $9 + local.get $11 i32.const 0 call $~lib/typedarray/Float64Array#__get call $~lib/typedarray/Float64Array#__set @@ -33210,11 +33346,11 @@ i32.const 1 i32.add global.get $assembly/vec3/vec - local.set $9 + local.set $11 global.get $~lib/memory/__stack_pointer - local.get $9 + local.get $11 i32.store - local.get $9 + local.get $11 i32.const 1 call $~lib/typedarray/Float64Array#__get call $~lib/typedarray/Float64Array#__set @@ -33223,11 +33359,11 @@ i32.const 2 i32.add global.get $assembly/vec3/vec - local.set $9 + local.set $11 global.get $~lib/memory/__stack_pointer - local.get $9 + local.get $11 i32.store - local.get $9 + local.get $11 i32.const 2 call $~lib/typedarray/Float64Array#__get call $~lib/typedarray/Float64Array#__set @@ -33239,18 +33375,20 @@ end end local.get $0 - local.set $9 + local.set $11 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $9 + local.get $11 ) (func $start:assembly/vec4~anonymous|0~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (result i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) + (local $8 f64) + (local $9 f64) + (local $10 i32) + (local $11 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -33278,9 +33416,16 @@ i32.mul local.get $2 i32.add + f64.convert_i32_s + local.set $9 local.get $0 call $~lib/typedarray/Float64Array#get:length - call $assembly/maths/Maths.min + f64.convert_i32_s + local.set $8 + local.get $9 + local.get $8 + f64.min + i32.trunc_f64_s local.set $7 else local.get $0 @@ -33293,26 +33438,26 @@ local.get $6 local.get $7 i32.lt_s - local.set $8 - local.get $8 + local.set $10 + local.get $10 if global.get $assembly/vec4/vec - local.set $9 + local.set $11 global.get $~lib/memory/__stack_pointer - local.get $9 + local.get $11 i32.store - local.get $9 + local.get $11 i32.const 0 local.get $0 local.get $6 call $~lib/typedarray/Float64Array#__get call $~lib/typedarray/Float64Array#__set global.get $assembly/vec4/vec - local.set $9 + local.set $11 global.get $~lib/memory/__stack_pointer - local.get $9 + local.get $11 i32.store - local.get $9 + local.get $11 i32.const 1 local.get $0 local.get $6 @@ -33321,11 +33466,11 @@ call $~lib/typedarray/Float64Array#__get call $~lib/typedarray/Float64Array#__set global.get $assembly/vec4/vec - local.set $9 + local.set $11 global.get $~lib/memory/__stack_pointer - local.get $9 + local.get $11 i32.store - local.get $9 + local.get $11 i32.const 2 local.get $0 local.get $6 @@ -33334,11 +33479,11 @@ call $~lib/typedarray/Float64Array#__get call $~lib/typedarray/Float64Array#__set global.get $assembly/vec4/vec - local.set $9 + local.set $11 global.get $~lib/memory/__stack_pointer - local.get $9 + local.get $11 i32.store - local.get $9 + local.get $11 i32.const 3 local.get $0 local.get $6 @@ -33347,17 +33492,17 @@ call $~lib/typedarray/Float64Array#__get call $~lib/typedarray/Float64Array#__set global.get $assembly/vec4/vec - local.set $9 + local.set $11 global.get $~lib/memory/__stack_pointer - local.get $9 + local.get $11 i32.store - local.get $9 + local.get $11 global.get $assembly/vec4/vec - local.set $9 + local.set $11 global.get $~lib/memory/__stack_pointer - local.get $9 + local.get $11 i32.store offset=4 - local.get $9 + local.get $11 local.get $5 i32.const 3 global.set $~argumentsLength @@ -33367,11 +33512,11 @@ local.get $0 local.get $6 global.get $assembly/vec4/vec - local.set $9 + local.set $11 global.get $~lib/memory/__stack_pointer - local.get $9 + local.get $11 i32.store - local.get $9 + local.get $11 i32.const 0 call $~lib/typedarray/Float64Array#__get call $~lib/typedarray/Float64Array#__set @@ -33380,11 +33525,11 @@ i32.const 1 i32.add global.get $assembly/vec4/vec - local.set $9 + local.set $11 global.get $~lib/memory/__stack_pointer - local.get $9 + local.get $11 i32.store - local.get $9 + local.get $11 i32.const 1 call $~lib/typedarray/Float64Array#__get call $~lib/typedarray/Float64Array#__set @@ -33393,11 +33538,11 @@ i32.const 2 i32.add global.get $assembly/vec4/vec - local.set $9 + local.set $11 global.get $~lib/memory/__stack_pointer - local.get $9 + local.get $11 i32.store - local.get $9 + local.get $11 i32.const 2 call $~lib/typedarray/Float64Array#__get call $~lib/typedarray/Float64Array#__set @@ -33406,11 +33551,11 @@ i32.const 3 i32.add global.get $assembly/vec4/vec - local.set $9 + local.set $11 global.get $~lib/memory/__stack_pointer - local.get $9 + local.get $11 i32.store - local.get $9 + local.get $11 i32.const 3 call $~lib/typedarray/Float64Array#__get call $~lib/typedarray/Float64Array#__set @@ -33422,12 +33567,12 @@ end end local.get $0 - local.set $9 + local.set $11 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $9 + local.get $11 ) (func $start:assembly/quat~anonymous|0~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 f64) @@ -33832,8 +33977,10 @@ (func $start:assembly/vec2~anonymous|0~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (result i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) + (local $8 f64) + (local $9 f64) + (local $10 i32) + (local $11 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -33861,9 +34008,16 @@ i32.mul local.get $2 i32.add + f64.convert_i32_s + local.set $9 local.get $0 call $~lib/typedarray/Float64Array#get:length - call $assembly/maths/Maths.min + f64.convert_i32_s + local.set $8 + local.get $9 + local.get $8 + f64.min + i32.trunc_f64_s local.set $7 else local.get $0 @@ -33876,26 +34030,26 @@ local.get $6 local.get $7 i32.lt_s - local.set $8 - local.get $8 + local.set $10 + local.get $10 if global.get $assembly/vec2/vec - local.set $9 + local.set $11 global.get $~lib/memory/__stack_pointer - local.get $9 + local.get $11 i32.store - local.get $9 + local.get $11 i32.const 0 local.get $0 local.get $6 call $~lib/typedarray/Float64Array#__get call $~lib/typedarray/Float64Array#__set global.get $assembly/vec2/vec - local.set $9 + local.set $11 global.get $~lib/memory/__stack_pointer - local.get $9 + local.get $11 i32.store - local.get $9 + local.get $11 i32.const 1 local.get $0 local.get $6 @@ -33904,17 +34058,17 @@ call $~lib/typedarray/Float64Array#__get call $~lib/typedarray/Float64Array#__set global.get $assembly/vec2/vec - local.set $9 + local.set $11 global.get $~lib/memory/__stack_pointer - local.get $9 + local.get $11 i32.store - local.get $9 + local.get $11 global.get $assembly/vec2/vec - local.set $9 + local.set $11 global.get $~lib/memory/__stack_pointer - local.get $9 + local.get $11 i32.store offset=4 - local.get $9 + local.get $11 local.get $5 i32.const 3 global.set $~argumentsLength @@ -33924,11 +34078,11 @@ local.get $0 local.get $6 global.get $assembly/vec2/vec - local.set $9 + local.set $11 global.get $~lib/memory/__stack_pointer - local.get $9 + local.get $11 i32.store - local.get $9 + local.get $11 i32.const 0 call $~lib/typedarray/Float64Array#__get call $~lib/typedarray/Float64Array#__set @@ -33937,11 +34091,11 @@ i32.const 1 i32.add global.get $assembly/vec2/vec - local.set $9 + local.set $11 global.get $~lib/memory/__stack_pointer - local.get $9 + local.get $11 i32.store - local.get $9 + local.get $11 i32.const 1 call $~lib/typedarray/Float64Array#__get call $~lib/typedarray/Float64Array#__set @@ -33953,12 +34107,12 @@ end end local.get $0 - local.set $9 + local.set $11 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $9 + local.get $11 ) (func $assembly/mat2/str (param $0 i32) (result i32) (local $1 i32) @@ -33991,7 +34145,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store offset=56 - i32.const 2880 + i32.const 2752 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34013,7 +34167,7 @@ local.get $1 i32.store offset=48 local.get $1 - i32.const 4480 + i32.const 4352 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34041,7 +34195,7 @@ local.get $1 i32.store offset=32 local.get $1 - i32.const 4480 + i32.const 4352 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34069,7 +34223,7 @@ local.get $1 i32.store offset=16 local.get $1 - i32.const 4480 + i32.const 4352 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34097,7 +34251,7 @@ local.get $1 i32.store local.get $1 - i32.const 4512 + i32.const 4384 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34154,7 +34308,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store offset=88 - i32.const 4544 + i32.const 4416 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34176,7 +34330,7 @@ local.get $1 i32.store offset=80 local.get $1 - i32.const 4480 + i32.const 4352 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34204,7 +34358,7 @@ local.get $1 i32.store offset=64 local.get $1 - i32.const 4480 + i32.const 4352 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34232,7 +34386,7 @@ local.get $1 i32.store offset=48 local.get $1 - i32.const 4480 + i32.const 4352 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34260,7 +34414,7 @@ local.get $1 i32.store offset=32 local.get $1 - i32.const 4480 + i32.const 4352 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34288,7 +34442,7 @@ local.get $1 i32.store offset=16 local.get $1 - i32.const 4480 + i32.const 4352 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34316,7 +34470,7 @@ local.get $1 i32.store local.get $1 - i32.const 4512 + i32.const 4384 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34391,7 +34545,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store offset=136 - i32.const 4576 + i32.const 4448 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34413,7 +34567,7 @@ local.get $1 i32.store offset=128 local.get $1 - i32.const 4480 + i32.const 4352 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34441,7 +34595,7 @@ local.get $1 i32.store offset=112 local.get $1 - i32.const 4480 + i32.const 4352 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34469,7 +34623,7 @@ local.get $1 i32.store offset=96 local.get $1 - i32.const 4480 + i32.const 4352 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34497,7 +34651,7 @@ local.get $1 i32.store offset=80 local.get $1 - i32.const 4480 + i32.const 4352 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34525,7 +34679,7 @@ local.get $1 i32.store offset=64 local.get $1 - i32.const 4480 + i32.const 4352 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34553,7 +34707,7 @@ local.get $1 i32.store offset=48 local.get $1 - i32.const 4480 + i32.const 4352 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34581,7 +34735,7 @@ local.get $1 i32.store offset=32 local.get $1 - i32.const 4480 + i32.const 4352 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34609,7 +34763,7 @@ local.get $1 i32.store offset=16 local.get $1 - i32.const 4480 + i32.const 4352 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34637,7 +34791,7 @@ local.get $1 i32.store local.get $1 - i32.const 4512 + i32.const 4384 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34754,7 +34908,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store offset=248 - i32.const 4608 + i32.const 4480 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34776,7 +34930,7 @@ local.get $1 i32.store offset=240 local.get $1 - i32.const 4480 + i32.const 4352 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34804,7 +34958,7 @@ local.get $1 i32.store offset=224 local.get $1 - i32.const 4480 + i32.const 4352 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34832,7 +34986,7 @@ local.get $1 i32.store offset=208 local.get $1 - i32.const 4480 + i32.const 4352 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34860,7 +35014,7 @@ local.get $1 i32.store offset=192 local.get $1 - i32.const 4480 + i32.const 4352 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34888,7 +35042,7 @@ local.get $1 i32.store offset=176 local.get $1 - i32.const 4480 + i32.const 4352 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34916,7 +35070,7 @@ local.get $1 i32.store offset=160 local.get $1 - i32.const 4480 + i32.const 4352 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34944,7 +35098,7 @@ local.get $1 i32.store offset=144 local.get $1 - i32.const 4480 + i32.const 4352 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -34972,7 +35126,7 @@ local.get $1 i32.store offset=128 local.get $1 - i32.const 4480 + i32.const 4352 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35000,7 +35154,7 @@ local.get $1 i32.store offset=112 local.get $1 - i32.const 4480 + i32.const 4352 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35028,7 +35182,7 @@ local.get $1 i32.store offset=96 local.get $1 - i32.const 4480 + i32.const 4352 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35056,7 +35210,7 @@ local.get $1 i32.store offset=80 local.get $1 - i32.const 4480 + i32.const 4352 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35084,7 +35238,7 @@ local.get $1 i32.store offset=64 local.get $1 - i32.const 4480 + i32.const 4352 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35112,7 +35266,7 @@ local.get $1 i32.store offset=48 local.get $1 - i32.const 4480 + i32.const 4352 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35140,7 +35294,7 @@ local.get $1 i32.store offset=32 local.get $1 - i32.const 4480 + i32.const 4352 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35168,7 +35322,7 @@ local.get $1 i32.store offset=16 local.get $1 - i32.const 4480 + i32.const 4352 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35196,7 +35350,7 @@ local.get $1 i32.store local.get $1 - i32.const 4512 + i32.const 4384 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35262,7 +35416,7 @@ call $~lib/math/NativeMath.cos local.set $11 local.get $4 - i32.const 10800 + i32.const 10672 i32.eq if local.get $0 @@ -35323,7 +35477,7 @@ call $~lib/typedarray/Float64Array#__set else local.get $4 - i32.const 10832 + i32.const 10704 i32.eq if local.get $0 @@ -35384,7 +35538,7 @@ call $~lib/typedarray/Float64Array#__set else local.get $4 - i32.const 10864 + i32.const 10736 i32.eq if local.get $0 @@ -35445,7 +35599,7 @@ call $~lib/typedarray/Float64Array#__set else local.get $4 - i32.const 10896 + i32.const 10768 i32.eq if local.get $0 @@ -35506,7 +35660,7 @@ call $~lib/typedarray/Float64Array#__set else local.get $4 - i32.const 10928 + i32.const 10800 i32.eq if local.get $0 @@ -35627,7 +35781,7 @@ f64.add call $~lib/typedarray/Float64Array#__set else - i32.const 10960 + i32.const 10832 local.set $12 global.get $~lib/memory/__stack_pointer local.get $12 @@ -35635,7 +35789,7 @@ local.get $12 local.get $4 call $~lib/string/String.__concat - i32.const 11024 + i32.const 10896 i32.const 512 i32.const 10 call $~lib/builtins/abort @@ -35685,7 +35839,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store offset=56 - i32.const 11088 + i32.const 10960 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35707,7 +35861,7 @@ local.get $1 i32.store offset=48 local.get $1 - i32.const 4480 + i32.const 4352 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35735,7 +35889,7 @@ local.get $1 i32.store offset=32 local.get $1 - i32.const 4480 + i32.const 4352 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35763,7 +35917,7 @@ local.get $1 i32.store offset=16 local.get $1 - i32.const 4480 + i32.const 4352 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35791,7 +35945,7 @@ local.get $1 i32.store local.get $1 - i32.const 4512 + i32.const 4384 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35860,7 +36014,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store offset=120 - i32.const 11120 + i32.const 10992 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35882,7 +36036,7 @@ local.get $1 i32.store offset=112 local.get $1 - i32.const 4480 + i32.const 4352 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35910,7 +36064,7 @@ local.get $1 i32.store offset=96 local.get $1 - i32.const 4480 + i32.const 4352 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35938,7 +36092,7 @@ local.get $1 i32.store offset=80 local.get $1 - i32.const 4480 + i32.const 4352 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35966,7 +36120,7 @@ local.get $1 i32.store offset=64 local.get $1 - i32.const 4480 + i32.const 4352 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -35994,7 +36148,7 @@ local.get $1 i32.store offset=48 local.get $1 - i32.const 4480 + i32.const 4352 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -36022,7 +36176,7 @@ local.get $1 i32.store offset=32 local.get $1 - i32.const 4480 + i32.const 4352 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -36050,7 +36204,7 @@ local.get $1 i32.store offset=16 local.get $1 - i32.const 4480 + i32.const 4352 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -36078,7 +36232,7 @@ local.get $1 i32.store local.get $1 - i32.const 4512 + i32.const 4384 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -36111,7 +36265,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store offset=24 - i32.const 11152 + i32.const 11024 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -36133,7 +36287,7 @@ local.get $1 i32.store offset=16 local.get $1 - i32.const 4480 + i32.const 4352 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -36161,7 +36315,7 @@ local.get $1 i32.store local.get $1 - i32.const 4512 + i32.const 4384 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -36200,7 +36354,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store offset=40 - i32.const 11424 + i32.const 11296 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -36222,7 +36376,7 @@ local.get $1 i32.store offset=32 local.get $1 - i32.const 4480 + i32.const 4352 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -36250,7 +36404,7 @@ local.get $1 i32.store offset=16 local.get $1 - i32.const 4480 + i32.const 4352 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -36278,7 +36432,7 @@ local.get $1 i32.store local.get $1 - i32.const 4512 + i32.const 4384 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -36323,7 +36477,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store offset=56 - i32.const 11456 + i32.const 11328 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -36345,7 +36499,7 @@ local.get $1 i32.store offset=48 local.get $1 - i32.const 4480 + i32.const 4352 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -36373,7 +36527,7 @@ local.get $1 i32.store offset=32 local.get $1 - i32.const 4480 + i32.const 4352 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -36401,7 +36555,7 @@ local.get $1 i32.store offset=16 local.get $1 - i32.const 4480 + i32.const 4352 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -36429,7 +36583,7 @@ local.get $1 i32.store local.get $1 - i32.const 4512 + i32.const 4384 local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 @@ -36531,7 +36685,7 @@ if global.get $~lib/memory/__stack_pointer i32.const 12 - i32.const 4 + i32.const 3 call $~lib/rt/itcms/__new local.tee $0 i32.store @@ -36568,18 +36722,23 @@ call $~lib/typedarray/Float64Array#constructor local.tee $0 i32.store - local.get $0 - i32.const 0 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - f64.const 0 - call $~lib/typedarray/Float64Array#__set + global.get $assembly/common/ARRAY_TYPE + global.get $assembly/common/ArrayTypeEnum.Float64ArrayT + i32.ne + if + local.get $0 + i32.const 0 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + end local.get $0 local.set $1 global.get $~lib/memory/__stack_pointer @@ -36605,22 +36764,27 @@ call $~lib/typedarray/Float64Array#constructor local.tee $0 i32.store - local.get $0 - i32.const 0 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - f64.const 0 - call $~lib/typedarray/Float64Array#__set + global.get $assembly/common/ARRAY_TYPE + global.get $assembly/common/ArrayTypeEnum.Float64ArrayT + i32.ne + if + local.get $0 + i32.const 0 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + end local.get $0 local.set $1 global.get $~lib/memory/__stack_pointer @@ -36773,18 +36937,23 @@ call $~lib/typedarray/Float64Array#constructor local.tee $0 i32.store - local.get $0 - i32.const 0 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - f64.const 0 - call $~lib/typedarray/Float64Array#__set + global.get $assembly/common/ARRAY_TYPE + global.get $assembly/common/ArrayTypeEnum.Float64ArrayT + i32.ne + if + local.get $0 + i32.const 0 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + end local.get $0 i32.const 3 f64.const 1 @@ -36814,30 +36983,35 @@ call $~lib/typedarray/Float64Array#constructor local.tee $0 i32.store - local.get $0 - i32.const 1 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 5 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 6 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 7 - f64.const 0 - call $~lib/typedarray/Float64Array#__set + global.get $assembly/common/ARRAY_TYPE + global.get $assembly/common/ArrayTypeEnum.Float64ArrayT + i32.ne + if + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + end local.get $0 i32.const 0 f64.const 1 @@ -36875,14 +37049,19 @@ call $~lib/typedarray/Float64Array#constructor local.tee $0 i32.store - local.get $0 - i32.const 0 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - f64.const 0 - call $~lib/typedarray/Float64Array#__set + global.get $assembly/common/ARRAY_TYPE + global.get $assembly/common/ArrayTypeEnum.Float64ArrayT + i32.ne + if + local.get $0 + i32.const 0 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + end local.get $0 local.set $1 global.get $~lib/memory/__stack_pointer @@ -36908,14 +37087,19 @@ call $~lib/typedarray/Float64Array#constructor local.tee $0 i32.store - local.get $0 - i32.const 1 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - f64.const 0 - call $~lib/typedarray/Float64Array#__set + global.get $assembly/common/ARRAY_TYPE + global.get $assembly/common/ArrayTypeEnum.Float64ArrayT + i32.ne + if + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + end local.get $0 i32.const 0 f64.const 1 @@ -37038,7 +37222,7 @@ f64.const 0 f64.eq if - i32.const 2912 + i32.const 2784 local.set $3 global.get $~lib/memory/__stack_pointer i32.const 4 @@ -37058,7 +37242,7 @@ local.get $0 f64.ne if - i32.const 2944 + i32.const 2816 local.set $3 global.get $~lib/memory/__stack_pointer i32.const 4 @@ -37067,8 +37251,8 @@ local.get $3 return end - i32.const 2976 - i32.const 3024 + i32.const 2848 + i32.const 2896 local.get $0 f64.const 0 f64.lt @@ -37081,7 +37265,7 @@ local.get $3 return end - i32.const 3056 + i32.const 2928 local.get $0 call $~lib/util/number/dtoa_core i32.const 1 @@ -37094,7 +37278,7 @@ local.tee $2 i32.store local.get $2 - i32.const 3056 + i32.const 2928 local.get $1 call $~lib/memory/memory.copy local.get $2 @@ -37137,7 +37321,7 @@ i32.const 0 i32.eq if - i32.const 4448 + i32.const 4320 local.set $6 global.get $~lib/memory/__stack_pointer i32.const 4 @@ -37320,22 +37504,27 @@ call $~lib/typedarray/Float64Array#constructor local.tee $0 i32.store - local.get $0 - i32.const 1 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 4 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 5 - f64.const 0 - call $~lib/typedarray/Float64Array#__set + global.get $assembly/common/ARRAY_TYPE + global.get $assembly/common/ArrayTypeEnum.Float64ArrayT + i32.ne + if + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + end local.get $0 i32.const 0 f64.const 1 @@ -37659,54 +37848,59 @@ call $~lib/typedarray/Float64Array#constructor local.tee $0 i32.store - local.get $0 - i32.const 1 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 4 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 6 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 7 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 8 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 9 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 11 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 12 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 13 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 14 - f64.const 0 - call $~lib/typedarray/Float64Array#__set + global.get $assembly/common/ARRAY_TYPE + global.get $assembly/common/ArrayTypeEnum.Float64ArrayT + i32.ne + if + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 8 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 9 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 11 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 12 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 13 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 14 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + end local.get $0 i32.const 0 f64.const 1 @@ -38500,34 +38694,39 @@ call $~lib/typedarray/Float64Array#constructor local.tee $0 i32.store - local.get $0 - i32.const 0 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 4 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 5 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 6 - f64.const 0 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 7 - f64.const 0 - call $~lib/typedarray/Float64Array#__set + global.get $assembly/common/ARRAY_TYPE + global.get $assembly/common/ArrayTypeEnum.Float64ArrayT + i32.ne + if + local.get $0 + i32.const 0 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 0 + call $~lib/typedarray/Float64Array#__set + end local.get $0 i32.const 3 f64.const 1 @@ -38955,16 +39154,16 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.const 3 - i32.const 29 - i32.const 11184 + i32.const 4 + i32.const 11056 call $~lib/rt/__newArray local.tee $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 0 i32.const 3 - i32.const 29 - i32.const 11216 + i32.const 4 + i32.const 11088 call $~lib/rt/__newArray local.tee $6 i32.store offset=4 @@ -39090,16 +39289,16 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.const 3 - i32.const 29 - i32.const 11296 + i32.const 4 + i32.const 11168 call $~lib/rt/__newArray local.tee $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 0 i32.const 3 - i32.const 29 - i32.const 11328 + i32.const 4 + i32.const 11200 call $~lib/rt/__newArray local.tee $6 i32.store offset=4 @@ -39225,16 +39424,16 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.const 3 - i32.const 29 - i32.const 11360 + i32.const 4 + i32.const 11232 call $~lib/rt/__newArray local.tee $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 0 i32.const 3 - i32.const 29 - i32.const 11392 + i32.const 4 + i32.const 11264 call $~lib/rt/__newArray local.tee $6 i32.store offset=4 @@ -39382,22 +39581,6 @@ global.set $~lib/memory/__stack_pointer local.get $5 ) - (func $export:assembly/common/setMatrixArrayType (param $0 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - local.get $0 - call $assembly/common/setMatrixArrayType - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - ) (func $export:assembly/mat2/clone (param $0 i32) (result i32) (local $1 i32) global.get $~lib/memory/__stack_pointer diff --git a/index.js b/index.js deleted file mode 100644 index 04bc3465..00000000 --- a/index.js +++ /dev/null @@ -1,5 +0,0 @@ -const fs = require("fs"); -const loader = require("@assemblyscript/loader"); -const imports = { /* imports go here */ }; -const wasmModule = loader.instantiateSync(fs.readFileSync(__dirname + "/build/optimized.wasm"), imports); -module.exports = wasmModule.exports; From 2b037760b5b108f85ee6023be88141650fc6f36f Mon Sep 17 00:00:00 2001 From: Huguenin-Elie Steve Date: Mon, 26 Apr 2021 16:37:30 +0200 Subject: [PATCH 30/32] loader moved loader release and debug to assembly/loader use as-bind for importing AS wasm loader produces declaration files only --- .size-snapshot.json | 6 +- assembly/loader/debug.js | 5 + assembly/loader/index.js | 58 + assembly/loader/release.js | 5 + assembly/loader/tsconfig.json | 13 + assembly/tsconfig.json | 9 +- build/loader-debug.js | 16 - build/loader-release.js | 16 - build/optimized.wat | 2422 +++++++++++++++++---------------- build/untouched.wat | 917 ++++++++++--- loader/.gitignore | 2 - loader/index.js | 16 - loader/tsconfig.json | 9 - package.json | 9 +- rollup.config.js | 29 +- tests/index.js | 27 +- 16 files changed, 2065 insertions(+), 1494 deletions(-) create mode 100644 assembly/loader/debug.js create mode 100644 assembly/loader/index.js create mode 100644 assembly/loader/release.js create mode 100644 assembly/loader/tsconfig.json delete mode 100644 build/loader-debug.js delete mode 100644 build/loader-release.js delete mode 100644 loader/.gitignore delete mode 100644 loader/index.js delete mode 100644 loader/tsconfig.json diff --git a/.size-snapshot.json b/.size-snapshot.json index 0cde2734..cb9d3d3e 100644 --- a/.size-snapshot.json +++ b/.size-snapshot.json @@ -5,8 +5,8 @@ "gzipped": 13273 }, "dist\\gl-matrix-min.js": { - "bundled": 54568, - "minified": 54478, - "gzipped": 13921 + "bundled": 54693, + "minified": 54603, + "gzipped": 13958 } } diff --git a/assembly/loader/debug.js b/assembly/loader/debug.js new file mode 100644 index 00000000..54f50c44 --- /dev/null +++ b/assembly/loader/debug.js @@ -0,0 +1,5 @@ +const fs = require("fs"); +const loader = require("@assemblyscript/loader"); +const imports = { /* imports go here */ }; +const wasmModule = loader.instantiateSync(fs.readFileSync(__dirname + "/build/untouched.wasm"), imports); +module.exports = wasmModule.exports; diff --git a/assembly/loader/index.js b/assembly/loader/index.js new file mode 100644 index 00000000..28032e8d --- /dev/null +++ b/assembly/loader/index.js @@ -0,0 +1,58 @@ +import { AsBind } from "as-bind"; +import path from "path" +import fs from "fs"; + +/** + * @module Wasm + */ + +export var response = { value: undefined, reference: undefined }; +export default response; + +const wasmFile = path.resolve(__dirname + "/build/untouched.wasm"); +const imports = [ +]; + +/** + * Instantiate and compile WebAssembly module + * @returns {Promise} wasm module + */ +async function module() { + return await AsBind.instantiate(fs.readFileSync(wasmFile), imports); +} + +/** + * Instantiate WebAssembly and return exports + * @returns {Promise} wasm exports + */ +async function exports() { + const wasmModule = await AsBind.instantiate(fs.readFileSync(wasmFile), imports); + return wasmModule.unboundExports; +} + +/** + * Call function from WebAssembly instance + * @param {String} moduleName name of the module called + * @param {String} functionName name of the function called + * @param {any[]} args arguments + */ +export async function call(moduleName, functionName, ...args) { + const wasmModule = await AsBind.instantiate(fs.readFileSync(wasmFile), imports); + response.value = wasmModule.unboundExports[moduleName][functionName](args); + if (typeof response.value === 'number') { + response.reference = response.value + response.value = wasmModule.unboundExports.__getArray(response.value) ?? response.value; + } + return response; +} + +/** + * Bind function from WebAssembly instance + * @param {String} moduleName name of the module called + * @param {String} functionName name of the function called + * @param {Symbol} args arguments + * @returns {Promise} function binding + */ +export function bind(moduleName, functionName) { + return call.bind(null, moduleName, functionName); +} diff --git a/assembly/loader/release.js b/assembly/loader/release.js new file mode 100644 index 00000000..04bc3465 --- /dev/null +++ b/assembly/loader/release.js @@ -0,0 +1,5 @@ +const fs = require("fs"); +const loader = require("@assemblyscript/loader"); +const imports = { /* imports go here */ }; +const wasmModule = loader.instantiateSync(fs.readFileSync(__dirname + "/build/optimized.wasm"), imports); +module.exports = wasmModule.exports; diff --git a/assembly/loader/tsconfig.json b/assembly/loader/tsconfig.json new file mode 100644 index 00000000..ed28dcf1 --- /dev/null +++ b/assembly/loader/tsconfig.json @@ -0,0 +1,13 @@ +{ + "extends": "assemblyscript/std/portable.json", + "compilerOptions": { + "module": "umd", + "outDir": "../dist/loader", + "allowJs": true, + "emitDeclarationOnly": true, + "declaration": true, + "checkJs": false + }, + "exclude": [ + ] +} diff --git a/assembly/tsconfig.json b/assembly/tsconfig.json index 4e33fb72..51f7bb09 100644 --- a/assembly/tsconfig.json +++ b/assembly/tsconfig.json @@ -1,9 +1,16 @@ { "extends": "assemblyscript/std/portable.json", + "compilerOptions": { + "module": "esnext", + "outDir": "../dist", + "declarationDir": "../dist/loader", + "declaration": true + }, "exclude": [ + "index.js", "./**/*.spec.ts" ], "include": [ - "./**/*.ts" + "./*.ts" ] } \ No newline at end of file diff --git a/build/loader-debug.js b/build/loader-debug.js deleted file mode 100644 index cce4a023..00000000 --- a/build/loader-debug.js +++ /dev/null @@ -1,16 +0,0 @@ -import wasm from './untouched.wasm'; - -var modules; - -(async (...imports) => { - wasm(imports).then(instance => { - modules = instance.exports; - }); -})(); - -export const { - glMatrix, - mat2, mat2d, mat3, mat4, - quat, quat2, - vec2, vec3, vec4 -} = modules; \ No newline at end of file diff --git a/build/loader-release.js b/build/loader-release.js deleted file mode 100644 index 392c452c..00000000 --- a/build/loader-release.js +++ /dev/null @@ -1,16 +0,0 @@ -import wasm from './optimized.wasm'; - -var modules; - -(async (...imports) => { - wasm(imports).then(instance => { - modules = instance.exports; - }); -})(); - -export const { - glMatrix, - mat2, mat2d, mat3, mat4, - quat, quat2, - vec2, vec3, vec4 -} = modules; \ No newline at end of file diff --git a/build/optimized.wat b/build/optimized.wat index 9fc1ac2a..0fbc50cd 100644 --- a/build/optimized.wat +++ b/build/optimized.wat @@ -47,9 +47,132 @@ (type $f64_f64_i32_=>_f64 (func (param f64 f64 i32) (result f64))) (import "env" "seed" (func $~lib/builtins/seed (result f64))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_entryfile_flag i32 (i32.const 1)) + (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_String_ID i32 (i32.const 1)) + (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_ArrayBuffer_ID i32 (i32.const 0)) + (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_ArrayBufferView_ID i32 (i32.const 2)) + (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Int8Array_ID i32 (i32.const 3)) + (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Uint8Array_ID i32 (i32.const 4)) + (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Int16Array_ID i32 (i32.const 5)) + (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Uint16Array_ID i32 (i32.const 6)) + (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Int32Array_ID i32 (i32.const 7)) + (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Uint32Array_ID i32 (i32.const 8)) + (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Float32Array_ID i32 (i32.const 9)) + (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Float64Array_ID i32 (i32.const 10)) + (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Int64Array_ID i32 (i32.const 11)) + (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Uint64Array_ID i32 (i32.const 12)) + (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_I32Array_ID i32 (i32.const 13)) + (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_I64Array_ID i32 (i32.const 14)) + (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_StringArray_ID i32 (i32.const 15)) + (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_BoolArray_ID i32 (i32.const 16)) + (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_I32ArrayArray_ID i32 (i32.const 17)) + (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_I64ArrayArray_ID i32 (i32.const 18)) + (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_StringArrayArray_ID i32 (i32.const 19)) + (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_BoolArrayArray_ID i32 (i32.const 20)) + (global $assembly/common/EPSILON f64 (f64.const 1e-06)) + (global $assembly/common/ArrayTypeEnum.Float64ArrayT i32 (i32.const 10)) + (global $assembly/common/ArrayTypeEnum.ArrayF64T i32 (i32.const 21)) + (global $assembly/common/ARRAY_TYPE (mut i32) (i32.const 0)) + (global $~lib/math/random_seeded (mut i32) (i32.const 0)) + (global $~lib/math/random_state0_64 (mut i64) (i64.const 0)) + (global $~lib/math/random_state1_64 (mut i64) (i64.const 0)) + (global $assembly/common/RANDOM (mut i32) (i32.const 1056)) + (global $assembly/common/ANGLE_ORDER (mut i32) (i32.const 1088)) + (global $assembly/mat2d/mul i32 (i32.const 1248)) + (global $assembly/mat2d/sub i32 (i32.const 1280)) + (global $assembly/vec3/sub i32 (i32.const 1312)) + (global $assembly/vec3/mul i32 (i32.const 1344)) + (global $assembly/vec3/div i32 (i32.const 1376)) + (global $assembly/vec3/dist i32 (i32.const 1440)) + (global $assembly/vec3/sqrDist i32 (i32.const 1472)) + (global $assembly/vec3/len i32 (i32.const 1504)) + (global $assembly/vec3/sqrLen i32 (i32.const 1536)) + (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) + (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) + (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) + (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) + (global $~lib/rt/itcms/iter (mut i32) (i32.const 0)) + (global $~lib/rt/itcms/toSpace (mut i32) (i32.const 0)) + (global $~lib/rt/itcms/white (mut i32) (i32.const 0)) + (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) + (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) + (global $assembly/vec3/vec (mut i32) (i32.const 0)) + (global $~argumentsLength (mut i32) (i32.const 0)) + (global $assembly/vec3/forEach (mut i32) (i32.const 0)) + (global $assembly/vec4/sub i32 (i32.const 2080)) + (global $assembly/vec4/mul i32 (i32.const 2112)) + (global $assembly/vec4/div i32 (i32.const 2144)) + (global $assembly/vec4/dist i32 (i32.const 2176)) + (global $assembly/vec4/sqrDist i32 (i32.const 2208)) + (global $assembly/vec4/len i32 (i32.const 2240)) + (global $assembly/vec4/sqrLen i32 (i32.const 2272)) + (global $assembly/vec4/vec (mut i32) (i32.const 0)) + (global $assembly/vec4/forEach (mut i32) (i32.const 0)) + (global $assembly/quat/clone i32 (i32.const 2368)) + (global $assembly/quat/fromValues i32 (i32.const 2400)) + (global $assembly/quat/copy i32 (i32.const 2432)) + (global $assembly/quat/set i32 (i32.const 2464)) + (global $assembly/quat/add i32 (i32.const 2496)) + (global $assembly/quat/mul i32 (i32.const 2528)) + (global $assembly/quat/scale i32 (i32.const 2560)) + (global $assembly/quat/dot i32 (i32.const 2592)) + (global $assembly/quat/lerp i32 (i32.const 2624)) + (global $assembly/quat/length i32 (i32.const 2240)) + (global $assembly/quat/len i32 (i32.const 2240)) + (global $assembly/quat/squaredLength i32 (i32.const 2272)) + (global $assembly/quat/sqrLen i32 (i32.const 2272)) + (global $assembly/quat/normalize i32 (i32.const 2656)) + (global $assembly/quat/exactEquals i32 (i32.const 2688)) + (global $assembly/quat/tmpvec3 (mut i32) (i32.const 0)) + (global $assembly/quat/xUnitVec3 (mut i32) (i32.const 0)) + (global $assembly/quat/yUnitVec3 (mut i32) (i32.const 0)) + (global $~lib/math/rempio2_y0 (mut f64) (f64.const 0)) + (global $~lib/math/rempio2_y1 (mut f64) (f64.const 0)) + (global $~lib/math/res128_hi (mut i64) (i64.const 0)) + (global $assembly/quat/rotationTo (mut i32) (i32.const 0)) + (global $assembly/quat/temp1 (mut i32) (i32.const 0)) + (global $assembly/quat/temp2 (mut i32) (i32.const 0)) + (global $assembly/quat/sqlerp (mut i32) (i32.const 0)) + (global $assembly/quat/matr (mut i32) (i32.const 0)) + (global $assembly/quat/setAxes (mut i32) (i32.const 0)) + (global $assembly/quat2/getReal i32 (i32.const 2432)) + (global $assembly/quat2/setReal i32 (i32.const 2432)) + (global $assembly/quat2/mul i32 (i32.const 3120)) + (global $assembly/quat2/dot i32 (i32.const 2592)) + (global $assembly/quat2/length i32 (i32.const 2240)) + (global $assembly/quat2/len i32 (i32.const 2240)) + (global $assembly/quat2/squaredLength i32 (i32.const 2272)) + (global $assembly/quat2/sqrLen i32 (i32.const 2272)) + (global $assembly/mat4/perspective i32 (i32.const 3184)) + (global $assembly/mat4/ortho i32 (i32.const 3216)) + (global $assembly/mat4/mul i32 (i32.const 3248)) + (global $assembly/mat4/sub i32 (i32.const 3280)) + (global $assembly/mat3/mul i32 (i32.const 3312)) + (global $assembly/mat3/sub i32 (i32.const 3344)) + (global $assembly/vec2/len i32 (i32.const 3376)) + (global $assembly/vec2/sub i32 (i32.const 3408)) + (global $assembly/vec2/mul i32 (i32.const 3440)) + (global $assembly/vec2/div i32 (i32.const 3472)) + (global $assembly/vec2/dist i32 (i32.const 3504)) + (global $assembly/vec2/sqrDist i32 (i32.const 3536)) + (global $assembly/vec2/sqrLen i32 (i32.const 3568)) + (global $assembly/vec2/vec (mut i32) (i32.const 0)) + (global $assembly/vec2/forEach (mut i32) (i32.const 0)) + (global $assembly/mat2/mul i32 (i32.const 3664)) + (global $assembly/mat2/sub i32 (i32.const 3696)) + (global $~lib/util/number/_frc_plus (mut i64) (i64.const 0)) + (global $~lib/util/number/_frc_minus (mut i64) (i64.const 0)) + (global $~lib/util/number/_exp (mut i32) (i32.const 0)) + (global $~lib/util/number/_K (mut i32) (i32.const 0)) + (global $~lib/util/number/_frc_pow (mut i64) (i64.const 0)) + (global $~lib/util/number/_exp_pow (mut i32) (i32.const 0)) + (global $assembly/mat4/Fov i32 (i32.const 44)) + (global $~lib/rt/__rtti_base i32 (i32.const 12448)) + (global $~lib/memory/__stack_pointer (mut i32) (i32.const 29196)) (memory $0 1) (data (i32.const 1036) "\1c") - (data (i32.const 1048) "\05\00\00\00\08\00\00\00\01") + (data (i32.const 1048) "\16\00\00\00\08\00\00\00\01") (data (i32.const 1068) "\1c") (data (i32.const 1080) "\01\00\00\00\06\00\00\00z\00y\00x") (data (i32.const 1100) "<") @@ -57,25 +180,25 @@ (data (i32.const 1164) "<") (data (i32.const 1176) "\01\00\00\00$\00\00\00~\00l\00i\00b\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s") (data (i32.const 1228) "\1c") - (data (i32.const 1240) "\06\00\00\00\08\00\00\00\02") + (data (i32.const 1240) "\17\00\00\00\08\00\00\00\02") (data (i32.const 1260) "\1c") - (data (i32.const 1272) "\06\00\00\00\08\00\00\00\03") + (data (i32.const 1272) "\17\00\00\00\08\00\00\00\03") (data (i32.const 1292) "\1c") - (data (i32.const 1304) "\06\00\00\00\08\00\00\00\04") + (data (i32.const 1304) "\17\00\00\00\08\00\00\00\04") (data (i32.const 1324) "\1c") - (data (i32.const 1336) "\06\00\00\00\08\00\00\00\05") + (data (i32.const 1336) "\17\00\00\00\08\00\00\00\05") (data (i32.const 1356) "\1c") - (data (i32.const 1368) "\06\00\00\00\08\00\00\00\06") + (data (i32.const 1368) "\17\00\00\00\08\00\00\00\06") (data (i32.const 1388) "\1c") - (data (i32.const 1400) "\07\00\00\00\08\00\00\00\07") + (data (i32.const 1400) "\18\00\00\00\08\00\00\00\07") (data (i32.const 1420) "\1c") - (data (i32.const 1432) "\08\00\00\00\08\00\00\00\08") + (data (i32.const 1432) "\19\00\00\00\08\00\00\00\08") (data (i32.const 1452) "\1c") - (data (i32.const 1464) "\08\00\00\00\08\00\00\00\t") + (data (i32.const 1464) "\19\00\00\00\08\00\00\00\t") (data (i32.const 1484) "\1c") - (data (i32.const 1496) "\t\00\00\00\08\00\00\00\n") + (data (i32.const 1496) "\1a\00\00\00\08\00\00\00\n") (data (i32.const 1516) "\1c") - (data (i32.const 1528) "\t\00\00\00\08\00\00\00\0b") + (data (i32.const 1528) "\1a\00\00\00\08\00\00\00\0b") (data (i32.const 1548) ",") (data (i32.const 1560) "\01\00\00\00\1c\00\00\00I\00n\00v\00a\00l\00i\00d\00 \00l\00e\00n\00g\00t\00h") (data (i32.const 1596) "<") @@ -89,100 +212,100 @@ (data (i32.const 1932) "<") (data (i32.const 1944) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s") (data (i32.const 1996) "\1c") - (data (i32.const 2008) "\0c\00\00\00\08\00\00\00\0c") + (data (i32.const 2008) "\1d\00\00\00\08\00\00\00\0c") (data (i32.const 2028) "\1c") - (data (i32.const 2040) "\0b\00\00\00\08\00\00\00\0d") + (data (i32.const 2040) "\1c\00\00\00\08\00\00\00\0d") (data (i32.const 2060) "\1c") - (data (i32.const 2072) "\06\00\00\00\08\00\00\00\0e") + (data (i32.const 2072) "\17\00\00\00\08\00\00\00\0e") (data (i32.const 2092) "\1c") - (data (i32.const 2104) "\06\00\00\00\08\00\00\00\0f") + (data (i32.const 2104) "\17\00\00\00\08\00\00\00\0f") (data (i32.const 2124) "\1c") - (data (i32.const 2136) "\06\00\00\00\08\00\00\00\10") + (data (i32.const 2136) "\17\00\00\00\08\00\00\00\10") (data (i32.const 2156) "\1c") - (data (i32.const 2168) "\08\00\00\00\08\00\00\00\11") + (data (i32.const 2168) "\19\00\00\00\08\00\00\00\11") (data (i32.const 2188) "\1c") - (data (i32.const 2200) "\08\00\00\00\08\00\00\00\12") + (data (i32.const 2200) "\19\00\00\00\08\00\00\00\12") (data (i32.const 2220) "\1c") - (data (i32.const 2232) "\t\00\00\00\08\00\00\00\13") + (data (i32.const 2232) "\1a\00\00\00\08\00\00\00\13") (data (i32.const 2252) "\1c") - (data (i32.const 2264) "\t\00\00\00\08\00\00\00\14") + (data (i32.const 2264) "\1a\00\00\00\08\00\00\00\14") (data (i32.const 2284) "\1c") - (data (i32.const 2296) "\0c\00\00\00\08\00\00\00\15") + (data (i32.const 2296) "\1d\00\00\00\08\00\00\00\15") (data (i32.const 2316) "\1c") - (data (i32.const 2328) "\0b\00\00\00\08\00\00\00\16") + (data (i32.const 2328) "\1c\00\00\00\08\00\00\00\16") (data (i32.const 2348) "\1c") - (data (i32.const 2360) "\0d\00\00\00\08\00\00\00\17") + (data (i32.const 2360) "\1e\00\00\00\08\00\00\00\17") (data (i32.const 2380) "\1c") - (data (i32.const 2392) "\0e\00\00\00\08\00\00\00\18") + (data (i32.const 2392) "\1f\00\00\00\08\00\00\00\18") (data (i32.const 2412) "\1c") - (data (i32.const 2424) "\0f\00\00\00\08\00\00\00\19") + (data (i32.const 2424) " \00\00\00\08\00\00\00\19") (data (i32.const 2444) "\1c") - (data (i32.const 2456) "\10\00\00\00\08\00\00\00\1a") + (data (i32.const 2456) "!\00\00\00\08\00\00\00\1a") (data (i32.const 2476) "\1c") - (data (i32.const 2488) "\06\00\00\00\08\00\00\00\1b") + (data (i32.const 2488) "\17\00\00\00\08\00\00\00\1b") (data (i32.const 2508) "\1c") - (data (i32.const 2520) "\06\00\00\00\08\00\00\00\1c") + (data (i32.const 2520) "\17\00\00\00\08\00\00\00\1c") (data (i32.const 2540) "\1c") - (data (i32.const 2552) "\11\00\00\00\08\00\00\00\1d") + (data (i32.const 2552) "\"\00\00\00\08\00\00\00\1d") (data (i32.const 2572) "\1c") - (data (i32.const 2584) "\08\00\00\00\08\00\00\00\1e") + (data (i32.const 2584) "\19\00\00\00\08\00\00\00\1e") (data (i32.const 2604) "\1c") - (data (i32.const 2616) "\12\00\00\00\08\00\00\00\1f") + (data (i32.const 2616) "#\00\00\00\08\00\00\00\1f") (data (i32.const 2636) "\1c") - (data (i32.const 2648) "\0f\00\00\00\08\00\00\00 ") + (data (i32.const 2648) " \00\00\00\08\00\00\00 ") (data (i32.const 2668) "\1c") - (data (i32.const 2680) "\13\00\00\00\08\00\00\00!") + (data (i32.const 2680) "$\00\00\00\08\00\00\00!") (data (i32.const 2704) "n\83\f9\a2\00\00\00\00\d1W\'\fc)\15DN\99\95b\db\c0\dd4\f5\abcQ\feA\90C<:n$\b7a\c5\bb\de\ea.I\06\e0\d2MB\1c\eb\1d\fe\1c\92\d1\t\f55\82\e8>\a7)\b1&p\9c\e9\84D\bb.9\d6\919A~_\b4\8b_\84\9c\f49S\83\ff\97\f8\1f;(\f9\bd\8b\11/\ef\0f\98\05\de\cf~6m\1fm\nZf?FO\b7\t\cb\'\c7\ba\'u-\ea_\9e\f79\07={\f1\e5\eb\b1_\fbk\ea\92R\8aF0\03V\08]\8d\1f \bc\cf\f0\abk{\fca\91\e3\a9\1d6\f4\9a_\85\99e\08\1b\e6^\80\d8\ff\8d@h\a0\14W\15\06\061\'sM") (data (i32.const 2908) "\1c") - (data (i32.const 2920) "\06\00\00\00\08\00\00\00\"") + (data (i32.const 2920) "\17\00\00\00\08\00\00\00\"") (data (i32.const 2940) "\1c") - (data (i32.const 2952) "\14\00\00\00\08\00\00\00#") + (data (i32.const 2952) "%\00\00\00\08\00\00\00#") (data (i32.const 2972) "\1c") - (data (i32.const 2984) "\16\00\00\00\08\00\00\00$") + (data (i32.const 2984) "\'\00\00\00\08\00\00\00$") (data (i32.const 3004) "\1c") - (data (i32.const 3016) "\15\00\00\00\08\00\00\00%") + (data (i32.const 3016) "&\00\00\00\08\00\00\00%") (data (i32.const 3036) "\1c") - (data (i32.const 3048) "\18\00\00\00\08\00\00\00&") + (data (i32.const 3048) ")\00\00\00\08\00\00\00&") (data (i32.const 3068) "\1c") - (data (i32.const 3080) "\17\00\00\00\08\00\00\00\'") + (data (i32.const 3080) "(\00\00\00\08\00\00\00\'") (data (i32.const 3100) "\1c") - (data (i32.const 3112) "\06\00\00\00\08\00\00\00(") + (data (i32.const 3112) "\17\00\00\00\08\00\00\00(") (data (i32.const 3132) "\1c") (data (i32.const 3144) "\01\00\00\00\0c\00\00\00n\00u\00m\00b\00e\00r") (data (i32.const 3164) "\1c") - (data (i32.const 3176) "\10\00\00\00\08\00\00\00)") + (data (i32.const 3176) "!\00\00\00\08\00\00\00)") (data (i32.const 3196) "\1c") - (data (i32.const 3208) "\19\00\00\00\08\00\00\00*") + (data (i32.const 3208) "*\00\00\00\08\00\00\00*") (data (i32.const 3228) "\1c") - (data (i32.const 3240) "\06\00\00\00\08\00\00\00+") + (data (i32.const 3240) "\17\00\00\00\08\00\00\00+") (data (i32.const 3260) "\1c") - (data (i32.const 3272) "\06\00\00\00\08\00\00\00,") + (data (i32.const 3272) "\17\00\00\00\08\00\00\00,") (data (i32.const 3292) "\1c") - (data (i32.const 3304) "\06\00\00\00\08\00\00\00-") + (data (i32.const 3304) "\17\00\00\00\08\00\00\00-") (data (i32.const 3324) "\1c") - (data (i32.const 3336) "\06\00\00\00\08\00\00\00.") + (data (i32.const 3336) "\17\00\00\00\08\00\00\00.") (data (i32.const 3356) "\1c") - (data (i32.const 3368) "\t\00\00\00\08\00\00\00/") + (data (i32.const 3368) "\1a\00\00\00\08\00\00\00/") (data (i32.const 3388) "\1c") - (data (i32.const 3400) "\06\00\00\00\08\00\00\000") + (data (i32.const 3400) "\17\00\00\00\08\00\00\000") (data (i32.const 3420) "\1c") - (data (i32.const 3432) "\06\00\00\00\08\00\00\001") + (data (i32.const 3432) "\17\00\00\00\08\00\00\001") (data (i32.const 3452) "\1c") - (data (i32.const 3464) "\06\00\00\00\08\00\00\002") + (data (i32.const 3464) "\17\00\00\00\08\00\00\002") (data (i32.const 3484) "\1c") - (data (i32.const 3496) "\08\00\00\00\08\00\00\003") + (data (i32.const 3496) "\19\00\00\00\08\00\00\003") (data (i32.const 3516) "\1c") - (data (i32.const 3528) "\08\00\00\00\08\00\00\004") + (data (i32.const 3528) "\19\00\00\00\08\00\00\004") (data (i32.const 3548) "\1c") - (data (i32.const 3560) "\t\00\00\00\08\00\00\005") + (data (i32.const 3560) "\1a\00\00\00\08\00\00\005") (data (i32.const 3580) "\1c") - (data (i32.const 3592) "\0c\00\00\00\08\00\00\006") + (data (i32.const 3592) "\1d\00\00\00\08\00\00\006") (data (i32.const 3612) "\1c") - (data (i32.const 3624) "\0b\00\00\00\08\00\00\007") + (data (i32.const 3624) "\1c\00\00\00\08\00\00\007") (data (i32.const 3644) "\1c") - (data (i32.const 3656) "\06\00\00\00\08\00\00\008") + (data (i32.const 3656) "\17\00\00\00\08\00\00\008") (data (i32.const 3676) "\1c") - (data (i32.const 3688) "\06\00\00\00\08\00\00\009") + (data (i32.const 3688) "\17\00\00\00\08\00\00\009") (data (i32.const 3708) "\1c") (data (i32.const 3720) "\01\00\00\00\n\00\00\00m\00a\00t\002\00(") (data (i32.const 3740) "\1c") @@ -248,113 +371,34 @@ (data (i32.const 12328) "\01\00\00\00*\00\00\00O\00b\00j\00e\00c\00t\00 \00a\00l\00r\00e\00a\00d\00y\00 \00p\00i\00n\00n\00e\00d") (data (i32.const 12380) "<") (data (i32.const 12392) "\01\00\00\00(\00\00\00O\00b\00j\00e\00c\00t\00 \00i\00s\00 \00n\00o\00t\00 \00p\00i\00n\00n\00e\00d") - (data (i32.const 12448) "\1d\00\00\00 \00\00\00\00\00\00\00 ") - (data (i32.const 12476) "\01\1a\00\00\02\00\00\00\02\1a") - (data (i32.const 12532) " ") - (data (i32.const 12660) "\02A\00\00\00\00\00\00\02\t\00\00\00\00\00\00 ") + (data (i32.const 12448) "-\00\00\00 \00\00\00\00\00\00\00 ") + (data (i32.const 12476) "A\08\00\00\02\00\00\00A\00\00\00\02\00\00\00\81\08\00\00\02\00\00\00\81\00\00\00\02\00\00\00\01\t\00\00\02\00\00\00\01\01\00\00\02\00\00\00\01\19\00\00\02\00\00\00\01\1a\00\00\02\00\00\00\01\n\00\00\02\00\00\00\01\02\00\00\02\00\00\00\02\t\00\00\00\00\00\00\02\n\00\00\00\00\00\00\02A\00\00\00\00\00\00B\00\00\00\00\00\00\00\02A\00\00\00\00\00\00\02A\00\00\00\00\00\00\02A\00\00\00\00\00\00\02A\00\00\00\00\00\00\02\1a") + (data (i32.const 12668) " ") + (data (i32.const 12796) "\02A\00\00\00\00\00\00 ") (table $0 58 funcref) - (elem (i32.const 1) $~lib/math/NativeMath.random $assembly/mat2d/multiply $assembly/mat2d/subtract $assembly/vec3/subtract $assembly/vec3/multiply $assembly/vec3/divide $~lib/math/NativeMath.hypot $assembly/vec3/distance $assembly/vec3/squaredDistance $assembly/vec3/length $assembly/vec3/squaredLength $start:assembly/vec3~anonymous|0~anonymous|0 $start:assembly/vec3~anonymous|0 $assembly/vec4/subtract $assembly/vec4/multiply $assembly/vec4/divide $assembly/vec4/distance $assembly/vec4/squaredDistance $assembly/vec4/length $assembly/vec4/squaredLength $start:assembly/vec4~anonymous|0~anonymous|0 $start:assembly/vec4~anonymous|0 $assembly/vec4/clone $assembly/vec4/fromValues $assembly/vec4/copy $assembly/vec4/set $assembly/vec4/add $assembly/quat/multiply $assembly/vec4/scale $assembly/vec4/dot $assembly/vec4/lerp $assembly/vec4/normalize $assembly/vec4/exactEquals $start:assembly/quat~anonymous|0~anonymous|0 $start:assembly/quat~anonymous|0 $start:assembly/quat~anonymous|1~anonymous|0 $start:assembly/quat~anonymous|1 $start:assembly/quat~anonymous|2~anonymous|0 $start:assembly/quat~anonymous|2 $assembly/quat2/multiply $assembly/mat4/perspectiveNO $assembly/mat4/orthoNO $assembly/mat4/multiply $assembly/mat4/subtract $assembly/mat3/multiply $assembly/mat3/subtract $assembly/vec2/length $assembly/vec2/subtract $assembly/vec2/multiply $assembly/vec2/divide $assembly/vec2/distance $assembly/vec2/squaredDistance $assembly/vec2/squaredLength $start:assembly/vec2~anonymous|0~anonymous|0 $start:assembly/vec2~anonymous|0 $assembly/mat2/multiply $assembly/vec4/subtract) - (global $assembly/common/EPSILON f64 (f64.const 1e-06)) - (global $assembly/common/ArrayTypeEnum.Float64ArrayT i32 (i32.const 3)) - (global $assembly/common/ArrayTypeEnum.ArrayF64T i32 (i32.const 4)) - (global $assembly/common/ARRAY_TYPE (mut i32) (i32.const 0)) - (global $~lib/math/random_seeded (mut i32) (i32.const 0)) - (global $~lib/math/random_state0_64 (mut i64) (i64.const 0)) - (global $~lib/math/random_state1_64 (mut i64) (i64.const 0)) - (global $assembly/common/RANDOM (mut i32) (i32.const 1056)) - (global $assembly/common/ANGLE_ORDER (mut i32) (i32.const 1088)) - (global $assembly/mat2d/mul i32 (i32.const 1248)) - (global $assembly/mat2d/sub i32 (i32.const 1280)) - (global $assembly/vec3/sub i32 (i32.const 1312)) - (global $assembly/vec3/mul i32 (i32.const 1344)) - (global $assembly/vec3/div i32 (i32.const 1376)) - (global $assembly/vec3/dist i32 (i32.const 1440)) - (global $assembly/vec3/sqrDist i32 (i32.const 1472)) - (global $assembly/vec3/len i32 (i32.const 1504)) - (global $assembly/vec3/sqrLen i32 (i32.const 1536)) - (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/iter (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/toSpace (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/white (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) - (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $assembly/vec3/vec (mut i32) (i32.const 0)) - (global $~argumentsLength (mut i32) (i32.const 0)) - (global $assembly/vec3/forEach (mut i32) (i32.const 0)) - (global $assembly/vec4/sub i32 (i32.const 2080)) - (global $assembly/vec4/mul i32 (i32.const 2112)) - (global $assembly/vec4/div i32 (i32.const 2144)) - (global $assembly/vec4/dist i32 (i32.const 2176)) - (global $assembly/vec4/sqrDist i32 (i32.const 2208)) - (global $assembly/vec4/len i32 (i32.const 2240)) - (global $assembly/vec4/sqrLen i32 (i32.const 2272)) - (global $assembly/vec4/vec (mut i32) (i32.const 0)) - (global $assembly/vec4/forEach (mut i32) (i32.const 0)) - (global $assembly/quat/clone i32 (i32.const 2368)) - (global $assembly/quat/fromValues i32 (i32.const 2400)) - (global $assembly/quat/copy i32 (i32.const 2432)) - (global $assembly/quat/set i32 (i32.const 2464)) - (global $assembly/quat/add i32 (i32.const 2496)) - (global $assembly/quat/mul i32 (i32.const 2528)) - (global $assembly/quat/scale i32 (i32.const 2560)) - (global $assembly/quat/dot i32 (i32.const 2592)) - (global $assembly/quat/lerp i32 (i32.const 2624)) - (global $assembly/quat/length i32 (i32.const 2240)) - (global $assembly/quat/len i32 (i32.const 2240)) - (global $assembly/quat/squaredLength i32 (i32.const 2272)) - (global $assembly/quat/sqrLen i32 (i32.const 2272)) - (global $assembly/quat/normalize i32 (i32.const 2656)) - (global $assembly/quat/exactEquals i32 (i32.const 2688)) - (global $assembly/quat/tmpvec3 (mut i32) (i32.const 0)) - (global $assembly/quat/xUnitVec3 (mut i32) (i32.const 0)) - (global $assembly/quat/yUnitVec3 (mut i32) (i32.const 0)) - (global $~lib/math/rempio2_y0 (mut f64) (f64.const 0)) - (global $~lib/math/rempio2_y1 (mut f64) (f64.const 0)) - (global $~lib/math/res128_hi (mut i64) (i64.const 0)) - (global $assembly/quat/rotationTo (mut i32) (i32.const 0)) - (global $assembly/quat/temp1 (mut i32) (i32.const 0)) - (global $assembly/quat/temp2 (mut i32) (i32.const 0)) - (global $assembly/quat/sqlerp (mut i32) (i32.const 0)) - (global $assembly/quat/matr (mut i32) (i32.const 0)) - (global $assembly/quat/setAxes (mut i32) (i32.const 0)) - (global $assembly/quat2/getReal i32 (i32.const 2432)) - (global $assembly/quat2/setReal i32 (i32.const 2432)) - (global $assembly/quat2/mul i32 (i32.const 3120)) - (global $assembly/quat2/dot i32 (i32.const 2592)) - (global $assembly/quat2/length i32 (i32.const 2240)) - (global $assembly/quat2/len i32 (i32.const 2240)) - (global $assembly/quat2/squaredLength i32 (i32.const 2272)) - (global $assembly/quat2/sqrLen i32 (i32.const 2272)) - (global $assembly/mat4/perspective i32 (i32.const 3184)) - (global $assembly/mat4/ortho i32 (i32.const 3216)) - (global $assembly/mat4/mul i32 (i32.const 3248)) - (global $assembly/mat4/sub i32 (i32.const 3280)) - (global $assembly/mat3/mul i32 (i32.const 3312)) - (global $assembly/mat3/sub i32 (i32.const 3344)) - (global $assembly/vec2/len i32 (i32.const 3376)) - (global $assembly/vec2/sub i32 (i32.const 3408)) - (global $assembly/vec2/mul i32 (i32.const 3440)) - (global $assembly/vec2/div i32 (i32.const 3472)) - (global $assembly/vec2/dist i32 (i32.const 3504)) - (global $assembly/vec2/sqrDist i32 (i32.const 3536)) - (global $assembly/vec2/sqrLen i32 (i32.const 3568)) - (global $assembly/vec2/vec (mut i32) (i32.const 0)) - (global $assembly/vec2/forEach (mut i32) (i32.const 0)) - (global $assembly/mat2/mul i32 (i32.const 3664)) - (global $assembly/mat2/sub i32 (i32.const 3696)) - (global $~lib/util/number/_frc_plus (mut i64) (i64.const 0)) - (global $~lib/util/number/_frc_minus (mut i64) (i64.const 0)) - (global $~lib/util/number/_exp (mut i32) (i32.const 0)) - (global $~lib/util/number/_K (mut i32) (i32.const 0)) - (global $~lib/util/number/_frc_pow (mut i64) (i64.const 0)) - (global $~lib/util/number/_exp_pow (mut i32) (i32.const 0)) - (global $assembly/mat4/Fov i32 (i32.const 28)) - (global $~lib/rt/__rtti_base i32 (i32.const 12448)) - (global $~lib/memory/__stack_pointer (mut i32) (i32.const 29068)) + (elem $0 (i32.const 1) $~lib/math/NativeMath.random $assembly/mat2d/multiply $assembly/mat2d/subtract $assembly/vec3/subtract $assembly/vec3/multiply $assembly/vec3/divide $~lib/math/NativeMath.hypot $assembly/vec3/distance $assembly/vec3/squaredDistance $assembly/vec3/length $assembly/vec3/squaredLength $start:assembly/vec3~anonymous|0~anonymous|0 $start:assembly/vec3~anonymous|0 $assembly/vec4/subtract $assembly/vec4/multiply $assembly/vec4/divide $assembly/vec4/distance $assembly/vec4/squaredDistance $assembly/vec4/length $assembly/vec4/squaredLength $start:assembly/vec4~anonymous|0~anonymous|0 $start:assembly/vec4~anonymous|0 $assembly/vec4/clone $assembly/vec4/fromValues $assembly/vec4/copy $assembly/vec4/set $assembly/vec4/add $assembly/quat/multiply $assembly/vec4/scale $assembly/vec4/dot $assembly/vec4/lerp $assembly/vec4/normalize $assembly/vec4/exactEquals $start:assembly/quat~anonymous|0~anonymous|0 $start:assembly/quat~anonymous|0 $start:assembly/quat~anonymous|1~anonymous|0 $start:assembly/quat~anonymous|1 $start:assembly/quat~anonymous|2~anonymous|0 $start:assembly/quat~anonymous|2 $assembly/quat2/multiply $assembly/mat4/perspectiveNO $assembly/mat4/orthoNO $assembly/mat4/multiply $assembly/mat4/subtract $assembly/mat3/multiply $assembly/mat3/subtract $assembly/vec2/length $assembly/vec2/subtract $assembly/vec2/multiply $assembly/vec2/divide $assembly/vec2/distance $assembly/vec2/squaredDistance $assembly/vec2/squaredLength $start:assembly/vec2~anonymous|0~anonymous|0 $start:assembly/vec2~anonymous|0 $assembly/mat2/multiply $assembly/vec4/subtract) + (export "__asbind_entryfile_flag" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_entryfile_flag)) + (export "__asbind_String_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_String_ID)) + (export "__asbind_ArrayBuffer_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_ArrayBuffer_ID)) + (export "__asbind_ArrayBufferView_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_ArrayBufferView_ID)) + (export "__asbind_Int8Array_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Int8Array_ID)) + (export "__asbind_Uint8Array_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Uint8Array_ID)) + (export "__asbind_Int16Array_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Int16Array_ID)) + (export "__asbind_Uint16Array_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Uint16Array_ID)) + (export "__asbind_Int32Array_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Int32Array_ID)) + (export "__asbind_Uint32Array_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Uint32Array_ID)) + (export "__asbind_Float32Array_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Float32Array_ID)) + (export "__asbind_Float64Array_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Float64Array_ID)) + (export "__asbind_Int64Array_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Int64Array_ID)) + (export "__asbind_Uint64Array_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Uint64Array_ID)) + (export "__asbind_I32Array_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_I32Array_ID)) + (export "__asbind_I64Array_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_I64Array_ID)) + (export "__asbind_StringArray_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_StringArray_ID)) + (export "__asbind_BoolArray_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_BoolArray_ID)) + (export "__asbind_I32ArrayArray_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_I32ArrayArray_ID)) + (export "__asbind_I64ArrayArray_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_I64ArrayArray_ID)) + (export "__asbind_StringArrayArray_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_StringArrayArray_ID)) + (export "__asbind_BoolArrayArray_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_BoolArrayArray_ID)) (export "glMatrix.EPSILON" (global $assembly/common/EPSILON)) (export "glMatrix.ArrayTypeEnum.Float64ArrayT" (global $assembly/common/ArrayTypeEnum.Float64ArrayT)) (export "glMatrix.ArrayTypeEnum.ArrayF64T" (global $assembly/common/ArrayTypeEnum.ArrayF64T)) @@ -2110,10 +2154,10 @@ if unreachable end - i32.const 29072 + i32.const 29200 i32.const 0 i32.store - i32.const 30640 + i32.const 30768 i32.const 0 i32.store loop $for-loop|0 @@ -2124,7 +2168,7 @@ local.get $1 i32.const 2 i32.shl - i32.const 29072 + i32.const 29200 i32.add i32.const 0 i32.store offset=4 @@ -2142,7 +2186,7 @@ i32.add i32.const 2 i32.shl - i32.const 29072 + i32.const 29200 i32.add i32.const 0 i32.store offset=96 @@ -2160,13 +2204,13 @@ br $for-loop|0 end end - i32.const 29072 - i32.const 30644 + i32.const 29200 + i32.const 30772 memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory - i32.const 29072 + i32.const 29200 global.set $~lib/rt/tlsf/ROOT ) (func $~lib/rt/itcms/step (result i32) @@ -2249,7 +2293,7 @@ local.set $0 loop $while-continue|0 local.get $0 - i32.const 29068 + i32.const 29196 i32.lt_u if local.get $0 @@ -2332,7 +2376,7 @@ i32.load offset=4 drop local.get $0 - i32.const 29068 + i32.const 29196 i32.lt_u if local.get $0 @@ -2355,7 +2399,7 @@ i32.const 4 i32.add local.tee $0 - i32.const 29068 + i32.const 29196 i32.ge_u if global.get $~lib/rt/tlsf/ROOT @@ -2525,11 +2569,11 @@ local.get $0 local.get $1 i32.add - i32.const 4 - i32.sub local.tee $2 + i32.const 1 + i32.sub i32.const 0 - i32.store8 offset=3 + i32.store8 local.get $1 i32.const 2 i32.le_u @@ -2541,11 +2585,15 @@ i32.const 0 i32.store8 offset=2 local.get $2 + i32.const 2 + i32.sub i32.const 0 - i32.store8 offset=2 + i32.store8 local.get $2 + i32.const 3 + i32.sub i32.const 0 - i32.store8 offset=1 + i32.store8 local.get $1 i32.const 6 i32.le_u @@ -2554,6 +2602,8 @@ i32.const 0 i32.store8 offset=3 local.get $2 + i32.const 4 + i32.sub i32.const 0 i32.store8 local.get $1 @@ -2579,11 +2629,11 @@ i32.and local.tee $2 i32.add - i32.const 28 - i32.sub local.tee $1 + i32.const 4 + i32.sub i32.const 0 - i32.store offset=24 + i32.store local.get $2 i32.const 8 i32.le_u @@ -2595,11 +2645,15 @@ i32.const 0 i32.store offset=8 local.get $1 + i32.const 12 + i32.sub i32.const 0 - i32.store offset=16 + i32.store local.get $1 + i32.const 8 + i32.sub i32.const 0 - i32.store offset=20 + i32.store local.get $2 i32.const 24 i32.le_u @@ -2617,17 +2671,25 @@ i32.const 0 i32.store offset=24 local.get $1 + i32.const 28 + i32.sub i32.const 0 i32.store local.get $1 + i32.const 24 + i32.sub i32.const 0 - i32.store offset=4 + i32.store local.get $1 + i32.const 20 + i32.sub i32.const 0 - i32.store offset=8 + i32.store local.get $1 + i32.const 16 + i32.sub i32.const 0 - i32.store offset=12 + i32.store local.get $0 local.get $0 i32.const 4 @@ -9892,11 +9954,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -9980,11 +10042,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -16787,12 +16849,12 @@ (local $1 i32) (local $2 i32) (local $3 i32) - block $folding-inner2 - block $folding-inner1 - block $folding-inner0 - block $invalid - block $assembly/mat4/Fov - block $~lib/array/Array<~lib/typedarray/Float64Array> + block $folding-inner4 + block $folding-inner3 + block $folding-inner2 + block $folding-inner1 + block $invalid + block $assembly/mat4/Fov block $assembly/imports/IArguments block $~lib/string/String block $~lib/arraybuffer/ArrayBuffer @@ -16800,7 +16862,7 @@ i32.const 8 i32.sub i32.load - br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $folding-inner2 $folding-inner2 $folding-inner0 $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner1 $assembly/imports/IArguments $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner1 $~lib/array/Array<~lib/typedarray/Float64Array> $folding-inner0 $assembly/mat4/Fov $invalid + br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $folding-inner4 $folding-inner4 $folding-inner4 $folding-inner4 $folding-inner4 $folding-inner4 $folding-inner4 $folding-inner4 $folding-inner4 $folding-inner4 $folding-inner4 $folding-inner1 $folding-inner1 $folding-inner2 $folding-inner1 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner1 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $assembly/imports/IArguments $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner2 $assembly/mat4/Fov $invalid end return end @@ -16808,42 +16870,42 @@ end return end - local.get $0 - i32.load offset=4 - local.tee $1 - local.get $0 - i32.load offset=12 - i32.const 2 - i32.shl - i32.add - local.set $2 - loop $while-continue|0 - local.get $1 - local.get $2 - i32.lt_u - if - local.get $1 - i32.load - local.tee $3 - if - local.get $3 - call $~lib/rt/itcms/__visit - end - local.get $1 - i32.const 4 - i32.add - local.set $1 - br $while-continue|0 - end - end - local.get $0 - i32.load - call $~lib/rt/itcms/__visit return end - return + unreachable + end + local.get $0 + i32.load + call $~lib/rt/itcms/__visit + return + end + local.get $0 + i32.load offset=4 + local.tee $1 + local.get $0 + i32.load offset=12 + i32.const 2 + i32.shl + i32.add + local.set $2 + loop $while-continue|0 + local.get $1 + local.get $2 + i32.lt_u + if + local.get $1 + i32.load + local.tee $3 + if + local.get $3 + call $~lib/rt/itcms/__visit + end + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $while-continue|0 end - unreachable end local.get $0 i32.load @@ -16868,12 +16930,12 @@ global.set $~argumentsLength ) (func $~start - i32.const 3 + i32.const 10 global.set $assembly/common/ARRAY_TYPE memory.size i32.const 16 i32.shl - i32.const 29068 + i32.const 29196 i32.sub i32.const 1 i32.shr_u @@ -16973,11 +17035,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -17129,11 +17191,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -17305,11 +17367,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -17478,11 +17540,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -17549,11 +17611,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -17691,11 +17753,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -17821,11 +17883,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -18036,11 +18098,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -18347,11 +18409,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -18885,11 +18947,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -19298,11 +19360,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -19579,7 +19641,7 @@ global.set $~lib/memory/__stack_pointer block $folding-inner0 global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -19588,7 +19650,7 @@ i32.store local.get $1 i32.const 12 - i32.const 3 + i32.const 10 call $~lib/rt/itcms/__new local.tee $1 i32.store @@ -19598,7 +19660,7 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -19677,8 +19739,8 @@ local.get $1 return end - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -19691,11 +19753,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -19711,7 +19773,7 @@ local.tee $0 i32.store global.get $assembly/common/ARRAY_TYPE - i32.const 3 + i32.const 10 i32.ne if local.get $0 @@ -19740,11 +19802,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -19760,7 +19822,7 @@ local.tee $0 i32.store global.get $assembly/common/ARRAY_TYPE - i32.const 3 + i32.const 10 i32.ne if local.get $0 @@ -19793,11 +19855,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -19849,11 +19911,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -19897,11 +19959,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -19941,11 +20003,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -19961,7 +20023,7 @@ local.tee $0 i32.store global.get $assembly/common/ARRAY_TYPE - i32.const 3 + i32.const 10 i32.ne if local.get $0 @@ -19994,11 +20056,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -20014,7 +20076,7 @@ local.tee $0 i32.store global.get $assembly/common/ARRAY_TYPE - i32.const 3 + i32.const 10 i32.ne if local.get $0 @@ -20067,11 +20129,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -20087,7 +20149,7 @@ local.tee $0 i32.store global.get $assembly/common/ARRAY_TYPE - i32.const 3 + i32.const 10 i32.ne if local.get $0 @@ -20112,11 +20174,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -20132,7 +20194,7 @@ local.tee $0 i32.store global.get $assembly/common/ARRAY_TYPE - i32.const 3 + i32.const 10 i32.ne if local.get $0 @@ -20167,11 +20229,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -20232,11 +20294,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -20252,7 +20314,7 @@ local.tee $0 i32.store global.get $assembly/common/ARRAY_TYPE - i32.const 3 + i32.const 10 i32.ne if local.get $0 @@ -20293,11 +20355,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -20349,11 +20411,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -20417,11 +20479,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -20437,7 +20499,7 @@ local.tee $0 i32.store global.get $assembly/common/ARRAY_TYPE - i32.const 3 + i32.const 10 i32.ne if local.get $0 @@ -20518,11 +20580,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -20624,11 +20686,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -20859,11 +20921,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -21154,11 +21216,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -21174,7 +21236,7 @@ local.tee $0 i32.store global.get $assembly/common/ARRAY_TYPE - i32.const 3 + i32.const 10 i32.ne if local.get $0 @@ -21223,11 +21285,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -21287,11 +21349,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -21401,11 +21463,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -21440,11 +21502,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -21467,11 +21529,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -21498,11 +21560,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -21539,11 +21601,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -21571,11 +21633,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -21650,11 +21712,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -21745,11 +21807,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -21803,11 +21865,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -21843,11 +21905,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -21884,11 +21946,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -21983,11 +22045,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -22064,11 +22126,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -22112,11 +22174,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -22164,7 +22226,7 @@ global.set $~lib/memory/__stack_pointer block $folding-inner0 global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -22176,7 +22238,7 @@ i32.add global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -22317,8 +22379,8 @@ global.set $~lib/memory/__stack_pointer return end - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -22335,11 +22397,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -22425,7 +22487,7 @@ global.set $~lib/memory/__stack_pointer block $folding-inner0 global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -22446,7 +22508,7 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -22491,7 +22553,7 @@ global.get $~lib/memory/__stack_pointer i32.const 3 i32.const 2 - i32.const 26 + i32.const 43 i32.const 0 call $~lib/rt/__newArray local.tee $3 @@ -22523,8 +22585,8 @@ local.get $3 return end - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -22537,11 +22599,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -22573,11 +22635,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -22609,11 +22671,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -22649,11 +22711,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -22778,11 +22840,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -22811,11 +22873,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -22893,7 +22955,7 @@ global.set $~lib/memory/__stack_pointer block $folding-inner0 global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -22905,7 +22967,7 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -22964,8 +23026,8 @@ local.get $1 return end - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -22978,11 +23040,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -23043,11 +23105,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -23092,11 +23154,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -23149,11 +23211,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -23278,11 +23340,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -23318,11 +23380,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -23361,11 +23423,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -23478,11 +23540,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -23583,11 +23645,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -23688,11 +23750,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -23744,11 +23806,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -23802,11 +23864,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -23859,11 +23921,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -23892,11 +23954,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -24013,11 +24075,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -24106,11 +24168,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -24142,11 +24204,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -24220,11 +24282,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -24325,11 +24387,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -24428,11 +24490,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -24609,11 +24671,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -24694,7 +24756,7 @@ global.set $~lib/memory/__stack_pointer block $folding-inner0 global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -24706,7 +24768,7 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -24783,8 +24845,8 @@ local.get $1 return end - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -24797,11 +24859,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -24880,11 +24942,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -24941,11 +25003,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -25006,11 +25068,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -25151,11 +25213,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -25369,11 +25431,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -25532,11 +25594,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -25621,11 +25683,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -25668,11 +25730,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -25815,11 +25877,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -25960,11 +26022,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -26067,11 +26129,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -26137,11 +26199,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -26205,11 +26267,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -26275,11 +26337,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -26364,11 +26426,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -26504,11 +26566,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -26535,11 +26597,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -26600,11 +26662,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -26636,11 +26698,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -26790,11 +26852,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -26913,11 +26975,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -26949,11 +27011,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -27051,11 +27113,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -27192,11 +27254,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -27316,11 +27378,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -27349,11 +27411,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -27377,11 +27439,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -27407,11 +27469,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -27435,11 +27497,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -27465,11 +27527,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -27493,11 +27555,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -27523,11 +27585,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -27551,11 +27613,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -27581,7 +27643,7 @@ global.set $~lib/memory/__stack_pointer block $folding-inner0 global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -27593,7 +27655,7 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -27604,7 +27666,7 @@ if global.get $~lib/memory/__stack_pointer i32.const 32 - i32.const 28 + i32.const 44 call $~lib/rt/itcms/__new local.tee $0 i32.store @@ -27632,8 +27694,8 @@ local.get $0 return end - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -27647,7 +27709,7 @@ global.set $~lib/memory/__stack_pointer block $folding-inner0 global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -27659,7 +27721,7 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -27778,8 +27840,8 @@ local.get $1 return end - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -27792,11 +27854,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -27917,11 +27979,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -28006,11 +28068,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -28039,11 +28101,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -28255,11 +28317,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -28287,11 +28349,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -28335,11 +28397,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -28516,11 +28578,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -28552,11 +28614,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -28591,11 +28653,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -28756,11 +28818,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -28802,11 +28864,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -29012,11 +29074,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -29222,11 +29284,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -29423,11 +29485,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -29523,11 +29585,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -29623,11 +29685,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -29656,11 +29718,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -29753,11 +29815,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -29849,11 +29911,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -29945,11 +30007,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -29981,11 +30043,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -30013,11 +30075,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -30045,11 +30107,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -30077,11 +30139,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -30109,11 +30171,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -30162,11 +30224,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -30374,11 +30436,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -30429,11 +30491,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -30598,11 +30660,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -30728,11 +30790,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -30758,11 +30820,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -30888,11 +30950,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -31043,11 +31105,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -31077,11 +31139,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -31196,11 +31258,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -31236,11 +31298,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -31275,11 +31337,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -31317,11 +31379,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -31551,11 +31613,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -31744,11 +31806,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -31780,11 +31842,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -31938,11 +32000,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -32163,11 +32225,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -32364,11 +32426,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -32395,11 +32457,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -32437,11 +32499,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -32472,11 +32534,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -32556,11 +32618,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -32600,11 +32662,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -32636,11 +32698,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -32669,11 +32731,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -32702,11 +32764,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -32738,11 +32800,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -32810,11 +32872,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -32842,11 +32904,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -32874,11 +32936,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -32921,11 +32983,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -32961,11 +33023,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -33049,11 +33111,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -33146,11 +33208,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -33203,11 +33265,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -33236,7 +33298,7 @@ global.set $~lib/memory/__stack_pointer block $folding-inner0 global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -33251,7 +33313,7 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -33288,8 +33350,8 @@ global.set $~lib/memory/__stack_pointer return end - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -33304,7 +33366,7 @@ global.set $~lib/memory/__stack_pointer block $folding-inner0 global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -33316,7 +33378,7 @@ i32.add global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -33457,8 +33519,8 @@ global.set $~lib/memory/__stack_pointer return end - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -33471,11 +33533,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -33507,7 +33569,7 @@ global.set $~lib/memory/__stack_pointer block $folding-inner0 global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -33519,7 +33581,7 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -33590,8 +33652,8 @@ local.get $1 return end - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -33604,11 +33666,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -33640,11 +33702,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -33714,11 +33776,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -33786,7 +33848,7 @@ global.set $~lib/memory/__stack_pointer block $folding-inner0 global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -33801,7 +33863,7 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -33841,8 +33903,8 @@ local.get $0 return end - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -33855,11 +33917,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -33886,11 +33948,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -33943,11 +34005,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -34001,11 +34063,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -34055,11 +34117,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -34118,11 +34180,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -34256,11 +34318,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -34434,11 +34496,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -34665,11 +34727,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -34896,11 +34958,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -35121,11 +35183,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -35352,11 +35414,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -35575,11 +35637,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -35612,11 +35674,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -35725,11 +35787,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -35761,11 +35823,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -35856,11 +35918,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -36019,11 +36081,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -36126,11 +36188,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -36219,11 +36281,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -36372,11 +36434,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -36399,11 +36461,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -36528,11 +36590,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -36762,7 +36824,7 @@ global.set $~lib/memory/__stack_pointer block $folding-inner0 global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -36774,7 +36836,7 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -36809,8 +36871,8 @@ local.get $1 return end - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -36823,11 +36885,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -36864,11 +36926,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -36898,11 +36960,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -36951,11 +37013,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -36987,11 +37049,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -37023,11 +37085,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -37059,11 +37121,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -37103,11 +37165,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -37147,11 +37209,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -37200,11 +37262,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -37254,11 +37316,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -37308,11 +37370,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -37354,11 +37416,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -37412,11 +37474,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -37445,11 +37507,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -37477,11 +37539,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -37509,11 +37571,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -37536,11 +37598,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -37580,11 +37642,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -37627,11 +37689,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -37697,11 +37759,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -37742,11 +37804,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -37807,11 +37869,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -37872,11 +37934,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -37935,11 +37997,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -38006,11 +38068,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -38085,11 +38147,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -38164,11 +38226,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -38244,11 +38306,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -38331,11 +38393,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -38414,11 +38476,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -38450,7 +38512,7 @@ global.set $~lib/memory/__stack_pointer block $folding-inner0 global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -38462,7 +38524,7 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -38539,8 +38601,8 @@ global.set $~lib/memory/__stack_pointer return end - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -38553,11 +38615,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -38604,11 +38666,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -38682,7 +38744,7 @@ global.set $~lib/memory/__stack_pointer block $folding-inner0 global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -38694,7 +38756,7 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -38735,8 +38797,8 @@ local.get $1 return end - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -38749,11 +38811,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -38776,11 +38838,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -38823,11 +38885,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -38861,11 +38923,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -38924,11 +38986,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -38960,11 +39022,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -38996,11 +39058,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -39032,11 +39094,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -39083,11 +39145,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -39134,11 +39196,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -39197,11 +39259,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -39261,11 +39323,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -39327,11 +39389,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -39381,11 +39443,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -39451,11 +39513,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -39484,11 +39546,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -39516,11 +39578,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -39543,11 +39605,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -39594,11 +39656,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -39648,11 +39710,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -39681,11 +39743,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -39713,11 +39775,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -39752,11 +39814,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -39836,11 +39898,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -39942,11 +40004,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -40093,11 +40155,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -40237,11 +40299,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -40328,11 +40390,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -40487,11 +40549,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -40602,11 +40664,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -40745,7 +40807,7 @@ global.set $~lib/memory/__stack_pointer block $folding-inner0 global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -40763,7 +40825,7 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -40773,7 +40835,7 @@ local.get $4 i32.const 0 i32.const 3 - i32.const 4 + i32.const 21 i32.const 12032 call $~lib/rt/__newArray local.tee $4 @@ -40781,7 +40843,7 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.const 3 - i32.const 4 + i32.const 21 i32.const 12064 call $~lib/rt/__newArray local.tee $5 @@ -40895,8 +40957,8 @@ local.get $0 return end - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -40911,7 +40973,7 @@ global.set $~lib/memory/__stack_pointer block $folding-inner0 global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -40929,7 +40991,7 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -40939,7 +41001,7 @@ local.get $4 i32.const 0 i32.const 3 - i32.const 4 + i32.const 21 i32.const 12144 call $~lib/rt/__newArray local.tee $4 @@ -40947,7 +41009,7 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.const 3 - i32.const 4 + i32.const 21 i32.const 12176 call $~lib/rt/__newArray local.tee $5 @@ -41061,8 +41123,8 @@ local.get $0 return end - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -41077,7 +41139,7 @@ global.set $~lib/memory/__stack_pointer block $folding-inner0 global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -41095,7 +41157,7 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -41105,7 +41167,7 @@ local.get $4 i32.const 0 i32.const 3 - i32.const 4 + i32.const 21 i32.const 12208 call $~lib/rt/__newArray local.tee $4 @@ -41113,7 +41175,7 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.const 3 - i32.const 4 + i32.const 21 i32.const 12240 call $~lib/rt/__newArray local.tee $5 @@ -41227,8 +41289,8 @@ local.get $0 return end - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -41242,11 +41304,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -41335,11 +41397,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -41375,7 +41437,7 @@ global.set $~lib/memory/__stack_pointer block $folding-inner0 global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -41387,7 +41449,7 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -41496,8 +41558,8 @@ global.set $~lib/memory/__stack_pointer return end - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -41510,11 +41572,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -41574,11 +41636,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -41677,11 +41739,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -41713,11 +41775,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -41749,11 +41811,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -41807,11 +41869,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -41865,11 +41927,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -41938,11 +42000,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -42012,11 +42074,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -42091,11 +42153,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -42124,11 +42186,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -42156,11 +42218,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -42183,11 +42245,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -42210,11 +42272,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -42268,11 +42330,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -42330,11 +42392,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -42363,11 +42425,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -42405,11 +42467,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -42608,11 +42670,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -42650,11 +42712,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -42794,11 +42856,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -42958,11 +43020,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -43127,11 +43189,11 @@ i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s if - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -43171,7 +43233,7 @@ global.set $~lib/memory/__stack_pointer block $folding-inner0 global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -43183,7 +43245,7 @@ i32.add global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 12684 + i32.const 12812 i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer @@ -43324,8 +43386,8 @@ global.set $~lib/memory/__stack_pointer return end - i32.const 29088 - i32.const 29136 + i32.const 29216 + i32.const 29264 i32.const 1 i32.const 1 call $~lib/builtins/abort diff --git a/build/untouched.wat b/build/untouched.wat index 67a2cd99..bcc43cbb 100644 --- a/build/untouched.wat +++ b/build/untouched.wat @@ -1,8 +1,8 @@ (module (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_f64_=>_i32 (func (param i32 i32 f64) (result i32))) (type $i32_=>_f64 (func (param i32) (result f64))) (type $i32_i32_i32_f64_=>_i32 (func (param i32 i32 i32 f64) (result i32))) @@ -55,125 +55,31 @@ (type $f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_=>_f64 (func (param f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64) (result f64))) (import "env" "seed" (func $~lib/builtins/seed (result f64))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) - (memory $0 1) - (data (i32.const 12) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\18\00\00\00~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s\00\00\00\00\00") - (data (i32.const 60) "\1c\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\08\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 92) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00z\00y\00x\00\00\00\00\00\00\00") - (data (i32.const 124) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00$\00\00\00I\00n\00d\00e\00x\00 \00o\00u\00t\00 \00o\00f\00 \00r\00a\00n\00g\00e\00\00\00\00\00\00\00\00\00") - (data (i32.const 188) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00$\00\00\00~\00l\00i\00b\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s\00\00\00\00\00\00\00\00\00") - (data (i32.const 252) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 284) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\00\03\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 316) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 348) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 380) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\00\06\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 412) "\1c\00\00\00\00\00\00\00\00\00\00\00\07\00\00\00\08\00\00\00\07\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 444) "\1c\00\00\00\00\00\00\00\00\00\00\00\08\00\00\00\08\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 476) "\1c\00\00\00\00\00\00\00\00\00\00\00\08\00\00\00\08\00\00\00\t\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 508) "\1c\00\00\00\00\00\00\00\00\00\00\00\t\00\00\00\08\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 540) "\1c\00\00\00\00\00\00\00\00\00\00\00\t\00\00\00\08\00\00\00\0b\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 572) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1c\00\00\00I\00n\00v\00a\00l\00i\00d\00 \00l\00e\00n\00g\00t\00h\00") - (data (i32.const 620) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00\00\00\00\00\00\00") - (data (i32.const 684) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00(\00\00\00A\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e\00\00\00\00\00") - (data (i32.const 748) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00r\00t\00/\00i\00t\00c\00m\00s\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 816) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 848) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 876) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\00~\00l\00i\00b\00/\00r\00t\00.\00t\00s\00\00\00\00\00\00\00\00\00") - (data (i32.const 928) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 956) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1020) "\1c\00\00\00\00\00\00\00\00\00\00\00\0c\00\00\00\08\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1052) "\1c\00\00\00\00\00\00\00\00\00\00\00\0b\00\00\00\08\00\00\00\0d\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1084) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1116) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\00\0f\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1148) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1180) "\1c\00\00\00\00\00\00\00\00\00\00\00\08\00\00\00\08\00\00\00\11\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1212) "\1c\00\00\00\00\00\00\00\00\00\00\00\08\00\00\00\08\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1244) "\1c\00\00\00\00\00\00\00\00\00\00\00\t\00\00\00\08\00\00\00\13\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1276) "\1c\00\00\00\00\00\00\00\00\00\00\00\t\00\00\00\08\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1308) "\1c\00\00\00\00\00\00\00\00\00\00\00\0c\00\00\00\08\00\00\00\15\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1340) "\1c\00\00\00\00\00\00\00\00\00\00\00\0b\00\00\00\08\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1372) "\1c\00\00\00\00\00\00\00\00\00\00\00\0d\00\00\00\08\00\00\00\17\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1404) "\1c\00\00\00\00\00\00\00\00\00\00\00\0e\00\00\00\08\00\00\00\18\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1436) "\1c\00\00\00\00\00\00\00\00\00\00\00\0f\00\00\00\08\00\00\00\19\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1468) "\1c\00\00\00\00\00\00\00\00\00\00\00\10\00\00\00\08\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1500) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\00\1b\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1532) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1564) "\1c\00\00\00\00\00\00\00\00\00\00\00\11\00\00\00\08\00\00\00\1d\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1596) "\1c\00\00\00\00\00\00\00\00\00\00\00\08\00\00\00\08\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1628) "\1c\00\00\00\00\00\00\00\00\00\00\00\12\00\00\00\08\00\00\00\1f\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1660) "\1c\00\00\00\00\00\00\00\00\00\00\00\0f\00\00\00\08\00\00\00 \00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1692) "\1c\00\00\00\00\00\00\00\00\00\00\00\13\00\00\00\08\00\00\00!\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1728) "n\83\f9\a2\00\00\00\00\d1W\'\fc)\15DN\99\95b\db\c0\dd4\f5\abcQ\feA\90C<:n$\b7a\c5\bb\de\ea.I\06\e0\d2MB\1c\eb\1d\fe\1c\92\d1\t\f55\82\e8>\a7)\b1&p\9c\e9\84D\bb.9\d6\919A~_\b4\8b_\84\9c\f49S\83\ff\97\f8\1f;(\f9\bd\8b\11/\ef\0f\98\05\de\cf~6m\1fm\nZf?FO\b7\t\cb\'\c7\ba\'u-\ea_\9e\f79\07={\f1\e5\eb\b1_\fbk\ea\92R\8aF0\03V\08]\8d\1f \bc\cf\f0\abk{\fca\91\e3\a9\1d6\f4\9a_\85\99e\08\1b\e6^\80\d8\ff\8d@h\a0\14W\15\06\061\'sM") - (data (i32.const 1932) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1964) "\1c\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\08\00\00\00#\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1996) "\1c\00\00\00\00\00\00\00\00\00\00\00\16\00\00\00\08\00\00\00$\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2028) "\1c\00\00\00\00\00\00\00\00\00\00\00\15\00\00\00\08\00\00\00%\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2060) "\1c\00\00\00\00\00\00\00\00\00\00\00\18\00\00\00\08\00\00\00&\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2092) "\1c\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\08\00\00\00\'\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2124) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\00(\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2156) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00n\00u\00m\00b\00e\00r\00") - (data (i32.const 2188) "\1c\00\00\00\00\00\00\00\00\00\00\00\10\00\00\00\08\00\00\00)\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2220) "\1c\00\00\00\00\00\00\00\00\00\00\00\19\00\00\00\08\00\00\00*\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2252) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\00+\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2284) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\00,\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2316) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\00-\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2348) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\00.\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2380) "\1c\00\00\00\00\00\00\00\00\00\00\00\t\00\00\00\08\00\00\00/\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2412) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\000\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2444) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\001\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2476) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\002\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2508) "\1c\00\00\00\00\00\00\00\00\00\00\00\08\00\00\00\08\00\00\003\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2540) "\1c\00\00\00\00\00\00\00\00\00\00\00\08\00\00\00\08\00\00\004\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2572) "\1c\00\00\00\00\00\00\00\00\00\00\00\t\00\00\00\08\00\00\005\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2604) "\1c\00\00\00\00\00\00\00\00\00\00\00\0c\00\00\00\08\00\00\006\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2636) "\1c\00\00\00\00\00\00\00\00\00\00\00\0b\00\00\00\08\00\00\007\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2668) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\008\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2700) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\08\00\00\009\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2732) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00m\00a\00t\002\00(\00\00\00") - (data (i32.const 2764) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\000\00.\000\00\00\00\00\00\00\00") - (data (i32.const 2796) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00N\00a\00N\00\00\00\00\00\00\00") - (data (i32.const 2828) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\12\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2876) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\00I\00n\00f\00i\00n\00i\00t\00y\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2928) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2984) "\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\9a\ec\ef?\d1f\87\10z^\90\bc\85\7fn\e8\15\e3\ef?\13\f6g5R\d2\8c\be\ef?m{\83]\a6\9a\97<\0f\89\f9lX\b5\ef?\fc\ef\fd\92\1a\b5\8e<\f7Gr+\92\ac\ef?\d1\9c/p=\be><\a2\d1\d32\ec\a3\ef?\0bn\90\894\03j\bc\1b\d3\fe\aff\9b\ef?\0e\bd/*RV\95\bcQ[\12\d0\01\93\ef?U\eaN\8c\ef\80P\bc\cc1l\c0\bd\8a\ef?\16\f4\d5\b9#\c9\91\bc\e0-\a9\ae\9a\82\ef?\afU\\\e9\e3\d3\80\f7\ec\9a<\aa\b9h1\87T\ef?\9d8\86\cb\82\e7\8f\bc\1d\d9\fc\"PM\ef?\8d\c3\a6DAo\8a<\d6\8cb\88;F\ef?}\04\e4\b0\05z\80<\96\dc}\91I?\ef?\94\a8\a8\e3\fd\8e\96<8bunz8\ef?}Ht\f2\18^\87\a9\af\0c\ef?\b6\ab\b0MuM\83<\15\b71\n\fe\06\ef?Lt\ac\e2\01B\86<1\d8L\fcp\01\ef?J\f8\d3]9\dd\8f<\ff\16d\b2\08\fc\ee?\04[\8e;\80\a3\86\bc\f1\9f\92_\c5\f6\ee?hPK\cc\edJ\92\bc\cb\a9:7\a7\f1\ee?\8e-Q\1b\f8\07\99\bcf\d8\05m\ae\ec\ee?\d26\94>\e8\d1q\bc\f7\9f\e54\db\e7\ee?\15\1b\ce\b3\19\19\99\bc\e5\a8\13\c3-\e3\ee?mL*\a7H\9f\85<\"4\12L\a6\de\ee?\8ai(z`\12\93\bc\1c\80\ac\04E\da\ee?[\89\17H\8f\a7X\bc*.\f7!\n\d6\ee?\1b\9aIg\9b,|\bc\97\a8P\d9\f5\d1\ee?\11\ac\c2`\edcC<-\89a`\08\ce\ee?\efd\06;\tf\96Z~d\1fx\bct_\ec\e8u\9f\ee?\b0}\8b\c0J\ee\86\bct\81\a5H\9a\9f\ee?\8a\e6U\1e2\19\86\bc\c9gBV\eb\9f\ee?\d3\d4\t^\cb\9c\90T\'\a4\ee?47;\f1\b6i\93\bc\13\ceL\99\89\a5\ee?\1e\ff\19:\84^\80\bc\ad\c7#F\1a\a7\ee?nWr\d8P\d4\94\bc\ed\92D\9b\d9\a8\ee?\00\8a\0e[g\ad\90<\99f\8a\d9\c7\aa\ee?\b4\ea\f0\c1/\b7\8d<\db\a0*B\e5\ac\ee?\ff\e7\c5\9c`\b6e\bc\8cD\b5\162\af\ee?D_\f3Y\83\f6{<6w\15\99\ae\b1\ee?\83=\1e\a7\1f\t\93\bc\c6\ff\91\0b[\b4\ee?)\1el\8b\b8\a9]\bc\e5\c5\cd\b07\b7\ee?Y\b9\90|\f9#l\bc\0fR\c8\cbD\ba\ee?\aa\f9\f4\"CC\92\bcPN\de\9f\82\bd\ee?K\8ef\d7l\ca\85\bc\ba\07\cap\f1\c0\ee?\'\ce\91+\fc\afq<\90\f0\a3\82\91\c4\ee?\bbs\n\e15\d2m<##\e3\19c\c8\ee?c\"b\"\04\c5\87\bce\e5]{f\cc\ee?\d51\e2\e3\86\1c\8b<3-J\ec\9b\d0\ee?\15\bb\bc\d3\d1\bb\91\bc]%>\b2\03\d5\ee?\d21\ee\9c1\cc\90\b4\07!\d5\82\bc_\9b{3\97|\ef?\c9\0dG;\b9*\89\bc)\a1\f5\14F\86\ef?\d3\88:`\04\b6t<\f6?\8b\e7.\90\ef?qr\9dQ\ec\c5\83<\83L\c7\fbQ\9a\ef?\f0\91\d3\8f\12\f7\8f\bc\da\90\a4\a2\af\a4\ef?}t#\e2\98\ae\8d\bc\f1g\8e-H\af\ef?\08 \aaA\bc\c3\8e<\'Za\ee\1b\ba\ef?2\eb\a9\c3\94+\84<\97\bak7+\c5\ef?\ee\85\d11\a9d\8a<@En[v\d0\ef?\ed\e3;\e4\ba7\8e\bc\14\be\9c\ad\fd\db\ef?\9d\cd\91M;\89w<\d8\90\9e\81\c1\e7\ef?\89\cc`A\c1\05S<\f1q\8f+\c2\f3\ef?") - (data (i32.const 6544) "\9f\de\e0\c3\f04\f7?\00\90\e6y\7f\cc\d7\bf\1f\e9,jx\13\f7?\00\00\0d\c2\eeo\d7\bf\a0\b5\fa\08`\f2\f6?\00\e0Q\13\e3\13\d7\bf}\8c\13\1f\a6\d1\f6?\00x(8[\b8\d6\bf\d1\b4\c5\0bI\b1\f6?\00x\80\90U]\d6\bf\ba\0c/3G\91\f6?\00\00\18v\d0\02\d6\bf#B\"\18\9fq\f6?\00\90\90\86\ca\a8\d5\bf\d9\1e\a5\99OR\f6?\00P\03VCO\d5\bf\c4$\8f\aaV3\f6?\00@k\c37\f6\d4\bf\14\dc\9dk\b3\14\f6?\00P\a8\fd\a7\9d\d4\bfL\\\c6Rd\f6\f5?\00\a8\899\92E\d4\bfO,\91\b5g\d8\f5?\00\b8\b09\f4\ed\d3\bf\de\90[\cb\bc\ba\f5?\00p\8fD\ce\96\d3\bfx\1a\d9\f2a\9d\f5?\00\a0\bd\17\1e@\d3\bf\87VF\12V\80\f5?\00\80F\ef\e2\e9\d2\bf\d3k\e7\ce\97c\f5?\00\e008\1b\94\d2\bf\93\7f\a7\e2%G\f5?\00\88\da\8c\c5>\d2\bf\83E\06B\ff*\f5?\00\90\')\e1\e9\d1\bf\df\bd\b2\db\"\0f\f5?\00\f8H+m\95\d1\bf\d7\de4G\8f\f3\f4?\00\f8\b9\9agA\d1\bf@(\de\cfC\d8\f4?\00\98\ef\94\d0\ed\d0\bf\c8\a3x\c0>\bd\f4?\00\10\db\18\a5\9a\d0\bf\8a%\e0\c3\7f\a2\f4?\00\b8cR\e6G\d0\bf4\84\d4$\05\88\f4?\00\f0\86E\"\eb\cf\bf\0b-\19\1b\cem\f4?\00\b0\17uJG\cf\bfT\189\d3\d9S\f4?\000\10=D\a4\ce\bfZ\84\b4D\':\f4?\00\b0\e9D\0d\02\ce\bf\fb\f8\15A\b5 \f4?\00\f0w)\a2`\cd\bf\b1\f4>\da\82\07\f4?\00\90\95\04\01\c0\cc\bf\8f\feW]\8f\ee\f3?\00\10\89V) \cc\bf\e9L\0b\a0\d9\d5\f3?\00\10\81\8d\17\81\cb\bf+\c1\10\c0`\bd\f3?\00\d0\d3\cc\c9\e2\ca\bf\b8\dau+$\a5\f3?\00\90\12.@E\ca\bf\02\d0\9f\cd\"\8d\f3?\00\f0\1dhw\a8\c9\bf\1cz\84\c5[u\f3?\000Him\0c\c9\bf\e26\adI\ce]\f3?\00\c0E\a6 q\c8\bf@\d4M\98yF\f3?\000\14\b4\8f\d6\c7\bf$\cb\ff\ce\\/\f3?\00pb<\b8<\c7\bfI\0d\a1uw\18\f3?\00`7\9b\9a\a3\c6\bf\909>7\c8\01\f3?\00\a0\b7T1\0b\c6\bfA\f8\95\bbN\eb\f2?\000$v}s\c5\bf\d1\a9\19\02\n\d5\f2?\000\c2\8f{\dc\c4\bf*\fd\b7\a8\f9\be\f2?\00\00\d2Q,F\c4\bf\ab\1b\0cz\1c\a9\f2?\00\00\83\bc\8a\b0\c3\bf0\b5\14`r\93\f2?\00\00Ik\99\1b\c3\bf\f5\a1WW\fa}\f2?\00@\a4\90T\87\c2\bf\bf;\1d\9b\b3h\f2?\00\a0y\f8\b9\f3\c1\bf\bd\f5\8f\83\9dS\f2?\00\a0,%\c8`\c1\bf;\08\c9\aa\b7>\f2?\00 \f7W\7f\ce\c0\bf\b6@\a9+\01*\f2?\00\a0\feI\dc<\c0\bf2A\cc\96y\15\f2?\00\80K\bc\bdW\bf\bf\9b\fc\d2\1d \01\f2?\00@@\96\087\be\bf\0bHMI\f4\ec\f1?\00@\f9>\98\17\bd\bfie\8fR\f5\d8\f1?\00\a0\d8Ng\f9\bb\bf|~W\11#\c5\f1?\00`/ y\dc\ba\bf\e9&\cbt|\b1\f1?\00\80(\e7\c3\c0\b9\bf\b6\1a,\0c\01\9e\f1?\00\c0r\b3F\a6\b8\bf\bdp\b6{\b0\8a\f1?\00\00\ac\b3\01\8d\b7\bf\b6\bc\ef%\8aw\f1?\00\008E\f1t\b6\bf\da1L5\8dd\f1?\00\80\87m\0e^\b5\bf\dd_\'\90\b9Q\f1?\00\e0\a1\de\\H\b4\bfL\d22\a4\0e?\f1?\00\a0jM\d93\b3\bf\da\f9\10r\8b,\f1?\00`\c5\f8y \b2\bf1\b5\ec(0\1a\f1?\00 b\98F\0e\b1\bf\af4\84\da\fb\07\f1?\00\00\d2jl\fa\af\bf\b3kN\0f\ee\f5\f0?\00@wJ\8d\da\ad\bf\ce\9f*]\06\e4\f0?\00\00\85\e4\ec\bc\ab\bf!\a5,cD\d2\f0?\00\c0\12@\89\a1\a9\bf\1a\98\e2|\a7\c0\f0?\00\c0\023X\88\a7\bf\d16\c6\83/\af\f0?\00\80\d6g^q\a5\bf9\13\a0\98\db\9d\f0?\00\80eI\8a\\\a3\bf\df\e7R\af\ab\8c\f0?\00@\15d\e3I\a1\bf\fb(N/\9f{\f0?\00\80\eb\82\c0r\9e\bf\19\8f5\8c\b5j\f0?\00\80RR\f1U\9a\bf,\f9\ec\a5\eeY\f0?\00\80\81\cfb=\96\bf\90,\d1\cdII\f0?\00\00\aa\8c\fb(\92\bf\a9\ad\f0\c6\c68\f0?\00\00\f9 {1\8c\bf\a92y\13e(\f0?\00\00\aa]5\19\84\bfHs\ea\'$\18\f0?\00\00\ec\c2\03\12x\bf\95\b1\14\06\04\08\f0?\00\00$y\t\04`\bf\1a\fa&\f7\1f\e0\ef?\00\00\90\84\f3\efo?t\eaa\c2\1c\a1\ef?\00\00=5A\dc\87?.\99\81\b0\10c\ef?\00\80\c2\c4\a3\ce\93?\cd\ad\ee<\f6%\ef?\00\00\89\14\c1\9f\9b?\e7\13\91\03\c8\e9\ee?\00\00\11\ce\d8\b0\a1?\ab\b1\cbx\80\ae\ee?\00\c0\01\d0[\8a\a5?\9b\0c\9d\a2\1at\ee?\00\80\d8@\83\\\a9?\b5\99\n\83\91:\ee?\00\80W\efj\'\ad?V\9a`\t\e0\01\ee?\00\c0\98\e5\98u\b0?\98\bbw\e5\01\ca\ed?\00 \0d\e3\f5S\b2?\03\91|\0b\f2\92\ed?\00\008\8b\dd.\b4?\ce\\\fbf\ac\\\ed?\00\c0W\87Y\06\b6?\9d\de^\aa,\'\ed?\00\00j5v\da\b7?\cd,k>n\f2\ec?\00`\1cNC\ab\b9?\02y\a7\a2m\be\ec?\00`\0d\bb\c7x\bb?m\087m&\8b\ec?\00 \e72\13C\bd?\04X]\bd\94X\ec?\00`\deq1\n\bf?\8c\9f\bb3\b5&\ec?\00@\91+\15g\c0??\e7\ec\ee\83\f5\eb?\00\b0\92\82\85G\c1?\c1\96\dbu\fd\c4\eb?\000\ca\cdn&\c2?(J\86\0c\1e\95\eb?\00P\c5\a6\d7\03\c3?,>\ef\c5\e2e\eb?\00\103<\c3\df\c3?\8b\88\c9gH7\eb?\00\80zk6\ba\c4?J0\1d!K\t\eb?\00\f0\d1(9\93\c5?~\ef\f2\85\e8\db\ea?\00\f0\18$\cdj\c6?\a2=`1\1d\af\ea?\00\90f\ec\f8@\c7?\a7X\d3?\e6\82\ea?\00\f0\1a\f5\c0\15\c8?\8bs\t\ef@W\ea?\00\80\f6T)\e9\c8?\'K\ab\90*,\ea?\00@\f8\026\bb\c9?\d1\f2\93\13\a0\01\ea?\00\00,\1c\ed\8b\ca?\1b<\db$\9f\d7\e9?\00\d0\01\\Q[\cb?\90\b1\c7\05%\ae\e9?\00\c0\bc\ccg)\cc?/\ce\97\f2.\85\e9?\00`H\d55\f6\cc?uK\a4\ee\ba\\\e9?\00\c0F4\bd\c1\cd?8H\e7\9d\c64\e9?\00\e0\cf\b8\01\8c\ce?\e6Rg/O\0d\e9?\00\90\17\c0\tU\cf?\9d\d7\ff\8eR\e6\e8?\00\b8\1f\12l\0e\d0?|\00\cc\9f\ce\bf\e8?\00\d0\93\0e\b8q\d0?\0e\c3\be\da\c0\99\e8?\00p\86\9ek\d4\d0?\fb\17#\aa\'t\e8?\00\d0K3\876\d1?\08\9a\b3\ac\00O\e8?\00H#g\0d\98\d1?U>e\e8I*\e8?\00\80\cc\e0\ff\f8\d1?`\02\f4\95\01\06\e8?\00hc\d7_Y\d2?)\a3\e0c%\e2\e7?\00\a8\14\t0\b9\d2?\ad\b5\dcw\b3\be\e7?\00`C\10r\18\d3?\c2%\97g\aa\9b\e7?\00\18\ecm&w\d3?W\06\17\f2\07y\e7?\000\af\fbO\d5\d3?\0c\13\d6\db\caV\e7?\00\e0/\e3\ee2\d4?") - (data (i32.const 8592) "k\b6O\01\00\10\e6?<[B\91l\02~<\95\b4M\03\000\e6?A]\00H\ea\bf\8d\f6\05\eb\ff\ef\e6?S-\e2\1a\04\80~\bc\80\97\86\0e\00\10\e7?Ry\tqf\ff{<\12\e9g\fc\ff/\e7?$\87\bd&\e2\00\8c\89<\b9{F\13\000\e9?v\02\98KN\80\7f.\98\dd\ff\af\e9?7\93Z\8a\e0@\87\bcf\fbI\ed\ff\cf\e9?\00\e0\9b\c1\08\ce?O*\00\b0\ea?_?\ff<\04\fdi\bc\d1\1e\ae\d7\ff\cf\ea?\b4p\90\12\e7>\82\bcx\04Q\ee\ff\ef\ea?\a3\de\0e\e0>\06j<[\0de\db\ff\0f\eb?\b9\n\1f8\c8\06ZO\86\d0E\ff\8a<@\16\87\f9\ff\8f\eb?\f9\c3\c2\96w\fe|\f0\0f\00\f0\f4?\1cS\85\0b\89\7f\97<\d1K\dc\12\00\10\f5?6\a4fqe\04`\c9\03\00\b0\f5?\c0\0c\bf\n\08A\9f\bc\bc\19I\1d\00\d0\f5?)G%\fb*\81\98\bc\89z\b8\e7\ff\ef\f5?\04i\ed\80\b7~\94\bc") - (data (i32.const 10652) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00x\00y\00z\00\00\00\00\00\00\00") - (data (i32.const 10684) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00x\00z\00y\00\00\00\00\00\00\00") - (data (i32.const 10716) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00y\00x\00z\00\00\00\00\00\00\00") - (data (i32.const 10748) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00y\00z\00x\00\00\00\00\00\00\00") - (data (i32.const 10780) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00z\00x\00y\00\00\00\00\00\00\00") - (data (i32.const 10812) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00(\00\00\00U\00n\00k\00n\00o\00w\00n\00 \00a\00n\00g\00l\00e\00 \00o\00r\00d\00e\00r\00 \00\00\00\00\00") - (data (i32.const 10876) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00 \00\00\00a\00s\00s\00e\00m\00b\00l\00y\00/\00q\00u\00a\00t\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 10940) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00q\00u\00a\00t\00(\00\00\00") - (data (i32.const 10972) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00q\00u\00a\00t\002\00(\00") - (data (i32.const 11004) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00v\00e\00c\002\00(\00\00\00") - (data (i32.const 11036) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 11068) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 11100) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00\00\00") - (data (i32.const 11148) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 11180) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 11212) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 11244) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 11276) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00v\00e\00c\003\00(\00\00\00") - (data (i32.const 11308) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00v\00e\00c\004\00(\00\00\00") - (data (i32.const 11340) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00*\00\00\00O\00b\00j\00e\00c\00t\00 \00a\00l\00r\00e\00a\00d\00y\00 \00p\00i\00n\00n\00e\00d\00\00\00") - (data (i32.const 11404) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00(\00\00\00O\00b\00j\00e\00c\00t\00 \00i\00s\00 \00n\00o\00t\00 \00p\00i\00n\00n\00e\00d\00\00\00\00\00") - (data (i32.const 11472) "\1d\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\1a\00\00\02\00\00\00\02\1a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\02A\00\00\00\00\00\00\02\t\00\00\00\00\00\00 \00\00\00\00\00\00\00") - (table $0 58 funcref) - (elem (i32.const 1) $~lib/math/NativeMath.random $assembly/mat2d/multiply $assembly/mat2d/subtract $assembly/vec3/subtract $assembly/vec3/multiply $assembly/vec3/divide $~lib/math/NativeMath.hypot $assembly/vec3/distance $assembly/vec3/squaredDistance $assembly/vec3/length $assembly/vec3/squaredLength $start:assembly/vec3~anonymous|0~anonymous|0 $start:assembly/vec3~anonymous|0 $assembly/vec4/subtract $assembly/vec4/multiply $assembly/vec4/divide $assembly/vec4/distance $assembly/vec4/squaredDistance $assembly/vec4/length $assembly/vec4/squaredLength $start:assembly/vec4~anonymous|0~anonymous|0 $start:assembly/vec4~anonymous|0 $assembly/vec4/clone $assembly/vec4/fromValues $assembly/vec4/copy $assembly/vec4/set $assembly/vec4/add $assembly/quat/multiply $assembly/vec4/scale $assembly/vec4/dot $assembly/vec4/lerp $assembly/vec4/normalize $assembly/vec4/exactEquals $start:assembly/quat~anonymous|0~anonymous|0 $start:assembly/quat~anonymous|0 $start:assembly/quat~anonymous|1~anonymous|0 $start:assembly/quat~anonymous|1 $start:assembly/quat~anonymous|2~anonymous|0 $start:assembly/quat~anonymous|2 $assembly/quat2/multiply $assembly/mat4/perspectiveNO $assembly/mat4/orthoNO $assembly/mat4/multiply $assembly/mat4/subtract $assembly/mat3/multiply $assembly/mat3/subtract $assembly/vec2/length $assembly/vec2/subtract $assembly/vec2/multiply $assembly/vec2/divide $assembly/vec2/distance $assembly/vec2/squaredDistance $assembly/vec2/squaredLength $start:assembly/vec2~anonymous|0~anonymous|0 $start:assembly/vec2~anonymous|0 $assembly/mat2/multiply $assembly/mat2/subtract) + (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_entryfile_flag i32 (i32.const 1)) + (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_String_ID i32 (i32.const 1)) + (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_ArrayBuffer_ID i32 (i32.const 0)) + (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_ArrayBufferView_ID i32 (i32.const 2)) + (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Int8Array_ID i32 (i32.const 3)) + (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Uint8Array_ID i32 (i32.const 4)) + (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Int16Array_ID i32 (i32.const 5)) + (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Uint16Array_ID i32 (i32.const 6)) + (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Int32Array_ID i32 (i32.const 7)) + (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Uint32Array_ID i32 (i32.const 8)) + (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Float32Array_ID i32 (i32.const 9)) + (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Float64Array_ID i32 (i32.const 10)) + (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Int64Array_ID i32 (i32.const 11)) + (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Uint64Array_ID i32 (i32.const 12)) + (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_I32Array_ID i32 (i32.const 13)) + (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_I64Array_ID i32 (i32.const 14)) + (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_StringArray_ID i32 (i32.const 15)) + (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_BoolArray_ID i32 (i32.const 16)) + (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_I32ArrayArray_ID i32 (i32.const 17)) + (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_I64ArrayArray_ID i32 (i32.const 18)) + (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_StringArrayArray_ID i32 (i32.const 19)) + (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_BoolArrayArray_ID i32 (i32.const 20)) (global $assembly/common/EPSILON f64 (f64.const 1e-06)) - (global $assembly/common/ArrayTypeEnum.Float64ArrayT i32 (i32.const 3)) - (global $assembly/common/ArrayTypeEnum.ArrayF64T i32 (i32.const 4)) + (global $assembly/common/ArrayTypeEnum.Float64ArrayT i32 (i32.const 10)) + (global $assembly/common/ArrayTypeEnum.ArrayF64T i32 (i32.const 21)) (global $assembly/common/ARRAY_TYPE (mut i32) (i32.const 0)) (global $~lib/math/random_seeded (mut i32) (i32.const 0)) (global $~lib/math/random_state0_64 (mut i64) (i64.const 0)) @@ -275,11 +181,149 @@ (global $~lib/util/number/_K (mut i32) (i32.const 0)) (global $~lib/util/number/_frc_pow (mut i64) (i64.const 0)) (global $~lib/util/number/_exp_pow (mut i32) (i32.const 0)) - (global $assembly/mat4/Fov i32 (i32.const 28)) + (global $assembly/mat4/Fov i32 (i32.const 44)) (global $~lib/rt/__rtti_base i32 (i32.const 11472)) - (global $~lib/memory/__data_end i32 (i32.const 11708)) - (global $~lib/memory/__stack_pointer (mut i32) (i32.const 28092)) - (global $~lib/memory/__heap_base i32 (i32.const 28092)) + (global $~lib/memory/__data_end i32 (i32.const 11836)) + (global $~lib/memory/__stack_pointer (mut i32) (i32.const 28220)) + (global $~lib/memory/__heap_base i32 (i32.const 28220)) + (memory $0 1) + (data (i32.const 12) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\18\00\00\00~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s\00\00\00\00\00") + (data (i32.const 60) "\1c\00\00\00\00\00\00\00\00\00\00\00\16\00\00\00\08\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 92) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00z\00y\00x\00\00\00\00\00\00\00") + (data (i32.const 124) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00$\00\00\00I\00n\00d\00e\00x\00 \00o\00u\00t\00 \00o\00f\00 \00r\00a\00n\00g\00e\00\00\00\00\00\00\00\00\00") + (data (i32.const 188) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00$\00\00\00~\00l\00i\00b\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s\00\00\00\00\00\00\00\00\00") + (data (i32.const 252) "\1c\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\08\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 284) "\1c\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\08\00\00\00\03\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 316) "\1c\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\08\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 348) "\1c\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\08\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 380) "\1c\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\08\00\00\00\06\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 412) "\1c\00\00\00\00\00\00\00\00\00\00\00\18\00\00\00\08\00\00\00\07\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 444) "\1c\00\00\00\00\00\00\00\00\00\00\00\19\00\00\00\08\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 476) "\1c\00\00\00\00\00\00\00\00\00\00\00\19\00\00\00\08\00\00\00\t\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 508) "\1c\00\00\00\00\00\00\00\00\00\00\00\1a\00\00\00\08\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 540) "\1c\00\00\00\00\00\00\00\00\00\00\00\1a\00\00\00\08\00\00\00\0b\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 572) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1c\00\00\00I\00n\00v\00a\00l\00i\00d\00 \00l\00e\00n\00g\00t\00h\00") + (data (i32.const 620) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00\00\00\00\00\00\00") + (data (i32.const 684) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00(\00\00\00A\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e\00\00\00\00\00") + (data (i32.const 748) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00r\00t\00/\00i\00t\00c\00m\00s\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 816) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 848) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 876) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\00~\00l\00i\00b\00/\00r\00t\00.\00t\00s\00\00\00\00\00\00\00\00\00") + (data (i32.const 928) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 956) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1020) "\1c\00\00\00\00\00\00\00\00\00\00\00\1d\00\00\00\08\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1052) "\1c\00\00\00\00\00\00\00\00\00\00\00\1c\00\00\00\08\00\00\00\0d\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1084) "\1c\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\08\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1116) "\1c\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\08\00\00\00\0f\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1148) "\1c\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\08\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1180) "\1c\00\00\00\00\00\00\00\00\00\00\00\19\00\00\00\08\00\00\00\11\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1212) "\1c\00\00\00\00\00\00\00\00\00\00\00\19\00\00\00\08\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1244) "\1c\00\00\00\00\00\00\00\00\00\00\00\1a\00\00\00\08\00\00\00\13\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1276) "\1c\00\00\00\00\00\00\00\00\00\00\00\1a\00\00\00\08\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1308) "\1c\00\00\00\00\00\00\00\00\00\00\00\1d\00\00\00\08\00\00\00\15\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1340) "\1c\00\00\00\00\00\00\00\00\00\00\00\1c\00\00\00\08\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1372) "\1c\00\00\00\00\00\00\00\00\00\00\00\1e\00\00\00\08\00\00\00\17\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1404) "\1c\00\00\00\00\00\00\00\00\00\00\00\1f\00\00\00\08\00\00\00\18\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1436) "\1c\00\00\00\00\00\00\00\00\00\00\00 \00\00\00\08\00\00\00\19\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1468) "\1c\00\00\00\00\00\00\00\00\00\00\00!\00\00\00\08\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1500) "\1c\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\08\00\00\00\1b\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1532) "\1c\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\08\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1564) "\1c\00\00\00\00\00\00\00\00\00\00\00\"\00\00\00\08\00\00\00\1d\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1596) "\1c\00\00\00\00\00\00\00\00\00\00\00\19\00\00\00\08\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1628) "\1c\00\00\00\00\00\00\00\00\00\00\00#\00\00\00\08\00\00\00\1f\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1660) "\1c\00\00\00\00\00\00\00\00\00\00\00 \00\00\00\08\00\00\00 \00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1692) "\1c\00\00\00\00\00\00\00\00\00\00\00$\00\00\00\08\00\00\00!\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1728) "n\83\f9\a2\00\00\00\00\d1W\'\fc)\15DN\99\95b\db\c0\dd4\f5\abcQ\feA\90C<:n$\b7a\c5\bb\de\ea.I\06\e0\d2MB\1c\eb\1d\fe\1c\92\d1\t\f55\82\e8>\a7)\b1&p\9c\e9\84D\bb.9\d6\919A~_\b4\8b_\84\9c\f49S\83\ff\97\f8\1f;(\f9\bd\8b\11/\ef\0f\98\05\de\cf~6m\1fm\nZf?FO\b7\t\cb\'\c7\ba\'u-\ea_\9e\f79\07={\f1\e5\eb\b1_\fbk\ea\92R\8aF0\03V\08]\8d\1f \bc\cf\f0\abk{\fca\91\e3\a9\1d6\f4\9a_\85\99e\08\1b\e6^\80\d8\ff\8d@h\a0\14W\15\06\061\'sM") + (data (i32.const 1932) "\1c\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\08\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1964) "\1c\00\00\00\00\00\00\00\00\00\00\00%\00\00\00\08\00\00\00#\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1996) "\1c\00\00\00\00\00\00\00\00\00\00\00\'\00\00\00\08\00\00\00$\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2028) "\1c\00\00\00\00\00\00\00\00\00\00\00&\00\00\00\08\00\00\00%\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2060) "\1c\00\00\00\00\00\00\00\00\00\00\00)\00\00\00\08\00\00\00&\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2092) "\1c\00\00\00\00\00\00\00\00\00\00\00(\00\00\00\08\00\00\00\'\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2124) "\1c\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\08\00\00\00(\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2156) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00n\00u\00m\00b\00e\00r\00") + (data (i32.const 2188) "\1c\00\00\00\00\00\00\00\00\00\00\00!\00\00\00\08\00\00\00)\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2220) "\1c\00\00\00\00\00\00\00\00\00\00\00*\00\00\00\08\00\00\00*\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2252) "\1c\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\08\00\00\00+\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2284) "\1c\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\08\00\00\00,\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2316) "\1c\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\08\00\00\00-\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2348) "\1c\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\08\00\00\00.\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2380) "\1c\00\00\00\00\00\00\00\00\00\00\00\1a\00\00\00\08\00\00\00/\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2412) "\1c\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\08\00\00\000\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2444) "\1c\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\08\00\00\001\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2476) "\1c\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\08\00\00\002\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2508) "\1c\00\00\00\00\00\00\00\00\00\00\00\19\00\00\00\08\00\00\003\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2540) "\1c\00\00\00\00\00\00\00\00\00\00\00\19\00\00\00\08\00\00\004\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2572) "\1c\00\00\00\00\00\00\00\00\00\00\00\1a\00\00\00\08\00\00\005\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2604) "\1c\00\00\00\00\00\00\00\00\00\00\00\1d\00\00\00\08\00\00\006\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2636) "\1c\00\00\00\00\00\00\00\00\00\00\00\1c\00\00\00\08\00\00\007\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2668) "\1c\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\08\00\00\008\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2700) "\1c\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\08\00\00\009\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2732) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00m\00a\00t\002\00(\00\00\00") + (data (i32.const 2764) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\000\00.\000\00\00\00\00\00\00\00") + (data (i32.const 2796) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00N\00a\00N\00\00\00\00\00\00\00") + (data (i32.const 2828) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\12\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2876) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\00I\00n\00f\00i\00n\00i\00t\00y\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2928) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2984) "\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\9a\ec\ef?\d1f\87\10z^\90\bc\85\7fn\e8\15\e3\ef?\13\f6g5R\d2\8c\be\ef?m{\83]\a6\9a\97<\0f\89\f9lX\b5\ef?\fc\ef\fd\92\1a\b5\8e<\f7Gr+\92\ac\ef?\d1\9c/p=\be><\a2\d1\d32\ec\a3\ef?\0bn\90\894\03j\bc\1b\d3\fe\aff\9b\ef?\0e\bd/*RV\95\bcQ[\12\d0\01\93\ef?U\eaN\8c\ef\80P\bc\cc1l\c0\bd\8a\ef?\16\f4\d5\b9#\c9\91\bc\e0-\a9\ae\9a\82\ef?\afU\\\e9\e3\d3\80\f7\ec\9a<\aa\b9h1\87T\ef?\9d8\86\cb\82\e7\8f\bc\1d\d9\fc\"PM\ef?\8d\c3\a6DAo\8a<\d6\8cb\88;F\ef?}\04\e4\b0\05z\80<\96\dc}\91I?\ef?\94\a8\a8\e3\fd\8e\96<8bunz8\ef?}Ht\f2\18^\87\a9\af\0c\ef?\b6\ab\b0MuM\83<\15\b71\n\fe\06\ef?Lt\ac\e2\01B\86<1\d8L\fcp\01\ef?J\f8\d3]9\dd\8f<\ff\16d\b2\08\fc\ee?\04[\8e;\80\a3\86\bc\f1\9f\92_\c5\f6\ee?hPK\cc\edJ\92\bc\cb\a9:7\a7\f1\ee?\8e-Q\1b\f8\07\99\bcf\d8\05m\ae\ec\ee?\d26\94>\e8\d1q\bc\f7\9f\e54\db\e7\ee?\15\1b\ce\b3\19\19\99\bc\e5\a8\13\c3-\e3\ee?mL*\a7H\9f\85<\"4\12L\a6\de\ee?\8ai(z`\12\93\bc\1c\80\ac\04E\da\ee?[\89\17H\8f\a7X\bc*.\f7!\n\d6\ee?\1b\9aIg\9b,|\bc\97\a8P\d9\f5\d1\ee?\11\ac\c2`\edcC<-\89a`\08\ce\ee?\efd\06;\tf\96Z~d\1fx\bct_\ec\e8u\9f\ee?\b0}\8b\c0J\ee\86\bct\81\a5H\9a\9f\ee?\8a\e6U\1e2\19\86\bc\c9gBV\eb\9f\ee?\d3\d4\t^\cb\9c\90T\'\a4\ee?47;\f1\b6i\93\bc\13\ceL\99\89\a5\ee?\1e\ff\19:\84^\80\bc\ad\c7#F\1a\a7\ee?nWr\d8P\d4\94\bc\ed\92D\9b\d9\a8\ee?\00\8a\0e[g\ad\90<\99f\8a\d9\c7\aa\ee?\b4\ea\f0\c1/\b7\8d<\db\a0*B\e5\ac\ee?\ff\e7\c5\9c`\b6e\bc\8cD\b5\162\af\ee?D_\f3Y\83\f6{<6w\15\99\ae\b1\ee?\83=\1e\a7\1f\t\93\bc\c6\ff\91\0b[\b4\ee?)\1el\8b\b8\a9]\bc\e5\c5\cd\b07\b7\ee?Y\b9\90|\f9#l\bc\0fR\c8\cbD\ba\ee?\aa\f9\f4\"CC\92\bcPN\de\9f\82\bd\ee?K\8ef\d7l\ca\85\bc\ba\07\cap\f1\c0\ee?\'\ce\91+\fc\afq<\90\f0\a3\82\91\c4\ee?\bbs\n\e15\d2m<##\e3\19c\c8\ee?c\"b\"\04\c5\87\bce\e5]{f\cc\ee?\d51\e2\e3\86\1c\8b<3-J\ec\9b\d0\ee?\15\bb\bc\d3\d1\bb\91\bc]%>\b2\03\d5\ee?\d21\ee\9c1\cc\90\b4\07!\d5\82\bc_\9b{3\97|\ef?\c9\0dG;\b9*\89\bc)\a1\f5\14F\86\ef?\d3\88:`\04\b6t<\f6?\8b\e7.\90\ef?qr\9dQ\ec\c5\83<\83L\c7\fbQ\9a\ef?\f0\91\d3\8f\12\f7\8f\bc\da\90\a4\a2\af\a4\ef?}t#\e2\98\ae\8d\bc\f1g\8e-H\af\ef?\08 \aaA\bc\c3\8e<\'Za\ee\1b\ba\ef?2\eb\a9\c3\94+\84<\97\bak7+\c5\ef?\ee\85\d11\a9d\8a<@En[v\d0\ef?\ed\e3;\e4\ba7\8e\bc\14\be\9c\ad\fd\db\ef?\9d\cd\91M;\89w<\d8\90\9e\81\c1\e7\ef?\89\cc`A\c1\05S<\f1q\8f+\c2\f3\ef?") + (data (i32.const 6544) "\9f\de\e0\c3\f04\f7?\00\90\e6y\7f\cc\d7\bf\1f\e9,jx\13\f7?\00\00\0d\c2\eeo\d7\bf\a0\b5\fa\08`\f2\f6?\00\e0Q\13\e3\13\d7\bf}\8c\13\1f\a6\d1\f6?\00x(8[\b8\d6\bf\d1\b4\c5\0bI\b1\f6?\00x\80\90U]\d6\bf\ba\0c/3G\91\f6?\00\00\18v\d0\02\d6\bf#B\"\18\9fq\f6?\00\90\90\86\ca\a8\d5\bf\d9\1e\a5\99OR\f6?\00P\03VCO\d5\bf\c4$\8f\aaV3\f6?\00@k\c37\f6\d4\bf\14\dc\9dk\b3\14\f6?\00P\a8\fd\a7\9d\d4\bfL\\\c6Rd\f6\f5?\00\a8\899\92E\d4\bfO,\91\b5g\d8\f5?\00\b8\b09\f4\ed\d3\bf\de\90[\cb\bc\ba\f5?\00p\8fD\ce\96\d3\bfx\1a\d9\f2a\9d\f5?\00\a0\bd\17\1e@\d3\bf\87VF\12V\80\f5?\00\80F\ef\e2\e9\d2\bf\d3k\e7\ce\97c\f5?\00\e008\1b\94\d2\bf\93\7f\a7\e2%G\f5?\00\88\da\8c\c5>\d2\bf\83E\06B\ff*\f5?\00\90\')\e1\e9\d1\bf\df\bd\b2\db\"\0f\f5?\00\f8H+m\95\d1\bf\d7\de4G\8f\f3\f4?\00\f8\b9\9agA\d1\bf@(\de\cfC\d8\f4?\00\98\ef\94\d0\ed\d0\bf\c8\a3x\c0>\bd\f4?\00\10\db\18\a5\9a\d0\bf\8a%\e0\c3\7f\a2\f4?\00\b8cR\e6G\d0\bf4\84\d4$\05\88\f4?\00\f0\86E\"\eb\cf\bf\0b-\19\1b\cem\f4?\00\b0\17uJG\cf\bfT\189\d3\d9S\f4?\000\10=D\a4\ce\bfZ\84\b4D\':\f4?\00\b0\e9D\0d\02\ce\bf\fb\f8\15A\b5 \f4?\00\f0w)\a2`\cd\bf\b1\f4>\da\82\07\f4?\00\90\95\04\01\c0\cc\bf\8f\feW]\8f\ee\f3?\00\10\89V) \cc\bf\e9L\0b\a0\d9\d5\f3?\00\10\81\8d\17\81\cb\bf+\c1\10\c0`\bd\f3?\00\d0\d3\cc\c9\e2\ca\bf\b8\dau+$\a5\f3?\00\90\12.@E\ca\bf\02\d0\9f\cd\"\8d\f3?\00\f0\1dhw\a8\c9\bf\1cz\84\c5[u\f3?\000Him\0c\c9\bf\e26\adI\ce]\f3?\00\c0E\a6 q\c8\bf@\d4M\98yF\f3?\000\14\b4\8f\d6\c7\bf$\cb\ff\ce\\/\f3?\00pb<\b8<\c7\bfI\0d\a1uw\18\f3?\00`7\9b\9a\a3\c6\bf\909>7\c8\01\f3?\00\a0\b7T1\0b\c6\bfA\f8\95\bbN\eb\f2?\000$v}s\c5\bf\d1\a9\19\02\n\d5\f2?\000\c2\8f{\dc\c4\bf*\fd\b7\a8\f9\be\f2?\00\00\d2Q,F\c4\bf\ab\1b\0cz\1c\a9\f2?\00\00\83\bc\8a\b0\c3\bf0\b5\14`r\93\f2?\00\00Ik\99\1b\c3\bf\f5\a1WW\fa}\f2?\00@\a4\90T\87\c2\bf\bf;\1d\9b\b3h\f2?\00\a0y\f8\b9\f3\c1\bf\bd\f5\8f\83\9dS\f2?\00\a0,%\c8`\c1\bf;\08\c9\aa\b7>\f2?\00 \f7W\7f\ce\c0\bf\b6@\a9+\01*\f2?\00\a0\feI\dc<\c0\bf2A\cc\96y\15\f2?\00\80K\bc\bdW\bf\bf\9b\fc\d2\1d \01\f2?\00@@\96\087\be\bf\0bHMI\f4\ec\f1?\00@\f9>\98\17\bd\bfie\8fR\f5\d8\f1?\00\a0\d8Ng\f9\bb\bf|~W\11#\c5\f1?\00`/ y\dc\ba\bf\e9&\cbt|\b1\f1?\00\80(\e7\c3\c0\b9\bf\b6\1a,\0c\01\9e\f1?\00\c0r\b3F\a6\b8\bf\bdp\b6{\b0\8a\f1?\00\00\ac\b3\01\8d\b7\bf\b6\bc\ef%\8aw\f1?\00\008E\f1t\b6\bf\da1L5\8dd\f1?\00\80\87m\0e^\b5\bf\dd_\'\90\b9Q\f1?\00\e0\a1\de\\H\b4\bfL\d22\a4\0e?\f1?\00\a0jM\d93\b3\bf\da\f9\10r\8b,\f1?\00`\c5\f8y \b2\bf1\b5\ec(0\1a\f1?\00 b\98F\0e\b1\bf\af4\84\da\fb\07\f1?\00\00\d2jl\fa\af\bf\b3kN\0f\ee\f5\f0?\00@wJ\8d\da\ad\bf\ce\9f*]\06\e4\f0?\00\00\85\e4\ec\bc\ab\bf!\a5,cD\d2\f0?\00\c0\12@\89\a1\a9\bf\1a\98\e2|\a7\c0\f0?\00\c0\023X\88\a7\bf\d16\c6\83/\af\f0?\00\80\d6g^q\a5\bf9\13\a0\98\db\9d\f0?\00\80eI\8a\\\a3\bf\df\e7R\af\ab\8c\f0?\00@\15d\e3I\a1\bf\fb(N/\9f{\f0?\00\80\eb\82\c0r\9e\bf\19\8f5\8c\b5j\f0?\00\80RR\f1U\9a\bf,\f9\ec\a5\eeY\f0?\00\80\81\cfb=\96\bf\90,\d1\cdII\f0?\00\00\aa\8c\fb(\92\bf\a9\ad\f0\c6\c68\f0?\00\00\f9 {1\8c\bf\a92y\13e(\f0?\00\00\aa]5\19\84\bfHs\ea\'$\18\f0?\00\00\ec\c2\03\12x\bf\95\b1\14\06\04\08\f0?\00\00$y\t\04`\bf\1a\fa&\f7\1f\e0\ef?\00\00\90\84\f3\efo?t\eaa\c2\1c\a1\ef?\00\00=5A\dc\87?.\99\81\b0\10c\ef?\00\80\c2\c4\a3\ce\93?\cd\ad\ee<\f6%\ef?\00\00\89\14\c1\9f\9b?\e7\13\91\03\c8\e9\ee?\00\00\11\ce\d8\b0\a1?\ab\b1\cbx\80\ae\ee?\00\c0\01\d0[\8a\a5?\9b\0c\9d\a2\1at\ee?\00\80\d8@\83\\\a9?\b5\99\n\83\91:\ee?\00\80W\efj\'\ad?V\9a`\t\e0\01\ee?\00\c0\98\e5\98u\b0?\98\bbw\e5\01\ca\ed?\00 \0d\e3\f5S\b2?\03\91|\0b\f2\92\ed?\00\008\8b\dd.\b4?\ce\\\fbf\ac\\\ed?\00\c0W\87Y\06\b6?\9d\de^\aa,\'\ed?\00\00j5v\da\b7?\cd,k>n\f2\ec?\00`\1cNC\ab\b9?\02y\a7\a2m\be\ec?\00`\0d\bb\c7x\bb?m\087m&\8b\ec?\00 \e72\13C\bd?\04X]\bd\94X\ec?\00`\deq1\n\bf?\8c\9f\bb3\b5&\ec?\00@\91+\15g\c0??\e7\ec\ee\83\f5\eb?\00\b0\92\82\85G\c1?\c1\96\dbu\fd\c4\eb?\000\ca\cdn&\c2?(J\86\0c\1e\95\eb?\00P\c5\a6\d7\03\c3?,>\ef\c5\e2e\eb?\00\103<\c3\df\c3?\8b\88\c9gH7\eb?\00\80zk6\ba\c4?J0\1d!K\t\eb?\00\f0\d1(9\93\c5?~\ef\f2\85\e8\db\ea?\00\f0\18$\cdj\c6?\a2=`1\1d\af\ea?\00\90f\ec\f8@\c7?\a7X\d3?\e6\82\ea?\00\f0\1a\f5\c0\15\c8?\8bs\t\ef@W\ea?\00\80\f6T)\e9\c8?\'K\ab\90*,\ea?\00@\f8\026\bb\c9?\d1\f2\93\13\a0\01\ea?\00\00,\1c\ed\8b\ca?\1b<\db$\9f\d7\e9?\00\d0\01\\Q[\cb?\90\b1\c7\05%\ae\e9?\00\c0\bc\ccg)\cc?/\ce\97\f2.\85\e9?\00`H\d55\f6\cc?uK\a4\ee\ba\\\e9?\00\c0F4\bd\c1\cd?8H\e7\9d\c64\e9?\00\e0\cf\b8\01\8c\ce?\e6Rg/O\0d\e9?\00\90\17\c0\tU\cf?\9d\d7\ff\8eR\e6\e8?\00\b8\1f\12l\0e\d0?|\00\cc\9f\ce\bf\e8?\00\d0\93\0e\b8q\d0?\0e\c3\be\da\c0\99\e8?\00p\86\9ek\d4\d0?\fb\17#\aa\'t\e8?\00\d0K3\876\d1?\08\9a\b3\ac\00O\e8?\00H#g\0d\98\d1?U>e\e8I*\e8?\00\80\cc\e0\ff\f8\d1?`\02\f4\95\01\06\e8?\00hc\d7_Y\d2?)\a3\e0c%\e2\e7?\00\a8\14\t0\b9\d2?\ad\b5\dcw\b3\be\e7?\00`C\10r\18\d3?\c2%\97g\aa\9b\e7?\00\18\ecm&w\d3?W\06\17\f2\07y\e7?\000\af\fbO\d5\d3?\0c\13\d6\db\caV\e7?\00\e0/\e3\ee2\d4?") + (data (i32.const 8592) "k\b6O\01\00\10\e6?<[B\91l\02~<\95\b4M\03\000\e6?A]\00H\ea\bf\8d\f6\05\eb\ff\ef\e6?S-\e2\1a\04\80~\bc\80\97\86\0e\00\10\e7?Ry\tqf\ff{<\12\e9g\fc\ff/\e7?$\87\bd&\e2\00\8c\89<\b9{F\13\000\e9?v\02\98KN\80\7f.\98\dd\ff\af\e9?7\93Z\8a\e0@\87\bcf\fbI\ed\ff\cf\e9?\00\e0\9b\c1\08\ce?O*\00\b0\ea?_?\ff<\04\fdi\bc\d1\1e\ae\d7\ff\cf\ea?\b4p\90\12\e7>\82\bcx\04Q\ee\ff\ef\ea?\a3\de\0e\e0>\06j<[\0de\db\ff\0f\eb?\b9\n\1f8\c8\06ZO\86\d0E\ff\8a<@\16\87\f9\ff\8f\eb?\f9\c3\c2\96w\fe|\f0\0f\00\f0\f4?\1cS\85\0b\89\7f\97<\d1K\dc\12\00\10\f5?6\a4fqe\04`\c9\03\00\b0\f5?\c0\0c\bf\n\08A\9f\bc\bc\19I\1d\00\d0\f5?)G%\fb*\81\98\bc\89z\b8\e7\ff\ef\f5?\04i\ed\80\b7~\94\bc") + (data (i32.const 10652) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00x\00y\00z\00\00\00\00\00\00\00") + (data (i32.const 10684) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00x\00z\00y\00\00\00\00\00\00\00") + (data (i32.const 10716) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00y\00x\00z\00\00\00\00\00\00\00") + (data (i32.const 10748) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00y\00z\00x\00\00\00\00\00\00\00") + (data (i32.const 10780) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00z\00x\00y\00\00\00\00\00\00\00") + (data (i32.const 10812) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00(\00\00\00U\00n\00k\00n\00o\00w\00n\00 \00a\00n\00g\00l\00e\00 \00o\00r\00d\00e\00r\00 \00\00\00\00\00") + (data (i32.const 10876) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00 \00\00\00a\00s\00s\00e\00m\00b\00l\00y\00/\00q\00u\00a\00t\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 10940) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00q\00u\00a\00t\00(\00\00\00") + (data (i32.const 10972) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00q\00u\00a\00t\002\00(\00") + (data (i32.const 11004) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00v\00e\00c\002\00(\00\00\00") + (data (i32.const 11036) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 11068) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 11100) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00\00\00") + (data (i32.const 11148) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 11180) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 11212) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 11244) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 11276) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00v\00e\00c\003\00(\00\00\00") + (data (i32.const 11308) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00v\00e\00c\004\00(\00\00\00") + (data (i32.const 11340) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00*\00\00\00O\00b\00j\00e\00c\00t\00 \00a\00l\00r\00e\00a\00d\00y\00 \00p\00i\00n\00n\00e\00d\00\00\00") + (data (i32.const 11404) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00(\00\00\00O\00b\00j\00e\00c\00t\00 \00i\00s\00 \00n\00o\00t\00 \00p\00i\00n\00n\00e\00d\00\00\00\00\00") + (data (i32.const 11472) "-\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00A\08\00\00\02\00\00\00A\00\00\00\02\00\00\00\81\08\00\00\02\00\00\00\81\00\00\00\02\00\00\00\01\t\00\00\02\00\00\00\01\01\00\00\02\00\00\00\01\19\00\00\02\00\00\00\01\1a\00\00\02\00\00\00\01\n\00\00\02\00\00\00\01\02\00\00\02\00\00\00\02\t\00\00\00\00\00\00\02\n\00\00\00\00\00\00\02A\00\00\00\00\00\00B\00\00\00\00\00\00\00\02A\00\00\00\00\00\00\02A\00\00\00\00\00\00\02A\00\00\00\00\00\00\02A\00\00\00\00\00\00\02\1a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\02A\00\00\00\00\00\00 \00\00\00\00\00\00\00") + (table $0 58 funcref) + (elem $0 (i32.const 1) $~lib/math/NativeMath.random $assembly/mat2d/multiply $assembly/mat2d/subtract $assembly/vec3/subtract $assembly/vec3/multiply $assembly/vec3/divide $~lib/math/NativeMath.hypot $assembly/vec3/distance $assembly/vec3/squaredDistance $assembly/vec3/length $assembly/vec3/squaredLength $start:assembly/vec3~anonymous|0~anonymous|0 $start:assembly/vec3~anonymous|0 $assembly/vec4/subtract $assembly/vec4/multiply $assembly/vec4/divide $assembly/vec4/distance $assembly/vec4/squaredDistance $assembly/vec4/length $assembly/vec4/squaredLength $start:assembly/vec4~anonymous|0~anonymous|0 $start:assembly/vec4~anonymous|0 $assembly/vec4/clone $assembly/vec4/fromValues $assembly/vec4/copy $assembly/vec4/set $assembly/vec4/add $assembly/quat/multiply $assembly/vec4/scale $assembly/vec4/dot $assembly/vec4/lerp $assembly/vec4/normalize $assembly/vec4/exactEquals $start:assembly/quat~anonymous|0~anonymous|0 $start:assembly/quat~anonymous|0 $start:assembly/quat~anonymous|1~anonymous|0 $start:assembly/quat~anonymous|1 $start:assembly/quat~anonymous|2~anonymous|0 $start:assembly/quat~anonymous|2 $assembly/quat2/multiply $assembly/mat4/perspectiveNO $assembly/mat4/orthoNO $assembly/mat4/multiply $assembly/mat4/subtract $assembly/mat3/multiply $assembly/mat3/subtract $assembly/vec2/length $assembly/vec2/subtract $assembly/vec2/multiply $assembly/vec2/divide $assembly/vec2/distance $assembly/vec2/squaredDistance $assembly/vec2/squaredLength $start:assembly/vec2~anonymous|0~anonymous|0 $start:assembly/vec2~anonymous|0 $assembly/mat2/multiply $assembly/mat2/subtract) + (export "__asbind_entryfile_flag" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_entryfile_flag)) + (export "__asbind_String_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_String_ID)) + (export "__asbind_ArrayBuffer_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_ArrayBuffer_ID)) + (export "__asbind_ArrayBufferView_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_ArrayBufferView_ID)) + (export "__asbind_Int8Array_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Int8Array_ID)) + (export "__asbind_Uint8Array_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Uint8Array_ID)) + (export "__asbind_Int16Array_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Int16Array_ID)) + (export "__asbind_Uint16Array_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Uint16Array_ID)) + (export "__asbind_Int32Array_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Int32Array_ID)) + (export "__asbind_Uint32Array_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Uint32Array_ID)) + (export "__asbind_Float32Array_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Float32Array_ID)) + (export "__asbind_Float64Array_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Float64Array_ID)) + (export "__asbind_Int64Array_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Int64Array_ID)) + (export "__asbind_Uint64Array_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Uint64Array_ID)) + (export "__asbind_I32Array_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_I32Array_ID)) + (export "__asbind_I64Array_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_I64Array_ID)) + (export "__asbind_StringArray_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_StringArray_ID)) + (export "__asbind_BoolArray_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_BoolArray_ID)) + (export "__asbind_I32ArrayArray_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_I32ArrayArray_ID)) + (export "__asbind_I64ArrayArray_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_I64ArrayArray_ID)) + (export "__asbind_StringArrayArray_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_StringArrayArray_ID)) + (export "__asbind_BoolArrayArray_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_BoolArrayArray_ID)) (export "glMatrix.EPSILON" (global $assembly/common/EPSILON)) (export "glMatrix.ArrayTypeEnum.Float64ArrayT" (global $assembly/common/ArrayTypeEnum.Float64ArrayT)) (export "glMatrix.ArrayTypeEnum.ArrayF64T" (global $assembly/common/ArrayTypeEnum.ArrayF64T)) @@ -3620,15 +3664,15 @@ local.get $5 local.get $3 i32.add - i32.const 4 - i32.sub local.set $6 local.get $5 local.get $4 i32.store8 local.get $6 + i32.const 1 + i32.sub local.get $4 - i32.store8 offset=3 + i32.store8 local.get $3 i32.const 2 i32.le_u @@ -3642,11 +3686,15 @@ local.get $4 i32.store8 offset=2 local.get $6 + i32.const 2 + i32.sub local.get $4 - i32.store8 offset=2 + i32.store8 local.get $6 + i32.const 3 + i32.sub local.get $4 - i32.store8 offset=1 + i32.store8 local.get $3 i32.const 6 i32.le_u @@ -3657,6 +3705,8 @@ local.get $4 i32.store8 offset=3 local.get $6 + i32.const 4 + i32.sub local.get $4 i32.store8 local.get $3 @@ -3694,15 +3744,15 @@ local.get $5 local.get $3 i32.add - i32.const 28 - i32.sub local.set $6 local.get $5 local.get $8 i32.store local.get $6 + i32.const 4 + i32.sub local.get $8 - i32.store offset=24 + i32.store local.get $3 i32.const 8 i32.le_u @@ -3716,11 +3766,15 @@ local.get $8 i32.store offset=8 local.get $6 + i32.const 12 + i32.sub local.get $8 - i32.store offset=16 + i32.store local.get $6 + i32.const 8 + i32.sub local.get $8 - i32.store offset=20 + i32.store local.get $3 i32.const 24 i32.le_u @@ -3740,17 +3794,25 @@ local.get $8 i32.store offset=24 local.get $6 + i32.const 28 + i32.sub local.get $8 i32.store local.get $6 + i32.const 24 + i32.sub local.get $8 - i32.store offset=4 + i32.store local.get $6 + i32.const 20 + i32.sub local.get $8 - i32.store offset=8 + i32.store local.get $6 + i32.const 16 + i32.sub local.get $8 - i32.store offset=12 + i32.store i32.const 24 local.get $5 i32.const 4 @@ -32723,11 +32785,345 @@ call $~lib/rt/itcms/__visit end ) + (func $~lib/typedarray/Int8Array~visit (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/arraybuffer/ArrayBufferView~visit + ) + (func $~lib/typedarray/Uint8Array~visit (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/arraybuffer/ArrayBufferView~visit + ) + (func $~lib/typedarray/Int16Array~visit (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/arraybuffer/ArrayBufferView~visit + ) + (func $~lib/typedarray/Uint16Array~visit (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/arraybuffer/ArrayBufferView~visit + ) + (func $~lib/typedarray/Int32Array~visit (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/arraybuffer/ArrayBufferView~visit + ) + (func $~lib/typedarray/Uint32Array~visit (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/arraybuffer/ArrayBufferView~visit + ) + (func $~lib/typedarray/Float32Array~visit (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/arraybuffer/ArrayBufferView~visit + ) (func $~lib/typedarray/Float64Array~visit (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/arraybuffer/ArrayBufferView~visit ) + (func $~lib/typedarray/Int64Array~visit (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/arraybuffer/ArrayBufferView~visit + ) + (func $~lib/typedarray/Uint64Array~visit (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/arraybuffer/ArrayBufferView~visit + ) + (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + i32.const 0 + drop + local.get $0 + i32.load + local.get $1 + call $~lib/rt/itcms/__visit + ) + (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/array/Array#__visit + ) + (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + i32.const 0 + drop + local.get $0 + i32.load + local.get $1 + call $~lib/rt/itcms/__visit + ) + (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/array/Array#__visit + ) + (func $~lib/array/Array<~lib/string/String>#__visit (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 1 + drop + local.get $0 + i32.load offset=4 + local.set $2 + local.get $2 + local.get $0 + i32.load offset=12 + i32.const 2 + i32.shl + i32.add + local.set $3 + loop $while-continue|0 + local.get $2 + local.get $3 + i32.lt_u + local.set $4 + local.get $4 + if + local.get $2 + i32.load + local.set $5 + local.get $5 + if + local.get $5 + local.get $1 + call $~lib/rt/itcms/__visit + end + local.get $2 + i32.const 4 + i32.add + local.set $2 + br $while-continue|0 + end + end + local.get $0 + i32.load + local.get $1 + call $~lib/rt/itcms/__visit + ) + (func $~lib/array/Array<~lib/string/String>~visit (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/array/Array<~lib/string/String>#__visit + ) + (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + i32.const 0 + drop + local.get $0 + i32.load + local.get $1 + call $~lib/rt/itcms/__visit + ) + (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/array/Array#__visit + ) + (func $~lib/array/Array<~lib/array/Array>#__visit (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 1 + drop + local.get $0 + i32.load offset=4 + local.set $2 + local.get $2 + local.get $0 + i32.load offset=12 + i32.const 2 + i32.shl + i32.add + local.set $3 + loop $while-continue|0 + local.get $2 + local.get $3 + i32.lt_u + local.set $4 + local.get $4 + if + local.get $2 + i32.load + local.set $5 + local.get $5 + if + local.get $5 + local.get $1 + call $~lib/rt/itcms/__visit + end + local.get $2 + i32.const 4 + i32.add + local.set $2 + br $while-continue|0 + end + end + local.get $0 + i32.load + local.get $1 + call $~lib/rt/itcms/__visit + ) + (func $~lib/array/Array<~lib/array/Array>~visit (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/array/Array<~lib/array/Array>#__visit + ) + (func $~lib/array/Array<~lib/array/Array>#__visit (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 1 + drop + local.get $0 + i32.load offset=4 + local.set $2 + local.get $2 + local.get $0 + i32.load offset=12 + i32.const 2 + i32.shl + i32.add + local.set $3 + loop $while-continue|0 + local.get $2 + local.get $3 + i32.lt_u + local.set $4 + local.get $4 + if + local.get $2 + i32.load + local.set $5 + local.get $5 + if + local.get $5 + local.get $1 + call $~lib/rt/itcms/__visit + end + local.get $2 + i32.const 4 + i32.add + local.set $2 + br $while-continue|0 + end + end + local.get $0 + i32.load + local.get $1 + call $~lib/rt/itcms/__visit + ) + (func $~lib/array/Array<~lib/array/Array>~visit (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/array/Array<~lib/array/Array>#__visit + ) + (func $~lib/array/Array<~lib/array/Array<~lib/string/String>>#__visit (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 1 + drop + local.get $0 + i32.load offset=4 + local.set $2 + local.get $2 + local.get $0 + i32.load offset=12 + i32.const 2 + i32.shl + i32.add + local.set $3 + loop $while-continue|0 + local.get $2 + local.get $3 + i32.lt_u + local.set $4 + local.get $4 + if + local.get $2 + i32.load + local.set $5 + local.get $5 + if + local.get $5 + local.get $1 + call $~lib/rt/itcms/__visit + end + local.get $2 + i32.const 4 + i32.add + local.set $2 + br $while-continue|0 + end + end + local.get $0 + i32.load + local.get $1 + call $~lib/rt/itcms/__visit + ) + (func $~lib/array/Array<~lib/array/Array<~lib/string/String>>~visit (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/array/Array<~lib/array/Array<~lib/string/String>>#__visit + ) + (func $~lib/array/Array<~lib/array/Array>#__visit (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 1 + drop + local.get $0 + i32.load offset=4 + local.set $2 + local.get $2 + local.get $0 + i32.load offset=12 + i32.const 2 + i32.shl + i32.add + local.set $3 + loop $while-continue|0 + local.get $2 + local.get $3 + i32.lt_u + local.set $4 + local.get $4 + if + local.get $2 + i32.load + local.set $5 + local.get $5 + if + local.get $5 + local.get $1 + call $~lib/rt/itcms/__visit + end + local.get $2 + i32.const 4 + i32.add + local.set $2 + br $while-continue|0 + end + end + local.get $0 + i32.load + local.get $1 + call $~lib/rt/itcms/__visit + ) + (func $~lib/array/Array<~lib/array/Array>~visit (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/array/Array<~lib/array/Array>#__visit + ) (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) i32.const 0 drop @@ -33011,185 +33407,268 @@ local.get $1 call $~lib/array/Array<~lib/typedarray/Float64Array>#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) - i32.const 0 - drop - local.get $0 - i32.load - local.get $1 - call $~lib/rt/itcms/__visit - ) - (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - call $~lib/array/Array#__visit - ) (func $~lib/rt/__visit_members (param $0 i32) (param $1 i32) block $invalid block $assembly/mat4/Fov - block $~lib/array/Array - block $~lib/array/Array<~lib/typedarray/Float64Array> - block $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array> - block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> - block $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> - block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> - block $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> - block $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> - block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>bool> - block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> - block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> - block $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array> - block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> - block $~lib/function/Function<%28f64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array> - block $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> - block $~lib/function/Function<%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array> - block $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array> - block $assembly/imports/IArguments - block $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>f64> - block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>f64> - block $~lib/function/Function<%28f64%2Cf64%29=>f64> - block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> - block $~lib/function/Function<%28%29=>f64> - block $~lib/array/Array - block $~lib/typedarray/Float64Array - block $~lib/arraybuffer/ArrayBufferView - block $~lib/string/String - block $~lib/arraybuffer/ArrayBuffer + block $~lib/array/Array<~lib/typedarray/Float64Array> + block $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array> + block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> + block $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> + block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> + block $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> + block $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> + block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>bool> + block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> + block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> + block $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array> + block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> + block $~lib/function/Function<%28f64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array> + block $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> + block $~lib/function/Function<%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array> + block $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array> + block $assembly/imports/IArguments + block $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>f64> + block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>f64> + block $~lib/function/Function<%28f64%2Cf64%29=>f64> + block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> + block $~lib/function/Function<%28%29=>f64> + block $~lib/array/Array + block $~lib/array/Array<~lib/array/Array> + block $~lib/array/Array<~lib/array/Array<~lib/string/String>> + block $~lib/array/Array<~lib/array/Array> + block $~lib/array/Array<~lib/array/Array> + block $~lib/array/Array + block $~lib/array/Array<~lib/string/String> + block $~lib/array/Array + block $~lib/array/Array + block $~lib/typedarray/Uint64Array + block $~lib/typedarray/Int64Array + block $~lib/typedarray/Float64Array + block $~lib/typedarray/Float32Array + block $~lib/typedarray/Uint32Array + block $~lib/typedarray/Int32Array + block $~lib/typedarray/Uint16Array + block $~lib/typedarray/Int16Array + block $~lib/typedarray/Uint8Array + block $~lib/typedarray/Int8Array + block $~lib/arraybuffer/ArrayBufferView + block $~lib/string/String + block $~lib/arraybuffer/ArrayBuffer + local.get $0 + i32.const 8 + i32.sub + i32.load + br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/arraybuffer/ArrayBufferView $~lib/typedarray/Int8Array $~lib/typedarray/Uint8Array $~lib/typedarray/Int16Array $~lib/typedarray/Uint16Array $~lib/typedarray/Int32Array $~lib/typedarray/Uint32Array $~lib/typedarray/Float32Array $~lib/typedarray/Float64Array $~lib/typedarray/Int64Array $~lib/typedarray/Uint64Array $~lib/array/Array $~lib/array/Array $~lib/array/Array<~lib/string/String> $~lib/array/Array $~lib/array/Array<~lib/array/Array> $~lib/array/Array<~lib/array/Array> $~lib/array/Array<~lib/array/Array<~lib/string/String>> $~lib/array/Array<~lib/array/Array> $~lib/array/Array $~lib/function/Function<%28%29=>f64> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28f64%2Cf64%29=>f64> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>f64> $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>f64> $assembly/imports/IArguments $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28f64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>bool> $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/array/Array<~lib/typedarray/Float64Array> $assembly/mat4/Fov $invalid + end + return + end + return + end + local.get $0 + local.get $1 + call $~lib/arraybuffer/ArrayBufferView~visit + return + end + local.get $0 + local.get $1 + call $~lib/typedarray/Int8Array~visit + return + end + local.get $0 + local.get $1 + call $~lib/typedarray/Uint8Array~visit + return + end + local.get $0 + local.get $1 + call $~lib/typedarray/Int16Array~visit + return + end + local.get $0 + local.get $1 + call $~lib/typedarray/Uint16Array~visit + return + end + local.get $0 + local.get $1 + call $~lib/typedarray/Int32Array~visit + return + end + local.get $0 + local.get $1 + call $~lib/typedarray/Uint32Array~visit + return + end + local.get $0 + local.get $1 + call $~lib/typedarray/Float32Array~visit + return + end + local.get $0 + local.get $1 + call $~lib/typedarray/Float64Array~visit + return + end + local.get $0 + local.get $1 + call $~lib/typedarray/Int64Array~visit + return + end + local.get $0 + local.get $1 + call $~lib/typedarray/Uint64Array~visit + return + end + local.get $0 + local.get $1 + call $~lib/array/Array~visit + return + end + local.get $0 + local.get $1 + call $~lib/array/Array~visit + return + end local.get $0 - i32.const 8 - i32.sub - i32.load - br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/arraybuffer/ArrayBufferView $~lib/typedarray/Float64Array $~lib/array/Array $~lib/function/Function<%28%29=>f64> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28f64%2Cf64%29=>f64> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>f64> $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>f64> $assembly/imports/IArguments $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28f64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>bool> $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/array/Array<~lib/typedarray/Float64Array> $~lib/array/Array $assembly/mat4/Fov $invalid + local.get $1 + call $~lib/array/Array<~lib/string/String>~visit + return end + local.get $0 + local.get $1 + call $~lib/array/Array~visit return end + local.get $0 + local.get $1 + call $~lib/array/Array<~lib/array/Array>~visit return end local.get $0 local.get $1 - call $~lib/arraybuffer/ArrayBufferView~visit + call $~lib/array/Array<~lib/array/Array>~visit return end local.get $0 local.get $1 - call $~lib/typedarray/Float64Array~visit + call $~lib/array/Array<~lib/array/Array<~lib/string/String>>~visit return end local.get $0 local.get $1 - call $~lib/array/Array~visit + call $~lib/array/Array<~lib/array/Array>~visit return end local.get $0 local.get $1 - call $~lib/function/Function<%28%29=>f64>~visit + call $~lib/array/Array~visit return end local.get $0 local.get $1 - call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>~visit + call $~lib/function/Function<%28%29=>f64>~visit return end local.get $0 local.get $1 - call $~lib/function/Function<%28f64%2Cf64%29=>f64>~visit + call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>~visit return end local.get $0 local.get $1 - call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>f64>~visit + call $~lib/function/Function<%28f64%2Cf64%29=>f64>~visit return end local.get $0 local.get $1 - call $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>f64>~visit + call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>f64>~visit return end + local.get $0 + local.get $1 + call $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>f64>~visit return end - local.get $0 - local.get $1 - call $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array>~visit return end local.get $0 local.get $1 - call $~lib/function/Function<%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array>~visit + call $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array>~visit return end local.get $0 local.get $1 - call $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>~visit + call $~lib/function/Function<%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array>~visit return end local.get $0 local.get $1 - call $~lib/function/Function<%28f64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array>~visit + call $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>~visit return end local.get $0 local.get $1 - call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>~visit + call $~lib/function/Function<%28f64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array>~visit return end local.get $0 local.get $1 - call $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array>~visit + call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>~visit return end local.get $0 local.get $1 - call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>~visit + call $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array>~visit return end local.get $0 local.get $1 - call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>~visit + call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>~visit return end local.get $0 local.get $1 - call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>bool>~visit + call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>~visit return end local.get $0 local.get $1 - call $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>~visit + call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>bool>~visit return end local.get $0 local.get $1 - call $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>~visit + call $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>~visit return end local.get $0 local.get $1 - call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>~visit + call $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>~visit return end local.get $0 local.get $1 - call $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>~visit + call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>~visit return end local.get $0 local.get $1 - call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>~visit + call $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>~visit return end local.get $0 local.get $1 - call $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array>~visit + call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>~visit return end local.get $0 local.get $1 - call $~lib/array/Array<~lib/typedarray/Float64Array>~visit + call $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array>~visit return end local.get $0 local.get $1 - call $~lib/array/Array~visit + call $~lib/array/Array<~lib/typedarray/Float64Array>~visit return end return @@ -33208,8 +33687,8 @@ global.get $~lib/memory/__data_end i32.lt_s if - i32.const 28112 - i32.const 28160 + i32.const 28240 + i32.const 28288 i32.const 1 i32.const 1 call $~lib/builtins/abort @@ -36685,7 +37164,7 @@ if global.get $~lib/memory/__stack_pointer i32.const 12 - i32.const 3 + i32.const 10 call $~lib/rt/itcms/__new local.tee $0 i32.store @@ -37457,7 +37936,7 @@ global.get $~lib/memory/__stack_pointer i32.const 3 i32.const 2 - i32.const 26 + i32.const 43 i32.const 0 call $~lib/rt/__newArray local.tee $4 @@ -37806,7 +38285,7 @@ if global.get $~lib/memory/__stack_pointer i32.const 32 - i32.const 28 + i32.const 44 call $~lib/rt/itcms/__new local.tee $0 i32.store @@ -39154,7 +39633,7 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.const 3 - i32.const 4 + i32.const 21 i32.const 11056 call $~lib/rt/__newArray local.tee $5 @@ -39162,7 +39641,7 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.const 3 - i32.const 4 + i32.const 21 i32.const 11088 call $~lib/rt/__newArray local.tee $6 @@ -39289,7 +39768,7 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.const 3 - i32.const 4 + i32.const 21 i32.const 11168 call $~lib/rt/__newArray local.tee $5 @@ -39297,7 +39776,7 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.const 3 - i32.const 4 + i32.const 21 i32.const 11200 call $~lib/rt/__newArray local.tee $6 @@ -39424,7 +39903,7 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.const 3 - i32.const 4 + i32.const 21 i32.const 11232 call $~lib/rt/__newArray local.tee $5 @@ -39432,7 +39911,7 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.const 3 - i32.const 4 + i32.const 21 i32.const 11264 call $~lib/rt/__newArray local.tee $6 diff --git a/loader/.gitignore b/loader/.gitignore deleted file mode 100644 index 60694a99..00000000 --- a/loader/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*.js -!index.js diff --git a/loader/index.js b/loader/index.js deleted file mode 100644 index 6ddc4f18..00000000 --- a/loader/index.js +++ /dev/null @@ -1,16 +0,0 @@ -import wasm from '../build/optimized.wasm'; - -var modules; - -(async (...imports) => { - wasm(imports).then(instance => { - modules = instance.exports; - }); -})(); - -export const { - glMatrix, - mat2, mat2d, mat3, mat4, - quat, quat2, - vec2, vec3, vec4 -} = modules; diff --git a/loader/tsconfig.json b/loader/tsconfig.json deleted file mode 100644 index 1f4bf60a..00000000 --- a/loader/tsconfig.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "compilerOptions": { - "module": "umd", - "outDir": "../dist/wasm", - "allowJs": true, - "checkJs": false - }, - "exclude": ["index.js"] -} diff --git a/package.json b/package.json index 293bed7d..7e4280ff 100644 --- a/package.json +++ b/package.json @@ -36,11 +36,11 @@ "build-esm": "tsc --module es6 assembly/index.ts --outDir dist/esm", "build-cjs": "tsc --module commonjs assembly/index.ts -outDir dist/cjs", "build-dts": "tsc --declaration --emitDeclarationOnly --module amd --outFile ./dist/index.d.ts ./assembly/index.ts && node ./utils/bundle-dts.js && tsc --noEmit ./dist/index.d.ts", - "build-loader": "node ./utils/build-loader.js && tsc -p loader/tsconfig.json", + "build-loader": "tsc -p assembly/loader/tsconfig.json && tsc -noEmit dist/loader/index.d.ts", "build": "del dist && npm run update-license-version && npm run build-loader && npm run asbuild && npm run build-umd && npm run build-esm && npm run build-cjs && npm run build-dts && node ./utils/build.js", "prepare": "npm run build", - "asbuild:untouched": "asc assembly/index.ts --target debug", - "asbuild:optimized": "asc assembly/index.ts --target release", + "asbuild:untouched": "asc ./node_modules/as-bind/lib/assembly/as-bind.ts assembly/index.ts --target debug", + "asbuild:optimized": "asc ./node_modules/as-bind/lib/assembly/as-bind.ts assembly/index.ts --target release", "asbuild": "npm run asbuild:untouched && npm run asbuild:optimized" }, "devDependencies": { @@ -52,7 +52,8 @@ "@rollup/plugin-replace": "^2.4.2", "@rollup/plugin-typescript": "^8.2.1", "@rollup/plugin-wasm": "^5.1.2", - "assemblyscript": "^0.18.16", + "as-bind": "^0.6.1", + "assemblyscript": "^0.18.27", "cross-env": "^7.0.2", "del-cli": "^3.0.0", "jsdoc": "^3.6.3", diff --git a/rollup.config.js b/rollup.config.js index 402fbe2d..58e0dad8 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -2,7 +2,6 @@ import { sizeSnapshot } from 'rollup-plugin-size-snapshot'; import { terser } from 'rollup-plugin-terser'; import replace from '@rollup/plugin-replace'; import typescript from '@rollup/plugin-typescript'; -import wasm from '@rollup/plugin-wasm'; const version = require('./package.json').version; const license = require('./utils/license-template'); @@ -24,29 +23,11 @@ ${license} export default [ { - input: './loader/index.js', - output: { file: 'dist/wasm/index.js', format: 'umd', name }, + input: './assembly/loader/release.js', + output: { file: 'dist/gl-matrix-wasm.js', format: 'umd', name }, plugins: [ replace({ preventAssignment: true }), - wasm({ sourceMap: true }), - ] - }, - { - input: './build/loader-debug.js', - output: { file: 'dist/gl-matrix-loader-debug.js', format: 'umd', name }, - plugins: [ - replace({ preventAssignment: true }), - wasm({ sourceMap: true }), - bannerPlugin - ] - }, - { - input: './build/loader-release.js', - output: { file: 'dist/gl-matrix-loader-release.js', format: 'umd', name }, - plugins: [ - replace({ preventAssignment: true }), - wasm({ sourceMap: true }), - bannerPlugin + typescript() ] }, { @@ -54,7 +35,7 @@ export default [ output: { file: 'dist/gl-matrix.js', format: 'umd', name }, plugins: [ replace({ preventAssignment: true }), - typescript({ tsconfig: 'assembly/tsconfig.json'}), + typescript({ tsconfig: 'assembly/tsconfig.json' }), bannerPlugin ] }, @@ -63,7 +44,7 @@ export default [ output: { file: 'dist/gl-matrix-min.js', format: 'umd', name }, plugins: [ replace({ preventAssignment: true }), - typescript({ tsconfig: 'assembly/tsconfig.json'}), + typescript({ tsconfig: 'assembly/tsconfig.json' }), terser({ output: { comments: /^!/ } }), diff --git a/tests/index.js b/tests/index.js index df97f5cf..34bfdce9 100644 --- a/tests/index.js +++ b/tests/index.js @@ -1,4 +1,23 @@ -const assert = require("assert"); -const myModule = require(".."); -assert.equal(myModule.add(1, 2), 3); -console.log("ok"); +import assert from 'assert'; +import { bind } from '../loader/index.js'; + +(async () => { + + // pretier-ignore + const out = [1, 0, + 0, 1]; + + const mat2 = { + create: bind('mat2', 'create'), + invert: bind('mat2', 'invert') + } + + var { value: arr, reference: ref } = await mat2.create(); + assert.deepEqual(arr, out); + console.log('ok'); + // await mat2.invert(arr, out); + await mat2.invert(ref, out); + console.log(1, -0, -0, 1]); + console.log(arr); + console.log('ok'); +})(); From 32801c07ddbec048c167984d2859cb4d40bb5ce8 Mon Sep 17 00:00:00 2001 From: Huguenin-Elie Steve Date: Thu, 29 Apr 2021 00:55:46 +0200 Subject: [PATCH 31/32] build prepare build system for as-pect files --- .size-snapshot.json | 6 +++--- assembly/loader/tsconfig.json | 9 ++++----- assembly/tsconfig.json | 8 ++++---- package.json | 2 +- rollup.config.js | 6 +++--- 5 files changed, 15 insertions(+), 16 deletions(-) diff --git a/.size-snapshot.json b/.size-snapshot.json index cb9d3d3e..c909b218 100644 --- a/.size-snapshot.json +++ b/.size-snapshot.json @@ -5,8 +5,8 @@ "gzipped": 13273 }, "dist\\gl-matrix-min.js": { - "bundled": 54693, - "minified": 54603, - "gzipped": 13958 + "bundled": 54762, + "minified": 54692, + "gzipped": 13874 } } diff --git a/assembly/loader/tsconfig.json b/assembly/loader/tsconfig.json index ed28dcf1..01273aa7 100644 --- a/assembly/loader/tsconfig.json +++ b/assembly/loader/tsconfig.json @@ -1,13 +1,12 @@ { - "extends": "assemblyscript/std/portable.json", "compilerOptions": { - "module": "umd", - "outDir": "../dist/loader", + "outDir": "../../dist/loader", "allowJs": true, - "emitDeclarationOnly": true, "declaration": true, "checkJs": false }, - "exclude": [ + "include": [ + "**/*.js", + "**/*.ts" ] } diff --git a/assembly/tsconfig.json b/assembly/tsconfig.json index 51f7bb09..0b761ae0 100644 --- a/assembly/tsconfig.json +++ b/assembly/tsconfig.json @@ -2,15 +2,15 @@ "extends": "assemblyscript/std/portable.json", "compilerOptions": { "module": "esnext", - "outDir": "../dist", + "outDir": "../dist/loader", "declarationDir": "../dist/loader", + "emitDeclarationOnly": true, "declaration": true }, "exclude": [ - "index.js", - "./**/*.spec.ts" + "**/*.spec.ts" ], "include": [ - "./*.ts" + "**/*.ts" ] } \ No newline at end of file diff --git a/package.json b/package.json index 7e4280ff..927fa8ee 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "build-esm": "tsc --module es6 assembly/index.ts --outDir dist/esm", "build-cjs": "tsc --module commonjs assembly/index.ts -outDir dist/cjs", "build-dts": "tsc --declaration --emitDeclarationOnly --module amd --outFile ./dist/index.d.ts ./assembly/index.ts && node ./utils/bundle-dts.js && tsc --noEmit ./dist/index.d.ts", - "build-loader": "tsc -p assembly/loader/tsconfig.json && tsc -noEmit dist/loader/index.d.ts", + "build-loader": "tsc -p assembly/tsconfig.json && tsc -p assembly/loader/tsconfig.json && tsc -noEmit dist/loader/index.d.ts", "build": "del dist && npm run update-license-version && npm run build-loader && npm run asbuild && npm run build-umd && npm run build-esm && npm run build-cjs && npm run build-dts && node ./utils/build.js", "prepare": "npm run build", "asbuild:untouched": "asc ./node_modules/as-bind/lib/assembly/as-bind.ts assembly/index.ts --target debug", diff --git a/rollup.config.js b/rollup.config.js index 58e0dad8..61ecf589 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -27,7 +27,7 @@ export default [ output: { file: 'dist/gl-matrix-wasm.js', format: 'umd', name }, plugins: [ replace({ preventAssignment: true }), - typescript() + typescript({ exclude: "**/*.spec.ts" }) ] }, { @@ -35,7 +35,7 @@ export default [ output: { file: 'dist/gl-matrix.js', format: 'umd', name }, plugins: [ replace({ preventAssignment: true }), - typescript({ tsconfig: 'assembly/tsconfig.json' }), + typescript({ exclude: "**/*.spec.ts" }), bannerPlugin ] }, @@ -44,7 +44,7 @@ export default [ output: { file: 'dist/gl-matrix-min.js', format: 'umd', name }, plugins: [ replace({ preventAssignment: true }), - typescript({ tsconfig: 'assembly/tsconfig.json' }), + typescript({ exclude: "**/*.spec.ts" }), terser({ output: { comments: /^!/ } }), From ae420e43f0ae4b1ab402cd5ac9d5fda0fde92e98 Mon Sep 17 00:00:00 2001 From: Huguenin-Elie Steve Date: Thu, 29 Apr 2021 00:58:29 +0200 Subject: [PATCH 32/32] as-pect default configuration copied and renamed mocha tests from *.js into *.spec.ts --- as-pect.config.js | 55 ++ assembly/__tests__/as-pect.d.ts | 1 + assembly/__tests__/common.spec.ts | 23 + assembly/__tests__/example.spec.ts | 42 ++ assembly/__tests__/mat2.spec.ts | 339 +++++++++ assembly/__tests__/mat2d.spec.ts | 319 ++++++++ assembly/__tests__/mat3.spec.ts | 503 ++++++++++++ assembly/__tests__/mat4.spec.ts | 1134 ++++++++++++++++++++++++++++ assembly/__tests__/quat.spec.ts | 798 ++++++++++++++++++++ assembly/__tests__/quat2.spec.ts | 716 ++++++++++++++++++ assembly/__tests__/vec2.spec.ts | 651 ++++++++++++++++ assembly/__tests__/vec3.spec.ts | 761 +++++++++++++++++++ assembly/__tests__/vec4.spec.ts | 611 +++++++++++++++ assembly/__tests__/worker.spec.ts | 44 ++ 14 files changed, 5997 insertions(+) create mode 100644 as-pect.config.js create mode 100644 assembly/__tests__/as-pect.d.ts create mode 100644 assembly/__tests__/common.spec.ts create mode 100644 assembly/__tests__/example.spec.ts create mode 100644 assembly/__tests__/mat2.spec.ts create mode 100644 assembly/__tests__/mat2d.spec.ts create mode 100644 assembly/__tests__/mat3.spec.ts create mode 100644 assembly/__tests__/mat4.spec.ts create mode 100644 assembly/__tests__/quat.spec.ts create mode 100644 assembly/__tests__/quat2.spec.ts create mode 100644 assembly/__tests__/vec2.spec.ts create mode 100644 assembly/__tests__/vec3.spec.ts create mode 100644 assembly/__tests__/vec4.spec.ts create mode 100644 assembly/__tests__/worker.spec.ts diff --git a/as-pect.config.js b/as-pect.config.js new file mode 100644 index 00000000..f3864891 --- /dev/null +++ b/as-pect.config.js @@ -0,0 +1,55 @@ +module.exports = { + /** + * A set of globs passed to the glob package that qualify typescript files for testing. + */ + include: ["assembly/__tests__/**/*.spec.ts"], + /** + * A set of globs passed to the glob package that quality files to be added to each test. + */ + add: ["assembly/__tests__/**/*.include.ts"], + /** + * All the compiler flags needed for this test suite. Make sure that a binary file is output. + */ + flags: { + /** To output a wat file, uncomment the following line. */ + // "--textFile": ["output.wat"], + /** A runtime must be provided here. */ + "--runtime": ["full"], // Acceptable values are: full, half, stub (arena), and none + }, + /** + * A set of regexp that will disclude source files from testing. + */ + disclude: [/node_modules/], + /** + * Add your required AssemblyScript imports here. + */ + imports(memory, createImports, instantiateSync, binary) { + let instance; // Imports can reference this + const myImports = { + // put your web assembly imports here, and return the module + }; + instance = instantiateSync(binary, createImports(myImports)); + return instance; + }, + /** + * Add a custom reporter here if you want one. The following example is in typescript. + * + * @example + * import { TestReporter, TestGroup, TestResult, TestContext } from "as-pect"; + * + * export class CustomReporter extends TestReporter { + * // implement each abstract method here + * public abstract onStart(suite: TestContext): void; + * public abstract onGroupStart(group: TestGroup): void; + * public abstract onGroupFinish(group: TestGroup): void; + * public abstract onTestStart(group: TestGroup, result: TestResult): void; + * public abstract onTestFinish(group: TestGroup, result: TestResult): void; + * public abstract onFinish(suite: TestContext): void; + * } + */ + // reporter: new CustomReporter(), + /** + * Specify if the binary wasm file should be written to the file system. + */ + outputBinary: false, +}; diff --git a/assembly/__tests__/as-pect.d.ts b/assembly/__tests__/as-pect.d.ts new file mode 100644 index 00000000..6101ea23 --- /dev/null +++ b/assembly/__tests__/as-pect.d.ts @@ -0,0 +1 @@ +/// diff --git a/assembly/__tests__/common.spec.ts b/assembly/__tests__/common.spec.ts new file mode 100644 index 00000000..74043890 --- /dev/null +++ b/assembly/__tests__/common.spec.ts @@ -0,0 +1,23 @@ +import * as glMatrix from "../common" + +describe("common", function(){ + let result; + + describe("toRadian", function(){ + beforeEach(function(){ result = glMatrix.toRadian(180); }); + it("should return a value of 3.141592654(Math.PI)", function(){ expect(result).toBeEqualish(Math.PI); }); + }); + + describe("equals", function() { + let r0, r1, r2; + beforeEach(function() { + r0 = glMatrix.equals(1.0, 0.0); + r1 = glMatrix.equals(1.0, 1.0); + r2 = glMatrix.equals(1.0+glMatrix.EPSILON/2, 1.0); + }); + it("should return false for different numbers", function() { expect(r0).toBe(false); }); + it("should return true for the same number", function() { expect(r1).toBe(true); }); + it("should return true for numbers that are close", function() { expect(r2).toBe(true); }); + }); + +}); diff --git a/assembly/__tests__/example.spec.ts b/assembly/__tests__/example.spec.ts new file mode 100644 index 00000000..cf4e86cc --- /dev/null +++ b/assembly/__tests__/example.spec.ts @@ -0,0 +1,42 @@ +class Vec3 { + constructor(public x: f64 = 0, public y: f64 = 0, public z: f64 = 0) {} +} +describe("example", () => { + it("should be 42", () => { + expect(19 + 23).toBe(42, "19 + 23 is 42"); + }); + + it("should be the same reference", () => { + let ref = new Vec3(); + expect(ref).toBe(ref, "Reference Equality"); + }); + + it("should perform a memory comparison", () => { + let a = new Vec3(1, 2, 3); + let b = new Vec3(1, 2, 3); + + expect(a).toStrictEqual( + b, + "a and b have the same values, (discluding child references)", + ); + }); + + it("should compare strings", () => { + expect("a=" + "200").toBe("a=200", "both strings are equal"); + }); + + it("should compare values", () => { + expect(10).toBeLessThan(200); + expect(1000).toBeGreaterThan(200); + expect(1000).toBeGreaterThanOrEqual(1000); + expect(1000).toBeLessThanOrEqual(1000); + }); + + it("can log some values to the console", () => { + log("Hello world!"); // strings! + log(3.1415); // floats! + log(244); // integers! + log(0xffffffff); // long values! + log(new ArrayBuffer(50)); // bytes! + }); +}); diff --git a/assembly/__tests__/mat2.spec.ts b/assembly/__tests__/mat2.spec.ts new file mode 100644 index 00000000..b4c1dd99 --- /dev/null +++ b/assembly/__tests__/mat2.spec.ts @@ -0,0 +1,339 @@ +import * as mat2 from "../mat2" + +describe("mat2", function() { + let out, matA, matB, identity, result; + + beforeEach(function() { + matA = [1, 2, + 3, 4]; + + matB = [5, 6, + 7, 8]; + + out = [0, 0, + 0, 0]; + + identity = [1, 0, + 0, 1]; + }); + + describe("create", function() { + beforeEach(function() { result = mat2.create(); }); + it("should return a 4 element array initialized to a 2x2 identity matrix", function() { expect(result).toBeEqualish(identity); }); + }); + + describe("clone", function() { + beforeEach(function() { result = mat2.clone(matA); }); + it("should return a 4 element array initialized to the values in matA", function() { expect(result).toBeEqualish(matA); }); + }); + + describe("copy", function() { + beforeEach(function() { result = mat2.copy(out, matA); }); + it("should place values into out", function() { expect(out).toBeEqualish(matA); }); + it("should return out", function() { expect(result).toBe(out); }); + }); + + describe("identity", function() { + beforeEach(function() { result = mat2.identity(out); }); + it("should place values into out", function() { expect(result).toBeEqualish(identity); }); + it("should return out", function() { expect(result).toBe(out); }); + }); + + describe("transpose", function() { + describe("with a separate output matrix", function() { + beforeEach(function() { result = mat2.transpose(out, matA); }); + + it("should place values into out", function() { expect(out).toBeEqualish([1, 3, 2, 4]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify matA", function() { expect(matA).toBeEqualish([1, 2, 3, 4]); }); + }); + + describe("when matA is the output matrix", function() { + beforeEach(function() { result = mat2.transpose(matA, matA); }); + + it("should place values into matA", function() { expect(matA).toBeEqualish([1, 3, 2, 4]); }); + it("should return matA", function() { expect(result).toBe(matA); }); + }); + }); + + describe("invert", function() { + describe("with a separate output matrix", function() { + beforeEach(function() { result = mat2.invert(out, matA); }); + + it("should place values into out", function() { expect(out).toBeEqualish([-2, 1, 1.5, -0.5]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify matA", function() { expect(matA).toBeEqualish([1, 2, 3, 4]); }); + }); + + describe("when matA is the output matrix", function() { + beforeEach(function() { result = mat2.invert(matA, matA); }); + + it("should place values into matA", function() { expect(matA).toBeEqualish([-2, 1, 1.5, -0.5]); }); + it("should return matA", function() { expect(result).toBe(matA); }); + }); + }); + + describe("adjoint", function() { + describe("with a separate output matrix", function() { + beforeEach(function() { result = mat2.adjoint(out, matA); }); + + it("should place values into out", function() { expect(out).toBeEqualish([4, -2, -3, 1]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify matA", function() { expect(matA).toBeEqualish([1, 2, 3, 4]); }); + }); + + describe("when matA is the output matrix", function() { + beforeEach(function() { result = mat2.adjoint(matA, matA); }); + + it("should place values into matA", function() { expect(matA).toBeEqualish([4, -2, -3, 1]); }); + it("should return matA", function() { expect(result).toBe(matA); }); + }); + }); + + describe("determinant", function() { + beforeEach(function() { result = mat2.determinant(matA); }); + + it("should return the determinant", function() { expect(result).toEqual(-2); }); + }); + + describe("multiply", function() { + it("should have an alias called 'mul'", function() { expect(mat2.mul).toEqual(mat2.multiply); }); + + describe("with a separate output matrix", function() { + beforeEach(function() { result = mat2.multiply(out, matA, matB); }); + + it("should place values into out", function() { expect(out).toBeEqualish([23, 34, 31, 46]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify matA", function() { expect(matA).toBeEqualish([1, 2, 3, 4]); }); + it("should not modify matB", function() { expect(matB).toBeEqualish([5, 6, 7, 8]); }); + }); + + describe("when matA is the output matrix", function() { + beforeEach(function() { result = mat2.multiply(matA, matA, matB); }); + + it("should place values into matA", function() { expect(matA).toBeEqualish([23, 34, 31, 46]); }); + it("should return matA", function() { expect(result).toBe(matA); }); + it("should not modify matB", function() { expect(matB).toBeEqualish([5, 6, 7, 8]); }); + }); + + describe("when matB is the output matrix", function() { + beforeEach(function() { result = mat2.multiply(matB, matA, matB); }); + + it("should place values into matB", function() { expect(matB).toBeEqualish([23, 34, 31, 46]); }); + it("should return matB", function() { expect(result).toBe(matB); }); + it("should not modify matA", function() { expect(matA).toBeEqualish([1, 2, 3, 4]); }); + }); + }); + + describe("rotate", function() { + describe("with a separate output matrix", function() { + beforeEach(function() { result = mat2.rotate(out, matA, Math.PI * 0.5); }); + + it("should place values into out", function() { expect(out).toBeEqualish([3, 4, -1, -2]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify matA", function() { expect(matA).toBeEqualish([1, 2, 3, 4]); }); + }); + + describe("when matA is the output matrix", function() { + beforeEach(function() { result = mat2.rotate(matA, matA, Math.PI * 0.5); }); + + it("should place values into matA", function() { expect(matA).toBeEqualish([3, 4, -1, -2]); }); + it("should return matA", function() { expect(result).toBe(matA); }); + }); + }); + + describe("scale", function() { + let vecA; + beforeEach(function() { vecA = [2, 3]; }); + + describe("with a separate output matrix", function() { + beforeEach(function() { result = mat2.scale(out, matA, vecA); }); + + it("should place values into out", function() { expect(out).toBeEqualish([2, 4, 9, 12]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify matA", function() { expect(matA).toBeEqualish([1, 2, 3, 4]); }); + }); + + describe("when matA is the output matrix", function() { + beforeEach(function() { result = mat2.scale(matA, matA, vecA); }); + + it("should place values into matA", function() { expect(matA).toBeEqualish([2, 4, 9, 12]); }); + it("should return matA", function() { expect(result).toBe(matA); }); + }); + }); + + describe("str", function() { + beforeEach(function() { result = mat2.str(matA); }); + + it("should return a string representation of the matrix", function() { expect(result).toEqual("mat2(1, 2, 3, 4)"); }); + }); + + describe("frob", function() { + beforeEach(function() { result = mat2.frob(matA); }); + it("should return the Frobenius Norm of the matrix", function() { expect(result).toEqual( Math.sqrt(Math.pow(1, 2) + Math.pow(2, 2) + Math.pow(3, 2) + Math.pow(4, 2))); }); + }); + + describe("LDU", function() { + let L, D, U, L_result, D_result, U_result; + beforeEach(function() { + L = mat2.create(); + D = mat2.create(); + U = mat2.create(); + result = mat2.LDU(L, D, U, [4,3,6,3]); + L_result = mat2.create(); L_result[2] = 1.5; + D_result = mat2.create(); + U_result = mat2.create(); + U_result[0] = 4; U_result[1] = 3; U_result[3] = -1.5; + }); + it("should return a lower triangular, a diagonal and an upper triangular matrix", function() { + expect(result[0]).toBeEqualish(L_result); + expect(result[1]).toBeEqualish(D_result); + expect(result[2]).toBeEqualish(U_result); + }); + }); + + describe("add", function() { + describe("with a separate output matrix", function() { + beforeEach(function() { result = mat2.add(out, matA, matB); }); + + it("should place values into out", function() { expect(out).toBeEqualish([6, 8, 10, 12]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify matA", function() { expect(matA).toBeEqualish([1, 2, 3, 4]); }); + it("should not modify matB", function() { expect(matB).toBeEqualish([5, 6, 7, 8]); }); + }); + + describe("when matA is the output matrix", function() { + beforeEach(function() { result = mat2.add(matA, matA, matB); }); + + it("should place values into matA", function() { expect(matA).toBeEqualish([6, 8, 10, 12]); }); + it("should return matA", function() { expect(result).toBe(matA); }); + it("should not modify matB", function() { expect(matB).toBeEqualish([5, 6, 7, 8]); }); + }); + + describe("when matB is the output matrix", function() { + beforeEach(function() { result = mat2.add(matB, matA, matB); }); + + it("should place values into matB", function() { expect(matB).toBeEqualish([6, 8, 10, 12]); }); + it("should return matB", function() { expect(result).toBe(matB); }); + it("should not modify matA", function() { expect(matA).toBeEqualish([1, 2, 3, 4]); }); + }); + }); + + describe("subtract", function() { + it("should have an alias called 'sub'", function() { expect(mat2.sub).toEqual(mat2.subtract); }); + + describe("with a separate output matrix", function() { + beforeEach(function() { result = mat2.subtract(out, matA, matB); }); + + it("should place values into out", function() { expect(out).toBeEqualish([-4, -4, -4, -4]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify matA", function() { expect(matA).toBeEqualish([1, 2, 3, 4]); }); + it("should not modify matB", function() { expect(matB).toBeEqualish([5, 6, 7, 8]); }); + }); + + describe("when matA is the output matrix", function() { + beforeEach(function() { result = mat2.subtract(matA, matA, matB); }); + + it("should place values into matA", function() { expect(matA).toBeEqualish([-4, -4, -4, -4]); }); + it("should return matA", function() { expect(result).toBe(matA); }); + it("should not modify matB", function() { expect(matB).toBeEqualish([5, 6, 7, 8]); }); + }); + + describe("when matB is the output matrix", function() { + beforeEach(function() { result = mat2.subtract(matB, matA, matB); }); + + it("should place values into matB", function() { expect(matB).toBeEqualish([-4, -4, -4, -4]); }); + it("should return matB", function() { expect(result).toBe(matB); }); + it("should not modify matA", function() { expect(matA).toBeEqualish([1, 2, 3, 4]); }); + }); + }); + + describe("fromValues", function() { + beforeEach(function() { result = mat2.fromValues(1, 2, 3, 4); }); + it("should return a 4 element array initialized to the values passed", function() { expect(result).toBeEqualish([1, 2, 3, 4]); }); + }); + + describe("set", function() { + beforeEach(function() { result = mat2.set(out, 1, 2, 3, 4); }); + it("should place values into out", function() { expect(out).toBeEqualish([1, 2, 3, 4]); }); + it("should return out", function() { expect(result).toBe(out); }); + }); + + describe("multiplyScalar", function() { + describe("with a separate output matrix", function() { + beforeEach(function() { result = mat2.multiplyScalar(out, matA, 2); }); + + it("should place values into out", function() { expect(out).toBeEqualish([2, 4, 6, 8]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify matA", function() { expect(matA).toBeEqualish([1, 2, 3, 4]); }); + }); + + describe("when matA is the output matrix", function() { + beforeEach(function() { result = mat2.multiplyScalar(matA, matA, 2); }); + + it("should place values into matA", function() { expect(matA).toBeEqualish([2, 4, 6, 8]); }); + it("should return matA", function() { expect(result).toBe(matA); }); + }); + }); + + describe("multiplyScalarAndAdd", function() { + describe("with a separate output matrix", function() { + beforeEach(function() { result = mat2.multiplyScalarAndAdd(out, matA, matB, 0.5); }); + + it("should place values into out", function() { expect(out).toBeEqualish([3.5, 5, 6.5, 8]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify matA", function() { expect(matA).toBeEqualish([1, 2, 3, 4]); }); + it("should not modify matB", function() { expect(matB).toBeEqualish([5, 6, 7, 8]); }); + }); + + describe("when matA is the output matrix", function() { + beforeEach(function() { result = mat2.multiplyScalarAndAdd(matA, matA, matB, 0.5); }); + + it("should place values into matA", function() { expect(matA).toBeEqualish([3.5, 5, 6.5, 8]); }); + it("should return matA", function() { expect(result).toBe(matA); }); + it("should not modify matB", function() { expect(matB).toBeEqualish([5, 6, 7, 8]); }); + }); + + describe("when matB is the output matrix", function() { + beforeEach(function() { result = mat2.multiplyScalarAndAdd(matB, matA, matB, 0.5); }); + + it("should place values into matB", function() { expect(matB).toBeEqualish([3.5, 5, 6.5, 8]); }); + it("should return matB", function() { expect(result).toBe(matB); }); + it("should not modify matA", function() { expect(matA).toBeEqualish([1, 2, 3, 4]); }); + }); + }); + + describe("exactEquals", function() { + let matC, r0, r1, r2; + beforeEach(function() { + matA = [0, 1, 2, 3]; + matB = [0, 1, 2, 3]; + matC = [1, 2, 3, 4]; + r0 = mat2.exactEquals(matA, matB); + r1 = mat2.exactEquals(matA, matC); + }); + it("should return true for identical matrices", function() { expect(r0).toBe(true); }); + it("should return false for different matrices", function() { expect(r1).toBe(false); }); + it("should not modify matA", function() { expect(matA).toBeEqualish([0, 1, 2, 3]); }); + it("should not modify matB", function() { expect(matB).toBeEqualish([0, 1, 2, 3]); }); + }); + + describe("equals", function() { + let matC, matD, r0, r1, r2; + beforeEach(function() { + matA = [0, 1, 2, 3]; + matB = [0, 1, 2, 3]; + matC = [1, 2, 3, 4]; + matD = [1e-16, 1, 2, 3]; + r0 = mat2.equals(matA, matB); + r1 = mat2.equals(matA, matC); + r2 = mat2.equals(matA, matD); + }); + it("should return true for identical matrices", function() { expect(r0).toBe(true); }); + it("should return false for different matrices", function() { expect(r1).toBe(false); }); + it("should return true for close but not identical matrices", function() { expect(r2).toBe(true); }); + it("should not modify matA", function() { expect(matA).toBeEqualish([0, 1, 2, 3]); }); + it("should not modify matB", function() { expect(matB).toBeEqualish([0, 1, 2, 3]); }); + }); + +}); diff --git a/assembly/__tests__/mat2d.spec.ts b/assembly/__tests__/mat2d.spec.ts new file mode 100644 index 00000000..f7ab504e --- /dev/null +++ b/assembly/__tests__/mat2d.spec.ts @@ -0,0 +1,319 @@ +import * as mat2d from "../mat2d" + +describe("mat2d", function() { + let out, matA, matB, oldA, oldB, identity, result; + + beforeEach(function() { + matA = [1, 2, + 3, 4, + 5, 6]; + + oldA = [1, 2, + 3, 4, + 5, 6]; + + matB = [7, 8, + 9, 10, + 11, 12]; + + oldB = [7, 8, + 9, 10, + 11, 12]; + + out = [0, 0, + 0, 0, + 0, 0]; + + identity = [1, 0, + 0, 1, + 0, 0]; + }); + + describe("create", function() { + beforeEach(function() { result = mat2d.create(); }); + it("should return a 6 element array initialized to a 2x3 identity matrix", function() { expect(result).toBeEqualish(identity); }); + }); + + describe("clone", function() { + beforeEach(function() { result = mat2d.clone(matA); }); + it("should return a 6 element array initialized to the values in matA", function() { expect(result).toBeEqualish(matA); }); + }); + + describe("copy", function() { + beforeEach(function() { result = mat2d.copy(out, matA); }); + it("should place values into out", function() { expect(out).toBeEqualish(matA); }); + it("should return out", function() { expect(result).toBe(out); }); + }); + + describe("identity", function() { + beforeEach(function() { result = mat2d.identity(out); }); + it("should place values into out", function() { expect(result).toBeEqualish(identity); }); + it("should return out", function() { expect(result).toBe(out); }); + }); + + describe("invert", function() { + describe("with a separate output matrix", function() { + beforeEach(function() { result = mat2d.invert(out, matA); }); + + it("should place values into out", function() { expect(out).toBeEqualish([ -2, 1, 1.5, -0.5, 1, -2 ]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify matA", function() { expect(matA).toBeEqualish(oldA); }); + }); + + describe("when matA is the output matrix", function() { + beforeEach(function() { result = mat2d.invert(matA, matA); }); + + it("should place values into matA", function() { expect(matA).toBeEqualish([ -2, 1, 1.5, -0.5, 1, -2 ]); }); + it("should return matA", function() { expect(result).toBe(matA); }); + }); + }); + + describe("determinant", function() { + beforeEach(function() { result = mat2d.determinant(matA); }); + + it("should return the determinant", function() { expect(result).toEqual(-2); }); + }); + + describe("multiply", function() { + it("should have an alias called 'mul'", function() { expect(mat2d.mul).toEqual(mat2d.multiply); }); + + describe("with a separate output matrix", function() { + beforeEach(function() { result = mat2d.multiply(out, matA, matB); }); + + it("should place values into out", function() { expect(out).toBeEqualish([31, 46, 39, 58, 52, 76]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify matA", function() { expect(matA).toBeEqualish(oldA); }); + it("should not modify matB", function() { expect(matB).toBeEqualish(oldB); }); + }); + + describe("when matA is the output matrix", function() { + beforeEach(function() { result = mat2d.multiply(matA, matA, matB); }); + + it("should place values into matA", function() { expect(matA).toBeEqualish([31, 46, 39, 58, 52, 76]); }); + it("should return matA", function() { expect(result).toBe(matA); }); + it("should not modify matB", function() { expect(matB).toBeEqualish(oldB); }); + }); + + describe("when matB is the output matrix", function() { + beforeEach(function() { result = mat2d.multiply(matB, matA, matB); }); + + it("should place values into matB", function() { expect(matB).toBeEqualish([31, 46, 39, 58, 52, 76]); }); + it("should return matB", function() { expect(result).toBe(matB); }); + it("should not modify matA", function() { expect(matA).toBeEqualish(oldA); }); + }); + }); + + describe("rotate", function() { + describe("with a separate output matrix", function() { + beforeEach(function() { result = mat2d.rotate(out, matA, Math.PI * 0.5); }); + + it("should place values into out", function() { expect(out).toBeEqualish([3, 4, -1, -2, 5, 6]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify matA", function() { expect(matA).toBeEqualish(oldA); }); + }); + + describe("when matA is the output matrix", function() { + beforeEach(function() { result = mat2d.rotate(matA, matA, Math.PI * 0.5); }); + + it("should place values into matA", function() { expect(matA).toBeEqualish([3, 4, -1, -2, 5, 6]); }); + it("should return matA", function() { expect(result).toBe(matA); }); + }); + }); + + describe("scale", function() { + let vecA; + beforeEach(function() { vecA = [2, 3]; }); + + describe("with a separate output matrix", function() { + beforeEach(function() { result = mat2d.scale(out, matA, vecA); }); + + it("should place values into out", function() { expect(out).toBeEqualish([2, 4, 9, 12, 5, 6]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify matA", function() { expect(matA).toBeEqualish(oldA); }); + }); + + describe("when matA is the output matrix", function() { + beforeEach(function() { result = mat2d.scale(matA, matA, vecA); }); + + it("should place values into matA", function() { expect(matA).toBeEqualish([2, 4, 9, 12, 5, 6]); }); + it("should return matA", function() { expect(result).toBe(matA); }); + }); + }); + + describe("translate", function() { + let vecA; + beforeEach(function() { vecA = [2, 3]; }); + + describe("with a separate output matrix", function() { + beforeEach(function() { result = mat2d.translate(out, matA, vecA); }); + + it("should place values into out", function() { expect(out).toBeEqualish([1, 2, 3, 4, 16, 22]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify matA", function() { expect(matA).toBeEqualish(oldA); }); + }); + + describe("when matA is the output matrix", function() { + beforeEach(function() { result = mat2d.translate(matA, matA, vecA); }); + + it("should place values into matA", function() { expect(matA).toBeEqualish([1, 2, 3, 4, 16, 22]); }); + it("should return matA", function() { expect(result).toBe(matA); }); + }); + }); + + describe("str", function() { + beforeEach(function() { result = mat2d.str(matA); }); + + it("should return a string representation of the matrix", function() { expect(result).toEqual("mat2d(1, 2, 3, 4, 5, 6)"); }); + }); + + describe("frob", function() { + beforeEach(function() { result = mat2d.frob(matA); }); + it("should return the Frobenius Norm of the matrix", function() { expect(result).toEqual( Math.sqrt(Math.pow(1, 2) + Math.pow(2, 2) + Math.pow(3, 2) + Math.pow(4, 2) + Math.pow(5, 2) + Math.pow(6, 2) + 1)); }); + }); + + describe("add", function() { + describe("with a separate output matrix", function() { + beforeEach(function() { result = mat2d.add(out, matA, matB); }); + + it("should place values into out", function() { expect(out).toBeEqualish([8, 10, 12, 14, 16, 18]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify matA", function() { expect(matA).toBeEqualish(oldA); }); + it("should not modify matB", function() { expect(matB).toBeEqualish(oldB); }); + }); + + describe("when matA is the output matrix", function() { + beforeEach(function() { result = mat2d.add(matA, matA, matB); }); + + it("should place values into matA", function() { expect(matA).toBeEqualish([8, 10, 12, 14, 16, 18]); }); + it("should return matA", function() { expect(result).toBe(matA); }); + it("should not modify matB", function() { expect(matB).toBeEqualish(oldB); }); + }); + + describe("when matB is the output matrix", function() { + beforeEach(function() { result = mat2d.add(matB, matA, matB); }); + + it("should place values into matB", function() { expect(matB).toBeEqualish([8, 10, 12, 14, 16, 18]); }); + it("should return matB", function() { expect(result).toBe(matB); }); + it("should not modify matA", function() { expect(matA).toBeEqualish(oldA); }); + }); + }); + + describe("subtract", function() { + it("should have an alias called 'sub'", function() { expect(mat2d.sub).toEqual(mat2d.subtract); }); + + describe("with a separate output matrix", function() { + beforeEach(function() { result = mat2d.subtract(out, matA, matB); }); + + it("should place values into out", function() { expect(out).toBeEqualish([-6, -6, -6, -6, -6, -6]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify matA", function() { expect(matA).toBeEqualish(oldA); }); + it("should not modify matB", function() { expect(matB).toBeEqualish(oldB); }); + }); + + describe("when matA is the output matrix", function() { + beforeEach(function() { result = mat2d.subtract(matA, matA, matB); }); + + it("should place values into matA", function() { expect(matA).toBeEqualish([-6, -6, -6, -6, -6, -6]); }); + it("should return matA", function() { expect(result).toBe(matA); }); + it("should not modify matB", function() { expect(matB).toBeEqualish(oldB); }); + }); + + describe("when matB is the output matrix", function() { + beforeEach(function() { result = mat2d.subtract(matB, matA, matB); }); + + it("should place values into matB", function() { expect(matB).toBeEqualish([-6, -6, -6, -6, -6, -6]); }); + it("should return matB", function() { expect(result).toBe(matB); }); + it("should not modify matA", function() { expect(matA).toBeEqualish(oldA); }); + }); + }); + + describe("fromValues", function() { + beforeEach(function() { result = mat2d.fromValues(1, 2, 3, 4, 5, 6); }); + it("should return a 6 element array initialized to the values passed", function() { expect(result).toBeEqualish([1, 2, 3, 4, 5, 6]); }); + }); + + describe("set", function() { + beforeEach(function() { result = mat2d.set(out, 1, 2, 3, 4, 5, 6); }); + it("should place values into out", function() { expect(out).toBeEqualish([1, 2, 3, 4, 5, 6]); }); + it("should return out", function() { expect(result).toBe(out); }); + }); + + describe("multiplyScalar", function() { + describe("with a separate output matrix", function() { + beforeEach(function() { result = mat2d.multiplyScalar(out, matA, 2); }); + + it("should place values into out", function() { expect(out).toBeEqualish([2, 4, 6, 8, 10, 12]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify matA", function() { expect(matA).toBeEqualish([1, 2, 3, 4, 5, 6]); }); + }); + + describe("when matA is the output matrix", function() { + beforeEach(function() { result = mat2d.multiplyScalar(matA, matA, 2); }); + + it("should place values into matA", function() { expect(matA).toBeEqualish([2, 4, 6, 8, 10, 12]); }); + it("should return matA", function() { expect(result).toBe(matA); }); + }); + }); + + describe("multiplyScalarAndAdd", function() { + describe("with a separate output matrix", function() { + beforeEach(function() { result = mat2d.multiplyScalarAndAdd(out, matA, matB, 0.5); }); + + it("should place values into out", function() { expect(out).toBeEqualish([4.5, 6, 7.5, 9, 10.5, 12]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify matA", function() { expect(matA).toBeEqualish([1, 2, 3, 4, 5, 6]); }); + it("should not modify matB", function() { expect(matB).toBeEqualish([7, 8, 9, 10, 11, 12]); }); + }); + + describe("when matA is the output matrix", function() { + beforeEach(function() { result = mat2d.multiplyScalarAndAdd(matA, matA, matB, 0.5); }); + + it("should place values into matA", function() { expect(matA).toBeEqualish([4.5, 6, 7.5, 9, 10.5, 12]); }); + it("should return matA", function() { expect(result).toBe(matA); }); + it("should not modify matB", function() { expect(matB).toBeEqualish([7, 8, 9, 10, 11, 12]); }); + }); + + describe("when matB is the output matrix", function() { + beforeEach(function() { result = mat2d.multiplyScalarAndAdd(matB, matA, matB, 0.5); }); + + it("should place values into matB", function() { expect(matB).toBeEqualish([4.5, 6, 7.5, 9, 10.5, 12]); }); + it("should return matB", function() { expect(result).toBe(matB); }); + it("should not modify matA", function() { expect(matA).toBeEqualish([1, 2, 3, 4, 5, 6]); }); + }); + }); + + describe("exactEquals", function() { + let matC, r0, r1; + beforeEach(function() { + matA = [0, 1, 2, 3, 4, 5]; + matB = [0, 1, 2, 3, 4, 5]; + matC = [1, 2, 3, 4, 5, 6]; + r0 = mat2d.exactEquals(matA, matB); + r1 = mat2d.exactEquals(matA, matC); + }); + + it("should return true for identical matrices", function() { expect(r0).toBe(true); }); + it("should return false for different matrices", function() { expect(r1).toBe(false); }); + it("should not modify matA", function() { expect(matA).toBeEqualish([0, 1, 2, 3, 4, 5]); }); + it("should not modify matB", function() { expect(matB).toBeEqualish([0, 1, 2, 3, 4, 5]); }); + }); + + describe("equals", function() { + let matC, matD, r0, r1, r2; + beforeEach(function() { + matA = [0, 1, 2, 3, 4, 5]; + matB = [0, 1, 2, 3, 4, 5]; + matC = [1, 2, 3, 4, 5, 6]; + matD = [1e-16, 1, 2, 3, 4, 5]; + r0 = mat2d.equals(matA, matB); + r1 = mat2d.equals(matA, matC); + r2 = mat2d.equals(matA, matD); + }); + it("should return true for identical matrices", function() { expect(r0).toBe(true); }); + it("should return false for different matrices", function() { expect(r1).toBe(false); }); + it("should return true for close but not identical matrices", function() { expect(r2).toBe(true); }); + it("should not modify matA", function() { expect(matA).toBeEqualish([0, 1, 2, 3, 4, 5]); }); + it("should not modify matB", function() { expect(matB).toBeEqualish([0, 1, 2, 3, 4, 5]); }); + }); + +}); diff --git a/assembly/__tests__/mat3.spec.ts b/assembly/__tests__/mat3.spec.ts new file mode 100644 index 00000000..f44359b0 --- /dev/null +++ b/assembly/__tests__/mat3.spec.ts @@ -0,0 +1,503 @@ +import * as mat3 from "../mat3" +import * as mat4 from "../mat4" +import * as vec3 from "../vec3" + +describe("mat3", function() { + let out, matA, matB, identity, result; + + beforeEach(function() { + matA = [1, 0, 0, + 0, 1, 0, + 1, 2, 1]; + + matB = [1, 0, 0, + 0, 1, 0, + 3, 4, 1]; + + out = [0, 0, 0, + 0, 0, 0, + 0, 0, 0]; + + identity = [1, 0, 0, + 0, 1, 0, + 0, 0, 1]; + }); + + describe("normalFromMat4", function() { + beforeEach(function() { + matA = [1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1]; + result = mat3.normalFromMat4(out, matA); + }); + + it("should return out", function() { expect(result).toBe(out); }); + + describe("with translation and rotation", function() { + beforeEach(function() { + mat4.translate(matA, matA, [2, 4, 6]); + mat4.rotateX(matA, matA, Math.PI / 2); + + result = mat3.normalFromMat4(out, matA); + }); + + it("should give rotated matrix", function() { + expect(result).toBeEqualish([1, 0, 0, + 0, 0, 1, + 0,-1, 0]); + }); + + describe("and scale", function() { + beforeEach(function() { + mat4.scale(matA, matA, [2, 3, 4]); + + result = mat3.normalFromMat4(out, matA); + }); + + it("should give rotated matrix", function() { + expect(result).toBeEqualish([0.5, 0, 0, + 0, 0, 0.333333, + 0, -0.25, 0]); + }); + }); + }); + }); + + describe("fromQuat", function() { + let q; + + beforeEach(function() { + q = [ 0, -0.7071067811865475, 0, 0.7071067811865475 ]; + result = mat3.fromQuat(out, q); + }); + + it("should return out", function() { expect(result).toBe(out); }); + + it("should rotate a vector the same as the original quat", function() { + expect(vec3.transformMat3([], [0,0,-1], out)).toBeEqualish(vec3.transformQuat([], [0,0,-1], q)); + }); + + it("should rotate a vector by PI/2 radians", function() { + expect(vec3.transformMat3([], [0,0,-1], out)).toBeEqualish([1,0,0]); + }); + }); + + describe("fromMat4", function() { + beforeEach(function() { + result = mat3.fromMat4(out, [ 1, 2, 3, 4, + 5, 6, 7, 8, + 9,10,11,12, + 13,14,15,16]); }); + + it("should return out", function() { expect(result).toBe(out); }); + + it("should calculate proper mat3", function() { + expect(out).toBeEqualish([ 1, 2, 3, + 5, 6, 7, + 9,10,11]); + }); + }); + + describe("scale", function() { + beforeEach(function() { result = mat3.scale(out, matA, [2,2]); }); + it("should return out", function() { expect(result).toBe(out); }); + it('should place proper values in out', function() { + expect(out).toBeEqualish([ 2, 0, 0, + 0, 2, 0, + 1, 2, 1 ]); + }); + }); + + describe("create", function() { + beforeEach(function() { result = mat3.create(); }); + it("should return a 9 element array initialized to a 3x3 identity matrix", function() { expect(result).toBeEqualish(identity); }); + }); + + describe("clone", function() { + beforeEach(function() { result = mat3.clone(matA); }); + it("should return a 9 element array initialized to the values in matA", function() { expect(result).toBeEqualish(matA); }); + }); + + describe("copy", function() { + beforeEach(function() { result = mat3.copy(out, matA); }); + it("should place values into out", function() { expect(out).toBeEqualish(matA); }); + it("should return out", function() { expect(result).toBe(out); }); + }); + + describe("identity", function() { + beforeEach(function() { result = mat3.identity(out); }); + it("should place values into out", function() { expect(result).toBeEqualish(identity); }); + it("should return out", function() { expect(result).toBe(out); }); + }); + + describe("transpose", function() { + describe("with a separate output matrix", function() { + beforeEach(function() { result = mat3.transpose(out, matA); }); + + it("should place values into out", function() { + expect(out).toBeEqualish([ + 1, 0, 1, + 0, 1, 2, + 0, 0, 1 + ]); + }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify matA", function() { + expect(matA).toBeEqualish([ + 1, 0, 0, + 0, 1, 0, + 1, 2, 1 + ]); + }); + }); + + describe("when matA is the output matrix", function() { + beforeEach(function() { result = mat3.transpose(matA, matA); }); + + it("should place values into matA", function() { + expect(matA).toBeEqualish([ + 1, 0, 1, + 0, 1, 2, + 0, 0, 1 + ]); + }); + it("should return matA", function() { expect(result).toBe(matA); }); + }); + }); + + describe("invert", function() { + describe("with a separate output matrix", function() { + beforeEach(function() { result = mat3.invert(out, matA); }); + + it("should place values into out", function() { + expect(out).toBeEqualish([ + 1, 0, 0, + 0, 1, 0, + -1, -2, 1 + ]); + }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify matA", function() { + expect(matA).toBeEqualish([ + 1, 0, 0, + 0, 1, 0, + 1, 2, 1 + ]); + }); + }); + + describe("when matA is the output matrix", function() { + beforeEach(function() { result = mat3.invert(matA, matA); }); + + it("should place values into matA", function() { + expect(matA).toBeEqualish([ + 1, 0, 0, + 0, 1, 0, + -1, -2, 1 + ]); + }); + it("should return matA", function() { expect(result).toBe(matA); }); + }); + }); + + describe("adjoint", function() { + describe("with a separate output matrix", function() { + beforeEach(function() { result = mat3.adjoint(out, matA); }); + + it("should place values into out", function() { + expect(out).toBeEqualish([ + 1, 0, 0, + 0, 1, 0, + -1, -2, 1 + ]); + }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify matA", function() { + expect(matA).toBeEqualish([ + 1, 0, 0, + 0, 1, 0, + 1, 2, 1 + ]); + }); + }); + + describe("when matA is the output matrix", function() { + beforeEach(function() { result = mat3.adjoint(matA, matA); }); + + it("should place values into matA", function() { + expect(matA).toBeEqualish([ + 1, 0, 0, + 0, 1, 0, + -1, -2, 1 + ]); + }); + it("should return matA", function() { expect(result).toBe(matA); }); + }); + }); + + describe("determinant", function() { + beforeEach(function() { result = mat3.determinant(matA); }); + + it("should return the determinant", function() { expect(result).toEqual(1); }); + }); + + describe("multiply", function() { + it("should have an alias called 'mul'", function() { expect(mat3.mul).toEqual(mat3.multiply); }); + + describe("with a separate output matrix", function() { + beforeEach(function() { result = mat3.multiply(out, matA, matB); }); + + it("should place values into out", function() { + expect(out).toBeEqualish([ + 1, 0, 0, + 0, 1, 0, + 4, 6, 1 + ]); + }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify matA", function() { + expect(matA).toBeEqualish([ + 1, 0, 0, + 0, 1, 0, + 1, 2, 1 + ]); + }); + it("should not modify matB", function() { + expect(matB).toBeEqualish([ + 1, 0, 0, + 0, 1, 0, + 3, 4, 1 + ]); + }); + }); + + describe("when matA is the output matrix", function() { + beforeEach(function() { result = mat3.multiply(matA, matA, matB); }); + + it("should place values into matA", function() { + expect(matA).toBeEqualish([ + 1, 0, 0, + 0, 1, 0, + 4, 6, 1 + ]); + }); + it("should return matA", function() { expect(result).toBe(matA); }); + it("should not modify matB", function() { + expect(matB).toBeEqualish([ + 1, 0, 0, + 0, 1, 0, + 3, 4, 1 + ]); + }); + }); + + describe("when matB is the output matrix", function() { + beforeEach(function() { result = mat3.multiply(matB, matA, matB); }); + + it("should place values into matB", function() { + expect(matB).toBeEqualish([ + 1, 0, 0, + 0, 1, 0, + 4, 6, 1 + ]); + }); + it("should return matB", function() { expect(result).toBe(matB); }); + it("should not modify matA", function() { + expect(matA).toBeEqualish([ + 1, 0, 0, + 0, 1, 0, + 1, 2, 1 + ]); + }); + }); + }); + + describe("str", function() { + beforeEach(function() { result = mat3.str(matA); }); + + it("should return a string representation of the matrix", function() { expect(result).toEqual("mat3(1, 0, 0, 0, 1, 0, 1, 2, 1)"); }); + }); + + describe("frob", function() { + beforeEach(function() { result = mat3.frob(matA); }); + it("should return the Frobenius Norm of the matrix", function() { expect(result).toEqual( Math.sqrt(Math.pow(1, 2) + Math.pow(0, 2) + Math.pow(0, 2) + Math.pow(0, 2) + Math.pow(1, 2) + Math.pow(0, 2) + Math.pow(1, 2) + Math.pow(2, 2) + Math.pow(1, 2))); }); + }); + + describe("add", function() { + beforeEach(function() { + matA = [1, 2, 3, 4, 5, 6, 7, 8, 9]; + matB = [10, 11, 12, 13, 14, 15, 16, 17, 18]; + }); + describe("with a separate output matrix", function() { + beforeEach(function() { + result = mat3.add(out, matA, matB); + }); + + it("should place values into out", function() { expect(out).toBeEqualish([11, 13, 15, 17, 19, 21, 23, 25, 27]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify matA", function() { expect(matA).toBeEqualish([1, 2, 3, 4, 5, 6, 7, 8, 9]); }); + it("should not modify matB", function() { expect(matB).toBeEqualish([10, 11, 12, 13, 14, 15, 16, 17, 18]); }); + }); + + describe("when matA is the output matrix", function() { + beforeEach(function() { result = mat3.add(matA, matA, matB); }); + + it("should place values into matA", function() { expect(matA).toBeEqualish([11, 13, 15, 17, 19, 21, 23, 25, 27]); }); + it("should return matA", function() { expect(result).toBe(matA); }); + it("should not modify matB", function() { expect(matB).toBeEqualish([10, 11, 12, 13, 14, 15, 16, 17, 18]); }); + }); + + describe("when matB is the output matrix", function() { + beforeEach(function() { result = mat3.add(matB, matA, matB); }); + + it("should place values into matB", function() { expect(matB).toBeEqualish([11, 13, 15, 17, 19, 21, 23, 25, 27]); }); + it("should return matB", function() { expect(result).toBe(matB); }); + it("should not modify matA", function() { expect(matA).toBeEqualish([1, 2, 3, 4, 5, 6, 7, 8, 9]); }); + }); + }); + + describe("subtract", function() { + beforeEach(function() { + matA = [1, 2, 3, 4, 5, 6, 7, 8, 9]; + matB = [10, 11, 12, 13, 14, 15, 16, 17, 18]; + }); + it("should have an alias called 'sub'", function() { expect(mat3.sub).toEqual(mat3.subtract); }); + + describe("with a separate output matrix", function() { + beforeEach(function() { result = mat3.subtract(out, matA, matB); }); + + it("should place values into out", function() { expect(out).toBeEqualish([-9, -9, -9, -9, -9, -9, -9, -9, -9]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify matA", function() { expect(matA).toBeEqualish([1, 2, 3, 4, 5, 6, 7, 8, 9]); }); + it("should not modify matB", function() { expect(matB).toBeEqualish([10, 11, 12, 13, 14, 15, 16, 17, 18]); }); + }); + + describe("when matA is the output matrix", function() { + beforeEach(function() { result = mat3.subtract(matA, matA, matB); }); + + it("should place values into matA", function() { expect(matA).toBeEqualish([-9, -9, -9, -9, -9, -9, -9, -9, -9]); }); + it("should return matA", function() { expect(result).toBe(matA); }); + it("should not modify matB", function() { expect(matB).toBeEqualish([10, 11, 12, 13, 14, 15, 16, 17, 18]); }); + }); + + describe("when matB is the output matrix", function() { + beforeEach(function() { result = mat3.subtract(matB, matA, matB); }); + + it("should place values into matB", function() { expect(matB).toBeEqualish([-9, -9, -9, -9, -9, -9, -9, -9, -9]); }); + it("should return matB", function() { expect(result).toBe(matB); }); + it("should not modify matA", function() { expect(matA).toBeEqualish([1, 2, 3, 4, 5, 6, 7, 8, 9]); }); + }); + }); + + describe("fromValues", function() { + beforeEach(function() { result = mat3.fromValues(1, 2, 3, 4, 5, 6, 7, 8, 9); }); + it("should return a 9 element array initialized to the values passed", function() { expect(result).toBeEqualish([1, 2, 3, 4, 5, 6, 7, 8, 9]); }); + }); + + describe("set", function() { + beforeEach(function() { result = mat3.set(out, 1, 2, 3, 4, 5, 6, 7, 8, 9); }); + it("should place values into out", function() { expect(out).toBeEqualish([1, 2, 3, 4, 5, 6, 7, 8, 9]); }); + it("should return out", function() { expect(result).toBe(out); }); + }); + + describe("multiplyScalar", function() { + beforeEach(function() { + matA = [1, 2, 3, 4, 5, 6, 7, 8, 9]; + }); + describe("with a separate output matrix", function() { + beforeEach(function() { result = mat3.multiplyScalar(out, matA, 2); }); + + it("should place values into out", function() { expect(out).toBeEqualish([2, 4, 6, 8, 10, 12, 14, 16, 18]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify matA", function() { expect(matA).toBeEqualish([1, 2, 3, 4, 5, 6, 7, 8, 9]); }); + }); + + describe("when matA is the output matrix", function() { + beforeEach(function() { result = mat3.multiplyScalar(matA, matA, 2); }); + + it("should place values into matA", function() { expect(matA).toBeEqualish([2, 4, 6, 8, 10, 12, 14, 16, 18]); }); + it("should return matA", function() { expect(result).toBe(matA); }); + }); + }); + + describe("multiplyScalarAndAdd", function() { + beforeEach(function() { + matA = [1, 2, 3, 4, 5, 6, 7, 8, 9]; + matB = [10, 11, 12, 13, 14, 15, 16, 17, 18]; + }); + describe("with a separate output matrix", function() { + beforeEach(function() { result = mat3.multiplyScalarAndAdd(out, matA, matB, 0.5); }); + + it("should place values into out", function() { expect(out).toBeEqualish([6, 7.5, 9, 10.5, 12, 13.5, 15, 16.5, 18]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify matA", function() { expect(matA).toBeEqualish([1, 2, 3, 4, 5, 6, 7, 8, 9]); }); + it("should not modify matB", function() { expect(matB).toBeEqualish([10, 11, 12, 13, 14, 15, 16, 17, 18]); }); + }); + + describe("when matA is the output matrix", function() { + beforeEach(function() { result = mat3.multiplyScalarAndAdd(matA, matA, matB, 0.5); }); + + it("should place values into matA", function() { expect(matA).toBeEqualish([6, 7.5, 9, 10.5, 12, 13.5, 15, 16.5, 18]); }); + it("should return matA", function() { expect(result).toBe(matA); }); + it("should not modify matB", function() { expect(matB).toBeEqualish([10, 11, 12, 13, 14, 15, 16, 17, 18]); }); + }); + + describe("when matB is the output matrix", function() { + beforeEach(function() { result = mat3.multiplyScalarAndAdd(matB, matA, matB, 0.5); }); + + it("should place values into matB", function() { expect(matB).toBeEqualish([6, 7.5, 9, 10.5, 12, 13.5, 15, 16.5, 18]); }); + it("should return matB", function() { expect(result).toBe(matB); }); + it("should not modify matA", function() { expect(matA).toBeEqualish([1, 2, 3, 4, 5, 6, 7, 8, 9]); }); + }); + }); + + describe("projection", function() { + beforeEach(function() { + result = mat3.projection(out, 100.0, 200.0); + }); + + it("should return out", function() { expect(result).toBe(out); }); + + it("should give projection matrix", function() { + expect(result).toBeEqualish([0.02, 0, 0, + 0, -0.01, 0, + -1, 1, 1]); + }); + }); + + describe("exactEquals", function() { + let matC, r0, r1; + beforeEach(function() { + matA = [0, 1, 2, 3, 4, 5, 6, 7, 8]; + matB = [0, 1, 2, 3, 4, 5, 6, 7, 8]; + matC = [1, 2, 3, 4, 5, 6, 7, 8, 9]; + r0 = mat3.exactEquals(matA, matB); + r1 = mat3.exactEquals(matA, matC); + }); + + it("should return true for identical matrices", function() { expect(r0).toBe(true); }); + it("should return false for different matrices", function() { expect(r1).toBe(false); }); + it("should not modify matA", function() { expect(matA).toBeEqualish([0, 1, 2, 3, 4, 5, 6, 7, 8]); }); + it("should not modify matB", function() { expect(matB).toBeEqualish([0, 1, 2, 3, 4, 5, 6, 7, 8]); }); + }); + + describe("equals", function() { + let matC, matD, r0, r1, r2; + beforeEach(function() { + matA = [0, 1, 2, 3, 4, 5, 6, 7, 8]; + matB = [0, 1, 2, 3, 4, 5, 6, 7, 8]; + matC = [1, 2, 3, 4, 5, 6, 7, 8, 9]; + matD = [1e-16, 1, 2, 3, 4, 5, 6, 7, 8]; + r0 = mat3.equals(matA, matB); + r1 = mat3.equals(matA, matC); + r2 = mat3.equals(matA, matD); + }); + it("should return true for identical matrices", function() { expect(r0).toBe(true); }); + it("should return false for different matrices", function() { expect(r1).toBe(false); }); + it("should return true for close but not identical matrices", function() { expect(r2).toBe(true); }); + it("should not modify matA", function() { expect(matA).toBeEqualish([0, 1, 2, 3, 4, 5, 6, 7, 8]); }); + it("should not modify matB", function() { expect(matB).toBeEqualish([0, 1, 2, 3, 4, 5, 6, 7, 8]); }); + }); + +}); diff --git a/assembly/__tests__/mat4.spec.ts b/assembly/__tests__/mat4.spec.ts new file mode 100644 index 00000000..5fe44850 --- /dev/null +++ b/assembly/__tests__/mat4.spec.ts @@ -0,0 +1,1134 @@ +import * as glMatrix from "../common" +import * as mat4 from "../mat4" +import * as quat from "../quat" +import * as vec3 from "../vec3" + +function buildMat4Tests() { + return function() { + let out, matA, matB, identity, result; + + beforeEach(function() { + // Attempting to portray a semi-realistic transform matrix + matA = new Float32Array([1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + 1, 2, 3, 1]); + + matB = new Float32Array([1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + 4, 5, 6, 1]); + + out = new Float32Array([0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0]); + + identity = new Float32Array([1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1]); + }); + + describe("create", function() { + beforeEach(function() { result = mat4.create(); }); + it("should return a 16 element array initialized to a 4x4 identity matrix", function() { expect(result).toBeEqualish(identity); }); + }); + + describe("clone", function() { + beforeEach(function() { result = mat4.clone(matA); }); + it("should return a 16 element array initialized to the values in matA", function() { expect(result).toBeEqualish(matA); }); + }); + + describe("copy", function() { + beforeEach(function() { result = mat4.copy(out, matA); }); + it("should place values into out", function() { expect(out).toBeEqualish(matA); }); + it("should return out", function() { expect(result).toBe(out); }); + }); + + describe("identity", function() { + beforeEach(function() { result = mat4.identity(out); }); + it("should place values into out", function() { expect(result).toBeEqualish(identity); }); + it("should return out", function() { expect(result).toBe(out); }); + }); + + describe("transpose", function() { + describe("with a separate output matrix", function() { + beforeEach(function() { result = mat4.transpose(out, matA); }); + + it("should place values into out", function() { + expect(out).toBeEqualish([ + 1, 0, 0, 1, + 0, 1, 0, 2, + 0, 0, 1, 3, + 0, 0, 0, 1 + ]); + }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify matA", function() { + expect(matA).toBeEqualish([ + 1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + 1, 2, 3, 1 + ]); + }); + }); + + describe("when matA is the output matrix", function() { + beforeEach(function() { result = mat4.transpose(matA, matA); }); + + it("should place values into matA", function() { + expect(matA).toBeEqualish([ + 1, 0, 0, 1, + 0, 1, 0, 2, + 0, 0, 1, 3, + 0, 0, 0, 1 + ]); + }); + it("should return matA", function() { expect(result).toBe(matA); }); + }); + }); + + describe("invert", function() { + describe("with a separate output matrix", function() { + beforeEach(function() { result = mat4.invert(out, matA); }); + + it("should place values into out", function() { + expect(out).toBeEqualish([ + 1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + -1, -2, -3, 1 + ]); + }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify matA", function() { + expect(matA).toBeEqualish([ + 1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + 1, 2, 3, 1 + ]); + }); + }); + + describe("when matA is the output matrix", function() { + beforeEach(function() { result = mat4.invert(matA, matA); }); + + it("should place values into matA", function() { + expect(matA).toBeEqualish([ + 1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + -1, -2, -3, 1 + ]); + }); + it("should return matA", function() { expect(result).toBe(matA); }); + }); + }); + + describe("adjoint", function() { + describe("with a separate output matrix", function() { + beforeEach(function() { result = mat4.adjoint(out, matA); }); + + it("should place values into out", function() { + expect(out).toBeEqualish([ + 1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + -1, -2, -3, 1 + ]); + }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify matA", function() { + expect(matA).toBeEqualish([ + 1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + 1, 2, 3, 1 + ]); + }); + }); + + describe("when matA is the output matrix", function() { + beforeEach(function() { result = mat4.adjoint(matA, matA); }); + + it("should place values into matA", function() { + expect(matA).toBeEqualish([ + 1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + -1, -2, -3, 1 + ]); + }); + it("should return matA", function() { expect(result).toBe(matA); }); + }); + }); + + describe("determinant", function() { + beforeEach(function() { result = mat4.determinant(matA); }); + + it("should return the determinant", function() { expect(result).toEqual(1); }); + }); + + describe("multiply", function() { + it("should have an alias called 'mul'", function() { expect(mat4.mul).toEqual(mat4.multiply); }); + + describe("with a separate output matrix", function() { + beforeEach(function() { result = mat4.multiply(out, matA, matB); }); + + it("should place values into out", function() { + expect(out).toBeEqualish([ + 1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + 5, 7, 9, 1 + ]); + }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify matA", function() { + expect(matA).toBeEqualish([ + 1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + 1, 2, 3, 1 + ]); + }); + it("should not modify matB", function() { + expect(matB).toBeEqualish([ + 1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + 4, 5, 6, 1 + ]); + }); + }); + + describe("when matA is the output matrix", function() { + beforeEach(function() { result = mat4.multiply(matA, matA, matB); }); + + it("should place values into matA", function() { + expect(matA).toBeEqualish([ + 1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + 5, 7, 9, 1 + ]); + }); + it("should return matA", function() { expect(result).toBe(matA); }); + it("should not modify matB", function() { + expect(matB).toBeEqualish([ + 1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + 4, 5, 6, 1 + ]); + }); + }); + + describe("when matB is the output matrix", function() { + beforeEach(function() { result = mat4.multiply(matB, matA, matB); }); + + it("should place values into matB", function() { + expect(matB).toBeEqualish([ + 1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + 5, 7, 9, 1 + ]); + }); + it("should return matB", function() { expect(result).toBe(matB); }); + it("should not modify matA", function() { + expect(matA).toBeEqualish([ + 1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + 1, 2, 3, 1 + ]); + }); + }); + }); + + describe("translate", function() { + describe("with a separate output matrix", function() { + beforeEach(function() { result = mat4.translate(out, matA, [4, 5, 6]); }); + + it("should place values into out", function() { + expect(out).toBeEqualish([ + 1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + 5, 7, 9, 1 + ]); + }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify matA", function() { + expect(matA).toBeEqualish([ + 1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + 1, 2, 3, 1 + ]); + }); + }); + + describe("when matA is the output matrix", function() { + beforeEach(function() { result = mat4.translate(matA, matA, [4, 5, 6]); }); + + it("should place values into matA", function() { + expect(matA).toBeEqualish([ + 1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + 5, 7, 9, 1 + ]); + }); + it("should return matA", function() { expect(result).toBe(matA); }); + }); + }); + + describe("scale", function() { + describe("with a separate output matrix", function() { + beforeEach(function() { result = mat4.scale(out, matA, [4, 5, 6]); }); + + it("should place values into out", function() { + expect(out).toBeEqualish([ + 4, 0, 0, 0, + 0, 5, 0, 0, + 0, 0, 6, 0, + 1, 2, 3, 1 + ]); + }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify matA", function() { + expect(matA).toBeEqualish([ + 1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + 1, 2, 3, 1 + ]); + }); + }); + + describe("when matA is the output matrix", function() { + beforeEach(function() { result = mat4.scale(matA, matA, [4, 5, 6]); }); + + it("should place values into matA", function() { + expect(matA).toBeEqualish([ + 4, 0, 0, 0, + 0, 5, 0, 0, + 0, 0, 6, 0, + 1, 2, 3, 1 + ]); + }); + it("should return matA", function() { expect(result).toBe(matA); }); + }); + }); + + describe("rotate", function() { + let rad = Math.PI * 0.5; + let axis = [1, 0, 0]; + + describe("with a separate output matrix", function() { + beforeEach(function() { result = mat4.rotate(out, matA, rad, axis); }); + + it("should place values into out", function() { + expect(out).toBeEqualish([ + 1, 0, 0, 0, + 0, Math.cos(rad), Math.sin(rad), 0, + 0, -Math.sin(rad), Math.cos(rad), 0, + 1, 2, 3, 1 + ]); + }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify matA", function() { + expect(matA).toBeEqualish([ + 1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + 1, 2, 3, 1 + ]); + }); + }); + + describe("when matA is the output matrix", function() { + beforeEach(function() { result = mat4.rotate(matA, matA, rad, axis); }); + + it("should place values into matA", function() { + expect(matA).toBeEqualish([ + 1, 0, 0, 0, + 0, Math.cos(rad), Math.sin(rad), 0, + 0, -Math.sin(rad), Math.cos(rad), 0, + 1, 2, 3, 1 + ]); + }); + it("should return matA", function() { expect(result).toBe(matA); }); + }); + }); + + describe("rotateX", function() { + let rad = Math.PI * 0.5; + + describe("with a separate output matrix", function() { + beforeEach(function() { result = mat4.rotateX(out, matA, rad); }); + + it("should place values into out", function() { + expect(out).toBeEqualish([ + 1, 0, 0, 0, + 0, Math.cos(rad), Math.sin(rad), 0, + 0, -Math.sin(rad), Math.cos(rad), 0, + 1, 2, 3, 1 + ]); + }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify matA", function() { + expect(matA).toBeEqualish([ + 1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + 1, 2, 3, 1 + ]); + }); + }); + + describe("when matA is the output matrix", function() { + beforeEach(function() { result = mat4.rotateX(matA, matA, rad); }); + + it("should place values into matA", function() { + expect(matA).toBeEqualish([ + 1, 0, 0, 0, + 0, Math.cos(rad), Math.sin(rad), 0, + 0, -Math.sin(rad), Math.cos(rad), 0, + 1, 2, 3, 1 + ]); + }); + it("should return matA", function() { expect(result).toBe(matA); }); + }); + }); + + describe("rotateY", function() { + let rad = Math.PI * 0.5; + + describe("with a separate output matrix", function() { + beforeEach(function() { result = mat4.rotateY(out, matA, rad); }); + + it("should place values into out", function() { + expect(out).toBeEqualish([ + Math.cos(rad), 0, -Math.sin(rad), 0, + 0, 1, 0, 0, + Math.sin(rad), 0, Math.cos(rad), 0, + 1, 2, 3, 1 + ]); + }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify matA", function() { + expect(matA).toBeEqualish([ + 1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + 1, 2, 3, 1 + ]); + }); + }); + + describe("when matA is the output matrix", function() { + beforeEach(function() { result = mat4.rotateY(matA, matA, rad); }); + + it("should place values into matA", function() { + expect(matA).toBeEqualish([ + Math.cos(rad), 0, -Math.sin(rad), 0, + 0, 1, 0, 0, + Math.sin(rad), 0, Math.cos(rad), 0, + 1, 2, 3, 1 + ]); + }); + it("should return matA", function() { expect(result).toBe(matA); }); + }); + }); + + describe("rotateZ", function() { + let rad = Math.PI * 0.5; + + describe("with a separate output matrix", function() { + beforeEach(function() { result = mat4.rotateZ(out, matA, rad); }); + + it("should place values into out", function() { + expect(out).toBeEqualish([ + Math.cos(rad), Math.sin(rad), 0, 0, + -Math.sin(rad), Math.cos(rad), 0, 0, + 0, 0, 1, 0, + 1, 2, 3, 1 + ]); + }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify matA", function() { + expect(matA).toBeEqualish([ + 1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + 1, 2, 3, 1 + ]); + }); + }); + + describe("when matA is the output matrix", function() { + beforeEach(function() { result = mat4.rotateZ(matA, matA, rad); }); + + it("should place values into matA", function() { + expect(matA).toBeEqualish([ + Math.cos(rad), Math.sin(rad), 0, 0, + -Math.sin(rad), Math.cos(rad), 0, 0, + 0, 0, 1, 0, + 1, 2, 3, 1 + ]); + }); + it("should return matA", function() { expect(result).toBe(matA); }); + }); + }); + + // TODO: fromRotationTranslation + + describe("getTranslation", function() { + describe("from the identity matrix", function() { + beforeEach(function() { + result = vec3.fromValues(1, 2, 3); + out = vec3.fromValues(1, 2, 3); + result = mat4.getTranslation(out, identity); + }); + it("should place result both in result and out", function() { expect(result).toBe(out); }); + it("should return the zero vector", function() { expect(result).toBeEqualish([0, 0, 0]); }); + }); + + describe("from a translation-only matrix", function() { + beforeEach(function() { + result = vec3.fromValues(1, 2, 3); + out = vec3.fromValues(1, 2, 3); + result = mat4.getTranslation(out, matB); + }); + it("should return translation vector", function() { expect(out).toBeEqualish([4, 5, 6]); }); + }); + + describe("from a translation and rotation matrix", function() { + beforeEach(function() { + let q = quat.create(); + let v = vec3.fromValues(5, 6, 7); + q = quat.setAxisAngle(q, [0.26726124, 0.534522474, 0.8017837], 0.55); + mat4.fromRotationTranslation(out, q, v); + + result = vec3.create(); + mat4.getTranslation(result, out); + }); + it("should keep the same translation vector, regardless of rotation", function() { + expect(result).toBeEqualish([5, 6, 7]); + }); + }); + }); + + describe("getScaling", function() { + describe("from the identity matrix", function() { + beforeEach(function() { + result = vec3.fromValues(1, 2, 3); + out = vec3.fromValues(1, 2, 3); + result = mat4.getScaling(out, identity); + }); + it("should place result both in result and out", function() { expect(result).toBe(out); }); + it("should return the identity vector", function() { expect(result).toBeEqualish([1, 1, 1]); }); + }); + + describe("from a scale-only matrix", function() { + beforeEach(function() { + let v = vec3.fromValues(4, 5, 6); + result = vec3.fromValues(1, 2, 3) + out = vec3.fromValues(1, 2, 3); + mat4.fromScaling(matA, v); + result = mat4.getScaling(out, matA); + }); + it("should return translation vector", function() { expect(out).toBeEqualish([4, 5, 6]); }); + }); + + describe("from a translation and rotation matrix", function() { + beforeEach(function() { + let q = quat.create(); + let v = vec3.fromValues(5, 6, 7); + q = quat.setAxisAngle(q, [1, 0, 0], 0.5); + mat4.fromRotationTranslation(out, q, v); + + result = vec3.fromValues(1, 2, 3); + mat4.getScaling(result, out); + }) + it("should return the identity vector", function() { expect(result).toBeEqualish([1, 1, 1]); }); + }); + + describe("from a translation, rotation and scale matrix", function() { + beforeEach(function() { + let q = quat.create(); + let t = vec3.fromValues(1, 2, 3); + let s = vec3.fromValues(5, 6, 7); + q = quat.setAxisAngle(q, [0, 1, 0], 0.7); + mat4.fromRotationTranslationScale(out, q, t, s); + result = vec3.fromValues(5, 6, 7); + mat4.getScaling(result, out); + }) + it("should return the same scaling factor when created", function() { expect(result).toBeEqualish([5, 6, 7]); }); + }); + + }); + + describe("getRotation", function() { + describe("from the identity matrix", function() { + beforeEach(function() { + result = quat.fromValues(1, 2, 3, 4); + out = quat.fromValues(1, 2, 3, 4); + result = mat4.getRotation(out, identity); + }); + it("should place result both in result and out", function() { expect(result).toBe(out); }); + it("should return the unit quaternion", function() { + let unitQuat = quat.create(); + quat.identity(unitQuat); + expect(result).toBeEqualish(unitQuat); + }); + }); + + describe("from a translation-only matrix", function() { + beforeEach(function() { + result = quat.fromValues(1, 2, 3, 4); + out = quat.fromValues(1, 2, 3, 4); + result = mat4.getRotation(out, matB); + }); + it("should return the unit quaternion", function() { + let unitQuat = quat.create(); + quat.identity(unitQuat); + expect(result).toBeEqualish(unitQuat); + }); + }); + + describe("from a translation and rotation matrix", function() { + it("should keep the same rotation as when created", function() { + let q = quat.create(); + let outVec = vec3.fromValues(5, 6, 7); + let testVec = vec3.fromValues(1, 5, 2); + let ang = 0.78972; + + vec3.normalize(testVec, testVec); + q = quat.setAxisAngle(q, testVec, ang); + mat4.fromRotationTranslation(out, q, outVec); + + result = quat.fromValues(2, 3, 4, 6); + mat4.getRotation(result, out); + let outaxis = vec3.create(); + let outangle = quat.getAxisAngle(outaxis, result); + + expect(outaxis).toBeEqualish(testVec); + expect(outangle).toBeEqualish(ang); + }); + }); + }); + + let out_t, out_s; + describe("decompose", function() { + describe("from the identity matrix", function() { + beforeEach(function() { + result = quat.fromValues(1, 2, 3, 4); + out_t = vec3.fromValues(7, 8, 9); + out_s = vec3.fromValues(4, 5, 6); + out = quat.fromValues(1, 2, 3, 4); + result = mat4.decompose(out, out_t, out_s, identity); + }); + it("should place result both in result and out", function() { expect(result).toBe(out); }); + it("should return the unit quaternion", function() { + let unitQuat = quat.create(); + quat.identity(unitQuat); + expect(result).toBeEqualish(unitQuat); + }); + it("out_s should be the identity vector", function() { expect(out_s).toBeEqualish([1, 1, 1]); }); + it("out_t should be the zero vector", function() { expect(out_t).toBeEqualish([0, 0, 0]); }); + }); + + describe("from a translation-only matrix", function() { + beforeEach(function() { + result = quat.fromValues(1, 2, 3, 4); + out_t = vec3.fromValues(7, 8, 9); + out_s = vec3.fromValues(4, 5, 6); + out = quat.fromValues(1, 2, 3, 4); + result = mat4.decompose(out, out_t, out_s, matB); + }); + it("should return the unit quaternion", function() { + let unitQuat = quat.create(); + quat.identity(unitQuat); + expect(result).toBeEqualish(unitQuat); + }); + it("out_s should be the identity vector", function() { expect(out_s).toBeEqualish([1, 1, 1]); }); + it("out_t should be translation vector", function() { expect(out_t).toBeEqualish([4, 5, 6]); }); + }); + + describe("from a scale-only matrix", function() { + beforeEach(function() { + let v = vec3.fromValues(4, 5, 6); + result = vec3.fromValues(1, 2, 3) + out_t = vec3.fromValues(7, 8, 9); + out_s = vec3.fromValues(1, 2, 3); + out = quat.fromValues(1, 2, 3, 4); + mat4.fromScaling(matA, v); + result = mat4.decompose(out, out_t, out_s, matA); + }); + it("out_s should be translation vector", function() { expect(out_s).toBeEqualish([4, 5, 6]); }); + }); + + describe("from a translation and rotation matrix", function() { + it("should keep the same rotation and translation as when created", function() { + let q = quat.create(); + let outVec = vec3.fromValues(5, 6, 7); + let testVec = vec3.fromValues(1, 5, 2); + let ang = 0.78972; + + vec3.normalize(testVec, testVec); + q = quat.setAxisAngle(q, testVec, ang); + mat4.fromRotationTranslation(out, q, outVec); + + result = quat.fromValues(2, 3, 4, 6); + out_t = vec3.fromValues(7, 8, 9); + out_s = vec3.fromValues(4, 5, 6); + mat4.decompose(result, out_t, out_s, out); + let outaxis = vec3.create(); + let outangle = quat.getAxisAngle(outaxis, result); + + expect(outaxis).toBeEqualish(testVec); + expect(outangle).toBeEqualish(ang); + expect(out_t).toBeEqualish(outVec); + }); + }); + + describe("from a translation, rotation and scale matrix", function() { + beforeEach(function() { + let q = quat.create(); + let t = vec3.fromValues(1, 2, 3); + let s = vec3.fromValues(5, 6, 7); + q = quat.setAxisAngle(q, [0, 1, 0], 0.7); + mat4.fromRotationTranslationScale(out, q, t, s); + out_t = vec3.fromValues(7, 8, 9); + out_s = vec3.fromValues(4, 5, 6); + result = quat.fromValues(2, 3, 4, 6); + mat4.decompose(result, out_t, out_s, out); + }) + it("should return the same scaling factor when created", function() { expect(out_s).toBeEqualish([5, 6, 7]); }); + it("should return the same translation when created", function() { expect(out_t).toBeEqualish([1, 2, 3]); }); + }); + + }); + + describe("frustum", function() { + beforeEach(function() { result = mat4.frustum(out, -1, 1, -1, 1, -1, 1); }); + it("should place values into out", function() { expect(result).toBeEqualish([ + -1, 0, 0, 0, + 0, -1, 0, 0, + 0, 0, 0, -1, + 0, 0, 1, 0 + ]); + }); + it("should return out", function() { expect(result).toBe(out); }); + }); + + describe("perspective", function() { + let fovy = Math.PI * 0.5; + beforeEach(function() { result = mat4.perspective(out, fovy, 1, 0, 1); }); + it("should place values into out", function() { expect(result).toBeEqualish([ + 1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, -1, -1, + 0, 0, 0, 0 + ]); + }); + it("should return out", function() { expect(result).toBe(out); }); + + describe("with nonzero near, 45deg fovy, and realistic aspect ratio", function() { + beforeEach(function() { result = mat4.perspective(out, 45 * Math.PI / 180.0, 640/480, 0.1, 200); }); + it("should calculate correct matrix", function() { expect(result).toBeEqualish([ + 1.81066, 0, 0, 0, + 0, 2.414213, 0, 0, + 0, 0, -1.001, -1, + 0, 0, -0.2001, 0 + ]); }); + }); + + describe("with no far plane, 45deg fovy, and realistic aspect ratio", function() { + beforeEach(function() { result = mat4.perspective(out, 45 * Math.PI / 180.0, 640/480, 0.1); }); + it("should calculate correct matrix", function() { expect(result).toBeEqualish([ + 1.81066, 0, 0, 0, + 0, 2.414213, 0, 0, + 0, 0, -1, -1, + 0, 0, -0.2, 0 + ]); }); + }); + + describe("with infinite far plane, 45deg fovy, and realistic aspect ratio", function() { + beforeEach(function() { result = mat4.perspective(out, 45 * Math.PI / 180.0, 640/480, 0.1, Infinity); }); + it("should calculate correct matrix", function() { expect(result).toBeEqualish([ + 1.81066, 0, 0, 0, + 0, 2.414213, 0, 0, + 0, 0, -1, -1, + 0, 0, -0.2, 0 + ]); }); + }); + }); + + describe("ortho", function() { + beforeEach(function() { result = mat4.ortho(out, -1, 1, -1, 1, -1, 1); }); + it("should place values into out", function() { expect(result).toBeEqualish([ + 1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, -1, 0, + 0, 0, 0, 1 + ]); + }); + it("should return out", function() { expect(result).toBe(out); }); + }); + + describe("lookAt", function() { + let eye = new Float32Array([0, 0, 1]); + let center = new Float32Array([0, 0, -1]); + let up = new Float32Array([0, 1, 0]); + let view, right; + + describe("looking down", function() { + beforeEach(function() { + view = new Float32Array([0, -1, 0]); + up = new Float32Array([0, 0, -1]); + right= new Float32Array([1, 0, 0]); + result = mat4.lookAt(out, [0, 0, 0], view, up); + }); + + it("should transform view into local -Z", function() { + result = vec3.transformMat4(new Float32Array(3), view, out); + expect(result).toBeEqualish([0, 0, -1]); + }); + + it("should transform up into local +Y", function() { + result = vec3.transformMat4(new Float32Array(3), up, out); + expect(result).toBeEqualish([0, 1, 0]); + }); + + it("should transform right into local +X", function() { + result = vec3.transformMat4(new Float32Array(3), right, out); + expect(result).toBeEqualish([1, 0, 0]); + }); + + it("should return out", function() { expect(result).toBe(out); }); + }); + + describe("#74", function() { + beforeEach(function() { + mat4.lookAt(out, + new Float32Array([0,2,0]), + new Float32Array([0,0.6,0]), + new Float32Array([0,0,-1])); + }); + + it("should transform a point 'above' into local +Y", function() { + result = vec3.transformMat4(new Float32Array(3), [0, 2, -1], out); + expect(result).toBeEqualish([0, 1, 0]); + }); + + it("should transform a point 'right of' into local +X", function() { + result = vec3.transformMat4(new Float32Array(3), [1, 2, 0], out); + expect(result).toBeEqualish([1, 0, 0]); + }); + + it("should transform a point 'in front of' into local -Z", function() { + result = vec3.transformMat4(new Float32Array(3), [0, 1, 0], out); + expect(result).toBeEqualish([0, 0, -1]); + }); + }); + + beforeEach(function() { + eye = new Float32Array([0, 0, 1]); + center = new Float32Array([0, 0, -1]); + up = new Float32Array([0, 1, 0]); + result = mat4.lookAt(out, eye, center, up); + }); + it("should place values into out", function() { expect(result).toBeEqualish([ + 1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + 0, 0, -1, 1 + ]); + }); + it("should return out", function() { expect(result).toBe(out); }); + }); + + describe("targetTo", function() { + var eye = new Float32Array([0, 0, 1]); + var center = new Float32Array([0, 0, -1]); + var up = new Float32Array([0, 1, 0]); + var view, up, right; + + describe("looking down", function() { + beforeEach(function() { + view = new Float32Array([0, -1, 0]); + up = new Float32Array([0, 0, -1]); + right= new Float32Array([1, 0, 0]); + result = mat4.targetTo(out, [0, 0, 0], view, up); + }); + + it("should transform view into local Z", function() { + result = vec3.transformMat4(new Float32Array(3), view, out); + expect(result).toBeEqualish([0, 0, 1]); + }); + + it("should transform up into local -Y", function() { + result = vec3.transformMat4(new Float32Array(3), up, out); + expect(result).toBeEqualish([0, -1, 0]); + }); + + it("should transform right into local +X", function() { + result = vec3.transformMat4(new Float32Array(3), right, out); + expect(result).toBeEqualish([1, 0, 0]); + }); + + it("should return out", function() { expect(result).toBe(out); }); + + it("scaling should be [1, 1, 1]", function(){ + var scaling = mat4.getScaling(new Float32Array(3), out); + expect(scaling).toBeEqualish([1, 1, 1]); + }); + }); + + describe("#74", function() { + beforeEach(function() { + mat4.targetTo(out, + new Float32Array([0,2,0]), + new Float32Array([0,0.6,0]), + new Float32Array([0,0,-1])); + }); + + it("should transform a point 'above' into local +Y", function() { + result = vec3.transformMat4(new Float32Array(3), [0, 2, -1], out); + expect(result).toBeEqualish([0, 1, -2]); + }); + + it("should transform a point 'right of' into local +X", function() { + result = vec3.transformMat4(new Float32Array(3), [1, 2, 0], out); + expect(result).toBeEqualish([1, 2, -2]); + }); + + it("should transform a point 'in front of' into local -Z", function() { + result = vec3.transformMat4(new Float32Array(3), [0, 1, 0], out); + expect(result).toBeEqualish([0, 2, -1]); + }); + + it("scaling should be [1, 1, 1]", function(){ + var scaling = mat4.getScaling(new Float32Array(3), out); + expect(scaling).toBeEqualish([1, 1, 1]); + }); + }); + + describe("scaling test", function(){ + beforeEach(function() { + mat4.targetTo(out, + new Float32Array([0,1,0]), + new Float32Array([0,0,1]), + new Float32Array([0,0,-1])); + }); + + it("scaling should be [1, 1, 1]", function(){ + var scaling = mat4.getScaling(new Float32Array(3), out); + expect(scaling).toBeEqualish([1, 1, 1]); + }); + }); + + beforeEach(function() { + eye = new Float32Array([0, 0, 1]); + center = new Float32Array([0, 0, -1]); + up = new Float32Array([0, 1, 0]); + result = mat4.targetTo(out, eye, center, up); + }); + it("should place values into out", function() { expect(result).toBeEqualish([ + 1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + 0, 0, 1, 1 + ]); + }); + it("should return out", function() { expect(result).toBe(out); }); + it("scaling should be [1, 1, 1]", function(){ + var scaling = mat4.getScaling(new Float32Array(3), out); + expect(scaling).toBeEqualish([1, 1, 1]); + }); + }); + + describe("str", function() { + beforeEach(function() { result = mat4.str(matA); }); + + it("should return a string representation of the matrix", function() { expect(result).toEqual("mat4(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 2, 3, 1)"); }); + }); + + describe("frob", function() { + beforeEach(function() { result = mat4.frob(matA); }); + it("should return the Frobenius Norm of the matrix", function() { expect(result).toBeEqualish( Math.sqrt(Math.pow(1, 2) + Math.pow(1, 2) + Math.pow(1, 2) + Math.pow(1, 2) + Math.pow(1, 2) + Math.pow(2, 2) + Math.pow(3, 2) )); }); + }); + }; + + describe("add", function() { + beforeEach(function() { + matA = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]; + matB = [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32]; + }); + describe("with a separate output matrix", function() { + beforeEach(function() { + result = mat3.add(out, matA, matB); + }); + + it("should place values into out", function() { expect(out).toBeEqualish([18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify matA", function() { expect(matA).toBeEqualish([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]); }); + it("should not modify matB", function() { expect(matB).toBeEqualish([17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32]); }); + }); + + describe("when matA is the output matrix", function() { + beforeEach(function() { result = mat3.add(matA, matA, matB); }); + + it("should place values into matA", function() { expect(matA).toBeEqualish([18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48]); }); + it("should return matA", function() { expect(result).toBe(matA); }); + it("should not modify matB", function() { expect(matB).toBeEqualish([17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32]); }); + }); + + describe("when matB is the output matrix", function() { + beforeEach(function() { result = mat3.add(matB, matA, matB); }); + + it("should place values into matB", function() { expect(matB).toBeEqualish([18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48]); }); + it("should return matB", function() { expect(result).toBe(matB); }); + it("should not modify matA", function() { expect(matA).toBeEqualish([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]); }); + }); + }); + + describe("subtract", function() { + beforeEach(function() { + matA = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]; + matB = [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32]; + }); + it("should have an alias called 'sub'", function() { expect(mat3.sub).toEqual(mat3.subtract); }); + + describe("with a separate output matrix", function() { + beforeEach(function() { result = mat3.subtract(out, matA, matB); }); + + it("should place values into out", function() { expect(out).toBeEqualish([-16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify matA", function() { expect(matA).toBeEqualish([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]); }); + it("should not modify matB", function() { expect(matB).toBeEqualish([17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32]); }); + }); + + describe("when matA is the output matrix", function() { + beforeEach(function() { result = mat3.subtract(matA, matA, matB); }); + + it("should place values into matA", function() { expect(matA).toBeEqualish([-16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16]); }); + it("should return matA", function() { expect(result).toBe(matA); }); + it("should not modify matB", function() { expect(matB).toBeEqualish([17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32]); }); + }); + + describe("when matB is the output matrix", function() { + beforeEach(function() { result = mat3.subtract(matB, matA, matB); }); + + it("should place values into matB", function() { expect(matB).toBeEqualish([-16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16]); }); + it("should return matB", function() { expect(result).toBe(matB); }); + it("should not modify matA", function() { expect(matA).toBeEqualish([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]); }); + }); + }); + + describe("fromValues", function() { + beforeEach(function() { result = mat4.fromValues(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16); }); + it("should return a 16 element array initialized to the values passed", function() { expect(result).toBeEqualish([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]); }); + }); + + describe("set", function() { + beforeEach(function() { result = mat4.set(out, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16); }); + it("should place values into out", function() { expect(out).toBeEqualish([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]); }); + it("should return out", function() { expect(result).toBe(out); }); + }); + + describe("multiplyScalar", function() { + beforeEach(function() { + matA = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]; + }); + describe("with a separate output matrix", function() { + beforeEach(function() { result = mat3.multiplyScalar(out, matA, 2); }); + + it("should place values into out", function() { expect(out).toBeEqualish([2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify matA", function() { expect(matA).toBeEqualish([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]); }); + }); + + describe("when matA is the output matrix", function() { + beforeEach(function() { result = mat3.multiplyScalar(matA, matA, 2); }); + + it("should place values into matA", function() { expect(matA).toBeEqualish([2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32]); }); + it("should return matA", function() { expect(result).toBe(matA); }); + }); + }); + + describe("multiplyScalarAndAdd", function() { + beforeEach(function() { + matA = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]; + matB = [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32]; + }); + describe("with a separate output matrix", function() { + beforeEach(function() { result = mat3.multiplyScalarAndAdd(out, matA, matB, 0.5); }); + + it("should place values into out", function() { expect(out).toBeEqualish([9.5, 11, 12.5, 14, 15.5, 17, 18.5, 20, 21.5, 23, 24.5, 26, 27.5, 29, 30.5, 32]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify matA", function() { expect(matA).toBeEqualish([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]); }); + it("should not modify matB", function() { expect(matB).toBeEqualish([17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32]); }); + }); + + describe("when matA is the output matrix", function() { + beforeEach(function() { result = mat3.multiplyScalarAndAdd(matA, matA, matB, 0.5); }); + + it("should place values into matA", function() { expect(matA).toBeEqualish([9.5, 11, 12.5, 14, 15.5, 17, 18.5, 20, 21.5, 23, 24.5, 26, 27.5, 29, 30.5, 32]); }); + it("should return matA", function() { expect(result).toBe(matA); }); + it("should not modify matB", function() { expect(matB).toBeEqualish([17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32]); }); + }); + + describe("when matB is the output matrix", function() { + beforeEach(function() { result = mat3.multiplyScalarAndAdd(matB, matA, matB, 0.5); }); + + it("should place values into matB", function() { expect(matB).toBeEqualish([9.5, 11, 12.5, 14, 15.5, 17, 18.5, 20, 21.5, 23, 24.5, 26, 27.5, 29, 30.5, 32]); }); + it("should return matB", function() { expect(result).toBe(matB); }); + it("should not modify matA", function() { expect(matA).toBeEqualish([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]); }); + }); + }); + + describe("exactEquals", function() { + let matC, r0, r1; + beforeEach(function() { + matA = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]; + matB = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]; + matC = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]; + r0 = mat4.exactEquals(matA, matB); + r1 = mat4.exactEquals(matA, matC); + }); + + it("should return true for identical matrices", function() { expect(r0).toBe(true); }); + it("should return false for different matrices", function() { expect(r1).toBe(false); }); + it("should not modify matA", function() { expect(matA).toBeEqualish([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]); }); + it("should not modify matB", function() { expect(matB).toBeEqualish([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]); }); + }); + + describe("equals", function() { + let matC, matD, r0, r1, r2; + beforeEach(function() { + matA = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]; + matB = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]; + matC = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]; + matD = [1e-16, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]; + r0 = mat4.equals(matA, matB); + r1 = mat4.equals(matA, matC); + r2 = mat4.equals(matA, matD); + }); + it("should return true for identical matrices", function() { expect(r0).toBe(true); }); + it("should return false for different matrices", function() { expect(r1).toBe(false); }); + it("should return true for close but not identical matrices", function() { expect(r2).toBe(true); }); + it("should not modify matA", function() { expect(matA).toBeEqualish([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]); }); + it("should not modify matB", function() { expect(matB).toBeEqualish([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]); }); + }); +} + +describe("mat4", buildMat4Tests()); diff --git a/assembly/__tests__/quat.spec.ts b/assembly/__tests__/quat.spec.ts new file mode 100644 index 00000000..a5a06ac3 --- /dev/null +++ b/assembly/__tests__/quat.spec.ts @@ -0,0 +1,798 @@ +import * as mat3 from "../mat3" +import * as mat4 from "../mat4" +import * as quat from "../quat" +import * as vec3 from "../vec3" + +describe("quat", function() { + let out, quatA, quatB, result; + let vec, id, deg90; + + beforeEach(function() { + quatA = [1, 2, 3, 4]; + quatB = [5, 6, 7, 8]; + out = [0, 0, 0, 0]; + vec = [1, 1, -1]; + id = [0, 0, 0, 1]; + deg90 = Math.PI / 2; + }); + + describe("slerp", function() { + describe("the normal case", function() { + beforeEach(function() { + result = quat.slerp(out, [0, 0, 0, 1], [0, 1, 0, 0], 0.5); + }); + + it("should return out", function() { expect(result).toBe(out); }); + it("should calculate proper quat", function() { + expect(result).toBeEqualish([0, 0.707106, 0, 0.707106]); + }); + }); + + describe("where a == b", function() { + beforeEach(function() { + result = quat.slerp(out, [0, 0, 0, 1], [0, 0, 0, 1], 0.5); + }); + + it("should return out", function() { expect(result).toBe(out); }); + it("should calculate proper quat", function() { + expect(result).toBeEqualish([0, 0, 0, 1]); + }); + }); + + describe("where theta == 180deg", function() { + beforeEach(function() { + quat.rotateX(quatA, [1,0,0,0], Math.PI); // 180 deg + result = quat.slerp(out, [1,0,0,0], quatA, 1); + }); + + it("should calculate proper quat", function() { + expect(result).toBeEqualish([0,0,0,-1]); + }); + }); + + describe("where a == -b", function() { + beforeEach(function() { + result = quat.slerp(out, [1, 0, 0, 0], [-1, 0, 0, 0], 0.5); + }); + + it("should return out", function() { expect(result).toBe(out); }); + it("should calculate proper quat", function() { + expect(result).toBeEqualish([1, 0, 0, 0]); + }); + }); + }); + + describe("pow", function() { + describe("identity quat", function() { + beforeEach(function() { + result = quat.pow(out, id, 2.1 /* random number */); + }); + + it("should return out", function() { expect(result).toBe(out); }); + it("should be the identity", function() { + expect(result).toBeEqualish(id); + }); + }); + + describe("power of one", function() { + beforeEach(function() { + quat.normalize(quatA, quatA); + + result = quat.pow(out, quatA, 1); + }); + + it("should be the identity", function() { + expect(result).toBeEqualish(quatA); + }); + it("should be normalized", function() { + expect(quat.length(result)).toBeEqualish(1); + }); + }); + + describe("squared", function() { + beforeEach(function() { + quat.normalize(quatA, quatA); + + result = quat.pow(out, quatA, 2); + }); + + it("should be the square", function() { + let reference = quat.multiply(quat.create(), quatA, quatA); + expect(result).toBeEqualish(reference); + }); + it("should be normalized", function() { + expect(quat.length(result)).toBeEqualish(1); + }); + }); + + describe("conjugate", function() { + beforeEach(function() { + quat.normalize(quatA, quatA); + + result = quat.pow(out, quatA, -1); + }); + + it("should be the conjugate", function() { + let reference = quat.conjugate(quat.create(), quatA); + expect(result).toBeEqualish(reference); + }); + it("should be normalized", function() { + expect(quat.length(result)).toBeEqualish(1); + }); + }); + + describe("reversible", function() { + beforeEach(function() { + quat.normalize(quatA, quatA); + + let b = 2.1; // random number + result = quat.pow(out, quatA, b); + result = quat.pow(out, result, 1/b); + }); + + it("should be reverted", function() { + expect(result).toBeEqualish(quatA); + }); + it("should be normalized", function() { + expect(quat.length(result)).toBeEqualish(1); + }); + }); + }); + + describe("rotateX", function() { + beforeEach(function() { + result = quat.rotateX(out, id, deg90); + }); + + it("should return out", function() { expect(result).toBe(out); }); + it("should transform vec accordingly", function() { + vec3.transformQuat(vec, [0,0,-1], out); + expect(vec).toBeEqualish([0, 1, 0]); + }); + }); + + describe("rotateY", function() { + beforeEach(function() { + result = quat.rotateY(out, id, deg90); + }); + + it("should return out", function() { expect(result).toBe(out); }); + it("should transform vec accordingly", function() { + vec3.transformQuat(vec, [0,0,-1], out); + expect(vec).toBeEqualish([-1, 0, 0]); + }); + }); + + describe("rotateZ", function() { + beforeEach(function() { + result = quat.rotateZ(out, id, deg90); + }); + + it("should return out", function() { expect(result).toBe(out); }); + it("should transform vec accordingly", function() { + vec3.transformQuat(vec, [0,1,0], out); + expect(vec).toBeEqualish([-1, 0, 0]); + }); + }); + + describe("fromMat3", function() { + let matr; + + describe("legacy", function() { + beforeEach(function() { + matr = [ 1, 0, 0, + 0, 0, -1, + 0, 1, 0 ]; + result = quat.fromMat3(out, matr); + }); + + it("should set dest to the correct value", function() { + expect(result).toBeEqualish([-0.707106, 0, 0, 0.707106]); + }); + }); + + describe("where trace > 0", function() { + beforeEach(function() { + matr = [ 1, 0, 0, + 0, 0, -1, + 0, 1, 0 ]; + result = quat.fromMat3(out, matr); + }); + + it("should return out", function() { expect(result).toBe(out); }); + + it("should produce the correct transformation", function() { + expect(vec3.transformQuat([], [0,1,0], out)).toBeEqualish([0,0,-1]); + }); + }); + + describe("from a normal matrix looking 'backward'", function() { + beforeEach(function() { + matr = mat3.create(); + mat3.transpose(matr, mat3.invert(matr, mat3.fromMat4(matr, mat4.lookAt(mat4.create(), [0, 0, 0], [0, 0, 1], [0, 1, 0])))); + result = quat.fromMat3(out, matr); + }); + + it("should return out", function() { expect(result).toBe(out); }); + + it("should produce the same transformation as the given matrix", function() { + expect(vec3.transformQuat([], [3,2,-1], quat.normalize(out, out))).toBeEqualish(vec3.transformMat3([], [3,2,-1], matr)); + }); + }); + + describe("from a normal matrix looking 'left' and 'upside down'", function() { + beforeEach(function() { + matr = mat3.create(); + mat3.transpose(matr, mat3.invert(matr, mat3.fromMat4(matr, mat4.lookAt(mat4.create(), [0, 0, 0], [-1, 0, 0], [0, -1, 0])))); + result = quat.fromMat3(out, matr); + }); + + it("should return out", function() { expect(result).toBe(out); }); + + it("should produce the same transformation as the given matrix", function() { + expect(vec3.transformQuat([], [3,2,-1], quat.normalize(out, out))).toBeEqualish(vec3.transformMat3([], [3,2,-1], matr)); + }); + }); + + describe("from a normal matrix looking 'upside down'", function() { + beforeEach(function() { + matr = mat3.create(); + mat3.transpose(matr, mat3.invert(matr, mat3.fromMat4(matr, mat4.lookAt(mat4.create(), [0, 0, 0], [0, 0, -1], [0, -1, 0])))); + result = quat.fromMat3(out, matr); + }); + + it("should return out", function() { expect(result).toBe(out); }); + + it("should produce the same transformation as the given matrix", function() { + expect(vec3.transformQuat([], [3,2,-1], quat.normalize(out, out))).toBeEqualish(vec3.transformMat3([], [3,2,-1], matr)); + }); + }); + }); + + describe("fromEuler", function() { + describe("legacy", function() { + beforeEach(function() { + result = quat.fromEuler(out, -30, 30, 30); + }); + + it("should set dest to the correct value", function() { + expect(result).toBeEqualish([-0.3061862, 0.1767767, 0.3061862, 0.8838835]); + }); + }); + + describe("where trace > 0", function() { + beforeEach(function() { + result = quat.fromEuler(out, -90, 0, 0); + }); + + it("should return out", function() { expect(result).toBe(out); }); + + it("should produce the correct transformation", function() { + expect(vec3.transformQuat([], [0,1,0], out)).toBeEqualish([0,0,-1]); + }); + }); + + describe("order argument", function () { + it("should use ZYX order as the default", function () { + result = quat.fromEuler(out, -30, 30, 30); + expect(result).toBeEqualish(quat.fromEuler(quat.create(), -30, 30, 30, 'zyx')); + }); + + it("should apply in XYZ order properly", function () { + result = quat.fromEuler(out, -30, 30, 30, 'xyz'); + expect(result).toBeEqualish([-0.1767767, 0.3061862, 0.1767767, 0.9185587]); + }); + + it("should apply in XZY order properly", function () { + result = quat.fromEuler(out, -30, 30, 30, 'xzy'); + expect(result).toBeEqualish([-0.3061862, 0.3061862, 0.1767767, 0.8838835]); + }); + + it("should apply in YXZ order properly", function () { + result = quat.fromEuler(out, -30, 30, 30, 'yxz'); + expect(result).toBeEqualish([-0.1767767, 0.3061862, 0.3061862, 0.8838835]); + }); + + it("should apply in YZX order properly", function () { + result = quat.fromEuler(out, -30, 30, 30, 'yzx'); + expect(result).toBeEqualish([-0.1767767, 0.1767767, 0.3061862, 0.9185587]); + }); + + it("should apply in ZXY order properly", function () { + result = quat.fromEuler(out, -30, 30, 30, 'zxy'); + expect(result).toBeEqualish([-0.3061862, 0.1767767, 0.1767767, 0.9185587]); + }); + }); + }); + + describe("setAxes", function() { + let r; + beforeEach(function() { r = vec3.create(); }); + + describe("looking left", function() { + let view, up, right; + beforeEach(function() { + view = [-1, 0, 0]; + up = [ 0, 1, 0]; + right= [ 0, 0,-1]; + result = quat.setAxes([], view, right, up); + }); + + it("should transform local view into world left", function() { + r = vec3.transformQuat([], [0,0,-1], result); + expect(r).toBeEqualish([1, 0, 0]); + }); + + it("should transform local right into world front", function() { + r = vec3.transformQuat([], [1,0,0], result); + expect(r).toBeEqualish([0, 0, 1]); + }); + }); + + describe("given opengl defaults", function() { + let view, up, right; + beforeEach(function() { + view = [0, 0, -1]; + up = [0, 1, 0]; + right= [1, 0, 0]; + result = quat.setAxes(out, view, right, up); + }); + + it("should return out", function() { + expect(result).toBe(out); + }); + + it("should produce identity", function() { + expect(out).toBeEqualish([0, 0, 0, 1]); + }); + }); + + describe("legacy example", function() { + let view, up, right; + beforeEach(function() { + right= [1, 0, 0]; + up = [0, 0, 1]; + view = [0, -1, 0]; + result = quat.setAxes(out, view, right, up); + }); + + xit("should set correct quat4 values", function() { + expect(result).toBeEqualish([0.707106, 0, 0, 0.707106]); + }); + }); + }); + + describe("rotationTo", function() { + let r; + beforeEach(function() { r = vec3.create(); }); + + describe("at right angle", function() { + beforeEach(function() { + result = quat.rotationTo(out, [0, 1, 0], [1, 0, 0]); + }); + + it("should return out", function() { expect(result).toBe(out); }); + + it("should calculate proper quaternion", function() { + expect(out).toBeEqualish([0, 0, -0.707106, 0.707106]); + }); + }); + + describe("when vectors are parallel", function() { + beforeEach(function() { + result = quat.rotationTo(out, [0, 1, 0], [0, 1, 0]); + }); + + it("should return out", function() { expect(result).toBe(out); }); + + it("multiplying A should produce B", function() { + expect(vec3.transformQuat(r, [0, 1, 0], out)).toBeEqualish([0, 1, 0]); + }); + }); + + describe("when vectors are opposed X", function() { + beforeEach(function() { + result = quat.rotationTo(out, [1, 0, 0], [-1, 0, 0]); + }); + + it("should return out", function() { expect(result).toBe(out); }); + + it("multiplying A should produce B", function() { + expect(vec3.transformQuat(r, [1, 0, 0], out)).toBeEqualish([-1, 0, 0]); + }); + }); + + describe("when vectors are opposed Y", function() { + beforeEach(function() { + result = quat.rotationTo(out, [0, 1, 0], [0, -1, 0]); + }); + + it("should return out", function() { expect(result).toBe(out); }); + + it("multiplying A should produce B", function() { + expect(vec3.transformQuat(r, [0, 1, 0], out)).toBeEqualish([0, -1, 0]); + }); + }); + + describe("when vectors are opposed Z", function() { + beforeEach(function() { + result = quat.rotationTo(out, [0, 0, 1], [0, 0, -1]); + }); + + it("should return out", function() { expect(result).toBe(out); }); + + it("multiplying A should produce B", function() { + expect(vec3.transformQuat(r, [0, 0, 1], out)).toBeEqualish([0, 0, -1]); + }); + }); + }); + + describe("create", function() { + beforeEach(function() { result = quat.create(); }); + it("should return a 4 element array initialized to an identity quaternion", function() { expect(result).toBeEqualish([0, 0, 0, 1]); }); + }); + + describe("clone", function() { + beforeEach(function() { result = quat.clone(quatA); }); + it("should return a 4 element array initialized to the values in quatA", function() { expect(result).toBeEqualish(quatA); }); + }); + + describe("fromValues", function() { + beforeEach(function() { result = quat.fromValues(1, 2, 3, 4); }); + it("should return a 4 element array initialized to the values passed", function() { expect(result).toBeEqualish([1, 2, 3, 4]); }); + }); + + describe("copy", function() { + beforeEach(function() { result = quat.copy(out, quatA); }); + it("should place values into out", function() { expect(out).toBeEqualish([1, 2, 3, 4]); }); + it("should return out", function() { expect(result).toBe(out); }); + }); + + describe("set", function() { + beforeEach(function() { result = quat.set(out, 1, 2, 3, 4); }); + it("should place values into out", function() { expect(out).toBeEqualish([1, 2, 3, 4]); }); + it("should return out", function() { expect(result).toBe(out); }); + }); + + describe("identity", function() { + beforeEach(function() { result = quat.identity(out); }); + it("should place values into out", function() { expect(result).toBeEqualish([0, 0, 0, 1]); }); + it("should return out", function() { expect(result).toBe(out); }); + }); + + describe("setAxisAngle", function() { + beforeEach(function() { result = quat.setAxisAngle(out, [1, 0, 0], Math.PI * 0.5); }); + it("should place values into out", function() { expect(result).toBeEqualish([0.707106, 0, 0, 0.707106]); }); + it("should return out", function() { expect(result).toBe(out); }); + }); + + describe("getAxisAngle", function() { + describe("for a quaternion representing no rotation", function() { + beforeEach(function() { result = quat.setAxisAngle(out, [0, 1, 0], 0.0); deg90 = quat.getAxisAngle(vec, out); }); + it("should return a multiple of 2*PI as the angle component", function() { expect(deg90 % (Math.PI * 2.0)).toBeEqualish(0.0); }); + }); + + describe("for a simple rotation about X axis", function() { + beforeEach(function() { result = quat.setAxisAngle(out, [1, 0, 0], 0.7778); deg90 = quat.getAxisAngle(vec, out); }); + it("should return the same provided angle", function() { expect(deg90).toBeEqualish(0.7778); }); + it("should return the X axis as the angle", function() { expect(vec).toBeEqualish([1, 0, 0]); }); + }); + + describe("for a simple rotation about Y axis", function() { + beforeEach(function() { result = quat.setAxisAngle(out, [0, 1, 0], 0.879546); deg90 = quat.getAxisAngle(vec, out); }); + it("should return the same provided angle", function() { expect(deg90).toBeEqualish(0.879546); }); + it("should return the X axis as the angle", function() { expect(vec).toBeEqualish([0, 1, 0]); }); + }); + + describe("for a simple rotation about Z axis", function() { + beforeEach(function() { result = quat.setAxisAngle(out, [0, 0, 1], 0.123456); deg90 = quat.getAxisAngle(vec, out); }); + it("should return the same provided angle", function() { expect(deg90).toBeEqualish(0.123456); }); + it("should return the X axis as the angle", function() { expect(vec).toBeEqualish([0, 0, 1]); }); + }); + + describe("for a slightly irregular axis and right angle", function() { + beforeEach(function() { result = quat.setAxisAngle(out, [0.707106, 0, 0.707106], Math.PI * 0.5); deg90 = quat.getAxisAngle(vec, out); }); + it("should place values into vec", function() { expect(vec).toBeEqualish([0.707106, 0, 0.707106]); }); + it("should return a numeric angle", function() { expect(deg90).toBeEqualish(Math.PI * 0.5); }); + }); + + describe("for a very irregular axis and negative input angle", function() { + beforeEach(function() { + quatA = quat.setAxisAngle(quatA, [0.65538555, 0.49153915, 0.57346237], 8.8888); + deg90 = quat.getAxisAngle(vec, quatA); + quatB = quat.setAxisAngle(quatB, vec, deg90); + }); + it("should return an angle between 0 and 2*PI", function() { expect(deg90).toBeGreaterThan(0.0); expect(deg90).toBeLessThan(Math.PI * 2.0); }); + it("should create the same quaternion from axis and angle extracted", function() { expect(quatA).toBeEqualish(quatB); }); + }); + }); + + describe("getAngle", function() { + describe("from itself", function() { + beforeEach(function() { + quat.normalize(quatA, quatA); + }); + + it("should be zero", function() { + expect(quat.getAngle(quatA, quatA)).toBeEqualish(0); + }); + }); + + describe("from rotated", function() { + beforeEach(function() { + quat.normalize(quatA, quatA); + quat.rotateX(quatB, quatA, Math.PI / 4); + }); + + it("should be 45 degrees", function() { + expect(quat.getAngle(quatA, quatB)).toBeEqualish(Math.PI / 4); + }); + }); + + describe("compare with axisAngle", function() { + beforeEach(function() { + quat.normalize(quatA, quatA); + quat.normalize(quatB, quatB); + }); + + it("should be equalish", function() { + // compute reference value as axisAngle of quatA^{-1} * quatB + let quatAInv = quat.conjugate(quat.create(), quatA); + let quatAB = quat.multiply(quatAInv, quatAInv, quatB); + let dummy = vec3.create(); + let reference = quat.getAxisAngle(dummy, quatAB); + + expect(quat.getAngle(quatA, quatB)).toBeEqualish(reference); + }); + }); + }); + + describe("add", function() { + describe("with a separate output quaternion", function() { + beforeEach(function() { result = quat.add(out, quatA, quatB); }); + + it("should place values into out", function() { expect(out).toBeEqualish([6, 8, 10, 12]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify quatA", function() { expect(quatA).toBeEqualish([1, 2, 3, 4]); }); + it("should not modify quatB", function() { expect(quatB).toBeEqualish([5, 6, 7, 8]); }); + }); + + describe("when quatA is the output quaternion", function() { + beforeEach(function() { result = quat.add(quatA, quatA, quatB); }); + + it("should place values into quatA", function() { expect(quatA).toBeEqualish([6, 8, 10, 12]); }); + it("should return quatA", function() { expect(result).toBe(quatA); }); + it("should not modify quatB", function() { expect(quatB).toBeEqualish([5, 6, 7, 8]); }); + }); + + describe("when quatB is the output quaternion", function() { + beforeEach(function() { result = quat.add(quatB, quatA, quatB); }); + + it("should place values into quatB", function() { expect(quatB).toBeEqualish([6, 8, 10, 12]); }); + it("should return quatB", function() { expect(result).toBe(quatB); }); + it("should not modify quatA", function() { expect(quatA).toBeEqualish([1, 2, 3, 4]); }); + }); + }); + + describe("multiply", function() { + it("should have an alias called 'mul'", function() { expect(quat.mul).toEqual(quat.multiply); }); + + describe("with a separate output quaternion", function() { + beforeEach(function() { result = quat.multiply(out, quatA, quatB); }); + + it("should place values into out", function() { expect(out).toBeEqualish([24, 48, 48, -6]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify quatA", function() { expect(quatA).toBeEqualish([1, 2, 3, 4]); }); + it("should not modify quatB", function() { expect(quatB).toBeEqualish([5, 6, 7, 8]); }); + }); + + describe("when quatA is the output quaternion", function() { + beforeEach(function() { result = quat.multiply(quatA, quatA, quatB); }); + + it("should place values into quatA", function() { expect(quatA).toBeEqualish([24, 48, 48, -6]); }); + it("should return quatA", function() { expect(result).toBe(quatA); }); + it("should not modify quatB", function() { expect(quatB).toBeEqualish([5, 6, 7, 8]); }); + }); + + describe("when quatB is the output quaternion", function() { + beforeEach(function() { result = quat.multiply(quatB, quatA, quatB); }); + + it("should place values into quatB", function() { expect(quatB).toBeEqualish([24, 48, 48, -6]); }); + it("should return quatB", function() { expect(result).toBe(quatB); }); + it("should not modify quatA", function() { expect(quatA).toBeEqualish([1, 2, 3, 4]); }); + }); + }); + + describe("scale", function() { + describe("with a separate output quaternion", function() { + beforeEach(function() { result = quat.scale(out, quatA, 2); }); + + it("should place values into out", function() { expect(out).toBeEqualish([2, 4, 6, 8]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify quatA", function() { expect(quatA).toBeEqualish([1, 2, 3, 4]); }); + }); + + describe("when quatA is the output quaternion", function() { + beforeEach(function() { result = quat.scale(quatA, quatA, 2); }); + + it("should place values into quatA", function() { expect(quatA).toBeEqualish([2, 4, 6, 8]); }); + it("should return quatA", function() { expect(result).toBe(quatA); }); + }); + }); + + describe("length", function() { + it("should have an alias called 'len'", function() { expect(quat.len).toEqual(quat.length); }); + + beforeEach(function() { result = quat.len(quatA); }); + + it("should return the length", function() { expect(result).toBeEqualish(5.477225); }); + }); + + describe("squaredLength", function() { + it("should have an alias called 'sqrLen'", function() { expect(quat.sqrLen).toEqual(quat.squaredLength); }); + + beforeEach(function() { result = quat.squaredLength(quatA); }); + + it("should return the squared length", function() { expect(result).toEqual(30); }); + }); + + describe("normalize", function() { + beforeEach(function() { quatA = [5, 0, 0, 0]; }); + + describe("with a separate output quaternion", function() { + beforeEach(function() { result = quat.normalize(out, quatA); }); + + it("should place values into out", function() { expect(out).toBeEqualish([1, 0, 0, 0]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify quatA", function() { expect(quatA).toBeEqualish([5, 0, 0, 0]); }); + }); + + describe("when quatA is the output quaternion", function() { + beforeEach(function() { result = quat.normalize(quatA, quatA); }); + + it("should place values into quatA", function() { expect(quatA).toBeEqualish([1, 0, 0, 0]); }); + it("should return quatA", function() { expect(result).toBe(quatA); }); + }); + }); + + describe("lerp", function() { + describe("with a separate output quaternion", function() { + beforeEach(function() { result = quat.lerp(out, quatA, quatB, 0.5); }); + + it("should place values into out", function() { expect(out).toBeEqualish([3, 4, 5, 6]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify quatA", function() { expect(quatA).toBeEqualish([1, 2, 3, 4]); }); + it("should not modify quatB", function() { expect(quatB).toBeEqualish([5, 6, 7, 8]); }); + }); + + describe("when quatA is the output quaternion", function() { + beforeEach(function() { result = quat.lerp(quatA, quatA, quatB, 0.5); }); + + it("should place values into quatA", function() { expect(quatA).toBeEqualish([3, 4, 5, 6]); }); + it("should return quatA", function() { expect(result).toBe(quatA); }); + it("should not modify quatB", function() { expect(quatB).toBeEqualish([5, 6, 7, 8]); }); + }); + + describe("when quatB is the output quaternion", function() { + beforeEach(function() { result = quat.lerp(quatB, quatA, quatB, 0.5); }); + + it("should place values into quatB", function() { expect(quatB).toBeEqualish([3, 4, 5, 6]); }); + it("should return quatB", function() { expect(result).toBe(quatB); }); + it("should not modify quatA", function() { expect(quatA).toBeEqualish([1, 2, 3, 4]); }); + }); + }); + + describe("slerp", function() { + describe("with a separate output quaternion", function() { + beforeEach(function() { result = quat.slerp(out, quatA, quatB, 0.5); }); + + it("should place values into out", function() { expect(out).toBeEqualish([3, 4, 5, 6]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify quatA", function() { expect(quatA).toBeEqualish([1, 2, 3, 4]); }); + it("should not modify quatB", function() { expect(quatB).toBeEqualish([5, 6, 7, 8]); }); + }); + + describe("when quatA is the output quaternion", function() { + beforeEach(function() { result = quat.slerp(quatA, quatA, quatB, 0.5); }); + + it("should place values into quatA", function() { expect(quatA).toBeEqualish([3, 4, 5, 6]); }); + it("should return quatA", function() { expect(result).toBe(quatA); }); + it("should not modify quatB", function() { expect(quatB).toBeEqualish([5, 6, 7, 8]); }); + }); + + describe("when quatB is the output quaternion", function() { + beforeEach(function() { result = quat.slerp(quatB, quatA, quatB, 0.5); }); + + it("should place values into quatB", function() { expect(quatB).toBeEqualish([3, 4, 5, 6]); }); + it("should return quatB", function() { expect(result).toBe(quatB); }); + it("should not modify quatA", function() { expect(quatA).toBeEqualish([1, 2, 3, 4]); }); + }); + }); + + describe("random", function() { + beforeEach(function() { result = quat.random(out); }); + + it("should result in a normalized quaternion", function() { + let copy = quat.clone(out); + expect(quat.normalize(out, out)).toBeEqualish(copy); + }); + it("should return out", function() { expect(result).toBe(out); }); + }); + + describe("invert", function() { + describe("with a separate output quaternion", function() { + beforeEach(function() { result = quat.invert(out, quatA); }); + + it("should place values into out", function() { expect(out).toBeEqualish([-0.033333, -0.066666, -0.1, 0.133333]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify quatA", function() { expect(quatA).toBeEqualish([1, 2, 3, 4]); }); + }); + + describe("when quatA is the output quaternion", function() { + beforeEach(function() { result = quat.invert(quatA, quatA); }); + + it("should place values into quatA", function() { expect(quatA).toBeEqualish([-0.033333, -0.066666, -0.1, 0.133333]); }); + it("should return quatA", function() { expect(result).toBe(quatA); }); + }); + }); + + describe("conjugate", function() { + describe("with a separate output quaternion", function() { + beforeEach(function() { result = quat.conjugate(out, quatA); }); + + it("should place values into out", function() { expect(out).toBeEqualish([-1, -2, -3, 4]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify quatA", function() { expect(quatA).toBeEqualish([1, 2, 3, 4]); }); + }); + + describe("when quatA is the output quaternion", function() { + beforeEach(function() { result = quat.conjugate(quatA, quatA); }); + + it("should place values into quatA", function() { expect(quatA).toBeEqualish([-1, -2, -3, 4]); }); + it("should return quatA", function() { expect(result).toBe(quatA); }); + }); + }); + + describe("str", function() { + beforeEach(function() { result = quat.str(quatA); }); + + it("should return a string representation of the quaternion", function() { expect(result).toEqual("quat(1, 2, 3, 4)"); }); + }); + + describe("exactEquals", function() { + let quatC, r0, r1; + beforeEach(function() { + quatA = [0, 1, 2, 3]; + quatB = [0, 1, 2, 3]; + quatC = [1, 2, 3, 4]; + r0 = quat.exactEquals(quatA, quatB); + r1 = quat.exactEquals(quatA, quatC); + }); + + it("should return true for identical quaternions", function() { expect(r0).toBe(true); }); + it("should return false for different quaternions", function() { expect(r1).toBe(false); }); + it("should not modify quatA", function() { expect(quatA).toBeEqualish([0, 1, 2, 3]); }); + it("should not modify quatB", function() { expect(quatB).toBeEqualish([0, 1, 2, 3]); }); + }); + + describe("equals", function() { + let quatC, quatD, quatE, r0, r1, r2, r3; + beforeEach(function() { + quatA = [0, 0, 0, 1]; + quatB = [0, 0, 0, 1]; + quatC = [0, 1, 0, 0]; + quatD = [1e-16, 1, 2, 3]; + quatE = [0, -1, 0, 0]; + r0 = quat.equals(quatA, quatB); + r1 = quat.equals(quatA, quatC); + r2 = quat.equals(quatA, quatD); + r3 = quat.equals(quatC, quatE); + }); + it("should return true for identical quaternions", function() { expect(r0).toBe(true); }); + it("should return false for different quaternions", function() { expect(r1).toBe(false); }); + it("should return true for close but not identical quaternions", function() { expect(r2).toBe(true); }); + it("should return true for identical quaternions with flipped orientation", function() { expect(r3).toBe(true); }); + it("should not modify quatA", function() { expect(quatA).toBeEqualish([0, 0, 0, 1]); }); + it("should not modify quatB", function() { expect(quatB).toBeEqualish([0, 0, 0, 1]); }); + }); +}); diff --git a/assembly/__tests__/quat2.spec.ts b/assembly/__tests__/quat2.spec.ts new file mode 100644 index 00000000..879b38e8 --- /dev/null +++ b/assembly/__tests__/quat2.spec.ts @@ -0,0 +1,716 @@ +import * as quat from "../quat"; +import * as quat2 from "../quat2"; +import * as mat4 from "../mat4"; + +describe("quat2", function() { + let out, outVec, quat2A, quat2B, result, resultVec, outQuat; + let vec; + + beforeEach(function() { + quat2A = [1, 2, 3, 4, 2, 5, 6, -2]; + quat2B = [5, 6, 7, 8, 9, 8, 6, -4]; + out = [0, 0, 0, 0, 0, 0, 0, 0]; + outVec = [0, 0, 0]; + outQuat = [0, 0, 0, 0]; + vec = [1, 1, -1]; + }); + + describe("translate", function() { + let matrixA = mat4.create(), matOut = mat4.create(), quatOut = quat2.create(); + beforeEach(function() { + //quat2A only seems to work when created using this function? + quat2B = quat2.fromRotationTranslation(quat2A, [1,2,3,4], [-5, 4, 10]); + quat2.normalize(quat2A, quat2A); + mat4.fromQuat2(matrixA, quat2A); + }); + + describe("with a separate output quaternion", function() { + beforeEach(function() { + result = quat2.translate(out, quat2A, vec); + //Same thing with a matrix + mat4.translate(matOut, matrixA, vec); + quat2.fromMat4(quatOut, matOut); + }); + + it("should place values into out", function() { expect(out).toBeEqualishQuat2(quatOut); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify quat2A", function() { expect(quat2A).toBeEqualishQuat2(quat2B); }); + it("should not modify vec", function() { expect(vec).toBeEqualish([1,1,-1]); }); + }); + + describe("when quat2A is the output quaternion", function() { + beforeEach(function() { + result = quat2.translate(quat2A, quat2A, vec); + //Same thing with a matrix + mat4.translate(matOut, matrixA, vec); + quat2.fromMat4(quatOut, matOut); + }); + + it("should place values into quat2A", function() { expect(quat2A).toBeEqualishQuat2(quatOut); }); + it("should return quat2A", function() { expect(result).toBe(quat2A); }); + }); + }); + + describe("rotateAroundAxis", function() { + let matrixA = mat4.create(), matOut = mat4.create(), ax = [1,4,2]; + beforeEach(function() { + //quat2A only seems to work when created using this function? + quat2.fromRotationTranslation(quat2A, [1,2,3,4], [-5, 4, 10]); + quat2.normalize(quat2A, quat2A); + mat4.fromQuat2(matrixA, quat2A); + }); + + + describe("with a separate output quaternion", function() { + beforeEach(function() { + result = quat2.rotateAroundAxis(out, quat2A, ax, 5); + + //Same thing with a matrix + mat4.rotate(matOut, matrixA, 5, ax); + quat2.fromMat4(quat2B, matOut); + }); + + it("should place values into out", function() { expect(out).toBeEqualishQuat2(quat2B); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify quat2A", function() { expect(quat2A).toBeEqualishQuat2( + [0.18257418583505536, 0.3651483716701107, 0.5477225575051661, 0.7302967433402214, + -2.556038601690775, 3.742770809618635, 2.37346441585572, -3.0124740662784135] + ); }); + it("should not modify ax", function() { expect(ax).toBeEqualish([1, 4, 2]); }); + }); + + describe("when quat2A is the output quaternion", function() { + beforeEach(function() { + result = quat2.rotateAroundAxis(quat2A, quat2A, ax, 5); + //Same thing with a matrix + + mat4.rotate(matOut, matrixA, 5, ax); + quat2.fromMat4(quat2B, matOut); + }); + + it("should place values into quat2A", function() { expect(quat2A).toBeEqualishQuat2(quat2B); }); + it("should return quat2A", function() { expect(result).toBe(quat2A); }); + it("should not modify ax", function() { expect(ax).toBeEqualish([1, 4, 2]); }); + }); + }); + + describe("rotateByQuatAppend", function() { + let correctResult = quat2.create(); + let rotationQuat = quat2.create(); + beforeEach(function() { + rotationQuat[0] = 2; + rotationQuat[1] = 5; + rotationQuat[2] = 2; + rotationQuat[3] = -10; + quat2.multiply(correctResult, quat2A, rotationQuat); + }) + describe("with a separate output quaternion", function() { + beforeEach(function() { + result = quat2.rotateByQuatAppend(out, quat2A, [2, 5, 2, -10]); + }); + + it("should place values into out", function() { expect(out).toBeEqualishQuat2(correctResult); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify quat2A", function() { expect(quat2A).toBeEqualishQuat2([1, 2, 3, 4, 2, 5, 6, -2]); }); + it("should not modify the rotation quaternion", function() { expect(rotationQuat).toBeEqualishQuat2([2,5,2,-10,0,0,0,0]); }); + }); + + describe("when quat2A is the output quaternion", function() { + beforeEach(function() { result = quat2.rotateByQuatAppend(quat2A, quat2A, [2, 5, 2, -10]); }); + + it("should place values into quat2A", function() { expect(quat2A).toBeEqualishQuat2(correctResult); }); + it("should return quat2A", function() { expect(result).toBe(quat2A); }); + it("should not modify the rotation quaternion", function() { expect(rotationQuat).toBeEqualishQuat2([2,5,2,-10,0,0,0,0]); }); + }); + }); + + describe("rotateByQuatPrepend", function() { + let correctResult = quat2.create(); + let rotationQuat = quat2.create(); + beforeEach(function() { + rotationQuat[0] = 2; + rotationQuat[1] = 5; + rotationQuat[2] = 2; + rotationQuat[3] = -10; + quat2.multiply(correctResult, rotationQuat, quat2A); + }) + describe("with a separate output quaternion", function() { + beforeEach(function() { + result = quat2.rotateByQuatPrepend(out, quat2.getReal(outQuat, rotationQuat), quat2A); + }); + + it("should place values into out", function() { expect(out).toBeEqualishQuat2(correctResult); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify quat2A", function() { expect(quat2A).toBeEqualishQuat2([1, 2, 3, 4, 2, 5, 6, -2]); }); + it("should not modify the rotation quaternion", function() { expect(rotationQuat).toBeEqualishQuat2([2,5,2,-10,0,0,0,0]); }); + }); + + describe("when quat2A is the output quaternion", function() { + beforeEach(function() { result = quat2.rotateByQuatPrepend(quat2A, quat2.getReal(outQuat, rotationQuat), quat2A); }); + + it("should place values into quat2A", function() { expect(quat2A).toBeEqualishQuat2(correctResult); }); + it("should return quat2A", function() { expect(result).toBe(quat2A); }); + it("should not modify the rotation quaternion", function() { expect(rotationQuat).toBeEqualishQuat2([2,5,2,-10,0,0,0,0]); }); + }); + }); + + describe("rotateX", function() { + let matrixA = mat4.create(), matOut = mat4.create(), quatOut = quat2.create(); + beforeEach(function() { + //quat2A only seems to work when created using this function? + quat2B = quat2.fromRotationTranslation(quat2A, [1,2,3,4], [-5, 4, 10]); + quat2.normalize(quat2A, quat2A); + mat4.fromQuat2(matrixA, quat2A); + }); + describe("with a separate output quaternion", function() { + beforeEach(function() { + result = quat2.rotateX(out, quat2A, 5); + //Same thing with a matrix + mat4.rotateX(matOut, matrixA, 5); + quat2.fromMat4(quatOut, matOut); + }); + + it("should place values into out", function() { expect(out).toBeEqualishQuat2(quatOut); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify quat2A", function() { expect(quat2A).toBeEqualishQuat2(quat2B); }); + }); + + describe("when quat2A is the output quaternion", function() { + beforeEach(function() { + result = quat2.rotateX(quat2A, quat2A, 5); + //Same thing with a matrix + mat4.rotateX(matOut, matrixA, 5); + quat2.fromMat4(quatOut, matOut); + }); + + it("should place values into quat2A", function() { expect(quat2A).toBeEqualishQuat2(quatOut); }); + it("should return quat2A", function() { expect(result).toBe(quat2A); }); + }); + }); + + describe("rotateY", function() { + let matrixA = mat4.create(), matOut = mat4.create(), quatOut = quat2.create(); + beforeEach(function() { + //quat2A only seems to work when created using this function? + quat2B = quat2.fromRotationTranslation(quat2A, [1,2,3,4], [5, 4, -10]); + quat2.normalize(quat2A, quat2A); + mat4.fromQuat2(matrixA, quat2A); + }); + + describe("with a separate output quaternion", function() { + beforeEach(function() { + result = quat2.rotateY(out, quat2A, -2); + //Same thing with a matrix + mat4.rotateY(matOut, matrixA, -2); + quat2.fromMat4(quatOut, matOut); + }); + + it("should place values into out", function() { expect(out).toBeEqualishQuat2(quatOut); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify quat2A", function() { expect(quat2A).toBeEqualishQuat2(quat2B); }); + }); + + describe("when quat2A is the output quaternion", function() { + beforeEach(function() { + result = quat2.rotateY(quat2A, quat2A, -2); + //Same thing with a matrix + mat4.rotateY(matOut, matrixA, -2); + quat2.fromMat4(quatOut, matOut); + }); + + it("should place values into quat2A", function() { expect(quat2A).toBeEqualishQuat2(quatOut); }); + it("should return quat2A", function() { expect(result).toBe(quat2A); }); + }); + }); + + describe("rotateZ", function() { + let matrixA = mat4.create(), matOut = mat4.create(), quatOut = quat2.create(); + beforeEach(function() { + //quat2A only seems to work when created using this function? + quat2B = quat2.fromRotationTranslation(quat2A, [1,0,3,-4], [0, -4, -10]); + quat2.normalize(quat2A, quat2A); + mat4.fromQuat2(matrixA, quat2A); + }); + describe("with a separate output quaternion", function() { + beforeEach(function() { + result = quat2.rotateZ(out, quat2A, 1); + //Same thing with a matrix + mat4.rotateZ(matOut, matrixA, 1); + quat2.fromMat4(quatOut, matOut); + }); + + it("should place values into out", function() { expect(out).toBeEqualishQuat2(quatOut); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify quat2A", function() { expect(quat2A).toBeEqualishQuat2(quat2B); }); + }); + + describe("when quat2A is the output quaternion", function() { + beforeEach(function() { + result = quat2.rotateZ(quat2A, quat2A, 1); + //Same thing with a matrix + mat4.rotateZ(matOut, matrixA, 1); + quat2.fromMat4(quatOut, matOut); + }); + + it("should place values into quat2A", function() { expect(quat2A).toBeEqualishQuat2(quatOut); }); + it("should return quat2A", function() { expect(result).toBe(quat2A); }); + }); + }); + + describe("from/toMat4", function() { + let matRes = mat4.create(), matOut = mat4.create(); + let rotationQuat = quat.create(); + describe("quat to matrix and back", function() { + beforeEach(function() { + quat.normalize(rotationQuat, [1,2,3,4]); + + quat2.fromRotationTranslation(quat2A, rotationQuat, [1,-5,3]); + matRes = mat4.fromQuat2(matOut, quat2A); + + result = quat2.fromMat4(out, matRes); + }); + + it("should return out", function() { expect(result).toBe(out); }); + it("should return matOut", function() { expect(matRes).toBe(matOut); }); + it("should not modify quat2A", function() { expect(quat2A).toBeEqualishQuat2([0.18257418, 0.36514836, 0.54772257, 0.73029673, -1.5518806, -1.82574184, 1.73445473, 0 ]); }); + + it("should be equal to the starting dual quat", function() { + expect(quat2A).toBeEqualishQuat2(result); + }); + + }); + }); + + describe("create", function() { + beforeEach(function() { result = quat2.create(); }); + it("should return 2 4 element arrays initialized to an identity dual quaternion", function() { expect(result).toBeEqualishQuat2([0, 0, 0, 1, 0, 0, 0, 0]); }); + }); + + describe("clone", function() { + beforeEach(function() { result = quat2.clone(quat2A); }); + it("should return 2 4 element arrays initialized to the values in quat2A", function() { expect(result).toBeEqualishQuat2(quat2A); }); + }); + + describe("fromValues", function() { + beforeEach(function() { result = quat2.fromValues(1, 2, 3, 4, 5, 7, 8, -2); }); + it("should return 2 4 element arrays initialized to the values passedd to the values passed", function() { + expect(result).toBeEqualishQuat2([1, 2, 3, 4, 5, 7, 8, -2]); + }); + }); + + describe("copy", function() { + beforeEach(function() { result = quat2.copy(out, quat2A); }); + it("should place values into out", function() { expect(out).toBeEqualishQuat2([1, 2, 3, 4, 2, 5, 6, -2]); }); + it("should return out", function() { expect(result).toBe(out); }); + }); + + describe("set", function() { + beforeEach(function() { result = quat2.set(out, 1, 2, 3, 4, 2, 5, 6, -2); }); + it("should place values into out", function() { expect(out).toBeEqualishQuat2([1, 2, 3, 4, 2, 5, 6, -2]); }); + it("should return out", function() { expect(result).toBe(out); }); + }); + + describe("identity", function() { + beforeEach(function() { result = quat2.identity(out); }); + it("should place values into out", function() { expect(result).toBeEqualishQuat2([0, 0, 0, 1, 0, 0, 0, 0]); }); + it("should return out", function() { expect(result).toBe(out); }); + }); + + describe("add", function() { + describe("with a separate output dual quaternion", function() { + beforeEach(function() { result = quat2.add(out, quat2A, quat2B); }); + + it("should place values into out", function() { expect(out).toBeEqualishQuat2([6, 8, 10, 12, 11, 13, 12, -6]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify quat2A", function() { expect(quat2A).toBeEqualishQuat2([1, 2, 3, 4, 2, 5, 6, -2]); }); + it("should not modify quat2B", function() { expect(quat2B).toBeEqualishQuat2([5, 6, 7, 8, 9, 8, 6, -4]); }); + }); + + describe("when quat2A is the output dual quaternion", function() { + beforeEach(function() { result = quat2.add(quat2A, quat2A, quat2B); }); + + it("should place values into quat2A", function() { expect(quat2A).toBeEqualishQuat2([6, 8, 10, 12, 11, 13, 12, -6]); }); + it("should return quat2A", function() { expect(result).toBe(quat2A); }); + it("should not modify quat2B", function() { expect(quat2B).toBeEqualishQuat2([5, 6, 7, 8, 9, 8, 6, -4])}); + }); + + describe("when quat2B is the output dual quaternion", function() { + beforeEach(function() { result = quat2.add(quat2B, quat2A, quat2B); }); + + it("should place values into quat2B", function() { expect(quat2B).toBeEqualishQuat2([6, 8, 10, 12, 11, 13, 12, -6]); }); + it("should return quat2B", function() { expect(result).toBe(quat2B); }); + it("should not modify quat2A", function() { expect(quat2A).toBeEqualishQuat2([1, 2, 3, 4, 2, 5, 6, -2]); }); + }); + }); + + describe("multiply", function() { + it("should have an alias called 'mul'", function() { expect(quat2.mul).toEqual(quat2.multiply); }); + + describe("with a separate output quaternion", function() { + beforeEach(function() { result = quat2.multiply(out, quat2A, quat2B); }); + + it("should place values into out", function() { expect(out).toBeEqualishQuat2([24, 48, 48, -6, 25, 89, 23, -157 ]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify quat2A", function() { expect(quat2A).toBeEqualishQuat2([1, 2, 3, 4, 2, 5, 6, -2]); }); + it("should not modify quat2B", function() { expect(quat2B).toBeEqualishQuat2([5, 6, 7, 8, 9, 8, 6, -4]); }); + }); + + describe("when quat2A is the output quaternion", function() { + beforeEach(function() { result = quat2.multiply(quat2A, quat2A, quat2B); }); + + it("should place values into quat2A", function() { expect(quat2A).toBeEqualishQuat2([24, 48, 48, -6, 25, 89, 23, -157 ]); }); + it("should return quat2A", function() { expect(result).toBe(quat2A); }); + it("should not modify quat2B", function() { expect(quat2B).toBeEqualishQuat2([5, 6, 7, 8, 9, 8, 6, -4]); }); + }); + + describe("when quat2B is the output quaternion", function() { + beforeEach(function() { result = quat2.multiply(quat2B, quat2A, quat2B); }); + + it("should place values into quat2B", function() { expect(quat2B).toBeEqualishQuat2([24, 48, 48, -6, 25, 89, 23, -157 ]); }); + it("should return quat2B", function() { expect(result).toBe(quat2B); }); + it("should not modify quat2A", function() { expect(quat2A).toBeEqualishQuat2([1, 2, 3, 4, 2, 5, 6, -2]); }); + }); + + describe("same as matrix multiplication", function() { + let matrixA = mat4.create(), matrixB = mat4.create(); + let matOut = mat4.create(), quatOut = quat2.create(); + beforeEach(function() { + //quat2A and quat2B only seem to work when created using this function? + quat2.fromRotationTranslation(quat2A, [1,2,3,4], [-5, 4, 10]); + quat2.normalize(quat2A, quat2A); + mat4.fromQuat2(matrixA, quat2A); + + quat2.fromRotationTranslation(quat2B, [5, 6, 7, 8], [9, 8, 6]); + quat2.normalize(quat2B, quat2B); + mat4.fromQuat2(matrixB, quat2B); + + }); + it("the matrices should be equal to the dual quaternions", function() { + let testQuat = quat2.create(); + quat2.fromMat4(testQuat, matrixA); + expect(testQuat).toBeEqualishQuat2(quat2A); + + quat2.fromMat4(testQuat, matrixB); + expect(testQuat).toBeEqualishQuat2(quat2B); + }); + + it("should be equal to the matrix multiplication", function() { + quat2.multiply(out, quat2A, quat2B); + mat4.mul(matOut, matrixA, matrixB); + quat2.fromMat4(quatOut, matOut); + expect(out).toBeEqualishQuat2(quatOut); + }); + + }); + }); + + describe("scale", function() { + describe("with a separate output dual quaternion", function() { + beforeEach(function() { result = quat2.scale(out, quat2A, 2); }); + it("should place values into out", function() { expect(out).toBeEqualishQuat2([2, 4, 6, 8, 4, 10, 12, -4]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify quat2A", function() { expect(quat2A).toBeEqualishQuat2([1, 2, 3, 4, 2, 5, 6, -2]); }); + }); + + describe("when quat2A is the output dual quaternion", function() { + beforeEach(function() { result = quat2.scale(quat2A, quat2A, 2); }); + + it("should place values into quat2A", function() { expect(quat2A).toBeEqualishQuat2([2, 4, 6, 8, 4, 10, 12, -4]); }); + it("should return quat2A", function() { expect(result).toBe(quat2A); }); + }); + }); + + describe("length", function() { + it("should have an alias called 'len'", function() { expect(quat2.len).toEqual(quat2.length); }); + + beforeEach(function() { result = quat2.length(quat2A); }); + + it("should return the length", function() { expect(result).toBeEqualish(5.477225); }); + }); + + describe("squaredLength", function() { + it("should have an alias called 'sqrLen'", function() { expect(quat2.sqrLen).toEqual(quat2.squaredLength); }); + + beforeEach(function() { result = quat2.squaredLength(quat2A); }); + + it("should return the squared length", function() { expect(result).toEqual(30); }); + }); + + describe("fromRotation", function() { + beforeEach(function() { result = quat2.fromRotation(out, [1, 2, 3, 4]); }); + it("should place values into out", function() { expect(out).toBeEqualishQuat2([1, 2, 3, 4, 0, 0, 0, 0]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify the quaternion", function() { expect(quat2A).toBeEqualishQuat2([1, 2, 3, 4, 2, 5, 6, -2]); }); + }); + + describe("fromTranslation", function(){ + beforeEach(function() { vec = [1, 2, 3]; result = quat2.fromTranslation(out, vec); }); + it("should place values into out", function() { expect(out).toBeEqualishQuat2([0, 0, 0, 1, 0.5, 1, 1.5, 0]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify the vector", function() { expect(vec).toBeEqualish([1, 2, 3]); }); + }); + + describe("fromRotationTranslation", function() { + beforeEach(function() { + vec = [1, 2, 3]; + result = quat2.fromRotationTranslation(out, [1, 2, 3, 4], vec); + }); + it("should place values into out", function() { expect(out).toBeEqualishQuat2([1, 2, 3, 4, 2, 4, 6, -7]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify the quaternion", function() { expect(quat2.getReal(outQuat, quat2A)).toBeEqualish([1, 2, 3, 4]); }); + it("should not modify the vector", function() { expect(vec).toBeEqualish([1, 2, 3]); }); + it("should have a translation that can be retrieved with getTranslation", function() { + let t = [0, 0, 0]; + quat2.normalize(out, out); + quat2.getTranslation(t, out); + + expect(t).toBeEqualish([1, 2, 3]); + }); + }); + + describe("fromRotationTranslationValues", function() { + beforeEach(function() { result = quat2.fromRotationTranslationValues(1,2,3,4, 1,2,3); }); + it("should return the correct result", function() { expect(result).toBeEqualishQuat2([1, 2, 3, 4, 2, 4, 6, -7]); }); + it("should have a translation that can be retrieved with getTranslation", function() { + let t = [0, 0, 0]; + quat2.normalize(result, result); + quat2.getTranslation(t, result); + expect(t).toBeEqualish([1, 2, 3]); + }); + }); + + describe("getTranslation", function() { + describe("without a real part", function() { + beforeEach(function() { + quat2.fromTranslation(out, [1,2,3]); + resultVec = quat2.getTranslation(outVec, out); + }); + describe("not normalized", function() { + it("should return the same translation value", function() { expect(outVec).toBeEqualish([1, 2, 3]); }); + it("should return out", function() { expect(outVec).toBe(resultVec); }); + }); + describe("normalized", function() { + it("should return the same translation value", function() { + quat2.normalize(outVec, outVec); + expect(outVec).toBeEqualish([1, 2, 3]); + }); + }); + }); + describe("with a real part", function() { + beforeEach(function() { + quat2.fromRotationTranslation(out, [2, 4, 6, 2], [1, 2, 3]); + resultVec = quat2.getTranslation(outVec, out); + }); + describe("not normalized", function() { + it("should not return the same translation value", function() { expect(outVec).not.toBeEqualish([1, 2, 3]); }); + it("should return out", function() { expect(outVec).toBe(resultVec); }); + }); + describe("normalized", function() { + it("should return the same translation value", function() { + quat2.normalize(out, out); + quat2.getTranslation(outVec, out); + expect(outVec).toBeEqualish([1, 2, 3]); + }); + }); + }); + }); + + describe("normalize", function() { + describe("when it is normalizing quat2A", function() { + beforeEach(function() { + quat2A = [1, 2, 3, 4, 2, 5, 6, -2]; + quat2.normalize(out, quat2A); + }); + it("both parts should have been normalized", function() { expect(out).toBeEqualishQuat2([1/5.4772255, 2/5.4772255, 3/5.4772255, 4/5.4772255, 0.231260, 0.6450954, 0.693781,-0.9006993]); }); + }); + + beforeEach(function() { quat2A = [5, 0, 0, 0, 0, 0, 0, 0]; }); + + describe("with a separate output quaternion", function() { + beforeEach(function() { result = quat2.normalize(out, quat2A); }); + + it("should place values into out", function() { expect(out).toBeEqualishQuat2([1, 0, 0, 0, 0, 0, 0, 0]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify quat2A", function() { expect(quat2A).toBeEqualishQuat2([5, 0, 0, 0, 0, 0, 0, 0]); }); + }); + + describe("when quat2A is the output quaternion", function() { + beforeEach(function() { result = quat2.normalize(quat2A, quat2A); }); + + it("should place values into quat2A", function() { expect(quat2A).toBeEqualishQuat2([1, 0, 0, 0, 0, 0, 0, 0]); }); + it("should return quat2A", function() { expect(result).toBe(quat2A); }); + }); + + describe("when it contains a translation", function() { + beforeEach(function() { + quat2.set(out, 5, 0, 0, 0, 1, 2, 3, 5); + quat2.normalize(out, out); + }); + it("both parts should have been normalized", function() { expect(out).toBeEqualishQuat2([1, 0, 0, 0, 0, 0.4, 0.6, 1]); }); + }); + }); + + describe("lerp", function() { + describe("with a separate output quaternion", function() { + beforeEach(function() { result = quat2.lerp(out, quat2A, quat2B, 0.7); }); + + it("should place values into out", function() { expect(out).toBeEqualishQuat2([3.8, 4.8, 5.8, 6.8, 6.9, 7.1, 6.0, -3.4]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify quat2A", function() { expect(quat2A).toBeEqualishQuat2([1, 2, 3, 4, 2, 5, 6, -2]); }); + it("should not modify quat2B", function() { expect(quat2B).toBeEqualishQuat2([5, 6, 7, 8, 9, 8, 6, -4]); }); + }); + + describe("when quat2A is the output quaternion", function() { + beforeEach(function() { result = quat2.lerp(quat2A, quat2A, quat2B, 0.5); }); + + it("should place values into quat2A", function() { expect(quat2A).toBeEqualishQuat2([3, 4, 5, 6,5.5, 6.5, 6, -3]); }); + it("should return quat2A", function() { expect(result).toBe(quat2A); }); + it("should not modify quat2B", function() { expect(quat2B).toBeEqualishQuat2([5, 6, 7, 8, 9, 8, 6, -4]); }); + }); + + describe("when quat2B is the output quaternion", function() { + beforeEach(function() { result = quat2.lerp(quat2B, quat2A, quat2B, 0.5); }); + + it("should place values into quat2B", function() { expect(quat2B).toBeEqualishQuat2([3, 4, 5, 6,5.5, 6.5, 6, -3]); }); + it("should return quat2B", function() { expect(result).toBe(quat2B); }); + it("should not modify quat2A", function() { expect(quat2A).toBeEqualishQuat2([1, 2, 3, 4, 2, 5, 6, -2]); }); + }); + + describe("shortest path", function() { + beforeEach(function() { result = quat2.lerp(out, [1, 2, 3, -4, 2, 5, 6, -2], [5, -6, 7, 8, 9, 8, 6, -4], 0.4); }); + it("should pick the shorter path", function() { expect(out).toBeEqualishQuat2([ -1.4, 3.6, -1, -5.6, -2.4, -0.2, 1.2, 0.4 ]); }); + }); + }); + + describe("dot", function() { + describe("with a separate output dual quaternion", function() { + beforeEach(function() { result = quat2.dot(quat2A, quat2B); }); + it("should return the dot product", function() { expect(result).toBeEqualish(70); }); + it("should not modify quat2A", function() { expect(quat2A).toBeEqualishQuat2([1, 2, 3, 4, 2, 5, 6, -2]); }); + it("should not modify quat2B", function() { expect(quat2B).toBeEqualishQuat2([5, 6, 7, 8, 9, 8, 6, -4]); }); + }); + }); + + describe("invert", function() { + describe("with a separate output dual quaternion", function() { + beforeEach(function() { result = quat2.invert(out, quat2A); }); + + it("should place values into out", function() { expect(out).toBeEqualishQuat2([-0.0333333333, -0.06666666666, -0.1, 0.13333333333, -2/30, -5/30, -6/30, -2/30]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify quat2A", function() { expect(quat2A).toBeEqualishQuat2([1, 2, 3, 4, 2, 5, 6, -2]); }); + it("the real part should be equal to a inverted quaternion", function() { + quat.invert(outQuat, [1, 2, 3, 4]); + + expect(quat2.getReal(outQuat, out)).toBeEqualish(outQuat); + }); + }); + + describe("when quat2A is the output quaternion", function() { + beforeEach(function() { result = quat2.invert(quat2A, quat2A); }); + + it("should place values into quat2A", function() { expect(quat2A).toBeEqualish([-0.0333333333, -0.06666666666, -0.1, 0.13333333333, -2/30, -5/30, -6/30, -2/30]); }); + it("should return quat2A", function() { expect(result).toBe(quat2A); }); + + }); + }); + + describe("get real/dual", function() { + describe("get real", function() { + beforeEach(function() { result = quat2.getReal(outQuat, quat2A); }); + + it("should place values into out", function() { expect(outQuat).toBeEqualish([1, 2, 3, 4]); }); + it("should return out", function() { expect(result).toBe(outQuat); }); + it("should not modify quat2A", function() { expect(quat2A).toBeEqualishQuat2([1, 2, 3, 4, 2, 5, 6, -2]); }); + }); + + describe("get dual", function() { + beforeEach(function() { result = quat2.getDual(outQuat, quat2A); }); + + it("should place values into out", function() { expect(outQuat).toBeEqualish([2, 5, 6, -2]); }); + it("should return out", function() { expect(result).toBe(outQuat); }); + it("should not modify quat2A", function() { expect(quat2A).toBeEqualishQuat2([1, 2, 3, 4, 2, 5, 6, -2]); }); + }); + }); + + describe("set real/dual", function() { + describe("set real", function() { + beforeEach(function() { + outQuat = [4, 6, 8, -100]; + result = quat2.setReal(quat2A, outQuat); + }); + + it("should place values into out", function() { expect(quat2A).toBeEqualishQuat2([4, 6, 8, -100, 2, 5, 6, -2]); }); + it("should return out", function() { expect(result).toBe(quat2A); }); + it("should not modify outQuat", function() { expect(outQuat).toBeEqualish([4, 6, 8, -100]); }); + }); + + describe("set dual", function() { + beforeEach(function() { + outQuat = [4.3, 6, 8, -100]; + result = quat2.setDual(quat2A, outQuat); + }); + + it("should place values into out", function() { expect(quat2A).toBeEqualishQuat2([1, 2, 3, 4, 4.3, 6, 8, -100]); }); + it("should return out", function() { expect(result).toBe(quat2A); }); + it("should not modify outQuat", function() { expect(outQuat).toBeEqualish([4.3, 6, 8, -100]); }); + }); + }); + + describe("conjugate", function() { + describe("with a separate output dual quaternion", function() { + beforeEach(function() { result = quat2.conjugate(out, quat2A); }); + + it("should place values into out", function() { expect(out).toBeEqualishQuat2([-1, -2, -3, 4, -2, -5, -6, -2]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify quat2A", function() { expect(quat2A).toBeEqualishQuat2([1, 2, 3, 4, 2, 5, 6, -2]); }); + }); + + describe("when quat2A is the output dual quaternion", function() { + beforeEach(function() { result = quat2.conjugate(quat2A, quat2A); }); + + it("should place values into quat2A", function() { expect(quat2A).toBeEqualishQuat2([-1, -2, -3, 4, -2, -5, -6, -2]); }); + it("should return quat2A", function() { expect(result).toBe(quat2A); }); + }); + }); + + describe("str", function() { + beforeEach(function() { result = quat2.str(quat2A); }); + + it("should return a string representation of the quaternion", function() { expect(result).toEqual("quat2(1, 2, 3, 4, 2, 5, 6, -2)"); }); + }); + + describe("exactEquals", function() { + let quat2C, r0, r1; + beforeEach(function() { + quat2A = [0, 1, 2, 3, 4, 5, 6, 7]; + quat2B = [0, 1, 2, 3, 4, 5, 6, 7]; + quat2C = [1, 2, 3, 4, 5, 6, 7, 8]; + r0 = quat2.exactEquals(quat2A, quat2B); + r1 = quat2.exactEquals(quat2A, quat2C); + }); + + it("should return true for identical quaternions", function() { expect(r0).toBe(true); }); + it("should return false for different quaternions", function() { expect(r1).toBe(false); }); + it("should not modify quat2A", function() { expect(quat2A).toBeEqualishQuat2([0, 1, 2, 3, 4, 5, 6, 7]); }); + it("should not modify quat2B", function() { expect(quat2B).toBeEqualishQuat2([0, 1, 2, 3, 4, 5, 6, 7]); }); + }); + + describe("equals", function() { + let quat2C, quat2D, r0, r1, r2; + beforeEach(function() { + quat2A = [0, 1, 2, 3, 4, 5, 6, 7]; + quat2B = [0, 1, 2, 3, 4, 5, 6, 7]; + quat2C = [1, 2, 3, 4, 5, 6, 7, 8]; + quat2D = [1e-16, 1, 2, 3, 4, 5, 6, 7]; + r0 = quat2.equals(quat2A, quat2B); + r1 = quat2.equals(quat2A, quat2C); + r2 = quat2.equals(quat2A, quat2D); + }); + it("should return true for identical dual quaternions", function() { expect(r0).toBe(true); }); + it("should return false for different dual quaternions", function() { expect(r1).toBe(false); }); + it("should return true for close but not identical quaternions", function() { expect(r2).toBe(true); }); + it("should not modify quat2A", function() { expect(quat2A).toBeEqualishQuat2([0, 1, 2, 3, 4, 5, 6, 7]); }); + it("should not modify quat2B", function() { expect(quat2B).toBeEqualishQuat2([0, 1, 2, 3, 4, 5, 6, 7]); }); + }); + +}); diff --git a/assembly/__tests__/vec2.spec.ts b/assembly/__tests__/vec2.spec.ts new file mode 100644 index 00000000..72a1780c --- /dev/null +++ b/assembly/__tests__/vec2.spec.ts @@ -0,0 +1,651 @@ +import * as vec2 from "../vec2" + +describe("vec2", function() { + let out, vecA, vecB, result; + + beforeEach(function() { vecA = [1, 2]; vecB = [3, 4]; out = [0, 0]; }); + + describe("create", function() { + beforeEach(function() { result = vec2.create(); }); + it("should return a 2 element array initialized to 0s", function() { expect(result).toBeEqualish([0, 0]); }); + }); + + describe("clone", function() { + beforeEach(function() { result = vec2.clone(vecA); }); + it("should return a 2 element array initialized to the values in vecA", function() { expect(result).toBeEqualish(vecA); }); + }); + + describe("fromValues", function() { + beforeEach(function() { result = vec2.fromValues(1, 2); }); + it("should return a 2 element array initialized to the values passed", function() { expect(result).toBeEqualish([1, 2]); }); + }); + + describe("copy", function() { + beforeEach(function() { result = vec2.copy(out, vecA); }); + it("should place values into out", function() { expect(out).toBeEqualish([1, 2]); }); + it("should return out", function() { expect(result).toBe(out); }); + }); + + describe("set", function() { + beforeEach(function() { result = vec2.set(out, 1, 2); }); + it("should place values into out", function() { expect(out).toBeEqualish([1, 2]); }); + it("should return out", function() { expect(result).toBe(out); }); + }); + + describe("add", function() { + describe("with a separate output vector", function() { + beforeEach(function() { result = vec2.add(out, vecA, vecB); }); + + it("should place values into out", function() { expect(out).toBeEqualish([4, 6]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2]); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([3, 4]); }); + }); + + describe("when vecA is the output vector", function() { + beforeEach(function() { result = vec2.add(vecA, vecA, vecB); }); + + it("should place values into vecA", function() { expect(vecA).toBeEqualish([4, 6]); }); + it("should return vecA", function() { expect(result).toBe(vecA); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([3, 4]); }); + }); + + describe("when vecB is the output vector", function() { + beforeEach(function() { result = vec2.add(vecB, vecA, vecB); }); + + it("should place values into vecB", function() { expect(vecB).toBeEqualish([4, 6]); }); + it("should return vecB", function() { expect(result).toBe(vecB); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2]); }); + }); + }); + + describe("subtract", function() { + it("should have an alias called 'sub'", function() { expect(vec2.sub).toEqual(vec2.subtract); }); + + describe("with a separate output vector", function() { + beforeEach(function() { result = vec2.subtract(out, vecA, vecB); }); + + it("should place values into out", function() { expect(out).toBeEqualish([-2, -2]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2]); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([3, 4]); }); + }); + + describe("when vecA is the output vector", function() { + beforeEach(function() { result = vec2.subtract(vecA, vecA, vecB); }); + + it("should place values into vecA", function() { expect(vecA).toBeEqualish([-2, -2]); }); + it("should return vecA", function() { expect(result).toBe(vecA); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([3, 4]); }); + }); + + describe("when vecB is the output vector", function() { + beforeEach(function() { result = vec2.subtract(vecB, vecA, vecB); }); + + it("should place values into vecB", function() { expect(vecB).toBeEqualish([-2, -2]); }); + it("should return vecB", function() { expect(result).toBe(vecB); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2]); }); + }); + }); + + describe("multiply", function() { + it("should have an alias called 'mul'", function() { expect(vec2.mul).toEqual(vec2.multiply); }); + + describe("with a separate output vector", function() { + beforeEach(function() { result = vec2.multiply(out, vecA, vecB); }); + + it("should place values into out", function() { expect(out).toBeEqualish([3, 8]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2]); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([3, 4]); }); + }); + + describe("when vecA is the output vector", function() { + beforeEach(function() { result = vec2.multiply(vecA, vecA, vecB); }); + + it("should place values into vecA", function() { expect(vecA).toBeEqualish([3, 8]); }); + it("should return vecA", function() { expect(result).toBe(vecA); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([3, 4]); }); + }); + + describe("when vecB is the output vector", function() { + beforeEach(function() { result = vec2.multiply(vecB, vecA, vecB); }); + + it("should place values into vecB", function() { expect(vecB).toBeEqualish([3, 8]); }); + it("should return vecB", function() { expect(result).toBe(vecB); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2]); }); + }); + }); + + describe("divide", function() { + it("should have an alias called 'div'", function() { expect(vec2.div).toEqual(vec2.divide); }); + + describe("with a separate output vector", function() { + beforeEach(function() { result = vec2.divide(out, vecA, vecB); }); + + it("should place values into out", function() { expect(out).toBeEqualish([0.3333333, 0.5]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2]); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([3, 4]); }); + }); + + describe("when vecA is the output vector", function() { + beforeEach(function() { result = vec2.divide(vecA, vecA, vecB); }); + + it("should place values into vecA", function() { expect(vecA).toBeEqualish([0.3333333, 0.5]); }); + it("should return vecA", function() { expect(result).toBe(vecA); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([3, 4]); }); + }); + + describe("when vecB is the output vector", function() { + beforeEach(function() { result = vec2.divide(vecB, vecA, vecB); }); + + it("should place values into vecB", function() { expect(vecB).toBeEqualish([0.3333333, 0.5]); }); + it("should return vecB", function() { expect(result).toBe(vecB); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2]); }); + }); + }); + + describe("ceil", function() { + beforeEach(function() { vecA = [Math.E, Math.PI]; }); + + describe("with a separate output vector", function() { + beforeEach(function() { result = vec2.ceil(out, vecA); }); + + it("should place values into out", function() { expect(out).toBeEqualish([3, 4]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([Math.E, Math.PI]); }); + }); + + describe("when vecA is the output vector", function() { + beforeEach(function() { result = vec2.ceil(vecA, vecA); }); + + it("should place values into vecA", function() { expect(vecA).toBeEqualish([3, 4]); }); + it("should return vecA", function() { expect(result).toBe(vecA); }); + }); + }); + + describe("floor", function() { + beforeEach(function() { vecA = [Math.E, Math.PI]; }); + + describe("with a separate output vector", function() { + beforeEach(function() { result = vec2.floor(out, vecA); }); + + it("should place values into out", function() { expect(out).toBeEqualish([2, 3]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([Math.E, Math.PI]); }); + }); + + describe("when vecA is the output vector", function() { + beforeEach(function() { result = vec2.floor(vecA, vecA); }); + + it("should place values into vecA", function() { expect(vecA).toBeEqualish([2, 3]); }); + it("should return vecA", function() { expect(result).toBe(vecA); }); + }); + }); + + describe("min", function() { + beforeEach(function() { vecA = [1, 4]; vecB = [3, 2]; }); + + describe("with a separate output vector", function() { + beforeEach(function() { result = vec2.min(out, vecA, vecB); }); + + it("should place values into out", function() { expect(out).toBeEqualish([1, 2]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 4]); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([3, 2]); }); + }); + + describe("when vecA is the output vector", function() { + beforeEach(function() { result = vec2.min(vecA, vecA, vecB); }); + + it("should place values into vecA", function() { expect(vecA).toBeEqualish([1, 2]); }); + it("should return vecA", function() { expect(result).toBe(vecA); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([3, 2]); }); + }); + + describe("when vecB is the output vector", function() { + beforeEach(function() { result = vec2.min(vecB, vecA, vecB); }); + + it("should place values into vecB", function() { expect(vecB).toBeEqualish([1, 2]); }); + it("should return vecB", function() { expect(result).toBe(vecB); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 4]); }); + }); + }); + + describe("max", function() { + beforeEach(function() { vecA = [1, 4]; vecB = [3, 2]; }); + + describe("with a separate output vector", function() { + beforeEach(function() { result = vec2.max(out, vecA, vecB); }); + + it("should place values into out", function() { expect(out).toBeEqualish([3, 4]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 4]); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([3, 2]); }); + }); + + describe("when vecA is the output vector", function() { + beforeEach(function() { result = vec2.max(vecA, vecA, vecB); }); + + it("should place values into vecA", function() { expect(vecA).toBeEqualish([3, 4]); }); + it("should return vecA", function() { expect(result).toBe(vecA); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([3, 2]); }); + }); + + describe("when vecB is the output vector", function() { + beforeEach(function() { result = vec2.max(vecB, vecA, vecB); }); + + it("should place values into vecB", function() { expect(vecB).toBeEqualish([3, 4]); }); + it("should return vecB", function() { expect(result).toBe(vecB); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 4]); }); + }); + }); + + describe("round", function() { + beforeEach(function() { vecA = [Math.E, Math.PI]; }); + + describe("with a separate output vector", function() { + beforeEach(function() { result = vec2.round(out, vecA); }); + + it("should place values into out", function() { expect(out).toBeEqualish([3, 3]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([Math.E, Math.PI]); }); + }); + + describe("when vecA is the output vector", function() { + beforeEach(function() { result = vec2.round(vecA, vecA); }); + + it("should place values into vecA", function() { expect(vecA).toBeEqualish([3, 3]); }); + it("should return vecA", function() { expect(result).toBe(vecA); }); + }); + }); + + describe("scale", function() { + describe("with a separate output vector", function() { + beforeEach(function() { result = vec2.scale(out, vecA, 2); }); + + it("should place values into out", function() { expect(out).toBeEqualish([2, 4]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2]); }); + }); + + describe("when vecA is the output vector", function() { + beforeEach(function() { result = vec2.scale(vecA, vecA, 2); }); + + it("should place values into vecA", function() { expect(vecA).toBeEqualish([2, 4]); }); + it("should return vecA", function() { expect(result).toBe(vecA); }); + }); + }); + + describe("scaleAndAdd", function() { + describe("with a separate output vector", function() { + beforeEach(function() { result = vec2.scaleAndAdd(out, vecA, vecB, 0.5); }); + + it("should place values into out", function() { expect(out).toBeEqualish([2.5, 4]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2]); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([3, 4]); }); + }); + + describe("when vecA is the output vector", function() { + beforeEach(function() { result = vec2.scaleAndAdd(vecA, vecA, vecB, 0.5); }); + + it("should place values into vecA", function() { expect(vecA).toBeEqualish([2.5, 4]); }); + it("should return vecA", function() { expect(result).toBe(vecA); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([3, 4]); }); + }); + + describe("when vecB is the output vector", function() { + beforeEach(function() { result = vec2.scaleAndAdd(vecB, vecA, vecB, 0.5); }); + + it("should place values into vecB", function() { expect(vecB).toBeEqualish([2.5, 4]); }); + it("should return vecB", function() { expect(result).toBe(vecB); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2]); }); + }); + }); + + describe("distance", function() { + it("should have an alias called 'dist'", function() { expect(vec2.dist).toEqual(vec2.distance); }); + + beforeEach(function() { result = vec2.distance(vecA, vecB); }); + + it("should return the distance", function() { expect(result).toBeEqualish(2.828427); }); + }); + + describe("squaredDistance", function() { + it("should have an alias called 'sqrDist'", function() { expect(vec2.sqrDist).toEqual(vec2.squaredDistance); }); + + beforeEach(function() { result = vec2.squaredDistance(vecA, vecB); }); + + it("should return the squared distance", function() { expect(result).toEqual(8); }); + }); + + describe("length", function() { + it("should have an alias called 'len'", function() { expect(vec2.len).toEqual(vec2.length); }); + + beforeEach(function() { result = vec2.len(vecA); }); + + it("should return the length", function() { expect(result).toBeEqualish(2.236067); }); + }); + + describe("squaredLength", function() { + it("should have an alias called 'sqrLen'", function() { expect(vec2.sqrLen).toEqual(vec2.squaredLength); }); + + beforeEach(function() { result = vec2.squaredLength(vecA); }); + + it("should return the squared length", function() { expect(result).toEqual(5); }); + }); + + describe("negate", function() { + describe("with a separate output vector", function() { + beforeEach(function() { result = vec2.negate(out, vecA); }); + + it("should place values into out", function() { expect(out).toBeEqualish([-1, -2]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2]); }); + }); + + describe("when vecA is the output vector", function() { + beforeEach(function() { result = vec2.negate(vecA, vecA); }); + + it("should place values into vecA", function() { expect(vecA).toBeEqualish([-1, -2]); }); + it("should return vecA", function() { expect(result).toBe(vecA); }); + }); + }); + + describe("normalize", function() { + beforeEach(function() { vecA = [5, 0]; }); + + describe("with a separate output vector", function() { + beforeEach(function() { result = vec2.normalize(out, vecA); }); + + it("should place values into out", function() { expect(out).toBeEqualish([1, 0]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([5, 0]); }); + }); + + describe("when vecA is the output vector", function() { + beforeEach(function() { result = vec2.normalize(vecA, vecA); }); + + it("should place values into vecA", function() { expect(vecA).toBeEqualish([1, 0]); }); + it("should return vecA", function() { expect(result).toBe(vecA); }); + }); + }); + + describe("dot", function() { + beforeEach(function() { result = vec2.dot(vecA, vecB); }); + + it("should return the dot product", function() { expect(result).toEqual(11); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2]); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([3, 4]); }); + }); + + describe("cross", function() { + let out3; + + beforeEach(function() { + out3 = [0, 0, 0]; + result = vec2.cross(out3, vecA, vecB); + }); + + it("should place values into out", function() { expect(out3).toBeEqualish([0, 0, -2]); }); + it("should return out", function() { expect(result).toBe(out3); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2]); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([3, 4]); }); + }); + + describe("lerp", function() { + describe("with a separate output vector", function() { + beforeEach(function() { result = vec2.lerp(out, vecA, vecB, 0.5); }); + + it("should place values into out", function() { expect(out).toBeEqualish([2, 3]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2]); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([3, 4]); }); + }); + + describe("when vecA is the output vector", function() { + beforeEach(function() { result = vec2.lerp(vecA, vecA, vecB, 0.5); }); + + it("should place values into vecA", function() { expect(vecA).toBeEqualish([2, 3]); }); + it("should return vecA", function() { expect(result).toBe(vecA); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([3, 4]); }); + }); + + describe("when vecB is the output vector", function() { + beforeEach(function() { result = vec2.lerp(vecB, vecA, vecB, 0.5); }); + + it("should place values into vecB", function() { expect(vecB).toBeEqualish([2, 3]); }); + it("should return vecB", function() { expect(result).toBe(vecB); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2]); }); + }); + }); + + describe("random", function() { + describe("with no scale", function() { + beforeEach(function() { result = vec2.random(out); }); + + it("should result in a unit length vector", function() { expect(vec2.len(out)).toBeEqualish(1.0); }); + it("should return out", function() { expect(result).toBe(out); }); + }); + + describe("with a scale", function() { + beforeEach(function() { result = vec2.random(out, 5.0); }); + + it("should result in a unit length vector", function() { expect(vec2.len(out)).toBeEqualish(5.0); }); + it("should return out", function() { expect(result).toBe(out); }); + }); + }); + + describe("transformMat2", function() { + let matA; + beforeEach(function() { matA = [1, 2, 3, 4]; }); + + describe("with a separate output vector", function() { + beforeEach(function() { result = vec2.transformMat2(out, vecA, matA); }); + + it("should place values into out", function() { expect(out).toBeEqualish([7, 10]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2]); }); + it("should not modify matA", function() { expect(matA).toBeEqualish([1, 2, 3, 4]); }); + }); + + describe("when vecA is the output vector", function() { + beforeEach(function() { result = vec2.transformMat2(vecA, vecA, matA); }); + + it("should place values into vecA", function() { expect(vecA).toBeEqualish([7, 10]); }); + it("should return vecA", function() { expect(result).toBe(vecA); }); + it("should not modify matA", function() { expect(matA).toBeEqualish([1, 2, 3, 4]); }); + }); + }); + + describe("transformMat2d", function() { + let matA; + beforeEach(function() { matA = [1, 2, 3, 4, 5, 6]; }); + + describe("with a separate output vector", function() { + beforeEach(function() { result = vec2.transformMat2d(out, vecA, matA); }); + + it("should place values into out", function() { expect(out).toBeEqualish([12, 16]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2]); }); + it("should not modify matA", function() { expect(matA).toBeEqualish([1, 2, 3, 4, 5, 6]); }); + }); + + describe("when vecA is the output vector", function() { + beforeEach(function() { result = vec2.transformMat2d(vecA, vecA, matA); }); + + it("should place values into vecA", function() { expect(vecA).toBeEqualish([12, 16]); }); + it("should return vecA", function() { expect(result).toBe(vecA); }); + it("should not modify matA", function() { expect(matA).toBeEqualish([1, 2, 3, 4, 5, 6]); }); + }); + }); + + describe("forEach", function() { + let vecArray; + + beforeEach(function() { + vecArray = [ + 1, 2, + 3, 4, + 0, 0 + ]; + }); + + describe("when performing operations that take no extra arguments", function() { + beforeEach(function() { result = vec2.forEach(vecArray, 0, 0, 0, vec2.normalize); }); + + it("should update all values", function() { + expect(vecArray).toBeEqualish([ + 0.447214, 0.894427, + 0.6, 0.8, + 0, 0 + ]); + }); + it("should return vecArray", function() { expect(result).toBe(vecArray); }); + }); + + describe("when performing operations that takes one extra arguments", function() { + beforeEach(function() { result = vec2.forEach(vecArray, 0, 0, 0, vec2.add, vecA); }); + + it("should update all values", function() { + expect(vecArray).toBeEqualish([ + 2, 4, + 4, 6, + 1, 2 + ]); + }); + it("should return vecArray", function() { expect(result).toBe(vecArray); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2]); }); + }); + + describe("when specifying an offset", function() { + beforeEach(function() { result = vec2.forEach(vecArray, 0, 2, 0, vec2.add, vecA); }); + + it("should update all values except the first vector", function() { + expect(vecArray).toBeEqualish([ + 1, 2, + 4, 6, + 1, 2 + ]); + }); + it("should return vecArray", function() { expect(result).toBe(vecArray); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2]); }); + }); + + describe("when specifying a count", function() { + beforeEach(function() { result = vec2.forEach(vecArray, 0, 0, 2, vec2.add, vecA); }); + + it("should update all values except the last vector", function() { + expect(vecArray).toBeEqualish([ + 2, 4, + 4, 6, + 0, 0 + ]); + }); + it("should return vecArray", function() { expect(result).toBe(vecArray); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2]); }); + }); + + describe("when specifying a stride", function() { + beforeEach(function() { result = vec2.forEach(vecArray, 4, 0, 0, vec2.add, vecA); }); + + it("should update all values except the second vector", function() { + expect(vecArray).toBeEqualish([ + 2, 4, + 3, 4, + 1, 2 + ]); + }); + it("should return vecArray", function() { expect(result).toBe(vecArray); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2]); }); + }); + + describe("when calling a function that does not modify the out variable", function() { + beforeEach(function() { + result = vec2.forEach(vecArray, 0, 0, 0, function(out, vec) {}); + }); + + it("values should remain unchanged", function() { + expect(vecArray).toBeEqualish([ + 1, 2, + 3, 4, + 0, 0, + ]); + }); + it("should return vecArray", function() { expect(result).toBe(vecArray); }); + }); + }); + + describe('rotate', function(){ + describe('rotation around world origin [0, 0, 0]', function(){ + beforeEach(function(){ vecA = [0, 1]; vecB = [0, 0]; result = vec2.rotate(out, vecA, vecB, Math.PI); }); + it("should return the rotated vector", function(){ expect(result).toBeEqualish([0, -1]); }); + }); + describe('rotation around an arbitrary origin', function(){ + beforeEach(function(){ vecA = [6, -5]; vecB = [0, -5]; result = vec2.rotate(out, vecA, vecB, Math.PI); }); + it("should return the rotated vector", function(){ expect(result).toBeEqualish([-6, -5]); }); + }); + }); + + describe("angle", function() { + beforeEach(function() { + vecA = [1,0]; + vecB = [1,2]; + result = vec2.angle(vecA, vecB); + }); + + it("should return the angle", function() { expect(result).toBeEqualish(1.10714); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 0]); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([1, 2]); }); + }); + + describe("str", function() { + beforeEach(function() { result = vec2.str(vecA); }); + + it("should return a string representation of the vector", function() { expect(result).toEqual("vec2(1, 2)"); }); + }); + + describe("exactEquals", function() { + let vecC, r0, r1; + beforeEach(function() { + vecA = [0, 1]; + vecB = [0, 1]; + vecC = [1, 2]; + r0 = vec2.exactEquals(vecA, vecB); + r1 = vec2.exactEquals(vecA, vecC); + }); + + it("should return true for identical vectors", function() { expect(r0).toBe(true); }); + it("should return false for different vectors", function() { expect(r1).toBe(false); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([0, 1]); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([0, 1]); }); + }); + + describe("equals", function() { + let vecC, vecD, r0, r1, r2; + beforeEach(function() { + vecA = [0, 1]; + vecB = [0, 1]; + vecC = [1, 2]; + vecD = [1e-16, 1]; + r0 = vec2.equals(vecA, vecB); + r1 = vec2.equals(vecA, vecC); + r2 = vec2.equals(vecA, vecD); + }); + it("should return true for identical vectors", function() { expect(r0).toBe(true); }); + it("should return false for different vectors", function() { expect(r1).toBe(false); }); + it("should return true for close but not identical vectors", function() { expect(r2).toBe(true); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([0, 1]); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([0, 1]); }); + }); + + describe("zero", function() { + beforeEach(function() { + vecA = [1, 2]; + result = vec2.zero(vecA); + }); + it("should result in a 2 element vector with zeros", function() { expect(result).toBeEqualish([0, 0]); }); + }); +}); diff --git a/assembly/__tests__/vec3.spec.ts b/assembly/__tests__/vec3.spec.ts new file mode 100644 index 00000000..a9be0efb --- /dev/null +++ b/assembly/__tests__/vec3.spec.ts @@ -0,0 +1,761 @@ +import * as mat3 from "../mat3" +import * as mat4 from "../mat4" +import * as vec3 from "../vec3" + +describe("vec3", function() { + let out, vecA, vecB, result; + + beforeEach(function() { vecA = [1, 2, 3]; vecB = [4, 5, 6]; out = [0, 0, 0]; }); + + describe('rotateX', function(){ + describe('rotation around world origin [0, 0, 0]', function(){ + beforeEach(function(){ vecA = [0, 1, 0]; vecB = [0, 0, 0]; result = vec3.rotateX(out, vecA, vecB, Math.PI); }); + it("should return the rotated vector", function(){ expect(result).toBeEqualish([0, -1, 0]); }); + }); + describe('rotation around an arbitrary origin', function(){ + beforeEach(function(){ vecA = [2, 7, 0]; vecB = [2, 5, 0]; result = vec3.rotateX(out, vecA, vecB, Math.PI); }); + it("should return the rotated vector", function(){ expect(result).toBeEqualish([2, 3, 0]); }); + }); + }); + + describe('rotateY', function(){ + describe('rotation around world origin [0, 0, 0]', function(){ + beforeEach(function(){ vecA = [1, 0, 0]; vecB = [0, 0, 0]; result = vec3.rotateY(out, vecA, vecB, Math.PI); }); + it("should return the rotated vector", function(){ expect(result).toBeEqualish([-1, 0, 0]); }); + }); + describe('rotation around an arbitrary origin', function(){ + beforeEach(function(){ vecA = [-2, 3, 10]; vecB = [-4, 3, 10]; result = vec3.rotateY(out, vecA, vecB, Math.PI); }); + it("should return the rotated vector", function(){ expect(result).toBeEqualish([-6, 3, 10]); }); + }); + }); + + describe('rotateZ', function(){ + describe('rotation around world origin [0, 0, 0]', function(){ + beforeEach(function(){ vecA = [0, 1, 0]; vecB = [0, 0, 0]; result = vec3.rotateZ(out, vecA, vecB, Math.PI); }); + it("should return the rotated vector", function(){ expect(result).toBeEqualish([0, -1, 0]); }); + }); + describe('rotation around an arbitrary origin', function(){ + beforeEach(function(){ vecA = [0, 6, -5]; vecB = [0, 0, -5]; result = vec3.rotateZ(out, vecA, vecB, Math.PI); }); + it("should return the rotated vector", function(){ expect(result).toBeEqualish([0, -6, -5]); }); + }); + }); + + describe('transformMat4', function() { + let matr; + describe("with an identity", function() { + beforeEach(function() { matr = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 ] }); + + beforeEach(function() { result = vec3.transformMat4(out, vecA, matr); }); + + it("should produce the input", function() { + expect(out).toBeEqualish([1, 2, 3]); + }); + + it("should return out", function() { expect(result).toBe(out); }); + }); + + describe("with a lookAt", function() { + beforeEach(function() { matr = mat4.lookAt(mat4.create(), [5, 6, 7], [2, 6, 7], [0, 1, 0]); }); + + beforeEach(function() { result = vec3.transformMat4(out, vecA, matr); }); + + it("should rotate and translate the input", function() { + expect(out).toBeEqualish([ 4, -4, -4 ]); + }); + + it("should return out", function() { expect(result).toBe(out); }); + }); + + describe("with a perspective matrix (#92)", function() { + it("should transform a point from perspective(pi/2, 4/3, 1, 100)", function() { + matr = [0.750, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, -1.02, -1, + 0, 0, -2.02, 0]; + result = vec3.transformMat4([], [10, 20, 30], matr); + expect(result).toBeEqualish([-0.25, -0.666666, 1.087333]); + }); + }); + + }); + + describe('transformMat3', function() { + let matr; + describe("with an identity", function() { + beforeEach(function() { matr = [1, 0, 0, 0, 1, 0, 0, 0, 1 ] }); + + beforeEach(function() { result = vec3.transformMat3(out, vecA, matr); }); + + it("should produce the input", function() { + expect(out).toBeEqualish([1, 2, 3]); + }); + + it("should return out", function() { expect(result).toBe(out); }); + }); + + describe("with 90deg about X", function() { + beforeEach(function() { + result = vec3.transformMat3(out, [0,1,0], [1,0,0,0,0,1,0,-1,0]); + }); + + it("should produce correct output", function() { + expect(out).toBeEqualish([0,0,1]); + }); + }); + + describe("with 90deg about Y", function() { + beforeEach(function() { + result = vec3.transformMat3(out, [1,0,0], [0,0,-1,0,1,0,1,0,0]); + }); + + it("should produce correct output", function() { + expect(out).toBeEqualish([0,0,-1]); + }); + }); + + describe("with 90deg about Z", function() { + beforeEach(function() { + result = vec3.transformMat3(out, [1,0,0], [0,1,0,-1,0,0,0,0,1]); + }); + + it("should produce correct output", function() { + expect(out).toBeEqualish([0,1,0]); + }); + }); + + describe("with a lookAt normal matrix", function() { + beforeEach(function() { + matr = mat4.lookAt(mat4.create(), [5, 6, 7], [2, 6, 7], [0, 1, 0]); + let n = mat3.create(); + matr = mat3.transpose(n, mat3.invert(n, mat3.fromMat4(n, matr))); + }); + + beforeEach(function() { result = vec3.transformMat3(out, [1,0,0], matr); }); + + it("should rotate the input", function() { + expect(out).toBeEqualish([ 0,0,1 ]); + }); + + it("should return out", function() { expect(result).toBe(out); }); + }); + }); + + describe("transformQuat", function() { + beforeEach(function() { result = vec3.transformQuat(out, vecA, [0.18257418567011074, 0.3651483713402215, 0.5477225570103322, 0.730296742680443]); }); + it("should rotate the input vector", function() { expect(out).toBeEqualish([1, 2, 3]); }); + it("should return out", function() { expect(result).not.toBe([1,2,3,4]); }); + }); + + describe("create", function() { + beforeEach(function() { result = vec3.create(); }); + it("should return a 3 element array initialized to 0s", function() { expect(result).toBeEqualish([0, 0, 0]); }); + }); + + describe("clone", function() { + beforeEach(function() { result = vec3.clone(vecA); }); + it("should return a 3 element array initialized to the values in vecA", function() { expect(result).toBeEqualish(vecA); }); + }); + + describe("fromValues", function() { + beforeEach(function() { result = vec3.fromValues(1, 2, 3); }); + it("should return a 3 element array initialized to the values passed", function() { expect(result).toBeEqualish([1, 2, 3]); }); + }); + + describe("copy", function() { + beforeEach(function() { result = vec3.copy(out, vecA); }); + it("should place values into out", function() { expect(out).toBeEqualish([1, 2, 3]); }); + it("should return out", function() { expect(result).toBe(out); }); + }); + + describe("set", function() { + beforeEach(function() { result = vec3.set(out, 1, 2, 3); }); + it("should place values into out", function() { expect(out).toBeEqualish([1, 2, 3]); }); + it("should return out", function() { expect(result).toBe(out); }); + }); + + describe("add", function() { + describe("with a separate output vector", function() { + beforeEach(function() { result = vec3.add(out, vecA, vecB); }); + + it("should place values into out", function() { expect(out).toBeEqualish([5, 7, 9]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3]); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([4, 5, 6]); }); + }); + + describe("when vecA is the output vector", function() { + beforeEach(function() { result = vec3.add(vecA, vecA, vecB); }); + + it("should place values into vecA", function() { expect(vecA).toBeEqualish([5, 7, 9]); }); + it("should return vecA", function() { expect(result).toBe(vecA); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([4, 5, 6]); }); + }); + + describe("when vecB is the output vector", function() { + beforeEach(function() { result = vec3.add(vecB, vecA, vecB); }); + + it("should place values into vecB", function() { expect(vecB).toBeEqualish([5, 7, 9]); }); + it("should return vecB", function() { expect(result).toBe(vecB); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3]); }); + }); + }); + + describe("subtract", function() { + it("should have an alias called 'sub'", function() { expect(vec3.sub).toEqual(vec3.subtract); }); + + describe("with a separate output vector", function() { + beforeEach(function() { result = vec3.subtract(out, vecA, vecB); }); + + it("should place values into out", function() { expect(out).toBeEqualish([-3, -3, -3]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3]); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([4, 5, 6]); }); + }); + + describe("when vecA is the output vector", function() { + beforeEach(function() { result = vec3.subtract(vecA, vecA, vecB); }); + + it("should place values into vecA", function() { expect(vecA).toBeEqualish([-3, -3, -3]); }); + it("should return vecA", function() { expect(result).toBe(vecA); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([4, 5, 6]); }); + }); + + describe("when vecB is the output vector", function() { + beforeEach(function() { result = vec3.subtract(vecB, vecA, vecB); }); + + it("should place values into vecB", function() { expect(vecB).toBeEqualish([-3, -3, -3]); }); + it("should return vecB", function() { expect(result).toBe(vecB); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3]); }); + }); + }); + + describe("multiply", function() { + it("should have an alias called 'mul'", function() { expect(vec3.mul).toEqual(vec3.multiply); }); + + describe("with a separate output vector", function() { + beforeEach(function() { result = vec3.multiply(out, vecA, vecB); }); + + it("should place values into out", function() { expect(out).toBeEqualish([4, 10, 18]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3]); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([4, 5, 6]); }); + }); + + describe("when vecA is the output vector", function() { + beforeEach(function() { result = vec3.multiply(vecA, vecA, vecB); }); + + it("should place values into vecA", function() { expect(vecA).toBeEqualish([4, 10, 18]); }); + it("should return vecA", function() { expect(result).toBe(vecA); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([4, 5, 6]); }); + }); + + describe("when vecB is the output vector", function() { + beforeEach(function() { result = vec3.multiply(vecB, vecA, vecB); }); + + it("should place values into vecB", function() { expect(vecB).toBeEqualish([4, 10, 18]); }); + it("should return vecB", function() { expect(result).toBe(vecB); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3]); }); + }); + }); + + describe("divide", function() { + it("should have an alias called 'div'", function() { expect(vec3.div).toEqual(vec3.divide); }); + + describe("with a separate output vector", function() { + beforeEach(function() { result = vec3.divide(out, vecA, vecB); }); + + it("should place values into out", function() { expect(out).toBeEqualish([0.25, 0.4, 0.5]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3]); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([4, 5, 6]); }); + }); + + describe("when vecA is the output vector", function() { + beforeEach(function() { result = vec3.divide(vecA, vecA, vecB); }); + + it("should place values into vecA", function() { expect(vecA).toBeEqualish([0.25, 0.4, 0.5]); }); + it("should return vecA", function() { expect(result).toBe(vecA); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([4, 5, 6]); }); + }); + + describe("when vecB is the output vector", function() { + beforeEach(function() { result = vec3.divide(vecB, vecA, vecB); }); + + it("should place values into vecB", function() { expect(vecB).toBeEqualish([0.25, 0.4, 0.5]); }); + it("should return vecB", function() { expect(result).toBe(vecB); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3]); }); + }); + }); + + describe("ceil", function() { + beforeEach(function() { vecA = [Math.E, Math.PI, Math.SQRT2]; }); + + describe("with a separate output vector", function() { + beforeEach(function() { result = vec3.ceil(out, vecA); }); + + it("should place values into out", function() { expect(out).toBeEqualish([3, 4, 2]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([Math.E, Math.PI, Math.SQRT2]); }); + }); + + describe("when vecA is the output vector", function() { + beforeEach(function() { result = vec3.ceil(vecA, vecA); }); + + it("should place values into vecA", function() { expect(vecA).toBeEqualish([3, 4, 2]); }); + it("should return vecA", function() { expect(result).toBe(vecA); }); + }); + }); + + describe("floor", function() { + beforeEach(function() { vecA = [Math.E, Math.PI, Math.SQRT2]; }); + + describe("with a separate output vector", function() { + beforeEach(function() { result = vec3.floor(out, vecA); }); + + it("should place values into out", function() { expect(out).toBeEqualish([2, 3, 1]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([Math.E, Math.PI, Math.SQRT2]); }); + }); + + describe("when vecA is the output vector", function() { + beforeEach(function() { result = vec3.floor(vecA, vecA); }); + + it("should place values into vecA", function() { expect(vecA).toBeEqualish([2, 3, 1]); }); + it("should return vecA", function() { expect(result).toBe(vecA); }); + }); + }); + + describe("min", function() { + beforeEach(function() { vecA = [1, 3, 1]; vecB = [3, 1, 3]; }); + + describe("with a separate output vector", function() { + beforeEach(function() { result = vec3.min(out, vecA, vecB); }); + + it("should place values into out", function() { expect(out).toBeEqualish([1, 1, 1]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 3, 1]); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([3, 1, 3]); }); + }); + + describe("when vecA is the output vector", function() { + beforeEach(function() { result = vec3.min(vecA, vecA, vecB); }); + + it("should place values into vecA", function() { expect(vecA).toBeEqualish([1, 1, 1]); }); + it("should return vecA", function() { expect(result).toBe(vecA); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([3, 1, 3]); }); + }); + + describe("when vecB is the output vector", function() { + beforeEach(function() { result = vec3.min(vecB, vecA, vecB); }); + + it("should place values into vecB", function() { expect(vecB).toBeEqualish([1, 1, 1]); }); + it("should return vecB", function() { expect(result).toBe(vecB); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 3, 1]); }); + }); + }); + + describe("max", function() { + beforeEach(function() { vecA = [1, 3, 1]; vecB = [3, 1, 3]; }); + + describe("with a separate output vector", function() { + beforeEach(function() { result = vec3.max(out, vecA, vecB); }); + + it("should place values into out", function() { expect(out).toBeEqualish([3, 3, 3]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 3, 1]); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([3, 1, 3]); }); + }); + + describe("when vecA is the output vector", function() { + beforeEach(function() { result = vec3.max(vecA, vecA, vecB); }); + + it("should place values into vecA", function() { expect(vecA).toBeEqualish([3, 3, 3]); }); + it("should return vecA", function() { expect(result).toBe(vecA); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([3, 1, 3]); }); + }); + + describe("when vecB is the output vector", function() { + beforeEach(function() { result = vec3.max(vecB, vecA, vecB); }); + + it("should place values into vecB", function() { expect(vecB).toBeEqualish([3, 3, 3]); }); + it("should return vecB", function() { expect(result).toBe(vecB); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 3, 1]); }); + }); + }); + + describe("round", function() { + beforeEach(function() { vecA = [Math.E, Math.PI, Math.SQRT2]; }); + + describe("with a separate output vector", function() { + beforeEach(function() { result = vec3.round(out, vecA); }); + + it("should place values into out", function() { expect(out).toBeEqualish([3, 3, 1]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([Math.E, Math.PI, Math.SQRT2]); }); + }); + + describe("when vecA is the output vector", function() { + beforeEach(function() { result = vec3.round(vecA, vecA); }); + + it("should place values into vecA", function() { expect(vecA).toBeEqualish([3, 3, 1]); }); + it("should return vecA", function() { expect(result).toBe(vecA); }); + }); + }); + + describe("scale", function() { + describe("with a separate output vector", function() { + beforeEach(function() { result = vec3.scale(out, vecA, 2); }); + + it("should place values into out", function() { expect(out).toBeEqualish([2, 4, 6]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3]); }); + }); + + describe("when vecA is the output vector", function() { + beforeEach(function() { result = vec3.scale(vecA, vecA, 2); }); + + it("should place values into vecA", function() { expect(vecA).toBeEqualish([2, 4, 6]); }); + it("should return vecA", function() { expect(result).toBe(vecA); }); + }); + }); + + describe("scaleAndAdd", function() { + describe("with a separate output vector", function() { + beforeEach(function() { result = vec3.scaleAndAdd(out, vecA, vecB, 0.5); }); + + it("should place values into out", function() { expect(out).toBeEqualish([3, 4.5, 6]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3]); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([4, 5, 6]); }); + }); + + describe("when vecA is the output vector", function() { + beforeEach(function() { result = vec3.scaleAndAdd(vecA, vecA, vecB, 0.5); }); + + it("should place values into vecA", function() { expect(vecA).toBeEqualish([3, 4.5, 6]); }); + it("should return vecA", function() { expect(result).toBe(vecA); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([4, 5, 6]); }); + }); + + describe("when vecB is the output vector", function() { + beforeEach(function() { result = vec3.scaleAndAdd(vecB, vecA, vecB, 0.5); }); + + it("should place values into vecB", function() { expect(vecB).toBeEqualish([3, 4.5, 6]); }); + it("should return vecB", function() { expect(result).toBe(vecB); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3]); }); + }); + }); + + describe("distance", function() { + it("should have an alias called 'dist'", function() { expect(vec3.dist).toEqual(vec3.distance); }); + + beforeEach(function() { result = vec3.distance(vecA, vecB); }); + + it("should return the distance", function() { expect(result).toBeEqualish(5.196152); }); + }); + + describe("squaredDistance", function() { + it("should have an alias called 'sqrDist'", function() { expect(vec3.sqrDist).toEqual(vec3.squaredDistance); }); + + beforeEach(function() { result = vec3.squaredDistance(vecA, vecB); }); + + it("should return the squared distance", function() { expect(result).toEqual(27); }); + }); + + describe("length", function() { + it("should have an alias called 'len'", function() { expect(vec3.len).toEqual(vec3.length); }); + + beforeEach(function() { result = vec3.len(vecA); }); + + it("should return the length", function() { expect(result).toBeEqualish(3.741657); }); + }); + + describe("squaredLength", function() { + it("should have an alias called 'sqrLen'", function() { expect(vec3.sqrLen).toEqual(vec3.squaredLength); }); + + beforeEach(function() { result = vec3.squaredLength(vecA); }); + + it("should return the squared length", function() { expect(result).toEqual(14); }); + }); + + describe("negate", function() { + describe("with a separate output vector", function() { + beforeEach(function() { result = vec3.negate(out, vecA); }); + + it("should place values into out", function() { expect(out).toBeEqualish([-1, -2, -3]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3]); }); + }); + + describe("when vecA is the output vector", function() { + beforeEach(function() { result = vec3.negate(vecA, vecA); }); + + it("should place values into vecA", function() { expect(vecA).toBeEqualish([-1, -2, -3]); }); + it("should return vecA", function() { expect(result).toBe(vecA); }); + }); + }); + + describe("normalize", function() { + beforeEach(function() { vecA = [5, 0, 0]; }); + + describe("with a separate output vector", function() { + beforeEach(function() { result = vec3.normalize(out, vecA); }); + + it("should place values into out", function() { expect(out).toBeEqualish([1, 0, 0]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([5, 0, 0]); }); + }); + + describe("when vecA is the output vector", function() { + beforeEach(function() { result = vec3.normalize(vecA, vecA); }); + + it("should place values into vecA", function() { expect(vecA).toBeEqualish([1, 0, 0]); }); + it("should return vecA", function() { expect(result).toBe(vecA); }); + }); + }); + + describe("dot", function() { + beforeEach(function() { result = vec3.dot(vecA, vecB); }); + + it("should return the dot product", function() { expect(result).toEqual(32); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3]); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([4, 5, 6]); }); + }); + + describe("cross", function() { + describe("with a separate output vector", function() { + beforeEach(function() { result = vec3.cross(out, vecA, vecB); }); + + it("should place values into out", function() { expect(out).toBeEqualish([-3, 6, -3]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3]); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([4, 5, 6]); }); + }); + + describe("when vecA is the output vector", function() { + beforeEach(function() { result = vec3.cross(vecA, vecA, vecB); }); + + it("should place values into vecA", function() { expect(vecA).toBeEqualish([-3, 6, -3]); }); + it("should return vecA", function() { expect(result).toBe(vecA); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([4, 5, 6]); }); + }); + + describe("when vecB is the output vector", function() { + beforeEach(function() { result = vec3.cross(vecB, vecA, vecB); }); + + it("should place values into vecB", function() { expect(vecB).toBeEqualish([-3, 6, -3]); }); + it("should return vecB", function() { expect(result).toBe(vecB); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3]); }); + }); + }); + + describe("lerp", function() { + describe("with a separate output vector", function() { + beforeEach(function() { result = vec3.lerp(out, vecA, vecB, 0.5); }); + + it("should place values into out", function() { expect(out).toBeEqualish([2.5, 3.5, 4.5]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3]); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([4, 5, 6]); }); + }); + + describe("when vecA is the output vector", function() { + beforeEach(function() { result = vec3.lerp(vecA, vecA, vecB, 0.5); }); + + it("should place values into vecA", function() { expect(vecA).toBeEqualish([2.5, 3.5, 4.5]); }); + it("should return vecA", function() { expect(result).toBe(vecA); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([4, 5, 6]); }); + }); + + describe("when vecB is the output vector", function() { + beforeEach(function() { result = vec3.lerp(vecB, vecA, vecB, 0.5); }); + + it("should place values into vecB", function() { expect(vecB).toBeEqualish([2.5, 3.5, 4.5]); }); + it("should return vecB", function() { expect(result).toBe(vecB); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3]); }); + }); + }); + + describe('slerp', function() { + it('should compute the correct value at 0', () => { + let result = vec3.slerp([], [1,0,0], [0,1,0], 0); + expect(result).toBeEqualish([1,0,0]); + }); + it('should compute the correct value at 1', () => { + let result = vec3.slerp([], [1,0,0], [0,1,0], 1); + expect(result).toBeEqualish([0,1,0]); + }); + it('should compute the correct value at 0.5', () => { + let result = vec3.slerp([], [1,0,0], [0,1,0], 0.5); + expect(result).toBeEqualish([0.7071067811865475,0.7071067811865475,0]); + }); + }); + + describe("random", function() { + describe("with no scale", function() { + beforeEach(function() { result = vec3.random(out); }); + + it("should result in a unit length vector", function() { expect(vec3.len(out)).toBeEqualish(1.0); }); + it("should return out", function() { expect(result).toBe(out); }); + }); + + describe("with a scale", function() { + beforeEach(function() { result = vec3.random(out, 5.0); }); + + it("should result in a unit length vector", function() { expect(vec3.len(out)).toBeEqualish(5.0); }); + it("should return out", function() { expect(result).toBe(out); }); + }); + }); + + describe("forEach", function() { + let vecArray; + + beforeEach(function() { + vecArray = [ + 1, 2, 3, + 4, 5, 6, + 0, 0, 0 + ]; + }); + + describe("when performing operations that take no extra arguments", function() { + beforeEach(function() { result = vec3.forEach(vecArray, 0, 0, 0, vec3.normalize); }); + + it("should update all values", function() { + expect(vecArray).toBeEqualish([ + 0.267261, 0.534522, 0.801783, + 0.455842, 0.569802, 0.683763, + 0, 0, 0 + ]); + }); + it("should return vecArray", function() { expect(result).toBe(vecArray); }); + }); + + describe("when performing operations that takes one extra arguments", function() { + beforeEach(function() { result = vec3.forEach(vecArray, 0, 0, 0, vec3.add, vecA); }); + + it("should update all values", function() { + expect(vecArray).toBeEqualish([ + 2, 4, 6, + 5, 7, 9, + 1, 2, 3 + ]); + }); + it("should return vecArray", function() { expect(result).toBe(vecArray); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3]); }); + }); + + describe("when specifying an offset", function() { + beforeEach(function() { result = vec3.forEach(vecArray, 0, 3, 0, vec3.add, vecA); }); + + it("should update all values except the first vector", function() { + expect(vecArray).toBeEqualish([ + 1, 2, 3, + 5, 7, 9, + 1, 2, 3 + ]); + }); + it("should return vecArray", function() { expect(result).toBe(vecArray); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3]); }); + }); + + describe("when specifying a count", function() { + beforeEach(function() { result = vec3.forEach(vecArray, 0, 0, 2, vec3.add, vecA); }); + + it("should update all values except the last vector", function() { + expect(vecArray).toBeEqualish([ + 2, 4, 6, + 5, 7, 9, + 0, 0, 0 + ]); + }); + it("should return vecArray", function() { expect(result).toBe(vecArray); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3]); }); + }); + + describe("when specifying a stride", function() { + beforeEach(function() { result = vec3.forEach(vecArray, 6, 0, 0, vec3.add, vecA); }); + + it("should update all values except the second vector", function() { + expect(vecArray).toBeEqualish([ + 2, 4, 6, + 4, 5, 6, + 1, 2, 3 + ]); + }); + it("should return vecArray", function() { expect(result).toBe(vecArray); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3]); }); + }); + + describe("when calling a function that does not modify the out variable", function() { + beforeEach(function() { + result = vec3.forEach(vecArray, 0, 0, 0, function(out, vec) {}); + }); + + it("values should remain unchanged", function() { + expect(vecArray).toBeEqualish([ + 1, 2, 3, + 4, 5, 6, + 0, 0, 0 + ]); + }); + it("should return vecArray", function() { expect(result).toBe(vecArray); }); + }); + }); + + describe("angle", function() { + beforeEach(function() { result = vec3.angle(vecA, vecB); }); + + it("should return the angle", function() { expect(result).toBeEqualish(0.225726); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3]); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([4, 5, 6]); }); + }); + + describe("str", function() { + beforeEach(function() { result = vec3.str(vecA); }); + + it("should return a string representation of the vector", function() { expect(result).toEqual("vec3(1, 2, 3)"); }); + }); + + describe("exactEquals", function() { + let vecC, r0, r1; + beforeEach(function() { + vecA = [0, 1, 2]; + vecB = [0, 1, 2]; + vecC = [1, 2, 3]; + r0 = vec3.exactEquals(vecA, vecB); + r1 = vec3.exactEquals(vecA, vecC); + }); + + it("should return true for identical vectors", function() { expect(r0).toBe(true); }); + it("should return false for different vectors", function() { expect(r1).toBe(false); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([0, 1, 2]); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([0, 1, 2]); }); + }); + + describe("equals", function() { + let vecC, vecD, r0, r1, r2; + beforeEach(function() { + vecA = [0, 1, 2]; + vecB = [0, 1, 2]; + vecC = [1, 2, 3]; + vecD = [1e-16, 1, 2]; + r0 = vec3.equals(vecA, vecB); + r1 = vec3.equals(vecA, vecC); + r2 = vec3.equals(vecA, vecD); + }); + it("should return true for identical vectors", function() { expect(r0).toBe(true); }); + it("should return false for different vectors", function() { expect(r1).toBe(false); }); + it("should return true for close but not identical vectors", function() { expect(r2).toBe(true); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([0, 1, 2]); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([0, 1, 2]); }); + }); + + describe("zero", function() { + beforeEach(function() { + vecA = [1, 2, 3]; + result = vec3.zero(vecA); + }); + it("should result in a 3 element vector with zeros", function() { expect(result).toBeEqualish([0, 0, 0]); }); + }); +}); diff --git a/assembly/__tests__/vec4.spec.ts b/assembly/__tests__/vec4.spec.ts new file mode 100644 index 00000000..90a32b3d --- /dev/null +++ b/assembly/__tests__/vec4.spec.ts @@ -0,0 +1,611 @@ +import * as vec3 from "../vec3" +import * as vec4 from "../vec4" + +describe("vec4", function() { + let out, vecA, vecB, result; + + beforeEach(function() { vecA = [1, 2, 3, 4]; vecB = [5, 6, 7, 8]; out = [0, 0, 0, 0]; }); + + describe("create", function() { + beforeEach(function() { result = vec4.create(); }); + it("should return a 4 element array initialized to 0s", function() { expect(result).toBeEqualish([0, 0, 0, 0]); }); + }); + + describe("clone", function() { + beforeEach(function() { result = vec4.clone(vecA); }); + it("should return a 4 element array initialized to the values in vecA", function() { expect(result).toBeEqualish(vecA); }); + }); + + describe("fromValues", function() { + beforeEach(function() { result = vec4.fromValues(1, 2, 3, 4); }); + it("should return a 4 element array initialized to the values passed", function() { expect(result).toBeEqualish([1, 2, 3, 4]); }); + }); + + describe("copy", function() { + beforeEach(function() { result = vec4.copy(out, vecA); }); + it("should place values into out", function() { expect(out).toBeEqualish([1, 2, 3, 4]); }); + it("should return out", function() { expect(result).toBe(out); }); + }); + + describe("set", function() { + beforeEach(function() { result = vec4.set(out, 1, 2, 3, 4); }); + it("should place values into out", function() { expect(out).toBeEqualish([1, 2, 3, 4]); }); + it("should return out", function() { expect(result).toBe(out); }); + }); + + describe("add", function() { + describe("with a separate output vector", function() { + beforeEach(function() { result = vec4.add(out, vecA, vecB); }); + + it("should place values into out", function() { expect(out).toBeEqualish([6, 8, 10, 12]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3, 4]); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([5, 6, 7, 8]); }); + }); + + describe("when vecA is the output vector", function() { + beforeEach(function() { result = vec4.add(vecA, vecA, vecB); }); + + it("should place values into vecA", function() { expect(vecA).toBeEqualish([6, 8, 10, 12]); }); + it("should return vecA", function() { expect(result).toBe(vecA); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([5, 6, 7, 8]); }); + }); + + describe("when vecB is the output vector", function() { + beforeEach(function() { result = vec4.add(vecB, vecA, vecB); }); + + it("should place values into vecB", function() { expect(vecB).toBeEqualish([6, 8, 10, 12]); }); + it("should return vecB", function() { expect(result).toBe(vecB); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3, 4]); }); + }); + }); + + describe("subtract", function() { + it("should have an alias called 'sub'", function() { expect(vec4.sub).toEqual(vec4.subtract); }); + + describe("with a separate output vector", function() { + beforeEach(function() { result = vec4.subtract(out, vecA, vecB); }); + + it("should place values into out", function() { expect(out).toBeEqualish([-4, -4, -4, -4]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3, 4]); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([5, 6, 7, 8]); }); + }); + + describe("when vecA is the output vector", function() { + beforeEach(function() { result = vec4.subtract(vecA, vecA, vecB); }); + + it("should place values into vecA", function() { expect(vecA).toBeEqualish([-4, -4, -4, -4]); }); + it("should return vecA", function() { expect(result).toBe(vecA); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([5, 6, 7, 8]); }); + }); + + describe("when vecB is the output vector", function() { + beforeEach(function() { result = vec4.subtract(vecB, vecA, vecB); }); + + it("should place values into vecB", function() { expect(vecB).toBeEqualish([-4, -4, -4, -4]); }); + it("should return vecB", function() { expect(result).toBe(vecB); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3, 4]); }); + }); + }); + + describe("multiply", function() { + it("should have an alias called 'mul'", function() { expect(vec4.mul).toEqual(vec4.multiply); }); + + describe("with a separate output vector", function() { + beforeEach(function() { result = vec4.multiply(out, vecA, vecB); }); + + it("should place values into out", function() { expect(out).toBeEqualish([5, 12, 21, 32]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3, 4]); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([5, 6, 7, 8]); }); + }); + + describe("when vecA is the output vector", function() { + beforeEach(function() { result = vec4.multiply(vecA, vecA, vecB); }); + + it("should place values into vecA", function() { expect(vecA).toBeEqualish([5, 12, 21, 32]); }); + it("should return vecA", function() { expect(result).toBe(vecA); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([5, 6, 7, 8]); }); + }); + + describe("when vecB is the output vector", function() { + beforeEach(function() { result = vec4.multiply(vecB, vecA, vecB); }); + + it("should place values into vecB", function() { expect(vecB).toBeEqualish([5, 12, 21, 32]); }); + it("should return vecB", function() { expect(result).toBe(vecB); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3, 4]); }); + }); + }); + + describe("divide", function() { + it("should have an alias called 'div'", function() { expect(vec4.div).toEqual(vec4.divide); }); + + describe("with a separate output vector", function() { + beforeEach(function() { result = vec4.divide(out, vecA, vecB); }); + + it("should place values into out", function() { expect(out).toBeEqualish([0.2, 0.333333, 0.428571, 0.5]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3, 4]); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([5, 6, 7, 8]); }); + }); + + describe("when vecA is the output vector", function() { + beforeEach(function() { result = vec4.divide(vecA, vecA, vecB); }); + + it("should place values into vecA", function() { expect(vecA).toBeEqualish([0.2, 0.333333, 0.428571, 0.5]); }); + it("should return vecA", function() { expect(result).toBe(vecA); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([5, 6, 7, 8]); }); + }); + + describe("when vecB is the output vector", function() { + beforeEach(function() { result = vec4.divide(vecB, vecA, vecB); }); + + it("should place values into vecB", function() { expect(vecB).toBeEqualish([0.2, 0.333333, 0.428571, 0.5]); }); + it("should return vecB", function() { expect(result).toBe(vecB); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3, 4]); }); + }); + }); + + describe("ceil", function() { + beforeEach(function() { vecA = [Math.E, Math.PI, Math.SQRT2, Math.SQRT1_2]; }); + + describe("with a separate output vector", function() { + beforeEach(function() { result = vec4.ceil(out, vecA); }); + + it("should place values into out", function() { expect(out).toBeEqualish([3, 4, 2, 1]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([Math.E, Math.PI, Math.SQRT2, Math.SQRT1_2]); }); + }); + + describe("when vecA is the output vector", function() { + beforeEach(function() { result = vec4.ceil(vecA, vecA); }); + + it("should place values into vecA", function() { expect(vecA).toBeEqualish([3, 4, 2, 1]); }); + it("should return vecA", function() { expect(result).toBe(vecA); }); + }); + }); + + describe("floor", function() { + beforeEach(function() { vecA = [Math.E, Math.PI, Math.SQRT2, Math.SQRT1_2]; }); + + describe("with a separate output vector", function() { + beforeEach(function() { result = vec4.floor(out, vecA); }); + + it("should place values into out", function() { expect(out).toBeEqualish([2, 3, 1, 0]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([Math.E, Math.PI, Math.SQRT2, Math.SQRT1_2]); }); + }); + + describe("when vecA is the output vector", function() { + beforeEach(function() { result = vec4.floor(vecA, vecA); }); + + it("should place values into vecA", function() { expect(vecA).toBeEqualish([2, 3, 1, 0]); }); + it("should return vecA", function() { expect(result).toBe(vecA); }); + }); + }); + + describe("min", function() { + beforeEach(function() { vecA = [1, 3, 1, 3]; vecB = [3, 1, 3, 1]; }); + + describe("with a separate output vector", function() { + beforeEach(function() { result = vec4.min(out, vecA, vecB); }); + + it("should place values into out", function() { expect(out).toBeEqualish([1, 1, 1, 1]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 3, 1, 3]); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([3, 1, 3, 1]); }); + }); + + describe("when vecA is the output vector", function() { + beforeEach(function() { result = vec4.min(vecA, vecA, vecB); }); + + it("should place values into vecA", function() { expect(vecA).toBeEqualish([1, 1, 1, 1]); }); + it("should return vecA", function() { expect(result).toBe(vecA); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([3, 1, 3, 1]); }); + }); + + describe("when vecB is the output vector", function() { + beforeEach(function() { result = vec4.min(vecB, vecA, vecB); }); + + it("should place values into vecB", function() { expect(vecB).toBeEqualish([1, 1, 1, 1]); }); + it("should return vecB", function() { expect(result).toBe(vecB); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 3, 1, 3]); }); + }); + }); + + describe("max", function() { + beforeEach(function() { vecA = [1, 3, 1, 3]; vecB = [3, 1, 3, 1]; }); + + describe("with a separate output vector", function() { + beforeEach(function() { result = vec4.max(out, vecA, vecB); }); + + it("should place values into out", function() { expect(out).toBeEqualish([3, 3, 3, 3]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 3, 1, 3]); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([3, 1, 3, 1]); }); + }); + + describe("when vecA is the output vector", function() { + beforeEach(function() { result = vec4.max(vecA, vecA, vecB); }); + + it("should place values into vecA", function() { expect(vecA).toBeEqualish([3, 3, 3, 3]); }); + it("should return vecA", function() { expect(result).toBe(vecA); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([3, 1, 3, 1]); }); + }); + + describe("when vecB is the output vector", function() { + beforeEach(function() { result = vec4.max(vecB, vecA, vecB); }); + + it("should place values into vecB", function() { expect(vecB).toBeEqualish([3, 3, 3, 3]); }); + it("should return vecB", function() { expect(result).toBe(vecB); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 3, 1, 3]); }); + }); + }); + + describe("round", function() { + beforeEach(function() { vecA = [Math.E, Math.PI, Math.SQRT2, Math.SQRT1_2]; }); + + describe("with a separate output vector", function() { + beforeEach(function() { result = vec4.round(out, vecA); }); + + it("should place values into out", function() { expect(out).toBeEqualish([3, 3, 1, 1]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([Math.E, Math.PI, Math.SQRT2, Math.SQRT1_2]); }); + }); + + describe("when vecA is the output vector", function() { + beforeEach(function() { result = vec4.round(vecA, vecA); }); + + it("should place values into vecA", function() { expect(vecA).toBeEqualish([3, 3, 1, 1]); }); + it("should return vecA", function() { expect(result).toBe(vecA); }); + }); + }); + + describe("scale", function() { + describe("with a separate output vector", function() { + beforeEach(function() { result = vec4.scale(out, vecA, 2); }); + + it("should place values into out", function() { expect(out).toBeEqualish([2, 4, 6, 8]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3, 4]); }); + }); + + describe("when vecA is the output vector", function() { + beforeEach(function() { result = vec4.scale(vecA, vecA, 2); }); + + it("should place values into vecA", function() { expect(vecA).toBeEqualish([2, 4, 6, 8]); }); + it("should return vecA", function() { expect(result).toBe(vecA); }); + }); + }); + + describe("scaleAndAdd", function() { + describe("with a separate output vector", function() { + beforeEach(function() { result = vec4.scaleAndAdd(out, vecA, vecB, 0.5); }); + + it("should place values into out", function() { expect(out).toBeEqualish([3.5, 5, 6.5, 8]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3, 4]); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([5, 6, 7, 8]); }); + }); + + describe("when vecA is the output vector", function() { + beforeEach(function() { result = vec4.scaleAndAdd(vecA, vecA, vecB, 0.5); }); + + it("should place values into vecA", function() { expect(vecA).toBeEqualish([3.5, 5, 6.5, 8]); }); + it("should return vecA", function() { expect(result).toBe(vecA); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([5, 6, 7, 8]); }); + }); + + describe("when vecB is the output vector", function() { + beforeEach(function() { result = vec4.scaleAndAdd(vecB, vecA, vecB, 0.5); }); + + it("should place values into vecB", function() { expect(vecB).toBeEqualish([3.5, 5, 6.5, 8]); }); + it("should return vecB", function() { expect(result).toBe(vecB); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3, 4]); }); + }); + }); + + describe("distance", function() { + it("should have an alias called 'dist'", function() { expect(vec4.dist).toEqual(vec4.distance); }); + + beforeEach(function() { result = vec4.distance(vecA, vecB); }); + + it("should return the distance", function() { expect(result).toBeEqualish(8); }); + }); + + describe("squaredDistance", function() { + it("should have an alias called 'sqrDist'", function() { expect(vec4.sqrDist).toEqual(vec4.squaredDistance); }); + + beforeEach(function() { result = vec4.squaredDistance(vecA, vecB); }); + + it("should return the squared distance", function() { expect(result).toEqual(64); }); + }); + + describe("length", function() { + it("should have an alias called 'len'", function() { expect(vec4.len).toEqual(vec4.length); }); + + beforeEach(function() { result = vec4.len(vecA); }); + + it("should return the length", function() { expect(result).toBeEqualish(5.477225); }); + }); + + describe("squaredLength", function() { + it("should have an alias called 'sqrLen'", function() { expect(vec4.sqrLen).toEqual(vec4.squaredLength); }); + + beforeEach(function() { result = vec4.squaredLength(vecA); }); + + it("should return the squared length", function() { expect(result).toEqual(30); }); + }); + + describe("negate", function() { + describe("with a separate output vector", function() { + beforeEach(function() { result = vec4.negate(out, vecA); }); + + it("should place values into out", function() { expect(out).toBeEqualish([-1, -2, -3, -4]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3, 4]); }); + }); + + describe("when vecA is the output vector", function() { + beforeEach(function() { result = vec4.negate(vecA, vecA); }); + + it("should place values into vecA", function() { expect(vecA).toBeEqualish([-1, -2, -3, -4]); }); + it("should return vecA", function() { expect(result).toBe(vecA); }); + }); + }); + + describe("normalize", function() { + beforeEach(function() { vecA = [5, 0, 0, 0]; }); + + describe("with a separate output vector", function() { + beforeEach(function() { result = vec4.normalize(out, vecA); }); + + it("should place values into out", function() { expect(out).toBeEqualish([1, 0, 0, 0]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([5, 0, 0, 0]); }); + }); + + describe("when vecA is the output vector", function() { + beforeEach(function() { result = vec4.normalize(vecA, vecA); }); + + it("should place values into vecA", function() { expect(vecA).toBeEqualish([1, 0, 0, 0]); }); + it("should return vecA", function() { expect(result).toBe(vecA); }); + }); + }); + + describe("dot", function() { + beforeEach(function() { result = vec4.dot(vecA, vecB); }); + + it("should return the dot product", function() { expect(result).toEqual(70); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3, 4]); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([5, 6, 7, 8]); }); + }); + + describe("lerp", function() { + describe("with a separate output vector", function() { + beforeEach(function() { result = vec4.lerp(out, vecA, vecB, 0.5); }); + + it("should place values into out", function() { expect(out).toBeEqualish([3, 4, 5, 6]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3, 4]); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([5, 6, 7, 8]); }); + }); + + describe("when vecA is the output vector", function() { + beforeEach(function() { result = vec4.lerp(vecA, vecA, vecB, 0.5); }); + + it("should place values into vecA", function() { expect(vecA).toBeEqualish([3, 4, 5, 6]); }); + it("should return vecA", function() { expect(result).toBe(vecA); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([5, 6, 7, 8]); }); + }); + + describe("when vecB is the output vector", function() { + beforeEach(function() { result = vec4.lerp(vecB, vecA, vecB, 0.5); }); + + it("should place values into vecB", function() { expect(vecB).toBeEqualish([3, 4, 5, 6]); }); + it("should return vecB", function() { expect(result).toBe(vecB); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3, 4]); }); + }); + }); + + describe("random", function() { + describe("with no scale", function() { + beforeEach(function() { result = vec4.random(out); }); + + it("should result in a unit length vector", function() { expect(vec4.len(out)).toBeEqualish(1.0); }); + it("should return out", function() { expect(result).toBe(out); }); + }); + + describe("with a scale", function() { + beforeEach(function() { result = vec4.random(out, 5.0); }); + + it("should result in a unit length vector", function() { expect(vec4.len(out)).toBeEqualish(5.0); }); + it("should return out", function() { expect(result).toBe(out); }); + }); + }); + + describe("cross", function() { + let vecC = [0,0,0,0]; + beforeEach(function() { vecA = [1, 0, 0, 0]; vecB = [0, 1, 0, 0]; vecC = [0, 0, 1, 0]; }); + + describe("with a separate output vector", function() { + beforeEach(function() { result = vec4.cross(out, vecA,vecB,vecC); }); + + it("should place values into out", function() { expect(out).toBeEqualish([0, 0, 0, -1]); }); + it("should return out", function() { expect(result).toBe(out); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 0, 0, 0]); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([0, 1, 0, 0]); }); + it("should not modify vecC", function() { expect(vecC).toBeEqualish([0, 0, 1, 0]); }); + }); + + describe("when vecA is the output vector", function() { + beforeEach(function() { result = vec4.cross(vecA, vecA,vecB,vecC); }); + + it("should place values into vecA", function() { expect(vecA).toBeEqualish([0, 0, 0,-1]); }); + it("should return vecA", function() { expect(result).toBe(vecA); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([0, 1, 0, 0]); }); + it("should not modify vecC", function() { expect(vecC).toBeEqualish([0, 0, 1, 0]); }); + }); + describe("when vecB is the output vector", function() { + beforeEach(function() { result = vec4.cross(vecB, vecA,vecB,vecC); }); + + it("should place values into vecB", function() { expect(vecB).toBeEqualish([0, 0, 0,-1]); }); + it("should return vecB", function() { expect(result).toBe(vecB); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 0, 0, 0]); }); + it("should not modify vecC", function() { expect(vecC).toBeEqualish([0, 0, 1, 0]); }); + }); + describe("when vecC is the output vector", function() { + beforeEach(function() { result = vec4.cross(vecC, vecA,vecB,vecC); }); + + it("should place values into vecC", function() { expect(vecC).toBeEqualish([0, 0, 0,-1]); }); + it("should return vecC", function() { expect(result).toBe(vecC); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 0, 0, 0]); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([0, 1, 0, 0]); }); + }); + }); + + describe("forEach", function() { + let vecArray; + + beforeEach(function() { + vecArray = [ + 1, 2, 3, 4, + 5, 6, 7, 8, + 0, 0, 0, 0 + ]; + }); + + describe("when performing operations that take no extra arguments", function() { + beforeEach(function() { result = vec4.forEach(vecArray, 0, 0, 0, vec4.normalize); }); + + it("should update all values", function() { + expect(vecArray).toBeEqualish([ + 0.182574, 0.365148, 0.547722, 0.730296, + 0.379049, 0.454858, 0.530668, 0.606478, + 0, 0, 0, 0 + ]); + }); + it("should return vecArray", function() { expect(result).toBe(vecArray); }); + }); + + describe("when performing operations that takes one extra arguments", function() { + beforeEach(function() { result = vec4.forEach(vecArray, 0, 0, 0, vec4.add, vecA); }); + + it("should update all values", function() { + expect(vecArray).toBeEqualish([ + 2, 4, 6, 8, + 6, 8, 10, 12, + 1, 2, 3, 4 + ]); + }); + it("should return vecArray", function() { expect(result).toBe(vecArray); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3, 4]); }); + }); + + describe("when specifying an offset", function() { + beforeEach(function() { result = vec4.forEach(vecArray, 0, 4, 0, vec4.add, vecA); }); + + it("should update all values except the first vector", function() { + expect(vecArray).toBeEqualish([ + 1, 2, 3, 4, + 6, 8, 10, 12, + 1, 2, 3, 4 + ]); + }); + it("should return vecArray", function() { expect(result).toBe(vecArray); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3, 4]); }); + }); + + describe("when specifying a count", function() { + beforeEach(function() { result = vec4.forEach(vecArray, 0, 0, 2, vec4.add, vecA); }); + + it("should update all values except the last vector", function() { + expect(vecArray).toBeEqualish([ + 2, 4, 6, 8, + 6, 8, 10, 12, + 0, 0, 0, 0 + ]); + }); + it("should return vecArray", function() { expect(result).toBe(vecArray); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3, 4]); }); + }); + + describe("when specifying a stride", function() { + beforeEach(function() { result = vec4.forEach(vecArray, 8, 0, 0, vec4.add, vecA); }); + + it("should update all values except the second vector", function() { + expect(vecArray).toBeEqualish([ + 2, 4, 6, 8, + 5, 6, 7, 8, + 1, 2, 3, 4 + ]); + }); + it("should return vecArray", function() { expect(result).toBe(vecArray); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3, 4]); }); + }); + + describe("when calling a function that does not modify the out variable", function() { + beforeEach(function() { + result = vec3.forEach(vecArray, 0, 0, 0, function(out, vec) {}); + }); + + it("values should remain unchanged", function() { + expect(vecArray).toBeEqualish([ + 1, 2, 3, 4, + 5, 6, 7, 8, + 0, 0, 0, 0 + ]); + }); + it("should return vecArray", function() { expect(result).toBe(vecArray); }); + }); + }); + + describe("str", function() { + beforeEach(function() { result = vec4.str(vecA); }); + + it("should return a string representation of the vector", function() { expect(result).toEqual("vec4(1, 2, 3, 4)"); }); + }); + + describe("exactEquals", function() { + let vecC, r0, r1; + beforeEach(function() { + vecA = [0, 1, 2, 3]; + vecB = [0, 1, 2, 3]; + vecC = [1, 2, 3, 4]; + r0 = vec4.exactEquals(vecA, vecB); + r1 = vec4.exactEquals(vecA, vecC); + }); + + it("should return true for identical vectors", function() { expect(r0).toBe(true); }); + it("should return false for different vectors", function() { expect(r1).toBe(false); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([0, 1, 2, 3]); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([0, 1, 2, 3]); }); + }); + + describe("equals", function() { + let vecC, vecD, r0, r1, r2; + beforeEach(function() { + vecA = [0, 1, 2, 3]; + vecB = [0, 1, 2, 3]; + vecC = [1, 2, 3, 4]; + vecD = [1e-16, 1, 2, 3]; + r0 = vec4.equals(vecA, vecB); + r1 = vec4.equals(vecA, vecC); + r2 = vec4.equals(vecA, vecD); + }); + it("should return true for identical vectors", function() { expect(r0).toBe(true); }); + it("should return false for different vectors", function() { expect(r1).toBe(false); }); + it("should return true for close but not identical vectors", function() { expect(r2).toBe(true); }); + it("should not modify vecA", function() { expect(vecA).toBeEqualish([0, 1, 2, 3]); }); + it("should not modify vecB", function() { expect(vecB).toBeEqualish([0, 1, 2, 3]); }); + }); + + describe("zero", function() { + beforeEach(function() { + vecA = [1, 2, 3, 4]; + result = vec4.zero(vecA); + }); + it("should result in a 4 element vector with zeros", function() { expect(result).toBeEqualish([0, 0, 0, 0]); }); + }); +}); diff --git a/assembly/__tests__/worker.spec.ts b/assembly/__tests__/worker.spec.ts new file mode 100644 index 00000000..255a01e4 --- /dev/null +++ b/assembly/__tests__/worker.spec.ts @@ -0,0 +1,44 @@ +/* spec tests gl-matrix when embedded into a Web Worker */ + +// only test with workers if workers are available +if (typeof(Worker) !== 'undefined') { + describe("Embedded within Web Workers", function() { + it("should initialize successfully", function() { + let xhr = new XMLHttpRequest(); + let source = null; + xhr.onreadystatechange = function() { + if (this.readyState == this.DONE) { + if (this.status == 200) { + source = this.responseText; + } + } + }; + xhr.open("GET", "/dist/gl-matrix-min.js"); + xhr.send(); + + let result = null; + + waitsFor(function() { + if (!source) return false; + let blob = new Blob([ + source, + "self.postMessage(vec3.create());" + ], + {type: "application/javascript"} + ); + + let worker = new Worker(URL.createObjectURL(blob)); + worker.onmessage = function(e) { + result = e.data; + }; + return true; + }); + + waitsFor(function() { + if (!result) return false; + expect(result).toBeEqualish([0, 0, 0]); + return true; + }); + }); + }); +}